figura-cli 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,50 +1,50 @@
1
1
  #!/usr/bin/env node
2
- import{createRequire as LM}from"node:module";var jM=Object.create;var{getPrototypeOf:KM,defineProperty:lY,getOwnPropertyNames:DM}=Object;var BM=Object.prototype.hasOwnProperty;function HM(c){return this[c]}var OM,pM,hY=(c,$,Q)=>{var J=c!=null&&typeof c==="object";if(J){var Y=$?OM??=new WeakMap:pM??=new WeakMap,X=Y.get(c);if(X)return X}Q=c!=null?jM(KM(c)):{};let m=$||!c||!c.__esModule?lY(Q,"default",{value:c,enumerable:!0}):Q;for(let W of DM(c))if(!BM.call(m,W))lY(m,W,{get:HM.bind(c,W),enumerable:!0});if(J)Y.set(c,m);return m};var l=(c,$)=>()=>($||c(($={exports:{}}).exports,$),$.exports);var RM=(c)=>c;function IM(c,$){this[c]=RM.bind(null,$)}var yY=(c,$)=>{for(var Q in $)lY(c,Q,{get:$[Q],enumerable:!0,configurable:!0,set:IM.bind($,Q)})};var iJ=(c,$)=>()=>(c&&($=c(c=0)),$);var Rc=LM(import.meta.url);var fW=l((WI,TW)=>{var FW=Rc("stream").Stream,SV=Rc("util");TW.exports=L0;function L0(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}SV.inherits(L0,FW);L0.create=function(c,$){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];Q.source=c;var Y=c.emit;if(c.emit=function(){return Q._handleEmit(arguments),Y.apply(c,arguments)},c.on("error",function(){}),Q.pauseStream)c.pause();return Q};Object.defineProperty(L0.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});L0.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};L0.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};L0.prototype.pause=function(){this.source.pause()};L0.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(c){this.emit.apply(this,c)}.bind(this)),this._bufferedEvents=[]};L0.prototype.pipe=function(){var c=FW.prototype.pipe.apply(this,arguments);return this.resume(),c};L0.prototype._handleEmit=function(c){if(this._released){this.emit.apply(this,c);return}if(c[0]==="data")this.dataSize+=c[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(c)};L0.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(c))}});var kW=l((GI,aW)=>{var AV=Rc("util"),uW=Rc("stream").Stream,nW=fW();aW.exports=Cc;function Cc(){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}AV.inherits(Cc,uW);Cc.create=function(c){var $=new this;c=c||{};for(var Q in c)$[Q]=c[Q];return $};Cc.isStreamLike=function(c){return typeof c!=="function"&&typeof c!=="string"&&typeof c!=="boolean"&&typeof c!=="number"&&!Buffer.isBuffer(c)};Cc.prototype.append=function(c){var $=Cc.isStreamLike(c);if($){if(!(c instanceof nW)){var Q=nW.create(c,{maxDataSize:1/0,pauseStream:this.pauseStreams});c.on("data",this._checkDataSize.bind(this)),c=Q}if(this._handleErrors(c),this.pauseStreams)c.pause()}return this._streams.push(c),this};Cc.prototype.pipe=function(c,$){return uW.prototype.pipe.call(this,c,$),this.resume(),c};Cc.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}};Cc.prototype._realGetNext=function(){var c=this._streams.shift();if(typeof c>"u"){this.end();return}if(typeof c!=="function"){this._pipeNext(c);return}var $=c;$(function(Q){var J=Cc.isStreamLike(Q);if(J)Q.on("data",this._checkDataSize.bind(this)),this._handleErrors(Q);this._pipeNext(Q)}.bind(this))};Cc.prototype._pipeNext=function(c){this._currentStream=c;var $=Cc.isStreamLike(c);if($){c.on("end",this._getNext.bind(this)),c.pipe(this,{end:!1});return}var Q=c;this.write(Q),this._getNext()};Cc.prototype._handleErrors=function(c){var $=this;c.on("error",function(Q){$._emitError(Q)})};Cc.prototype.write=function(c){this.emit("data",c)};Cc.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};Cc.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")};Cc.prototype.end=function(){this._reset(),this.emit("end")};Cc.prototype.destroy=function(){this._reset(),this.emit("close")};Cc.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Cc.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(c))};Cc.prototype._updateDataSize=function(){this.dataSize=0;var c=this;if(this._streams.forEach(function($){if(!$.dataSize)return;c.dataSize+=$.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};Cc.prototype._emitError=function(c){this._reset(),this.emit("error",c)}});var lW=l((zI,CV)=>{CV.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var dW=l((nV)=>{/*!
2
+ import{createRequire as oV}from"node:module";var TV=Object.create;var{getPrototypeOf:fV,defineProperty:KX,getOwnPropertyNames:nV}=Object;var uV=Object.prototype.hasOwnProperty;function kV(c){return this[c]}var aV,lV,DX=(c,$,Q)=>{var J=c!=null&&typeof c==="object";if(J){var Y=$?aV??=new WeakMap:lV??=new WeakMap,X=Y.get(c);if(X)return X}Q=c!=null?TV(fV(c)):{};let W=$||!c||!c.__esModule?KX(Q,"default",{value:c,enumerable:!0}):Q;for(let m of nV(c))if(!uV.call(W,m))KX(W,m,{get:kV.bind(c,m),enumerable:!0});if(J)Y.set(c,W);return W};var l=(c,$)=>()=>($||c(($={exports:{}}).exports,$),$.exports);var hV=(c)=>c;function yV(c,$){this[c]=hV.bind(null,$)}var vQ=(c,$)=>{for(var Q in $)KX(c,Q,{get:$[Q],enumerable:!0,configurable:!0,set:yV.bind($,Q)})};var d=(c,$)=>()=>(c&&($=c(c=0)),$);var Zc=oV(import.meta.url);function UQ(c,$){return function(){return c.apply($,arguments)}}function K$(c){return c!==null&&!j$(c)&&c.constructor!==null&&!j$(c.constructor)&&G0(c.constructor.isBuffer)&&c.constructor.isBuffer(c)}function sV(c){let $;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)$=ArrayBuffer.isView(c);else $=c&&c.buffer&&MG(c.buffer);return $}function mw(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}function DQ(c,$,{allOwnKeys:Q=!1}={}){if(c===null||typeof c>"u")return;let J,Y;if(typeof c!=="object")c=[c];if(k8(c))for(J=0,Y=c.length;J<Y;J++)$.call(null,c[J],J,c);else{if(K$(c))return;let X=Q?Object.getOwnPropertyNames(c):Object.keys(c),W=X.length,m;for(J=0;J<W;J++)m=X[J],$.call(null,c[m],m,c)}}function VG(c,$){if(K$(c))return null;$=$.toLowerCase();let Q=Object.keys(c),J=Q.length,Y;while(J-- >0)if(Y=Q[J],$===Y.toLowerCase())return Y;return null}function BX(...c){let{caseless:$,skipUndefined:Q}=wG(this)&&this||{},J={},Y=(X,W)=>{if(W==="__proto__"||W==="constructor"||W==="prototype")return;let m=$&&typeof W==="string"&&VG(J,W)||W,G=ZJ(J,m)?J[m]:void 0;if(IJ(G)&&IJ(X))J[m]=BX(G,X);else if(IJ(X))J[m]=BX({},X);else if(k8(X))J[m]=X.slice();else if(!Q||!j$(X))J[m]=X};for(let X=0,W=c.length;X<W;X++){let m=c[X];if(!m||K$(m))continue;if(DQ(m,Y),typeof m!=="object"||k8(m))continue;let G=Object.getOwnPropertySymbols(m);for(let z=0;z<G.length;z++){let x=G[z];if(pw.call(m,x))Y(m[x],x)}}return J}function Aw(c){return!!(c&&G0(c.append)&&c[qG]==="FormData"&&c[KQ])}var gV,U$,KQ,qG,ZJ,jQ=(c,$)=>{let Q=c,J=[];while(Q!=null&&Q!==Object.prototype){if(J.indexOf(Q)!==-1)return!1;if(J.push(Q),ZJ(Q,$))return!0;Q=U$(Q)}return!1},dV=(c,$)=>c!=null&&jQ(c,$)?c[$]:void 0,HX,C0=(c)=>{return c=c.toLowerCase(),($)=>HX($)===c},LJ=(c)=>($)=>typeof $===c,k8,j$,MG,rV,G0,NG,D$=(c)=>c!==null&&typeof c==="object",tV=(c)=>c===!0||c===!1,IJ=(c)=>{if(!D$(c))return!1;let $=U$(c);return($===null||$===Object.prototype||U$($)===null)&&!jQ(c,qG)&&!jQ(c,KQ)},eV=(c)=>{if(!D$(c)||K$(c))return!1;try{return Object.keys(c).length===0&&Object.getPrototypeOf(c)===Object.prototype}catch($){return!1}},cw,$w,Qw=(c)=>{return!!(c&&typeof c.uri<"u")},Jw=(c)=>c&&typeof c.getParts<"u",Yw,Xw,Ww=(c)=>D$(c)&&G0(c.pipe),zG,xG,Gw=(c)=>{if(!c)return!1;if(xG&&c instanceof xG)return!0;let $=U$(c);if(!$||$===Object.prototype)return!1;if(!G0(c.append))return!1;let Q=HX(c);return Q==="formdata"||Q==="object"&&G0(c.toString)&&c.toString()==="[object FormData]"},zw,xw,qw,Mw,Nw,Vw=(c)=>{return c.trim?c.trim():c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")},u8,wG=(c)=>!j$(c)&&c!==u8,ww=(c,$,Q,{allOwnKeys:J}={})=>{return DQ($,(Y,X)=>{if(Q&&G0(Y))Object.defineProperty(c,X,{__proto__:null,value:UQ(Y,Q),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(c,X,{__proto__:null,value:Y,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:J}),c},iw=(c)=>{if(c.charCodeAt(0)===65279)c=c.slice(1);return c},vw=(c,$,Q,J)=>{c.prototype=Object.create($.prototype,J),Object.defineProperty(c.prototype,"constructor",{__proto__:null,value:c,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(c,"super",{__proto__:null,value:$.prototype}),Q&&Object.assign(c.prototype,Q)},Uw=(c,$,Q,J)=>{let Y,X,W,m={};if($=$||{},c==null)return $;do{Y=Object.getOwnPropertyNames(c),X=Y.length;while(X-- >0)if(W=Y[X],(!J||J(W,c,$))&&!m[W])$[W]=c[W],m[W]=!0;c=Q!==!1&&U$(c)}while(c&&(!Q||Q(c,$))&&c!==Object.prototype);return $},jw=(c,$,Q)=>{if(c=String(c),Q===void 0||Q>c.length)Q=c.length;Q-=$.length;let J=c.indexOf($,Q);return J!==-1&&J===Q},Kw=(c)=>{if(!c)return null;if(k8(c))return c;let $=c.length;if(!NG($))return null;let Q=Array($);while($-- >0)Q[$]=c[$];return Q},Dw,Bw=(c,$)=>{let J=(c&&c[KQ]).call(c),Y;while((Y=J.next())&&!Y.done){let X=Y.value;$.call(c,X[0],X[1])}},Hw=(c,$)=>{let Q,J=[];while((Q=c.exec($))!==null)J.push(Q);return J},Ow,Rw=(c)=>{return c.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Q,J,Y){return J.toUpperCase()+Y})},pw,Iw,iG=(c,$)=>{let Q=Object.getOwnPropertyDescriptors(c),J={};DQ(Q,(Y,X)=>{let W;if((W=$(Y,X,c))!==!1)J[X]=W||Y}),Object.defineProperties(c,J)},Zw=(c)=>{iG(c,($,Q)=>{if(G0(c)&&["arguments","caller","callee"].includes(Q))return!1;let J=c[Q];if(!G0(J))return;if($.enumerable=!1,"writable"in $){$.writable=!1;return}if(!$.set)$.set=()=>{throw Error("Can not rewrite read-only method '"+Q+"'")}})},Lw=(c,$)=>{let Q={},J=(Y)=>{Y.forEach((X)=>{Q[X]=!0})};return k8(c)?J(c):J(String(c).split($)),Q},_w=()=>{},Sw=(c,$)=>{return c!=null&&Number.isFinite(c=+c)?c:$},Cw=(c)=>{let $=new WeakSet,Q=(J)=>{if(D$(J)){if($.has(J))return;if(K$(J))return J;if(!("toJSON"in J)){$.add(J);let Y=k8(J)?[]:{};return DQ(J,(X,W)=>{let m=Q(X);!j$(m)&&(Y[W]=m)}),$.delete(J),Y}}return J};return Q(c)},Pw,Ew=(c)=>c&&(D$(c)||G0(c))&&G0(c.then)&&G0(c.catch),vG,bw,UG=(c)=>c!=null&&G0(c[KQ]),Fw=(c)=>c!=null&&jQ(c,KQ)&&UG(c),V;var Lc=d(()=>{({toString:gV}=Object.prototype),{getPrototypeOf:U$}=Object,{iterator:KQ,toStringTag:qG}=Symbol,ZJ=(({hasOwnProperty:c})=>($,Q)=>c.call($,Q))(Object.prototype),HX=((c)=>($)=>{let Q=gV.call($);return c[Q]||(c[Q]=Q.slice(8,-1).toLowerCase())})(Object.create(null)),{isArray:k8}=Array,j$=LJ("undefined");MG=C0("ArrayBuffer");rV=LJ("string"),G0=LJ("function"),NG=LJ("number"),cw=C0("Date"),$w=C0("File"),Yw=C0("Blob"),Xw=C0("FileList");zG=mw(),xG=typeof zG.FormData<"u"?zG.FormData:void 0,zw=C0("URLSearchParams"),[xw,qw,Mw,Nw]=["ReadableStream","Request","Response","Headers"].map(C0);u8=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})();Dw=((c)=>{return($)=>{return c&&$ instanceof c}})(typeof Uint8Array<"u"&&U$(Uint8Array)),Ow=C0("HTMLFormElement"),{propertyIsEnumerable:pw}=Object.prototype,Iw=C0("RegExp");Pw=C0("AsyncFunction"),vG=((c,$)=>{if(c)return setImmediate;return $?((Q,J)=>{return u8.addEventListener("message",({source:Y,data:X})=>{if(Y===u8&&X===Q)J.length&&J.shift()()},!1),(Y)=>{J.push(Y),u8.postMessage(Q,"*")}})(`axios@${Math.random()}`,[]):(Q)=>setTimeout(Q)})(typeof setImmediate==="function",G0(u8.postMessage)),bw=typeof queueMicrotask<"u"?queueMicrotask.bind(u8):typeof process<"u"&&process.nextTick||vG,V={isArray:k8,isArrayBuffer:MG,isBuffer:K$,isFormData:Gw,isArrayBufferView:sV,isString:rV,isNumber:NG,isBoolean:tV,isObject:D$,isPlainObject:IJ,isEmptyObject:eV,isReadableStream:xw,isRequest:qw,isResponse:Mw,isHeaders:Nw,isUndefined:j$,isDate:cw,isFile:$w,isReactNativeBlob:Qw,isReactNative:Jw,isBlob:Yw,isRegExp:Iw,isFunction:G0,isStream:Ww,isURLSearchParams:zw,isTypedArray:Dw,isFileList:Xw,forEach:DQ,merge:BX,extend:ww,trim:Vw,stripBOM:iw,inherits:vw,toFlatObject:Uw,kindOf:HX,kindOfTest:C0,endsWith:jw,toArray:Kw,forEachEntry:Bw,matchAll:Hw,isHTMLForm:Ow,hasOwnProperty:ZJ,hasOwnProp:ZJ,hasOwnInPrototypeChain:jQ,getSafeProp:dV,reduceDescriptors:iG,freezeMethods:Zw,toObjectSet:Lw,toCamelCase:Rw,noop:_w,toFiniteNumber:Sw,findKey:VG,global:u8,isContextDefined:wG,isSpecCompliantForm:Aw,toJSONObject:Cw,isAsyncFn:Pw,isThenable:Ew,setImmediate:vG,asap:bw,isIterable:UG,isSafeIterable:Fw}});var Tw,jG=(c)=>{let $={},Q,J,Y;return c&&c.split(`
3
+ `).forEach(function(W){if(Y=W.indexOf(":"),Q=W.substring(0,Y).trim().toLowerCase(),J=W.substring(Y+1).trim(),!Q||$[Q]&&Tw[Q])return;if(Q==="set-cookie")if($[Q])$[Q].push(J);else $[Q]=[J];else $[Q]=$[Q]?$[Q]+", "+J:J}),$};var KG=d(()=>{Lc();Tw=V.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 fw(c){let $=0,Q=c.length;while($<Q){let J=c.charCodeAt($);if(J!==9&&J!==32)break;$+=1}while(Q>$){let J=c.charCodeAt(Q-1);if(J!==9&&J!==32)break;Q-=1}return $===0&&Q===c.length?c:c.slice($,Q)}function OX(c,$){if(V.isArray(c))return c.map((Q)=>OX(Q,$));return fw(String(c).replace($,""))}function B$(c){let $=Object.create(null);return V.forEach(c.toJSON(),(Q,J)=>{$[J]=kw(Q)}),$}var nw,uw,DG=(c)=>OX(c,nw),kw=(c)=>OX(c,uw);var BQ=d(()=>{Lc();nw=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),uw=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g")});function HQ(c){return c&&String(c).trim().toLowerCase()}function _J(c){if(c===!1||c==null)return c;return V.isArray(c)?c.map(_J):DG(String(c))}function aw(c){let $=Object.create(null),Q=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,J;while(J=Q.exec(c))$[J[1]]=J[2];return $}function RX(c,$,Q,J,Y){if(V.isFunction(J))return J.call(this,$,Q);if(Y)$=Q;if(!V.isString($))return;if(V.isString(J))return $.indexOf(J)!==-1;if(V.isRegExp(J))return J.test($)}function hw(c){return c.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,($,Q,J)=>{return Q.toUpperCase()+J})}function yw(c,$){let Q=V.toCamelCase(" "+$);["get","set","has"].forEach((J)=>{Object.defineProperty(c,J+Q,{__proto__:null,value:function(Y,X,W){return this[J].call(this,$,Y,X,W)},configurable:!0})})}var BG,lw=(c)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(c.trim()),OQ,_c;var P0=d(()=>{Lc();KG();BQ();BG=Symbol("internals");OQ=class OQ{constructor(c){c&&this.set(c)}set(c,$,Q){let J=this;function Y(W,m,G){let z=HQ(m);if(!z)return;let x=V.findKey(J,z);if(!x||J[x]===void 0||G===!0||G===void 0&&J[x]!==!1)J[x||m]=_J(W)}let X=(W,m)=>V.forEach(W,(G,z)=>Y(G,z,m));if(V.isPlainObject(c)||c instanceof this.constructor)X(c,$);else if(V.isString(c)&&(c=c.trim())&&!lw(c))X(jG(c),$);else if(V.isObject(c)&&V.isSafeIterable(c)){let W=Object.create(null),m,G;for(let z of c){if(!V.isArray(z))throw TypeError("Object iterator must return a key-value pair");if(G=z[0],V.hasOwnProp(W,G))m=W[G],W[G]=V.isArray(m)?[...m,z[1]]:[m,z[1]];else W[G]=z[1]}X(W,$)}else c!=null&&Y($,c,Q);return this}get(c,$){if(c=HQ(c),c){let Q=V.findKey(this,c);if(Q){let J=this[Q];if(!$)return J;if($===!0)return aw(J);if(V.isFunction($))return $.call(this,J,Q);if(V.isRegExp($))return $.exec(J);throw TypeError("parser must be boolean|regexp|function")}}}has(c,$){if(c=HQ(c),c){let Q=V.findKey(this,c);return!!(Q&&this[Q]!==void 0&&(!$||RX(this,this[Q],Q,$)))}return!1}delete(c,$){let Q=this,J=!1;function Y(X){if(X=HQ(X),X){let W=V.findKey(Q,X);if(W&&(!$||RX(Q,Q[W],W,$)))delete Q[W],J=!0}}if(V.isArray(c))c.forEach(Y);else Y(c);return J}clear(c){let $=Object.keys(this),Q=$.length,J=!1;while(Q--){let Y=$[Q];if(!c||RX(this,this[Y],Y,c,!0))delete this[Y],J=!0}return J}normalize(c){let $=this,Q={};return V.forEach(this,(J,Y)=>{let X=V.findKey(Q,Y);if(X){$[X]=_J(J),delete $[Y];return}let W=c?hw(Y):String(Y).trim();if(W!==Y)delete $[Y];$[W]=_J(J),Q[W]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){let $=Object.create(null);return V.forEach(this,(Q,J)=>{Q!=null&&Q!==!1&&($[J]=c&&V.isArray(Q)?Q.join(", "):Q)}),$}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,$])=>c+": "+$).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...$){let Q=new this(c);return $.forEach((J)=>Q.set(J)),Q}static accessor(c){let Q=(this[BG]=this[BG]={accessors:{}}).accessors,J=this.prototype;function Y(X){let W=HQ(X);if(!Q[W])yw(J,X),Q[W]=!0}return V.isArray(c)?c.forEach(Y):Y(c),this}};OQ.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(OQ.prototype,({value:c},$)=>{let Q=$[0].toUpperCase()+$.slice(1);return{get:()=>c,set(J){this[Q]=J}}});V.freezeMethods(OQ);_c=OQ});function gw(c){if(V.hasOwnProp(c,"toJSON"))return!0;let $=Object.getPrototypeOf(c);while($&&$!==Object.prototype){if(V.hasOwnProp($,"toJSON"))return!0;$=Object.getPrototypeOf($)}return!1}function dw(c,$){let Q=new Set($.map((X)=>String(X).toLowerCase())),J=[],Y=(X)=>{if(X===null||typeof X!=="object")return X;if(V.isBuffer(X))return X;if(J.indexOf(X)!==-1)return;if(X instanceof _c)X=X.toJSON();J.push(X);let W;if(V.isArray(X))W=[],X.forEach((m,G)=>{let z=Y(m);if(!V.isUndefined(z))W[G]=z});else{if(!V.isPlainObject(X)&&gw(X))return J.pop(),X;W=Object.create(null);for(let[m,G]of Object.entries(X)){let z=Q.has(m.toLowerCase())?ow:Y(G);if(!V.isUndefined(z))W[m]=z}}return J.pop(),W};return Y(c)}var ow="[REDACTED ****]",yc,O;var X0=d(()=>{Lc();P0();yc=class yc extends Error{static from(c,$,Q,J,Y,X){let W=new yc(c.message,$||c.code,Q,J,Y);if(W.cause=c,W.name=c.name,c.status!=null&&W.status==null)W.status=c.status;return X&&Object.assign(W,X),W}constructor(c,$,Q,J,Y){super(c);if(Object.defineProperty(this,"message",{__proto__:null,value:c,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,$&&(this.code=$),Q&&(this.config=Q),J&&(this.request=J),Y)this.response=Y,this.status=Y.status}toJSON(){let c=this.config,$=c&&V.hasOwnProp(c,"redact")?c.redact:void 0,Q=V.isArray($)&&$.length>0?dw(c,$):V.toJSONObject(c);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:Q,code:this.code,status:this.status}}};yc.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";yc.ERR_BAD_OPTION="ERR_BAD_OPTION";yc.ECONNABORTED="ECONNABORTED";yc.ETIMEDOUT="ETIMEDOUT";yc.ECONNREFUSED="ECONNREFUSED";yc.ERR_NETWORK="ERR_NETWORK";yc.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";yc.ERR_DEPRECATED="ERR_DEPRECATED";yc.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";yc.ERR_BAD_REQUEST="ERR_BAD_REQUEST";yc.ERR_CANCELED="ERR_CANCELED";yc.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";yc.ERR_INVALID_URL="ERR_INVALID_URL";yc.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";O=yc});var RG=l((fZ,OG)=>{var HG=Zc("stream").Stream,sw=Zc("util");OG.exports=E0;function E0(){this.source=null,this.dataSize=0,this.maxDataSize=1048576,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}sw.inherits(E0,HG);E0.create=function(c,$){var Q=new this;$=$||{};for(var J in $)Q[J]=$[J];Q.source=c;var Y=c.emit;if(c.emit=function(){return Q._handleEmit(arguments),Y.apply(c,arguments)},c.on("error",function(){}),Q.pauseStream)c.pause();return Q};Object.defineProperty(E0.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});E0.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};E0.prototype.resume=function(){if(!this._released)this.release();this.source.resume()};E0.prototype.pause=function(){this.source.pause()};E0.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(c){this.emit.apply(this,c)}.bind(this)),this._bufferedEvents=[]};E0.prototype.pipe=function(){var c=HG.prototype.pipe.apply(this,arguments);return this.resume(),c};E0.prototype._handleEmit=function(c){if(this._released){this.emit.apply(this,c);return}if(c[0]==="data")this.dataSize+=c[1].length,this._checkIfMaxDataSizeExceeded();this._bufferedEvents.push(c)};E0.prototype._checkIfMaxDataSizeExceeded=function(){if(this._maxDataSizeExceeded)return;if(this.dataSize<=this.maxDataSize)return;this._maxDataSizeExceeded=!0;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",Error(c))}});var LG=l((nZ,ZG)=>{var rw=Zc("util"),IG=Zc("stream").Stream,pG=RG();ZG.exports=Ec;function Ec(){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}rw.inherits(Ec,IG);Ec.create=function(c){var $=new this;c=c||{};for(var Q in c)$[Q]=c[Q];return $};Ec.isStreamLike=function(c){return typeof c!=="function"&&typeof c!=="string"&&typeof c!=="boolean"&&typeof c!=="number"&&!Buffer.isBuffer(c)};Ec.prototype.append=function(c){var $=Ec.isStreamLike(c);if($){if(!(c instanceof pG)){var Q=pG.create(c,{maxDataSize:1/0,pauseStream:this.pauseStreams});c.on("data",this._checkDataSize.bind(this)),c=Q}if(this._handleErrors(c),this.pauseStreams)c.pause()}return this._streams.push(c),this};Ec.prototype.pipe=function(c,$){return IG.prototype.pipe.call(this,c,$),this.resume(),c};Ec.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}};Ec.prototype._realGetNext=function(){var c=this._streams.shift();if(typeof c>"u"){this.end();return}if(typeof c!=="function"){this._pipeNext(c);return}var $=c;$(function(Q){var J=Ec.isStreamLike(Q);if(J)Q.on("data",this._checkDataSize.bind(this)),this._handleErrors(Q);this._pipeNext(Q)}.bind(this))};Ec.prototype._pipeNext=function(c){this._currentStream=c;var $=Ec.isStreamLike(c);if($){c.on("end",this._getNext.bind(this)),c.pipe(this,{end:!1});return}var Q=c;this.write(Q),this._getNext()};Ec.prototype._handleErrors=function(c){var $=this;c.on("error",function(Q){$._emitError(Q)})};Ec.prototype.write=function(c){this.emit("data",c)};Ec.prototype.pause=function(){if(!this.pauseStreams)return;if(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function")this._currentStream.pause();this.emit("pause")};Ec.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")};Ec.prototype.end=function(){this._reset(),this.emit("end")};Ec.prototype.destroy=function(){this._reset(),this.emit("close")};Ec.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};Ec.prototype._checkDataSize=function(){if(this._updateDataSize(),this.dataSize<=this.maxDataSize)return;var c="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(Error(c))};Ec.prototype._updateDataSize=function(){this.dataSize=0;var c=this;if(this._streams.forEach(function($){if(!$.dataSize)return;c.dataSize+=$.dataSize}),this._currentStream&&this._currentStream.dataSize)this.dataSize+=this._currentStream.dataSize};Ec.prototype._emitError=function(c){this._reset(),this.emit("error",c)}});var _G=l((uZ,tw)=>{tw.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var EG=l((Xi)=>{/*!
3
5
  * mime-types
4
6
  * Copyright(c) 2014 Jonathan Ong
5
7
  * Copyright(c) 2015 Douglas Christopher Wilson
6
8
  * MIT Licensed
7
- */var wJ=lW(),PV=Rc("path").extname,hW=/^\s*([^;\s]*)(?:;|\s|$)/,bV=/^text\//i;nV.charset=yW;nV.charsets={lookup:yW};nV.contentType=EV;nV.extension=FV;nV.extensions=Object.create(null);nV.lookup=TV;nV.types=Object.create(null);fV(nV.extensions,nV.types);function yW(c){if(!c||typeof c!=="string")return!1;var $=hW.exec(c),Q=$&&wJ[$[1].toLowerCase()];if(Q&&Q.charset)return Q.charset;if($&&bV.test($[1]))return"UTF-8";return!1}function EV(c){if(!c||typeof c!=="string")return!1;var $=c.indexOf("/")===-1?nV.lookup(c):c;if(!$)return!1;if($.indexOf("charset")===-1){var Q=nV.charset($);if(Q)$+="; charset="+Q.toLowerCase()}return $}function FV(c){if(!c||typeof c!=="string")return!1;var $=hW.exec(c),Q=$&&nV.extensions[$[1].toLowerCase()];if(!Q||!Q.length)return!1;return Q[0]}function TV(c){if(!c||typeof c!=="string")return!1;var $=PV("x."+c).toLowerCase().substr(1);if(!$)return!1;return nV.types[$]||!1}function fV(c,$){var Q=["nginx","apache",void 0,"iana"];Object.keys(wJ).forEach(function(Y){var X=wJ[Y],m=X.extensions;if(!m||!m.length)return;c[Y]=m;for(var W=0;W<m.length;W++){var G=m[W];if($[G]){var z=Q.indexOf(wJ[$[G]].source),x=Q.indexOf(X.source);if($[G]!=="application/octet-stream"&&(z>x||z===x&&$[G].substr(0,12)==="application/"))continue}$[G]=Y}})}});var rW=l((iI,sW)=>{sW.exports=lV;function lV(c){var $=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if($)$(c);else setTimeout(c,0)}});var eY=l((qI,eW)=>{var tW=rW();eW.exports=hV;function hV(c){var $=!1;return tW(function(){$=!0}),function(J,Y){if($)c(J,Y);else tW(function(){c(J,Y)})}}});var cX=l((MI,cG)=>{cG.exports=yV;function yV(c){Object.keys(c.jobs).forEach(oV.bind(c)),c.jobs={}}function oV(c){if(typeof this.jobs[c]=="function")this.jobs[c]()}});var $X=l((VI,QG)=>{var $G=eY(),gV=cX();QG.exports=dV;function dV(c,$,Q,J){var Y=Q.keyedList?Q.keyedList[Q.index]:Q.index;Q.jobs[Y]=sV($,Y,c[Y],function(X,m){if(!(Y in Q.jobs))return;if(delete Q.jobs[Y],X)gV(Q);else Q.results[Y]=m;J(X,Q.results)})}function sV(c,$,Q,J){var Y;if(c.length==2)Y=c(Q,$G(J));else Y=c(Q,$,$G(J));return Y}});var QX=l((NI,JG)=>{JG.exports=rV;function rV(c,$){var Q=!Array.isArray(c),J={index:0,keyedList:Q||$?Object.keys(c):null,jobs:{},results:Q?{}:[],size:Q?Object.keys(c).length:c.length};if($)J.keyedList.sort(Q?$:function(Y,X){return $(c[Y],c[X])});return J}});var JX=l((wI,YG)=>{var tV=cX(),eV=eY();YG.exports=cN;function cN(c){if(!Object.keys(this.jobs).length)return;this.index=this.size,tV(this),eV(c)(null,this.results)}});var mG=l((vI,XG)=>{var $N=$X(),QN=QX(),JN=JX();XG.exports=YN;function YN(c,$,Q){var J=QN(c);while(J.index<(J.keyedList||c).length)$N(c,$,J,function(Y,X){if(Y){Q(Y,X);return}if(Object.keys(J.jobs).length===0){Q(null,J.results);return}}),J.index++;return JN.bind(J,Q)}});var YX=l((UI,vJ)=>{var WG=$X(),XN=QX(),mN=JX();vJ.exports=WN;vJ.exports.ascending=GG;vJ.exports.descending=GN;function WN(c,$,Q,J){var Y=XN(c,Q);return WG(c,$,Y,function X(m,W){if(m){J(m,W);return}if(Y.index++,Y.index<(Y.keyedList||c).length){WG(c,$,Y,X);return}J(null,Y.results)}),mN.bind(Y,J)}function GG(c,$){return c<$?-1:c>$?1:0}function GN(c,$){return-1*GG(c,$)}});var xG=l((jI,zG)=>{var zN=YX();zG.exports=xN;function xN(c,$,Q){return zN(c,$,null,Q)}});var qG=l((KI,iG)=>{iG.exports={parallel:mG(),serial:xG(),serialOrdered:YX()}});var XX=l((DI,MG)=>{MG.exports=Object});var NG=l((BI,VG)=>{VG.exports=Error});var vG=l((HI,wG)=>{wG.exports=EvalError});var jG=l((OI,UG)=>{UG.exports=RangeError});var DG=l((pI,KG)=>{KG.exports=ReferenceError});var HG=l((RI,BG)=>{BG.exports=SyntaxError});var UJ=l((II,OG)=>{OG.exports=TypeError});var RG=l((LI,pG)=>{pG.exports=URIError});var LG=l((ZI,IG)=>{IG.exports=Math.abs});var _G=l((_I,ZG)=>{ZG.exports=Math.floor});var AG=l((SI,SG)=>{SG.exports=Math.max});var PG=l((AI,CG)=>{CG.exports=Math.min});var EG=l((CI,bG)=>{bG.exports=Math.pow});var TG=l((PI,FG)=>{FG.exports=Math.round});var nG=l((bI,fG)=>{fG.exports=Number.isNaN||function($){return $!==$}});var aG=l((EI,uG)=>{var iN=nG();uG.exports=function($){if(iN($)||$===0)return $;return $<0?-1:1}});var lG=l((FI,kG)=>{kG.exports=Object.getOwnPropertyDescriptor});var mX=l((TI,hG)=>{var jJ=lG();if(jJ)try{jJ([],"length")}catch(c){jJ=null}hG.exports=jJ});var oG=l((fI,yG)=>{var KJ=Object.defineProperty||!1;if(KJ)try{KJ({},"a",{value:1})}catch(c){KJ=!1}yG.exports=KJ});var WX=l((nI,gG)=>{gG.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var $={},Q=Symbol("test"),J=Object(Q);if(typeof Q==="string")return!1;if(Object.prototype.toString.call(Q)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Y=42;$[Q]=Y;for(var X in $)return!1;if(typeof Object.keys==="function"&&Object.keys($).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames($).length!==0)return!1;var m=Object.getOwnPropertySymbols($);if(m.length!==1||m[0]!==Q)return!1;if(!Object.prototype.propertyIsEnumerable.call($,Q))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var W=Object.getOwnPropertyDescriptor($,Q);if(W.value!==Y||W.enumerable!==!0)return!1}return!0}});var rG=l((uI,sG)=>{var dG=typeof Symbol<"u"&&Symbol,qN=WX();sG.exports=function(){if(typeof dG!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof dG("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return qN()}});var GX=l((aI,tG)=>{tG.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var zX=l((kI,eG)=>{var MN=XX();eG.exports=MN.getPrototypeOf||null});var Q7=l((lI,$7)=>{var VN="Function.prototype.bind called on incompatible ",NN=Object.prototype.toString,wN=Math.max,vN="[object Function]",c7=function($,Q){var J=[];for(var Y=0;Y<$.length;Y+=1)J[Y]=$[Y];for(var X=0;X<Q.length;X+=1)J[X+$.length]=Q[X];return J},UN=function($,Q){var J=[];for(var Y=Q||0,X=0;Y<$.length;Y+=1,X+=1)J[X]=$[Y];return J},jN=function(c,$){var Q="";for(var J=0;J<c.length;J+=1)if(Q+=c[J],J+1<c.length)Q+=$;return Q};$7.exports=function($){var Q=this;if(typeof Q!=="function"||NN.apply(Q)!==vN)throw TypeError(VN+Q);var J=UN(arguments,1),Y,X=function(){if(this instanceof Y){var x=Q.apply(this,c7(J,arguments));if(Object(x)===x)return x;return this}return Q.apply($,c7(J,arguments))},m=wN(0,Q.length-J.length),W=[];for(var G=0;G<m;G++)W[G]="$"+G;if(Y=Function("binder","return function ("+jN(W,",")+"){ return binder.apply(this,arguments); }")(X),Q.prototype){var z=function(){};z.prototype=Q.prototype,Y.prototype=new z,z.prototype=null}return Y}});var WQ=l((hI,J7)=>{var KN=Q7();J7.exports=Function.prototype.bind||KN});var DJ=l((yI,Y7)=>{Y7.exports=Function.prototype.call});var xX=l((oI,X7)=>{X7.exports=Function.prototype.apply});var W7=l((gI,m7)=>{m7.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var z7=l((dI,G7)=>{var DN=WQ(),BN=xX(),HN=DJ(),ON=W7();G7.exports=ON||DN.call(HN,BN)});var i7=l((sI,x7)=>{var pN=WQ(),RN=UJ(),IN=DJ(),LN=z7();x7.exports=function($){if($.length<1||typeof $[0]!=="function")throw new RN("a function is required");return LN(pN,IN,$)}});var v7=l((rI,w7)=>{var ZN=i7(),q7=mX(),V7;try{V7=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!=="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var iX=!!V7&&q7&&q7(Object.prototype,"__proto__"),N7=Object,M7=N7.getPrototypeOf;w7.exports=iX&&typeof iX.get==="function"?ZN([iX.get]):typeof M7==="function"?function($){return M7($==null?$:N7($))}:!1});var B7=l((tI,D7)=>{var U7=GX(),j7=zX(),K7=v7();D7.exports=U7?function($){return U7($)}:j7?function($){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("getProto: not an object");return j7($)}:K7?function($){return K7($)}:null});var BJ=l((eI,H7)=>{var _N=Function.prototype.call,SN=Object.prototype.hasOwnProperty,AN=WQ();H7.exports=AN.call(_N,SN)});var Z7=l((cL,L7)=>{var Mc,CN=XX(),PN=NG(),bN=vG(),EN=jG(),FN=DG(),N$=HG(),V$=UJ(),TN=RG(),fN=LG(),nN=_G(),uN=AG(),aN=PG(),kN=EG(),lN=TG(),hN=aG(),R7=Function,qX=function(c){try{return R7('"use strict"; return ('+c+").constructor;")()}catch($){}},GQ=mX(),yN=oG(),MX=function(){throw new V$},oN=GQ?function(){try{return arguments.callee,MX}catch(c){try{return GQ(arguments,"callee").get}catch($){return MX}}}():MX,q$=rG()(),nc=B7(),gN=zX(),dN=GX(),I7=xX(),zQ=DJ(),M$={},sN=typeof Uint8Array>"u"||!nc?Mc:nc(Uint8Array),P8={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Mc:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Mc:ArrayBuffer,"%ArrayIteratorPrototype%":q$&&nc?nc([][Symbol.iterator]()):Mc,"%AsyncFromSyncIteratorPrototype%":Mc,"%AsyncFunction%":M$,"%AsyncGenerator%":M$,"%AsyncGeneratorFunction%":M$,"%AsyncIteratorPrototype%":M$,"%Atomics%":typeof Atomics>"u"?Mc:Atomics,"%BigInt%":typeof BigInt>"u"?Mc:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Mc:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Mc:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Mc:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":PN,"%eval%":eval,"%EvalError%":bN,"%Float16Array%":typeof Float16Array>"u"?Mc:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Mc:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Mc:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Mc:FinalizationRegistry,"%Function%":R7,"%GeneratorFunction%":M$,"%Int8Array%":typeof Int8Array>"u"?Mc:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Mc:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Mc:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":q$&&nc?nc(nc([][Symbol.iterator]())):Mc,"%JSON%":typeof JSON==="object"?JSON:Mc,"%Map%":typeof Map>"u"?Mc:Map,"%MapIteratorPrototype%":typeof Map>"u"||!q$||!nc?Mc:nc(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":CN,"%Object.getOwnPropertyDescriptor%":GQ,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Mc:Promise,"%Proxy%":typeof Proxy>"u"?Mc:Proxy,"%RangeError%":EN,"%ReferenceError%":FN,"%Reflect%":typeof Reflect>"u"?Mc:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Mc:Set,"%SetIteratorPrototype%":typeof Set>"u"||!q$||!nc?Mc:nc(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Mc:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":q$&&nc?nc(""[Symbol.iterator]()):Mc,"%Symbol%":q$?Symbol:Mc,"%SyntaxError%":N$,"%ThrowTypeError%":oN,"%TypedArray%":sN,"%TypeError%":V$,"%Uint8Array%":typeof Uint8Array>"u"?Mc:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Mc:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Mc:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Mc:Uint32Array,"%URIError%":TN,"%WeakMap%":typeof WeakMap>"u"?Mc:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Mc:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Mc:WeakSet,"%Function.prototype.call%":zQ,"%Function.prototype.apply%":I7,"%Object.defineProperty%":yN,"%Object.getPrototypeOf%":gN,"%Math.abs%":fN,"%Math.floor%":nN,"%Math.max%":uN,"%Math.min%":aN,"%Math.pow%":kN,"%Math.round%":lN,"%Math.sign%":hN,"%Reflect.getPrototypeOf%":dN};if(nc)try{null.error}catch(c){VX=nc(nc(c)),P8["%Error.prototype%"]=VX}var VX,rN=function c($){var Q;if($==="%AsyncFunction%")Q=qX("async function () {}");else if($==="%GeneratorFunction%")Q=qX("function* () {}");else if($==="%AsyncGeneratorFunction%")Q=qX("async function* () {}");else if($==="%AsyncGenerator%"){var J=c("%AsyncGeneratorFunction%");if(J)Q=J.prototype}else if($==="%AsyncIteratorPrototype%"){var Y=c("%AsyncGenerator%");if(Y&&nc)Q=nc(Y.prototype)}return P8[$]=Q,Q},O7={__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"]},xQ=WQ(),HJ=BJ(),tN=xQ.call(zQ,Array.prototype.concat),eN=xQ.call(I7,Array.prototype.splice),p7=xQ.call(zQ,String.prototype.replace),OJ=xQ.call(zQ,String.prototype.slice),cw=xQ.call(zQ,RegExp.prototype.exec),$w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Qw=/\\(\\)?/g,Jw=function($){var Q=OJ($,0,1),J=OJ($,-1);if(Q==="%"&&J!=="%")throw new N$("invalid intrinsic syntax, expected closing `%`");else if(J==="%"&&Q!=="%")throw new N$("invalid intrinsic syntax, expected opening `%`");var Y=[];return p7($,$w,function(X,m,W,G){Y[Y.length]=W?p7(G,Qw,"$1"):m||X}),Y},Yw=function($,Q){var J=$,Y;if(HJ(O7,J))Y=O7[J],J="%"+Y[0]+"%";if(HJ(P8,J)){var X=P8[J];if(X===M$)X=rN(J);if(typeof X>"u"&&!Q)throw new V$("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:Y,name:J,value:X}}throw new N$("intrinsic "+$+" does not exist!")};L7.exports=function($,Q){if(typeof $!=="string"||$.length===0)throw new V$("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!=="boolean")throw new V$('"allowMissing" argument must be a boolean');if(cw(/^%?[^%]*%?$/,$)===null)throw new N$("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=Jw($),Y=J.length>0?J[0]:"",X=Yw("%"+Y+"%",Q),m=X.name,W=X.value,G=!1,z=X.alias;if(z)Y=z[0],eN(J,tN([0,1],z));for(var x=1,i=!0;x<J.length;x+=1){var q=J[x],M=OJ(q,0,1),N=OJ(q,-1);if((M==='"'||M==="'"||M==="`"||(N==='"'||N==="'"||N==="`"))&&M!==N)throw new N$("property names with quotes must have matching quotes");if(q==="constructor"||!i)G=!0;if(Y+="."+q,m="%"+Y+"%",HJ(P8,m))W=P8[m];else if(W!=null){if(!(q in W)){if(!Q)throw new V$("base intrinsic for "+$+" exists, but the property is not available.");return}if(GQ&&x+1>=J.length){var v=GQ(W,q);if(i=!!v,i&&"get"in v&&!("originalValue"in v.get))W=v.get;else W=W[q]}else i=HJ(W,q),W=W[q];if(i&&!G)P8[m]=W}}return W}});var S7=l(($L,_7)=>{var Xw=WX();_7.exports=function(){return Xw()&&!!Symbol.toStringTag}});var P7=l((QL,C7)=>{var mw=Z7(),A7=mw("%Object.defineProperty%",!0),Ww=S7()(),Gw=BJ(),zw=UJ(),pJ=Ww?Symbol.toStringTag:null;C7.exports=function($,Q){var J=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof J<"u"&&typeof J!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new zw("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(pJ&&(J||!Gw($,pJ)))if(A7)A7($,pJ,{configurable:!Y,enumerable:!1,value:Q,writable:!1});else $[pJ]=Q}});var E7=l((JL,b7)=>{b7.exports=function(c,$){return Object.keys($).forEach(function(Q){c[Q]=c[Q]||$[Q]}),c}});var f7=l((YL,T7)=>{var UX=kW(),xw=Rc("util"),NX=Rc("path"),iw=Rc("http"),qw=Rc("https"),Mw=Rc("url").parse,Vw=Rc("fs"),Nw=Rc("stream").Stream,ww=Rc("crypto"),wX=dW(),vw=qG(),Uw=P7(),i8=BJ(),vX=E7();function F7(c){return String(c).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function Uc(c){if(!(this instanceof Uc))return new Uc(c);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],UX.call(this),c=c||{};for(var $ in c)this[$]=c[$]}xw.inherits(Uc,UX);Uc.LINE_BREAK=`\r
8
- `;Uc.DEFAULT_CONTENT_TYPE="application/octet-stream";Uc.prototype.append=function(c,$,Q){if(Q=Q||{},typeof Q==="string")Q={filename:Q};var J=UX.prototype.append.bind(this);if(typeof $==="number"||$==null)$=String($);if(Array.isArray($)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader(c,$,Q),X=this._multiPartFooter();J(Y),J($),J(X),this._trackLength(Y,$,Q)};Uc.prototype._trackLength=function(c,$,Q){var J=0;if(Q.knownLength!=null)J+=Number(Q.knownLength);else if(Buffer.isBuffer($))J=$.length;else if(typeof $==="string")J=Buffer.byteLength($);if(this._valueLength+=J,this._overheadLength+=Buffer.byteLength(c)+Uc.LINE_BREAK.length,!$||!$.path&&!($.readable&&i8($,"httpVersion"))&&!($ instanceof Nw))return;if(!Q.knownLength)this._valuesToMeasure.push($)};Uc.prototype._lengthRetriever=function(c,$){if(i8(c,"fd"))if(c.end!=null&&c.end!=1/0&&c.start!=null)$(null,c.end+1-(c.start?c.start:0));else Vw.stat(c.path,function(Q,J){if(Q){$(Q);return}var Y=J.size-(c.start?c.start:0);$(null,Y)});else if(i8(c,"httpVersion"))$(null,Number(c.headers["content-length"]));else if(i8(c,"httpModule"))c.on("response",function(Q){c.pause(),$(null,Number(Q.headers["content-length"]))}),c.resume();else $("Unknown stream")};Uc.prototype._multiPartHeader=function(c,$,Q){if(typeof Q.header==="string")return Q.header;var J=this._getContentDisposition($,Q),Y=this._getContentType($,Q),X="",m={"Content-Disposition":["form-data",'name="'+F7(c)+'"'].concat(J||[]),"Content-Type":[].concat(Y||[])};if(typeof Q.header==="object")vX(m,Q.header);var W;for(var G in m)if(i8(m,G)){if(W=m[G],W==null)continue;if(!Array.isArray(W))W=[W];if(W.length)X+=G+": "+W.join("; ")+Uc.LINE_BREAK}return"--"+this.getBoundary()+Uc.LINE_BREAK+X+Uc.LINE_BREAK};Uc.prototype._getContentDisposition=function(c,$){var Q;if(typeof $.filepath==="string")Q=NX.normalize($.filepath).replace(/\\/g,"/");else if($.filename||c&&(c.name||c.path))Q=NX.basename($.filename||c&&(c.name||c.path));else if(c&&c.readable&&i8(c,"httpVersion"))Q=NX.basename(c.client._httpMessage.path||"");if(Q)return'filename="'+F7(Q)+'"'};Uc.prototype._getContentType=function(c,$){var Q=$.contentType;if(!Q&&c&&c.name)Q=wX.lookup(c.name);if(!Q&&c&&c.path)Q=wX.lookup(c.path);if(!Q&&c&&c.readable&&i8(c,"httpVersion"))Q=c.headers["content-type"];if(!Q&&($.filepath||$.filename))Q=wX.lookup($.filepath||$.filename);if(!Q&&c&&typeof c==="object")Q=Uc.DEFAULT_CONTENT_TYPE;return Q};Uc.prototype._multiPartFooter=function(){return function(c){var $=Uc.LINE_BREAK,Q=this._streams.length===0;if(Q)$+=this._lastBoundary();c($)}.bind(this)};Uc.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+Uc.LINE_BREAK};Uc.prototype.getHeaders=function(c){var $,Q={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for($ in c)if(i8(c,$))Q[$.toLowerCase()]=c[$];return Q};Uc.prototype.setBoundary=function(c){if(typeof c!=="string")throw TypeError("FormData boundary must be a string");this._boundary=c};Uc.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};Uc.prototype.getBuffer=function(){var c=new Buffer.alloc(0),$=this.getBoundary();for(var Q=0,J=this._streams.length;Q<J;Q++)if(typeof this._streams[Q]!=="function"){if(Buffer.isBuffer(this._streams[Q]))c=Buffer.concat([c,this._streams[Q]]);else c=Buffer.concat([c,Buffer.from(this._streams[Q])]);if(typeof this._streams[Q]!=="string"||this._streams[Q].substring(2,$.length+2)!==$)c=Buffer.concat([c,Buffer.from(Uc.LINE_BREAK)])}return Buffer.concat([c,Buffer.from(this._lastBoundary())])};Uc.prototype._generateBoundary=function(){this._boundary="--------------------------"+ww.randomBytes(12).toString("hex")};Uc.prototype.getLengthSync=function(){var c=this._overheadLength+this._valueLength;if(this._streams.length)c+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return c};Uc.prototype.hasKnownLength=function(){var c=!0;if(this._valuesToMeasure.length)c=!1;return c};Uc.prototype.getLength=function(c){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(c.bind(this,null,$));return}vw.parallel(this._valuesToMeasure,this._lengthRetriever,function(Q,J){if(Q){c(Q);return}J.forEach(function(Y){$+=Y}),c(null,$)})};Uc.prototype.submit=function(c,$){var Q,J,Y={method:"post"};if(typeof c==="string")c=Mw(c),J=vX({port:c.port,path:c.pathname,host:c.hostname,protocol:c.protocol},Y);else if(J=vX(c,Y),!J.port)J.port=J.protocol==="https:"?443:80;if(J.headers=this.getHeaders(c.headers),J.protocol==="https:")Q=qw.request(J);else Q=iw.request(J);return this.getLength(function(X,m){if(X&&X!=="Unknown stream"){this._error(X);return}if(m)Q.setHeader("Content-Length",m);if(this.pipe(Q),$){var W,G=function(z,x){return Q.removeListener("error",G),Q.removeListener("response",W),$.call(this,z,x)};W=G.bind(this,null),Q.on("error",G),Q.on("response",W)}}.bind(this)),Q};Uc.prototype._error=function(c){if(!this.error)this.error=c,this.pause(),this.emit("error",c)};Uc.prototype.toString=function(){return"[object FormData]"};Uw(Uc.prototype,"FormData");T7.exports=Uc});var Jz=l((YZ,Qz)=>{var U$=1000,j$=U$*60,K$=j$*60,F8=K$*24,nw=F8*7,uw=F8*365.25;Qz.exports=function(c,$){$=$||{};var Q=typeof c;if(Q==="string"&&c.length>0)return aw(c);else if(Q==="number"&&isFinite(c))return $.long?lw(c):kw(c);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function aw(c){if(c=String(c),c.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(!$)return;var Q=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return Q*uw;case"weeks":case"week":case"w":return Q*nw;case"days":case"day":case"d":return Q*F8;case"hours":case"hour":case"hrs":case"hr":case"h":return Q*K$;case"minutes":case"minute":case"mins":case"min":case"m":return Q*j$;case"seconds":case"second":case"secs":case"sec":case"s":return Q*U$;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return Q;default:return}}function kw(c){var $=Math.abs(c);if($>=F8)return Math.round(c/F8)+"d";if($>=K$)return Math.round(c/K$)+"h";if($>=j$)return Math.round(c/j$)+"m";if($>=U$)return Math.round(c/U$)+"s";return c+"ms"}function lw(c){var $=Math.abs(c);if($>=F8)return LJ(c,$,F8,"day");if($>=K$)return LJ(c,$,K$,"hour");if($>=j$)return LJ(c,$,j$,"minute");if($>=U$)return LJ(c,$,U$,"second");return c+" ms"}function LJ(c,$,Q,J){var Y=$>=Q*1.5;return Math.round(c/Q)+" "+J+(Y?"s":"")}});var AX=l((XZ,Yz)=>{function hw(c){Q.debug=Q,Q.default=Q,Q.coerce=G,Q.disable=m,Q.enable=Y,Q.enabled=W,Q.humanize=Jz(),Q.destroy=z,Object.keys(c).forEach((x)=>{Q[x]=c[x]}),Q.names=[],Q.skips=[],Q.formatters={};function $(x){let i=0;for(let q=0;q<x.length;q++)i=(i<<5)-i+x.charCodeAt(q),i|=0;return Q.colors[Math.abs(i)%Q.colors.length]}Q.selectColor=$;function Q(x){let i,q=null,M,N;function v(...U){if(!v.enabled)return;let w=v,j=Number(new Date),D=j-(i||j);if(w.diff=D,w.prev=i,w.curr=j,i=j,U[0]=Q.coerce(U[0]),typeof U[0]!=="string")U.unshift("%O");let _=0;U[0]=U[0].replace(/%([a-zA-Z%])/g,(g,Qc)=>{if(g==="%%")return"%";_++;let u=Q.formatters[Qc];if(typeof u==="function"){let k=U[_];g=u.call(w,k),U.splice(_,1),_--}return g}),Q.formatArgs.call(w,U),(w.log||Q.log).apply(w,U)}if(v.namespace=x,v.useColors=Q.useColors(),v.color=Q.selectColor(x),v.extend=J,v.destroy=Q.destroy,Object.defineProperty(v,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(q!==null)return q;if(M!==Q.namespaces)M=Q.namespaces,N=Q.enabled(x);return N},set:(U)=>{q=U}}),typeof Q.init==="function")Q.init(v);return v}function J(x,i){let q=Q(this.namespace+(typeof i>"u"?":":i)+x);return q.log=this.log,q}function Y(x){Q.save(x),Q.namespaces=x,Q.names=[],Q.skips=[];let i=(typeof x==="string"?x:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let q of i)if(q[0]==="-")Q.skips.push(q.slice(1));else Q.names.push(q)}function X(x,i){let q=0,M=0,N=-1,v=0;while(q<x.length)if(M<i.length&&(i[M]===x[q]||i[M]==="*"))if(i[M]==="*")N=M,v=q,M++;else q++,M++;else if(N!==-1)M=N+1,v++,q=v;else return!1;while(M<i.length&&i[M]==="*")M++;return M===i.length}function m(){let x=[...Q.names,...Q.skips.map((i)=>"-"+i)].join(",");return Q.enable(""),x}function W(x){for(let i of Q.skips)if(X(x,i))return!1;for(let i of Q.names)if(X(x,i))return!0;return!1}function G(x){if(x instanceof Error)return x.stack||x.message;return x}function z(){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 Q.enable(Q.load()),Q}Yz.exports=hw});var mz=l((Xz,ZJ)=>{Xz.formatArgs=ow;Xz.save=gw;Xz.load=dw;Xz.useColors=yw;Xz.storage=sw();Xz.destroy=(()=>{let c=!1;return()=>{if(!c)c=!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`.")}})();Xz.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 yw(){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 c;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&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function ow(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+ZJ.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;c.splice(1,0,$,"color: inherit");let Q=0,J=0;c[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(Q++,Y==="%c")J=Q}),c.splice(J,0,$)}Xz.log=console.debug||console.log||(()=>{});function gw(c){try{if(c)Xz.storage.setItem("debug",c);else Xz.storage.removeItem("debug")}catch($){}}function dw(){let c;try{c=Xz.storage.getItem("debug")||Xz.storage.getItem("DEBUG")}catch($){}if(!c&&typeof process<"u"&&"env"in process)c=process.env.DEBUG;return c}function sw(){try{return localStorage}catch(c){}}ZJ.exports=AX()(Xz);var{formatters:rw}=ZJ.exports;rw.j=function(c){try{return JSON.stringify(c)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var Gz=l((WZ,Wz)=>{Wz.exports=(c,$=process.argv)=>{let Q=c.startsWith("-")?"":c.length===1?"-":"--",J=$.indexOf(Q+c),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var iz=l((GZ,xz)=>{var X1=Rc("os"),zz=Rc("tty"),v0=Gz(),{env:uc}=process,V8;if(v0("no-color")||v0("no-colors")||v0("color=false")||v0("color=never"))V8=0;else if(v0("color")||v0("colors")||v0("color=true")||v0("color=always"))V8=1;if("FORCE_COLOR"in uc)if(uc.FORCE_COLOR==="true")V8=1;else if(uc.FORCE_COLOR==="false")V8=0;else V8=uc.FORCE_COLOR.length===0?1:Math.min(parseInt(uc.FORCE_COLOR,10),3);function CX(c){if(c===0)return!1;return{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}function PX(c,$){if(V8===0)return 0;if(v0("color=16m")||v0("color=full")||v0("color=truecolor"))return 3;if(v0("color=256"))return 2;if(c&&!$&&V8===void 0)return 0;let Q=V8||0;if(uc.TERM==="dumb")return Q;if(process.platform==="win32"){let J=X1.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in uc){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in uc))||uc.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in uc)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(uc.TEAMCITY_VERSION)?1:0;if(uc.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in uc){let J=parseInt((uc.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(uc.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(uc.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(uc.TERM))return 1;if("COLORTERM"in uc)return 1;return Q}function m1(c){let $=PX(c,c&&c.isTTY);return CX($)}xz.exports={supportsColor:m1,stdout:CX(PX(!0,zz.isatty(1))),stderr:CX(PX(!0,zz.isatty(2)))}});var Nz=l((Mz,SJ)=>{var W1=Rc("tty"),_J=Rc("util");Mz.init=V1;Mz.log=i1;Mz.formatArgs=z1;Mz.save=q1;Mz.load=M1;Mz.useColors=G1;Mz.destroy=_J.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");Mz.colors=[6,2,3,4,5,1];try{let c=iz();if(c&&(c.stderr||c).level>=2)Mz.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(c){}Mz.inspectOpts=Object.keys(process.env).filter((c)=>{return/^debug_/i.test(c)}).reduce((c,$)=>{let Q=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,X)=>{return X.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return c[Q]=J,c},{});function G1(){return"colors"in Mz.inspectOpts?Boolean(Mz.inspectOpts.colors):W1.isatty(process.stderr.fd)}function z1(c){let{namespace:$,useColors:Q}=this;if(Q){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),X=` ${Y};1m${$} \x1B[0m`;c[0]=X+c[0].split(`
9
+ */var SJ=_G(),ew=Zc("path").extname,SG=/^\s*([^;\s]*)(?:;|\s|$)/,ci=/^text\//i;Xi.charset=AG;Xi.charsets={lookup:AG};Xi.contentType=$i;Xi.extension=Qi;Xi.extensions=Object.create(null);Xi.lookup=Ji;Xi.types=Object.create(null);Yi(Xi.extensions,Xi.types);function AG(c){if(!c||typeof c!=="string")return!1;var $=SG.exec(c),Q=$&&SJ[$[1].toLowerCase()];if(Q&&Q.charset)return Q.charset;if($&&ci.test($[1]))return"UTF-8";return!1}function $i(c){if(!c||typeof c!=="string")return!1;var $=c.indexOf("/")===-1?Xi.lookup(c):c;if(!$)return!1;if($.indexOf("charset")===-1){var Q=Xi.charset($);if(Q)$+="; charset="+Q.toLowerCase()}return $}function Qi(c){if(!c||typeof c!=="string")return!1;var $=SG.exec(c),Q=$&&Xi.extensions[$[1].toLowerCase()];if(!Q||!Q.length)return!1;return Q[0]}function Ji(c){if(!c||typeof c!=="string")return!1;var $=ew("x."+c).toLowerCase().substr(1);if(!$)return!1;return Xi.types[$]||!1}function Yi(c,$){var Q=["nginx","apache",void 0,"iana"];Object.keys(SJ).forEach(function(Y){var X=SJ[Y],W=X.extensions;if(!W||!W.length)return;c[Y]=W;for(var m=0;m<W.length;m++){var G=W[m];if($[G]){var z=Q.indexOf(SJ[$[G]].source),x=Q.indexOf(X.source);if($[G]!=="application/octet-stream"&&(z>x||z===x&&$[G].substr(0,12)==="application/"))continue}$[G]=Y}})}});var FG=l((aZ,bG)=>{bG.exports=zi;function zi(c){var $=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;if($)$(c);else setTimeout(c,0)}});var ZX=l((lZ,fG)=>{var TG=FG();fG.exports=xi;function xi(c){var $=!1;return TG(function(){$=!0}),function(J,Y){if($)c(J,Y);else TG(function(){c(J,Y)})}}});var LX=l((hZ,nG)=>{nG.exports=qi;function qi(c){Object.keys(c.jobs).forEach(Mi.bind(c)),c.jobs={}}function Mi(c){if(typeof this.jobs[c]=="function")this.jobs[c]()}});var _X=l((yZ,kG)=>{var uG=ZX(),Ni=LX();kG.exports=Vi;function Vi(c,$,Q,J){var Y=Q.keyedList?Q.keyedList[Q.index]:Q.index;Q.jobs[Y]=wi($,Y,c[Y],function(X,W){if(!(Y in Q.jobs))return;if(delete Q.jobs[Y],X)Ni(Q);else Q.results[Y]=W;J(X,Q.results)})}function wi(c,$,Q,J){var Y;if(c.length==2)Y=c(Q,uG(J));else Y=c(Q,$,uG(J));return Y}});var SX=l((oZ,aG)=>{aG.exports=ii;function ii(c,$){var Q=!Array.isArray(c),J={index:0,keyedList:Q||$?Object.keys(c):null,jobs:{},results:Q?{}:[],size:Q?Object.keys(c).length:c.length};if($)J.keyedList.sort(Q?$:function(Y,X){return $(c[Y],c[X])});return J}});var AX=l((gZ,lG)=>{var vi=LX(),Ui=ZX();lG.exports=ji;function ji(c){if(!Object.keys(this.jobs).length)return;this.index=this.size,vi(this),Ui(c)(null,this.results)}});var yG=l((dZ,hG)=>{var Ki=_X(),Di=SX(),Bi=AX();hG.exports=Hi;function Hi(c,$,Q){var J=Di(c);while(J.index<(J.keyedList||c).length)Ki(c,$,J,function(Y,X){if(Y){Q(Y,X);return}if(Object.keys(J.jobs).length===0){Q(null,J.results);return}}),J.index++;return Bi.bind(J,Q)}});var CX=l((sZ,AJ)=>{var oG=_X(),Oi=SX(),Ri=AX();AJ.exports=pi;AJ.exports.ascending=gG;AJ.exports.descending=Ii;function pi(c,$,Q,J){var Y=Oi(c,Q);return oG(c,$,Y,function X(W,m){if(W){J(W,m);return}if(Y.index++,Y.index<(Y.keyedList||c).length){oG(c,$,Y,X);return}J(null,Y.results)}),Ri.bind(Y,J)}function gG(c,$){return c<$?-1:c>$?1:0}function Ii(c,$){return-1*gG(c,$)}});var sG=l((rZ,dG)=>{var Zi=CX();dG.exports=Li;function Li(c,$,Q){return Zi(c,$,null,Q)}});var tG=l((tZ,rG)=>{rG.exports={parallel:yG(),serial:sG(),serialOrdered:CX()}});var PX=l((eZ,eG)=>{eG.exports=Object});var $7=l((cL,c7)=>{c7.exports=Error});var J7=l(($L,Q7)=>{Q7.exports=EvalError});var X7=l((QL,Y7)=>{Y7.exports=RangeError});var m7=l((JL,W7)=>{W7.exports=ReferenceError});var z7=l((YL,G7)=>{G7.exports=SyntaxError});var CJ=l((XL,x7)=>{x7.exports=TypeError});var M7=l((WL,q7)=>{q7.exports=URIError});var V7=l((mL,N7)=>{N7.exports=Math.abs});var i7=l((GL,w7)=>{w7.exports=Math.floor});var U7=l((zL,v7)=>{v7.exports=Math.max});var K7=l((xL,j7)=>{j7.exports=Math.min});var B7=l((qL,D7)=>{D7.exports=Math.pow});var O7=l((ML,H7)=>{H7.exports=Math.round});var p7=l((NL,R7)=>{R7.exports=Number.isNaN||function($){return $!==$}});var Z7=l((VL,I7)=>{var _i=p7();I7.exports=function($){if(_i($)||$===0)return $;return $<0?-1:1}});var _7=l((wL,L7)=>{L7.exports=Object.getOwnPropertyDescriptor});var EX=l((iL,S7)=>{var PJ=_7();if(PJ)try{PJ([],"length")}catch(c){PJ=null}S7.exports=PJ});var C7=l((vL,A7)=>{var EJ=Object.defineProperty||!1;if(EJ)try{EJ({},"a",{value:1})}catch(c){EJ=!1}A7.exports=EJ});var bX=l((UL,P7)=>{P7.exports=function(){if(typeof Symbol!=="function"||typeof Object.getOwnPropertySymbols!=="function")return!1;if(typeof Symbol.iterator==="symbol")return!0;var $={},Q=Symbol("test"),J=Object(Q);if(typeof Q==="string")return!1;if(Object.prototype.toString.call(Q)!=="[object Symbol]")return!1;if(Object.prototype.toString.call(J)!=="[object Symbol]")return!1;var Y=42;$[Q]=Y;for(var X in $)return!1;if(typeof Object.keys==="function"&&Object.keys($).length!==0)return!1;if(typeof Object.getOwnPropertyNames==="function"&&Object.getOwnPropertyNames($).length!==0)return!1;var W=Object.getOwnPropertySymbols($);if(W.length!==1||W[0]!==Q)return!1;if(!Object.prototype.propertyIsEnumerable.call($,Q))return!1;if(typeof Object.getOwnPropertyDescriptor==="function"){var m=Object.getOwnPropertyDescriptor($,Q);if(m.value!==Y||m.enumerable!==!0)return!1}return!0}});var F7=l((jL,b7)=>{var E7=typeof Symbol<"u"&&Symbol,Si=bX();b7.exports=function(){if(typeof E7!=="function")return!1;if(typeof Symbol!=="function")return!1;if(typeof E7("foo")!=="symbol")return!1;if(typeof Symbol("bar")!=="symbol")return!1;return Si()}});var FX=l((KL,T7)=>{T7.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var TX=l((DL,f7)=>{var Ai=PX();f7.exports=Ai.getPrototypeOf||null});var k7=l((BL,u7)=>{var Ci="Function.prototype.bind called on incompatible ",Pi=Object.prototype.toString,Ei=Math.max,bi="[object Function]",n7=function($,Q){var J=[];for(var Y=0;Y<$.length;Y+=1)J[Y]=$[Y];for(var X=0;X<Q.length;X+=1)J[X+$.length]=Q[X];return J},Fi=function($,Q){var J=[];for(var Y=Q||0,X=0;Y<$.length;Y+=1,X+=1)J[X]=$[Y];return J},Ti=function(c,$){var Q="";for(var J=0;J<c.length;J+=1)if(Q+=c[J],J+1<c.length)Q+=$;return Q};u7.exports=function($){var Q=this;if(typeof Q!=="function"||Pi.apply(Q)!==bi)throw TypeError(Ci+Q);var J=Fi(arguments,1),Y,X=function(){if(this instanceof Y){var x=Q.apply(this,n7(J,arguments));if(Object(x)===x)return x;return this}return Q.apply($,n7(J,arguments))},W=Ei(0,Q.length-J.length),m=[];for(var G=0;G<W;G++)m[G]="$"+G;if(Y=Function("binder","return function ("+Ti(m,",")+"){ return binder.apply(this,arguments); }")(X),Q.prototype){var z=function(){};z.prototype=Q.prototype,Y.prototype=new z,z.prototype=null}return Y}});var RQ=l((HL,a7)=>{var fi=k7();a7.exports=Function.prototype.bind||fi});var bJ=l((OL,l7)=>{l7.exports=Function.prototype.call});var fX=l((RL,h7)=>{h7.exports=Function.prototype.apply});var o7=l((pL,y7)=>{y7.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var d7=l((IL,g7)=>{var ni=RQ(),ui=fX(),ki=bJ(),ai=o7();g7.exports=ai||ni.call(ki,ui)});var r7=l((ZL,s7)=>{var li=RQ(),hi=CJ(),yi=bJ(),oi=d7();s7.exports=function($){if($.length<1||typeof $[0]!=="function")throw new hi("a function is required");return oi(li,yi,$)}});var Jz=l((LL,Qz)=>{var gi=r7(),t7=EX(),cz;try{cz=[].__proto__===Array.prototype}catch(c){if(!c||typeof c!=="object"||!("code"in c)||c.code!=="ERR_PROTO_ACCESS")throw c}var nX=!!cz&&t7&&t7(Object.prototype,"__proto__"),$z=Object,e7=$z.getPrototypeOf;Qz.exports=nX&&typeof nX.get==="function"?gi([nX.get]):typeof e7==="function"?function($){return e7($==null?$:$z($))}:!1});var Gz=l((_L,mz)=>{var Yz=FX(),Xz=TX(),Wz=Jz();mz.exports=Yz?function($){return Yz($)}:Xz?function($){if(!$||typeof $!=="object"&&typeof $!=="function")throw TypeError("getProto: not an object");return Xz($)}:Wz?function($){return Wz($)}:null});var FJ=l((SL,zz)=>{var di=Function.prototype.call,si=Object.prototype.hasOwnProperty,ri=RQ();zz.exports=ri.call(di,si)});var wz=l((AL,Vz)=>{var Vc,ti=PX(),ei=$7(),c1=J7(),$1=X7(),Q1=m7(),p$=z7(),R$=CJ(),J1=M7(),Y1=V7(),X1=i7(),W1=U7(),m1=K7(),G1=B7(),z1=O7(),x1=Z7(),Mz=Function,uX=function(c){try{return Mz('"use strict"; return ('+c+").constructor;")()}catch($){}},pQ=EX(),q1=C7(),kX=function(){throw new R$},M1=pQ?function(){try{return arguments.callee,kX}catch(c){try{return pQ(arguments,"callee").get}catch($){return kX}}}():kX,H$=F7()(),kc=Gz(),N1=TX(),V1=FX(),Nz=fX(),IQ=bJ(),O$={},w1=typeof Uint8Array>"u"||!kc?Vc:kc(Uint8Array),a8={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?Vc:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?Vc:ArrayBuffer,"%ArrayIteratorPrototype%":H$&&kc?kc([][Symbol.iterator]()):Vc,"%AsyncFromSyncIteratorPrototype%":Vc,"%AsyncFunction%":O$,"%AsyncGenerator%":O$,"%AsyncGeneratorFunction%":O$,"%AsyncIteratorPrototype%":O$,"%Atomics%":typeof Atomics>"u"?Vc:Atomics,"%BigInt%":typeof BigInt>"u"?Vc:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?Vc:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?Vc:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?Vc:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":ei,"%eval%":eval,"%EvalError%":c1,"%Float16Array%":typeof Float16Array>"u"?Vc:Float16Array,"%Float32Array%":typeof Float32Array>"u"?Vc:Float32Array,"%Float64Array%":typeof Float64Array>"u"?Vc:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?Vc:FinalizationRegistry,"%Function%":Mz,"%GeneratorFunction%":O$,"%Int8Array%":typeof Int8Array>"u"?Vc:Int8Array,"%Int16Array%":typeof Int16Array>"u"?Vc:Int16Array,"%Int32Array%":typeof Int32Array>"u"?Vc:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":H$&&kc?kc(kc([][Symbol.iterator]())):Vc,"%JSON%":typeof JSON==="object"?JSON:Vc,"%Map%":typeof Map>"u"?Vc:Map,"%MapIteratorPrototype%":typeof Map>"u"||!H$||!kc?Vc:kc(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":ti,"%Object.getOwnPropertyDescriptor%":pQ,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?Vc:Promise,"%Proxy%":typeof Proxy>"u"?Vc:Proxy,"%RangeError%":$1,"%ReferenceError%":Q1,"%Reflect%":typeof Reflect>"u"?Vc:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?Vc:Set,"%SetIteratorPrototype%":typeof Set>"u"||!H$||!kc?Vc:kc(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?Vc:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":H$&&kc?kc(""[Symbol.iterator]()):Vc,"%Symbol%":H$?Symbol:Vc,"%SyntaxError%":p$,"%ThrowTypeError%":M1,"%TypedArray%":w1,"%TypeError%":R$,"%Uint8Array%":typeof Uint8Array>"u"?Vc:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?Vc:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?Vc:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?Vc:Uint32Array,"%URIError%":J1,"%WeakMap%":typeof WeakMap>"u"?Vc:WeakMap,"%WeakRef%":typeof WeakRef>"u"?Vc:WeakRef,"%WeakSet%":typeof WeakSet>"u"?Vc:WeakSet,"%Function.prototype.call%":IQ,"%Function.prototype.apply%":Nz,"%Object.defineProperty%":q1,"%Object.getPrototypeOf%":N1,"%Math.abs%":Y1,"%Math.floor%":X1,"%Math.max%":W1,"%Math.min%":m1,"%Math.pow%":G1,"%Math.round%":z1,"%Math.sign%":x1,"%Reflect.getPrototypeOf%":V1};if(kc)try{null.error}catch(c){aX=kc(kc(c)),a8["%Error.prototype%"]=aX}var aX,i1=function c($){var Q;if($==="%AsyncFunction%")Q=uX("async function () {}");else if($==="%GeneratorFunction%")Q=uX("function* () {}");else if($==="%AsyncGeneratorFunction%")Q=uX("async function* () {}");else if($==="%AsyncGenerator%"){var J=c("%AsyncGeneratorFunction%");if(J)Q=J.prototype}else if($==="%AsyncIteratorPrototype%"){var Y=c("%AsyncGenerator%");if(Y&&kc)Q=kc(Y.prototype)}return a8[$]=Q,Q},xz={__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"]},ZQ=RQ(),TJ=FJ(),v1=ZQ.call(IQ,Array.prototype.concat),U1=ZQ.call(Nz,Array.prototype.splice),qz=ZQ.call(IQ,String.prototype.replace),fJ=ZQ.call(IQ,String.prototype.slice),j1=ZQ.call(IQ,RegExp.prototype.exec),K1=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,D1=/\\(\\)?/g,B1=function($){var Q=fJ($,0,1),J=fJ($,-1);if(Q==="%"&&J!=="%")throw new p$("invalid intrinsic syntax, expected closing `%`");else if(J==="%"&&Q!=="%")throw new p$("invalid intrinsic syntax, expected opening `%`");var Y=[];return qz($,K1,function(X,W,m,G){Y[Y.length]=m?qz(G,D1,"$1"):W||X}),Y},H1=function($,Q){var J=$,Y;if(TJ(xz,J))Y=xz[J],J="%"+Y[0]+"%";if(TJ(a8,J)){var X=a8[J];if(X===O$)X=i1(J);if(typeof X>"u"&&!Q)throw new R$("intrinsic "+$+" exists, but is not available. Please file an issue!");return{alias:Y,name:J,value:X}}throw new p$("intrinsic "+$+" does not exist!")};Vz.exports=function($,Q){if(typeof $!=="string"||$.length===0)throw new R$("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof Q!=="boolean")throw new R$('"allowMissing" argument must be a boolean');if(j1(/^%?[^%]*%?$/,$)===null)throw new p$("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var J=B1($),Y=J.length>0?J[0]:"",X=H1("%"+Y+"%",Q),W=X.name,m=X.value,G=!1,z=X.alias;if(z)Y=z[0],U1(J,v1([0,1],z));for(var x=1,q=!0;x<J.length;x+=1){var M=J[x],N=fJ(M,0,1),w=fJ(M,-1);if((N==='"'||N==="'"||N==="`"||(w==='"'||w==="'"||w==="`"))&&N!==w)throw new p$("property names with quotes must have matching quotes");if(M==="constructor"||!q)G=!0;if(Y+="."+M,W="%"+Y+"%",TJ(a8,W))m=a8[W];else if(m!=null){if(!(M in m)){if(!Q)throw new R$("base intrinsic for "+$+" exists, but the property is not available.");return}if(pQ&&x+1>=J.length){var U=pQ(m,M);if(q=!!U,q&&"get"in U&&!("originalValue"in U.get))m=U.get;else m=m[M]}else q=TJ(m,M),m=m[M];if(q&&!G)a8[W]=m}}return m}});var vz=l((CL,iz)=>{var O1=bX();iz.exports=function(){return O1()&&!!Symbol.toStringTag}});var Kz=l((PL,jz)=>{var R1=wz(),Uz=R1("%Object.defineProperty%",!0),p1=vz()(),I1=FJ(),Z1=CJ(),nJ=p1?Symbol.toStringTag:null;jz.exports=function($,Q){var J=arguments.length>2&&!!arguments[2]&&arguments[2].force,Y=arguments.length>2&&!!arguments[2]&&arguments[2].nonConfigurable;if(typeof J<"u"&&typeof J!=="boolean"||typeof Y<"u"&&typeof Y!=="boolean")throw new Z1("if provided, the `overrideIfSet` and `nonConfigurable` options must be booleans");if(nJ&&(J||!I1($,nJ)))if(Uz)Uz($,nJ,{configurable:!Y,enumerable:!1,value:Q,writable:!1});else $[nJ]=Q}});var Bz=l((EL,Dz)=>{Dz.exports=function(c,$){return Object.keys($).forEach(function(Q){c[Q]=c[Q]||$[Q]}),c}});var Rz=l((bL,Oz)=>{var oX=LG(),L1=Zc("util"),lX=Zc("path"),_1=Zc("http"),S1=Zc("https"),A1=Zc("url").parse,C1=Zc("fs"),P1=Zc("stream").Stream,E1=Zc("crypto"),hX=EG(),b1=tG(),F1=Kz(),j8=FJ(),yX=Bz();function Hz(c){return String(c).replace(/\r/g,"%0D").replace(/\n/g,"%0A").replace(/"/g,"%22")}function jc(c){if(!(this instanceof jc))return new jc(c);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],oX.call(this),c=c||{};for(var $ in c)this[$]=c[$]}L1.inherits(jc,oX);jc.LINE_BREAK=`\r
10
+ `;jc.DEFAULT_CONTENT_TYPE="application/octet-stream";jc.prototype.append=function(c,$,Q){if(Q=Q||{},typeof Q==="string")Q={filename:Q};var J=oX.prototype.append.bind(this);if(typeof $==="number"||$==null)$=String($);if(Array.isArray($)){this._error(Error("Arrays are not supported."));return}var Y=this._multiPartHeader(c,$,Q),X=this._multiPartFooter();J(Y),J($),J(X),this._trackLength(Y,$,Q)};jc.prototype._trackLength=function(c,$,Q){var J=0;if(Q.knownLength!=null)J+=Number(Q.knownLength);else if(Buffer.isBuffer($))J=$.length;else if(typeof $==="string")J=Buffer.byteLength($);if(this._valueLength+=J,this._overheadLength+=Buffer.byteLength(c)+jc.LINE_BREAK.length,!$||!$.path&&!($.readable&&j8($,"httpVersion"))&&!($ instanceof P1))return;if(!Q.knownLength)this._valuesToMeasure.push($)};jc.prototype._lengthRetriever=function(c,$){if(j8(c,"fd"))if(c.end!=null&&c.end!=1/0&&c.start!=null)$(null,c.end+1-(c.start?c.start:0));else C1.stat(c.path,function(Q,J){if(Q){$(Q);return}var Y=J.size-(c.start?c.start:0);$(null,Y)});else if(j8(c,"httpVersion"))$(null,Number(c.headers["content-length"]));else if(j8(c,"httpModule"))c.on("response",function(Q){c.pause(),$(null,Number(Q.headers["content-length"]))}),c.resume();else $("Unknown stream")};jc.prototype._multiPartHeader=function(c,$,Q){if(typeof Q.header==="string")return Q.header;var J=this._getContentDisposition($,Q),Y=this._getContentType($,Q),X="",W={"Content-Disposition":["form-data",'name="'+Hz(c)+'"'].concat(J||[]),"Content-Type":[].concat(Y||[])};if(typeof Q.header==="object")yX(W,Q.header);var m;for(var G in W)if(j8(W,G)){if(m=W[G],m==null)continue;if(!Array.isArray(m))m=[m];if(m.length)X+=G+": "+m.join("; ")+jc.LINE_BREAK}return"--"+this.getBoundary()+jc.LINE_BREAK+X+jc.LINE_BREAK};jc.prototype._getContentDisposition=function(c,$){var Q;if(typeof $.filepath==="string")Q=lX.normalize($.filepath).replace(/\\/g,"/");else if($.filename||c&&(c.name||c.path))Q=lX.basename($.filename||c&&(c.name||c.path));else if(c&&c.readable&&j8(c,"httpVersion"))Q=lX.basename(c.client._httpMessage.path||"");if(Q)return'filename="'+Hz(Q)+'"'};jc.prototype._getContentType=function(c,$){var Q=$.contentType;if(!Q&&c&&c.name)Q=hX.lookup(c.name);if(!Q&&c&&c.path)Q=hX.lookup(c.path);if(!Q&&c&&c.readable&&j8(c,"httpVersion"))Q=c.headers["content-type"];if(!Q&&($.filepath||$.filename))Q=hX.lookup($.filepath||$.filename);if(!Q&&c&&typeof c==="object")Q=jc.DEFAULT_CONTENT_TYPE;return Q};jc.prototype._multiPartFooter=function(){return function(c){var $=jc.LINE_BREAK,Q=this._streams.length===0;if(Q)$+=this._lastBoundary();c($)}.bind(this)};jc.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+jc.LINE_BREAK};jc.prototype.getHeaders=function(c){var $,Q={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for($ in c)if(j8(c,$))Q[$.toLowerCase()]=c[$];return Q};jc.prototype.setBoundary=function(c){if(typeof c!=="string")throw TypeError("FormData boundary must be a string");this._boundary=c};jc.prototype.getBoundary=function(){if(!this._boundary)this._generateBoundary();return this._boundary};jc.prototype.getBuffer=function(){var c=new Buffer.alloc(0),$=this.getBoundary();for(var Q=0,J=this._streams.length;Q<J;Q++)if(typeof this._streams[Q]!=="function"){if(Buffer.isBuffer(this._streams[Q]))c=Buffer.concat([c,this._streams[Q]]);else c=Buffer.concat([c,Buffer.from(this._streams[Q])]);if(typeof this._streams[Q]!=="string"||this._streams[Q].substring(2,$.length+2)!==$)c=Buffer.concat([c,Buffer.from(jc.LINE_BREAK)])}return Buffer.concat([c,Buffer.from(this._lastBoundary())])};jc.prototype._generateBoundary=function(){this._boundary="--------------------------"+E1.randomBytes(12).toString("hex")};jc.prototype.getLengthSync=function(){var c=this._overheadLength+this._valueLength;if(this._streams.length)c+=this._lastBoundary().length;if(!this.hasKnownLength())this._error(Error("Cannot calculate proper length in synchronous way."));return c};jc.prototype.hasKnownLength=function(){var c=!0;if(this._valuesToMeasure.length)c=!1;return c};jc.prototype.getLength=function(c){var $=this._overheadLength+this._valueLength;if(this._streams.length)$+=this._lastBoundary().length;if(!this._valuesToMeasure.length){process.nextTick(c.bind(this,null,$));return}b1.parallel(this._valuesToMeasure,this._lengthRetriever,function(Q,J){if(Q){c(Q);return}J.forEach(function(Y){$+=Y}),c(null,$)})};jc.prototype.submit=function(c,$){var Q,J,Y={method:"post"};if(typeof c==="string")c=A1(c),J=yX({port:c.port,path:c.pathname,host:c.hostname,protocol:c.protocol},Y);else if(J=yX(c,Y),!J.port)J.port=J.protocol==="https:"?443:80;if(J.headers=this.getHeaders(c.headers),J.protocol==="https:")Q=S1.request(J);else Q=_1.request(J);return this.getLength(function(X,W){if(X&&X!=="Unknown stream"){this._error(X);return}if(W)Q.setHeader("Content-Length",W);if(this.pipe(Q),$){var m,G=function(z,x){return Q.removeListener("error",G),Q.removeListener("response",m),$.call(this,z,x)};m=G.bind(this,null),Q.on("error",G),Q.on("response",m)}}.bind(this)),Q};jc.prototype._error=function(c){if(!this.error)this.error=c,this.pause(),this.emit("error",c)};jc.prototype.toString=function(){return"[object FormData]"};F1(jc.prototype,"FormData");Oz.exports=jc});var pz,uJ;var gX=d(()=>{pz=DX(Rz(),1),uJ=pz.default});function sX(c){return V.isPlainObject(c)||V.isArray(c)}function Iz(c){return V.endsWith(c,"[]")?c.slice(0,-2):c}function dX(c,$,Q){if(!c)return $;return c.concat($).map(function(Y,X){return Y=Iz(Y),!Q&&X?"["+Y+"]":Y}).join(Q?".":"")}function T1(c){return V.isArray(c)&&!c.some(sX)}function n1(c,$,Q){if(!V.isObject(c))throw TypeError("target must be an object");$=$||new(uJ||FormData),Q=V.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,D){return!V.isUndefined(D[j])});let J=Q.metaTokens,Y=Q.visitor||w,X=Q.dots,W=Q.indexes,m=Q.Blob||typeof Blob<"u"&&Blob,G=Q.maxDepth===void 0?rX:Q.maxDepth,z=m&&V.isSpecCompliantForm($),x=[];if(!V.isFunction(Y))throw TypeError("visitor must be a function");function q(i){if(i===null)return"";if(V.isDate(i))return i.toISOString();if(V.isBoolean(i))return i.toString();if(!z&&V.isBlob(i))throw new O("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(i)||V.isTypedArray(i))return z&&typeof Blob==="function"?new Blob([i]):Buffer.from(i);return i}function M(i){if(i>G)throw new O("Object is too deeply nested ("+i+" levels). Max depth: "+G,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function N(i,j){if(G===1/0)return JSON.stringify(i);let D=[];return JSON.stringify(i,function(mc,g){if(!V.isObject(g))return g;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(g),M(j+D.length-1),g})}function w(i,j,D){let _=i;if(V.isReactNative($)&&V.isReactNativeBlob(i))return $.append(dX(D,j,X),q(i)),!1;if(i&&!D&&typeof i==="object"){if(V.endsWith(j,"{}"))j=J?j:j.slice(0,-2),i=N(i,1);else if(V.isArray(i)&&T1(i)||(V.isFileList(i)||V.endsWith(j,"[]"))&&(_=V.toArray(i)))return j=Iz(j),_.forEach(function(g,Jc){!(V.isUndefined(g)||g===null)&&$.append(W===!0?dX([j],Jc,X):W===null?j:j+"[]",q(g))}),!1}if(sX(i))return!0;return $.append(dX(D,j,X),q(i)),!1}let U=Object.assign(f1,{defaultVisitor:w,convertValue:q,isVisitable:sX});function v(i,j,D=0){if(V.isUndefined(i))return;if(M(D),x.indexOf(i)!==-1)throw Error("Circular reference detected in "+j.join("."));x.push(i),V.forEach(i,function(mc,g){if((!(V.isUndefined(mc)||mc===null)&&Y.call($,mc,V.isString(g)?g.trim():g,j,U))===!0)v(mc,j?j.concat(g):[g],D+1)}),x.pop()}if(!V.isObject(c))throw TypeError("data must be an object");return v(c),$}var rX=100,f1,K8;var I$=d(()=>{Lc();X0();gX();f1=V.toFlatObject(V,{},null,function($){return/^is[A-Z]/.test($)});K8=n1});function Zz(c){let $={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(c).replace(/[!'()~]|%20/g,function(J){return $[J]})}function Lz(c,$){this._pairs=[],c&&K8(c,this,$)}var _z,Sz;var Az=d(()=>{I$();_z=Lz.prototype;_z.append=function($,Q){this._pairs.push([$,Q])};_z.toString=function($){let Q=$?function(J){return $.call(this,J,Zz)}:Zz;return this._pairs.map(function(Y){return Q(Y[0])+"="+Q(Y[1])},"").join("&")};Sz=Lz});function u1(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function l8(c,$,Q){if(!$)return c;let J=V.isFunction(Q)?{serialize:Q}:Q,Y=V.getSafeProp(J,"encode")||u1,X=V.getSafeProp(J,"serialize"),W;if(X)W=X($,J);else W=V.isURLSearchParams($)?$.toString():new Sz($,J).toString(Y);if(W){let m=c.indexOf("#");if(m!==-1)c=c.slice(0,m);c+=(c.indexOf("?")===-1?"?":"&")+W}return c}var kJ=d(()=>{Lc();Az()});class Cz{constructor(){this.handlers=[]}use(c,$,Q){return this.handlers.push({fulfilled:c,rejected:$,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(c){if(this.handlers[c])this.handlers[c]=null}clear(){if(this.handlers)this.handlers=[]}forEach(c){V.forEach(this.handlers,function(Q){if(Q!==null)c(Q)})}}var tX;var Pz=d(()=>{Lc();tX=Cz});var D8;var LQ=d(()=>{D8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0}});import k1 from"url";var Ez;var bz=d(()=>{Ez=k1.URLSearchParams});import a1 from"crypto";var eX="abcdefghijklmnopqrstuvwxyz",Fz="0123456789",Tz,l1=(c=16,$=Tz.ALPHA_DIGIT)=>{let Q="",{length:J}=$,Y=new Uint32Array(c);a1.randomFillSync(Y);for(let X=0;X<c;X++)Q+=$[Y[X]%J];return Q},fz;var nz=d(()=>{bz();gX();Tz={DIGIT:Fz,ALPHA:eX,ALPHA_DIGIT:eX+eX.toUpperCase()+Fz},fz={isNode:!0,classes:{URLSearchParams:Ez,FormData:uJ,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:Tz,generateString:l1,protocols:["http","https","file","data"]}});var Q9={};vQ(Q9,{origin:()=>o1,navigator:()=>c9,hasStandardBrowserWebWorkerEnv:()=>y1,hasStandardBrowserEnv:()=>h1,hasBrowserEnv:()=>$9});var $9,c9,h1,y1,o1;var uz=d(()=>{$9=typeof window<"u"&&typeof document<"u",c9=typeof navigator==="object"&&navigator||void 0,h1=$9&&(!c9||["ReactNative","NativeScript","NS"].indexOf(c9.product)<0),y1=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),o1=$9&&window.location.href||"http://localhost"});var Bc;var b0=d(()=>{nz();uz();Bc={...Q9,...fz}});function J9(c,$){return K8(c,new Bc.classes.URLSearchParams,{visitor:function(Q,J,Y,X){if(Bc.isNode&&V.isBuffer(Q))return this.append(J,Q.toString("base64")),!1;return X.defaultVisitor.apply(this,arguments)},...$})}var kz=d(()=>{Lc();I$();b0()});function lz(c){if(c>az)throw new O("FormData field is too deeply nested ("+c+" levels). Max depth: "+az,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function g1(c){let $=[],Q=/\w+|\[(\w*)]/g,J;while((J=Q.exec(c))!==null)lz($.length),$.push(J[0]==="[]"?"":J[1]||J[0]);return $}function d1(c){let $={},Q=Object.keys(c),J,Y=Q.length,X;for(J=0;J<Y;J++)X=Q[J],$[X]=c[X];return $}function s1(c){function $(Q,J,Y,X){lz(X);let W=Q[X++];if(W==="__proto__")return!0;let m=Number.isFinite(+W),G=X>=Q.length;if(W=!W&&V.isArray(Y)?Y.length:W,G){if(V.hasOwnProp(Y,W))Y[W]=V.isArray(Y[W])?Y[W].concat(J):[Y[W],J];else Y[W]=J;return!m}if(!V.hasOwnProp(Y,W)||!V.isObject(Y[W]))Y[W]=[];if($(Q,J,Y[W],X)&&V.isArray(Y[W]))Y[W]=d1(Y[W]);return!m}if(V.isFormData(c)&&V.isFunction(c.entries)){let Q={};return V.forEachEntry(c,(J,Y)=>{$(g1(J),Y,Q,0)}),Q}return null}var az,aJ;var Y9=d(()=>{Lc();X0();I$();az=rX;aJ=s1});function r1(c,$,Q){if(V.isString(c))try{return($||JSON.parse)(c),V.trim(c)}catch(J){if(J.name!=="SyntaxError")throw J}return(Q||JSON.stringify)(c)}var Z$=(c,$)=>c!=null&&V.hasOwnProp(c,$)?c[$]:void 0,X9,L$;var lJ=d(()=>{Lc();X0();LQ();I$();kz();b0();Y9();X9={transitional:D8,adapter:["xhr","http","fetch"],transformRequest:[function($,Q){let J=Q.getContentType()||"",Y=J.indexOf("application/json")>-1,X=V.isObject($);if(X&&V.isHTMLForm($))$=new FormData($);if(V.isFormData($))return Y?JSON.stringify(aJ($)):$;if(V.isArrayBuffer($)||V.isBuffer($)||V.isStream($)||V.isFile($)||V.isBlob($)||V.isReadableStream($))return $;if(V.isArrayBufferView($))return $.buffer;if(V.isURLSearchParams($))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();let m;if(X){let G=Z$(this,"formSerializer");if(J.indexOf("application/x-www-form-urlencoded")>-1)return J9($,G).toString();if((m=V.isFileList($))||J.indexOf("multipart/form-data")>-1){let z=Z$(this,"env"),x=z&&z.FormData;return K8(m?{"files[]":$}:$,x&&new x,G)}}if(X||Y)return Q.setContentType("application/json",!1),r1($);return $}],transformResponse:[function($){let Q=Z$(this,"transitional")||X9.transitional,J=Q&&Q.forcedJSONParsing,Y=Z$(this,"responseType"),X=Y==="json";if(V.isResponse($)||V.isReadableStream($))return $;if($&&V.isString($)&&(J&&!Y||X)){let m=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse($,Z$(this,"parseReviver"))}catch(G){if(m){if(G.name==="SyntaxError")throw O.from(G,O.ERR_BAD_RESPONSE,this,null,Z$(this,"response"));throw G}}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Bc.classes.FormData,Blob:Bc.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],(c)=>{X9.headers[c]={}});L$=X9});function _Q(c,$){let Q=this||L$,J=$||Q,Y=_c.from(J.headers),X=J.data;return V.forEach(c,function(m){X=m.call(Q,X,Y.normalize(),$?$.status:void 0)}),Y.normalize(),X}var hz=d(()=>{Lc();lJ();P0()});function SQ(c){return!!(c&&c.__CANCEL__)}var yz,w0;var h8=d(()=>{X0();yz=class yz extends O{constructor(c,$,Q){super(c==null?"canceled":c,O.ERR_CANCELED,$,Q);this.name="CanceledError",this.__CANCEL__=!0}};w0=yz});function d0(c,$,Q){let J=Q.config.validateStatus;if(!Q.status||!J||J(Q.status))c(Q);else $(new O("Request failed with status code "+Q.status,Q.status>=400&&Q.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,Q.config,Q.request,Q))}var hJ=d(()=>{X0()});function W9(c){if(typeof c!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function m9(c,$){return $?c.replace(/\/?\/$/,"")+"/"+$.replace(/^\/+/,""):c}function cv(c){let $=0;while($<c.length&&c.charCodeAt($)<=32)$++;return c.slice($)}function $v(c){return cv(c).replace(e1,"")}function oz(c,$){if(typeof c==="string"&&t1.test($v(c)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,$)}function y8(c,$,Q,J){oz($,J);let Y=!W9($);if(c&&(Y||Q===!1))return oz(c,J),m9(c,$);return $}var t1,e1;var yJ=d(()=>{X0();t1=/^https?:(?!\/\/)/i,e1=/[\t\n\r]/g});function Jv(c){try{return new URL(c)}catch{return null}}function gz(c){var $=(typeof c==="string"?Jv(c):c)||{},Q=$.protocol,J=$.host,Y=$.port;if(typeof J!=="string"||!J||typeof Q!=="string")return"";if(Q=Q.split(":",1)[0],J=J.replace(/:\d*$/,""),Y=parseInt(Y)||Qv[Q]||0,!Yv(J,Y))return"";var X=G9(Q+"_proxy")||G9("all_proxy");if(X&&X.indexOf("://")===-1)X=Q+"://"+X;return X}function Yv(c,$){var Q=G9("no_proxy").toLowerCase();if(!Q)return!0;if(Q==="*")return!1;return Q.split(/[,\s]/).every(function(J){if(!J)return!0;var Y=J.match(/^(.+):(\d+)$/),X=Y?Y[1]:J,W=Y?parseInt(Y[2]):0;if(W&&W!==$)return!0;if(!/^[.*]/.test(X))return c!==X;if(X.charAt(0)==="*")X=X.slice(1);return!c.endsWith(X)})}function G9(c){return process.env[c.toLowerCase()]||process.env[c.toUpperCase()]||""}var Qv;var dz=d(()=>{Qv={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443}});var rz=l((b3,sz)=>{var _$=1000,S$=_$*60,A$=S$*60,o8=A$*24,Xv=o8*7,Wv=o8*365.25;sz.exports=function(c,$){$=$||{};var Q=typeof c;if(Q==="string"&&c.length>0)return mv(c);else if(Q==="number"&&isFinite(c))return $.long?zv(c):Gv(c);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(c))};function mv(c){if(c=String(c),c.length>100)return;var $=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(c);if(!$)return;var Q=parseFloat($[1]),J=($[2]||"ms").toLowerCase();switch(J){case"years":case"year":case"yrs":case"yr":case"y":return Q*Wv;case"weeks":case"week":case"w":return Q*Xv;case"days":case"day":case"d":return Q*o8;case"hours":case"hour":case"hrs":case"hr":case"h":return Q*A$;case"minutes":case"minute":case"mins":case"min":case"m":return Q*S$;case"seconds":case"second":case"secs":case"sec":case"s":return Q*_$;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return Q;default:return}}function Gv(c){var $=Math.abs(c);if($>=o8)return Math.round(c/o8)+"d";if($>=A$)return Math.round(c/A$)+"h";if($>=S$)return Math.round(c/S$)+"m";if($>=_$)return Math.round(c/_$)+"s";return c+"ms"}function zv(c){var $=Math.abs(c);if($>=o8)return oJ(c,$,o8,"day");if($>=A$)return oJ(c,$,A$,"hour");if($>=S$)return oJ(c,$,S$,"minute");if($>=_$)return oJ(c,$,_$,"second");return c+" ms"}function oJ(c,$,Q,J){var Y=$>=Q*1.5;return Math.round(c/Q)+" "+J+(Y?"s":"")}});var z9=l((F3,tz)=>{function xv(c){Q.debug=Q,Q.default=Q,Q.coerce=G,Q.disable=W,Q.enable=Y,Q.enabled=m,Q.humanize=rz(),Q.destroy=z,Object.keys(c).forEach((x)=>{Q[x]=c[x]}),Q.names=[],Q.skips=[],Q.formatters={};function $(x){let q=0;for(let M=0;M<x.length;M++)q=(q<<5)-q+x.charCodeAt(M),q|=0;return Q.colors[Math.abs(q)%Q.colors.length]}Q.selectColor=$;function Q(x){let q,M=null,N,w;function U(...v){if(!U.enabled)return;let i=U,j=Number(new Date),D=j-(q||j);if(i.diff=D,i.prev=q,i.curr=j,q=j,v[0]=Q.coerce(v[0]),typeof v[0]!=="string")v.unshift("%O");let _=0;v[0]=v[0].replace(/%([a-zA-Z%])/g,(g,Jc)=>{if(g==="%%")return"%";_++;let u=Q.formatters[Jc];if(typeof u==="function"){let a=v[_];g=u.call(i,a),v.splice(_,1),_--}return g}),Q.formatArgs.call(i,v),(i.log||Q.log).apply(i,v)}if(U.namespace=x,U.useColors=Q.useColors(),U.color=Q.selectColor(x),U.extend=J,U.destroy=Q.destroy,Object.defineProperty(U,"enabled",{enumerable:!0,configurable:!1,get:()=>{if(M!==null)return M;if(N!==Q.namespaces)N=Q.namespaces,w=Q.enabled(x);return w},set:(v)=>{M=v}}),typeof Q.init==="function")Q.init(U);return U}function J(x,q){let M=Q(this.namespace+(typeof q>"u"?":":q)+x);return M.log=this.log,M}function Y(x){Q.save(x),Q.namespaces=x,Q.names=[],Q.skips=[];let q=(typeof x==="string"?x:"").trim().replace(/\s+/g,",").split(",").filter(Boolean);for(let M of q)if(M[0]==="-")Q.skips.push(M.slice(1));else Q.names.push(M)}function X(x,q){let M=0,N=0,w=-1,U=0;while(M<x.length)if(N<q.length&&(q[N]===x[M]||q[N]==="*"))if(q[N]==="*")w=N,U=M,N++;else M++,N++;else if(w!==-1)N=w+1,U++,M=U;else return!1;while(N<q.length&&q[N]==="*")N++;return N===q.length}function W(){let x=[...Q.names,...Q.skips.map((q)=>"-"+q)].join(",");return Q.enable(""),x}function m(x){for(let q of Q.skips)if(X(x,q))return!1;for(let q of Q.names)if(X(x,q))return!0;return!1}function G(x){if(x instanceof Error)return x.stack||x.message;return x}function z(){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 Q.enable(Q.load()),Q}tz.exports=xv});var c5=l((ez,gJ)=>{ez.formatArgs=Mv;ez.save=Nv;ez.load=Vv;ez.useColors=qv;ez.storage=wv();ez.destroy=(()=>{let c=!1;return()=>{if(!c)c=!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`.")}})();ez.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 qv(){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 c;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&&(c=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(c[1],10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function Mv(c){if(c[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+c[0]+(this.useColors?"%c ":" ")+"+"+gJ.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;c.splice(1,0,$,"color: inherit");let Q=0,J=0;c[0].replace(/%[a-zA-Z%]/g,(Y)=>{if(Y==="%%")return;if(Q++,Y==="%c")J=Q}),c.splice(J,0,$)}ez.log=console.debug||console.log||(()=>{});function Nv(c){try{if(c)ez.storage.setItem("debug",c);else ez.storage.removeItem("debug")}catch($){}}function Vv(){let c;try{c=ez.storage.getItem("debug")||ez.storage.getItem("DEBUG")}catch($){}if(!c&&typeof process<"u"&&"env"in process)c=process.env.DEBUG;return c}function wv(){try{return localStorage}catch(c){}}gJ.exports=z9()(ez);var{formatters:iv}=gJ.exports;iv.j=function(c){try{return JSON.stringify(c)}catch($){return"[UnexpectedJSONParseError]: "+$.message}}});var Q5=l((f3,$5)=>{$5.exports=(c,$=process.argv)=>{let Q=c.startsWith("-")?"":c.length===1?"-":"--",J=$.indexOf(Q+c),Y=$.indexOf("--");return J!==-1&&(Y===-1||J<Y)}});var X5=l((n3,Y5)=>{var Ov=Zc("os"),J5=Zc("tty"),B0=Q5(),{env:ac}=process,B8;if(B0("no-color")||B0("no-colors")||B0("color=false")||B0("color=never"))B8=0;else if(B0("color")||B0("colors")||B0("color=true")||B0("color=always"))B8=1;if("FORCE_COLOR"in ac)if(ac.FORCE_COLOR==="true")B8=1;else if(ac.FORCE_COLOR==="false")B8=0;else B8=ac.FORCE_COLOR.length===0?1:Math.min(parseInt(ac.FORCE_COLOR,10),3);function x9(c){if(c===0)return!1;return{level:c,hasBasic:!0,has256:c>=2,has16m:c>=3}}function q9(c,$){if(B8===0)return 0;if(B0("color=16m")||B0("color=full")||B0("color=truecolor"))return 3;if(B0("color=256"))return 2;if(c&&!$&&B8===void 0)return 0;let Q=B8||0;if(ac.TERM==="dumb")return Q;if(process.platform==="win32"){let J=Ov.release().split(".");if(Number(J[0])>=10&&Number(J[2])>=10586)return Number(J[2])>=14931?3:2;return 1}if("CI"in ac){if(["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some((J)=>(J in ac))||ac.CI_NAME==="codeship")return 1;return Q}if("TEAMCITY_VERSION"in ac)return/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(ac.TEAMCITY_VERSION)?1:0;if(ac.COLORTERM==="truecolor")return 3;if("TERM_PROGRAM"in ac){let J=parseInt((ac.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(ac.TERM_PROGRAM){case"iTerm.app":return J>=3?3:2;case"Apple_Terminal":return 2}}if(/-256(color)?$/i.test(ac.TERM))return 2;if(/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(ac.TERM))return 1;if("COLORTERM"in ac)return 1;return Q}function Rv(c){let $=q9(c,c&&c.isTTY);return x9($)}Y5.exports={supportsColor:Rv,stdout:x9(q9(!0,J5.isatty(1))),stderr:x9(q9(!0,J5.isatty(2)))}});var z5=l((m5,sJ)=>{var pv=Zc("tty"),dJ=Zc("util");m5.init=Cv;m5.log=_v;m5.formatArgs=Zv;m5.save=Sv;m5.load=Av;m5.useColors=Iv;m5.destroy=dJ.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");m5.colors=[6,2,3,4,5,1];try{let c=X5();if(c&&(c.stderr||c).level>=2)m5.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(c){}m5.inspectOpts=Object.keys(process.env).filter((c)=>{return/^debug_/i.test(c)}).reduce((c,$)=>{let Q=$.substring(6).toLowerCase().replace(/_([a-z])/g,(Y,X)=>{return X.toUpperCase()}),J=process.env[$];if(/^(yes|on|true|enabled)$/i.test(J))J=!0;else if(/^(no|off|false|disabled)$/i.test(J))J=!1;else if(J==="null")J=null;else J=Number(J);return c[Q]=J,c},{});function Iv(){return"colors"in m5.inspectOpts?Boolean(m5.inspectOpts.colors):pv.isatty(process.stderr.fd)}function Zv(c){let{namespace:$,useColors:Q}=this;if(Q){let J=this.color,Y="\x1B[3"+(J<8?J:"8;5;"+J),X=` ${Y};1m${$} \x1B[0m`;c[0]=X+c[0].split(`
9
11
  `).join(`
10
- `+X),c.push(Y+"m+"+SJ.exports.humanize(this.diff)+"\x1B[0m")}else c[0]=x1()+$+" "+c[0]}function x1(){if(Mz.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function i1(...c){return process.stderr.write(_J.formatWithOptions(Mz.inspectOpts,...c)+`
11
- `)}function q1(c){if(c)process.env.DEBUG=c;else delete process.env.DEBUG}function M1(){return process.env.DEBUG}function V1(c){c.inspectOpts={};let $=Object.keys(Mz.inspectOpts);for(let Q=0;Q<$.length;Q++)c.inspectOpts[$[Q]]=Mz.inspectOpts[$[Q]]}SJ.exports=AX()(Mz);var{formatters:qz}=SJ.exports;qz.o=function(c){return this.inspectOpts.colors=this.useColors,_J.inspect(c,this.inspectOpts).split(`
12
- `).map(($)=>$.trim()).join(" ")};qz.O=function(c){return this.inspectOpts.colors=this.useColors,_J.inspect(c,this.inspectOpts)}});var VQ=l((xZ,bX)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)bX.exports=mz();else bX.exports=Nz()});var vz=l((wz)=>{Object.defineProperty(wz,"__esModule",{value:!0});function B1(c){return function($,Q){return new Promise((J,Y)=>{c.call(this,$,Q,(X,m)=>{if(X)Y(X);else J(m)})})}}wz.default=B1});var Kz=l((FX,jz)=>{var Uz=FX&&FX.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},O1=Rc("events"),p1=Uz(VQ()),R1=Uz(vz()),NQ=p1.default("agent-base");function I1(c){return Boolean(c)&&typeof c.addRequest==="function"}function EX(){let{stack:c}=Error();if(typeof c!=="string")return!1;return c.split(`
13
- `).some(($)=>$.indexOf("(https.js:")!==-1||$.indexOf("node:https:")!==-1)}function AJ(c,$){return new AJ.Agent(c,$)}(function(c){class $ extends O1.EventEmitter{constructor(Q,J){super();let Y=J;if(typeof Q==="function")this.callback=Q;else if(Q)Y=Q;if(this.timeout=null,Y&&typeof Y.timeout==="number")this.timeout=Y.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return EX()?443:80}set defaultPort(Q){this.explicitDefaultPort=Q}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return EX()?"https:":"http:"}set protocol(Q){this.explicitProtocol=Q}callback(Q,J,Y){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(Q,J){let Y=Object.assign({},J);if(typeof Y.secureEndpoint!=="boolean")Y.secureEndpoint=EX();if(Y.host==null)Y.host="localhost";if(Y.port==null)Y.port=Y.secureEndpoint?443:80;if(Y.protocol==null)Y.protocol=Y.secureEndpoint?"https:":"http:";if(Y.host&&Y.path)delete Y.path;delete Y.agent,delete Y.hostname,delete Y._defaultAgent,delete Y.defaultPort,delete Y.createConnection,Q._last=!0,Q.shouldKeepAlive=!1;let X=!1,m=null,W=Y.timeout||this.timeout,G=(q)=>{if(Q._hadError)return;Q.emit("error",q),Q._hadError=!0},z=()=>{m=null,X=!0;let q=Error(`A "socket" was not created for HTTP request before ${W}ms`);q.code="ETIMEOUT",G(q)},x=(q)=>{if(X)return;if(m!==null)clearTimeout(m),m=null;G(q)},i=(q)=>{if(X)return;if(m!=null)clearTimeout(m),m=null;if(I1(q)){NQ("Callback returned another Agent instance %o",q.constructor.name),q.addRequest(Q,Y);return}if(q){q.once("free",()=>{this.freeSocket(q,Y)}),Q.onSocket(q);return}let M=Error(`no Duplex stream was returned to agent-base for \`${Q.method} ${Q.path}\``);G(M)};if(typeof this.callback!=="function"){G(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)NQ("Converting legacy callback function to promise"),this.promisifiedCallback=R1.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof W==="number"&&W>0)m=setTimeout(z,W);if("port"in Y&&typeof Y.port!=="number")Y.port=Number(Y.port);try{NQ("Resolving socket for %o request: %o",Y.protocol,`${Q.method} ${Q.path}`),Promise.resolve(this.promisifiedCallback(Q,Y)).then(i,x)}catch(q){Promise.reject(q).catch(x)}}freeSocket(Q,J){NQ("Freeing socket %o %o",Q.constructor.name,J),Q.destroy()}destroy(){NQ("Destroying agent %o",this.constructor.name)}}c.Agent=$,c.prototype=c.Agent.prototype})(AJ||(AJ={}));jz.exports=AJ});var Dz=l((vQ)=>{var L1=vQ&&vQ.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(vQ,"__esModule",{value:!0});var Z1=L1(VQ()),wQ=Z1.default("https-proxy-agent:parse-proxy-response");function _1(c){return new Promise(($,Q)=>{let J=0,Y=[];function X(){let i=c.read();if(i)x(i);else c.once("readable",X)}function m(){c.removeListener("end",G),c.removeListener("error",z),c.removeListener("close",W),c.removeListener("readable",X)}function W(i){wQ("onclose had error %o",i)}function G(){wQ("onend")}function z(i){m(),wQ("onerror %o",i),Q(i)}function x(i){Y.push(i),J+=i.length;let q=Buffer.concat(Y,J);if(q.indexOf(`\r
12
+ `+X),c.push(Y+"m+"+sJ.exports.humanize(this.diff)+"\x1B[0m")}else c[0]=Lv()+$+" "+c[0]}function Lv(){if(m5.inspectOpts.hideDate)return"";return new Date().toISOString()+" "}function _v(...c){return process.stderr.write(dJ.formatWithOptions(m5.inspectOpts,...c)+`
13
+ `)}function Sv(c){if(c)process.env.DEBUG=c;else delete process.env.DEBUG}function Av(){return process.env.DEBUG}function Cv(c){c.inspectOpts={};let $=Object.keys(m5.inspectOpts);for(let Q=0;Q<$.length;Q++)c.inspectOpts[$[Q]]=m5.inspectOpts[$[Q]]}sJ.exports=z9()(m5);var{formatters:W5}=sJ.exports;W5.o=function(c){return this.inspectOpts.colors=this.useColors,dJ.inspect(c,this.inspectOpts).split(`
14
+ `).map(($)=>$.trim()).join(" ")};W5.O=function(c){return this.inspectOpts.colors=this.useColors,dJ.inspect(c,this.inspectOpts)}});var CQ=l((k3,M9)=>{if(typeof process>"u"||process.type==="renderer"||!1||process.__nwjs)M9.exports=c5();else M9.exports=z5()});var q5=l((x5)=>{Object.defineProperty(x5,"__esModule",{value:!0});function uv(c){return function($,Q){return new Promise((J,Y)=>{c.call(this,$,Q,(X,W)=>{if(X)Y(X);else J(W)})})}}x5.default=uv});var V5=l((V9,N5)=>{var M5=V9&&V9.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},av=Zc("events"),lv=M5(CQ()),hv=M5(q5()),PQ=lv.default("agent-base");function yv(c){return Boolean(c)&&typeof c.addRequest==="function"}function N9(){let{stack:c}=Error();if(typeof c!=="string")return!1;return c.split(`
15
+ `).some(($)=>$.indexOf("(https.js:")!==-1||$.indexOf("node:https:")!==-1)}function rJ(c,$){return new rJ.Agent(c,$)}(function(c){class $ extends av.EventEmitter{constructor(Q,J){super();let Y=J;if(typeof Q==="function")this.callback=Q;else if(Q)Y=Q;if(this.timeout=null,Y&&typeof Y.timeout==="number")this.timeout=Y.timeout;this.maxFreeSockets=1,this.maxSockets=1,this.maxTotalSockets=1/0,this.sockets={},this.freeSockets={},this.requests={},this.options={}}get defaultPort(){if(typeof this.explicitDefaultPort==="number")return this.explicitDefaultPort;return N9()?443:80}set defaultPort(Q){this.explicitDefaultPort=Q}get protocol(){if(typeof this.explicitProtocol==="string")return this.explicitProtocol;return N9()?"https:":"http:"}set protocol(Q){this.explicitProtocol=Q}callback(Q,J,Y){throw Error('"agent-base" has no default implementation, you must subclass and override `callback()`')}addRequest(Q,J){let Y=Object.assign({},J);if(typeof Y.secureEndpoint!=="boolean")Y.secureEndpoint=N9();if(Y.host==null)Y.host="localhost";if(Y.port==null)Y.port=Y.secureEndpoint?443:80;if(Y.protocol==null)Y.protocol=Y.secureEndpoint?"https:":"http:";if(Y.host&&Y.path)delete Y.path;delete Y.agent,delete Y.hostname,delete Y._defaultAgent,delete Y.defaultPort,delete Y.createConnection,Q._last=!0,Q.shouldKeepAlive=!1;let X=!1,W=null,m=Y.timeout||this.timeout,G=(M)=>{if(Q._hadError)return;Q.emit("error",M),Q._hadError=!0},z=()=>{W=null,X=!0;let M=Error(`A "socket" was not created for HTTP request before ${m}ms`);M.code="ETIMEOUT",G(M)},x=(M)=>{if(X)return;if(W!==null)clearTimeout(W),W=null;G(M)},q=(M)=>{if(X)return;if(W!=null)clearTimeout(W),W=null;if(yv(M)){PQ("Callback returned another Agent instance %o",M.constructor.name),M.addRequest(Q,Y);return}if(M){M.once("free",()=>{this.freeSocket(M,Y)}),Q.onSocket(M);return}let N=Error(`no Duplex stream was returned to agent-base for \`${Q.method} ${Q.path}\``);G(N)};if(typeof this.callback!=="function"){G(Error("`callback` is not defined"));return}if(!this.promisifiedCallback)if(this.callback.length>=3)PQ("Converting legacy callback function to promise"),this.promisifiedCallback=hv.default(this.callback);else this.promisifiedCallback=this.callback;if(typeof m==="number"&&m>0)W=setTimeout(z,m);if("port"in Y&&typeof Y.port!=="number")Y.port=Number(Y.port);try{PQ("Resolving socket for %o request: %o",Y.protocol,`${Q.method} ${Q.path}`),Promise.resolve(this.promisifiedCallback(Q,Y)).then(q,x)}catch(M){Promise.reject(M).catch(x)}}freeSocket(Q,J){PQ("Freeing socket %o %o",Q.constructor.name,J),Q.destroy()}destroy(){PQ("Destroying agent %o",this.constructor.name)}}c.Agent=$,c.prototype=c.Agent.prototype})(rJ||(rJ={}));N5.exports=rJ});var w5=l((bQ)=>{var ov=bQ&&bQ.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(bQ,"__esModule",{value:!0});var gv=ov(CQ()),EQ=gv.default("https-proxy-agent:parse-proxy-response");function dv(c){return new Promise(($,Q)=>{let J=0,Y=[];function X(){let q=c.read();if(q)x(q);else c.once("readable",X)}function W(){c.removeListener("end",G),c.removeListener("error",z),c.removeListener("close",m),c.removeListener("readable",X)}function m(q){EQ("onclose had error %o",q)}function G(){EQ("onend")}function z(q){W(),EQ("onerror %o",q),Q(q)}function x(q){Y.push(q),J+=q.length;let M=Buffer.concat(Y,J);if(M.indexOf(`\r
14
16
  \r
15
- `)===-1){wQ("have not received end of HTTP headers yet..."),X();return}let N=q.toString("ascii",0,q.indexOf(`\r
16
- `)),v=+N.split(" ")[1];wQ("got proxy server response: %o",N),$({statusCode:v,buffered:q})}c.on("error",z),c.on("close",W),c.on("end",G),X()})}vQ.default=_1});var pz=l((f8)=>{var S1=f8&&f8.__awaiter||function(c,$,Q,J){function Y(X){return X instanceof Q?X:new Q(function(m){m(X)})}return new(Q||(Q=Promise))(function(X,m){function W(x){try{z(J.next(x))}catch(i){m(i)}}function G(x){try{z(J.throw(x))}catch(i){m(i)}}function z(x){x.done?X(x.value):Y(x.value).then(W,G)}z((J=J.apply(c,$||[])).next())})},D$=f8&&f8.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(f8,"__esModule",{value:!0});var Bz=D$(Rc("net")),Hz=D$(Rc("tls")),A1=D$(Rc("url")),C1=D$(Rc("assert")),P1=D$(VQ()),b1=Kz(),E1=D$(Dz()),UQ=P1.default("https-proxy-agent:agent");class Oz extends b1.Agent{constructor(c){let $;if(typeof c==="string")$=A1.default.parse(c);else $=c;if(!$)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");UQ("creating new HttpsProxyAgent instance: %o",$);super($);let Q=Object.assign({},$);if(this.secureProxy=$.secureProxy||f1(Q.protocol),Q.host=Q.hostname||Q.host,typeof Q.port==="string")Q.port=parseInt(Q.port,10);if(!Q.port&&Q.host)Q.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in Q))Q.ALPNProtocols=["http 1.1"];if(Q.host&&Q.path)delete Q.path,delete Q.pathname;this.proxy=Q}callback(c,$){return S1(this,void 0,void 0,function*(){let{proxy:Q,secureProxy:J}=this,Y;if(J)UQ("Creating `tls.Socket`: %o",Q),Y=Hz.default.connect(Q);else UQ("Creating `net.Socket`: %o",Q),Y=Bz.default.connect(Q);let X=Object.assign({},Q.headers),W=`CONNECT ${`${$.host}:${$.port}`} HTTP/1.1\r
17
- `;if(Q.auth)X["Proxy-Authorization"]=`Basic ${Buffer.from(Q.auth).toString("base64")}`;let{host:G,port:z,secureEndpoint:x}=$;if(!T1(z,x))G+=`:${z}`;X.Host=G,X.Connection="close";for(let v of Object.keys(X))W+=`${v}: ${X[v]}\r
18
- `;let i=E1.default(Y);Y.write(`${W}\r
19
- `);let{statusCode:q,buffered:M}=yield i;if(q===200){if(c.once("socket",F1),$.secureEndpoint){UQ("Upgrading socket connection to TLS");let v=$.servername||$.host;return Hz.default.connect(Object.assign(Object.assign({},n1($,"host","hostname","path","port")),{socket:Y,servername:v}))}return Y}Y.destroy();let N=new Bz.default.Socket({writable:!1});return N.readable=!0,c.once("socket",(v)=>{UQ("replaying proxy buffer for failed request"),C1.default(v.listenerCount("data")>0),v.push(M),v.push(null)}),N})}}f8.default=Oz;function F1(c){c.resume()}function T1(c,$){return Boolean(!$&&c===80||$&&c===443)}function f1(c){return typeof c==="string"?/^https:?$/i.test(c):!1}function n1(c,...$){let Q={},J;for(J in c)if(!$.includes(J))Q[J]=c[J];return Q}});var Iz=l((nX,Rz)=>{var u1=nX&&nX.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},TX=u1(pz());function fX(c){return new TX.default(c)}(function(c){c.HttpsProxyAgent=TX.default,c.prototype=TX.default.prototype})(fX||(fX={}));Rz.exports=fX});var Zz=l((VZ,Lz)=>{var jQ;Lz.exports=function(){if(!jQ){try{jQ=VQ()("follow-redirects")}catch(c){}if(typeof jQ!=="function")jQ=function(){}}jQ.apply(null,arguments)}});var Pz=l((NZ,tX)=>{var DQ=Rc("url"),KQ=DQ.URL,a1=Rc("http"),k1=Rc("https"),hX=Rc("stream").Writable,yX=Rc("assert"),_z=Zz();(function(){var $=typeof process<"u",Q=typeof window<"u"&&typeof document<"u",J=u8(Error.captureStackTrace);if(!$&&(Q||!J))console.warn("The follow-redirects package should be excluded from browser builds.")})();var oX=!1;try{yX(new KQ(""))}catch(c){oX=c.code==="ERR_INVALID_URL"}var l1=["Authorization","Proxy-Authorization","Cookie"],h1=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],gX=["abort","aborted","connect","error","socket","timeout"],dX=Object.create(null);gX.forEach(function(c){dX[c]=function($,Q,J){this._redirectable.emit(c,$,Q,J)}});var aX=BQ("ERR_INVALID_URL","Invalid URL",TypeError),kX=BQ("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),y1=BQ("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",kX),o1=BQ("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),g1=BQ("ERR_STREAM_WRITE_AFTER_END","write after end"),d1=hX.prototype.destroy||Az;function Y0(c,$){if(hX.call(this),this._sanitizeOptions(c),this._options=c,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],$)this.on("response",$);var Q=this;this._onNativeResponse=function(J){try{Q._processResponse(J)}catch(Y){Q.emit("error",Y instanceof kX?Y:new kX({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+l1.concat(c.sensitiveHeaders).map($v).join("|")+")$","i"),this._performRequest()}Y0.prototype=Object.create(hX.prototype);Y0.prototype.abort=function(){rX(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};Y0.prototype.destroy=function(c){return rX(this._currentRequest,c),d1.call(this,c),this};Y0.prototype.write=function(c,$,Q){if(this._ending)throw new g1;if(!n8(c)&&!e1(c))throw TypeError("data should be a string, Buffer or Uint8Array");if(u8($))Q=$,$=null;if(c.length===0){if(Q)Q();return}if(this._requestBodyLength+c.length<=this._options.maxBodyLength)this._requestBodyLength+=c.length,this._requestBodyBuffers.push({data:c,encoding:$}),this._currentRequest.write(c,$,Q);else this.emit("error",new o1),this.abort()};Y0.prototype.end=function(c,$,Q){if(u8(c))Q=c,c=$=null;else if(u8($))Q=$,$=null;if(!c)this._ended=this._ending=!0,this._currentRequest.end(null,null,Q);else{var J=this,Y=this._currentRequest;this.write(c,$,function(){J._ended=!0,Y.end(null,null,Q)}),this._ending=!0}};Y0.prototype.setHeader=function(c,$){this._options.headers[c]=$,this._currentRequest.setHeader(c,$)};Y0.prototype.removeHeader=function(c){delete this._options.headers[c],this._currentRequest.removeHeader(c)};Y0.prototype.setTimeout=function(c,$){var Q=this;function J(m){m.setTimeout(c),m.removeListener("timeout",m.destroy),m.addListener("timeout",m.destroy)}function Y(m){if(Q._timeout)clearTimeout(Q._timeout);Q._timeout=setTimeout(function(){Q.emit("timeout"),X()},c),J(m)}function X(){if(Q._timeout)clearTimeout(Q._timeout),Q._timeout=null;if(Q.removeListener("abort",X),Q.removeListener("error",X),Q.removeListener("response",X),Q.removeListener("close",X),$)Q.removeListener("timeout",$);if(!Q.socket)Q._currentRequest.removeListener("socket",Y)}if($)this.on("timeout",$);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",J),this.on("abort",X),this.on("error",X),this.on("response",X),this.on("close",X),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(c){Y0.prototype[c]=function($,Q){return this._currentRequest[c]($,Q)}});["aborted","connection","socket"].forEach(function(c){Object.defineProperty(Y0.prototype,c,{get:function(){return this._currentRequest[c]}})});Y0.prototype._sanitizeOptions=function(c){if(!c.headers)c.headers={};if(!t1(c.sensitiveHeaders))c.sensitiveHeaders=[];if(c.host){if(!c.hostname)c.hostname=c.host;delete c.host}if(!c.pathname&&c.path){var $=c.path.indexOf("?");if($<0)c.pathname=c.path;else c.pathname=c.path.substring(0,$),c.search=c.path.substring($)}};Y0.prototype._performRequest=function(){var c=this._options.protocol,$=this._options.nativeProtocols[c];if(!$)throw TypeError("Unsupported protocol "+c);if(this._options.agents){var Q=c.slice(0,-1);this._options.agent=this._options.agents[Q]}var J=this._currentRequest=$.request(this._options,this._onNativeResponse);J._redirectable=this;for(var Y of gX)J.on(Y,dX[Y]);if(this._currentUrl=/^\//.test(this._options.path)?DQ.format(this._options):this._options.path,this._isRedirect){var X=0,m=this,W=this._requestBodyBuffers;(function G(z){if(J===m._currentRequest){if(z)m.emit("error",z);else if(X<W.length){var x=W[X++];if(!J.finished)J.write(x.data,x.encoding,G)}else if(m._ended)J.end()}})()}};Y0.prototype._processResponse=function(c){var $=c.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:c.headers,statusCode:$});var Q=c.headers.location;if(!Q||this._options.followRedirects===!1||$<300||$>=400){c.responseUrl=this._currentUrl,c.redirects=this._redirects,this.emit("response",c),this._requestBodyBuffers=[];return}if(rX(this._currentRequest),c.destroy(),++this._redirectCount>this._options.maxRedirects)throw new y1;var J,Y=this._options.beforeRedirect;if(Y)J=Object.assign({Host:c.req.getHeader("host")},this._options.headers);var X=this._options.method;if(($===301||$===302)&&this._options.method==="POST"||$===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],uX(/^content-/i,this._options.headers);var m=uX(/^host$/i,this._options.headers),W=sX(this._currentUrl),G=m||W.host,z=/^\w+:/.test(Q)?this._currentUrl:DQ.format(Object.assign(W,{host:G})),x=s1(Q,z);if(_z("redirecting to",x.href),this._isRedirect=!0,lX(x,this._options),x.protocol!==W.protocol&&x.protocol!=="https:"||x.host!==G&&!r1(x.host,G))uX(this._headerFilter,this._options.headers);if(u8(Y)){var i={headers:c.headers,statusCode:$},q={url:z,method:X,headers:J};Y(this._options,i,q),this._sanitizeOptions(this._options)}this._performRequest()};function Sz(c){var $={maxRedirects:21,maxBodyLength:10485760},Q={};return Object.keys(c).forEach(function(J){var Y=J+":",X=Q[Y]=c[J],m=$[J]=Object.create(X);function W(z,x,i){if(cv(z))z=lX(z);else if(n8(z))z=lX(sX(z));else i=x,x=Cz(z),z={protocol:Y};if(u8(x))i=x,x=null;if(x=Object.assign({maxRedirects:$.maxRedirects,maxBodyLength:$.maxBodyLength},z,x),x.nativeProtocols=Q,!n8(x.host)&&!n8(x.hostname))x.hostname="::1";return yX.equal(x.protocol,Y,"protocol mismatch"),_z("options",x),new Y0(x,i)}function G(z,x,i){var q=m.request(z,x,i);return q.end(),q}Object.defineProperties(m,{request:{value:W,configurable:!0,enumerable:!0,writable:!0},get:{value:G,configurable:!0,enumerable:!0,writable:!0}})}),$}function Az(){}function sX(c){var $;if(oX)$=new KQ(c);else if($=Cz(DQ.parse(c)),!n8($.protocol))throw new aX({input:c});return $}function s1(c,$){return oX?new KQ(c,$):sX(DQ.resolve($,c))}function Cz(c){if(/^\[/.test(c.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(c.hostname))throw new aX({input:c.href||c});if(/^\[/.test(c.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(c.host))throw new aX({input:c.href||c});return c}function lX(c,$){var Q=$||{};for(var J of h1)Q[J]=c[J];if(Q.hostname.startsWith("["))Q.hostname=Q.hostname.slice(1,-1);if(Q.port!=="")Q.port=Number(Q.port);return Q.path=Q.search?Q.pathname+Q.search:Q.pathname,Q}function uX(c,$){var Q;for(var J in $)if(c.test(J))Q=$[J],delete $[J];return Q===null||typeof Q>"u"?void 0:String(Q).trim()}function BQ(c,$,Q){function J(Y){if(u8(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=c,this.message=this.cause?$+": "+this.cause.message:$}return J.prototype=new(Q||Error),Object.defineProperties(J.prototype,{constructor:{value:J,enumerable:!1},name:{value:"Error ["+c+"]",enumerable:!1}}),J}function rX(c,$){for(var Q of gX)c.removeListener(Q,dX[Q]);c.on("error",Az),c.destroy($)}function r1(c,$){yX(n8(c)&&n8($));var Q=c.length-$.length-1;return Q>0&&c[Q]==="."&&c.endsWith($)}function t1(c){return c instanceof Array}function n8(c){return typeof c==="string"||c instanceof String}function u8(c){return typeof c==="function"}function e1(c){return typeof c==="object"&&"length"in c}function cv(c){return KQ&&c instanceof KQ}function $v(c){return c.replace(/[\]\\/()*+?.$]/g,"\\$&")}tX.exports=Sz({http:a1,https:k1});tX.exports.wrap=Sz});function wU(c,$=[]){for(let Q=0;Q<c.length;Q++){if(c[Q].startsWith("-"))continue;if(Q>0&&$.includes(c[Q-1]))continue;return{before:c.slice(0,Q),script:c[Q],after:c.slice(Q+1)}}return{before:c,script:void 0,after:[]}}function v9(c,$,Q=[]){return(J)=>{let{before:Y,script:X,after:m}=wU(J,Q);if(X===void 0)return[c,$,...Y];if(m.length>0)return[c,$,...Y,X,"--",...m];return[c,$,...Y,X]}}function F5(c){return{agent:[c,0],run:[c,"run",0],install:[c,"i",0],frozen:[c,"i","--frozen-lockfile",0],global:[c,"add","-g",0],add:[c,"add",0],upgrade:[c,"update",0],"upgrade-interactive":[c,"update","-i",0],dedupe:[c,"dedupe",0],execute:[c,"dlx",0],"execute-local":[c,"exec",0],uninstall:[c,"remove",0],global_uninstall:[c,"remove","--global",0]}}function T5(c,$,Q){let J=U9[c][$];return j9(J,Q)}function j9(c,$){if(c==null)return null;let Q=typeof c==="function"?c($):c.flatMap((J)=>{if(typeof J==="number")return $;return[J]});return{command:Q[0],args:Q.slice(1)}}var vU,E5,UU,b5,jU,KU,DU,BU,HU,U9;var f5=iJ(()=>{vU={agent:["npm",0],run:v9("npm","run",["-w","--workspace"]),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},E5={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":v9("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},UU={...E5,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]};b5=F5("pnpm"),jU=F5("rush-pnpm"),KU={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},DU={agent:["aube",0],run:["aube","run",0],install:["aube","install",0],frozen:["aube","install","--frozen-lockfile",0],global:["aube","add","-g",0],add:["aube","add",0],upgrade:["aube","update",0],"upgrade-interactive":["aube","update","-i",0],dedupe:["aube","dedupe",0],execute:["aube","dlx",0],"execute-local":["aube","exec",0],uninstall:["aube","remove",0],global_uninstall:["aube","remove","-g",0]},BU={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:["deno","x",0],"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},HU={agent:["nub",0],run:["nub","run",0],install:["nub","install",0],frozen:["nub","install","--frozen-lockfile",0],global:["nub","add","-g",0],add:["nub","add",0],upgrade:["nub","update",0],"upgrade-interactive":["nub","update","-i",0],dedupe:["nub","dedupe",0],execute:["nubx",0],"execute-local":["nub","exec",0],uninstall:["nub","remove",0],global_uninstall:["nub","remove","-g",0]},U9={npm:vU,yarn:E5,"yarn@berry":UU,pnpm:b5,"pnpm@6":{...b5,run:v9("pnpm","run",["-F","--filter"])},"pnpm-rush":jU,bun:KU,aube:DU,deno:BU,nub:HU}});var PQ,bQ,EQ,n5;var K9=iJ(()=>{PQ=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],bQ={"aube-lock.yaml":"aube","aube-workspace.yaml":"aube","bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","nub.lock":"nub","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},EQ={"node_modules/.aube/":"aube","node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"},n5={aube:"https://aube.en.dev/installation",bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation","pnpm-rush":"https://rushjs.io/pages/intro/get_started/",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/configuring-npm/install",nub:"https://nubjs.com/docs/install"}});import a5 from"node:fs/promises";import d0 from"node:path";import k5 from"node:process";async function aJ(c,$){try{let Q=await a5.stat(c);return $==="file"?Q.isFile():Q.isDirectory()}catch{return!1}}function l5(){let c=k5.env.npm_config_user_agent;if(!c)return null;let $=c.split("/")[0];return PQ.includes($)?$:null}function*OU(c=k5.cwd()){let $=d0.resolve(c),{root:Q}=d0.parse($);while($&&$!==Q)yield $,$=d0.dirname($)}async function u5(c,$){if(!c||!await aJ(c,"file"))return null;return await RU(c,$)}async function h5(c={}){let{cwd:$,strategies:Q=["lockfile","packageManager-field","devEngines-field"]}=c,J;if(typeof c.stopDir==="string"){let Y=d0.resolve(c.stopDir);J=(X)=>X===Y}else J=c.stopDir;for(let Y of OU($)){for(let X of Q)switch(X){case"lockfile":{if(await aJ(d0.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let m of Object.keys(bQ))if(await aJ(d0.join(Y,m),"file")){let W=bQ[m],G=await u5(d0.join(Y,"package.json"),c);if(G)return G;else return{name:W,agent:W}}break}case"packageManager-field":case"devEngines-field":{let m=await u5(d0.join(Y,"package.json"),c);if(m)return m;break}case"install-metadata":{for(let m of Object.keys(EQ)){let W=m.endsWith("/")?"dir":"file";if(await aJ(d0.join(Y,m),W)){let G=EQ[m],z=G==="yarn"?IU(m)?"yarn":"yarn@berry":G;return{name:G,agent:z}}}break}}if(J?.(Y))break}return null}function pU(c){let $=(Q)=>Q?.match(/\d+(\.\d+){0,2}/)?.[0]??Q;if(typeof c.packageManager==="string"){let[Q,J]=c.packageManager.replace(/^\^/,"").split("@");return{name:Q,ver:$(J)}}if(typeof c.devEngines?.packageManager?.name==="string")return{name:c.devEngines.packageManager.name,ver:$(c.devEngines.packageManager.version)};return}async function RU(c,$){try{let Q=await a5.readFile(c,"utf8"),J=$.packageJsonParser?await $.packageJsonParser(Q,c):JSON.parse(Q),Y,X=pU(J);if(X){let{name:m,ver:W}=X,G=W;if(m==="yarn"&&W&&Number.parseInt(W)>1)return Y="yarn@berry",G="berry",{name:m,agent:Y,version:G};else if(m==="pnpm"&&W&&Number.parseInt(W)<7)return Y="pnpm@6",{name:m,agent:Y,version:G};else if(PQ.includes(m))return Y=m,{name:m,agent:Y,version:G};else return $.onUnknown?.(J.packageManager)??null}}catch{}return null}function IU(c){return c.endsWith(".yarn_integrity")}var y5=iJ(()=>{K9()});var o5={};yY(o5,{resolveCommand:()=>T5,getUserAgent:()=>l5,detect:()=>h5,constructCommand:()=>j9,LOCKS:()=>bQ,INSTALL_PAGE:()=>n5,INSTALL_METADATA:()=>EQ,COMMANDS:()=>U9,AGENTS:()=>PQ});var g5=iJ(()=>{f5();K9();y5()});import{spawn as p4}from"node:child_process";import{join as R4}from"node:path";function $Q(c,$){return function(){return c.apply($,arguments)}}var{toString:ZM}=Object.prototype,{getPrototypeOf:W$}=Object,{iterator:JQ,toStringTag:RW}=Symbol,MJ=(({hasOwnProperty:c})=>($,Q)=>c.call($,Q))(Object.prototype),QQ=(c,$)=>{let Q=c,J=[];while(Q!=null&&Q!==Object.prototype){if(J.indexOf(Q)!==-1)return!1;if(J.push(Q),MJ(Q,$))return!0;Q=W$(Q)}return!1},_M=(c,$)=>c!=null&&QQ(c,$)?c[$]:void 0,gY=((c)=>($)=>{let Q=ZM.call($);return c[Q]||(c[Q]=Q.slice(8,-1).toLowerCase())})(Object.create(null)),I0=(c)=>{return c=c.toLowerCase(),($)=>gY($)===c},VJ=(c)=>($)=>typeof $===c,{isArray:C8}=Array,G$=VJ("undefined");function z$(c){return c!==null&&!G$(c)&&c.constructor!==null&&!G$(c.constructor)&&J0(c.constructor.isBuffer)&&c.constructor.isBuffer(c)}var IW=I0("ArrayBuffer");function SM(c){let $;if(typeof ArrayBuffer<"u"&&ArrayBuffer.isView)$=ArrayBuffer.isView(c);else $=c&&c.buffer&&IW(c.buffer);return $}var AM=VJ("string"),J0=VJ("function"),LW=VJ("number"),x$=(c)=>c!==null&&typeof c==="object",CM=(c)=>c===!0||c===!1,qJ=(c)=>{if(!x$(c))return!1;let $=W$(c);return($===null||$===Object.prototype||W$($)===null)&&!QQ(c,RW)&&!QQ(c,JQ)},PM=(c)=>{if(!x$(c)||z$(c))return!1;try{return Object.keys(c).length===0&&Object.getPrototypeOf(c)===Object.prototype}catch($){return!1}},bM=I0("Date"),EM=I0("File"),FM=(c)=>{return!!(c&&typeof c.uri<"u")},TM=(c)=>c&&typeof c.getParts<"u",fM=I0("Blob"),nM=I0("FileList"),uM=(c)=>x$(c)&&J0(c.pipe);function aM(){if(typeof globalThis<"u")return globalThis;if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof global<"u")return global;return{}}var OW=aM(),pW=typeof OW.FormData<"u"?OW.FormData:void 0,kM=(c)=>{if(!c)return!1;if(pW&&c instanceof pW)return!0;let $=W$(c);if(!$||$===Object.prototype)return!1;if(!J0(c.append))return!1;let Q=gY(c);return Q==="formdata"||Q==="object"&&J0(c.toString)&&c.toString()==="[object FormData]"},lM=I0("URLSearchParams"),[hM,yM,oM,gM]=["ReadableStream","Request","Response","Headers"].map(I0),dM=(c)=>{return c.trim?c.trim():c.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")};function YQ(c,$,{allOwnKeys:Q=!1}={}){if(c===null||typeof c>"u")return;let J,Y;if(typeof c!=="object")c=[c];if(C8(c))for(J=0,Y=c.length;J<Y;J++)$.call(null,c[J],J,c);else{if(z$(c))return;let X=Q?Object.getOwnPropertyNames(c):Object.keys(c),m=X.length,W;for(J=0;J<m;J++)W=X[J],$.call(null,c[W],W,c)}}function ZW(c,$){if(z$(c))return null;$=$.toLowerCase();let Q=Object.keys(c),J=Q.length,Y;while(J-- >0)if(Y=Q[J],$===Y.toLowerCase())return Y;return null}var A8=(()=>{if(typeof globalThis<"u")return globalThis;return typeof self<"u"?self:typeof window<"u"?window:global})(),_W=(c)=>!G$(c)&&c!==A8;function oY(...c){let{caseless:$,skipUndefined:Q}=_W(this)&&this||{},J={},Y=(X,m)=>{if(m==="__proto__"||m==="constructor"||m==="prototype")return;let W=$&&typeof m==="string"&&ZW(J,m)||m,G=MJ(J,W)?J[W]:void 0;if(qJ(G)&&qJ(X))J[W]=oY(G,X);else if(qJ(X))J[W]=oY({},X);else if(C8(X))J[W]=X.slice();else if(!Q||!G$(X))J[W]=X};for(let X=0,m=c.length;X<m;X++){let W=c[X];if(!W||z$(W))continue;if(YQ(W,Y),typeof W!=="object"||C8(W))continue;let G=Object.getOwnPropertySymbols(W);for(let z=0;z<G.length;z++){let x=G[z];if(WV.call(W,x))Y(W[x],x)}}return J}var sM=(c,$,Q,{allOwnKeys:J}={})=>{return YQ($,(Y,X)=>{if(Q&&J0(Y))Object.defineProperty(c,X,{__proto__:null,value:$Q(Y,Q),writable:!0,enumerable:!0,configurable:!0});else Object.defineProperty(c,X,{__proto__:null,value:Y,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:J}),c},rM=(c)=>{if(c.charCodeAt(0)===65279)c=c.slice(1);return c},tM=(c,$,Q,J)=>{c.prototype=Object.create($.prototype,J),Object.defineProperty(c.prototype,"constructor",{__proto__:null,value:c,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(c,"super",{__proto__:null,value:$.prototype}),Q&&Object.assign(c.prototype,Q)},eM=(c,$,Q,J)=>{let Y,X,m,W={};if($=$||{},c==null)return $;do{Y=Object.getOwnPropertyNames(c),X=Y.length;while(X-- >0)if(m=Y[X],(!J||J(m,c,$))&&!W[m])$[m]=c[m],W[m]=!0;c=Q!==!1&&W$(c)}while(c&&(!Q||Q(c,$))&&c!==Object.prototype);return $},cV=(c,$,Q)=>{if(c=String(c),Q===void 0||Q>c.length)Q=c.length;Q-=$.length;let J=c.indexOf($,Q);return J!==-1&&J===Q},$V=(c)=>{if(!c)return null;if(C8(c))return c;let $=c.length;if(!LW($))return null;let Q=Array($);while($-- >0)Q[$]=c[$];return Q},QV=((c)=>{return($)=>{return c&&$ instanceof c}})(typeof Uint8Array<"u"&&W$(Uint8Array)),JV=(c,$)=>{let J=(c&&c[JQ]).call(c),Y;while((Y=J.next())&&!Y.done){let X=Y.value;$.call(c,X[0],X[1])}},YV=(c,$)=>{let Q,J=[];while((Q=c.exec($))!==null)J.push(Q);return J},XV=I0("HTMLFormElement"),mV=(c)=>{return c.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(Q,J,Y){return J.toUpperCase()+Y})},{propertyIsEnumerable:WV}=Object.prototype,GV=I0("RegExp"),SW=(c,$)=>{let Q=Object.getOwnPropertyDescriptors(c),J={};YQ(Q,(Y,X)=>{let m;if((m=$(Y,X,c))!==!1)J[X]=m||Y}),Object.defineProperties(c,J)},zV=(c)=>{SW(c,($,Q)=>{if(J0(c)&&["arguments","caller","callee"].includes(Q))return!1;let J=c[Q];if(!J0(J))return;if($.enumerable=!1,"writable"in $){$.writable=!1;return}if(!$.set)$.set=()=>{throw Error("Can not rewrite read-only method '"+Q+"'")}})},xV=(c,$)=>{let Q={},J=(Y)=>{Y.forEach((X)=>{Q[X]=!0})};return C8(c)?J(c):J(String(c).split($)),Q},iV=()=>{},qV=(c,$)=>{return c!=null&&Number.isFinite(c=+c)?c:$};function MV(c){return!!(c&&J0(c.append)&&c[RW]==="FormData"&&c[JQ])}var VV=(c)=>{let $=new WeakSet,Q=(J)=>{if(x$(J)){if($.has(J))return;if(z$(J))return J;if(!("toJSON"in J)){$.add(J);let Y=C8(J)?[]:{};return YQ(J,(X,m)=>{let W=Q(X);!G$(W)&&(Y[m]=W)}),$.delete(J),Y}}return J};return Q(c)},NV=I0("AsyncFunction"),wV=(c)=>c&&(x$(c)||J0(c))&&J0(c.then)&&J0(c.catch),AW=((c,$)=>{if(c)return setImmediate;return $?((Q,J)=>{return A8.addEventListener("message",({source:Y,data:X})=>{if(Y===A8&&X===Q)J.length&&J.shift()()},!1),(Y)=>{J.push(Y),A8.postMessage(Q,"*")}})(`axios@${Math.random()}`,[]):(Q)=>setTimeout(Q)})(typeof setImmediate==="function",J0(A8.postMessage)),vV=typeof queueMicrotask<"u"?queueMicrotask.bind(A8):typeof process<"u"&&process.nextTick||AW,CW=(c)=>c!=null&&J0(c[JQ]),UV=(c)=>c!=null&&QQ(c,JQ)&&CW(c),V={isArray:C8,isArrayBuffer:IW,isBuffer:z$,isFormData:kM,isArrayBufferView:SM,isString:AM,isNumber:LW,isBoolean:CM,isObject:x$,isPlainObject:qJ,isEmptyObject:PM,isReadableStream:hM,isRequest:yM,isResponse:oM,isHeaders:gM,isUndefined:G$,isDate:bM,isFile:EM,isReactNativeBlob:FM,isReactNative:TM,isBlob:fM,isRegExp:GV,isFunction:J0,isStream:uM,isURLSearchParams:lM,isTypedArray:QV,isFileList:nM,forEach:YQ,merge:oY,extend:sM,trim:dM,stripBOM:rM,inherits:tM,toFlatObject:eM,kindOf:gY,kindOfTest:I0,endsWith:cV,toArray:$V,forEachEntry:JV,matchAll:YV,isHTMLForm:XV,hasOwnProperty:MJ,hasOwnProp:MJ,hasOwnInPrototypeChain:QQ,getSafeProp:_M,reduceDescriptors:SW,freezeMethods:zV,toObjectSet:xV,toCamelCase:mV,noop:iV,toFiniteNumber:qV,findKey:ZW,global:A8,isContextDefined:_W,isSpecCompliantForm:MV,toJSONObject:VV,isAsyncFn:NV,isThenable:wV,setImmediate:AW,asap:vV,isIterable:CW,isSafeIterable:UV};var jV=V.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"]),PW=(c)=>{let $={},Q,J,Y;return c&&c.split(`
20
- `).forEach(function(m){if(Y=m.indexOf(":"),Q=m.substring(0,Y).trim().toLowerCase(),J=m.substring(Y+1).trim(),!Q||$[Q]&&jV[Q])return;if(Q==="set-cookie")if($[Q])$[Q].push(J);else $[Q]=[J];else $[Q]=$[Q]?$[Q]+", "+J:J}),$};function KV(c){let $=0,Q=c.length;while($<Q){let J=c.charCodeAt($);if(J!==9&&J!==32)break;$+=1}while(Q>$){let J=c.charCodeAt(Q-1);if(J!==9&&J!==32)break;Q-=1}return $===0&&Q===c.length?c:c.slice($,Q)}var DV=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),BV=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function dY(c,$){if(V.isArray(c))return c.map((Q)=>dY(Q,$));return KV(String(c).replace($,""))}var bW=(c)=>dY(c,DV),HV=(c)=>dY(c,BV);function i$(c){let $=Object.create(null);return V.forEach(c.toJSON(),(Q,J)=>{$[J]=HV(Q)}),$}var EW=Symbol("internals");function XQ(c){return c&&String(c).trim().toLowerCase()}function NJ(c){if(c===!1||c==null)return c;return V.isArray(c)?c.map(NJ):bW(String(c))}function OV(c){let $=Object.create(null),Q=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g,J;while(J=Q.exec(c))$[J[1]]=J[2];return $}var pV=(c)=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(c.trim());function sY(c,$,Q,J,Y){if(V.isFunction(J))return J.call(this,$,Q);if(Y)$=Q;if(!V.isString($))return;if(V.isString(J))return $.indexOf(J)!==-1;if(V.isRegExp(J))return J.test($)}function RV(c){return c.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,($,Q,J)=>{return Q.toUpperCase()+J})}function IV(c,$){let Q=V.toCamelCase(" "+$);["get","set","has"].forEach((J)=>{Object.defineProperty(c,J+Q,{__proto__:null,value:function(Y,X,m){return this[J].call(this,$,Y,X,m)},configurable:!0})})}class mQ{constructor(c){c&&this.set(c)}set(c,$,Q){let J=this;function Y(m,W,G){let z=XQ(W);if(!z)return;let x=V.findKey(J,z);if(!x||J[x]===void 0||G===!0||G===void 0&&J[x]!==!1)J[x||W]=NJ(m)}let X=(m,W)=>V.forEach(m,(G,z)=>Y(G,z,W));if(V.isPlainObject(c)||c instanceof this.constructor)X(c,$);else if(V.isString(c)&&(c=c.trim())&&!pV(c))X(PW(c),$);else if(V.isObject(c)&&V.isSafeIterable(c)){let m=Object.create(null),W,G;for(let z of c){if(!V.isArray(z))throw TypeError("Object iterator must return a key-value pair");if(G=z[0],V.hasOwnProp(m,G))W=m[G],m[G]=V.isArray(W)?[...W,z[1]]:[W,z[1]];else m[G]=z[1]}X(m,$)}else c!=null&&Y($,c,Q);return this}get(c,$){if(c=XQ(c),c){let Q=V.findKey(this,c);if(Q){let J=this[Q];if(!$)return J;if($===!0)return OV(J);if(V.isFunction($))return $.call(this,J,Q);if(V.isRegExp($))return $.exec(J);throw TypeError("parser must be boolean|regexp|function")}}}has(c,$){if(c=XQ(c),c){let Q=V.findKey(this,c);return!!(Q&&this[Q]!==void 0&&(!$||sY(this,this[Q],Q,$)))}return!1}delete(c,$){let Q=this,J=!1;function Y(X){if(X=XQ(X),X){let m=V.findKey(Q,X);if(m&&(!$||sY(Q,Q[m],m,$)))delete Q[m],J=!0}}if(V.isArray(c))c.forEach(Y);else Y(c);return J}clear(c){let $=Object.keys(this),Q=$.length,J=!1;while(Q--){let Y=$[Q];if(!c||sY(this,this[Y],Y,c,!0))delete this[Y],J=!0}return J}normalize(c){let $=this,Q={};return V.forEach(this,(J,Y)=>{let X=V.findKey(Q,Y);if(X){$[X]=NJ(J),delete $[Y];return}let m=c?RV(Y):String(Y).trim();if(m!==Y)delete $[Y];$[m]=NJ(J),Q[m]=!0}),this}concat(...c){return this.constructor.concat(this,...c)}toJSON(c){let $=Object.create(null);return V.forEach(this,(Q,J)=>{Q!=null&&Q!==!1&&($[J]=c&&V.isArray(Q)?Q.join(", "):Q)}),$}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([c,$])=>c+": "+$).join(`
21
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(c){return c instanceof this?c:new this(c)}static concat(c,...$){let Q=new this(c);return $.forEach((J)=>Q.set(J)),Q}static accessor(c){let Q=(this[EW]=this[EW]={accessors:{}}).accessors,J=this.prototype;function Y(X){let m=XQ(X);if(!Q[m])IV(J,X),Q[m]=!0}return V.isArray(c)?c.forEach(Y):Y(c),this}}mQ.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(mQ.prototype,({value:c},$)=>{let Q=$[0].toUpperCase()+$.slice(1);return{get:()=>c,set(J){this[Q]=J}}});V.freezeMethods(mQ);var Ic=mQ;var LV="[REDACTED ****]";function ZV(c){if(V.hasOwnProp(c,"toJSON"))return!0;let $=Object.getPrototypeOf(c);while($&&$!==Object.prototype){if(V.hasOwnProp($,"toJSON"))return!0;$=Object.getPrototypeOf($)}return!1}function _V(c,$){let Q=new Set($.map((X)=>String(X).toLowerCase())),J=[],Y=(X)=>{if(X===null||typeof X!=="object")return X;if(V.isBuffer(X))return X;if(J.indexOf(X)!==-1)return;if(X instanceof Ic)X=X.toJSON();J.push(X);let m;if(V.isArray(X))m=[],X.forEach((W,G)=>{let z=Y(W);if(!V.isUndefined(z))m[G]=z});else{if(!V.isPlainObject(X)&&ZV(X))return J.pop(),X;m=Object.create(null);for(let[W,G]of Object.entries(X)){let z=Q.has(W.toLowerCase())?LV:Y(G);if(!V.isUndefined(z))m[W]=z}}return J.pop(),m};return Y(c)}class kc extends Error{static from(c,$,Q,J,Y,X){let m=new kc(c.message,$||c.code,Q,J,Y);if(m.cause=c,m.name=c.name,c.status!=null&&m.status==null)m.status=c.status;return X&&Object.assign(m,X),m}constructor(c,$,Q,J,Y){super(c);if(Object.defineProperty(this,"message",{__proto__:null,value:c,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,$&&(this.code=$),Q&&(this.config=Q),J&&(this.request=J),Y)this.response=Y,this.status=Y.status}toJSON(){let c=this.config,$=c&&V.hasOwnProp(c,"redact")?c.redact:void 0,Q=V.isArray($)&&$.length>0?_V(c,$):V.toJSONObject(c);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:Q,code:this.code,status:this.status}}}kc.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE";kc.ERR_BAD_OPTION="ERR_BAD_OPTION";kc.ECONNABORTED="ECONNABORTED";kc.ETIMEDOUT="ETIMEDOUT";kc.ECONNREFUSED="ECONNREFUSED";kc.ERR_NETWORK="ERR_NETWORK";kc.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS";kc.ERR_DEPRECATED="ERR_DEPRECATED";kc.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE";kc.ERR_BAD_REQUEST="ERR_BAD_REQUEST";kc.ERR_CANCELED="ERR_CANCELED";kc.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT";kc.ERR_INVALID_URL="ERR_INVALID_URL";kc.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";var O=kc;var n7=hY(f7(),1),RJ=n7.default;var DX=100;function KX(c){return V.isPlainObject(c)||V.isArray(c)}function u7(c){return V.endsWith(c,"[]")?c.slice(0,-2):c}function jX(c,$,Q){if(!c)return $;return c.concat($).map(function(Y,X){return Y=u7(Y),!Q&&X?"["+Y+"]":Y}).join(Q?".":"")}function jw(c){return V.isArray(c)&&!c.some(KX)}var Kw=V.toFlatObject(V,{},null,function($){return/^is[A-Z]/.test($)});function Dw(c,$,Q){if(!V.isObject(c))throw TypeError("target must be an object");$=$||new(RJ||FormData),Q=V.toFlatObject(Q,{metaTokens:!0,dots:!1,indexes:!1},!1,function(j,D){return!V.isUndefined(D[j])});let J=Q.metaTokens,Y=Q.visitor||N,X=Q.dots,m=Q.indexes,W=Q.Blob||typeof Blob<"u"&&Blob,G=Q.maxDepth===void 0?DX:Q.maxDepth,z=W&&V.isSpecCompliantForm($),x=[];if(!V.isFunction(Y))throw TypeError("visitor must be a function");function i(w){if(w===null)return"";if(V.isDate(w))return w.toISOString();if(V.isBoolean(w))return w.toString();if(!z&&V.isBlob(w))throw new O("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(w)||V.isTypedArray(w))return z&&typeof Blob==="function"?new Blob([w]):Buffer.from(w);return w}function q(w){if(w>G)throw new O("Object is too deeply nested ("+w+" levels). Max depth: "+G,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function M(w,j){if(G===1/0)return JSON.stringify(w);let D=[];return JSON.stringify(w,function(Xc,g){if(!V.isObject(g))return g;while(D.length&&D[D.length-1]!==this)D.pop();return D.push(g),q(j+D.length-1),g})}function N(w,j,D){let _=w;if(V.isReactNative($)&&V.isReactNativeBlob(w))return $.append(jX(D,j,X),i(w)),!1;if(w&&!D&&typeof w==="object"){if(V.endsWith(j,"{}"))j=J?j:j.slice(0,-2),w=M(w,1);else if(V.isArray(w)&&jw(w)||(V.isFileList(w)||V.endsWith(j,"[]"))&&(_=V.toArray(w)))return j=u7(j),_.forEach(function(g,Qc){!(V.isUndefined(g)||g===null)&&$.append(m===!0?jX([j],Qc,X):m===null?j:j+"[]",i(g))}),!1}if(KX(w))return!0;return $.append(jX(D,j,X),i(w)),!1}let v=Object.assign(Kw,{defaultVisitor:N,convertValue:i,isVisitable:KX});function U(w,j,D=0){if(V.isUndefined(w))return;if(q(D),x.indexOf(w)!==-1)throw Error("Circular reference detected in "+j.join("."));x.push(w),V.forEach(w,function(Xc,g){if((!(V.isUndefined(Xc)||Xc===null)&&Y.call($,Xc,V.isString(g)?g.trim():g,j,v))===!0)U(Xc,j?j.concat(g):[g],D+1)}),x.pop()}if(!V.isObject(c))throw TypeError("data must be an object");return U(c),$}var q8=Dw;function a7(c){let $={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(c).replace(/[!'()~]|%20/g,function(J){return $[J]})}function k7(c,$){this._pairs=[],c&&q8(c,this,$)}var l7=k7.prototype;l7.append=function($,Q){this._pairs.push([$,Q])};l7.toString=function($){let Q=$?function(J){return $.call(this,J,a7)}:a7;return this._pairs.map(function(Y){return Q(Y[0])+"="+Q(Y[1])},"").join("&")};var h7=k7;function Bw(c){return encodeURIComponent(c).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function b8(c,$,Q){if(!$)return c;let J=V.isFunction(Q)?{serialize:Q}:Q,Y=V.getSafeProp(J,"encode")||Bw,X=V.getSafeProp(J,"serialize"),m;if(X)m=X($,J);else m=V.isURLSearchParams($)?$.toString():new h7($,J).toString(Y);if(m){let W=c.indexOf("#");if(W!==-1)c=c.slice(0,W);c+=(c.indexOf("?")===-1?"?":"&")+m}return c}class y7{constructor(){this.handlers=[]}use(c,$,Q){return this.handlers.push({fulfilled:c,rejected:$,synchronous:Q?Q.synchronous:!1,runWhen:Q?Q.runWhen:null}),this.handlers.length-1}eject(c){if(this.handlers[c])this.handlers[c]=null}clear(){if(this.handlers)this.handlers=[]}forEach(c){V.forEach(this.handlers,function(Q){if(Q!==null)c(Q)})}}var BX=y7;var M8={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0};import Ow from"crypto";import Hw from"url";var o7=Hw.URLSearchParams;var HX="abcdefghijklmnopqrstuvwxyz",g7="0123456789",d7={DIGIT:g7,ALPHA:HX,ALPHA_DIGIT:HX+HX.toUpperCase()+g7},pw=(c=16,$=d7.ALPHA_DIGIT)=>{let Q="",{length:J}=$,Y=new Uint32Array(c);Ow.randomFillSync(Y);for(let X=0;X<c;X++)Q+=$[Y[X]%J];return Q},s7={isNode:!0,classes:{URLSearchParams:o7,FormData:RJ,Blob:typeof Blob<"u"&&Blob||null},ALPHABET:d7,generateString:pw,protocols:["http","https","file","data"]};var RX={};yY(RX,{origin:()=>Lw,navigator:()=>OX,hasStandardBrowserWebWorkerEnv:()=>Iw,hasStandardBrowserEnv:()=>Rw,hasBrowserEnv:()=>pX});var pX=typeof window<"u"&&typeof document<"u",OX=typeof navigator==="object"&&navigator||void 0,Rw=pX&&(!OX||["ReactNative","NativeScript","NS"].indexOf(OX.product)<0),Iw=(()=>{return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts==="function"})(),Lw=pX&&window.location.href||"http://localhost";var Dc={...RX,...s7};function IX(c,$){return q8(c,new Dc.classes.URLSearchParams,{visitor:function(Q,J,Y,X){if(Dc.isNode&&V.isBuffer(Q))return this.append(J,Q.toString("base64")),!1;return X.defaultVisitor.apply(this,arguments)},...$})}var r7=DX;function t7(c){if(c>r7)throw new O("FormData field is too deeply nested ("+c+" levels). Max depth: "+r7,O.ERR_FORM_DATA_DEPTH_EXCEEDED)}function Zw(c){let $=[],Q=/\w+|\[(\w*)]/g,J;while((J=Q.exec(c))!==null)t7($.length),$.push(J[0]==="[]"?"":J[1]||J[0]);return $}function _w(c){let $={},Q=Object.keys(c),J,Y=Q.length,X;for(J=0;J<Y;J++)X=Q[J],$[X]=c[X];return $}function Sw(c){function $(Q,J,Y,X){t7(X);let m=Q[X++];if(m==="__proto__")return!0;let W=Number.isFinite(+m),G=X>=Q.length;if(m=!m&&V.isArray(Y)?Y.length:m,G){if(V.hasOwnProp(Y,m))Y[m]=V.isArray(Y[m])?Y[m].concat(J):[Y[m],J];else Y[m]=J;return!W}if(!V.hasOwnProp(Y,m)||!V.isObject(Y[m]))Y[m]=[];if($(Q,J,Y[m],X)&&V.isArray(Y[m]))Y[m]=_w(Y[m]);return!W}if(V.isFormData(c)&&V.isFunction(c.entries)){let Q={};return V.forEachEntry(c,(J,Y)=>{$(Zw(J),Y,Q,0)}),Q}return null}var IJ=Sw;var w$=(c,$)=>c!=null&&V.hasOwnProp(c,$)?c[$]:void 0;function Aw(c,$,Q){if(V.isString(c))try{return($||JSON.parse)(c),V.trim(c)}catch(J){if(J.name!=="SyntaxError")throw J}return(Q||JSON.stringify)(c)}var LX={transitional:M8,adapter:["xhr","http","fetch"],transformRequest:[function($,Q){let J=Q.getContentType()||"",Y=J.indexOf("application/json")>-1,X=V.isObject($);if(X&&V.isHTMLForm($))$=new FormData($);if(V.isFormData($))return Y?JSON.stringify(IJ($)):$;if(V.isArrayBuffer($)||V.isBuffer($)||V.isStream($)||V.isFile($)||V.isBlob($)||V.isReadableStream($))return $;if(V.isArrayBufferView($))return $.buffer;if(V.isURLSearchParams($))return Q.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),$.toString();let W;if(X){let G=w$(this,"formSerializer");if(J.indexOf("application/x-www-form-urlencoded")>-1)return IX($,G).toString();if((W=V.isFileList($))||J.indexOf("multipart/form-data")>-1){let z=w$(this,"env"),x=z&&z.FormData;return q8(W?{"files[]":$}:$,x&&new x,G)}}if(X||Y)return Q.setContentType("application/json",!1),Aw($);return $}],transformResponse:[function($){let Q=w$(this,"transitional")||LX.transitional,J=Q&&Q.forcedJSONParsing,Y=w$(this,"responseType"),X=Y==="json";if(V.isResponse($)||V.isReadableStream($))return $;if($&&V.isString($)&&(J&&!Y||X)){let W=!(Q&&Q.silentJSONParsing)&&X;try{return JSON.parse($,w$(this,"parseReviver"))}catch(G){if(W){if(G.name==="SyntaxError")throw O.from(G,O.ERR_BAD_RESPONSE,this,null,w$(this,"response"));throw G}}}return $}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Dc.classes.FormData,Blob:Dc.classes.Blob},validateStatus:function($){return $>=200&&$<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch","query"],(c)=>{LX.headers[c]={}});var v$=LX;function iQ(c,$){let Q=this||v$,J=$||Q,Y=Ic.from(J.headers),X=J.data;return V.forEach(c,function(W){X=W.call(Q,X,Y.normalize(),$?$.status:void 0)}),Y.normalize(),X}function qQ(c){return!!(c&&c.__CANCEL__)}class e7 extends O{constructor(c,$,Q){super(c==null?"canceled":c,O.ERR_CANCELED,$,Q);this.name="CanceledError",this.__CANCEL__=!0}}var x0=e7;function u0(c,$,Q){let J=Q.config.validateStatus;if(!Q.status||!J||J(Q.status))c(Q);else $(new O("Request failed with status code "+Q.status,Q.status>=400&&Q.status<500?O.ERR_BAD_REQUEST:O.ERR_BAD_RESPONSE,Q.config,Q.request,Q))}function ZX(c){if(typeof c!=="string")return!1;return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(c)}function _X(c,$){return $?c.replace(/\/?\/$/,"")+"/"+$.replace(/^\/+/,""):c}var Cw=/^https?:(?!\/\/)/i,Pw=/[\t\n\r]/g;function bw(c){let $=0;while($<c.length&&c.charCodeAt($)<=32)$++;return c.slice($)}function Ew(c){return bw(c).replace(Pw,"")}function cz(c,$){if(typeof c==="string"&&Cw.test(Ew(c)))throw new O('Invalid URL: missing "//" after protocol',O.ERR_INVALID_URL,$)}function E8(c,$,Q,J){cz($,J);let Y=!ZX($);if(c&&(Y||Q===!1))return cz(c,J),_X(c,$);return $}var Fw={ftp:21,gopher:70,http:80,https:443,ws:80,wss:443};function Tw(c){try{return new URL(c)}catch{return null}}function $z(c){var $=(typeof c==="string"?Tw(c):c)||{},Q=$.protocol,J=$.host,Y=$.port;if(typeof J!=="string"||!J||typeof Q!=="string")return"";if(Q=Q.split(":",1)[0],J=J.replace(/:\d*$/,""),Y=parseInt(Y)||Fw[Q]||0,!fw(J,Y))return"";var X=SX(Q+"_proxy")||SX("all_proxy");if(X&&X.indexOf("://")===-1)X=Q+"://"+X;return X}function fw(c,$){var Q=SX("no_proxy").toLowerCase();if(!Q)return!0;if(Q==="*")return!1;return Q.split(/[,\s]/).every(function(J){if(!J)return!0;var Y=J.match(/^(.+):(\d+)$/),X=Y?Y[1]:J,m=Y?parseInt(Y[2]):0;if(m&&m!==$)return!0;if(!/^[.*]/.test(X))return c!==X;if(X.charAt(0)==="*")X=X.slice(1);return!c.endsWith(X)})}function SX(c){return process.env[c.toLowerCase()]||process.env[c.toUpperCase()]||""}var Y9=hY(Iz(),1),J5=hY(Pz(),1);import Rv from"http";import Iv from"https";import Lv from"http2";import Zv from"util";import{resolve as dz}from"path";import U0 from"zlib";var o0="1.18.0";function HQ(c){let $=/^([-+\w]{1,25}):(?:\/\/)?/.exec(c);return $&&$[1]||""}var Qv=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;function eX(c,$,Q){let J=Q&&Q.Blob||Dc.classes.Blob,Y=HQ(c);if($===void 0&&J)$=!0;if(Y==="data"){c=Y.length?c.slice(Y.length+1):c;let X=Qv.exec(c);if(!X)throw new O("Invalid URL",O.ERR_INVALID_URL);let m=X[1],W=X[2],G=X[3]?"base64":"utf8",z=X[4],x;if(m)x=W?m+W:m;else if(W)x="text/plain"+W;let i=Buffer.from(decodeURIComponent(z),G);if($){if(!J)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new J([i],{type:x})}return i}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}import Z0 from"stream";import Jv from"stream";var c9=Symbol("internals");class bz extends Jv.Transform{constructor(c){c=V.toFlatObject(c,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(Q,J)=>{return!V.isUndefined(J[Q])});super({readableHighWaterMark:c.chunkSize});let $=this[c9]={timeWindow:c.timeWindow,chunkSize:c.chunkSize,maxRate:c.maxRate,minChunkSize:c.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(Q)=>{if(Q==="progress"){if(!$.isCaptured)$.isCaptured=!0}})}_read(c){let $=this[c9];if($.onReadCallback)$.onReadCallback();return super._read(c)}_transform(c,$,Q){let J=this[c9],Y=J.maxRate,X=this.readableHighWaterMark,m=J.timeWindow,W=1000/m,G=Y/W,z=J.minChunkSize!==!1?Math.max(J.minChunkSize,G*0.01):0,x=(q,M)=>{let N=Buffer.byteLength(q);if(J.bytesSeen+=N,J.bytes+=N,J.isCaptured&&this.emit("progress",J.bytesSeen),this.push(q))process.nextTick(M);else J.onReadCallback=()=>{J.onReadCallback=null,process.nextTick(M)}},i=(q,M)=>{let N=Buffer.byteLength(q),v=null,U=X,w,j=0;if(Y){let D=Date.now();if(!J.ts||(j=D-J.ts)>=m)J.ts=D,w=G-J.bytes,J.bytes=w<0?-w:0,j=0;w=G-J.bytes}if(Y){if(w<=0)return setTimeout(()=>{M(null,q)},m-j);if(w<U)U=w}if(U&&N>U&&N-U>z)v=q.subarray(U),q=q.subarray(0,U);x(q,v?()=>{process.nextTick(M,null,v)}:M)};i(c,function q(M,N){if(M)return Q(M);if(N)i(N,q);else Q(null)})}}var $9=bz;import{EventEmitter as _v}from"events";import Xv from"util";import{Readable as mv}from"stream";var{asyncIterator:Ez}=Symbol,Yv=async function*(c){if(c.stream)yield*c.stream();else if(c.arrayBuffer)yield await c.arrayBuffer();else if(c[Ez])yield*c[Ez]();else yield c},CJ=Yv;var Wv=Dc.ALPHABET.ALPHA_DIGIT+"-_",OQ=typeof TextEncoder==="function"?new TextEncoder:new Xv.TextEncoder,a8=`\r
22
- `,Gv=OQ.encode(a8),zv=2;class Fz{constructor(c,$){let{escapeName:Q}=this.constructor,J=V.isString($),Y=`Content-Disposition: form-data; name="${Q(c)}"${!J&&$.name?`; filename="${Q($.name)}"`:""}${a8}`;if(J)$=OQ.encode(String($).replace(/\r?\n|\r\n?/g,a8));else{let X=String($.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${X}${a8}`}this.headers=OQ.encode(Y+a8),this.contentLength=J?$.byteLength:$.size,this.size=this.headers.byteLength+this.contentLength+zv,this.name=c,this.value=$}async*encode(){yield this.headers;let{value:c}=this;if(V.isTypedArray(c))yield c;else yield*CJ(c);yield Gv}static escapeName(c){return String(c).replace(/[\r\n"]/g,($)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[$])}}var xv=(c,$,Q)=>{let{tag:J="form-data-boundary",size:Y=25,boundary:X=J+"-"+Dc.generateString(Y,Wv)}=Q||{};if(!V.isFormData(c))throw TypeError("FormData instance required");if(X.length<1||X.length>70)throw Error("boundary must be 1-70 characters long");let m=OQ.encode("--"+X+a8),W=OQ.encode("--"+X+"--"+a8),G=W.byteLength,z=Array.from(c.entries()).map(([i,q])=>{let M=new Fz(i,q);return G+=M.size,M});G+=m.byteLength*z.length,G=V.toFiniteNumber(G);let x={"Content-Type":`multipart/form-data; boundary=${X}`};if(Number.isFinite(G))x["Content-Length"]=G;return $&&$(x),mv.from(async function*(){for(let i of z)yield m,yield*i.encode();yield W}())},Tz=xv;import iv from"stream";class fz extends iv.Transform{__transform(c,$,Q){this.push(c),Q()}_transform(c,$,Q){if(c.length!==0){if(this._transform=this.__transform,c[0]!==120){let J=Buffer.alloc(2);J[0]=120,J[1]=156,this.push(J,$)}}this.__transform(c,$,Q)}}var nz=fz;import qv from"http2";import Mv from"util";class uz{constructor(){this.sessions=Object.create(null)}getSession(c,$){$=Object.assign({sessionTimeout:1000},$);let Q=this.sessions[c];if(Q){let x=Q.length;for(let i=0;i<x;i++){let[q,M]=Q[i];if(!q.destroyed&&!q.closed&&Mv.isDeepStrictEqual(M,$))return q}}let J=qv.connect(c,$),Y,X,m=()=>{if(Y)return;if(Y=!0,X)clearTimeout(X),X=null;let x=Q,i=x.length,q=i;while(q--)if(x[q][0]===J){if(i===1)delete this.sessions[c];else x.splice(q,1);if(!J.closed)J.close();return}},W=J.request,{sessionTimeout:G}=$;if(G!=null){let x=0;J.request=function(){let i=W.apply(this,arguments);if(x++,X)clearTimeout(X),X=null;return i.once("close",()=>{if(!--x)X=setTimeout(()=>{X=null,m()},G)}),i}}J.once("close",m);let z=[J,$];return Q?Q.push(z):Q=this.sessions[c]=[z],J}}var az=uz;var Vv=(c,$)=>{return V.isAsyncFn(c)?function(...Q){let J=Q.pop();c.apply(this,Q).then((Y)=>{try{$?J(null,...$(Y)):J(null,Y)}catch(X){J(X)}},J)}:c},kz=Vv;var Nv=new Set(["localhost","0.0.0.0"]),yz=(c)=>{let $=c.split(".");if($.length!==4)return!1;if($[0]!=="127")return!1;return $.every((Q)=>/^\d+$/.test(Q)&&Number(Q)>=0&&Number(Q)<=255)},Q9=(c)=>/^0{1,4}$/.test(c),wv=(c)=>{if(c==="::")return!0;let $=c.indexOf("::");if($!==-1){if($!==c.lastIndexOf("::"))return!1;let J=c.slice(0,$),Y=c.slice($+2),X=J?J.split(":"):[],m=Y?Y.split(":"):[];return X.length+m.length<8&&X.every(Q9)&&m.every(Q9)}let Q=c.split(":");return Q.length===8&&Q.every(Q9)},vv=(c)=>{if(c==="::1")return!0;let $=c.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if($)return yz($[1]);let Q=c.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(Q){let Y=parseInt(Q[1],16);return Y>=32512&&Y<=32767}let J=c.split(":");if(J.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(J[Y]))return!1;return/^0*1$/.test(J[7])}return!1},lz=(c)=>{if(!c)return!1;if(Nv.has(c))return!0;if(yz(c))return!0;if(wv(c))return!0;return vv(c)},Uv={http:80,https:443,ws:80,wss:443,ftp:21},jv=(c)=>{let $=c,Q=0;if($.charAt(0)==="["){let X=$.indexOf("]");if(X!==-1){let m=$.slice(1,X),W=$.slice(X+1);if(W.charAt(0)===":"&&/^\d+$/.test(W.slice(1)))Q=Number.parseInt(W.slice(1),10);return[m,Q]}}let J=$.indexOf(":"),Y=$.lastIndexOf(":");if(J!==-1&&J===Y&&/^\d+$/.test($.slice(Y+1)))Q=Number.parseInt($.slice(Y+1),10),$=$.slice(0,Y);return[$,Q]},Kv=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,Dv=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i,Bv=(c)=>{if(typeof c!=="string"||c.indexOf(":")===-1)return c;let $=c.match(Kv);if($)return $[1];let Q=c.match(Dv);if(Q){let J=parseInt(Q[1],16),Y=parseInt(Q[2],16);return`${J>>8}.${J&255}.${Y>>8}.${Y&255}`}return c},hz=(c)=>{if(!c)return c;if(c.charAt(0)==="["&&c.charAt(c.length-1)==="]")c=c.slice(1,-1);return Bv(c.replace(/\.+$/,""))};function J9(c){let $;try{$=new URL(c)}catch(X){return!1}let Q=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!Q)return!1;if(Q==="*")return!0;let J=Number.parseInt($.port,10)||Uv[$.protocol.split(":",1)[0]]||0,Y=hz($.hostname.toLowerCase());return Q.split(/[\s,]+/).some((X)=>{if(!X)return!1;let[m,W]=jv(X);if(m=hz(m),!m)return!1;if(W&&W!==J)return!1;if(m.charAt(0)==="*")m=m.slice(1);if(m.charAt(0)===".")return Y.endsWith(m);return Y===m||lz(Y)&&lz(m)})}function Hv(c,$){c=c||10;let Q=Array(c),J=Array(c),Y=0,X=0,m;return $=$!==void 0?$:1000,function(G){let z=Date.now(),x=J[X];if(!m)m=z;Q[Y]=G,J[Y]=z;let i=X,q=0;while(i!==Y)q+=Q[i++],i=i%c;if(Y=(Y+1)%c,Y===X)X=(X+1)%c;if(z-m<$)return;let M=x&&z-x;return M?Math.round(q*1000/M):void 0}}var oz=Hv;function Ov(c,$){let Q=0,J=1000/$,Y,X,m=(z,x=Date.now())=>{if(Q=x,Y=null,X)clearTimeout(X),X=null;c(...z)};return[(...z)=>{let x=Date.now(),i=x-Q;if(i>=J)m(z,x);else if(Y=z,!X)X=setTimeout(()=>{X=null,m(Y)},J-i)},()=>Y&&m(Y)]}var gz=Ov;var g0=(c,$,Q=3)=>{let J=0,Y=oz(50,250);return gz((X)=>{if(!X||typeof X.loaded!=="number")return;let m=X.loaded,W=X.lengthComputable?X.total:void 0,G=W!=null?Math.min(m,W):m,z=Math.max(0,G-J),x=Y(z);J=Math.max(J,G);let i={loaded:G,total:W,progress:W?G/W:void 0,bytes:z,rate:x?x:void 0,estimated:x&&W?(W-G)/x:void 0,event:X,lengthComputable:W!=null,[$?"download":"upload"]:!0};c(i)},Q)},B$=(c,$)=>{let Q=c!=null;return[(J)=>$[0]({lengthComputable:Q,total:c,loaded:J}),$[1]]},H$=(c)=>(...$)=>V.asap(()=>c(...$));var PJ=(c)=>c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102,pv=(c,$,Q)=>$+2<Q&&PJ(c.charCodeAt($+1))&&PJ(c.charCodeAt($+2));function pQ(c){if(!c||typeof c!=="string")return 0;if(!c.startsWith("data:"))return 0;let $=c.indexOf(",");if($<0)return 0;let Q=c.slice(5,$),J=c.slice($+1);if(/;base64/i.test(Q)){let{length:m,length:W}=J;for(let M=0;M<W;M++)if(J.charCodeAt(M)===37&&M+2<W){let N=J.charCodeAt(M+1),v=J.charCodeAt(M+2);if(PJ(N)&&PJ(v))m-=2,M+=2}let G=0,z=W-1,x=(M)=>M>=2&&J.charCodeAt(M-2)===37&&J.charCodeAt(M-1)===51&&(J.charCodeAt(M)===68||J.charCodeAt(M)===100);if(z>=0){if(J.charCodeAt(z)===61)G++,z--;else if(x(z))G++,z-=3}if(G===1&&z>=0){if(J.charCodeAt(z)===61)G++;else if(x(z))G++}let q=Math.floor(m/4)*3-(G||0);return q>0?q:0}let X=0;for(let m=0,W=J.length;m<W;m++){let G=J.charCodeAt(m);if(G===37&&pv(J,m,W))X+=1,m+=2;else if(G<128)X+=1;else if(G<2048)X+=2;else if(G>=55296&&G<=56319&&m+1<W){let z=J.charCodeAt(m+1);if(z>=56320&&z<=57343)X+=4,m++;else X+=3}else X+=3}return X}var sz={flush:U0.constants.Z_SYNC_FLUSH,finishFlush:U0.constants.Z_SYNC_FLUSH},Sv={flush:U0.constants.BROTLI_OPERATION_FLUSH,finishFlush:U0.constants.BROTLI_OPERATION_FLUSH},Av={flush:U0.constants.ZSTD_e_flush,finishFlush:U0.constants.ZSTD_e_flush},Y5=V.isFunction(U0.createBrotliDecompress),X5=V.isFunction(U0.createZstdDecompress),m5="gzip, compress, deflate"+(Y5?", br":""),Cv=m5+(X5?", zstd":""),{http:Pv,https:bv}=J5.default,W5=/https:?/,Ev=["content-type","content-length"];function Fv(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(Ev.includes(J.toLowerCase()))c.set(J,Y)})}var rz=Symbol("axios.http.socketListener"),bJ=Symbol("axios.http.currentReq"),G5=Symbol("axios.http.installedTunnel"),Tv=new Map,tz=new WeakMap;function fv(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||"")+"#"+(c.auth||""),J=$?tz.get($)||tz.set($,new Map).get($):Tv,Y=J.get(Q);if(Y)return Y;let X=$&&$.options?{...$.options,...c}:c;if(Y=new Y9.default(X),$&&$.options){let m={...$.options},W=Y.callback;Y.callback=function(z,x){return W.call(this,z,{...m,...x})}}return Y[G5]=!0,J.set(Q,Y),Y}var ez=Dc.protocols.map((c)=>{return c+":"}),c5=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},$5=(c,[$,Q])=>{return c.on("end",Q).on("error",Q),$},nv=new az;function uv(c,$,Q){if(c.beforeRedirects.proxy)c.beforeRedirects.proxy(c);if(c.beforeRedirects.auth)c.beforeRedirects.auth(c);if(c.beforeRedirects.sensitiveHeaders)c.beforeRedirects.sensitiveHeaders(c,Q);if(c.beforeRedirects.config)c.beforeRedirects.config(c,$,Q)}function av(c,$){if(!c)return;Object.keys(c).forEach((Q)=>{if($.has(Q.toLowerCase()))delete c[Q]})}function kv(c,$){if(!$)return!1;try{return new URL($.url).origin===new URL(c.href).origin}catch(Q){return!1}}function z5(c,$,Q,J,Y){let X=$;if(!X&&X!==!1){let m=$z(Q);if(m){if(!J9(Q))X=new URL(m)}}if(J&&c.headers){for(let m of Object.keys(c.headers))if(m.toLowerCase()==="proxy-authorization")delete c.headers[m]}if(J&&c.agent&&c.agent[G5])c.agent=void 0;if(X){let m=X instanceof URL,W=(q)=>m||V.hasOwnProp(X,q)?X[q]:void 0,G=W("username"),z=W("password"),x=V.hasOwnProp(X,"auth")?X.auth:void 0;if(G)x=(G||"")+":"+(z||"");if(x){let q=typeof x==="object",M=q&&V.hasOwnProp(x,"username")?x.username:void 0,N=q&&V.hasOwnProp(x,"password")?x.password:void 0;if(Boolean(M||N))x=(M||"")+":"+(N||"");else if(q)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:X})}if(W5.test(c.protocol)){if(!(Y instanceof Y9.default)){let q=W("hostname")||W("host"),M=W("port"),N=W("protocol"),v=N?N.includes(":")?N:`${N}:`:"http:",U=q&&q.includes(":")&&!q.startsWith("[")?`[${q}]`:q,w=new URL(`${v}//${U}${M?":"+M:""}`),j={protocol:w.protocol,hostname:w.hostname.replace(/^\[|\]$/g,""),port:w.port,auth:x&&typeof x==="string"?x:void 0};if(w.protocol==="https:")j.ALPNProtocols=["http/1.1"];let D=fv(j,Y);if(c.agent=D,c.agents)c.agents.https=D}}else{if(x){let v=Buffer.from(x,"utf8").toString("base64");c.headers["Proxy-Authorization"]="Basic "+v}let q=!1;for(let v of Object.keys(c.headers))if(v.toLowerCase()==="host"){q=!0;break}if(!q)c.headers.host=c.hostname+(c.port?":"+c.port:"");let M=W("hostname")||W("host");c.hostname=M,c.host=M,c.port=W("port"),c.path=Q;let N=W("protocol");if(N)c.protocol=N.includes(":")?N:`${N}:`}}c.beforeRedirects.proxy=function(W){z5(W,$,W.href,!0,Y)}}var lv=typeof process<"u"&&V.kindOf(process)==="process",hv=(c)=>{return new Promise(($,Q)=>{let J,Y,X=(G,z)=>{if(Y)return;Y=!0,J&&J(G,z)},m=(G)=>{X(G),$(G)},W=(G)=>{X(G,!0),Q(G)};c(m,W,(G)=>J=G).catch(W)})},yv=({address:c,family:$})=>{if(!V.isString(c))throw TypeError("address must be a string");return{address:c,family:$||(c.indexOf(".")<0?6:4)}},Q5=(c,$)=>yv(V.isObject(c)?c:{address:c,family:$}),ov={request(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||(c.protocol==="https:"?443:80)),{http2Options:J,headers:Y}=c,X=nv.getSession(Q,J),{HTTP2_HEADER_SCHEME:m,HTTP2_HEADER_METHOD:W,HTTP2_HEADER_PATH:G,HTTP2_HEADER_STATUS:z}=Lv.constants,x={[m]:c.protocol.replace(":",""),[W]:c.method,[G]:c.path};V.forEach(Y,(q,M)=>{M.charAt(0)!==":"&&(x[M]=q)});let i=X.request(x);return i.once("response",(q)=>{let M=i;q=Object.assign({},q);let N=q[z];delete q[z],M.headers=q,M.statusCode=+N,$(M)}),i}},x5=lv&&function($){return hv(async function(J,Y,X){let m=(R)=>V.getSafeProp($,R),W=m("transitional")||M8,G=m("data"),z=m("lookup"),x=m("family"),i=m("httpVersion");if(i===void 0)i=1;let q=m("http2Options"),M=m("responseType"),N=m("responseEncoding"),v=m("httpAgent"),U=m("httpsAgent"),w=m("method").toUpperCase(),j=m("maxRedirects"),D=m("maxBodyLength"),_=m("maxContentLength"),Xc=m("decompress"),g,Qc=!1,u,k;if(i=+i,Number.isNaN(i))throw TypeError(`Invalid protocol version: '${$.httpVersion}' is not a number`);if(i!==1&&i!==2)throw TypeError(`Unsupported protocol version '${i}'`);let Yc=i===2;if(z){let R=kz(z,(T)=>V.isArray(T)?T:[T]);z=(T,Gc,pc)=>{R(T,Gc,(qc,Ec,Ac)=>{if(qc)return pc(qc);let Pc=V.isArray(Ec)?Ec.map((m$)=>Q5(m$)):[Q5(Ec,Ac)];Gc.all?pc(qc,Pc):pc(qc,Pc[0].address,Pc[0].family)})}}let t=new _v;function B(R){try{t.emit("abort",!R||R.type?new x0(null,$,u):R)}catch(T){}}function C(){if(k)clearTimeout(k),k=null}function K(){let R=m("timeout"),T=R?"timeout of "+R+"ms exceeded":"timeout exceeded",Gc=m("timeoutErrorMessage");if(Gc)T=Gc;return new O(T,W.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,u)}t.once("abort",Y);let p=()=>{if(C(),$.cancelToken)$.cancelToken.unsubscribe(B);if($.signal)$.signal.removeEventListener("abort",B);t.removeAllListeners()};if($.cancelToken||$.signal){if($.cancelToken&&$.cancelToken.subscribe(B),$.signal)$.signal.aborted?B():$.signal.addEventListener("abort",B)}X((R,T)=>{if(g=!0,C(),T){Qc=!0,p();return}let{data:Gc}=R;if(Gc instanceof Z0.Readable||Gc instanceof Z0.Duplex){let pc=Z0.finished(Gc,()=>{pc(),p()})}else p()});let S=E8(m("baseURL"),m("url"),m("allowAbsoluteUrls"),$),L=new URL(S,Dc.hasBrowserEnv?Dc.origin:void 0),H=L.protocol||ez[0];if(H==="data:"){if(_>-1){let T=String(m("url")||S||"");if(pQ(T)>_)return Y(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$))}let R;if(w!=="GET")return u0(J,Y,{status:405,statusText:"method not allowed",headers:{},config:$});try{R=eX(m("url"),M==="blob",{Blob:$.env&&$.env.Blob})}catch(T){throw O.from(T,O.ERR_BAD_REQUEST,$)}if(M==="text"){if(R=R.toString(N),!N||N==="utf8")R=V.stripBOM(R)}else if(M==="stream")R=Z0.Readable.from(R);return u0(J,Y,{data:R,status:200,statusText:"OK",headers:new Ic,config:$})}if(ez.indexOf(H)===-1)return Y(new O("Unsupported protocol "+H,O.ERR_BAD_REQUEST,$));let A=Ic.from($.headers).normalize();A.set("User-Agent","axios/"+o0,!1);let{onUploadProgress:E,onDownloadProgress:P}=$,s=$.maxRate,Jc=void 0,e=void 0;if(V.isSpecCompliantForm(G)){let R=A.getContentType(/boundary=([-_\w\d]{10,70})/i);G=Tz(G,(T)=>{A.set(T)},{tag:`axios-${o0}-boundary`,boundary:R&&R[1]||void 0})}else if(V.isFormData(G)&&V.isFunction(G.getHeaders)&&G.getHeaders!==Object.prototype.getHeaders){if(Fv(A,G.getHeaders(),m("formDataHeaderPolicy")),!A.hasContentLength())try{let R=await Zv.promisify(G.getLength).call(G);Number.isFinite(R)&&R>=0&&A.setContentLength(R)}catch(R){}}else if(V.isBlob(G)||V.isFile(G))G.size&&A.setContentType(G.type||"application/octet-stream"),A.setContentLength(G.size||0),G=Z0.Readable.from(CJ(G));else if(G&&!V.isStream(G)){if(Buffer.isBuffer(G));else if(V.isArrayBuffer(G))G=Buffer.from(new Uint8Array(G));else if(V.isString(G))G=Buffer.from(G,"utf-8");else return Y(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,$));if(A.setContentLength(G.length,!1),D>-1&&G.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$))}let Hc=V.toFiniteNumber(A.getContentLength());if(V.isArray(s))Jc=s[0],e=s[1];else Jc=e=s;if(G&&(E||Jc)){if(!V.isStream(G))G=Z0.Readable.from(G,{objectMode:!1});G=Z0.pipeline([G,new $9({maxRate:V.toFiniteNumber(Jc)})],V.noop),E&&G.on("progress",$5(G,B$(Hc,g0(H$(E),!1,3))))}let o=void 0,Kc=m("auth");if(Kc){let R=V.getSafeProp(Kc,"username")||"",T=V.getSafeProp(Kc,"password")||"";o=R+":"+T}if(!o&&(L.username||L.password)){let R=c5(L.username),T=c5(L.password);o=R+":"+T}o&&A.delete("authorization");let vc;try{vc=b8(L.pathname+L.search,m("params"),m("paramsSerializer")).replace(/^\?/,"")}catch(R){let T=Error(R.message);return T.config=$,T.url=m("url"),T.exists=!0,Y(T)}A.set("Accept-Encoding",V.hasOwnProp(W,"advertiseZstdAcceptEncoding")&&W.advertiseZstdAcceptEncoding===!0?Cv:m5,!1);let xc=Object.assign(Object.create(null),{path:vc,method:w,headers:i$(A),agents:{http:v,https:U},auth:o,protocol:H,family:x,beforeRedirect:uv,beforeRedirects:Object.create(null),http2Options:q});!V.isUndefined(z)&&(xc.lookup=z);let W0=m("socketPath");if(W0){if(typeof W0!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,$));let R=m("allowedSocketPaths");if(R!=null){let T=Array.isArray(R)?R:[R],Gc=dz(W0);if(!T.some((qc)=>typeof qc==="string"&&dz(qc)===Gc))return Y(new O(`socketPath "${W0}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,$))}xc.socketPath=W0}else xc.hostname=L.hostname.startsWith("[")?L.hostname.slice(1,-1):L.hostname,xc.port=L.port,z5(xc,m("proxy"),H+"//"+L.hostname+(L.port?":"+L.port:"")+xc.path,!1,U);let G0,$0=!1,x8=!1,S8=W5.test(xc.protocol);if(xc.agent==null)xc.agent=S8?U:v;if(Yc)G0=ov;else{let R=m("transport");if(R)G0=R;else if(j===0)G0=S8?Iv:Rv,$0=!0;else{if(x8=!0,xc.sensitiveHeaders=[],j)xc.maxRedirects=j;let T=m("beforeRedirect");if(T)xc.beforeRedirects.config=T;if(o){let pc=L.origin,qc=o;xc.beforeRedirects.auth=function(Ac){try{if(new URL(Ac.href).origin===pc)Ac.auth=qc}catch(Pc){}}}let Gc=m("sensitiveHeaders");if(Gc!=null){if(!V.isArray(Gc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));let pc=new Set;for(let qc of Gc){if(!V.isString(qc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));pc.add(qc.toLowerCase())}if(pc.size)xc.sensitiveHeaders=Array.from(pc),xc.beforeRedirects.sensitiveHeaders=function(Ec,Ac){if(!kv(Ec,Ac))av(Ec.headers,pc)}}G0=S8?bv:Pv}}if(D>-1)xc.maxBodyLength=D;else xc.maxBodyLength=1/0;xc.insecureHTTPParser=Boolean(m("insecureHTTPParser")),u=G0.request(xc,function(T){if(C(),u.destroyed)return;let Gc=[T],pc=V.toFiniteNumber(T.headers["content-length"]);if(P||e){let Pc=new $9({maxRate:V.toFiniteNumber(e)});P&&Pc.on("progress",$5(Pc,B$(pc,g0(H$(P),!0,3)))),Gc.push(Pc)}let qc=T,Ec=T.req||u;if(Xc!==!1&&T.headers["content-encoding"]){if(w==="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":Gc.push(U0.createUnzip(sz)),delete T.headers["content-encoding"];break;case"deflate":Gc.push(new nz),Gc.push(U0.createUnzip(sz)),delete T.headers["content-encoding"];break;case"br":if(Y5)Gc.push(U0.createBrotliDecompress(Sv)),delete T.headers["content-encoding"];break;case"zstd":if(X5)Gc.push(U0.createZstdDecompress(Av)),delete T.headers["content-encoding"];break}}qc=Gc.length>1?Z0.pipeline(Gc,V.noop):Gc[0];let Ac={status:T.statusCode,statusText:T.statusMessage,headers:new Ic(T.headers),config:$,request:Ec};if(M==="stream"){if(_>-1){let Pc=_,m$=qc;async function*cQ(){let fc=0;for await(let HW of m$){if(fc+=HW.length,fc>Pc)throw new O("maxContentLength size of "+Pc+" exceeded",O.ERR_BAD_RESPONSE,$,Ec);yield HW}}qc=Z0.Readable.from(cQ(),{objectMode:!1})}Ac.data=qc,u0(J,Y,Ac)}else{let Pc=[],m$=0;qc.on("data",function(fc){if(Pc.push(fc),m$+=fc.length,_>-1&&m$>_)Qc=!0,qc.destroy(),B(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$,Ec))}),qc.on("aborted",function(){if(Qc)return;let fc=new O("stream has been aborted",O.ERR_BAD_RESPONSE,$,Ec,Ac);qc.destroy(fc),Y(fc)}),qc.on("error",function(fc){if(Qc)return;Y(O.from(fc,null,$,Ec,Ac))}),qc.on("end",function(){try{let fc=Pc.length===1?Pc[0]:Buffer.concat(Pc);if(M!=="arraybuffer"){if(fc=fc.toString(N),!N||N==="utf8")fc=V.stripBOM(fc)}Ac.data=fc}catch(fc){return Y(O.from(fc,null,$,Ac.request,Ac))}u0(J,Y,Ac)})}t.once("abort",(Pc)=>{if(!qc.destroyed)qc.emit("error",Pc),qc.destroy()})}),t.once("abort",(R)=>{if(u.close)u.close();else u.destroy(R)}),u.on("error",function(T){Y(O.from(T,null,$,u))});let z0=new Set;if(u.on("socket",function(T){if(T.setKeepAlive(!0,60000),!T[rz])T.on("error",function(pc){let qc=T[bJ];if(qc&&!qc.destroyed)qc.destroy(pc)}),T[rz]=!0;T[bJ]=u,z0.add(T)}),u.once("close",function(){C();for(let T of z0)if(T[bJ]===u)T[bJ]=null;z0.clear()}),m("timeout")){let R=parseInt(m("timeout"),10);if(Number.isNaN(R)){B(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,$,u));return}let T=function(){if(g)return;B(K())};if($0&&R>0)k=setTimeout(T,R);u.setTimeout(R,T)}else u.setTimeout(0);if(V.isStream(G)){let R=!1,T=!1;G.on("end",()=>{R=!0}),G.once("error",(pc)=>{T=!0,u.destroy(pc)}),G.on("close",()=>{if(!R&&!T)B(new x0("Request stream has been aborted",$,u))});let Gc=G;if(D>-1&&!x8){let pc=D,qc=0;Gc=Z0.pipeline([G,new Z0.Transform({transform(Ec,Ac,Pc){if(qc+=Ec.length,qc>pc)return Pc(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$,u));Pc(null,Ec)}})],V.noop),Gc.on("error",(Ec)=>{if(!u.destroyed)u.destroy(Ec)})}Gc.pipe(u)}else G&&u.write(G),u.end()})};var i5=Dc.hasStandardBrowserEnv?((c,$)=>(Q)=>{return Q=new URL(Q,Dc.origin),c.protocol===Q.protocol&&c.host===Q.host&&($||c.port===Q.port)})(new URL(Dc.origin),Dc.navigator&&/(msie|trident)/i.test(Dc.navigator.userAgent)):()=>!0;var q5=Dc.hasStandardBrowserEnv?{write(c,$,Q,J,Y,X,m){if(typeof document>"u")return;let W=[`${c}=${encodeURIComponent($)}`];if(V.isNumber(Q))W.push(`expires=${new Date(Q).toUTCString()}`);if(V.isString(J))W.push(`path=${J}`);if(V.isString(Y))W.push(`domain=${Y}`);if(X===!0)W.push("secure");if(V.isString(m))W.push(`SameSite=${m}`);document.cookie=W.join("; ")},read(c){if(typeof document>"u")return null;let $=document.cookie.split(";");for(let Q=0;Q<$.length;Q++){let J=$[Q].replace(/^\s+/,""),Y=J.indexOf("=");if(Y!==-1&&J.slice(0,Y)===c)return decodeURIComponent(J.slice(Y+1))}return null},remove(c){this.write(c,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}};var M5=(c)=>c instanceof Ic?{...c}:c;function _0(c,$){$=$||{};let Q=Object.create(null);Object.defineProperty(Q,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function J(x,i,q,M){if(V.isPlainObject(x)&&V.isPlainObject(i))return V.merge.call({caseless:M},x,i);else if(V.isPlainObject(i))return V.merge({},i);else if(V.isArray(i))return i.slice();return i}function Y(x,i,q,M){if(!V.isUndefined(i))return J(x,i,q,M);else if(!V.isUndefined(x))return J(void 0,x,q,M)}function X(x,i){if(!V.isUndefined(i))return J(void 0,i)}function m(x,i){if(!V.isUndefined(i))return J(void 0,i);else if(!V.isUndefined(x))return J(void 0,x)}function W(x){let i=V.hasOwnProp($,"transitional")?$.transitional:void 0;if(!V.isUndefined(i))if(V.isPlainObject(i)){if(V.hasOwnProp(i,x))return i[x]}else return;let q=V.hasOwnProp(c,"transitional")?c.transitional:void 0;if(V.isPlainObject(q)&&V.hasOwnProp(q,x))return q[x];return}function G(x,i,q){if(V.hasOwnProp($,q))return J(x,i);else if(V.hasOwnProp(c,q))return J(void 0,x)}let z={url:X,method:X,data:X,baseURL:m,transformRequest:m,transformResponse:m,paramsSerializer:m,timeout:m,timeoutMessage:m,withCredentials:m,withXSRFToken:m,adapter:m,responseType:m,xsrfCookieName:m,xsrfHeaderName:m,onUploadProgress:m,onDownloadProgress:m,decompress:m,maxContentLength:m,maxBodyLength:m,beforeRedirect:m,transport:m,httpAgent:m,httpsAgent:m,cancelToken:m,socketPath:m,allowedSocketPaths:m,responseEncoding:m,validateStatus:G,headers:(x,i,q)=>Y(M5(x),M5(i),q,!0)};if(V.forEach(Object.keys({...c,...$}),function(i){if(i==="__proto__"||i==="constructor"||i==="prototype")return;let q=V.hasOwnProp(z,i)?z[i]:Y,M=V.hasOwnProp(c,i)?c[i]:void 0,N=V.hasOwnProp($,i)?$[i]:void 0,v=q(M,N,i);V.isUndefined(v)&&q!==G||(Q[i]=v)}),V.hasOwnProp($,"validateStatus")&&V.isUndefined($.validateStatus)&&W("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(c,"validateStatus"))Q.validateStatus=J(void 0,c.validateStatus);else delete Q.validateStatus;return Q}var gv=["content-type","content-length"];function dv(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(gv.includes(J.toLowerCase()))c.set(J,Y)})}var sv=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16)));function rv(c){let $=_0({},c),Q=(q)=>V.hasOwnProp($,q)?$[q]:void 0,J=Q("data"),Y=Q("withXSRFToken"),X=Q("xsrfHeaderName"),m=Q("xsrfCookieName"),W=Q("headers"),G=Q("auth"),z=Q("baseURL"),x=Q("allowAbsoluteUrls"),i=Q("url");if($.headers=W=Ic.from(W),$.url=b8(E8(z,i,x,$),Q("params"),Q("paramsSerializer")),G){let q=V.getSafeProp(G,"username")||"",M=V.getSafeProp(G,"password")||"";W.set("Authorization","Basic "+btoa(q+":"+(M?sv(M):"")))}if(V.isFormData(J)){if(Dc.hasStandardBrowserEnv||Dc.hasStandardBrowserWebWorkerEnv||V.isReactNative(J))W.setContentType(void 0);else if(V.isFunction(J.getHeaders))dv(W,J.getHeaders(),Q("formDataHeaderPolicy"))}if(Dc.hasStandardBrowserEnv){if(V.isFunction(Y))Y=Y($);if(Y===!0||Y==null&&i5($.url)){let M=X&&m&&q5.read(m);if(M)W.set(X,M)}}return $}var EJ=rv;var tv=typeof XMLHttpRequest<"u",V5=tv&&function(c){return new Promise(function(Q,J){let Y=EJ(c),X=Y.data,m=Ic.from(Y.headers).normalize(),{responseType:W,onUploadProgress:G,onDownloadProgress:z}=Y,x,i,q,M,N;function v(){M&&M(),N&&N(),Y.cancelToken&&Y.cancelToken.unsubscribe(x),Y.signal&&Y.signal.removeEventListener("abort",x)}let U=new XMLHttpRequest;U.open(Y.method.toUpperCase(),Y.url,!0),U.timeout=Y.timeout;function w(){if(!U)return;let D=Ic.from("getAllResponseHeaders"in U&&U.getAllResponseHeaders()),Xc={data:!W||W==="text"||W==="json"?U.responseText:U.response,status:U.status,statusText:U.statusText,headers:D,config:c,request:U};u0(function(Qc){Q(Qc),v()},function(Qc){J(Qc),v()},Xc),U=null}if("onloadend"in U)U.onloadend=w;else U.onreadystatechange=function(){if(!U||U.readyState!==4)return;if(U.status===0&&!(U.responseURL&&U.responseURL.startsWith("file:")))return;setTimeout(w)};if(U.onabort=function(){if(!U)return;J(new O("Request aborted",O.ECONNABORTED,c,U)),v(),U=null},U.onerror=function(_){let Xc=_&&_.message?_.message:"Network Error",g=new O(Xc,O.ERR_NETWORK,c,U);g.event=_||null,J(g),v(),U=null},U.ontimeout=function(){let _=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",Xc=Y.transitional||M8;if(Y.timeoutErrorMessage)_=Y.timeoutErrorMessage;J(new O(_,Xc.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,c,U)),v(),U=null},X===void 0&&m.setContentType(null),"setRequestHeader"in U)V.forEach(i$(m),function(_,Xc){U.setRequestHeader(Xc,_)});if(!V.isUndefined(Y.withCredentials))U.withCredentials=!!Y.withCredentials;if(W&&W!=="json")U.responseType=Y.responseType;if(z)[q,N]=g0(z,!0),U.addEventListener("progress",q);if(G&&U.upload)[i,M]=g0(G),U.upload.addEventListener("progress",i),U.upload.addEventListener("loadend",M);if(Y.cancelToken||Y.signal){if(x=(D)=>{if(!U)return;J(!D||D.type?new x0(null,c,U):D),U.abort(),v(),U=null},Y.cancelToken&&Y.cancelToken.subscribe(x),Y.signal)Y.signal.aborted?x():Y.signal.addEventListener("abort",x)}let j=HQ(Y.url);if(j&&!Dc.protocols.includes(j)){J(new O("Unsupported protocol "+j+":",O.ERR_BAD_REQUEST,c));return}U.send(X||null)})};var ev=(c,$)=>{if(c=c?c.filter(Boolean):[],!$&&!c.length)return;let Q=new AbortController,J=!1,Y=function(G){if(!J){J=!0,m();let z=G instanceof Error?G:this.reason;Q.abort(z instanceof O?z:new x0(z instanceof Error?z.message:z))}},X=$&&setTimeout(()=>{X=null,Y(new O(`timeout of ${$}ms exceeded`,O.ETIMEDOUT))},$),m=()=>{if(!c)return;X&&clearTimeout(X),X=null,c.forEach((G)=>{G.unsubscribe?G.unsubscribe(Y):G.removeEventListener("abort",Y)}),c=null};c.forEach((G)=>G.addEventListener("abort",Y));let{signal:W}=Q;return W.unsubscribe=()=>V.asap(m),W},N5=ev;var cU=function*(c,$){let Q=c.byteLength;if(!$||Q<$){yield c;return}let J=0,Y;while(J<Q)Y=J+$,yield c.slice(J,Y),J=Y},$U=async function*(c,$){for await(let Q of QU(c))yield*cU(Q,$)},QU=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}let $=c.getReader();try{for(;;){let{done:Q,value:J}=await $.read();if(Q)break;yield J}}finally{await $.cancel()}},X9=(c,$,Q,J)=>{let Y=$U(c,$),X=0,m,W=(G)=>{if(!m)m=!0,J&&J(G)};return new ReadableStream({async pull(G){try{let{done:z,value:x}=await Y.next();if(z){W(),G.close();return}let i=x.byteLength;if(Q){let q=X+=i;Q(q)}G.enqueue(new Uint8Array(x))}catch(z){throw W(z),z}},cancel(G){return W(G),Y.return()}},{highWaterMark:2})};var w5=65536,{isFunction:FJ}=V,JU=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),v5=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},U5=(c,...$)=>{try{return!!c(...$)}catch(Q){return!1}},YU=(c)=>{let $=c.indexOf("://"),Q=c;if($!==-1)Q=Q.slice($+3);return Q.includes("@")||Q.includes(":")},XU=(c)=>{let $=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:Q,TextEncoder:J}=$;c=V.merge.call({skipUndefined:!0},{Request:$.Request,Response:$.Response},c);let{fetch:Y,Request:X,Response:m}=c,W=Y?FJ(Y):typeof fetch==="function",G=FJ(X),z=FJ(m);if(!W)return!1;let x=W&&FJ(Q),i=W&&(typeof J==="function"?((w)=>(j)=>w.encode(j))(new J):async(w)=>new Uint8Array(await new X(w).arrayBuffer())),q=G&&x&&U5(()=>{let w=!1,j=new X(Dc.origin,{body:new Q,method:"POST",get duplex(){return w=!0,"half"}}),D=j.headers.has("Content-Type");if(j.body!=null)j.body.cancel();return w&&!D}),M=z&&x&&U5(()=>V.isReadableStream(new m("").body)),N={stream:M&&((w)=>w.body)};W&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((w)=>{!N[w]&&(N[w]=(j,D)=>{let _=j&&j[w];if(_)return _.call(j);throw new O(`Response type '${w}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let v=async(w)=>{if(w==null)return 0;if(V.isBlob(w))return w.size;if(V.isSpecCompliantForm(w))return(await new X(Dc.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if(V.isArrayBufferView(w)||V.isArrayBuffer(w))return w.byteLength;if(V.isURLSearchParams(w))w=w+"";if(V.isString(w))return(await i(w)).byteLength},U=async(w,j)=>{let D=V.toFiniteNumber(w.getContentLength());return D==null?v(j):D};return async(w)=>{let{url:j,method:D,data:_,signal:Xc,cancelToken:g,timeout:Qc,onDownloadProgress:u,onUploadProgress:k,responseType:Yc,headers:t,withCredentials:B="same-origin",fetchOptions:C,maxContentLength:K,maxBodyLength:p}=EJ(w),S=V.isNumber(K)&&K>-1,L=V.isNumber(p)&&p>-1,H=(o)=>V.hasOwnProp(w,o)?w[o]:void 0,A=Y||fetch;Yc=Yc?(Yc+"").toLowerCase():"text";let E=N5([Xc,g&&g.toAbortSignal()],Qc),P=null,s=E&&E.unsubscribe&&(()=>{E.unsubscribe()}),Jc,e=null,Hc=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,w,P);try{let o=void 0,Kc=H("auth");if(Kc){let R=V.getSafeProp(Kc,"username")||"",T=V.getSafeProp(Kc,"password")||"";o={username:R,password:T}}if(YU(j)){let R=new URL(j,Dc.origin);if(!o&&(R.username||R.password)){let T=v5(R.username),Gc=v5(R.password);o={username:T,password:Gc}}if(R.username||R.password)R.username="",R.password="",j=R.href}if(o)t.delete("authorization"),t.set("Authorization","Basic "+btoa(JU((o.username||"")+":"+(o.password||""))));if(S&&typeof j==="string"&&j.startsWith("data:")){if(pQ(j)>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,w,P)}if(L&&D!=="get"&&D!=="head"){let R=await v(_);if(typeof R==="number"&&isFinite(R)){if(Jc=R,R>p)throw Hc()}}let vc=L&&(V.isReadableStream(_)||V.isStream(_)),xc=(R,T,Gc)=>X9(R,w5,(pc)=>{if(L&&pc>p)throw e=Hc();T&&T(pc)},Gc);if(q&&D!=="get"&&D!=="head"&&(k||vc)){if(Jc=Jc==null?await U(t,_):Jc,Jc!==0||vc){let R=new X(j,{method:"POST",body:_,duplex:"half"}),T;if(V.isFormData(_)&&(T=R.headers.get("content-type")))t.setContentType(T);if(R.body){let[Gc,pc]=k&&B$(Jc,g0(H$(k)))||[];_=xc(R.body,Gc,pc)}}}else if(vc&&!G&&x&&D!=="get"&&D!=="head")_=xc(_);else if(vc&&G&&!q&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,w,P);if(!V.isString(B))B=B?"include":"omit";let W0=G&&"credentials"in X.prototype;if(V.isFormData(_)){let R=t.getContentType();if(R&&/^multipart\/form-data/i.test(R)&&!/boundary=/i.test(R))t.delete("content-type")}t.set("User-Agent","axios/"+o0,!1);let G0={...C,signal:E,method:D.toUpperCase(),headers:i$(t.normalize()),body:_,duplex:"half",credentials:W0?B:void 0};P=G&&new X(j,G0);let $0=await(G?A(P,C):A(j,G0)),x8=Ic.from($0.headers);if(S){let R=V.toFiniteNumber(x8.getContentLength());if(R!=null&&R>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,w,P)}let S8=M&&(Yc==="stream"||Yc==="response");if(M&&$0.body&&(u||S||S8&&s)){let R={};["status","statusText","headers"].forEach((Ac)=>{R[Ac]=$0[Ac]});let T=V.toFiniteNumber(x8.getContentLength()),[Gc,pc]=u&&B$(T,g0(H$(u),!0))||[],qc=0,Ec=(Ac)=>{if(S){if(qc=Ac,qc>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,w,P)}Gc&&Gc(Ac)};$0=new m(X9($0.body,w5,Ec,()=>{pc&&pc(),s&&s()}),R)}Yc=Yc||"text";let z0=await N[V.findKey(N,Yc)||"text"]($0,w);if(S&&!M&&!S8){let R;if(z0!=null){if(typeof z0.byteLength==="number")R=z0.byteLength;else if(typeof z0.size==="number")R=z0.size;else if(typeof z0==="string")R=typeof J==="function"?new J().encode(z0).byteLength:z0.length}if(typeof R==="number"&&R>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,w,P)}return!S8&&s&&s(),await new Promise((R,T)=>{u0(R,T,{data:z0,headers:Ic.from($0.headers),status:$0.status,statusText:$0.statusText,config:w,request:P})})}catch(o){if(s&&s(),E&&E.aborted&&E.reason instanceof O){let Kc=E.reason;throw Kc.config=w,P&&(Kc.request=P),o!==Kc&&(Kc.cause=o),Kc}if(e)throw P&&!e.request&&(e.request=P),e;if(o instanceof O)throw P&&!o.request&&(o.request=P),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,w,P,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,w,P,o&&o.response)}}},mU=new Map,m9=(c)=>{let $=c&&c.env||{},{fetch:Q,Request:J,Response:Y}=$,X=[J,Y,Q],m=X.length,W=m,G,z,x=mU;while(W--)G=X[W],z=x.get(G),z===void 0&&x.set(G,z=W?new Map:XU($)),x=z;return z},w3=m9();var W9={http:x5,xhr:V5,fetch:{get:m9}};V.forEach(W9,(c,$)=>{if(c){try{Object.defineProperty(c,"name",{__proto__:null,value:$})}catch(Q){}Object.defineProperty(c,"adapterName",{__proto__:null,value:$})}});var j5=(c)=>`- ${c}`,GU=(c)=>V.isFunction(c)||c===null||c===!1;function zU(c,$){c=V.isArray(c)?c:[c];let{length:Q}=c,J,Y,X={};for(let m=0;m<Q;m++){J=c[m];let W;if(Y=J,!GU(J)){if(Y=W9[(W=String(J)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${W}'`)}if(Y&&(V.isFunction(Y)||(Y=Y.get($))))break;X[W||"#"+m]=Y}if(!Y){let m=Object.entries(X).map(([G,z])=>`adapter ${G} `+(z===!1?"is not supported by the environment":"is not available in the build")),W=Q?m.length>1?`since :
23
- `+m.map(j5).join(`
24
- `):" "+j5(m[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+W,"ERR_NOT_SUPPORT")}return Y}var TJ={getAdapter:zU,adapters:W9};function G9(c){if(c.cancelToken)c.cancelToken.throwIfRequested();if(c.signal&&c.signal.aborted)throw new x0(null,c)}function fJ(c){if(G9(c),c.headers=Ic.from(c.headers),c.data=iQ.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1)c.headers.setContentType("application/x-www-form-urlencoded",!1);return TJ.getAdapter(c.adapter||v$.adapter,c)(c).then(function(J){G9(c),c.response=J;try{J.data=iQ.call(c,c.transformResponse,J)}finally{delete c.response}return J.headers=Ic.from(J.headers),J},function(J){if(!qQ(J)){if(G9(c),J&&J.response){c.response=J.response;try{J.response.data=iQ.call(c,c.transformResponse,J.response)}finally{delete c.response}J.response.headers=Ic.from(J.response.headers)}}return Promise.reject(J)})}var nJ={};["object","boolean","number","function","string","symbol"].forEach((c,$)=>{nJ[c]=function(J){return typeof J===c||"a"+($<1?"n ":" ")+c}});var K5={};nJ.transitional=function($,Q,J){function Y(X,m){return"[Axios v"+o0+"] Transitional option '"+X+"'"+m+(J?". "+J:"")}return(X,m,W)=>{if($===!1)throw new O(Y(m," has been removed"+(Q?" in "+Q:"")),O.ERR_DEPRECATED);if(Q&&!K5[m])K5[m]=!0,console.warn(Y(m," has been deprecated since v"+Q+" and will be removed in the near future"));return $?$(X,m,W):!0}};nJ.spelling=function($){return(Q,J)=>{return console.warn(`${J} is likely a misspelling of ${$}`),!0}};function xU(c,$,Q){if(typeof c!=="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);let J=Object.keys(c),Y=J.length;while(Y-- >0){let X=J[Y],m=Object.prototype.hasOwnProperty.call($,X)?$[X]:void 0;if(m){let W=c[X],G=W===void 0||m(W,X,c);if(G!==!0)throw new O("option "+X+" must be "+G,O.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new O("Unknown option "+X,O.ERR_BAD_OPTION)}}var RQ={assertOptions:xU,validators:nJ};var dc=RQ.validators;class IQ{constructor(c){this.defaults=c||{},this.interceptors={request:new BX,response:new BX}}async request(c,$){try{return await this._request(c,$)}catch(Q){if(Q instanceof Error){let J={};Error.captureStackTrace?Error.captureStackTrace(J):J=Error();let Y=(()=>{if(!J.stack)return"";let X=J.stack.indexOf(`
17
+ `)===-1){EQ("have not received end of HTTP headers yet..."),X();return}let w=M.toString("ascii",0,M.indexOf(`\r
18
+ `)),U=+w.split(" ")[1];EQ("got proxy server response: %o",w),$({statusCode:U,buffered:M})}c.on("error",z),c.on("close",m),c.on("end",G),X()})}bQ.default=dv});var j5=l((d8)=>{var sv=d8&&d8.__awaiter||function(c,$,Q,J){function Y(X){return X instanceof Q?X:new Q(function(W){W(X)})}return new(Q||(Q=Promise))(function(X,W){function m(x){try{z(J.next(x))}catch(q){W(q)}}function G(x){try{z(J.throw(x))}catch(q){W(q)}}function z(x){x.done?X(x.value):Y(x.value).then(m,G)}z((J=J.apply(c,$||[])).next())})},C$=d8&&d8.__importDefault||function(c){return c&&c.__esModule?c:{default:c}};Object.defineProperty(d8,"__esModule",{value:!0});var i5=C$(Zc("net")),v5=C$(Zc("tls")),rv=C$(Zc("url")),tv=C$(Zc("assert")),ev=C$(CQ()),cU=V5(),$U=C$(w5()),FQ=ev.default("https-proxy-agent:agent");class U5 extends cU.Agent{constructor(c){let $;if(typeof c==="string")$=rv.default.parse(c);else $=c;if(!$)throw Error("an HTTP(S) proxy server `host` and `port` must be specified!");FQ("creating new HttpsProxyAgent instance: %o",$);super($);let Q=Object.assign({},$);if(this.secureProxy=$.secureProxy||YU(Q.protocol),Q.host=Q.hostname||Q.host,typeof Q.port==="string")Q.port=parseInt(Q.port,10);if(!Q.port&&Q.host)Q.port=this.secureProxy?443:80;if(this.secureProxy&&!("ALPNProtocols"in Q))Q.ALPNProtocols=["http 1.1"];if(Q.host&&Q.path)delete Q.path,delete Q.pathname;this.proxy=Q}callback(c,$){return sv(this,void 0,void 0,function*(){let{proxy:Q,secureProxy:J}=this,Y;if(J)FQ("Creating `tls.Socket`: %o",Q),Y=v5.default.connect(Q);else FQ("Creating `net.Socket`: %o",Q),Y=i5.default.connect(Q);let X=Object.assign({},Q.headers),m=`CONNECT ${`${$.host}:${$.port}`} HTTP/1.1\r
19
+ `;if(Q.auth)X["Proxy-Authorization"]=`Basic ${Buffer.from(Q.auth).toString("base64")}`;let{host:G,port:z,secureEndpoint:x}=$;if(!JU(z,x))G+=`:${z}`;X.Host=G,X.Connection="close";for(let U of Object.keys(X))m+=`${U}: ${X[U]}\r
20
+ `;let q=$U.default(Y);Y.write(`${m}\r
21
+ `);let{statusCode:M,buffered:N}=yield q;if(M===200){if(c.once("socket",QU),$.secureEndpoint){FQ("Upgrading socket connection to TLS");let U=$.servername||$.host;return v5.default.connect(Object.assign(Object.assign({},XU($,"host","hostname","path","port")),{socket:Y,servername:U}))}return Y}Y.destroy();let w=new i5.default.Socket({writable:!1});return w.readable=!0,c.once("socket",(U)=>{FQ("replaying proxy buffer for failed request"),tv.default(U.listenerCount("data")>0),U.push(N),U.push(null)}),w})}}d8.default=U5;function QU(c){c.resume()}function JU(c,$){return Boolean(!$&&c===80||$&&c===443)}function YU(c){return typeof c==="string"?/^https:?$/i.test(c):!1}function XU(c,...$){let Q={},J;for(J in c)if(!$.includes(J))Q[J]=c[J];return Q}});var D5=l((v9,K5)=>{var WU=v9&&v9.__importDefault||function(c){return c&&c.__esModule?c:{default:c}},w9=WU(j5());function i9(c){return new w9.default(c)}(function(c){c.HttpsProxyAgent=w9.default,c.prototype=w9.default.prototype})(i9||(i9={}));K5.exports=i9});var H5=l((y3,B5)=>{var TQ;B5.exports=function(){if(!TQ){try{TQ=CQ()("follow-redirects")}catch(c){}if(typeof TQ!=="function")TQ=function(){}}TQ.apply(null,arguments)}});var Z5=l((o3,L9)=>{var nQ=Zc("url"),fQ=nQ.URL,mU=Zc("http"),GU=Zc("https"),B9=Zc("stream").Writable,H9=Zc("assert"),O5=H5();(function(){var $=typeof process<"u",Q=typeof window<"u"&&typeof document<"u",J=r8(Error.captureStackTrace);if(!$&&(Q||!J))console.warn("The follow-redirects package should be excluded from browser builds.")})();var O9=!1;try{H9(new fQ(""))}catch(c){O9=c.code==="ERR_INVALID_URL"}var zU=["Authorization","Proxy-Authorization","Cookie"],xU=["auth","host","hostname","href","path","pathname","port","protocol","query","search","hash"],R9=["abort","aborted","connect","error","socket","timeout"],p9=Object.create(null);R9.forEach(function(c){p9[c]=function($,Q,J){this._redirectable.emit(c,$,Q,J)}});var j9=uQ("ERR_INVALID_URL","Invalid URL",TypeError),K9=uQ("ERR_FR_REDIRECTION_FAILURE","Redirected request failed"),qU=uQ("ERR_FR_TOO_MANY_REDIRECTS","Maximum number of redirects exceeded",K9),MU=uQ("ERR_FR_MAX_BODY_LENGTH_EXCEEDED","Request body larger than maxBodyLength limit"),NU=uQ("ERR_STREAM_WRITE_AFTER_END","write after end"),VU=B9.prototype.destroy||p5;function z0(c,$){if(B9.call(this),this._sanitizeOptions(c),this._options=c,this._ended=!1,this._ending=!1,this._redirectCount=0,this._redirects=[],this._requestBodyLength=0,this._requestBodyBuffers=[],$)this.on("response",$);var Q=this;this._onNativeResponse=function(J){try{Q._processResponse(J)}catch(Y){Q.emit("error",Y instanceof K9?Y:new K9({cause:Y}))}},this._headerFilter=new RegExp("^(?:"+zU.concat(c.sensitiveHeaders).map(KU).join("|")+")$","i"),this._performRequest()}z0.prototype=Object.create(B9.prototype);z0.prototype.abort=function(){Z9(this._currentRequest),this._currentRequest.abort(),this.emit("abort")};z0.prototype.destroy=function(c){return Z9(this._currentRequest,c),VU.call(this,c),this};z0.prototype.write=function(c,$,Q){if(this._ending)throw new NU;if(!s8(c)&&!UU(c))throw TypeError("data should be a string, Buffer or Uint8Array");if(r8($))Q=$,$=null;if(c.length===0){if(Q)Q();return}if(this._requestBodyLength+c.length<=this._options.maxBodyLength)this._requestBodyLength+=c.length,this._requestBodyBuffers.push({data:c,encoding:$}),this._currentRequest.write(c,$,Q);else this.emit("error",new MU),this.abort()};z0.prototype.end=function(c,$,Q){if(r8(c))Q=c,c=$=null;else if(r8($))Q=$,$=null;if(!c)this._ended=this._ending=!0,this._currentRequest.end(null,null,Q);else{var J=this,Y=this._currentRequest;this.write(c,$,function(){J._ended=!0,Y.end(null,null,Q)}),this._ending=!0}};z0.prototype.setHeader=function(c,$){this._options.headers[c]=$,this._currentRequest.setHeader(c,$)};z0.prototype.removeHeader=function(c){delete this._options.headers[c],this._currentRequest.removeHeader(c)};z0.prototype.setTimeout=function(c,$){var Q=this;function J(W){W.setTimeout(c),W.removeListener("timeout",W.destroy),W.addListener("timeout",W.destroy)}function Y(W){if(Q._timeout)clearTimeout(Q._timeout);Q._timeout=setTimeout(function(){Q.emit("timeout"),X()},c),J(W)}function X(){if(Q._timeout)clearTimeout(Q._timeout),Q._timeout=null;if(Q.removeListener("abort",X),Q.removeListener("error",X),Q.removeListener("response",X),Q.removeListener("close",X),$)Q.removeListener("timeout",$);if(!Q.socket)Q._currentRequest.removeListener("socket",Y)}if($)this.on("timeout",$);if(this.socket)Y(this.socket);else this._currentRequest.once("socket",Y);return this.on("socket",J),this.on("abort",X),this.on("error",X),this.on("response",X),this.on("close",X),this};["flushHeaders","getHeader","setNoDelay","setSocketKeepAlive"].forEach(function(c){z0.prototype[c]=function($,Q){return this._currentRequest[c]($,Q)}});["aborted","connection","socket"].forEach(function(c){Object.defineProperty(z0.prototype,c,{get:function(){return this._currentRequest[c]}})});z0.prototype._sanitizeOptions=function(c){if(!c.headers)c.headers={};if(!vU(c.sensitiveHeaders))c.sensitiveHeaders=[];if(c.host){if(!c.hostname)c.hostname=c.host;delete c.host}if(!c.pathname&&c.path){var $=c.path.indexOf("?");if($<0)c.pathname=c.path;else c.pathname=c.path.substring(0,$),c.search=c.path.substring($)}};z0.prototype._performRequest=function(){var c=this._options.protocol,$=this._options.nativeProtocols[c];if(!$)throw TypeError("Unsupported protocol "+c);if(this._options.agents){var Q=c.slice(0,-1);this._options.agent=this._options.agents[Q]}var J=this._currentRequest=$.request(this._options,this._onNativeResponse);J._redirectable=this;for(var Y of R9)J.on(Y,p9[Y]);if(this._currentUrl=/^\//.test(this._options.path)?nQ.format(this._options):this._options.path,this._isRedirect){var X=0,W=this,m=this._requestBodyBuffers;(function G(z){if(J===W._currentRequest){if(z)W.emit("error",z);else if(X<m.length){var x=m[X++];if(!J.finished)J.write(x.data,x.encoding,G)}else if(W._ended)J.end()}})()}};z0.prototype._processResponse=function(c){var $=c.statusCode;if(this._options.trackRedirects)this._redirects.push({url:this._currentUrl,headers:c.headers,statusCode:$});var Q=c.headers.location;if(!Q||this._options.followRedirects===!1||$<300||$>=400){c.responseUrl=this._currentUrl,c.redirects=this._redirects,this.emit("response",c),this._requestBodyBuffers=[];return}if(Z9(this._currentRequest),c.destroy(),++this._redirectCount>this._options.maxRedirects)throw new qU;var J,Y=this._options.beforeRedirect;if(Y)J=Object.assign({Host:c.req.getHeader("host")},this._options.headers);var X=this._options.method;if(($===301||$===302)&&this._options.method==="POST"||$===303&&!/^(?:GET|HEAD)$/.test(this._options.method))this._options.method="GET",this._requestBodyBuffers=[],U9(/^content-/i,this._options.headers);var W=U9(/^host$/i,this._options.headers),m=I9(this._currentUrl),G=W||m.host,z=/^\w+:/.test(Q)?this._currentUrl:nQ.format(Object.assign(m,{host:G})),x=wU(Q,z);if(O5("redirecting to",x.href),this._isRedirect=!0,D9(x,this._options),x.protocol!==m.protocol&&x.protocol!=="https:"||x.host!==G&&!iU(x.host,G))U9(this._headerFilter,this._options.headers);if(r8(Y)){var q={headers:c.headers,statusCode:$},M={url:z,method:X,headers:J};Y(this._options,q,M),this._sanitizeOptions(this._options)}this._performRequest()};function R5(c){var $={maxRedirects:21,maxBodyLength:10485760},Q={};return Object.keys(c).forEach(function(J){var Y=J+":",X=Q[Y]=c[J],W=$[J]=Object.create(X);function m(z,x,q){if(jU(z))z=D9(z);else if(s8(z))z=D9(I9(z));else q=x,x=I5(z),z={protocol:Y};if(r8(x))q=x,x=null;if(x=Object.assign({maxRedirects:$.maxRedirects,maxBodyLength:$.maxBodyLength},z,x),x.nativeProtocols=Q,!s8(x.host)&&!s8(x.hostname))x.hostname="::1";return H9.equal(x.protocol,Y,"protocol mismatch"),O5("options",x),new z0(x,q)}function G(z,x,q){var M=W.request(z,x,q);return M.end(),M}Object.defineProperties(W,{request:{value:m,configurable:!0,enumerable:!0,writable:!0},get:{value:G,configurable:!0,enumerable:!0,writable:!0}})}),$}function p5(){}function I9(c){var $;if(O9)$=new fQ(c);else if($=I5(nQ.parse(c)),!s8($.protocol))throw new j9({input:c});return $}function wU(c,$){return O9?new fQ(c,$):I9(nQ.resolve($,c))}function I5(c){if(/^\[/.test(c.hostname)&&!/^\[[:0-9a-f]+\]$/i.test(c.hostname))throw new j9({input:c.href||c});if(/^\[/.test(c.host)&&!/^\[[:0-9a-f]+\](:\d+)?$/i.test(c.host))throw new j9({input:c.href||c});return c}function D9(c,$){var Q=$||{};for(var J of xU)Q[J]=c[J];if(Q.hostname.startsWith("["))Q.hostname=Q.hostname.slice(1,-1);if(Q.port!=="")Q.port=Number(Q.port);return Q.path=Q.search?Q.pathname+Q.search:Q.pathname,Q}function U9(c,$){var Q;for(var J in $)if(c.test(J))Q=$[J],delete $[J];return Q===null||typeof Q>"u"?void 0:String(Q).trim()}function uQ(c,$,Q){function J(Y){if(r8(Error.captureStackTrace))Error.captureStackTrace(this,this.constructor);Object.assign(this,Y||{}),this.code=c,this.message=this.cause?$+": "+this.cause.message:$}return J.prototype=new(Q||Error),Object.defineProperties(J.prototype,{constructor:{value:J,enumerable:!1},name:{value:"Error ["+c+"]",enumerable:!1}}),J}function Z9(c,$){for(var Q of R9)c.removeListener(Q,p9[Q]);c.on("error",p5),c.destroy($)}function iU(c,$){H9(s8(c)&&s8($));var Q=c.length-$.length-1;return Q>0&&c[Q]==="."&&c.endsWith($)}function vU(c){return c instanceof Array}function s8(c){return typeof c==="string"||c instanceof String}function r8(c){return typeof c==="function"}function UU(c){return typeof c==="object"&&"length"in c}function jU(c){return fQ&&c instanceof fQ}function KU(c){return c.replace(/[\]\\/()*+?.$]/g,"\\$&")}L9.exports=R5({http:mU,https:GU});L9.exports.wrap=R5});var $8="1.18.0";function kQ(c){let $=/^([-+\w]{1,25}):(?:\/\/)?/.exec(c);return $&&$[1]||""}function _9(c,$,Q){let J=Q&&Q.Blob||Bc.classes.Blob,Y=kQ(c);if($===void 0&&J)$=!0;if(Y==="data"){c=Y.length?c.slice(Y.length+1):c;let X=DU.exec(c);if(!X)throw new O("Invalid URL",O.ERR_INVALID_URL);let W=X[1],m=X[2],G=X[3]?"base64":"utf8",z=X[4],x;if(W)x=m?W+m:W;else if(m)x="text/plain"+m;let q=Buffer.from(decodeURIComponent(z),G);if($){if(!J)throw new O("Blob is not supported",O.ERR_NOT_SUPPORT);return new J([q],{type:x})}return q}throw new O("Unsupported protocol "+Y,O.ERR_NOT_SUPPORT)}var DU;var L5=d(()=>{X0();b0();DU=/^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/});import BU from"stream";var S9,_5,A9;var S5=d(()=>{Lc();S9=Symbol("internals");_5=class _5 extends BU.Transform{constructor(c){c=V.toFlatObject(c,{maxRate:0,chunkSize:65536,minChunkSize:100,timeWindow:500,ticksRate:2,samplesCount:15},null,(Q,J)=>{return!V.isUndefined(J[Q])});super({readableHighWaterMark:c.chunkSize});let $=this[S9]={timeWindow:c.timeWindow,chunkSize:c.chunkSize,maxRate:c.maxRate,minChunkSize:c.minChunkSize,bytesSeen:0,isCaptured:!1,notifiedBytesLoaded:0,ts:Date.now(),bytes:0,onReadCallback:null};this.on("newListener",(Q)=>{if(Q==="progress"){if(!$.isCaptured)$.isCaptured=!0}})}_read(c){let $=this[S9];if($.onReadCallback)$.onReadCallback();return super._read(c)}_transform(c,$,Q){let J=this[S9],Y=J.maxRate,X=this.readableHighWaterMark,W=J.timeWindow,m=1000/W,G=Y/m,z=J.minChunkSize!==!1?Math.max(J.minChunkSize,G*0.01):0,x=(M,N)=>{let w=Buffer.byteLength(M);if(J.bytesSeen+=w,J.bytes+=w,J.isCaptured&&this.emit("progress",J.bytesSeen),this.push(M))process.nextTick(N);else J.onReadCallback=()=>{J.onReadCallback=null,process.nextTick(N)}},q=(M,N)=>{let w=Buffer.byteLength(M),U=null,v=X,i,j=0;if(Y){let D=Date.now();if(!J.ts||(j=D-J.ts)>=W)J.ts=D,i=G-J.bytes,J.bytes=i<0?-i:0,j=0;i=G-J.bytes}if(Y){if(i<=0)return setTimeout(()=>{N(null,M)},W-j);if(i<v)v=i}if(v&&w>v&&w-v>z)U=M.subarray(v),M=M.subarray(0,v);x(M,U?()=>{process.nextTick(N,null,U)}:N)};q(c,function M(N,w){if(N)return Q(N);if(w)q(w,M);else Q(null)})}};A9=_5});var A5,HU=async function*(c){if(c.stream)yield*c.stream();else if(c.arrayBuffer)yield await c.arrayBuffer();else if(c[A5])yield*c[A5]();else yield c},tJ;var C9=d(()=>{({asyncIterator:A5}=Symbol),tJ=HU});import OU from"util";import{Readable as RU}from"stream";class C5{constructor(c,$){let{escapeName:Q}=this.constructor,J=V.isString($),Y=`Content-Disposition: form-data; name="${Q(c)}"${!J&&$.name?`; filename="${Q($.name)}"`:""}${t8}`;if(J)$=aQ.encode(String($).replace(/\r?\n|\r\n?/g,t8));else{let X=String($.type||"application/octet-stream").replace(/[\r\n]/g,"");Y+=`Content-Type: ${X}${t8}`}this.headers=aQ.encode(Y+t8),this.contentLength=J?$.byteLength:$.size,this.size=this.headers.byteLength+this.contentLength+ZU,this.name=c,this.value=$}async*encode(){yield this.headers;let{value:c}=this;if(V.isTypedArray(c))yield c;else yield*tJ(c);yield IU}static escapeName(c){return String(c).replace(/[\r\n"]/g,($)=>({"\r":"%0D","\n":"%0A",'"':"%22"})[$])}}var pU,aQ,t8=`\r
22
+ `,IU,ZU=2,LU=(c,$,Q)=>{let{tag:J="form-data-boundary",size:Y=25,boundary:X=J+"-"+Bc.generateString(Y,pU)}=Q||{};if(!V.isFormData(c))throw TypeError("FormData instance required");if(X.length<1||X.length>70)throw Error("boundary must be 1-70 characters long");let W=aQ.encode("--"+X+t8),m=aQ.encode("--"+X+"--"+t8),G=m.byteLength,z=Array.from(c.entries()).map(([q,M])=>{let N=new C5(q,M);return G+=N.size,N});G+=W.byteLength*z.length,G=V.toFiniteNumber(G);let x={"Content-Type":`multipart/form-data; boundary=${X}`};if(Number.isFinite(G))x["Content-Length"]=G;return $&&$(x),RU.from(async function*(){for(let q of z)yield W,yield*q.encode();yield m}())},P5;var E5=d(()=>{Lc();C9();b0();pU=Bc.ALPHABET.ALPHA_DIGIT+"-_",aQ=typeof TextEncoder==="function"?new TextEncoder:new OU.TextEncoder,IU=aQ.encode(t8);P5=LU});import _U from"stream";var b5,F5;var T5=d(()=>{b5=class b5 extends _U.Transform{__transform(c,$,Q){this.push(c),Q()}_transform(c,$,Q){if(c.length!==0){if(this._transform=this.__transform,c[0]!==120){let J=Buffer.alloc(2);J[0]=120,J[1]=156,this.push(J,$)}}this.__transform(c,$,Q)}};F5=b5});import SU from"http2";import AU from"util";class f5{constructor(){this.sessions=Object.create(null)}getSession(c,$){$=Object.assign({sessionTimeout:1000},$);let Q=this.sessions[c];if(Q){let x=Q.length;for(let q=0;q<x;q++){let[M,N]=Q[q];if(!M.destroyed&&!M.closed&&AU.isDeepStrictEqual(N,$))return M}}let J=SU.connect(c,$),Y,X,W=()=>{if(Y)return;if(Y=!0,X)clearTimeout(X),X=null;let x=Q,q=x.length,M=q;while(M--)if(x[M][0]===J){if(q===1)delete this.sessions[c];else x.splice(M,1);if(!J.closed)J.close();return}},m=J.request,{sessionTimeout:G}=$;if(G!=null){let x=0;J.request=function(){let q=m.apply(this,arguments);if(x++,X)clearTimeout(X),X=null;return q.once("close",()=>{if(!--x)X=setTimeout(()=>{X=null,W()},G)}),q}}J.once("close",W);let z=[J,$];return Q?Q.push(z):Q=this.sessions[c]=[z],J}}var n5;var u5=d(()=>{n5=f5});var CU=(c,$)=>{return V.isAsyncFn(c)?function(...Q){let J=Q.pop();c.apply(this,Q).then((Y)=>{try{$?J(null,...$(Y)):J(null,Y)}catch(X){J(X)}},J)}:c},k5;var a5=d(()=>{Lc();k5=CU});function E9(c){let $;try{$=new URL(c)}catch(X){return!1}let Q=(process.env.no_proxy||process.env.NO_PROXY||"").toLowerCase();if(!Q)return!1;if(Q==="*")return!0;let J=Number.parseInt($.port,10)||FU[$.protocol.split(":",1)[0]]||0,Y=h5($.hostname.toLowerCase());return Q.split(/[\s,]+/).some((X)=>{if(!X)return!1;let[W,m]=TU(X);if(W=h5(W),!W)return!1;if(m&&m!==J)return!1;if(W.charAt(0)==="*")W=W.slice(1);if(W.charAt(0)===".")return Y.endsWith(W);return Y===W||l5(Y)&&l5(W)})}var PU,y5=(c)=>{let $=c.split(".");if($.length!==4)return!1;if($[0]!=="127")return!1;return $.every((Q)=>/^\d+$/.test(Q)&&Number(Q)>=0&&Number(Q)<=255)},P9=(c)=>/^0{1,4}$/.test(c),EU=(c)=>{if(c==="::")return!0;let $=c.indexOf("::");if($!==-1){if($!==c.lastIndexOf("::"))return!1;let J=c.slice(0,$),Y=c.slice($+2),X=J?J.split(":"):[],W=Y?Y.split(":"):[];return X.length+W.length<8&&X.every(P9)&&W.every(P9)}let Q=c.split(":");return Q.length===8&&Q.every(P9)},bU=(c)=>{if(c==="::1")return!0;let $=c.match(/^::ffff:(\d+\.\d+\.\d+\.\d+)$/i);if($)return y5($[1]);let Q=c.match(/^::ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i);if(Q){let Y=parseInt(Q[1],16);return Y>=32512&&Y<=32767}let J=c.split(":");if(J.length===8){for(let Y=0;Y<7;Y++)if(!/^0+$/.test(J[Y]))return!1;return/^0*1$/.test(J[7])}return!1},l5=(c)=>{if(!c)return!1;if(PU.has(c))return!0;if(y5(c))return!0;if(EU(c))return!0;return bU(c)},FU,TU=(c)=>{let $=c,Q=0;if($.charAt(0)==="["){let X=$.indexOf("]");if(X!==-1){let W=$.slice(1,X),m=$.slice(X+1);if(m.charAt(0)===":"&&/^\d+$/.test(m.slice(1)))Q=Number.parseInt(m.slice(1),10);return[W,Q]}}let J=$.indexOf(":"),Y=$.lastIndexOf(":");if(J!==-1&&J===Y&&/^\d+$/.test($.slice(Y+1)))Q=Number.parseInt($.slice(Y+1),10),$=$.slice(0,Y);return[$,Q]},fU,nU,uU=(c)=>{if(typeof c!=="string"||c.indexOf(":")===-1)return c;let $=c.match(fU);if($)return $[1];let Q=c.match(nU);if(Q){let J=parseInt(Q[1],16),Y=parseInt(Q[2],16);return`${J>>8}.${J&255}.${Y>>8}.${Y&255}`}return c},h5=(c)=>{if(!c)return c;if(c.charAt(0)==="["&&c.charAt(c.length-1)==="]")c=c.slice(1,-1);return uU(c.replace(/\.+$/,""))};var o5=d(()=>{PU=new Set(["localhost","0.0.0.0"]),FU={http:80,https:443,ws:80,wss:443,ftp:21},fU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:(\d+\.\d+\.\d+\.\d+)$/i,nU=/^(?:::|(?:0{1,4}:){1,4}:|(?:0{1,4}:){5})ffff:([0-9a-f]{1,4}):([0-9a-f]{1,4})$/i});function kU(c,$){c=c||10;let Q=Array(c),J=Array(c),Y=0,X=0,W;return $=$!==void 0?$:1000,function(G){let z=Date.now(),x=J[X];if(!W)W=z;Q[Y]=G,J[Y]=z;let q=X,M=0;while(q!==Y)M+=Q[q++],q=q%c;if(Y=(Y+1)%c,Y===X)X=(X+1)%c;if(z-W<$)return;let N=x&&z-x;return N?Math.round(M*1000/N):void 0}}var g5;var d5=d(()=>{g5=kU});function aU(c,$){let Q=0,J=1000/$,Y,X,W=(z,x=Date.now())=>{if(Q=x,Y=null,X)clearTimeout(X),X=null;c(...z)};return[(...z)=>{let x=Date.now(),q=x-Q;if(q>=J)W(z,x);else if(Y=z,!X)X=setTimeout(()=>{X=null,W(Y)},J-q)},()=>Y&&W(Y)]}var s5;var r5=d(()=>{s5=aU});var Q8=(c,$,Q=3)=>{let J=0,Y=g5(50,250);return s5((X)=>{if(!X||typeof X.loaded!=="number")return;let W=X.loaded,m=X.lengthComputable?X.total:void 0,G=m!=null?Math.min(W,m):W,z=Math.max(0,G-J),x=Y(z);J=Math.max(J,G);let q={loaded:G,total:m,progress:m?G/m:void 0,bytes:z,rate:x?x:void 0,estimated:x&&m?(m-G)/x:void 0,event:X,lengthComputable:m!=null,[$?"download":"upload"]:!0};c(q)},Q)},P$=(c,$)=>{let Q=c!=null;return[(J)=>$[0]({lengthComputable:Q,total:c,loaded:J}),$[1]]},E$=(c)=>(...$)=>V.asap(()=>c(...$));var eJ=d(()=>{d5();r5();Lc()});function lQ(c){if(!c||typeof c!=="string")return 0;if(!c.startsWith("data:"))return 0;let $=c.indexOf(",");if($<0)return 0;let Q=c.slice(5,$),J=c.slice($+1);if(/;base64/i.test(Q)){let{length:W,length:m}=J;for(let N=0;N<m;N++)if(J.charCodeAt(N)===37&&N+2<m){let w=J.charCodeAt(N+1),U=J.charCodeAt(N+2);if(cY(w)&&cY(U))W-=2,N+=2}let G=0,z=m-1,x=(N)=>N>=2&&J.charCodeAt(N-2)===37&&J.charCodeAt(N-1)===51&&(J.charCodeAt(N)===68||J.charCodeAt(N)===100);if(z>=0){if(J.charCodeAt(z)===61)G++,z--;else if(x(z))G++,z-=3}if(G===1&&z>=0){if(J.charCodeAt(z)===61)G++;else if(x(z))G++}let M=Math.floor(W/4)*3-(G||0);return M>0?M:0}let X=0;for(let W=0,m=J.length;W<m;W++){let G=J.charCodeAt(W);if(G===37&&lU(J,W,m))X+=1,W+=2;else if(G<128)X+=1;else if(G<2048)X+=2;else if(G>=55296&&G<=56319&&W+1<m){let z=J.charCodeAt(W+1);if(z>=56320&&z<=57343)X+=4,W++;else X+=3}else X+=3}return X}var cY=(c)=>c>=48&&c<=57||c>=65&&c<=70||c>=97&&c<=102,lU=(c,$,Q)=>$+2<Q&&cY(c.charCodeAt($+1))&&cY(c.charCodeAt($+2));import hU from"http";import yU from"https";import oU from"http2";import gU from"util";import{resolve as t5}from"path";import H0 from"zlib";import F0 from"stream";import{EventEmitter as dU}from"events";function Q4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if($4.includes(J.toLowerCase()))c.set(J,Y)})}function Y4(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||"")+"#"+(c.auth||""),J=$?$x.get($)||$x.set($,new Map).get($):J4,Y=J.get(Q);if(Y)return Y;let X=$&&$.options?{...$.options,...c}:c;if(Y=new b9.default(X),$&&$.options){let W={...$.options},m=Y.callback;Y.callback=function(z,x){return m.call(this,z,{...W,...x})}}return Y[qx]=!0,J.set(Q,Y),Y}function W4(c,$,Q){if(c.beforeRedirects.proxy)c.beforeRedirects.proxy(c);if(c.beforeRedirects.auth)c.beforeRedirects.auth(c);if(c.beforeRedirects.sensitiveHeaders)c.beforeRedirects.sensitiveHeaders(c,Q);if(c.beforeRedirects.config)c.beforeRedirects.config(c,$,Q)}function m4(c,$){if(!c)return;Object.keys(c).forEach((Q)=>{if($.has(Q.toLowerCase()))delete c[Q]})}function G4(c,$){if(!$)return!1;try{return new URL($.url).origin===new URL(c.href).origin}catch(Q){return!1}}function Mx(c,$,Q,J,Y){let X=$;if(!X&&X!==!1){let W=gz(Q);if(W){if(!E9(Q))X=new URL(W)}}if(J&&c.headers){for(let W of Object.keys(c.headers))if(W.toLowerCase()==="proxy-authorization")delete c.headers[W]}if(J&&c.agent&&c.agent[qx])c.agent=void 0;if(X){let W=X instanceof URL,m=(M)=>W||V.hasOwnProp(X,M)?X[M]:void 0,G=m("username"),z=m("password"),x=V.hasOwnProp(X,"auth")?X.auth:void 0;if(G)x=(G||"")+":"+(z||"");if(x){let M=typeof x==="object",N=M&&V.hasOwnProp(x,"username")?x.username:void 0,w=M&&V.hasOwnProp(x,"password")?x.password:void 0;if(Boolean(N||w))x=(N||"")+":"+(w||"");else if(M)throw new O("Invalid proxy authorization",O.ERR_BAD_OPTION,{proxy:X})}if(xx.test(c.protocol)){if(!(Y instanceof b9.default)){let M=m("hostname")||m("host"),N=m("port"),w=m("protocol"),U=w?w.includes(":")?w:`${w}:`:"http:",v=M&&M.includes(":")&&!M.startsWith("[")?`[${M}]`:M,i=new URL(`${U}//${v}${N?":"+N:""}`),j={protocol:i.protocol,hostname:i.hostname.replace(/^\[|\]$/g,""),port:i.port,auth:x&&typeof x==="string"?x:void 0};if(i.protocol==="https:")j.ALPNProtocols=["http/1.1"];let D=Y4(j,Y);if(c.agent=D,c.agents)c.agents.https=D}}else{if(x){let U=Buffer.from(x,"utf8").toString("base64");c.headers["Proxy-Authorization"]="Basic "+U}let M=!1;for(let U of Object.keys(c.headers))if(U.toLowerCase()==="host"){M=!0;break}if(!M)c.headers.host=c.hostname+(c.port?":"+c.port:"");let N=m("hostname")||m("host");c.hostname=N,c.host=N,c.port=m("port"),c.path=Q;let w=m("protocol");if(w)c.protocol=w.includes(":")?w:`${w}:`}}c.beforeRedirects.proxy=function(m){Mx(m,$,m.href,!0,Y)}}var b9,Wx,e5,sU,rU,mx,Gx,zx,tU,eU,c4,xx,$4,cx,$Y,qx,J4,$x,Qx,Jx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},Yx=(c,[$,Q])=>{return c.on("end",Q).on("error",Q),$},X4,z4,x4=(c)=>{return new Promise(($,Q)=>{let J,Y,X=(G,z)=>{if(Y)return;Y=!0,J&&J(G,z)},W=(G)=>{X(G),$(G)},m=(G)=>{X(G,!0),Q(G)};c(W,m,(G)=>J=G).catch(m)})},q4=({address:c,family:$})=>{if(!V.isString(c))throw TypeError("address must be a string");return{address:c,family:$||(c.indexOf(".")<0?6:4)}},Xx=(c,$)=>q4(V.isObject(c)?c:{address:c,family:$}),M4,Nx;var Vx=d(()=>{Lc();hJ();yJ();kJ();dz();LQ();X0();h8();b0();L5();P0();S5();E5();C9();T5();u5();a5();o5();BQ();eJ();b9=DX(D5(),1),Wx=DX(Z5(),1),e5={flush:H0.constants.Z_SYNC_FLUSH,finishFlush:H0.constants.Z_SYNC_FLUSH},sU={flush:H0.constants.BROTLI_OPERATION_FLUSH,finishFlush:H0.constants.BROTLI_OPERATION_FLUSH},rU={flush:H0.constants.ZSTD_e_flush,finishFlush:H0.constants.ZSTD_e_flush},mx=V.isFunction(H0.createBrotliDecompress),Gx=V.isFunction(H0.createZstdDecompress),zx="gzip, compress, deflate"+(mx?", br":""),tU=zx+(Gx?", zstd":""),{http:eU,https:c4}=Wx.default,xx=/https:?/,$4=["content-type","content-length"];cx=Symbol("axios.http.socketListener"),$Y=Symbol("axios.http.currentReq"),qx=Symbol("axios.http.installedTunnel"),J4=new Map,$x=new WeakMap;Qx=Bc.protocols.map((c)=>{return c+":"}),X4=new n5;z4=typeof process<"u"&&V.kindOf(process)==="process",M4={request(c,$){let Q=c.protocol+"//"+c.hostname+":"+(c.port||(c.protocol==="https:"?443:80)),{http2Options:J,headers:Y}=c,X=X4.getSession(Q,J),{HTTP2_HEADER_SCHEME:W,HTTP2_HEADER_METHOD:m,HTTP2_HEADER_PATH:G,HTTP2_HEADER_STATUS:z}=oU.constants,x={[W]:c.protocol.replace(":",""),[m]:c.method,[G]:c.path};V.forEach(Y,(M,N)=>{N.charAt(0)!==":"&&(x[N]=M)});let q=X.request(x);return q.once("response",(M)=>{let N=q;M=Object.assign({},M);let w=M[z];delete M[z],N.headers=M,N.statusCode=+w,$(N)}),q}},Nx=z4&&function($){return x4(async function(J,Y,X){let W=(p)=>V.getSafeProp($,p),m=W("transitional")||D8,G=W("data"),z=W("lookup"),x=W("family"),q=W("httpVersion");if(q===void 0)q=1;let M=W("http2Options"),N=W("responseType"),w=W("responseEncoding"),U=W("httpAgent"),v=W("httpsAgent"),i=W("method").toUpperCase(),j=W("maxRedirects"),D=W("maxBodyLength"),_=W("maxContentLength"),mc=W("decompress"),g,Jc=!1,u,a;if(q=+q,Number.isNaN(q))throw TypeError(`Invalid protocol version: '${$.httpVersion}' is not a number`);if(q!==1&&q!==2)throw TypeError(`Unsupported protocol version '${q}'`);let Xc=q===2;if(z){let p=k5(z,(T)=>V.isArray(T)?T:[T]);z=(T,xc,pc)=>{p(T,xc,(Nc,Tc,Pc)=>{if(Nc)return pc(Nc);let bc=V.isArray(Tc)?Tc.map((v$)=>Xx(v$)):[Xx(Tc,Pc)];xc.all?pc(Nc,bc):pc(Nc,bc[0].address,bc[0].family)})}}let e=new dU;function B(p){try{e.emit("abort",!p||p.type?new w0(null,$,u):p)}catch(T){}}function C(){if(a)clearTimeout(a),a=null}function K(){let p=W("timeout"),T=p?"timeout of "+p+"ms exceeded":"timeout exceeded",xc=W("timeoutErrorMessage");if(xc)T=xc;return new O(T,m.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,$,u)}e.once("abort",Y);let R=()=>{if(C(),$.cancelToken)$.cancelToken.unsubscribe(B);if($.signal)$.signal.removeEventListener("abort",B);e.removeAllListeners()};if($.cancelToken||$.signal){if($.cancelToken&&$.cancelToken.subscribe(B),$.signal)$.signal.aborted?B():$.signal.addEventListener("abort",B)}X((p,T)=>{if(g=!0,C(),T){Jc=!0,R();return}let{data:xc}=p;if(xc instanceof F0.Readable||xc instanceof F0.Duplex){let pc=F0.finished(xc,()=>{pc(),R()})}else R()});let S=y8(W("baseURL"),W("url"),W("allowAbsoluteUrls"),$),Z=new URL(S,Bc.hasBrowserEnv?Bc.origin:void 0),H=Z.protocol||Qx[0];if(H==="data:"){if(_>-1){let T=String(W("url")||S||"");if(lQ(T)>_)return Y(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$))}let p;if(i!=="GET")return d0(J,Y,{status:405,statusText:"method not allowed",headers:{},config:$});try{p=_9(W("url"),N==="blob",{Blob:$.env&&$.env.Blob})}catch(T){throw O.from(T,O.ERR_BAD_REQUEST,$)}if(N==="text"){if(p=p.toString(w),!w||w==="utf8")p=V.stripBOM(p)}else if(N==="stream")p=F0.Readable.from(p);return d0(J,Y,{data:p,status:200,statusText:"OK",headers:new _c,config:$})}if(Qx.indexOf(H)===-1)return Y(new O("Unsupported protocol "+H,O.ERR_BAD_REQUEST,$));let A=_c.from($.headers).normalize();A.set("User-Agent","axios/"+$8,!1);let{onUploadProgress:b,onDownloadProgress:P}=$,r=$.maxRate,Yc=void 0,cc=void 0;if(V.isSpecCompliantForm(G)){let p=A.getContentType(/boundary=([-_\w\d]{10,70})/i);G=P5(G,(T)=>{A.set(T)},{tag:`axios-${$8}-boundary`,boundary:p&&p[1]||void 0})}else if(V.isFormData(G)&&V.isFunction(G.getHeaders)&&G.getHeaders!==Object.prototype.getHeaders){if(Q4(A,G.getHeaders(),W("formDataHeaderPolicy")),!A.hasContentLength())try{let p=await gU.promisify(G.getLength).call(G);Number.isFinite(p)&&p>=0&&A.setContentLength(p)}catch(p){}}else if(V.isBlob(G)||V.isFile(G))G.size&&A.setContentType(G.type||"application/octet-stream"),A.setContentLength(G.size||0),G=F0.Readable.from(tJ(G));else if(G&&!V.isStream(G)){if(Buffer.isBuffer(G));else if(V.isArrayBuffer(G))G=Buffer.from(new Uint8Array(G));else if(V.isString(G))G=Buffer.from(G,"utf-8");else return Y(new O("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream",O.ERR_BAD_REQUEST,$));if(A.setContentLength(G.length,!1),D>-1&&G.length>D)return Y(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$))}let Oc=V.toFiniteNumber(A.getContentLength());if(V.isArray(r))Yc=r[0],cc=r[1];else Yc=cc=r;if(G&&(b||Yc)){if(!V.isStream(G))G=F0.Readable.from(G,{objectMode:!1});G=F0.pipeline([G,new A9({maxRate:V.toFiniteNumber(Yc)})],V.noop),b&&G.on("progress",Yx(G,P$(Oc,Q8(E$(b),!1,3))))}let o=void 0,Dc=W("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o=p+":"+T}if(!o&&(Z.username||Z.password)){let p=Jx(Z.username),T=Jx(Z.password);o=p+":"+T}o&&A.delete("authorization");let Uc;try{Uc=l8(Z.pathname+Z.search,W("params"),W("paramsSerializer")).replace(/^\?/,"")}catch(p){let T=Error(p.message);return T.config=$,T.url=W("url"),T.exists=!0,Y(T)}A.set("Accept-Encoding",V.hasOwnProp(m,"advertiseZstdAcceptEncoding")&&m.advertiseZstdAcceptEncoding===!0?tU:zx,!1);let qc=Object.assign(Object.create(null),{path:Uc,method:i,headers:B$(A),agents:{http:U,https:v},auth:o,protocol:H,family:x,beforeRedirect:W4,beforeRedirects:Object.create(null),http2Options:M});!V.isUndefined(z)&&(qc.lookup=z);let M0=W("socketPath");if(M0){if(typeof M0!=="string")return Y(new O("socketPath must be a string",O.ERR_BAD_OPTION_VALUE,$));let p=W("allowedSocketPaths");if(p!=null){let T=Array.isArray(p)?p:[p],xc=t5(M0);if(!T.some((Nc)=>typeof Nc==="string"&&t5(Nc)===xc))return Y(new O(`socketPath "${M0}" is not permitted by allowedSocketPaths`,O.ERR_BAD_OPTION_VALUE,$))}qc.socketPath=M0}else qc.hostname=Z.hostname.startsWith("[")?Z.hostname.slice(1,-1):Z.hostname,qc.port=Z.port,Mx(qc,W("proxy"),H+"//"+Z.hostname+(Z.port?":"+Z.port:"")+qc.path,!1,v);let N0,Y0=!1,U8=!1,n8=xx.test(qc.protocol);if(qc.agent==null)qc.agent=n8?v:U;if(Xc)N0=M4;else{let p=W("transport");if(p)N0=p;else if(j===0)N0=n8?yU:hU,Y0=!0;else{if(U8=!0,qc.sensitiveHeaders=[],j)qc.maxRedirects=j;let T=W("beforeRedirect");if(T)qc.beforeRedirects.config=T;if(o){let pc=Z.origin,Nc=o;qc.beforeRedirects.auth=function(Pc){try{if(new URL(Pc.href).origin===pc)Pc.auth=Nc}catch(bc){}}}let xc=W("sensitiveHeaders");if(xc!=null){if(!V.isArray(xc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));let pc=new Set;for(let Nc of xc){if(!V.isString(Nc))return Y(new O("sensitiveHeaders must be an array of strings",O.ERR_BAD_OPTION_VALUE,$));pc.add(Nc.toLowerCase())}if(pc.size)qc.sensitiveHeaders=Array.from(pc),qc.beforeRedirects.sensitiveHeaders=function(Tc,Pc){if(!G4(Tc,Pc))m4(Tc.headers,pc)}}N0=n8?c4:eU}}if(D>-1)qc.maxBodyLength=D;else qc.maxBodyLength=1/0;qc.insecureHTTPParser=Boolean(W("insecureHTTPParser")),u=N0.request(qc,function(T){if(C(),u.destroyed)return;let xc=[T],pc=V.toFiniteNumber(T.headers["content-length"]);if(P||cc){let bc=new A9({maxRate:V.toFiniteNumber(cc)});P&&bc.on("progress",Yx(bc,P$(pc,Q8(E$(P),!0,3)))),xc.push(bc)}let Nc=T,Tc=T.req||u;if(mc!==!1&&T.headers["content-encoding"]){if(i==="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":xc.push(H0.createUnzip(e5)),delete T.headers["content-encoding"];break;case"deflate":xc.push(new F5),xc.push(H0.createUnzip(e5)),delete T.headers["content-encoding"];break;case"br":if(mx)xc.push(H0.createBrotliDecompress(sU)),delete T.headers["content-encoding"];break;case"zstd":if(Gx)xc.push(H0.createZstdDecompress(rU)),delete T.headers["content-encoding"];break}}Nc=xc.length>1?F0.pipeline(xc,V.noop):xc[0];let Pc={status:T.statusCode,statusText:T.statusMessage,headers:new _c(T.headers),config:$,request:Tc};if(N==="stream"){if(_>-1){let bc=_,v$=Nc;async function*iQ(){let uc=0;for await(let GG of v$){if(uc+=GG.length,uc>bc)throw new O("maxContentLength size of "+bc+" exceeded",O.ERR_BAD_RESPONSE,$,Tc);yield GG}}Nc=F0.Readable.from(iQ(),{objectMode:!1})}Pc.data=Nc,d0(J,Y,Pc)}else{let bc=[],v$=0;Nc.on("data",function(uc){if(bc.push(uc),v$+=uc.length,_>-1&&v$>_)Jc=!0,Nc.destroy(),B(new O("maxContentLength size of "+_+" exceeded",O.ERR_BAD_RESPONSE,$,Tc))}),Nc.on("aborted",function(){if(Jc)return;let uc=new O("stream has been aborted",O.ERR_BAD_RESPONSE,$,Tc,Pc);Nc.destroy(uc),Y(uc)}),Nc.on("error",function(uc){if(Jc)return;Y(O.from(uc,null,$,Tc,Pc))}),Nc.on("end",function(){try{let uc=bc.length===1?bc[0]:Buffer.concat(bc);if(N!=="arraybuffer"){if(uc=uc.toString(w),!w||w==="utf8")uc=V.stripBOM(uc)}Pc.data=uc}catch(uc){return Y(O.from(uc,null,$,Pc.request,Pc))}d0(J,Y,Pc)})}e.once("abort",(bc)=>{if(!Nc.destroyed)Nc.emit("error",bc),Nc.destroy()})}),e.once("abort",(p)=>{if(u.close)u.close();else u.destroy(p)}),u.on("error",function(T){Y(O.from(T,null,$,u))});let V0=new Set;if(u.on("socket",function(T){if(T.setKeepAlive(!0,60000),!T[cx])T.on("error",function(pc){let Nc=T[$Y];if(Nc&&!Nc.destroyed)Nc.destroy(pc)}),T[cx]=!0;T[$Y]=u,V0.add(T)}),u.once("close",function(){C();for(let T of V0)if(T[$Y]===u)T[$Y]=null;V0.clear()}),W("timeout")){let p=parseInt(W("timeout"),10);if(Number.isNaN(p)){B(new O("error trying to parse `config.timeout` to int",O.ERR_BAD_OPTION_VALUE,$,u));return}let T=function(){if(g)return;B(K())};if(Y0&&p>0)a=setTimeout(T,p);u.setTimeout(p,T)}else u.setTimeout(0);if(V.isStream(G)){let p=!1,T=!1;G.on("end",()=>{p=!0}),G.once("error",(pc)=>{T=!0,u.destroy(pc)}),G.on("close",()=>{if(!p&&!T)B(new w0("Request stream has been aborted",$,u))});let xc=G;if(D>-1&&!U8){let pc=D,Nc=0;xc=F0.pipeline([G,new F0.Transform({transform(Tc,Pc,bc){if(Nc+=Tc.length,Nc>pc)return bc(new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,$,u));bc(null,Tc)}})],V.noop),xc.on("error",(Tc)=>{if(!u.destroyed)u.destroy(Tc)})}xc.pipe(u)}else G&&u.write(G),u.end()})}});var wx;var ix=d(()=>{b0();wx=Bc.hasStandardBrowserEnv?((c,$)=>(Q)=>{return Q=new URL(Q,Bc.origin),c.protocol===Q.protocol&&c.host===Q.host&&($||c.port===Q.port)})(new URL(Bc.origin),Bc.navigator&&/(msie|trident)/i.test(Bc.navigator.userAgent)):()=>!0});var vx;var Ux=d(()=>{Lc();b0();vx=Bc.hasStandardBrowserEnv?{write(c,$,Q,J,Y,X,W){if(typeof document>"u")return;let m=[`${c}=${encodeURIComponent($)}`];if(V.isNumber(Q))m.push(`expires=${new Date(Q).toUTCString()}`);if(V.isString(J))m.push(`path=${J}`);if(V.isString(Y))m.push(`domain=${Y}`);if(X===!0)m.push("secure");if(V.isString(W))m.push(`SameSite=${W}`);document.cookie=m.join("; ")},read(c){if(typeof document>"u")return null;let $=document.cookie.split(";");for(let Q=0;Q<$.length;Q++){let J=$[Q].replace(/^\s+/,""),Y=J.indexOf("=");if(Y!==-1&&J.slice(0,Y)===c)return decodeURIComponent(J.slice(Y+1))}return null},remove(c){this.write(c,"",Date.now()-86400000,"/")}}:{write(){},read(){return null},remove(){}}});function T0(c,$){$=$||{};let Q=Object.create(null);Object.defineProperty(Q,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function J(x,q,M,N){if(V.isPlainObject(x)&&V.isPlainObject(q))return V.merge.call({caseless:N},x,q);else if(V.isPlainObject(q))return V.merge({},q);else if(V.isArray(q))return q.slice();return q}function Y(x,q,M,N){if(!V.isUndefined(q))return J(x,q,M,N);else if(!V.isUndefined(x))return J(void 0,x,M,N)}function X(x,q){if(!V.isUndefined(q))return J(void 0,q)}function W(x,q){if(!V.isUndefined(q))return J(void 0,q);else if(!V.isUndefined(x))return J(void 0,x)}function m(x){let q=V.hasOwnProp($,"transitional")?$.transitional:void 0;if(!V.isUndefined(q))if(V.isPlainObject(q)){if(V.hasOwnProp(q,x))return q[x]}else return;let M=V.hasOwnProp(c,"transitional")?c.transitional:void 0;if(V.isPlainObject(M)&&V.hasOwnProp(M,x))return M[x];return}function G(x,q,M){if(V.hasOwnProp($,M))return J(x,q);else if(V.hasOwnProp(c,M))return J(void 0,x)}let z={url:X,method:X,data:X,baseURL:W,transformRequest:W,transformResponse:W,paramsSerializer:W,timeout:W,timeoutMessage:W,withCredentials:W,withXSRFToken:W,adapter:W,responseType:W,xsrfCookieName:W,xsrfHeaderName:W,onUploadProgress:W,onDownloadProgress:W,decompress:W,maxContentLength:W,maxBodyLength:W,beforeRedirect:W,transport:W,httpAgent:W,httpsAgent:W,cancelToken:W,socketPath:W,allowedSocketPaths:W,responseEncoding:W,validateStatus:G,headers:(x,q,M)=>Y(jx(x),jx(q),M,!0)};if(V.forEach(Object.keys({...c,...$}),function(q){if(q==="__proto__"||q==="constructor"||q==="prototype")return;let M=V.hasOwnProp(z,q)?z[q]:Y,N=V.hasOwnProp(c,q)?c[q]:void 0,w=V.hasOwnProp($,q)?$[q]:void 0,U=M(N,w,q);V.isUndefined(U)&&M!==G||(Q[q]=U)}),V.hasOwnProp($,"validateStatus")&&V.isUndefined($.validateStatus)&&m("validateStatusUndefinedResolves")===!1)if(V.hasOwnProp(c,"validateStatus"))Q.validateStatus=J(void 0,c.validateStatus);else delete Q.validateStatus;return Q}var jx=(c)=>c instanceof _c?{...c}:c;var QY=d(()=>{Lc();P0()});function V4(c,$,Q){if(Q!=="content-only"){c.set($);return}Object.entries($).forEach(([J,Y])=>{if(N4.includes(J.toLowerCase()))c.set(J,Y)})}function i4(c){let $=T0({},c),Q=(M)=>V.hasOwnProp($,M)?$[M]:void 0,J=Q("data"),Y=Q("withXSRFToken"),X=Q("xsrfHeaderName"),W=Q("xsrfCookieName"),m=Q("headers"),G=Q("auth"),z=Q("baseURL"),x=Q("allowAbsoluteUrls"),q=Q("url");if($.headers=m=_c.from(m),$.url=l8(y8(z,q,x,$),Q("params"),Q("paramsSerializer")),G){let M=V.getSafeProp(G,"username")||"",N=V.getSafeProp(G,"password")||"";m.set("Authorization","Basic "+btoa(M+":"+(N?w4(N):"")))}if(V.isFormData(J)){if(Bc.hasStandardBrowserEnv||Bc.hasStandardBrowserWebWorkerEnv||V.isReactNative(J))m.setContentType(void 0);else if(V.isFunction(J.getHeaders))V4(m,J.getHeaders(),Q("formDataHeaderPolicy"))}if(Bc.hasStandardBrowserEnv){if(V.isFunction(Y))Y=Y($);if(Y===!0||Y==null&&wx($.url)){let N=X&&W&&vx.read(W);if(N)m.set(X,N)}}return $}var N4,w4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),JY;var F9=d(()=>{b0();Lc();ix();Ux();yJ();QY();P0();kJ();N4=["content-type","content-length"];JY=i4});var v4,Kx;var Dx=d(()=>{Lc();hJ();LQ();X0();h8();b0();P0();eJ();F9();BQ();v4=typeof XMLHttpRequest<"u",Kx=v4&&function(c){return new Promise(function(Q,J){let Y=JY(c),X=Y.data,W=_c.from(Y.headers).normalize(),{responseType:m,onUploadProgress:G,onDownloadProgress:z}=Y,x,q,M,N,w;function U(){N&&N(),w&&w(),Y.cancelToken&&Y.cancelToken.unsubscribe(x),Y.signal&&Y.signal.removeEventListener("abort",x)}let v=new XMLHttpRequest;v.open(Y.method.toUpperCase(),Y.url,!0),v.timeout=Y.timeout;function i(){if(!v)return;let D=_c.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),mc={data:!m||m==="text"||m==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:D,config:c,request:v};d0(function(Jc){Q(Jc),U()},function(Jc){J(Jc),U()},mc),v=null}if("onloadend"in v)v.onloadend=i;else v.onreadystatechange=function(){if(!v||v.readyState!==4)return;if(v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:")))return;setTimeout(i)};if(v.onabort=function(){if(!v)return;J(new O("Request aborted",O.ECONNABORTED,c,v)),U(),v=null},v.onerror=function(_){let mc=_&&_.message?_.message:"Network Error",g=new O(mc,O.ERR_NETWORK,c,v);g.event=_||null,J(g),U(),v=null},v.ontimeout=function(){let _=Y.timeout?"timeout of "+Y.timeout+"ms exceeded":"timeout exceeded",mc=Y.transitional||D8;if(Y.timeoutErrorMessage)_=Y.timeoutErrorMessage;J(new O(_,mc.clarifyTimeoutError?O.ETIMEDOUT:O.ECONNABORTED,c,v)),U(),v=null},X===void 0&&W.setContentType(null),"setRequestHeader"in v)V.forEach(B$(W),function(_,mc){v.setRequestHeader(mc,_)});if(!V.isUndefined(Y.withCredentials))v.withCredentials=!!Y.withCredentials;if(m&&m!=="json")v.responseType=Y.responseType;if(z)[M,w]=Q8(z,!0),v.addEventListener("progress",M);if(G&&v.upload)[q,N]=Q8(G),v.upload.addEventListener("progress",q),v.upload.addEventListener("loadend",N);if(Y.cancelToken||Y.signal){if(x=(D)=>{if(!v)return;J(!D||D.type?new w0(null,c,v):D),v.abort(),U(),v=null},Y.cancelToken&&Y.cancelToken.subscribe(x),Y.signal)Y.signal.aborted?x():Y.signal.addEventListener("abort",x)}let j=kQ(Y.url);if(j&&!Bc.protocols.includes(j)){J(new O("Unsupported protocol "+j+":",O.ERR_BAD_REQUEST,c));return}v.send(X||null)})}});var U4=(c,$)=>{if(c=c?c.filter(Boolean):[],!$&&!c.length)return;let Q=new AbortController,J=!1,Y=function(G){if(!J){J=!0,W();let z=G instanceof Error?G:this.reason;Q.abort(z instanceof O?z:new w0(z instanceof Error?z.message:z))}},X=$&&setTimeout(()=>{X=null,Y(new O(`timeout of ${$}ms exceeded`,O.ETIMEDOUT))},$),W=()=>{if(!c)return;X&&clearTimeout(X),X=null,c.forEach((G)=>{G.unsubscribe?G.unsubscribe(Y):G.removeEventListener("abort",Y)}),c=null};c.forEach((G)=>G.addEventListener("abort",Y));let{signal:m}=Q;return m.unsubscribe=()=>V.asap(W),m},Bx;var Hx=d(()=>{h8();X0();Lc();Bx=U4});var j4=function*(c,$){let Q=c.byteLength;if(!$||Q<$){yield c;return}let J=0,Y;while(J<Q)Y=J+$,yield c.slice(J,Y),J=Y},K4=async function*(c,$){for await(let Q of D4(c))yield*j4(Q,$)},D4=async function*(c){if(c[Symbol.asyncIterator]){yield*c;return}let $=c.getReader();try{for(;;){let{done:Q,value:J}=await $.read();if(Q)break;yield J}}finally{await $.cancel()}},T9=(c,$,Q,J)=>{let Y=K4(c,$),X=0,W,m=(G)=>{if(!W)W=!0,J&&J(G)};return new ReadableStream({async pull(G){try{let{done:z,value:x}=await Y.next();if(z){m(),G.close();return}let q=x.byteLength;if(Q){let M=X+=q;Q(M)}G.enqueue(new Uint8Array(x))}catch(z){throw m(z),z}},cancel(G){return m(G),Y.return()}},{highWaterMark:2})};var Ox=65536,YY,B4=(c)=>encodeURIComponent(c).replace(/%([0-9A-F]{2})/gi,($,Q)=>String.fromCharCode(parseInt(Q,16))),Rx=(c)=>{if(!V.isString(c))return c;try{return decodeURIComponent(c)}catch($){return c}},px=(c,...$)=>{try{return!!c(...$)}catch(Q){return!1}},H4=(c)=>{let $=c.indexOf("://"),Q=c;if($!==-1)Q=Q.slice($+3);return Q.includes("@")||Q.includes(":")},O4=(c)=>{let $=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:Q,TextEncoder:J}=$;c=V.merge.call({skipUndefined:!0},{Request:$.Request,Response:$.Response},c);let{fetch:Y,Request:X,Response:W}=c,m=Y?YY(Y):typeof fetch==="function",G=YY(X),z=YY(W);if(!m)return!1;let x=m&&YY(Q),q=m&&(typeof J==="function"?((i)=>(j)=>i.encode(j))(new J):async(i)=>new Uint8Array(await new X(i).arrayBuffer())),M=G&&x&&px(()=>{let i=!1,j=new X(Bc.origin,{body:new Q,method:"POST",get duplex(){return i=!0,"half"}}),D=j.headers.has("Content-Type");if(j.body!=null)j.body.cancel();return i&&!D}),N=z&&x&&px(()=>V.isReadableStream(new W("").body)),w={stream:N&&((i)=>i.body)};m&&(()=>{["text","arrayBuffer","blob","formData","stream"].forEach((i)=>{!w[i]&&(w[i]=(j,D)=>{let _=j&&j[i];if(_)return _.call(j);throw new O(`Response type '${i}' is not supported`,O.ERR_NOT_SUPPORT,D)})})})();let U=async(i)=>{if(i==null)return 0;if(V.isBlob(i))return i.size;if(V.isSpecCompliantForm(i))return(await new X(Bc.origin,{method:"POST",body:i}).arrayBuffer()).byteLength;if(V.isArrayBufferView(i)||V.isArrayBuffer(i))return i.byteLength;if(V.isURLSearchParams(i))i=i+"";if(V.isString(i))return(await q(i)).byteLength},v=async(i,j)=>{let D=V.toFiniteNumber(i.getContentLength());return D==null?U(j):D};return async(i)=>{let{url:j,method:D,data:_,signal:mc,cancelToken:g,timeout:Jc,onDownloadProgress:u,onUploadProgress:a,responseType:Xc,headers:e,withCredentials:B="same-origin",fetchOptions:C,maxContentLength:K,maxBodyLength:R}=JY(i),S=V.isNumber(K)&&K>-1,Z=V.isNumber(R)&&R>-1,H=(o)=>V.hasOwnProp(i,o)?i[o]:void 0,A=Y||fetch;Xc=Xc?(Xc+"").toLowerCase():"text";let b=Bx([mc,g&&g.toAbortSignal()],Jc),P=null,r=b&&b.unsubscribe&&(()=>{b.unsubscribe()}),Yc,cc=null,Oc=()=>new O("Request body larger than maxBodyLength limit",O.ERR_BAD_REQUEST,i,P);try{let o=void 0,Dc=H("auth");if(Dc){let p=V.getSafeProp(Dc,"username")||"",T=V.getSafeProp(Dc,"password")||"";o={username:p,password:T}}if(H4(j)){let p=new URL(j,Bc.origin);if(!o&&(p.username||p.password)){let T=Rx(p.username),xc=Rx(p.password);o={username:T,password:xc}}if(p.username||p.password)p.username="",p.password="",j=p.href}if(o)e.delete("authorization"),e.set("Authorization","Basic "+btoa(B4((o.username||"")+":"+(o.password||""))));if(S&&typeof j==="string"&&j.startsWith("data:")){if(lQ(j)>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}if(Z&&D!=="get"&&D!=="head"){let p=await U(_);if(typeof p==="number"&&isFinite(p)){if(Yc=p,p>R)throw Oc()}}let Uc=Z&&(V.isReadableStream(_)||V.isStream(_)),qc=(p,T,xc)=>T9(p,Ox,(pc)=>{if(Z&&pc>R)throw cc=Oc();T&&T(pc)},xc);if(M&&D!=="get"&&D!=="head"&&(a||Uc)){if(Yc=Yc==null?await v(e,_):Yc,Yc!==0||Uc){let p=new X(j,{method:"POST",body:_,duplex:"half"}),T;if(V.isFormData(_)&&(T=p.headers.get("content-type")))e.setContentType(T);if(p.body){let[xc,pc]=a&&P$(Yc,Q8(E$(a)))||[];_=qc(p.body,xc,pc)}}}else if(Uc&&!G&&x&&D!=="get"&&D!=="head")_=qc(_);else if(Uc&&G&&!M&&D!=="get"&&D!=="head")throw new O("Stream request bodies are not supported by the current fetch implementation",O.ERR_NOT_SUPPORT,i,P);if(!V.isString(B))B=B?"include":"omit";let M0=G&&"credentials"in X.prototype;if(V.isFormData(_)){let p=e.getContentType();if(p&&/^multipart\/form-data/i.test(p)&&!/boundary=/i.test(p))e.delete("content-type")}e.set("User-Agent","axios/"+$8,!1);let N0={...C,signal:b,method:D.toUpperCase(),headers:B$(e.normalize()),body:_,duplex:"half",credentials:M0?B:void 0};P=G&&new X(j,N0);let Y0=await(G?A(P,C):A(j,N0)),U8=_c.from(Y0.headers);if(S){let p=V.toFiniteNumber(U8.getContentLength());if(p!=null&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}let n8=N&&(Xc==="stream"||Xc==="response");if(N&&Y0.body&&(u||S||n8&&r)){let p={};["status","statusText","headers"].forEach((Pc)=>{p[Pc]=Y0[Pc]});let T=V.toFiniteNumber(U8.getContentLength()),[xc,pc]=u&&P$(T,Q8(E$(u),!0))||[],Nc=0,Tc=(Pc)=>{if(S){if(Nc=Pc,Nc>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}xc&&xc(Pc)};Y0=new W(T9(Y0.body,Ox,Tc,()=>{pc&&pc(),r&&r()}),p)}Xc=Xc||"text";let V0=await w[V.findKey(w,Xc)||"text"](Y0,i);if(S&&!N&&!n8){let p;if(V0!=null){if(typeof V0.byteLength==="number")p=V0.byteLength;else if(typeof V0.size==="number")p=V0.size;else if(typeof V0==="string")p=typeof J==="function"?new J().encode(V0).byteLength:V0.length}if(typeof p==="number"&&p>K)throw new O("maxContentLength size of "+K+" exceeded",O.ERR_BAD_RESPONSE,i,P)}return!n8&&r&&r(),await new Promise((p,T)=>{d0(p,T,{data:V0,headers:_c.from(Y0.headers),status:Y0.status,statusText:Y0.statusText,config:i,request:P})})}catch(o){if(r&&r(),b&&b.aborted&&b.reason instanceof O){let Dc=b.reason;throw Dc.config=i,P&&(Dc.request=P),o!==Dc&&(Dc.cause=o),Dc}if(cc)throw P&&!cc.request&&(cc.request=P),cc;if(o instanceof O)throw P&&!o.request&&(o.request=P),o;if(o&&o.name==="TypeError"&&/Load failed|fetch/i.test(o.message))throw Object.assign(new O("Network Error",O.ERR_NETWORK,i,P,o&&o.response),{cause:o.cause||o});throw O.from(o,o&&o.code,i,P,o&&o.response)}}},R4,f9=(c)=>{let $=c&&c.env||{},{fetch:Q,Request:J,Response:Y}=$,X=[J,Y,Q],W=X.length,m=W,G,z,x=R4;while(m--)G=X[m],z=x.get(G),z===void 0&&x.set(G,z=m?new Map:O4($)),x=z;return z},gS;var Ix=d(()=>{b0();Lc();X0();Hx();P0();eJ();F9();hJ();BQ();({isFunction:YY}=V),R4=new Map,gS=f9()});function Z4(c,$){c=V.isArray(c)?c:[c];let{length:Q}=c,J,Y,X={};for(let W=0;W<Q;W++){J=c[W];let m;if(Y=J,!I4(J)){if(Y=n9[(m=String(J)).toLowerCase()],Y===void 0)throw new O(`Unknown adapter '${m}'`)}if(Y&&(V.isFunction(Y)||(Y=Y.get($))))break;X[m||"#"+W]=Y}if(!Y){let W=Object.entries(X).map(([G,z])=>`adapter ${G} `+(z===!1?"is not supported by the environment":"is not available in the build")),m=Q?W.length>1?`since :
23
+ `+W.map(Zx).join(`
24
+ `):" "+Zx(W[0]):"as no adapter specified";throw new O("There is no suitable adapter to dispatch the request "+m,"ERR_NOT_SUPPORT")}return Y}var n9,Zx=(c)=>`- ${c}`,I4=(c)=>V.isFunction(c)||c===null||c===!1,XY;var u9=d(()=>{Lc();Vx();Dx();Ix();X0();n9={http:Nx,xhr:Kx,fetch:{get:f9}};V.forEach(n9,(c,$)=>{if(c){try{Object.defineProperty(c,"name",{__proto__:null,value:$})}catch(Q){}Object.defineProperty(c,"adapterName",{__proto__:null,value:$})}});XY={getAdapter:Z4,adapters:n9}});function k9(c){if(c.cancelToken)c.cancelToken.throwIfRequested();if(c.signal&&c.signal.aborted)throw new w0(null,c)}function WY(c){if(k9(c),c.headers=_c.from(c.headers),c.data=_Q.call(c,c.transformRequest),["post","put","patch"].indexOf(c.method)!==-1)c.headers.setContentType("application/x-www-form-urlencoded",!1);return XY.getAdapter(c.adapter||L$.adapter,c)(c).then(function(J){k9(c),c.response=J;try{J.data=_Q.call(c,c.transformResponse,J)}finally{delete c.response}return J.headers=_c.from(J.headers),J},function(J){if(!SQ(J)){if(k9(c),J&&J.response){c.response=J.response;try{J.response.data=_Q.call(c,c.transformResponse,J.response)}finally{delete c.response}J.response.headers=_c.from(J.response.headers)}}return Promise.reject(J)})}var Lx=d(()=>{hz();lJ();h8();P0();u9()});function L4(c,$,Q){if(typeof c!=="object")throw new O("options must be an object",O.ERR_BAD_OPTION_VALUE);let J=Object.keys(c),Y=J.length;while(Y-- >0){let X=J[Y],W=Object.prototype.hasOwnProperty.call($,X)?$[X]:void 0;if(W){let m=c[X],G=m===void 0||W(m,X,c);if(G!==!0)throw new O("option "+X+" must be "+G,O.ERR_BAD_OPTION_VALUE);continue}if(Q!==!0)throw new O("Unknown option "+X,O.ERR_BAD_OPTION)}}var mY,_x,hQ;var Sx=d(()=>{X0();mY={};["object","boolean","number","function","string","symbol"].forEach((c,$)=>{mY[c]=function(J){return typeof J===c||"a"+($<1?"n ":" ")+c}});_x={};mY.transitional=function($,Q,J){function Y(X,W){return"[Axios v"+$8+"] Transitional option '"+X+"'"+W+(J?". "+J:"")}return(X,W,m)=>{if($===!1)throw new O(Y(W," has been removed"+(Q?" in "+Q:"")),O.ERR_DEPRECATED);if(Q&&!_x[W])_x[W]=!0,console.warn(Y(W," has been deprecated since v"+Q+" and will be removed in the near future"));return $?$(X,W,m):!0}};mY.spelling=function($){return(Q,J)=>{return console.warn(`${J} is likely a misspelling of ${$}`),!0}};hQ={assertOptions:L4,validators:mY}});class yQ{constructor(c){this.defaults=c||{},this.interceptors={request:new tX,response:new tX}}async request(c,$){try{return await this._request(c,$)}catch(Q){if(Q instanceof Error){let J={};Error.captureStackTrace?Error.captureStackTrace(J):J=Error();let Y=(()=>{if(!J.stack)return"";let X=J.stack.indexOf(`
25
25
  `);return X===-1?"":J.stack.slice(X+1)})();try{if(!Q.stack)Q.stack=Y;else if(Y){let X=Y.indexOf(`
26
- `),m=X===-1?-1:Y.indexOf(`
27
- `,X+1),W=m===-1?"":Y.slice(m+1);if(!String(Q.stack).endsWith(W))Q.stack+=`
28
- `+Y}}catch(X){}}throw Q}}_request(c,$){if(typeof c==="string")$=$||{},$.url=c;else $=c||{};$=_0(this.defaults,$);let{transitional:Q,paramsSerializer:J,headers:Y}=$;if(Q!==void 0)RQ.assertOptions(Q,{silentJSONParsing:dc.transitional(dc.boolean),forcedJSONParsing:dc.transitional(dc.boolean),clarifyTimeoutError:dc.transitional(dc.boolean),legacyInterceptorReqResOrdering:dc.transitional(dc.boolean),advertiseZstdAcceptEncoding:dc.transitional(dc.boolean),validateStatusUndefinedResolves:dc.transitional(dc.boolean)},!1);if(J!=null)if(V.isFunction(J))$.paramsSerializer={serialize:J};else RQ.assertOptions(J,{encode:dc.function,serialize:dc.function},!0);if($.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)$.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else $.allowAbsoluteUrls=!0;RQ.assertOptions($,{baseUrl:dc.spelling("baseURL"),withXsrfToken:dc.spelling("withXSRFToken")},!0),$.method=($.method||this.defaults.method||"get").toLowerCase();let X=Y&&V.merge(Y.common,Y[$.method]);Y&&V.forEach(["delete","get","head","post","put","patch","query","common"],(M)=>{delete Y[M]}),$.headers=Ic.concat(X,Y);let m=[],W=!0;this.interceptors.request.forEach(function(N){if(typeof N.runWhen==="function"&&N.runWhen($)===!1)return;W=W&&N.synchronous;let v=$.transitional||M8;if(v&&v.legacyInterceptorReqResOrdering)m.unshift(N.fulfilled,N.rejected);else m.push(N.fulfilled,N.rejected)});let G=[];this.interceptors.response.forEach(function(N){G.push(N.fulfilled,N.rejected)});let z,x=0,i;if(!W){let M=[fJ.bind(this),void 0];M.unshift(...m),M.push(...G),i=M.length,z=Promise.resolve($);while(x<i)z=z.then(M[x++],M[x++]);return z}i=m.length;let q=$;while(x<i){let M=m[x++],N=m[x++];try{q=M(q)}catch(v){N.call(this,v);break}}try{z=fJ.call(this,q)}catch(M){return Promise.reject(M)}x=0,i=G.length;while(x<i)z=z.then(G[x++],G[x++]);return z}getUri(c){c=_0(this.defaults,c);let $=E8(c.baseURL,c.url,c.allowAbsoluteUrls,c);return b8($,c.params,c.paramsSerializer)}}V.forEach(["delete","get","head","options"],function($){IQ.prototype[$]=function(Q,J){return this.request(_0(J||{},{method:$,url:Q,data:J&&V.hasOwnProp(J,"data")?J.data:void 0}))}});V.forEach(["post","put","patch","query"],function($){function Q(J){return function(X,m,W){return this.request(_0(W||{},{method:$,headers:J?{"Content-Type":"multipart/form-data"}:{},url:X,data:m}))}}if(IQ.prototype[$]=Q(),$!=="query")IQ.prototype[$+"Form"]=Q(!0)});var LQ=IQ;class z9{constructor(c){if(typeof c!=="function")throw TypeError("executor must be a function.");let $;this.promise=new Promise(function(Y){$=Y});let Q=this;this.promise.then((J)=>{if(!Q._listeners)return;let Y=Q._listeners.length;while(Y-- >0)Q._listeners[Y](J);Q._listeners=null}),this.promise.then=(J)=>{let Y,X=new Promise((m)=>{Q.subscribe(m),Y=m}).then(J);return X.cancel=function(){Q.unsubscribe(Y)},X},c(function(Y,X,m){if(Q.reason)return;Q.reason=new x0(Y,X,m),$(Q.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}if(this._listeners)this._listeners.push(c);else this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;let $=this._listeners.indexOf(c);if($!==-1)this._listeners.splice($,1)}toAbortSignal(){let c=new AbortController,$=(Q)=>{c.abort(Q)};return this.subscribe($),c.signal.unsubscribe=()=>this.unsubscribe($),c.signal}static source(){let c;return{token:new z9(function(J){c=J}),cancel:c}}}var D5=z9;function x9(c){return function(Q){return c.apply(null,Q)}}function i9(c){return V.isObject(c)&&c.isAxiosError===!0}var q9={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(q9).forEach(([c,$])=>{q9[$]=c});var B5=q9;function H5(c){let $=new LQ(c),Q=$Q(LQ.prototype.request,$);return V.extend(Q,LQ.prototype,$,{allOwnKeys:!0}),V.extend(Q,$,null,{allOwnKeys:!0}),Q.create=function(Y){return H5(_0(c,Y))},Q}var Fc=H5(v$);Fc.Axios=LQ;Fc.CanceledError=x0;Fc.CancelToken=D5;Fc.isCancel=qQ;Fc.VERSION=o0;Fc.toFormData=q8;Fc.AxiosError=O;Fc.Cancel=Fc.CanceledError;Fc.all=function($){return Promise.all($)};Fc.spread=x9;Fc.isAxiosError=i9;Fc.mergeConfig=_0;Fc.AxiosHeaders=Ic;Fc.formToJSON=(c)=>IJ(V.isHTMLForm(c)?new FormData(c):c);Fc.getAdapter=TJ.getAdapter;Fc.HttpStatusCode=B5;Fc.default=Fc;var uJ=Fc;import{existsSync as LU}from"node:fs";import{delimiter as ZU,join as _U}from"node:path";import{fileURLToPath as SU}from"node:url";import{readFileSync as iU}from"node:fs";function i0(){try{let c=JSON.parse(iU(new URL("../package.json",import.meta.url),"utf8"));return typeof c.version==="string"?c.version:"0.0.0"}catch{return"0.0.0"}}function q0(c,$){let Q=(X)=>{let m=/^\D*(\d+)\.(\d+)\.(\d+)/.exec(X.trim());return m?[Number(m[1]),Number(m[2]),Number(m[3])]:null},J=Q(c),Y=Q($);if(!J||!Y)return!1;for(let X=0;X<3;X++){if(J[X]>Y[X])return!0;if(J[X]<Y[X])return!1}return!1}import{promises as N9}from"node:fs";import{join as MU}from"node:path";import{promises as ZQ}from"node:fs";import{homedir as O5}from"node:os";import{dirname as M9,join as k8}from"node:path";var _Q=k8(O5(),".figura"),S0=k8(_Q,"config.json"),qU=k8(_Q,"figs"),SQ=k8(".figura","config.json");async function p5(c){try{let $=await ZQ.readFile(c,"utf8"),Q=JSON.parse($);if(Q&&typeof Q==="object")return Q;return{}}catch{return{}}}async function V9(){return p5(S0)}async function R5(c=process.cwd()){let $=O5(),Q=c;for(;;){if(Q!==$){let Y=k8(Q,SQ);try{return await ZQ.access(Y),Y}catch{}}let J=M9(Q);if(J===Q)return null;Q=J}}async function I5(c=process.cwd()){let $=await R5(c);if($)return k8(M9($),"figs");return qU}async function L5(c,$){await ZQ.mkdir(M9(c),{recursive:!0,mode:448}),await ZQ.writeFile(c,JSON.stringify($,null,2)+`
29
- `,{mode:384}),await ZQ.chmod(c,384).catch(()=>{})}async function Z5(c){await L5(S0,c)}async function _5(c,$=process.cwd()){let Q=k8($,SQ);return await L5(Q,c),Q}async function j0(c={}){let $=await V9(),Q=await R5(c.cwd),J=Q?await p5(Q):{},Y={...$,...J},X=process.env.FIGURA_TOKEN||c.tokenFlag||Y.token||void 0,m=process.env.FIGURA_TOKEN?"env":c.tokenFlag?"flag":J.token?"project":$.token?"global":"none",W=process.env.FIGURA_API_URL||c.apiUrlFlag||Y.apiUrl||O$;return{token:X,apiUrl:W,team:Y.team,config:Y,tokenSource:m,projectConfigPath:Q}}var A5=MU(_Q,"update-check.json"),VU=86400000,NU=604800000,C5=21600000;function p$(c){try{let $=new URL(c);return`${$.protocol}//${$.host}`.toLowerCase()}catch{return c.trim().toLowerCase().replace(/\/+$/,"")}}function S5(c,$){return typeof c==="number"&&$-c<NU}function AQ(c,$,Q){let J=c.serverAdvice?.[$];if(!J)return{};return{min:S5(J.minAt,Q)?J.min:void 0,latest:S5(J.latestAt,Q)?J.latest:void 0}}async function N8(){try{let c=await N9.readFile(A5,"utf8"),$=JSON.parse(c);return $&&typeof $==="object"?$:{}}catch{return{}}}async function CQ(c){await N9.mkdir(_Q,{recursive:!0,mode:448}),await N9.writeFile(A5,JSON.stringify(c,null,2)+`
30
- `,{mode:384})}function P5(c,$){return typeof c.checkedAt==="number"&&$-c.checkedAt<VU}async function w9(c){let $=new AbortController,Q=setTimeout(()=>$.abort(),c);try{let J=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:$.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!J.ok)return null;let Y=await J.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(Q)}}var d5="figura-cli";function AU(c){if(!c.isTTY)return"stdout-not-tty";if(c.json)return"json";if(c.env.CI)return"ci";if(c.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function CU(c){let $=c.replace(/\\/g,"/");if($.includes("/.bun/"))return"bun";if($.includes("/pnpm/")||$.includes("/.pnpm/"))return"pnpm";if($.includes("/.volta/"))return"volta";if($.includes("/node_modules/"))return"npm";return null}function PU(c=process.env,$=LU){let Q=(c.PATH??"").split(ZU).filter(Boolean),J=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return Q.some((Y)=>J.some((X)=>$(_U(Y,X))))}async function kJ(c,$="latest",Q,J,Y=SU(import.meta.url)){let X=await Promise.resolve().then(() => (g5(),o5)),m=(x)=>{let i=X.resolveCommand(x,"global",[`${c}@${$}`]);return i?{command:`${i.command} ${i.args.join(" ")}`,generic:!1}:null},W=Q!==void 0?Q:X.getUserAgent()??null;if(W){let x=m(W);if(x)return x}let G=CU(Y);if(G==="volta")return{command:`volta install ${c}@${$}`,generic:!1};if(G){let x=m(G);if(x)return x}let z=J??PU();return{command:`npm i -g ${c}@${$}`,generic:!z}}function s5(c){return c.generic?`Update with your package manager's global install, e.g. ${c.command}`:`Run: ${c.command}`}function bU(c,$,Q){return`⚠ figura ${c} → ${$} available. ${Q}`}function EU(c,$,Q){return`⚠ figura ${c} is below the minimum supported ${$} — `+`some commands may fail. ${Q}`}function FU(c,$,Q){let J=c.latest,Y=AQ(c,$,Q).latest;if(J&&Y)return q0(Y,J)?Y:J;return J??Y}function r5(c){let $=c("x-figura-min-cli")?.trim(),Q=c("x-figura-latest-cli")?.trim();return{min:$||void 0,latest:Q||void 0}}function TU(c,$,Q,J){if(!Q.min&&!Q.latest)return null;let Y={...c.serverAdvice??{}},X=Y[$]??{},m={...X},W=!1,G=(z)=>typeof z!=="number"||J-z>=C5;if(Q.min&&(X.min!==Q.min||G(X.minAt)))m.min=Q.min,m.minAt=J,W=!0;if(Q.latest&&(X.latest!==Q.latest||G(X.latestAt)))m.latest=Q.latest,m.latestAt=J,W=!0;if(!W)return null;return Y[$]=m,{...c,serverAdvice:Y}}async function t5(c,$,Q=Date.now()){try{if(!$.min&&!$.latest)return;let J=TU(await N8(),c,$,Q);if(J)await CQ(J)}catch{}}function fU(c){return c.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.NO_UPDATE_NOTIFIER==="1"}function nU(c){return c.some(($)=>$==="--json"||$.startsWith("--json="))}async function e5(c,$,Q=Date.now()){try{if(fU(process.env))return;let J=await N8(),Y=i0(),X=p$($),m=AQ(J,X,Q);if(m.min&&q0(m.min,Y)){let z=s5(await kJ(d5));process.stderr.write(EU(Y,m.min,z)+`
31
- `);return}if(AU({isTTY:Boolean(process.stdout.isTTY),json:nU(c),env:process.env}))return;let W=FU(J,X,Q);if(!W||!q0(W,Y))return;let G=s5(await kJ(d5));process.stderr.write(bU(Y,W,G)+`
32
- `)}catch{}}function cx(c,$){if(!$)return;let Q=(J)=>{let Y=$[J];return typeof Y==="string"?Y:void 0};t5(p$(c),r5(Q))}var O$="https://api.figura.so";class s0 extends Error{status;payload;constructor(c,$,Q){super($);this.name="FiguraApiError",this.status=c,this.payload=Q}}async function zc(c,$={}){let Q=($.apiUrl||O$).replace(/\/+$/,""),J=c.startsWith("http")?c:`${Q}${c.startsWith("/")?"":"/"}${c}`,Y={Accept:"application/json",...$.headers??{}};if($.token)Y.Authorization=`Bearer ${$.token}`;if($.source)Y["X-Figura-Source"]=$.source;let X;if($.body!==void 0)Y["Content-Type"]="application/json",X=JSON.stringify($.body);let m;try{m=await uJ.request({url:J,method:$.method??"GET",headers:Y,data:X,signal:$.signal,validateStatus:()=>!0,transformRequest:[(z)=>z],transformResponse:[(z)=>z]})}catch(z){let x=z instanceof Error?z.message:String(z);throw new s0(0,`network error: ${x}`)}cx(Q,m.headers);let W=typeof m.data==="string"?m.data:"",G=void 0;if(W)try{G=JSON.parse(W)}catch{G=W}if(m.status<200||m.status>=300){let z=G&&typeof G==="object"&&G!==null&&"error"in G?String(G.error):typeof G==="string"&&G?G:m.statusText||`HTTP ${m.status}`;throw new s0(m.status,z,G)}return G}async function lJ(c,$={}){let Q=($.apiUrl||O$).replace(/\/+$/,""),J=c.startsWith("http")?c:`${Q}${c.startsWith("/")?"":"/"}${c}`,Y={...$.headers??{}};if($.token)Y.Authorization=`Bearer ${$.token}`;if($.source)Y["X-Figura-Source"]=$.source;let X;try{X=await uJ.request({url:J,method:$.method??"GET",headers:Y,signal:$.signal,responseType:"text",validateStatus:()=>!0,transformResponse:[(W)=>W]})}catch(W){let G=W instanceof Error?W.message:String(W);throw new s0(0,`network error: ${G}`)}cx(Q,X.headers);let m=typeof X.data==="string"?X.data:String(X.data??"");if(X.status<200||X.status>=300){let W=X.statusText||`HTTP ${X.status}`;try{let G=JSON.parse(m);if(G&&typeof G==="object"&&"error"in G)W=String(G.error)}catch{}throw new s0(X.status,W)}return m}import{existsSync as uU}from"node:fs";import{homedir as aU}from"node:os";import{dirname as kU,join as lU,relative as hU}from"node:path";var mc="cli";function r(c){let $={},Q=[];for(let J=0;J<c.length;J++){let Y=c[J];if(Y.startsWith("--")){let X=Y.slice(2),m=X.indexOf("=");if(m>=0)$[X.slice(0,m)]=X.slice(m+1);else{let W=c[J+1];if(W!==void 0&&!W.startsWith("--"))$[X]=W,J++;else $[X]=!0}}else Q.push(Y)}return{flags:$,positionals:Q}}function f(c,$){let Q=c[$];return typeof Q==="string"?Q:void 0}function a(c,$){return c[$]===!0||c[$]==="true"}function Qx(c=process.cwd()){let $=c;for(;;){if(uU(lU($,".git")))return!0;let Q=kU($);if(Q===$)return!1;$=Q}}function $x(c){let $=aU();return c.startsWith($)?"~"+c.slice($.length):c}function yU(c,$=process.cwd()){switch(c.tokenSource){case"env":return"→ auth: env FIGURA_TOKEN (team comes from the token)";case"flag":return"→ auth: --token flag (team comes from the token)";case"project":{let Q=c.projectConfigPath,J=hU($,Q);return`→ team: ${c.team??"(unset)"} — ${J.startsWith("..")?$x(Q):J}`}case"global":return`→ team: ${c.team??"(unset)"} — ${$x(S0)} (GLOBAL fallback)`;case"none":return"→ not logged in"}}function oU(c,$){if(c!=="global")return"ok";if($.mutate&&!$.allowGlobal)return"refuse";return"warn"}async function jc(c,$={}){let Q=await j0({tokenFlag:f(c,"token"),apiUrlFlag:f(c,"api-url")});if(!Q.token)I("You're not logged in. Run `figura login` to sign in via your browser.\n For CI or headless use: set FIGURA_TOKEN, or pass --token fig_...");if(!($.announce||$.mutate))return Q;process.stderr.write(yU(Q)+`
33
- `);let Y=oU(Q.tokenSource,{mutate:$.mutate,allowGlobal:a(c,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),X=Q.team?`'${Q.team}'`:"the global config team";if(Y==="refuse")I(`this directory isn't linked to a Figura team, so this would land on ${X} — the
26
+ `),W=X===-1?-1:Y.indexOf(`
27
+ `,X+1),m=W===-1?"":Y.slice(W+1);if(!String(Q.stack).endsWith(m))Q.stack+=`
28
+ `+Y}}catch(X){}}throw Q}}_request(c,$){if(typeof c==="string")$=$||{},$.url=c;else $=c||{};$=T0(this.defaults,$);let{transitional:Q,paramsSerializer:J,headers:Y}=$;if(Q!==void 0)hQ.assertOptions(Q,{silentJSONParsing:tc.transitional(tc.boolean),forcedJSONParsing:tc.transitional(tc.boolean),clarifyTimeoutError:tc.transitional(tc.boolean),legacyInterceptorReqResOrdering:tc.transitional(tc.boolean),advertiseZstdAcceptEncoding:tc.transitional(tc.boolean),validateStatusUndefinedResolves:tc.transitional(tc.boolean)},!1);if(J!=null)if(V.isFunction(J))$.paramsSerializer={serialize:J};else hQ.assertOptions(J,{encode:tc.function,serialize:tc.function},!0);if($.allowAbsoluteUrls!==void 0);else if(this.defaults.allowAbsoluteUrls!==void 0)$.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls;else $.allowAbsoluteUrls=!0;hQ.assertOptions($,{baseUrl:tc.spelling("baseURL"),withXsrfToken:tc.spelling("withXSRFToken")},!0),$.method=($.method||this.defaults.method||"get").toLowerCase();let X=Y&&V.merge(Y.common,Y[$.method]);Y&&V.forEach(["delete","get","head","post","put","patch","query","common"],(N)=>{delete Y[N]}),$.headers=_c.concat(X,Y);let W=[],m=!0;this.interceptors.request.forEach(function(w){if(typeof w.runWhen==="function"&&w.runWhen($)===!1)return;m=m&&w.synchronous;let U=$.transitional||D8;if(U&&U.legacyInterceptorReqResOrdering)W.unshift(w.fulfilled,w.rejected);else W.push(w.fulfilled,w.rejected)});let G=[];this.interceptors.response.forEach(function(w){G.push(w.fulfilled,w.rejected)});let z,x=0,q;if(!m){let N=[WY.bind(this),void 0];N.unshift(...W),N.push(...G),q=N.length,z=Promise.resolve($);while(x<q)z=z.then(N[x++],N[x++]);return z}q=W.length;let M=$;while(x<q){let N=W[x++],w=W[x++];try{M=N(M)}catch(U){w.call(this,U);break}}try{z=WY.call(this,M)}catch(N){return Promise.reject(N)}x=0,q=G.length;while(x<q)z=z.then(G[x++],G[x++]);return z}getUri(c){c=T0(this.defaults,c);let $=y8(c.baseURL,c.url,c.allowAbsoluteUrls,c);return l8($,c.params,c.paramsSerializer)}}var tc,oQ;var Ax=d(()=>{Lc();kJ();Pz();Lx();QY();yJ();Sx();P0();LQ();tc=hQ.validators;V.forEach(["delete","get","head","options"],function($){yQ.prototype[$]=function(Q,J){return this.request(T0(J||{},{method:$,url:Q,data:J&&V.hasOwnProp(J,"data")?J.data:void 0}))}});V.forEach(["post","put","patch","query"],function($){function Q(J){return function(X,W,m){return this.request(T0(m||{},{method:$,headers:J?{"Content-Type":"multipart/form-data"}:{},url:X,data:W}))}}if(yQ.prototype[$]=Q(),$!=="query")yQ.prototype[$+"Form"]=Q(!0)});oQ=yQ});class a9{constructor(c){if(typeof c!=="function")throw TypeError("executor must be a function.");let $;this.promise=new Promise(function(Y){$=Y});let Q=this;this.promise.then((J)=>{if(!Q._listeners)return;let Y=Q._listeners.length;while(Y-- >0)Q._listeners[Y](J);Q._listeners=null}),this.promise.then=(J)=>{let Y,X=new Promise((W)=>{Q.subscribe(W),Y=W}).then(J);return X.cancel=function(){Q.unsubscribe(Y)},X},c(function(Y,X,W){if(Q.reason)return;Q.reason=new w0(Y,X,W),$(Q.reason)})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(c){if(this.reason){c(this.reason);return}if(this._listeners)this._listeners.push(c);else this._listeners=[c]}unsubscribe(c){if(!this._listeners)return;let $=this._listeners.indexOf(c);if($!==-1)this._listeners.splice($,1)}toAbortSignal(){let c=new AbortController,$=(Q)=>{c.abort(Q)};return this.subscribe($),c.signal.unsubscribe=()=>this.unsubscribe($),c.signal}static source(){let c;return{token:new a9(function(J){c=J}),cancel:c}}}var Cx;var Px=d(()=>{h8();Cx=a9});function l9(c){return function(Q){return c.apply(null,Q)}}function h9(c){return V.isObject(c)&&c.isAxiosError===!0}var Ex=d(()=>{Lc()});var y9,bx;var Fx=d(()=>{y9={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,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(y9).forEach(([c,$])=>{y9[$]=c});bx=y9});function Tx(c){let $=new oQ(c),Q=UQ(oQ.prototype.request,$);return V.extend(Q,oQ.prototype,$,{allOwnKeys:!0}),V.extend(Q,$,null,{allOwnKeys:!0}),Q.create=function(Y){return Tx(T0(c,Y))},Q}var fc,GY;var fx=d(()=>{Lc();Ax();QY();lJ();Y9();h8();Px();I$();X0();Ex();P0();u9();Fx();fc=Tx(L$);fc.Axios=oQ;fc.CanceledError=w0;fc.CancelToken=Cx;fc.isCancel=SQ;fc.VERSION=$8;fc.toFormData=K8;fc.AxiosError=O;fc.Cancel=fc.CanceledError;fc.all=function($){return Promise.all($)};fc.spread=l9;fc.isAxiosError=h9;fc.mergeConfig=T0;fc.AxiosHeaders=_c;fc.formToJSON=(c)=>aJ(V.isHTMLForm(c)?new FormData(c):c);fc.getAdapter=XY.getAdapter;fc.HttpStatusCode=bx;fc.default=fc;GY=fc});var nx=d(()=>{fx()});import{readFileSync as _4}from"node:fs";function f0(){try{let c=JSON.parse(_4(new URL("../package.json",import.meta.url),"utf8"));return typeof c.version==="string"?c.version:"0.0.0"}catch{return"0.0.0"}}function O0(c,$){let Q=(X)=>{let W=/^\D*(\d+)\.(\d+)\.(\d+)/.exec(X.trim());return W?[Number(W[1]),Number(W[2]),Number(W[3])]:null},J=Q(c),Y=Q($);if(!J||!Y)return!1;for(let X=0;X<3;X++){if(J[X]>Y[X])return!0;if(J[X]<Y[X])return!1}return!1}var b$=()=>{};var hx={};vQ(hx,{writeProjectConfig:()=>r9,writeConfig:()=>s9,resolveFigsDir:()=>d9,resolveConfig:()=>W0,readConfig:()=>zY,findProjectConfigPath:()=>g9,PROJECT_CONFIG_REL:()=>T$,FIGS_DIR:()=>kx,CONFIG_PATH:()=>R0,CONFIG_DIR:()=>F$});import{promises as gQ}from"node:fs";import{homedir as ux}from"node:os";import{dirname as o9,join as e8}from"node:path";async function ax(c){try{let $=await gQ.readFile(c,"utf8"),Q=JSON.parse($);if(Q&&typeof Q==="object")return Q;return{}}catch{return{}}}async function zY(){return ax(R0)}async function g9(c=process.cwd()){let $=ux(),Q=c;for(;;){if(Q!==$){let Y=e8(Q,T$);try{return await gQ.access(Y),Y}catch{}}let J=o9(Q);if(J===Q)return null;Q=J}}async function d9(c=process.cwd()){let $=await g9(c);if($)return e8(o9($),"figs");return kx}async function lx(c,$){await gQ.mkdir(o9(c),{recursive:!0,mode:448}),await gQ.writeFile(c,JSON.stringify($,null,2)+`
29
+ `,{mode:384}),await gQ.chmod(c,384).catch(()=>{})}async function s9(c){await lx(R0,c)}async function r9(c,$=process.cwd()){let Q=e8($,T$);return await lx(Q,c),Q}async function W0(c={}){let $=await zY(),Q=await g9(c.cwd),J=Q?await ax(Q):{},Y={...$,...J},X=process.env.FIGURA_TOKEN||c.tokenFlag||Y.token||void 0,W=process.env.FIGURA_TOKEN?"env":c.tokenFlag?"flag":J.token?"project":$.token?"global":"none",m=process.env.FIGURA_API_URL||c.apiUrlFlag||Y.apiUrl||f$;return{token:X,apiUrl:m,team:Y.team,config:Y,tokenSource:W,projectConfigPath:Q}}var F$,R0,kx,T$;var i0=d(()=>{v0();F$=e8(ux(),".figura"),R0=e8(F$,"config.json"),kx=e8(F$,"figs"),T$=e8(".figura","config.json")});import{promises as t9}from"node:fs";import{join as S4}from"node:path";function n$(c){try{let $=new URL(c);return`${$.protocol}//${$.host}`.toLowerCase()}catch{return c.trim().toLowerCase().replace(/\/+$/,"")}}function yx(c,$){return typeof c==="number"&&$-c<C4}function dQ(c,$,Q){let J=c.serverAdvice?.[$];if(!J)return{};return{min:yx(J.minAt,Q)?J.min:void 0,latest:yx(J.latestAt,Q)?J.latest:void 0}}async function H8(){try{let c=await t9.readFile(ox,"utf8"),$=JSON.parse(c);return $&&typeof $==="object"?$:{}}catch{return{}}}async function sQ(c){await t9.mkdir(F$,{recursive:!0,mode:448}),await t9.writeFile(ox,JSON.stringify(c,null,2)+`
30
+ `,{mode:384})}function dx(c,$){return typeof c.checkedAt==="number"&&$-c.checkedAt<A4}async function e9(c){let $=new AbortController,Q=setTimeout(()=>$.abort(),c);try{let J=await fetch("https://registry.npmjs.org/figura-cli/latest",{signal:$.signal,headers:{accept:"application/vnd.npm.install-v1+json"}});if(!J.ok)return null;let Y=await J.json();return typeof Y.version==="string"?Y.version:null}catch{return null}finally{clearTimeout(Q)}}var ox,A4=86400000,C4=604800000,gx=21600000;var rQ=d(()=>{i0();ox=S4(F$,"update-check.json")});function P4(c,$=[]){for(let Q=0;Q<c.length;Q++){if(c[Q].startsWith("-"))continue;if(Q>0&&$.includes(c[Q-1]))continue;return{before:c.slice(0,Q),script:c[Q],after:c.slice(Q+1)}}return{before:c,script:void 0,after:[]}}function cW(c,$,Q=[]){return(J)=>{let{before:Y,script:X,after:W}=P4(J,Q);if(X===void 0)return[c,$,...Y];if(W.length>0)return[c,$,...Y,X,"--",...W];return[c,$,...Y,X]}}function tx(c){return{agent:[c,0],run:[c,"run",0],install:[c,"i",0],frozen:[c,"i","--frozen-lockfile",0],global:[c,"add","-g",0],add:[c,"add",0],upgrade:[c,"update",0],"upgrade-interactive":[c,"update","-i",0],dedupe:[c,"dedupe",0],execute:[c,"dlx",0],"execute-local":[c,"exec",0],uninstall:[c,"remove",0],global_uninstall:[c,"remove","--global",0]}}function ex(c,$,Q){let J=$W[c][$];return QW(J,Q)}function QW(c,$){if(c==null)return null;let Q=typeof c==="function"?c($):c.flatMap((J)=>{if(typeof J==="number")return $;return[J]});return{command:Q[0],args:Q.slice(1)}}var E4,rx,b4,sx,F4,T4,f4,n4,u4,$W;var c6=d(()=>{E4={agent:["npm",0],run:cW("npm","run",["-w","--workspace"]),install:["npm","i",0],frozen:["npm","ci",0],global:["npm","i","-g",0],add:["npm","i",0],upgrade:["npm","update",0],"upgrade-interactive":null,dedupe:["npm","dedupe",0],execute:["npx",0],"execute-local":["npx",0],uninstall:["npm","uninstall",0],global_uninstall:["npm","uninstall","-g",0]},rx={agent:["yarn",0],run:["yarn","run",0],install:["yarn","install",0],frozen:["yarn","install","--frozen-lockfile",0],global:["yarn","global","add",0],add:["yarn","add",0],upgrade:["yarn","upgrade",0],"upgrade-interactive":["yarn","upgrade-interactive",0],dedupe:null,execute:["npx",0],"execute-local":cW("yarn","exec"),uninstall:["yarn","remove",0],global_uninstall:["yarn","global","remove",0]},b4={...rx,frozen:["yarn","install","--immutable",0],upgrade:["yarn","up",0],"upgrade-interactive":["yarn","up","-i",0],dedupe:["yarn","dedupe",0],execute:["yarn","dlx",0],"execute-local":["yarn","exec",0],global:["npm","i","-g",0],global_uninstall:["npm","uninstall","-g",0]};sx=tx("pnpm"),F4=tx("rush-pnpm"),T4={agent:["bun",0],run:["bun","run",0],install:["bun","install",0],frozen:["bun","install","--frozen-lockfile",0],global:["bun","add","-g",0],add:["bun","add",0],upgrade:["bun","update",0],"upgrade-interactive":["bun","update","-i",0],dedupe:null,execute:["bun","x",0],"execute-local":["bun","x",0],uninstall:["bun","remove",0],global_uninstall:["bun","remove","-g",0]},f4={agent:["aube",0],run:["aube","run",0],install:["aube","install",0],frozen:["aube","install","--frozen-lockfile",0],global:["aube","add","-g",0],add:["aube","add",0],upgrade:["aube","update",0],"upgrade-interactive":["aube","update","-i",0],dedupe:["aube","dedupe",0],execute:["aube","dlx",0],"execute-local":["aube","exec",0],uninstall:["aube","remove",0],global_uninstall:["aube","remove","-g",0]},n4={agent:["deno",0],run:["deno","task",0],install:["deno","install",0],frozen:["deno","install","--frozen",0],global:["deno","install","-g",0],add:["deno","add",0],upgrade:["deno","outdated","--update",0],"upgrade-interactive":["deno","outdated","--update",0],dedupe:null,execute:["deno","x",0],"execute-local":["deno","task","--eval",0],uninstall:["deno","remove",0],global_uninstall:["deno","uninstall","-g",0]},u4={agent:["nub",0],run:["nub","run",0],install:["nub","install",0],frozen:["nub","install","--frozen-lockfile",0],global:["nub","add","-g",0],add:["nub","add",0],upgrade:["nub","update",0],"upgrade-interactive":["nub","update","-i",0],dedupe:["nub","dedupe",0],execute:["nubx",0],"execute-local":["nub","exec",0],uninstall:["nub","remove",0],global_uninstall:["nub","remove","-g",0]},$W={npm:E4,yarn:rx,"yarn@berry":b4,pnpm:sx,"pnpm@6":{...sx,run:cW("pnpm","run",["-F","--filter"])},"pnpm-rush":F4,bun:T4,aube:f4,deno:n4,nub:u4}});var tQ,eQ,cJ,$6;var JW=d(()=>{tQ=["npm","yarn","yarn@berry","pnpm","pnpm@6","pnpm-rush","bun","deno","nub","aube"],eQ={"aube-lock.yaml":"aube","aube-workspace.yaml":"aube","bun.lock":"bun","bun.lockb":"bun","deno.lock":"deno","nub.lock":"nub","pnpm-lock.yaml":"pnpm","pnpm-workspace.yaml":"pnpm","yarn.lock":"yarn","package-lock.json":"npm","npm-shrinkwrap.json":"npm"},cJ={"node_modules/.aube/":"aube","node_modules/.deno/":"deno","node_modules/.pnpm/":"pnpm","node_modules/.yarn-state.yml":"yarn","node_modules/.yarn_integrity":"yarn","node_modules/.package-lock.json":"npm",".pnp.cjs":"yarn",".pnp.js":"yarn","bun.lock":"bun","bun.lockb":"bun"},$6={aube:"https://aube.en.dev/installation",bun:"https://bun.sh",deno:"https://deno.com",pnpm:"https://pnpm.io/installation","pnpm@6":"https://pnpm.io/6.x/installation","pnpm-rush":"https://rushjs.io/pages/intro/get_started/",yarn:"https://classic.yarnpkg.com/en/docs/install","yarn@berry":"https://yarnpkg.com/getting-started/install",npm:"https://docs.npmjs.com/cli/configuring-npm/install",nub:"https://nubjs.com/docs/install"}});import J6 from"node:fs/promises";import J8 from"node:path";import Y6 from"node:process";async function xY(c,$){try{let Q=await J6.stat(c);return $==="file"?Q.isFile():Q.isDirectory()}catch{return!1}}function X6(){let c=Y6.env.npm_config_user_agent;if(!c)return null;let $=c.split("/")[0];return tQ.includes($)?$:null}function*k4(c=Y6.cwd()){let $=J8.resolve(c),{root:Q}=J8.parse($);while($&&$!==Q)yield $,$=J8.dirname($)}async function Q6(c,$){if(!c||!await xY(c,"file"))return null;return await l4(c,$)}async function W6(c={}){let{cwd:$,strategies:Q=["lockfile","packageManager-field","devEngines-field"]}=c,J;if(typeof c.stopDir==="string"){let Y=J8.resolve(c.stopDir);J=(X)=>X===Y}else J=c.stopDir;for(let Y of k4($)){for(let X of Q)switch(X){case"lockfile":{if(await xY(J8.join(Y,"rush.json"),"file"))return{name:"pnpm",agent:"pnpm-rush"};for(let W of Object.keys(eQ))if(await xY(J8.join(Y,W),"file")){let m=eQ[W],G=await Q6(J8.join(Y,"package.json"),c);if(G)return G;else return{name:m,agent:m}}break}case"packageManager-field":case"devEngines-field":{let W=await Q6(J8.join(Y,"package.json"),c);if(W)return W;break}case"install-metadata":{for(let W of Object.keys(cJ)){let m=W.endsWith("/")?"dir":"file";if(await xY(J8.join(Y,W),m)){let G=cJ[W],z=G==="yarn"?h4(W)?"yarn":"yarn@berry":G;return{name:G,agent:z}}}break}}if(J?.(Y))break}return null}function a4(c){let $=(Q)=>Q?.match(/\d+(\.\d+){0,2}/)?.[0]??Q;if(typeof c.packageManager==="string"){let[Q,J]=c.packageManager.replace(/^\^/,"").split("@");return{name:Q,ver:$(J)}}if(typeof c.devEngines?.packageManager?.name==="string")return{name:c.devEngines.packageManager.name,ver:$(c.devEngines.packageManager.version)};return}async function l4(c,$){try{let Q=await J6.readFile(c,"utf8"),J=$.packageJsonParser?await $.packageJsonParser(Q,c):JSON.parse(Q),Y,X=a4(J);if(X){let{name:W,ver:m}=X,G=m;if(W==="yarn"&&m&&Number.parseInt(m)>1)return Y="yarn@berry",G="berry",{name:W,agent:Y,version:G};else if(W==="pnpm"&&m&&Number.parseInt(m)<7)return Y="pnpm@6",{name:W,agent:Y,version:G};else if(tQ.includes(W))return Y=W,{name:W,agent:Y,version:G};else return $.onUnknown?.(J.packageManager)??null}}catch{}return null}function h4(c){return c.endsWith(".yarn_integrity")}var m6=d(()=>{JW()});var G6={};vQ(G6,{resolveCommand:()=>ex,getUserAgent:()=>X6,detect:()=>W6,constructCommand:()=>QW,LOCKS:()=>eQ,INSTALL_PAGE:()=>$6,INSTALL_METADATA:()=>cJ,COMMANDS:()=>$W,AGENTS:()=>tQ});var z6=d(()=>{c6();JW();m6()});import{existsSync as y4}from"node:fs";import{delimiter as o4,join as g4}from"node:path";import{fileURLToPath as d4}from"node:url";function s4(c){if(!c.isTTY)return"stdout-not-tty";if(c.json)return"json";if(c.env.CI)return"ci";if(c.env.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.env.NO_UPDATE_NOTIFIER==="1")return"opt-out";return null}function r4(c){let $=c.replace(/\\/g,"/");if($.includes("/.bun/"))return"bun";if($.includes("/pnpm/")||$.includes("/.pnpm/"))return"pnpm";if($.includes("/.volta/"))return"volta";if($.includes("/node_modules/"))return"npm";return null}function t4(c=process.env,$=y4){let Q=(c.PATH??"").split(o4).filter(Boolean),J=process.platform==="win32"?["npm.cmd","npm.exe","npm"]:["npm"];return Q.some((Y)=>J.some((X)=>$(g4(Y,X))))}async function qY(c,$="latest",Q,J,Y=d4(import.meta.url)){let X=await Promise.resolve().then(() => (z6(),G6)),W=(x)=>{let q=X.resolveCommand(x,"global",[`${c}@${$}`]);return q?{command:`${q.command} ${q.args.join(" ")}`,generic:!1}:null},m=Q!==void 0?Q:X.getUserAgent()??null;if(m){let x=W(m);if(x)return x}let G=r4(Y);if(G==="volta")return{command:`volta install ${c}@${$}`,generic:!1};if(G){let x=W(G);if(x)return x}let z=J??t4();return{command:`npm i -g ${c}@${$}`,generic:!z}}function q6(c){return c.generic?`Update with your package manager's global install, e.g. ${c.command}`:`Run: ${c.command}`}function e4(c,$,Q){return`⚠ figura ${c} → ${$} available. ${Q}`}function cj(c,$,Q){return`⚠ figura ${c} is below the minimum supported ${$} — `+`some commands may fail. ${Q}`}function $j(c,$,Q){let J=c.latest,Y=dQ(c,$,Q).latest;if(J&&Y)return O0(Y,J)?Y:J;return J??Y}function M6(c){let $=c("x-figura-min-cli")?.trim(),Q=c("x-figura-latest-cli")?.trim();return{min:$||void 0,latest:Q||void 0}}function Qj(c,$,Q,J){if(!Q.min&&!Q.latest)return null;let Y={...c.serverAdvice??{}},X=Y[$]??{},W={...X},m=!1,G=(z)=>typeof z!=="number"||J-z>=gx;if(Q.min&&(X.min!==Q.min||G(X.minAt)))W.min=Q.min,W.minAt=J,m=!0;if(Q.latest&&(X.latest!==Q.latest||G(X.latestAt)))W.latest=Q.latest,W.latestAt=J,m=!0;if(!m)return null;return Y[$]=W,{...c,serverAdvice:Y}}async function N6(c,$,Q=Date.now()){try{if(!$.min&&!$.latest)return;let J=Qj(await H8(),c,$,Q);if(J)await sQ(J)}catch{}}function Jj(c){return c.FIGURA_NO_UPDATE_NOTIFIER==="1"||c.NO_UPDATE_NOTIFIER==="1"}function Yj(c){return c.some(($)=>$==="--json"||$.startsWith("--json="))}async function V6(c,$,Q=Date.now()){try{if(Jj(process.env))return;let J=await H8(),Y=f0(),X=n$($),W=dQ(J,X,Q);if(W.min&&O0(W.min,Y)){let z=q6(await qY(x6));process.stderr.write(cj(Y,W.min,z)+`
31
+ `);return}if(s4({isTTY:Boolean(process.stdout.isTTY),json:Yj(c),env:process.env}))return;let m=$j(J,X,Q);if(!m||!O0(m,Y))return;let G=q6(await qY(x6));process.stderr.write(e4(Y,m,G)+`
32
+ `)}catch{}}var x6="figura-cli";var MY=d(()=>{b$();rQ()});function w6(c,$){if(!$)return;let Q=(J)=>{let Y=$[J];return typeof Y==="string"?Y:void 0};N6(n$(c),M6(Q))}async function Wc(c,$={}){let Q=($.apiUrl||f$).replace(/\/+$/,""),J=c.startsWith("http")?c:`${Q}${c.startsWith("/")?"":"/"}${c}`,Y={Accept:"application/json",...$.headers??{}};if($.token)Y.Authorization=`Bearer ${$.token}`;if($.source)Y["X-Figura-Source"]=$.source;let X;if($.body!==void 0)Y["Content-Type"]="application/json",X=JSON.stringify($.body);let W;try{W=await GY.request({url:J,method:$.method??"GET",headers:Y,data:X,signal:$.signal,validateStatus:()=>!0,transformRequest:[(z)=>z],transformResponse:[(z)=>z]})}catch(z){let x=z instanceof Error?z.message:String(z);throw new Y8(0,`network error: ${x}`)}w6(Q,W.headers);let m=typeof W.data==="string"?W.data:"",G=void 0;if(m)try{G=JSON.parse(m)}catch{G=m}if(W.status<200||W.status>=300){let z=G&&typeof G==="object"&&G!==null&&"error"in G?String(G.error):typeof G==="string"&&G?G:W.statusText||`HTTP ${W.status}`;throw new Y8(W.status,z,G)}return G}async function NY(c,$={}){let Q=($.apiUrl||f$).replace(/\/+$/,""),J=c.startsWith("http")?c:`${Q}${c.startsWith("/")?"":"/"}${c}`,Y={...$.headers??{}};if($.token)Y.Authorization=`Bearer ${$.token}`;if($.source)Y["X-Figura-Source"]=$.source;let X;try{X=await GY.request({url:J,method:$.method??"GET",headers:Y,signal:$.signal,responseType:"text",validateStatus:()=>!0,transformResponse:[(m)=>m]})}catch(m){let G=m instanceof Error?m.message:String(m);throw new Y8(0,`network error: ${G}`)}w6(Q,X.headers);let W=typeof X.data==="string"?X.data:String(X.data??"");if(X.status<200||X.status>=300){let m=X.statusText||`HTTP ${X.status}`;try{let G=JSON.parse(W);if(G&&typeof G==="object"&&"error"in G)m=String(G.error)}catch{}throw new Y8(X.status,m)}return W}var f$="https://api.figura.so",Y8;var v0=d(()=>{nx();MY();rQ();Y8=class Y8 extends Error{status;payload;constructor(c,$,Q){super($);this.name="FiguraApiError",this.status=c,this.payload=Q}}});var mW={};vQ(mW,{verifySkillPayload:()=>Oj,materializeSkill:()=>Rj,hashSkillFiles:()=>O6,hashPayload:()=>R6,fetchLatestSkill:()=>iY,SkillPathTraversalError:()=>wY,SkillHashMismatchError:()=>WW});import{createHash as wj,randomBytes as ij}from"node:crypto";import{mkdirSync as vj,renameSync as Uj,rmSync as B6,writeFileSync as jj}from"node:fs";import{dirname as Kj,isAbsolute as Dj,join as Bj,relative as Hj,resolve as XW,sep as H6}from"node:path";function O6(c){if(c.length===0)return null;let $=[...c].sort((J,Y)=>J.path<Y.path?-1:J.path>Y.path?1:0),Q=wj("sha256");for(let J of $)Q.update(J.path),Q.update("\x00"),Q.update(J.content,"utf8"),Q.update("\x00");return Q.digest("hex").slice(0,16)}function R6(c){return O6(Object.entries(c.files).map(([$,Q])=>({path:$,content:Q})))}async function iY(c,$={}){let Q=$.signal??($.timeoutMs?AbortSignal.timeout($.timeoutMs):AbortSignal.timeout(4000));try{return await Wc(`/v1/skills/${encodeURIComponent(c)}/latest`,{apiUrl:$.apiUrl,token:$.token,source:"cli",signal:Q})}catch{return null}}function Oj(c){let $=R6(c);if($!==c.hash)throw new WW(c.skill,c.hash,$);return c}function Rj(c,$){let Q=XW(c,$.skill),J=$.skill+"/",Y=[];for(let[W,m]of Object.entries($.files)){if(!W.startsWith(J))throw new wY($.skill,W);let G=W.slice(J.length),z=XW(Q,G.split("/").join(H6)),x=Hj(Q,z);if(x===""||x.startsWith("..")||Dj(x))throw new wY($.skill,W);Y.push({relInSkill:G,content:m})}if(Y.length===0)return $.skill;let X=XW(c,`.${$.skill}.tmp-${ij(6).toString("hex")}`);try{for(let{relInSkill:W,content:m}of Y){let G=Bj(X,W.split("/").join(H6));vj(Kj(G),{recursive:!0}),jj(G,m)}B6(Q,{recursive:!0,force:!0}),Uj(X,Q)}finally{B6(X,{recursive:!0,force:!0})}return $.skill}var WW,wY;var vY=d(()=>{v0();WW=class WW extends Error{skill;served;computed;constructor(c,$,Q){super(`skill '${c}' failed hash verification (served ${$}, computed ${Q??"null"}) — refusing to install`);this.skill=c;this.served=$;this.computed=Q;this.name="SkillHashMismatchError"}};wY=class wY extends Error{skill;badPath;constructor(c,$){super(`skill '${c}' payload carries an unsafe path '${$}' — refusing to install`);this.skill=c;this.badPath=$;this.name="SkillPathTraversalError"}}});v0();i0();import{spawn as QK}from"node:child_process";import{join as JK}from"node:path";v0();i0();import{existsSync as Xj}from"node:fs";import{homedir as Wj}from"node:os";import{dirname as mj,join as Gj,relative as zj}from"node:path";var Gc="cli";function t(c){let $={},Q=[];for(let J=0;J<c.length;J++){let Y=c[J];if(Y.startsWith("--")){let X=Y.slice(2),W=X.indexOf("=");if(W>=0)$[X.slice(0,W)]=X.slice(W+1);else{let m=c[J+1];if(m!==void 0&&!m.startsWith("--"))$[X]=m,J++;else $[X]=!0}}else Q.push(Y)}return{flags:$,positionals:Q}}function f(c,$){let Q=c[$];return typeof Q==="string"?Q:void 0}function k(c,$){return c[$]===!0||c[$]==="true"}function v6(c=process.cwd()){let $=c;for(;;){if(Xj(Gj($,".git")))return!0;let Q=mj($);if(Q===$)return!1;$=Q}}function i6(c){let $=Wj();return c.startsWith($)?"~"+c.slice($.length):c}function xj(c,$=process.cwd()){switch(c.tokenSource){case"env":return"→ auth: env FIGURA_TOKEN (team comes from the token)";case"flag":return"→ auth: --token flag (team comes from the token)";case"project":{let Q=c.projectConfigPath,J=zj($,Q);return`→ team: ${c.team??"(unset)"} — ${J.startsWith("..")?i6(Q):J}`}case"global":return`→ team: ${c.team??"(unset)"} — ${i6(R0)} (GLOBAL fallback)`;case"none":return"→ not logged in"}}function qj(c,$){if(c!=="global")return"ok";if($.mutate&&!$.allowGlobal)return"refuse";return"warn"}async function Kc(c,$={}){let Q=await W0({tokenFlag:f(c,"token"),apiUrlFlag:f(c,"api-url")});if(!Q.token)I("You're not logged in. Run `figura login` to sign in via your browser.\n For CI or headless use: set FIGURA_TOKEN, or pass --token fig_...");if(!($.announce||$.mutate))return Q;process.stderr.write(xj(Q)+`
33
+ `);let Y=qj(Q.tokenSource,{mutate:$.mutate,allowGlobal:k(c,"allow-global")||process.env.FIGURA_ALLOW_GLOBAL==="1"}),X=Q.team?`'${Q.team}'`:"the global config team";if(Y==="refuse")I(`this directory isn't linked to a Figura team, so this would land on ${X} — the
34
34
  `+` global credential's team, not necessarily this project's. Run \`figura link\` to
35
35
  bind it to its own team, or pass --allow-global to use ${X} anyway.`);if(Y==="warn")process.stderr.write(`figura: warning: using the GLOBAL credential (team ${X}) — nothing pins this `+"directory to that team. Run `figura link` to bind it.\n");return Q}function I(c){process.stderr.write(`figura: ${c}
36
- `),process.exit(1)}function y(c){if(c instanceof s0)return c.status?`${c.message} (HTTP ${c.status})`:c.message;if(c instanceof Error)return c.message;return String(c)}function Nc(c){process.stdout.write(JSON.stringify(c,null,2)+`
37
- `)}import{promises as Jx}from"node:fs";import{join as gU}from"node:path";var l8=".mcp.json",hJ={command:"figura",args:["mcp"]};function dU(c){if(!c||typeof c!=="object")return!1;let $=c;return $.command===hJ.command&&Array.isArray($.args)&&$.args.length===hJ.args.length&&$.args.every((Q,J)=>Q===hJ.args[J])}async function Yx(c=process.cwd()){let $=gU(c,l8),Q={},J=!1;try{let W=await Jx.readFile($,"utf8");J=!0;let G=JSON.parse(W);if(!G||typeof G!=="object"||Array.isArray(G))return{status:"unparsable",path:$};Q=G}catch(W){if(J)return{status:"unparsable",path:$};if(W.code!=="ENOENT")return{status:"unparsable",path:$}}let Y=Q.mcpServers&&typeof Q.mcpServers==="object"?Q.mcpServers:{};if(dU(Y.figura))return{status:"present",path:$};let X="figura"in Y?"updated":"added",m={...Q,mcpServers:{...Y,figura:{...hJ}}};return await Jx.writeFile($,JSON.stringify(m,null,2)+`
38
- `),{status:X,path:$}}import{promises as D9}from"node:fs";import{join as sU}from"node:path";function Xx(c){return c.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function mx(c,$=process.cwd(),Q){let J=sU($,".gitignore"),Y=Xx(c),X=Q==null?[]:Array.isArray(Q)?Q:[Q],m=X.map((x)=>`# ${x}`).join(`
36
+ `),process.exit(1)}function y(c){if(c instanceof Y8)return c.status?`${c.message} (HTTP ${c.status})`:c.message;if(c instanceof Error)return c.message;return String(c)}function ic(c){process.stdout.write(JSON.stringify(c,null,2)+`
37
+ `)}import{promises as U6}from"node:fs";import{join as Mj}from"node:path";var c$=".mcp.json",VY={command:"figura",args:["mcp"]};function Nj(c){if(!c||typeof c!=="object")return!1;let $=c;return $.command===VY.command&&Array.isArray($.args)&&$.args.length===VY.args.length&&$.args.every((Q,J)=>Q===VY.args[J])}async function j6(c=process.cwd()){let $=Mj(c,c$),Q={},J=!1;try{let m=await U6.readFile($,"utf8");J=!0;let G=JSON.parse(m);if(!G||typeof G!=="object"||Array.isArray(G))return{status:"unparsable",path:$};Q=G}catch(m){if(J)return{status:"unparsable",path:$};if(m.code!=="ENOENT")return{status:"unparsable",path:$}}let Y=Q.mcpServers&&typeof Q.mcpServers==="object"?Q.mcpServers:{};if(Nj(Y.figura))return{status:"present",path:$};let X="figura"in Y?"updated":"added",W={...Q,mcpServers:{...Y,figura:{...VY}}};return await U6.writeFile($,JSON.stringify(W,null,2)+`
38
+ `),{status:X,path:$}}import{promises as YW}from"node:fs";import{join as Vj}from"node:path";function K6(c){return c.trim().replace(/^\/+/,"").replace(/\/+$/,"")}async function D6(c,$=process.cwd(),Q){let J=Vj($,".gitignore"),Y=K6(c),X=Q==null?[]:Array.isArray(Q)?Q:[Q],W=X.map((x)=>`# ${x}`).join(`
39
39
  `)+(X.length?`
40
40
  `:"")+c+`
41
- `,W=null;try{W=await D9.readFile(J,"utf8")}catch{W=null}if(W===null)return await D9.writeFile(J,m),"created";if(W.split(`
42
- `).map((x)=>x.trim()).filter((x)=>x&&!x.startsWith("#")).some((x)=>Xx(x)===Y))return"present";let z="";if(W!==""){if(!W.endsWith(`
41
+ `,m=null;try{m=await YW.readFile(J,"utf8")}catch{m=null}if(m===null)return await YW.writeFile(J,W),"created";if(m.split(`
42
+ `).map((x)=>x.trim()).filter((x)=>x&&!x.startsWith("#")).some((x)=>K6(x)===Y))return"present";let z="";if(m!==""){if(!m.endsWith(`
43
43
  `))z+=`
44
- `;if(X.length&&!W.endsWith(`
44
+ `;if(X.length&&!m.endsWith(`
45
45
 
46
46
  `))z+=`
47
- `}return await D9.writeFile(J,W+z+m),"added"}import{homedir as D4}from"node:os";import{join as Rx}from"node:path";import{createHash as rU}from"node:crypto";import{existsSync as R$,mkdirSync as tU,readdirSync as I$,readFileSync as O9,writeFileSync as Wx,copyFileSync as eU,rmSync as B9}from"node:fs";import{homedir as H9}from"node:os";import{fileURLToPath as Gx}from"node:url";import{dirname as c4,join as Zc,relative as $4,sep as Q4}from"node:path";var p9=".figura-version",R9=".figura-skills-hash";function yJ(c){try{return O9(Zc(c,p9),"utf8").trim()||null}catch{return null}}function I9(c){try{return O9(Zc(c,R9),"utf8").trim()||null}catch{return null}}function FQ(c){let $=[],Q=(Y)=>{for(let X of I$(Y,{withFileTypes:!0})){let m=Zc(Y,X.name);if(X.isDirectory())Q(m);else if(X.isFile())$.push(m)}};try{for(let Y of I$(c,{withFileTypes:!0}))if(Y.isDirectory()&&Z9(Y.name))Q(Zc(c,Y.name))}catch{return null}if($.length===0)return null;let J=rU("sha256");for(let Y of $.sort()){let X=$4(c,Y).split(Q4).join("/");J.update(X),J.update("\x00"),J.update(O9(Y)),J.update("\x00")}return J.digest("hex").slice(0,16)}function oJ(){try{return FQ(ix())}catch{return null}}function L9(c){let{stamp:$,installedHash:Q,bundledHash:J,cliVersion:Y}=c;if(Q==null)return"absent";if(J!=null&&Q===J&&$===Y)return"pristine";if($!=null&&q0(Y,$))return"stale";return"modified"}function J4(c=Zc(H9(),".claude","skills")){let $=yJ(c),Q=FQ(c),J=oJ(),Y=L9({stamp:$,installedHash:Q,bundledHash:J,cliVersion:i0()});return{version:$,hash:Q,status:Y}}function xx(){return{channel:"cli",cliVersion:i0(),skill:J4()}}var Y4=`figura skill — install Figura's Claude Code skills
47
+ `}return await YW.writeFile(J,m+z+W),"added"}import{homedir as tj}from"node:os";import{join as a6}from"node:path";import{createHash as pj}from"node:crypto";import{existsSync as O8,mkdirSync as Ij,readdirSync as $$,readFileSync as xW,writeFileSync as UY,copyFileSync as Zj,rmSync as GW}from"node:fs";import{homedir as zW}from"node:os";import{fileURLToPath as p6}from"node:url";import{dirname as Lj,join as Ic,relative as _j,sep as Sj}from"node:path";b$();var jY=".figura-version",qW=".figura-skills-hash";function KY(c){try{return xW(Ic(c,jY),"utf8").trim()||null}catch{return null}}function Aj(c,$=HY){let Q=[],J=(X)=>{for(let W of $$(X,{withFileTypes:!0})){let m=Ic(X,W.name);if(W.isDirectory())J(m);else if(W.isFile())Q.push(m)}};try{for(let X of $$(c,{withFileTypes:!0}))if(X.isDirectory()&&$(X.name))J(Ic(c,X.name))}catch{return null}if(Q.length===0)return null;let Y=pj("sha256");for(let X of Q.sort()){let W=_j(c,X).split(Sj).join("/");Y.update(W),Y.update("\x00"),Y.update(xW(X)),Y.update("\x00")}return Y.digest("hex").slice(0,16)}var u$="fig";function Q$(c){return Aj(c,($)=>$===u$)}function DY(){try{return Q$(BY())}catch{return null}}function Cj(c){try{return JSON.parse(xW(Ic(c,"skills.json"),"utf8"))}catch{return null}}function k$(c=u$){try{return Cj(BY())?.skills?.[c]?.version??null}catch{return null}}function MW(c){let{stamp:$,installedHash:Q,bundledHash:J,referenceVersion:Y}=c;if(Q==null)return"absent";if(J!=null&&Q===J&&$===Y)return"pristine";if($!=null&&Y!=null&&O0(Y,$))return"stale";return"modified"}function Pj(c=Ic(zW(),".claude","skills")){let $=KY(c),Q=Q$(c),J=DY(),Y=MW({stamp:$,installedHash:Q,bundledHash:J,referenceVersion:k$()});return{version:$,hash:Q,status:Y}}function Z6(){return{channel:"cli",cliVersion:f0(),skill:Pj()}}var Ej=`figura skill — install Figura's Claude Code skills
48
48
 
49
49
  Usage:
50
50
  figura skill install [--project] [--dir <path>]
@@ -58,41 +58,44 @@ Options:
58
58
  --dir <path> Install into a custom skills directory
59
59
  --help, -h Show this help
60
60
 
61
- Default target: ~/.claude/skills/`;function zx(c){try{return I$(c,{withFileTypes:!0}).some(($)=>$.isDirectory()&&R$(Zc(c,$.name,"SKILL.md")))}catch{return!1}}function ix(){let c=[new URL("../skills/",import.meta.url),new URL("../../skills/",import.meta.url)].map((Q)=>Gx(Q));for(let Q of c)if(zx(Q))return Q;let $=Gx(new URL("./",import.meta.url));for(let Q=0;Q<8;Q++){let J=Zc($,".claude","skills");if(zx(J))return J;let Y=c4($);if(Y===$)break;$=Y}I(`bundled skills not found — reinstall figura-cli:
62
- `+" curl -fsSL https://figura.so/install.sh | bash")}function qx(c,$){tU($,{recursive:!0});for(let Q of I$(c,{withFileTypes:!0})){let J=Zc(c,Q.name),Y=Zc($,Q.name);if(Q.isDirectory())qx(J,Y);else eU(J,Y)}}var Z9=(c)=>c==="fig"||c.startsWith("figura-");function TQ(c){let $=ix(),J=I$($,{withFileTypes:!0}).filter((Y)=>Y.isDirectory()&&Z9(Y.name)&&R$(Zc($,Y.name,"SKILL.md"))).map((Y)=>Y.name).sort().map((Y)=>{let X=Zc(c,Y),m=R$(Zc(X,"SKILL.md"));return qx(Zc($,Y),X),{name:Y,existed:m}});if(J.length){try{Wx(Zc(c,p9),i0()+`
63
- `)}catch{}try{let Y=FQ($);if(Y)Wx(Zc(c,R9),Y+`
64
- `)}catch{}}return{baseDir:c,installed:J}}function Mx(c){let $=[],Q=[];try{Q=I$(c,{withFileTypes:!0}).filter((J)=>J.isDirectory()&&Z9(J.name)).map((J)=>J.name)}catch{return{removed:$}}for(let J of Q.sort()){let Y=Zc(c,J);if(!R$(Zc(Y,"SKILL.md")))continue;try{B9(Y,{recursive:!0,force:!0}),$.push(J)}catch{}}if($.length)for(let J of[p9,R9])try{B9(Zc(c,J),{force:!0})}catch{}return{removed:$}}async function Vx(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(a($,"help")||a($,"h")||!J){process.stdout.write(Y4+`
65
- `);return}if(J!=="install")I(`unknown subcommand 'skill ${J}'. Run \`figura skill --help\`.`);let Y=a($,"project"),X=f($,"dir")??(Y?Zc(process.cwd(),".claude","skills"):Zc(H9(),".claude","skills")),{installed:m}=TQ(X),W=m.map((z)=>z.name),G=m.map(({name:z,existed:x})=>` ${x?"updated":"installed"} ${z}`);if(W.includes("fig")){let z=new Set([Zc(X,"figura-fig"),Zc(H9(),".claude","skills","figura-fig")]);for(let i of z)if(R$(Zc(i,"SKILL.md")))B9(i,{recursive:!0,force:!0}),G.push(` removed figura-fig (renamed → fig) — ${i}`);let x=Zc(process.cwd(),".claude","skills","figura-fig");if(!z.has(x)&&R$(Zc(x,"SKILL.md")))G.push(` note: found ${x} (the old /figura-fig skill) — run \`figura skill install --project\` to replace it, then commit the removal`)}process.stdout.write(`Figura skills → ${X}
66
- `+G.join(`
61
+ Default target: ~/.claude/skills/`;function I6(c){try{return $$(c,{withFileTypes:!0}).some(($)=>$.isDirectory()&&O8(Ic(c,$.name,"SKILL.md")))}catch{return!1}}function BY(){let c=[new URL("../skills/",import.meta.url),new URL("../../skills/",import.meta.url)].map((Q)=>p6(Q));for(let Q of c)if(I6(Q))return Q;let $=p6(new URL("./",import.meta.url));for(let Q=0;Q<8;Q++){let J=Ic($,".claude","skills");if(I6(J))return J;let Y=Lj($);if(Y===$)break;$=Y}I(`bundled skills not found — reinstall figura-cli:
62
+ `+" curl -fsSL https://figura.so/install.sh | bash")}function L6(c,$){Ij($,{recursive:!0});for(let Q of $$(c,{withFileTypes:!0})){let J=Ic(c,Q.name),Y=Ic($,Q.name);if(Q.isDirectory())L6(J,Y);else Zj(J,Y)}}var HY=(c)=>c==="fig"||c.startsWith("figura-");function NW(c){let $=BY(),J=$$($,{withFileTypes:!0}).filter((Y)=>Y.isDirectory()&&HY(Y.name)&&O8(Ic($,Y.name,"SKILL.md"))).map((Y)=>Y.name).sort().map((Y)=>{let X=Ic(c,Y),W=O8(Ic(X,"SKILL.md"));return L6(Ic($,Y),X),{name:Y,existed:W}});if(J.length){try{let Y=k$();if(Y)UY(Ic(c,jY),Y+`
63
+ `)}catch{}try{let Y=Q$($);if(Y)UY(Ic(c,qW),Y+`
64
+ `)}catch{}}return{baseDir:c,installed:J}}async function VW(c,$={}){let{fetchLatestSkill:Q,verifySkillPayload:J,materializeSkill:Y,SkillHashMismatchError:X}=await Promise.resolve().then(() => (vY(),mW)),W=BY(),m=$$(W,{withFileTypes:!0}).filter((G)=>G.isDirectory()&&HY(G.name)&&O8(Ic(W,G.name,"SKILL.md"))).map((G)=>G.name).sort();try{let G=[];for(let q of m){let M=await Q(q,$);if(!M)throw Error(`engine unreachable for skill '${q}'`);J(M),G.push(M)}let z=G.map((q)=>{let M=O8(Ic(c,q.skill,"SKILL.md"));return Y(c,q),{name:q.skill,existed:M}}),x=G.find((q)=>q.skill===u$)?.version??G[0]?.version??null;if(z.length&&x){try{UY(Ic(c,jY),x+`
65
+ `)}catch{}try{let q=Q$(c);if(q)UY(Ic(c,qW),q+`
66
+ `)}catch{}}return{baseDir:c,installed:z,source:"engine",version:x}}catch(G){if(G instanceof X)throw G;return{...NW(c),source:"bundled",version:k$()}}}function _6(c){let $=[],Q=[];try{Q=$$(c,{withFileTypes:!0}).filter((J)=>J.isDirectory()&&HY(J.name)).map((J)=>J.name)}catch{return{removed:$}}for(let J of Q.sort()){let Y=Ic(c,J);if(!O8(Ic(Y,"SKILL.md")))continue;try{GW(Y,{recursive:!0,force:!0}),$.push(J)}catch{}}if($.length)for(let J of[jY,qW])try{GW(Ic(c,J),{force:!0})}catch{}return{removed:$}}async function S6(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(k($,"help")||k($,"h")||!J){process.stdout.write(Ej+`
67
+ `);return}if(J!=="install")I(`unknown subcommand 'skill ${J}'. Run \`figura skill --help\`.`);let Y=k($,"project"),X=f($,"dir")??(Y?Ic(process.cwd(),".claude","skills"):Ic(zW(),".claude","skills")),{resolveConfig:W}=await Promise.resolve().then(() => (i0(),hx)),{apiUrl:m,token:G}=await W({apiUrlFlag:f($,"api-url"),tokenFlag:f($,"token")}),z,x;try{let N=await VW(X,{apiUrl:m,token:G});z=N.installed,x=N.source}catch(N){let{SkillHashMismatchError:w}=await Promise.resolve().then(() => (vY(),mW));if(N instanceof w)I(`${N.message}
68
+ `+"The engine served a skill whose content did not match its hash — your "+"existing skill was left untouched. Retry later; if it persists, report it.");throw N}let q=z.map((N)=>N.name),M=z.map(({name:N,existed:w})=>` ${w?"updated":"installed"} ${N}${x==="engine"?"":" (bundled — engine unreachable)"}`);if(q.includes("fig")){let N=new Set([Ic(X,"figura-fig"),Ic(zW(),".claude","skills","figura-fig")]);for(let U of N)if(O8(Ic(U,"SKILL.md")))GW(U,{recursive:!0,force:!0}),M.push(` removed figura-fig (renamed → fig) — ${U}`);let w=Ic(process.cwd(),".claude","skills","figura-fig");if(!N.has(w)&&O8(Ic(w,"SKILL.md")))M.push(` note: found ${w} (the old /figura-fig skill) — run \`figura skill install --project\` to replace it, then commit the removal`)}process.stdout.write(`Figura skills → ${X}
69
+ `+M.join(`
67
70
  `)+'\nClaude Code loads them automatically. Try `/fig <a screen>`, or ask it to "introduce this repo to Figura".\n'+(Y?`Commit .claude/skills/ to share them with your team.
68
- `:"")+"Re-run `figura skill install` after upgrading figura-cli to update.\n")}import{promises as L$}from"node:fs";import{homedir as _9}from"node:os";import{join as S9}from"node:path";var K0=S9(_9(),".claude","settings.json"),gJ="figura doctor --session-start",X4=`figura hook install — keep Figura current on every Claude Code launch
71
+ `:"")+"Re-run `figura skill install` after upgrading figura-cli to update.\n")}import{promises as a$}from"node:fs";import{homedir as wW}from"node:os";import{join as iW}from"node:path";var p0=iW(wW(),".claude","settings.json"),OY="figura doctor --session-start",bj=`figura hook install — keep Figura current on every Claude Code launch
69
72
 
70
73
  Usage:
71
74
  figura hook install [--uninstall]
72
75
 
73
- Adds a SessionStart hook to ${K0} that runs
74
- \`${gJ}\` — it reinstalls drifted skills in place and, when the CLI is
76
+ Adds a SessionStart hook to ${p0} that runs
77
+ \`${OY}\` — it reinstalls drifted skills in place and, when the CLI is
75
78
  behind (checked at most once a day), prints a one-line notice to run
76
79
  \`figura upgrade\`. It never self-executes an install and never blocks startup.
77
- Re-running is safe; --uninstall removes it.`;function A9(c){return(c.hooks??[]).some(($)=>typeof $.command==="string"&&$.command.includes("figura doctor"))}function Nx(c){let $=c.hooks??{},Q=$.SessionStart??[];if(Q.some(A9))return{settings:c,changed:!1};return{settings:{...c,hooks:{...$,SessionStart:[...Q,{matcher:"",hooks:[{type:"command",command:gJ}]}]}},changed:!0}}function m4(c){return(c.hooks?.SessionStart??[]).some(A9)}function wx(c){let $=c.hooks?.SessionStart;if(!$)return{settings:c,changed:!1};let Q=$.filter((Y)=>!A9(Y));if(Q.length===$.length)return{settings:c,changed:!1};let J={...c.hooks};if(Q.length)J.SessionStart=Q;else delete J.SessionStart;return{settings:{...c,hooks:J},changed:!0}}async function dJ(c){try{let $=await L$.readFile(c,"utf8"),Q=JSON.parse($);if(!Q||typeof Q!=="object"||Array.isArray(Q))throw Error(`${c} is not a JSON object`);return Q}catch($){if($.code==="ENOENT")return{};throw $}}async function vx(){let c=await dJ(K0),{settings:$,changed:Q}=Nx(c);if(Q)await L$.mkdir(S9(_9(),".claude"),{recursive:!0}),await L$.writeFile(K0,JSON.stringify($,null,2)+`
78
- `);return Q}async function Ux(){let c;try{c=await dJ(K0)}catch{return!1}let{settings:$,changed:Q}=wx(c);if(Q)await L$.writeFile(K0,JSON.stringify($,null,2)+`
79
- `);return Q}async function jx(c=K0){try{return m4(await dJ(c))}catch{return!1}}async function Kx(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(a($,"help")||a($,"h")||J&&J!=="install"){process.stdout.write(X4+`
80
- `);return}let Y=a($,"uninstall"),X;try{X=await dJ(K0)}catch(G){process.stderr.write(`figura: couldn't read ${K0} (${y(G)}).
81
- Add this SessionStart hook by hand: ${gJ}
82
- `),process.exit(1)}let{settings:m,changed:W}=Y?wx(X):Nx(X);if(!W){process.stdout.write(Y?`No Figura SessionStart hook was installed.
83
- `:`Figura version check already installed in ${K0}.
84
- `);return}await L$.mkdir(S9(_9(),".claude"),{recursive:!0}),await L$.writeFile(K0,JSON.stringify(m,null,2)+`
85
- `),process.stdout.write(Y?`Removed the Figura version check from ${K0}.
86
- `:`Installed the Figura version check in ${K0} — it runs \`${gJ}\`
80
+ Re-running is safe; --uninstall removes it.`;function vW(c){return(c.hooks??[]).some(($)=>typeof $.command==="string"&&$.command.includes("figura doctor"))}function A6(c){let $=c.hooks??{},Q=$.SessionStart??[];if(Q.some(vW))return{settings:c,changed:!1};return{settings:{...c,hooks:{...$,SessionStart:[...Q,{matcher:"",hooks:[{type:"command",command:OY}]}]}},changed:!0}}function Fj(c){return(c.hooks?.SessionStart??[]).some(vW)}function C6(c){let $=c.hooks?.SessionStart;if(!$)return{settings:c,changed:!1};let Q=$.filter((Y)=>!vW(Y));if(Q.length===$.length)return{settings:c,changed:!1};let J={...c.hooks};if(Q.length)J.SessionStart=Q;else delete J.SessionStart;return{settings:{...c,hooks:J},changed:!0}}async function RY(c){try{let $=await a$.readFile(c,"utf8"),Q=JSON.parse($);if(!Q||typeof Q!=="object"||Array.isArray(Q))throw Error(`${c} is not a JSON object`);return Q}catch($){if($.code==="ENOENT")return{};throw $}}async function P6(){let c=await RY(p0),{settings:$,changed:Q}=A6(c);if(Q)await a$.mkdir(iW(wW(),".claude"),{recursive:!0}),await a$.writeFile(p0,JSON.stringify($,null,2)+`
81
+ `);return Q}async function E6(){let c;try{c=await RY(p0)}catch{return!1}let{settings:$,changed:Q}=C6(c);if(Q)await a$.writeFile(p0,JSON.stringify($,null,2)+`
82
+ `);return Q}async function b6(c=p0){try{return Fj(await RY(c))}catch{return!1}}async function F6(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(k($,"help")||k($,"h")||J&&J!=="install"){process.stdout.write(bj+`
83
+ `);return}let Y=k($,"uninstall"),X;try{X=await RY(p0)}catch(G){process.stderr.write(`figura: couldn't read ${p0} (${y(G)}).
84
+ Add this SessionStart hook by hand: ${OY}
85
+ `),process.exit(1)}let{settings:W,changed:m}=Y?C6(X):A6(X);if(!m){process.stdout.write(Y?`No Figura SessionStart hook was installed.
86
+ `:`Figura version check already installed in ${p0}.
87
+ `);return}await a$.mkdir(iW(wW(),".claude"),{recursive:!0}),await a$.writeFile(p0,JSON.stringify(W,null,2)+`
88
+ `),process.stdout.write(Y?`Removed the Figura version check from ${p0}.
89
+ `:`Installed the Figura version check in ${p0} — it runs \`${OY}\`
87
90
  on each Claude Code launch and keeps the CLI, MCP, and skills current.
88
- `)}import{spawnSync as W4}from"node:child_process";import{promises as t0}from"node:fs";import{homedir as rJ}from"node:os";import{join as tJ}from"node:path";var Dx=3200,r0=tJ(rJ(),".claude","settings.json"),sJ="figura statusline",w8="\x1B[0m",Bx="\x1B[2m",G4="\x1B[38;2;255;177;58m",z4="\x1B[38;2;62;224;122m",x4="\x1B[38;2;255;77;61m",i4="\x1B[38;2;198;199;204m",q4="\x1B[38;2;60;60;66m",C9=[[255,77,61],[255,177,58],[62,224,122],[31,182,255],[106,92,255]];function M4(c,$){let Q=$?[...C9,C9[0]]:C9,Y=($?(c%1+1)%1:Math.max(0,Math.min(1,c)))*(Q.length-1),X=Math.min(Q.length-2,Math.floor(Y)),m=Y-X,[W,G]=[Q[X],Q[X+1]];return[0,1,2].map((z)=>Math.round(W[z]+(G[z]-W[z])*m))}function V4(c,$){let Q=[...c],J=Q.length-1||1,Y=$!==void 0;return Q.map((X,m)=>{if(X===" ")return X;let[W,G,z]=M4(m/J+($??0),Y);return`\x1B[38;2;${W};${G};${z}m${X}`}).join("")+w8}function N4(c,$={}){let Q=V4("⬡ figura",$.phase);if($.team)Q+=` ${q4}·${w8} ${i4}@${$.team}${w8}`;if($.linked!==void 0)Q+=$.linked?` ${z4}●${w8}`:` ${x4}○${w8} ${Bx}login${w8}`;if(Q+=` ${Bx}${c}${w8}`,$.latest&&q0($.latest,c))Q+=` ${G4}↑ ${$.latest}${w8}`;return Q}function w4(c){return`'${c.replace(/'/g,"'\\''")}'`}function v4(c){let $=/--wrap\s+'((?:[^']|'\\'')*)'/.exec(c);if(!$)return null;return $[1].replace(/'\\''/g,"'")}function P9(c,$){let Q=c?.command??"",J=Q.includes(sJ);if($){if(!J)return{statusLine:c??null,changed:!1};let Y=v4(Q);return Y?{statusLine:{type:"command",command:Y},changed:!0}:{statusLine:null,changed:!0}}if(J)return{statusLine:c??null,changed:!1};if(!c)return{statusLine:{type:"command",command:sJ},changed:!0};return{statusLine:{type:"command",command:`${sJ} --wrap ${w4(Q)}`},changed:!0}}async function U4(c){let $="";try{let z=[];for await(let x of process.stdin)z.push(Buffer.from(x));$=Buffer.concat(z).toString("utf8")}catch{}let Q="";if(c)try{Q=(W4(c,{shell:!0,input:$,encoding:"utf8"}).stdout??"").replace(/\n+$/,"")}catch{}let J=i0(),Y,X,m;try{Y=(await N8()).latest}catch{}try{let z=await j0({});X=z.team,m=Boolean(z.token)}catch{}let W=Date.now()%Dx/Dx,G=N4(J,{latest:Y,team:X,phase:W,linked:m});process.stdout.write((Q?`${Q} · ${G}`:G)+`
89
- `)}async function j4(c){let $={};try{let X=await t0.readFile(r0,"utf8"),m=JSON.parse(X);if(!m||typeof m!=="object"||Array.isArray(m))throw Error("settings.json is not a JSON object");$=m}catch(X){if(X.code!=="ENOENT")process.stderr.write(`figura: couldn't read ${r0} (${y(X)}). Set statusLine to "${sJ}" by hand.
90
- `),process.exit(1)}let Q=$.statusLine,{statusLine:J,changed:Y}=P9(Q,c);if(!Y){process.stdout.write(c?`No Figura statusline was installed.
91
+ `)}import{spawnSync as Tj}from"node:child_process";import{promises as W8}from"node:fs";import{homedir as IY}from"node:os";import{join as ZY}from"node:path";b$();rQ();i0();var T6=3200,X8=ZY(IY(),".claude","settings.json"),pY="figura statusline",R8="\x1B[0m",f6="\x1B[2m",fj="\x1B[38;2;255;177;58m",nj="\x1B[38;2;62;224;122m",uj="\x1B[38;2;255;77;61m",kj="\x1B[38;2;198;199;204m",aj="\x1B[38;2;60;60;66m",UW=[[255,77,61],[255,177,58],[62,224,122],[31,182,255],[106,92,255]];function lj(c,$){let Q=$?[...UW,UW[0]]:UW,Y=($?(c%1+1)%1:Math.max(0,Math.min(1,c)))*(Q.length-1),X=Math.min(Q.length-2,Math.floor(Y)),W=Y-X,[m,G]=[Q[X],Q[X+1]];return[0,1,2].map((z)=>Math.round(m[z]+(G[z]-m[z])*W))}function hj(c,$){let Q=[...c],J=Q.length-1||1,Y=$!==void 0;return Q.map((X,W)=>{if(X===" ")return X;let[m,G,z]=lj(W/J+($??0),Y);return`\x1B[38;2;${m};${G};${z}m${X}`}).join("")+R8}function yj(c,$={}){let Q=hj("⬡ figura",$.phase);if($.team)Q+=` ${aj}·${R8} ${kj}@${$.team}${R8}`;if($.linked!==void 0)Q+=$.linked?` ${nj}●${R8}`:` ${uj}○${R8} ${f6}login${R8}`;if(Q+=` ${f6}${c}${R8}`,$.latest&&O0($.latest,c))Q+=` ${fj}↑ ${$.latest}${R8}`;return Q}function oj(c){return`'${c.replace(/'/g,"'\\''")}'`}function gj(c){let $=/--wrap\s+'((?:[^']|'\\'')*)'/.exec(c);if(!$)return null;return $[1].replace(/'\\''/g,"'")}function jW(c,$){let Q=c?.command??"",J=Q.includes(pY);if($){if(!J)return{statusLine:c??null,changed:!1};let Y=gj(Q);return Y?{statusLine:{type:"command",command:Y},changed:!0}:{statusLine:null,changed:!0}}if(J)return{statusLine:c??null,changed:!1};if(!c)return{statusLine:{type:"command",command:pY},changed:!0};return{statusLine:{type:"command",command:`${pY} --wrap ${oj(Q)}`},changed:!0}}async function dj(c){let $="";try{let z=[];for await(let x of process.stdin)z.push(Buffer.from(x));$=Buffer.concat(z).toString("utf8")}catch{}let Q="";if(c)try{Q=(Tj(c,{shell:!0,input:$,encoding:"utf8"}).stdout??"").replace(/\n+$/,"")}catch{}let J=f0(),Y,X,W;try{Y=(await H8()).latest}catch{}try{let z=await W0({});X=z.team,W=Boolean(z.token)}catch{}let m=Date.now()%T6/T6,G=yj(J,{latest:Y,team:X,phase:m,linked:W});process.stdout.write((Q?`${Q} · ${G}`:G)+`
92
+ `)}async function sj(c){let $={};try{let X=await W8.readFile(X8,"utf8"),W=JSON.parse(X);if(!W||typeof W!=="object"||Array.isArray(W))throw Error("settings.json is not a JSON object");$=W}catch(X){if(X.code!=="ENOENT")process.stderr.write(`figura: couldn't read ${X8} (${y(X)}). Set statusLine to "${pY}" by hand.
93
+ `),process.exit(1)}let Q=$.statusLine,{statusLine:J,changed:Y}=jW(Q,c);if(!Y){process.stdout.write(c?`No Figura statusline was installed.
91
94
  `:`Figura statusline already installed.
92
- `);return}if(J===null)delete $.statusLine;else $.statusLine=J;await t0.mkdir(tJ(rJ(),".claude"),{recursive:!0}),await t0.writeFile(r0,JSON.stringify($,null,2)+`
93
- `),process.stdout.write(c?`Removed the Figura badge from ${r0}.
94
- `:`Added the Figura badge to your status bar (${r0}). `+`It shows ⬡ figura <version>, with ↑ when an update is ready.
95
- `)}var K4=`figura statusline — a status-bar badge showing Figura is installed
95
+ `);return}if(J===null)delete $.statusLine;else $.statusLine=J;await W8.mkdir(ZY(IY(),".claude"),{recursive:!0}),await W8.writeFile(X8,JSON.stringify($,null,2)+`
96
+ `),process.stdout.write(c?`Removed the Figura badge from ${X8}.
97
+ `:`Added the Figura badge to your status bar (${X8}). `+`It shows ⬡ figura <version>, with ↑ when an update is ready.
98
+ `)}var rj=`figura statusline — a status-bar badge showing Figura is installed
96
99
 
97
100
  Usage:
98
101
  figura statusline [--wrap <cmd>] render the badge (used by the status bar)
@@ -101,10 +104,10 @@ Usage:
101
104
 
102
105
  The badge reads ⬡ figura <version> and adds ↑ when \`figura doctor\` has found a
103
106
  newer release. \`install\` never replaces an existing statusline — it wraps it, so
104
- a caveman (or any other) badge keeps showing alongside Figura's.`;async function Hx(c){let{flags:$,positionals:Q}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(K4+`
105
- `);return}if(Q[0]==="install")return j4(a($,"uninstall"));let J=typeof $.wrap==="string"?$.wrap:void 0;await U4(J)}async function Ox(){let c={};try{let J=await t0.readFile(r0,"utf8"),Y=JSON.parse(J);if(Y&&typeof Y==="object"&&!Array.isArray(Y))c=Y}catch{return!1}let{statusLine:$,changed:Q}=P9(c.statusLine,!0);if(!Q)return!1;if($===null)delete c.statusLine;else c.statusLine=$;return await t0.mkdir(tJ(rJ(),".claude"),{recursive:!0}),await t0.writeFile(r0,JSON.stringify(c,null,2)+`
106
- `),!0}async function px(){let c={};try{let J=await t0.readFile(r0,"utf8"),Y=JSON.parse(J);if(Y&&typeof Y==="object"&&!Array.isArray(Y))c=Y}catch{}let{statusLine:$,changed:Q}=P9(c.statusLine,!1);if(!Q)return!1;return c.statusLine=$,await t0.mkdir(tJ(rJ(),".claude"),{recursive:!0}),await t0.writeFile(r0,JSON.stringify(c,null,2)+`
107
- `),!0}var Ix={installSkills:TQ,uninstallSkills:Mx,ensureHook:vx,disableHook:Ux,ensureStatusline:px,removeStatusline:Ox};function B4(){return Rx(D4(),".claude","skills")}async function b9(c,$=Ix){let Q={baseDir:c.skillsBaseDir};if(c.skipSkills)Q.skipped=!0;else try{Q.installed=$.installSkills(c.skillsBaseDir).installed}catch(X){Q.error=y(X)}let J={changed:!1};try{J.changed=await $.ensureHook()}catch(X){J.error=y(X)}let Y={changed:!1};try{Y.changed=await $.ensureStatusline()}catch(X){Y.error=y(X)}return{skills:Q,hook:J,statusline:Y}}async function H4(c,$=Ix){let Q={baseDir:c.skillsBaseDir};try{Q.removed=$.uninstallSkills(c.skillsBaseDir).removed}catch(X){Q.error=y(X)}let J={changed:!1};try{J.changed=await $.disableHook()}catch(X){J.error=y(X)}let Y={changed:!1};try{Y.changed=await $.removeStatusline()}catch(X){Y.error=y(X)}return{skills:Q,hook:J,statusline:Y}}var O4=`figura install — set up the full Claude Code integration in one command
107
+ a caveman (or any other) badge keeps showing alongside Figura's.`;async function n6(c){let{flags:$,positionals:Q}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(rj+`
108
+ `);return}if(Q[0]==="install")return sj(k($,"uninstall"));let J=typeof $.wrap==="string"?$.wrap:void 0;await dj(J)}async function u6(){let c={};try{let J=await W8.readFile(X8,"utf8"),Y=JSON.parse(J);if(Y&&typeof Y==="object"&&!Array.isArray(Y))c=Y}catch{return!1}let{statusLine:$,changed:Q}=jW(c.statusLine,!0);if(!Q)return!1;if($===null)delete c.statusLine;else c.statusLine=$;return await W8.mkdir(ZY(IY(),".claude"),{recursive:!0}),await W8.writeFile(X8,JSON.stringify(c,null,2)+`
109
+ `),!0}async function k6(){let c={};try{let J=await W8.readFile(X8,"utf8"),Y=JSON.parse(J);if(Y&&typeof Y==="object"&&!Array.isArray(Y))c=Y}catch{}let{statusLine:$,changed:Q}=jW(c.statusLine,!1);if(!Q)return!1;return c.statusLine=$,await W8.mkdir(ZY(IY(),".claude"),{recursive:!0}),await W8.writeFile(X8,JSON.stringify(c,null,2)+`
110
+ `),!0}var l6={installSkills:NW,uninstallSkills:_6,ensureHook:P6,disableHook:E6,ensureStatusline:k6,removeStatusline:u6};function ej(){return a6(tj(),".claude","skills")}async function KW(c,$=l6){let Q={baseDir:c.skillsBaseDir};if(c.skipSkills)Q.skipped=!0;else try{Q.installed=$.installSkills(c.skillsBaseDir).installed}catch(X){Q.error=y(X)}let J={changed:!1};try{J.changed=await $.ensureHook()}catch(X){J.error=y(X)}let Y={changed:!1};try{Y.changed=await $.ensureStatusline()}catch(X){Y.error=y(X)}return{skills:Q,hook:J,statusline:Y}}async function cK(c,$=l6){let Q={baseDir:c.skillsBaseDir};try{Q.removed=$.uninstallSkills(c.skillsBaseDir).removed}catch(X){Q.error=y(X)}let J={changed:!1};try{J.changed=await $.disableHook()}catch(X){J.error=y(X)}let Y={changed:!1};try{Y.changed=await $.removeStatusline()}catch(X){Y.error=y(X)}return{skills:Q,hook:J,statusline:Y}}var $K=`figura install — set up the full Claude Code integration in one command
108
111
 
109
112
  Usage:
110
113
  figura install [--project] [--dir <path>] [--uninstall]
@@ -123,13 +126,13 @@ Options:
123
126
  the global ~/.claude/skills. The hook + badge are always global.
124
127
  --dir <path> Install the skills into a custom directory
125
128
  --uninstall Reverse all three
126
- --help, -h Show this help`;async function Lx(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(O4+`
127
- `);return}let Q=a($,"project"),J=f($,"dir")??(Q?Rx(process.cwd(),".claude","skills"):B4()),Y=a($,"uninstall"),X=Y?await H4({skillsBaseDir:J}):await b9({skillsBaseDir:J}),m=[];if(Y)m.push(X.skills.error?`! skills ${X.skills.error} — remove ${J} by hand`:`✓ skills removed ${(X.skills.removed??[]).map((W)=>"/"+W).join(", ")||"(none)"}`);else{let W=(X.skills.installed??[]).map((G)=>"/"+G.name).join(", ");m.push(X.skills.error?`! skills ${X.skills.error} — run: figura skill install`:`✓ skills ${J} — ${W||"(none bundled)"}`)}m.push(X.hook.error?`! auto-update ${X.hook.error} — run: figura hook install${Y?" --uninstall":""}`:Y?`✓ auto-update ${X.hook.changed?"removed":"was not installed"}`:`✓ auto-update ${X.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),m.push(X.statusline.error?`! badge ${X.statusline.error} — run: figura statusline install${Y?" --uninstall":""}`:Y?`✓ badge ${X.statusline.changed?"removed ⬡ figura from your status bar":"was not installed"}`:`✓ badge ${X.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write((Y?`Removed the Figura Claude Code integration:
129
+ --help, -h Show this help`;async function h6(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write($K+`
130
+ `);return}let Q=k($,"project"),J=f($,"dir")??(Q?a6(process.cwd(),".claude","skills"):ej()),Y=k($,"uninstall"),X=Y?await cK({skillsBaseDir:J}):await KW({skillsBaseDir:J}),W=[];if(Y)W.push(X.skills.error?`! skills ${X.skills.error} — remove ${J} by hand`:`✓ skills removed ${(X.skills.removed??[]).map((m)=>"/"+m).join(", ")||"(none)"}`);else{let m=(X.skills.installed??[]).map((G)=>"/"+G.name).join(", ");W.push(X.skills.error?`! skills ${X.skills.error} — run: figura skill install`:`✓ skills ${J} — ${m||"(none bundled)"}`)}W.push(X.hook.error?`! auto-update ${X.hook.error} — run: figura hook install${Y?" --uninstall":""}`:Y?`✓ auto-update ${X.hook.changed?"removed":"was not installed"}`:`✓ auto-update ${X.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),W.push(X.statusline.error?`! badge ${X.statusline.error} — run: figura statusline install${Y?" --uninstall":""}`:Y?`✓ badge ${X.statusline.changed?"removed ⬡ figura from your status bar":"was not installed"}`:`✓ badge ${X.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write((Y?`Removed the Figura Claude Code integration:
128
131
  `:`Set up the Figura Claude Code integration:
129
- `)+m.map((W)=>" "+W).join(`
132
+ `)+W.map((m)=>" "+m).join(`
130
133
  `)+`
131
134
  `+(Y?"":`Restart Claude Code to load the skills and badge.
132
- `))}var I4=`figura login — authenticate and save credentials
135
+ `))}var YK=`figura login — authenticate and save credentials
133
136
 
134
137
  Usage:
135
138
  figura login [--token <fig_...>] [--no-browser] [--api-url <url>] [--project]
@@ -144,13 +147,13 @@ By default this opens your browser to a short authorize page — approve there a
144
147
  the CLI picks up the credential automatically (no port, nothing to copy-paste;
145
148
  works over SSH too). Use --no-browser to print the URL instead of opening it, or
146
149
  --token to pass a token directly (CI / headless). Credentials are written to
147
- ${S0} (mode 0600).
150
+ ${R0} (mode 0600).
148
151
 
149
152
  --project sets a repo up end-to-end from one command. In the current directory it:
150
- • writes ${SQ} (the team token) and pins every figura call in
153
+ • writes ${T$} (the team token) and pins every figura call in
151
154
  this tree to that team — one team per repo;
152
155
  • adds .figura/ to .gitignore so the live token is never committed;
153
- • registers the Figura MCP in ${l8} so Claude Code wires it up on
156
+ • registers the Figura MCP in ${c$} so Claude Code wires it up on
154
157
  its own — no manual \`claude mcp add\` (--no-mcp to skip);
155
158
  • installs the /fig and /figura-brand skills into .claude/skills (--no-skills
156
159
  to skip);
@@ -158,36 +161,36 @@ ${S0} (mode 0600).
158
161
  date (see \`figura hook install\`);
159
162
  • adds a "⬡ figura" badge to the Claude Code status bar (wrapping any existing
160
163
  statusline, so nothing else disappears; see \`figura statusline install\`).
161
- ${l8} and .claude/skills hold no token, so commit them to share the
162
- setup — teammates just run \`figura login --project\` for their own credential.`;function L4(c){try{let $=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open",Q=process.platform==="win32"?["/c","start","",c]:[c],J=p4($,Q,{stdio:"ignore",detached:!0});J.on("error",()=>{}),J.unref()}catch{}}var Z4=(c)=>new Promise(($)=>setTimeout($,c));async function _4(c,$){try{if((await zc("/v1/brand",{token:c,apiUrl:$,source:mc})).isCustom)return null;return`Next: your team has no brand profile yet — figs render with the built-in neutral look.
163
- `+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function S4(c,$){let Q=await zc("/v1/cli/device",{method:"POST",apiUrl:c,source:mc}),J=Q.verification_uri_complete||Q.verification_uri;if(process.stdout.write(`
164
+ ${c$} and .claude/skills hold no token, so commit them to share the
165
+ setup — teammates just run \`figura login --project\` for their own credential.`;function XK(c){try{let $=process.platform==="darwin"?"open":process.platform==="win32"?"cmd":"xdg-open",Q=process.platform==="win32"?["/c","start","",c]:[c],J=QK($,Q,{stdio:"ignore",detached:!0});J.on("error",()=>{}),J.unref()}catch{}}var WK=(c)=>new Promise(($)=>setTimeout($,c));async function mK(c,$){try{if((await Wc("/v1/brand",{token:c,apiUrl:$,source:Gc})).isCustom)return null;return`Next: your team has no brand profile yet — figs render with the built-in neutral look.
166
+ `+'In Claude Code, run /figura-brand (or say "introduce this repo to Figura") to set your design system.'}catch{return null}}async function GK(c,$){let Q=await Wc("/v1/cli/device",{method:"POST",apiUrl:c,source:Gc}),J=Q.verification_uri_complete||Q.verification_uri;if(process.stdout.write(`
164
167
  To sign in, open this URL and confirm the code ${Q.user_code}:
165
168
 
166
169
  ${J}
167
170
 
168
- `),$)L4(J);process.stdout.write(`Waiting for authorization...
169
- `);let Y=Math.max(1,Q.interval??5)*1000,X=Date.now()+(Q.expires_in??600)*1000;while(Date.now()<X){await Z4(Y);let m;try{m=await zc("/v1/cli/device/token",{method:"POST",apiUrl:c,source:mc,body:{device_code:Q.device_code}})}catch(W){if(W instanceof s0&&W.status===0)continue;throw W}if(m.token)return m.token}throw Error("timed out waiting for authorization")}async function E9(c){let{flags:$}=r(c);if($.help||$.h){process.stdout.write(I4+`
170
- `);return}let Q=process.env.FIGURA_API_URL||f($,"api-url")||O$,J=process.env.FIGURA_TOKEN||f($,"token");if(!J)try{J=await S4(Q,!a($,"no-browser"))}catch(W){I(`login failed: ${y(W)}
171
- Retry, or pass --token <fig_...> for CI/headless.`)}if(!J)I("A token is required.");let Y;try{Y=await zc("/v1/whoami",{token:J,apiUrl:Q,source:mc})}catch(W){I(`token validation failed: ${y(W)}`)}let X=Y.team?.name||Y.team?.slug||Y.team?.id||"your team";if(a($,"project")){let W=process.cwd();await _5({apiUrl:Q,token:J,team:Y.team?.slug||Y.team?.id},W);let G=[`✓ token ${SQ}`];try{let i=await mx(".figura/",W,"Figura CLI credentials (figura login --project) — holds a live API token; never commit");G.push(`✓ gitignore .figura/ ${i==="present"?"already ignored":"ignored"}`)}catch(i){G.push(`! gitignore couldn't update .gitignore (${y(i)}) — ignore .figura/ by hand`)}if(a($,"no-mcp"))G.push("- MCP skipped (--no-mcp)");else try{let i=await Yx(W);G.push(i.status==="unparsable"?`! MCP ${l8} unparsable — add by hand: claude mcp add figura -- figura mcp`:`✓ MCP ${l8} — restart Claude Code and approve`)}catch(i){G.push(`! MCP couldn't write ${l8} (${y(i)}) — add by hand: claude mcp add figura -- figura mcp`)}let z=await b9({skillsBaseDir:R4(W,".claude","skills"),skipSkills:a($,"no-skills")});if(z.skills.skipped)G.push("- skills skipped (--no-skills)");else if(z.skills.error)G.push(`! skills couldn't install skills (${z.skills.error}) — run: figura skill install --project`);else{let i=(z.skills.installed??[]).map((q)=>"/"+q.name).join(", ");G.push(`✓ skills .claude/skills — ${i||"(none bundled)"}`)}G.push(z.hook.error?`! auto-update couldn't install the update hook (${z.hook.error}) — run: figura hook install`:`✓ auto-update ${z.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),G.push(z.statusline.error?`! badge couldn't add the status-bar badge (${z.statusline.error}) — run: figura statusline install`:`✓ badge ${z.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write(`Logged in to ${X}.
171
+ `),$)XK(J);process.stdout.write(`Waiting for authorization...
172
+ `);let Y=Math.max(1,Q.interval??5)*1000,X=Date.now()+(Q.expires_in??600)*1000;while(Date.now()<X){await WK(Y);let W;try{W=await Wc("/v1/cli/device/token",{method:"POST",apiUrl:c,source:Gc,body:{device_code:Q.device_code}})}catch(m){if(m instanceof Y8&&m.status===0)continue;throw m}if(W.token)return W.token}throw Error("timed out waiting for authorization")}async function DW(c){let{flags:$}=t(c);if($.help||$.h){process.stdout.write(YK+`
173
+ `);return}let Q=process.env.FIGURA_API_URL||f($,"api-url")||f$,J=process.env.FIGURA_TOKEN||f($,"token");if(!J)try{J=await GK(Q,!k($,"no-browser"))}catch(m){I(`login failed: ${y(m)}
174
+ Retry, or pass --token <fig_...> for CI/headless.`)}if(!J)I("A token is required.");let Y;try{Y=await Wc("/v1/whoami",{token:J,apiUrl:Q,source:Gc})}catch(m){I(`token validation failed: ${y(m)}`)}let X=Y.team?.name||Y.team?.slug||Y.team?.id||"your team";if(k($,"project")){let m=process.cwd();await r9({apiUrl:Q,token:J,team:Y.team?.slug||Y.team?.id},m);let G=[`✓ token ${T$}`];try{let q=await D6(".figura/",m,"Figura CLI credentials (figura login --project) — holds a live API token; never commit");G.push(`✓ gitignore .figura/ ${q==="present"?"already ignored":"ignored"}`)}catch(q){G.push(`! gitignore couldn't update .gitignore (${y(q)}) — ignore .figura/ by hand`)}if(k($,"no-mcp"))G.push("- MCP skipped (--no-mcp)");else try{let q=await j6(m);G.push(q.status==="unparsable"?`! MCP ${c$} unparsable — add by hand: claude mcp add figura -- figura mcp`:`✓ MCP ${c$} — restart Claude Code and approve`)}catch(q){G.push(`! MCP couldn't write ${c$} (${y(q)}) — add by hand: claude mcp add figura -- figura mcp`)}let z=await KW({skillsBaseDir:JK(m,".claude","skills"),skipSkills:k($,"no-skills")});if(z.skills.skipped)G.push("- skills skipped (--no-skills)");else if(z.skills.error)G.push(`! skills couldn't install skills (${z.skills.error}) — run: figura skill install --project`);else{let q=(z.skills.installed??[]).map((M)=>"/"+M.name).join(", ");G.push(`✓ skills .claude/skills — ${q||"(none bundled)"}`)}G.push(z.hook.error?`! auto-update couldn't install the update hook (${z.hook.error}) — run: figura hook install`:`✓ auto-update ${z.hook.changed?"installed":"already set"} — checks for updates each Claude Code launch`),G.push(z.statusline.error?`! badge couldn't add the status-bar badge (${z.statusline.error}) — run: figura statusline install`:`✓ badge ${z.statusline.changed?"added ⬡ figura to your status bar":"already in your status bar"}`),process.stdout.write(`Logged in to ${X}.
172
175
 
173
176
  Set up this repo:
174
- `+G.map((i)=>" "+i).join(`
177
+ `+G.map((q)=>" "+q).join(`
175
178
  `)+`
176
- `);let x=await _4(J,Q);if(x)process.stdout.write(`
179
+ `);let x=await mK(J,Q);if(x)process.stdout.write(`
177
180
  `+x+`
178
- `);return}let m=await V9();if(await Z5({...m,apiUrl:Q,token:J,team:Y.team?.slug||Y.team?.id||m.team}),process.stdout.write(`Logged in to ${X}. Credentials saved to ${S0}
179
- `),Qx())process.stdout.write("\nYou're inside a git repo — run `figura link` to pin this repo to a\n"+`team and wire up the MCP, skills, and status badge in one step.
180
- `)}var A4=`figura whoami — show the authenticated identity
181
+ `);return}let W=await zY();if(await s9({...W,apiUrl:Q,token:J,team:Y.team?.slug||Y.team?.id||W.team}),process.stdout.write(`Logged in to ${X}. Credentials saved to ${R0}
182
+ `),v6())process.stdout.write("\nYou're inside a git repo — run `figura link` to pin this repo to a\n"+`team and wire up the MCP, skills, and status badge in one step.
183
+ `)}v0();i0();var zK=`figura whoami — show the authenticated identity
181
184
 
182
185
  Also reports the BINDING: which config tier supplied the token (env, --token,
183
186
  this repo's .figura/config.json, or the global ~/.figura fallback). A 'global'
184
187
  binding means nothing pins this directory to that team — run \`figura link\`.
185
188
 
186
189
  Usage:
187
- figura whoami [--json]`;async function Zx(c){let{flags:$}=r(c);if($.help||$.h){process.stdout.write(A4+`
188
- `);return}let Q=await jc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:m}=Q,W;try{W=await zc("/v1/whoami",{token:J,apiUrl:Y,source:mc})}catch(x){I(y(x))}let G={source:X,configPath:X==="project"?m:X==="global"?S0:null};if(a($,"json")){Nc({...W,binding:G});return}let z=[];if(W.user){let x=W.user,i=x.name&&x.email?`${x.name} (${x.email})`:x.email??x.name??x.id??"";z.push(`user: ${i}`)}else z.push(`actor: ${W.actor??"token"}`);if(W.team)z.push(`team: ${W.team.name??""} (${W.team.slug??W.team.id??""})`);if(W.token)z.push(`token: ${W.token.name??W.token.prefix??W.token.id??""}`);if(W.scopes?.length)z.push(`scopes: ${W.scopes.join(", ")}`);z.push(`bound: ${G.source}${G.configPath?` (${G.configPath})`:""}`+(G.source==="global"?" — not pinned to this repo; run `figura link`":"")),process.stdout.write(z.join(`
190
+ figura whoami [--json]`;async function y6(c){let{flags:$}=t(c);if($.help||$.h){process.stdout.write(zK+`
191
+ `);return}let Q=await Kc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:W}=Q,m;try{m=await Wc("/v1/whoami",{token:J,apiUrl:Y,source:Gc})}catch(x){I(y(x))}let G={source:X,configPath:X==="project"?W:X==="global"?R0:null};if(k($,"json")){ic({...m,binding:G});return}let z=[];if(m.user){let x=m.user,q=x.name&&x.email?`${x.name} (${x.email})`:x.email??x.name??x.id??"";z.push(`user: ${q}`)}else z.push(`actor: ${m.actor??"token"}`);if(m.team)z.push(`team: ${m.team.name??""} (${m.team.slug??m.team.id??""})`);if(m.token)z.push(`token: ${m.token.name??m.token.prefix??m.token.id??""}`);if(m.scopes?.length)z.push(`scopes: ${m.scopes.join(", ")}`);z.push(`bound: ${G.source}${G.configPath?` (${G.configPath})`:""}`+(G.source==="global"?" — not pinned to this repo; run `figura link`":"")),process.stdout.write(z.join(`
189
192
  `)+`
190
- `)}import{readFileSync as eJ}from"node:fs";var cY=`figura brand — show or set your team's brand profile (design system)
193
+ `)}v0();import{readFileSync as LY}from"node:fs";var _Y=`figura brand — show or set your team's brand profile (design system)
191
194
 
192
195
  The /fig skill and generator render with these tokens. Falls back to the built-in
193
196
  neutral profile until your team sets its own.
@@ -240,27 +243,27 @@ you by scanning your repo ("introduce my repo to Figura").
240
243
 
241
244
  Both forms print WHICH team they're bound to and from where. In a directory that
242
245
  isn't linked to a team — a repo or not — \`brand set\` refuses the global
243
- ~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,_x=["mobile","web","desktop"];async function F9(){let c=[];for await(let $ of process.stdin)c.push(Buffer.from($));return Buffer.concat(c).toString("utf8")}async function Sx(c){let $=c[0]&&!c[0].startsWith("-")?c[0]:void 0;if($==="set")return C4(c.slice(1));if($==="structure")return b4(c.slice(1));if($==="schema")return P4(c.slice(1));let{flags:Q}=r(c);if(a(Q,"help")||a(Q,"h")){process.stdout.write(cY+`
244
- `);return}let{token:J,apiUrl:Y}=await jc(Q,{announce:!0}),X=f(Q,"platform");if(X!==void 0&&!_x.includes(X))I(`--platform must be one of ${_x.join(", ")}`);let m=X?`/v1/brand?platform=${encodeURIComponent(X)}`:"/v1/brand",W;try{W=await zc(m,{token:J,apiUrl:Y,source:mc})}catch(x){I(y(x))}if(a(Q,"json")){Nc(W);return}let G=[],z=W.kind==="starter"||!W.kind&&!W.isCustom?" (starter kit — no brand set; run `figura brand set` to customize)":"";if(G.push(`name: ${W.name??""}${z}`),G.push(`product: ${W.appDescription??""}`),G.push(`tokens: ${(W.tokensBlock??"").length} chars`),G.push(`surfaces: ${(W.surfaces??[]).join(", ")||"(none)"}`),G.push(`forbidden: ${(W.forbidden??"").length} chars`),G.push(`platform: ${W.platformProfile??"(unknown — Studio uses its own defaults)"}`),W.availablePlatforms?.length||W.colors?.length)G.push(`structured: ${(W.colors??[]).length} colors, surfaces for [${(W.availablePlatforms??[]).join(", ")}]${W.platform?` (composed for ${W.platform})`:""}`);process.stdout.write(G.join(`
246
+ ~/.figura fallback — run \`figura link\` first, or pass --allow-global to override.`,o6=["mobile","web","desktop"];async function BW(){let c=[];for await(let $ of process.stdin)c.push(Buffer.from($));return Buffer.concat(c).toString("utf8")}async function g6(c){let $=c[0]&&!c[0].startsWith("-")?c[0]:void 0;if($==="set")return xK(c.slice(1));if($==="structure")return MK(c.slice(1));if($==="schema")return qK(c.slice(1));let{flags:Q}=t(c);if(k(Q,"help")||k(Q,"h")){process.stdout.write(_Y+`
247
+ `);return}let{token:J,apiUrl:Y}=await Kc(Q,{announce:!0}),X=f(Q,"platform");if(X!==void 0&&!o6.includes(X))I(`--platform must be one of ${o6.join(", ")}`);let W=X?`/v1/brand?platform=${encodeURIComponent(X)}`:"/v1/brand",m;try{m=await Wc(W,{token:J,apiUrl:Y,source:Gc})}catch(x){I(y(x))}if(k(Q,"json")){ic(m);return}let G=[],z=m.kind==="starter"||!m.kind&&!m.isCustom?" (starter kit — no brand set; run `figura brand set` to customize)":"";if(G.push(`name: ${m.name??""}${z}`),G.push(`product: ${m.appDescription??""}`),G.push(`tokens: ${(m.tokensBlock??"").length} chars`),G.push(`surfaces: ${(m.surfaces??[]).join(", ")||"(none)"}`),G.push(`forbidden: ${(m.forbidden??"").length} chars`),G.push(`platform: ${m.platformProfile??"(unknown — Studio uses its own defaults)"}`),m.availablePlatforms?.length||m.colors?.length)G.push(`structured: ${(m.colors??[]).length} colors, surfaces for [${(m.availablePlatforms??[]).join(", ")}]${m.platform?` (composed for ${m.platform})`:""}`);process.stdout.write(G.join(`
245
248
  `)+`
246
- `)}async function C4(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(cY+`
247
- `);return}let{token:Q,apiUrl:J}=await jc($,{mutate:!0}),Y=f($,"name");if(!Y)I("--name is required for `brand set`.");let X={name:Y},m=f($,"description");if(m!==void 0)X.appDescription=m;let W=f($,"tokens");if(W==="-")X.tokensBlock=await F9();else if(W&&W.startsWith("@"))try{X.tokensBlock=eJ(W.slice(1),"utf8")}catch(q){I(`could not read --tokens file ${W.slice(1)}: ${y(q)}`)}else if(W!==void 0)X.tokensBlock=W;let G=f($,"surfaces");if(G!==void 0)X.surfaces=G.split(",").map((q)=>q.trim()).filter((q)=>q.length>0);let z=f($,"structured");if(z!==void 0){let q;if(z==="-")q=await F9();else if(z.startsWith("@"))try{q=eJ(z.slice(1),"utf8")}catch(v){return I(`could not read --structured file ${z.slice(1)}: ${y(v)}`)}else q=z;let M;try{M=JSON.parse(q)}catch(v){return I(`--structured must be valid JSON: ${y(v)}`)}if(typeof M!=="object"||M===null||Array.isArray(M))return I('--structured must be a JSON object like { "identity": {…}, "platforms": {…} }');let N=M;if(N.identity===void 0&&N.platforms===void 0)return I('--structured JSON must have an "identity" and/or "platforms" key');if(N.identity!==void 0)X.identity=N.identity;if(N.platforms!==void 0)X.platforms=N.platforms}let x=f($,"prose-source");if(x!==void 0)if(x==="-")return I("--prose-source cannot read stdin (- is reserved for --structured); pass @file or literal text.");else if(x.startsWith("@"))try{X.proseSource=eJ(x.slice(1),"utf8")}catch(q){return I(`could not read --prose-source file ${x.slice(1)}: ${y(q)}`)}else X.proseSource=x;let i;try{i=await zc("/brand",{method:"PUT",body:X,token:Q,apiUrl:J,source:mc})}catch(q){I(y(q))}if(a($,"json")){Nc(i);return}process.stdout.write(`Brand saved: ${i.name}
248
- ${(i.tokensBlock??"").length} chars of tokens — the /fig generator now renders on-brand.
249
- `)}async function P4(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(cY+`
250
- `);return}let{token:Q,apiUrl:J}=await jc($),Y;try{Y=await zc("/v1/brand/schema",{token:Q,apiUrl:J,source:mc})}catch(X){I(y(X))}Nc(Y.schema??Y)}async function b4(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(cY+`
251
- `);return}let{token:Q,apiUrl:J}=await jc($,{mutate:!0}),Y=f($,"prose"),X;if(Y===void 0||Y==="-")X=await F9();else if(Y.startsWith("@"))try{X=eJ(Y.slice(1),"utf8")}catch(W){return I(`could not read --prose file ${Y.slice(1)}: ${y(W)}`)}else X=Y;if(!X.trim())I("no prose to structure — pass --prose @file / - / text or pipe it in.");let m;try{m=await zc("/brand/structure",{method:"POST",body:{prose:X},token:Q,apiUrl:J,source:mc})}catch(W){I(y(W))}Nc(m)}var E4=`figura teams — list teams accessible to the current credentials
249
+ `)}async function xK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(_Y+`
250
+ `);return}let{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"name");if(!Y)I("--name is required for `brand set`.");let X={name:Y},W=f($,"description");if(W!==void 0)X.appDescription=W;let m=f($,"tokens");if(m==="-")X.tokensBlock=await BW();else if(m&&m.startsWith("@"))try{X.tokensBlock=LY(m.slice(1),"utf8")}catch(M){I(`could not read --tokens file ${m.slice(1)}: ${y(M)}`)}else if(m!==void 0)X.tokensBlock=m;let G=f($,"surfaces");if(G!==void 0)X.surfaces=G.split(",").map((M)=>M.trim()).filter((M)=>M.length>0);let z=f($,"structured");if(z!==void 0){let M;if(z==="-")M=await BW();else if(z.startsWith("@"))try{M=LY(z.slice(1),"utf8")}catch(U){return I(`could not read --structured file ${z.slice(1)}: ${y(U)}`)}else M=z;let N;try{N=JSON.parse(M)}catch(U){return I(`--structured must be valid JSON: ${y(U)}`)}if(typeof N!=="object"||N===null||Array.isArray(N))return I('--structured must be a JSON object like { "identity": {…}, "platforms": {…} }');let w=N;if(w.identity===void 0&&w.platforms===void 0)return I('--structured JSON must have an "identity" and/or "platforms" key');if(w.identity!==void 0)X.identity=w.identity;if(w.platforms!==void 0)X.platforms=w.platforms}let x=f($,"prose-source");if(x!==void 0)if(x==="-")return I("--prose-source cannot read stdin (- is reserved for --structured); pass @file or literal text.");else if(x.startsWith("@"))try{X.proseSource=LY(x.slice(1),"utf8")}catch(M){return I(`could not read --prose-source file ${x.slice(1)}: ${y(M)}`)}else X.proseSource=x;let q;try{q=await Wc("/brand",{method:"PUT",body:X,token:Q,apiUrl:J,source:Gc})}catch(M){I(y(M))}if(k($,"json")){ic(q);return}process.stdout.write(`Brand saved: ${q.name}
251
+ ${(q.tokensBlock??"").length} chars of tokens — the /fig generator now renders on-brand.
252
+ `)}async function qK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(_Y+`
253
+ `);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/brand/schema",{token:Q,apiUrl:J,source:Gc})}catch(X){I(y(X))}ic(Y.schema??Y)}async function MK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(_Y+`
254
+ `);return}let{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"prose"),X;if(Y===void 0||Y==="-")X=await BW();else if(Y.startsWith("@"))try{X=LY(Y.slice(1),"utf8")}catch(m){return I(`could not read --prose file ${Y.slice(1)}: ${y(m)}`)}else X=Y;if(!X.trim())I("no prose to structure — pass --prose @file / - / text or pipe it in.");let W;try{W=await Wc("/brand/structure",{method:"POST",body:{prose:X},token:Q,apiUrl:J,source:Gc})}catch(m){I(y(m))}ic(W)}v0();var NK=`figura teams — list teams accessible to the current credentials
252
255
 
253
256
  Usage:
254
- figura teams [--json]`;async function Ax(c){let{flags:$}=r(c);if($.help||$.h){process.stdout.write(E4+`
255
- `);return}let{token:Q,apiUrl:J}=await jc($),Y;try{Y=await zc("/v1/teams",{token:Q,apiUrl:J,source:mc})}catch(m){I(y(m))}let X=Array.isArray(Y)?Y:Y.teams??[];if(a($,"json")){Nc(X);return}if(!X.length){process.stdout.write(`No teams.
256
- `);return}for(let m of X){let W=m.role?` [${m.role}]`:"";process.stdout.write(`${m.slug} ${m.name}${W} ${m.id}
257
- `)}}import{promises as $Y}from"node:fs";import{join as f4}from"node:path";import{spawn as n4}from"node:child_process";var F4=process.env.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function Cx(c){return`'${c.replace(/'/g,"'\\''")}'`}function T4(c,$,Q){return`## ${c}
257
+ figura teams [--json]`;async function d6(c){let{flags:$}=t(c);if($.help||$.h){process.stdout.write(NK+`
258
+ `);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/teams",{token:Q,apiUrl:J,source:Gc})}catch(W){I(y(W))}let X=Array.isArray(Y)?Y:Y.teams??[];if(k($,"json")){ic(X);return}if(!X.length){process.stdout.write(`No teams.
259
+ `);return}for(let W of X){let m=W.role?` [${W.role}]`:"";process.stdout.write(`${W.slug} ${W.name}${m} ${W.id}
260
+ `)}}v0();import{promises as SY}from"node:fs";import{join as iK}from"node:path";import{spawn as vK}from"node:child_process";i0();var VK=process.env.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function s6(c){return`'${c.replace(/'/g,"'\\''")}'`}function wK(c,$,Q){return`## ${c}
258
261
 
259
262
  [Open the fig →](${$})
260
263
 
261
264
  ![preview](${Q})
262
- `}function Px(c){let $=(c.appOrigin??F4).replace(/\/+$/,""),Q=c.publicId,J=c.title||"Untitled fig",Y=c.isPublic===!0,X=`${$}/f/${Q}`,m=`${X}/opengraph-image`,W=Y?X:c.viewUrl||X,G=c.channel||"<CHANNEL>",z=`buzz messages send --channel ${G} --content ${Cx(`${J}: ${X}`)}`,x=`buzz canvas set --channel ${G} --content ${Cx(T4(J,X,m))}`,i={figId:c.figId,title:J,published:Y,link:W,externalLink:X,ogImage:m,buzz:{message:z,canvas:x}};if(!Y)i.note="This fig is a draft — the public link + OG preview don't resolve until it's "+`published. Run \`figura fig publish ${c.figId}\` first, then post ${X}.`;return i}function bx(c){let $=[];if($.push(c.title),$.push(c.published?"(published)":"(draft — not shareable yet)"),$.push(""),$.push(`link: ${c.link}`),$.push(`ogImage: ${c.ogImage}`),c.note)$.push(""),$.push(`note: ${c.note}`);return $.push(""),$.push("# post the fig to a Buzz channel:"),$.push(c.buzz.message),$.push(""),$.push("# …or set a channel canvas (markdown, with the preview):"),$.push(c.buzz.canvas),$.push(""),$.join(`
263
- `)}var T9=`figura fig — manage visualizations
265
+ `}function r6(c){let $=(c.appOrigin??VK).replace(/\/+$/,""),Q=c.publicId,J=c.title||"Untitled fig",Y=c.isPublic===!0,X=`${$}/f/${Q}`,W=`${X}/opengraph-image`,m=Y?X:c.viewUrl||X,G=c.channel||"<CHANNEL>",z=`buzz messages send --channel ${G} --content ${s6(`${J}: ${X}`)}`,x=`buzz canvas set --channel ${G} --content ${s6(wK(J,X,W))}`,q={figId:c.figId,title:J,published:Y,link:m,externalLink:X,ogImage:W,buzz:{message:z,canvas:x}};if(!Y)q.note="This fig is a draft — the public link + OG preview don't resolve until it's "+`published. Run \`figura fig publish ${c.figId}\` first, then post ${X}.`;return q}function t6(c){let $=[];if($.push(c.title),$.push(c.published?"(published)":"(draft — not shareable yet)"),$.push(""),$.push(`link: ${c.link}`),$.push(`ogImage: ${c.ogImage}`),c.note)$.push(""),$.push(`note: ${c.note}`);return $.push(""),$.push("# post the fig to a Buzz channel:"),$.push(c.buzz.message),$.push(""),$.push("# …or set a channel canvas (markdown, with the preview):"),$.push(c.buzz.canvas),$.push(""),$.join(`
266
+ `)}var HW=`figura fig — manage visualizations
264
267
 
265
268
  Usage:
266
269
  figura fig create [--file <path> | (reads stdin)] [options]
@@ -391,31 +394,31 @@ Team binding:
391
394
  When the cwd isn't linked to a team (no .figura/config.json above it — inside
392
395
  a git repo or not, including a bare temp/scratchpad dir), they refuse to fall
393
396
  back to the global ~/.figura credential — run \`figura link\` to bind this
394
- directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function Tx(){let c=[];for await(let $ of process.stdin)c.push(Buffer.from($));return Buffer.concat(c).toString("utf8")}function f9(c){if(!c)return;let $=c.split(",").map((Q)=>Q.trim()).filter(Boolean);return $.length?$:void 0}function QY(c){if(c.status!=="draft")return;process.stderr.write(`→ draft — not in the team library yet · commit with: figura fig commit ${c.id}
395
- `)}async function u4(c){let{flags:$}=r(c),{token:Q,apiUrl:J}=await jc($,{mutate:!0}),Y=f($,"file"),X;if(Y)try{X=await $Y.readFile(Y,"utf8")}catch(j){I(`could not read --file: ${y(j)}`)}else{if(process.stdin.isTTY)I("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");X=await Tx()}if(!X.trim())I("HTML content is empty.");let m=f($,"issue"),W=m!==void 0?Number(m):void 0;if(W!==void 0&&!Number.isFinite(W))I("--issue must be a number.");let G={html:X},z=f($,"title"),x=f($,"description"),i=f($,"area"),q=f9(f($,"tags")),M=f($,"orientation"),N=f($,"mode"),v=f($,"model"),U=f($,"device");if(z!==void 0)G.title=z;if(x!==void 0)G.description=x;if(i!==void 0)G.area=i;if(q!==void 0)G.tags=q;if(M!==void 0)G.orientation=M;if(N!==void 0)G.mode=N;if(v!==void 0)G.model=v;if(U!==void 0)G.device=U;if(W!==void 0)G.issue=W;if(a($,"publish"))G.publish=!0;if(a($,"commit"))G.status="published";G.toolchain=xx();let w;try{w=await zc("/v1/figs",{method:"POST",body:G,token:Q,apiUrl:J,source:mc})}catch(j){I(y(j))}if(a($,"json")){Nc(w),QY(w);return}Nc({id:w.id,slug:w.slug,status:w.status??null,isPublic:w.isPublic??!1,url:w.url??null,viewUrl:w.viewUrl??null}),QY(w)}async function a4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig revise <id> [--file <path>]");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m=f($,"file"),W;if(m)try{W=await $Y.readFile(m,"utf8")}catch(_){I(`could not read --file: ${y(_)}`)}else{if(process.stdin.isTTY)I("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");W=await Tx()}if(!W.trim())I("HTML content is empty.");let G=f($,"issue"),z=G!==void 0?Number(G):void 0;if(z!==void 0&&!Number.isFinite(z))I("--issue must be a number.");let x={html:W},i=f($,"title"),q=f($,"description"),M=f($,"area"),N=f9(f($,"tags")),v=f($,"orientation"),U=f($,"mode"),w=f($,"model"),j=f($,"device");if(i!==void 0)x.title=i;if(q!==void 0)x.description=q;if(M!==void 0)x.area=M;if(N!==void 0)x.tags=N;if(v!==void 0)x.orientation=v;if(U!==void 0)x.mode=U;if(w!==void 0)x.model=w;if(j!==void 0)x.device=j;if(z!==void 0)x.issue=z;if(a($,"publish"))x.publish=!0;if(a($,"commit"))x.status="published";let D;try{D=await zc(`/v1/figs/${encodeURIComponent(J)}/revise`,{method:"POST",body:x,token:Y,apiUrl:X,source:mc})}catch(_){I(y(_))}if(a($,"json")){Nc(D),QY(D);return}Nc({id:D.id,slug:D.slug,version:D.version,rootFigId:D.rootFigId,status:D.status??null,isPublic:D.isPublic??!1,url:D.url??null,viewUrl:D.viewUrl??null}),QY(D)}async function k4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig request-feedback <id> --from <name|email> [--note <text>]");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m=f($,"from");if(!m)I("--from is required (the teammate to ask, by name or email).");let W=f($,"note"),G={from:m};if(W!==void 0)G.note=W;let z;try{z=await zc(`/v1/figs/${encodeURIComponent(J)}/request-feedback`,{method:"POST",body:G,token:Y,apiUrl:X,source:mc})}catch(i){I(y(i))}if(a($,"json")){Nc(z);return}let x=z.request?.to??m;if(process.stdout.write(`Requested ${x}'s feedback.
397
+ directory, or pass --allow-global (env FIGURA_ALLOW_GLOBAL=1) to override.`;async function $q(){let c=[];for await(let $ of process.stdin)c.push(Buffer.from($));return Buffer.concat(c).toString("utf8")}function OW(c){if(!c)return;let $=c.split(",").map((Q)=>Q.trim()).filter(Boolean);return $.length?$:void 0}function AY(c){if(c.status!=="draft")return;process.stderr.write(`→ draft — not in the team library yet · commit with: figura fig commit ${c.id}
398
+ `)}async function UK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"file"),X;if(Y)try{X=await SY.readFile(Y,"utf8")}catch(j){I(`could not read --file: ${y(j)}`)}else{if(process.stdin.isTTY)I("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");X=await $q()}if(!X.trim())I("HTML content is empty.");let W=f($,"issue"),m=W!==void 0?Number(W):void 0;if(m!==void 0&&!Number.isFinite(m))I("--issue must be a number.");let G={html:X},z=f($,"title"),x=f($,"description"),q=f($,"area"),M=OW(f($,"tags")),N=f($,"orientation"),w=f($,"mode"),U=f($,"model"),v=f($,"device");if(z!==void 0)G.title=z;if(x!==void 0)G.description=x;if(q!==void 0)G.area=q;if(M!==void 0)G.tags=M;if(N!==void 0)G.orientation=N;if(w!==void 0)G.mode=w;if(U!==void 0)G.model=U;if(v!==void 0)G.device=v;if(m!==void 0)G.issue=m;if(k($,"publish"))G.publish=!0;if(k($,"commit"))G.status="published";G.toolchain=Z6();let i;try{i=await Wc("/v1/figs",{method:"POST",body:G,token:Q,apiUrl:J,source:Gc})}catch(j){I(y(j))}if(k($,"json")){ic(i),AY(i);return}ic({id:i.id,slug:i.slug,status:i.status??null,isPublic:i.isPublic??!1,url:i.url??null,viewUrl:i.viewUrl??null}),AY(i)}async function jK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig revise <id> [--file <path>]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=f($,"file"),m;if(W)try{m=await SY.readFile(W,"utf8")}catch(_){I(`could not read --file: ${y(_)}`)}else{if(process.stdin.isTTY)I("No --file given and stdin is a TTY. Pipe HTML or pass --file <path>.");m=await $q()}if(!m.trim())I("HTML content is empty.");let G=f($,"issue"),z=G!==void 0?Number(G):void 0;if(z!==void 0&&!Number.isFinite(z))I("--issue must be a number.");let x={html:m},q=f($,"title"),M=f($,"description"),N=f($,"area"),w=OW(f($,"tags")),U=f($,"orientation"),v=f($,"mode"),i=f($,"model"),j=f($,"device");if(q!==void 0)x.title=q;if(M!==void 0)x.description=M;if(N!==void 0)x.area=N;if(w!==void 0)x.tags=w;if(U!==void 0)x.orientation=U;if(v!==void 0)x.mode=v;if(i!==void 0)x.model=i;if(j!==void 0)x.device=j;if(z!==void 0)x.issue=z;if(k($,"publish"))x.publish=!0;if(k($,"commit"))x.status="published";let D;try{D=await Wc(`/v1/figs/${encodeURIComponent(J)}/revise`,{method:"POST",body:x,token:Y,apiUrl:X,source:Gc})}catch(_){I(y(_))}if(k($,"json")){ic(D),AY(D);return}ic({id:D.id,slug:D.slug,version:D.version,rootFigId:D.rootFigId,status:D.status??null,isPublic:D.isPublic??!1,url:D.url??null,viewUrl:D.viewUrl??null}),AY(D)}async function KK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig request-feedback <id> --from <name|email> [--note <text>]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=f($,"from");if(!W)I("--from is required (the teammate to ask, by name or email).");let m=f($,"note"),G={from:W};if(m!==void 0)G.note=m;let z;try{z=await Wc(`/v1/figs/${encodeURIComponent(J)}/request-feedback`,{method:"POST",body:G,token:Y,apiUrl:X,source:Gc})}catch(q){I(y(q))}if(k($,"json")){ic(z);return}let x=z.request?.to??W;if(process.stdout.write(`Requested ${x}'s feedback.
396
399
  `),z.figUrl)process.stdout.write(`${z.figUrl}
397
- `)}async function l4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig update <id> [options]");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m={},W=f($,"title"),G=f($,"description"),z=f($,"area"),x=f9(f($,"tags")),i=f($,"status");if(W!==void 0)m.title=W;if(G!==void 0)m.description=G;if(z!==void 0)m.area=z;if(x!==void 0)m.tags=x;if(i!==void 0)m.status=i;if(f($,"file"))I("`fig update` changes metadata only — it can't replace the HTML. Use `fig revise <id> --file <html>` to save a new version (the old one is kept).");if(Object.keys(m).length===0)I("Nothing to update. Pass at least one of --title/--description/--area/--tags/--status.");let q;try{q=await zc(`/v1/figs/${encodeURIComponent(J)}`,{method:"PATCH",body:m,token:Y,apiUrl:X,source:mc})}catch(M){I(y(M))}if(a($,"json")){Nc(q);return}Nc({id:q.id,slug:q.slug,status:q.status})}async function h4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig delete <id> [--hard]");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m=a($,"hard"),W;try{W=await zc(`/v1/figs/${encodeURIComponent(J)}${m?"?hard=true":""}`,{method:"DELETE",token:Y,apiUrl:X,source:mc})}catch(G){I(y(G))}Nc(W??{ok:!0})}async function y4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig revisions <id>");let{token:Y,apiUrl:X}=await jc($),m;try{m=await zc(`/v1/figs/${encodeURIComponent(J)}/revisions`,{token:Y,apiUrl:X,source:mc})}catch(G){I(y(G))}if(a($,"json")){Nc(m);return}let W=Array.isArray(m)?m:m.revisions??m.items??[];if(!W.length){process.stdout.write(`No revisions.
398
- `);return}for(let G of W)process.stdout.write(`v${G.version} ${G.id} ${G.title??G.slug}
399
- `)}async function o4(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(T9+`
400
- `);return}let{token:Q,apiUrl:J}=await jc($),Y=new URLSearchParams;for(let W of["platform","device","area","orientation","mode"]){let G=f($,W);if(G!==void 0)Y.set(W,G)}let X=Y.toString(),m;try{m=await zc(`/v1/fig/scaffold${X?`?${X}`:""}`,{token:Q,apiUrl:J,source:mc})}catch(W){I(y(W))}if(a($,"json")){Nc(m);return}process.stdout.write((m.scaffold??"")+`
401
- `)}async function g4(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(T9+`
402
- `);return}let{token:Q,apiUrl:J}=await jc($),Y;try{Y=await zc("/v1/fig/devices",{token:Q,apiUrl:J,source:mc})}catch(m){I(y(m))}if(a($,"json")){Nc(Y);return}let X=Y.devices??[];if(!X.length){process.stdout.write(`No devices.
400
+ `)}async function DK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig update <id> [options]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W={},m=f($,"title"),G=f($,"description"),z=f($,"area"),x=OW(f($,"tags")),q=f($,"status");if(m!==void 0)W.title=m;if(G!==void 0)W.description=G;if(z!==void 0)W.area=z;if(x!==void 0)W.tags=x;if(q!==void 0)W.status=q;if(f($,"file"))I("`fig update` changes metadata only — it can't replace the HTML. Use `fig revise <id> --file <html>` to save a new version (the old one is kept).");if(Object.keys(W).length===0)I("Nothing to update. Pass at least one of --title/--description/--area/--tags/--status.");let M;try{M=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{method:"PATCH",body:W,token:Y,apiUrl:X,source:Gc})}catch(N){I(y(N))}if(k($,"json")){ic(M);return}ic({id:M.id,slug:M.slug,status:M.status})}async function BK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig delete <id> [--hard]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=k($,"hard"),m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}${W?"?hard=true":""}`,{method:"DELETE",token:Y,apiUrl:X,source:Gc})}catch(G){I(y(G))}ic(m??{ok:!0})}async function HK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig revisions <id>");let{token:Y,apiUrl:X}=await Kc($),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}/revisions`,{token:Y,apiUrl:X,source:Gc})}catch(G){I(y(G))}if(k($,"json")){ic(W);return}let m=Array.isArray(W)?W:W.revisions??W.items??[];if(!m.length){process.stdout.write(`No revisions.
401
+ `);return}for(let G of m)process.stdout.write(`v${G.version} ${G.id} ${G.title??G.slug}
402
+ `)}async function OK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(HW+`
403
+ `);return}let{token:Q,apiUrl:J}=await Kc($),Y=new URLSearchParams;for(let m of["platform","device","area","orientation","mode"]){let G=f($,m);if(G!==void 0)Y.set(m,G)}let X=Y.toString(),W;try{W=await Wc(`/v1/fig/scaffold${X?`?${X}`:""}`,{token:Q,apiUrl:J,source:Gc})}catch(m){I(y(m))}if(k($,"json")){ic(W);return}process.stdout.write((W.scaffold??"")+`
404
+ `)}async function RK(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(HW+`
405
+ `);return}let{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/fig/devices",{token:Q,apiUrl:J,source:Gc})}catch(W){I(y(W))}if(k($,"json")){ic(Y);return}let X=Y.devices??[];if(!X.length){process.stdout.write(`No devices.
403
406
  `);return}process.stdout.write(`ID LABEL PORTRAIT CUTOUT RADIUS
404
- `);for(let m of X){let W=m.id===Y.default?" (default)":"";process.stdout.write(`${m.id}${W} ${m.label} ${m.logical.portrait.w}×${m.logical.portrait.h} ${m.cutout} ${m.cornerRadius}
405
- `)}}async function d4(c){let{flags:$}=r(c),{token:Q,apiUrl:J}=await jc($),Y=new URLSearchParams,X=f($,"area"),m=f($,"tag"),W=f($,"limit");if(X)Y.set("area",X);if(m)Y.set("tag",m);if(W)Y.set("limit",W);let G=Y.toString(),z;try{z=await zc(`/v1/figs${G?`?${G}`:""}`,{token:Q,apiUrl:J,source:mc})}catch(i){I(y(i))}let x=Array.isArray(z)?z:z.items??[];if(a($,"json")){Nc(z);return}if(!x.length){process.stdout.write(`No figs.
406
- `);return}for(let i of x){let q=i.tags?.length?` #${i.tags.join(" #")}`:"";process.stdout.write(`${i.id} ${i.area??"-"} ${i.title??i.slug}${q}
407
- `)}}async function s4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig get <id>");let{token:Y,apiUrl:X}=await jc($),m;try{m=await zc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:mc})}catch(W){I(y(W))}Nc(m)}async function r4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig buzz-payload <id> [--channel <uuid>] [--json]");let Y=await jc($),{token:X,apiUrl:m}=Y,W;try{W=await zc(`/v1/figs/${encodeURIComponent(J)}`,{token:X,apiUrl:m,source:mc})}catch(i){I(y(i))}let G=W.id??J,z=G.replace(/^fig_/,"").trim();if(!z)I("Could not resolve the fig public id from the API response.");let x=Px({figId:G,publicId:z,title:W.title||W.slug||"Untitled fig",isPublic:W.isPublic,viewUrl:typeof W.viewUrl==="string"?W.viewUrl:void 0,channel:f($,"channel")});if(a($,"json")){Nc(x);return}process.stdout.write(bx(x))}async function t4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig commit <id>");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m;try{m=await zc(`/v1/figs/${encodeURIComponent(J)}/commit`,{method:"POST",body:{},token:Y,apiUrl:X,source:mc})}catch(W){I(y(W))}Nc(m)}async function e4(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig uncommit <id>");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m;try{m=await zc(`/v1/figs/${encodeURIComponent(J)}/uncommit`,{method:"POST",body:{},token:Y,apiUrl:X,source:mc})}catch(W){I(y(W))}Nc(m)}async function cj(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig publish <id> [--unpublish]");let{token:Y,apiUrl:X}=await jc($,{mutate:!0}),m=!a($,"unpublish"),W;try{W=await zc(`/v1/figs/${encodeURIComponent(J)}/publish`,{method:"POST",body:{isPublic:m},token:Y,apiUrl:X,source:mc})}catch(G){I(y(G))}Nc(W)}function Ex(c){let $=process.platform,Q,J;if($==="darwin")Q="open",J=[c];else if($==="win32")Q="cmd",J=["/c","start","",c];else Q="xdg-open",J=[c];let Y=n4(Q,J,{stdio:"ignore",detached:!0});Y.on("error",()=>{process.stderr.write(`figura: could not open browser; file is at ${c}
408
- `)}),Y.unref()}async function $j(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig open <id> [--print] [--local]");let{token:Y,apiUrl:X}=await jc($);if(a($,"print")){let z;try{z=await lJ(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:mc})}catch(x){I(y(x))}if(process.stdout.write(z),!z.endsWith(`
407
+ `);for(let W of X){let m=W.id===Y.default?" (default)":"";process.stdout.write(`${W.id}${m} ${W.label} ${W.logical.portrait.w}×${W.logical.portrait.h} ${W.cutout} ${W.cornerRadius}
408
+ `)}}async function pK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($),Y=new URLSearchParams,X=f($,"area"),W=f($,"tag"),m=f($,"limit");if(X)Y.set("area",X);if(W)Y.set("tag",W);if(m)Y.set("limit",m);let G=Y.toString(),z;try{z=await Wc(`/v1/figs${G?`?${G}`:""}`,{token:Q,apiUrl:J,source:Gc})}catch(q){I(y(q))}let x=Array.isArray(z)?z:z.items??[];if(k($,"json")){ic(z);return}if(!x.length){process.stdout.write(`No figs.
409
+ `);return}for(let q of x){let M=q.tags?.length?` #${q.tags.join(" #")}`:"";process.stdout.write(`${q.id} ${q.area??"-"} ${q.title??q.slug}${M}
410
+ `)}}async function IK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig get <id>");let{token:Y,apiUrl:X}=await Kc($),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:Gc})}catch(m){I(y(m))}ic(W)}async function ZK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig buzz-payload <id> [--channel <uuid>] [--json]");let Y=await Kc($),{token:X,apiUrl:W}=Y,m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:X,apiUrl:W,source:Gc})}catch(q){I(y(q))}let G=m.id??J,z=G.replace(/^fig_/,"").trim();if(!z)I("Could not resolve the fig public id from the API response.");let x=r6({figId:G,publicId:z,title:m.title||m.slug||"Untitled fig",isPublic:m.isPublic,viewUrl:typeof m.viewUrl==="string"?m.viewUrl:void 0,channel:f($,"channel")});if(k($,"json")){ic(x);return}process.stdout.write(t6(x))}async function LK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig commit <id>");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}/commit`,{method:"POST",body:{},token:Y,apiUrl:X,source:Gc})}catch(m){I(y(m))}ic(W)}async function _K(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig uncommit <id>");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W;try{W=await Wc(`/v1/figs/${encodeURIComponent(J)}/uncommit`,{method:"POST",body:{},token:Y,apiUrl:X,source:Gc})}catch(m){I(y(m))}ic(W)}async function SK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig publish <id> [--unpublish]");let{token:Y,apiUrl:X}=await Kc($,{mutate:!0}),W=!k($,"unpublish"),m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}/publish`,{method:"POST",body:{isPublic:W},token:Y,apiUrl:X,source:Gc})}catch(G){I(y(G))}ic(m)}function e6(c){let $=process.platform,Q,J;if($==="darwin")Q="open",J=[c];else if($==="win32")Q="cmd",J=["/c","start","",c];else Q="xdg-open",J=[c];let Y=vK(Q,J,{stdio:"ignore",detached:!0});Y.on("error",()=>{process.stderr.write(`figura: could not open browser; file is at ${c}
411
+ `)}),Y.unref()}async function AK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig open <id> [--print] [--local]");let{token:Y,apiUrl:X}=await Kc($);if(k($,"print")){let z;try{z=await NY(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:Gc})}catch(x){I(y(x))}if(process.stdout.write(z),!z.endsWith(`
409
412
  `))process.stdout.write(`
410
- `);return}if(!a($,"local")){let z;try{z=await zc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:mc})}catch(x){I(y(x))}if(z.viewUrl){Ex(z.viewUrl),process.stdout.write(`Opening ${z.viewUrl}
411
- `);return}}let m;try{m=await lJ(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:mc})}catch(z){I(y(z))}let W=await I5(),G=f4(W,`figura-fig-${J.replace(/[^a-zA-Z0-9_-]/g,"")}.html`);await $Y.mkdir(W,{recursive:!0}),await $Y.writeFile(G,Gj(m),"utf8"),Ex(G),process.stdout.write(`Opening ${G}
412
- `)}var Qj=[{marker:"fig-device",component:"device-frame",sizedBy:/\.fig-device\.portrait\s*\{[^}]*width\s*:/i},{marker:"frame-web",component:"browser-chrome",sizedBy:/\.frame-web\s*\{[^}]*width\s*:/i},{marker:"fig-statusbar",component:"status-bar",sizedBy:/\.fig-statusbar\s*\{[^}]*height\s*:/i},{marker:"fig-controls",component:"control-bar",sizedBy:/\.fig-controls\s*\{[^}]*display\s*:/i}];function Jj(c){let $=c.match(/<script\b[^>]*id=["']fig-manifest["'][^>]*>([\s\S]*?)<\/script>/i)?.[1];if(!$)return null;try{return JSON.parse($)}catch{return null}}function Yj(c,$){return new RegExp(`class\\s*=\\s*["'][^"']*(?<![\\w-])${$}(?![\\w-])`,"i").test(c)}function Xj(c){let $=[],Q=Jj(c),J=Array.isArray(Q?.components)?Q.components:[];$.push({check:"manifest",ok:!!Q,detail:Q?"fig manifest present and parseable":"no readable fig manifest in the served HTML"});for(let{marker:X,component:m,sizedBy:W}of Qj){if(!Yj(c,X))continue;let G=W.test(c);if($.push({check:`component:${m}`,ok:G,detail:G?`.${X} is used in markup and the served CSS sizes it`:`.${X} is used in markup but NO served CSS gives it dimensions — every one of them renders as an empty box`}),!J.includes(m)&&!G)$.push({check:`manifest.components:${m}`,ok:!1,detail:`manifest components ${JSON.stringify(J)} omits "${m}" while the markup uses .${X}`})}let Y=Q?.checks??{};if(Y.frameKit===!1)$.push({check:"checks.frameKit",ok:!1,detail:"the fig records its own frame-kit contradiction — it draws a .fig-device but no frame geometry was stamped, so every phone renders with no dimensions"});if(Y.complete===!1)$.push({check:"checks.complete",ok:!1,detail:"the document looks truncated (unclosed html/body — the generation was cut off)"});if(Y.doubleFramed===!0)$.push({check:"checks.doubleFramed",ok:!1,detail:"declares a whole-fig figura:artboard meta AND draws an in-fig .fig-device — it renders framed twice"});return $}async function mj(c){let{flags:$,positionals:Q}=r(c),J=Q[0];if(!J)I("Usage: figura fig verify <id> [--json]");let{token:Y,apiUrl:X}=await jc($),m;try{m=await lJ(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:mc})}catch(z){I(y(z))}let W=Xj(m),G=W.filter((z)=>!z.ok);if(a($,"json")){if(Nc({id:J,ok:G.length===0,findings:W}),G.length)process.exit(1);return}for(let z of W)process.stdout.write(`${z.ok?"ok ":"FAIL"} ${z.check} — ${z.detail}
413
+ `);return}if(!k($,"local")){let z;try{z=await Wc(`/v1/figs/${encodeURIComponent(J)}`,{token:Y,apiUrl:X,source:Gc})}catch(x){I(y(x))}if(z.viewUrl){e6(z.viewUrl),process.stdout.write(`Opening ${z.viewUrl}
414
+ `);return}}let W;try{W=await NY(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:Gc})}catch(z){I(y(z))}let m=await d9(),G=iK(m,`figura-fig-${J.replace(/[^a-zA-Z0-9_-]/g,"")}.html`);await SY.mkdir(m,{recursive:!0}),await SY.writeFile(G,fK(W),"utf8"),e6(G),process.stdout.write(`Opening ${G}
415
+ `)}var CK=[{marker:"fig-device",component:"device-frame",sizedBy:/\.fig-device\.portrait\s*\{[^}]*width\s*:/i},{marker:"frame-web",component:"browser-chrome",sizedBy:/\.frame-web\s*\{[^}]*width\s*:/i},{marker:"fig-statusbar",component:"status-bar",sizedBy:/\.fig-statusbar\s*\{[^}]*height\s*:/i},{marker:"fig-controls",component:"control-bar",sizedBy:/\.fig-controls\s*\{[^}]*display\s*:/i}];function PK(c){let $=c.match(/<script\b[^>]*id=["']fig-manifest["'][^>]*>([\s\S]*?)<\/script>/i)?.[1];if(!$)return null;try{return JSON.parse($)}catch{return null}}function EK(c,$){return new RegExp(`class\\s*=\\s*["'][^"']*(?<![\\w-])${$}(?![\\w-])`,"i").test(c)}function bK(c){let $=[],Q=PK(c),J=Array.isArray(Q?.components)?Q.components:[];$.push({check:"manifest",ok:!!Q,detail:Q?"fig manifest present and parseable":"no readable fig manifest in the served HTML"});for(let{marker:X,component:W,sizedBy:m}of CK){if(!EK(c,X))continue;let G=m.test(c);if($.push({check:`component:${W}`,ok:G,detail:G?`.${X} is used in markup and the served CSS sizes it`:`.${X} is used in markup but NO served CSS gives it dimensions — every one of them renders as an empty box`}),!J.includes(W)&&!G)$.push({check:`manifest.components:${W}`,ok:!1,detail:`manifest components ${JSON.stringify(J)} omits "${W}" while the markup uses .${X}`})}let Y=Q?.checks??{};if(Y.frameKit===!1)$.push({check:"checks.frameKit",ok:!1,detail:"the fig records its own frame-kit contradiction — it draws a .fig-device but no frame geometry was stamped, so every phone renders with no dimensions"});if(Y.complete===!1)$.push({check:"checks.complete",ok:!1,detail:"the document looks truncated (unclosed html/body — the generation was cut off)"});if(Y.doubleFramed===!0)$.push({check:"checks.doubleFramed",ok:!1,detail:"declares a whole-fig figura:artboard meta AND draws an in-fig .fig-device — it renders framed twice"});return $}async function FK(c){let{flags:$,positionals:Q}=t(c),J=Q[0];if(!J)I("Usage: figura fig verify <id> [--json]");let{token:Y,apiUrl:X}=await Kc($),W;try{W=await NY(`/v1/figs/${encodeURIComponent(J)}/raw`,{token:Y,apiUrl:X,source:Gc})}catch(z){I(y(z))}let m=bK(W),G=m.filter((z)=>!z.ok);if(k($,"json")){if(ic({id:J,ok:G.length===0,findings:m}),G.length)process.exit(1);return}for(let z of m)process.stdout.write(`${z.ok?"ok ":"FAIL"} ${z.check} — ${z.detail}
413
416
  `);if(G.length)process.stderr.write(`
414
417
  figura: ${G.length} check(s) failed on the served fig — it will not render as authored.
415
418
  `+`If a frame class is unsized, re-land the fig; the kit is stamped at save time.
416
419
  `),process.exit(1);process.stdout.write(`
417
420
  The served fig renders as authored.
418
- `)}var Fx=`<meta http-equiv="Content-Security-Policy" content="connect-src 'none'; base-uri 'none'; form-action 'none';">`;function Wj(c){let $=c.match(/<head[^>]*>/i);if($){let Q=$.index+$[0].length;return c.slice(0,Q)+Fx+c.slice(Q)}return Fx+c}function Gj(c){return`<!DOCTYPE html>
421
+ `)}var cq=`<meta http-equiv="Content-Security-Policy" content="connect-src 'none'; base-uri 'none'; form-action 'none';">`;function TK(c){let $=c.match(/<head[^>]*>/i);if($){let Q=$.index+$[0].length;return c.slice(0,Q)+cq+c.slice(Q)}return cq+c}function fK(c){return`<!DOCTYPE html>
419
422
  <html lang="en">
420
423
  <head>
421
424
  <meta charset="utf-8">
@@ -424,23 +427,23 @@ The served fig renders as authored.
424
427
  <style>html,body{margin:0;height:100%;background:#0a0a0a}iframe{border:0;display:block;width:100vw;height:100vh}</style>
425
428
  </head>
426
429
  <body>
427
- <iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${Wj(c).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}"></iframe>
430
+ <iframe title="Figura fig" sandbox="allow-scripts" srcdoc="${TK(c).replace(/&/g,"&amp;").replace(/"/g,"&quot;")}"></iframe>
428
431
  </body>
429
432
  </html>
430
- `}async function fx(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(T9+`
431
- `);return}switch($){case"create":return u4(Q);case"revise":return a4(Q);case"revisions":return y4(Q);case"request-feedback":return k4(Q);case"update":return l4(Q);case"delete":return h4(Q);case"commit":return t4(Q);case"uncommit":return e4(Q);case"publish":return cj(Q);case"list":return d4(Q);case"get":return s4(Q);case"buzz-payload":return r4(Q);case"scaffold":return o4(Q);case"devices":return g4(Q);case"open":return $j(Q);case"verify":return mj(Q);default:I(`Unknown fig subcommand '${$}'. See \`figura fig --help\`.`)}}var zj=`figura comment — add a comment to a fig
433
+ `}async function Qq(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(HW+`
434
+ `);return}switch($){case"create":return UK(Q);case"revise":return jK(Q);case"revisions":return HK(Q);case"request-feedback":return KK(Q);case"update":return DK(Q);case"delete":return BK(Q);case"commit":return LK(Q);case"uncommit":return _K(Q);case"publish":return SK(Q);case"list":return pK(Q);case"get":return IK(Q);case"buzz-payload":return ZK(Q);case"scaffold":return OK(Q);case"devices":return RK(Q);case"open":return AK(Q);case"verify":return FK(Q);default:I(`Unknown fig subcommand '${$}'. See \`figura fig --help\`.`)}}v0();var nK=`figura comment — add a comment to a fig
432
435
 
433
436
  Usage:
434
- figura comment <fig-id> --body "your comment" [--json]`;async function nx(c){let{flags:$,positionals:Q}=r(c);if($.help||$.h){process.stdout.write(zj+`
435
- `);return}let J=Q[0];if(!J)I('Usage: figura comment <fig-id> --body "..."');let Y=f($,"body");if(!Y)I("--body is required.");let{token:X,apiUrl:m}=await jc($,{mutate:!0}),W;try{W=await zc(`/v1/figs/${encodeURIComponent(J)}/comments`,{method:"POST",body:{body:Y},token:X,apiUrl:m,source:mc})}catch(G){I(y(G))}if(a($,"json")){Nc(W);return}process.stdout.write(`Comment ${W.id} added.
436
- `)}var xj=`figura token — inspect API token state
437
+ figura comment <fig-id> --body "your comment" [--json]`;async function Jq(c){let{flags:$,positionals:Q}=t(c);if($.help||$.h){process.stdout.write(nK+`
438
+ `);return}let J=Q[0];if(!J)I('Usage: figura comment <fig-id> --body "..."');let Y=f($,"body");if(!Y)I("--body is required.");let{token:X,apiUrl:W}=await Kc($,{mutate:!0}),m;try{m=await Wc(`/v1/figs/${encodeURIComponent(J)}/comments`,{method:"POST",body:{body:Y},token:X,apiUrl:W,source:Gc})}catch(G){I(y(G))}if(k($,"json")){ic(m);return}process.stdout.write(`Comment ${m.id} added.
439
+ `)}v0();i0();var uK=`figura token — inspect API token state
437
440
 
438
441
  Usage:
439
- figura token current [--json] Show details of the active token`;async function ij(c){let{flags:$}=r(c),Q=await jc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:m}=Q,W;try{W=await zc("/v1/whoami",{token:J,apiUrl:Y,source:mc})}catch(x){I(y(x))}let G={source:X,configPath:X==="project"?m:X==="global"?S0:null};if(a($,"json")){Nc({token:W.token??null,team:W.team??null,scopes:W.scopes??[],binding:G});return}if(W.actor&&W.actor!=="token"){process.stdout.write(`The active credentials are a ${W.actor} session, not an API token.
440
- `);return}let z=[];if(z.push(`id: ${W.token?.id??"-"}`),z.push(`name: ${W.token?.name??"-"}`),z.push(`prefix: ${W.token?.prefix??"-"}`),W.team)z.push(`team: ${W.team.slug??W.team.id??"-"}`);if(W.scopes?.length)z.push(`scopes: ${W.scopes.join(", ")}`);z.push(`bound: ${G.source}${G.configPath?` (${G.configPath})`:""}`),process.stdout.write(z.join(`
442
+ figura token current [--json] Show details of the active token`;async function kK(c){let{flags:$}=t(c),Q=await Kc($),{token:J,apiUrl:Y,tokenSource:X,projectConfigPath:W}=Q,m;try{m=await Wc("/v1/whoami",{token:J,apiUrl:Y,source:Gc})}catch(x){I(y(x))}let G={source:X,configPath:X==="project"?W:X==="global"?R0:null};if(k($,"json")){ic({token:m.token??null,team:m.team??null,scopes:m.scopes??[],binding:G});return}if(m.actor&&m.actor!=="token"){process.stdout.write(`The active credentials are a ${m.actor} session, not an API token.
443
+ `);return}let z=[];if(z.push(`id: ${m.token?.id??"-"}`),z.push(`name: ${m.token?.name??"-"}`),z.push(`prefix: ${m.token?.prefix??"-"}`),m.team)z.push(`team: ${m.team.slug??m.team.id??"-"}`);if(m.scopes?.length)z.push(`scopes: ${m.scopes.join(", ")}`);z.push(`bound: ${G.source}${G.configPath?` (${G.configPath})`:""}`),process.stdout.write(z.join(`
441
444
  `)+`
442
- `)}async function ux(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(xj+`
443
- `);return}switch($){case"current":return ij(Q);default:I(`Unknown token subcommand '${$}'. See \`figura token --help\`.`)}}var qj=`figura sources — manage the company-brain source spine
445
+ `)}async function Yq(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(uK+`
446
+ `);return}switch($){case"current":return kK(Q);default:I(`Unknown token subcommand '${$}'. See \`figura token --help\`.`)}}v0();var aK=`figura sources — manage the company-brain source spine
444
447
 
445
448
  Usage:
446
449
  figura sources connect --kind <git|claude_mem> --ref <owner/repo> [options]
@@ -455,13 +458,13 @@ Connect options:
455
458
  --export-path <str> claude_mem export file path (.json/.jsonl)
456
459
 
457
460
  Sync:
458
- --id <id> Sync one source; omit to sync every connected source`;async function Mj(c){let{flags:$}=r(c),{token:Q,apiUrl:J}=await jc($,{mutate:!0}),Y=f($,"kind");if(!Y)I("--kind is required (git | claude_mem).");let X=f($,"ref"),m={},W=f($,"branch"),G=f($,"export-path");if(W!==void 0)m.defaultBranch=W;if(G!==void 0)m.exportPath=G;let z={kind:Y};if(X!==void 0)z.externalRef=X;let x=f($,"name");if(x!==void 0)z.displayName=x;if(Object.keys(m).length)z.config=m;let i;try{i=await zc("/v1/sources",{method:"POST",body:z,token:Q,apiUrl:J,source:mc})}catch(q){I(y(q))}Nc(i.source)}async function Vj(c){let{flags:$}=r(c),{token:Q,apiUrl:J}=await jc($),Y;try{Y=await zc("/v1/sources",{token:Q,apiUrl:J,source:mc})}catch(m){I(y(m))}if(a($,"json")){Nc(Y);return}let X=Y.sources??[];if(!X.length){process.stdout.write(`No sources connected.
459
- `);return}for(let m of X){let W=m.lastSyncedAt?m.lastSyncedAt:"never";process.stdout.write(`${m.id} ${m.kind} ${m.externalRef??"-"} ${m.eventCount??0} events ${m.status??"-"} synced ${W}
460
- `)}}async function ax(c,$,Q){return zc(`/v1/sources/${encodeURIComponent(c)}/sync`,{method:"POST",token:$,apiUrl:Q,source:mc})}async function Nj(c){let{flags:$}=r(c),{token:Q,apiUrl:J}=await jc($,{mutate:!0}),Y=f($,"id");if(Y){try{Nc({id:Y,...await ax(Y,Q,J)})}catch(W){I(y(W))}return}let X;try{X=await zc("/v1/sources",{token:Q,apiUrl:J,source:mc})}catch(W){I(y(W))}let m=X.sources??[];if(!m.length){process.stdout.write(`No sources to sync.
461
- `);return}for(let W of m)try{let G=await ax(W.id,Q,J);process.stdout.write(`${W.id} ${W.kind} ${W.externalRef??"-"} ingested ${G.ingested}/${G.fetched}
462
- `)}catch(G){process.stderr.write(`${W.id} ERROR ${y(G)}
463
- `)}}async function kx(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(qj+`
464
- `);return}switch($){case"connect":return Mj(Q);case"list":return Vj(Q);case"sync":return Nj(Q);default:I(`Unknown sources subcommand '${$}'. See \`figura sources --help\`.`)}}import{spawn as wj}from"node:child_process";import{existsSync as vj}from"node:fs";import{fileURLToPath as Uj}from"node:url";var jj=`figura mcp — run the Figura MCP server (stdio) for Claude Code
461
+ --id <id> Sync one source; omit to sync every connected source`;async function lK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"kind");if(!Y)I("--kind is required (git | claude_mem).");let X=f($,"ref"),W={},m=f($,"branch"),G=f($,"export-path");if(m!==void 0)W.defaultBranch=m;if(G!==void 0)W.exportPath=G;let z={kind:Y};if(X!==void 0)z.externalRef=X;let x=f($,"name");if(x!==void 0)z.displayName=x;if(Object.keys(W).length)z.config=W;let q;try{q=await Wc("/v1/sources",{method:"POST",body:z,token:Q,apiUrl:J,source:Gc})}catch(M){I(y(M))}ic(q.source)}async function hK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($),Y;try{Y=await Wc("/v1/sources",{token:Q,apiUrl:J,source:Gc})}catch(W){I(y(W))}if(k($,"json")){ic(Y);return}let X=Y.sources??[];if(!X.length){process.stdout.write(`No sources connected.
462
+ `);return}for(let W of X){let m=W.lastSyncedAt?W.lastSyncedAt:"never";process.stdout.write(`${W.id} ${W.kind} ${W.externalRef??"-"} ${W.eventCount??0} events ${W.status??"-"} synced ${m}
463
+ `)}}async function Xq(c,$,Q){return Wc(`/v1/sources/${encodeURIComponent(c)}/sync`,{method:"POST",token:$,apiUrl:Q,source:Gc})}async function yK(c){let{flags:$}=t(c),{token:Q,apiUrl:J}=await Kc($,{mutate:!0}),Y=f($,"id");if(Y){try{ic({id:Y,...await Xq(Y,Q,J)})}catch(m){I(y(m))}return}let X;try{X=await Wc("/v1/sources",{token:Q,apiUrl:J,source:Gc})}catch(m){I(y(m))}let W=X.sources??[];if(!W.length){process.stdout.write(`No sources to sync.
464
+ `);return}for(let m of W)try{let G=await Xq(m.id,Q,J);process.stdout.write(`${m.id} ${m.kind} ${m.externalRef??"-"} ingested ${G.ingested}/${G.fetched}
465
+ `)}catch(G){process.stderr.write(`${m.id} ERROR ${y(G)}
466
+ `)}}async function Wq(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(aK+`
467
+ `);return}switch($){case"connect":return lK(Q);case"list":return hK(Q);case"sync":return yK(Q);default:I(`Unknown sources subcommand '${$}'. See \`figura sources --help\`.`)}}i0();import{spawn as oK}from"node:child_process";import{existsSync as gK}from"node:fs";import{fileURLToPath as dK}from"node:url";var sK=`figura mcp — run the Figura MCP server (stdio) for Claude Code
465
468
 
466
469
  Usage:
467
470
  figura mcp
@@ -472,11 +475,11 @@ Add it to Claude Code with:
472
475
  Serves the same tools as the standalone figura-mcp package, but ships inside the
473
476
  CLI (one install, nothing to fetch) and resolves your team from the nearest
474
477
  .figura/config.json — so a per-project login (figura login --project) gives each
475
- repo its own team automatically.`;function Kj(){let c=[new URL("./mcp.js",import.meta.url),new URL("../../../mcp/src/index.ts",import.meta.url)].map(($)=>Uj($));for(let $ of c)if(vj($))return $;process.stderr.write(`figura: MCP server not found — reinstall figura-cli:
478
+ repo its own team automatically.`;function rK(){let c=[new URL("./mcp.js",import.meta.url),new URL("../../../mcp/src/index.ts",import.meta.url)].map(($)=>dK($));for(let $ of c)if(gK($))return $;process.stderr.write(`figura: MCP server not found — reinstall figura-cli:
476
479
  `+` curl -fsSL https://figura.so/install.sh | bash
477
- `),process.exit(1)}async function lx(c){if(c.includes("--help")||c.includes("-h")){process.stdout.write(jj+`
478
- `);return}let $=await j0({}),Q={...process.env};if($.token&&!Q.FIGURA_TOKEN)Q.FIGURA_TOKEN=$.token;if($.apiUrl&&!Q.FIGURA_API_URL)Q.FIGURA_API_URL=$.apiUrl;let J=Kj(),Y=wj(process.execPath,[J],{stdio:"inherit",env:Q});Y.on("error",(X)=>{process.stderr.write(`figura: failed to start MCP server: ${X.message}
479
- `),process.exit(1)}),Y.on("exit",(X,m)=>{if(m)process.kill(process.pid,m);else process.exit(X??0)})}import{fileURLToPath as Dj}from"node:url";var JY="figura-cli",Bj=`figura upgrade — print the command to update the Figura CLI
480
+ `),process.exit(1)}async function mq(c){if(c.includes("--help")||c.includes("-h")){process.stdout.write(sK+`
481
+ `);return}let $=await W0({}),Q={...process.env};if($.token&&!Q.FIGURA_TOKEN)Q.FIGURA_TOKEN=$.token;if($.apiUrl&&!Q.FIGURA_API_URL)Q.FIGURA_API_URL=$.apiUrl;let J=rK(),Y=oK(process.execPath,[J],{stdio:"inherit",env:Q});Y.on("error",(X)=>{process.stderr.write(`figura: failed to start MCP server: ${X.message}
482
+ `),process.exit(1)}),Y.on("exit",(X,W)=>{if(W)process.kill(process.pid,W);else process.exit(X??0)})}import{fileURLToPath as tK}from"node:url";MY();var CY="figura-cli",eK=`figura upgrade — print the command to update the Figura CLI
480
483
 
481
484
  Usage:
482
485
  figura upgrade [--version <v>]
@@ -490,49 +493,51 @@ no self-mutation. Copy the printed command and run it yourself.
490
493
 
491
494
  Options:
492
495
  --version <v> print the command for a specific version instead of latest
493
- --help, -h show this help`;function Hj(c,$){let Q=$.replace(/\\/g,"/");if(Q.includes("/_npx/")||c.npm_command==="exec")return"npx";if(Q.includes("/.bun/install/cache/"))return"bunx";return null}function Oj(c,$){let Q=c.generic?`Update ${JY} (and the bundled MCP server) with your package manager's global install, e.g.:`:`To update ${JY} (and the bundled MCP server), run:`,J=$?"Your skills refresh automatically the next time Claude Code starts.":`Then finish the Claude Code integration (skills, auto-update, badge):
496
+ --help, -h show this help`;function c2(c,$){let Q=$.replace(/\\/g,"/");if(Q.includes("/_npx/")||c.npm_command==="exec")return"npx";if(Q.includes("/.bun/install/cache/"))return"bunx";return null}function $2(c,$){let Q=c.generic?`Update ${CY} (and the bundled MCP server) with your package manager's global install, e.g.:`:`To update ${CY} (and the bundled MCP server), run:`,J=$?"Your skills refresh automatically the next time Claude Code starts.":`Then finish the Claude Code integration (skills, auto-update, badge):
494
497
 
495
498
  figura install`;return`${Q}
496
499
 
497
500
  ${c.command}
498
501
 
499
502
  ${J}
500
- `}async function hx(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(Bj+`
501
- `);return}let Q=f($,"version")||"latest",J=Dj(import.meta.url),Y=Hj(process.env,J);if(Y){process.stdout.write(`figura is running via ${Y} — there's no installed copy to update. `+`Rerun with @latest to get the newest:
503
+ `}async function Gq(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(eK+`
504
+ `);return}let Q=f($,"version")||"latest",J=tK(import.meta.url),Y=c2(process.env,J);if(Y){process.stdout.write(`figura is running via ${Y} — there's no installed copy to update. `+`Rerun with @latest to get the newest:
502
505
 
503
- ${Y} ${JY}@${Q}
504
- `);return}let X=await kJ(JY,Q),m=await jx();process.stdout.write(Oj(X,m))}import{homedir as pj}from"node:os";import{join as Rj}from"node:path";var Ij=`figura doctor — check the CLI, MCP, and skills are up to date
506
+ ${Y} ${CY}@${Q}
507
+ `);return}let X=await qY(CY,Q),W=await b6();process.stdout.write($2(X,W))}import{homedir as Q2}from"node:os";import{join as J2}from"node:path";b$();i0();rQ();vY();var Y2=`figura doctor — check the CLI, MCP, and skills are up to date
505
508
 
506
509
  Usage:
507
510
  figura doctor [--session-start]
508
511
 
509
- Plain: hits the npm registry, prints the installed vs latest figura-cli version
510
- (the MCP + skills ship inside the CLI, so they share its version) and whether the
511
- installed skills have drifted, then points at \`figura upgrade\` if anything is
512
- behind. \`figura upgrade\` prints the exact command for your package manager.
512
+ Plain: hits the npm registry for the installed vs latest figura-cli version, and
513
+ the Figura engine for the canonical /fig SKILL version + hash (#752 the skill
514
+ is versioned + integrity-checked INDEPENDENTLY of the CLI now). Reports whether
515
+ the installed skill is behind or MODIFIED vs the engine's canonical, then points
516
+ at \`figura upgrade\` / \`figura skill install\` if anything is behind.
513
517
 
514
518
  --session-start Hook mode for Claude Code's SessionStart hook (see
515
- \`figura hook install\`). Reinstalls drifted skills in place and,
519
+ \`figura hook install\`). Reinstalls drifted/behind skills in place
520
+ (engine \`latest\`, hash-verified; bundled fallback offline) and,
516
521
  if the CLI is behind, prints a one-line notice pointing at
517
522
  \`figura upgrade\` — never self-executes, never blocks startup,
518
- never errors out. The registry is checked at most once a day.`,h8=Rj(pj(),".claude","skills"),Lj=1e4;function Zj(c,$,Q,J){if(c)return c;return AQ($,Q,J).latest??null}async function _j(){let c=i0(),$=Date.now(),Q=[];try{let J=yJ(h8),Y=J!=null&&q0(c,J),X=I9(h8),m=oJ(),W=X!=null&&m!=null&&X!==m;if(Y||W){TQ(h8);let G=Y?`${J} → ${c}`:"content changed";Q.push(`skills were behind (${G}); reinstalled.`)}}catch{}try{let J=await N8(),Y=P5(J,$)?J.latest:void 0;if(!Y){let X=await w9(1500);if(X)Y=X,await CQ({...J,latest:X,checkedAt:$})}if(Y&&q0(Y,c))Q.push(`figura-cli ${c} → ${Y}: run \`figura upgrade\` to update.`)}catch{}if(Q.length)process.stdout.write("[figura] "+Q.join(" ")+`
519
- `)}async function Sj(c){let $=i0(),Q=await w9(Lj),J=yJ(h8),Y=I9(h8),X=oJ(),m={};try{m=await N8()}catch{}let{apiUrl:W}=await j0({apiUrlFlag:f(c,"api-url")}).catch(()=>({apiUrl:""})),G=p$(W),z=Zj(Q,m,G,Date.now());if(Q)try{await CQ({...m,latest:Q,checkedAt:Date.now()})}catch{}let x=Boolean(J)&&q0($,J),i=Y!=null&&X!=null&&Y!==X,q=x||i,M=L9({stamp:J,installedHash:FQ(h8),bundledHash:X,cliVersion:$}),N=(()=>{switch(M){case"pristine":return`pristine (shipped v${$})`;case"stale":return`stale (v${J??"?"} → v${$}) — run \`figura skill install\` to reinstall`;case"modified":return`MODIFIED (differs from figura-cli's shipped v${$}) — run \`figura skill install\` to restore it`;case"absent":return"not installed — run `figura skill install`"}})(),v=[];v.push(`figura-cli ${$}${z?` (latest ${z})`:" (latest: unknown)"}`),v.push("MCP server bundled in the CLI — same version"),v.push(`skills ${J?J:"unstamped"} in ${h8}${q?" (behind — run figura skill install)":""}`),v.push(`skill ${N}`);let U=z&&q0(z,$);v.push(""),v.push(U?`Update available (${$} → ${z}): run \`figura upgrade\` for the command.`:q?"Skills are behind the CLI: run `figura skill install`.":z?"✓ Everything is up to date.":"Couldn't reach the npm registry to check for a newer CLI — try again later."),process.stdout.write(v.join(`
523
+ never errors out. The registry is checked at most once a day.`,l$=J2(Q2(),".claude","skills"),zq=1500;async function X2(c=4000){try{let{apiUrl:$,token:Q}=await W0({});return await iY(u$,{apiUrl:$,token:Q,timeoutMs:c})}catch{return null}}function xq(c){let{stamp:$,installedFigHash:Q,referenceVersion:J,referenceHash:Y}=c,X=MW({stamp:$,installedHash:Q,bundledHash:Y,referenceVersion:J}),W=$!=null&&J!=null&&O0(J,$);return{status:X,behind:W,reference:J}}var W2=1e4;function m2(c,$,Q,J){if(c)return c;return dQ($,Q,J).latest??null}async function G2(){let c=f0(),$=Date.now(),Q=[];try{let J=KY(l$),Y=Q$(l$),{apiUrl:X,token:W}=await W0({}).catch(()=>({apiUrl:void 0,token:void 0})),m=await iY(u$,{apiUrl:X,token:W,timeoutMs:zq}),G=m?.version??k$(),z=m?.hash??DY(),{status:x,behind:q}=xq({stamp:J,installedFigHash:Y,referenceVersion:G,referenceHash:z});if(Y!=null&&(q||x==="modified"||x==="stale")){let M=await VW(l$,{apiUrl:X,token:W,timeoutMs:zq}).catch(()=>null);if(M){let N=q?`${J??"?"} → ${G??"?"}`:"content changed";Q.push(`skill was behind (${N}); reinstalled from ${M.source}.`)}}}catch{}try{let J=await H8(),Y=dx(J,$)?J.latest:void 0;if(!Y){let X=await e9(1500);if(X)Y=X,await sQ({...J,latest:X,checkedAt:$})}if(Y&&O0(Y,c))Q.push(`figura-cli ${c} → ${Y}: run \`figura upgrade\` to update.`)}catch{}if(Q.length)process.stdout.write("[figura] "+Q.join(" ")+`
524
+ `)}async function z2(c){let $=f0(),Q=await e9(W2),J=KY(l$),Y=Q$(l$),X={};try{X=await H8()}catch{}let{apiUrl:W}=await W0({apiUrlFlag:f(c,"api-url")}).catch(()=>({apiUrl:""})),m=n$(W),G=m2(Q,X,m,Date.now());if(Q)try{await sQ({...X,latest:Q,checkedAt:Date.now()})}catch{}let z=await X2(),x=z?.version??k$(),q=z?.hash??DY(),{status:M,behind:N}=xq({stamp:J,installedFigHash:Y,referenceVersion:x,referenceHash:q}),w=z?"":" (offline — vs bundled floor)",U=(()=>{switch(M){case"pristine":return`pristine (v${J??x??"?"})${w}`;case"stale":return`behind (v${J??"?"} → v${x??"?"}) — run \`figura skill install\`${w}`;case"modified":return`MODIFIED (differs from the canonical /fig skill) — run \`figura skill install\` to restore it${w}`;case"absent":return"not installed — run `figura skill install`"}})(),v=[];v.push(`figura-cli ${$}${G?` (latest ${G})`:" (latest: unknown)"}`),v.push("MCP server bundled in the CLI — same version"),v.push(`skill /fig ${J??"unstamped"}${x?` (canonical ${x})`:""} in ${l$}`),v.push(` ${U}`);let i=G&&O0(G,$);v.push(""),v.push(i?`Update available (${$} → ${G}): run \`figura upgrade\` for the command.`:N||M==="modified"?"Your /fig skill is behind or modified: run `figura skill install`.":G?"✓ Everything is up to date.":"Couldn't reach the npm registry to check for a newer CLI — try again later."),process.stdout.write(v.join(`
520
525
  `)+`
521
- `)}async function yx(c){let{flags:$}=r(c);if(a($,"help")||a($,"h")){process.stdout.write(Ij+`
522
- `);return}if(a($,"session-start")){await _j().catch(()=>{});return}await Sj($)}import{readFile as PR}from"node:fs/promises";var b={};yY(b,{void:()=>NK,util:()=>Vc,unknown:()=>MK,union:()=>jK,undefined:()=>xK,tuple:()=>BK,transformer:()=>AK,symbol:()=>zK,string:()=>$6,strictObject:()=>UK,setErrorMap:()=>Pj,set:()=>pK,record:()=>HK,quotelessJson:()=>Aj,promise:()=>SK,preprocess:()=>bK,pipeline:()=>EK,ostring:()=>FK,optional:()=>CK,onumber:()=>TK,oboolean:()=>fK,objectUtil:()=>n9,object:()=>vK,number:()=>Q6,nullable:()=>PK,null:()=>iK,never:()=>VK,nativeEnum:()=>_K,nan:()=>mK,map:()=>OK,makeIssue:()=>fQ,literal:()=>LK,lazy:()=>IK,late:()=>YK,isValid:()=>v8,isDirty:()=>XY,isAsync:()=>_$,isAborted:()=>YY,intersection:()=>DK,instanceof:()=>XK,getParsedType:()=>a0,getErrorMap:()=>Z$,function:()=>RK,enum:()=>ZK,effect:()=>AK,discriminatedUnion:()=>KK,defaultErrorMap:()=>e0,datetimeRegex:()=>tx,date:()=>GK,custom:()=>c6,coerce:()=>nK,boolean:()=>J6,bigint:()=>WK,array:()=>wK,any:()=>qK,addIssueToContext:()=>n,ZodVoid:()=>uQ,ZodUnknown:()=>U8,ZodUnion:()=>E$,ZodUndefined:()=>P$,ZodType:()=>ic,ZodTuple:()=>l0,ZodTransformer:()=>E0,ZodSymbol:()=>nQ,ZodString:()=>A0,ZodSet:()=>d8,ZodSchema:()=>ic,ZodRecord:()=>aQ,ZodReadonly:()=>k$,ZodPromise:()=>s8,ZodPipeline:()=>hQ,ZodParsedType:()=>F,ZodOptional:()=>P0,ZodObject:()=>Sc,ZodNumber:()=>j8,ZodNullable:()=>$8,ZodNull:()=>b$,ZodNever:()=>k0,ZodNativeEnum:()=>n$,ZodNaN:()=>lQ,ZodMap:()=>kQ,ZodLiteral:()=>f$,ZodLazy:()=>T$,ZodIssueCode:()=>Z,ZodIntersection:()=>F$,ZodFunction:()=>A$,ZodFirstPartyTypeKind:()=>$c,ZodError:()=>X0,ZodEnum:()=>D8,ZodEffects:()=>E0,ZodDiscriminatedUnion:()=>mY,ZodDefault:()=>u$,ZodDate:()=>o8,ZodCatch:()=>a$,ZodBranded:()=>WY,ZodBoolean:()=>C$,ZodBigInt:()=>K8,ZodArray:()=>C0,ZodAny:()=>g8,Schema:()=>ic,ParseStatus:()=>lc,OK:()=>sc,NEVER:()=>uK,INVALID:()=>cc,EMPTY_PATH:()=>bj,DIRTY:()=>y8,BRAND:()=>JK});var Vc;(function(c){c.assertEqual=(Y)=>{};function $(Y){}c.assertIs=$;function Q(Y){throw Error()}c.assertNever=Q,c.arrayToEnum=(Y)=>{let X={};for(let m of Y)X[m]=m;return X},c.getValidEnumValues=(Y)=>{let X=c.objectKeys(Y).filter((W)=>typeof Y[Y[W]]!=="number"),m={};for(let W of X)m[W]=Y[W];return c.objectValues(m)},c.objectValues=(Y)=>{return c.objectKeys(Y).map(function(X){return Y[X]})},c.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let X=[];for(let m in Y)if(Object.prototype.hasOwnProperty.call(Y,m))X.push(m);return X},c.find=(Y,X)=>{for(let m of Y)if(X(m))return m;return},c.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function J(Y,X=" | "){return Y.map((m)=>typeof m==="string"?`'${m}'`:m).join(X)}c.joinValues=J,c.jsonStringifyReplacer=(Y,X)=>{if(typeof X==="bigint")return X.toString();return X}})(Vc||(Vc={}));var n9;(function(c){c.mergeShapes=($,Q)=>{return{...$,...Q}}})(n9||(n9={}));var F=Vc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),a0=(c)=>{switch(typeof c){case"undefined":return F.undefined;case"string":return F.string;case"number":return Number.isNaN(c)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":if(Array.isArray(c))return F.array;if(c===null)return F.null;if(c.then&&typeof c.then==="function"&&c.catch&&typeof c.catch==="function")return F.promise;if(typeof Map<"u"&&c instanceof Map)return F.map;if(typeof Set<"u"&&c instanceof Set)return F.set;if(typeof Date<"u"&&c instanceof Date)return F.date;return F.object;default:return F.unknown}};var Z=Vc.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"]),Aj=(c)=>{return JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:")};class X0 extends Error{get errors(){return this.issues}constructor(c){super();this.issues=[],this.addIssue=(Q)=>{this.issues=[...this.issues,Q]},this.addIssues=(Q=[])=>{this.issues=[...this.issues,...Q]};let $=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,$);else this.__proto__=$;this.name="ZodError",this.issues=c}format(c){let $=c||function(Y){return Y.message},Q={_errors:[]},J=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union")X.unionErrors.map(J);else if(X.code==="invalid_return_type")J(X.returnTypeError);else if(X.code==="invalid_arguments")J(X.argumentsError);else if(X.path.length===0)Q._errors.push($(X));else{let m=Q,W=0;while(W<X.path.length){let G=X.path[W];if(W!==X.path.length-1)m[G]=m[G]||{_errors:[]};else m[G]=m[G]||{_errors:[]},m[G]._errors.push($(X));m=m[G],W++}}};return J(this),Q}static assert(c){if(!(c instanceof X0))throw Error(`Not a ZodError: ${c}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,Vc.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(c=($)=>$.message){let $={},Q=[];for(let J of this.issues)if(J.path.length>0){let Y=J.path[0];$[Y]=$[Y]||[],$[Y].push(c(J))}else Q.push(c(J));return{formErrors:Q,fieldErrors:$}}get formErrors(){return this.flatten()}}X0.create=(c)=>{return new X0(c)};var Cj=(c,$)=>{let Q;switch(c.code){case Z.invalid_type:if(c.received===F.undefined)Q="Required";else Q=`Expected ${c.expected}, received ${c.received}`;break;case Z.invalid_literal:Q=`Invalid literal value, expected ${JSON.stringify(c.expected,Vc.jsonStringifyReplacer)}`;break;case Z.unrecognized_keys:Q=`Unrecognized key(s) in object: ${Vc.joinValues(c.keys,", ")}`;break;case Z.invalid_union:Q="Invalid input";break;case Z.invalid_union_discriminator:Q=`Invalid discriminator value. Expected ${Vc.joinValues(c.options)}`;break;case Z.invalid_enum_value:Q=`Invalid enum value. Expected ${Vc.joinValues(c.options)}, received '${c.received}'`;break;case Z.invalid_arguments:Q="Invalid function arguments";break;case Z.invalid_return_type:Q="Invalid function return type";break;case Z.invalid_date:Q="Invalid date";break;case Z.invalid_string:if(typeof c.validation==="object")if("includes"in c.validation){if(Q=`Invalid input: must include "${c.validation.includes}"`,typeof c.validation.position==="number")Q=`${Q} at one or more positions greater than or equal to ${c.validation.position}`}else if("startsWith"in c.validation)Q=`Invalid input: must start with "${c.validation.startsWith}"`;else if("endsWith"in c.validation)Q=`Invalid input: must end with "${c.validation.endsWith}"`;else Vc.assertNever(c.validation);else if(c.validation!=="regex")Q=`Invalid ${c.validation}`;else Q="Invalid";break;case Z.too_small:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at least":"more than"} ${c.minimum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at least":"over"} ${c.minimum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="bigint")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(c.minimum))}`;else Q="Invalid input";break;case Z.too_big:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at most":"less than"} ${c.maximum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at most":"under"} ${c.maximum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="bigint")Q=`BigInt must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly":c.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(c.maximum))}`;else Q="Invalid input";break;case Z.custom:Q="Invalid input";break;case Z.invalid_intersection_types:Q="Intersection results could not be merged";break;case Z.not_multiple_of:Q=`Number must be a multiple of ${c.multipleOf}`;break;case Z.not_finite:Q="Number must be finite";break;default:Q=$.defaultError,Vc.assertNever(c)}return{message:Q}},e0=Cj;var ox=e0;function Pj(c){ox=c}function Z$(){return ox}var fQ=(c)=>{let{data:$,path:Q,errorMaps:J,issueData:Y}=c,X=[...Q,...Y.path||[]],m={...Y,path:X};if(Y.message!==void 0)return{...Y,path:X,message:Y.message};let W="",G=J.filter((z)=>!!z).slice().reverse();for(let z of G)W=z(m,{data:$,defaultError:W}).message;return{...Y,path:X,message:W}},bj=[];function n(c,$){let Q=Z$(),J=fQ({issueData:$,data:c.data,path:c.path,errorMaps:[c.common.contextualErrorMap,c.schemaErrorMap,Q,Q===e0?void 0:e0].filter((Y)=>!!Y)});c.common.issues.push(J)}class lc{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(c,$){let Q=[];for(let J of $){if(J.status==="aborted")return cc;if(J.status==="dirty")c.dirty();Q.push(J.value)}return{status:c.value,value:Q}}static async mergeObjectAsync(c,$){let Q=[];for(let J of $){let Y=await J.key,X=await J.value;Q.push({key:Y,value:X})}return lc.mergeObjectSync(c,Q)}static mergeObjectSync(c,$){let Q={};for(let J of $){let{key:Y,value:X}=J;if(Y.status==="aborted")return cc;if(X.status==="aborted")return cc;if(Y.status==="dirty")c.dirty();if(X.status==="dirty")c.dirty();if(Y.value!=="__proto__"&&(typeof X.value<"u"||J.alwaysSet))Q[Y.value]=X.value}return{status:c.value,value:Q}}}var cc=Object.freeze({status:"aborted"}),y8=(c)=>({status:"dirty",value:c}),sc=(c)=>({status:"valid",value:c}),YY=(c)=>c.status==="aborted",XY=(c)=>c.status==="dirty",v8=(c)=>c.status==="valid",_$=(c)=>typeof Promise<"u"&&c instanceof Promise;var d;(function(c){c.errToObj=($)=>typeof $==="string"?{message:$}:$||{},c.toString=($)=>typeof $==="string"?$:$?.message})(d||(d={}));class b0{constructor(c,$,Q,J){this._cachedPath=[],this.parent=c,this.data=$,this._path=Q,this._key=J}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}}var gx=(c,$)=>{if(v8($))return{success:!0,data:$.value};else{if(!c.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Q=new X0(c.common.issues);return this._error=Q,this._error}}}};function Wc(c){if(!c)return{};let{errorMap:$,invalid_type_error:Q,required_error:J,description:Y}=c;if($&&(Q||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if($)return{errorMap:$,description:Y};return{errorMap:(m,W)=>{let{message:G}=c;if(m.code==="invalid_enum_value")return{message:G??W.defaultError};if(typeof W.data>"u")return{message:G??J??W.defaultError};if(m.code!=="invalid_type")return{message:W.defaultError};return{message:G??Q??W.defaultError}},description:Y}}class ic{get description(){return this._def.description}_getType(c){return a0(c.data)}_getOrReturnCtx(c,$){return $||{common:c.parent.common,data:c.data,parsedType:a0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}_processInputParams(c){return{status:new lc,ctx:{common:c.parent.common,data:c.data,parsedType:a0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}}_parseSync(c){let $=this._parse(c);if(_$($))throw Error("Synchronous parse encountered promise.");return $}_parseAsync(c){let $=this._parse(c);return Promise.resolve($)}parse(c,$){let Q=this.safeParse(c,$);if(Q.success)return Q.data;throw Q.error}safeParse(c,$){let Q={common:{issues:[],async:$?.async??!1,contextualErrorMap:$?.errorMap},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:a0(c)},J=this._parseSync({data:c,path:Q.path,parent:Q});return gx(Q,J)}"~validate"(c){let $={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:a0(c)};if(!this["~standard"].async)try{let Q=this._parseSync({data:c,path:[],parent:$});return v8(Q)?{value:Q.value}:{issues:$.common.issues}}catch(Q){if(Q?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;$.common={issues:[],async:!0}}return this._parseAsync({data:c,path:[],parent:$}).then((Q)=>v8(Q)?{value:Q.value}:{issues:$.common.issues})}async parseAsync(c,$){let Q=await this.safeParseAsync(c,$);if(Q.success)return Q.data;throw Q.error}async safeParseAsync(c,$){let Q={common:{issues:[],contextualErrorMap:$?.errorMap,async:!0},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:a0(c)},J=this._parse({data:c,path:Q.path,parent:Q}),Y=await(_$(J)?J:Promise.resolve(J));return gx(Q,Y)}refine(c,$){let Q=(J)=>{if(typeof $==="string"||typeof $>"u")return{message:$};else if(typeof $==="function")return $(J);else return $};return this._refinement((J,Y)=>{let X=c(J),m=()=>Y.addIssue({code:Z.custom,...Q(J)});if(typeof Promise<"u"&&X instanceof Promise)return X.then((W)=>{if(!W)return m(),!1;else return!0});if(!X)return m(),!1;else return!0})}refinement(c,$){return this._refinement((Q,J)=>{if(!c(Q))return J.addIssue(typeof $==="function"?$(Q,J):$),!1;else return!0})}_refinement(c){return new E0({schema:this,typeName:$c.ZodEffects,effect:{type:"refinement",refinement:c}})}superRefine(c){return this._refinement(c)}constructor(c){this.spa=this.safeParseAsync,this._def=c,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:($)=>this["~validate"]($)}}optional(){return P0.create(this,this._def)}nullable(){return $8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return C0.create(this)}promise(){return s8.create(this,this._def)}or(c){return E$.create([this,c],this._def)}and(c){return F$.create(this,c,this._def)}transform(c){return new E0({...Wc(this._def),schema:this,typeName:$c.ZodEffects,effect:{type:"transform",transform:c}})}default(c){let $=typeof c==="function"?c:()=>c;return new u$({...Wc(this._def),innerType:this,defaultValue:$,typeName:$c.ZodDefault})}brand(){return new WY({typeName:$c.ZodBranded,type:this,...Wc(this._def)})}catch(c){let $=typeof c==="function"?c:()=>c;return new a$({...Wc(this._def),innerType:this,catchValue:$,typeName:$c.ZodCatch})}describe(c){return new this.constructor({...this._def,description:c})}pipe(c){return hQ.create(this,c)}readonly(){return k$.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var Ej=/^c[^\s-]{8,}$/i,Fj=/^[0-9a-z]+$/,Tj=/^[0-9A-HJKMNP-TV-Z]{26}$/i,fj=/^[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,nj=/^[a-z0-9_-]{21}$/i,uj=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,aj=/^[-+]?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)?)??$/,kj=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,lj="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",u9,hj=/^(?:(?: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])$/,yj=/^(?:(?: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])$/,oj=/^(([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]))$/,gj=/^(([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])$/,dj=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,sj=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,sx="((\\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])))",rj=new RegExp(`^${sx}$`);function rx(c){let $="[0-5]\\d";if(c.precision)$=`${$}\\.\\d{${c.precision}}`;else if(c.precision==null)$=`${$}(\\.\\d+)?`;let Q=c.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${$})${Q}`}function tj(c){return new RegExp(`^${rx(c)}$`)}function tx(c){let $=`${sx}T${rx(c)}`,Q=[];if(Q.push(c.local?"Z?":"Z"),c.offset)Q.push("([+-]\\d{2}:?\\d{2})");return $=`${$}(${Q.join("|")})`,new RegExp(`^${$}$`)}function ej(c,$){if(($==="v4"||!$)&&hj.test(c))return!0;if(($==="v6"||!$)&&oj.test(c))return!0;return!1}function cK(c,$){if(!uj.test(c))return!1;try{let[Q]=c.split(".");if(!Q)return!1;let J=Q.replace(/-/g,"+").replace(/_/g,"/").padEnd(Q.length+(4-Q.length%4)%4,"="),Y=JSON.parse(atob(J));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if($&&Y.alg!==$)return!1;return!0}catch{return!1}}function $K(c,$){if(($==="v4"||!$)&&yj.test(c))return!0;if(($==="v6"||!$)&&gj.test(c))return!0;return!1}class A0 extends ic{_parse(c){if(this._def.coerce)c.data=String(c.data);if(this._getType(c)!==F.string){let Y=this._getOrReturnCtx(c);return n(Y,{code:Z.invalid_type,expected:F.string,received:Y.parsedType}),cc}let Q=new lc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.length<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:Z.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="max"){if(c.data.length>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:Z.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="length"){let X=c.data.length>Y.value,m=c.data.length<Y.value;if(X||m){if(J=this._getOrReturnCtx(c,J),X)n(J,{code:Z.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(m)n(J,{code:Z.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});Q.dirty()}}else if(Y.kind==="email"){if(!kj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"email",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="emoji"){if(!u9)u9=new RegExp(lj,"u");if(!u9.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"emoji",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="uuid"){if(!fj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"uuid",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="nanoid"){if(!nj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"nanoid",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid"){if(!Ej.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid2"){if(!Fj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid2",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ulid"){if(!Tj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"ulid",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="url")try{new URL(c.data)}catch{J=this._getOrReturnCtx(c,J),n(J,{validation:"url",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"regex",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="trim")c.data=c.data.trim();else if(Y.kind==="includes"){if(!c.data.includes(Y.value,Y.position))J=this._getOrReturnCtx(c,J),n(J,{code:Z.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),Q.dirty()}else if(Y.kind==="toLowerCase")c.data=c.data.toLowerCase();else if(Y.kind==="toUpperCase")c.data=c.data.toUpperCase();else if(Y.kind==="startsWith"){if(!c.data.startsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:Z.invalid_string,validation:{startsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="endsWith"){if(!c.data.endsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:Z.invalid_string,validation:{endsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="datetime"){if(!tx(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:Z.invalid_string,validation:"datetime",message:Y.message}),Q.dirty()}else if(Y.kind==="date"){if(!rj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:Z.invalid_string,validation:"date",message:Y.message}),Q.dirty()}else if(Y.kind==="time"){if(!tj(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:Z.invalid_string,validation:"time",message:Y.message}),Q.dirty()}else if(Y.kind==="duration"){if(!aj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"duration",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ip"){if(!ej(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"ip",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="jwt"){if(!cK(c.data,Y.alg))J=this._getOrReturnCtx(c,J),n(J,{validation:"jwt",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cidr"){if(!$K(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"cidr",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64"){if(!dj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64",code:Z.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64url"){if(!sj.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64url",code:Z.invalid_string,message:Y.message}),Q.dirty()}else Vc.assertNever(Y);return{status:Q.value,value:c.data}}_regex(c,$,Q){return this.refinement((J)=>c.test(J),{validation:$,code:Z.invalid_string,...d.errToObj(Q)})}_addCheck(c){return new A0({...this._def,checks:[...this._def.checks,c]})}email(c){return this._addCheck({kind:"email",...d.errToObj(c)})}url(c){return this._addCheck({kind:"url",...d.errToObj(c)})}emoji(c){return this._addCheck({kind:"emoji",...d.errToObj(c)})}uuid(c){return this._addCheck({kind:"uuid",...d.errToObj(c)})}nanoid(c){return this._addCheck({kind:"nanoid",...d.errToObj(c)})}cuid(c){return this._addCheck({kind:"cuid",...d.errToObj(c)})}cuid2(c){return this._addCheck({kind:"cuid2",...d.errToObj(c)})}ulid(c){return this._addCheck({kind:"ulid",...d.errToObj(c)})}base64(c){return this._addCheck({kind:"base64",...d.errToObj(c)})}base64url(c){return this._addCheck({kind:"base64url",...d.errToObj(c)})}jwt(c){return this._addCheck({kind:"jwt",...d.errToObj(c)})}ip(c){return this._addCheck({kind:"ip",...d.errToObj(c)})}cidr(c){return this._addCheck({kind:"cidr",...d.errToObj(c)})}datetime(c){if(typeof c==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:c});return this._addCheck({kind:"datetime",precision:typeof c?.precision>"u"?null:c?.precision,offset:c?.offset??!1,local:c?.local??!1,...d.errToObj(c?.message)})}date(c){return this._addCheck({kind:"date",message:c})}time(c){if(typeof c==="string")return this._addCheck({kind:"time",precision:null,message:c});return this._addCheck({kind:"time",precision:typeof c?.precision>"u"?null:c?.precision,...d.errToObj(c?.message)})}duration(c){return this._addCheck({kind:"duration",...d.errToObj(c)})}regex(c,$){return this._addCheck({kind:"regex",regex:c,...d.errToObj($)})}includes(c,$){return this._addCheck({kind:"includes",value:c,position:$?.position,...d.errToObj($?.message)})}startsWith(c,$){return this._addCheck({kind:"startsWith",value:c,...d.errToObj($)})}endsWith(c,$){return this._addCheck({kind:"endsWith",value:c,...d.errToObj($)})}min(c,$){return this._addCheck({kind:"min",value:c,...d.errToObj($)})}max(c,$){return this._addCheck({kind:"max",value:c,...d.errToObj($)})}length(c,$){return this._addCheck({kind:"length",value:c,...d.errToObj($)})}nonempty(c){return this.min(1,d.errToObj(c))}trim(){return new A0({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new A0({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new A0({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((c)=>c.kind==="datetime")}get isDate(){return!!this._def.checks.find((c)=>c.kind==="date")}get isTime(){return!!this._def.checks.find((c)=>c.kind==="time")}get isDuration(){return!!this._def.checks.find((c)=>c.kind==="duration")}get isEmail(){return!!this._def.checks.find((c)=>c.kind==="email")}get isURL(){return!!this._def.checks.find((c)=>c.kind==="url")}get isEmoji(){return!!this._def.checks.find((c)=>c.kind==="emoji")}get isUUID(){return!!this._def.checks.find((c)=>c.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((c)=>c.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((c)=>c.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((c)=>c.kind==="cuid2")}get isULID(){return!!this._def.checks.find((c)=>c.kind==="ulid")}get isIP(){return!!this._def.checks.find((c)=>c.kind==="ip")}get isCIDR(){return!!this._def.checks.find((c)=>c.kind==="cidr")}get isBase64(){return!!this._def.checks.find((c)=>c.kind==="base64")}get isBase64url(){return!!this._def.checks.find((c)=>c.kind==="base64url")}get minLength(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxLength(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}A0.create=(c)=>{return new A0({checks:[],typeName:$c.ZodString,coerce:c?.coerce??!1,...Wc(c)})};function QK(c,$){let Q=(c.toString().split(".")[1]||"").length,J=($.toString().split(".")[1]||"").length,Y=Q>J?Q:J,X=Number.parseInt(c.toFixed(Y).replace(".","")),m=Number.parseInt($.toFixed(Y).replace(".",""));return X%m/10**Y}class j8 extends ic{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(c){if(this._def.coerce)c.data=Number(c.data);if(this._getType(c)!==F.number){let Y=this._getOrReturnCtx(c);return n(Y,{code:Z.invalid_type,expected:F.number,received:Y.parsedType}),cc}let Q=void 0,J=new lc;for(let Y of this._def.checks)if(Y.kind==="int"){if(!Vc.isInteger(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.invalid_type,expected:"integer",received:"float",message:Y.message}),J.dirty()}else if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(QK(c.data,Y.value)!==0)Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.not_finite,message:Y.message}),J.dirty()}else Vc.assertNever(Y);return{status:J.value,value:c.data}}gte(c,$){return this.setLimit("min",c,!0,d.toString($))}gt(c,$){return this.setLimit("min",c,!1,d.toString($))}lte(c,$){return this.setLimit("max",c,!0,d.toString($))}lt(c,$){return this.setLimit("max",c,!1,d.toString($))}setLimit(c,$,Q,J){return new j8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:d.toString(J)}]})}_addCheck(c){return new j8({...this._def,checks:[...this._def.checks,c]})}int(c){return this._addCheck({kind:"int",message:d.toString(c)})}positive(c){return this._addCheck({kind:"min",value:0,inclusive:!1,message:d.toString(c)})}negative(c){return this._addCheck({kind:"max",value:0,inclusive:!1,message:d.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:0,inclusive:!0,message:d.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:0,inclusive:!0,message:d.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:d.toString($)})}finite(c){return this._addCheck({kind:"finite",message:d.toString(c)})}safe(c){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:d.toString(c)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:d.toString(c)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}get isInt(){return!!this._def.checks.find((c)=>c.kind==="int"||c.kind==="multipleOf"&&Vc.isInteger(c.value))}get isFinite(){let c=null,$=null;for(let Q of this._def.checks)if(Q.kind==="finite"||Q.kind==="int"||Q.kind==="multipleOf")return!0;else if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}else if(Q.kind==="max"){if(c===null||Q.value<c)c=Q.value}return Number.isFinite($)&&Number.isFinite(c)}}j8.create=(c)=>{return new j8({checks:[],typeName:$c.ZodNumber,coerce:c?.coerce||!1,...Wc(c)})};class K8 extends ic{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(c){if(this._def.coerce)try{c.data=BigInt(c.data)}catch{return this._getInvalidInput(c)}if(this._getType(c)!==F.bigint)return this._getInvalidInput(c);let Q=void 0,J=new lc;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(c.data%Y.value!==BigInt(0))Q=this._getOrReturnCtx(c,Q),n(Q,{code:Z.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else Vc.assertNever(Y);return{status:J.value,value:c.data}}_getInvalidInput(c){let $=this._getOrReturnCtx(c);return n($,{code:Z.invalid_type,expected:F.bigint,received:$.parsedType}),cc}gte(c,$){return this.setLimit("min",c,!0,d.toString($))}gt(c,$){return this.setLimit("min",c,!1,d.toString($))}lte(c,$){return this.setLimit("max",c,!0,d.toString($))}lt(c,$){return this.setLimit("max",c,!1,d.toString($))}setLimit(c,$,Q,J){return new K8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:d.toString(J)}]})}_addCheck(c){return new K8({...this._def,checks:[...this._def.checks,c]})}positive(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:d.toString(c)})}negative(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:d.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:d.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:d.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:d.toString($)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}K8.create=(c)=>{return new K8({checks:[],typeName:$c.ZodBigInt,coerce:c?.coerce??!1,...Wc(c)})};class C$ extends ic{_parse(c){if(this._def.coerce)c.data=Boolean(c.data);if(this._getType(c)!==F.boolean){let Q=this._getOrReturnCtx(c);return n(Q,{code:Z.invalid_type,expected:F.boolean,received:Q.parsedType}),cc}return sc(c.data)}}C$.create=(c)=>{return new C$({typeName:$c.ZodBoolean,coerce:c?.coerce||!1,...Wc(c)})};class o8 extends ic{_parse(c){if(this._def.coerce)c.data=new Date(c.data);if(this._getType(c)!==F.date){let Y=this._getOrReturnCtx(c);return n(Y,{code:Z.invalid_type,expected:F.date,received:Y.parsedType}),cc}if(Number.isNaN(c.data.getTime())){let Y=this._getOrReturnCtx(c);return n(Y,{code:Z.invalid_date}),cc}let Q=new lc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.getTime()<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:Z.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),Q.dirty()}else if(Y.kind==="max"){if(c.data.getTime()>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:Z.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),Q.dirty()}else Vc.assertNever(Y);return{status:Q.value,value:new Date(c.data.getTime())}}_addCheck(c){return new o8({...this._def,checks:[...this._def.checks,c]})}min(c,$){return this._addCheck({kind:"min",value:c.getTime(),message:d.toString($)})}max(c,$){return this._addCheck({kind:"max",value:c.getTime(),message:d.toString($)})}get minDate(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c!=null?new Date(c):null}get maxDate(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c!=null?new Date(c):null}}o8.create=(c)=>{return new o8({checks:[],coerce:c?.coerce||!1,typeName:$c.ZodDate,...Wc(c)})};class nQ extends ic{_parse(c){if(this._getType(c)!==F.symbol){let Q=this._getOrReturnCtx(c);return n(Q,{code:Z.invalid_type,expected:F.symbol,received:Q.parsedType}),cc}return sc(c.data)}}nQ.create=(c)=>{return new nQ({typeName:$c.ZodSymbol,...Wc(c)})};class P$ extends ic{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:Z.invalid_type,expected:F.undefined,received:Q.parsedType}),cc}return sc(c.data)}}P$.create=(c)=>{return new P$({typeName:$c.ZodUndefined,...Wc(c)})};class b$ extends ic{_parse(c){if(this._getType(c)!==F.null){let Q=this._getOrReturnCtx(c);return n(Q,{code:Z.invalid_type,expected:F.null,received:Q.parsedType}),cc}return sc(c.data)}}b$.create=(c)=>{return new b$({typeName:$c.ZodNull,...Wc(c)})};class g8 extends ic{constructor(){super(...arguments);this._any=!0}_parse(c){return sc(c.data)}}g8.create=(c)=>{return new g8({typeName:$c.ZodAny,...Wc(c)})};class U8 extends ic{constructor(){super(...arguments);this._unknown=!0}_parse(c){return sc(c.data)}}U8.create=(c)=>{return new U8({typeName:$c.ZodUnknown,...Wc(c)})};class k0 extends ic{_parse(c){let $=this._getOrReturnCtx(c);return n($,{code:Z.invalid_type,expected:F.never,received:$.parsedType}),cc}}k0.create=(c)=>{return new k0({typeName:$c.ZodNever,...Wc(c)})};class uQ extends ic{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:Z.invalid_type,expected:F.void,received:Q.parsedType}),cc}return sc(c.data)}}uQ.create=(c)=>{return new uQ({typeName:$c.ZodVoid,...Wc(c)})};class C0 extends ic{_parse(c){let{ctx:$,status:Q}=this._processInputParams(c),J=this._def;if($.parsedType!==F.array)return n($,{code:Z.invalid_type,expected:F.array,received:$.parsedType}),cc;if(J.exactLength!==null){let X=$.data.length>J.exactLength.value,m=$.data.length<J.exactLength.value;if(X||m)n($,{code:X?Z.too_big:Z.too_small,minimum:m?J.exactLength.value:void 0,maximum:X?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),Q.dirty()}if(J.minLength!==null){if($.data.length<J.minLength.value)n($,{code:Z.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),Q.dirty()}if(J.maxLength!==null){if($.data.length>J.maxLength.value)n($,{code:Z.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),Q.dirty()}if($.common.async)return Promise.all([...$.data].map((X,m)=>{return J.type._parseAsync(new b0($,X,$.path,m))})).then((X)=>{return lc.mergeArray(Q,X)});let Y=[...$.data].map((X,m)=>{return J.type._parseSync(new b0($,X,$.path,m))});return lc.mergeArray(Q,Y)}get element(){return this._def.type}min(c,$){return new C0({...this._def,minLength:{value:c,message:d.toString($)}})}max(c,$){return new C0({...this._def,maxLength:{value:c,message:d.toString($)}})}length(c,$){return new C0({...this._def,exactLength:{value:c,message:d.toString($)}})}nonempty(c){return this.min(1,c)}}C0.create=(c,$)=>{return new C0({type:c,minLength:null,maxLength:null,exactLength:null,typeName:$c.ZodArray,...Wc($)})};function S$(c){if(c instanceof Sc){let $={};for(let Q in c.shape){let J=c.shape[Q];$[Q]=P0.create(S$(J))}return new Sc({...c._def,shape:()=>$})}else if(c instanceof C0)return new C0({...c._def,type:S$(c.element)});else if(c instanceof P0)return P0.create(S$(c.unwrap()));else if(c instanceof $8)return $8.create(S$(c.unwrap()));else if(c instanceof l0)return l0.create(c.items.map(($)=>S$($)));else return c}class Sc extends ic{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let c=this._def.shape(),$=Vc.objectKeys(c);return this._cached={shape:c,keys:$},this._cached}_parse(c){if(this._getType(c)!==F.object){let G=this._getOrReturnCtx(c);return n(G,{code:Z.invalid_type,expected:F.object,received:G.parsedType}),cc}let{status:Q,ctx:J}=this._processInputParams(c),{shape:Y,keys:X}=this._getCached(),m=[];if(!(this._def.catchall instanceof k0&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!X.includes(G))m.push(G)}let W=[];for(let G of X){let z=Y[G],x=J.data[G];W.push({key:{status:"valid",value:G},value:z._parse(new b0(J,x,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof k0){let G=this._def.unknownKeys;if(G==="passthrough")for(let z of m)W.push({key:{status:"valid",value:z},value:{status:"valid",value:J.data[z]}});else if(G==="strict"){if(m.length>0)n(J,{code:Z.unrecognized_keys,keys:m}),Q.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let z of m){let x=J.data[z];W.push({key:{status:"valid",value:z},value:G._parse(new b0(J,x,J.path,z)),alwaysSet:z in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let z of W){let x=await z.key,i=await z.value;G.push({key:x,value:i,alwaysSet:z.alwaysSet})}return G}).then((G)=>{return lc.mergeObjectSync(Q,G)});else return lc.mergeObjectSync(Q,W)}get shape(){return this._def.shape()}strict(c){return d.errToObj,new Sc({...this._def,unknownKeys:"strict",...c!==void 0?{errorMap:($,Q)=>{let J=this._def.errorMap?.($,Q).message??Q.defaultError;if($.code==="unrecognized_keys")return{message:d.errToObj(c).message??J};return{message:J}}}:{}})}strip(){return new Sc({...this._def,unknownKeys:"strip"})}passthrough(){return new Sc({...this._def,unknownKeys:"passthrough"})}extend(c){return new Sc({...this._def,shape:()=>({...this._def.shape(),...c})})}merge(c){return new Sc({unknownKeys:c._def.unknownKeys,catchall:c._def.catchall,shape:()=>({...this._def.shape(),...c._def.shape()}),typeName:$c.ZodObject})}setKey(c,$){return this.augment({[c]:$})}catchall(c){return new Sc({...this._def,catchall:c})}pick(c){let $={};for(let Q of Vc.objectKeys(c))if(c[Q]&&this.shape[Q])$[Q]=this.shape[Q];return new Sc({...this._def,shape:()=>$})}omit(c){let $={};for(let Q of Vc.objectKeys(this.shape))if(!c[Q])$[Q]=this.shape[Q];return new Sc({...this._def,shape:()=>$})}deepPartial(){return S$(this)}partial(c){let $={};for(let Q of Vc.objectKeys(this.shape)){let J=this.shape[Q];if(c&&!c[Q])$[Q]=J;else $[Q]=J.optional()}return new Sc({...this._def,shape:()=>$})}required(c){let $={};for(let Q of Vc.objectKeys(this.shape))if(c&&!c[Q])$[Q]=this.shape[Q];else{let Y=this.shape[Q];while(Y instanceof P0)Y=Y._def.innerType;$[Q]=Y}return new Sc({...this._def,shape:()=>$})}keyof(){return ex(Vc.objectKeys(this.shape))}}Sc.create=(c,$)=>{return new Sc({shape:()=>c,unknownKeys:"strip",catchall:k0.create(),typeName:$c.ZodObject,...Wc($)})};Sc.strictCreate=(c,$)=>{return new Sc({shape:()=>c,unknownKeys:"strict",catchall:k0.create(),typeName:$c.ZodObject,...Wc($)})};Sc.lazycreate=(c,$)=>{return new Sc({shape:c,unknownKeys:"strip",catchall:k0.create(),typeName:$c.ZodObject,...Wc($)})};class E$ extends ic{_parse(c){let{ctx:$}=this._processInputParams(c),Q=this._def.options;function J(Y){for(let m of Y)if(m.result.status==="valid")return m.result;for(let m of Y)if(m.result.status==="dirty")return $.common.issues.push(...m.ctx.common.issues),m.result;let X=Y.map((m)=>new X0(m.ctx.common.issues));return n($,{code:Z.invalid_union,unionErrors:X}),cc}if($.common.async)return Promise.all(Q.map(async(Y)=>{let X={...$,common:{...$.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:$.data,path:$.path,parent:X}),ctx:X}})).then(J);else{let Y=void 0,X=[];for(let W of Q){let G={...$,common:{...$.common,issues:[]},parent:null},z=W._parseSync({data:$.data,path:$.path,parent:G});if(z.status==="valid")return z;else if(z.status==="dirty"&&!Y)Y={result:z,ctx:G};if(G.common.issues.length)X.push(G.common.issues)}if(Y)return $.common.issues.push(...Y.ctx.common.issues),Y.result;let m=X.map((W)=>new X0(W));return n($,{code:Z.invalid_union,unionErrors:m}),cc}}get options(){return this._def.options}}E$.create=(c,$)=>{return new E$({options:c,typeName:$c.ZodUnion,...Wc($)})};var c8=(c)=>{if(c instanceof T$)return c8(c.schema);else if(c instanceof E0)return c8(c.innerType());else if(c instanceof f$)return[c.value];else if(c instanceof D8)return c.options;else if(c instanceof n$)return Vc.objectValues(c.enum);else if(c instanceof u$)return c8(c._def.innerType);else if(c instanceof P$)return[void 0];else if(c instanceof b$)return[null];else if(c instanceof P0)return[void 0,...c8(c.unwrap())];else if(c instanceof $8)return[null,...c8(c.unwrap())];else if(c instanceof WY)return c8(c.unwrap());else if(c instanceof k$)return c8(c.unwrap());else if(c instanceof a$)return c8(c._def.innerType);else return[]};class mY extends ic{_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.object)return n($,{code:Z.invalid_type,expected:F.object,received:$.parsedType}),cc;let Q=this.discriminator,J=$.data[Q],Y=this.optionsMap.get(J);if(!Y)return n($,{code:Z.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Q]}),cc;if($.common.async)return Y._parseAsync({data:$.data,path:$.path,parent:$});else return Y._parseSync({data:$.data,path:$.path,parent:$})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(c,$,Q){let J=new Map;for(let Y of $){let X=c8(Y.shape[c]);if(!X.length)throw Error(`A discriminator value for key \`${c}\` could not be extracted from all schema options`);for(let m of X){if(J.has(m))throw Error(`Discriminator property ${String(c)} has duplicate value ${String(m)}`);J.set(m,Y)}}return new mY({typeName:$c.ZodDiscriminatedUnion,discriminator:c,options:$,optionsMap:J,...Wc(Q)})}}function a9(c,$){let Q=a0(c),J=a0($);if(c===$)return{valid:!0,data:c};else if(Q===F.object&&J===F.object){let Y=Vc.objectKeys($),X=Vc.objectKeys(c).filter((W)=>Y.indexOf(W)!==-1),m={...c,...$};for(let W of X){let G=a9(c[W],$[W]);if(!G.valid)return{valid:!1};m[W]=G.data}return{valid:!0,data:m}}else if(Q===F.array&&J===F.array){if(c.length!==$.length)return{valid:!1};let Y=[];for(let X=0;X<c.length;X++){let m=c[X],W=$[X],G=a9(m,W);if(!G.valid)return{valid:!1};Y.push(G.data)}return{valid:!0,data:Y}}else if(Q===F.date&&J===F.date&&+c===+$)return{valid:!0,data:c};else return{valid:!1}}class F$ extends ic{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=(Y,X)=>{if(YY(Y)||YY(X))return cc;let m=a9(Y.value,X.value);if(!m.valid)return n(Q,{code:Z.invalid_intersection_types}),cc;if(XY(Y)||XY(X))$.dirty();return{status:$.value,value:m.data}};if(Q.common.async)return Promise.all([this._def.left._parseAsync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseAsync({data:Q.data,path:Q.path,parent:Q})]).then(([Y,X])=>J(Y,X));else return J(this._def.left._parseSync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseSync({data:Q.data,path:Q.path,parent:Q}))}}F$.create=(c,$,Q)=>{return new F$({left:c,right:$,typeName:$c.ZodIntersection,...Wc(Q)})};class l0 extends ic{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.array)return n(Q,{code:Z.invalid_type,expected:F.array,received:Q.parsedType}),cc;if(Q.data.length<this._def.items.length)return n(Q,{code:Z.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),cc;if(!this._def.rest&&Q.data.length>this._def.items.length)n(Q,{code:Z.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$.dirty();let Y=[...Q.data].map((X,m)=>{let W=this._def.items[m]||this._def.rest;if(!W)return null;return W._parse(new b0(Q,X,Q.path,m))}).filter((X)=>!!X);if(Q.common.async)return Promise.all(Y).then((X)=>{return lc.mergeArray($,X)});else return lc.mergeArray($,Y)}get items(){return this._def.items}rest(c){return new l0({...this._def,rest:c})}}l0.create=(c,$)=>{if(!Array.isArray(c))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new l0({items:c,typeName:$c.ZodTuple,rest:null,...Wc($)})};class aQ extends ic{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.object)return n(Q,{code:Z.invalid_type,expected:F.object,received:Q.parsedType}),cc;let J=[],Y=this._def.keyType,X=this._def.valueType;for(let m in Q.data)J.push({key:Y._parse(new b0(Q,m,Q.path,m)),value:X._parse(new b0(Q,Q.data[m],Q.path,m)),alwaysSet:m in Q.data});if(Q.common.async)return lc.mergeObjectAsync($,J);else return lc.mergeObjectSync($,J)}get element(){return this._def.valueType}static create(c,$,Q){if($ instanceof ic)return new aQ({keyType:c,valueType:$,typeName:$c.ZodRecord,...Wc(Q)});return new aQ({keyType:A0.create(),valueType:c,typeName:$c.ZodRecord,...Wc($)})}}class kQ extends ic{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.map)return n(Q,{code:Z.invalid_type,expected:F.map,received:Q.parsedType}),cc;let J=this._def.keyType,Y=this._def.valueType,X=[...Q.data.entries()].map(([m,W],G)=>{return{key:J._parse(new b0(Q,m,Q.path,[G,"key"])),value:Y._parse(new b0(Q,W,Q.path,[G,"value"]))}});if(Q.common.async){let m=new Map;return Promise.resolve().then(async()=>{for(let W of X){let G=await W.key,z=await W.value;if(G.status==="aborted"||z.status==="aborted")return cc;if(G.status==="dirty"||z.status==="dirty")$.dirty();m.set(G.value,z.value)}return{status:$.value,value:m}})}else{let m=new Map;for(let W of X){let{key:G,value:z}=W;if(G.status==="aborted"||z.status==="aborted")return cc;if(G.status==="dirty"||z.status==="dirty")$.dirty();m.set(G.value,z.value)}return{status:$.value,value:m}}}}kQ.create=(c,$,Q)=>{return new kQ({valueType:$,keyType:c,typeName:$c.ZodMap,...Wc(Q)})};class d8 extends ic{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.set)return n(Q,{code:Z.invalid_type,expected:F.set,received:Q.parsedType}),cc;let J=this._def;if(J.minSize!==null){if(Q.data.size<J.minSize.value)n(Q,{code:Z.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),$.dirty()}if(J.maxSize!==null){if(Q.data.size>J.maxSize.value)n(Q,{code:Z.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),$.dirty()}let Y=this._def.valueType;function X(W){let G=new Set;for(let z of W){if(z.status==="aborted")return cc;if(z.status==="dirty")$.dirty();G.add(z.value)}return{status:$.value,value:G}}let m=[...Q.data.values()].map((W,G)=>Y._parse(new b0(Q,W,Q.path,G)));if(Q.common.async)return Promise.all(m).then((W)=>X(W));else return X(m)}min(c,$){return new d8({...this._def,minSize:{value:c,message:d.toString($)}})}max(c,$){return new d8({...this._def,maxSize:{value:c,message:d.toString($)}})}size(c,$){return this.min(c,$).max(c,$)}nonempty(c){return this.min(1,c)}}d8.create=(c,$)=>{return new d8({valueType:c,minSize:null,maxSize:null,typeName:$c.ZodSet,...Wc($)})};class A$ extends ic{constructor(){super(...arguments);this.validate=this.implement}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.function)return n($,{code:Z.invalid_type,expected:F.function,received:$.parsedType}),cc;function Q(m,W){return fQ({data:m,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,Z$(),e0].filter((G)=>!!G),issueData:{code:Z.invalid_arguments,argumentsError:W}})}function J(m,W){return fQ({data:m,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,Z$(),e0].filter((G)=>!!G),issueData:{code:Z.invalid_return_type,returnTypeError:W}})}let Y={errorMap:$.common.contextualErrorMap},X=$.data;if(this._def.returns instanceof s8){let m=this;return sc(async function(...W){let G=new X0([]),z=await m._def.args.parseAsync(W,Y).catch((q)=>{throw G.addIssue(Q(W,q)),G}),x=await Reflect.apply(X,this,z);return await m._def.returns._def.type.parseAsync(x,Y).catch((q)=>{throw G.addIssue(J(x,q)),G})})}else{let m=this;return sc(function(...W){let G=m._def.args.safeParse(W,Y);if(!G.success)throw new X0([Q(W,G.error)]);let z=Reflect.apply(X,this,G.data),x=m._def.returns.safeParse(z,Y);if(!x.success)throw new X0([J(z,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...c){return new A$({...this._def,args:l0.create(c).rest(U8.create())})}returns(c){return new A$({...this._def,returns:c})}implement(c){return this.parse(c)}strictImplement(c){return this.parse(c)}static create(c,$,Q){return new A$({args:c?c:l0.create([]).rest(U8.create()),returns:$||U8.create(),typeName:$c.ZodFunction,...Wc(Q)})}}class T$ extends ic{get schema(){return this._def.getter()}_parse(c){let{ctx:$}=this._processInputParams(c);return this._def.getter()._parse({data:$.data,path:$.path,parent:$})}}T$.create=(c,$)=>{return new T$({getter:c,typeName:$c.ZodLazy,...Wc($)})};class f$ extends ic{_parse(c){if(c.data!==this._def.value){let $=this._getOrReturnCtx(c);return n($,{received:$.data,code:Z.invalid_literal,expected:this._def.value}),cc}return{status:"valid",value:c.data}}get value(){return this._def.value}}f$.create=(c,$)=>{return new f$({value:c,typeName:$c.ZodLiteral,...Wc($)})};function ex(c,$){return new D8({values:c,typeName:$c.ZodEnum,...Wc($)})}class D8 extends ic{_parse(c){if(typeof c.data!=="string"){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{expected:Vc.joinValues(Q),received:$.parsedType,code:Z.invalid_type}),cc}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(c.data)){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{received:$.data,code:Z.invalid_enum_value,options:Q}),cc}return sc(c.data)}get options(){return this._def.values}get enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Values(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}extract(c,$=this._def){return D8.create(c,{...this._def,...$})}exclude(c,$=this._def){return D8.create(this.options.filter((Q)=>!c.includes(Q)),{...this._def,...$})}}D8.create=ex;class n$ extends ic{_parse(c){let $=Vc.getValidEnumValues(this._def.values),Q=this._getOrReturnCtx(c);if(Q.parsedType!==F.string&&Q.parsedType!==F.number){let J=Vc.objectValues($);return n(Q,{expected:Vc.joinValues(J),received:Q.parsedType,code:Z.invalid_type}),cc}if(!this._cache)this._cache=new Set(Vc.getValidEnumValues(this._def.values));if(!this._cache.has(c.data)){let J=Vc.objectValues($);return n(Q,{received:Q.data,code:Z.invalid_enum_value,options:J}),cc}return sc(c.data)}get enum(){return this._def.values}}n$.create=(c,$)=>{return new n$({values:c,typeName:$c.ZodNativeEnum,...Wc($)})};class s8 extends ic{unwrap(){return this._def.type}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.promise&&$.common.async===!1)return n($,{code:Z.invalid_type,expected:F.promise,received:$.parsedType}),cc;let Q=$.parsedType===F.promise?$.data:Promise.resolve($.data);return sc(Q.then((J)=>{return this._def.type.parseAsync(J,{path:$.path,errorMap:$.common.contextualErrorMap})}))}}s8.create=(c,$)=>{return new s8({type:c,typeName:$c.ZodPromise,...Wc($)})};class E0 extends ic{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===$c.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=this._def.effect||null,Y={addIssue:(X)=>{if(n(Q,X),X.fatal)$.abort();else $.dirty()},get path(){return Q.path}};if(Y.addIssue=Y.addIssue.bind(Y),J.type==="preprocess"){let X=J.transform(Q.data,Y);if(Q.common.async)return Promise.resolve(X).then(async(m)=>{if($.value==="aborted")return cc;let W=await this._def.schema._parseAsync({data:m,path:Q.path,parent:Q});if(W.status==="aborted")return cc;if(W.status==="dirty")return y8(W.value);if($.value==="dirty")return y8(W.value);return W});else{if($.value==="aborted")return cc;let m=this._def.schema._parseSync({data:X,path:Q.path,parent:Q});if(m.status==="aborted")return cc;if(m.status==="dirty")return y8(m.value);if($.value==="dirty")return y8(m.value);return m}}if(J.type==="refinement"){let X=(m)=>{let W=J.refinement(m,Y);if(Q.common.async)return Promise.resolve(W);if(W instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return m};if(Q.common.async===!1){let m=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(m.status==="aborted")return cc;if(m.status==="dirty")$.dirty();return X(m.value),{status:$.value,value:m.value}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((m)=>{if(m.status==="aborted")return cc;if(m.status==="dirty")$.dirty();return X(m.value).then(()=>{return{status:$.value,value:m.value}})})}if(J.type==="transform")if(Q.common.async===!1){let X=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(!v8(X))return cc;let m=J.transform(X.value,Y);if(m instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:$.value,value:m}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((X)=>{if(!v8(X))return cc;return Promise.resolve(J.transform(X.value,Y)).then((m)=>({status:$.value,value:m}))});Vc.assertNever(J)}}E0.create=(c,$,Q)=>{return new E0({schema:c,typeName:$c.ZodEffects,effect:$,...Wc(Q)})};E0.createWithPreprocess=(c,$,Q)=>{return new E0({schema:$,effect:{type:"preprocess",transform:c},typeName:$c.ZodEffects,...Wc(Q)})};class P0 extends ic{_parse(c){if(this._getType(c)===F.undefined)return sc(void 0);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}P0.create=(c,$)=>{return new P0({innerType:c,typeName:$c.ZodOptional,...Wc($)})};class $8 extends ic{_parse(c){if(this._getType(c)===F.null)return sc(null);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}$8.create=(c,$)=>{return new $8({innerType:c,typeName:$c.ZodNullable,...Wc($)})};class u$ extends ic{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;if($.parsedType===F.undefined)Q=this._def.defaultValue();return this._def.innerType._parse({data:Q,path:$.path,parent:$})}removeDefault(){return this._def.innerType}}u$.create=(c,$)=>{return new u$({innerType:c,typeName:$c.ZodDefault,defaultValue:typeof $.default==="function"?$.default:()=>$.default,...Wc($)})};class a$ extends ic{_parse(c){let{ctx:$}=this._processInputParams(c),Q={...$,common:{...$.common,issues:[]}},J=this._def.innerType._parse({data:Q.data,path:Q.path,parent:{...Q}});if(_$(J))return J.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new X0(Q.common.issues)},input:Q.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new X0(Q.common.issues)},input:Q.data})}}removeCatch(){return this._def.innerType}}a$.create=(c,$)=>{return new a$({innerType:c,typeName:$c.ZodCatch,catchValue:typeof $.catch==="function"?$.catch:()=>$.catch,...Wc($)})};class lQ extends ic{_parse(c){if(this._getType(c)!==F.nan){let Q=this._getOrReturnCtx(c);return n(Q,{code:Z.invalid_type,expected:F.nan,received:Q.parsedType}),cc}return{status:"valid",value:c.data}}}lQ.create=(c)=>{return new lQ({typeName:$c.ZodNaN,...Wc(c)})};var JK=Symbol("zod_brand");class WY extends ic{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;return this._def.type._parse({data:Q,path:$.path,parent:$})}unwrap(){return this._def.type}}class hQ extends ic{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:Q.data,path:Q.path,parent:Q});if(Y.status==="aborted")return cc;if(Y.status==="dirty")return $.dirty(),y8(Y.value);else return this._def.out._parseAsync({data:Y.value,path:Q.path,parent:Q})})();else{let J=this._def.in._parseSync({data:Q.data,path:Q.path,parent:Q});if(J.status==="aborted")return cc;if(J.status==="dirty")return $.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:Q.path,parent:Q})}}static create(c,$){return new hQ({in:c,out:$,typeName:$c.ZodPipeline})}}class k$ extends ic{_parse(c){let $=this._def.innerType._parse(c),Q=(J)=>{if(v8(J))J.value=Object.freeze(J.value);return J};return _$($)?$.then((J)=>Q(J)):Q($)}unwrap(){return this._def.innerType}}k$.create=(c,$)=>{return new k$({innerType:c,typeName:$c.ZodReadonly,...Wc($)})};function dx(c,$){let Q=typeof c==="function"?c($):typeof c==="string"?{message:c}:c;return typeof Q==="string"?{message:Q}:Q}function c6(c,$={},Q){if(c)return g8.create().superRefine((J,Y)=>{let X=c(J);if(X instanceof Promise)return X.then((m)=>{if(!m){let W=dx($,J),G=W.fatal??Q??!0;Y.addIssue({code:"custom",...W,fatal:G})}});if(!X){let m=dx($,J),W=m.fatal??Q??!0;Y.addIssue({code:"custom",...m,fatal:W})}return});return g8.create()}var YK={object:Sc.lazycreate},$c;(function(c){c.ZodString="ZodString",c.ZodNumber="ZodNumber",c.ZodNaN="ZodNaN",c.ZodBigInt="ZodBigInt",c.ZodBoolean="ZodBoolean",c.ZodDate="ZodDate",c.ZodSymbol="ZodSymbol",c.ZodUndefined="ZodUndefined",c.ZodNull="ZodNull",c.ZodAny="ZodAny",c.ZodUnknown="ZodUnknown",c.ZodNever="ZodNever",c.ZodVoid="ZodVoid",c.ZodArray="ZodArray",c.ZodObject="ZodObject",c.ZodUnion="ZodUnion",c.ZodDiscriminatedUnion="ZodDiscriminatedUnion",c.ZodIntersection="ZodIntersection",c.ZodTuple="ZodTuple",c.ZodRecord="ZodRecord",c.ZodMap="ZodMap",c.ZodSet="ZodSet",c.ZodFunction="ZodFunction",c.ZodLazy="ZodLazy",c.ZodLiteral="ZodLiteral",c.ZodEnum="ZodEnum",c.ZodEffects="ZodEffects",c.ZodNativeEnum="ZodNativeEnum",c.ZodOptional="ZodOptional",c.ZodNullable="ZodNullable",c.ZodDefault="ZodDefault",c.ZodCatch="ZodCatch",c.ZodPromise="ZodPromise",c.ZodBranded="ZodBranded",c.ZodPipeline="ZodPipeline",c.ZodReadonly="ZodReadonly"})($c||($c={}));var XK=(c,$={message:`Input not instance of ${c.name}`})=>c6((Q)=>Q instanceof c,$),$6=A0.create,Q6=j8.create,mK=lQ.create,WK=K8.create,J6=C$.create,GK=o8.create,zK=nQ.create,xK=P$.create,iK=b$.create,qK=g8.create,MK=U8.create,VK=k0.create,NK=uQ.create,wK=C0.create,vK=Sc.create,UK=Sc.strictCreate,jK=E$.create,KK=mY.create,DK=F$.create,BK=l0.create,HK=aQ.create,OK=kQ.create,pK=d8.create,RK=A$.create,IK=T$.create,LK=f$.create,ZK=D8.create,_K=n$.create,SK=s8.create,AK=E0.create,CK=P0.create,PK=$8.create,bK=E0.createWithPreprocess,EK=hQ.create,FK=()=>$6().optional(),TK=()=>Q6().optional(),fK=()=>J6().optional(),nK={string:(c)=>A0.create({...c,coerce:!0}),number:(c)=>j8.create({...c,coerce:!0}),boolean:(c)=>C$.create({...c,coerce:!0}),bigint:(c)=>K8.create({...c,coerce:!0}),date:(c)=>o8.create({...c,coerce:!0})};var uK=cc;var aK=/^(wss?|https?):\/\//i,kK=/^nsec1[0-9a-z]+$/i,W6=/^[0-9a-f]{64}$/i,lK=/^[^/\s]+\/[^/\s]+$/,hK=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Y6(c){try{let $=new URL(c);return $.protocol==="http:"||$.protocol==="https:"}catch{return!1}}function yK(c){if(!aK.test(c))return!1;try{return new URL(c.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function X6(c){if(!Array.isArray(c))return c;return c.map(($)=>typeof $==="string"?$.trim():$).filter(($)=>$!=="")}var oK=b.object({kind:b.literal("github"),token:b.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:b.string({required_error:"tracker.repo (owner/repo) is required for the github tracker"}).trim().min(1,"tracker.repo (owner/repo) is required for the github tracker").refine((c)=>lK.test(c),{message:"tracker.repo must be owner/repo"})}).strict(),gK=b.object({kind:b.literal("buzz"),ownerHex:b.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(W6,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:b.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),dK=b.discriminatedUnion("kind",[oK,gK]),G6=b.object({label:b.string().trim().optional(),relayUrl:b.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(yK,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:b.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine((c)=>kK.test(c)||W6.test(c),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:b.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:b.preprocess(X6,b.array(b.string()).default([]).superRefine((c,$)=>{for(let Q of c)if(!hK.test(Q))$.addIssue({code:b.ZodIssueCode.custom,message:`channel "${Q}" is not a UUID`})})),triggers:b.preprocess((c)=>c===void 0?void 0:X6(c),b.array(b.string()).optional().superRefine((c,$)=>{if(c!==void 0&&c.length===0)$.addIssue({code:b.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:b.string().trim().refine(Y6,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:b.string().trim().refine(Y6,{message:"apiUrl must be an http(s) URL"}).optional(),device:b.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:b.string().trim().optional().superRefine((c,$)=>{if(c!==void 0&&c!=="mobile"&&c!=="web")$.addIssue({code:b.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:dK.optional()}).strict();function r8(c){if(c.label)return c.label;let $=c.relayUrl??"";try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return $||"binding"}}function z6(c){if(c.code===b.ZodIssueCode.unrecognized_keys){let $=c.keys.join(", ");return c.path.includes("tracker")?`tracker unknown key(s): ${$}`:`unknown key(s): ${$} (check spelling of the known fields)`}if(c.code===b.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return c.message}function x6(c){let $=G6.safeParse(c);return $.success?[]:$.error.issues.map(z6)}function m6(c){let $=c??{},Q=typeof $.label==="string"&&$.label.trim()?$.label.trim():void 0,J=typeof $.relayUrl==="string"?$.relayUrl:"";return r8({label:Q,relayUrl:J})}function k9(c,$="bindings config"){let Q=typeof $==="string"?{source:$}:$,J=Q.source??"bindings config",Y;try{Y=JSON.parse(c)}catch(z){throw Error(`${J} is not valid JSON: ${z instanceof Error?z.message:String(z)}`)}let X=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!X)throw Error(`${J} must be a JSON array of bindings (or { "bindings": [...] })`);if(X.length===0)throw Error(`${J} has no bindings`);let m=[],W=[];X.forEach((z,x)=>{let i=G6.safeParse(z);if(i.success)W.push(i.data);else m.push(`binding[${x}] (${m6(z)}): ${i.error.issues.map(z6).join("; ")}`)});let G=new Map;for(let z of X){let x=m6(z);G.set(x,(G.get(x)??0)+1)}for(let[z,x]of G)if(x>1)m.push(`duplicate label "${z}" across ${x} bindings — give each a distinct label`);if(m.length)throw Error(`invalid ${J}:
523
- ${m.join(`
524
- `)}`);if(Q.onWarn){let z=new Set;for(let x of W){let i=`${x.relayUrl} ${x.privateKey}`;if(z.has(i))Q.onWarn(`two bindings share the same relayUrl + privateKey (${r8(x)}) — is that intentional?`);z.add(i)}}return W}import{createHash as qR,randomUUID as MR}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function yQ(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function D0(c,$=""){if(!Number.isSafeInteger(c)||c<0){let Q=$&&`"${$}" `;throw Error(`${Q}expected integer >= 0, got ${c}`)}}function wc(c,$,Q=""){let J=yQ(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let m=Q&&`"${Q}" `,W=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(m+"expected Uint8Array"+W+", got "+G)}return c}function t8(c){if(typeof c!=="function"||typeof c.create!=="function")throw Error("Hash must wrapped by utils.createHasher");D0(c.outputLen),D0(c.blockLen)}function l$(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function q6(c,$){wc(c,void 0,"digestInto() output");let Q=$.outputLen;if(c.length<Q)throw Error('"digestInto() output" expected to be of length >='+Q)}function F0(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function GY(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}function T0(c,$){return c<<32-$|c>>>$}var M6=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),sK=Array.from({length:256},(c,$)=>$.toString(16).padStart(2,"0"));function Bc(c){if(wc(c),M6)return c.toHex();let $="";for(let Q=0;Q<c.length;Q++)$+=sK[c[Q]];return $}var Q8={_0:48,_9:57,A:65,F:70,a:97,f:102};function i6(c){if(c>=Q8._0&&c<=Q8._9)return c-Q8._0;if(c>=Q8.A&&c<=Q8.F)return c-(Q8.A-10);if(c>=Q8.a&&c<=Q8.f)return c-(Q8.a-10);return}function Oc(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);if(M6)return Uint8Array.fromHex(c);let $=c.length,Q=$/2;if($%2)throw Error("hex string expected, got unpadded hex of length "+$);let J=new Uint8Array(Q);for(let Y=0,X=0;Y<Q;Y++,X+=2){let m=i6(c.charCodeAt(X)),W=i6(c.charCodeAt(X+1));if(m===void 0||W===void 0){let G=c[X]+c[X+1];throw Error('hex string expected, got non-hex character "'+G+'" at index '+X)}J[Y]=m*16+W}return J}function bc(...c){let $=0;for(let J=0;J<c.length;J++){let Y=c[J];wc(Y),$+=Y.length}let Q=new Uint8Array($);for(let J=0,Y=0;J<c.length;J++){let X=c[J];Q.set(X,Y),Y+=X.length}return Q}function V6(c,$={}){let Q=(Y,X)=>c(X).update(Y).digest(),J=c(void 0);return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(Y)=>c(Y),Object.assign(Q,$),Object.freeze(Q)}function f0(c=32){let $=typeof globalThis==="object"?globalThis.crypto:null;if(typeof $?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return $.getRandomValues(new Uint8Array(c))}var N6=(c)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,c])});function w6(c,$,Q){return c&$^~c&Q}function v6(c,$,Q){return c&$^c&Q^$&Q}class zY{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(c,$,Q,J){this.blockLen=c,this.outputLen=$,this.padOffset=Q,this.isLE=J,this.buffer=new Uint8Array(c),this.view=GY(this.buffer)}update(c){l$(this),wc(c);let{view:$,buffer:Q,blockLen:J}=this,Y=c.length;for(let X=0;X<Y;){let m=Math.min(J-this.pos,Y-X);if(m===J){let W=GY(c);for(;J<=Y-X;X+=J)this.process(W,X);continue}if(Q.set(c.subarray(X,X+m),this.pos),this.pos+=m,X+=m,this.pos===J)this.process($,0),this.pos=0}return this.length+=c.length,this.roundClean(),this}digestInto(c){l$(this),q6(c,this),this.finished=!0;let{buffer:$,view:Q,blockLen:J,isLE:Y}=this,{pos:X}=this;if($[X++]=128,F0(this.buffer.subarray(X)),this.padOffset>J-X)this.process(Q,0),X=0;for(let x=X;x<J;x++)$[x]=0;Q.setBigUint64(J-8,BigInt(this.length*8),Y),this.process(Q,0);let m=GY(c),W=this.outputLen;if(W%4)throw Error("_sha2: outputLen must be aligned to 32bit");let G=W/4,z=this.get();if(G>z.length)throw Error("_sha2: outputLen bigger than state");for(let x=0;x<G;x++)m.setUint32(4*x,z[x],Y)}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}_cloneInto(c){c||=new this.constructor,c.set(...this.get());let{blockLen:$,buffer:Q,length:J,finished:Y,destroyed:X,pos:m}=this;if(c.destroyed=X,c.finished=Y,c.length=J,c.pos=m,J%$)c.buffer.set(Q);return c}clone(){return this._cloneInto()}}var J8=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),Y8=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),hc=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),yc=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var xY=BigInt(4294967295),U6=BigInt(32);function rK(c,$=!1){if($)return{h:Number(c&xY),l:Number(c>>U6&xY)};return{h:Number(c>>U6&xY)|0,l:Number(c&xY)|0}}function j6(c,$=!1){let Q=c.length,J=new Uint32Array(Q),Y=new Uint32Array(Q);for(let X=0;X<Q;X++){let{h:m,l:W}=rK(c[X],$);[J[X],Y[X]]=[m,W]}return[J,Y]}var l9=(c,$,Q)=>c>>>Q,h9=(c,$,Q)=>c<<32-Q|$>>>Q,e8=(c,$,Q)=>c>>>Q|$<<32-Q,c$=(c,$,Q)=>c<<32-Q|$>>>Q,oQ=(c,$,Q)=>c<<64-Q|$>>>Q-32,gQ=(c,$,Q)=>c>>>Q-32|$<<64-Q;function h0(c,$,Q,J){let Y=($>>>0)+(J>>>0);return{h:c+Q+(Y/4294967296|0)|0,l:Y|0}}var K6=(c,$,Q)=>(c>>>0)+($>>>0)+(Q>>>0),D6=(c,$,Q,J)=>$+Q+J+(c/4294967296|0)|0,B6=(c,$,Q,J)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0),H6=(c,$,Q,J,Y)=>$+Q+J+Y+(c/4294967296|0)|0,O6=(c,$,Q,J,Y)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0)+(Y>>>0),p6=(c,$,Q,J,Y,X)=>$+Q+J+Y+X+(c/4294967296|0)|0;var eK=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),B8=new Uint32Array(64);class y9 extends zY{constructor(c){super(64,c,8,!1)}get(){let{A:c,B:$,C:Q,D:J,E:Y,F:X,G:m,H:W}=this;return[c,$,Q,J,Y,X,m,W]}set(c,$,Q,J,Y,X,m,W){this.A=c|0,this.B=$|0,this.C=Q|0,this.D=J|0,this.E=Y|0,this.F=X|0,this.G=m|0,this.H=W|0}process(c,$){for(let x=0;x<16;x++,$+=4)B8[x]=c.getUint32($,!1);for(let x=16;x<64;x++){let i=B8[x-15],q=B8[x-2],M=T0(i,7)^T0(i,18)^i>>>3,N=T0(q,17)^T0(q,19)^q>>>10;B8[x]=N+B8[x-7]+M+B8[x-16]|0}let{A:Q,B:J,C:Y,D:X,E:m,F:W,G,H:z}=this;for(let x=0;x<64;x++){let i=T0(m,6)^T0(m,11)^T0(m,25),q=z+i+w6(m,W,G)+eK[x]+B8[x]|0,N=(T0(Q,2)^T0(Q,13)^T0(Q,22))+v6(Q,J,Y)|0;z=G,G=W,W=m,m=X+q|0,X=Y,Y=J,J=Q,Q=q+N|0}Q=Q+this.A|0,J=J+this.B|0,Y=Y+this.C|0,X=X+this.D|0,m=m+this.E|0,W=W+this.F|0,G=G+this.G|0,z=z+this.H|0,this.set(Q,J,Y,X,m,W,G,z)}roundClean(){F0(B8)}destroy(){this.set(0,0,0,0,0,0,0,0),F0(this.buffer)}}class R6 extends y9{A=J8[0]|0;B=J8[1]|0;C=J8[2]|0;D=J8[3]|0;E=J8[4]|0;F=J8[5]|0;G=J8[6]|0;H=J8[7]|0;constructor(){super(32)}}class c2 extends y9{A=Y8[0]|0;B=Y8[1]|0;C=Y8[2]|0;D=Y8[3]|0;E=Y8[4]|0;F=Y8[5]|0;G=Y8[6]|0;H=Y8[7]|0;constructor(){super(28)}}var I6=(()=>j6(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((c)=>BigInt(c))))(),$2=(()=>I6[0])(),Q2=(()=>I6[1])(),H8=new Uint32Array(80),O8=new Uint32Array(80);class dQ extends zY{constructor(c){super(128,c,16,!1)}get(){let{Ah:c,Al:$,Bh:Q,Bl:J,Ch:Y,Cl:X,Dh:m,Dl:W,Eh:G,El:z,Fh:x,Fl:i,Gh:q,Gl:M,Hh:N,Hl:v}=this;return[c,$,Q,J,Y,X,m,W,G,z,x,i,q,M,N,v]}set(c,$,Q,J,Y,X,m,W,G,z,x,i,q,M,N,v){this.Ah=c|0,this.Al=$|0,this.Bh=Q|0,this.Bl=J|0,this.Ch=Y|0,this.Cl=X|0,this.Dh=m|0,this.Dl=W|0,this.Eh=G|0,this.El=z|0,this.Fh=x|0,this.Fl=i|0,this.Gh=q|0,this.Gl=M|0,this.Hh=N|0,this.Hl=v|0}process(c,$){for(let j=0;j<16;j++,$+=4)H8[j]=c.getUint32($),O8[j]=c.getUint32($+=4);for(let j=16;j<80;j++){let D=H8[j-15]|0,_=O8[j-15]|0,Xc=e8(D,_,1)^e8(D,_,8)^l9(D,_,7),g=c$(D,_,1)^c$(D,_,8)^h9(D,_,7),Qc=H8[j-2]|0,u=O8[j-2]|0,k=e8(Qc,u,19)^oQ(Qc,u,61)^l9(Qc,u,6),Yc=c$(Qc,u,19)^gQ(Qc,u,61)^h9(Qc,u,6),t=B6(g,Yc,O8[j-7],O8[j-16]),B=H6(t,Xc,k,H8[j-7],H8[j-16]);H8[j]=B|0,O8[j]=t|0}let{Ah:Q,Al:J,Bh:Y,Bl:X,Ch:m,Cl:W,Dh:G,Dl:z,Eh:x,El:i,Fh:q,Fl:M,Gh:N,Gl:v,Hh:U,Hl:w}=this;for(let j=0;j<80;j++){let D=e8(x,i,14)^e8(x,i,18)^oQ(x,i,41),_=c$(x,i,14)^c$(x,i,18)^gQ(x,i,41),Xc=x&q^~x&N,g=i&M^~i&v,Qc=O6(w,_,g,Q2[j],O8[j]),u=p6(Qc,U,D,Xc,$2[j],H8[j]),k=Qc|0,Yc=e8(Q,J,28)^oQ(Q,J,34)^oQ(Q,J,39),t=c$(Q,J,28)^gQ(Q,J,34)^gQ(Q,J,39),B=Q&Y^Q&m^Y&m,C=J&X^J&W^X&W;U=N|0,w=v|0,N=q|0,v=M|0,q=x|0,M=i|0,{h:x,l:i}=h0(G|0,z|0,u|0,k|0),G=m|0,z=W|0,m=Y|0,W=X|0,Y=Q|0,X=J|0;let K=K6(k,t,C);Q=D6(K,u,Yc,B),J=K|0}({h:Q,l:J}=h0(this.Ah|0,this.Al|0,Q|0,J|0)),{h:Y,l:X}=h0(this.Bh|0,this.Bl|0,Y|0,X|0),{h:m,l:W}=h0(this.Ch|0,this.Cl|0,m|0,W|0),{h:G,l:z}=h0(this.Dh|0,this.Dl|0,G|0,z|0),{h:x,l:i}=h0(this.Eh|0,this.El|0,x|0,i|0),{h:q,l:M}=h0(this.Fh|0,this.Fl|0,q|0,M|0),{h:N,l:v}=h0(this.Gh|0,this.Gl|0,N|0,v|0),{h:U,l:w}=h0(this.Hh|0,this.Hl|0,U|0,w|0),this.set(Q,J,Y,X,m,W,G,z,x,i,q,M,N,v,U,w)}roundClean(){F0(H8,O8)}destroy(){F0(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class J2 extends dQ{Ah=yc[0]|0;Al=yc[1]|0;Bh=yc[2]|0;Bl=yc[3]|0;Ch=yc[4]|0;Cl=yc[5]|0;Dh=yc[6]|0;Dl=yc[7]|0;Eh=yc[8]|0;El=yc[9]|0;Fh=yc[10]|0;Fl=yc[11]|0;Gh=yc[12]|0;Gl=yc[13]|0;Hh=yc[14]|0;Hl=yc[15]|0;constructor(){super(64)}}class Y2 extends dQ{Ah=hc[0]|0;Al=hc[1]|0;Bh=hc[2]|0;Bl=hc[3]|0;Ch=hc[4]|0;Cl=hc[5]|0;Dh=hc[6]|0;Dl=hc[7]|0;Eh=hc[8]|0;El=hc[9]|0;Fh=hc[10]|0;Fl=hc[11]|0;Gh=hc[12]|0;Gl=hc[13]|0;Hh=hc[14]|0;Hl=hc[15]|0;constructor(){super(48)}}var rc=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),tc=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class X2 extends dQ{Ah=rc[0]|0;Al=rc[1]|0;Bh=rc[2]|0;Bl=rc[3]|0;Ch=rc[4]|0;Cl=rc[5]|0;Dh=rc[6]|0;Dl=rc[7]|0;Eh=rc[8]|0;El=rc[9]|0;Fh=rc[10]|0;Fl=rc[11]|0;Gh=rc[12]|0;Gl=rc[13]|0;Hh=rc[14]|0;Hl=rc[15]|0;constructor(){super(28)}}class m2 extends dQ{Ah=tc[0]|0;Al=tc[1]|0;Bh=tc[2]|0;Bl=tc[3]|0;Ch=tc[4]|0;Cl=tc[5]|0;Dh=tc[6]|0;Dl=tc[7]|0;Eh=tc[8]|0;El=tc[9]|0;Fh=tc[10]|0;Fl=tc[11]|0;Gh=tc[12]|0;Gl=tc[13]|0;Hh=tc[14]|0;Hl=tc[15]|0;constructor(){super(32)}}var ec=V6(()=>new R6,N6(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var g9=BigInt(0),o9=BigInt(1);function sQ(c,$=""){if(typeof c!=="boolean"){let Q=$&&`"${$}" `;throw Error(Q+"expected boolean, got type="+typeof c)}return c}function L6(c){if(typeof c==="bigint"){if(!iY(c))throw Error("positive bigint expected, got "+c)}else D0(c);return c}function rQ(c){let $=L6(c).toString(16);return $.length&1?"0"+$:$}function Z6(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);return c===""?g9:BigInt("0x"+c)}function p8(c){return Z6(Bc(c))}function d9(c){return Z6(Bc(W2(wc(c)).reverse()))}function qY(c,$){D0($),c=L6(c);let Q=Oc(c.toString(16).padStart($*2,"0"));if(Q.length!==$)throw Error("number too large");return Q}function s9(c,$){return qY(c,$).reverse()}function W2(c){return Uint8Array.from(c)}function _6(c){return Uint8Array.from(c,($,Q)=>{let J=$.charCodeAt(0);if($.length!==1||J>127)throw Error(`string contains non-ASCII character "${c[Q]}" with code ${J} at position ${Q}`);return J})}var iY=(c)=>typeof c==="bigint"&&g9<=c;function G2(c,$,Q){return iY(c)&&iY($)&&iY(Q)&&$<=c&&c<Q}function S6(c,$,Q,J){if(!G2($,Q,J))throw Error("expected valid "+c+": "+Q+" <= n < "+J+", got "+$)}function r9(c){let $;for($=0;c>g9;c>>=o9,$+=1);return $}var tQ=(c)=>(o9<<BigInt(c))-o9;function A6(c,$,Q){if(D0(c,"hashLen"),D0($,"qByteLen"),typeof Q!=="function")throw Error("hmacFn must be a function");let J=(U)=>new Uint8Array(U),Y=Uint8Array.of(),X=Uint8Array.of(0),m=Uint8Array.of(1),W=1000,G=J(c),z=J(c),x=0,i=()=>{G.fill(1),z.fill(0),x=0},q=(...U)=>Q(z,bc(G,...U)),M=(U=Y)=>{if(z=q(X,U),G=q(),U.length===0)return;z=q(m,U),G=q()},N=()=>{if(x++>=W)throw Error("drbg: tried max amount of iterations");let U=0,w=[];while(U<$){G=q();let j=G.slice();w.push(j),U+=G.length}return bc(...w)};return(U,w)=>{i(),M(U);let j=void 0;while(!(j=w(N())))M();return i(),j}}function eQ(c,$={},Q={}){if(!c||typeof c!=="object")throw Error("expected valid options object");function J(X,m,W){let G=c[X];if(W&&G===void 0)return;let z=typeof G;if(z!==m||G===null)throw Error(`param "${X}" is invalid: expected ${m}, got ${z}`)}let Y=(X,m)=>Object.entries(X).forEach(([W,G])=>J(W,G,m));Y($,!1),Y(Q,!0)}function t9(c){let $=new WeakMap;return(Q,...J)=>{let Y=$.get(Q);if(Y!==void 0)return Y;let X=c(Q,...J);return $.set(Q,X),X}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var Q0=BigInt(0),c0=BigInt(1),$$=BigInt(2),b6=BigInt(3),E6=BigInt(4),F6=BigInt(5),z2=BigInt(7),T6=BigInt(8),x2=BigInt(9),f6=BigInt(16);function n0(c,$){let Q=c%$;return Q>=Q0?Q:$+Q}function M0(c,$,Q){let J=c;while($-- >Q0)J*=J,J%=Q;return J}function C6(c,$){if(c===Q0)throw Error("invert: expected non-zero number");if($<=Q0)throw Error("invert: expected positive modulus, got "+$);let Q=n0(c,$),J=$,Y=Q0,X=c0,m=c0,W=Q0;while(Q!==Q0){let z=J/Q,x=J%Q,i=Y-m*z,q=X-W*z;J=Q,Q=x,Y=m,X=W,m=i,W=q}if(J!==c0)throw Error("invert: does not exist");return n0(Y,$)}function e9(c,$,Q){if(!c.eql(c.sqr($),Q))throw Error("Cannot find square root")}function n6(c,$){let Q=(c.ORDER+c0)/E6,J=c.pow($,Q);return e9(c,J,$),J}function i2(c,$){let Q=(c.ORDER-F6)/T6,J=c.mul($,$$),Y=c.pow(J,Q),X=c.mul($,Y),m=c.mul(c.mul(X,$$),Y),W=c.mul(X,c.sub(m,c.ONE));return e9(c,W,$),W}function q2(c){let $=h$(c),Q=u6(c),J=Q($,$.neg($.ONE)),Y=Q($,J),X=Q($,$.neg(J)),m=(c+z2)/f6;return(W,G)=>{let z=W.pow(G,m),x=W.mul(z,J),i=W.mul(z,Y),q=W.mul(z,X),M=W.eql(W.sqr(x),G),N=W.eql(W.sqr(i),G);z=W.cmov(z,x,M),x=W.cmov(q,i,N);let v=W.eql(W.sqr(x),G),U=W.cmov(z,x,v);return e9(W,U,G),U}}function u6(c){if(c<b6)throw Error("sqrt is not defined for small field");let $=c-c0,Q=0;while($%$$===Q0)$/=$$,Q++;let J=$$,Y=h$(c);while(P6(Y,J)===1)if(J++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return n6;let X=Y.pow(J,$),m=($+c0)/$$;return function(G,z){if(G.is0(z))return z;if(P6(G,z)!==1)throw Error("Cannot find square root");let x=Q,i=G.mul(G.ONE,X),q=G.pow(z,$),M=G.pow(z,m);while(!G.eql(q,G.ONE)){if(G.is0(q))return G.ZERO;let N=1,v=G.sqr(q);while(!G.eql(v,G.ONE))if(N++,v=G.sqr(v),N===x)throw Error("Cannot find square root");let U=c0<<BigInt(x-N-1),w=G.pow(i,U);x=N,i=G.sqr(w),q=G.mul(q,i),M=G.mul(M,w)}return M}}function M2(c){if(c%E6===b6)return n6;if(c%T6===F6)return i2;if(c%f6===x2)return q2(c);return u6(c)}var V2=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function cm(c){let $={ORDER:"bigint",BYTES:"number",BITS:"number"},Q=V2.reduce((J,Y)=>{return J[Y]="function",J},$);return eQ(c,Q),c}function N2(c,$,Q){if(Q<Q0)throw Error("invalid exponent, negatives unsupported");if(Q===Q0)return c.ONE;if(Q===c0)return $;let J=c.ONE,Y=$;while(Q>Q0){if(Q&c0)J=c.mul(J,Y);Y=c.sqr(Y),Q>>=c0}return J}function MY(c,$,Q=!1){let J=Array($.length).fill(Q?c.ZERO:void 0),Y=$.reduce((m,W,G)=>{if(c.is0(W))return m;return J[G]=m,c.mul(m,W)},c.ONE),X=c.inv(Y);return $.reduceRight((m,W,G)=>{if(c.is0(W))return m;return J[G]=c.mul(m,J[G]),c.mul(m,W)},X),J}function P6(c,$){let Q=(c.ORDER-c0)/$$,J=c.pow($,Q),Y=c.eql(J,c.ONE),X=c.eql(J,c.ZERO),m=c.eql(J,c.neg(c.ONE));if(!Y&&!X&&!m)throw Error("invalid Legendre symbol result");return Y?1:X?0:-1}function w2(c,$){if($!==void 0)D0($);let Q=$!==void 0?$:c.toString(2).length,J=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:J}}class a6{ORDER;BITS;BYTES;isLE;ZERO=Q0;ONE=c0;_lengths;_sqrt;_mod;constructor(c,$={}){if(c<=Q0)throw Error("invalid field: expected ORDER > 0, got "+c);let Q=void 0;if(this.isLE=!1,$!=null&&typeof $==="object"){if(typeof $.BITS==="number")Q=$.BITS;if(typeof $.sqrt==="function")this.sqrt=$.sqrt;if(typeof $.isLE==="boolean")this.isLE=$.isLE;if($.allowedLengths)this._lengths=$.allowedLengths?.slice();if(typeof $.modFromBytes==="boolean")this._mod=$.modFromBytes}let{nBitLength:J,nByteLength:Y}=w2(c,Q);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=c,this.BITS=J,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create(c){return n0(c,this.ORDER)}isValid(c){if(typeof c!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof c);return Q0<=c&&c<this.ORDER}is0(c){return c===Q0}isValidNot0(c){return!this.is0(c)&&this.isValid(c)}isOdd(c){return(c&c0)===c0}neg(c){return n0(-c,this.ORDER)}eql(c,$){return c===$}sqr(c){return n0(c*c,this.ORDER)}add(c,$){return n0(c+$,this.ORDER)}sub(c,$){return n0(c-$,this.ORDER)}mul(c,$){return n0(c*$,this.ORDER)}pow(c,$){return N2(this,c,$)}div(c,$){return n0(c*C6($,this.ORDER),this.ORDER)}sqrN(c){return c*c}addN(c,$){return c+$}subN(c,$){return c-$}mulN(c,$){return c*$}inv(c){return C6(c,this.ORDER)}sqrt(c){if(!this._sqrt)this._sqrt=M2(this.ORDER);return this._sqrt(this,c)}toBytes(c){return this.isLE?s9(c,this.BYTES):qY(c,this.BYTES)}fromBytes(c,$=!1){wc(c);let{_lengths:Q,BYTES:J,isLE:Y,ORDER:X,_mod:m}=this;if(Q){if(!Q.includes(c.length)||c.length>J)throw Error("Field.fromBytes: expected "+Q+" bytes, got "+c.length);let G=new Uint8Array(J);G.set(c,Y?0:G.length-c.length),c=G}if(c.length!==J)throw Error("Field.fromBytes: expected "+J+" bytes, got "+c.length);let W=Y?d9(c):p8(c);if(m)W=n0(W,X);if(!$){if(!this.isValid(W))throw Error("invalid field element: outside of range 0..ORDER")}return W}invertBatch(c){return MY(this,c)}cmov(c,$,Q){return Q?$:c}}function h$(c,$={}){return new a6(c,$)}function k6(c){if(typeof c!=="bigint")throw Error("field order must be bigint");let $=c.toString(2).length;return Math.ceil($/8)}function $m(c){let $=k6(c);return $+Math.ceil($/2)}function VY(c,$,Q=!1){wc(c);let J=c.length,Y=k6($),X=$m($);if(J<16||J<X||J>1024)throw Error("expected "+X+"-1024 bytes of input, got "+J);let m=Q?d9(c):p8(c),W=n0(m,$-c0)+c0;return Q?s9(W,Y):qY(W,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var y$=BigInt(0),Q$=BigInt(1);function cJ(c,$){let Q=$.negate();return c?Q:$}function Xm(c,$){let Q=MY(c.Fp,$.map((J)=>J.Z));return $.map((J,Y)=>c.fromAffine(J.toAffine(Q[Y])))}function o6(c,$){if(!Number.isSafeInteger(c)||c<=0||c>$)throw Error("invalid window size, expected [1.."+$+"], got W="+c)}function Qm(c,$){o6(c,$);let Q=Math.ceil($/c)+1,J=2**(c-1),Y=2**c,X=tQ(c),m=BigInt(c);return{windows:Q,windowSize:J,mask:X,maxNumber:Y,shiftBy:m}}function l6(c,$,Q){let{windowSize:J,mask:Y,maxNumber:X,shiftBy:m}=Q,W=Number(c&Y),G=c>>m;if(W>J)W-=X,G+=Q$;let z=$*J,x=z+Math.abs(W)-1,i=W===0,q=W<0,M=$%2!==0;return{nextN:G,offset:x,isZero:i,isNeg:q,isNegF:M,offsetF:z}}var Jm=new WeakMap,g6=new WeakMap;function Ym(c){return g6.get(c)||1}function h6(c){if(c!==y$)throw Error("invalid wNAF")}class mm{BASE;ZERO;Fn;bits;constructor(c,$){this.BASE=c.BASE,this.ZERO=c.ZERO,this.Fn=c.Fn,this.bits=$}_unsafeLadder(c,$,Q=this.ZERO){let J=c;while($>y$){if($&Q$)Q=Q.add(J);J=J.double(),$>>=Q$}return Q}precomputeWindow(c,$){let{windows:Q,windowSize:J}=Qm($,this.bits),Y=[],X=c,m=X;for(let W=0;W<Q;W++){m=X,Y.push(m);for(let G=1;G<J;G++)m=m.add(X),Y.push(m);X=m.double()}return Y}wNAF(c,$,Q){if(!this.Fn.isValid(Q))throw Error("invalid scalar");let J=this.ZERO,Y=this.BASE,X=Qm(c,this.bits);for(let m=0;m<X.windows;m++){let{nextN:W,offset:G,isZero:z,isNeg:x,isNegF:i,offsetF:q}=l6(Q,m,X);if(Q=W,z)Y=Y.add(cJ(i,$[q]));else J=J.add(cJ(x,$[G]))}return h6(Q),{p:J,f:Y}}wNAFUnsafe(c,$,Q,J=this.ZERO){let Y=Qm(c,this.bits);for(let X=0;X<Y.windows;X++){if(Q===y$)break;let{nextN:m,offset:W,isZero:G,isNeg:z}=l6(Q,X,Y);if(Q=m,G)continue;else{let x=$[W];J=J.add(z?x.negate():x)}}return h6(Q),J}getPrecomputes(c,$,Q){let J=Jm.get($);if(!J){if(J=this.precomputeWindow($,c),c!==1){if(typeof Q==="function")J=Q(J);Jm.set($,J)}}return J}cached(c,$,Q){let J=Ym(c);return this.wNAF(J,this.getPrecomputes(J,c,Q),$)}unsafe(c,$,Q,J){let Y=Ym(c);if(Y===1)return this._unsafeLadder(c,$,J);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,c,Q),$,J)}createCache(c,$){o6($,this.bits),g6.set(c,$),Jm.delete(c)}hasCache(c){return Ym(c)!==1}}function d6(c,$,Q,J){let Y=$,X=c.ZERO,m=c.ZERO;while(Q>y$||J>y$){if(Q&Q$)X=X.add(Y);if(J&Q$)m=m.add(Y);Y=Y.double(),Q>>=Q$,J>>=Q$}return{p1:X,p2:m}}function y6(c,$,Q){if($){if($.ORDER!==c)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return cm($),$}else return h$(c,{isLE:Q})}function s6(c,$,Q={},J){if(J===void 0)J=c==="edwards";if(!$||typeof $!=="object")throw Error(`expected valid ${c} CURVE object`);for(let G of["p","n","h"]){let z=$[G];if(!(typeof z==="bigint"&&z>y$))throw Error(`CURVE.${G} must be positive bigint`)}let Y=y6($.p,Q.Fp,J),X=y6($.n,Q.Fn,J),W=["Gx","Gy","a",c==="weierstrass"?"b":"d"];for(let G of W)if(!Y.isValid($[G]))throw Error(`CURVE.${G} must be valid field element of CURVE.Fp`);return $=Object.freeze(Object.assign({},$)),{CURVE:$,Fp:Y,Fn:X}}function NY(c,$){return function(J){let Y=c(J);return{secretKey:Y,publicKey:$(Y)}}}class Wm{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(c,$){if(t8(c),wc($,void 0,"key"),this.iHash=c.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let Q=this.blockLen,J=new Uint8Array(Q);J.set($.length>Q?c.create().update($).digest():$);for(let Y=0;Y<J.length;Y++)J[Y]^=54;this.iHash.update(J),this.oHash=c.create();for(let Y=0;Y<J.length;Y++)J[Y]^=106;this.oHash.update(J),F0(J)}update(c){return l$(this),this.iHash.update(c),this}digestInto(c){l$(this),wc(c,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(c),this.oHash.update(c),this.oHash.digestInto(c),this.destroy()}digest(){let c=new Uint8Array(this.oHash.outputLen);return this.digestInto(c),c}_cloneInto(c){c||=Object.create(Object.getPrototypeOf(this),{});let{oHash:$,iHash:Q,finished:J,destroyed:Y,blockLen:X,outputLen:m}=this;return c=c,c.finished=J,c.destroyed=Y,c.blockLen=X,c.outputLen=m,c.oHash=$._cloneInto(c.oHash),c.iHash=Q._cloneInto(c.iHash),c}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var R8=(c,$,Q)=>new Wm(c,$).update(Q).digest();R8.create=(c,$)=>new Wm(c,$);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var r6=(c,$)=>(c+(c>=0?$:-$)/e6)/$;function v2(c,$,Q){let[[J,Y],[X,m]]=$,W=r6(m*c,Q),G=r6(-Y*c,Q),z=c-W*J-G*X,x=-W*Y-G*m,i=z<X8,q=x<X8;if(i)z=-z;if(q)x=-x;let M=tQ(Math.ceil(r9(Q)/2))+o$;if(z<X8||z>=M||x<X8||x>=M)throw Error("splitScalar (endomorphism): failed, k="+c);return{k1neg:i,k1:z,k2neg:q,k2:x}}function zm(c){if(!["compact","recovered","der"].includes(c))throw Error('Signature format must be "compact", "recovered", or "der"');return c}function Gm(c,$){let Q={};for(let J of Object.keys($))Q[J]=c[J]===void 0?$[J]:c[J];if(sQ(Q.lowS,"lowS"),sQ(Q.prehash,"prehash"),Q.format!==void 0)zm(Q.format);return Q}class t6 extends Error{constructor(c=""){super(c)}}var I8={Err:t6,_tlv:{encode:(c,$)=>{let{Err:Q}=I8;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length&1)throw new Q("tlv.encode: unpadded data");let J=$.length/2,Y=rQ(J);if(Y.length/2&128)throw new Q("tlv.encode: long form length too big");let X=J>127?rQ(Y.length/2|128):"";return rQ(c)+X+Y+$},decode(c,$){let{Err:Q}=I8,J=0;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length<2||$[J++]!==c)throw new Q("tlv.decode: wrong tlv");let Y=$[J++],X=!!(Y&128),m=0;if(!X)m=Y;else{let G=Y&127;if(!G)throw new Q("tlv.decode(long): indefinite length not supported");if(G>4)throw new Q("tlv.decode(long): byte length is too big");let z=$.subarray(J,J+G);if(z.length!==G)throw new Q("tlv.decode: length bytes not complete");if(z[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let x of z)m=m<<8|x;if(J+=G,m<128)throw new Q("tlv.decode(long): not minimal encoding")}let W=$.subarray(J,J+m);if(W.length!==m)throw new Q("tlv.decode: wrong value length");return{v:W,l:$.subarray(J+m)}}},_int:{encode(c){let{Err:$}=I8;if(c<X8)throw new $("integer: negative integers are not allowed");let Q=rQ(c);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new $("unexpected DER parsing assertion: unpadded hex");return Q},decode(c){let{Err:$}=I8;if(c[0]&128)throw new $("invalid signature integer: negative");if(c[0]===0&&!(c[1]&128))throw new $("invalid signature integer: unnecessary leading zero");return p8(c)}},toSig(c){let{Err:$,_int:Q,_tlv:J}=I8,Y=wc(c,void 0,"signature"),{v:X,l:m}=J.decode(48,Y);if(m.length)throw new $("invalid signature: left bytes after parsing");let{v:W,l:G}=J.decode(2,X),{v:z,l:x}=J.decode(2,G);if(x.length)throw new $("invalid signature: left bytes after parsing");return{r:Q.decode(W),s:Q.decode(z)}},hexFromSig(c){let{_tlv:$,_int:Q}=I8,J=$.encode(2,Q.encode(c.r)),Y=$.encode(2,Q.encode(c.s)),X=J+Y;return $.encode(48,X)}},X8=BigInt(0),o$=BigInt(1),e6=BigInt(2),wY=BigInt(3),U2=BigInt(4);function ci(c,$={}){let Q=s6("weierstrass",c,$),{Fp:J,Fn:Y}=Q,X=Q.CURVE,{h:m,n:W}=X;eQ($,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:G}=$;if(G){if(!J.is0(X.a)||typeof G.beta!=="bigint"||!Array.isArray(G.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let z=Qi(J,Y);function x(){if(!J.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function i(B,C,K){let{x:p,y:S}=C.toAffine(),L=J.toBytes(p);if(sQ(K,"isCompressed"),K){x();let H=!J.isOdd(S);return bc($i(H),L)}else return bc(Uint8Array.of(4),L,J.toBytes(S))}function q(B){wc(B,void 0,"Point");let{publicKey:C,publicKeyUncompressed:K}=z,p=B.length,S=B[0],L=B.subarray(1);if(p===C&&(S===2||S===3)){let H=J.fromBytes(L);if(!J.isValid(H))throw Error("bad point: is not on curve, wrong x");let A=v(H),E;try{E=J.sqrt(A)}catch(Jc){let e=Jc instanceof Error?": "+Jc.message:"";throw Error("bad point: is not on curve, sqrt error"+e)}x();let P=J.isOdd(E);if((S&1)===1!==P)E=J.neg(E);return{x:H,y:E}}else if(p===K&&S===4){let H=J.BYTES,A=J.fromBytes(L.subarray(0,H)),E=J.fromBytes(L.subarray(H,H*2));if(!U(A,E))throw Error("bad point: is not on curve");return{x:A,y:E}}else throw Error(`bad point: got length ${p}, expected compressed=${C} or uncompressed=${K}`)}let M=$.toBytes||i,N=$.fromBytes||q;function v(B){let C=J.sqr(B),K=J.mul(C,B);return J.add(J.add(K,J.mul(B,X.a)),X.b)}function U(B,C){let K=J.sqr(C),p=v(B);return J.eql(K,p)}if(!U(X.Gx,X.Gy))throw Error("bad curve params: generator point");let w=J.mul(J.pow(X.a,wY),U2),j=J.mul(J.sqr(X.b),BigInt(27));if(J.is0(J.add(w,j)))throw Error("bad curve params: a or b");function D(B,C,K=!1){if(!J.isValid(C)||K&&J.is0(C))throw Error(`bad point coordinate ${B}`);return C}function _(B){if(!(B instanceof k))throw Error("Weierstrass Point expected")}function Xc(B){if(!G||!G.basises)throw Error("no endo");return v2(B,G.basises,Y.ORDER)}let g=t9((B,C)=>{let{X:K,Y:p,Z:S}=B;if(J.eql(S,J.ONE))return{x:K,y:p};let L=B.is0();if(C==null)C=L?J.ONE:J.inv(S);let H=J.mul(K,C),A=J.mul(p,C),E=J.mul(S,C);if(L)return{x:J.ZERO,y:J.ZERO};if(!J.eql(E,J.ONE))throw Error("invZ was invalid");return{x:H,y:A}}),Qc=t9((B)=>{if(B.is0()){if($.allowInfinityPoint&&!J.is0(B.Y))return;throw Error("bad point: ZERO")}let{x:C,y:K}=B.toAffine();if(!J.isValid(C)||!J.isValid(K))throw Error("bad point: x or y not field elements");if(!U(C,K))throw Error("bad point: equation left != right");if(!B.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function u(B,C,K,p,S){return K=new k(J.mul(K.X,B),K.Y,K.Z),C=cJ(p,C),K=cJ(S,K),C.add(K)}class k{static BASE=new k(X.Gx,X.Gy,J.ONE);static ZERO=new k(J.ZERO,J.ONE,J.ZERO);static Fp=J;static Fn=Y;X;Y;Z;constructor(B,C,K){this.X=D("x",B),this.Y=D("y",C,!0),this.Z=D("z",K),Object.freeze(this)}static CURVE(){return X}static fromAffine(B){let{x:C,y:K}=B||{};if(!B||!J.isValid(C)||!J.isValid(K))throw Error("invalid affine point");if(B instanceof k)throw Error("projective point not allowed");if(J.is0(C)&&J.is0(K))return k.ZERO;return new k(C,K,J.ONE)}static fromBytes(B){let C=k.fromAffine(N(wc(B,void 0,"point")));return C.assertValidity(),C}static fromHex(B){return k.fromBytes(Oc(B))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(B=8,C=!0){if(t.createCache(this,B),!C)this.multiply(wY);return this}assertValidity(){Qc(this)}hasEvenY(){let{y:B}=this.toAffine();if(!J.isOdd)throw Error("Field doesn't support isOdd");return!J.isOdd(B)}equals(B){_(B);let{X:C,Y:K,Z:p}=this,{X:S,Y:L,Z:H}=B,A=J.eql(J.mul(C,H),J.mul(S,p)),E=J.eql(J.mul(K,H),J.mul(L,p));return A&&E}negate(){return new k(this.X,J.neg(this.Y),this.Z)}double(){let{a:B,b:C}=X,K=J.mul(C,wY),{X:p,Y:S,Z:L}=this,H=J.ZERO,A=J.ZERO,E=J.ZERO,P=J.mul(p,p),s=J.mul(S,S),Jc=J.mul(L,L),e=J.mul(p,S);return e=J.add(e,e),E=J.mul(p,L),E=J.add(E,E),H=J.mul(B,E),A=J.mul(K,Jc),A=J.add(H,A),H=J.sub(s,A),A=J.add(s,A),A=J.mul(H,A),H=J.mul(e,H),E=J.mul(K,E),Jc=J.mul(B,Jc),e=J.sub(P,Jc),e=J.mul(B,e),e=J.add(e,E),E=J.add(P,P),P=J.add(E,P),P=J.add(P,Jc),P=J.mul(P,e),A=J.add(A,P),Jc=J.mul(S,L),Jc=J.add(Jc,Jc),P=J.mul(Jc,e),H=J.sub(H,P),E=J.mul(Jc,s),E=J.add(E,E),E=J.add(E,E),new k(H,A,E)}add(B){_(B);let{X:C,Y:K,Z:p}=this,{X:S,Y:L,Z:H}=B,A=J.ZERO,E=J.ZERO,P=J.ZERO,s=X.a,Jc=J.mul(X.b,wY),e=J.mul(C,S),Hc=J.mul(K,L),o=J.mul(p,H),Kc=J.add(C,K),vc=J.add(S,L);Kc=J.mul(Kc,vc),vc=J.add(e,Hc),Kc=J.sub(Kc,vc),vc=J.add(C,p);let xc=J.add(S,H);return vc=J.mul(vc,xc),xc=J.add(e,o),vc=J.sub(vc,xc),xc=J.add(K,p),A=J.add(L,H),xc=J.mul(xc,A),A=J.add(Hc,o),xc=J.sub(xc,A),P=J.mul(s,vc),A=J.mul(Jc,o),P=J.add(A,P),A=J.sub(Hc,P),P=J.add(Hc,P),E=J.mul(A,P),Hc=J.add(e,e),Hc=J.add(Hc,e),o=J.mul(s,o),vc=J.mul(Jc,vc),Hc=J.add(Hc,o),o=J.sub(e,o),o=J.mul(s,o),vc=J.add(vc,o),e=J.mul(Hc,vc),E=J.add(E,e),e=J.mul(xc,vc),A=J.mul(Kc,A),A=J.sub(A,e),e=J.mul(Kc,Hc),P=J.mul(xc,P),P=J.add(P,e),new k(A,E,P)}subtract(B){return this.add(B.negate())}is0(){return this.equals(k.ZERO)}multiply(B){let{endo:C}=$;if(!Y.isValidNot0(B))throw Error("invalid scalar: out of range");let K,p,S=(L)=>t.cached(this,L,(H)=>Xm(k,H));if(C){let{k1neg:L,k1:H,k2neg:A,k2:E}=Xc(B),{p:P,f:s}=S(H),{p:Jc,f:e}=S(E);p=s.add(e),K=u(C.beta,P,Jc,L,A)}else{let{p:L,f:H}=S(B);K=L,p=H}return Xm(k,[K,p])[0]}multiplyUnsafe(B){let{endo:C}=$,K=this;if(!Y.isValid(B))throw Error("invalid scalar: out of range");if(B===X8||K.is0())return k.ZERO;if(B===o$)return K;if(t.hasCache(this))return this.multiply(B);if(C){let{k1neg:p,k1:S,k2neg:L,k2:H}=Xc(B),{p1:A,p2:E}=d6(k,K,S,H);return u(C.beta,A,E,p,L)}else return t.unsafe(K,B)}toAffine(B){return g(this,B)}isTorsionFree(){let{isTorsionFree:B}=$;if(m===o$)return!0;if(B)return B(k,this);return t.unsafe(this,W).is0()}clearCofactor(){let{clearCofactor:B}=$;if(m===o$)return this;if(B)return B(k,this);return this.multiplyUnsafe(m)}isSmallOrder(){return this.multiplyUnsafe(m).is0()}toBytes(B=!0){return sQ(B,"isCompressed"),this.assertValidity(),M(k,this,B)}toHex(B=!0){return Bc(this.toBytes(B))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let Yc=Y.BITS,t=new mm(k,$.endo?Math.ceil(Yc/2):Yc);return k.BASE.precompute(8),k}function $i(c){return Uint8Array.of(c?2:3)}function Qi(c,$){return{secretKey:$.BYTES,publicKey:1+c.BYTES,publicKeyUncompressed:1+2*c.BYTES,publicKeyHasPrefix:!0,signature:2*$.BYTES}}function j2(c,$={}){let{Fn:Q}=c,J=$.randomBytes||f0,Y=Object.assign(Qi(c.Fp,Q),{seed:$m(Q.ORDER)});function X(M){try{let N=Q.fromBytes(M);return Q.isValidNot0(N)}catch(N){return!1}}function m(M,N){let{publicKey:v,publicKeyUncompressed:U}=Y;try{let w=M.length;if(N===!0&&w!==v)return!1;if(N===!1&&w!==U)return!1;return!!c.fromBytes(M)}catch(w){return!1}}function W(M=J(Y.seed)){return VY(wc(M,Y.seed,"seed"),Q.ORDER)}function G(M,N=!0){return c.BASE.multiply(Q.fromBytes(M)).toBytes(N)}function z(M){let{secretKey:N,publicKey:v,publicKeyUncompressed:U}=Y;if(!yQ(M))return;if("_lengths"in Q&&Q._lengths||N===v)return;let w=wc(M,void 0,"key").length;return w===v||w===U}function x(M,N,v=!0){if(z(M)===!0)throw Error("first arg must be private key");if(z(N)===!1)throw Error("second arg must be public key");let U=Q.fromBytes(M);return c.fromBytes(N).multiply(U).toBytes(v)}let i={isValidSecretKey:X,isValidPublicKey:m,randomSecretKey:W},q=NY(W,G);return Object.freeze({getPublicKey:G,getSharedSecret:x,keygen:q,Point:c,utils:i,lengths:Y})}function Ji(c,$,Q={}){t8($),eQ(Q,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),Q=Object.assign({},Q);let J=Q.randomBytes||f0,Y=Q.hmac||((K,p)=>R8($,K,p)),{Fp:X,Fn:m}=c,{ORDER:W,BITS:G}=m,{keygen:z,getPublicKey:x,getSharedSecret:i,utils:q,lengths:M}=j2(c,Q),N={prehash:!0,lowS:typeof Q.lowS==="boolean"?Q.lowS:!0,format:"compact",extraEntropy:!1},v=W*e6<X.ORDER;function U(K){let p=W>>o$;return K>p}function w(K,p){if(!m.isValidNot0(p))throw Error(`invalid signature ${K}: out of range 1..Point.Fn.ORDER`);return p}function j(){if(v)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(K,p){zm(p);let S=M.signature,L=p==="compact"?S:p==="recovered"?S+1:void 0;return wc(K,L)}class _{r;s;recovery;constructor(K,p,S){if(this.r=w("r",K),this.s=w("s",p),S!=null){if(j(),![0,1,2,3].includes(S))throw Error("invalid recovery id");this.recovery=S}Object.freeze(this)}static fromBytes(K,p=N.format){D(K,p);let S;if(p==="der"){let{r:E,s:P}=I8.toSig(wc(K));return new _(E,P)}if(p==="recovered")S=K[0],p="compact",K=K.subarray(1);let L=M.signature/2,H=K.subarray(0,L),A=K.subarray(L,L*2);return new _(m.fromBytes(H),m.fromBytes(A),S)}static fromHex(K,p){return this.fromBytes(Oc(K),p)}assertRecovery(){let{recovery:K}=this;if(K==null)throw Error("invalid recovery id: must be present");return K}addRecoveryBit(K){return new _(this.r,this.s,K)}recoverPublicKey(K){let{r:p,s:S}=this,L=this.assertRecovery(),H=L===2||L===3?p+W:p;if(!X.isValid(H))throw Error("invalid recovery id: sig.r+curve.n != R.x");let A=X.toBytes(H),E=c.fromBytes(bc($i((L&1)===0),A)),P=m.inv(H),s=g(wc(K,void 0,"msgHash")),Jc=m.create(-s*P),e=m.create(S*P),Hc=c.BASE.multiplyUnsafe(Jc).add(E.multiplyUnsafe(e));if(Hc.is0())throw Error("invalid recovery: point at infinify");return Hc.assertValidity(),Hc}hasHighS(){return U(this.s)}toBytes(K=N.format){if(zm(K),K==="der")return Oc(I8.hexFromSig(this));let{r:p,s:S}=this,L=m.toBytes(p),H=m.toBytes(S);if(K==="recovered")return j(),bc(Uint8Array.of(this.assertRecovery()),L,H);return bc(L,H)}toHex(K){return Bc(this.toBytes(K))}}let Xc=Q.bits2int||function(p){if(p.length>8192)throw Error("input is too large");let S=p8(p),L=p.length*8-G;return L>0?S>>BigInt(L):S},g=Q.bits2int_modN||function(p){return m.create(Xc(p))},Qc=tQ(G);function u(K){return S6("num < 2^"+G,K,X8,Qc),m.toBytes(K)}function k(K,p){return wc(K,void 0,"message"),p?wc($(K),void 0,"prehashed message"):K}function Yc(K,p,S){let{lowS:L,prehash:H,extraEntropy:A}=Gm(S,N);K=k(K,H);let E=g(K),P=m.fromBytes(p);if(!m.isValidNot0(P))throw Error("invalid private key");let s=[u(P),u(E)];if(A!=null&&A!==!1){let o=A===!0?J(M.secretKey):A;s.push(wc(o,void 0,"extraEntropy"))}let Jc=bc(...s),e=E;function Hc(o){let Kc=Xc(o);if(!m.isValidNot0(Kc))return;let vc=m.inv(Kc),xc=c.BASE.multiply(Kc).toAffine(),W0=m.create(xc.x);if(W0===X8)return;let G0=m.create(vc*m.create(e+W0*P));if(G0===X8)return;let $0=(xc.x===W0?0:2)|Number(xc.y&o$),x8=G0;if(L&&U(G0))x8=m.neg(G0),$0^=1;return new _(W0,x8,v?void 0:$0)}return{seed:Jc,k2sig:Hc}}function t(K,p,S={}){let{seed:L,k2sig:H}=Yc(K,p,S);return A6($.outputLen,m.BYTES,Y)(L,H).toBytes(S.format)}function B(K,p,S,L={}){let{lowS:H,prehash:A,format:E}=Gm(L,N);if(S=wc(S,void 0,"publicKey"),p=k(p,A),!yQ(K)){let P=K instanceof _?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+P)}D(K,E);try{let P=_.fromBytes(K,E),s=c.fromBytes(S);if(H&&P.hasHighS())return!1;let{r:Jc,s:e}=P,Hc=g(p),o=m.inv(e),Kc=m.create(Hc*o),vc=m.create(Jc*o),xc=c.BASE.multiplyUnsafe(Kc).add(s.multiplyUnsafe(vc));if(xc.is0())return!1;return m.create(xc.x)===Jc}catch(P){return!1}}function C(K,p,S={}){let{prehash:L}=Gm(S,N);return p=k(p,L),_.fromBytes(K,"recovered").recoverPublicKey(p).toBytes()}return Object.freeze({keygen:z,getPublicKey:x,getSharedSecret:i,utils:q,lengths:M,Point:c,sign:t,verify:B,recoverPublicKey:C,Signature:_,hash:$})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var jY={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},K2={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},D2=BigInt(0),xm=BigInt(2);function B2(c){let $=jY.p,Q=BigInt(3),J=BigInt(6),Y=BigInt(11),X=BigInt(22),m=BigInt(23),W=BigInt(44),G=BigInt(88),z=c*c*c%$,x=z*z*c%$,i=M0(x,Q,$)*x%$,q=M0(i,Q,$)*x%$,M=M0(q,xm,$)*z%$,N=M0(M,Y,$)*M%$,v=M0(N,X,$)*N%$,U=M0(v,W,$)*v%$,w=M0(U,G,$)*U%$,j=M0(w,W,$)*v%$,D=M0(j,Q,$)*x%$,_=M0(D,m,$)*N%$,Xc=M0(_,J,$)*z%$,g=M0(Xc,xm,$);if(!vY.eql(vY.sqr(g),c))throw Error("Cannot find square root");return g}var vY=h$(jY.p,{sqrt:B2}),J$=ci(jY,{Fp:vY,endo:K2}),QJ=Ji(J$,ec),Yi={};function UY(c,...$){let Q=Yi[c];if(Q===void 0){let J=ec(_6(c));Q=bc(J,J),Yi[c]=Q}return ec(bc(Q,...$))}var qm=(c)=>c.toBytes(!0).slice(1),Mm=(c)=>c%xm===D2;function im(c){let{Fn:$,BASE:Q}=J$,J=$.fromBytes(c),Y=Q.multiply(J);return{scalar:Mm(Y.y)?J:$.neg(J),bytes:qm(Y)}}function mi(c){let $=vY;if(!$.isValidNot0(c))throw Error("invalid x: Fail if x ≥ p");let Q=$.create(c*c),J=$.create(Q*c+BigInt(7)),Y=$.sqrt(J);if(!Mm(Y))Y=$.neg(Y);let X=J$.fromAffine({x:c,y:Y});return X.assertValidity(),X}var $J=p8;function Wi(...c){return J$.Fn.create($J(UY("BIP0340/challenge",...c)))}function Xi(c){return im(c).bytes}function H2(c,$,Q=f0(32)){let{Fn:J}=J$,Y=wc(c,void 0,"message"),{bytes:X,scalar:m}=im($),W=wc(Q,32,"auxRand"),G=J.toBytes(m^$J(UY("BIP0340/aux",W))),z=UY("BIP0340/nonce",G,X,Y),{bytes:x,scalar:i}=im(z),q=Wi(x,X,Y),M=new Uint8Array(64);if(M.set(x,0),M.set(J.toBytes(J.create(i+q*m)),32),!Gi(M,Y,X))throw Error("sign: Invalid signature produced");return M}function Gi(c,$,Q){let{Fp:J,Fn:Y,BASE:X}=J$,m=wc(c,64,"signature"),W=wc($,void 0,"message"),G=wc(Q,32,"publicKey");try{let z=mi($J(G)),x=$J(m.subarray(0,32));if(!J.isValidNot0(x))return!1;let i=$J(m.subarray(32,64));if(!Y.isValidNot0(i))return!1;let q=Wi(Y.toBytes(x),qm(z),W),M=X.multiplyUnsafe(i).add(z.multiplyUnsafe(Y.neg(q))),{x:N,y:v}=M.toAffine();if(M.is0()||!Mm(v)||N!==x)return!1;return!0}catch(z){return!1}}var g$=(()=>{let Q=(J=f0(48))=>{return VY(J,jY.n)};return{keygen:NY(Q,Xi),getPublicKey:Xi,sign:H2,verify:Gi,Point:J$,utils:{randomSecretKey:Q,taggedHash:UY,lift_x:mi,pointToBytes:qm},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function OY(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function wm(c){if(!OY(c))throw Error("Uint8Array expected")}function Mi(c,$){if(!Array.isArray($))return!1;if($.length===0)return!0;if(c)return $.every((Q)=>typeof Q==="string");else return $.every((Q)=>Number.isSafeInteger(Q))}function Vi(c){if(typeof c!=="function")throw Error("function expected");return!0}function L8(c,$){if(typeof $!=="string")throw Error(`${c}: string expected`);return!0}function YJ(c){if(!Number.isSafeInteger(c))throw Error(`invalid integer: ${c}`)}function DY(c){if(!Array.isArray(c))throw Error("array expected")}function BY(c,$){if(!Mi(!0,$))throw Error(`${c}: array of strings expected`)}function vm(c,$){if(!Mi(!1,$))throw Error(`${c}: array of numbers expected`)}function V0(...c){let $=(X)=>X,Q=(X,m)=>(W)=>X(m(W)),J=c.map((X)=>X.encode).reduceRight(Q,$),Y=c.map((X)=>X.decode).reduce(Q,$);return{encode:J,decode:Y}}function N0(c){let $=typeof c==="string"?c.split(""):c,Q=$.length;BY("alphabet",$);let J=new Map($.map((Y,X)=>[Y,X]));return{encode:(Y)=>{return DY(Y),Y.map((X)=>{if(!Number.isSafeInteger(X)||X<0||X>=Q)throw Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${c}`);return $[X]})},decode:(Y)=>{return DY(Y),Y.map((X)=>{L8("alphabet.decode",X);let m=J.get(X);if(m===void 0)throw Error(`Unknown letter: "${X}". Allowed: ${c}`);return m})}}}function w0(c=""){return L8("join",c),{encode:($)=>{return BY("join.decode",$),$.join(c)},decode:($)=>{return L8("join.decode",$),$.split(c)}}}function pY(c,$="="){return YJ(c),L8("padding",$),{encode(Q){BY("padding.encode",Q);while(Q.length*c%8)Q.push($);return Q},decode(Q){BY("padding.decode",Q);let J=Q.length;if(J*c%8)throw Error("padding: invalid, string should have whole number of bytes");for(;J>0&&Q[J-1]===$;J--)if((J-1)*c%8===0)throw Error("padding: invalid, string has too much padding");return Q.slice(0,J)}}}function Ni(c){return Vi(c),{encode:($)=>$,decode:($)=>c($)}}function zi(c,$,Q){if($<2)throw Error(`convertRadix: invalid from=${$}, base cannot be less than 2`);if(Q<2)throw Error(`convertRadix: invalid to=${Q}, base cannot be less than 2`);if(DY(c),!c.length)return[];let J=0,Y=[],X=Array.from(c,(W)=>{if(YJ(W),W<0||W>=$)throw Error(`invalid integer: ${W}`);return W}),m=X.length;while(!0){let W=0,G=!0;for(let z=J;z<m;z++){let x=X[z],i=$*W,q=i+x;if(!Number.isSafeInteger(q)||i/$!==W||q-x!==i)throw Error("convertRadix: carry overflow");let M=q/Q;W=q%Q;let N=Math.floor(M);if(X[z]=N,!Number.isSafeInteger(N)||N*Q+W!==q)throw Error("convertRadix: carry overflow");if(!G)continue;else if(!N)J=z;else G=!1}if(Y.push(W),G)break}for(let W=0;W<c.length-1&&c[W]===0;W++)Y.push(0);return Y.reverse()}var wi=(c,$)=>$===0?c:wi($,c%$),HY=(c,$)=>c+($-wi(c,$)),KY=(()=>{let c=[];for(let $=0;$<40;$++)c.push(2**$);return c})();function Vm(c,$,Q,J){if(DY(c),$<=0||$>32)throw Error(`convertRadix2: wrong from=${$}`);if(Q<=0||Q>32)throw Error(`convertRadix2: wrong to=${Q}`);if(HY($,Q)>32)throw Error(`convertRadix2: carry overflow from=${$} to=${Q} carryBits=${HY($,Q)}`);let Y=0,X=0,m=KY[$],W=KY[Q]-1,G=[];for(let z of c){if(YJ(z),z>=m)throw Error(`convertRadix2: invalid data word=${z} from=${$}`);if(Y=Y<<$|z,X+$>32)throw Error(`convertRadix2: carry overflow pos=${X} from=${$}`);X+=$;for(;X>=Q;X-=Q)G.push((Y>>X-Q&W)>>>0);let x=KY[X];if(x===void 0)throw Error("invalid carry");Y&=x-1}if(Y=Y<<Q-X&W,!J&&X>=$)throw Error("Excess padding");if(!J&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(J&&X>0)G.push(Y>>>0);return G}function O2(c){YJ(c);let $=256;return{encode:(Q)=>{if(!OY(Q))throw Error("radix.encode input should be Uint8Array");return zi(Array.from(Q),$,c)},decode:(Q)=>{return vm("radix.decode",Q),Uint8Array.from(zi(Q,c,$))}}}function B0(c,$=!1){if(YJ(c),c<=0||c>32)throw Error("radix2: bits should be in (0..32]");if(HY(8,c)>32||HY(c,8)>32)throw Error("radix2: carry overflow");return{encode:(Q)=>{if(!OY(Q))throw Error("radix2.encode input should be Uint8Array");return Vm(Array.from(Q),8,c,!$)},decode:(Q)=>{return vm("radix2.decode",Q),Uint8Array.from(Vm(Q,c,8,$))}}}function xi(c){return Vi(c),function(...$){try{return c.apply(null,$)}catch(Q){}}}var nP=V0(B0(4),N0("0123456789ABCDEF"),w0("")),uP=V0(B0(5),N0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),pY(5),w0("")),aP=V0(B0(5),N0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),w0("")),kP=V0(B0(5),N0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),pY(5),w0("")),lP=V0(B0(5),N0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),w0("")),hP=V0(B0(5),N0("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),w0(""),Ni((c)=>c.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),vi=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),Ui=(c,$)=>{L8("base64",c);let Q=$?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=$?"base64url":"base64";if(c.length>0&&!Q.test(c))throw Error("invalid base64");return Uint8Array.fromBase64(c,{alphabet:J,lastChunkHandling:"strict"})},H0=vi?{encode(c){return wm(c),c.toBase64()},decode(c){return Ui(c,!1)}}:V0(B0(6),N0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),pY(6),w0("")),yP=V0(B0(6),N0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),w0("")),oP=vi?{encode(c){return wm(c),c.toBase64({alphabet:"base64url"})},decode(c){return Ui(c,!0)}}:V0(B0(6),N0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),pY(6),w0("")),gP=V0(B0(6),N0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),w0("")),Um=(c)=>V0(O2(58),N0(c),w0("")),dP=Um("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),sP=Um("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),rP=Um("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var Nm=V0(N0("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),w0("")),ii=[996825010,642813549,513874426,1027748829,705979059];function JJ(c){let $=c>>25,Q=(c&33554431)<<5;for(let J=0;J<ii.length;J++)if(($>>J&1)===1)Q^=ii[J];return Q}function qi(c,$,Q=1){let J=c.length,Y=1;for(let X=0;X<J;X++){let m=c.charCodeAt(X);if(m<33||m>126)throw Error(`Invalid prefix (${c})`);Y=JJ(Y)^m>>5}Y=JJ(Y);for(let X=0;X<J;X++)Y=JJ(Y)^c.charCodeAt(X)&31;for(let X of $)Y=JJ(Y)^X;for(let X=0;X<6;X++)Y=JJ(Y);return Y^=Q,Nm.encode(Vm([Y%KY[30]],30,5,!1))}function ji(c){let $=c==="bech32"?1:734539939,Q=B0(5),J=Q.decode,Y=Q.encode,X=xi(J);function m(i,q,M=90){if(L8("bech32.encode prefix",i),OY(q))q=Array.from(q);vm("bech32.encode",q);let N=i.length;if(N===0)throw TypeError(`Invalid prefix length ${N}`);let v=N+7+q.length;if(M!==!1&&v>M)throw TypeError(`Length ${v} exceeds limit ${M}`);let U=i.toLowerCase(),w=qi(U,q,$);return`${U}1${Nm.encode(q)}${w}`}function W(i,q=90){L8("bech32.decode input",i);let M=i.length;if(M<8||q!==!1&&M>q)throw TypeError(`invalid string length: ${M} (${i}). Expected (8..${q})`);let N=i.toLowerCase();if(i!==N&&i!==i.toUpperCase())throw Error("String must be lowercase or uppercase");let v=N.lastIndexOf("1");if(v===0||v===-1)throw Error('Letter "1" must be present between prefix and data only');let U=N.slice(0,v),w=N.slice(v+1);if(w.length<6)throw Error("Data must be at least 6 characters long");let j=Nm.decode(w).slice(0,-6),D=qi(U,j,$);if(!w.endsWith(D))throw Error(`Invalid checksum in ${i}: expected "${D}"`);return{prefix:U,words:j}}let G=xi(W);function z(i){let{prefix:q,words:M}=W(i,!1);return{prefix:q,words:M,bytes:J(M)}}function x(i,q){return m(i,Y(q))}return{encode:m,decode:W,encodeFromBytes:x,decodeToBytes:z,decodeUnsafe:G,fromWords:J,fromWordsUnsafe:X,toWords:Y}}var Z8=ji("bech32"),tP=ji("bech32m");var p2=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),R2={encode(c){return wm(c),c.toHex()},decode(c){return L8("hex",c),Uint8Array.fromHex(c)}},eP=p2?R2:V0(B0(4),N0("0123456789abcdef"),w0(""),Ni((c)=>{if(typeof c!=="string"||c.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof c} with length ${c.length}`);return c.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function I2(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function RY(c){if(typeof c!=="boolean")throw Error(`boolean expected, not ${c}`)}function XJ(c){if(!Number.isSafeInteger(c)||c<0)throw Error("positive integer expected, got "+c)}function _c(c,$,Q=""){let J=I2(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let m=Q&&`"${Q}" `,W=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(m+"expected Uint8Array"+W+", got "+G)}return c}function jm(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function Ki(c,$){_c(c,void 0,"output");let Q=$.outputLen;if(c.length<Q)throw Error("digestInto() expects output buffer of length at least "+Q)}function Tc(c){return new Uint32Array(c.buffer,c.byteOffset,Math.floor(c.byteLength/4))}function oc(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function Di(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}var L2=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function Bi(c,$){return c.buffer===$.buffer&&c.byteOffset<$.byteOffset+$.byteLength&&$.byteOffset<c.byteOffset+c.byteLength}function Km(c,$){if(Bi(c,$)&&c.byteOffset<$.byteOffset)throw Error("complex overlap of input and output is not supported")}function Hi(c,$){if($==null||typeof $!=="object")throw Error("options must be defined");return Object.assign(c,$)}function mJ(c,$){if(c.length!==$.length)return!1;let Q=0;for(let J=0;J<c.length;J++)Q|=c[J]^$[J];return Q===0}var WJ=(c,$)=>{function Q(J,...Y){if(_c(J,void 0,"key"),!L2)throw Error("Non little-endian hardware is not yet supported");if(c.nonceLength!==void 0){let x=Y[0];_c(x,c.varSizeNonce?void 0:c.nonceLength,"nonce")}let X=c.tagLength;if(X&&Y[1]!==void 0)_c(Y[1],void 0,"AAD");let m=$(J,...Y),W=(x,i)=>{if(i!==void 0){if(x!==2)throw Error("cipher output not supported");_c(i,void 0,"output")}},G=!1;return{encrypt(x,i){if(G)throw Error("cannot encrypt() twice with same key + nonce");return G=!0,_c(x),W(m.encrypt.length,i),m.encrypt(x,i)},decrypt(x,i){if(_c(x),X&&x.length<X)throw Error('"ciphertext" expected length bigger than tagLength='+X);return W(m.decrypt.length,i),m.decrypt(x,i)}}}return Object.assign(Q,c),Q};function d$(c,$,Q=!0){if($===void 0)return new Uint8Array(c);if($.length!==c)throw Error('"output" expected Uint8Array of length '+c+", got: "+$.length);if(Q&&!Y$($))throw Error("invalid output, must be aligned");return $}function Dm(c,$,Q){RY(Q);let J=new Uint8Array(16),Y=Di(J);return Y.setBigUint64(0,BigInt($),Q),Y.setBigUint64(8,BigInt(c),Q),J}function Y$(c){return c.byteOffset%4===0}function O0(c){return Uint8Array.from(c)}var ac=16;var _2=283;function pi(c){if(![16,24,32].includes(c.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+c.length)}function Rm(c){return c<<1^_2&-(c>>7)}function s$(c,$){let Q=0;for(;$>0;$>>=1)Q^=c&-($&1),c=Rm(c);return Q}var Om=(()=>{let c=new Uint8Array(256);for(let Q=0,J=1;Q<256;Q++,J^=Rm(J))c[Q]=J;let $=new Uint8Array(256);$[0]=99;for(let Q=0;Q<255;Q++){let J=c[255-Q];J|=J<<8,$[c[Q]]=(J^J>>4^J>>5^J>>6^J>>7^99)&255}return oc(c),$})(),S2=Om.map((c,$)=>Om.indexOf($)),A2=(c)=>c<<24|c>>>8,Bm=(c)=>c<<8|c>>>24;function Ri(c,$){if(c.length!==256)throw Error("Wrong sbox length");let Q=new Uint32Array(256).map((z,x)=>$(c[x])),J=Q.map(Bm),Y=J.map(Bm),X=Y.map(Bm),m=new Uint32Array(65536),W=new Uint32Array(65536),G=new Uint16Array(65536);for(let z=0;z<256;z++)for(let x=0;x<256;x++){let i=z*256+x;m[i]=Q[z]^J[x],W[i]=Y[z]^X[x],G[i]=c[z]<<8|c[x]}return{sbox:c,sbox2:G,T0:Q,T1:J,T2:Y,T3:X,T01:m,T23:W}}var Im=Ri(Om,(c)=>s$(c,3)<<24|c<<16|c<<8|s$(c,2)),Ii=Ri(S2,(c)=>s$(c,11)<<24|s$(c,13)<<16|s$(c,9)<<8|s$(c,14)),C2=(()=>{let c=new Uint8Array(16);for(let $=0,Q=1;$<16;$++,Q=Rm(Q))c[$]=Q;return c})();function Lm(c){_c(c);let $=c.length;pi(c);let{sbox2:Q}=Im,J=[];if(!Y$(c))J.push(c=O0(c));let Y=Tc(c),X=Y.length,m=(G)=>y0(Q,G,G,G,G),W=new Uint32Array($+28);W.set(Y);for(let G=X;G<W.length;G++){let z=W[G-1];if(G%X===0)z=m(A2(z))^C2[G/X-1];else if(X>6&&G%X===4)z=m(z);W[G]=W[G-X]^z}return oc(...J),W}function P2(c){let $=Lm(c),Q=$.slice(),J=$.length,{sbox2:Y}=Im,{T0:X,T1:m,T2:W,T3:G}=Ii;for(let z=0;z<J;z+=4)for(let x=0;x<4;x++)Q[z+x]=$[J-z-4+x];oc($);for(let z=4;z<J-4;z++){let x=Q[z],i=y0(Y,x,x,x,x);Q[z]=X[i&255]^m[i>>>8&255]^W[i>>>16&255]^G[i>>>24]}return Q}function _8(c,$,Q,J,Y,X){return c[Q<<8&65280|J>>>8&255]^$[Y>>>8&65280|X>>>24&255]}function y0(c,$,Q,J,Y){return c[$&255|Q&65280]|c[J>>>16&255|Y>>>16&65280]<<16}function pm(c,$,Q,J,Y){let{sbox2:X,T01:m,T23:W}=Im,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let N=0;N<z;N++){let v=c[G++]^_8(m,W,$,Q,J,Y),U=c[G++]^_8(m,W,Q,J,Y,$),w=c[G++]^_8(m,W,J,Y,$,Q),j=c[G++]^_8(m,W,Y,$,Q,J);$=v,Q=U,J=w,Y=j}let x=c[G++]^y0(X,$,Q,J,Y),i=c[G++]^y0(X,Q,J,Y,$),q=c[G++]^y0(X,J,Y,$,Q),M=c[G++]^y0(X,Y,$,Q,J);return{s0:x,s1:i,s2:q,s3:M}}function b2(c,$,Q,J,Y){let{sbox2:X,T01:m,T23:W}=Ii,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let N=0;N<z;N++){let v=c[G++]^_8(m,W,$,Y,J,Q),U=c[G++]^_8(m,W,Q,$,Y,J),w=c[G++]^_8(m,W,J,Q,$,Y),j=c[G++]^_8(m,W,Y,J,Q,$);$=v,Q=U,J=w,Y=j}let x=c[G++]^y0(X,$,Y,J,Q),i=c[G++]^y0(X,Q,$,Y,J),q=c[G++]^y0(X,J,Q,$,Y),M=c[G++]^y0(X,Y,J,Q,$);return{s0:x,s1:i,s2:q,s3:M}}function E2(c){if(_c(c),c.length%ac!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+ac)}function F2(c,$,Q){_c(c);let J=c.length,Y=J%ac;if(!$&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!Y$(c))c=O0(c);let X=Tc(c);if($){let W=ac-Y;if(!W)W=ac;J=J+W}Q=d$(J,Q),Km(c,Q);let m=Tc(Q);return{b:X,o:m,out:Q}}function T2(c,$){if(!$)return c;let Q=c.length;if(!Q)throw Error("aes/pcks5: empty ciphertext not allowed");let J=c[Q-1];if(J<=0||J>16)throw Error("aes/pcks5: wrong padding");let Y=c.subarray(0,-J);for(let X=0;X<J;X++)if(c[Q-X-1]!==J)throw Error("aes/pcks5: wrong padding");return Y}function f2(c){let $=new Uint8Array(16),Q=Tc($);$.set(c);let J=ac-c.length;for(let Y=ac-J;Y<ac;Y++)$[Y]=J;return Q}var Zm=WJ({blockSize:16,nonceLength:16},function($,Q,J={}){let Y=!J.disablePadding;return{encrypt(X,m){let W=Lm($),{b:G,o:z,out:x}=F2(X,Y,m),i=Q,q=[W];if(!Y$(i))q.push(i=O0(i));let M=Tc(i),N=M[0],v=M[1],U=M[2],w=M[3],j=0;for(;j+4<=G.length;)N^=G[j+0],v^=G[j+1],U^=G[j+2],w^=G[j+3],{s0:N,s1:v,s2:U,s3:w}=pm(W,N,v,U,w),z[j++]=N,z[j++]=v,z[j++]=U,z[j++]=w;if(Y){let D=f2(X.subarray(j*4));N^=D[0],v^=D[1],U^=D[2],w^=D[3],{s0:N,s1:v,s2:U,s3:w}=pm(W,N,v,U,w),z[j++]=N,z[j++]=v,z[j++]=U,z[j++]=w}return oc(...q),x},decrypt(X,m){E2(X);let W=P2($),G=Q,z=[W];if(!Y$(G))z.push(G=O0(G));let x=Tc(G);if(m=d$(X.length,m),!Y$(X))z.push(X=O0(X));Km(X,m);let i=Tc(X),q=Tc(m),M=x[0],N=x[1],v=x[2],U=x[3];for(let w=0;w+4<=i.length;){let j=M,D=N,_=v,Xc=U;M=i[w+0],N=i[w+1],v=i[w+2],U=i[w+3];let{s0:g,s1:Qc,s2:u,s3:k}=b2(W,M,N,v,U);q[w++]=g^j,q[w++]=Qc^D,q[w++]=u^_,q[w++]=k^Xc}return oc(...z),T2(m,Y)}}});function n2(c){return c instanceof Uint32Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint32Array"}function Hm(c,$){if(_c($,16,"block"),!n2(c))throw Error("_encryptBlock accepts result of expandKeyLE");let Q=Tc($),{s0:J,s1:Y,s2:X,s3:m}=pm(c,Q[0],Q[1],Q[2],Q[3]);return Q[0]=J,Q[1]=Y,Q[2]=X,Q[3]=m,$}function Oi(c){let $=0;for(let Q=ac-1;Q>=0;Q--){let J=(c[Q]&128)>>>7;c[Q]=c[Q]<<1|$,$=J}if($)c[ac-1]^=135;return c}function IY(c,$){if(c.length!==$.length)throw Error("xorBlock: blocks must have same length");for(let Q=0;Q<c.length;Q++)c[Q]=c[Q]^$[Q];return c}class _m{buffer;destroyed;k1;k2;xk;constructor(c){_c(c),pi(c),this.xk=Lm(c),this.buffer=new Uint8Array(0),this.destroyed=!1;let $=new Uint8Array(ac);Hm(this.xk,$),this.k1=Oi($),this.k2=Oi(new Uint8Array(this.k1))}update(c){let{destroyed:$,buffer:Q}=this;if($)throw Error("CMAC instance was destroyed");_c(c);let J=new Uint8Array(Q.length+c.length);return J.set(Q),J.set(c,Q.length),this.buffer=J,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:c}=this,$=c.length,Q=Math.ceil($/ac),J;if(Q===0)Q=1,J=!1;else J=$%ac===0;let Y=(Q-1)*ac,X=c.subarray(Y),m;if(J)m=IY(new Uint8Array(X),this.k1);else{let G=new Uint8Array(ac);G.set(X),G[X.length]=128,m=IY(G,this.k2)}let W=new Uint8Array(ac);for(let G=0;G<Q-1;G++){let z=c.subarray(G*ac,(G+1)*ac);IY(W,z),Hm(this.xk,W)}return IY(W,m),Hm(this.xk,W),oc(m),W}destroy(){let{buffer:c,destroyed:$,xk:Q,k1:J,k2:Y}=this;if($)return;this.destroyed=!0,oc(c,Q,J,Y)}}var u2=(c,$)=>new _m(c).update($).digest();u2.create=(c)=>new _m(c);var Zi=(c)=>Uint8Array.from(c.split(""),($)=>$.charCodeAt(0)),a2=Zi("expand 16-byte k"),k2=Zi("expand 32-byte k"),l2=Tc(a2),h2=Tc(k2);function h(c,$){return c<<$|c>>>32-$}function Sm(c){return c.byteOffset%4===0}var LY=64,y2=16,_i=4294967295,Li=Uint32Array.of();function o2(c,$,Q,J,Y,X,m,W){let G=Y.length,z=new Uint8Array(LY),x=Tc(z),i=Sm(Y)&&Sm(X),q=i?Tc(Y):Li,M=i?Tc(X):Li;for(let N=0;N<G;m++){if(c($,Q,J,x,m,W),m>=_i)throw Error("arx: counter overflow");let v=Math.min(LY,G-N);if(i&&v===LY){let U=N/4;if(N%4!==0)throw Error("arx: invalid block position");for(let w=0,j;w<y2;w++)j=U+w,M[j]=q[j]^x[w];N+=LY;continue}for(let U=0,w;U<v;U++)w=N+U,X[w]=Y[w]^z[U];N+=v}}function Am(c,$){let{allowShortKeys:Q,extendNonceFn:J,counterLength:Y,counterRight:X,rounds:m}=Hi({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},$);if(typeof c!=="function")throw Error("core must be a function");return XJ(Y),XJ(m),RY(X),RY(Q),(W,G,z,x,i=0)=>{_c(W,void 0,"key"),_c(G,void 0,"nonce"),_c(z,void 0,"data");let q=z.length;if(x===void 0)x=new Uint8Array(q);if(_c(x,void 0,"output"),XJ(i),i<0||i>=_i)throw Error("arx: counter overflow");if(x.length<q)throw Error(`arx: output (${x.length}) is shorter than data (${q})`);let M=[],N=W.length,v,U;if(N===32)M.push(v=O0(W)),U=h2;else if(N===16&&Q)v=new Uint8Array(32),v.set(W),v.set(W,16),U=l2,M.push(v);else throw _c(W,32,"arx key"),Error("invalid key size");if(!Sm(G))M.push(G=O0(G));let w=Tc(v);if(J){if(G.length!==24)throw Error("arx: extended nonce must be 24 bytes");J(U,w,Tc(G.subarray(0,16)),w),G=G.subarray(16)}let j=16-Y;if(j!==G.length)throw Error(`arx: nonce must be ${j} or 16 bytes`);if(j!==12){let _=new Uint8Array(12);_.set(G,X?0:12-G.length),G=_,M.push(G)}let D=Tc(G);return o2(c,U,w,D,z,x,i,m),oc(...M),x}}function gc(c,$){return c[$++]&255|(c[$++]&255)<<8}class Si{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(c){c=O0(_c(c,32,"key"));let $=gc(c,0),Q=gc(c,2),J=gc(c,4),Y=gc(c,6),X=gc(c,8),m=gc(c,10),W=gc(c,12),G=gc(c,14);this.r[0]=$&8191,this.r[1]=($>>>13|Q<<3)&8191,this.r[2]=(Q>>>10|J<<6)&7939,this.r[3]=(J>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|X<<12)&255,this.r[5]=X>>>1&8190,this.r[6]=(X>>>14|m<<2)&8191,this.r[7]=(m>>>11|W<<5)&8065,this.r[8]=(W>>>8|G<<8)&8191,this.r[9]=G>>>5&127;for(let z=0;z<8;z++)this.pad[z]=gc(c,16+2*z)}process(c,$,Q=!1){let J=Q?0:2048,{h:Y,r:X}=this,m=X[0],W=X[1],G=X[2],z=X[3],x=X[4],i=X[5],q=X[6],M=X[7],N=X[8],v=X[9],U=gc(c,$+0),w=gc(c,$+2),j=gc(c,$+4),D=gc(c,$+6),_=gc(c,$+8),Xc=gc(c,$+10),g=gc(c,$+12),Qc=gc(c,$+14),u=Y[0]+(U&8191),k=Y[1]+((U>>>13|w<<3)&8191),Yc=Y[2]+((w>>>10|j<<6)&8191),t=Y[3]+((j>>>7|D<<9)&8191),B=Y[4]+((D>>>4|_<<12)&8191),C=Y[5]+(_>>>1&8191),K=Y[6]+((_>>>14|Xc<<2)&8191),p=Y[7]+((Xc>>>11|g<<5)&8191),S=Y[8]+((g>>>8|Qc<<8)&8191),L=Y[9]+(Qc>>>5|J),H=0,A=H+u*m+k*(5*v)+Yc*(5*N)+t*(5*M)+B*(5*q);H=A>>>13,A&=8191,A+=C*(5*i)+K*(5*x)+p*(5*z)+S*(5*G)+L*(5*W),H+=A>>>13,A&=8191;let E=H+u*W+k*m+Yc*(5*v)+t*(5*N)+B*(5*M);H=E>>>13,E&=8191,E+=C*(5*q)+K*(5*i)+p*(5*x)+S*(5*z)+L*(5*G),H+=E>>>13,E&=8191;let P=H+u*G+k*W+Yc*m+t*(5*v)+B*(5*N);H=P>>>13,P&=8191,P+=C*(5*M)+K*(5*q)+p*(5*i)+S*(5*x)+L*(5*z),H+=P>>>13,P&=8191;let s=H+u*z+k*G+Yc*W+t*m+B*(5*v);H=s>>>13,s&=8191,s+=C*(5*N)+K*(5*M)+p*(5*q)+S*(5*i)+L*(5*x),H+=s>>>13,s&=8191;let Jc=H+u*x+k*z+Yc*G+t*W+B*m;H=Jc>>>13,Jc&=8191,Jc+=C*(5*v)+K*(5*N)+p*(5*M)+S*(5*q)+L*(5*i),H+=Jc>>>13,Jc&=8191;let e=H+u*i+k*x+Yc*z+t*G+B*W;H=e>>>13,e&=8191,e+=C*m+K*(5*v)+p*(5*N)+S*(5*M)+L*(5*q),H+=e>>>13,e&=8191;let Hc=H+u*q+k*i+Yc*x+t*z+B*G;H=Hc>>>13,Hc&=8191,Hc+=C*W+K*m+p*(5*v)+S*(5*N)+L*(5*M),H+=Hc>>>13,Hc&=8191;let o=H+u*M+k*q+Yc*i+t*x+B*z;H=o>>>13,o&=8191,o+=C*G+K*W+p*m+S*(5*v)+L*(5*N),H+=o>>>13,o&=8191;let Kc=H+u*N+k*M+Yc*q+t*i+B*x;H=Kc>>>13,Kc&=8191,Kc+=C*z+K*G+p*W+S*m+L*(5*v),H+=Kc>>>13,Kc&=8191;let vc=H+u*v+k*N+Yc*M+t*q+B*i;H=vc>>>13,vc&=8191,vc+=C*x+K*z+p*G+S*W+L*m,H+=vc>>>13,vc&=8191,H=(H<<2)+H|0,H=H+A|0,A=H&8191,H=H>>>13,E+=H,Y[0]=A,Y[1]=E,Y[2]=P,Y[3]=s,Y[4]=Jc,Y[5]=e,Y[6]=Hc,Y[7]=o,Y[8]=Kc,Y[9]=vc}finalize(){let{h:c,pad:$}=this,Q=new Uint16Array(10),J=c[1]>>>13;c[1]&=8191;for(let m=2;m<10;m++)c[m]+=J,J=c[m]>>>13,c[m]&=8191;c[0]+=J*5,J=c[0]>>>13,c[0]&=8191,c[1]+=J,J=c[1]>>>13,c[1]&=8191,c[2]+=J,Q[0]=c[0]+5,J=Q[0]>>>13,Q[0]&=8191;for(let m=1;m<10;m++)Q[m]=c[m]+J,J=Q[m]>>>13,Q[m]&=8191;Q[9]-=8192;let Y=(J^1)-1;for(let m=0;m<10;m++)Q[m]&=Y;Y=~Y;for(let m=0;m<10;m++)c[m]=c[m]&Y|Q[m];c[0]=(c[0]|c[1]<<13)&65535,c[1]=(c[1]>>>3|c[2]<<10)&65535,c[2]=(c[2]>>>6|c[3]<<7)&65535,c[3]=(c[3]>>>9|c[4]<<4)&65535,c[4]=(c[4]>>>12|c[5]<<1|c[6]<<14)&65535,c[5]=(c[6]>>>2|c[7]<<11)&65535,c[6]=(c[7]>>>5|c[8]<<8)&65535,c[7]=(c[8]>>>8|c[9]<<5)&65535;let X=c[0]+$[0];c[0]=X&65535;for(let m=1;m<8;m++)X=(c[m]+$[m]|0)+(X>>>16)|0,c[m]=X&65535;oc(Q)}update(c){jm(this),_c(c),c=O0(c);let{buffer:$,blockLen:Q}=this,J=c.length;for(let Y=0;Y<J;){let X=Math.min(Q-this.pos,J-Y);if(X===Q){for(;Q<=J-Y;Y+=Q)this.process(c,Y);continue}if($.set(c.subarray(Y,Y+X),this.pos),this.pos+=X,Y+=X,this.pos===Q)this.process($,0,!1),this.pos=0}return this}destroy(){oc(this.h,this.r,this.buffer,this.pad)}digestInto(c){jm(this),Ki(c,this),this.finished=!0;let{buffer:$,h:Q}=this,{pos:J}=this;if(J){$[J++]=1;for(;J<16;J++)$[J]=0;this.process($,0,!0)}this.finalize();let Y=0;for(let X=0;X<8;X++)c[Y++]=Q[X]>>>0,c[Y++]=Q[X]>>>8;return c}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}}function g2(c){let $=(J,Y)=>c(Y).update(J).digest(),Q=c(new Uint8Array(32));return $.outputLen=Q.outputLen,$.blockLen=Q.blockLen,$.create=(J)=>c(J),$}var Ai=(()=>g2((c)=>new Si(c)))();function bi(c,$,Q,J,Y,X=20){let m=c[0],W=c[1],G=c[2],z=c[3],x=$[0],i=$[1],q=$[2],M=$[3],N=$[4],v=$[5],U=$[6],w=$[7],j=Y,D=Q[0],_=Q[1],Xc=Q[2],g=m,Qc=W,u=G,k=z,Yc=x,t=i,B=q,C=M,K=N,p=v,S=U,L=w,H=j,A=D,E=_,P=Xc;for(let Jc=0;Jc<X;Jc+=2)g=g+Yc|0,H=h(H^g,16),K=K+H|0,Yc=h(Yc^K,12),g=g+Yc|0,H=h(H^g,8),K=K+H|0,Yc=h(Yc^K,7),Qc=Qc+t|0,A=h(A^Qc,16),p=p+A|0,t=h(t^p,12),Qc=Qc+t|0,A=h(A^Qc,8),p=p+A|0,t=h(t^p,7),u=u+B|0,E=h(E^u,16),S=S+E|0,B=h(B^S,12),u=u+B|0,E=h(E^u,8),S=S+E|0,B=h(B^S,7),k=k+C|0,P=h(P^k,16),L=L+P|0,C=h(C^L,12),k=k+C|0,P=h(P^k,8),L=L+P|0,C=h(C^L,7),g=g+t|0,P=h(P^g,16),S=S+P|0,t=h(t^S,12),g=g+t|0,P=h(P^g,8),S=S+P|0,t=h(t^S,7),Qc=Qc+B|0,H=h(H^Qc,16),L=L+H|0,B=h(B^L,12),Qc=Qc+B|0,H=h(H^Qc,8),L=L+H|0,B=h(B^L,7),u=u+C|0,A=h(A^u,16),K=K+A|0,C=h(C^K,12),u=u+C|0,A=h(A^u,8),K=K+A|0,C=h(C^K,7),k=k+Yc|0,E=h(E^k,16),p=p+E|0,Yc=h(Yc^p,12),k=k+Yc|0,E=h(E^k,8),p=p+E|0,Yc=h(Yc^p,7);let s=0;J[s++]=m+g|0,J[s++]=W+Qc|0,J[s++]=G+u|0,J[s++]=z+k|0,J[s++]=x+Yc|0,J[s++]=i+t|0,J[s++]=q+B|0,J[s++]=M+C|0,J[s++]=N+K|0,J[s++]=v+p|0,J[s++]=U+S|0,J[s++]=w+L|0,J[s++]=j+H|0,J[s++]=D+A|0,J[s++]=_+E|0,J[s++]=Xc+P|0}function d2(c,$,Q,J){let Y=c[0],X=c[1],m=c[2],W=c[3],G=$[0],z=$[1],x=$[2],i=$[3],q=$[4],M=$[5],N=$[6],v=$[7],U=Q[0],w=Q[1],j=Q[2],D=Q[3];for(let Xc=0;Xc<20;Xc+=2)Y=Y+G|0,U=h(U^Y,16),q=q+U|0,G=h(G^q,12),Y=Y+G|0,U=h(U^Y,8),q=q+U|0,G=h(G^q,7),X=X+z|0,w=h(w^X,16),M=M+w|0,z=h(z^M,12),X=X+z|0,w=h(w^X,8),M=M+w|0,z=h(z^M,7),m=m+x|0,j=h(j^m,16),N=N+j|0,x=h(x^N,12),m=m+x|0,j=h(j^m,8),N=N+j|0,x=h(x^N,7),W=W+i|0,D=h(D^W,16),v=v+D|0,i=h(i^v,12),W=W+i|0,D=h(D^W,8),v=v+D|0,i=h(i^v,7),Y=Y+z|0,D=h(D^Y,16),N=N+D|0,z=h(z^N,12),Y=Y+z|0,D=h(D^Y,8),N=N+D|0,z=h(z^N,7),X=X+x|0,U=h(U^X,16),v=v+U|0,x=h(x^v,12),X=X+x|0,U=h(U^X,8),v=v+U|0,x=h(x^v,7),m=m+i|0,w=h(w^m,16),q=q+w|0,i=h(i^q,12),m=m+i|0,w=h(w^m,8),q=q+w|0,i=h(i^q,7),W=W+G|0,j=h(j^W,16),M=M+j|0,G=h(G^M,12),W=W+G|0,j=h(j^W,8),M=M+j|0,G=h(G^M,7);let _=0;J[_++]=Y,J[_++]=X,J[_++]=m,J[_++]=W,J[_++]=U,J[_++]=w,J[_++]=j,J[_++]=D}var ZY=Am(bi,{counterRight:!1,counterLength:4,allowShortKeys:!1}),s2=Am(bi,{counterRight:!1,counterLength:8,extendNonceFn:d2,allowShortKeys:!1});var r2=new Uint8Array(16),Ci=(c,$)=>{c.update($);let Q=$.length%16;if(Q)c.update(r2.subarray(Q))},t2=new Uint8Array(32);function Pi(c,$,Q,J,Y){if(Y!==void 0)_c(Y,void 0,"AAD");let X=c($,Q,t2),m=Dm(J.length,Y?Y.length:0,!0),W=Ai.create(X);if(Y)Ci(W,Y);Ci(W,J),W.update(m);let G=W.digest();return oc(X,m),G}var Ei=(c)=>($,Q,J)=>{return{encrypt(X,m){let W=X.length;m=d$(W+16,m,!1),m.set(X);let G=m.subarray(0,-16);c($,Q,G,G,1);let z=Pi(c,$,Q,G,J);return m.set(z,W),oc(z),m},decrypt(X,m){m=d$(X.length-16,m,!1);let W=X.subarray(0,-16),G=X.subarray(-16),z=Pi(c,$,Q,W,J);if(!mJ(G,z))throw Error("invalid tag");return m.set(X.subarray(0,-16)),c($,Q,m,m,1),oc(z),m}}},vb=WJ({blockSize:64,nonceLength:12,tagLength:16},Ei(ZY)),Ub=WJ({blockSize:64,nonceLength:24,tagLength:16},Ei(s2));function Ti(c,$,Q){if(t8(c),Q===void 0)Q=new Uint8Array(c.outputLen);return R8(c,Q,$)}var Cm=Uint8Array.of(0),Fi=Uint8Array.of();function fi(c,$,Q,J=32){t8(c),D0(J,"length");let Y=c.outputLen;if(J>255*Y)throw Error("Length must be <= 255*HashLen");let X=Math.ceil(J/Y);if(Q===void 0)Q=Fi;else wc(Q,void 0,"info");let m=new Uint8Array(X*Y),W=R8.create(c,$),G=W._cloneInto(),z=new Uint8Array(W.outputLen);for(let x=0;x<X;x++)Cm[0]=x+1,G.update(x===0?Fi:z).update(Q).update(Cm).digestInto(z),m.set(z,Y*x),W._cloneInto(G);return W.destroy(),G.destroy(),F0(z,Cm),m.slice(0,J)}var e2=Object.defineProperty,Lc=(c,$)=>{for(var Q in $)e2(c,Q,{get:$[Q],enumerable:!0})},cD={};Lc(cD,{binarySearch:()=>nm,bytesToHex:()=>Bc,hexToBytes:()=>Oc,insertEventIntoAscendingList:()=>QD,insertEventIntoDescendingList:()=>$D,isHex32:()=>m0,mergeReverseSortedLists:()=>JD,normalizeURL:()=>hi,utf8Decoder:()=>G8,utf8Encoder:()=>p0});var G8=new TextDecoder("utf-8"),p0=new TextEncoder;function hi(c){try{if(c.indexOf("://")===-1)c="wss://"+c;let $=new URL(c);if($.protocol==="http:")$.protocol="ws:";else if($.protocol==="https:")$.protocol="wss:";if($.pathname=$.pathname.replace(/\/+/g,"/"),$.pathname.endsWith("/"))$.pathname=$.pathname.slice(0,-1);if($.port==="80"&&$.protocol==="ws:"||$.port==="443"&&$.protocol==="wss:")$.port="";return $.searchParams.sort(),$.hash="",$.toString()}catch($){throw Error(`Invalid URL: ${c}`)}}function $D(c,$){let[Q,J]=nm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return Y.created_at-$.created_at});if(!J)c.splice(Q,0,$);return c}function QD(c,$){let[Q,J]=nm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return $.created_at-Y.created_at});if(!J)c.splice(Q,0,$);return c}function nm(c,$){let Q=0,J=c.length-1;while(Q<=J){let Y=Math.floor((Q+J)/2),X=$(c[Y]);if(X===0)return[Y,!0];if(X<0)J=Y-1;else Q=Y+1}return[Q,!1]}function JD(c,$){let Q=Array(c.length+$.length);Q.length=0;let J=0,Y=0,X=[];while(J<c.length&&Y<$.length){let m;if(c[J]?.created_at>$[Y]?.created_at)m=c[J],J++;else m=$[Y],Y++;if(Q.length>0&&Q[Q.length-1].created_at===m.created_at){if(X.includes(m.id))continue}else X.length=0;Q.push(m),X.push(m.id)}while(J<c.length){let m=c[J];if(J++,Q.length>0&&Q[Q.length-1].created_at===m.created_at){if(X.includes(m.id))continue}else X.length=0;Q.push(m),X.push(m.id)}while(Y<$.length){let m=$[Y];if(Y++,Q.length>0&&Q[Q.length-1].created_at===m.created_at){if(X.includes(m.id))continue}else X.length=0;Q.push(m),X.push(m.id)}return Q}function m0(c){for(let $=0;$<64;$++){let Q=c.charCodeAt($);if(isNaN(Q)||Q<48||Q>102||Q>57&&Q<97)return!1}return!0}var r$=Symbol("verified"),YD=(c)=>c instanceof Object;function um(c){if(!YD(c))return!1;if(typeof c.kind!=="number")return!1;if(typeof c.content!=="string")return!1;if(typeof c.created_at!=="number")return!1;if(typeof c.pubkey!=="string")return!1;if(!m0(c.pubkey))return!1;if(!Array.isArray(c.tags))return!1;for(let $=0;$<c.tags.length;$++){let Q=c.tags[$];if(!Array.isArray(Q))return!1;for(let J=0;J<Q.length;J++)if(typeof Q[J]!=="string")return!1}return!0}var XD=class{generateSecretKey(){return g$.utils.randomSecretKey()}getPublicKey(c){return Bc(g$.getPublicKey(c))}finalizeEvent(c,$){let Q=c;return Q.pubkey=Bc(g$.getPublicKey($)),Q.id=SY(Q),Q.sig=Bc(g$.sign(Oc(SY(Q)),$)),Q[r$]=!0,Q}verifyEvent(c){if(typeof c[r$]==="boolean")return c[r$];try{let $=SY(c);if($!==c.id)return c[r$]=!1,!1;let Q=g$.verify(Oc(c.sig),Oc($),Oc(c.pubkey));return c[r$]=Q,Q}catch($){return c[r$]=!1,!1}}};function mD(c){if(!um(c))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,c.pubkey,c.created_at,c.kind,c.tags,c.content])}function SY(c){let $=ec(p0.encode(mD(c)));return Bc($)}var PY=new XD,WD=PY.generateSecretKey,GJ=PY.getPublicKey,R0=PY.finalizeEvent,zJ=PY.verifyEvent,GD={};Lc(GD,{AIEmbeddings:()=>QB,AppCurationSet:()=>FH,Application:()=>bH,AuthoredPodcasts:()=>QH,BadgeAward:()=>wD,BadgeDefinition:()=>HH,Bid:()=>SD,BidConfirmation:()=>AD,BlobsAuth:()=>VH,BlockedRelaysList:()=>TB,BlossomServerList:()=>rB,BookmarkList:()=>bB,Bookmarksets:()=>UH,Calendar:()=>cO,CalendarEventRSVP:()=>$O,CashuMintAnnouncement:()=>qO,CashuWalletEvent:()=>xH,CashuWalletHistory:()=>VB,CashuWalletTokens:()=>MB,ChannelCreation:()=>ri,ChannelHideMessage:()=>cq,ChannelMessage:()=>ei,ChannelMetadata:()=>ti,ChannelMuteUser:()=>$q,ChatMessage:()=>vD,Chess:()=>LD,ClassifiedListing:()=>kH,ClientAuth:()=>Jq,CodeSnippet:()=>uD,CoinjoinPool:()=>XB,Comment:()=>ED,CommunitiesList:()=>EB,CommunityDefinition:()=>GO,CommunityPostApproval:()=>GB,ConferenceEvent:()=>nH,Contacts:()=>MD,CreateOrUpdateProduct:()=>RH,CreateOrUpdateStall:()=>pH,CuratedVideoSets:()=>KH,Curationsets:()=>jH,Date:()=>tH,DecoupledEncryptionKeyDistribution:()=>WB,DecoupledKeyAnnouncement:()=>gB,DecoupledKeyClientAnnouncement:()=>mB,DirectMessageRelaysList:()=>dB,DraftClassifiedListing:()=>lH,DraftEvent:()=>dH,DraftLong:()=>_H,Emojisets:()=>SH,EncryptedDirectMessage:()=>VD,EventDeletion:()=>ND,FavoriteFollowSets:()=>yB,FavoritePodcasts:()=>sB,FavoriteRelays:()=>uB,FedimintAnnouncement:()=>MO,Feed:()=>rH,FileMessage:()=>DD,FileMetadata:()=>PD,FileServerPreference:()=>tB,Followsets:()=>NH,ForumThread:()=>jD,GenericRepost:()=>ym,Genericlists:()=>wH,GeocacheListing:()=>xO,GeocacheLog:()=>NB,GeocacheLogEntry:()=>iO,GeocacheProofOfFind:()=>wB,GiftWrap:()=>Qq,GitPullRequest:()=>kD,GitPullRequestUpdate:()=>lD,GoodWikiAuthorList:()=>eB,GoodWikiRelayList:()=>cH,GroupMetadata:()=>NO,HTTPAuth:()=>om,Handlerinformation:()=>YO,Handlerrecommendation:()=>JO,Highlights:()=>SB,InteractiveRoom:()=>fH,InterestsList:()=>kB,Interestsets:()=>OH,Issue:()=>hD,JobFeedback:()=>iB,JobRequest:()=>zB,JobResult:()=>xB,Label:()=>cB,LegacyNsiteFile:()=>mO,LightningPubRPC:()=>iH,LinkSet:()=>sH,LiveChatMessage:()=>nD,LiveEvent:()=>TH,LongFormArticle:()=>ZH,MarketplaceUI:()=>IH,MediaFollows:()=>hB,MediaStarterPacks:()=>DO,MergeRequests:()=>ZD,Metadata:()=>iD,ModularArticleContent:()=>CH,ModularArticleHeader:()=>AH,MuteSets:()=>DH,Mutelist:()=>AB,NWCWalletInfo:()=>GH,NWCWalletRequest:()=>Yq,NWCWalletResponse:()=>qH,NormalVideo:()=>OD,NostrConnect:()=>MH,NsiteNamed:()=>zO,NsiteRoot:()=>zH,NutZap:()=>IB,NutZapInfo:()=>lB,OpenTimestamps:()=>CD,Patch:()=>aD,PeerToPeerOrderEvents:()=>VO,Photo:()=>HD,Pinlist:()=>CB,PodcastEpisode:()=>ID,PodcastMetadata:()=>$H,Poll:()=>bD,PollResponse:()=>_D,PrivateDirectMessage:()=>si,PrivateEventRelayList:()=>aB,ProblemTracker:()=>rD,ProductSoldAsAuction:()=>LH,ProfileBadges:()=>BH,ProxyAnnouncement:()=>mH,PublicChatsList:()=>FB,PublicMessage:()=>RD,Reaction:()=>hm,ReactionToWebsite:()=>BD,RecommendRelay:()=>qD,Redirects:()=>gH,RelayDiscovery:()=>EH,RelayList:()=>PB,RelayMonitorAnnouncement:()=>JH,RelayReview:()=>QO,RelayReviews:()=>$B,Relaysets:()=>vH,ReleaseArtifactSets:()=>PH,Reply:()=>yD,Report:()=>tD,Reporting:()=>eD,RepositoryAnnouncement:()=>hH,RepositoryState:()=>yH,Repost:()=>lm,ReservedCashuWalletTokens:()=>qB,RoomPresence:()=>YH,Scroll:()=>TD,Seal:()=>di,SearchRelaysList:()=>fB,ShortTextNote:()=>gi,ShortVideo:()=>pD,SimpleGroupAdmins:()=>wO,SimpleGroupCreateGroup:()=>DB,SimpleGroupCreateInvite:()=>HB,SimpleGroupDeleteEvent:()=>KB,SimpleGroupDeleteGroup:()=>BB,SimpleGroupEditMetadata:()=>jB,SimpleGroupJoinRequest:()=>OB,SimpleGroupLeaveRequest:()=>pB,SimpleGroupList:()=>nB,SimpleGroupLiveKitParticipants:()=>jO,SimpleGroupMembers:()=>vO,SimpleGroupPutUser:()=>vB,SimpleGroupRemoveUser:()=>UB,SimpleGroupReply:()=>KD,SimpleGroupRoles:()=>UO,SimpleGroupThreadedReply:()=>UD,SlideSet:()=>aH,SoftwareApplication:()=>XO,StarterPacks:()=>KO,StatusApplied:()=>gD,StatusClosed:()=>dD,StatusDraft:()=>sD,StatusOpen:()=>oD,TidalLogin:()=>LB,Time:()=>eH,Torrent:()=>JB,TorrentComment:()=>YB,TransportMethodAnnouncement:()=>WH,UserEmojiList:()=>oB,UserGraspList:()=>XH,UserStatuses:()=>uH,VideoViewEvent:()=>WO,Voice:()=>FD,VoiceComment:()=>fD,WebBookmarks:()=>BO,WikiArticle:()=>oH,Zap:()=>_B,ZapGoal:()=>RB,ZapRequest:()=>ZB,classifyKind:()=>zD,isAddressableKind:()=>km,isEphemeralKind:()=>oi,isKind:()=>xD,isRegularKind:()=>yi,isReplaceableKind:()=>am});function yi(c){return c<1e4&&c!==0&&c!==3}function am(c){return c===0||c===3||1e4<=c&&c<20000}function oi(c){return 20000<=c&&c<30000}function km(c){return 30000<=c&&c<40000}function zD(c){if(yi(c))return"regular";if(am(c))return"replaceable";if(oi(c))return"ephemeral";if(km(c))return"parameterized";return"unknown"}function xD(c,$){let Q=$ instanceof Array?$:[$];return um(c)&&Q.includes(c.kind)||!1}var iD=0,gi=1,qD=2,MD=3,VD=4,ND=5,lm=6,hm=7,wD=8,vD=9,UD=10,jD=11,KD=12,di=13,si=14,DD=15,ym=16,BD=17,HD=20,OD=21,pD=22,RD=24,ri=40,ti=41,ei=42,cq=43,$q=44,ID=54,LD=64,ZD=818,_D=1018,SD=1021,AD=1022,CD=1040,Qq=1059,PD=1063,bD=1068,ED=1111,FD=1222,TD=1227,fD=1244,nD=1311,uD=1337,aD=1617,kD=1618,lD=1619,hD=1621,yD=1622,oD=1630,gD=1631,dD=1632,sD=1633,rD=1971,tD=1984,eD=1984,cB=1985,$B=1986,QB=1987,JB=2003,YB=2004,XB=2022,mB=4454,WB=4455,GB=4550,zB=5999,xB=6999,iB=7000,qB=7374,MB=7375,VB=7376,NB=7516,wB=7517,vB=9000,UB=9001,jB=9002,KB=9005,DB=9007,BB=9008,HB=9009,OB=9021,pB=9022,RB=9041,IB=9321,LB=9467,ZB=9734,_B=9735,SB=9802,AB=1e4,CB=10001,PB=10002,bB=10003,EB=10004,FB=10005,TB=10006,fB=10007,nB=10009,uB=10012,aB=10013,kB=10015,lB=10019,hB=10020,yB=10021,oB=10030,gB=10044,dB=10050,sB=10054,rB=10063,tB=10096,eB=10101,cH=10102,$H=10154,QH=10164,JH=10166,YH=10312,XH=10317,mH=10377,WH=11111,GH=13194,zH=15128,xH=17375,iH=21000,Jq=22242,Yq=23194,qH=23195,MH=24133,VH=24242,om=27235,NH=30000,wH=30001,vH=30002,UH=30003,jH=30004,KH=30005,DH=30007,BH=30008,HH=30009,OH=30015,pH=30017,RH=30018,IH=30019,LH=30020,ZH=30023,_H=30024,SH=30030,AH=30040,CH=30041,PH=30063,bH=30078,EH=30166,FH=30267,TH=30311,fH=30312,nH=30313,uH=30315,aH=30388,kH=30402,lH=30403,hH=30617,yH=30618,oH=30818,gH=30819,dH=31234,sH=31388,rH=31890,tH=31922,eH=31923,cO=31924,$O=31925,QO=31987,JO=31989,YO=31990,XO=32267,mO=34128,WO=34237,GO=34550,zO=35128,xO=37515,iO=37516,qO=38172,MO=38173,VO=38383,NO=39000,wO=39001,vO=39002,UO=39003,jO=39004,KO=39089,DO=39092,BO=39701;function HO(c,$){if(c.ids&&c.ids.indexOf($.id)===-1)return!1;if(c.kinds&&c.kinds.indexOf($.kind)===-1)return!1;if(c.authors&&c.authors.indexOf($.pubkey)===-1)return!1;for(let Q in c)if(Q[0]==="#"){let J=Q.slice(1),Y=c[`#${J}`];if(Y&&!$.tags.find(([X,m])=>X===Q.slice(1)&&Y.indexOf(m)!==-1))return!1}if(c.since&&$.created_at<c.since)return!1;if(c.until&&$.created_at>c.until)return!1;return!0}function OO(c,$){for(let Q=0;Q<c.length;Q++)if(HO(c[Q],$))return!0;return!1}var pO={};Lc(pO,{getHex64:()=>bY,getInt:()=>Xq,getSubscriptionId:()=>mq,matchEventId:()=>RO,matchEventKind:()=>LO,matchEventPubkey:()=>IO});function bY(c,$){let Q=$.length+3,J=c.indexOf(`"${$}":`)+Q,Y=c.slice(J).indexOf('"')+J+1;return c.slice(Y,Y+64)}function Xq(c,$){let Q=$.length,J=c.indexOf(`"${$}":`)+Q+3,Y=c.slice(J),X=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,X),10)}function mq(c){let $=c.slice(0,22).indexOf('"EVENT"');if($===-1)return null;let Q=c.slice($+7+1).indexOf('"');if(Q===-1)return null;let J=$+7+1+Q,Y=c.slice(J+1,80).indexOf('"');if(Y===-1)return null;let X=J+1+Y;return c.slice(J+1,X)}function RO(c,$){return $===bY(c,"id")}function IO(c,$){return $===bY(c,"pubkey")}function LO(c,$){return $===Xq(c,"kind")}var ZO={};Lc(ZO,{makeAuthEvent:()=>Wq});function Wq(c,$){return{kind:Jq,created_at:Math.floor(Date.now()/1000),tags:[["relay",c],["challenge",$]],content:""}}var fm=class extends Error{constructor(c,$){super(`Tried to send message '${c} on a closed connection to ${$}.`);this.name="SendingOnClosedConnection"}},_O=class{url;_connected=!1;onclose=null;onnotice=(c)=>console.debug(`NOTICE from ${this.url}: ${c}`);onauth;baseEoseTimeout=4400;publishTimeout=4400;pingFrequency=29000;pingTimeout=20000;resubscribeBackoff=[1e4,1e4,1e4,20000,20000,30000,60000];openSubs=new Map;enablePing;enableReconnect;idleTimeout=0;idleSince=Date.now();ongoingOperations=0;reconnectTimeoutHandle;pingIntervalHandle;reconnectAttempts=0;skipReconnection=!1;idleTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor(c,$){if(this.url=hi(c),this.verifyEvent=$.verifyEvent,this._WebSocket=$.websocketImplementation||WebSocket,this.enablePing=$.enablePing,this.enableReconnect=$.enableReconnect||!1,$.idleTimeout)this.idleTimeout=$.idleTimeout}static async connect(c,$){let Q=new _O(c,$);return await Q.connect($),Q}closeAllSubscriptions(c){for(let[$,Q]of this.openSubs)Q.close(c);this.openSubs.clear();for(let[$,Q]of this.openEventPublishes)Q.reject(Error(c));this.openEventPublishes.clear();for(let[$,Q]of this.openCountRequests)Q.reject(Error(c));this.openCountRequests.clear()}get connected(){return this._connected}clearIdleTimeout(){if(this.idleTimeoutHandle)clearTimeout(this.idleTimeoutHandle),this.idleTimeoutHandle=void 0}scheduleIdleClose(){if(this.clearIdleTimeout(),this.idleTimeout>0)this.idleTimeoutHandle=setTimeout(()=>{if(this.ongoingOperations===0&&this.idleSince)this.close()},this.idleTimeout)}async reconnect(){let c=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch($){}},c)}handleHardClose(c){if(this.ws)this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.enableReconnect&&!this.skipReconnection)this.reconnect();else this.onclose?.(),this.closeAllSubscriptions(c)}async connect(c){let $;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((Q,J)=>{if(c?.timeout)$=setTimeout(()=>{if(J("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},c.timeout);if(c?.abort)c.abort.onabort=J;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout($),J(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout($),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let X of this.openSubs.values()){if(X.eosed=!1,Y){for(let m=0;m<X.filters.length;m++)if(X.lastEmitted)X.filters[m].since=X.lastEmitted+1}X.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);Q()},this.ws.onerror=()=>{if(clearTimeout($),J("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout($),J(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise((c)=>{this.ws.once("pong",()=>c(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise((c,$)=>{if(!this.connectionPromise)return $(Error(`no connection to ${this.url}, can't ping`));try{let Q=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{c(!0),Q.close()},onclose(){c(!0)},eoseTimeout:this.pingTimeout+1000})}catch(Q){$(Q)}})}async pingpong(){if(this.ws?.readyState===1){if(!await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise(($)=>setTimeout(()=>$(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send(c){if(!this.connectionPromise)throw new fm(c,this.url);this.connectionPromise.then(()=>{this.ws?.send(c)})}async auth(c){let $=this.challenge;if(!$)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(Q,J)=>{try{let Y=await c(Wq(this.url,$)),X=setTimeout(()=>{let m=this.openEventPublishes.get(Y.id);if(m)m.reject(Error("auth timed out")),this.openEventPublishes.delete(Y.id)},this.publishTimeout);this.openEventPublishes.set(Y.id,{resolve:Q,reject:J,timeout:X}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish(c){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let $=new Promise((Q,J)=>{let Y=setTimeout(()=>{let X=this.openEventPublishes.get(c.id);if(X)X.reject(Error("publish timed out")),this.openEventPublishes.delete(c.id)},this.publishTimeout);this.openEventPublishes.set(c.id,{resolve:Q,reject:J,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify(c)+"]")}catch(Q){let J=this.openEventPublishes.get(c.id);if(J)J.reject(Q),this.openEventPublishes.delete(c.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return $}async count(c,$){return(await this.countWithHLL(c,$)).count}async countWithHLL(c,$){this.serial++;let Q=$?.id||"count:"+this.serial,J=new Promise((Y,X)=>{this.openCountRequests.set(Q,{resolve:Y,reject:X})});try{await this.send('["COUNT","'+Q+'",'+JSON.stringify(c).substring(1))}catch(Y){let X=this.openCountRequests.get(Q);if(X)X.reject(Y),this.openCountRequests.delete(Q)}return J}subscribe(c,$){if($.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=this.prepareSubscription(c,$);if(Q.fire(),$.abort)$.abort.onabort=()=>Q.close(String($.abort.reason||"<aborted>"));return Q}prepareSubscription(c,$){this.serial++;let Q=$.id||($.label?$.label+":":"sub:")+this.serial,J=new SO(this,Q,c,$);return this.openSubs.set(Q,J),J}close(){if(this.skipReconnection=!0,this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.onclose?.(),this.ws){if(this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState!==this._WebSocket.CLOSING&&this.ws.readyState!==this._WebSocket.CLOSED)this.ws.close()}}_onmessage(c){let $=c.data;if(!$)return;let Q=mq($);if(Q){let J=this.openSubs.get(Q);if(!J)return;let Y=bY($,"id"),X=J.alreadyHaveEvent?.(Y);if(J.receivedEvent?.(this,Y),X)return}try{let J=JSON.parse($);switch(J[0]){case"EVENT":{let Y=this.openSubs.get(J[1]),X=J[2];if(OO(Y.filters,X)&&this.verifyEvent(X,this.url))Y.onevent(X);else Y.oninvalidevent?.(X);if(!Y.lastEmitted||Y.lastEmitted<X.created_at)Y.lastEmitted=X.created_at;return}case"COUNT":{let Y=J[1],X=J[2],m=this.openCountRequests.get(Y);if(m)m.resolve(X),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(J[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=J[1],X=J[2],m=J[3],W=this.openEventPublishes.get(Y);if(W){if(clearTimeout(W.timeout),X)W.resolve(m);else W.reject(Error(m));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=J[1],X=this.openSubs.get(Y);if(!X){let m=this.openCountRequests.get(Y);if(m)m.reject(Error(J[2])),this.openCountRequests.delete(Y);return}X.closed=!0,X.close(J[2]);return}case"NOTICE":{this.onnotice(J[1]);return}case"AUTH":{if(this.challenge=J[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof fm))throw Y});return}default:{this.openSubs.get(J[1])?.oncustom?.(J);return}}}catch(J){try{let[Y,X,m]=JSON.parse($);console.warn(`[nostr] relay ${this.url} error processing message:`,J,m)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,J)}return}}},SO=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor(c,$,Q,J){if(Q.length===0)throw Error("subscription can't be created with zero filters");this.relay=c,this.filters=Q,this.id=$,this.alreadyHaveEvent=J.alreadyHaveEvent,this.receivedEvent=J.receivedEvent,this.eoseTimeout=J.eoseTimeout||c.baseEoseTimeout,this.oneose=J.oneose,this.onclose=J.onclose,this.oninvalidevent=J.oninvalidevent,this.onevent=J.onevent||((Y)=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,Y)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){if(this.eosed)return;clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.()}close(c="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch($){if($ instanceof fm);else throw $}this.closed=!0}if(this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0)this.relay.idleSince=Date.now(),this.relay.scheduleIdleClose();this.onclose?.(c)}},AO;try{AO=WebSocket}catch{}var CO=256,Ib=CO*2;var PO;try{PO=WebSocket}catch{}var EY={};Lc(EY,{BECH32_REGEX:()=>Gq,Bech32MaxSize:()=>gm,NostrTypeGuard:()=>bO,decode:()=>FY,decodeNostrURI:()=>FO,encodeBytes:()=>fY,naddrEncode:()=>kO,neventEncode:()=>aO,noteEncode:()=>nO,nprofileEncode:()=>uO,npubEncode:()=>fO,nsecEncode:()=>TO});var bO={isNProfile:(c)=>/^nprofile1[a-z\d]+$/.test(c||""),isNEvent:(c)=>/^nevent1[a-z\d]+$/.test(c||""),isNAddr:(c)=>/^naddr1[a-z\d]+$/.test(c||""),isNSec:(c)=>/^nsec1[a-z\d]{58}$/.test(c||""),isNPub:(c)=>/^npub1[a-z\d]{58}$/.test(c||""),isNote:(c)=>/^note1[a-z\d]+$/.test(c||""),isNcryptsec:(c)=>/^ncryptsec1[a-z\d]+$/.test(c||"")},gm=5000,Gq=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function EO(c){let $=new Uint8Array(4);return $[0]=c>>24&255,$[1]=c>>16&255,$[2]=c>>8&255,$[3]=c&255,$}function FO(c){try{if(c.startsWith("nostr:"))c=c.substring(6);return FY(c)}catch($){return{type:"invalid",data:null}}}function FY(c){let{prefix:$,words:Q}=Z8.decode(c,gm),J=new Uint8Array(Z8.fromWords(Q));switch($){case"nprofile":{let Y=Pm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nprofile");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Bc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>G8.decode(X)):[]}}}case"nevent":{let Y=Pm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nevent");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");if(Y[2]&&Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(Y[3]&&Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Bc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>G8.decode(X)):[],author:Y[2]?.[0]?Bc(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(Bc(Y[3][0]),16):void 0}}}case"naddr":{let Y=Pm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for naddr");if(!Y[2]?.[0])throw Error("missing TLV 2 for naddr");if(Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(!Y[3]?.[0])throw Error("missing TLV 3 for naddr");if(Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:G8.decode(Y[0][0]),pubkey:Bc(Y[2][0]),kind:parseInt(Bc(Y[3][0]),16),relays:Y[1]?Y[1].map((X)=>G8.decode(X)):[]}}}case"nsec":return{type:$,data:J};case"npub":case"note":return{type:$,data:Bc(J)};default:throw Error(`unknown prefix ${$}`)}}function Pm(c){let $={},Q=c;while(Q.length>0){if(Q.length<2)throw Error("not enough data to read TLV");let J=Q[0],Y=Q[1],X=Q.slice(2,2+Y);if(Q=Q.slice(2+Y),X.length<Y)throw Error(`not enough data to read on TLV ${J}`);$[J]=$[J]||[],$[J].push(X)}return $}function TO(c){return fY("nsec",c)}function fO(c){return fY("npub",Oc(c))}function nO(c){return fY("note",Oc(c))}function TY(c,$){let Q=Z8.toWords($);return Z8.encode(c,Q,gm)}function fY(c,$){return TY(c,$)}function uO(c){let $=dm({0:[Oc(c.pubkey)],1:(c.relays||[]).map((Q)=>p0.encode(Q))});return TY("nprofile",$)}function aO(c){let $;if(c.kind!==void 0)$=EO(c.kind);let Q=dm({0:[Oc(c.id)],1:(c.relays||[]).map((J)=>p0.encode(J)),2:c.author?[Oc(c.author)]:[],3:$?[new Uint8Array($)]:[]});return TY("nevent",Q)}function kO(c){let $=new ArrayBuffer(4);new DataView($).setUint32(0,c.kind,!1);let Q=dm({0:[p0.encode(c.identifier)],1:(c.relays||[]).map((J)=>p0.encode(J)),2:[Oc(c.pubkey)],3:[new Uint8Array($)]});return TY("naddr",Q)}function dm(c){let $=[];return Object.entries(c).reverse().forEach(([Q,J])=>{J.forEach((Y)=>{let X=new Uint8Array(Y.length+2);X.set([parseInt(Q)],0),X.set([Y.length],1),X.set(Y,2),$.push(X)})}),bc(...$)}var lO={};Lc(lO,{decrypt:()=>hO,encrypt:()=>zq});function zq(c,$,Q){let J=c instanceof Uint8Array?c:Oc(c),Y=QJ.getSharedSecret(J,Oc("02"+$)),X=xq(Y),m=Uint8Array.from(f0(16)),W=p0.encode(Q),G=Zm(X,m).encrypt(W),z=H0.encode(new Uint8Array(G)),x=H0.encode(new Uint8Array(m.buffer));return`${z}?iv=${x}`}function hO(c,$,Q){let J=c instanceof Uint8Array?c:Oc(c),[Y,X]=Q.split("?iv="),m=QJ.getSharedSecret(J,Oc("02"+$)),W=xq(m),G=H0.decode(X),z=H0.decode(Y),x=Zm(W,G).decrypt(z);return G8.decode(x)}function xq(c){return c.slice(1,33)}var yO={};Lc(yO,{NIP05_REGEX:()=>sm,isNip05:()=>oO,isValid:()=>sO,queryProfile:()=>iq,searchDomain:()=>dO,useFetchImplementation:()=>gO});var sm=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,oO=(c)=>sm.test(c||""),nY;try{nY=fetch}catch(c){}function gO(c){nY=c}async function dO(c,$=""){try{let Q=`https://${c}/.well-known/nostr.json?name=${$}`,J=await nY(Q,{redirect:"manual"});if(J.status!==200)throw Error("Wrong response code");return(await J.json()).names}catch(Q){return{}}}async function iq(c){let $=c.match(sm);if(!$)return null;let[,Q="_",J]=$;try{let Y=`https://${J}/.well-known/nostr.json?name=${Q}`,X=await nY(Y,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");let m=await X.json(),W=m.names[Q];return W?{pubkey:W,relays:m.relays?.[W]}:null}catch(Y){return null}}async function sO(c,$){let Q=await iq($);return Q?Q.pubkey===c:!1}var rO={};Lc(rO,{parse:()=>tO});function tO(c){let $={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},Q,J;for(let Y=c.tags.length-1;Y>=0;Y--){let X=c.tags[Y];if(X[0]==="e"&&X[1]&&m0(X[1])){let[m,W,G,z,x]=X,i={id:W,relays:G?[G]:[],author:x&&m0(x)?x:void 0};if(z==="root"){$.root=i;continue}if(z==="reply"){$.reply=i;continue}if(z==="mention"){$.mentions.push(i);continue}if(!Q)Q=i;else J=i;$.mentions.push(i);continue}if(X[0]==="q"&&X[1]&&m0(X[1])){let[m,W,G]=X;$.quotes.push({id:W,relays:G?[G]:[]})}if(X[0]==="p"&&X[1]&&m0(X[1])){$.profiles.push({pubkey:X[1],relays:X[2]?[X[2]]:[]});continue}}if(!$.root)$.root=J||Q||$.reply;if(!$.reply)$.reply=Q||$.root;return[$.reply,$.root].forEach((Y)=>{if(!Y)return;let X=$.mentions.indexOf(Y);if(X!==-1)$.mentions.splice(X,1);if(Y.author){let m=$.profiles.find((W)=>W.pubkey===Y.author);if(m&&m.relays){if(!Y.relays)Y.relays=[];m.relays.forEach((W)=>{if(Y.relays?.indexOf(W)===-1)Y.relays.push(W)}),m.relays=Y.relays}}}),$.mentions.forEach((Y)=>{if(Y.author){let X=$.profiles.find((m)=>m.pubkey===Y.author);if(X&&X.relays){if(!Y.relays)Y.relays=[];X.relays.forEach((m)=>{if(Y.relays.indexOf(m)===-1)Y.relays.push(m)}),X.relays=Y.relays}}}),$}var eO={};Lc(eO,{fetchRelayInformation:()=>$p,useFetchImplementation:()=>cp});var qq;try{qq=fetch}catch{}function cp(c){qq=c}async function $p(c){return await(await fetch(c.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Qp={};Lc(Qp,{getPow:()=>Jp,minePow:()=>Xp});function Jp(c){let $=0;for(let Q=0;Q<64;Q+=8){let J=parseInt(c.substring(Q,Q+8),16);if(J===0)$+=32;else{$+=Math.clz32(J);break}}return $}function Yp(c){let $=0;for(let Q=0;Q<c.length;Q++){let J=c[Q];if(J===0)$+=8;else{$+=Math.clz32(J)-24;break}}return $}function Xp(c,$){let Q=0,J=c,Y=["nonce",Q.toString(),$.toString()];J.tags.push(Y);while(!0){let X=Math.floor(new Date().getTime()/1000);if(X!==J.created_at)Q=0,J.created_at=X;Y[1]=(++Q).toString();let m=ec(p0.encode(JSON.stringify([0,J.pubkey,J.created_at,J.kind,J.tags,J.content])));if(Yp(m)>=$){J.id=Bc(m);break}}return J}var mp={};Lc(mp,{unwrapEvent:()=>vp,unwrapManyEvents:()=>Up,wrapEvent:()=>pq,wrapManyEvents:()=>wp});var Wp={};Lc(Wp,{createRumor:()=>Dq,createSeal:()=>Bq,createWrap:()=>Hq,unwrapEvent:()=>YW,unwrapManyEvents:()=>Oq,wrapEvent:()=>CY,wrapManyEvents:()=>Vp});var Gp={};Lc(Gp,{decrypt:()=>JW,encrypt:()=>QW,getConversationKey:()=>cW,v2:()=>qp});var rm=1,tm=4294967295,em=65536;function cW(c,$){let Q=QJ.getSharedSecret(c,Oc("02"+$)).subarray(1,33);return Ti(ec,Q,p0.encode("nip44-v2"))}function Mq(c,$){let Q=fi(ec,c,$,76);return{chacha_key:Q.subarray(0,32),chacha_nonce:Q.subarray(32,44),hmac_key:Q.subarray(44,76)}}function $W(c){if(!Number.isSafeInteger(c)||c<1)throw Error("expected positive integer");if(c<=32)return 32;let $=2**(Math.floor(Math.log2(c-1))+1),Q=$<=256?32:$/8;return Q*(Math.floor((c-1)/Q)+1)}function zp(c){if(!Number.isSafeInteger(c)||c<rm||c>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let $=new Uint8Array(2);return new DataView($.buffer).setUint16(0,c,!1),$}function xp(c){if(!Number.isSafeInteger(c)||c<em||c>tm)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let $=new Uint8Array(4);return new DataView($.buffer).setUint32(0,c,!1),$}function Vq(c){let $=p0.encode(c),Q=$.length;if(Q<rm||Q>tm)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let J=Q>=em?bc(new Uint8Array([0,0]),xp(Q)):zp(Q),Y=new Uint8Array($W(Q)-Q);return bc(J,$,Y)}function Nq(c){let $=new DataView(c.buffer,c.byteOffset,c.byteLength),Q=$.getUint16(0),J,Y;if(Q===0){if(J=$.getUint32(2),J<em)throw Error("invalid padding");Y=6}else J=Q,Y=2;let X=c.subarray(Y,Y+J);if(J<rm||J>tm||X.length!==J||c.length!==Y+$W(J))throw Error("invalid padding");return G8.decode(X)}function wq(c,$,Q){if(Q.length!==32)throw Error("AAD associated data must be 32 bytes");let J=bc(Q,$);return R8(ec,c,J)}function ip(c){if(typeof c!=="string")throw Error("payload must be a valid string");let $=c.length;if($<132)throw Error("invalid payload length: "+$);if(c[0]==="#")throw Error("unknown encryption version");let Q;try{Q=H0.decode(c)}catch(X){throw Error("invalid base64: "+X.message)}let J=Q.length;if(J<99)throw Error("invalid data length: "+J);let Y=Q[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:Q.subarray(1,33),ciphertext:Q.subarray(33,-32),mac:Q.subarray(-32)}}function QW(c,$,Q=f0(32)){let{chacha_key:J,chacha_nonce:Y,hmac_key:X}=Mq($,Q),m=Vq(c),W=ZY(J,Y,m),G=wq(X,W,Q);return H0.encode(bc(new Uint8Array([2]),Q,W,G))}function JW(c,$){let{nonce:Q,ciphertext:J,mac:Y}=ip(c),{chacha_key:X,chacha_nonce:m,hmac_key:W}=Mq($,Q),G=wq(W,J,Q);if(!mJ(G,Y))throw Error("invalid MAC");let z=ZY(X,m,J);return Nq(z)}var qp={utils:{getConversationKey:cW,calcPaddedLen:$W,pad:Vq,unpad:Nq},encrypt:QW,decrypt:JW},Mp=172800,vq=()=>Math.round(Date.now()/1000),Uq=()=>Math.round(vq()-Math.random()*Mp),jq=(c,$)=>cW(c,$),Kq=(c,$,Q)=>QW(JSON.stringify(c),jq($,Q)),ni=(c,$)=>JSON.parse(JW(c.content,jq($,c.pubkey)));function Dq(c,$){let Q={created_at:vq(),content:"",tags:[],...c,pubkey:GJ($)};return Q.id=SY(Q),Q}function Bq(c,$,Q){return R0({kind:di,content:Kq(c,$,Q),created_at:Uq(),tags:[]},$)}function Hq(c,$){let Q=WD();return R0({kind:Qq,content:Kq(c,Q,$),created_at:Uq(),tags:[["p",$]]},Q)}function CY(c,$,Q){let J=Dq(c,$),Y=Bq(J,$,Q);return Hq(Y,Q)}function Vp(c,$,Q){if(!Q||Q.length===0)throw Error("At least one recipient is required.");let J=GJ($),Y=[CY(c,$,J)];return Q.forEach((X)=>{Y.push(CY(c,$,X))}),Y}function YW(c,$){let Q=ni(c,$);return ni(Q,$)}function Oq(c,$){let Q=[];return c.forEach((J)=>{Q.push(YW(J,$))}),Q.sort((J,Y)=>J.created_at-Y.created_at),Q}function Np(c,$,Q,J){let Y={created_at:Math.ceil(Date.now()/1000),kind:si,tags:[],content:$};if((Array.isArray(c)?c:[c]).forEach(({publicKey:m,relayUrl:W})=>{Y.tags.push(W?["p",m,W]:["p",m])}),J)Y.tags.push(["e",J.eventId,J.relayUrl||"","reply"]);if(Q)Y.tags.push(["subject",Q]);return Y}function pq(c,$,Q,J,Y){let X=Np($,Q,J,Y);return CY(X,c,$.publicKey)}function wp(c,$,Q,J,Y){if(!$||$.length===0)throw Error("At least one recipient is required.");return[{publicKey:GJ(c)},...$].map((m)=>pq(c,m,Q,J,Y))}var vp=YW,Up=Oq,jp={};Lc(jp,{finishRepostEvent:()=>Kp,getRepostedEvent:()=>Dp,getRepostedEventPointer:()=>Rq});function Kp(c,$,Q,J){let Y,X=[...c.tags??[],["e",$.id,Q],["p",$.pubkey]];if($.kind===gi)Y=lm;else Y=ym,X.push(["k",String($.kind)]);return R0({kind:Y,tags:X,content:c.content===""||$.tags?.find((m)=>m[0]==="-")?"":JSON.stringify($),created_at:c.created_at},J)}function Rq(c){if(![lm,ym].includes(c.kind))return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0)return;return{id:$[1],relays:[$[2],Q?.[2]].filter((J)=>typeof J==="string"),author:Q?.[1]}}function Dp(c,{skipVerification:$}={}){let Q=Rq(c);if(Q===void 0||c.content==="")return;let J;try{J=JSON.parse(c.content)}catch(Y){return}if(J.id!==Q.id)return;if(!$&&!zJ(J))return;return J}var Bp={};Lc(Bp,{NOSTR_URI_REGEX:()=>XW,parse:()=>Op,test:()=>Hp});var XW=new RegExp(`nostr:(${Gq.source})`);function Hp(c){return typeof c==="string"&&new RegExp(`^${XW.source}$`).test(c)}function Op(c){let $=c.match(new RegExp(`^${XW.source}$`));if(!$)throw Error(`Invalid Nostr URI: ${c}`);return{uri:$[0],value:$[1],decoded:FY($[1])}}var pp={};Lc(pp,{parse:()=>Ip});function ui(c){if(!c)return;return/^\d+$/.test(c)?parseInt(c,10):c}function Iq(c,$){let Q=c.indexOf(":"),J=c.indexOf(":",Q+1);if(Q===-1||J===-1)return;let Y=parseInt(c.slice(0,Q),10);if(Number.isNaN(Y))return;let X=c.slice(Q+1,J);if(!m0(X))return;return{kind:Y,pubkey:X,identifier:c.slice(J+1),relays:$?[$]:[]}}function ai(c){switch(c[0]){case"E":case"e":if(!c[1]||!m0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&m0(c[3])?c[3]:void 0};case"A":case"a":if(!c[1])return;return Iq(c[1],c[2]);case"I":case"i":if(!c[1])return;return{value:c[1],hint:c[2]}}}function Rp(c){if(!c[1])return;if(c[1].includes(":"))return Iq(c[1],c[2]);if(!m0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&m0(c[3])?c[3]:void 0}}function ki(c){return c.findLast(($)=>$.tagName==="A"||$.tagName==="a")?.pointer||c.findLast(($)=>$.tagName==="I"||$.tagName==="i")?.pointer||c.findLast(($)=>$.tagName==="E"||$.tagName==="e")?.pointer}function bm(c,$){if(!c||!("id"in c)||!c.author)return;let Q=$.find((J)=>J.pubkey===c.author);if(!Q||!Q.relays)return;if(!c.relays)c.relays=[];Q.relays.forEach((J)=>{if(c.relays.indexOf(J)===-1)c.relays.push(J)}),Q.relays=c.relays}function Ip(c){let $={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},Q=[],J=[];for(let Y of c.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let X=ai(Y);if(X)Q.push({tagName:Y[0],pointer:X});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let X=ai(Y);if(X)J.push({tagName:Y[0],pointer:X});continue}if(Y[0]==="K"){$.rootKind=ui(Y[1]);continue}if(Y[0]==="k"){$.replyKind=ui(Y[1]);continue}if(Y[0]==="q"){let X=Rp(Y);if(X)$.quotes.push(X);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&m0(Y[1]))$.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return $.root=ki(Q),$.reply=ki(J),bm($.root,$.profiles),bm($.reply,$.profiles),$.quotes.forEach((Y)=>bm(Y,$.profiles)),$}var Lp={};Lc(Lp,{finishReactionEvent:()=>Zp,getReactedEventPointer:()=>_p});function Zp(c,$,Q){let J=$.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return R0({...c,kind:hm,tags:[...c.tags??[],...J,["e",$.id],["p",$.pubkey]],content:c.content??"+"},Q)}function _p(c){if(c.kind!==hm)return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0||Q===void 0)return;return{id:$[1],relays:[$[2],Q[2]].filter((J)=>J!==void 0),author:Q[1]}}var Sp={};Lc(Sp,{parse:()=>Cp});var Em=/\W/m,li=/[^\w\/] |[^\w\/]$|$|,| /m,Ap=42;function*Cp(c){let $=[];if(typeof c!=="string"){for(let X=0;X<c.tags.length;X++){let m=c.tags[X];if(m[0]==="emoji"&&m.length>=3)$.push({type:"emoji",shortcode:m[1],url:m[2]})}c=c.content}let Q=c.length,J=0,Y=0;c:while(Y<Q){let X=c.indexOf(":",Y),m=c.indexOf("#",Y);if(X===-1&&m===-1)break c;if(X===-1||m>=0&&m<X){if(m===0||c[m-1].match(Em)){let W=c.slice(m+1,m+Ap).match(Em),G=W?m+1+W.index:Q;yield{type:"text",text:c.slice(J,m)},yield{type:"hashtag",value:c.slice(m+1,G)},Y=G,J=Y;continue c}Y=m+1;continue c}if(c.slice(X-5,X)==="nostr"){let W=c.slice(X+60).match(Em),G=W?X+60+W.index:Q;try{let z,{data:x,type:i}=FY(c.slice(X+1,G));switch(i){case"npub":z={pubkey:x};break;case"note":z={id:x};break;case"nsec":Y=G+1;continue;default:z=x}if(J!==X-5)yield{type:"text",text:c.slice(J,X-5)};yield{type:"reference",pointer:z},Y=G,J=Y;continue c}catch(z){Y=X+1;continue c}}else if(c.slice(X-5,X)==="https"||c.slice(X-4,X)==="http"){let W=c.slice(X+4).match(li),G=W?X+4+W.index:Q,z=c[X-1]==="s"?5:4;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(x.pathname)){yield{type:"image",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(x.pathname)){yield{type:"video",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(x.pathname)){yield{type:"audio",url:x.toString()},Y=G,J=Y;continue c}yield{type:"url",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else if(c.slice(X-3,X)==="wss"||c.slice(X-2,X)==="ws"){let W=c.slice(X+4).match(li),G=W?X+4+W.index:Q,z=c[X-1]==="s"?3:2;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};yield{type:"relay",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else{for(let W=0;W<$.length;W++){let G=$[W];if(c[X+G.shortcode.length+1]===":"&&c.slice(X+1,X+G.shortcode.length+1)===G.shortcode){if(J!==X)yield{type:"text",text:c.slice(J,X)};yield G,Y=X+G.shortcode.length+2,J=Y;continue c}}Y=X+1;continue c}}if(J!==Q)yield{type:"text",text:c.slice(J)}}var Pp={};Lc(Pp,{channelCreateEvent:()=>bp,channelHideMessageEvent:()=>Tp,channelMessageEvent:()=>Fp,channelMetadataEvent:()=>Ep,channelMuteUserEvent:()=>fp});var bp=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return R0({kind:ri,tags:[...c.tags??[]],content:Q,created_at:c.created_at},$)},Ep=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return R0({kind:ti,tags:[["e",c.channel_create_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},Fp=(c,$)=>{let Q=[["e",c.channel_create_event_id,c.relay_url,"root"]];if(c.reply_to_channel_message_event_id)Q.push(["e",c.reply_to_channel_message_event_id,c.relay_url,"reply"]);return R0({kind:ei,tags:[...Q,...c.tags??[]],content:c.content,created_at:c.created_at},$)},Tp=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return R0({kind:cq,tags:[["e",c.channel_message_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},fp=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return R0({kind:$q,tags:[["p",c.pubkey_to_mute],...c.tags??[]],content:Q,created_at:c.created_at},$)},np={};Lc(np,{EMOJI_SHORTCODE_REGEX:()=>Lq,matchAll:()=>up,regex:()=>mW,replaceAll:()=>ap});var Lq=/:(\w+):/,mW=()=>new RegExp(`\\B${Lq.source}\\B`,"g");function*up(c){let $=c.matchAll(mW());for(let Q of $)try{let[J,Y]=Q;yield{shortcode:J,name:Y,start:Q.index,end:Q.index+J.length}}catch(J){}}function ap(c,$){return c.replaceAll(mW(),(Q,J)=>{return $({shortcode:Q,name:J})})}var kp={};Lc(kp,{useFetchImplementation:()=>lp,validateGithub:()=>hp});var WW;try{WW=fetch}catch{}function lp(c){WW=c}async function hp(c,$,Q){try{return await(await WW(`https://gist.github.com/${$}/${Q}/raw`)).text()===`Verifying that I control the following Nostr public key: ${c}`}catch(J){return!1}}var yp={};Lc(yp,{makeNwcRequestEvent:()=>gp,parseConnectionString:()=>op});function op(c){let{host:$,pathname:Q,searchParams:J}=new URL(c),Y=Q||$,X=J.getAll("relay"),m=J.get("secret");if(!Y||X.length===0||!m)throw Error("invalid connection string");return{pubkey:Y,relay:X[0],relays:X,secret:m}}async function gp(c,$,Q){let Y=zq($,c,JSON.stringify({method:"pay_invoice",params:{invoice:Q}})),X={kind:Yq,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",c]]};return R0(X,$)}var dp={};Lc(dp,{normalizeIdentifier:()=>sp});function sp(c){return c=c.trim().toLowerCase(),c=c.normalize("NFKC"),Array.from(c).map(($)=>{if(/\p{Letter}/u.test($)||/\p{Number}/u.test($))return $;return"-"}).join("")}var rp={};Lc(rp,{getSatoshisAmountFromBolt11:()=>JR,getZapEndpoint:()=>ep,makeZapReceipt:()=>QR,makeZapRequest:()=>cR,useFetchImplementation:()=>tp,validateZapRequest:()=>$R});var GW;try{GW=fetch}catch{}function tp(c){GW=c}async function ep(c){try{let $="",{lud06:Q,lud16:J}=JSON.parse(c.content);if(J){let[m,W]=J.split("@");$=new URL(`/.well-known/lnurlp/${m}`,`https://${W}`).toString()}else if(Q){let{words:m}=Z8.decode(Q,1000),W=Z8.fromWords(m);$=G8.decode(W)}else return null;let X=await(await GW($)).json();if(X.allowsNostr&&X.nostrPubkey)return X.callback}catch($){}return null}function cR(c){let $={kind:9734,created_at:Math.round(Date.now()/1000),content:c.comment||"",tags:[["p","pubkey"in c?c.pubkey:c.event.pubkey],["amount",c.amount.toString()],["relays",...c.relays]]};if("event"in c){if($.tags.push(["e",c.event.id]),am(c.event.kind)){let Q=["a",`${c.event.kind}:${c.event.pubkey}:`];$.tags.push(Q)}else if(km(c.event.kind)){let Q=c.event.tags.find(([Y,X])=>Y==="d"&&X);if(!Q)throw Error("d tag not found or is empty");let J=["a",`${c.event.kind}:${c.event.pubkey}:${Q[1]}`];$.tags.push(J)}$.tags.push(["k",c.event.kind.toString()])}return $}function $R(c){let $;try{$=JSON.parse(c)}catch(X){return"Invalid zap request JSON."}if(!um($))return"Zap request is not a valid Nostr event.";if(!zJ($))return"Invalid signature on zap request.";let Q=$.tags.find(([X,m])=>X==="p"&&m);if(!Q)return"Zap request doesn't have a 'p' tag.";if(!m0(Q[1]))return"Zap request 'p' tag is not valid hex.";let J=$.tags.find(([X,m])=>X==="e"&&m);if(J&&!m0(J[1]))return"Zap request 'e' tag is not valid hex.";if(!$.tags.find(([X,m])=>X==="relays"&&m))return"Zap request doesn't have a 'relays' tag.";return null}function QR({zapRequest:c,preimage:$,bolt11:Q,paidAt:J}){let Y=JSON.parse(c),X=Y.tags.filter(([W])=>W==="e"||W==="p"||W==="a"),m={kind:9735,created_at:Math.round(J.getTime()/1000),content:"",tags:[...X,["P",Y.pubkey],["bolt11",Q],["description",c]]};if($)m.tags.push(["preimage",$]);return m}function JR(c){if(c.length<50)return 0;c=c.substring(0,50);let $=c.lastIndexOf("1");if($===-1)return 0;let Q=c.substring(0,$);if(!Q.startsWith("lnbc"))return 0;let J=Q.substring(4);if(J.length<1)return 0;let Y=J[J.length-1],X=Y.charCodeAt(0)-48,m=X>=0&&X<=9,W=J.length-1;if(m)W++;if(W<1)return 0;let G=parseInt(J.substring(0,W));switch(Y){case"m":return G*1e5;case"u":return G*100;case"n":return G/10;case"p":return G/1e4;default:return G*1e8}}var YR={};Lc(YR,{Negentropy:()=>_q,NegentropyStorageVector:()=>WR,NegentropySync:()=>GR});var Fm=97,t$=32,Zq=16,X$={Skip:0,Fingerprint:1,IdList:2},W8=class{_raw;length;constructor(c){if(typeof c==="number")this._raw=new Uint8Array(c),this.length=0;else if(c instanceof Uint8Array)this._raw=new Uint8Array(c),this.length=c.length;else this._raw=new Uint8Array(512),this.length=0}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend(c){if(c instanceof W8)c=c.unwrap();if(typeof c.length!=="number")throw Error("bad length");let $=c.length+this.length;if(this.capacity<$){let Q=this._raw,J=Math.max(this.capacity*2,$);this._raw=new Uint8Array(J),this._raw.set(Q)}this._raw.set(c,this.length),this.length+=c.length}shift(){let c=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,c}shiftN(c=1){let $=this._raw.subarray(0,c);return this._raw=this._raw.subarray(c),this.length-=c,$}};function _Y(c){let $=0;while(!0){if(c.length===0)throw Error("parse ends prematurely");let Q=c.shift();if($=$<<7|Q&127,(Q&128)===0)break}return $}function m8(c){if(c===0)return new W8(new Uint8Array([0]));let $=[];while(c!==0)$.push(c&127),c>>>=7;$.reverse();for(let Q=0;Q<$.length-1;Q++)$[Q]|=128;return new W8(new Uint8Array($))}function XR(c){return AY(c,1)[0]}function AY(c,$){if(c.length<$)throw Error("parse ends prematurely");return c.shiftN($)}var mR=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(t$)}add(c){let $=0,Q=0,J=new DataView(this.buf.buffer),Y=new DataView(c.buffer);for(let X=0;X<8;X++){let m=X*4,W=J.getUint32(m,!0),G=Y.getUint32(m,!0),z=W;if(z+=$,z+=G,z>4294967295)Q=1;J.setUint32(m,z&4294967295,!0),$=Q,Q=0}}negate(){let c=new DataView(this.buf.buffer);for(let Q=0;Q<8;Q++){let J=Q*4;c.setUint32(J,~c.getUint32(J,!0))}let $=new Uint8Array(t$);$[0]=1,this.add($)}getFingerprint(c){let $=new W8;return $.extend(this.buf),$.extend(m8(c)),ec($.unwrap()).subarray(0,Zq)}},WR=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert(c,$){if(this.sealed)throw Error("already sealed");let Q=Oc($);if(Q.byteLength!==t$)throw Error("bad id size for added item");this.items.push({timestamp:c,id:Q})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(Tm);for(let c=1;c<this.items.length;c++)if(Tm(this.items[c-1],this.items[c])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem(c){if(this._checkSealed(),c>=this.items.length)throw Error("out of range");return this.items[c]}iterate(c,$,Q){this._checkSealed(),this._checkBounds(c,$);for(let J=c;J<$;++J)if(!Q(this.items[J],J))break}findLowerBound(c,$,Q){return this._checkSealed(),this._checkBounds(c,$),this._binarySearch(this.items,c,$,(J)=>Tm(J,Q)<0)}fingerprint(c,$){let Q=new mR;return Q.setToZero(),this.iterate(c,$,(J)=>{return Q.add(J.id),!0}),Q.getFingerprint($-c)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds(c,$){if(c>$||$>this.items.length)throw Error("bad range")}_binarySearch(c,$,Q,J){let Y=Q-$;while(Y>0){let X=$,m=Math.floor(Y/2);if(X+=m,J(c[X]))$=++X,Y-=m+1;else Y=m}return $}},_q=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor(c,$=60000){if($<4096)throw Error("frameSizeLimit too small");this.storage=c,this.frameSizeLimit=$,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound(c,$){return{timestamp:c,id:$||new Uint8Array(0)}}initiate(){let c=new W8;return c.extend(new Uint8Array([Fm])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),c),Bc(c.unwrap())}reconcile(c,$,Q){let J=new W8(Oc(c));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new W8;Y.extend(new Uint8Array([Fm]));let X=XR(J);if(X<96||X>111)throw Error("invalid negentropy protocol version byte");if(X!==Fm)throw Error("unsupported negentropy protocol version requested: "+(X-96));let m=this.storage.size(),W=this._bound(0),G=0,z=!1;while(J.length!==0){let x=new W8,i=()=>{if(z)z=!1,x.extend(this.encodeBound(W)),x.extend(m8(X$.Skip))},q=this.decodeBound(J),M=_Y(J),N=G,v=this.storage.findLowerBound(G,m,q);if(M===X$.Skip)z=!0;else if(M===X$.Fingerprint){let U=AY(J,Zq),w=this.storage.fingerprint(N,v);if(Sq(U,w)!==0)i(),this.splitRange(N,v,q,x);else z=!0}else if(M===X$.IdList){let U=_Y(J),w={};for(let j=0;j<U;j++){let D=AY(J,t$);w[Bc(D)]=D}if(z=!0,this.storage.iterate(N,v,(j)=>{let D=j.id,_=Bc(D);if(!w[_])$?.(_);else delete w[Bc(D)];return!0}),Q)for(let j of Object.values(w))Q(Bc(j))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+x.length)){let U=this.storage.fingerprint(v,m);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(m8(X$.Fingerprint)),Y.extend(U);break}else Y.extend(x);G=v,W=q}return Y.length===1?null:Bc(Y.unwrap())}splitRange(c,$,Q,J){let Y=$-c,X=16;if(Y<X*2)J.extend(this.encodeBound(Q)),J.extend(m8(X$.IdList)),J.extend(m8(Y)),this.storage.iterate(c,$,(m)=>{return J.extend(m.id),!0});else{let m=Math.floor(Y/X),W=Y%X,G=c;for(let z=0;z<X;z++){let x=m+(z<W?1:0),i=this.storage.fingerprint(G,G+x);G+=x;let q;if(G===$)q=Q;else{let M,N;this.storage.iterate(G-1,G+1,(v,U)=>{if(U===G-1)M=v;else N=v;return!0}),q=this.getMinimalBound(M,N)}J.extend(this.encodeBound(q)),J.extend(m8(X$.Fingerprint)),J.extend(i)}}}exceededFrameSizeLimit(c){return c>this.frameSizeLimit-200}decodeTimestampIn(c){let $=_Y(c);if($=$===0?Number.MAX_VALUE:$-1,this.lastTimestampIn===Number.MAX_VALUE||$===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return $+=this.lastTimestampIn,this.lastTimestampIn=$,$}decodeBound(c){let $=this.decodeTimestampIn(c),Q=_Y(c);if(Q>t$)throw Error("bound key too long");let J=AY(c,Q);return{timestamp:$,id:J}}encodeTimestampOut(c){if(c===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,m8(0);let $=c;return c-=this.lastTimestampOut,this.lastTimestampOut=$,m8(c+1)}encodeBound(c){let $=new W8;return $.extend(this.encodeTimestampOut(c.timestamp)),$.extend(m8(c.id.length)),$.extend(c.id),$}getMinimalBound(c,$){if($.timestamp!==c.timestamp)return this._bound($.timestamp);else{let Q=0,J=$.id,Y=c.id;for(let X=0;X<t$;X++){if(J[X]!==Y[X])break;Q++}return this._bound($.timestamp,$.id.subarray(0,Q+1))}}};function Sq(c,$){for(let Q=0;Q<c.byteLength;Q++){if(c[Q]<$[Q])return-1;if(c[Q]>$[Q])return 1}if(c.byteLength>$.byteLength)return 1;if(c.byteLength<$.byteLength)return-1;return 0}function Tm(c,$){if(c.timestamp===$.timestamp)return Sq(c.id,$.id);return c.timestamp-$.timestamp}var GR=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor(c,$,Q,J={}){this.relay=c,this.storage=$,this.neg=new _q($),this.onhave=J.onhave,this.onneed=J.onneed,this.filter=Q,this.subscription=this.relay.prepareSubscription([{}],{label:J.label||"negentropy"}),this.subscription.oncustom=(Y)=>{switch(Y[0]){case"NEG-MSG":{if(Y.length<3)console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${Y}`);try{let X=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(X)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${X}"]`);else this.close(),J.onclose?.()}catch(X){console.error("negentropy reconcile error:",X),J?.onclose?.(`reconcile error: ${X}`)}break}case"NEG-CLOSE":{let X=Y[2];console.warn("negentropy error:",X),J.onclose?.(X);break}case"NEG-ERR":J.onclose?.()}}}async start(){let c=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${c}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},zR={};Lc(zR,{getToken:()=>xR,hashPayload:()=>zW,unpackEventFromToken:()=>Cq,validateEvent:()=>fq,validateEventKind:()=>bq,validateEventMethodTag:()=>Fq,validateEventPayloadTag:()=>Tq,validateEventTimestamp:()=>Pq,validateEventUrlTag:()=>Eq,validateToken:()=>iR});var Aq="Nostr ";async function xR(c,$,Q,J=!1,Y){let X={kind:om,tags:[["u",c],["method",$]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)X.tags.push(["payload",zW(Y)]);let m=await Q(X);return(J?Aq:"")+H0.encode(p0.encode(JSON.stringify(m)))}async function iR(c,$,Q){let J=await Cq(c).catch((X)=>{throw X});return await fq(J,$,Q).catch((X)=>{throw X})}async function Cq(c){if(!c)throw Error("Missing token");c=c.replace(Aq,"");let $=G8.decode(H0.decode(c));if(!$||$.length===0||!$.startsWith("{"))throw Error("Invalid token");return JSON.parse($)}function Pq(c){if(!c.created_at)return!1;return Math.round(new Date().getTime()/1000)-c.created_at<60}function bq(c){return c.kind===om}function Eq(c,$){let Q=c.tags.find((J)=>J[0]==="u");if(!Q)return!1;return Q.length>0&&Q[1]===$}function Fq(c,$){let Q=c.tags.find((J)=>J[0]==="method");if(!Q)return!1;return Q.length>0&&Q[1].toLowerCase()===$.toLowerCase()}function zW(c){let $=ec(p0.encode(JSON.stringify(c)));return Bc($)}function Tq(c,$){let Q=c.tags.find((Y)=>Y[0]==="payload");if(!Q)return!1;let J=zW($);return Q.length>0&&Q[1]===J}async function fq(c,$,Q,J){if(!zJ(c))throw Error("Invalid nostr event, signature invalid");if(!bq(c))throw Error("Invalid nostr event, kind invalid");if(!Pq(c))throw Error("Invalid nostr event, created_at timestamp invalid");if(!Eq(c,$))throw Error("Invalid nostr event, url tag invalid");if(!Fq(c,Q))throw Error("Invalid nostr event, method tag invalid");if(Boolean(J)&&typeof J==="object"&&Object.keys(J).length>0){if(!Tq(c,J))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function VR(c){let $=c.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test($))throw Error("expected 64-char hex private key");let Q=new Uint8Array(32);for(let J=0;J<32;J++)Q[J]=parseInt($.slice(J*2,J*2+2),16);return Q}function xJ(c){let $=(c??"").trim();if(!$)throw Error("BUZZ_PRIVATE_KEY is empty");let Q;if($.startsWith("nsec")){let Y=EY.decode($);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");Q=Y.data}else Q=VR($);let J=GJ(Q);return{secretKey:Q,pubkeyHex:J,npub:EY.npubEncode(J)}}function z8(c,$){return R0(c,$.secretKey)}function nq(c){return qR("sha256").update(c).digest("hex")}function uq(){return MR()}var NR=["/fig","@figura"];function aq(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function kq(c){return c.replace(/^[\s:,\-—]+/,"").trim()}function lq(c,$={}){let Q=(c??"").trim();if(!Q)return null;let J=$.triggers??NR,Y=null;for(let X of J){let W=new RegExp(`(?:^|\\s)${aq(X)}\\b`,"i").exec(Q);if(W){let G=W.index+W[0].length-X.length;if(!Y||G<Y.index)Y={index:G,end:W.index+W[0].length,via:"trigger"}}}if($.agentNpub){let m=new RegExp(`(?:nostr:)?${aq($.agentNpub)}`,"i").exec(Q);if(m&&(!Y||m.index<Y.index))Y={index:m.index,end:m.index+m[0].length,via:"npub"}}if(Y){let X=kq(Q.slice(Y.end));if(X)return{brief:X,via:Y.via};return null}if($.mentioned){let X=kq(Q);if(X)return{brief:X,via:"mention"}}return null}function wR(c){return c.replace(/^fig\s+/i,"").trim()}function hq(c){let $=(c??"").trim();if(!$)return null;let Q=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec($);if(Q){let X=Q[1].trim();if(X)return{kind:"fig-and-file",description:X}}let J=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec($);if(J){let X=J[1].trim();if(X)return{kind:"file-issue",title:X}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec($);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:wR($)||$}}var yq=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function oq(c,$=yq){return`${($||yq).replace(/\/+$/,"")}/f/${c}`}function uY(c){let Q=[c.title?`Here's your fig: **${c.title}**`:"Here's your fig"];if(c.note)Q.push(c.note);return Q.push(""),Q.push(c.link),Q.join(`
525
- `)}function e$(c){return`Sorry — I couldn't make that fig. ${c}`}function aY(c){return`Filed ${typeof c.number==="number"?`issue #${c.number}`:"the issue"}: **${c.title}**
526
+ `)}async function qq(c){let{flags:$}=t(c);if(k($,"help")||k($,"h")){process.stdout.write(Y2+`
527
+ `);return}if(k($,"session-start")){await G2().catch(()=>{});return}await z2($)}import{readFile as MZ}from"node:fs/promises";var E={};vQ(E,{void:()=>o2,util:()=>wc,unknown:()=>h2,union:()=>r2,undefined:()=>k2,tuple:()=>cD,transformer:()=>xD,symbol:()=>u2,string:()=>Kq,strictObject:()=>s2,setErrorMap:()=>M2,set:()=>JD,record:()=>$D,quotelessJson:()=>x2,promise:()=>zD,preprocess:()=>ND,pipeline:()=>VD,ostring:()=>wD,optional:()=>qD,onumber:()=>iD,oboolean:()=>vD,objectUtil:()=>RW,object:()=>d2,number:()=>Dq,nullable:()=>MD,null:()=>a2,never:()=>y2,nativeEnum:()=>GD,nan:()=>T2,map:()=>QD,makeIssue:()=>$J,literal:()=>WD,lazy:()=>XD,late:()=>b2,isValid:()=>p8,isDirty:()=>EY,isAsync:()=>y$,isAborted:()=>PY,intersection:()=>e2,instanceof:()=>F2,getParsedType:()=>s0,getErrorMap:()=>h$,function:()=>YD,enum:()=>mD,effect:()=>xD,discriminatedUnion:()=>t2,defaultErrorMap:()=>m8,datetimeRegex:()=>vq,date:()=>n2,custom:()=>jq,coerce:()=>UD,boolean:()=>Bq,bigint:()=>f2,array:()=>g2,any:()=>l2,addIssueToContext:()=>n,ZodVoid:()=>JJ,ZodUnknown:()=>I8,ZodUnion:()=>t$,ZodUndefined:()=>s$,ZodType:()=>Mc,ZodTuple:()=>t0,ZodTransformer:()=>l0,ZodSymbol:()=>QJ,ZodString:()=>n0,ZodSet:()=>W$,ZodSchema:()=>Mc,ZodRecord:()=>YJ,ZodReadonly:()=>XQ,ZodPromise:()=>m$,ZodPipeline:()=>mJ,ZodParsedType:()=>F,ZodOptional:()=>k0,ZodObject:()=>Cc,ZodNumber:()=>Z8,ZodNullable:()=>z8,ZodNull:()=>r$,ZodNever:()=>r0,ZodNativeEnum:()=>QQ,ZodNaN:()=>WJ,ZodMap:()=>XJ,ZodLiteral:()=>$Q,ZodLazy:()=>cQ,ZodIssueCode:()=>L,ZodIntersection:()=>e$,ZodFunction:()=>g$,ZodFirstPartyTypeKind:()=>Qc,ZodError:()=>x0,ZodEnum:()=>_8,ZodEffects:()=>l0,ZodDiscriminatedUnion:()=>bY,ZodDefault:()=>JQ,ZodDate:()=>Y$,ZodCatch:()=>YQ,ZodBranded:()=>FY,ZodBoolean:()=>d$,ZodBigInt:()=>L8,ZodArray:()=>u0,ZodAny:()=>X$,Schema:()=>Mc,ParseStatus:()=>oc,OK:()=>ec,NEVER:()=>jD,INVALID:()=>$c,EMPTY_PATH:()=>N2,DIRTY:()=>J$,BRAND:()=>E2});var wc;(function(c){c.assertEqual=(Y)=>{};function $(Y){}c.assertIs=$;function Q(Y){throw Error()}c.assertNever=Q,c.arrayToEnum=(Y)=>{let X={};for(let W of Y)X[W]=W;return X},c.getValidEnumValues=(Y)=>{let X=c.objectKeys(Y).filter((m)=>typeof Y[Y[m]]!=="number"),W={};for(let m of X)W[m]=Y[m];return c.objectValues(W)},c.objectValues=(Y)=>{return c.objectKeys(Y).map(function(X){return Y[X]})},c.objectKeys=typeof Object.keys==="function"?(Y)=>Object.keys(Y):(Y)=>{let X=[];for(let W in Y)if(Object.prototype.hasOwnProperty.call(Y,W))X.push(W);return X},c.find=(Y,X)=>{for(let W of Y)if(X(W))return W;return},c.isInteger=typeof Number.isInteger==="function"?(Y)=>Number.isInteger(Y):(Y)=>typeof Y==="number"&&Number.isFinite(Y)&&Math.floor(Y)===Y;function J(Y,X=" | "){return Y.map((W)=>typeof W==="string"?`'${W}'`:W).join(X)}c.joinValues=J,c.jsonStringifyReplacer=(Y,X)=>{if(typeof X==="bigint")return X.toString();return X}})(wc||(wc={}));var RW;(function(c){c.mergeShapes=($,Q)=>{return{...$,...Q}}})(RW||(RW={}));var F=wc.arrayToEnum(["string","nan","number","integer","float","boolean","date","bigint","symbol","function","undefined","null","array","object","unknown","promise","void","never","map","set"]),s0=(c)=>{switch(typeof c){case"undefined":return F.undefined;case"string":return F.string;case"number":return Number.isNaN(c)?F.nan:F.number;case"boolean":return F.boolean;case"function":return F.function;case"bigint":return F.bigint;case"symbol":return F.symbol;case"object":if(Array.isArray(c))return F.array;if(c===null)return F.null;if(c.then&&typeof c.then==="function"&&c.catch&&typeof c.catch==="function")return F.promise;if(typeof Map<"u"&&c instanceof Map)return F.map;if(typeof Set<"u"&&c instanceof Set)return F.set;if(typeof Date<"u"&&c instanceof Date)return F.date;return F.object;default:return F.unknown}};var L=wc.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"]),x2=(c)=>{return JSON.stringify(c,null,2).replace(/"([^"]+)":/g,"$1:")};class x0 extends Error{get errors(){return this.issues}constructor(c){super();this.issues=[],this.addIssue=(Q)=>{this.issues=[...this.issues,Q]},this.addIssues=(Q=[])=>{this.issues=[...this.issues,...Q]};let $=new.target.prototype;if(Object.setPrototypeOf)Object.setPrototypeOf(this,$);else this.__proto__=$;this.name="ZodError",this.issues=c}format(c){let $=c||function(Y){return Y.message},Q={_errors:[]},J=(Y)=>{for(let X of Y.issues)if(X.code==="invalid_union")X.unionErrors.map(J);else if(X.code==="invalid_return_type")J(X.returnTypeError);else if(X.code==="invalid_arguments")J(X.argumentsError);else if(X.path.length===0)Q._errors.push($(X));else{let W=Q,m=0;while(m<X.path.length){let G=X.path[m];if(m!==X.path.length-1)W[G]=W[G]||{_errors:[]};else W[G]=W[G]||{_errors:[]},W[G]._errors.push($(X));W=W[G],m++}}};return J(this),Q}static assert(c){if(!(c instanceof x0))throw Error(`Not a ZodError: ${c}`)}toString(){return this.message}get message(){return JSON.stringify(this.issues,wc.jsonStringifyReplacer,2)}get isEmpty(){return this.issues.length===0}flatten(c=($)=>$.message){let $={},Q=[];for(let J of this.issues)if(J.path.length>0){let Y=J.path[0];$[Y]=$[Y]||[],$[Y].push(c(J))}else Q.push(c(J));return{formErrors:Q,fieldErrors:$}}get formErrors(){return this.flatten()}}x0.create=(c)=>{return new x0(c)};var q2=(c,$)=>{let Q;switch(c.code){case L.invalid_type:if(c.received===F.undefined)Q="Required";else Q=`Expected ${c.expected}, received ${c.received}`;break;case L.invalid_literal:Q=`Invalid literal value, expected ${JSON.stringify(c.expected,wc.jsonStringifyReplacer)}`;break;case L.unrecognized_keys:Q=`Unrecognized key(s) in object: ${wc.joinValues(c.keys,", ")}`;break;case L.invalid_union:Q="Invalid input";break;case L.invalid_union_discriminator:Q=`Invalid discriminator value. Expected ${wc.joinValues(c.options)}`;break;case L.invalid_enum_value:Q=`Invalid enum value. Expected ${wc.joinValues(c.options)}, received '${c.received}'`;break;case L.invalid_arguments:Q="Invalid function arguments";break;case L.invalid_return_type:Q="Invalid function return type";break;case L.invalid_date:Q="Invalid date";break;case L.invalid_string:if(typeof c.validation==="object")if("includes"in c.validation){if(Q=`Invalid input: must include "${c.validation.includes}"`,typeof c.validation.position==="number")Q=`${Q} at one or more positions greater than or equal to ${c.validation.position}`}else if("startsWith"in c.validation)Q=`Invalid input: must start with "${c.validation.startsWith}"`;else if("endsWith"in c.validation)Q=`Invalid input: must end with "${c.validation.endsWith}"`;else wc.assertNever(c.validation);else if(c.validation!=="regex")Q=`Invalid ${c.validation}`;else Q="Invalid";break;case L.too_small:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at least":"more than"} ${c.minimum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at least":"over"} ${c.minimum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="bigint")Q=`Number must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${c.minimum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly equal to ":c.inclusive?"greater than or equal to ":"greater than "}${new Date(Number(c.minimum))}`;else Q="Invalid input";break;case L.too_big:if(c.type==="array")Q=`Array must contain ${c.exact?"exactly":c.inclusive?"at most":"less than"} ${c.maximum} element(s)`;else if(c.type==="string")Q=`String must contain ${c.exact?"exactly":c.inclusive?"at most":"under"} ${c.maximum} character(s)`;else if(c.type==="number")Q=`Number must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="bigint")Q=`BigInt must be ${c.exact?"exactly":c.inclusive?"less than or equal to":"less than"} ${c.maximum}`;else if(c.type==="date")Q=`Date must be ${c.exact?"exactly":c.inclusive?"smaller than or equal to":"smaller than"} ${new Date(Number(c.maximum))}`;else Q="Invalid input";break;case L.custom:Q="Invalid input";break;case L.invalid_intersection_types:Q="Intersection results could not be merged";break;case L.not_multiple_of:Q=`Number must be a multiple of ${c.multipleOf}`;break;case L.not_finite:Q="Number must be finite";break;default:Q=$.defaultError,wc.assertNever(c)}return{message:Q}},m8=q2;var Mq=m8;function M2(c){Mq=c}function h$(){return Mq}var $J=(c)=>{let{data:$,path:Q,errorMaps:J,issueData:Y}=c,X=[...Q,...Y.path||[]],W={...Y,path:X};if(Y.message!==void 0)return{...Y,path:X,message:Y.message};let m="",G=J.filter((z)=>!!z).slice().reverse();for(let z of G)m=z(W,{data:$,defaultError:m}).message;return{...Y,path:X,message:m}},N2=[];function n(c,$){let Q=h$(),J=$J({issueData:$,data:c.data,path:c.path,errorMaps:[c.common.contextualErrorMap,c.schemaErrorMap,Q,Q===m8?void 0:m8].filter((Y)=>!!Y)});c.common.issues.push(J)}class oc{constructor(){this.value="valid"}dirty(){if(this.value==="valid")this.value="dirty"}abort(){if(this.value!=="aborted")this.value="aborted"}static mergeArray(c,$){let Q=[];for(let J of $){if(J.status==="aborted")return $c;if(J.status==="dirty")c.dirty();Q.push(J.value)}return{status:c.value,value:Q}}static async mergeObjectAsync(c,$){let Q=[];for(let J of $){let Y=await J.key,X=await J.value;Q.push({key:Y,value:X})}return oc.mergeObjectSync(c,Q)}static mergeObjectSync(c,$){let Q={};for(let J of $){let{key:Y,value:X}=J;if(Y.status==="aborted")return $c;if(X.status==="aborted")return $c;if(Y.status==="dirty")c.dirty();if(X.status==="dirty")c.dirty();if(Y.value!=="__proto__"&&(typeof X.value<"u"||J.alwaysSet))Q[Y.value]=X.value}return{status:c.value,value:Q}}}var $c=Object.freeze({status:"aborted"}),J$=(c)=>({status:"dirty",value:c}),ec=(c)=>({status:"valid",value:c}),PY=(c)=>c.status==="aborted",EY=(c)=>c.status==="dirty",p8=(c)=>c.status==="valid",y$=(c)=>typeof Promise<"u"&&c instanceof Promise;var s;(function(c){c.errToObj=($)=>typeof $==="string"?{message:$}:$||{},c.toString=($)=>typeof $==="string"?$:$?.message})(s||(s={}));class a0{constructor(c,$,Q,J){this._cachedPath=[],this.parent=c,this.data=$,this._path=Q,this._key=J}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}}var Nq=(c,$)=>{if(p8($))return{success:!0,data:$.value};else{if(!c.common.issues.length)throw Error("Validation failed but no issues detected.");return{success:!1,get error(){if(this._error)return this._error;let Q=new x0(c.common.issues);return this._error=Q,this._error}}}};function zc(c){if(!c)return{};let{errorMap:$,invalid_type_error:Q,required_error:J,description:Y}=c;if($&&(Q||J))throw Error(`Can't use "invalid_type_error" or "required_error" in conjunction with custom error map.`);if($)return{errorMap:$,description:Y};return{errorMap:(W,m)=>{let{message:G}=c;if(W.code==="invalid_enum_value")return{message:G??m.defaultError};if(typeof m.data>"u")return{message:G??J??m.defaultError};if(W.code!=="invalid_type")return{message:m.defaultError};return{message:G??Q??m.defaultError}},description:Y}}class Mc{get description(){return this._def.description}_getType(c){return s0(c.data)}_getOrReturnCtx(c,$){return $||{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}_processInputParams(c){return{status:new oc,ctx:{common:c.parent.common,data:c.data,parsedType:s0(c.data),schemaErrorMap:this._def.errorMap,path:c.path,parent:c.parent}}}_parseSync(c){let $=this._parse(c);if(y$($))throw Error("Synchronous parse encountered promise.");return $}_parseAsync(c){let $=this._parse(c);return Promise.resolve($)}parse(c,$){let Q=this.safeParse(c,$);if(Q.success)return Q.data;throw Q.error}safeParse(c,$){let Q={common:{issues:[],async:$?.async??!1,contextualErrorMap:$?.errorMap},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parseSync({data:c,path:Q.path,parent:Q});return Nq(Q,J)}"~validate"(c){let $={common:{issues:[],async:!!this["~standard"].async},path:[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)};if(!this["~standard"].async)try{let Q=this._parseSync({data:c,path:[],parent:$});return p8(Q)?{value:Q.value}:{issues:$.common.issues}}catch(Q){if(Q?.message?.toLowerCase()?.includes("encountered"))this["~standard"].async=!0;$.common={issues:[],async:!0}}return this._parseAsync({data:c,path:[],parent:$}).then((Q)=>p8(Q)?{value:Q.value}:{issues:$.common.issues})}async parseAsync(c,$){let Q=await this.safeParseAsync(c,$);if(Q.success)return Q.data;throw Q.error}async safeParseAsync(c,$){let Q={common:{issues:[],contextualErrorMap:$?.errorMap,async:!0},path:$?.path||[],schemaErrorMap:this._def.errorMap,parent:null,data:c,parsedType:s0(c)},J=this._parse({data:c,path:Q.path,parent:Q}),Y=await(y$(J)?J:Promise.resolve(J));return Nq(Q,Y)}refine(c,$){let Q=(J)=>{if(typeof $==="string"||typeof $>"u")return{message:$};else if(typeof $==="function")return $(J);else return $};return this._refinement((J,Y)=>{let X=c(J),W=()=>Y.addIssue({code:L.custom,...Q(J)});if(typeof Promise<"u"&&X instanceof Promise)return X.then((m)=>{if(!m)return W(),!1;else return!0});if(!X)return W(),!1;else return!0})}refinement(c,$){return this._refinement((Q,J)=>{if(!c(Q))return J.addIssue(typeof $==="function"?$(Q,J):$),!1;else return!0})}_refinement(c){return new l0({schema:this,typeName:Qc.ZodEffects,effect:{type:"refinement",refinement:c}})}superRefine(c){return this._refinement(c)}constructor(c){this.spa=this.safeParseAsync,this._def=c,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:($)=>this["~validate"]($)}}optional(){return k0.create(this,this._def)}nullable(){return z8.create(this,this._def)}nullish(){return this.nullable().optional()}array(){return u0.create(this)}promise(){return m$.create(this,this._def)}or(c){return t$.create([this,c],this._def)}and(c){return e$.create(this,c,this._def)}transform(c){return new l0({...zc(this._def),schema:this,typeName:Qc.ZodEffects,effect:{type:"transform",transform:c}})}default(c){let $=typeof c==="function"?c:()=>c;return new JQ({...zc(this._def),innerType:this,defaultValue:$,typeName:Qc.ZodDefault})}brand(){return new FY({typeName:Qc.ZodBranded,type:this,...zc(this._def)})}catch(c){let $=typeof c==="function"?c:()=>c;return new YQ({...zc(this._def),innerType:this,catchValue:$,typeName:Qc.ZodCatch})}describe(c){return new this.constructor({...this._def,description:c})}pipe(c){return mJ.create(this,c)}readonly(){return XQ.create(this)}isOptional(){return this.safeParse(void 0).success}isNullable(){return this.safeParse(null).success}}var V2=/^c[^\s-]{8,}$/i,w2=/^[0-9a-z]+$/,i2=/^[0-9A-HJKMNP-TV-Z]{26}$/i,v2=/^[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,U2=/^[a-z0-9_-]{21}$/i,j2=/^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/,K2=/^[-+]?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)?)??$/,D2=/^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i,B2="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$",pW,H2=/^(?:(?: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])$/,O2=/^(?:(?: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])$/,R2=/^(([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]))$/,p2=/^(([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])$/,I2=/^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/,Z2=/^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/,wq="((\\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])))",L2=new RegExp(`^${wq}$`);function iq(c){let $="[0-5]\\d";if(c.precision)$=`${$}\\.\\d{${c.precision}}`;else if(c.precision==null)$=`${$}(\\.\\d+)?`;let Q=c.precision?"+":"?";return`([01]\\d|2[0-3]):[0-5]\\d(:${$})${Q}`}function _2(c){return new RegExp(`^${iq(c)}$`)}function vq(c){let $=`${wq}T${iq(c)}`,Q=[];if(Q.push(c.local?"Z?":"Z"),c.offset)Q.push("([+-]\\d{2}:?\\d{2})");return $=`${$}(${Q.join("|")})`,new RegExp(`^${$}$`)}function S2(c,$){if(($==="v4"||!$)&&H2.test(c))return!0;if(($==="v6"||!$)&&R2.test(c))return!0;return!1}function A2(c,$){if(!j2.test(c))return!1;try{let[Q]=c.split(".");if(!Q)return!1;let J=Q.replace(/-/g,"+").replace(/_/g,"/").padEnd(Q.length+(4-Q.length%4)%4,"="),Y=JSON.parse(atob(J));if(typeof Y!=="object"||Y===null)return!1;if("typ"in Y&&Y?.typ!=="JWT")return!1;if(!Y.alg)return!1;if($&&Y.alg!==$)return!1;return!0}catch{return!1}}function C2(c,$){if(($==="v4"||!$)&&O2.test(c))return!0;if(($==="v6"||!$)&&p2.test(c))return!0;return!1}class n0 extends Mc{_parse(c){if(this._def.coerce)c.data=String(c.data);if(this._getType(c)!==F.string){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.string,received:Y.parsedType}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.length<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="max"){if(c.data.length>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!1,message:Y.message}),Q.dirty()}else if(Y.kind==="length"){let X=c.data.length>Y.value,W=c.data.length<Y.value;if(X||W){if(J=this._getOrReturnCtx(c,J),X)n(J,{code:L.too_big,maximum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});else if(W)n(J,{code:L.too_small,minimum:Y.value,type:"string",inclusive:!0,exact:!0,message:Y.message});Q.dirty()}}else if(Y.kind==="email"){if(!D2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"email",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="emoji"){if(!pW)pW=new RegExp(B2,"u");if(!pW.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"emoji",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="uuid"){if(!v2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"uuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="nanoid"){if(!U2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"nanoid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid"){if(!V2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cuid2"){if(!w2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"cuid2",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ulid"){if(!i2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"ulid",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="url")try{new URL(c.data)}catch{J=this._getOrReturnCtx(c,J),n(J,{validation:"url",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="regex"){if(Y.regex.lastIndex=0,!Y.regex.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"regex",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="trim")c.data=c.data.trim();else if(Y.kind==="includes"){if(!c.data.includes(Y.value,Y.position))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{includes:Y.value,position:Y.position},message:Y.message}),Q.dirty()}else if(Y.kind==="toLowerCase")c.data=c.data.toLowerCase();else if(Y.kind==="toUpperCase")c.data=c.data.toUpperCase();else if(Y.kind==="startsWith"){if(!c.data.startsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{startsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="endsWith"){if(!c.data.endsWith(Y.value))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:{endsWith:Y.value},message:Y.message}),Q.dirty()}else if(Y.kind==="datetime"){if(!vq(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"datetime",message:Y.message}),Q.dirty()}else if(Y.kind==="date"){if(!L2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"date",message:Y.message}),Q.dirty()}else if(Y.kind==="time"){if(!_2(Y).test(c.data))J=this._getOrReturnCtx(c,J),n(J,{code:L.invalid_string,validation:"time",message:Y.message}),Q.dirty()}else if(Y.kind==="duration"){if(!K2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"duration",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="ip"){if(!S2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"ip",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="jwt"){if(!A2(c.data,Y.alg))J=this._getOrReturnCtx(c,J),n(J,{validation:"jwt",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="cidr"){if(!C2(c.data,Y.version))J=this._getOrReturnCtx(c,J),n(J,{validation:"cidr",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64"){if(!I2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64",code:L.invalid_string,message:Y.message}),Q.dirty()}else if(Y.kind==="base64url"){if(!Z2.test(c.data))J=this._getOrReturnCtx(c,J),n(J,{validation:"base64url",code:L.invalid_string,message:Y.message}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:c.data}}_regex(c,$,Q){return this.refinement((J)=>c.test(J),{validation:$,code:L.invalid_string,...s.errToObj(Q)})}_addCheck(c){return new n0({...this._def,checks:[...this._def.checks,c]})}email(c){return this._addCheck({kind:"email",...s.errToObj(c)})}url(c){return this._addCheck({kind:"url",...s.errToObj(c)})}emoji(c){return this._addCheck({kind:"emoji",...s.errToObj(c)})}uuid(c){return this._addCheck({kind:"uuid",...s.errToObj(c)})}nanoid(c){return this._addCheck({kind:"nanoid",...s.errToObj(c)})}cuid(c){return this._addCheck({kind:"cuid",...s.errToObj(c)})}cuid2(c){return this._addCheck({kind:"cuid2",...s.errToObj(c)})}ulid(c){return this._addCheck({kind:"ulid",...s.errToObj(c)})}base64(c){return this._addCheck({kind:"base64",...s.errToObj(c)})}base64url(c){return this._addCheck({kind:"base64url",...s.errToObj(c)})}jwt(c){return this._addCheck({kind:"jwt",...s.errToObj(c)})}ip(c){return this._addCheck({kind:"ip",...s.errToObj(c)})}cidr(c){return this._addCheck({kind:"cidr",...s.errToObj(c)})}datetime(c){if(typeof c==="string")return this._addCheck({kind:"datetime",precision:null,offset:!1,local:!1,message:c});return this._addCheck({kind:"datetime",precision:typeof c?.precision>"u"?null:c?.precision,offset:c?.offset??!1,local:c?.local??!1,...s.errToObj(c?.message)})}date(c){return this._addCheck({kind:"date",message:c})}time(c){if(typeof c==="string")return this._addCheck({kind:"time",precision:null,message:c});return this._addCheck({kind:"time",precision:typeof c?.precision>"u"?null:c?.precision,...s.errToObj(c?.message)})}duration(c){return this._addCheck({kind:"duration",...s.errToObj(c)})}regex(c,$){return this._addCheck({kind:"regex",regex:c,...s.errToObj($)})}includes(c,$){return this._addCheck({kind:"includes",value:c,position:$?.position,...s.errToObj($?.message)})}startsWith(c,$){return this._addCheck({kind:"startsWith",value:c,...s.errToObj($)})}endsWith(c,$){return this._addCheck({kind:"endsWith",value:c,...s.errToObj($)})}min(c,$){return this._addCheck({kind:"min",value:c,...s.errToObj($)})}max(c,$){return this._addCheck({kind:"max",value:c,...s.errToObj($)})}length(c,$){return this._addCheck({kind:"length",value:c,...s.errToObj($)})}nonempty(c){return this.min(1,s.errToObj(c))}trim(){return new n0({...this._def,checks:[...this._def.checks,{kind:"trim"}]})}toLowerCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toLowerCase"}]})}toUpperCase(){return new n0({...this._def,checks:[...this._def.checks,{kind:"toUpperCase"}]})}get isDatetime(){return!!this._def.checks.find((c)=>c.kind==="datetime")}get isDate(){return!!this._def.checks.find((c)=>c.kind==="date")}get isTime(){return!!this._def.checks.find((c)=>c.kind==="time")}get isDuration(){return!!this._def.checks.find((c)=>c.kind==="duration")}get isEmail(){return!!this._def.checks.find((c)=>c.kind==="email")}get isURL(){return!!this._def.checks.find((c)=>c.kind==="url")}get isEmoji(){return!!this._def.checks.find((c)=>c.kind==="emoji")}get isUUID(){return!!this._def.checks.find((c)=>c.kind==="uuid")}get isNANOID(){return!!this._def.checks.find((c)=>c.kind==="nanoid")}get isCUID(){return!!this._def.checks.find((c)=>c.kind==="cuid")}get isCUID2(){return!!this._def.checks.find((c)=>c.kind==="cuid2")}get isULID(){return!!this._def.checks.find((c)=>c.kind==="ulid")}get isIP(){return!!this._def.checks.find((c)=>c.kind==="ip")}get isCIDR(){return!!this._def.checks.find((c)=>c.kind==="cidr")}get isBase64(){return!!this._def.checks.find((c)=>c.kind==="base64")}get isBase64url(){return!!this._def.checks.find((c)=>c.kind==="base64url")}get minLength(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxLength(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}n0.create=(c)=>{return new n0({checks:[],typeName:Qc.ZodString,coerce:c?.coerce??!1,...zc(c)})};function P2(c,$){let Q=(c.toString().split(".")[1]||"").length,J=($.toString().split(".")[1]||"").length,Y=Q>J?Q:J,X=Number.parseInt(c.toFixed(Y).replace(".","")),W=Number.parseInt($.toFixed(Y).replace(".",""));return X%W/10**Y}class Z8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte,this.step=this.multipleOf}_parse(c){if(this._def.coerce)c.data=Number(c.data);if(this._getType(c)!==F.number){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.number,received:Y.parsedType}),$c}let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="int"){if(!wc.isInteger(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.invalid_type,expected:"integer",received:"float",message:Y.message}),J.dirty()}else if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,minimum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,maximum:Y.value,type:"number",inclusive:Y.inclusive,exact:!1,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(P2(c.data,Y.value)!==0)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else if(Y.kind==="finite"){if(!Number.isFinite(c.data))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_finite,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new Z8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new Z8({...this._def,checks:[...this._def.checks,c]})}int(c){return this._addCheck({kind:"int",message:s.toString(c)})}positive(c){return this._addCheck({kind:"min",value:0,inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:0,inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:0,inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:0,inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}finite(c){return this._addCheck({kind:"finite",message:s.toString(c)})}safe(c){return this._addCheck({kind:"min",inclusive:!0,value:Number.MIN_SAFE_INTEGER,message:s.toString(c)})._addCheck({kind:"max",inclusive:!0,value:Number.MAX_SAFE_INTEGER,message:s.toString(c)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}get isInt(){return!!this._def.checks.find((c)=>c.kind==="int"||c.kind==="multipleOf"&&wc.isInteger(c.value))}get isFinite(){let c=null,$=null;for(let Q of this._def.checks)if(Q.kind==="finite"||Q.kind==="int"||Q.kind==="multipleOf")return!0;else if(Q.kind==="min"){if($===null||Q.value>$)$=Q.value}else if(Q.kind==="max"){if(c===null||Q.value<c)c=Q.value}return Number.isFinite($)&&Number.isFinite(c)}}Z8.create=(c)=>{return new Z8({checks:[],typeName:Qc.ZodNumber,coerce:c?.coerce||!1,...zc(c)})};class L8 extends Mc{constructor(){super(...arguments);this.min=this.gte,this.max=this.lte}_parse(c){if(this._def.coerce)try{c.data=BigInt(c.data)}catch{return this._getInvalidInput(c)}if(this._getType(c)!==F.bigint)return this._getInvalidInput(c);let Q=void 0,J=new oc;for(let Y of this._def.checks)if(Y.kind==="min"){if(Y.inclusive?c.data<Y.value:c.data<=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_small,type:"bigint",minimum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="max"){if(Y.inclusive?c.data>Y.value:c.data>=Y.value)Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.too_big,type:"bigint",maximum:Y.value,inclusive:Y.inclusive,message:Y.message}),J.dirty()}else if(Y.kind==="multipleOf"){if(c.data%Y.value!==BigInt(0))Q=this._getOrReturnCtx(c,Q),n(Q,{code:L.not_multiple_of,multipleOf:Y.value,message:Y.message}),J.dirty()}else wc.assertNever(Y);return{status:J.value,value:c.data}}_getInvalidInput(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.bigint,received:$.parsedType}),$c}gte(c,$){return this.setLimit("min",c,!0,s.toString($))}gt(c,$){return this.setLimit("min",c,!1,s.toString($))}lte(c,$){return this.setLimit("max",c,!0,s.toString($))}lt(c,$){return this.setLimit("max",c,!1,s.toString($))}setLimit(c,$,Q,J){return new L8({...this._def,checks:[...this._def.checks,{kind:c,value:$,inclusive:Q,message:s.toString(J)}]})}_addCheck(c){return new L8({...this._def,checks:[...this._def.checks,c]})}positive(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!1,message:s.toString(c)})}negative(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!1,message:s.toString(c)})}nonpositive(c){return this._addCheck({kind:"max",value:BigInt(0),inclusive:!0,message:s.toString(c)})}nonnegative(c){return this._addCheck({kind:"min",value:BigInt(0),inclusive:!0,message:s.toString(c)})}multipleOf(c,$){return this._addCheck({kind:"multipleOf",value:c,message:s.toString($)})}get minValue(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c}get maxValue(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c}}L8.create=(c)=>{return new L8({checks:[],typeName:Qc.ZodBigInt,coerce:c?.coerce??!1,...zc(c)})};class d$ extends Mc{_parse(c){if(this._def.coerce)c.data=Boolean(c.data);if(this._getType(c)!==F.boolean){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.boolean,received:Q.parsedType}),$c}return ec(c.data)}}d$.create=(c)=>{return new d$({typeName:Qc.ZodBoolean,coerce:c?.coerce||!1,...zc(c)})};class Y$ extends Mc{_parse(c){if(this._def.coerce)c.data=new Date(c.data);if(this._getType(c)!==F.date){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_type,expected:F.date,received:Y.parsedType}),$c}if(Number.isNaN(c.data.getTime())){let Y=this._getOrReturnCtx(c);return n(Y,{code:L.invalid_date}),$c}let Q=new oc,J=void 0;for(let Y of this._def.checks)if(Y.kind==="min"){if(c.data.getTime()<Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_small,message:Y.message,inclusive:!0,exact:!1,minimum:Y.value,type:"date"}),Q.dirty()}else if(Y.kind==="max"){if(c.data.getTime()>Y.value)J=this._getOrReturnCtx(c,J),n(J,{code:L.too_big,message:Y.message,inclusive:!0,exact:!1,maximum:Y.value,type:"date"}),Q.dirty()}else wc.assertNever(Y);return{status:Q.value,value:new Date(c.data.getTime())}}_addCheck(c){return new Y$({...this._def,checks:[...this._def.checks,c]})}min(c,$){return this._addCheck({kind:"min",value:c.getTime(),message:s.toString($)})}max(c,$){return this._addCheck({kind:"max",value:c.getTime(),message:s.toString($)})}get minDate(){let c=null;for(let $ of this._def.checks)if($.kind==="min"){if(c===null||$.value>c)c=$.value}return c!=null?new Date(c):null}get maxDate(){let c=null;for(let $ of this._def.checks)if($.kind==="max"){if(c===null||$.value<c)c=$.value}return c!=null?new Date(c):null}}Y$.create=(c)=>{return new Y$({checks:[],coerce:c?.coerce||!1,typeName:Qc.ZodDate,...zc(c)})};class QJ extends Mc{_parse(c){if(this._getType(c)!==F.symbol){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.symbol,received:Q.parsedType}),$c}return ec(c.data)}}QJ.create=(c)=>{return new QJ({typeName:Qc.ZodSymbol,...zc(c)})};class s$ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.undefined,received:Q.parsedType}),$c}return ec(c.data)}}s$.create=(c)=>{return new s$({typeName:Qc.ZodUndefined,...zc(c)})};class r$ extends Mc{_parse(c){if(this._getType(c)!==F.null){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.null,received:Q.parsedType}),$c}return ec(c.data)}}r$.create=(c)=>{return new r$({typeName:Qc.ZodNull,...zc(c)})};class X$ extends Mc{constructor(){super(...arguments);this._any=!0}_parse(c){return ec(c.data)}}X$.create=(c)=>{return new X$({typeName:Qc.ZodAny,...zc(c)})};class I8 extends Mc{constructor(){super(...arguments);this._unknown=!0}_parse(c){return ec(c.data)}}I8.create=(c)=>{return new I8({typeName:Qc.ZodUnknown,...zc(c)})};class r0 extends Mc{_parse(c){let $=this._getOrReturnCtx(c);return n($,{code:L.invalid_type,expected:F.never,received:$.parsedType}),$c}}r0.create=(c)=>{return new r0({typeName:Qc.ZodNever,...zc(c)})};class JJ extends Mc{_parse(c){if(this._getType(c)!==F.undefined){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.void,received:Q.parsedType}),$c}return ec(c.data)}}JJ.create=(c)=>{return new JJ({typeName:Qc.ZodVoid,...zc(c)})};class u0 extends Mc{_parse(c){let{ctx:$,status:Q}=this._processInputParams(c),J=this._def;if($.parsedType!==F.array)return n($,{code:L.invalid_type,expected:F.array,received:$.parsedType}),$c;if(J.exactLength!==null){let X=$.data.length>J.exactLength.value,W=$.data.length<J.exactLength.value;if(X||W)n($,{code:X?L.too_big:L.too_small,minimum:W?J.exactLength.value:void 0,maximum:X?J.exactLength.value:void 0,type:"array",inclusive:!0,exact:!0,message:J.exactLength.message}),Q.dirty()}if(J.minLength!==null){if($.data.length<J.minLength.value)n($,{code:L.too_small,minimum:J.minLength.value,type:"array",inclusive:!0,exact:!1,message:J.minLength.message}),Q.dirty()}if(J.maxLength!==null){if($.data.length>J.maxLength.value)n($,{code:L.too_big,maximum:J.maxLength.value,type:"array",inclusive:!0,exact:!1,message:J.maxLength.message}),Q.dirty()}if($.common.async)return Promise.all([...$.data].map((X,W)=>{return J.type._parseAsync(new a0($,X,$.path,W))})).then((X)=>{return oc.mergeArray(Q,X)});let Y=[...$.data].map((X,W)=>{return J.type._parseSync(new a0($,X,$.path,W))});return oc.mergeArray(Q,Y)}get element(){return this._def.type}min(c,$){return new u0({...this._def,minLength:{value:c,message:s.toString($)}})}max(c,$){return new u0({...this._def,maxLength:{value:c,message:s.toString($)}})}length(c,$){return new u0({...this._def,exactLength:{value:c,message:s.toString($)}})}nonempty(c){return this.min(1,c)}}u0.create=(c,$)=>{return new u0({type:c,minLength:null,maxLength:null,exactLength:null,typeName:Qc.ZodArray,...zc($)})};function o$(c){if(c instanceof Cc){let $={};for(let Q in c.shape){let J=c.shape[Q];$[Q]=k0.create(o$(J))}return new Cc({...c._def,shape:()=>$})}else if(c instanceof u0)return new u0({...c._def,type:o$(c.element)});else if(c instanceof k0)return k0.create(o$(c.unwrap()));else if(c instanceof z8)return z8.create(o$(c.unwrap()));else if(c instanceof t0)return t0.create(c.items.map(($)=>o$($)));else return c}class Cc extends Mc{constructor(){super(...arguments);this._cached=null,this.nonstrict=this.passthrough,this.augment=this.extend}_getCached(){if(this._cached!==null)return this._cached;let c=this._def.shape(),$=wc.objectKeys(c);return this._cached={shape:c,keys:$},this._cached}_parse(c){if(this._getType(c)!==F.object){let G=this._getOrReturnCtx(c);return n(G,{code:L.invalid_type,expected:F.object,received:G.parsedType}),$c}let{status:Q,ctx:J}=this._processInputParams(c),{shape:Y,keys:X}=this._getCached(),W=[];if(!(this._def.catchall instanceof r0&&this._def.unknownKeys==="strip")){for(let G in J.data)if(!X.includes(G))W.push(G)}let m=[];for(let G of X){let z=Y[G],x=J.data[G];m.push({key:{status:"valid",value:G},value:z._parse(new a0(J,x,J.path,G)),alwaysSet:G in J.data})}if(this._def.catchall instanceof r0){let G=this._def.unknownKeys;if(G==="passthrough")for(let z of W)m.push({key:{status:"valid",value:z},value:{status:"valid",value:J.data[z]}});else if(G==="strict"){if(W.length>0)n(J,{code:L.unrecognized_keys,keys:W}),Q.dirty()}else if(G==="strip");else throw Error("Internal ZodObject error: invalid unknownKeys value.")}else{let G=this._def.catchall;for(let z of W){let x=J.data[z];m.push({key:{status:"valid",value:z},value:G._parse(new a0(J,x,J.path,z)),alwaysSet:z in J.data})}}if(J.common.async)return Promise.resolve().then(async()=>{let G=[];for(let z of m){let x=await z.key,q=await z.value;G.push({key:x,value:q,alwaysSet:z.alwaysSet})}return G}).then((G)=>{return oc.mergeObjectSync(Q,G)});else return oc.mergeObjectSync(Q,m)}get shape(){return this._def.shape()}strict(c){return s.errToObj,new Cc({...this._def,unknownKeys:"strict",...c!==void 0?{errorMap:($,Q)=>{let J=this._def.errorMap?.($,Q).message??Q.defaultError;if($.code==="unrecognized_keys")return{message:s.errToObj(c).message??J};return{message:J}}}:{}})}strip(){return new Cc({...this._def,unknownKeys:"strip"})}passthrough(){return new Cc({...this._def,unknownKeys:"passthrough"})}extend(c){return new Cc({...this._def,shape:()=>({...this._def.shape(),...c})})}merge(c){return new Cc({unknownKeys:c._def.unknownKeys,catchall:c._def.catchall,shape:()=>({...this._def.shape(),...c._def.shape()}),typeName:Qc.ZodObject})}setKey(c,$){return this.augment({[c]:$})}catchall(c){return new Cc({...this._def,catchall:c})}pick(c){let $={};for(let Q of wc.objectKeys(c))if(c[Q]&&this.shape[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}omit(c){let $={};for(let Q of wc.objectKeys(this.shape))if(!c[Q])$[Q]=this.shape[Q];return new Cc({...this._def,shape:()=>$})}deepPartial(){return o$(this)}partial(c){let $={};for(let Q of wc.objectKeys(this.shape)){let J=this.shape[Q];if(c&&!c[Q])$[Q]=J;else $[Q]=J.optional()}return new Cc({...this._def,shape:()=>$})}required(c){let $={};for(let Q of wc.objectKeys(this.shape))if(c&&!c[Q])$[Q]=this.shape[Q];else{let Y=this.shape[Q];while(Y instanceof k0)Y=Y._def.innerType;$[Q]=Y}return new Cc({...this._def,shape:()=>$})}keyof(){return Uq(wc.objectKeys(this.shape))}}Cc.create=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.strictCreate=(c,$)=>{return new Cc({shape:()=>c,unknownKeys:"strict",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};Cc.lazycreate=(c,$)=>{return new Cc({shape:c,unknownKeys:"strip",catchall:r0.create(),typeName:Qc.ZodObject,...zc($)})};class t$ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=this._def.options;function J(Y){for(let W of Y)if(W.result.status==="valid")return W.result;for(let W of Y)if(W.result.status==="dirty")return $.common.issues.push(...W.ctx.common.issues),W.result;let X=Y.map((W)=>new x0(W.ctx.common.issues));return n($,{code:L.invalid_union,unionErrors:X}),$c}if($.common.async)return Promise.all(Q.map(async(Y)=>{let X={...$,common:{...$.common,issues:[]},parent:null};return{result:await Y._parseAsync({data:$.data,path:$.path,parent:X}),ctx:X}})).then(J);else{let Y=void 0,X=[];for(let m of Q){let G={...$,common:{...$.common,issues:[]},parent:null},z=m._parseSync({data:$.data,path:$.path,parent:G});if(z.status==="valid")return z;else if(z.status==="dirty"&&!Y)Y={result:z,ctx:G};if(G.common.issues.length)X.push(G.common.issues)}if(Y)return $.common.issues.push(...Y.ctx.common.issues),Y.result;let W=X.map((m)=>new x0(m));return n($,{code:L.invalid_union,unionErrors:W}),$c}}get options(){return this._def.options}}t$.create=(c,$)=>{return new t$({options:c,typeName:Qc.ZodUnion,...zc($)})};var G8=(c)=>{if(c instanceof cQ)return G8(c.schema);else if(c instanceof l0)return G8(c.innerType());else if(c instanceof $Q)return[c.value];else if(c instanceof _8)return c.options;else if(c instanceof QQ)return wc.objectValues(c.enum);else if(c instanceof JQ)return G8(c._def.innerType);else if(c instanceof s$)return[void 0];else if(c instanceof r$)return[null];else if(c instanceof k0)return[void 0,...G8(c.unwrap())];else if(c instanceof z8)return[null,...G8(c.unwrap())];else if(c instanceof FY)return G8(c.unwrap());else if(c instanceof XQ)return G8(c.unwrap());else if(c instanceof YQ)return G8(c._def.innerType);else return[]};class bY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.object)return n($,{code:L.invalid_type,expected:F.object,received:$.parsedType}),$c;let Q=this.discriminator,J=$.data[Q],Y=this.optionsMap.get(J);if(!Y)return n($,{code:L.invalid_union_discriminator,options:Array.from(this.optionsMap.keys()),path:[Q]}),$c;if($.common.async)return Y._parseAsync({data:$.data,path:$.path,parent:$});else return Y._parseSync({data:$.data,path:$.path,parent:$})}get discriminator(){return this._def.discriminator}get options(){return this._def.options}get optionsMap(){return this._def.optionsMap}static create(c,$,Q){let J=new Map;for(let Y of $){let X=G8(Y.shape[c]);if(!X.length)throw Error(`A discriminator value for key \`${c}\` could not be extracted from all schema options`);for(let W of X){if(J.has(W))throw Error(`Discriminator property ${String(c)} has duplicate value ${String(W)}`);J.set(W,Y)}}return new bY({typeName:Qc.ZodDiscriminatedUnion,discriminator:c,options:$,optionsMap:J,...zc(Q)})}}function IW(c,$){let Q=s0(c),J=s0($);if(c===$)return{valid:!0,data:c};else if(Q===F.object&&J===F.object){let Y=wc.objectKeys($),X=wc.objectKeys(c).filter((m)=>Y.indexOf(m)!==-1),W={...c,...$};for(let m of X){let G=IW(c[m],$[m]);if(!G.valid)return{valid:!1};W[m]=G.data}return{valid:!0,data:W}}else if(Q===F.array&&J===F.array){if(c.length!==$.length)return{valid:!1};let Y=[];for(let X=0;X<c.length;X++){let W=c[X],m=$[X],G=IW(W,m);if(!G.valid)return{valid:!1};Y.push(G.data)}return{valid:!0,data:Y}}else if(Q===F.date&&J===F.date&&+c===+$)return{valid:!0,data:c};else return{valid:!1}}class e$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=(Y,X)=>{if(PY(Y)||PY(X))return $c;let W=IW(Y.value,X.value);if(!W.valid)return n(Q,{code:L.invalid_intersection_types}),$c;if(EY(Y)||EY(X))$.dirty();return{status:$.value,value:W.data}};if(Q.common.async)return Promise.all([this._def.left._parseAsync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseAsync({data:Q.data,path:Q.path,parent:Q})]).then(([Y,X])=>J(Y,X));else return J(this._def.left._parseSync({data:Q.data,path:Q.path,parent:Q}),this._def.right._parseSync({data:Q.data,path:Q.path,parent:Q}))}}e$.create=(c,$,Q)=>{return new e$({left:c,right:$,typeName:Qc.ZodIntersection,...zc(Q)})};class t0 extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.array)return n(Q,{code:L.invalid_type,expected:F.array,received:Q.parsedType}),$c;if(Q.data.length<this._def.items.length)return n(Q,{code:L.too_small,minimum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$c;if(!this._def.rest&&Q.data.length>this._def.items.length)n(Q,{code:L.too_big,maximum:this._def.items.length,inclusive:!0,exact:!1,type:"array"}),$.dirty();let Y=[...Q.data].map((X,W)=>{let m=this._def.items[W]||this._def.rest;if(!m)return null;return m._parse(new a0(Q,X,Q.path,W))}).filter((X)=>!!X);if(Q.common.async)return Promise.all(Y).then((X)=>{return oc.mergeArray($,X)});else return oc.mergeArray($,Y)}get items(){return this._def.items}rest(c){return new t0({...this._def,rest:c})}}t0.create=(c,$)=>{if(!Array.isArray(c))throw Error("You must pass an array of schemas to z.tuple([ ... ])");return new t0({items:c,typeName:Qc.ZodTuple,rest:null,...zc($)})};class YJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.object)return n(Q,{code:L.invalid_type,expected:F.object,received:Q.parsedType}),$c;let J=[],Y=this._def.keyType,X=this._def.valueType;for(let W in Q.data)J.push({key:Y._parse(new a0(Q,W,Q.path,W)),value:X._parse(new a0(Q,Q.data[W],Q.path,W)),alwaysSet:W in Q.data});if(Q.common.async)return oc.mergeObjectAsync($,J);else return oc.mergeObjectSync($,J)}get element(){return this._def.valueType}static create(c,$,Q){if($ instanceof Mc)return new YJ({keyType:c,valueType:$,typeName:Qc.ZodRecord,...zc(Q)});return new YJ({keyType:n0.create(),valueType:c,typeName:Qc.ZodRecord,...zc($)})}}class XJ extends Mc{get keySchema(){return this._def.keyType}get valueSchema(){return this._def.valueType}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.map)return n(Q,{code:L.invalid_type,expected:F.map,received:Q.parsedType}),$c;let J=this._def.keyType,Y=this._def.valueType,X=[...Q.data.entries()].map(([W,m],G)=>{return{key:J._parse(new a0(Q,W,Q.path,[G,"key"])),value:Y._parse(new a0(Q,m,Q.path,[G,"value"]))}});if(Q.common.async){let W=new Map;return Promise.resolve().then(async()=>{for(let m of X){let G=await m.key,z=await m.value;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}})}else{let W=new Map;for(let m of X){let{key:G,value:z}=m;if(G.status==="aborted"||z.status==="aborted")return $c;if(G.status==="dirty"||z.status==="dirty")$.dirty();W.set(G.value,z.value)}return{status:$.value,value:W}}}}XJ.create=(c,$,Q)=>{return new XJ({valueType:$,keyType:c,typeName:Qc.ZodMap,...zc(Q)})};class W$ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.parsedType!==F.set)return n(Q,{code:L.invalid_type,expected:F.set,received:Q.parsedType}),$c;let J=this._def;if(J.minSize!==null){if(Q.data.size<J.minSize.value)n(Q,{code:L.too_small,minimum:J.minSize.value,type:"set",inclusive:!0,exact:!1,message:J.minSize.message}),$.dirty()}if(J.maxSize!==null){if(Q.data.size>J.maxSize.value)n(Q,{code:L.too_big,maximum:J.maxSize.value,type:"set",inclusive:!0,exact:!1,message:J.maxSize.message}),$.dirty()}let Y=this._def.valueType;function X(m){let G=new Set;for(let z of m){if(z.status==="aborted")return $c;if(z.status==="dirty")$.dirty();G.add(z.value)}return{status:$.value,value:G}}let W=[...Q.data.values()].map((m,G)=>Y._parse(new a0(Q,m,Q.path,G)));if(Q.common.async)return Promise.all(W).then((m)=>X(m));else return X(W)}min(c,$){return new W$({...this._def,minSize:{value:c,message:s.toString($)}})}max(c,$){return new W$({...this._def,maxSize:{value:c,message:s.toString($)}})}size(c,$){return this.min(c,$).max(c,$)}nonempty(c){return this.min(1,c)}}W$.create=(c,$)=>{return new W$({valueType:c,minSize:null,maxSize:null,typeName:Qc.ZodSet,...zc($)})};class g$ extends Mc{constructor(){super(...arguments);this.validate=this.implement}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.function)return n($,{code:L.invalid_type,expected:F.function,received:$.parsedType}),$c;function Q(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_arguments,argumentsError:m}})}function J(W,m){return $J({data:W,path:$.path,errorMaps:[$.common.contextualErrorMap,$.schemaErrorMap,h$(),m8].filter((G)=>!!G),issueData:{code:L.invalid_return_type,returnTypeError:m}})}let Y={errorMap:$.common.contextualErrorMap},X=$.data;if(this._def.returns instanceof m$){let W=this;return ec(async function(...m){let G=new x0([]),z=await W._def.args.parseAsync(m,Y).catch((M)=>{throw G.addIssue(Q(m,M)),G}),x=await Reflect.apply(X,this,z);return await W._def.returns._def.type.parseAsync(x,Y).catch((M)=>{throw G.addIssue(J(x,M)),G})})}else{let W=this;return ec(function(...m){let G=W._def.args.safeParse(m,Y);if(!G.success)throw new x0([Q(m,G.error)]);let z=Reflect.apply(X,this,G.data),x=W._def.returns.safeParse(z,Y);if(!x.success)throw new x0([J(z,x.error)]);return x.data})}}parameters(){return this._def.args}returnType(){return this._def.returns}args(...c){return new g$({...this._def,args:t0.create(c).rest(I8.create())})}returns(c){return new g$({...this._def,returns:c})}implement(c){return this.parse(c)}strictImplement(c){return this.parse(c)}static create(c,$,Q){return new g$({args:c?c:t0.create([]).rest(I8.create()),returns:$||I8.create(),typeName:Qc.ZodFunction,...zc(Q)})}}class cQ extends Mc{get schema(){return this._def.getter()}_parse(c){let{ctx:$}=this._processInputParams(c);return this._def.getter()._parse({data:$.data,path:$.path,parent:$})}}cQ.create=(c,$)=>{return new cQ({getter:c,typeName:Qc.ZodLazy,...zc($)})};class $Q extends Mc{_parse(c){if(c.data!==this._def.value){let $=this._getOrReturnCtx(c);return n($,{received:$.data,code:L.invalid_literal,expected:this._def.value}),$c}return{status:"valid",value:c.data}}get value(){return this._def.value}}$Q.create=(c,$)=>{return new $Q({value:c,typeName:Qc.ZodLiteral,...zc($)})};function Uq(c,$){return new _8({values:c,typeName:Qc.ZodEnum,...zc($)})}class _8 extends Mc{_parse(c){if(typeof c.data!=="string"){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{expected:wc.joinValues(Q),received:$.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(this._def.values);if(!this._cache.has(c.data)){let $=this._getOrReturnCtx(c),Q=this._def.values;return n($,{received:$.data,code:L.invalid_enum_value,options:Q}),$c}return ec(c.data)}get options(){return this._def.values}get enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Values(){let c={};for(let $ of this._def.values)c[$]=$;return c}get Enum(){let c={};for(let $ of this._def.values)c[$]=$;return c}extract(c,$=this._def){return _8.create(c,{...this._def,...$})}exclude(c,$=this._def){return _8.create(this.options.filter((Q)=>!c.includes(Q)),{...this._def,...$})}}_8.create=Uq;class QQ extends Mc{_parse(c){let $=wc.getValidEnumValues(this._def.values),Q=this._getOrReturnCtx(c);if(Q.parsedType!==F.string&&Q.parsedType!==F.number){let J=wc.objectValues($);return n(Q,{expected:wc.joinValues(J),received:Q.parsedType,code:L.invalid_type}),$c}if(!this._cache)this._cache=new Set(wc.getValidEnumValues(this._def.values));if(!this._cache.has(c.data)){let J=wc.objectValues($);return n(Q,{received:Q.data,code:L.invalid_enum_value,options:J}),$c}return ec(c.data)}get enum(){return this._def.values}}QQ.create=(c,$)=>{return new QQ({values:c,typeName:Qc.ZodNativeEnum,...zc($)})};class m$ extends Mc{unwrap(){return this._def.type}_parse(c){let{ctx:$}=this._processInputParams(c);if($.parsedType!==F.promise&&$.common.async===!1)return n($,{code:L.invalid_type,expected:F.promise,received:$.parsedType}),$c;let Q=$.parsedType===F.promise?$.data:Promise.resolve($.data);return ec(Q.then((J)=>{return this._def.type.parseAsync(J,{path:$.path,errorMap:$.common.contextualErrorMap})}))}}m$.create=(c,$)=>{return new m$({type:c,typeName:Qc.ZodPromise,...zc($)})};class l0 extends Mc{innerType(){return this._def.schema}sourceType(){return this._def.schema._def.typeName===Qc.ZodEffects?this._def.schema.sourceType():this._def.schema}_parse(c){let{status:$,ctx:Q}=this._processInputParams(c),J=this._def.effect||null,Y={addIssue:(X)=>{if(n(Q,X),X.fatal)$.abort();else $.dirty()},get path(){return Q.path}};if(Y.addIssue=Y.addIssue.bind(Y),J.type==="preprocess"){let X=J.transform(Q.data,Y);if(Q.common.async)return Promise.resolve(X).then(async(W)=>{if($.value==="aborted")return $c;let m=await this._def.schema._parseAsync({data:W,path:Q.path,parent:Q});if(m.status==="aborted")return $c;if(m.status==="dirty")return J$(m.value);if($.value==="dirty")return J$(m.value);return m});else{if($.value==="aborted")return $c;let W=this._def.schema._parseSync({data:X,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")return J$(W.value);if($.value==="dirty")return J$(W.value);return W}}if(J.type==="refinement"){let X=(W)=>{let m=J.refinement(W,Y);if(Q.common.async)return Promise.resolve(m);if(m instanceof Promise)throw Error("Async refinement encountered during synchronous parse operation. Use .parseAsync instead.");return W};if(Q.common.async===!1){let W=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value),{status:$.value,value:W.value}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((W)=>{if(W.status==="aborted")return $c;if(W.status==="dirty")$.dirty();return X(W.value).then(()=>{return{status:$.value,value:W.value}})})}if(J.type==="transform")if(Q.common.async===!1){let X=this._def.schema._parseSync({data:Q.data,path:Q.path,parent:Q});if(!p8(X))return $c;let W=J.transform(X.value,Y);if(W instanceof Promise)throw Error("Asynchronous transform encountered during synchronous parse operation. Use .parseAsync instead.");return{status:$.value,value:W}}else return this._def.schema._parseAsync({data:Q.data,path:Q.path,parent:Q}).then((X)=>{if(!p8(X))return $c;return Promise.resolve(J.transform(X.value,Y)).then((W)=>({status:$.value,value:W}))});wc.assertNever(J)}}l0.create=(c,$,Q)=>{return new l0({schema:c,typeName:Qc.ZodEffects,effect:$,...zc(Q)})};l0.createWithPreprocess=(c,$,Q)=>{return new l0({schema:$,effect:{type:"preprocess",transform:c},typeName:Qc.ZodEffects,...zc(Q)})};class k0 extends Mc{_parse(c){if(this._getType(c)===F.undefined)return ec(void 0);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}k0.create=(c,$)=>{return new k0({innerType:c,typeName:Qc.ZodOptional,...zc($)})};class z8 extends Mc{_parse(c){if(this._getType(c)===F.null)return ec(null);return this._def.innerType._parse(c)}unwrap(){return this._def.innerType}}z8.create=(c,$)=>{return new z8({innerType:c,typeName:Qc.ZodNullable,...zc($)})};class JQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;if($.parsedType===F.undefined)Q=this._def.defaultValue();return this._def.innerType._parse({data:Q,path:$.path,parent:$})}removeDefault(){return this._def.innerType}}JQ.create=(c,$)=>{return new JQ({innerType:c,typeName:Qc.ZodDefault,defaultValue:typeof $.default==="function"?$.default:()=>$.default,...zc($)})};class YQ extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q={...$,common:{...$.common,issues:[]}},J=this._def.innerType._parse({data:Q.data,path:Q.path,parent:{...Q}});if(y$(J))return J.then((Y)=>{return{status:"valid",value:Y.status==="valid"?Y.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}});else return{status:"valid",value:J.status==="valid"?J.value:this._def.catchValue({get error(){return new x0(Q.common.issues)},input:Q.data})}}removeCatch(){return this._def.innerType}}YQ.create=(c,$)=>{return new YQ({innerType:c,typeName:Qc.ZodCatch,catchValue:typeof $.catch==="function"?$.catch:()=>$.catch,...zc($)})};class WJ extends Mc{_parse(c){if(this._getType(c)!==F.nan){let Q=this._getOrReturnCtx(c);return n(Q,{code:L.invalid_type,expected:F.nan,received:Q.parsedType}),$c}return{status:"valid",value:c.data}}}WJ.create=(c)=>{return new WJ({typeName:Qc.ZodNaN,...zc(c)})};var E2=Symbol("zod_brand");class FY extends Mc{_parse(c){let{ctx:$}=this._processInputParams(c),Q=$.data;return this._def.type._parse({data:Q,path:$.path,parent:$})}unwrap(){return this._def.type}}class mJ extends Mc{_parse(c){let{status:$,ctx:Q}=this._processInputParams(c);if(Q.common.async)return(async()=>{let Y=await this._def.in._parseAsync({data:Q.data,path:Q.path,parent:Q});if(Y.status==="aborted")return $c;if(Y.status==="dirty")return $.dirty(),J$(Y.value);else return this._def.out._parseAsync({data:Y.value,path:Q.path,parent:Q})})();else{let J=this._def.in._parseSync({data:Q.data,path:Q.path,parent:Q});if(J.status==="aborted")return $c;if(J.status==="dirty")return $.dirty(),{status:"dirty",value:J.value};else return this._def.out._parseSync({data:J.value,path:Q.path,parent:Q})}}static create(c,$){return new mJ({in:c,out:$,typeName:Qc.ZodPipeline})}}class XQ extends Mc{_parse(c){let $=this._def.innerType._parse(c),Q=(J)=>{if(p8(J))J.value=Object.freeze(J.value);return J};return y$($)?$.then((J)=>Q(J)):Q($)}unwrap(){return this._def.innerType}}XQ.create=(c,$)=>{return new XQ({innerType:c,typeName:Qc.ZodReadonly,...zc($)})};function Vq(c,$){let Q=typeof c==="function"?c($):typeof c==="string"?{message:c}:c;return typeof Q==="string"?{message:Q}:Q}function jq(c,$={},Q){if(c)return X$.create().superRefine((J,Y)=>{let X=c(J);if(X instanceof Promise)return X.then((W)=>{if(!W){let m=Vq($,J),G=m.fatal??Q??!0;Y.addIssue({code:"custom",...m,fatal:G})}});if(!X){let W=Vq($,J),m=W.fatal??Q??!0;Y.addIssue({code:"custom",...W,fatal:m})}return});return X$.create()}var b2={object:Cc.lazycreate},Qc;(function(c){c.ZodString="ZodString",c.ZodNumber="ZodNumber",c.ZodNaN="ZodNaN",c.ZodBigInt="ZodBigInt",c.ZodBoolean="ZodBoolean",c.ZodDate="ZodDate",c.ZodSymbol="ZodSymbol",c.ZodUndefined="ZodUndefined",c.ZodNull="ZodNull",c.ZodAny="ZodAny",c.ZodUnknown="ZodUnknown",c.ZodNever="ZodNever",c.ZodVoid="ZodVoid",c.ZodArray="ZodArray",c.ZodObject="ZodObject",c.ZodUnion="ZodUnion",c.ZodDiscriminatedUnion="ZodDiscriminatedUnion",c.ZodIntersection="ZodIntersection",c.ZodTuple="ZodTuple",c.ZodRecord="ZodRecord",c.ZodMap="ZodMap",c.ZodSet="ZodSet",c.ZodFunction="ZodFunction",c.ZodLazy="ZodLazy",c.ZodLiteral="ZodLiteral",c.ZodEnum="ZodEnum",c.ZodEffects="ZodEffects",c.ZodNativeEnum="ZodNativeEnum",c.ZodOptional="ZodOptional",c.ZodNullable="ZodNullable",c.ZodDefault="ZodDefault",c.ZodCatch="ZodCatch",c.ZodPromise="ZodPromise",c.ZodBranded="ZodBranded",c.ZodPipeline="ZodPipeline",c.ZodReadonly="ZodReadonly"})(Qc||(Qc={}));var F2=(c,$={message:`Input not instance of ${c.name}`})=>jq((Q)=>Q instanceof c,$),Kq=n0.create,Dq=Z8.create,T2=WJ.create,f2=L8.create,Bq=d$.create,n2=Y$.create,u2=QJ.create,k2=s$.create,a2=r$.create,l2=X$.create,h2=I8.create,y2=r0.create,o2=JJ.create,g2=u0.create,d2=Cc.create,s2=Cc.strictCreate,r2=t$.create,t2=bY.create,e2=e$.create,cD=t0.create,$D=YJ.create,QD=XJ.create,JD=W$.create,YD=g$.create,XD=cQ.create,WD=$Q.create,mD=_8.create,GD=QQ.create,zD=m$.create,xD=l0.create,qD=k0.create,MD=z8.create,ND=l0.createWithPreprocess,VD=mJ.create,wD=()=>Kq().optional(),iD=()=>Dq().optional(),vD=()=>Bq().optional(),UD={string:(c)=>n0.create({...c,coerce:!0}),number:(c)=>Z8.create({...c,coerce:!0}),boolean:(c)=>d$.create({...c,coerce:!0}),bigint:(c)=>L8.create({...c,coerce:!0}),date:(c)=>Y$.create({...c,coerce:!0})};var jD=$c;var KD=/^(wss?|https?):\/\//i,DD=/^nsec1[0-9a-z]+$/i,pq=/^[0-9a-f]{64}$/i,BD=/^[^/\s]+\/[^/\s]+$/,HD=/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;function Hq(c){try{let $=new URL(c);return $.protocol==="http:"||$.protocol==="https:"}catch{return!1}}function OD(c){if(!KD.test(c))return!1;try{return new URL(c.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).hostname.length>0}catch{return!1}}function Oq(c){if(!Array.isArray(c))return c;return c.map(($)=>typeof $==="string"?$.trim():$).filter(($)=>$!=="")}var RD=E.object({kind:E.literal("github"),token:E.string({required_error:"tracker.token is required for the github tracker"}).trim().min(1,"tracker.token is required for the github tracker"),repo:E.string({required_error:"tracker.repo (owner/repo) is required for the github tracker"}).trim().min(1,"tracker.repo (owner/repo) is required for the github tracker").refine((c)=>BD.test(c),{message:"tracker.repo must be owner/repo"})}).strict(),pD=E.object({kind:E.literal("buzz"),ownerHex:E.string({required_error:"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"}).trim().regex(pq,"tracker.ownerHex must be a 64-char hex pubkey for the buzz tracker"),repoId:E.string({required_error:"tracker.repoId is required for the buzz tracker"}).trim().min(1,"tracker.repoId is required for the buzz tracker")}).strict(),ID=E.discriminatedUnion("kind",[RD,pD]),Iq=E.object({label:E.string().trim().optional(),relayUrl:E.string({required_error:"relayUrl is required",invalid_type_error:"relayUrl is required"}).trim().min(1,"relayUrl is required").refine(OD,{message:"relayUrl must be a ws(s):// or https:// URL with a host"}),privateKey:E.string({required_error:"privateKey is required",invalid_type_error:"privateKey is required"}).trim().min(1,"privateKey is required").refine((c)=>DD.test(c)||pq.test(c),{message:"privateKey must be an nsec… or 64-char hex key"}),figuraToken:E.string({required_error:"figuraToken is required",invalid_type_error:"figuraToken is required"}).trim().min(1,"figuraToken is required"),channels:E.preprocess(Oq,E.array(E.string()).default([]).superRefine((c,$)=>{for(let Q of c)if(!HD.test(Q))$.addIssue({code:E.ZodIssueCode.custom,message:`channel "${Q}" is not a UUID`})})),triggers:E.preprocess((c)=>c===void 0?void 0:Oq(c),E.array(E.string()).optional().superRefine((c,$)=>{if(c!==void 0&&c.length===0)$.addIssue({code:E.ZodIssueCode.custom,message:"triggers is present but empty — omit it or give at least one trigger"})})),appOrigin:E.string().trim().refine(Hq,{message:"appOrigin must be an http(s) URL"}).optional(),apiUrl:E.string().trim().refine(Hq,{message:"apiUrl must be an http(s) URL"}).optional(),device:E.string().trim().min(1,"device must be a non-empty string when present").optional(),platform:E.string().trim().optional().superRefine((c,$)=>{if(c!==void 0&&c!=="mobile"&&c!=="web")$.addIssue({code:E.ZodIssueCode.custom,message:"platform must be one of: mobile | web"})}),tracker:ID.optional()}).strict();function G$(c){if(c.label)return c.label;let $=c.relayUrl??"";try{return new URL($.replace(/^wss:\/\//i,"https://").replace(/^ws:\/\//i,"http://")).host}catch{return $||"binding"}}function Zq(c){if(c.code===E.ZodIssueCode.unrecognized_keys){let $=c.keys.join(", ");return c.path.includes("tracker")?`tracker unknown key(s): ${$}`:`unknown key(s): ${$} (check spelling of the known fields)`}if(c.code===E.ZodIssueCode.invalid_union_discriminator)return'tracker.kind must be "github" or "buzz"';return c.message}function Lq(c){let $=Iq.safeParse(c);return $.success?[]:$.error.issues.map(Zq)}function Rq(c){let $=c??{},Q=typeof $.label==="string"&&$.label.trim()?$.label.trim():void 0,J=typeof $.relayUrl==="string"?$.relayUrl:"";return G$({label:Q,relayUrl:J})}function ZW(c,$="bindings config"){let Q=typeof $==="string"?{source:$}:$,J=Q.source??"bindings config",Y;try{Y=JSON.parse(c)}catch(z){throw Error(`${J} is not valid JSON: ${z instanceof Error?z.message:String(z)}`)}let X=Array.isArray(Y)?Y:Y&&typeof Y==="object"&&Array.isArray(Y.bindings)?Y.bindings:null;if(!X)throw Error(`${J} must be a JSON array of bindings (or { "bindings": [...] })`);if(X.length===0)throw Error(`${J} has no bindings`);let W=[],m=[];X.forEach((z,x)=>{let q=Iq.safeParse(z);if(q.success)m.push(q.data);else W.push(`binding[${x}] (${Rq(z)}): ${q.error.issues.map(Zq).join("; ")}`)});let G=new Map;for(let z of X){let x=Rq(z);G.set(x,(G.get(x)??0)+1)}for(let[z,x]of G)if(x>1)W.push(`duplicate label "${z}" across ${x} bindings — give each a distinct label`);if(W.length)throw Error(`invalid ${J}:
528
+ ${W.join(`
529
+ `)}`);if(Q.onWarn){let z=new Set;for(let x of m){let q=`${x.relayUrl} ${x.privateKey}`;if(z.has(q))Q.onWarn(`two bindings share the same relayUrl + privateKey (${G$(x)}) — is that intentional?`);z.add(q)}}return m}i0();import{createHash as lI,randomUUID as hI}from"node:crypto";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */function GJ(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function I0(c,$=""){if(!Number.isSafeInteger(c)||c<0){let Q=$&&`"${$}" `;throw Error(`${Q}expected integer >= 0, got ${c}`)}}function vc(c,$,Q=""){let J=GJ(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function z$(c){if(typeof c!=="function"||typeof c.create!=="function")throw Error("Hash must wrapped by utils.createHasher");I0(c.outputLen),I0(c.blockLen)}function WQ(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function Sq(c,$){vc(c,void 0,"digestInto() output");let Q=$.outputLen;if(c.length<Q)throw Error('"digestInto() output" expected to be of length >='+Q)}function h0(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function TY(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}function y0(c,$){return c<<32-$|c>>>$}var Aq=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),ZD=Array.from({length:256},(c,$)=>$.toString(16).padStart(2,"0"));function Hc(c){if(vc(c),Aq)return c.toHex();let $="";for(let Q=0;Q<c.length;Q++)$+=ZD[c[Q]];return $}var x8={_0:48,_9:57,A:65,F:70,a:97,f:102};function _q(c){if(c>=x8._0&&c<=x8._9)return c-x8._0;if(c>=x8.A&&c<=x8.F)return c-(x8.A-10);if(c>=x8.a&&c<=x8.f)return c-(x8.a-10);return}function Rc(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);if(Aq)return Uint8Array.fromHex(c);let $=c.length,Q=$/2;if($%2)throw Error("hex string expected, got unpadded hex of length "+$);let J=new Uint8Array(Q);for(let Y=0,X=0;Y<Q;Y++,X+=2){let W=_q(c.charCodeAt(X)),m=_q(c.charCodeAt(X+1));if(W===void 0||m===void 0){let G=c[X]+c[X+1];throw Error('hex string expected, got non-hex character "'+G+'" at index '+X)}J[Y]=W*16+m}return J}function Fc(...c){let $=0;for(let J=0;J<c.length;J++){let Y=c[J];vc(Y),$+=Y.length}let Q=new Uint8Array($);for(let J=0,Y=0;J<c.length;J++){let X=c[J];Q.set(X,Y),Y+=X.length}return Q}function Cq(c,$={}){let Q=(Y,X)=>c(X).update(Y).digest(),J=c(void 0);return Q.outputLen=J.outputLen,Q.blockLen=J.blockLen,Q.create=(Y)=>c(Y),Object.assign(Q,$),Object.freeze(Q)}function o0(c=32){let $=typeof globalThis==="object"?globalThis.crypto:null;if(typeof $?.getRandomValues!=="function")throw Error("crypto.getRandomValues must be defined");return $.getRandomValues(new Uint8Array(c))}var Pq=(c)=>({oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,c])});function Eq(c,$,Q){return c&$^~c&Q}function bq(c,$,Q){return c&$^c&Q^$&Q}class fY{blockLen;outputLen;padOffset;isLE;buffer;view;finished=!1;length=0;pos=0;destroyed=!1;constructor(c,$,Q,J){this.blockLen=c,this.outputLen=$,this.padOffset=Q,this.isLE=J,this.buffer=new Uint8Array(c),this.view=TY(this.buffer)}update(c){WQ(this),vc(c);let{view:$,buffer:Q,blockLen:J}=this,Y=c.length;for(let X=0;X<Y;){let W=Math.min(J-this.pos,Y-X);if(W===J){let m=TY(c);for(;J<=Y-X;X+=J)this.process(m,X);continue}if(Q.set(c.subarray(X,X+W),this.pos),this.pos+=W,X+=W,this.pos===J)this.process($,0),this.pos=0}return this.length+=c.length,this.roundClean(),this}digestInto(c){WQ(this),Sq(c,this),this.finished=!0;let{buffer:$,view:Q,blockLen:J,isLE:Y}=this,{pos:X}=this;if($[X++]=128,h0(this.buffer.subarray(X)),this.padOffset>J-X)this.process(Q,0),X=0;for(let x=X;x<J;x++)$[x]=0;Q.setBigUint64(J-8,BigInt(this.length*8),Y),this.process(Q,0);let W=TY(c),m=this.outputLen;if(m%4)throw Error("_sha2: outputLen must be aligned to 32bit");let G=m/4,z=this.get();if(G>z.length)throw Error("_sha2: outputLen bigger than state");for(let x=0;x<G;x++)W.setUint32(4*x,z[x],Y)}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}_cloneInto(c){c||=new this.constructor,c.set(...this.get());let{blockLen:$,buffer:Q,length:J,finished:Y,destroyed:X,pos:W}=this;if(c.destroyed=X,c.finished=Y,c.length=J,c.pos=W,J%$)c.buffer.set(Q);return c}clone(){return this._cloneInto()}}var q8=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),M8=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),gc=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),dc=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]);var nY=BigInt(4294967295),Fq=BigInt(32);function LD(c,$=!1){if($)return{h:Number(c&nY),l:Number(c>>Fq&nY)};return{h:Number(c>>Fq&nY)|0,l:Number(c&nY)|0}}function Tq(c,$=!1){let Q=c.length,J=new Uint32Array(Q),Y=new Uint32Array(Q);for(let X=0;X<Q;X++){let{h:W,l:m}=LD(c[X],$);[J[X],Y[X]]=[W,m]}return[J,Y]}var LW=(c,$,Q)=>c>>>Q,_W=(c,$,Q)=>c<<32-Q|$>>>Q,x$=(c,$,Q)=>c>>>Q|$<<32-Q,q$=(c,$,Q)=>c<<32-Q|$>>>Q,zJ=(c,$,Q)=>c<<64-Q|$>>>Q-32,xJ=(c,$,Q)=>c>>>Q-32|$<<64-Q;function e0(c,$,Q,J){let Y=($>>>0)+(J>>>0);return{h:c+Q+(Y/4294967296|0)|0,l:Y|0}}var fq=(c,$,Q)=>(c>>>0)+($>>>0)+(Q>>>0),nq=(c,$,Q,J)=>$+Q+J+(c/4294967296|0)|0,uq=(c,$,Q,J)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0),kq=(c,$,Q,J,Y)=>$+Q+J+Y+(c/4294967296|0)|0,aq=(c,$,Q,J,Y)=>(c>>>0)+($>>>0)+(Q>>>0)+(J>>>0)+(Y>>>0),lq=(c,$,Q,J,Y,X)=>$+Q+J+Y+X+(c/4294967296|0)|0;var SD=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),S8=new Uint32Array(64);class SW extends fY{constructor(c){super(64,c,8,!1)}get(){let{A:c,B:$,C:Q,D:J,E:Y,F:X,G:W,H:m}=this;return[c,$,Q,J,Y,X,W,m]}set(c,$,Q,J,Y,X,W,m){this.A=c|0,this.B=$|0,this.C=Q|0,this.D=J|0,this.E=Y|0,this.F=X|0,this.G=W|0,this.H=m|0}process(c,$){for(let x=0;x<16;x++,$+=4)S8[x]=c.getUint32($,!1);for(let x=16;x<64;x++){let q=S8[x-15],M=S8[x-2],N=y0(q,7)^y0(q,18)^q>>>3,w=y0(M,17)^y0(M,19)^M>>>10;S8[x]=w+S8[x-7]+N+S8[x-16]|0}let{A:Q,B:J,C:Y,D:X,E:W,F:m,G,H:z}=this;for(let x=0;x<64;x++){let q=y0(W,6)^y0(W,11)^y0(W,25),M=z+q+Eq(W,m,G)+SD[x]+S8[x]|0,w=(y0(Q,2)^y0(Q,13)^y0(Q,22))+bq(Q,J,Y)|0;z=G,G=m,m=W,W=X+M|0,X=Y,Y=J,J=Q,Q=M+w|0}Q=Q+this.A|0,J=J+this.B|0,Y=Y+this.C|0,X=X+this.D|0,W=W+this.E|0,m=m+this.F|0,G=G+this.G|0,z=z+this.H|0,this.set(Q,J,Y,X,W,m,G,z)}roundClean(){h0(S8)}destroy(){this.set(0,0,0,0,0,0,0,0),h0(this.buffer)}}class hq extends SW{A=q8[0]|0;B=q8[1]|0;C=q8[2]|0;D=q8[3]|0;E=q8[4]|0;F=q8[5]|0;G=q8[6]|0;H=q8[7]|0;constructor(){super(32)}}class AD extends SW{A=M8[0]|0;B=M8[1]|0;C=M8[2]|0;D=M8[3]|0;E=M8[4]|0;F=M8[5]|0;G=M8[6]|0;H=M8[7]|0;constructor(){super(28)}}var yq=(()=>Tq(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((c)=>BigInt(c))))(),CD=(()=>yq[0])(),PD=(()=>yq[1])(),A8=new Uint32Array(80),C8=new Uint32Array(80);class qJ extends fY{constructor(c){super(128,c,16,!1)}get(){let{Ah:c,Al:$,Bh:Q,Bl:J,Ch:Y,Cl:X,Dh:W,Dl:m,Eh:G,El:z,Fh:x,Fl:q,Gh:M,Gl:N,Hh:w,Hl:U}=this;return[c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U]}set(c,$,Q,J,Y,X,W,m,G,z,x,q,M,N,w,U){this.Ah=c|0,this.Al=$|0,this.Bh=Q|0,this.Bl=J|0,this.Ch=Y|0,this.Cl=X|0,this.Dh=W|0,this.Dl=m|0,this.Eh=G|0,this.El=z|0,this.Fh=x|0,this.Fl=q|0,this.Gh=M|0,this.Gl=N|0,this.Hh=w|0,this.Hl=U|0}process(c,$){for(let j=0;j<16;j++,$+=4)A8[j]=c.getUint32($),C8[j]=c.getUint32($+=4);for(let j=16;j<80;j++){let D=A8[j-15]|0,_=C8[j-15]|0,mc=x$(D,_,1)^x$(D,_,8)^LW(D,_,7),g=q$(D,_,1)^q$(D,_,8)^_W(D,_,7),Jc=A8[j-2]|0,u=C8[j-2]|0,a=x$(Jc,u,19)^zJ(Jc,u,61)^LW(Jc,u,6),Xc=q$(Jc,u,19)^xJ(Jc,u,61)^_W(Jc,u,6),e=uq(g,Xc,C8[j-7],C8[j-16]),B=kq(e,mc,a,A8[j-7],A8[j-16]);A8[j]=B|0,C8[j]=e|0}let{Ah:Q,Al:J,Bh:Y,Bl:X,Ch:W,Cl:m,Dh:G,Dl:z,Eh:x,El:q,Fh:M,Fl:N,Gh:w,Gl:U,Hh:v,Hl:i}=this;for(let j=0;j<80;j++){let D=x$(x,q,14)^x$(x,q,18)^zJ(x,q,41),_=q$(x,q,14)^q$(x,q,18)^xJ(x,q,41),mc=x&M^~x&w,g=q&N^~q&U,Jc=aq(i,_,g,PD[j],C8[j]),u=lq(Jc,v,D,mc,CD[j],A8[j]),a=Jc|0,Xc=x$(Q,J,28)^zJ(Q,J,34)^zJ(Q,J,39),e=q$(Q,J,28)^xJ(Q,J,34)^xJ(Q,J,39),B=Q&Y^Q&W^Y&W,C=J&X^J&m^X&m;v=w|0,i=U|0,w=M|0,U=N|0,M=x|0,N=q|0,{h:x,l:q}=e0(G|0,z|0,u|0,a|0),G=W|0,z=m|0,W=Y|0,m=X|0,Y=Q|0,X=J|0;let K=fq(a,e,C);Q=nq(K,u,Xc,B),J=K|0}({h:Q,l:J}=e0(this.Ah|0,this.Al|0,Q|0,J|0)),{h:Y,l:X}=e0(this.Bh|0,this.Bl|0,Y|0,X|0),{h:W,l:m}=e0(this.Ch|0,this.Cl|0,W|0,m|0),{h:G,l:z}=e0(this.Dh|0,this.Dl|0,G|0,z|0),{h:x,l:q}=e0(this.Eh|0,this.El|0,x|0,q|0),{h:M,l:N}=e0(this.Fh|0,this.Fl|0,M|0,N|0),{h:w,l:U}=e0(this.Gh|0,this.Gl|0,w|0,U|0),{h:v,l:i}=e0(this.Hh|0,this.Hl|0,v|0,i|0),this.set(Q,J,Y,X,W,m,G,z,x,q,M,N,w,U,v,i)}roundClean(){h0(A8,C8)}destroy(){h0(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}class ED extends qJ{Ah=dc[0]|0;Al=dc[1]|0;Bh=dc[2]|0;Bl=dc[3]|0;Ch=dc[4]|0;Cl=dc[5]|0;Dh=dc[6]|0;Dl=dc[7]|0;Eh=dc[8]|0;El=dc[9]|0;Fh=dc[10]|0;Fl=dc[11]|0;Gh=dc[12]|0;Gl=dc[13]|0;Hh=dc[14]|0;Hl=dc[15]|0;constructor(){super(64)}}class bD extends qJ{Ah=gc[0]|0;Al=gc[1]|0;Bh=gc[2]|0;Bl=gc[3]|0;Ch=gc[4]|0;Cl=gc[5]|0;Dh=gc[6]|0;Dl=gc[7]|0;Eh=gc[8]|0;El=gc[9]|0;Fh=gc[10]|0;Fl=gc[11]|0;Gh=gc[12]|0;Gl=gc[13]|0;Hh=gc[14]|0;Hl=gc[15]|0;constructor(){super(48)}}var c0=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),$0=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class FD extends qJ{Ah=c0[0]|0;Al=c0[1]|0;Bh=c0[2]|0;Bl=c0[3]|0;Ch=c0[4]|0;Cl=c0[5]|0;Dh=c0[6]|0;Dl=c0[7]|0;Eh=c0[8]|0;El=c0[9]|0;Fh=c0[10]|0;Fl=c0[11]|0;Gh=c0[12]|0;Gl=c0[13]|0;Hh=c0[14]|0;Hl=c0[15]|0;constructor(){super(28)}}class TD extends qJ{Ah=$0[0]|0;Al=$0[1]|0;Bh=$0[2]|0;Bl=$0[3]|0;Ch=$0[4]|0;Cl=$0[5]|0;Dh=$0[6]|0;Dl=$0[7]|0;Eh=$0[8]|0;El=$0[9]|0;Fh=$0[10]|0;Fl=$0[11]|0;Gh=$0[12]|0;Gl=$0[13]|0;Hh=$0[14]|0;Hl=$0[15]|0;constructor(){super(32)}}var Q0=Cq(()=>new hq,Pq(1));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var CW=BigInt(0),AW=BigInt(1);function MJ(c,$=""){if(typeof c!=="boolean"){let Q=$&&`"${$}" `;throw Error(Q+"expected boolean, got type="+typeof c)}return c}function oq(c){if(typeof c==="bigint"){if(!uY(c))throw Error("positive bigint expected, got "+c)}else I0(c);return c}function NJ(c){let $=oq(c).toString(16);return $.length&1?"0"+$:$}function gq(c){if(typeof c!=="string")throw Error("hex string expected, got "+typeof c);return c===""?CW:BigInt("0x"+c)}function P8(c){return gq(Hc(c))}function PW(c){return gq(Hc(fD(vc(c)).reverse()))}function kY(c,$){I0($),c=oq(c);let Q=Rc(c.toString(16).padStart($*2,"0"));if(Q.length!==$)throw Error("number too large");return Q}function EW(c,$){return kY(c,$).reverse()}function fD(c){return Uint8Array.from(c)}function dq(c){return Uint8Array.from(c,($,Q)=>{let J=$.charCodeAt(0);if($.length!==1||J>127)throw Error(`string contains non-ASCII character "${c[Q]}" with code ${J} at position ${Q}`);return J})}var uY=(c)=>typeof c==="bigint"&&CW<=c;function nD(c,$,Q){return uY(c)&&uY($)&&uY(Q)&&$<=c&&c<Q}function sq(c,$,Q,J){if(!nD($,Q,J))throw Error("expected valid "+c+": "+Q+" <= n < "+J+", got "+$)}function bW(c){let $;for($=0;c>CW;c>>=AW,$+=1);return $}var VJ=(c)=>(AW<<BigInt(c))-AW;function rq(c,$,Q){if(I0(c,"hashLen"),I0($,"qByteLen"),typeof Q!=="function")throw Error("hmacFn must be a function");let J=(v)=>new Uint8Array(v),Y=Uint8Array.of(),X=Uint8Array.of(0),W=Uint8Array.of(1),m=1000,G=J(c),z=J(c),x=0,q=()=>{G.fill(1),z.fill(0),x=0},M=(...v)=>Q(z,Fc(G,...v)),N=(v=Y)=>{if(z=M(X,v),G=M(),v.length===0)return;z=M(W,v),G=M()},w=()=>{if(x++>=m)throw Error("drbg: tried max amount of iterations");let v=0,i=[];while(v<$){G=M();let j=G.slice();i.push(j),v+=G.length}return Fc(...i)};return(v,i)=>{q(),N(v);let j=void 0;while(!(j=i(w())))N();return q(),j}}function wJ(c,$={},Q={}){if(!c||typeof c!=="object")throw Error("expected valid options object");function J(X,W,m){let G=c[X];if(m&&G===void 0)return;let z=typeof G;if(z!==W||G===null)throw Error(`param "${X}" is invalid: expected ${W}, got ${z}`)}let Y=(X,W)=>Object.entries(X).forEach(([m,G])=>J(m,G,W));Y($,!1),Y(Q,!0)}function FW(c){let $=new WeakMap;return(Q,...J)=>{let Y=$.get(Q);if(Y!==void 0)return Y;let X=c(Q,...J);return $.set(Q,X),X}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var m0=BigInt(0),J0=BigInt(1),M$=BigInt(2),cM=BigInt(3),$M=BigInt(4),QM=BigInt(5),uD=BigInt(7),JM=BigInt(8),kD=BigInt(9),YM=BigInt(16);function g0(c,$){let Q=c%$;return Q>=m0?Q:$+Q}function U0(c,$,Q){let J=c;while($-- >m0)J*=J,J%=Q;return J}function tq(c,$){if(c===m0)throw Error("invert: expected non-zero number");if($<=m0)throw Error("invert: expected positive modulus, got "+$);let Q=g0(c,$),J=$,Y=m0,X=J0,W=J0,m=m0;while(Q!==m0){let z=J/Q,x=J%Q,q=Y-W*z,M=X-m*z;J=Q,Q=x,Y=W,X=m,W=q,m=M}if(J!==J0)throw Error("invert: does not exist");return g0(Y,$)}function TW(c,$,Q){if(!c.eql(c.sqr($),Q))throw Error("Cannot find square root")}function XM(c,$){let Q=(c.ORDER+J0)/$M,J=c.pow($,Q);return TW(c,J,$),J}function aD(c,$){let Q=(c.ORDER-QM)/JM,J=c.mul($,M$),Y=c.pow(J,Q),X=c.mul($,Y),W=c.mul(c.mul(X,M$),Y),m=c.mul(X,c.sub(W,c.ONE));return TW(c,m,$),m}function lD(c){let $=mQ(c),Q=WM(c),J=Q($,$.neg($.ONE)),Y=Q($,J),X=Q($,$.neg(J)),W=(c+uD)/YM;return(m,G)=>{let z=m.pow(G,W),x=m.mul(z,J),q=m.mul(z,Y),M=m.mul(z,X),N=m.eql(m.sqr(x),G),w=m.eql(m.sqr(q),G);z=m.cmov(z,x,N),x=m.cmov(M,q,w);let U=m.eql(m.sqr(x),G),v=m.cmov(z,x,U);return TW(m,v,G),v}}function WM(c){if(c<cM)throw Error("sqrt is not defined for small field");let $=c-J0,Q=0;while($%M$===m0)$/=M$,Q++;let J=M$,Y=mQ(c);while(eq(Y,J)===1)if(J++>1000)throw Error("Cannot find square root: probably non-prime P");if(Q===1)return XM;let X=Y.pow(J,$),W=($+J0)/M$;return function(G,z){if(G.is0(z))return z;if(eq(G,z)!==1)throw Error("Cannot find square root");let x=Q,q=G.mul(G.ONE,X),M=G.pow(z,$),N=G.pow(z,W);while(!G.eql(M,G.ONE)){if(G.is0(M))return G.ZERO;let w=1,U=G.sqr(M);while(!G.eql(U,G.ONE))if(w++,U=G.sqr(U),w===x)throw Error("Cannot find square root");let v=J0<<BigInt(x-w-1),i=G.pow(q,v);x=w,q=G.sqr(i),M=G.mul(M,q),N=G.mul(N,i)}return N}}function hD(c){if(c%$M===cM)return XM;if(c%JM===QM)return aD;if(c%YM===kD)return lD(c);return WM(c)}var yD=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function fW(c){let $={ORDER:"bigint",BYTES:"number",BITS:"number"},Q=yD.reduce((J,Y)=>{return J[Y]="function",J},$);return wJ(c,Q),c}function oD(c,$,Q){if(Q<m0)throw Error("invalid exponent, negatives unsupported");if(Q===m0)return c.ONE;if(Q===J0)return $;let J=c.ONE,Y=$;while(Q>m0){if(Q&J0)J=c.mul(J,Y);Y=c.sqr(Y),Q>>=J0}return J}function aY(c,$,Q=!1){let J=Array($.length).fill(Q?c.ZERO:void 0),Y=$.reduce((W,m,G)=>{if(c.is0(m))return W;return J[G]=W,c.mul(W,m)},c.ONE),X=c.inv(Y);return $.reduceRight((W,m,G)=>{if(c.is0(m))return W;return J[G]=c.mul(W,J[G]),c.mul(W,m)},X),J}function eq(c,$){let Q=(c.ORDER-J0)/M$,J=c.pow($,Q),Y=c.eql(J,c.ONE),X=c.eql(J,c.ZERO),W=c.eql(J,c.neg(c.ONE));if(!Y&&!X&&!W)throw Error("invalid Legendre symbol result");return Y?1:X?0:-1}function gD(c,$){if($!==void 0)I0($);let Q=$!==void 0?$:c.toString(2).length,J=Math.ceil(Q/8);return{nBitLength:Q,nByteLength:J}}class mM{ORDER;BITS;BYTES;isLE;ZERO=m0;ONE=J0;_lengths;_sqrt;_mod;constructor(c,$={}){if(c<=m0)throw Error("invalid field: expected ORDER > 0, got "+c);let Q=void 0;if(this.isLE=!1,$!=null&&typeof $==="object"){if(typeof $.BITS==="number")Q=$.BITS;if(typeof $.sqrt==="function")this.sqrt=$.sqrt;if(typeof $.isLE==="boolean")this.isLE=$.isLE;if($.allowedLengths)this._lengths=$.allowedLengths?.slice();if(typeof $.modFromBytes==="boolean")this._mod=$.modFromBytes}let{nBitLength:J,nByteLength:Y}=gD(c,Q);if(Y>2048)throw Error("invalid field: expected ORDER of <= 2048 bytes");this.ORDER=c,this.BITS=J,this.BYTES=Y,this._sqrt=void 0,Object.preventExtensions(this)}create(c){return g0(c,this.ORDER)}isValid(c){if(typeof c!=="bigint")throw Error("invalid field element: expected bigint, got "+typeof c);return m0<=c&&c<this.ORDER}is0(c){return c===m0}isValidNot0(c){return!this.is0(c)&&this.isValid(c)}isOdd(c){return(c&J0)===J0}neg(c){return g0(-c,this.ORDER)}eql(c,$){return c===$}sqr(c){return g0(c*c,this.ORDER)}add(c,$){return g0(c+$,this.ORDER)}sub(c,$){return g0(c-$,this.ORDER)}mul(c,$){return g0(c*$,this.ORDER)}pow(c,$){return oD(this,c,$)}div(c,$){return g0(c*tq($,this.ORDER),this.ORDER)}sqrN(c){return c*c}addN(c,$){return c+$}subN(c,$){return c-$}mulN(c,$){return c*$}inv(c){return tq(c,this.ORDER)}sqrt(c){if(!this._sqrt)this._sqrt=hD(this.ORDER);return this._sqrt(this,c)}toBytes(c){return this.isLE?EW(c,this.BYTES):kY(c,this.BYTES)}fromBytes(c,$=!1){vc(c);let{_lengths:Q,BYTES:J,isLE:Y,ORDER:X,_mod:W}=this;if(Q){if(!Q.includes(c.length)||c.length>J)throw Error("Field.fromBytes: expected "+Q+" bytes, got "+c.length);let G=new Uint8Array(J);G.set(c,Y?0:G.length-c.length),c=G}if(c.length!==J)throw Error("Field.fromBytes: expected "+J+" bytes, got "+c.length);let m=Y?PW(c):P8(c);if(W)m=g0(m,X);if(!$){if(!this.isValid(m))throw Error("invalid field element: outside of range 0..ORDER")}return m}invertBatch(c){return aY(this,c)}cmov(c,$,Q){return Q?$:c}}function mQ(c,$={}){return new mM(c,$)}function GM(c){if(typeof c!=="bigint")throw Error("field order must be bigint");let $=c.toString(2).length;return Math.ceil($/8)}function nW(c){let $=GM(c);return $+Math.ceil($/2)}function lY(c,$,Q=!1){vc(c);let J=c.length,Y=GM($),X=nW($);if(J<16||J<X||J>1024)throw Error("expected "+X+"-1024 bytes of input, got "+J);let W=Q?PW(c):P8(c),m=g0(W,$-J0)+J0;return Q?EW(m,Y):kY(m,Y)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var GQ=BigInt(0),N$=BigInt(1);function iJ(c,$){let Q=$.negate();return c?Q:$}function lW(c,$){let Q=aY(c.Fp,$.map((J)=>J.Z));return $.map((J,Y)=>c.fromAffine(J.toAffine(Q[Y])))}function MM(c,$){if(!Number.isSafeInteger(c)||c<=0||c>$)throw Error("invalid window size, expected [1.."+$+"], got W="+c)}function uW(c,$){MM(c,$);let Q=Math.ceil($/c)+1,J=2**(c-1),Y=2**c,X=VJ(c),W=BigInt(c);return{windows:Q,windowSize:J,mask:X,maxNumber:Y,shiftBy:W}}function zM(c,$,Q){let{windowSize:J,mask:Y,maxNumber:X,shiftBy:W}=Q,m=Number(c&Y),G=c>>W;if(m>J)m-=X,G+=N$;let z=$*J,x=z+Math.abs(m)-1,q=m===0,M=m<0,N=$%2!==0;return{nextN:G,offset:x,isZero:q,isNeg:M,isNegF:N,offsetF:z}}var kW=new WeakMap,NM=new WeakMap;function aW(c){return NM.get(c)||1}function xM(c){if(c!==GQ)throw Error("invalid wNAF")}class hW{BASE;ZERO;Fn;bits;constructor(c,$){this.BASE=c.BASE,this.ZERO=c.ZERO,this.Fn=c.Fn,this.bits=$}_unsafeLadder(c,$,Q=this.ZERO){let J=c;while($>GQ){if($&N$)Q=Q.add(J);J=J.double(),$>>=N$}return Q}precomputeWindow(c,$){let{windows:Q,windowSize:J}=uW($,this.bits),Y=[],X=c,W=X;for(let m=0;m<Q;m++){W=X,Y.push(W);for(let G=1;G<J;G++)W=W.add(X),Y.push(W);X=W.double()}return Y}wNAF(c,$,Q){if(!this.Fn.isValid(Q))throw Error("invalid scalar");let J=this.ZERO,Y=this.BASE,X=uW(c,this.bits);for(let W=0;W<X.windows;W++){let{nextN:m,offset:G,isZero:z,isNeg:x,isNegF:q,offsetF:M}=zM(Q,W,X);if(Q=m,z)Y=Y.add(iJ(q,$[M]));else J=J.add(iJ(x,$[G]))}return xM(Q),{p:J,f:Y}}wNAFUnsafe(c,$,Q,J=this.ZERO){let Y=uW(c,this.bits);for(let X=0;X<Y.windows;X++){if(Q===GQ)break;let{nextN:W,offset:m,isZero:G,isNeg:z}=zM(Q,X,Y);if(Q=W,G)continue;else{let x=$[m];J=J.add(z?x.negate():x)}}return xM(Q),J}getPrecomputes(c,$,Q){let J=kW.get($);if(!J){if(J=this.precomputeWindow($,c),c!==1){if(typeof Q==="function")J=Q(J);kW.set($,J)}}return J}cached(c,$,Q){let J=aW(c);return this.wNAF(J,this.getPrecomputes(J,c,Q),$)}unsafe(c,$,Q,J){let Y=aW(c);if(Y===1)return this._unsafeLadder(c,$,J);return this.wNAFUnsafe(Y,this.getPrecomputes(Y,c,Q),$,J)}createCache(c,$){MM($,this.bits),NM.set(c,$),kW.delete(c)}hasCache(c){return aW(c)!==1}}function VM(c,$,Q,J){let Y=$,X=c.ZERO,W=c.ZERO;while(Q>GQ||J>GQ){if(Q&N$)X=X.add(Y);if(J&N$)W=W.add(Y);Y=Y.double(),Q>>=N$,J>>=N$}return{p1:X,p2:W}}function qM(c,$,Q){if($){if($.ORDER!==c)throw Error("Field.ORDER must match order: Fp == p, Fn == n");return fW($),$}else return mQ(c,{isLE:Q})}function wM(c,$,Q={},J){if(J===void 0)J=c==="edwards";if(!$||typeof $!=="object")throw Error(`expected valid ${c} CURVE object`);for(let G of["p","n","h"]){let z=$[G];if(!(typeof z==="bigint"&&z>GQ))throw Error(`CURVE.${G} must be positive bigint`)}let Y=qM($.p,Q.Fp,J),X=qM($.n,Q.Fn,J),m=["Gx","Gy","a",c==="weierstrass"?"b":"d"];for(let G of m)if(!Y.isValid($[G]))throw Error(`CURVE.${G} must be valid field element of CURVE.Fp`);return $=Object.freeze(Object.assign({},$)),{CURVE:$,Fp:Y,Fn:X}}function hY(c,$){return function(J){let Y=c(J);return{secretKey:Y,publicKey:$(Y)}}}class yW{oHash;iHash;blockLen;outputLen;finished=!1;destroyed=!1;constructor(c,$){if(z$(c),vc($,void 0,"key"),this.iHash=c.create(),typeof this.iHash.update!=="function")throw Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let Q=this.blockLen,J=new Uint8Array(Q);J.set($.length>Q?c.create().update($).digest():$);for(let Y=0;Y<J.length;Y++)J[Y]^=54;this.iHash.update(J),this.oHash=c.create();for(let Y=0;Y<J.length;Y++)J[Y]^=106;this.oHash.update(J),h0(J)}update(c){return WQ(this),this.iHash.update(c),this}digestInto(c){WQ(this),vc(c,this.outputLen,"output"),this.finished=!0,this.iHash.digestInto(c),this.oHash.update(c),this.oHash.digestInto(c),this.destroy()}digest(){let c=new Uint8Array(this.oHash.outputLen);return this.digestInto(c),c}_cloneInto(c){c||=Object.create(Object.getPrototypeOf(this),{});let{oHash:$,iHash:Q,finished:J,destroyed:Y,blockLen:X,outputLen:W}=this;return c=c,c.finished=J,c.destroyed=Y,c.blockLen=X,c.outputLen=W,c.oHash=$._cloneInto(c.oHash),c.iHash=Q._cloneInto(c.iHash),c}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}var E8=(c,$,Q)=>new yW(c,$).update(Q).digest();E8.create=(c,$)=>new yW(c,$);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var iM=(c,$)=>(c+(c>=0?$:-$)/UM)/$;function dD(c,$,Q){let[[J,Y],[X,W]]=$,m=iM(W*c,Q),G=iM(-Y*c,Q),z=c-m*J-G*X,x=-m*Y-G*W,q=z<N8,M=x<N8;if(q)z=-z;if(M)x=-x;let N=VJ(Math.ceil(bW(Q)/2))+zQ;if(z<N8||z>=N||x<N8||x>=N)throw Error("splitScalar (endomorphism): failed, k="+c);return{k1neg:q,k1:z,k2neg:M,k2:x}}function gW(c){if(!["compact","recovered","der"].includes(c))throw Error('Signature format must be "compact", "recovered", or "der"');return c}function oW(c,$){let Q={};for(let J of Object.keys($))Q[J]=c[J]===void 0?$[J]:c[J];if(MJ(Q.lowS,"lowS"),MJ(Q.prehash,"prehash"),Q.format!==void 0)gW(Q.format);return Q}class vM extends Error{constructor(c=""){super(c)}}var b8={Err:vM,_tlv:{encode:(c,$)=>{let{Err:Q}=b8;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length&1)throw new Q("tlv.encode: unpadded data");let J=$.length/2,Y=NJ(J);if(Y.length/2&128)throw new Q("tlv.encode: long form length too big");let X=J>127?NJ(Y.length/2|128):"";return NJ(c)+X+Y+$},decode(c,$){let{Err:Q}=b8,J=0;if(c<0||c>256)throw new Q("tlv.encode: wrong tag");if($.length<2||$[J++]!==c)throw new Q("tlv.decode: wrong tlv");let Y=$[J++],X=!!(Y&128),W=0;if(!X)W=Y;else{let G=Y&127;if(!G)throw new Q("tlv.decode(long): indefinite length not supported");if(G>4)throw new Q("tlv.decode(long): byte length is too big");let z=$.subarray(J,J+G);if(z.length!==G)throw new Q("tlv.decode: length bytes not complete");if(z[0]===0)throw new Q("tlv.decode(long): zero leftmost byte");for(let x of z)W=W<<8|x;if(J+=G,W<128)throw new Q("tlv.decode(long): not minimal encoding")}let m=$.subarray(J,J+W);if(m.length!==W)throw new Q("tlv.decode: wrong value length");return{v:m,l:$.subarray(J+W)}}},_int:{encode(c){let{Err:$}=b8;if(c<N8)throw new $("integer: negative integers are not allowed");let Q=NJ(c);if(Number.parseInt(Q[0],16)&8)Q="00"+Q;if(Q.length&1)throw new $("unexpected DER parsing assertion: unpadded hex");return Q},decode(c){let{Err:$}=b8;if(c[0]&128)throw new $("invalid signature integer: negative");if(c[0]===0&&!(c[1]&128))throw new $("invalid signature integer: unnecessary leading zero");return P8(c)}},toSig(c){let{Err:$,_int:Q,_tlv:J}=b8,Y=vc(c,void 0,"signature"),{v:X,l:W}=J.decode(48,Y);if(W.length)throw new $("invalid signature: left bytes after parsing");let{v:m,l:G}=J.decode(2,X),{v:z,l:x}=J.decode(2,G);if(x.length)throw new $("invalid signature: left bytes after parsing");return{r:Q.decode(m),s:Q.decode(z)}},hexFromSig(c){let{_tlv:$,_int:Q}=b8,J=$.encode(2,Q.encode(c.r)),Y=$.encode(2,Q.encode(c.s)),X=J+Y;return $.encode(48,X)}},N8=BigInt(0),zQ=BigInt(1),UM=BigInt(2),yY=BigInt(3),sD=BigInt(4);function jM(c,$={}){let Q=wM("weierstrass",c,$),{Fp:J,Fn:Y}=Q,X=Q.CURVE,{h:W,n:m}=X;wJ($,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object"});let{endo:G}=$;if(G){if(!J.is0(X.a)||typeof G.beta!=="bigint"||!Array.isArray(G.basises))throw Error('invalid endo: expected "beta": bigint and "basises": array')}let z=DM(J,Y);function x(){if(!J.isOdd)throw Error("compression is not supported: Field does not have .isOdd()")}function q(B,C,K){let{x:R,y:S}=C.toAffine(),Z=J.toBytes(R);if(MJ(K,"isCompressed"),K){x();let H=!J.isOdd(S);return Fc(KM(H),Z)}else return Fc(Uint8Array.of(4),Z,J.toBytes(S))}function M(B){vc(B,void 0,"Point");let{publicKey:C,publicKeyUncompressed:K}=z,R=B.length,S=B[0],Z=B.subarray(1);if(R===C&&(S===2||S===3)){let H=J.fromBytes(Z);if(!J.isValid(H))throw Error("bad point: is not on curve, wrong x");let A=U(H),b;try{b=J.sqrt(A)}catch(Yc){let cc=Yc instanceof Error?": "+Yc.message:"";throw Error("bad point: is not on curve, sqrt error"+cc)}x();let P=J.isOdd(b);if((S&1)===1!==P)b=J.neg(b);return{x:H,y:b}}else if(R===K&&S===4){let H=J.BYTES,A=J.fromBytes(Z.subarray(0,H)),b=J.fromBytes(Z.subarray(H,H*2));if(!v(A,b))throw Error("bad point: is not on curve");return{x:A,y:b}}else throw Error(`bad point: got length ${R}, expected compressed=${C} or uncompressed=${K}`)}let N=$.toBytes||q,w=$.fromBytes||M;function U(B){let C=J.sqr(B),K=J.mul(C,B);return J.add(J.add(K,J.mul(B,X.a)),X.b)}function v(B,C){let K=J.sqr(C),R=U(B);return J.eql(K,R)}if(!v(X.Gx,X.Gy))throw Error("bad curve params: generator point");let i=J.mul(J.pow(X.a,yY),sD),j=J.mul(J.sqr(X.b),BigInt(27));if(J.is0(J.add(i,j)))throw Error("bad curve params: a or b");function D(B,C,K=!1){if(!J.isValid(C)||K&&J.is0(C))throw Error(`bad point coordinate ${B}`);return C}function _(B){if(!(B instanceof a))throw Error("Weierstrass Point expected")}function mc(B){if(!G||!G.basises)throw Error("no endo");return dD(B,G.basises,Y.ORDER)}let g=FW((B,C)=>{let{X:K,Y:R,Z:S}=B;if(J.eql(S,J.ONE))return{x:K,y:R};let Z=B.is0();if(C==null)C=Z?J.ONE:J.inv(S);let H=J.mul(K,C),A=J.mul(R,C),b=J.mul(S,C);if(Z)return{x:J.ZERO,y:J.ZERO};if(!J.eql(b,J.ONE))throw Error("invZ was invalid");return{x:H,y:A}}),Jc=FW((B)=>{if(B.is0()){if($.allowInfinityPoint&&!J.is0(B.Y))return;throw Error("bad point: ZERO")}let{x:C,y:K}=B.toAffine();if(!J.isValid(C)||!J.isValid(K))throw Error("bad point: x or y not field elements");if(!v(C,K))throw Error("bad point: equation left != right");if(!B.isTorsionFree())throw Error("bad point: not in prime-order subgroup");return!0});function u(B,C,K,R,S){return K=new a(J.mul(K.X,B),K.Y,K.Z),C=iJ(R,C),K=iJ(S,K),C.add(K)}class a{static BASE=new a(X.Gx,X.Gy,J.ONE);static ZERO=new a(J.ZERO,J.ONE,J.ZERO);static Fp=J;static Fn=Y;X;Y;Z;constructor(B,C,K){this.X=D("x",B),this.Y=D("y",C,!0),this.Z=D("z",K),Object.freeze(this)}static CURVE(){return X}static fromAffine(B){let{x:C,y:K}=B||{};if(!B||!J.isValid(C)||!J.isValid(K))throw Error("invalid affine point");if(B instanceof a)throw Error("projective point not allowed");if(J.is0(C)&&J.is0(K))return a.ZERO;return new a(C,K,J.ONE)}static fromBytes(B){let C=a.fromAffine(w(vc(B,void 0,"point")));return C.assertValidity(),C}static fromHex(B){return a.fromBytes(Rc(B))}get x(){return this.toAffine().x}get y(){return this.toAffine().y}precompute(B=8,C=!0){if(e.createCache(this,B),!C)this.multiply(yY);return this}assertValidity(){Jc(this)}hasEvenY(){let{y:B}=this.toAffine();if(!J.isOdd)throw Error("Field doesn't support isOdd");return!J.isOdd(B)}equals(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:Z,Z:H}=B,A=J.eql(J.mul(C,H),J.mul(S,R)),b=J.eql(J.mul(K,H),J.mul(Z,R));return A&&b}negate(){return new a(this.X,J.neg(this.Y),this.Z)}double(){let{a:B,b:C}=X,K=J.mul(C,yY),{X:R,Y:S,Z}=this,H=J.ZERO,A=J.ZERO,b=J.ZERO,P=J.mul(R,R),r=J.mul(S,S),Yc=J.mul(Z,Z),cc=J.mul(R,S);return cc=J.add(cc,cc),b=J.mul(R,Z),b=J.add(b,b),H=J.mul(B,b),A=J.mul(K,Yc),A=J.add(H,A),H=J.sub(r,A),A=J.add(r,A),A=J.mul(H,A),H=J.mul(cc,H),b=J.mul(K,b),Yc=J.mul(B,Yc),cc=J.sub(P,Yc),cc=J.mul(B,cc),cc=J.add(cc,b),b=J.add(P,P),P=J.add(b,P),P=J.add(P,Yc),P=J.mul(P,cc),A=J.add(A,P),Yc=J.mul(S,Z),Yc=J.add(Yc,Yc),P=J.mul(Yc,cc),H=J.sub(H,P),b=J.mul(Yc,r),b=J.add(b,b),b=J.add(b,b),new a(H,A,b)}add(B){_(B);let{X:C,Y:K,Z:R}=this,{X:S,Y:Z,Z:H}=B,A=J.ZERO,b=J.ZERO,P=J.ZERO,r=X.a,Yc=J.mul(X.b,yY),cc=J.mul(C,S),Oc=J.mul(K,Z),o=J.mul(R,H),Dc=J.add(C,K),Uc=J.add(S,Z);Dc=J.mul(Dc,Uc),Uc=J.add(cc,Oc),Dc=J.sub(Dc,Uc),Uc=J.add(C,R);let qc=J.add(S,H);return Uc=J.mul(Uc,qc),qc=J.add(cc,o),Uc=J.sub(Uc,qc),qc=J.add(K,R),A=J.add(Z,H),qc=J.mul(qc,A),A=J.add(Oc,o),qc=J.sub(qc,A),P=J.mul(r,Uc),A=J.mul(Yc,o),P=J.add(A,P),A=J.sub(Oc,P),P=J.add(Oc,P),b=J.mul(A,P),Oc=J.add(cc,cc),Oc=J.add(Oc,cc),o=J.mul(r,o),Uc=J.mul(Yc,Uc),Oc=J.add(Oc,o),o=J.sub(cc,o),o=J.mul(r,o),Uc=J.add(Uc,o),cc=J.mul(Oc,Uc),b=J.add(b,cc),cc=J.mul(qc,Uc),A=J.mul(Dc,A),A=J.sub(A,cc),cc=J.mul(Dc,Oc),P=J.mul(qc,P),P=J.add(P,cc),new a(A,b,P)}subtract(B){return this.add(B.negate())}is0(){return this.equals(a.ZERO)}multiply(B){let{endo:C}=$;if(!Y.isValidNot0(B))throw Error("invalid scalar: out of range");let K,R,S=(Z)=>e.cached(this,Z,(H)=>lW(a,H));if(C){let{k1neg:Z,k1:H,k2neg:A,k2:b}=mc(B),{p:P,f:r}=S(H),{p:Yc,f:cc}=S(b);R=r.add(cc),K=u(C.beta,P,Yc,Z,A)}else{let{p:Z,f:H}=S(B);K=Z,R=H}return lW(a,[K,R])[0]}multiplyUnsafe(B){let{endo:C}=$,K=this;if(!Y.isValid(B))throw Error("invalid scalar: out of range");if(B===N8||K.is0())return a.ZERO;if(B===zQ)return K;if(e.hasCache(this))return this.multiply(B);if(C){let{k1neg:R,k1:S,k2neg:Z,k2:H}=mc(B),{p1:A,p2:b}=VM(a,K,S,H);return u(C.beta,A,b,R,Z)}else return e.unsafe(K,B)}toAffine(B){return g(this,B)}isTorsionFree(){let{isTorsionFree:B}=$;if(W===zQ)return!0;if(B)return B(a,this);return e.unsafe(this,m).is0()}clearCofactor(){let{clearCofactor:B}=$;if(W===zQ)return this;if(B)return B(a,this);return this.multiplyUnsafe(W)}isSmallOrder(){return this.multiplyUnsafe(W).is0()}toBytes(B=!0){return MJ(B,"isCompressed"),this.assertValidity(),N(a,this,B)}toHex(B=!0){return Hc(this.toBytes(B))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}let Xc=Y.BITS,e=new hW(a,$.endo?Math.ceil(Xc/2):Xc);return a.BASE.precompute(8),a}function KM(c){return Uint8Array.of(c?2:3)}function DM(c,$){return{secretKey:$.BYTES,publicKey:1+c.BYTES,publicKeyUncompressed:1+2*c.BYTES,publicKeyHasPrefix:!0,signature:2*$.BYTES}}function rD(c,$={}){let{Fn:Q}=c,J=$.randomBytes||o0,Y=Object.assign(DM(c.Fp,Q),{seed:nW(Q.ORDER)});function X(N){try{let w=Q.fromBytes(N);return Q.isValidNot0(w)}catch(w){return!1}}function W(N,w){let{publicKey:U,publicKeyUncompressed:v}=Y;try{let i=N.length;if(w===!0&&i!==U)return!1;if(w===!1&&i!==v)return!1;return!!c.fromBytes(N)}catch(i){return!1}}function m(N=J(Y.seed)){return lY(vc(N,Y.seed,"seed"),Q.ORDER)}function G(N,w=!0){return c.BASE.multiply(Q.fromBytes(N)).toBytes(w)}function z(N){let{secretKey:w,publicKey:U,publicKeyUncompressed:v}=Y;if(!GJ(N))return;if("_lengths"in Q&&Q._lengths||w===U)return;let i=vc(N,void 0,"key").length;return i===U||i===v}function x(N,w,U=!0){if(z(N)===!0)throw Error("first arg must be private key");if(z(w)===!1)throw Error("second arg must be public key");let v=Q.fromBytes(N);return c.fromBytes(w).multiply(v).toBytes(U)}let q={isValidSecretKey:X,isValidPublicKey:W,randomSecretKey:m},M=hY(m,G);return Object.freeze({getPublicKey:G,getSharedSecret:x,keygen:M,Point:c,utils:q,lengths:Y})}function BM(c,$,Q={}){z$($),wJ(Q,{},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"}),Q=Object.assign({},Q);let J=Q.randomBytes||o0,Y=Q.hmac||((K,R)=>E8($,K,R)),{Fp:X,Fn:W}=c,{ORDER:m,BITS:G}=W,{keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N}=rD(c,Q),w={prehash:!0,lowS:typeof Q.lowS==="boolean"?Q.lowS:!0,format:"compact",extraEntropy:!1},U=m*UM<X.ORDER;function v(K){let R=m>>zQ;return K>R}function i(K,R){if(!W.isValidNot0(R))throw Error(`invalid signature ${K}: out of range 1..Point.Fn.ORDER`);return R}function j(){if(U)throw Error('"recovered" sig type is not supported for cofactor >2 curves')}function D(K,R){gW(R);let S=N.signature,Z=R==="compact"?S:R==="recovered"?S+1:void 0;return vc(K,Z)}class _{r;s;recovery;constructor(K,R,S){if(this.r=i("r",K),this.s=i("s",R),S!=null){if(j(),![0,1,2,3].includes(S))throw Error("invalid recovery id");this.recovery=S}Object.freeze(this)}static fromBytes(K,R=w.format){D(K,R);let S;if(R==="der"){let{r:b,s:P}=b8.toSig(vc(K));return new _(b,P)}if(R==="recovered")S=K[0],R="compact",K=K.subarray(1);let Z=N.signature/2,H=K.subarray(0,Z),A=K.subarray(Z,Z*2);return new _(W.fromBytes(H),W.fromBytes(A),S)}static fromHex(K,R){return this.fromBytes(Rc(K),R)}assertRecovery(){let{recovery:K}=this;if(K==null)throw Error("invalid recovery id: must be present");return K}addRecoveryBit(K){return new _(this.r,this.s,K)}recoverPublicKey(K){let{r:R,s:S}=this,Z=this.assertRecovery(),H=Z===2||Z===3?R+m:R;if(!X.isValid(H))throw Error("invalid recovery id: sig.r+curve.n != R.x");let A=X.toBytes(H),b=c.fromBytes(Fc(KM((Z&1)===0),A)),P=W.inv(H),r=g(vc(K,void 0,"msgHash")),Yc=W.create(-r*P),cc=W.create(S*P),Oc=c.BASE.multiplyUnsafe(Yc).add(b.multiplyUnsafe(cc));if(Oc.is0())throw Error("invalid recovery: point at infinify");return Oc.assertValidity(),Oc}hasHighS(){return v(this.s)}toBytes(K=w.format){if(gW(K),K==="der")return Rc(b8.hexFromSig(this));let{r:R,s:S}=this,Z=W.toBytes(R),H=W.toBytes(S);if(K==="recovered")return j(),Fc(Uint8Array.of(this.assertRecovery()),Z,H);return Fc(Z,H)}toHex(K){return Hc(this.toBytes(K))}}let mc=Q.bits2int||function(R){if(R.length>8192)throw Error("input is too large");let S=P8(R),Z=R.length*8-G;return Z>0?S>>BigInt(Z):S},g=Q.bits2int_modN||function(R){return W.create(mc(R))},Jc=VJ(G);function u(K){return sq("num < 2^"+G,K,N8,Jc),W.toBytes(K)}function a(K,R){return vc(K,void 0,"message"),R?vc($(K),void 0,"prehashed message"):K}function Xc(K,R,S){let{lowS:Z,prehash:H,extraEntropy:A}=oW(S,w);K=a(K,H);let b=g(K),P=W.fromBytes(R);if(!W.isValidNot0(P))throw Error("invalid private key");let r=[u(P),u(b)];if(A!=null&&A!==!1){let o=A===!0?J(N.secretKey):A;r.push(vc(o,void 0,"extraEntropy"))}let Yc=Fc(...r),cc=b;function Oc(o){let Dc=mc(o);if(!W.isValidNot0(Dc))return;let Uc=W.inv(Dc),qc=c.BASE.multiply(Dc).toAffine(),M0=W.create(qc.x);if(M0===N8)return;let N0=W.create(Uc*W.create(cc+M0*P));if(N0===N8)return;let Y0=(qc.x===M0?0:2)|Number(qc.y&zQ),U8=N0;if(Z&&v(N0))U8=W.neg(N0),Y0^=1;return new _(M0,U8,U?void 0:Y0)}return{seed:Yc,k2sig:Oc}}function e(K,R,S={}){let{seed:Z,k2sig:H}=Xc(K,R,S);return rq($.outputLen,W.BYTES,Y)(Z,H).toBytes(S.format)}function B(K,R,S,Z={}){let{lowS:H,prehash:A,format:b}=oW(Z,w);if(S=vc(S,void 0,"publicKey"),R=a(R,A),!GJ(K)){let P=K instanceof _?", use sig.toBytes()":"";throw Error("verify expects Uint8Array signature"+P)}D(K,b);try{let P=_.fromBytes(K,b),r=c.fromBytes(S);if(H&&P.hasHighS())return!1;let{r:Yc,s:cc}=P,Oc=g(R),o=W.inv(cc),Dc=W.create(Oc*o),Uc=W.create(Yc*o),qc=c.BASE.multiplyUnsafe(Dc).add(r.multiplyUnsafe(Uc));if(qc.is0())return!1;return W.create(qc.x)===Yc}catch(P){return!1}}function C(K,R,S={}){let{prehash:Z}=oW(S,w);return R=a(R,Z),_.fromBytes(K,"recovered").recoverPublicKey(R).toBytes()}return Object.freeze({keygen:z,getPublicKey:x,getSharedSecret:q,utils:M,lengths:N,Point:c,sign:e,verify:B,recoverPublicKey:C,Signature:_,hash:$})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */var dY={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},tD={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),basises:[[BigInt("0x3086d221a7d46bcde86c90e49284eb15"),-BigInt("0xe4437ed6010e88286f547fa90abfe4c3")],[BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),BigInt("0x3086d221a7d46bcde86c90e49284eb15")]]},eD=BigInt(0),dW=BigInt(2);function cB(c){let $=dY.p,Q=BigInt(3),J=BigInt(6),Y=BigInt(11),X=BigInt(22),W=BigInt(23),m=BigInt(44),G=BigInt(88),z=c*c*c%$,x=z*z*c%$,q=U0(x,Q,$)*x%$,M=U0(q,Q,$)*x%$,N=U0(M,dW,$)*z%$,w=U0(N,Y,$)*N%$,U=U0(w,X,$)*w%$,v=U0(U,m,$)*U%$,i=U0(v,G,$)*v%$,j=U0(i,m,$)*U%$,D=U0(j,Q,$)*x%$,_=U0(D,W,$)*w%$,mc=U0(_,J,$)*z%$,g=U0(mc,dW,$);if(!oY.eql(oY.sqr(g),c))throw Error("Cannot find square root");return g}var oY=mQ(dY.p,{sqrt:cB}),V$=jM(dY,{Fp:oY,endo:tD}),UJ=BM(V$,Q0),HM={};function gY(c,...$){let Q=HM[c];if(Q===void 0){let J=Q0(dq(c));Q=Fc(J,J),HM[c]=Q}return Q0(Fc(Q,...$))}var rW=(c)=>c.toBytes(!0).slice(1),tW=(c)=>c%dW===eD;function sW(c){let{Fn:$,BASE:Q}=V$,J=$.fromBytes(c),Y=Q.multiply(J);return{scalar:tW(Y.y)?J:$.neg(J),bytes:rW(Y)}}function RM(c){let $=oY;if(!$.isValidNot0(c))throw Error("invalid x: Fail if x ≥ p");let Q=$.create(c*c),J=$.create(Q*c+BigInt(7)),Y=$.sqrt(J);if(!tW(Y))Y=$.neg(Y);let X=V$.fromAffine({x:c,y:Y});return X.assertValidity(),X}var vJ=P8;function pM(...c){return V$.Fn.create(vJ(gY("BIP0340/challenge",...c)))}function OM(c){return sW(c).bytes}function $B(c,$,Q=o0(32)){let{Fn:J}=V$,Y=vc(c,void 0,"message"),{bytes:X,scalar:W}=sW($),m=vc(Q,32,"auxRand"),G=J.toBytes(W^vJ(gY("BIP0340/aux",m))),z=gY("BIP0340/nonce",G,X,Y),{bytes:x,scalar:q}=sW(z),M=pM(x,X,Y),N=new Uint8Array(64);if(N.set(x,0),N.set(J.toBytes(J.create(q+M*W)),32),!IM(N,Y,X))throw Error("sign: Invalid signature produced");return N}function IM(c,$,Q){let{Fp:J,Fn:Y,BASE:X}=V$,W=vc(c,64,"signature"),m=vc($,void 0,"message"),G=vc(Q,32,"publicKey");try{let z=RM(vJ(G)),x=vJ(W.subarray(0,32));if(!J.isValidNot0(x))return!1;let q=vJ(W.subarray(32,64));if(!Y.isValidNot0(q))return!1;let M=pM(Y.toBytes(x),rW(z),m),N=X.multiplyUnsafe(q).add(z.multiplyUnsafe(Y.neg(M))),{x:w,y:U}=N.toAffine();if(N.is0()||!tW(U)||w!==x)return!1;return!0}catch(z){return!1}}var xQ=(()=>{let Q=(J=o0(48))=>{return lY(J,dY.n)};return{keygen:hY(Q,OM),getPublicKey:OM,sign:$B,verify:IM,Point:V$,utils:{randomSecretKey:Q,taggedHash:gY,lift_x:RM,pointToBytes:rW},lengths:{secretKey:32,publicKey:32,publicKeyHasPrefix:!1,signature:64,seed:48}}})();/*! scure-base - MIT License (c) 2022 Paul Miller (paulmillr.com) */function cX(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function $m(c){if(!cX(c))throw Error("Uint8Array expected")}function AM(c,$){if(!Array.isArray($))return!1;if($.length===0)return!0;if(c)return $.every((Q)=>typeof Q==="string");else return $.every((Q)=>Number.isSafeInteger(Q))}function CM(c){if(typeof c!=="function")throw Error("function expected");return!0}function F8(c,$){if(typeof $!=="string")throw Error(`${c}: string expected`);return!0}function KJ(c){if(!Number.isSafeInteger(c))throw Error(`invalid integer: ${c}`)}function rY(c){if(!Array.isArray(c))throw Error("array expected")}function tY(c,$){if(!AM(!0,$))throw Error(`${c}: array of strings expected`)}function Qm(c,$){if(!AM(!1,$))throw Error(`${c}: array of numbers expected`)}function j0(...c){let $=(X)=>X,Q=(X,W)=>(m)=>X(W(m)),J=c.map((X)=>X.encode).reduceRight(Q,$),Y=c.map((X)=>X.decode).reduce(Q,$);return{encode:J,decode:Y}}function K0(c){let $=typeof c==="string"?c.split(""):c,Q=$.length;tY("alphabet",$);let J=new Map($.map((Y,X)=>[Y,X]));return{encode:(Y)=>{return rY(Y),Y.map((X)=>{if(!Number.isSafeInteger(X)||X<0||X>=Q)throw Error(`alphabet.encode: digit index outside alphabet "${X}". Allowed: ${c}`);return $[X]})},decode:(Y)=>{return rY(Y),Y.map((X)=>{F8("alphabet.decode",X);let W=J.get(X);if(W===void 0)throw Error(`Unknown letter: "${X}". Allowed: ${c}`);return W})}}}function D0(c=""){return F8("join",c),{encode:($)=>{return tY("join.decode",$),$.join(c)},decode:($)=>{return F8("join.decode",$),$.split(c)}}}function $X(c,$="="){return KJ(c),F8("padding",$),{encode(Q){tY("padding.encode",Q);while(Q.length*c%8)Q.push($);return Q},decode(Q){tY("padding.decode",Q);let J=Q.length;if(J*c%8)throw Error("padding: invalid, string should have whole number of bytes");for(;J>0&&Q[J-1]===$;J--)if((J-1)*c%8===0)throw Error("padding: invalid, string has too much padding");return Q.slice(0,J)}}}function PM(c){return CM(c),{encode:($)=>$,decode:($)=>c($)}}function ZM(c,$,Q){if($<2)throw Error(`convertRadix: invalid from=${$}, base cannot be less than 2`);if(Q<2)throw Error(`convertRadix: invalid to=${Q}, base cannot be less than 2`);if(rY(c),!c.length)return[];let J=0,Y=[],X=Array.from(c,(m)=>{if(KJ(m),m<0||m>=$)throw Error(`invalid integer: ${m}`);return m}),W=X.length;while(!0){let m=0,G=!0;for(let z=J;z<W;z++){let x=X[z],q=$*m,M=q+x;if(!Number.isSafeInteger(M)||q/$!==m||M-x!==q)throw Error("convertRadix: carry overflow");let N=M/Q;m=M%Q;let w=Math.floor(N);if(X[z]=w,!Number.isSafeInteger(w)||w*Q+m!==M)throw Error("convertRadix: carry overflow");if(!G)continue;else if(!w)J=z;else G=!1}if(Y.push(m),G)break}for(let m=0;m<c.length-1&&c[m]===0;m++)Y.push(0);return Y.reverse()}var EM=(c,$)=>$===0?c:EM($,c%$),eY=(c,$)=>c+($-EM(c,$)),sY=(()=>{let c=[];for(let $=0;$<40;$++)c.push(2**$);return c})();function eW(c,$,Q,J){if(rY(c),$<=0||$>32)throw Error(`convertRadix2: wrong from=${$}`);if(Q<=0||Q>32)throw Error(`convertRadix2: wrong to=${Q}`);if(eY($,Q)>32)throw Error(`convertRadix2: carry overflow from=${$} to=${Q} carryBits=${eY($,Q)}`);let Y=0,X=0,W=sY[$],m=sY[Q]-1,G=[];for(let z of c){if(KJ(z),z>=W)throw Error(`convertRadix2: invalid data word=${z} from=${$}`);if(Y=Y<<$|z,X+$>32)throw Error(`convertRadix2: carry overflow pos=${X} from=${$}`);X+=$;for(;X>=Q;X-=Q)G.push((Y>>X-Q&m)>>>0);let x=sY[X];if(x===void 0)throw Error("invalid carry");Y&=x-1}if(Y=Y<<Q-X&m,!J&&X>=$)throw Error("Excess padding");if(!J&&Y>0)throw Error(`Non-zero padding: ${Y}`);if(J&&X>0)G.push(Y>>>0);return G}function QB(c){KJ(c);let $=256;return{encode:(Q)=>{if(!cX(Q))throw Error("radix.encode input should be Uint8Array");return ZM(Array.from(Q),$,c)},decode:(Q)=>{return Qm("radix.decode",Q),Uint8Array.from(ZM(Q,c,$))}}}function Z0(c,$=!1){if(KJ(c),c<=0||c>32)throw Error("radix2: bits should be in (0..32]");if(eY(8,c)>32||eY(c,8)>32)throw Error("radix2: carry overflow");return{encode:(Q)=>{if(!cX(Q))throw Error("radix2.encode input should be Uint8Array");return eW(Array.from(Q),8,c,!$)},decode:(Q)=>{return Qm("radix2.decode",Q),Uint8Array.from(eW(Q,c,8,$))}}}function LM(c){return CM(c),function(...$){try{return c.apply(null,$)}catch(Q){}}}var Bb=j0(Z0(4),K0("0123456789ABCDEF"),D0("")),Hb=j0(Z0(5),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),$X(5),D0("")),Ob=j0(Z0(5),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),D0("")),Rb=j0(Z0(5),K0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),$X(5),D0("")),pb=j0(Z0(5),K0("0123456789ABCDEFGHIJKLMNOPQRSTUV"),D0("")),Ib=j0(Z0(5),K0("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),D0(""),PM((c)=>c.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1"))),bM=(()=>typeof Uint8Array.from([]).toBase64==="function"&&typeof Uint8Array.fromBase64==="function")(),FM=(c,$)=>{F8("base64",c);let Q=$?/^[A-Za-z0-9=_-]+$/:/^[A-Za-z0-9=+/]+$/,J=$?"base64url":"base64";if(c.length>0&&!Q.test(c))throw Error("invalid base64");return Uint8Array.fromBase64(c,{alphabet:J,lastChunkHandling:"strict"})},L0=bM?{encode(c){return $m(c),c.toBase64()},decode(c){return FM(c,!1)}}:j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),$X(6),D0("")),Zb=j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),D0("")),Lb=bM?{encode(c){return $m(c),c.toBase64({alphabet:"base64url"})},decode(c){return FM(c,!0)}}:j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),$X(6),D0("")),_b=j0(Z0(6),K0("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),D0("")),Jm=(c)=>j0(QB(58),K0(c),D0("")),Sb=Jm("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),Ab=Jm("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),Cb=Jm("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");var cm=j0(K0("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),D0("")),_M=[996825010,642813549,513874426,1027748829,705979059];function jJ(c){let $=c>>25,Q=(c&33554431)<<5;for(let J=0;J<_M.length;J++)if(($>>J&1)===1)Q^=_M[J];return Q}function SM(c,$,Q=1){let J=c.length,Y=1;for(let X=0;X<J;X++){let W=c.charCodeAt(X);if(W<33||W>126)throw Error(`Invalid prefix (${c})`);Y=jJ(Y)^W>>5}Y=jJ(Y);for(let X=0;X<J;X++)Y=jJ(Y)^c.charCodeAt(X)&31;for(let X of $)Y=jJ(Y)^X;for(let X=0;X<6;X++)Y=jJ(Y);return Y^=Q,cm.encode(eW([Y%sY[30]],30,5,!1))}function TM(c){let $=c==="bech32"?1:734539939,Q=Z0(5),J=Q.decode,Y=Q.encode,X=LM(J);function W(q,M,N=90){if(F8("bech32.encode prefix",q),cX(M))M=Array.from(M);Qm("bech32.encode",M);let w=q.length;if(w===0)throw TypeError(`Invalid prefix length ${w}`);let U=w+7+M.length;if(N!==!1&&U>N)throw TypeError(`Length ${U} exceeds limit ${N}`);let v=q.toLowerCase(),i=SM(v,M,$);return`${v}1${cm.encode(M)}${i}`}function m(q,M=90){F8("bech32.decode input",q);let N=q.length;if(N<8||M!==!1&&N>M)throw TypeError(`invalid string length: ${N} (${q}). Expected (8..${M})`);let w=q.toLowerCase();if(q!==w&&q!==q.toUpperCase())throw Error("String must be lowercase or uppercase");let U=w.lastIndexOf("1");if(U===0||U===-1)throw Error('Letter "1" must be present between prefix and data only');let v=w.slice(0,U),i=w.slice(U+1);if(i.length<6)throw Error("Data must be at least 6 characters long");let j=cm.decode(i).slice(0,-6),D=SM(v,j,$);if(!i.endsWith(D))throw Error(`Invalid checksum in ${q}: expected "${D}"`);return{prefix:v,words:j}}let G=LM(m);function z(q){let{prefix:M,words:N}=m(q,!1);return{prefix:M,words:N,bytes:J(N)}}function x(q,M){return W(q,Y(M))}return{encode:W,decode:m,encodeFromBytes:x,decodeToBytes:z,decodeUnsafe:G,fromWords:J,fromWordsUnsafe:X,toWords:Y}}var T8=TM("bech32"),Pb=TM("bech32m");var JB=(()=>typeof Uint8Array.from([]).toHex==="function"&&typeof Uint8Array.fromHex==="function")(),YB={encode(c){return $m(c),c.toHex()},decode(c){return F8("hex",c),Uint8Array.fromHex(c)}},Eb=JB?YB:j0(Z0(4),K0("0123456789abcdef"),D0(""),PM((c)=>{if(typeof c!=="string"||c.length%2!==0)throw TypeError(`hex.decode: expected string, got ${typeof c} with length ${c.length}`);return c.toLowerCase()}));/*! noble-ciphers - MIT License (c) 2023 Paul Miller (paulmillr.com) */function XB(c){return c instanceof Uint8Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint8Array"}function QX(c){if(typeof c!=="boolean")throw Error(`boolean expected, not ${c}`)}function DJ(c){if(!Number.isSafeInteger(c)||c<0)throw Error("positive integer expected, got "+c)}function Ac(c,$,Q=""){let J=XB(c),Y=c?.length,X=$!==void 0;if(!J||X&&Y!==$){let W=Q&&`"${Q}" `,m=X?` of length ${$}`:"",G=J?`length=${Y}`:`type=${typeof c}`;throw Error(W+"expected Uint8Array"+m+", got "+G)}return c}function Ym(c,$=!0){if(c.destroyed)throw Error("Hash instance has been destroyed");if($&&c.finished)throw Error("Hash#digest() has already been called")}function fM(c,$){Ac(c,void 0,"output");let Q=$.outputLen;if(c.length<Q)throw Error("digestInto() expects output buffer of length at least "+Q)}function nc(c){return new Uint32Array(c.buffer,c.byteOffset,Math.floor(c.byteLength/4))}function sc(...c){for(let $=0;$<c.length;$++)c[$].fill(0)}function nM(c){return new DataView(c.buffer,c.byteOffset,c.byteLength)}var WB=(()=>new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68)();function uM(c,$){return c.buffer===$.buffer&&c.byteOffset<$.byteOffset+$.byteLength&&$.byteOffset<c.byteOffset+c.byteLength}function Xm(c,$){if(uM(c,$)&&c.byteOffset<$.byteOffset)throw Error("complex overlap of input and output is not supported")}function kM(c,$){if($==null||typeof $!=="object")throw Error("options must be defined");return Object.assign(c,$)}function BJ(c,$){if(c.length!==$.length)return!1;let Q=0;for(let J=0;J<c.length;J++)Q|=c[J]^$[J];return Q===0}var HJ=(c,$)=>{function Q(J,...Y){if(Ac(J,void 0,"key"),!WB)throw Error("Non little-endian hardware is not yet supported");if(c.nonceLength!==void 0){let x=Y[0];Ac(x,c.varSizeNonce?void 0:c.nonceLength,"nonce")}let X=c.tagLength;if(X&&Y[1]!==void 0)Ac(Y[1],void 0,"AAD");let W=$(J,...Y),m=(x,q)=>{if(q!==void 0){if(x!==2)throw Error("cipher output not supported");Ac(q,void 0,"output")}},G=!1;return{encrypt(x,q){if(G)throw Error("cannot encrypt() twice with same key + nonce");return G=!0,Ac(x),m(W.encrypt.length,q),W.encrypt(x,q)},decrypt(x,q){if(Ac(x),X&&x.length<X)throw Error('"ciphertext" expected length bigger than tagLength='+X);return m(W.decrypt.length,q),W.decrypt(x,q)}}}return Object.assign(Q,c),Q};function qQ(c,$,Q=!0){if($===void 0)return new Uint8Array(c);if($.length!==c)throw Error('"output" expected Uint8Array of length '+c+", got: "+$.length);if(Q&&!w$($))throw Error("invalid output, must be aligned");return $}function Wm(c,$,Q){QX(Q);let J=new Uint8Array(16),Y=nM(J);return Y.setBigUint64(0,BigInt($),Q),Y.setBigUint64(8,BigInt(c),Q),J}function w$(c){return c.byteOffset%4===0}function _0(c){return Uint8Array.from(c)}var lc=16;var GB=283;function lM(c){if(![16,24,32].includes(c.length))throw Error('"aes key" expected Uint8Array of length 16/24/32, got length='+c.length)}function qm(c){return c<<1^GB&-(c>>7)}function MQ(c,$){let Q=0;for(;$>0;$>>=1)Q^=c&-($&1),c=qm(c);return Q}var zm=(()=>{let c=new Uint8Array(256);for(let Q=0,J=1;Q<256;Q++,J^=qm(J))c[Q]=J;let $=new Uint8Array(256);$[0]=99;for(let Q=0;Q<255;Q++){let J=c[255-Q];J|=J<<8,$[c[Q]]=(J^J>>4^J>>5^J>>6^J>>7^99)&255}return sc(c),$})(),zB=zm.map((c,$)=>zm.indexOf($)),xB=(c)=>c<<24|c>>>8,mm=(c)=>c<<8|c>>>24;function hM(c,$){if(c.length!==256)throw Error("Wrong sbox length");let Q=new Uint32Array(256).map((z,x)=>$(c[x])),J=Q.map(mm),Y=J.map(mm),X=Y.map(mm),W=new Uint32Array(65536),m=new Uint32Array(65536),G=new Uint16Array(65536);for(let z=0;z<256;z++)for(let x=0;x<256;x++){let q=z*256+x;W[q]=Q[z]^J[x],m[q]=Y[z]^X[x],G[q]=c[z]<<8|c[x]}return{sbox:c,sbox2:G,T0:Q,T1:J,T2:Y,T3:X,T01:W,T23:m}}var Mm=hM(zm,(c)=>MQ(c,3)<<24|c<<16|c<<8|MQ(c,2)),yM=hM(zB,(c)=>MQ(c,11)<<24|MQ(c,13)<<16|MQ(c,9)<<8|MQ(c,14)),qB=(()=>{let c=new Uint8Array(16);for(let $=0,Q=1;$<16;$++,Q=qm(Q))c[$]=Q;return c})();function Nm(c){Ac(c);let $=c.length;lM(c);let{sbox2:Q}=Mm,J=[];if(!w$(c))J.push(c=_0(c));let Y=nc(c),X=Y.length,W=(G)=>c8(Q,G,G,G,G),m=new Uint32Array($+28);m.set(Y);for(let G=X;G<m.length;G++){let z=m[G-1];if(G%X===0)z=W(xB(z))^qB[G/X-1];else if(X>6&&G%X===4)z=W(z);m[G]=m[G-X]^z}return sc(...J),m}function MB(c){let $=Nm(c),Q=$.slice(),J=$.length,{sbox2:Y}=Mm,{T0:X,T1:W,T2:m,T3:G}=yM;for(let z=0;z<J;z+=4)for(let x=0;x<4;x++)Q[z+x]=$[J-z-4+x];sc($);for(let z=4;z<J-4;z++){let x=Q[z],q=c8(Y,x,x,x,x);Q[z]=X[q&255]^W[q>>>8&255]^m[q>>>16&255]^G[q>>>24]}return Q}function f8(c,$,Q,J,Y,X){return c[Q<<8&65280|J>>>8&255]^$[Y>>>8&65280|X>>>24&255]}function c8(c,$,Q,J,Y){return c[$&255|Q&65280]|c[J>>>16&255|Y>>>16&65280]<<16}function xm(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=Mm,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Q,J,Y),v=c[G++]^f8(W,m,Q,J,Y,$),i=c[G++]^f8(W,m,J,Y,$,Q),j=c[G++]^f8(W,m,Y,$,Q,J);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Q,J,Y),q=c[G++]^c8(X,Q,J,Y,$),M=c[G++]^c8(X,J,Y,$,Q),N=c[G++]^c8(X,Y,$,Q,J);return{s0:x,s1:q,s2:M,s3:N}}function NB(c,$,Q,J,Y){let{sbox2:X,T01:W,T23:m}=yM,G=0;$^=c[G++],Q^=c[G++],J^=c[G++],Y^=c[G++];let z=c.length/4-2;for(let w=0;w<z;w++){let U=c[G++]^f8(W,m,$,Y,J,Q),v=c[G++]^f8(W,m,Q,$,Y,J),i=c[G++]^f8(W,m,J,Q,$,Y),j=c[G++]^f8(W,m,Y,J,Q,$);$=U,Q=v,J=i,Y=j}let x=c[G++]^c8(X,$,Y,J,Q),q=c[G++]^c8(X,Q,$,Y,J),M=c[G++]^c8(X,J,Q,$,Y),N=c[G++]^c8(X,Y,J,Q,$);return{s0:x,s1:q,s2:M,s3:N}}function VB(c){if(Ac(c),c.length%lc!==0)throw Error("aes-(cbc/ecb).decrypt ciphertext should consist of blocks with size "+lc)}function wB(c,$,Q){Ac(c);let J=c.length,Y=J%lc;if(!$&&Y!==0)throw Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");if(!w$(c))c=_0(c);let X=nc(c);if($){let m=lc-Y;if(!m)m=lc;J=J+m}Q=qQ(J,Q),Xm(c,Q);let W=nc(Q);return{b:X,o:W,out:Q}}function iB(c,$){if(!$)return c;let Q=c.length;if(!Q)throw Error("aes/pcks5: empty ciphertext not allowed");let J=c[Q-1];if(J<=0||J>16)throw Error("aes/pcks5: wrong padding");let Y=c.subarray(0,-J);for(let X=0;X<J;X++)if(c[Q-X-1]!==J)throw Error("aes/pcks5: wrong padding");return Y}function vB(c){let $=new Uint8Array(16),Q=nc($);$.set(c);let J=lc-c.length;for(let Y=lc-J;Y<lc;Y++)$[Y]=J;return Q}var Vm=HJ({blockSize:16,nonceLength:16},function($,Q,J={}){let Y=!J.disablePadding;return{encrypt(X,W){let m=Nm($),{b:G,o:z,out:x}=wB(X,Y,W),q=Q,M=[m];if(!w$(q))M.push(q=_0(q));let N=nc(q),w=N[0],U=N[1],v=N[2],i=N[3],j=0;for(;j+4<=G.length;)w^=G[j+0],U^=G[j+1],v^=G[j+2],i^=G[j+3],{s0:w,s1:U,s2:v,s3:i}=xm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i;if(Y){let D=vB(X.subarray(j*4));w^=D[0],U^=D[1],v^=D[2],i^=D[3],{s0:w,s1:U,s2:v,s3:i}=xm(m,w,U,v,i),z[j++]=w,z[j++]=U,z[j++]=v,z[j++]=i}return sc(...M),x},decrypt(X,W){VB(X);let m=MB($),G=Q,z=[m];if(!w$(G))z.push(G=_0(G));let x=nc(G);if(W=qQ(X.length,W),!w$(X))z.push(X=_0(X));Xm(X,W);let q=nc(X),M=nc(W),N=x[0],w=x[1],U=x[2],v=x[3];for(let i=0;i+4<=q.length;){let j=N,D=w,_=U,mc=v;N=q[i+0],w=q[i+1],U=q[i+2],v=q[i+3];let{s0:g,s1:Jc,s2:u,s3:a}=NB(m,N,w,U,v);M[i++]=g^j,M[i++]=Jc^D,M[i++]=u^_,M[i++]=a^mc}return sc(...z),iB(W,Y)}}});function UB(c){return c instanceof Uint32Array||ArrayBuffer.isView(c)&&c.constructor.name==="Uint32Array"}function Gm(c,$){if(Ac($,16,"block"),!UB(c))throw Error("_encryptBlock accepts result of expandKeyLE");let Q=nc($),{s0:J,s1:Y,s2:X,s3:W}=xm(c,Q[0],Q[1],Q[2],Q[3]);return Q[0]=J,Q[1]=Y,Q[2]=X,Q[3]=W,$}function aM(c){let $=0;for(let Q=lc-1;Q>=0;Q--){let J=(c[Q]&128)>>>7;c[Q]=c[Q]<<1|$,$=J}if($)c[lc-1]^=135;return c}function JX(c,$){if(c.length!==$.length)throw Error("xorBlock: blocks must have same length");for(let Q=0;Q<c.length;Q++)c[Q]=c[Q]^$[Q];return c}class wm{buffer;destroyed;k1;k2;xk;constructor(c){Ac(c),lM(c),this.xk=Nm(c),this.buffer=new Uint8Array(0),this.destroyed=!1;let $=new Uint8Array(lc);Gm(this.xk,$),this.k1=aM($),this.k2=aM(new Uint8Array(this.k1))}update(c){let{destroyed:$,buffer:Q}=this;if($)throw Error("CMAC instance was destroyed");Ac(c);let J=new Uint8Array(Q.length+c.length);return J.set(Q),J.set(c,Q.length),this.buffer=J,this}digest(){if(this.destroyed)throw Error("CMAC instance was destroyed");let{buffer:c}=this,$=c.length,Q=Math.ceil($/lc),J;if(Q===0)Q=1,J=!1;else J=$%lc===0;let Y=(Q-1)*lc,X=c.subarray(Y),W;if(J)W=JX(new Uint8Array(X),this.k1);else{let G=new Uint8Array(lc);G.set(X),G[X.length]=128,W=JX(G,this.k2)}let m=new Uint8Array(lc);for(let G=0;G<Q-1;G++){let z=c.subarray(G*lc,(G+1)*lc);JX(m,z),Gm(this.xk,m)}return JX(m,W),Gm(this.xk,m),sc(W),m}destroy(){let{buffer:c,destroyed:$,xk:Q,k1:J,k2:Y}=this;if($)return;this.destroyed=!0,sc(c,Q,J,Y)}}var jB=(c,$)=>new wm(c).update($).digest();jB.create=(c)=>new wm(c);var gM=(c)=>Uint8Array.from(c.split(""),($)=>$.charCodeAt(0)),KB=gM("expand 16-byte k"),DB=gM("expand 32-byte k"),BB=nc(KB),HB=nc(DB);function h(c,$){return c<<$|c>>>32-$}function im(c){return c.byteOffset%4===0}var YX=64,OB=16,dM=4294967295,oM=Uint32Array.of();function RB(c,$,Q,J,Y,X,W,m){let G=Y.length,z=new Uint8Array(YX),x=nc(z),q=im(Y)&&im(X),M=q?nc(Y):oM,N=q?nc(X):oM;for(let w=0;w<G;W++){if(c($,Q,J,x,W,m),W>=dM)throw Error("arx: counter overflow");let U=Math.min(YX,G-w);if(q&&U===YX){let v=w/4;if(w%4!==0)throw Error("arx: invalid block position");for(let i=0,j;i<OB;i++)j=v+i,N[j]=M[j]^x[i];w+=YX;continue}for(let v=0,i;v<U;v++)i=w+v,X[i]=Y[i]^z[v];w+=U}}function vm(c,$){let{allowShortKeys:Q,extendNonceFn:J,counterLength:Y,counterRight:X,rounds:W}=kM({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},$);if(typeof c!=="function")throw Error("core must be a function");return DJ(Y),DJ(W),QX(X),QX(Q),(m,G,z,x,q=0)=>{Ac(m,void 0,"key"),Ac(G,void 0,"nonce"),Ac(z,void 0,"data");let M=z.length;if(x===void 0)x=new Uint8Array(M);if(Ac(x,void 0,"output"),DJ(q),q<0||q>=dM)throw Error("arx: counter overflow");if(x.length<M)throw Error(`arx: output (${x.length}) is shorter than data (${M})`);let N=[],w=m.length,U,v;if(w===32)N.push(U=_0(m)),v=HB;else if(w===16&&Q)U=new Uint8Array(32),U.set(m),U.set(m,16),v=BB,N.push(U);else throw Ac(m,32,"arx key"),Error("invalid key size");if(!im(G))N.push(G=_0(G));let i=nc(U);if(J){if(G.length!==24)throw Error("arx: extended nonce must be 24 bytes");J(v,i,nc(G.subarray(0,16)),i),G=G.subarray(16)}let j=16-Y;if(j!==G.length)throw Error(`arx: nonce must be ${j} or 16 bytes`);if(j!==12){let _=new Uint8Array(12);_.set(G,X?0:12-G.length),G=_,N.push(G)}let D=nc(G);return RB(c,v,i,D,z,x,q,W),sc(...N),x}}function rc(c,$){return c[$++]&255|(c[$++]&255)<<8}class sM{blockLen=16;outputLen=16;buffer=new Uint8Array(16);r=new Uint16Array(10);h=new Uint16Array(10);pad=new Uint16Array(8);pos=0;finished=!1;constructor(c){c=_0(Ac(c,32,"key"));let $=rc(c,0),Q=rc(c,2),J=rc(c,4),Y=rc(c,6),X=rc(c,8),W=rc(c,10),m=rc(c,12),G=rc(c,14);this.r[0]=$&8191,this.r[1]=($>>>13|Q<<3)&8191,this.r[2]=(Q>>>10|J<<6)&7939,this.r[3]=(J>>>7|Y<<9)&8191,this.r[4]=(Y>>>4|X<<12)&255,this.r[5]=X>>>1&8190,this.r[6]=(X>>>14|W<<2)&8191,this.r[7]=(W>>>11|m<<5)&8065,this.r[8]=(m>>>8|G<<8)&8191,this.r[9]=G>>>5&127;for(let z=0;z<8;z++)this.pad[z]=rc(c,16+2*z)}process(c,$,Q=!1){let J=Q?0:2048,{h:Y,r:X}=this,W=X[0],m=X[1],G=X[2],z=X[3],x=X[4],q=X[5],M=X[6],N=X[7],w=X[8],U=X[9],v=rc(c,$+0),i=rc(c,$+2),j=rc(c,$+4),D=rc(c,$+6),_=rc(c,$+8),mc=rc(c,$+10),g=rc(c,$+12),Jc=rc(c,$+14),u=Y[0]+(v&8191),a=Y[1]+((v>>>13|i<<3)&8191),Xc=Y[2]+((i>>>10|j<<6)&8191),e=Y[3]+((j>>>7|D<<9)&8191),B=Y[4]+((D>>>4|_<<12)&8191),C=Y[5]+(_>>>1&8191),K=Y[6]+((_>>>14|mc<<2)&8191),R=Y[7]+((mc>>>11|g<<5)&8191),S=Y[8]+((g>>>8|Jc<<8)&8191),Z=Y[9]+(Jc>>>5|J),H=0,A=H+u*W+a*(5*U)+Xc*(5*w)+e*(5*N)+B*(5*M);H=A>>>13,A&=8191,A+=C*(5*q)+K*(5*x)+R*(5*z)+S*(5*G)+Z*(5*m),H+=A>>>13,A&=8191;let b=H+u*m+a*W+Xc*(5*U)+e*(5*w)+B*(5*N);H=b>>>13,b&=8191,b+=C*(5*M)+K*(5*q)+R*(5*x)+S*(5*z)+Z*(5*G),H+=b>>>13,b&=8191;let P=H+u*G+a*m+Xc*W+e*(5*U)+B*(5*w);H=P>>>13,P&=8191,P+=C*(5*N)+K*(5*M)+R*(5*q)+S*(5*x)+Z*(5*z),H+=P>>>13,P&=8191;let r=H+u*z+a*G+Xc*m+e*W+B*(5*U);H=r>>>13,r&=8191,r+=C*(5*w)+K*(5*N)+R*(5*M)+S*(5*q)+Z*(5*x),H+=r>>>13,r&=8191;let Yc=H+u*x+a*z+Xc*G+e*m+B*W;H=Yc>>>13,Yc&=8191,Yc+=C*(5*U)+K*(5*w)+R*(5*N)+S*(5*M)+Z*(5*q),H+=Yc>>>13,Yc&=8191;let cc=H+u*q+a*x+Xc*z+e*G+B*m;H=cc>>>13,cc&=8191,cc+=C*W+K*(5*U)+R*(5*w)+S*(5*N)+Z*(5*M),H+=cc>>>13,cc&=8191;let Oc=H+u*M+a*q+Xc*x+e*z+B*G;H=Oc>>>13,Oc&=8191,Oc+=C*m+K*W+R*(5*U)+S*(5*w)+Z*(5*N),H+=Oc>>>13,Oc&=8191;let o=H+u*N+a*M+Xc*q+e*x+B*z;H=o>>>13,o&=8191,o+=C*G+K*m+R*W+S*(5*U)+Z*(5*w),H+=o>>>13,o&=8191;let Dc=H+u*w+a*N+Xc*M+e*q+B*x;H=Dc>>>13,Dc&=8191,Dc+=C*z+K*G+R*m+S*W+Z*(5*U),H+=Dc>>>13,Dc&=8191;let Uc=H+u*U+a*w+Xc*N+e*M+B*q;H=Uc>>>13,Uc&=8191,Uc+=C*x+K*z+R*G+S*m+Z*W,H+=Uc>>>13,Uc&=8191,H=(H<<2)+H|0,H=H+A|0,A=H&8191,H=H>>>13,b+=H,Y[0]=A,Y[1]=b,Y[2]=P,Y[3]=r,Y[4]=Yc,Y[5]=cc,Y[6]=Oc,Y[7]=o,Y[8]=Dc,Y[9]=Uc}finalize(){let{h:c,pad:$}=this,Q=new Uint16Array(10),J=c[1]>>>13;c[1]&=8191;for(let W=2;W<10;W++)c[W]+=J,J=c[W]>>>13,c[W]&=8191;c[0]+=J*5,J=c[0]>>>13,c[0]&=8191,c[1]+=J,J=c[1]>>>13,c[1]&=8191,c[2]+=J,Q[0]=c[0]+5,J=Q[0]>>>13,Q[0]&=8191;for(let W=1;W<10;W++)Q[W]=c[W]+J,J=Q[W]>>>13,Q[W]&=8191;Q[9]-=8192;let Y=(J^1)-1;for(let W=0;W<10;W++)Q[W]&=Y;Y=~Y;for(let W=0;W<10;W++)c[W]=c[W]&Y|Q[W];c[0]=(c[0]|c[1]<<13)&65535,c[1]=(c[1]>>>3|c[2]<<10)&65535,c[2]=(c[2]>>>6|c[3]<<7)&65535,c[3]=(c[3]>>>9|c[4]<<4)&65535,c[4]=(c[4]>>>12|c[5]<<1|c[6]<<14)&65535,c[5]=(c[6]>>>2|c[7]<<11)&65535,c[6]=(c[7]>>>5|c[8]<<8)&65535,c[7]=(c[8]>>>8|c[9]<<5)&65535;let X=c[0]+$[0];c[0]=X&65535;for(let W=1;W<8;W++)X=(c[W]+$[W]|0)+(X>>>16)|0,c[W]=X&65535;sc(Q)}update(c){Ym(this),Ac(c),c=_0(c);let{buffer:$,blockLen:Q}=this,J=c.length;for(let Y=0;Y<J;){let X=Math.min(Q-this.pos,J-Y);if(X===Q){for(;Q<=J-Y;Y+=Q)this.process(c,Y);continue}if($.set(c.subarray(Y,Y+X),this.pos),this.pos+=X,Y+=X,this.pos===Q)this.process($,0,!1),this.pos=0}return this}destroy(){sc(this.h,this.r,this.buffer,this.pad)}digestInto(c){Ym(this),fM(c,this),this.finished=!0;let{buffer:$,h:Q}=this,{pos:J}=this;if(J){$[J++]=1;for(;J<16;J++)$[J]=0;this.process($,0,!0)}this.finalize();let Y=0;for(let X=0;X<8;X++)c[Y++]=Q[X]>>>0,c[Y++]=Q[X]>>>8;return c}digest(){let{buffer:c,outputLen:$}=this;this.digestInto(c);let Q=c.slice(0,$);return this.destroy(),Q}}function pB(c){let $=(J,Y)=>c(Y).update(J).digest(),Q=c(new Uint8Array(32));return $.outputLen=Q.outputLen,$.blockLen=Q.blockLen,$.create=(J)=>c(J),$}var rM=(()=>pB((c)=>new sM(c)))();function cN(c,$,Q,J,Y,X=20){let W=c[0],m=c[1],G=c[2],z=c[3],x=$[0],q=$[1],M=$[2],N=$[3],w=$[4],U=$[5],v=$[6],i=$[7],j=Y,D=Q[0],_=Q[1],mc=Q[2],g=W,Jc=m,u=G,a=z,Xc=x,e=q,B=M,C=N,K=w,R=U,S=v,Z=i,H=j,A=D,b=_,P=mc;for(let Yc=0;Yc<X;Yc+=2)g=g+Xc|0,H=h(H^g,16),K=K+H|0,Xc=h(Xc^K,12),g=g+Xc|0,H=h(H^g,8),K=K+H|0,Xc=h(Xc^K,7),Jc=Jc+e|0,A=h(A^Jc,16),R=R+A|0,e=h(e^R,12),Jc=Jc+e|0,A=h(A^Jc,8),R=R+A|0,e=h(e^R,7),u=u+B|0,b=h(b^u,16),S=S+b|0,B=h(B^S,12),u=u+B|0,b=h(b^u,8),S=S+b|0,B=h(B^S,7),a=a+C|0,P=h(P^a,16),Z=Z+P|0,C=h(C^Z,12),a=a+C|0,P=h(P^a,8),Z=Z+P|0,C=h(C^Z,7),g=g+e|0,P=h(P^g,16),S=S+P|0,e=h(e^S,12),g=g+e|0,P=h(P^g,8),S=S+P|0,e=h(e^S,7),Jc=Jc+B|0,H=h(H^Jc,16),Z=Z+H|0,B=h(B^Z,12),Jc=Jc+B|0,H=h(H^Jc,8),Z=Z+H|0,B=h(B^Z,7),u=u+C|0,A=h(A^u,16),K=K+A|0,C=h(C^K,12),u=u+C|0,A=h(A^u,8),K=K+A|0,C=h(C^K,7),a=a+Xc|0,b=h(b^a,16),R=R+b|0,Xc=h(Xc^R,12),a=a+Xc|0,b=h(b^a,8),R=R+b|0,Xc=h(Xc^R,7);let r=0;J[r++]=W+g|0,J[r++]=m+Jc|0,J[r++]=G+u|0,J[r++]=z+a|0,J[r++]=x+Xc|0,J[r++]=q+e|0,J[r++]=M+B|0,J[r++]=N+C|0,J[r++]=w+K|0,J[r++]=U+R|0,J[r++]=v+S|0,J[r++]=i+Z|0,J[r++]=j+H|0,J[r++]=D+A|0,J[r++]=_+b|0,J[r++]=mc+P|0}function IB(c,$,Q,J){let Y=c[0],X=c[1],W=c[2],m=c[3],G=$[0],z=$[1],x=$[2],q=$[3],M=$[4],N=$[5],w=$[6],U=$[7],v=Q[0],i=Q[1],j=Q[2],D=Q[3];for(let mc=0;mc<20;mc+=2)Y=Y+G|0,v=h(v^Y,16),M=M+v|0,G=h(G^M,12),Y=Y+G|0,v=h(v^Y,8),M=M+v|0,G=h(G^M,7),X=X+z|0,i=h(i^X,16),N=N+i|0,z=h(z^N,12),X=X+z|0,i=h(i^X,8),N=N+i|0,z=h(z^N,7),W=W+x|0,j=h(j^W,16),w=w+j|0,x=h(x^w,12),W=W+x|0,j=h(j^W,8),w=w+j|0,x=h(x^w,7),m=m+q|0,D=h(D^m,16),U=U+D|0,q=h(q^U,12),m=m+q|0,D=h(D^m,8),U=U+D|0,q=h(q^U,7),Y=Y+z|0,D=h(D^Y,16),w=w+D|0,z=h(z^w,12),Y=Y+z|0,D=h(D^Y,8),w=w+D|0,z=h(z^w,7),X=X+x|0,v=h(v^X,16),U=U+v|0,x=h(x^U,12),X=X+x|0,v=h(v^X,8),U=U+v|0,x=h(x^U,7),W=W+q|0,i=h(i^W,16),M=M+i|0,q=h(q^M,12),W=W+q|0,i=h(i^W,8),M=M+i|0,q=h(q^M,7),m=m+G|0,j=h(j^m,16),N=N+j|0,G=h(G^N,12),m=m+G|0,j=h(j^m,8),N=N+j|0,G=h(G^N,7);let _=0;J[_++]=Y,J[_++]=X,J[_++]=W,J[_++]=m,J[_++]=v,J[_++]=i,J[_++]=j,J[_++]=D}var XX=vm(cN,{counterRight:!1,counterLength:4,allowShortKeys:!1}),ZB=vm(cN,{counterRight:!1,counterLength:8,extendNonceFn:IB,allowShortKeys:!1});var LB=new Uint8Array(16),tM=(c,$)=>{c.update($);let Q=$.length%16;if(Q)c.update(LB.subarray(Q))},_B=new Uint8Array(32);function eM(c,$,Q,J,Y){if(Y!==void 0)Ac(Y,void 0,"AAD");let X=c($,Q,_B),W=Wm(J.length,Y?Y.length:0,!0),m=rM.create(X);if(Y)tM(m,Y);tM(m,J),m.update(W);let G=m.digest();return sc(X,W),G}var $N=(c)=>($,Q,J)=>{return{encrypt(X,W){let m=X.length;W=qQ(m+16,W,!1),W.set(X);let G=W.subarray(0,-16);c($,Q,G,G,1);let z=eM(c,$,Q,G,J);return W.set(z,m),sc(z),W},decrypt(X,W){W=qQ(X.length-16,W,!1);let m=X.subarray(0,-16),G=X.subarray(-16),z=eM(c,$,Q,m,J);if(!BJ(G,z))throw Error("invalid tag");return W.set(X.subarray(0,-16)),c($,Q,W,W,1),sc(z),W}}},eb=HJ({blockSize:64,nonceLength:12,tagLength:16},$N(XX)),cF=HJ({blockSize:64,nonceLength:24,tagLength:16},$N(ZB));function JN(c,$,Q){if(z$(c),Q===void 0)Q=new Uint8Array(c.outputLen);return E8(c,Q,$)}var Um=Uint8Array.of(0),QN=Uint8Array.of();function YN(c,$,Q,J=32){z$(c),I0(J,"length");let Y=c.outputLen;if(J>255*Y)throw Error("Length must be <= 255*HashLen");let X=Math.ceil(J/Y);if(Q===void 0)Q=QN;else vc(Q,void 0,"info");let W=new Uint8Array(X*Y),m=E8.create(c,$),G=m._cloneInto(),z=new Uint8Array(m.outputLen);for(let x=0;x<X;x++)Um[0]=x+1,G.update(x===0?QN:z).update(Q).update(Um).digestInto(z),W.set(z,Y*x),m._cloneInto(G);return m.destroy(),G.destroy(),h0(z,Um),W.slice(0,J)}var SB=Object.defineProperty,Sc=(c,$)=>{for(var Q in $)SB(c,Q,{get:$[Q],enumerable:!0})},AB={};Sc(AB,{binarySearch:()=>Rm,bytesToHex:()=>Hc,hexToBytes:()=>Rc,insertEventIntoAscendingList:()=>PB,insertEventIntoDescendingList:()=>CB,isHex32:()=>q0,mergeReverseSortedLists:()=>EB,normalizeURL:()=>xN,utf8Decoder:()=>i8,utf8Encoder:()=>S0});var i8=new TextDecoder("utf-8"),S0=new TextEncoder;function xN(c){try{if(c.indexOf("://")===-1)c="wss://"+c;let $=new URL(c);if($.protocol==="http:")$.protocol="ws:";else if($.protocol==="https:")$.protocol="wss:";if($.pathname=$.pathname.replace(/\/+/g,"/"),$.pathname.endsWith("/"))$.pathname=$.pathname.slice(0,-1);if($.port==="80"&&$.protocol==="ws:"||$.port==="443"&&$.protocol==="wss:")$.port="";return $.searchParams.sort(),$.hash="",$.toString()}catch($){throw Error(`Invalid URL: ${c}`)}}function CB(c,$){let[Q,J]=Rm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return Y.created_at-$.created_at});if(!J)c.splice(Q,0,$);return c}function PB(c,$){let[Q,J]=Rm(c,(Y)=>{if($.id===Y.id)return 0;if($.created_at===Y.created_at)return-1;return $.created_at-Y.created_at});if(!J)c.splice(Q,0,$);return c}function Rm(c,$){let Q=0,J=c.length-1;while(Q<=J){let Y=Math.floor((Q+J)/2),X=$(c[Y]);if(X===0)return[Y,!0];if(X<0)J=Y-1;else Q=Y+1}return[Q,!1]}function EB(c,$){let Q=Array(c.length+$.length);Q.length=0;let J=0,Y=0,X=[];while(J<c.length&&Y<$.length){let W;if(c[J]?.created_at>$[Y]?.created_at)W=c[J],J++;else W=$[Y],Y++;if(Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(J<c.length){let W=c[J];if(J++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}while(Y<$.length){let W=$[Y];if(Y++,Q.length>0&&Q[Q.length-1].created_at===W.created_at){if(X.includes(W.id))continue}else X.length=0;Q.push(W),X.push(W.id)}return Q}function q0(c){for(let $=0;$<64;$++){let Q=c.charCodeAt($);if(isNaN(Q)||Q<48||Q>102||Q>57&&Q<97)return!1}return!0}var NQ=Symbol("verified"),bB=(c)=>c instanceof Object;function pm(c){if(!bB(c))return!1;if(typeof c.kind!=="number")return!1;if(typeof c.content!=="string")return!1;if(typeof c.created_at!=="number")return!1;if(typeof c.pubkey!=="string")return!1;if(!q0(c.pubkey))return!1;if(!Array.isArray(c.tags))return!1;for(let $=0;$<c.tags.length;$++){let Q=c.tags[$];if(!Array.isArray(Q))return!1;for(let J=0;J<Q.length;J++)if(typeof Q[J]!=="string")return!1}return!0}var FB=class{generateSecretKey(){return xQ.utils.randomSecretKey()}getPublicKey(c){return Hc(xQ.getPublicKey(c))}finalizeEvent(c,$){let Q=c;return Q.pubkey=Hc(xQ.getPublicKey($)),Q.id=mX(Q),Q.sig=Hc(xQ.sign(Rc(mX(Q)),$)),Q[NQ]=!0,Q}verifyEvent(c){if(typeof c[NQ]==="boolean")return c[NQ];try{let $=mX(c);if($!==c.id)return c[NQ]=!1,!1;let Q=xQ.verify(Rc(c.sig),Rc($),Rc(c.pubkey));return c[NQ]=Q,Q}catch($){return c[NQ]=!1,!1}}};function TB(c){if(!pm(c))throw Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,c.pubkey,c.created_at,c.kind,c.tags,c.content])}function mX(c){let $=Q0(S0.encode(TB(c)));return Hc($)}var xX=new FB,fB=xX.generateSecretKey,OJ=xX.getPublicKey,A0=xX.finalizeEvent,RJ=xX.verifyEvent,nB={};Sc(nB,{AIEmbeddings:()=>PH,AppCurationSet:()=>wR,Application:()=>NR,AuthoredPodcasts:()=>PO,BadgeAward:()=>gB,BadgeDefinition:()=>$R,Bid:()=>zH,BidConfirmation:()=>xH,BlobsAuth:()=>yO,BlockedRelaysList:()=>iO,BlossomServerList:()=>LO,BookmarkList:()=>NO,Bookmarksets:()=>sO,Calendar:()=>AR,CalendarEventRSVP:()=>CR,CashuMintAnnouncement:()=>lR,CashuWalletEvent:()=>kO,CashuWalletHistory:()=>yH,CashuWalletTokens:()=>hH,ChannelCreation:()=>iN,ChannelHideMessage:()=>jN,ChannelMessage:()=>UN,ChannelMetadata:()=>vN,ChannelMuteUser:()=>KN,ChatMessage:()=>dB,Chess:()=>WH,ClassifiedListing:()=>DR,ClientAuth:()=>BN,CodeSnippet:()=>jH,CoinjoinPool:()=>FH,Comment:()=>VH,CommunitiesList:()=>VO,CommunityDefinition:()=>nR,CommunityPostApproval:()=>nH,ConferenceEvent:()=>UR,Contacts:()=>hB,CreateOrUpdateProduct:()=>YR,CreateOrUpdateStall:()=>JR,CuratedVideoSets:()=>tO,Curationsets:()=>rO,Date:()=>_R,DecoupledEncryptionKeyDistribution:()=>fH,DecoupledKeyAnnouncement:()=>pO,DecoupledKeyClientAnnouncement:()=>TH,DirectMessageRelaysList:()=>IO,DraftClassifiedListing:()=>BR,DraftEvent:()=>IR,DraftLong:()=>GR,Emojisets:()=>zR,EncryptedDirectMessage:()=>yB,EventDeletion:()=>oB,FavoriteFollowSets:()=>OO,FavoritePodcasts:()=>ZO,FavoriteRelays:()=>jO,FedimintAnnouncement:()=>hR,Feed:()=>LR,FileMessage:()=>eB,FileMetadata:()=>MH,FileServerPreference:()=>_O,Followsets:()=>oO,ForumThread:()=>rB,GenericRepost:()=>Sm,Genericlists:()=>gO,GeocacheListing:()=>kR,GeocacheLog:()=>oH,GeocacheLogEntry:()=>aR,GeocacheProofOfFind:()=>gH,GiftWrap:()=>DN,GitPullRequest:()=>DH,GitPullRequestUpdate:()=>BH,GoodWikiAuthorList:()=>SO,GoodWikiRelayList:()=>AO,GroupMetadata:()=>oR,HTTPAuth:()=>Am,Handlerinformation:()=>bR,Handlerrecommendation:()=>ER,Highlights:()=>zO,InteractiveRoom:()=>vR,InterestsList:()=>DO,Interestsets:()=>QR,Issue:()=>HH,JobFeedback:()=>aH,JobRequest:()=>uH,JobResult:()=>kH,Label:()=>AH,LegacyNsiteFile:()=>TR,LightningPubRPC:()=>aO,LinkSet:()=>ZR,LiveChatMessage:()=>UH,LiveEvent:()=>iR,LongFormArticle:()=>mR,MarketplaceUI:()=>XR,MediaFollows:()=>HO,MediaStarterPacks:()=>eR,MergeRequests:()=>mH,Metadata:()=>aB,ModularArticleContent:()=>qR,ModularArticleHeader:()=>xR,MuteSets:()=>eO,Mutelist:()=>xO,NWCWalletInfo:()=>nO,NWCWalletRequest:()=>HN,NWCWalletResponse:()=>lO,NormalVideo:()=>QH,NostrConnect:()=>hO,NsiteNamed:()=>uR,NsiteRoot:()=>uO,NutZap:()=>XO,NutZapInfo:()=>BO,OpenTimestamps:()=>qH,Patch:()=>KH,PeerToPeerOrderEvents:()=>yR,Photo:()=>$H,Pinlist:()=>qO,PodcastEpisode:()=>XH,PodcastMetadata:()=>CO,Poll:()=>NH,PollResponse:()=>GH,PrivateDirectMessage:()=>wN,PrivateEventRelayList:()=>KO,ProblemTracker:()=>LH,ProductSoldAsAuction:()=>WR,ProfileBadges:()=>cR,ProxyAnnouncement:()=>TO,PublicChatsList:()=>wO,PublicMessage:()=>YH,Reaction:()=>_m,ReactionToWebsite:()=>cH,RecommendRelay:()=>lB,Redirects:()=>pR,RelayDiscovery:()=>VR,RelayList:()=>MO,RelayMonitorAnnouncement:()=>EO,RelayReview:()=>PR,RelayReviews:()=>CH,Relaysets:()=>dO,ReleaseArtifactSets:()=>MR,Reply:()=>OH,Report:()=>_H,Reporting:()=>SH,RepositoryAnnouncement:()=>HR,RepositoryState:()=>OR,Repost:()=>Lm,ReservedCashuWalletTokens:()=>lH,RoomPresence:()=>bO,Scroll:()=>iH,Seal:()=>VN,SearchRelaysList:()=>vO,ShortTextNote:()=>NN,ShortVideo:()=>JH,SimpleGroupAdmins:()=>gR,SimpleGroupCreateGroup:()=>eH,SimpleGroupCreateInvite:()=>$O,SimpleGroupDeleteEvent:()=>tH,SimpleGroupDeleteGroup:()=>cO,SimpleGroupEditMetadata:()=>rH,SimpleGroupJoinRequest:()=>QO,SimpleGroupLeaveRequest:()=>JO,SimpleGroupList:()=>UO,SimpleGroupLiveKitParticipants:()=>rR,SimpleGroupMembers:()=>dR,SimpleGroupPutUser:()=>dH,SimpleGroupRemoveUser:()=>sH,SimpleGroupReply:()=>tB,SimpleGroupRoles:()=>sR,SimpleGroupThreadedReply:()=>sB,SlideSet:()=>KR,SoftwareApplication:()=>FR,StarterPacks:()=>tR,StatusApplied:()=>pH,StatusClosed:()=>IH,StatusDraft:()=>ZH,StatusOpen:()=>RH,TidalLogin:()=>WO,Time:()=>SR,Torrent:()=>EH,TorrentComment:()=>bH,TransportMethodAnnouncement:()=>fO,UserEmojiList:()=>RO,UserGraspList:()=>FO,UserStatuses:()=>jR,VideoViewEvent:()=>fR,Voice:()=>wH,VoiceComment:()=>vH,WebBookmarks:()=>cp,WikiArticle:()=>RR,Zap:()=>GO,ZapGoal:()=>YO,ZapRequest:()=>mO,classifyKind:()=>uB,isAddressableKind:()=>Zm,isEphemeralKind:()=>MN,isKind:()=>kB,isRegularKind:()=>qN,isReplaceableKind:()=>Im});function qN(c){return c<1e4&&c!==0&&c!==3}function Im(c){return c===0||c===3||1e4<=c&&c<20000}function MN(c){return 20000<=c&&c<30000}function Zm(c){return 30000<=c&&c<40000}function uB(c){if(qN(c))return"regular";if(Im(c))return"replaceable";if(MN(c))return"ephemeral";if(Zm(c))return"parameterized";return"unknown"}function kB(c,$){let Q=$ instanceof Array?$:[$];return pm(c)&&Q.includes(c.kind)||!1}var aB=0,NN=1,lB=2,hB=3,yB=4,oB=5,Lm=6,_m=7,gB=8,dB=9,sB=10,rB=11,tB=12,VN=13,wN=14,eB=15,Sm=16,cH=17,$H=20,QH=21,JH=22,YH=24,iN=40,vN=41,UN=42,jN=43,KN=44,XH=54,WH=64,mH=818,GH=1018,zH=1021,xH=1022,qH=1040,DN=1059,MH=1063,NH=1068,VH=1111,wH=1222,iH=1227,vH=1244,UH=1311,jH=1337,KH=1617,DH=1618,BH=1619,HH=1621,OH=1622,RH=1630,pH=1631,IH=1632,ZH=1633,LH=1971,_H=1984,SH=1984,AH=1985,CH=1986,PH=1987,EH=2003,bH=2004,FH=2022,TH=4454,fH=4455,nH=4550,uH=5999,kH=6999,aH=7000,lH=7374,hH=7375,yH=7376,oH=7516,gH=7517,dH=9000,sH=9001,rH=9002,tH=9005,eH=9007,cO=9008,$O=9009,QO=9021,JO=9022,YO=9041,XO=9321,WO=9467,mO=9734,GO=9735,zO=9802,xO=1e4,qO=10001,MO=10002,NO=10003,VO=10004,wO=10005,iO=10006,vO=10007,UO=10009,jO=10012,KO=10013,DO=10015,BO=10019,HO=10020,OO=10021,RO=10030,pO=10044,IO=10050,ZO=10054,LO=10063,_O=10096,SO=10101,AO=10102,CO=10154,PO=10164,EO=10166,bO=10312,FO=10317,TO=10377,fO=11111,nO=13194,uO=15128,kO=17375,aO=21000,BN=22242,HN=23194,lO=23195,hO=24133,yO=24242,Am=27235,oO=30000,gO=30001,dO=30002,sO=30003,rO=30004,tO=30005,eO=30007,cR=30008,$R=30009,QR=30015,JR=30017,YR=30018,XR=30019,WR=30020,mR=30023,GR=30024,zR=30030,xR=30040,qR=30041,MR=30063,NR=30078,VR=30166,wR=30267,iR=30311,vR=30312,UR=30313,jR=30315,KR=30388,DR=30402,BR=30403,HR=30617,OR=30618,RR=30818,pR=30819,IR=31234,ZR=31388,LR=31890,_R=31922,SR=31923,AR=31924,CR=31925,PR=31987,ER=31989,bR=31990,FR=32267,TR=34128,fR=34237,nR=34550,uR=35128,kR=37515,aR=37516,lR=38172,hR=38173,yR=38383,oR=39000,gR=39001,dR=39002,sR=39003,rR=39004,tR=39089,eR=39092,cp=39701;function $p(c,$){if(c.ids&&c.ids.indexOf($.id)===-1)return!1;if(c.kinds&&c.kinds.indexOf($.kind)===-1)return!1;if(c.authors&&c.authors.indexOf($.pubkey)===-1)return!1;for(let Q in c)if(Q[0]==="#"){let J=Q.slice(1),Y=c[`#${J}`];if(Y&&!$.tags.find(([X,W])=>X===Q.slice(1)&&Y.indexOf(W)!==-1))return!1}if(c.since&&$.created_at<c.since)return!1;if(c.until&&$.created_at>c.until)return!1;return!0}function Qp(c,$){for(let Q=0;Q<c.length;Q++)if($p(c[Q],$))return!0;return!1}var Jp={};Sc(Jp,{getHex64:()=>qX,getInt:()=>ON,getSubscriptionId:()=>RN,matchEventId:()=>Yp,matchEventKind:()=>Wp,matchEventPubkey:()=>Xp});function qX(c,$){let Q=$.length+3,J=c.indexOf(`"${$}":`)+Q,Y=c.slice(J).indexOf('"')+J+1;return c.slice(Y,Y+64)}function ON(c,$){let Q=$.length,J=c.indexOf(`"${$}":`)+Q+3,Y=c.slice(J),X=Math.min(Y.indexOf(","),Y.indexOf("}"));return parseInt(Y.slice(0,X),10)}function RN(c){let $=c.slice(0,22).indexOf('"EVENT"');if($===-1)return null;let Q=c.slice($+7+1).indexOf('"');if(Q===-1)return null;let J=$+7+1+Q,Y=c.slice(J+1,80).indexOf('"');if(Y===-1)return null;let X=J+1+Y;return c.slice(J+1,X)}function Yp(c,$){return $===qX(c,"id")}function Xp(c,$){return $===qX(c,"pubkey")}function Wp(c,$){return $===ON(c,"kind")}var mp={};Sc(mp,{makeAuthEvent:()=>pN});function pN(c,$){return{kind:BN,created_at:Math.floor(Date.now()/1000),tags:[["relay",c],["challenge",$]],content:""}}var Om=class extends Error{constructor(c,$){super(`Tried to send message '${c} on a closed connection to ${$}.`);this.name="SendingOnClosedConnection"}},Gp=class{url;_connected=!1;onclose=null;onnotice=(c)=>console.debug(`NOTICE from ${this.url}: ${c}`);onauth;baseEoseTimeout=4400;publishTimeout=4400;pingFrequency=29000;pingTimeout=20000;resubscribeBackoff=[1e4,1e4,1e4,20000,20000,30000,60000];openSubs=new Map;enablePing;enableReconnect;idleTimeout=0;idleSince=Date.now();ongoingOperations=0;reconnectTimeoutHandle;pingIntervalHandle;reconnectAttempts=0;skipReconnection=!1;idleTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor(c,$){if(this.url=xN(c),this.verifyEvent=$.verifyEvent,this._WebSocket=$.websocketImplementation||WebSocket,this.enablePing=$.enablePing,this.enableReconnect=$.enableReconnect||!1,$.idleTimeout)this.idleTimeout=$.idleTimeout}static async connect(c,$){let Q=new Gp(c,$);return await Q.connect($),Q}closeAllSubscriptions(c){for(let[$,Q]of this.openSubs)Q.close(c);this.openSubs.clear();for(let[$,Q]of this.openEventPublishes)Q.reject(Error(c));this.openEventPublishes.clear();for(let[$,Q]of this.openCountRequests)Q.reject(Error(c));this.openCountRequests.clear()}get connected(){return this._connected}clearIdleTimeout(){if(this.idleTimeoutHandle)clearTimeout(this.idleTimeoutHandle),this.idleTimeoutHandle=void 0}scheduleIdleClose(){if(this.clearIdleTimeout(),this.idleTimeout>0)this.idleTimeoutHandle=setTimeout(()=>{if(this.ongoingOperations===0&&this.idleSince)this.close()},this.idleTimeout)}async reconnect(){let c=this.resubscribeBackoff[Math.min(this.reconnectAttempts,this.resubscribeBackoff.length-1)];this.reconnectAttempts++,this.reconnectTimeoutHandle=setTimeout(async()=>{try{await this.connect()}catch($){}},c)}handleHardClose(c){if(this.ws)this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.enableReconnect&&!this.skipReconnection)this.reconnect();else this.onclose?.(),this.closeAllSubscriptions(c)}async connect(c){let $;if(this.connectionPromise)return this.connectionPromise;return this.challenge=void 0,this.authPromise=void 0,this.skipReconnection=!1,this.connectionPromise=new Promise((Q,J)=>{if(c?.timeout)$=setTimeout(()=>{if(J("connection timed out"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection timed out")},c.timeout);if(c?.abort)c.abort.onabort=J;try{this.ws=new this._WebSocket(this.url)}catch(Y){clearTimeout($),J(Y);return}this.ws.onopen=()=>{if(this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;clearTimeout($),this._connected=!0;let Y=this.reconnectAttempts>0;this.reconnectAttempts=0;for(let X of this.openSubs.values()){if(X.eosed=!1,Y){for(let W=0;W<X.filters.length;W++)if(X.lastEmitted)X.filters[W].since=X.lastEmitted+1}X.fire()}if(this.enablePing)this.pingIntervalHandle=setInterval(()=>this.pingpong(),this.pingFrequency);Q()},this.ws.onerror=()=>{if(clearTimeout($),J("connection failed"),this.connectionPromise=void 0,this.reconnectAttempts===0)this.skipReconnection=!0;this.handleHardClose("relay connection failed")},this.ws.onclose=(Y)=>{clearTimeout($),J(Y.message||"websocket closed"),this.handleHardClose("relay connection closed")},this.ws.onmessage=this._onmessage.bind(this)}),this.connectionPromise}waitForPingPong(){return new Promise((c)=>{this.ws.once("pong",()=>c(!0)),this.ws.ping()})}waitForDummyReq(){return new Promise((c,$)=>{if(!this.connectionPromise)return $(Error(`no connection to ${this.url}, can't ping`));try{let Q=this.subscribe([{ids:["aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],limit:0}],{label:"<forced-ping>",oneose:()=>{c(!0),Q.close()},onclose(){c(!0)},eoseTimeout:this.pingTimeout+1000})}catch(Q){$(Q)}})}async pingpong(){if(this.ws?.readyState===1){if(!await Promise.any([this.ws&&this.ws.ping&&this.ws.once?this.waitForPingPong():this.waitForDummyReq(),new Promise(($)=>setTimeout(()=>$(!1),this.pingTimeout))])){if(this.ws?.readyState===this._WebSocket.OPEN)this.ws?.close()}}}async send(c){if(!this.connectionPromise)throw new Om(c,this.url);this.connectionPromise.then(()=>{this.ws?.send(c)})}async auth(c){let $=this.challenge;if(!$)throw Error("can't perform auth, no challenge was received");if(this.authPromise)return this.authPromise;return this.authPromise=new Promise(async(Q,J)=>{try{let Y=await c(pN(this.url,$)),X=setTimeout(()=>{let W=this.openEventPublishes.get(Y.id);if(W)W.reject(Error("auth timed out")),this.openEventPublishes.delete(Y.id)},this.publishTimeout);this.openEventPublishes.set(Y.id,{resolve:Q,reject:J,timeout:X}),this.send('["AUTH",'+JSON.stringify(Y)+"]")}catch(Y){console.warn("subscribe auth function failed:",Y)}}),this.authPromise}async publish(c){this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let $=new Promise((Q,J)=>{let Y=setTimeout(()=>{let X=this.openEventPublishes.get(c.id);if(X)X.reject(Error("publish timed out")),this.openEventPublishes.delete(c.id)},this.publishTimeout);this.openEventPublishes.set(c.id,{resolve:Q,reject:J,timeout:Y})});try{await this.send('["EVENT",'+JSON.stringify(c)+"]")}catch(Q){let J=this.openEventPublishes.get(c.id);if(J)J.reject(Q),this.openEventPublishes.delete(c.id)}if(this.ongoingOperations--,this.ongoingOperations===0)this.idleSince=Date.now(),this.scheduleIdleClose();return $}async count(c,$){return(await this.countWithHLL(c,$)).count}async countWithHLL(c,$){this.serial++;let Q=$?.id||"count:"+this.serial,J=new Promise((Y,X)=>{this.openCountRequests.set(Q,{resolve:Y,reject:X})});try{await this.send('["COUNT","'+Q+'",'+JSON.stringify(c).substring(1))}catch(Y){let X=this.openCountRequests.get(Q);if(X)X.reject(Y),this.openCountRequests.delete(Q)}return J}subscribe(c,$){if($.label!=="<forced-ping>")this.idleSince=void 0,this.clearIdleTimeout(),this.ongoingOperations++;let Q=this.prepareSubscription(c,$);if(Q.fire(),$.abort)$.abort.onabort=()=>Q.close(String($.abort.reason||"<aborted>"));return Q}prepareSubscription(c,$){this.serial++;let Q=$.id||($.label?$.label+":":"sub:")+this.serial,J=new zp(this,Q,c,$);return this.openSubs.set(Q,J),J}close(){if(this.skipReconnection=!0,this.reconnectTimeoutHandle)clearTimeout(this.reconnectTimeoutHandle),this.reconnectTimeoutHandle=void 0;if(this.pingIntervalHandle)clearInterval(this.pingIntervalHandle),this.pingIntervalHandle=void 0;if(this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.connectionPromise=void 0,this.idleSince=void 0,this.clearIdleTimeout(),this.onclose?.(),this.ws){if(this.ws.onopen=null,this.ws.onerror=null,this.ws.onclose=null,this.ws.readyState!==this._WebSocket.CLOSING&&this.ws.readyState!==this._WebSocket.CLOSED)this.ws.close()}}_onmessage(c){let $=c.data;if(!$)return;let Q=RN($);if(Q){let J=this.openSubs.get(Q);if(!J)return;let Y=qX($,"id"),X=J.alreadyHaveEvent?.(Y);if(J.receivedEvent?.(this,Y),X)return}try{let J=JSON.parse($);switch(J[0]){case"EVENT":{let Y=this.openSubs.get(J[1]),X=J[2];if(Qp(Y.filters,X)&&this.verifyEvent(X,this.url))Y.onevent(X);else Y.oninvalidevent?.(X);if(!Y.lastEmitted||Y.lastEmitted<X.created_at)Y.lastEmitted=X.created_at;return}case"COUNT":{let Y=J[1],X=J[2],W=this.openCountRequests.get(Y);if(W)W.resolve(X),this.openCountRequests.delete(Y);return}case"EOSE":{let Y=this.openSubs.get(J[1]);if(!Y)return;Y.receivedEose();return}case"OK":{let Y=J[1],X=J[2],W=J[3],m=this.openEventPublishes.get(Y);if(m){if(clearTimeout(m.timeout),X)m.resolve(W);else m.reject(Error(W));this.openEventPublishes.delete(Y)}return}case"CLOSED":{let Y=J[1],X=this.openSubs.get(Y);if(!X){let W=this.openCountRequests.get(Y);if(W)W.reject(Error(J[2])),this.openCountRequests.delete(Y);return}X.closed=!0,X.close(J[2]);return}case"NOTICE":{this.onnotice(J[1]);return}case"AUTH":{if(this.challenge=J[1],this.onauth)this.auth(this.onauth).catch((Y)=>{if(!(Y instanceof Om))throw Y});return}default:{this.openSubs.get(J[1])?.oncustom?.(J);return}}}catch(J){try{let[Y,X,W]=JSON.parse($);console.warn(`[nostr] relay ${this.url} error processing message:`,J,W)}catch(Y){console.warn(`[nostr] relay ${this.url} error processing message:`,J)}return}}},zp=class{relay;id;lastEmitted;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oninvalidevent;oneose;onclose;oncustom;eoseTimeout;eoseTimeoutHandle;constructor(c,$,Q,J){if(Q.length===0)throw Error("subscription can't be created with zero filters");this.relay=c,this.filters=Q,this.id=$,this.alreadyHaveEvent=J.alreadyHaveEvent,this.receivedEvent=J.receivedEvent,this.eoseTimeout=J.eoseTimeout||c.baseEoseTimeout,this.oneose=J.oneose,this.onclose=J.onclose,this.oninvalidevent=J.oninvalidevent,this.onevent=J.onevent||((Y)=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,Y)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){if(this.eosed)return;clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.()}close(c="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch($){if($ instanceof Om);else throw $}this.closed=!0}if(this.relay.openSubs.delete(this.id),this.relay.ongoingOperations--,this.relay.ongoingOperations===0)this.relay.idleSince=Date.now(),this.relay.scheduleIdleClose();this.onclose?.(c)}},xp;try{xp=WebSocket}catch{}var qp=256,zF=qp*2;var Mp;try{Mp=WebSocket}catch{}var MX={};Sc(MX,{BECH32_REGEX:()=>IN,Bech32MaxSize:()=>Cm,NostrTypeGuard:()=>Np,decode:()=>NX,decodeNostrURI:()=>wp,encodeBytes:()=>wX,naddrEncode:()=>Dp,neventEncode:()=>Kp,noteEncode:()=>Up,nprofileEncode:()=>jp,npubEncode:()=>vp,nsecEncode:()=>ip});var Np={isNProfile:(c)=>/^nprofile1[a-z\d]+$/.test(c||""),isNEvent:(c)=>/^nevent1[a-z\d]+$/.test(c||""),isNAddr:(c)=>/^naddr1[a-z\d]+$/.test(c||""),isNSec:(c)=>/^nsec1[a-z\d]{58}$/.test(c||""),isNPub:(c)=>/^npub1[a-z\d]{58}$/.test(c||""),isNote:(c)=>/^note1[a-z\d]+$/.test(c||""),isNcryptsec:(c)=>/^ncryptsec1[a-z\d]+$/.test(c||"")},Cm=5000,IN=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Vp(c){let $=new Uint8Array(4);return $[0]=c>>24&255,$[1]=c>>16&255,$[2]=c>>8&255,$[3]=c&255,$}function wp(c){try{if(c.startsWith("nostr:"))c=c.substring(6);return NX(c)}catch($){return{type:"invalid",data:null}}}function NX(c){let{prefix:$,words:Q}=T8.decode(c,Cm),J=new Uint8Array(T8.fromWords(Q));switch($){case"nprofile":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nprofile");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nevent":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for nevent");if(Y[0][0].length!==32)throw Error("TLV 0 should be 32 bytes");if(Y[2]&&Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(Y[3]&&Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:Hc(Y[0][0]),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[],author:Y[2]?.[0]?Hc(Y[2][0]):void 0,kind:Y[3]?.[0]?parseInt(Hc(Y[3][0]),16):void 0}}}case"naddr":{let Y=jm(J);if(!Y[0]?.[0])throw Error("missing TLV 0 for naddr");if(!Y[2]?.[0])throw Error("missing TLV 2 for naddr");if(Y[2][0].length!==32)throw Error("TLV 2 should be 32 bytes");if(!Y[3]?.[0])throw Error("missing TLV 3 for naddr");if(Y[3][0].length!==4)throw Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:i8.decode(Y[0][0]),pubkey:Hc(Y[2][0]),kind:parseInt(Hc(Y[3][0]),16),relays:Y[1]?Y[1].map((X)=>i8.decode(X)):[]}}}case"nsec":return{type:$,data:J};case"npub":case"note":return{type:$,data:Hc(J)};default:throw Error(`unknown prefix ${$}`)}}function jm(c){let $={},Q=c;while(Q.length>0){if(Q.length<2)throw Error("not enough data to read TLV");let J=Q[0],Y=Q[1],X=Q.slice(2,2+Y);if(Q=Q.slice(2+Y),X.length<Y)throw Error(`not enough data to read on TLV ${J}`);$[J]=$[J]||[],$[J].push(X)}return $}function ip(c){return wX("nsec",c)}function vp(c){return wX("npub",Rc(c))}function Up(c){return wX("note",Rc(c))}function VX(c,$){let Q=T8.toWords($);return T8.encode(c,Q,Cm)}function wX(c,$){return VX(c,$)}function jp(c){let $=Pm({0:[Rc(c.pubkey)],1:(c.relays||[]).map((Q)=>S0.encode(Q))});return VX("nprofile",$)}function Kp(c){let $;if(c.kind!==void 0)$=Vp(c.kind);let Q=Pm({0:[Rc(c.id)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:c.author?[Rc(c.author)]:[],3:$?[new Uint8Array($)]:[]});return VX("nevent",Q)}function Dp(c){let $=new ArrayBuffer(4);new DataView($).setUint32(0,c.kind,!1);let Q=Pm({0:[S0.encode(c.identifier)],1:(c.relays||[]).map((J)=>S0.encode(J)),2:[Rc(c.pubkey)],3:[new Uint8Array($)]});return VX("naddr",Q)}function Pm(c){let $=[];return Object.entries(c).reverse().forEach(([Q,J])=>{J.forEach((Y)=>{let X=new Uint8Array(Y.length+2);X.set([parseInt(Q)],0),X.set([Y.length],1),X.set(Y,2),$.push(X)})}),Fc(...$)}var Bp={};Sc(Bp,{decrypt:()=>Hp,encrypt:()=>ZN});function ZN(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),Y=UJ.getSharedSecret(J,Rc("02"+$)),X=LN(Y),W=Uint8Array.from(o0(16)),m=S0.encode(Q),G=Vm(X,W).encrypt(m),z=L0.encode(new Uint8Array(G)),x=L0.encode(new Uint8Array(W.buffer));return`${z}?iv=${x}`}function Hp(c,$,Q){let J=c instanceof Uint8Array?c:Rc(c),[Y,X]=Q.split("?iv="),W=UJ.getSharedSecret(J,Rc("02"+$)),m=LN(W),G=L0.decode(X),z=L0.decode(Y),x=Vm(m,G).decrypt(z);return i8.decode(x)}function LN(c){return c.slice(1,33)}var Op={};Sc(Op,{NIP05_REGEX:()=>Em,isNip05:()=>Rp,isValid:()=>Zp,queryProfile:()=>_N,searchDomain:()=>Ip,useFetchImplementation:()=>pp});var Em=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,Rp=(c)=>Em.test(c||""),iX;try{iX=fetch}catch(c){}function pp(c){iX=c}async function Ip(c,$=""){try{let Q=`https://${c}/.well-known/nostr.json?name=${$}`,J=await iX(Q,{redirect:"manual"});if(J.status!==200)throw Error("Wrong response code");return(await J.json()).names}catch(Q){return{}}}async function _N(c){let $=c.match(Em);if(!$)return null;let[,Q="_",J]=$;try{let Y=`https://${J}/.well-known/nostr.json?name=${Q}`,X=await iX(Y,{redirect:"manual"});if(X.status!==200)throw Error("Wrong response code");let W=await X.json(),m=W.names[Q];return m?{pubkey:m,relays:W.relays?.[m]}:null}catch(Y){return null}}async function Zp(c,$){let Q=await _N($);return Q?Q.pubkey===c:!1}var Lp={};Sc(Lp,{parse:()=>_p});function _p(c){let $={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]},Q,J;for(let Y=c.tags.length-1;Y>=0;Y--){let X=c.tags[Y];if(X[0]==="e"&&X[1]&&q0(X[1])){let[W,m,G,z,x]=X,q={id:m,relays:G?[G]:[],author:x&&q0(x)?x:void 0};if(z==="root"){$.root=q;continue}if(z==="reply"){$.reply=q;continue}if(z==="mention"){$.mentions.push(q);continue}if(!Q)Q=q;else J=q;$.mentions.push(q);continue}if(X[0]==="q"&&X[1]&&q0(X[1])){let[W,m,G]=X;$.quotes.push({id:m,relays:G?[G]:[]})}if(X[0]==="p"&&X[1]&&q0(X[1])){$.profiles.push({pubkey:X[1],relays:X[2]?[X[2]]:[]});continue}}if(!$.root)$.root=J||Q||$.reply;if(!$.reply)$.reply=Q||$.root;return[$.reply,$.root].forEach((Y)=>{if(!Y)return;let X=$.mentions.indexOf(Y);if(X!==-1)$.mentions.splice(X,1);if(Y.author){let W=$.profiles.find((m)=>m.pubkey===Y.author);if(W&&W.relays){if(!Y.relays)Y.relays=[];W.relays.forEach((m)=>{if(Y.relays?.indexOf(m)===-1)Y.relays.push(m)}),W.relays=Y.relays}}}),$.mentions.forEach((Y)=>{if(Y.author){let X=$.profiles.find((W)=>W.pubkey===Y.author);if(X&&X.relays){if(!Y.relays)Y.relays=[];X.relays.forEach((W)=>{if(Y.relays.indexOf(W)===-1)Y.relays.push(W)}),X.relays=Y.relays}}}),$}var Sp={};Sc(Sp,{fetchRelayInformation:()=>Cp,useFetchImplementation:()=>Ap});var SN;try{SN=fetch}catch{}function Ap(c){SN=c}async function Cp(c){return await(await fetch(c.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var Pp={};Sc(Pp,{getPow:()=>Ep,minePow:()=>Fp});function Ep(c){let $=0;for(let Q=0;Q<64;Q+=8){let J=parseInt(c.substring(Q,Q+8),16);if(J===0)$+=32;else{$+=Math.clz32(J);break}}return $}function bp(c){let $=0;for(let Q=0;Q<c.length;Q++){let J=c[Q];if(J===0)$+=8;else{$+=Math.clz32(J)-24;break}}return $}function Fp(c,$){let Q=0,J=c,Y=["nonce",Q.toString(),$.toString()];J.tags.push(Y);while(!0){let X=Math.floor(new Date().getTime()/1000);if(X!==J.created_at)Q=0,J.created_at=X;Y[1]=(++Q).toString();let W=Q0(S0.encode(JSON.stringify([0,J.pubkey,J.created_at,J.kind,J.tags,J.content])));if(bp(W)>=$){J.id=Hc(W);break}}return J}var Tp={};Sc(Tp,{unwrapEvent:()=>dp,unwrapManyEvents:()=>sp,wrapEvent:()=>lN,wrapManyEvents:()=>gp});var fp={};Sc(fp,{createRumor:()=>nN,createSeal:()=>uN,createWrap:()=>kN,unwrapEvent:()=>am,unwrapManyEvents:()=>aN,wrapEvent:()=>zX,wrapManyEvents:()=>yp});var np={};Sc(np,{decrypt:()=>km,encrypt:()=>um,getConversationKey:()=>fm,v2:()=>lp});var bm=1,Fm=4294967295,Tm=65536;function fm(c,$){let Q=UJ.getSharedSecret(c,Rc("02"+$)).subarray(1,33);return JN(Q0,Q,S0.encode("nip44-v2"))}function AN(c,$){let Q=YN(Q0,c,$,76);return{chacha_key:Q.subarray(0,32),chacha_nonce:Q.subarray(32,44),hmac_key:Q.subarray(44,76)}}function nm(c){if(!Number.isSafeInteger(c)||c<1)throw Error("expected positive integer");if(c<=32)return 32;let $=2**(Math.floor(Math.log2(c-1))+1),Q=$<=256?32:$/8;return Q*(Math.floor((c-1)/Q)+1)}function up(c){if(!Number.isSafeInteger(c)||c<bm||c>65535)throw Error("invalid plaintext size: must be between 1 and 65535 bytes");let $=new Uint8Array(2);return new DataView($.buffer).setUint16(0,c,!1),$}function kp(c){if(!Number.isSafeInteger(c)||c<Tm||c>Fm)throw Error("invalid plaintext size: must be between 65536 and 4294967295 bytes");let $=new Uint8Array(4);return new DataView($.buffer).setUint32(0,c,!1),$}function CN(c){let $=S0.encode(c),Q=$.length;if(Q<bm||Q>Fm)throw Error("invalid plaintext size: must be between 1 and 4294967295 bytes");let J=Q>=Tm?Fc(new Uint8Array([0,0]),kp(Q)):up(Q),Y=new Uint8Array(nm(Q)-Q);return Fc(J,$,Y)}function PN(c){let $=new DataView(c.buffer,c.byteOffset,c.byteLength),Q=$.getUint16(0),J,Y;if(Q===0){if(J=$.getUint32(2),J<Tm)throw Error("invalid padding");Y=6}else J=Q,Y=2;let X=c.subarray(Y,Y+J);if(J<bm||J>Fm||X.length!==J||c.length!==Y+nm(J))throw Error("invalid padding");return i8.decode(X)}function EN(c,$,Q){if(Q.length!==32)throw Error("AAD associated data must be 32 bytes");let J=Fc(Q,$);return E8(Q0,c,J)}function ap(c){if(typeof c!=="string")throw Error("payload must be a valid string");let $=c.length;if($<132)throw Error("invalid payload length: "+$);if(c[0]==="#")throw Error("unknown encryption version");let Q;try{Q=L0.decode(c)}catch(X){throw Error("invalid base64: "+X.message)}let J=Q.length;if(J<99)throw Error("invalid data length: "+J);let Y=Q[0];if(Y!==2)throw Error("unknown encryption version "+Y);return{nonce:Q.subarray(1,33),ciphertext:Q.subarray(33,-32),mac:Q.subarray(-32)}}function um(c,$,Q=o0(32)){let{chacha_key:J,chacha_nonce:Y,hmac_key:X}=AN($,Q),W=CN(c),m=XX(J,Y,W),G=EN(X,m,Q);return L0.encode(Fc(new Uint8Array([2]),Q,m,G))}function km(c,$){let{nonce:Q,ciphertext:J,mac:Y}=ap(c),{chacha_key:X,chacha_nonce:W,hmac_key:m}=AN($,Q),G=EN(m,J,Q);if(!BJ(G,Y))throw Error("invalid MAC");let z=XX(X,W,J);return PN(z)}var lp={utils:{getConversationKey:fm,calcPaddedLen:nm,pad:CN,unpad:PN},encrypt:um,decrypt:km},hp=172800,bN=()=>Math.round(Date.now()/1000),FN=()=>Math.round(bN()-Math.random()*hp),TN=(c,$)=>fm(c,$),fN=(c,$,Q)=>um(JSON.stringify(c),TN($,Q)),XN=(c,$)=>JSON.parse(km(c.content,TN($,c.pubkey)));function nN(c,$){let Q={created_at:bN(),content:"",tags:[],...c,pubkey:OJ($)};return Q.id=mX(Q),Q}function uN(c,$,Q){return A0({kind:VN,content:fN(c,$,Q),created_at:FN(),tags:[]},$)}function kN(c,$){let Q=fB();return A0({kind:DN,content:fN(c,Q,$),created_at:FN(),tags:[["p",$]]},Q)}function zX(c,$,Q){let J=nN(c,$),Y=uN(J,$,Q);return kN(Y,Q)}function yp(c,$,Q){if(!Q||Q.length===0)throw Error("At least one recipient is required.");let J=OJ($),Y=[zX(c,$,J)];return Q.forEach((X)=>{Y.push(zX(c,$,X))}),Y}function am(c,$){let Q=XN(c,$);return XN(Q,$)}function aN(c,$){let Q=[];return c.forEach((J)=>{Q.push(am(J,$))}),Q.sort((J,Y)=>J.created_at-Y.created_at),Q}function op(c,$,Q,J){let Y={created_at:Math.ceil(Date.now()/1000),kind:wN,tags:[],content:$};if((Array.isArray(c)?c:[c]).forEach(({publicKey:W,relayUrl:m})=>{Y.tags.push(m?["p",W,m]:["p",W])}),J)Y.tags.push(["e",J.eventId,J.relayUrl||"","reply"]);if(Q)Y.tags.push(["subject",Q]);return Y}function lN(c,$,Q,J,Y){let X=op($,Q,J,Y);return zX(X,c,$.publicKey)}function gp(c,$,Q,J,Y){if(!$||$.length===0)throw Error("At least one recipient is required.");return[{publicKey:OJ(c)},...$].map((W)=>lN(c,W,Q,J,Y))}var dp=am,sp=aN,rp={};Sc(rp,{finishRepostEvent:()=>tp,getRepostedEvent:()=>ep,getRepostedEventPointer:()=>hN});function tp(c,$,Q,J){let Y,X=[...c.tags??[],["e",$.id,Q],["p",$.pubkey]];if($.kind===NN)Y=Lm;else Y=Sm,X.push(["k",String($.kind)]);return A0({kind:Y,tags:X,content:c.content===""||$.tags?.find((W)=>W[0]==="-")?"":JSON.stringify($),created_at:c.created_at},J)}function hN(c){if(![Lm,Sm].includes(c.kind))return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0)return;return{id:$[1],relays:[$[2],Q?.[2]].filter((J)=>typeof J==="string"),author:Q?.[1]}}function ep(c,{skipVerification:$}={}){let Q=hN(c);if(Q===void 0||c.content==="")return;let J;try{J=JSON.parse(c.content)}catch(Y){return}if(J.id!==Q.id)return;if(!$&&!RJ(J))return;return J}var cI={};Sc(cI,{NOSTR_URI_REGEX:()=>lm,parse:()=>QI,test:()=>$I});var lm=new RegExp(`nostr:(${IN.source})`);function $I(c){return typeof c==="string"&&new RegExp(`^${lm.source}$`).test(c)}function QI(c){let $=c.match(new RegExp(`^${lm.source}$`));if(!$)throw Error(`Invalid Nostr URI: ${c}`);return{uri:$[0],value:$[1],decoded:NX($[1])}}var JI={};Sc(JI,{parse:()=>XI});function WN(c){if(!c)return;return/^\d+$/.test(c)?parseInt(c,10):c}function yN(c,$){let Q=c.indexOf(":"),J=c.indexOf(":",Q+1);if(Q===-1||J===-1)return;let Y=parseInt(c.slice(0,Q),10);if(Number.isNaN(Y))return;let X=c.slice(Q+1,J);if(!q0(X))return;return{kind:Y,pubkey:X,identifier:c.slice(J+1),relays:$?[$]:[]}}function mN(c){switch(c[0]){case"E":case"e":if(!c[1]||!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0};case"A":case"a":if(!c[1])return;return yN(c[1],c[2]);case"I":case"i":if(!c[1])return;return{value:c[1],hint:c[2]}}}function YI(c){if(!c[1])return;if(c[1].includes(":"))return yN(c[1],c[2]);if(!q0(c[1]))return;return{id:c[1],relays:c[2]?[c[2]]:[],author:c[3]&&q0(c[3])?c[3]:void 0}}function GN(c){return c.findLast(($)=>$.tagName==="A"||$.tagName==="a")?.pointer||c.findLast(($)=>$.tagName==="I"||$.tagName==="i")?.pointer||c.findLast(($)=>$.tagName==="E"||$.tagName==="e")?.pointer}function Km(c,$){if(!c||!("id"in c)||!c.author)return;let Q=$.find((J)=>J.pubkey===c.author);if(!Q||!Q.relays)return;if(!c.relays)c.relays=[];Q.relays.forEach((J)=>{if(c.relays.indexOf(J)===-1)c.relays.push(J)}),Q.relays=c.relays}function XI(c){let $={root:void 0,rootKind:void 0,reply:void 0,replyKind:void 0,mentions:[],quotes:[],profiles:[]},Q=[],J=[];for(let Y of c.tags){if((Y[0]==="E"||Y[0]==="A"||Y[0]==="I")&&Y[1]){let X=mN(Y);if(X)Q.push({tagName:Y[0],pointer:X});continue}if((Y[0]==="e"||Y[0]==="a"||Y[0]==="i")&&Y[1]){let X=mN(Y);if(X)J.push({tagName:Y[0],pointer:X});continue}if(Y[0]==="K"){$.rootKind=WN(Y[1]);continue}if(Y[0]==="k"){$.replyKind=WN(Y[1]);continue}if(Y[0]==="q"){let X=YI(Y);if(X)$.quotes.push(X);continue}if((Y[0]==="P"||Y[0]==="p")&&Y[1]&&q0(Y[1]))$.profiles.push({pubkey:Y[1],relays:Y[2]?[Y[2]]:[]})}return $.root=GN(Q),$.reply=GN(J),Km($.root,$.profiles),Km($.reply,$.profiles),$.quotes.forEach((Y)=>Km(Y,$.profiles)),$}var WI={};Sc(WI,{finishReactionEvent:()=>mI,getReactedEventPointer:()=>GI});function mI(c,$,Q){let J=$.tags.filter((Y)=>Y.length>=2&&(Y[0]==="e"||Y[0]==="p"));return A0({...c,kind:_m,tags:[...c.tags??[],...J,["e",$.id],["p",$.pubkey]],content:c.content??"+"},Q)}function GI(c){if(c.kind!==_m)return;let $,Q;for(let J=c.tags.length-1;J>=0&&($===void 0||Q===void 0);J--){let Y=c.tags[J];if(Y.length>=2){if(Y[0]==="e"&&$===void 0)$=Y;else if(Y[0]==="p"&&Q===void 0)Q=Y}}if($===void 0||Q===void 0)return;return{id:$[1],relays:[$[2],Q[2]].filter((J)=>J!==void 0),author:Q[1]}}var zI={};Sc(zI,{parse:()=>qI});var Dm=/\W/m,zN=/[^\w\/] |[^\w\/]$|$|,| /m,xI=42;function*qI(c){let $=[];if(typeof c!=="string"){for(let X=0;X<c.tags.length;X++){let W=c.tags[X];if(W[0]==="emoji"&&W.length>=3)$.push({type:"emoji",shortcode:W[1],url:W[2]})}c=c.content}let Q=c.length,J=0,Y=0;c:while(Y<Q){let X=c.indexOf(":",Y),W=c.indexOf("#",Y);if(X===-1&&W===-1)break c;if(X===-1||W>=0&&W<X){if(W===0||c[W-1].match(Dm)){let m=c.slice(W+1,W+xI).match(Dm),G=m?W+1+m.index:Q;yield{type:"text",text:c.slice(J,W)},yield{type:"hashtag",value:c.slice(W+1,G)},Y=G,J=Y;continue c}Y=W+1;continue c}if(c.slice(X-5,X)==="nostr"){let m=c.slice(X+60).match(Dm),G=m?X+60+m.index:Q;try{let z,{data:x,type:q}=NX(c.slice(X+1,G));switch(q){case"npub":z={pubkey:x};break;case"note":z={id:x};break;case"nsec":Y=G+1;continue;default:z=x}if(J!==X-5)yield{type:"text",text:c.slice(J,X-5)};yield{type:"reference",pointer:z},Y=G,J=Y;continue c}catch(z){Y=X+1;continue c}}else if(c.slice(X-5,X)==="https"||c.slice(X-4,X)==="http"){let m=c.slice(X+4).match(zN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?5:4;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};if(/\.(png|jpe?g|gif|webp|heic|svg)$/i.test(x.pathname)){yield{type:"image",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp4|avi|webm|mkv|mov)$/i.test(x.pathname)){yield{type:"video",url:x.toString()},Y=G,J=Y;continue c}if(/\.(mp3|aac|ogg|opus|wav|flac)$/i.test(x.pathname)){yield{type:"audio",url:x.toString()},Y=G,J=Y;continue c}yield{type:"url",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else if(c.slice(X-3,X)==="wss"||c.slice(X-2,X)==="ws"){let m=c.slice(X+4).match(zN),G=m?X+4+m.index:Q,z=c[X-1]==="s"?3:2;try{let x=new URL(c.slice(X-z,G));if(x.hostname.indexOf(".")===-1)throw Error("invalid ws url");if(J!==X-z)yield{type:"text",text:c.slice(J,X-z)};yield{type:"relay",url:x.toString()},Y=G,J=Y;continue c}catch(x){Y=G+1;continue c}}else{for(let m=0;m<$.length;m++){let G=$[m];if(c[X+G.shortcode.length+1]===":"&&c.slice(X+1,X+G.shortcode.length+1)===G.shortcode){if(J!==X)yield{type:"text",text:c.slice(J,X)};yield G,Y=X+G.shortcode.length+2,J=Y;continue c}}Y=X+1;continue c}}if(J!==Q)yield{type:"text",text:c.slice(J)}}var MI={};Sc(MI,{channelCreateEvent:()=>NI,channelHideMessageEvent:()=>iI,channelMessageEvent:()=>wI,channelMetadataEvent:()=>VI,channelMuteUserEvent:()=>vI});var NI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:iN,tags:[...c.tags??[]],content:Q,created_at:c.created_at},$)},VI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:vN,tags:[["e",c.channel_create_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},wI=(c,$)=>{let Q=[["e",c.channel_create_event_id,c.relay_url,"root"]];if(c.reply_to_channel_message_event_id)Q.push(["e",c.reply_to_channel_message_event_id,c.relay_url,"reply"]);return A0({kind:UN,tags:[...Q,...c.tags??[]],content:c.content,created_at:c.created_at},$)},iI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:jN,tags:[["e",c.channel_message_event_id],...c.tags??[]],content:Q,created_at:c.created_at},$)},vI=(c,$)=>{let Q;if(typeof c.content==="object")Q=JSON.stringify(c.content);else if(typeof c.content==="string")Q=c.content;else return;return A0({kind:KN,tags:[["p",c.pubkey_to_mute],...c.tags??[]],content:Q,created_at:c.created_at},$)},UI={};Sc(UI,{EMOJI_SHORTCODE_REGEX:()=>oN,matchAll:()=>jI,regex:()=>hm,replaceAll:()=>KI});var oN=/:(\w+):/,hm=()=>new RegExp(`\\B${oN.source}\\B`,"g");function*jI(c){let $=c.matchAll(hm());for(let Q of $)try{let[J,Y]=Q;yield{shortcode:J,name:Y,start:Q.index,end:Q.index+J.length}}catch(J){}}function KI(c,$){return c.replaceAll(hm(),(Q,J)=>{return $({shortcode:Q,name:J})})}var DI={};Sc(DI,{useFetchImplementation:()=>BI,validateGithub:()=>HI});var ym;try{ym=fetch}catch{}function BI(c){ym=c}async function HI(c,$,Q){try{return await(await ym(`https://gist.github.com/${$}/${Q}/raw`)).text()===`Verifying that I control the following Nostr public key: ${c}`}catch(J){return!1}}var OI={};Sc(OI,{makeNwcRequestEvent:()=>pI,parseConnectionString:()=>RI});function RI(c){let{host:$,pathname:Q,searchParams:J}=new URL(c),Y=Q||$,X=J.getAll("relay"),W=J.get("secret");if(!Y||X.length===0||!W)throw Error("invalid connection string");return{pubkey:Y,relay:X[0],relays:X,secret:W}}async function pI(c,$,Q){let Y=ZN($,c,JSON.stringify({method:"pay_invoice",params:{invoice:Q}})),X={kind:HN,created_at:Math.round(Date.now()/1000),content:Y,tags:[["p",c]]};return A0(X,$)}var II={};Sc(II,{normalizeIdentifier:()=>ZI});function ZI(c){return c=c.trim().toLowerCase(),c=c.normalize("NFKC"),Array.from(c).map(($)=>{if(/\p{Letter}/u.test($)||/\p{Number}/u.test($))return $;return"-"}).join("")}var LI={};Sc(LI,{getSatoshisAmountFromBolt11:()=>EI,getZapEndpoint:()=>SI,makeZapReceipt:()=>PI,makeZapRequest:()=>AI,useFetchImplementation:()=>_I,validateZapRequest:()=>CI});var om;try{om=fetch}catch{}function _I(c){om=c}async function SI(c){try{let $="",{lud06:Q,lud16:J}=JSON.parse(c.content);if(J){let[W,m]=J.split("@");$=new URL(`/.well-known/lnurlp/${W}`,`https://${m}`).toString()}else if(Q){let{words:W}=T8.decode(Q,1000),m=T8.fromWords(W);$=i8.decode(m)}else return null;let X=await(await om($)).json();if(X.allowsNostr&&X.nostrPubkey)return X.callback}catch($){}return null}function AI(c){let $={kind:9734,created_at:Math.round(Date.now()/1000),content:c.comment||"",tags:[["p","pubkey"in c?c.pubkey:c.event.pubkey],["amount",c.amount.toString()],["relays",...c.relays]]};if("event"in c){if($.tags.push(["e",c.event.id]),Im(c.event.kind)){let Q=["a",`${c.event.kind}:${c.event.pubkey}:`];$.tags.push(Q)}else if(Zm(c.event.kind)){let Q=c.event.tags.find(([Y,X])=>Y==="d"&&X);if(!Q)throw Error("d tag not found or is empty");let J=["a",`${c.event.kind}:${c.event.pubkey}:${Q[1]}`];$.tags.push(J)}$.tags.push(["k",c.event.kind.toString()])}return $}function CI(c){let $;try{$=JSON.parse(c)}catch(X){return"Invalid zap request JSON."}if(!pm($))return"Zap request is not a valid Nostr event.";if(!RJ($))return"Invalid signature on zap request.";let Q=$.tags.find(([X,W])=>X==="p"&&W);if(!Q)return"Zap request doesn't have a 'p' tag.";if(!q0(Q[1]))return"Zap request 'p' tag is not valid hex.";let J=$.tags.find(([X,W])=>X==="e"&&W);if(J&&!q0(J[1]))return"Zap request 'e' tag is not valid hex.";if(!$.tags.find(([X,W])=>X==="relays"&&W))return"Zap request doesn't have a 'relays' tag.";return null}function PI({zapRequest:c,preimage:$,bolt11:Q,paidAt:J}){let Y=JSON.parse(c),X=Y.tags.filter(([m])=>m==="e"||m==="p"||m==="a"),W={kind:9735,created_at:Math.round(J.getTime()/1000),content:"",tags:[...X,["P",Y.pubkey],["bolt11",Q],["description",c]]};if($)W.tags.push(["preimage",$]);return W}function EI(c){if(c.length<50)return 0;c=c.substring(0,50);let $=c.lastIndexOf("1");if($===-1)return 0;let Q=c.substring(0,$);if(!Q.startsWith("lnbc"))return 0;let J=Q.substring(4);if(J.length<1)return 0;let Y=J[J.length-1],X=Y.charCodeAt(0)-48,W=X>=0&&X<=9,m=J.length-1;if(W)m++;if(m<1)return 0;let G=parseInt(J.substring(0,m));switch(Y){case"m":return G*1e5;case"u":return G*100;case"n":return G/10;case"p":return G/1e4;default:return G*1e8}}var bI={};Sc(bI,{Negentropy:()=>dN,NegentropyStorageVector:()=>fI,NegentropySync:()=>nI});var Bm=97,VQ=32,gN=16,i$={Skip:0,Fingerprint:1,IdList:2},w8=class{_raw;length;constructor(c){if(typeof c==="number")this._raw=new Uint8Array(c),this.length=0;else if(c instanceof Uint8Array)this._raw=new Uint8Array(c),this.length=c.length;else this._raw=new Uint8Array(512),this.length=0}unwrap(){return this._raw.subarray(0,this.length)}get capacity(){return this._raw.byteLength}extend(c){if(c instanceof w8)c=c.unwrap();if(typeof c.length!=="number")throw Error("bad length");let $=c.length+this.length;if(this.capacity<$){let Q=this._raw,J=Math.max(this.capacity*2,$);this._raw=new Uint8Array(J),this._raw.set(Q)}this._raw.set(c,this.length),this.length+=c.length}shift(){let c=this._raw[0];return this._raw=this._raw.subarray(1),this.length--,c}shiftN(c=1){let $=this._raw.subarray(0,c);return this._raw=this._raw.subarray(c),this.length-=c,$}};function WX(c){let $=0;while(!0){if(c.length===0)throw Error("parse ends prematurely");let Q=c.shift();if($=$<<7|Q&127,(Q&128)===0)break}return $}function V8(c){if(c===0)return new w8(new Uint8Array([0]));let $=[];while(c!==0)$.push(c&127),c>>>=7;$.reverse();for(let Q=0;Q<$.length-1;Q++)$[Q]|=128;return new w8(new Uint8Array($))}function FI(c){return GX(c,1)[0]}function GX(c,$){if(c.length<$)throw Error("parse ends prematurely");return c.shiftN($)}var TI=class{buf;constructor(){this.setToZero()}setToZero(){this.buf=new Uint8Array(VQ)}add(c){let $=0,Q=0,J=new DataView(this.buf.buffer),Y=new DataView(c.buffer);for(let X=0;X<8;X++){let W=X*4,m=J.getUint32(W,!0),G=Y.getUint32(W,!0),z=m;if(z+=$,z+=G,z>4294967295)Q=1;J.setUint32(W,z&4294967295,!0),$=Q,Q=0}}negate(){let c=new DataView(this.buf.buffer);for(let Q=0;Q<8;Q++){let J=Q*4;c.setUint32(J,~c.getUint32(J,!0))}let $=new Uint8Array(VQ);$[0]=1,this.add($)}getFingerprint(c){let $=new w8;return $.extend(this.buf),$.extend(V8(c)),Q0($.unwrap()).subarray(0,gN)}},fI=class{items;sealed;constructor(){this.items=[],this.sealed=!1}insert(c,$){if(this.sealed)throw Error("already sealed");let Q=Rc($);if(Q.byteLength!==VQ)throw Error("bad id size for added item");this.items.push({timestamp:c,id:Q})}seal(){if(this.sealed)throw Error("already sealed");this.sealed=!0,this.items.sort(Hm);for(let c=1;c<this.items.length;c++)if(Hm(this.items[c-1],this.items[c])===0)throw Error("duplicate item inserted")}unseal(){this.sealed=!1}size(){return this._checkSealed(),this.items.length}getItem(c){if(this._checkSealed(),c>=this.items.length)throw Error("out of range");return this.items[c]}iterate(c,$,Q){this._checkSealed(),this._checkBounds(c,$);for(let J=c;J<$;++J)if(!Q(this.items[J],J))break}findLowerBound(c,$,Q){return this._checkSealed(),this._checkBounds(c,$),this._binarySearch(this.items,c,$,(J)=>Hm(J,Q)<0)}fingerprint(c,$){let Q=new TI;return Q.setToZero(),this.iterate(c,$,(J)=>{return Q.add(J.id),!0}),Q.getFingerprint($-c)}_checkSealed(){if(!this.sealed)throw Error("not sealed")}_checkBounds(c,$){if(c>$||$>this.items.length)throw Error("bad range")}_binarySearch(c,$,Q,J){let Y=Q-$;while(Y>0){let X=$,W=Math.floor(Y/2);if(X+=W,J(c[X]))$=++X,Y-=W+1;else Y=W}return $}},dN=class{storage;frameSizeLimit;lastTimestampIn;lastTimestampOut;constructor(c,$=60000){if($<4096)throw Error("frameSizeLimit too small");this.storage=c,this.frameSizeLimit=$,this.lastTimestampIn=0,this.lastTimestampOut=0}_bound(c,$){return{timestamp:c,id:$||new Uint8Array(0)}}initiate(){let c=new w8;return c.extend(new Uint8Array([Bm])),this.splitRange(0,this.storage.size(),this._bound(Number.MAX_VALUE),c),Hc(c.unwrap())}reconcile(c,$,Q){let J=new w8(Rc(c));this.lastTimestampIn=this.lastTimestampOut=0;let Y=new w8;Y.extend(new Uint8Array([Bm]));let X=FI(J);if(X<96||X>111)throw Error("invalid negentropy protocol version byte");if(X!==Bm)throw Error("unsupported negentropy protocol version requested: "+(X-96));let W=this.storage.size(),m=this._bound(0),G=0,z=!1;while(J.length!==0){let x=new w8,q=()=>{if(z)z=!1,x.extend(this.encodeBound(m)),x.extend(V8(i$.Skip))},M=this.decodeBound(J),N=WX(J),w=G,U=this.storage.findLowerBound(G,W,M);if(N===i$.Skip)z=!0;else if(N===i$.Fingerprint){let v=GX(J,gN),i=this.storage.fingerprint(w,U);if(sN(v,i)!==0)q(),this.splitRange(w,U,M,x);else z=!0}else if(N===i$.IdList){let v=WX(J),i={};for(let j=0;j<v;j++){let D=GX(J,VQ);i[Hc(D)]=D}if(z=!0,this.storage.iterate(w,U,(j)=>{let D=j.id,_=Hc(D);if(!i[_])$?.(_);else delete i[Hc(D)];return!0}),Q)for(let j of Object.values(i))Q(Hc(j))}else throw Error("unexpected mode");if(this.exceededFrameSizeLimit(Y.length+x.length)){let v=this.storage.fingerprint(U,W);Y.extend(this.encodeBound(this._bound(Number.MAX_VALUE))),Y.extend(V8(i$.Fingerprint)),Y.extend(v);break}else Y.extend(x);G=U,m=M}return Y.length===1?null:Hc(Y.unwrap())}splitRange(c,$,Q,J){let Y=$-c,X=16;if(Y<X*2)J.extend(this.encodeBound(Q)),J.extend(V8(i$.IdList)),J.extend(V8(Y)),this.storage.iterate(c,$,(W)=>{return J.extend(W.id),!0});else{let W=Math.floor(Y/X),m=Y%X,G=c;for(let z=0;z<X;z++){let x=W+(z<m?1:0),q=this.storage.fingerprint(G,G+x);G+=x;let M;if(G===$)M=Q;else{let N,w;this.storage.iterate(G-1,G+1,(U,v)=>{if(v===G-1)N=U;else w=U;return!0}),M=this.getMinimalBound(N,w)}J.extend(this.encodeBound(M)),J.extend(V8(i$.Fingerprint)),J.extend(q)}}}exceededFrameSizeLimit(c){return c>this.frameSizeLimit-200}decodeTimestampIn(c){let $=WX(c);if($=$===0?Number.MAX_VALUE:$-1,this.lastTimestampIn===Number.MAX_VALUE||$===Number.MAX_VALUE)return this.lastTimestampIn=Number.MAX_VALUE,Number.MAX_VALUE;return $+=this.lastTimestampIn,this.lastTimestampIn=$,$}decodeBound(c){let $=this.decodeTimestampIn(c),Q=WX(c);if(Q>VQ)throw Error("bound key too long");let J=GX(c,Q);return{timestamp:$,id:J}}encodeTimestampOut(c){if(c===Number.MAX_VALUE)return this.lastTimestampOut=Number.MAX_VALUE,V8(0);let $=c;return c-=this.lastTimestampOut,this.lastTimestampOut=$,V8(c+1)}encodeBound(c){let $=new w8;return $.extend(this.encodeTimestampOut(c.timestamp)),$.extend(V8(c.id.length)),$.extend(c.id),$}getMinimalBound(c,$){if($.timestamp!==c.timestamp)return this._bound($.timestamp);else{let Q=0,J=$.id,Y=c.id;for(let X=0;X<VQ;X++){if(J[X]!==Y[X])break;Q++}return this._bound($.timestamp,$.id.subarray(0,Q+1))}}};function sN(c,$){for(let Q=0;Q<c.byteLength;Q++){if(c[Q]<$[Q])return-1;if(c[Q]>$[Q])return 1}if(c.byteLength>$.byteLength)return 1;if(c.byteLength<$.byteLength)return-1;return 0}function Hm(c,$){if(c.timestamp===$.timestamp)return sN(c.id,$.id);return c.timestamp-$.timestamp}var nI=class{relay;storage;neg;filter;subscription;onhave;onneed;constructor(c,$,Q,J={}){this.relay=c,this.storage=$,this.neg=new dN($),this.onhave=J.onhave,this.onneed=J.onneed,this.filter=Q,this.subscription=this.relay.prepareSubscription([{}],{label:J.label||"negentropy"}),this.subscription.oncustom=(Y)=>{switch(Y[0]){case"NEG-MSG":{if(Y.length<3)console.warn(`got invalid NEG-MSG from ${this.relay.url}: ${Y}`);try{let X=this.neg.reconcile(Y[2],this.onhave,this.onneed);if(X)this.relay.send(`["NEG-MSG", "${this.subscription.id}", "${X}"]`);else this.close(),J.onclose?.()}catch(X){console.error("negentropy reconcile error:",X),J?.onclose?.(`reconcile error: ${X}`)}break}case"NEG-CLOSE":{let X=Y[2];console.warn("negentropy error:",X),J.onclose?.(X);break}case"NEG-ERR":J.onclose?.()}}}async start(){let c=this.neg.initiate();this.relay.send(`["NEG-OPEN","${this.subscription.id}",${JSON.stringify(this.filter)},"${c}"]`)}close(){this.relay.send(`["NEG-CLOSE","${this.subscription.id}"]`),this.subscription.close()}},uI={};Sc(uI,{getToken:()=>kI,hashPayload:()=>gm,unpackEventFromToken:()=>tN,validateEvent:()=>YV,validateEventKind:()=>cV,validateEventMethodTag:()=>QV,validateEventPayloadTag:()=>JV,validateEventTimestamp:()=>eN,validateEventUrlTag:()=>$V,validateToken:()=>aI});var rN="Nostr ";async function kI(c,$,Q,J=!1,Y){let X={kind:Am,tags:[["u",c],["method",$]],created_at:Math.round(new Date().getTime()/1000),content:""};if(Y)X.tags.push(["payload",gm(Y)]);let W=await Q(X);return(J?rN:"")+L0.encode(S0.encode(JSON.stringify(W)))}async function aI(c,$,Q){let J=await tN(c).catch((X)=>{throw X});return await YV(J,$,Q).catch((X)=>{throw X})}async function tN(c){if(!c)throw Error("Missing token");c=c.replace(rN,"");let $=i8.decode(L0.decode(c));if(!$||$.length===0||!$.startsWith("{"))throw Error("Invalid token");return JSON.parse($)}function eN(c){if(!c.created_at)return!1;return Math.round(new Date().getTime()/1000)-c.created_at<60}function cV(c){return c.kind===Am}function $V(c,$){let Q=c.tags.find((J)=>J[0]==="u");if(!Q)return!1;return Q.length>0&&Q[1]===$}function QV(c,$){let Q=c.tags.find((J)=>J[0]==="method");if(!Q)return!1;return Q.length>0&&Q[1].toLowerCase()===$.toLowerCase()}function gm(c){let $=Q0(S0.encode(JSON.stringify(c)));return Hc($)}function JV(c,$){let Q=c.tags.find((Y)=>Y[0]==="payload");if(!Q)return!1;let J=gm($);return Q.length>0&&Q[1]===J}async function YV(c,$,Q,J){if(!RJ(c))throw Error("Invalid nostr event, signature invalid");if(!cV(c))throw Error("Invalid nostr event, kind invalid");if(!eN(c))throw Error("Invalid nostr event, created_at timestamp invalid");if(!$V(c,$))throw Error("Invalid nostr event, url tag invalid");if(!QV(c,Q))throw Error("Invalid nostr event, method tag invalid");if(Boolean(J)&&typeof J==="object"&&Object.keys(J).length>0){if(!JV(c,J))throw Error("Invalid nostr event, payload tag does not match request body hash")}return!0}function yI(c){let $=c.trim().toLowerCase().replace(/^0x/,"");if(!/^[0-9a-f]{64}$/.test($))throw Error("expected 64-char hex private key");let Q=new Uint8Array(32);for(let J=0;J<32;J++)Q[J]=parseInt($.slice(J*2,J*2+2),16);return Q}function pJ(c){let $=(c??"").trim();if(!$)throw Error("BUZZ_PRIVATE_KEY is empty");let Q;if($.startsWith("nsec")){let Y=MX.decode($);if(Y.type!=="nsec")throw Error("BUZZ_PRIVATE_KEY is not an nsec");Q=Y.data}else Q=yI($);let J=OJ(Q);return{secretKey:Q,pubkeyHex:J,npub:MX.npubEncode(J)}}function v8(c,$){return A0(c,$.secretKey)}function XV(c){return lI("sha256").update(c).digest("hex")}function WV(){return hI()}var oI=["/fig","@figura"];function mV(c){return c.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function GV(c){return c.replace(/^[\s:,\-—]+/,"").trim()}function zV(c,$={}){let Q=(c??"").trim();if(!Q)return null;let J=$.triggers??oI,Y=null;for(let X of J){let m=new RegExp(`(?:^|\\s)${mV(X)}\\b`,"i").exec(Q);if(m){let G=m.index+m[0].length-X.length;if(!Y||G<Y.index)Y={index:G,end:m.index+m[0].length,via:"trigger"}}}if($.agentNpub){let W=new RegExp(`(?:nostr:)?${mV($.agentNpub)}`,"i").exec(Q);if(W&&(!Y||W.index<Y.index))Y={index:W.index,end:W.index+W[0].length,via:"npub"}}if(Y){let X=GV(Q.slice(Y.end));if(X)return{brief:X,via:Y.via};return null}if($.mentioned){let X=GV(Q);if(X)return{brief:X,via:"mention"}}return null}function gI(c){return c.replace(/^fig\s+/i,"").trim()}function xV(c){let $=(c??"").trim();if(!$)return null;let Q=/^(?:fig\s+this\s+and\s+file\s+it|file\s+(?:it|this)\s+and\s+fig(?:\s+it)?)\s*:?\s*(.+)$/is.exec($);if(Q){let X=Q[1].trim();if(X)return{kind:"fig-and-file",description:X}}let J=/^file\s+(?:an?\s+)?issue\s*:?\s*(.+)$/is.exec($);if(J){let X=J[1].trim();if(X)return{kind:"file-issue",title:X}}let Y=/^(?:fig\s+)?issue\s+#?(\d+)\b/i.exec($);if(Y)return{kind:"fig-issue",issue:Number(Y[1])};return{kind:"fig",brief:gI($)||$}}var qV=typeof process<"u"&&process.env?.FIGURA_APP_URL?.replace(/\/+$/,"")||"https://figura.so";function MV(c,$=qV){return`${($||qV).replace(/\/+$/,"")}/f/${c}`}function vX(c){let Q=[c.title?`Here's your fig: **${c.title}**`:"Here's your fig"];if(c.note)Q.push(c.note);return Q.push(""),Q.push(c.link),Q.join(`
530
+ `)}function wQ(c){return`Sorry — I couldn't make that fig. ${c}`}function UX(c){return`Filed ${typeof c.number==="number"?`issue #${c.number}`:"the issue"}: **${c.title}**
526
531
 
527
- ${c.url}`}function xW(c){return`Figura mock for this issue: ${c}`}function gq(c,$){return`From issue #${c}: ${$}`}function dq(c){let $=[`Design a screen for this issue: ${c.title}`],Q=(c.body??"").trim();if(Q)$.push(Q.length>2000?`${Q.slice(0,2000)}…`:Q);if(c.labels&&c.labels.length)$.push(`Labels: ${c.labels.join(", ")}`);return $.join(`
532
+ ${c.url}`}function dm(c){return`Figura mock for this issue: ${c}`}function NV(c,$){return`From issue #${c}: ${$}`}function VV(c){let $=[`Design a screen for this issue: ${c.title}`],Q=(c.body??"").trim();if(Q)$.push(Q.length>2000?`${Q.slice(0,2000)}…`:Q);if(c.labels&&c.labels.length)$.push(`Labels: ${c.labels.join(", ")}`);return $.join(`
528
533
 
529
- `)}class iW extends Error{input;constructor(c,$){super(c);this.input=$}}function vR(c){return c.tags.find(($)=>$[0]==="h")?.[1]??null}function UR(c,$){return c.tags.some((Q)=>Q[0]==="p"&&(Q[1]??"").toLowerCase()===$)}async function sq(c,$){let Q=$.log??(()=>{});if(c.pubkey.toLowerCase()===$.identity.pubkeyHex.toLowerCase())return{action:"skip",reason:"self"};let J=vR(c),Y=async(x)=>{let i={channelId:J??"",content:x,replyTo:c.id,mentions:[c.pubkey]},q=J?await $.postReply(i):{ok:!1};if(!q||q.ok!==!0)throw new iW("the relay did not accept the reply",i)},X=$.pendingReplies.get(c.id);if(X){let x=await $.postReply(X.input);if(x&&x.ok===!0)return $.pendingReplies.delete(c.id),Q("delivered cached reply on redelivery (no re-run)"),X.outcome;return{action:"delivery-failed",reason:"the relay did not accept the reply"}}if($.seen.has(c.id))return{action:"skip",reason:"duplicate"};let m=lq(c.content,{triggers:$.triggers,agentNpub:$.identity.npub,mentioned:UR(c,$.identity.pubkeyHex)});if(!m)return{action:"skip",reason:"no-trigger"};if(!J)return{action:"skip",reason:"no-channel"};let W=hq(m.brief);if(!W)return{action:"skip",reason:"empty-brief"};$.seen.add(c.id),Q(`request in ${J} via ${m.via}: ${W.kind}`);let G=!1,z=async(x,i)=>{try{return await Y(x),i}catch(q){if(!(q instanceof iW))throw q;if(G)$.pendingReplies.set(c.id,{input:q.input,outcome:i}),Q("reply delivery failed — cached for independent retry (no re-run)");else $.seen.delete(c.id),Q("reply delivery failed before any side effect — un-claimed for reprocess");return{action:"delivery-failed",reason:q.message}}};try{switch(W.kind){case"fig":{let x=await $.generate(W.brief);return G=!0,await z(uY({link:x.url??"(link unavailable)",title:x.title,note:W.brief}),{action:"replied",via:m.via,kind:W.kind,link:x.url})}case"fig-issue":{if(!$.tracker||!$.tracker.supportsNumericFetch)return await z(e$("no numeric issue tracker is configured — set FIGURA_ISSUE_TRACKER=github with GITHUB_REPO/GITHUB_TOKEN."),{action:"error-replied",reason:"no-numeric-tracker"});let x=await $.tracker.fetchIssue(W.issue),i=await $.generate(dq(x),{issue:W.issue});if(G=!0,i.url)await $.tracker.commentIssue({number:W.issue,url:x.url},xW(i.url)).catch((q)=>Q(`issue back-link failed: ${String(q)}`));return await z(uY({link:i.url??"(link unavailable)",title:i.title,note:gq(W.issue,x.title)}),{action:"replied",via:m.via,kind:W.kind,link:i.url})}case"file-issue":{if(!$.tracker)return await z(e$("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let x=await $.tracker.createIssue({title:W.title,body:W.title});return G=!0,await z(aY({url:x.url,title:W.title,number:x.number}),{action:"filed",issue:x.url})}case"fig-and-file":{if(!$.tracker)return await z(e$("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let x=await $.tracker.createIssue({title:W.description,body:W.description});G=!0;let i;try{i=await $.generate(W.description,{issue:x.number})}catch(M){let N=M instanceof Error?M.message:String(M);return Q(`fig-and-file generation failed after filing ${x.url}: ${N}`),await z(`${aY({url:x.url,title:W.description,number:x.number})}
534
+ `)}class sm extends Error{input;constructor(c,$){super(c);this.input=$}}function dI(c){return c.tags.find(($)=>$[0]==="h")?.[1]??null}function sI(c,$){return c.tags.some((Q)=>Q[0]==="p"&&(Q[1]??"").toLowerCase()===$)}async function wV(c,$){let Q=$.log??(()=>{});if(c.pubkey.toLowerCase()===$.identity.pubkeyHex.toLowerCase())return{action:"skip",reason:"self"};let J=dI(c),Y=async(x)=>{let q={channelId:J??"",content:x,replyTo:c.id,mentions:[c.pubkey]},M=J?await $.postReply(q):{ok:!1};if(!M||M.ok!==!0)throw new sm("the relay did not accept the reply",q)},X=$.pendingReplies.get(c.id);if(X){let x=await $.postReply(X.input);if(x&&x.ok===!0)return $.pendingReplies.delete(c.id),Q("delivered cached reply on redelivery (no re-run)"),X.outcome;return{action:"delivery-failed",reason:"the relay did not accept the reply"}}if($.seen.has(c.id))return{action:"skip",reason:"duplicate"};let W=zV(c.content,{triggers:$.triggers,agentNpub:$.identity.npub,mentioned:sI(c,$.identity.pubkeyHex)});if(!W)return{action:"skip",reason:"no-trigger"};if(!J)return{action:"skip",reason:"no-channel"};let m=xV(W.brief);if(!m)return{action:"skip",reason:"empty-brief"};$.seen.add(c.id),Q(`request in ${J} via ${W.via}: ${m.kind}`);let G=!1,z=async(x,q)=>{try{return await Y(x),q}catch(M){if(!(M instanceof sm))throw M;if(G)$.pendingReplies.set(c.id,{input:M.input,outcome:q}),Q("reply delivery failed — cached for independent retry (no re-run)");else $.seen.delete(c.id),Q("reply delivery failed before any side effect — un-claimed for reprocess");return{action:"delivery-failed",reason:M.message}}};try{switch(m.kind){case"fig":{let x=await $.generate(m.brief);return G=!0,await z(vX({link:x.url??"(link unavailable)",title:x.title,note:m.brief}),{action:"replied",via:W.via,kind:m.kind,link:x.url})}case"fig-issue":{if(!$.tracker||!$.tracker.supportsNumericFetch)return await z(wQ("no numeric issue tracker is configured — set FIGURA_ISSUE_TRACKER=github with GITHUB_REPO/GITHUB_TOKEN."),{action:"error-replied",reason:"no-numeric-tracker"});let x=await $.tracker.fetchIssue(m.issue),q=await $.generate(VV(x),{issue:m.issue});if(G=!0,q.url)await $.tracker.commentIssue({number:m.issue,url:x.url},dm(q.url)).catch((M)=>Q(`issue back-link failed: ${String(M)}`));return await z(vX({link:q.url??"(link unavailable)",title:q.title,note:NV(m.issue,x.title)}),{action:"replied",via:W.via,kind:m.kind,link:q.url})}case"file-issue":{if(!$.tracker)return await z(wQ("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let x=await $.tracker.createIssue({title:m.title,body:m.title});return G=!0,await z(UX({url:x.url,title:m.title,number:x.number}),{action:"filed",issue:x.url})}case"fig-and-file":{if(!$.tracker)return await z(wQ("no issue tracker is configured (FIGURA_ISSUE_TRACKER)."),{action:"error-replied",reason:"no-tracker"});let x=await $.tracker.createIssue({title:m.description,body:m.description});G=!0;let q;try{q=await $.generate(m.description,{issue:x.number})}catch(N){let w=N instanceof Error?N.message:String(N);return Q(`fig-and-file generation failed after filing ${x.url}: ${w}`),await z(`${UX({url:x.url,title:m.description,number:x.number})}
530
535
 
531
- ${e$(N)}`,{action:"error-replied",reason:N})}if(i.url)await $.tracker.commentIssue(x,xW(i.url)).catch((M)=>Q(`issue back-link failed: ${String(M)}`));let q=`${aY({url:x.url,title:W.description,number:x.number})}
536
+ ${wQ(w)}`,{action:"error-replied",reason:w})}if(q.url)await $.tracker.commentIssue(x,dm(q.url)).catch((N)=>Q(`issue back-link failed: ${String(N)}`));let M=`${UX({url:x.url,title:m.description,number:x.number})}
532
537
 
533
- ${uY({link:i.url??"(link unavailable)",title:i.title})}`;return await z(q,{action:"replied",via:m.via,kind:W.kind,link:i.url})}}}catch(x){let i=x instanceof Error?x.message:String(x);return Q(`request failed: ${i}`),await z(e$(i),{action:"error-replied",reason:i})}}class qW{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor(c,$){this.pending=c;this.opts=$;this.max=$.maxAttempts??6,this.base=$.baseDelayMs??1000,this.schedule=$.schedule??((Q,J)=>setTimeout(Q,J)),this.cancel=$.cancel??((Q)=>clearTimeout(Q))}log(c){this.opts.log?.(c)}get inFlight(){return this.active.size}start(c){if(this.active.has(c))return;if(!this.pending.has(c))return;this.active.add(c),this.arm(c)}arm(c){let $=this.attempts.get(c)??0,Q=this.base*2**$,J=this.schedule(()=>{this.timers.delete(c),this.tick(c)},Q);this.timers.set(c,J)}finish(c){this.active.delete(c),this.attempts.delete(c);let $=this.timers.get(c);if($!==void 0)this.cancel($),this.timers.delete(c)}async tick(c){let $=this.pending.get(c);if(!$){this.finish(c);return}let Q=(this.attempts.get(c)??0)+1;this.attempts.set(c,Q);let J=!1;try{J=(await this.opts.postReply($.input))?.ok===!0}catch{J=!1}if(J){this.pending.delete(c),this.finish(c),this.log(`delivered pending reply for ${c} on retry ${Q}`);return}if(Q>=this.max){this.pending.delete(c),this.finish(c),this.log(`giving up on pending reply for ${c} after ${Q} attempts`);return}this.arm(c)}stop(){for(let c of this.timers.values())this.cancel(c);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function rq(c){let $=[["h",c.channelId]];if(c.replyTo)$.push(["e",c.replyTo,"","reply"]);let Q=new Set;for(let J of c.mentions??[]){let Y=J.toLowerCase();if(Q.has(Y))continue;Q.add(Y),$.push(["p",Y])}return{kind:9,content:c.content,tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function tq(c){let $=[["u",c.url],["method",c.method],["nonce",c.nonce]];if(c.payloadSha256)$.push(["payload",c.payloadSha256]);return{kind:27235,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function eq(c){let $=[["relay",c.relayUrl],["challenge",c.challenge]];if(c.authTag)$.push(c.authTag);return{kind:22242,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}var cM=/^[0-9a-f]{64}$/i,jR=/^[0-9a-f]{128}$/i,KR=b.object({id:b.string().regex(cM,"id must be 64-char hex"),pubkey:b.string().regex(cM,"pubkey must be 64-char hex"),sig:b.string().regex(jR,"sig must be 128-char hex"),kind:b.number().int(),created_at:b.number().int(),tags:b.array(b.array(b.string())),content:b.string()});function $M(c){let $=KR.safeParse(c);return $.success?$.data:null}function MW(c){return c.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function DR(c){return c.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function QM(c){return DR(c).replace(/\/+$/,"")}var BR=(c)=>{try{return zJ(c)}catch{return!1}};async function HR(){let c=globalThis;if(c.WebSocket)return c.WebSocket;return(await import("ws")).default}var JM="figura-buzz-agent",OR=60,pR=1e4;class VW{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor(c){this.opts=c;this.since=c.since??Math.floor(Date.now()/1000),this.verify=c.verifyEvent??BR,this.channelSet=new Set(c.channels)}channelAllowed(c){if(this.channelSet.size===0)return!0;let $=c.tags.filter((Q)=>Q[0]==="h").map((Q)=>Q[1]);if($.length!==1||!this.channelSet.has($[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify($)})`),!1;return!0}get cursor(){return this.since}ingest(c){this.handleMessage(c)}start(){this.connect().catch((c)=>this.status(`connect failed: ${String(c)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status(c){this.opts.onStatus?.(c)}async connect(){if(this.closed)return;let c=MW(this.opts.relayUrl),$;try{$=await HR()}catch(J){this.status(`no WebSocket implementation: ${String(J)}`);return}this.authed=!1,this.authEventId=null;let Q;try{Q=new $(c)}catch(J){this.status(`failed to open ${c}: ${String(J)}`),this.scheduleReconnect();return}this.socket=Q,Q.onopen=()=>{this.status(`connected to ${c}`),this.armStability(),this.sendReq()},Q.onmessage=(J)=>this.handleMessage(this.decode(J.data)),Q.onerror=(J)=>this.status(`socket error: ${String(J)}`),Q.onclose=()=>{if(this.clearStability(),this.closed)return;this.status("socket closed — reconnecting"),this.scheduleReconnect()}}markUsable(){if(this.reconnectAttempt!==0)this.status("connection stable — backoff reset");this.reconnectAttempt=0}armStability(){this.clearStability(),this.stabilityTimer=setTimeout(()=>{this.stabilityTimer=null,this.markUsable()},pR)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode(c){if(typeof c==="string")return c;if(c instanceof Uint8Array)return new TextDecoder().decode(c);return String(c)}send(c){try{this.socket?.send(JSON.stringify(c))}catch($){this.status(`send failed: ${String($)}`)}}sendReq(){let c={kinds:[9],since:this.since};if(this.opts.channels.length>0)c["#h"]=this.opts.channels;this.send(["REQ",JM,c])}handleMessage(c){let $;try{$=JSON.parse(c)}catch{return}if(!Array.isArray($)||typeof $[0]!=="string")return;switch($[0]){case"AUTH":if(typeof $[1]==="string")this.respondToAuth($[1]);break;case"OK":if($[1]===this.authEventId&&$[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if($[1]===JM)this.markUsable();break;case"EVENT":{let J=$M($[2]);if(!J){this.status("dropped malformed event");break}if(!this.verify(J)){this.status(`dropped event with invalid signature (pubkey ${J.pubkey.slice(0,12)}…)`);break}if(J.kind===9&&this.channelAllowed(J)){if(J.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+OR;if(J.created_at<=Y)this.since=J.created_at;this.opts.onEvent(J)}break}case"CLOSED":this.status(`subscription closed: ${String($[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String($[1]??"")}`);break;default:break}}respondToAuth(c){let $=eq({challenge:c,relayUrl:MW(this.opts.relayUrl)}),Q=z8($,this.opts.identity);this.authEventId=Q.id,this.send(["AUTH",Q])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let c=Math.min(30000,500*2**(this.reconnectAttempt-1)),$=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),c+$)}}function RR(c){let $=globalThis;if($.Buffer)return $.Buffer.from(c).toString("base64");let Q="";for(let J of c)Q+=String.fromCharCode(J);return btoa(Q)}function YM(c){return`Nostr ${RR(new TextEncoder().encode(c))}`}function IR(c,$,Q,J){let Y=tq({method:$,url:Q,nonce:uq(),payloadSha256:J?nq(J):void 0}),X=z8(Y,c);return YM(JSON.stringify(X))}async function kY(c,$,Q,J={}){let Y=J.fetchImpl??fetch,X=`${QM(c)}/events`,m=JSON.stringify(Q),W={ok:!1,status:0,body:""};for(let G=0;G<2;G++){let z=IR($,"POST",X,m),x;try{x=await Y(X,{method:"POST",headers:{Authorization:z,"Content-Type":"application/json"},body:m})}catch(q){W={ok:!1,status:0,body:q instanceof Error?q.message:String(q)};continue}let i=await x.text().catch(()=>"");if(W={ok:x.ok,status:x.status,body:i},x.ok)return W;if(x.status!==429&&x.status<500)return W}return W}var LR=b.object({id:b.string(),publicId:b.string().nullish(),url:b.string().nullish(),title:b.string().optional(),slug:b.string().optional(),isPublic:b.boolean().optional()});async function XM(c){let $={prompt:c.prompt,publish:!0};if(c.device)$.device=c.device;if(c.platform)$.platform=c.platform;if(typeof c.issue==="number")$.issue=c.issue;let Q=await zc("/v1/figs/generate",{method:"POST",body:$,token:c.token,apiUrl:c.apiUrl,source:"buzz-agent"}),J=LR.safeParse(Q);if(!J.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=J.data,X=Y.publicId??null,m=Y.url??(X?oq(X,c.appOrigin):null);return{id:Y.id,publicId:X,url:m,title:Y.title||Y.slug||"Untitled fig"}}var ZR=b.object({number:b.number().int(),title:b.string().default(""),body:b.string().nullish(),html_url:b.string().optional(),state:b.string().optional(),labels:b.array(b.union([b.string(),b.object({name:b.string().optional()})])).optional()}),_R=b.object({number:b.number().int(),html_url:b.string().optional()}),NW="https://api.github.com";function wW(c){return{Authorization:`Bearer ${c}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function vW(c,$){return`https://github.com/${c}/issues/${$}`}function mM(c,$,Q){return{method:"GET",url:`${NW}/repos/${c}/issues/${$}`,headers:wW(Q)}}function WM(c,$,Q){let J={title:Q.title};if(Q.body)J.body=Q.body;if(Q.labels&&Q.labels.length)J.labels=Q.labels;return{method:"POST",url:`${NW}/repos/${c}/issues`,headers:{...wW($),"Content-Type":"application/json"},body:JSON.stringify(J)}}function GM(c,$,Q,J){return{method:"POST",url:`${NW}/repos/${c}/issues/${$}/comments`,headers:{...wW(Q),"Content-Type":"application/json"},body:JSON.stringify({body:J})}}function zM(c){let $=ZR.safeParse(c);if(!$.success)throw Error(`unexpected GitHub issue response: ${$.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let Q=$.data,J=(Q.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:Q.number,title:Q.title,body:Q.body??"",labels:J,url:Q.html_url??vW("",Q.number),state:Q.state}}function xM(c){let $=_R.safeParse(c);if(!$.success)throw Error(`unexpected GitHub create response: ${$.error.issues.map((Q)=>`${Q.path.join(".")||"(root)"} ${Q.message}`).join("; ")}`);return $.data}function iM(c){return/^[^/\s]+\/[^/\s]+$/.test(c)}function qM(c,$){return`30617:${c}:${$}`}function MM(c){let $=c.subject.trim();if(!$)throw Error("issue subject must not be empty");let Q=[["a",qM(c.ownerHex,c.repoId)],["p",c.ownerHex]];for(let J of c.recipients??[])Q.push(["p",J]);Q.push(["subject",$]);for(let J of c.labels??[])Q.push(["t",J]);return{kind:1621,content:c.content,tags:Q,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function VM(c){return{kind:1622,content:c.content,tags:[["a",qM(c.ownerHex,c.repoId)],["e",c.issueId,"","root"],["p",c.ownerHex]],created_at:c.createdAt??Math.floor(Date.now()/1000)}}async function UW(c,$){let Q=await $(c.url,{method:c.method,headers:c.headers,body:c.body}),J=await Q.text().catch(()=>"");if(!Q.ok){let Y=Q.headers.get("x-ratelimit-remaining");if((Q.status===403||Q.status===429)&&Y==="0"){let X=Q.headers.get("x-ratelimit-reset"),m=X?` (resets at ${new Date(Number(X)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${m} — try again shortly.`)}throw Error(`GitHub ${c.method} → ${Q.status}: ${J.slice(0,200)}`)}try{return J?JSON.parse(J):{}}catch{throw Error(`GitHub returned a non-JSON ${Q.status} body: ${J.slice(0,120)}`)}}class jW{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor(c){this.cfg=c;if(!c.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!iM(c.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${c.repo})`);this.fetchImpl=c.fetchImpl??fetch}async fetchIssue(c){let $=await UW(mM(this.cfg.repo,c,this.cfg.token),this.fetchImpl);return zM($)}async createIssue(c){let $=xM(await UW(WM(this.cfg.repo,this.cfg.token,c),this.fetchImpl));return{number:$.number,url:$.html_url??vW(this.cfg.repo,$.number),title:c.title}}async commentIssue(c,$){if(typeof c.number!=="number")return;await UW(GM(this.cfg.repo,c.number,this.cfg.token,$),this.fetchImpl)}}class KW{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor(c){this.cfg=c;if(!/^[0-9a-f]{64}$/i.test(c.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!c.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=c.submit??kY}fetchIssue(){return Promise.reject(Error("the buzz issue tracker addresses issues by event id, not number — `fig issue <N>` needs the github tracker"))}async createIssue(c){let $=MM({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:c.title,content:c.body??"",labels:c.labels}),Q=z8($,this.cfg.identity),J=await this.submit(this.cfg.relayUrl,this.cfg.identity,Q);if(!J.ok)throw Error(`relay rejected issue event: ${J.status} ${J.body.slice(0,200)}`);return{eventId:Q.id,url:`nostr:${Q.id}`,title:c.title}}async commentIssue(c,$){if(!c.eventId)return;let Q=VM({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:c.eventId,content:$}),J=z8(Q,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var SR=b.object({label:b.string().optional(),relayUrl:b.string(),privateKey:b.string(),figuraToken:b.string(),apiUrl:b.string().optional(),channels:b.array(b.string()),triggers:b.array(b.string()).optional(),device:b.string().optional(),platform:b.string().optional(),appOrigin:b.string().optional(),issueTracker:b.enum(["github","buzz"]).optional(),github:b.object({token:b.string(),repo:b.string()}).optional(),buzzRepo:b.object({ownerHex:b.string(),repoId:b.string()}).optional()});function AR(c,$){if(c.issueTracker==="github"&&c.github)return new jW({token:c.github.token,repo:c.github.repo});if(c.issueTracker==="buzz"&&c.buzzRepo)return new KW({relayUrl:c.relayUrl,identity:$,ownerHex:c.buzzRepo.ownerHex,repoId:c.buzzRepo.repoId});return null}class DW{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor(c){this.config=SR.parse(c),this.identity=xJ(this.config.privateKey),this.tracker=AR(this.config,this.identity),this.deliveryQueue=new qW(this.pendingReplies,{postReply:($)=>this.postReply($),log:($)=>this.log($)})}get npub(){return this.identity.npub}log(c){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${c}
534
- `)}postReply(c){let $=rq({channelId:c.channelId,content:c.content,replyTo:c.replyTo,mentions:c.mentions}),Q=z8($,this.identity);return kY(this.config.relayUrl,this.identity,Q)}deps(){return{identity:{pubkeyHex:this.identity.pubkeyHex,npub:this.identity.npub},triggers:this.config.triggers,tracker:this.tracker,generate:(c,$)=>XM({token:this.config.figuraToken,apiUrl:this.config.apiUrl,prompt:c,device:this.config.device,platform:this.config.platform,appOrigin:this.config.appOrigin,issue:$?.issue}),postReply:(c)=>this.postReply(c),seen:this.seen,pendingReplies:this.pendingReplies,log:(c)=>this.log(c)}}start(){let c=this.deps();if(this.log(`agent npub: ${this.identity.npub}`),this.log(`watching ${this.config.channels.length||"(all subscribed)"} channel(s) on ${this.config.relayUrl}`),this.tracker)this.log(`issue tracker: ${this.tracker.kind}`);this.watcher=new VW({relayUrl:this.config.relayUrl,identity:this.identity,channels:this.config.channels,onStatus:($)=>this.log($),onEvent:($)=>{this.queue=this.queue.then(()=>sq($,c)).then((Q)=>{if(Q.action==="delivery-failed"&&this.pendingReplies.has($.id))this.deliveryQueue.start($.id)}).catch((Q)=>this.log(`handler error: ${String(Q)}`))}}),this.watcher.start()}stop(){this.deliveryQueue.stop(),this.watcher?.close()}}function CR(c){let $={label:r8(c),relayUrl:c.relayUrl,privateKey:c.privateKey,figuraToken:c.figuraToken,apiUrl:c.apiUrl,channels:c.channels,appOrigin:c.appOrigin,device:c.device,platform:c.platform,issueTracker:c.tracker?.kind};if(c.triggers&&c.triggers.length)$.triggers=c.triggers;if(c.tracker?.kind==="github")$.github={token:c.tracker.token??"",repo:c.tracker.repo??""};if(c.tracker?.kind==="buzz")$.buzzRepo={ownerHex:c.tracker.ownerHex??"",repoId:c.tracker.repoId??""};return $}class BW{bindings;agentFactory;log;running=[];constructor(c,$={}){this.bindings=c;this.agentFactory=$.agentFactory??((Q)=>new DW(CR(Q))),this.log=$.log??((Q)=>process.stderr.write(`${Q}
535
- `))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let c of this.bindings){let $=r8(c);try{let Q=this.agentFactory(c);Q.start(),this.running.push({label:$,agent:Q})}catch(Q){this.log(`[${$}] failed to start: ${Q instanceof Error?Q.message:String(Q)}`)}}this.log(`[supervisor] ${this.running.length}/${this.bindings.length} binding(s) running`)}stop(){for(let{label:c,agent:$}of this.running)try{$.stop()}catch(Q){this.log(`[${c}] error on stop: ${Q instanceof Error?Q.message:String(Q)}`)}this.running.length=0}}var bR=`figura buzz — run a Figura agent inside one or more Buzz communities
538
+ ${vX({link:q.url??"(link unavailable)",title:q.title})}`;return await z(M,{action:"replied",via:W.via,kind:m.kind,link:q.url})}}}catch(x){let q=x instanceof Error?x.message:String(x);return Q(`request failed: ${q}`),await z(wQ(q),{action:"error-replied",reason:q})}}class rm{pending;opts;max;base;schedule;cancel;attempts=new Map;timers=new Map;active=new Set;constructor(c,$){this.pending=c;this.opts=$;this.max=$.maxAttempts??6,this.base=$.baseDelayMs??1000,this.schedule=$.schedule??((Q,J)=>setTimeout(Q,J)),this.cancel=$.cancel??((Q)=>clearTimeout(Q))}log(c){this.opts.log?.(c)}get inFlight(){return this.active.size}start(c){if(this.active.has(c))return;if(!this.pending.has(c))return;this.active.add(c),this.arm(c)}arm(c){let $=this.attempts.get(c)??0,Q=this.base*2**$,J=this.schedule(()=>{this.timers.delete(c),this.tick(c)},Q);this.timers.set(c,J)}finish(c){this.active.delete(c),this.attempts.delete(c);let $=this.timers.get(c);if($!==void 0)this.cancel($),this.timers.delete(c)}async tick(c){let $=this.pending.get(c);if(!$){this.finish(c);return}let Q=(this.attempts.get(c)??0)+1;this.attempts.set(c,Q);let J=!1;try{J=(await this.opts.postReply($.input))?.ok===!0}catch{J=!1}if(J){this.pending.delete(c),this.finish(c),this.log(`delivered pending reply for ${c} on retry ${Q}`);return}if(Q>=this.max){this.pending.delete(c),this.finish(c),this.log(`giving up on pending reply for ${c} after ${Q} attempts`);return}this.arm(c)}stop(){for(let c of this.timers.values())this.cancel(c);this.timers.clear(),this.attempts.clear(),this.active.clear()}}function iV(c){let $=[["h",c.channelId]];if(c.replyTo)$.push(["e",c.replyTo,"","reply"]);let Q=new Set;for(let J of c.mentions??[]){let Y=J.toLowerCase();if(Q.has(Y))continue;Q.add(Y),$.push(["p",Y])}return{kind:9,content:c.content,tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function vV(c){let $=[["u",c.url],["method",c.method],["nonce",c.nonce]];if(c.payloadSha256)$.push(["payload",c.payloadSha256]);return{kind:27235,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function UV(c){let $=[["relay",c.relayUrl],["challenge",c.challenge]];if(c.authTag)$.push(c.authTag);return{kind:22242,content:"",tags:$,created_at:c.createdAt??Math.floor(Date.now()/1000)}}var jV=/^[0-9a-f]{64}$/i,rI=/^[0-9a-f]{128}$/i,tI=E.object({id:E.string().regex(jV,"id must be 64-char hex"),pubkey:E.string().regex(jV,"pubkey must be 64-char hex"),sig:E.string().regex(rI,"sig must be 128-char hex"),kind:E.number().int(),created_at:E.number().int(),tags:E.array(E.array(E.string())),content:E.string()});function KV(c){let $=tI.safeParse(c);return $.success?$.data:null}function tm(c){return c.replace(/^https:\/\//,"wss://").replace(/^http:\/\//,"ws://")}function eI(c){return c.replace(/^wss:\/\//,"https://").replace(/^ws:\/\//,"http://")}function DV(c){return eI(c).replace(/\/+$/,"")}var cZ=(c)=>{try{return RJ(c)}catch{return!1}};async function $Z(){let c=globalThis;if(c.WebSocket)return c.WebSocket;return(await import("ws")).default}var BV="figura-buzz-agent",QZ=60,JZ=1e4;class em{opts;socket=null;closed=!1;since;reconnectAttempt=0;reconnectTimer=null;stabilityTimer=null;authEventId=null;authed=!1;verify;channelSet;constructor(c){this.opts=c;this.since=c.since??Math.floor(Date.now()/1000),this.verify=c.verifyEvent??cZ,this.channelSet=new Set(c.channels)}channelAllowed(c){if(this.channelSet.size===0)return!0;let $=c.tags.filter((Q)=>Q[0]==="h").map((Q)=>Q[1]);if($.length!==1||!this.channelSet.has($[0]))return this.status(`dropped event referencing a non-allowlisted channel (h=${JSON.stringify($)})`),!1;return!0}get cursor(){return this.since}ingest(c){this.handleMessage(c)}start(){this.connect().catch((c)=>this.status(`connect failed: ${String(c)}`))}close(){if(this.closed=!0,this.reconnectTimer)clearTimeout(this.reconnectTimer);this.clearStability();try{this.socket?.close()}catch{}}get backoffAttempt(){return this.reconnectAttempt}status(c){this.opts.onStatus?.(c)}async connect(){if(this.closed)return;let c=tm(this.opts.relayUrl),$;try{$=await $Z()}catch(J){this.status(`no WebSocket implementation: ${String(J)}`);return}this.authed=!1,this.authEventId=null;let Q;try{Q=new $(c)}catch(J){this.status(`failed to open ${c}: ${String(J)}`),this.scheduleReconnect();return}this.socket=Q,Q.onopen=()=>{this.status(`connected to ${c}`),this.armStability(),this.sendReq()},Q.onmessage=(J)=>this.handleMessage(this.decode(J.data)),Q.onerror=(J)=>this.status(`socket error: ${String(J)}`),Q.onclose=()=>{if(this.clearStability(),this.closed)return;this.status("socket closed — reconnecting"),this.scheduleReconnect()}}markUsable(){if(this.reconnectAttempt!==0)this.status("connection stable — backoff reset");this.reconnectAttempt=0}armStability(){this.clearStability(),this.stabilityTimer=setTimeout(()=>{this.stabilityTimer=null,this.markUsable()},JZ)}clearStability(){if(this.stabilityTimer)clearTimeout(this.stabilityTimer),this.stabilityTimer=null}decode(c){if(typeof c==="string")return c;if(c instanceof Uint8Array)return new TextDecoder().decode(c);return String(c)}send(c){try{this.socket?.send(JSON.stringify(c))}catch($){this.status(`send failed: ${String($)}`)}}sendReq(){let c={kinds:[9],since:this.since};if(this.opts.channels.length>0)c["#h"]=this.opts.channels;this.send(["REQ",BV,c])}handleMessage(c){let $;try{$=JSON.parse(c)}catch{return}if(!Array.isArray($)||typeof $[0]!=="string")return;switch($[0]){case"AUTH":if(typeof $[1]==="string")this.respondToAuth($[1]);break;case"OK":if($[1]===this.authEventId&&$[2]===!0&&!this.authed)this.authed=!0,this.status("authenticated (NIP-42)"),this.markUsable(),this.sendReq();break;case"EOSE":if($[1]===BV)this.markUsable();break;case"EVENT":{let J=KV($[2]);if(!J){this.status("dropped malformed event");break}if(!this.verify(J)){this.status(`dropped event with invalid signature (pubkey ${J.pubkey.slice(0,12)}…)`);break}if(J.kind===9&&this.channelAllowed(J)){if(J.created_at<this.since){this.status("dropped replayed event at/below the resume cursor");break}let Y=Math.floor(Date.now()/1000)+QZ;if(J.created_at<=Y)this.since=J.created_at;this.opts.onEvent(J)}break}case"CLOSED":this.status(`subscription closed: ${String($[2]??"")}`);break;case"NOTICE":this.status(`relay notice: ${String($[1]??"")}`);break;default:break}}respondToAuth(c){let $=UV({challenge:c,relayUrl:tm(this.opts.relayUrl)}),Q=v8($,this.opts.identity);this.authEventId=Q.id,this.send(["AUTH",Q])}scheduleReconnect(){if(this.closed)return;if(this.reconnectTimer)clearTimeout(this.reconnectTimer);this.reconnectAttempt+=1;let c=Math.min(30000,500*2**(this.reconnectAttempt-1)),$=Math.floor(Math.random()*250);this.reconnectTimer=setTimeout(()=>void this.connect(),c+$)}}function YZ(c){let $=globalThis;if($.Buffer)return $.Buffer.from(c).toString("base64");let Q="";for(let J of c)Q+=String.fromCharCode(J);return btoa(Q)}function HV(c){return`Nostr ${YZ(new TextEncoder().encode(c))}`}function XZ(c,$,Q,J){let Y=vV({method:$,url:Q,nonce:WV(),payloadSha256:J?XV(J):void 0}),X=v8(Y,c);return HV(JSON.stringify(X))}async function jX(c,$,Q,J={}){let Y=J.fetchImpl??fetch,X=`${DV(c)}/events`,W=JSON.stringify(Q),m={ok:!1,status:0,body:""};for(let G=0;G<2;G++){let z=XZ($,"POST",X,W),x;try{x=await Y(X,{method:"POST",headers:{Authorization:z,"Content-Type":"application/json"},body:W})}catch(M){m={ok:!1,status:0,body:M instanceof Error?M.message:String(M)};continue}let q=await x.text().catch(()=>"");if(m={ok:x.ok,status:x.status,body:q},x.ok)return m;if(x.status!==429&&x.status<500)return m}return m}v0();var WZ=E.object({id:E.string(),publicId:E.string().nullish(),url:E.string().nullish(),title:E.string().optional(),slug:E.string().optional(),isPublic:E.boolean().optional()});async function OV(c){let $={prompt:c.prompt,publish:!0};if(c.device)$.device=c.device;if(c.platform)$.platform=c.platform;if(typeof c.issue==="number")$.issue=c.issue;let Q=await Wc("/v1/figs/generate",{method:"POST",body:$,token:c.token,apiUrl:c.apiUrl,source:"buzz-agent"}),J=WZ.safeParse(Q);if(!J.success)throw Error("unexpected response from the Figura engine (fig generation).");let Y=J.data,X=Y.publicId??null,W=Y.url??(X?MV(X,c.appOrigin):null);return{id:Y.id,publicId:X,url:W,title:Y.title||Y.slug||"Untitled fig"}}var mZ=E.object({number:E.number().int(),title:E.string().default(""),body:E.string().nullish(),html_url:E.string().optional(),state:E.string().optional(),labels:E.array(E.union([E.string(),E.object({name:E.string().optional()})])).optional()}),GZ=E.object({number:E.number().int(),html_url:E.string().optional()}),cG="https://api.github.com";function $G(c){return{Authorization:`Bearer ${c}`,Accept:"application/vnd.github+json","X-GitHub-Api-Version":"2022-11-28","User-Agent":"figura-buzz-agent"}}function QG(c,$){return`https://github.com/${c}/issues/${$}`}function RV(c,$,Q){return{method:"GET",url:`${cG}/repos/${c}/issues/${$}`,headers:$G(Q)}}function pV(c,$,Q){let J={title:Q.title};if(Q.body)J.body=Q.body;if(Q.labels&&Q.labels.length)J.labels=Q.labels;return{method:"POST",url:`${cG}/repos/${c}/issues`,headers:{...$G($),"Content-Type":"application/json"},body:JSON.stringify(J)}}function IV(c,$,Q,J){return{method:"POST",url:`${cG}/repos/${c}/issues/${$}/comments`,headers:{...$G(Q),"Content-Type":"application/json"},body:JSON.stringify({body:J})}}function ZV(c){let $=mZ.safeParse(c);if(!$.success)throw Error(`unexpected GitHub issue response: ${$.error.issues.map((Y)=>`${Y.path.join(".")||"(root)"} ${Y.message}`).join("; ")}`);let Q=$.data,J=(Q.labels??[]).map((Y)=>typeof Y==="string"?Y:Y.name??"").filter((Y)=>Boolean(Y));return{number:Q.number,title:Q.title,body:Q.body??"",labels:J,url:Q.html_url??QG("",Q.number),state:Q.state}}function LV(c){let $=GZ.safeParse(c);if(!$.success)throw Error(`unexpected GitHub create response: ${$.error.issues.map((Q)=>`${Q.path.join(".")||"(root)"} ${Q.message}`).join("; ")}`);return $.data}function _V(c){return/^[^/\s]+\/[^/\s]+$/.test(c)}function SV(c,$){return`30617:${c}:${$}`}function AV(c){let $=c.subject.trim();if(!$)throw Error("issue subject must not be empty");let Q=[["a",SV(c.ownerHex,c.repoId)],["p",c.ownerHex]];for(let J of c.recipients??[])Q.push(["p",J]);Q.push(["subject",$]);for(let J of c.labels??[])Q.push(["t",J]);return{kind:1621,content:c.content,tags:Q,created_at:c.createdAt??Math.floor(Date.now()/1000)}}function CV(c){return{kind:1622,content:c.content,tags:[["a",SV(c.ownerHex,c.repoId)],["e",c.issueId,"","root"],["p",c.ownerHex]],created_at:c.createdAt??Math.floor(Date.now()/1000)}}async function JG(c,$){let Q=await $(c.url,{method:c.method,headers:c.headers,body:c.body}),J=await Q.text().catch(()=>"");if(!Q.ok){let Y=Q.headers.get("x-ratelimit-remaining");if((Q.status===403||Q.status===429)&&Y==="0"){let X=Q.headers.get("x-ratelimit-reset"),W=X?` (resets at ${new Date(Number(X)*1000).toISOString()})`:"";throw Error(`GitHub rate limit hit${W} — try again shortly.`)}throw Error(`GitHub ${c.method} → ${Q.status}: ${J.slice(0,200)}`)}try{return J?JSON.parse(J):{}}catch{throw Error(`GitHub returned a non-JSON ${Q.status} body: ${J.slice(0,120)}`)}}class YG{cfg;kind="github";supportsNumericFetch=!0;fetchImpl;constructor(c){this.cfg=c;if(!c.token)throw Error("GITHUB_TOKEN is required for the github issue tracker");if(!_V(c.repo))throw Error(`GITHUB_REPO must be owner/repo (got: ${c.repo})`);this.fetchImpl=c.fetchImpl??fetch}async fetchIssue(c){let $=await JG(RV(this.cfg.repo,c,this.cfg.token),this.fetchImpl);return ZV($)}async createIssue(c){let $=LV(await JG(pV(this.cfg.repo,this.cfg.token,c),this.fetchImpl));return{number:$.number,url:$.html_url??QG(this.cfg.repo,$.number),title:c.title}}async commentIssue(c,$){if(typeof c.number!=="number")return;await JG(IV(this.cfg.repo,c.number,this.cfg.token,$),this.fetchImpl)}}class XG{cfg;kind="buzz";supportsNumericFetch=!1;submit;constructor(c){this.cfg=c;if(!/^[0-9a-f]{64}$/i.test(c.ownerHex))throw Error("BUZZ_REPO_OWNER must be a 64-char hex pubkey");if(!c.repoId)throw Error("BUZZ_REPO_ID is required for the buzz issue tracker");this.submit=c.submit??jX}fetchIssue(){return Promise.reject(Error("the buzz issue tracker addresses issues by event id, not number — `fig issue <N>` needs the github tracker"))}async createIssue(c){let $=AV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,subject:c.title,content:c.body??"",labels:c.labels}),Q=v8($,this.cfg.identity),J=await this.submit(this.cfg.relayUrl,this.cfg.identity,Q);if(!J.ok)throw Error(`relay rejected issue event: ${J.status} ${J.body.slice(0,200)}`);return{eventId:Q.id,url:`nostr:${Q.id}`,title:c.title}}async commentIssue(c,$){if(!c.eventId)return;let Q=CV({ownerHex:this.cfg.ownerHex,repoId:this.cfg.repoId,issueId:c.eventId,content:$}),J=v8(Q,this.cfg.identity),Y=await this.submit(this.cfg.relayUrl,this.cfg.identity,J);if(!Y.ok)throw Error(`relay rejected issue comment: ${Y.status} ${Y.body.slice(0,200)}`)}}var zZ=E.object({label:E.string().optional(),relayUrl:E.string(),privateKey:E.string(),figuraToken:E.string(),apiUrl:E.string().optional(),channels:E.array(E.string()),triggers:E.array(E.string()).optional(),device:E.string().optional(),platform:E.string().optional(),appOrigin:E.string().optional(),issueTracker:E.enum(["github","buzz"]).optional(),github:E.object({token:E.string(),repo:E.string()}).optional(),buzzRepo:E.object({ownerHex:E.string(),repoId:E.string()}).optional()});function xZ(c,$){if(c.issueTracker==="github"&&c.github)return new YG({token:c.github.token,repo:c.github.repo});if(c.issueTracker==="buzz"&&c.buzzRepo)return new XG({relayUrl:c.relayUrl,identity:$,ownerHex:c.buzzRepo.ownerHex,repoId:c.buzzRepo.repoId});return null}class WG{identity;tracker;seen=new Set;pendingReplies=new Map;deliveryQueue;watcher=null;queue=Promise.resolve();config;constructor(c){this.config=zZ.parse(c),this.identity=pJ(this.config.privateKey),this.tracker=xZ(this.config,this.identity),this.deliveryQueue=new rm(this.pendingReplies,{postReply:($)=>this.postReply($),log:($)=>this.log($)})}get npub(){return this.identity.npub}log(c){process.stderr.write(`[${this.config.label??"buzz-agent"}] ${c}
539
+ `)}postReply(c){let $=iV({channelId:c.channelId,content:c.content,replyTo:c.replyTo,mentions:c.mentions}),Q=v8($,this.identity);return jX(this.config.relayUrl,this.identity,Q)}deps(){return{identity:{pubkeyHex:this.identity.pubkeyHex,npub:this.identity.npub},triggers:this.config.triggers,tracker:this.tracker,generate:(c,$)=>OV({token:this.config.figuraToken,apiUrl:this.config.apiUrl,prompt:c,device:this.config.device,platform:this.config.platform,appOrigin:this.config.appOrigin,issue:$?.issue}),postReply:(c)=>this.postReply(c),seen:this.seen,pendingReplies:this.pendingReplies,log:(c)=>this.log(c)}}start(){let c=this.deps();if(this.log(`agent npub: ${this.identity.npub}`),this.log(`watching ${this.config.channels.length||"(all subscribed)"} channel(s) on ${this.config.relayUrl}`),this.tracker)this.log(`issue tracker: ${this.tracker.kind}`);this.watcher=new em({relayUrl:this.config.relayUrl,identity:this.identity,channels:this.config.channels,onStatus:($)=>this.log($),onEvent:($)=>{this.queue=this.queue.then(()=>wV($,c)).then((Q)=>{if(Q.action==="delivery-failed"&&this.pendingReplies.has($.id))this.deliveryQueue.start($.id)}).catch((Q)=>this.log(`handler error: ${String(Q)}`))}}),this.watcher.start()}stop(){this.deliveryQueue.stop(),this.watcher?.close()}}function qZ(c){let $={label:G$(c),relayUrl:c.relayUrl,privateKey:c.privateKey,figuraToken:c.figuraToken,apiUrl:c.apiUrl,channels:c.channels,appOrigin:c.appOrigin,device:c.device,platform:c.platform,issueTracker:c.tracker?.kind};if(c.triggers&&c.triggers.length)$.triggers=c.triggers;if(c.tracker?.kind==="github")$.github={token:c.tracker.token??"",repo:c.tracker.repo??""};if(c.tracker?.kind==="buzz")$.buzzRepo={ownerHex:c.tracker.ownerHex??"",repoId:c.tracker.repoId??""};return $}class mG{bindings;agentFactory;log;running=[];constructor(c,$={}){this.bindings=c;this.agentFactory=$.agentFactory??((Q)=>new WG(qZ(Q))),this.log=$.log??((Q)=>process.stderr.write(`${Q}
540
+ `))}get startedCount(){return this.running.length}start(){this.log(`[supervisor] starting ${this.bindings.length} binding(s)`);for(let c of this.bindings){let $=G$(c);try{let Q=this.agentFactory(c);Q.start(),this.running.push({label:$,agent:Q})}catch(Q){this.log(`[${$}] failed to start: ${Q instanceof Error?Q.message:String(Q)}`)}}this.log(`[supervisor] ${this.running.length}/${this.bindings.length} binding(s) running`)}stop(){for(let{label:c,agent:$}of this.running)try{$.stop()}catch(Q){this.log(`[${c}] error on stop: ${Q instanceof Error?Q.message:String(Q)}`)}this.running.length=0}}var NZ=`figura buzz — run a Figura agent inside one or more Buzz communities
536
541
 
537
542
  Usage:
538
543
  figura buzz agent [options] Connect + watch channels, fig on request
@@ -575,14 +580,14 @@ Trigger grammar (in a watched channel):
575
580
  @figura file issue: <title> File a new tracker issue.
576
581
  @figura fig this and file it: <desc>
577
582
  File an issue AND fig it, cross-linked.
578
- `;function NM(c,$){let Q=[];for(let J=0;J<c.length;J++)if(c[J]===`--${$}`&&c[J+1])Q.push(c[J+1]);return Q}function wM(c){return(c??"").split(",").map(($)=>$.trim()).filter(Boolean)}async function vM(c){let{flags:$}=r(c),Q=f($,"config"),J=process.env.BUZZ_AGENTS_JSON;if(Q&&J)I("both --config and BUZZ_AGENTS_JSON are set — pass exactly one bindings source.");if(Q){let Y;try{Y=await PR(Q,"utf8")}catch(X){I(`could not read --config ${Q}: ${X instanceof Error?X.message:String(X)}`)}return{raw:Y,source:`--config ${Q}`}}if(J)return{raw:J,source:"BUZZ_AGENTS_JSON"};return null}function ER(c){let{flags:$}=r(c);return Boolean(process.env.BUZZ_RELAY_URL||process.env.BUZZ_PRIVATE_KEY||process.env.BUZZ_CHANNELS||f($,"relay")||f($,"key"))}async function FR(c){let{flags:$}=r(c),Q=f($,"relay")||process.env.BUZZ_RELAY_URL||"";if(!Q)I("BUZZ_RELAY_URL (or --relay) is required.");let J=f($,"key")||process.env.BUZZ_PRIVATE_KEY||"";if(!J)I("BUZZ_PRIVATE_KEY (or --key) is required.");let Y=await j0({tokenFlag:f($,"token"),apiUrlFlag:f($,"api-url")}),X=Y.token;if(!X)I("FIGURA_TOKEN (or --token / `figura login`) is required — it binds figs to the team brand.");let m=[...NM(c,"channel"),...wM(process.env.BUZZ_CHANNELS)],W=NM(c,"trigger"),G=W.length?W:wM(process.env.BUZZ_TRIGGERS),z=(process.env.FIGURA_ISSUE_TRACKER||"").trim().toLowerCase();if(z&&z!=="github"&&z!=="buzz")I(`FIGURA_ISSUE_TRACKER must be "github" or "buzz" (got: ${process.env.FIGURA_ISSUE_TRACKER}).`);let x=process.env.GITHUB_REPO,i=process.env.GITHUB_TOKEN,q=process.env.BUZZ_REPO_OWNER,M=process.env.BUZZ_REPO_ID,N,v=z==="github"||z==="buzz"?z:x?"github":q&&M?"buzz":void 0;if(v==="github")N={kind:"github",token:i??"",repo:x??""};else if(v==="buzz")N={kind:"buzz",ownerHex:q??"",repoId:M??""};let U={relayUrl:Q,privateKey:J,figuraToken:X,channels:m};if(G.length)U.triggers=G;if(Y.apiUrl)U.apiUrl=Y.apiUrl;if(process.env.FIGURA_APP_URL)U.appOrigin=process.env.FIGURA_APP_URL;let w=f($,"device")||process.env.BUZZ_FIG_DEVICE;if(w)U.device=w;let j=f($,"platform")||process.env.BUZZ_FIG_PLATFORM;if(j)U.platform=j;if(N)U.tracker=N;let D=x6(U);if(D.length)I(`invalid configuration (check the BUZZ_*/FIGURA_*/GITHUB_* env + flags):
583
+ `;function PV(c,$){let Q=[];for(let J=0;J<c.length;J++)if(c[J]===`--${$}`&&c[J+1])Q.push(c[J+1]);return Q}function EV(c){return(c??"").split(",").map(($)=>$.trim()).filter(Boolean)}async function bV(c){let{flags:$}=t(c),Q=f($,"config"),J=process.env.BUZZ_AGENTS_JSON;if(Q&&J)I("both --config and BUZZ_AGENTS_JSON are set — pass exactly one bindings source.");if(Q){let Y;try{Y=await MZ(Q,"utf8")}catch(X){I(`could not read --config ${Q}: ${X instanceof Error?X.message:String(X)}`)}return{raw:Y,source:`--config ${Q}`}}if(J)return{raw:J,source:"BUZZ_AGENTS_JSON"};return null}function VZ(c){let{flags:$}=t(c);return Boolean(process.env.BUZZ_RELAY_URL||process.env.BUZZ_PRIVATE_KEY||process.env.BUZZ_CHANNELS||f($,"relay")||f($,"key"))}async function wZ(c){let{flags:$}=t(c),Q=f($,"relay")||process.env.BUZZ_RELAY_URL||"";if(!Q)I("BUZZ_RELAY_URL (or --relay) is required.");let J=f($,"key")||process.env.BUZZ_PRIVATE_KEY||"";if(!J)I("BUZZ_PRIVATE_KEY (or --key) is required.");let Y=await W0({tokenFlag:f($,"token"),apiUrlFlag:f($,"api-url")}),X=Y.token;if(!X)I("FIGURA_TOKEN (or --token / `figura login`) is required — it binds figs to the team brand.");let W=[...PV(c,"channel"),...EV(process.env.BUZZ_CHANNELS)],m=PV(c,"trigger"),G=m.length?m:EV(process.env.BUZZ_TRIGGERS),z=(process.env.FIGURA_ISSUE_TRACKER||"").trim().toLowerCase();if(z&&z!=="github"&&z!=="buzz")I(`FIGURA_ISSUE_TRACKER must be "github" or "buzz" (got: ${process.env.FIGURA_ISSUE_TRACKER}).`);let x=process.env.GITHUB_REPO,q=process.env.GITHUB_TOKEN,M=process.env.BUZZ_REPO_OWNER,N=process.env.BUZZ_REPO_ID,w,U=z==="github"||z==="buzz"?z:x?"github":M&&N?"buzz":void 0;if(U==="github")w={kind:"github",token:q??"",repo:x??""};else if(U==="buzz")w={kind:"buzz",ownerHex:M??"",repoId:N??""};let v={relayUrl:Q,privateKey:J,figuraToken:X,channels:W};if(G.length)v.triggers=G;if(Y.apiUrl)v.apiUrl=Y.apiUrl;if(process.env.FIGURA_APP_URL)v.appOrigin=process.env.FIGURA_APP_URL;let i=f($,"device")||process.env.BUZZ_FIG_DEVICE;if(i)v.device=i;let j=f($,"platform")||process.env.BUZZ_FIG_PLATFORM;if(j)v.platform=j;if(w)v.tracker=w;let D=Lq(v);if(D.length)I(`invalid configuration (check the BUZZ_*/FIGURA_*/GITHUB_* env + flags):
579
584
  ${D.join(`
580
- `)}`);return U}async function TR(c){let $=await vM(c);if($){if(ER(c))I(`a bindings config (${$.source}) and flat BUZZ_RELAY_URL/BUZZ_PRIVATE_KEY are both set — `+"use one or the other (the config is not merged with the flat env).");return k9($.raw,{source:$.source,onWarn:(Q)=>process.stderr.write(`[supervisor] warning: ${Q}
581
- `)})}return[await FR(c)]}async function fR(c){let $=await TR(c),Q=new BW($);Q.start();let J=()=>{process.stderr.write(`
585
+ `)}`);return v}async function iZ(c){let $=await bV(c);if($){if(VZ(c))I(`a bindings config (${$.source}) and flat BUZZ_RELAY_URL/BUZZ_PRIVATE_KEY are both set — `+"use one or the other (the config is not merged with the flat env).");return ZW($.raw,{source:$.source,onWarn:(Q)=>process.stderr.write(`[supervisor] warning: ${Q}
586
+ `)})}return[await wZ(c)]}async function vZ(c){let $=await iZ(c),Q=new mG($);Q.start();let J=()=>{process.stderr.write(`
582
587
  [supervisor] shutting down
583
- `),Q.stop(),process.exit(0)};process.on("SIGINT",J),process.on("SIGTERM",J),await new Promise(()=>{})}async function nR(c){let $=await vM(c);if($){let J=k9($.raw,$.source);for(let Y of J){let X=xJ(Y.privateKey);process.stdout.write(`${r8(Y)} ${X.npub}
584
- `)}return}let Q=process.env.BUZZ_PRIVATE_KEY;if(!Q)I("BUZZ_PRIVATE_KEY is required to derive the agent npub.");process.stdout.write(`${xJ(Q).npub}
585
- `)}async function UM(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(bR);return}switch($){case"agent":return fR(Q);case"whoami":return nR(Q);default:I(`unknown buzz subcommand '${$}'. Run \`figura buzz --help\`.`)}}var uR=i0(),aR=new Set(["upgrade","update","doctor","hook","mcp"]),kR=`figura — command-line client for the Figura visualization SaaS
588
+ `),Q.stop(),process.exit(0)};process.on("SIGINT",J),process.on("SIGTERM",J),await new Promise(()=>{})}async function UZ(c){let $=await bV(c);if($){let J=ZW($.raw,$.source);for(let Y of J){let X=pJ(Y.privateKey);process.stdout.write(`${G$(Y)} ${X.npub}
589
+ `)}return}let Q=process.env.BUZZ_PRIVATE_KEY;if(!Q)I("BUZZ_PRIVATE_KEY is required to derive the agent npub.");process.stdout.write(`${pJ(Q).npub}
590
+ `)}async function FV(c){let $=c[0],Q=c.slice(1);if(!$||$==="--help"||$==="-h"||$==="help"){process.stdout.write(NZ);return}switch($){case"agent":return vZ(Q);case"whoami":return UZ(Q);default:I(`unknown buzz subcommand '${$}'. Run \`figura buzz --help\`.`)}}MY();i0();b$();var jZ=f0(),KZ=new Set(["upgrade","update","doctor","hook","mcp"]),DZ=`figura — command-line client for the Figura visualization SaaS
586
591
 
587
592
  Usage:
588
593
  figura <command> [options]
@@ -620,8 +625,8 @@ Global options:
620
625
  --help, -h Show help
621
626
  --version, -v Show version
622
627
 
623
- Run \`figura <command> --help\` for command-specific help.`;async function lR(){let c=process.argv.slice(2),$=c[0],Q=c.slice(1);if(!$||$==="help"||$==="--help"||$==="-h"){process.stdout.write(kR+`
624
- `);return}if($==="--version"||$==="-v"||$==="version"){process.stdout.write(uR+`
625
- `);return}if(!aR.has($)){let{apiUrl:J}=await j0({apiUrlFlag:f(r(Q).flags,"api-url")});await e5(c,J)}switch($){case"login":return E9(Q);case"link":return E9([...Q,"--project"]);case"whoami":return Zx(Q);case"brand":return Sx(Q);case"teams":return Ax(Q);case"fig":return fx(Q);case"comment":return nx(Q);case"token":return ux(Q);case"sources":return kx(Q);case"install":return Lx(Q);case"skill":return Vx(Q);case"mcp":return lx(Q);case"buzz":return UM(Q);case"doctor":return yx(Q);case"hook":return Kx(Q);case"statusline":return Hx(Q);case"upgrade":case"update":return hx(Q);default:process.stderr.write(`figura: unknown command '${$}'. Run \`figura --help\`.
626
- `),process.exit(1)}}lR().catch((c)=>{process.stderr.write(`figura: ${y(c)}
628
+ Run \`figura <command> --help\` for command-specific help.`;async function BZ(){let c=process.argv.slice(2),$=c[0],Q=c.slice(1);if(!$||$==="help"||$==="--help"||$==="-h"){process.stdout.write(DZ+`
629
+ `);return}if($==="--version"||$==="-v"||$==="version"){process.stdout.write(jZ+`
630
+ `);return}if(!KZ.has($)){let{apiUrl:J}=await W0({apiUrlFlag:f(t(Q).flags,"api-url")});await V6(c,J)}switch($){case"login":return DW(Q);case"link":return DW([...Q,"--project"]);case"whoami":return y6(Q);case"brand":return g6(Q);case"teams":return d6(Q);case"fig":return Qq(Q);case"comment":return Jq(Q);case"token":return Yq(Q);case"sources":return Wq(Q);case"install":return h6(Q);case"skill":return S6(Q);case"mcp":return mq(Q);case"buzz":return FV(Q);case"doctor":return qq(Q);case"hook":return F6(Q);case"statusline":return n6(Q);case"upgrade":case"update":return Gq(Q);default:process.stderr.write(`figura: unknown command '${$}'. Run \`figura --help\`.
631
+ `),process.exit(1)}}BZ().catch((c)=>{process.stderr.write(`figura: ${y(c)}
627
632
  `),process.exit(1)});