1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[702],{1837:function(e,t,r){var i=r(82909).Buffer;(function(){var t,n,s=[].splice,o=function(e,t){if(!(e instanceof t))throw Error("Bound instance method accessed before binding")},a=[].indexOf;n=r(31203),t=r(69319).EventEmitter,e.exports=(function(){class e extends t{constructor(e={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.getStats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=e,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(e=>{var t;t=this[e],this[e]=function(...e){var r,i,n;if(i=e,[...e]=i,[r]=s.call(e,-1),"function"!=typeof r)return t(...e,r);try{n=t(...e),r(null,n)}catch(e){r(e)}}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData();return}get(t){var r;if(o(this,e),null!=(r=this._isInvalidKey(t)))throw r;return null!=this.data[t]&&this._check(t,this.data[t])?(this.stats.hits++,this._unwrap(this.data[t])):void this.stats.misses++}mget(t){var r,i,n,s,a;if(o(this,e),!Array.isArray(t))throw this._error("EKEYSTYPE");for(i=0,a={},s=t.length;i<s;i++){if(n=t[i],null!=(r=this._isInvalidKey(n)))throw r;null!=this.data[n]&&this._check(n,this.data[n])?(this.stats.hits++,a[n]=this._unwrap(this.data[n])):this.stats.misses++}return a}set(t,r,i){var n,s;if(o(this,e),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw this._error("ECACHEFULL");if(this.options.forceString,null==i&&(i=this.options.stdTTL),null!=(n=this._isInvalidKey(t)))throw n;return s=!1,this.data[t]&&(s=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[t],!1))),this.data[t]=this._wrap(r,i),this.stats.vsize+=this._getValLength(r),!s&&(this.stats.ksize+=this._getKeyLength(t),this.stats.keys++),this.emit("set",t,r),!0}mset(t){var r,i,n,s,a,l,c,u,h;if(o(this,e),this.options.maxKeys>-1&&this.stats.keys+t.length>=this.options.maxKeys)throw this._error("ECACHEFULL");for(i=0,l=t.length;i<l;i++){if(a=t[i],{key:s,val:h,ttl:u}=a,u&&"number"!=typeof u)throw this._error("ETTLTYPE");if(null!=(r=this._isInvalidKey(s)))throw r}for(n=0,c=t.length;n<c;n++)a=t[n],({key:s,val:h,ttl:u}=a),this.set(s,h,u);return!0}del(t){var r,i,n,s,a,l;for(o(this,e),Array.isArray(t)||(t=[t]),r=0,n=0,a=t.length;n<a;n++){if(s=t[n],null!=(i=this._isInvalidKey(s)))throw i;null!=this.data[s]&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[s],!1)),this.stats.ksize-=this._getKeyLength(s),this.stats.keys--,r++,l=this.data[s],delete this.data[s],this.emit("del",s,l.v))}return r}take(t){var r;return o(this,e),null!=(r=this.get(t))&&this.del(t),r}ttl(t,r){var i;if(o(this,e),r||(r=this.options.stdTTL),!t)return!1;if(null!=(i=this._isInvalidKey(t)))throw i;return!!(null!=this.data[t]&&this._check(t,this.data[t]))&&(r>=0?this.data[t]=this._wrap(this.data[t].v,r,!1):this.del(t),!0)}getTtl(t){var r;if(o(this,e),t){if(null!=(r=this._isInvalidKey(t)))throw r;return null!=this.data[t]&&this._check(t,this.data[t])?this.data[t].t:void 0}}keys(){return o(this,e),Object.keys(this.data)}has(t){return o(this,e),null!=this.data[t]&&this._check(t,this.data[t])}getStats(){return o(this,e),this.stats}flushAll(t=!0){o(this,e),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0}
1,this._killCheckPeriod(),this._checkData(t),this.emit("flush")}flushStats(){o(this,e),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){o(this,e),this._killCheckPeriod()}_checkData(t=!0){var r,i,n;for(r in o(this,e),i=this.data)n=i[r],this._check(r,n);t&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,1e3*this.options.checkperiod,t),null!=this.checkTimeout&&null!=this.checkTimeout.unref&&this.checkTimeout.unref())}_killCheckPeriod(){if(null!=this.checkTimeout)return clearTimeout(this.checkTimeout)}_check(t,r){var i;return o(this,e),i=!0,0!==r.t&&r.t<Date.now()&&(this.options.deleteOnExpire&&(i=!1,this.del(t)),this.emit("expired",t,this._unwrap(r))),i}_isInvalidKey(t){var r;if(o(this,e),r=typeof t,0>a.call(this.validKeyTypes,r))return this._error("EKEYTYPE",{type:typeof t})}_wrap(t,r,i=!0){var s;return o(this,e),this.options.useClones||(i=!1),s=Date.now(),{t:0===r?0:r?s+1e3*r:0===this.options.stdTTL?this.options.stdTTL:s+1e3*this.options.stdTTL,v:i?n(t):t}}_unwrap(e,t=!0){if(this.options.useClones||(t=!1),null!=e.v)if(t)return n(e.v);else return e.v;return null}_getKeyLength(e){return e.toString().length}_getValLength(t){if(o(this,e),"string"==typeof t)return t.length;if(this.options.forceString)return JSON.stringify(t).length;if(Array.isArray(t))return this.options.arrayValueSize*t.length;if("number"==typeof t)return 8;if("function"==typeof(null!=t?t.then:void 0))return this.options.promiseValueSize;else if(null!=i?i.isBuffer(t):void 0)return t.length;else if(null!=t&&"object"==typeof t)return this.options.objectValueSize*Object.keys(t).length;else if("boolean"==typeof t)return 8;else return 0}_error(t,r={}){var i;return o(this,e),(i=Error()).name=t,i.errorcode=t,i.message=null!=this.ERRORS[t]?this.ERRORS[t](r):"-",i.data=r,i}_initErrors(){var t,r,i;for(r in o(this,e),this.ERRORS={},i=this._ERRORS)t=i[r],this.ERRORS[r]=this.createErrorMessage(t)}createErrorMessage(e){return function(t){return e.replace("__key",t.type)}}}return e.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},e}).call(this)}).call(this)},2848:(e,t,r)=>{"use strict";r.d(t,{AG:()=>o,BE:()=>f,ED:()=>a,Gv:()=>b,KQ:()=>y,MF:()=>i,OR:()=>_,R7:()=>c,Wn:()=>E,Zh:()=>d,Zp:()=>x,_F:()=>p,f_:()=>v,ft:()=>w,gJ:()=>u,iO:()=>h,jN:()=>S,lx:()=>s,tS:()=>l,un:()=>C,vY:()=>n,wS:()=>m,yv:()=>g,zP:()=>T});let i="12.27.0",n="2025-05-05",s=0x10000000,o=4194304e3,a=5e4,l=8388608,c=4194304,u=5,h="https://storage.azure.com/.default",d={Parameters:{FORCE_BROWSER_NO_CACHE:"_",SIGNATURE:"sig",SNAPSHOT:"snapshot",VERSIONID:"versionid",TIMEOUT:"timeout"}},p={HTTP_ACCEPTED:202,HTTP_CONFLICT:409,HTTP_NOT_FOUND:404,HTTP_PRECON_FAILED:412,HTTP_RANGE_NOT_SATISFIABLE:416},f={AUTHORIZATION:"Authorization",AUTHORIZATION_SCHEME:"Bearer",CONTENT_ENCODING:"Content-Encoding",CONTENT_ID:"Content-ID",CONTENT_LANGUAGE:"Content-Language",CONTENT_LENGTH:"Content-Length",CONTENT_MD5:"Content-Md5",CONTENT_TRANSFER_ENCODING:"Content-Transfer-Encoding",CONTENT_TYPE:"Content-Type",COOKIE:"Cookie",DATE:"date",IF_MATCH:"if-match",IF_MODIFIED_SINCE:"if-modified-since",IF_NONE_MATCH:"if-none-match",IF_UNMODIFIED_SINCE:"if-unmodified-since",PREFIX_FOR_STORAGE:"x-ms-",RANGE:"Range",USER_AGENT:"User-Agent",X_MS_CLIENT_REQUEST_ID:"x-ms-client-request-id",X_MS_COPY_SOURCE:"x-ms-copy-source",X_MS_DATE:"x-ms-date",X_MS_ERROR_CODE:"x-ms-error-code",X_MS_VERSION:"x-ms-version",X_MS_CopySourceErrorCode:"x-ms-copy-source-error-code"},g="",m="*",y=256,b="\r\n",v="HTTP/1.1",w="AES256",x="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=Eby8vdM02xNOcqFlqUwJPLlmEtlCDXJ1OUzFT50uSRZ6IFsuFq2UVErCz4I6tq/K1SZFPTOtr/KBHBeksoGMGw==;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1;",S=["Access-Control-Allow-Origin","Cache-Control","Content-Length","Content-Type","Date","Request-Id","traceparent","Transfer-Encoding","User-Agent","x-ms-client-request-id","x-ms-date","x-ms-error-code","x-ms-request-id","x-ms-return-client-request-id","x-ms-version","Accept-Ranges","Content-Disposition","Content-Encoding","Content-Language","Content-MD5","Content-Range","ETag","Last-Modified","Server","Vary","x-ms-content-crc64","x-ms-copy-action","x-ms-copy-completion-time","x-ms-copy-id","x-ms-copy-progress","x-ms-copy-status","x-ms-has-immutability-policy","x-ms-has-legal-hold","x-ms-lease-state","x-ms-lease-status","x-ms-range","x-ms-request-server-encrypted","x-ms-server-encrypted","x-ms-snapshot","x-ms-source-range","If-Mat
1ch","If-Modified-Since","If-None-Match","If-Unmodified-Since","x-ms-access-tier","x-ms-access-tier-change-time","x-ms-access-tier-inferred","x-ms-account-kind","x-ms-archive-status","x-ms-blob-append-offset","x-ms-blob-cache-control","x-ms-blob-committed-block-count","x-ms-blob-condition-appendpos","x-ms-blob-condition-maxsize","x-ms-blob-content-disposition","x-ms-blob-content-encoding","x-ms-blob-content-language","x-ms-blob-content-length","x-ms-blob-content-md5","x-ms-blob-content-type","x-ms-blob-public-access","x-ms-blob-sequence-number","x-ms-blob-type","x-ms-copy-destination-snapshot","x-ms-creation-time","x-ms-default-encryption-scope","x-ms-delete-snapshots","x-ms-delete-type-permanent","x-ms-deny-encryption-scope-override","x-ms-encryption-algorithm","x-ms-if-sequence-number-eq","x-ms-if-sequence-number-le","x-ms-if-sequence-number-lt","x-ms-incremental-copy","x-ms-lease-action","x-ms-lease-break-period","x-ms-lease-duration","x-ms-lease-id","x-ms-lease-time","x-ms-page-write","x-ms-proposed-lease-id","x-ms-range-get-content-md5","x-ms-rehydrate-priority","x-ms-sequence-number-action","x-ms-sku-name","x-ms-source-content-md5","x-ms-source-if-match","x-ms-source-if-modified-since","x-ms-source-if-none-match","x-ms-source-if-unmodified-since","x-ms-tag-count","x-ms-encryption-key-sha256","x-ms-copy-source-error-code","x-ms-copy-source-status-code","x-ms-if-tags","x-ms-source-if-tags"],C=["comp","maxresults","rscc","rscd","rsce","rscl","rsct","se","si","sip","sp","spr","sr","srt","ss","st","sv","include","marker","prefix","copyid","restype","blockid","blocklisttype","delimiter","prevsnapshot","ske","skoid","sks","skt","sktid","skv","snapshot"],E="BlobUsesCustomerSpecifiedEncryption",_="BlobDoesNotUseCustomerSpecifiedEncryption",T=["10000","10001","10002","10003","10004","10100","10101","10102","10103","10104","11000","11001","11002","11003","11004","11100","11101","11102","11103","11104"]},2921:e=>{"use strict";e.exports=function(e,t){return"string"==typeof e?o(e):"number"==typeof e?s(e,t):null},e.exports.format=s,e.exports.parse=o;var t=/\B(?=(\d{3})+(?!\d))/g,r=/(?:\.0*|(\.[^0]+)0+)$/,i={b:1,kb:1024,mb:1048576,gb:0x40000000,tb:0x10000000000,pb:0x4000000000000},n=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;function s(e,n){if(!Number.isFinite(e))return null;var s=Math.abs(e),o=n&&n.thousandsSeparator||"",a=n&&n.unitSeparator||"",l=n&&void 0!==n.decimalPlaces?n.decimalPlaces:2,c=!!(n&&n.fixedDecimals),u=n&&n.unit||"";u&&i[u.toLowerCase()]||(u=s>=i.pb?"PB":s>=i.tb?"TB":s>=i.gb?"GB":s>=i.mb?"MB":s>=i.kb?"KB":"B");var h=(e/i[u.toLowerCase()]).toFixed(l);return c||(h=h.replace(r,"$1")),o&&(h=h.split(".").map(function(e,r){return 0===r?e.replace(t,o):e}).join(".")),h+a+u}function o(e){if("number"==typeof e&&!isNaN(e))return e;if("string"!=typeof e)return null;var t,r=n.exec(e),s="b";return(r?(t=parseFloat(r[1]),s=r[4].toLowerCase()):(t=parseInt(e,10),s="b"),isNaN(t))?null:Math.floor(i[s]*t)}},7953:(e,t,r)=>{"use strict";r.d(t,{r:()=>T});var i,n=r(26494),s=r(54247),o=r(2848),a=r(34046);async function l(e){let t=await e.blobBody;return(0,a.kE)(t)}var c=r(83773);class u{constructor(e,t){if(!e||!e.contentType)throw RangeError("batchResponse is malformed or doesn't contain valid content-type.");if(!t||0===t.size)throw RangeError("Invalid state: subRequests is not provided or size is 0.");this.batchResponse=e,this.subRequests=t,this.responseBatchBoundary=this.batchResponse.contentType.split("=")[1],this.perResponsePrefix=`--${this.responseBatchBoundary}${o.Gv}`,this.batchResponseEnding=`--${this.responseBatchBoundary}--`}async parseBatchResponse(){if(this.batchResponse._response.status!==o._F.HTTP_ACCEPTED)throw Error(`Invalid state: batch request failed with status: '${this.batchResponse._response.status}'.`);let e=(await l(this.batchResponse)).split(this.batchResponseEnding)[0].split(this.perResponsePrefix).slice(1),t=e.length;if(t!==this.subRequests.size&&1!==t)throw Error("Invalid state: sub responses' count is not equal to sub requests' count.");let r=Array(t),i=0,a=0;for(let l=0;l<t;l++){let t=e[l],u={};u.headers=(0,s.LJ)((0,n.Nc)());let h=t.split(`${o.Gv}`),d=!1,p=!1,f=!1,g=-1;for(let e of h){if(!d){if(e.startsWith(o.BE.CONTENT_ID)&&(g=parseInt(e.split(": ")[1])),e.startsWith(o.f_)){d=!0;let t=e.split(" ");u.status=parseInt(t[1]),u.statusMessage=t.slice(2).join(" ")}continue}if(""===e.trim()){p||(p=!0);continue}if(p)u.bodyAsText||(u.bodyAsText=""),u.bodyAsText+=e;else{if(-1===e.indexOf(": "))throw Error(`Invalid state: find non-empty line '${e}' without HTTP header delimiter ': '.`);let t=e.split(": ");u.headers.set(t[0],t[1]),t[0]===o.BE.X_MS_ERROR_CODE&&(u.errorCode=t[1],f=!0)}}-1!==g&&Number.isInteger(g)&&g>=0&&g<this.subRequests.size&&void 0===r[g]?(u._request=this.subRequests.get(g),r[g]=u):c.v.error(`subResponses[${l}] is dropped as the Content-ID is not found or invalid, Content-ID: ${g}`),f?a++:i++}return{subResponses:r,subResponsesSucceededCount:i,subResponsesFailedCount:a}}}var h=r(94485),d=r(92584),p=r(68142),f=r(68725);!function(e){e[e.LOCKED=0]="LOCKED",e[e.UNLOCKED=1]="UNLOCKED"}(i||(i={}));class g{static async lock(e){return new Promise(t=>{void 0===this.keys[e]||this.keys[e]===i.UNLOCKED?(this.keys[e]=i.LOCKED,t()):this.onUnlockEvent(e,()=>{this.keys[e]=i.LOCKED,t()})})}static async unlock(e){return new Promise(t=>{this.keys[e]===i.LOCKED&&this.emitUnlockEvent(e),delete this.keys[e],t()})}static onUnlockEvent(e,t){void 0===this.listeners[e]?this.listeners[e]=[t]:this.listeners[e].push(t)}static emitUnlockEvent(e){if(void 0!==this.listeners[e]&&this.listeners[e].length>0){let t=this.listeners[e].shift();setImmediate(()=>{t.call(this)})}}}g.keys={},g.listeners={};
1var m=r(72187),y=r(28023),b=r(65808),v=r(87014),w=r(55335),x=r(73035),S=r(85630);class C{constructor(){this.batch="batch",this.batchRequest=new E}getMultiPartContentType(){return this.batchRequest.getMultipartContentType()}getHttpRequestBody(){return this.batchRequest.getHttpRequestBody()}getSubRequests(){return this.batchRequest.getSubRequests()}async addSubRequestInternal(e,t){await g.lock(this.batch);try{this.batchRequest.preAddSubRequest(e),await t(),this.batchRequest.postAddSubRequest(e)}finally{await g.unlock(this.batch)}}setBatchType(e){if(this.batchType||(this.batchType=e),this.batchType!==e)throw RangeError(`BlobBatch only supports one operation type per batch and it already is being used for ${this.batchType} operations.`)}async deleteBlob(e,t,r){let i,n;if("string"==typeof e&&(h.Ll&&t instanceof v.Z||t instanceof p.t||(0,d.Zp)(t)))i=e,n=t;else if(e instanceof f.jl)i=e.url,n=e.credential,r=t;else throw RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");return r||(r={}),w.U.withSpan("BatchDeleteRequest-addSubRequest",r,async e=>{this.setBatchType("delete"),await this.addSubRequestInternal({url:i,credential:n},async()=>{await new f.jl(i,this.batchRequest.createPipeline(n)).delete(e)})})}async setBlobAccessTier(e,t,r,i){let n,s,o;if("string"==typeof e&&(h.Ll&&t instanceof v.Z||t instanceof p.t||(0,d.Zp)(t)))n=e,s=t,o=r;else if(e instanceof f.jl)n=e.url,s=e.credential,o=t,i=r;else throw RangeError("Invalid arguments. Either url and credential, or BlobClient need be provided.");return i||(i={}),w.U.withSpan("BatchSetTierRequest-addSubRequest",i,async e=>{this.setBatchType("setAccessTier"),await this.addSubRequestInternal({url:n,credential:s},async()=>{await new f.jl(n,this.batchRequest.createPipeline(s)).setAccessTier(o,e)})})}}class E{constructor(){this.operationCount=0,this.body="";let e=(0,h.N4)();this.boundary=`batch_${e}`,this.subRequestPrefix=`--${this.boundary}${o.Gv}${o.BE.CONTENT_TYPE}: application/http${o.Gv}${o.BE.CONTENT_TRANSFER_ENCODING}: binary`,this.multipartContentType=`multipart/mixed; boundary=${this.boundary}`,this.batchRequestEnding=`--${this.boundary}--`,this.subRequests=new Map}createPipeline(e){var t;let r=(0,n.O8)();r.addPolicy((0,x.h6)({stringifyXML:b.RB,serializerOptions:{xml:{xmlCharKey:"#"}}}),{phase:"Serialize"}),r.addPolicy({name:"batchHeaderFilterPolicy",async sendRequest(e,t){let r="";for(let[t]of e.headers)(0,y._O)(t,o.BE.X_MS_VERSION)&&(r=t);return""!==r&&e.headers.delete(r),t(e)}}),r.addPolicy((t=this,{name:"batchRequestAssemblePolicy",sendRequest:async e=>(t.appendSubRequestToBody(e),{request:e,status:200,headers:(0,n.Nc)()})}),{afterPhase:"Sign"}),(0,d.Zp)(e)?r.addPolicy((0,n.N$)({credential:e,scopes:o.iO,challengeCallbacks:{authorizeRequestOnChallenge:x.rH}}),{phase:"Sign"}):e instanceof v.Z&&r.addPolicy((0,S.R)({accountName:e.accountName,accountKey:e.accountKey}),{phase:"Sign"});let i=new m.$U([]);return i._credential=e,i._corePipeline=r,i}appendSubRequestToBody(e){for(let[t,r]of(this.body+=[this.subRequestPrefix,`${o.BE.CONTENT_ID}: ${this.operationCount}`,"",`${e.method.toString()} ${(0,y.K0)(e.url)} ${o.f_}${o.Gv}`].join(o.Gv),e.headers))this.body+=`${t}: ${r}${o.Gv}`;this.body+=o.Gv}preAddSubRequest(e){if(this.operationCount>=o.KQ)throw RangeError(`Cannot exceed ${o.KQ} sub requests in a single batch`);let t=(0,y.pH)(e.url);if(!t||""===t)throw RangeError(`Invalid url for sub request: '${e.url}'`)}postAddSubRequest(e){this.subRequests.set(this.operationCount,e),this.operationCount++}getHttpRequestBody(){return`${this.body}${this.batchRequestEnding}${o.Gv}`}getMultipartContentType(){return this.multipartContentType}getSubRequests(){return this.subRequests}}var _=r(42912);class T{constructor(e,t,r){let i;i=(0,m.O8)(t)?t:t?(0,m.vC)(t,r):(0,m.vC)(new p.t,r);let n=new _.S(e,(0,m.Vn)(i)),s=(0,y.pH)(e);s&&"/"!==s?this.serviceOrContainerContext=n.container:this.serviceOrContainerContext=n.service}createBatch(){return new C}async deleteBlobs(e,t,r){let i=new C;for(let n of e)"string"==typeof n?await i.deleteBlob(n,t,r):await i.deleteBlob(n,t);return this.submitBatch(i)}
1async setBlobsAccessTier(e,t,r,i){let n=new C;for(let s of e)"string"==typeof s?await n.setBlobAccessTier(s,t,r,i):await n.setBlobAccessTier(s,t,r);return this.submitBatch(n)}async submitBatch(e,t={}){if(!e||0===e.getSubRequests().size)throw RangeError("Batch request should contain one or more sub requests.");return w.U.withSpan("BlobBatchClient-submitBatch",t,async t=>{let r=e.getHttpRequestBody(),i=(0,y.m6)(await this.serviceOrContainerContext.submitBatch(new Blob([r]).size,e.getMultiPartContentType(),r,Object.assign({},t))),n=new u(i,e.getSubRequests()),s=await n.parseBatchResponse();return{_response:i._response,contentType:i.contentType,errorCode:i.errorCode,requestId:i.requestId,clientRequestId:i.clientRequestId,version:i.version,subResponses:s.subResponses,subResponsesSucceededCount:s.subResponsesSucceededCount,subResponsesFailedCount:s.subResponsesFailedCount}})}}},8562:(e,t,r)=>{"use strict";r.d(t,{V:()=>n});var i=Object.defineProperty,n=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})}},12486:(e,t,r)=>{"use strict";let i;r.d(t,{KV:()=>C,MX:()=>x});var n=r(29143);let s=void 0!==n&&n.env&&n.env.DEBUG||void 0,o=[],a=[],l=[];s&&u(s);let c=Object.assign(e=>p(e),{enable:u,enabled:h,disable:function(){let e=i||"";return u(""),e},log:function(...e){if(e.length>0){let t=String(e[0]);t.includes(":error")?console.error(...e):t.includes(":warning")?console.warn(...e):t.includes(":info")?console.info(...e):(t.includes(":verbose"),console.debug(...e))}}});function u(e){for(let t of(i=e,o=[],a=[],e.split(",").map(e=>e.trim())))t.startsWith("-")?a.push(t.substring(1)):o.push(t);for(let e of l)e.enabled=h(e.namespace)}function h(e){if(e.endsWith("*"))return!0;for(let t of a)if(d(e,t))return!1;for(let t of o)if(d(e,t))return!0;return!1}function d(e,t){if(-1===t.indexOf("*"))return e===t;let r=t;if(-1!==t.indexOf("**")){let e=[],i="";for(let r of t)if("*"===r&&"*"===i)continue;else i=r,e.push(r);r=e.join("")}let i=0,n=0,s=r.length,o=e.length,a=-1,l=-1;for(;i<o&&n<s;)if("*"===r[n]){if(a=n,++n===s)return!0;for(;e[i]!==r[n];)if(++i===o)return!1;l=i,i++,n++;continue}else if(r[n]===e[i])n++,i++;else{if(!(a>=0)||(n=a+1,(i=l+1)===o))return!1;for(;e[i]!==r[n];)if(++i===o)return!1;l=i,i++,n++;continue}let c=i===e.length,u=n===r.length,h=n===r.length-1&&"*"===r[n];return c&&(u||h)}function p(e){let t=Object.assign(function(...r){t.enabled&&(r.length>0&&(r[0]=`${e} ${r[0]}`),t.log(...r))},{enabled:h(e),destroy:f,log:c.log,namespace:e,extend:g});return l.push(t),t}function f(){let e=l.indexOf(this);return e>=0&&(l.splice(e,1),!0)}function g(e){let t=p(`${this.namespace}:${e}`);return t.log=this.log,t}var m=r(29143);let y=["verbose","info","warning","error"],b={verbose:400,info:300,warning:200,error:100};function v(e,t){t.log=(...t)=>{e.log(...t)}}function w(e){return y.includes(e)}function x(e){let t,r=new Set,i=void 0!==m&&m.env&&m.env[e.logLevelEnvVarName]||void 0,n=c(e.namespace);function s(e){if(e&&!w(e))throw Error(`Unknown log level '${e}'. Acceptable values: ${y.join(",")}`);t=e;let i=[];for(let e of r)o(e)&&i.push(e.namespace);c.enable(i.join(","))}function o(e){return!!(t&&b[e.level]<=b[t])}function a(e,t){let i=Object.assign(e.extend(t),{level:t});if(v(e,i),o(i)){let e=c.disable();c.enable(e+","+i.namespace)}return r.add(i),i}return n.log=(...e)=>{c.log(...e)},i&&(w(i)?s(i):console.error(`${e.logLevelEnvVarName} set to unknown log level '${i}'; logging is not enabled. Acceptable values: ${y.join(", ")}.`)),{setLogLevel:s,getLogLevel:function(){return t},createClientLogger:function(e){let t=n.extend(e);return v(n,t),{error:a(t,"error"),warning:a(t,"warning"),info:a(t,"info"),verbose:a(t,"verbose")}},logger:n}}let S=x({logLevelEnvVarName:"TYPESPEC_RUNTIME_LOG_LEVEL",namespace:"typeSpecRuntime"});function C(e){return S.createClientLogger(e)}S.logger},15115:(e,t,r)=>{"use strict";r.d(t,{o:()=>i});var i=class{constructor(e){this.config=e,this.prefix=this.#e(e.prefix)}prefix;#e(e){return e?e.replace(/:+$/,""):""}createNamespacePrefix(e){let t=this.#e(this.prefix);return t?`${t}:${e}`:e}getItemKey(e){return this.prefix?`${this.prefix}:${e}`:e}}},17986:(e,t,r)=>{"use strict";r.d(t,{KV:()=>n});let i=(0,r(12486).MX)({logLevelEnvVarName:"AZURE_LOG_LEVEL",namespace:"azure"});function n(e){return i.createClientLogger(e)}i.logger},23068:(e,t,r)=>{"use strict";r.d(t,{N:()=>i});class i{constructor(e){this.threshold=e,this.count=0}success(){this.count=0}failure(){return++this.count>=this.threshold}}},26494:(e,t,r)=>{"use strict";r.d(t,{pj:()=>ee,N$:()=>ef,fl:()=>es,O8:()=>U,Nc:()=>eo,Fp:()=>en,G6:()=>ea,e4:()=>J,nV:()=>Y,T0:()=>et,Ou:()=>j});
1class i extends Error{constructor(e){super(e),this.name="AbortError"}}var n=r(12486);function s(e){return e.toLowerCase()}class o{_headersMap;constructor(e){if(this._headersMap=new Map,e)for(let t of Object.keys(e))this.set(t,e[t])}set(e,t){this._headersMap.set(s(e),{name:e,value:String(t).trim()})}get(e){return this._headersMap.get(s(e))?.value}has(e){return this._headersMap.has(s(e))}delete(e){this._headersMap.delete(s(e))}toJSON(e={}){let t={};if(e.preserveCase)for(let e of this._headersMap.values())t[e.name]=e.value;else for(let[e,r]of this._headersMap)t[e]=r.value;return t}toString(){return JSON.stringify(this.toJSON({preserveCase:!0}))}[Symbol.iterator](){return function*(e){for(let t of e.values())yield[t.name,t.value]}(this._headersMap)}}function a(e){return new o(e)}var l=r(30927);class c{url;method;headers;timeout;withCredentials;body;multipartBody;formData;streamResponseStatusCodes;enableBrowserStreams;proxySettings;disableKeepAlive;abortSignal;requestId;allowInsecureConnection;onUploadProgress;onDownloadProgress;requestOverrides;authSchemes;constructor(e){this.url=e.url,this.body=e.body,this.headers=e.headers??a(),this.method=e.method??"GET",this.timeout=e.timeout??0,this.multipartBody=e.multipartBody,this.formData=e.formData,this.disableKeepAlive=e.disableKeepAlive??!1,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=e.withCredentials??!1,this.abortSignal=e.abortSignal,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||(0,l.N)(),this.allowInsecureConnection=e.allowInsecureConnection??!1,this.enableBrowserStreams=e.enableBrowserStreams??!1,this.requestOverrides=e.requestOverrides,this.authSchemes=e.authSchemes}}let u=new Set(["Deserialize","Serialize","Retry","Sign"]);class h{_policies=[];_orderedPolicies;constructor(e){this._policies=e?.slice(0)??[],this._orderedPolicies=void 0}addPolicy(e,t={}){if(t.phase&&t.afterPhase)throw Error("Policies inside a phase cannot specify afterPhase.");if(t.phase&&!u.has(t.phase))throw Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!u.has(t.afterPhase))throw Error(`Invalid afterPhase name: ${t.afterPhase}`);this._policies.push({policy:e,options:t}),this._orderedPolicies=void 0}removePolicy(e){let t=[];return this._policies=this._policies.filter(r=>(!e.name||r.policy.name!==e.name)&&(!e.phase||r.options.phase!==e.phase)||(t.push(r.policy),!1)),this._orderedPolicies=void 0,t}sendRequest(e,t){return this.getOrderedPolicies().reduceRight((e,t)=>r=>t.sendRequest(r,e),t=>e.sendRequest(t))(t)}getOrderedPolicies(){return this._orderedPolicies||(this._orderedPolicies=this.orderPolicies()),this._orderedPolicies}clone(){return new h(this._policies)}static create(){return new h}orderPolicies(){let e=[],t=new Map;function r(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}let i=r("Serialize"),n=r("None"),s=r("Deserialize"),o=r("Retry"),a=r("Sign"),l=[i,n,s,o,a];function c(e){return"Retry"===e?o:"Serialize"===e?i:"Deserialize"===e?s:"Sign"===e?a:n}for(let e of this._policies){let r=e.policy,i=e.options,n=r.name;if(t.has(n))throw Error("Duplicate policy names not allowed in pipeline");let s={policy:r,dependsOn:new Set,dependants:new Set};i.afterPhase&&(s.afterPhase=c(i.afterPhase),s.afterPhase.hasAfterPolicies=!0),t.set(n,s),c(i.phase).policies.add(s)}for(let e of this._policies){let{policy:r,options:i}=e,n=r.name,s=t.get(n);if(!s)throw Error(`Missing node for policy ${n}`);if(i.afterPolicies)for(let e of i.afterPolicies){let r=t.get(e);r&&(s.dependsOn.add(r),r.dependants.add(s))}if(i.beforePolicies)for(let e of i.beforePolicies){let r=t.get(e);r&&(r.dependsOn.add(s),s.dependants.add(r))}}function u(r){for(let i of(r.hasRun=!0,r.policies))if((!i.afterPhase||i.afterPhase.hasRun&&!i.afterPhase.policies.size)&&0===i.dependsOn.size){for(let t of(e.push(i.policy),i.dependants))t.dependsOn.delete(i);t.delete(i.policy.name),r.policies.delete(i)}}let h=0;for(;t.size>0;){h++;let t=e.length;if(!function(){for(let e of l){if(u(e),e.policies.size>0&&e!==n){n.hasRun||u(n);return}e.hasAfterPolicies&&u(n)}}(),e.length<=t&&h>1)throw Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var d=r(40780);let p=Symbol();var f=r(78146);let g=new f.I;
1class m extends Error{static REQUEST_SEND_ERROR="REQUEST_SEND_ERROR";static PARSE_ERROR="PARSE_ERROR";code;statusCode;request;response;details;constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1});let r=this.request?.agent?{maxFreeSockets:this.request.agent.maxFreeSockets,maxSockets:this.request.agent.maxSockets}:void 0;Object.defineProperty(this,p,{value:()=>`RestError: ${this.message} 2 ${g.sanitize({...this,request:{...this.request,agent:r},response:this.response})}`,enumerable:!1}),Object.setPrototypeOf(this,m.prototype)}}function y(e){return e instanceof m||(0,d.b)(e)&&"RestError"===e.name}var b=r(33501);function v(e){return!!(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}class w{async sendRequest(e){if("https:"!==new URL(e.url).protocol&&!e.allowInsecureConnection)throw Error(`Cannot connect to ${e.url} while allowInsecureConnection is false.`);if(e.proxySettings)throw Error("HTTP proxy is not supported in browser environment");try{return await x(e)}catch(i){var t,r;throw t=i,r=e,t&&t?.name==="AbortError"?t:new m(`Error sending request: ${t.message}`,{code:t?.code??m.REQUEST_SEND_ERROR,request:r})}}}async function x(e){let{abortController:t,abortControllerCleanup:r}=function(e){let t,r,n=new AbortController;if(e.abortSignal){if(e.abortSignal.aborted)throw new i("The operation was aborted. Request has already been canceled.");r=e=>{"abort"===e.type&&n.abort()},e.abortSignal.addEventListener("abort",r),t=()=>{r&&e.abortSignal?.removeEventListener("abort",r)}}return e.timeout>0&&setTimeout(()=>{n.abort()},e.timeout),{abortController:n,abortControllerCleanup:t}}(e);try{var n;let i=function(e){let t=new Headers;for(let[r,i]of e)t.append(r,i);return t}(e.headers),{streaming:s,body:o}=function(e){let t="function"==typeof e.body?e.body():e.body;if(t&&"function"==typeof t.pipe)throw Error("Node streams are not supported in browser environment.");return v(t)?{streaming:!0,body:C(t,{onProgress:e.onUploadProgress})}:"object"==typeof t&&t&&"buffer"in t?{streaming:!1,body:function(e){if(e.buffer instanceof ArrayBuffer&&0===e.byteOffset&&e.byteLength===e.buffer.byteLength)return e.buffer;let t=new Uint8Array(new ArrayBuffer(e.byteLength)),r=new Uint8Array(e.buffer,e.byteOffset,e.byteLength);return t.set(r),t.buffer}(t)}:void 0===t?{streaming:!1}:{streaming:!1,body:t}}(e),a={body:o,method:e.method,headers:i,signal:t.signal,..."credentials"in Request.prototype?{credentials:e.withCredentials?"include":"same-origin"}:{},..."cache"in Request.prototype?{cache:"no-store"}:{}};s&&(a.duplex="half");let l=await fetch(e.url,{...a,...e.requestOverrides});return n=e.body,("function"==typeof Blob||"object"==typeof Blob)&&n instanceof Blob&&e.onUploadProgress&&e.onUploadProgress({loadedBytes:e.body.size}),S(l,e,r)}catch(e){throw r?.(),e}}async function S(e,t,r){let i={request:t,headers:function(e){let t=a();for(let[r,i]of e.headers)t.set(r,i);return t}(e),status:e.status},n=v(e.body)?C(e.body,{onProgress:t.onDownloadProgress,onEnd:r}):e.body;if(t.streamResponseStatusCodes?.has(1/0)||t.streamResponseStatusCodes?.has(i.status))t.enableBrowserStreams?i.browserStreamBody=n??void 0:(i.blobBody=new Response(n).blob(),r?.());else{let e=new Response(n);i.bodyAsText=await e.text(),r?.()}return i}function C(e,t={}){let r=0,{onProgress:i,onEnd:n}=t;if(void 0!==e.pipeThrough&&void 0!==self.TransformStream)return e.pipeThrough(new TransformStream({transform(e,t){if(null===e)return void t.terminate();t.enqueue(e),r+=e.length,i&&i({loadedBytes:r})},flush(){n?.()}}));{let t=e.getReader();return new ReadableStream({async pull(e){let{done:s,value:o}=await t.read();if(s||!o){n?.(),e.close(),t.releaseLock();return}r+=o?.length??0,e.enqueue(o),i&&i({loadedBytes:r})},cancel:e=>(n?.(),t.cancel(e))})}}let E=(0,n.KV)("ts-http-runtime"),_="redirectPolicy",T=["GET","HEAD"];async function P(e,t,r,i,n=0){let{request:s,status:o,headers:a}=t,l=a.get("location");
2if(l&&(300===o||301===o&&T.includes(s.method)||302===o&&T.includes(s.method)||303===o&&"POST"===s.method||307===o)&&n<r){let a=new URL(l,s.url);if(!i){let e=new URL(s.url);if(a.origin!==e.origin)return E.verbose(`Skipping cross-origin redirect from ${e.origin} to ${a.origin}.`),t}s.url=a.toString(),303===o&&(s.method="GET",s.headers.delete("Content-Length"),delete s.body),s.headers.delete("Authorization");let c=await e(s);return P(e,c,r,i,n+1)}return t}let R="Retry-After",I=["retry-after-ms","x-ms-retry-after-ms",R];function O(e){if(e&&[429,503].includes(e.status))try{for(let t of I){let r=function(e,t){let r=e.headers.get(t);if(!r)return;let i=Number(r);if(!Number.isNaN(i))return i}(e,t);if(0===r||r){let e=t===R?1e3:1;return r*e}}let t=e.headers.get(R);if(!t)return;let r=Date.parse(t)-Date.now();return Number.isFinite(r)?Math.max(0,r):void 0}catch{return}}let A=(0,n.KV)("ts-http-runtime retryPolicy");var M=r(33775);async function k(e,t){let r=t.headers.get("Content-Type");if(r&&!r.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",r??"multipart/form-data");let i=[];for(let[t,r]of Object.entries(e))for(let e of Array.isArray(r)?r:[r])if("string"==typeof e)i.push({headers:a({"Content-Disposition":`form-data; name="${t}"`}),body:(0,b.Al)(e,"utf-8")});else if(null==e||"object"!=typeof e)throw Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);else{let r=e.name||"blob",n=a();n.set("Content-Disposition",`form-data; name="${t}"; filename="${r}"`),n.set("Content-Type",e.type||"application/octet-stream"),i.push({headers:n,body:e})}t.multipartBody={parts:i}}async function N(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(v(e))return new Response(e).blob();throw Error("Unsupported source type. Only Blob, Uint8Array, and ReadableStream are supported in browser.")}async function L(e){let t=[];for(let r of e){let e=await N("function"==typeof r?r():r);if(e instanceof Blob)t.push(e);else t.push(new Blob(["resize"in e.buffer?e:e.map(e=>e)]))}return new Blob(t)}async function D(e,t,r){let i=[(0,b.Al)(`--${r}`,"utf-8"),...t.flatMap(e=>[(0,b.Al)("\r\n","utf-8"),(0,b.Al)(function(e){let t="";for(let[r,i]of e)t+=`${r}: ${i}\r 3`;return t}(e.headers),"utf-8"),(0,b.Al)("\r\n","utf-8"),e.body,(0,b.Al)(`\r 4--${r}`,"utf-8")]),(0,b.Al)("--\r\n\r\n","utf-8")],n=function(e){let t=0;for(let r of e){let e=function(e){return e instanceof Uint8Array?e.byteLength:"undefined"!=typeof Blob&&e instanceof Blob?-1===e.size?void 0:e.size:void 0}(r);if(void 0===e)return;t+=e}return t}(i);n&&e.headers.set("Content-Length",n),e.body=await L(i)}let B="multipartPolicy",q=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function U(){return h.create()}r(29143);var H=r(17986);let z=(0,H.KV)("core-rest-pipeline"),F="proxyPolicy is not supported in browser environment",j=_;async function $(e){let t=globalThis.navigator,r="unknown";if(t?.userAgentData){let i=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);r=`${i.platform} ${i.platformVersion}; ${i.architecture}`;let n=function(e){for(let t of["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"]){let r=e.find(e=>e.brand===t);if(r)return r}}(t.userAgentData.brands);n&&e.set(n.brand,`${n.version} (${r})`)}else if(t?.platform){r=t.platform;let i=function(e){for(let t of[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}]){let r=e.match(t.regex);if(r)return{brand:t.name,version:r[1]}}}(t.userAgent);i&&e.set(i.brand,`${i.version} (${r})`)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",`${globalThis.EdgeRuntime} (${r})`)}let K="1.22.3";async function V(e){let t=new Map;t.set("core-rest-pipeline",K),await $(t);let r=function(e){let t=[];for(let[r,i]of e){let e=i?`${r}/${i}`:r;t.push(e)}return t.join(" ")}(t);return e?`${e} ${r}`:r}let W="x-ms-useragent";var Q=r(94485);let G=Symbol("rawContent");function X(e){return"function"==typeof e[G]}let J="decompressResponsePolicy";function Y(e){throw Error(F)}var Z=r(49351);let ee=m;function et(e){return y(e)}var er=r(39208);function ei(e){if(e instanceof AbortSignal)return{abortSignal:e};if(e.aborted)return{abortSignal:AbortSignal.abort(e.reason)};let t=new AbortController,r=!0;function i(){r&&(e.removeEventListener("abort",n),r=!1)}function n(){t.abort(e.reason),i()}
4return e.addEventListener("abort",n),{abortSignal:t.signal,cleanup:i}}function en(e){let t=U();if(Q.qx){var r,n;e.agent&&t.addPolicy((r=e.agent,{name:"agentPolicy",sendRequest:async(e,t)=>(e.agent||(e.agent=r),t(e))})),e.tlsOptions&&t.addPolicy((n=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=n),t(e))})),t.addPolicy(function(e,t){throw Error(F)}(e.proxyOptions)),t.addPolicy(function(){throw Error("decompressResponsePolicy is not supported in browser environment")}())}return t.addPolicy({name:"wrapAbortSignalLikePolicy",sendRequest:async(e,t)=>{if(!e.abortSignal)return t(e);let{abortSignal:r,cleanup:i}=ei(e.abortSignal);e.abortSignal=r;try{return await t(e)}finally{i?.()}}}),t.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(M.qx&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){let t={};for(let[r,i]of e.entries())t[r]??=[],t[r].push(i);return t}(e.body),e.body=void 0),e.formData){let t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){let t=new URLSearchParams;for(let[r,i]of Object.entries(e))if(Array.isArray(i))for(let e of i)t.append(r,e.toString());else t.append(r,i.toString());return t.toString()}(e.formData):await k(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[B]}),t.addPolicy(function(e={}){let t=V(e.userAgentPrefix);return{name:"userAgentPolicy",sendRequest:async(e,r)=>(e.headers.has(W)||e.headers.set(W,await t),r(e))}}(e.userAgentOptions)),t.addPolicy(function(e="x-ms-client-request-id"){return{name:"setClientRequestIdPolicy",sendRequest:async(t,r)=>(t.headers.has(e)||t.headers.set(e,t.requestId),r(t))}}(e.telemetryOptions?.clientRequestIdHeaderName)),t.addPolicy(function(){let e={name:B,async sendRequest(e,t){if(!e.multipartBody)return t(e);if(e.body)throw Error("multipartBody and regular body cannot be set at the same time");let r=e.multipartBody.boundary,i=e.headers.get("Content-Type")??"multipart/mixed",n=i.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!n)throw Error(`Got multipart request body, but content-type header was not multipart: ${i}`);let[,s,o]=n;if(o&&r&&o!==r)throw Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);if(r??=o){var a=r;if(a.length>70)throw Error(`Multipart boundary "${a}" exceeds maximum length of 70 characters`);if(Array.from(a).some(e=>!q.has(e)))throw Error(`Multipart boundary "${a}" contains invalid characters`)}else r=`----AzSDKFormBoundary${(0,l.N)()}`;return e.headers.set("Content-Type",`${s}; boundary=${r}`),await D(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}};return{name:B,sendRequest:async(t,r)=>{if(t.multipartBody)for(let e of t.multipartBody.parts){var i;X(e.body)&&(e.body=X(i=e.body)?i[G]():i)}return e.sendRequest(t,r)}}}(),{afterPhase:"Deserialize"}),t.addPolicy(function(e={}){return function(e={}){return{name:"defaultRetryPolicy",sendRequest:function(e,t={maxRetries:3}){let r=t.logger||A;return{name:"retryPolicy",async sendRequest(n,s){let o,a,l=-1;e:for(;;){l+=1,o=void 0,a=void 0;try{r.info(`Retry ${l}: Attempting to send request`,n.requestId),o=await s(n),r.info(`Retry ${l}: Received a response from request`,n.requestId)}catch(e){if(r.error(`Retry ${l}: Received an error from request`,n.requestId),!y(e))throw e;a=e,o=e.response}if(n.abortSignal?.aborted)throw r.error(`Retry ${l}: Request aborted.`),new i;if(l>=(t.maxRetries??3)){if(r.info(`Retry ${l}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),a)throw a;if(o)return o;throw Error("Maximum retries reached with no response or error to throw")}for(let t of(r.info(`Retry ${l}: Processing ${e.length} retry strategies.`),e)){let e=t.logger||r;e.info(`Retry ${l}: Processing retry strategy ${t.name}.`);let s=t.retry({retryCount:l,response:o,responseError:a});if(s.skipStrategy){e.info(`Retry ${l}: Skipped.`);continue}let{errorToThrow:c,retryAfterInMs:u,redirectTo:h}=s;if(c)throw e.error(`Retry ${l}: Retry strategy ${t.name} throws error:`,c),c;if(u||0===u){e.info(`Retry ${l}: Retry strategy ${t.name} retries after ${u}`),await function(e,t,r){return new Promise((n,s)=>{let o,a,l=()=>s(new i(r?.abortErrorMsg?r?.abortErrorMsg:"The operation was aborted.")),c=()=>{r?.abortSignal&&a&&r.abortSignal.removeEventListener("abort",a)};if(a=()=>(o&&clearTimeout(o),c(),l()),r?.abortSignal&&r.abortSignal.aborted)return l();o=setTimeout(()=>{c(),n(t)},e),r?.abortSignal&&r.abortSignal.addEventListener("abort",a)})}
4(u,void 0,{abortSignal:n.abortSignal});continue e}if(h){e.info(`Retry ${l}: Retry strategy ${t.name} redirects to ${h}`),n.url=h;continue e}}if(a)throw r.info("None of the retry strategies could work with the received error. Throwing it."),a;if(o)return r.info("None of the retry strategies could work with the received response. Returning it."),o}}}}([{name:"throttlingRetryStrategy",retry({response:e}){let t=O(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},function(e={}){let t=e.retryDelayInMs??1e3,r=e.maxRetryDelayInMs??64e3;return{name:"exponentialRetryStrategy",retry({retryCount:i,response:n,responseError:s}){var o,a;let l=!!(o=s)&&("ETIMEDOUT"===o.code||"ESOCKETTIMEDOUT"===o.code||"ECONNREFUSED"===o.code||"ECONNRESET"===o.code||"ENOENT"===o.code||"ENOTFOUND"===o.code),c=l&&e.ignoreSystemErrors,u=!!((a=n)&&void 0!==a.status&&(a.status>=500||408===a.status)&&501!==a.status&&505!==a.status),h=u&&e.ignoreHttpStatusCodes;return n&&(Number.isFinite(O(n))||!u)||h||c?{skipStrategy:!0}:!s||l||u?function(e,t){var r,i;let n=t.retryDelayInMs*Math.pow(2,e),s=Math.min(t.maxRetryDelayInMs,n);return{retryAfterInMs:s/2+(r=0,i=s/2,r=Math.ceil(r),Math.floor(Math.random()*((i=Math.floor(i))-r+1))+r)}}(i,{retryDelayInMs:t,maxRetryDelayInMs:r}):{errorToThrow:s}}}}(e)],{maxRetries:e.maxRetries??3}).sendRequest}}(e)}(e.retryOptions),{phase:"Retry"}),t.addPolicy(function(e={}){let t=V(e.userAgentPrefix),r=new er.If({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),i=function(){try{return(0,Z.y)({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:K})}catch(e){z.warning(`Error when creating the TracingClient: ${(0,Q.u1)(e)}`);return}}();return{name:"tracingPolicy",async sendRequest(e,n){if(!i)return n(e);let s=await t,o={"http.url":r.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);let{span:a,tracingContext:l}=function(e,t,r){try{let{span:i,updatedOptions:n}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:r});if(!i.isRecording())return void i.end();let s=e.createRequestHeaders(n.tracingOptions.tracingContext);for(let[e,r]of Object.entries(s))t.headers.set(e,r);return{span:i,tracingContext:n.tracingOptions.tracingContext}}catch(e){z.warning(`Skipping creating a tracing span due to an error: ${(0,Q.u1)(e)}`);return}}(i,e,o)??{};if(!a||!l)return n(e);try{let t=await i.withContext(l,n,e);return function(e,t){try{e.setAttribute("http.status_code",t.status);let r=t.headers.get("x-ms-request-id");r&&e.setAttribute("serviceRequestId",r),t.status>=400&&e.setStatus({status:"error"}),e.end()}catch(e){z.warning(`Skipping tracing span processing due to an error: ${(0,Q.u1)(e)}`)}}(a,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:(0,Q.bJ)(t)?t:void 0}),y(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){z.warning(`Skipping tracing span processing due to an error: ${(0,Q.u1)(e)}`)}}(a,e),e}}}}({...e.userAgentOptions,...e.loggingOptions}),{afterPhase:"Retry"}),Q.qx&&t.addPolicy(function(e={}){return function(e={}){let{maxRetries:t=20,allowCrossOriginRedirects:r=!1}=e;return{name:_,async sendRequest(e,i){let n=await i(e);return P(i,n,t,r)}}}(e)}(e.redirectOptions),{afterPhase:"Retry"}),t.addPolicy(function(e={}){return function(e={}){let t=e.logger??E.info,r=new f.I({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,i){if(!t.enabled)return i(e);t(`Request: ${r.sanitize(e)}`);let n=await i(e);return t(`Response status code: ${n.status}`),t(`Headers: ${r.sanitize(n.headers)}`),n}}}({logger:z.info,...e})}(e.loggingOptions),{afterPhase:"Sign"}),t}function es(){let e=new w;return{async sendRequest(t){let{abortSignal:r,cleanup:i}=t.abortSignal?ei(t.abortSignal):{};try{return t.abortSignal=r,await e.sendRequest(t)}finally{i?.()}}}}function eo(e){return a(e)}function ea(e){return new c(e)}(0,H.KV)("core-rest-pipeline retryPolicy");let el={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function ec(e,t,r){async function i(){if(Date.now()<r)try{return await e()}catch{return null}{let t=await e();if(null===t)throw Error("Failed to refresh access token.");return t}}let n=await i();for(;null===n;)await (0,Q.cb)(t),n=await i();return n}async function eu(e,t){try{return[await t(e),void 0]}catch(e){if(y(e)&&e.response)return[e.response,e];throw e}}async function eh(e){let{scopes:t,getAccessToken:r,request:i}=e,n={abortSignal:i.abortSignal,tracingOptions:i.tracingOptions,enableCae:!0},s=await r(t,n);s&&e.request.headers.set("Authorization",`Bearer ${s.token}`)}function ed(e){return 401===e.status&&e.headers.has("WWW-Authenticate")}async function ep(e,t){let{scopes:r}=e,i=await e.getAccessToken(r,{enableCae:!0,claims:t});return!!i&&(e.request.headers.set("Authorization",`${i.tokenType??"Bearer"} ${i.token}`),!0)}function ef(e){let{credential:t,scopes:r,challengeCallbacks:i}=e,n=e.logger||z,s={authorizeRequest:i?.authorizeRequest?.bind(i)??eh,authorizeRequestOnChallenge:i?.authorizeRequestOnChallenge?.bind(i)}
4,o=t?function(e,t){let r,i=null,n=null,s={...el,...void 0},o={get isRefreshing(){return null!==i},get shouldRefresh(){if(o.isRefreshing)return!1;if(n?.refreshAfterTimestamp&&n.refreshAfterTimestamp<Date.now())return!0;return(n?.expiresOnTimestamp??0)-s.refreshWindowInMs<Date.now()},get mustRefresh(){return null===n||n.expiresOnTimestamp-s.forcedRefreshWindowInMs<Date.now()}};function a(t,a){return o.isRefreshing||(i=ec(()=>e.getToken(t,a),s.retryIntervalInMs,n?.expiresOnTimestamp??Date.now()).then(e=>(i=null,n=e,r=a.tenantId,n)).catch(e=>{throw i=null,n=null,r=void 0,e})),i}return async(e,t)=>{let i=!!t.claims,s=r!==t.tenantId;return(i&&(n=null),s||i||o.mustRefresh)?a(e,t):(o.shouldRefresh&&a(e,t),n)}}(t):()=>Promise.resolve(null);return{name:"bearerTokenAuthenticationPolicy",async sendRequest(e,t){let i,a;if(!e.url.toLowerCase().startsWith("https://"))throw Error("Bearer token authentication is not permitted for non-TLS protected (non-https) URLs.");if(await s.authorizeRequest({scopes:Array.isArray(r)?r:[r],request:e,getAccessToken:o,logger:n}),[i,a]=await eu(e,t),ed(i)){let l=eg(i.headers.get("WWW-Authenticate"));if(l){let s;try{s=atob(l)}catch(e){return n.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${l}`),i}await ep({scopes:Array.isArray(r)?r:[r],response:i,request:e,getAccessToken:o,logger:n},s)&&([i,a]=await eu(e,t))}else if(s.authorizeRequestOnChallenge&&(await s.authorizeRequestOnChallenge({scopes:Array.isArray(r)?r:[r],request:e,response:i,getAccessToken:o,logger:n})&&([i,a]=await eu(e,t)),ed(i))&&(l=eg(i.headers.get("WWW-Authenticate")))){let s;try{s=atob(l)}catch(e){return n.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${l}`),i}await ep({scopes:Array.isArray(r)?r:[r],response:i,request:e,getAccessToken:o,logger:n},s)&&([i,a]=await eu(e,t))}}if(!a)return i;throw a}}}function eg(e){if(!e)return;let t=function(e){let t,r=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,i=/(\w+)="([^"]*)"/g,n=[];for(;null!==(t=r.exec(e));){let e,r=t[1],s=t[2],o={};for(;null!==(e=i.exec(s));)o[e[1]]=e[2];n.push({scheme:r,params:o})}return n}(e);return t.find(e=>"Bearer"===e.scheme&&e.params.claims&&"insufficient_claims"===e.params.error)?.params.claims}},28023:(e,t,r)=>{"use strict";r.d(t,{$s:()=>O,A8:()=>d,BV:()=>f,Es:()=>S,JL:()=>y,K0:()=>g,LK:()=>h,LZ:()=>k,Q5:()=>o,RV:()=>m,Tm:()=>l,UG:()=>E,W9:()=>P,_9:()=>M,_L:()=>R,_O:()=>w,cb:()=>v,cl:()=>_,m6:()=>N,mS:()=>T,nM:()=>u,pH:()=>p,rK:()=>C,sQ:()=>c,sc:()=>b,tK:()=>I,uZ:()=>x,zk:()=>A}),r(26494);var i=r(94485),n=r(2848),s=r(51642).hp;function o(e){let t=new URL(e),r=t.pathname;return t.pathname=r=encodeURIComponent(r=r||"/").replace(/%2F/g,"/").replace(/'/g,"%27").replace(/\+/g,"%20").replace(/%25/g,"%"),t.toString()}function a(e,t){for(let r of e.split(";"))if(r.trim().startsWith(t))return r.trim().match(t+"=(.*)")[1];return""}function l(e){let t="";e.startsWith("UseDevelopmentStorage=true")&&(t=function(e){let t="";if(-1!==e.search("DevelopmentStorageProxyUri="))for(let r of e.split(";"))r.trim().startsWith("DevelopmentStorageProxyUri=")&&(t=r.trim().match("DevelopmentStorageProxyUri=(.*)")[1]);return t}(e),e=n.Zp);let r=a(e,"BlobEndpoint");if(r=r.endsWith("/")?r.slice(0,-1):r,-1!==e.search("DefaultEndpointsProtocol=")&&-1!==e.search("AccountKey=")){let i="",n="",o=s.from("accountKey","base64"),l="";if(n=a(e,"AccountName"),o=s.from(a(e,"AccountKey"),"base64"),!r){let t=(i=a(e,"DefaultEndpointsProtocol")).toLowerCase();if("https"!==t&&"http"!==t)throw Error("Invalid DefaultEndpointsProtocol in the provided Connection String. Expecting 'https' or 'http'");if(!(l=a(e,"EndpointSuffix")))throw Error("Invalid EndpointSuffix in the provided Connection String");r=`${i}://${n}.blob.${l}`}if(n){if(0===o.length)throw Error("Invalid AccountKey in the provided Connection String")}else throw Error("Invalid AccountName in the provided Connection String");return{kind:"AccountConnString",url:r,accountName:n,accountKey:o,proxyUri:t}}{let t=a(e,"SharedAccessSignature"),i=a(e,"AccountName");if(i||(i=x(r)),r){if(!t)throw Error("Invalid SharedAccessSignature in the provided SAS Connection String")}else throw Error("Invalid BlobEndpoint in the provided SAS Connection String");
4return t.startsWith("?")&&(t=t.substring(1)),{kind:"SASConnString",url:r,accountName:i,accountSas:t}}}function c(e,t){let r=new URL(e),i=r.pathname;return r.pathname=i=i?i.endsWith("/")?`${i}${t}`:`${i}/${t}`:t,r.toString()}function u(e,t,r){let i=new URL(e),n=encodeURIComponent(t),s=r?encodeURIComponent(r):void 0,o=""===i.search?"?":i.search,a=[];for(let e of o.slice(1).split("&"))if(e){let[t]=e.split("=",2);t!==n&&a.push(e)}return s&&a.push(`${n}=${s}`),i.search=a.length?`?${a.join("&")}`:"",i.toString()}function h(e,t){var r;return null!=(r=new URL(e).searchParams.get(t))?r:void 0}function d(e,t){let r=new URL(e);return r.hostname=t,r.toString()}function p(e){try{return new URL(e).pathname}catch(e){return}}function f(e){try{let t=new URL(e);return t.protocol.endsWith(":")?t.protocol.slice(0,-1):t.protocol}catch(e){return}}function g(e){let t=new URL(e),r=t.pathname;if(!r)throw RangeError("Invalid url without valid path.");let i=t.search||"";return""!==(i=i.trim())&&(i=i.startsWith("?")?i:`?${i}`),`${r}${i}`}function m(e,t){let r=new URL(e),i=r.search;return i?i+="&"+t:i=t,r.search=i,r.toString()}function y(e,t=!0){let r=e.toISOString();return t?r.substring(0,r.length-1)+"0000Z":r.substring(0,r.length-5)+"Z"}function b(e,t){var r;return e.length>42&&(e=e.slice(0,42)),r=e+function(e,t,r=" "){return String.prototype.padStart?e.padStart(t,r):(r=r||" ",e.length>t)?e:((t-=e.length)>r.length&&(r+=r.repeat(t/r.length)),r.slice(0,t)+e)}(t.toString(),48-e.length,"0"),i.Ll?s.from(r).toString("base64"):btoa(r)}async function v(e,t,r){return new Promise((i,n)=>{let s,o=()=>{void 0!==s&&clearTimeout(s),n(r)};s=setTimeout(()=>{void 0!==t&&t.removeEventListener("abort",o),i()},e),void 0!==t&&t.addEventListener("abort",o)})}function w(e,t){return e.toLocaleLowerCase()===t.toLocaleLowerCase()}function x(e){let t=new URL(e);try{return"blob"===t.hostname.split(".")[1]?t.hostname.split(".")[0]:S(t)?t.pathname.split("/")[1]:""}catch(e){throw Error("Unable to extract accountName with provided information.")}}function S(e){let t=e.host;return/^.*:.*:.*$|^(localhost|host.docker.internal)(:[0-9]+)?$|^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])(\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])){3}(:[0-9]+)?$/.test(t)||!!e.port&&n.zP.includes(e.port)}function C(e){if(void 0===e)return;let t=[];for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let i=e[r];t.push(`${encodeURIComponent(r)}=${encodeURIComponent(i)}`)}return t.join("&")}function E(e){if(void 0===e)return;let t={blobTagSet:[]};for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)){let i=e[r];t.blobTagSet.push({key:r,value:i})}return t}function _(e){if(void 0===e)return;let t={};for(let r of e.blobTagSet)t[r.key]=r.value;return t}function T(e){if(void 0!==e)switch(e.kind){case"csv":return{format:{type:"delimited",delimitedTextConfiguration:{columnSeparator:e.columnSeparator||",",fieldQuote:e.fieldQuote||"",recordSeparator:e.recordSeparator,escapeChar:e.escapeCharacter||"",headersPresent:e.hasHeaders||!1}}};case"json":return{format:{type:"json",jsonTextConfiguration:{recordSeparator:e.recordSeparator}}};case"arrow":return{format:{type:"arrow",arrowConfiguration:{schema:e.schema}}};case"parquet":return{format:{type:"parquet"}};default:throw Error("Invalid BlobQueryTextConfiguration.")}}function P(e){if(!e||"policy-id"in e)return;let t=[];for(let r in e){let i=r.split("_");i[0].startsWith("or-")&&(i[0]=i[0].substring(3));let n={ruleId:i[1],replicationStatus:e[r]},s=t.findIndex(e=>e.policyId===i[0]);s>-1?t[s].rules.push(n):t.push({policyId:i[0],rules:[n]})}return t}function R(e){return e?e.scheme+" "+e.value:void 0}function I(e){return e.encoded?decodeURIComponent(e.content):e.content}function O(e){return Object.assign(Object.assign({},e),{segment:{blobItems:e.segment.blobItems.map(e=>Object.assign(Object.assign({},e),{name:I(e.name)}))}})}function A(e){var t;return Object.assign(Object.assign({},e),{segment:{blobPrefixes:null==(t=e.segment.blobPrefixes)?void 0:t.map(e=>Object.assign(Object.assign({},e),{name:I(e.name)})),blobItems:e.segment.blobItems.map(e=>Object.assign(Object.assign({},e),{name:I(e.name)}))}})}function*M(e){let t=[],r=[];e.pageRange&&(t=e.pageRange),e.clearRange&&(r=e.clearRange);let i=0,n=0;for(;i<t.length&&n<r.length;)t[i].start<r[n].start?(yield{start:t[i].start,end:t[i].end,isClear:!1},++i):(yield{start:r[n].start,end:r[n].end,isClear:!0},++n);for(;i<t.length;++i)yield{start:t[i].start,end:t[i].end,isClear:!1};for(;n<r.length;++n)yield{start:r[n].start,end:r[n].end,isClear:!0}}function k(e){let t=e.split("/");for(let e=0;e<t.length;e++)t[e]=encodeURIComponent(t[e]);return t.join("/")}function N(e){if("_response"in e)return e;throw TypeError(`Unexpected response object ${e}`)}},30927:(e,t,r)=>{"use strict";r.d(t,{N:()=>n});let i="function"==typeof globalThis?.crypto?.randomUUID?globalThis.crypto.randomUUID.bind(globalThis.crypto):function(){let e="";for(let t=0;t<32;t++){let r=Math.floor(16*Math.random());12===t?e+="4":16===t?e+=(3&r|8).toString(16):e+=r.toString(16),(7===t||11===t||15===t||19===t)&&(e+="-")}return e};function n(){return i()}},31203:(e,t,r)=>{var i=r(82909).Buffer,n=function(){"use strict";var e,t,r;function n(e,t){return null!=t&&e instanceof t}try{e=Map}catch(t){e=function(){}}try{t=Set}catch(e){t=function(){}}try{r=Promise}catch(e){r=function(){}}function s(o,l,c,u,h){"object"==typeof l&&(c=l.depth,u=l.prototype,h=l.includeNonEnumerable,l=l.circular);var d=[],p=[],f=void 0!==i;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function o(c,g){if(null===c)return null;if(0===g||"object"!=typeof c)return c;if(n(c,e))m=new e;else if(n(c,t))m=new t;else if(n(c,r))m=new r(function(e,t){c.then(function(t){e(o(t,g-1))},function(e){t(o(e,g-1))})});else if(s.__isArray(c))m=[];else if(s.__isRegExp(c))m=new RegExp(c.source,a(c)),c.lastIndex&&(m.lastIndex=c.lastIndex);else if(s.__isDate(c))m=new Date(c.getTime());else{if(f&&i.isBuffer(c))return m=i.allocUnsafe?i.allocUnsafe(c.length):new i(c.length),c.copy(m),m;n(c,Error)?m=Object.create(c):void 0===u?m=Object.create(y=Object.getPrototypeOf(c)):(m=Object.create(u),y=u)}if(l){var m,y,b,v=d.indexOf(c);if(-1!=v)return p[v];d.push(c),p.push(m)}
4for(var w in n(c,e)&&c.forEach(function(e,t){var r=o(t,g-1),i=o(e,g-1);m.set(r,i)}),n(c,t)&&c.forEach(function(e){var t=o(e,g-1);m.add(t)}),c)y&&(b=Object.getOwnPropertyDescriptor(y,w)),b&&null==b.set||(m[w]=o(c[w],g-1));if(Object.getOwnPropertySymbols)for(var x=Object.getOwnPropertySymbols(c),w=0;w<x.length;w++){var S=x[w],C=Object.getOwnPropertyDescriptor(c,S);(!C||C.enumerable||h)&&(m[S]=o(c[S],g-1),C.enumerable||Object.defineProperty(m,S,{enumerable:!1}))}if(h)for(var E=Object.getOwnPropertyNames(c),w=0;w<E.length;w++){var _=E[w],C=Object.getOwnPropertyDescriptor(c,_);C&&C.enumerable||(m[_]=o(c[_],g-1),Object.defineProperty(m,_,{enumerable:!1}))}return m}(o,c)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return s.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},s.__objToStr=o,s.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},s.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},s.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},s.__getRegExpFlags=a,s}();e.exports&&(e.exports=n)},33501:(e,t,r)=>{"use strict";function i(e,t){switch(t){case"utf-8":var r;return r=e,new TextEncoder().encode(r);case"base64":return n(e);case"base64url":return n(e.replace(/-/g,"+").replace(/_/g,"/"));case"hex":var i=e;let o=new Uint8Array(i.length/2);for(let e=0;e<i.length/2;++e){let t=i[2*e],r=i[2*e+1];if(!s.has(t)||!s.has(r))return o.slice(0,e);o[e]=parseInt(`${t}${r}`,16)}return o}}function n(e){return new Uint8Array([...atob(e)].map(e=>e.charCodeAt(0)))}r.d(t,{Al:()=>i});let s=new Set("0123456789abcdefABCDEF")},33775:(e,t,r)=>{"use strict";r.d(t,{Bd:()=>i,N6:()=>s,Qg:()=>o,lV:()=>c,p7:()=>n,qx:()=>a,tX:()=>l});let i="undefined"!=typeof window&&void 0!==window.document,n="object"==typeof self&&"function"==typeof self?.importScripts&&(self.constructor?.name==="DedicatedWorkerGlobalScope"||self.constructor?.name==="ServiceWorkerGlobalScope"||self.constructor?.name==="SharedWorkerGlobalScope"),s="undefined"!=typeof Deno&&void 0!==Deno.version&&void 0!==Deno.version.deno,o="undefined"!=typeof Bun&&void 0!==Bun.version,a=void 0!==globalThis.process&&!!globalThis.process.version&&!!globalThis.process.versions?.node,l=a&&!o&&!s,c="undefined"!=typeof navigator&&navigator?.product==="ReactNative"},34046:(e,t,r)=>{"use strict";async function i(e){let t=new FileReader;return new Promise((r,i)=>{t.onloadend=e=>{r(e.target.result)},t.onerror=i,t.readAsText(e)})}function n(){}function s(){}r.d(t,{GV:()=>n,Xl:()=>s,ib:()=>a,kE:()=>i,uu:()=>o});let o=function(){},a=function(){}},35978:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,i=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var n=Number.isNaN||function(e){return e!=e};function s(){s.init.call(this)}e.exports=s,e.exports.once=function(e,t){return new Promise(function(r,i){var n,s,o;function a(r){e.removeListener(t,l),i(r)}function l(){"function"==typeof e.removeListener&&e.removeListener("error",a),r([].slice.call(arguments))}g(e,t,l,{once:!0}),"error"!==t&&(n=e,s=a,o={once:!0},"function"==typeof n.on&&g(n,"error",s,o))})},s.EventEmitter=s,s.prototype._events=void 0,s.prototype._eventsCount=0,s.prototype._maxListeners=void 0;var o=10;function a(e){if("function"!=typeof e)throw TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function l(e){return void 0===e._maxListeners?s.defaultMaxListeners:e._maxListeners}function c(e,t,r,i){if(a(r),void 0===(s=e._events)?(s=e._events=Object.create(null),e._eventsCount=0):(void 0!==s.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),s=e._events),o=s[t]),void 0===o)o=s[t]=r,++e._eventsCount;else if("function"==typeof o?o=s[t]=i?[r,o]:[o,r]:i?o.unshift(r):o.push(r),(n=l(e))>0&&o.length>n&&!o.warned){o.warned=!0;var n,s,o,c=Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");c.name="MaxListenersExceededWarning",c.emitter=e,c.type=t,c.count=o.length,console&&console.warn&&console.warn(c)}return e}function u(){if(!this.fired)return(this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0==arguments.length)?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function h(e,t,r){var i={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},n=u.bind(i);return n.listener=r,i.wrapFn=n,n}function d(e,t,r){var i=e._events;if(void 0===i)return[];var n=i[t];return void 0===n?[]:"function"==typeof n?r?[n.listener||n]:[n]:r?function(e){for(var t=Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(n):f(n,n.length)}function p(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function f(e,t){for(var r=Array(t),i=0;i<t;++i)r[i]=e[i];return r}
4function g(e,t,r,i){if("function"==typeof e.on)i.once?e.once(t,r):e.on(t,r);else if("function"==typeof e.addEventListener)e.addEventListener(t,function n(s){i.once&&e.removeEventListener(t,n),r(s)});else throw TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e)}Object.defineProperty(s,"defaultMaxListeners",{enumerable:!0,get:function(){return o},set:function(e){if("number"!=typeof e||e<0||n(e))throw RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");o=e}}),s.init=function(){(void 0===this._events||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},s.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||n(e))throw RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},s.prototype.getMaxListeners=function(){return l(this)},s.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var n="error"===e,s=this._events;if(void 0!==s)n=n&&void 0===s.error;else if(!n)return!1;if(n){if(t.length>0&&(o=t[0]),o instanceof Error)throw o;var o,a=Error("Unhandled error."+(o?" ("+o.message+")":""));throw a.context=o,a}var l=s[e];if(void 0===l)return!1;if("function"==typeof l)i(l,this,t);else for(var c=l.length,u=f(l,c),r=0;r<c;++r)i(u[r],this,t);return!0},s.prototype.addListener=function(e,t){return c(this,e,t,!1)},s.prototype.on=s.prototype.addListener,s.prototype.prependListener=function(e,t){return c(this,e,t,!0)},s.prototype.once=function(e,t){return a(t),this.on(e,h(this,e,t)),this},s.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,h(this,e,t)),this},s.prototype.removeListener=function(e,t){var r,i,n,s,o;if(a(t),void 0===(i=this._events)||void 0===(r=i[e]))return this;if(r===t||r.listener===t)0==--this._eventsCount?this._events=Object.create(null):(delete i[e],i.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(n=-1,s=r.length-1;s>=0;s--)if(r[s]===t||r[s].listener===t){o=r[s].listener,n=s;break}if(n<0)return this;0===n?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,n),1===r.length&&(i[e]=r[0]),void 0!==i.removeListener&&this.emit("removeListener",e,o||t)}return this},s.prototype.off=s.prototype.removeListener,s.prototype.removeAllListeners=function(e){var t,r,i;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0==--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0==arguments.length){var n,s=Object.keys(r);for(i=0;i<s.length;++i)"removeListener"!==(n=s[i])&&this.removeAllListeners(n);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(i=t.length-1;i>=0;i--)this.removeListener(e,t[i]);return this},s.prototype.listeners=function(e){return d(this,e,!0)},s.prototype.rawListeners=function(e){return d(this,e,!1)},s.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):p.call(e,t)},s.prototype.listenerCount=p,s.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},39208:(e,t,r)=>{"use strict";r.d(t,{If:()=>o.I,Bd:()=>s.Bd,Qg:()=>s.Qg,N6:()=>s.N6,bJ:()=>i.b,qx:()=>s.qx,tX:()=>s.tX,lV:()=>s.lV,p7:()=>s.p7,N4:()=>n.N});var i=r(40780);r(33501);var n=r(30927),s=r(33775),o=r(78146)},40780:(e,t,r)=>{"use strict";r.d(t,{b:()=>n});var i=r(93629);function n(e){if((0,i.G)(e)){let t="string"==typeof e.name,r="string"==typeof e.message;return t&&r}return!1}},40943:function(e,t,r){(function(){(e.exports=r(52112)).version="5.1.2"}).call(this)},41553:(e,t,r)=>{"use strict";r.d(t,{L:()=>o});var i=r(42912),n=r(72187),s=r(28023);class o{constructor(e,t){this.url=(0,s.Q5)(e),this.accountName=(0,s.uZ)(e),this.pipeline=t,this.storageClientContext=new i.S(this.url,(0,n.Vn)(t)),this.isHttps=(0,s._O)((0,s.BV)(this.url)||"","https"),this.credential=(0,n.Uv)(t),this.storageClientContext.requestContentType=void 0}}},42912:(e,t,r)=>{"use strict";r.d(t,{S:()=>rc});var i=r(54247),n=r(73035),s=r(62495);let o={parameterPath:["options","contentType"],mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},a={parameterPath:"blobServiceProperties",mapper:s.BlobServiceProperties},l={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},c={parameterPath:"url",mapper:{serializedName:"url",required:!0,xmlName:"url",type:{name:"String"}},skipEncoding:!0},u={parameterPath:"restype",mapper:{defaultValue:"service",isConstant:!0,serializedName:"restype",type:{name:"String"}}},h={parameterPath:"comp",mapper:{defaultValue:"properties",isConstant:!0,serializedName:"
4comp",type:{name:"String"}}},d={parameterPath:["options","timeoutInSeconds"],mapper:{constraints:{InclusiveMinimum:0},serializedName:"timeout",xmlName:"timeout",type:{name:"Number"}}},p={parameterPath:"version",mapper:{defaultValue:"2025-05-05",isConstant:!0,serializedName:"x-ms-version",type:{name:"String"}}},f={parameterPath:["options","requestId"],mapper:{serializedName:"x-ms-client-request-id",xmlName:"x-ms-client-request-id",type:{name:"String"}}},g={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},m={parameterPath:"comp",mapper:{defaultValue:"list",isConstant:!0,serializedName:"comp",type:{name:"String"}}},y={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",xmlName:"prefix",type:{name:"String"}}},b={parameterPath:["options","marker"],mapper:{serializedName:"marker",xmlName:"marker",type:{name:"String"}}},v={parameterPath:["options","maxPageSize"],mapper:{constraints:{InclusiveMinimum:1},serializedName:"maxresults",xmlName:"maxresults",type:{name:"Number"}}},w={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListContainersIncludeType",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["metadata","deleted","system"]}}}},collectionFormat:"CSV"},x={parameterPath:"keyInfo",mapper:s.KeyInfo},S={parameterPath:"restype",mapper:{defaultValue:"account",isConstant:!0,serializedName:"restype",type:{name:"String"}}},C={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},E={parameterPath:"comp",mapper:{defaultValue:"batch",isConstant:!0,serializedName:"comp",type:{name:"String"}}},_={parameterPath:"contentLength",mapper:{serializedName:"Content-Length",required:!0,xmlName:"Content-Length",type:{name:"Number"}}},T={parameterPath:"multipartContentType",mapper:{serializedName:"Content-Type",required:!0,xmlName:"Content-Type",type:{name:"String"}}},P={parameterPath:"comp",mapper:{defaultValue:"blobs",isConstant:!0,serializedName:"comp",type:{name:"String"}}},R={parameterPath:["options","where"],mapper:{serializedName:"where",xmlName:"where",type:{name:"String"}}},I={parameterPath:"restype",mapper:{defaultValue:"container",isConstant:!0,serializedName:"restype",type:{name:"String"}}},O={parameterPath:["options","metadata"],mapper:{serializedName:"x-ms-meta",xmlName:"x-ms-meta",headerCollectionPrefix:"x-ms-meta-",type:{name:"Dictionary",value:{type:{name:"String"}}}}},A={parameterPath:["options","access"],mapper:{serializedName:"x-ms-blob-public-access",xmlName:"x-ms-blob-public-access",type:{name:"Enum",allowedValues:["container","blob"]}}},M={parameterPath:["options","leaseAccessConditions","leaseId"],mapper:{serializedName:"x-ms-lease-id",xmlName:"x-ms-lease-id",type:{name:"String"}}},k={parameterPath:["options","modifiedAccessConditions","ifModifiedSince"],mapper:{serializedName:"If-Modified-Since",xmlName:"If-Modified-Since",type:{name:"DateTimeRfc1123"}}},N={parameterPath:["options","modifiedAccessConditions","ifUnmodifiedSince"],mapper:{serializedName:"If-Unmodified-Since",xmlName:"If-Unmodified-Since",type:{name:"DateTimeRfc1123"}}},L={parameterPath:"comp",mapper:{defaultValue:"metadata",isConstant:!0,serializedName:"comp",type:{name:"String"}}},D={parameterPath:"comp",mapper:{defaultValue:"acl",isConstant:!0,serializedName:"comp",type:{name:"String"}}},B={parameterPath:"comp",mapper:{defaultValue:"undelete",isConstant:!0,serializedName:"comp",type:{name:"String"}}},q={parameterPath:"comp",mapper:{defaultValue:"lease",isConstant:!0,serializedName:"comp",type:{name:"String"}}},U={parameterPath:"action",mapper:{defaultValue:"acquire",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},H={parameterPath:["options","duration"],mapper:{serializedName:"x-ms-lease-duration",xmlName:"x-ms-lease-duration",type:{name:"Number"}}},z={parameterPath:["options","proposedLeaseId"],mapper:{serializedName:"x-ms-proposed-lease-id",xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},F={parameterPath:"action",mapper:{defaultValue:"release",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},j={parameterPath:"leaseId",mapper:{serializedName:"x-ms-lease-id",required:!0,xmlName:"x-ms-lease-id",type:{name:"String"}}},$={parameterPath:"action",mapper:{defaultValue:"renew",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},K={parameterPath:"action",mapper:{defaultValue:"break",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},V={parameterPath:["options","breakPeriod"],mapper:{serializedName:"x-ms-lease-break-period",xmlName:"x-ms-lease-break-period",type:{name:"Number"}}},W={parameterPath:"action",mapper:{defaultValue:"change",isConstant:!0,serializedName:"x-ms-lease-action",type:{name:"String"}}},Q={parameterPath:"proposedLeaseId",mapper:{serializedName:"x-ms-proposed-lease-id",required:!0,xmlName:"x-ms-proposed-lease-id",type:{name:"String"}}},G={parameterPath:["options","include"],mapper:{serializedName:"include",xmlName:"include",xmlElementName:"ListBlobsIncludeItem",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["copy","deleted","metadata","
4snapshots","uncommittedblobs","versions","tags","immutabilitypolicy","legalhold","deletedwithversions"]}}}},collectionFormat:"CSV"},X={parameterPath:["options","snapshot"],mapper:{serializedName:"snapshot",xmlName:"snapshot",type:{name:"String"}}},J={parameterPath:["options","versionId"],mapper:{serializedName:"versionid",xmlName:"versionid",type:{name:"String"}}},Y={parameterPath:["options","range"],mapper:{serializedName:"x-ms-range",xmlName:"x-ms-range",type:{name:"String"}}},Z={parameterPath:["options","cpkInfo","encryptionKey"],mapper:{serializedName:"x-ms-encryption-key",xmlName:"x-ms-encryption-key",type:{name:"String"}}},ee={parameterPath:["options","cpkInfo","encryptionKeySha256"],mapper:{serializedName:"x-ms-encryption-key-sha256",xmlName:"x-ms-encryption-key-sha256",type:{name:"String"}}},et={parameterPath:["options","cpkInfo","encryptionAlgorithm"],mapper:{serializedName:"x-ms-encryption-algorithm",xmlName:"x-ms-encryption-algorithm",type:{name:"String"}}},er={parameterPath:["options","modifiedAccessConditions","ifMatch"],mapper:{serializedName:"If-Match",xmlName:"If-Match",type:{name:"String"}}},ei={parameterPath:["options","modifiedAccessConditions","ifNoneMatch"],mapper:{serializedName:"If-None-Match",xmlName:"If-None-Match",type:{name:"String"}}},en={parameterPath:["options","modifiedAccessConditions","ifTags"],mapper:{serializedName:"x-ms-if-tags",xmlName:"x-ms-if-tags",type:{name:"String"}}},es={parameterPath:["options","blobHttpHeaders","blobCacheControl"],mapper:{serializedName:"x-ms-blob-cache-control",xmlName:"x-ms-blob-cache-control",type:{name:"String"}}},eo={parameterPath:["options","blobHttpHeaders","blobContentType"],mapper:{serializedName:"x-ms-blob-content-type",xmlName:"x-ms-blob-content-type",type:{name:"String"}}},ea={parameterPath:["options","blobHttpHeaders","blobContentMD5"],mapper:{serializedName:"x-ms-blob-content-md5",xmlName:"x-ms-blob-content-md5",type:{name:"ByteArray"}}},el={parameterPath:["options","blobHttpHeaders","blobContentEncoding"],mapper:{serializedName:"x-ms-blob-content-encoding",xmlName:"x-ms-blob-content-encoding",type:{name:"String"}}},ec={parameterPath:["options","blobHttpHeaders","blobContentLanguage"],mapper:{serializedName:"x-ms-blob-content-language",xmlName:"x-ms-blob-content-language",type:{name:"String"}}},eu={parameterPath:["options","blobHttpHeaders","blobContentDisposition"],mapper:{serializedName:"x-ms-blob-content-disposition",xmlName:"x-ms-blob-content-disposition",type:{name:"String"}}},eh={parameterPath:"comp",mapper:{defaultValue:"immutabilityPolicies",isConstant:!0,serializedName:"comp",type:{name:"String"}}},ed={parameterPath:["options","immutabilityPolicyExpiry"],mapper:{serializedName:"x-ms-immutability-policy-until-date",xmlName:"x-ms-immutability-policy-until-date",type:{name:"DateTimeRfc1123"}}},ep={parameterPath:["options","immutabilityPolicyMode"],mapper:{serializedName:"x-ms-immutability-policy-mode",xmlName:"x-ms-immutability-policy-mode",type:{name:"Enum",allowedValues:["Mutable","Unlocked","Locked"]}}},ef={parameterPath:["options","encryptionScope"],mapper:{serializedName:"x-ms-encryption-scope",xmlName:"x-ms-encryption-scope",type:{name:"String"}}},eg={parameterPath:["options","tier"],mapper:{serializedName:"x-ms-access-tier",xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}},em={parameterPath:["options","rehydratePriority"],mapper:{serializedName:"x-ms-rehydrate-priority",xmlName:"x-ms-rehydrate-priority",type:{name:"Enum",allowedValues:["High","Standard"]}}},ey={parameterPath:["options","sourceModifiedAccessConditions","sourceIfModifiedSince"],mapper:{serializedName:"x-ms-source-if-modified-since",xmlName:"x-ms-source-if-modified-since",type:{name:"DateTimeRfc1123"}}},eb={parameterPath:["options","sourceModifiedAccessConditions","sourceIfUnmodifiedSince"],mapper:{serializedName:"x-ms-source-if-unmodified-since",xmlName:"x-ms-source-if-unmodified-since",type:{name:"DateTimeRfc1123"}}},ev={parameterPath:["options","sourceModifiedAccessConditions","sourceIfMatch"],mapper:{serializedName:"x-ms-source-if-match",xmlName:"x-ms-source-if-match",type:{name:"String"}}},ew={parameterPath:["options","sourceModifiedAccessConditions","sourceIfNoneMatch"],mapper:{serializedName:"x-ms-source-if-none-match",xmlName:"x-ms-source-if-none-match",type:{name:"String"}}},ex={parameterPath:["options","sourceModifiedAccessConditions","sourceIfTags"],mapper:{serializedName:"x-ms-source-if-tags",xmlName:"x-ms-source-if-tags",type:{name:"String"}}},eS={parameterPath:"copySource",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},eC={parameterPath:["options","blobTagsString"],mapper:{serializedName:"x-ms-tags",xmlName:"x-ms-tags",type:{name:"String"}}},eE={parameterPath:["options","legalHold"],mapper:{serializedName:"x-ms-legal-hold",xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}},e_={parameterPath:["options","sourceContentMD5"],mapper:{serializedName:"x-ms-source-content-md5",xmlName:"x-ms-source-content-md5",type:{name:"ByteArray"}}},eT={parameterPath:["options","copySourceAuthorization"],mapper:{serializedName:"x-ms-copy-source-authorization",xmlName:"x-ms-copy-source-authorization",type:{name:"String"}}},eP={parameterPath:["options","copySourceTags"],mapper:{serializedName:"x-ms-copy-source-tag-option",xmlName:"x-ms-copy-source-tag-option",type:{name:"Enum",allowedValues:["REPLACE","COPY"]}}},eR={parameterPath:["options","queryRequest"],mapper:s.QueryRequest},eI={parameterPath:"comp",mapper:{defaultValue:"tags",isConstant:!0,serializedName:"
4comp",type:{name:"String"}}},eO={parameterPath:["options","tags"],mapper:s.BlobTags},eA={parameterPath:["options","transactionalContentMD5"],mapper:{serializedName:"Content-MD5",xmlName:"Content-MD5",type:{name:"ByteArray"}}},eM={parameterPath:["options","transactionalContentCrc64"],mapper:{serializedName:"x-ms-content-crc64",xmlName:"x-ms-content-crc64",type:{name:"ByteArray"}}},ek={parameterPath:"blobContentLength",mapper:{serializedName:"x-ms-blob-content-length",required:!0,xmlName:"x-ms-blob-content-length",type:{name:"Number"}}},eN={parameterPath:["options","blobSequenceNumber"],mapper:{defaultValue:0,serializedName:"x-ms-blob-sequence-number",xmlName:"x-ms-blob-sequence-number",type:{name:"Number"}}},eL={parameterPath:["options","contentType"],mapper:{defaultValue:"application/octet-stream",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},eD={parameterPath:"body",mapper:{serializedName:"body",required:!0,xmlName:"body",type:{name:"Stream"}}},eB={parameterPath:"accept",mapper:{defaultValue:"application/xml",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},eq={parameterPath:"comp",mapper:{defaultValue:"page",isConstant:!0,serializedName:"comp",type:{name:"String"}}},eU={parameterPath:"pageWrite",mapper:{defaultValue:"update",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}},eH={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThanOrEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-le",xmlName:"x-ms-if-sequence-number-le",type:{name:"Number"}}},ez={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberLessThan"],mapper:{serializedName:"x-ms-if-sequence-number-lt",xmlName:"x-ms-if-sequence-number-lt",type:{name:"Number"}}},eF={parameterPath:["options","sequenceNumberAccessConditions","ifSequenceNumberEqualTo"],mapper:{serializedName:"x-ms-if-sequence-number-eq",xmlName:"x-ms-if-sequence-number-eq",type:{name:"Number"}}},ej={parameterPath:"sourceUrl",mapper:{serializedName:"x-ms-copy-source",required:!0,xmlName:"x-ms-copy-source",type:{name:"String"}}},e$={parameterPath:["options","sourceContentCrc64"],mapper:{serializedName:"x-ms-source-content-crc64",xmlName:"x-ms-source-content-crc64",type:{name:"ByteArray"}}},eK={parameterPath:"comp",mapper:{defaultValue:"pagelist",isConstant:!0,serializedName:"comp",type:{name:"String"}}},eV={parameterPath:"comp",mapper:{defaultValue:"appendblock",isConstant:!0,serializedName:"comp",type:{name:"String"}}},eW={parameterPath:["options","appendPositionAccessConditions","maxSize"],mapper:{serializedName:"x-ms-blob-condition-maxsize",xmlName:"x-ms-blob-condition-maxsize",type:{name:"Number"}}},eQ={parameterPath:["options","appendPositionAccessConditions","appendPosition"],mapper:{serializedName:"x-ms-blob-condition-appendpos",xmlName:"x-ms-blob-condition-appendpos",type:{name:"Number"}}},eG={parameterPath:["options","sourceRange"],mapper:{serializedName:"x-ms-source-range",xmlName:"x-ms-source-range",type:{name:"String"}}},eX={parameterPath:"blobType",mapper:{defaultValue:"BlockBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},eJ={parameterPath:"comp",mapper:{defaultValue:"block",isConstant:!0,serializedName:"comp",type:{name:"String"}}},eY={parameterPath:"blockId",mapper:{serializedName:"blockid",required:!0,xmlName:"blockid",type:{name:"String"}}},eZ={parameterPath:"blocks",mapper:s.BlockLookupList},e0={parameterPath:"comp",mapper:{defaultValue:"blocklist",isConstant:!0,serializedName:"comp",type:{name:"String"}}};class e1{constructor(e){this.client=e}setProperties(e,t){return this.client.sendOperationRequest({blobServiceProperties:e,options:t},e3)}getProperties(e){return this.client.sendOperationRequest({options:e},e6)}getStatistics(e){return this.client.sendOperationRequest({options:e},e5)}listContainersSegment(e){return this.client.sendOperationRequest({options:e},e4)}getUserDelegationKey(e,t){return this.client.sendOperationRequest({keyInfo:e,options:t},e8)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},e7)}submitBatch(e,t,r,i){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:r,options:i},e9)}filterBlobs(e){return this.client.sendOperationRequest({options:e},te)}}
4let e2=n.rl(s,!0),e3={path:"/",httpMethod:"PUT",responses:{202:{headersMapper:s.ServiceSetPropertiesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceSetPropertiesExceptionHeaders}},requestBody:a,queryParameters:[u,h,d],urlParameters:[c],headerParameters:[o,l,p,f],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:e2},e6={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:s.BlobServiceProperties,headersMapper:s.ServiceGetPropertiesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceGetPropertiesExceptionHeaders}},queryParameters:[u,h,d],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:e2},e5={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:s.BlobServiceStatistics,headersMapper:s.ServiceGetStatisticsHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceGetStatisticsExceptionHeaders}},queryParameters:[u,d,{parameterPath:"comp",mapper:{defaultValue:"stats",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:e2},e4={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:s.ListContainersSegmentResponse,headersMapper:s.ServiceListContainersSegmentHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceListContainersSegmentExceptionHeaders}},queryParameters:[d,m,y,b,v,w],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:e2},e8={path:"/",httpMethod:"POST",responses:{200:{bodyMapper:s.UserDelegationKey,headersMapper:s.ServiceGetUserDelegationKeyHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceGetUserDelegationKeyExceptionHeaders}},requestBody:x,queryParameters:[u,d,{parameterPath:"comp",mapper:{defaultValue:"userdelegationkey",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[o,l,p,f],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:e2},e7={path:"/",httpMethod:"GET",responses:{200:{headersMapper:s.ServiceGetAccountInfoHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceGetAccountInfoExceptionHeaders}},queryParameters:[h,d,S],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:e2},e9={path:"/",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:s.ServiceSubmitBatchHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceSubmitBatchExceptionHeaders}},requestBody:C,queryParameters:[d,E],urlParameters:[c],headerParameters:[l,p,f,_,T],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:e2},te={path:"/",httpMethod:"GET",responses:{200:{bodyMapper:s.FilterBlobSegment,headersMapper:s.ServiceFilterBlobsHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ServiceFilterBlobsExceptionHeaders}},queryParameters:[d,b,v,P,R],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:e2};class tt{constructor(e){this.client=e}create(e){return this.client.sendOperationRequest({options:e},ti)}getProperties(e){return this.client.sendOperationRequest({options:e},tn)}delete(e){return this.client.sendOperationRequest({options:e},ts)}setMetadata(e){return this.client.sendOperationRequest({options:e},to)}getAccessPolicy(e){return this.client.sendOperationRequest({options:e},ta)}setAccessPolicy(e){return this.client.sendOperationRequest({options:e},tl)}restore(e){return this.client.sendOperationRequest({options:e},tc)}rename(e,t){return this.client.sendOperationRequest({sourceContainerName:e,options:t},tu)}submitBatch(e,t,r,i){return this.client.sendOperationRequest({contentLength:e,multipartContentType:t,body:r,options:i},th)}filterBlobs(e){return this.client.sendOperationRequest({options:e},td)}acquireLease(e){return this.client.sendOperationRequest({options:e},tp)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},tf)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},tg)}breakLease(e){return this.client.sendOperationRequest({options:e},tm)}changeLease(e,t,r){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:r},ty)}listBlobFlatSegment(e){return this.client.sendOperationRequest({options:e},tb)}listBlobHierarchySegment(e,t){return this.client.sendOperationRequest({delimiter:e,options:t},tv)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},tw)}}let tr=n.rl(s,!0),ti={path:"/{containerName}
4",httpMethod:"PUT",responses:{201:{headersMapper:s.ContainerCreateHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerCreateExceptionHeaders}},queryParameters:[d,I],urlParameters:[c],headerParameters:[p,f,g,O,A,{parameterPath:["options","containerEncryptionScope","defaultEncryptionScope"],mapper:{serializedName:"x-ms-default-encryption-scope",xmlName:"x-ms-default-encryption-scope",type:{name:"String"}}},{parameterPath:["options","containerEncryptionScope","preventEncryptionScopeOverride"],mapper:{serializedName:"x-ms-deny-encryption-scope-override",xmlName:"x-ms-deny-encryption-scope-override",type:{name:"Boolean"}}}],isXML:!0,serializer:tr},tn={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:s.ContainerGetPropertiesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerGetPropertiesExceptionHeaders}},queryParameters:[d,I],urlParameters:[c],headerParameters:[p,f,g,M],isXML:!0,serializer:tr},ts={path:"/{containerName}",httpMethod:"DELETE",responses:{202:{headersMapper:s.ContainerDeleteHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerDeleteExceptionHeaders}},queryParameters:[d,I],urlParameters:[c],headerParameters:[p,f,g,M,k,N],isXML:!0,serializer:tr},to={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:s.ContainerSetMetadataHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerSetMetadataExceptionHeaders}},queryParameters:[d,I,L],urlParameters:[c],headerParameters:[p,f,g,O,M,k],isXML:!0,serializer:tr},ta={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}},serializedName:"SignedIdentifiers",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier"},headersMapper:s.ContainerGetAccessPolicyHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerGetAccessPolicyExceptionHeaders}},queryParameters:[d,I,D],urlParameters:[c],headerParameters:[p,f,g,M],isXML:!0,serializer:tr},tl={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:s.ContainerSetAccessPolicyHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerSetAccessPolicyExceptionHeaders}},requestBody:{parameterPath:["options","containerAcl"],mapper:{serializedName:"containerAcl",xmlName:"SignedIdentifiers",xmlIsWrapped:!0,xmlElementName:"SignedIdentifier",type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedIdentifier"}}}}},queryParameters:[d,I,D],urlParameters:[c],headerParameters:[o,l,p,f,A,M,k,N],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:tr},tc={path:"/{containerName}",httpMethod:"PUT",responses:{201:{headersMapper:s.ContainerRestoreHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerRestoreExceptionHeaders}},queryParameters:[d,I,B],urlParameters:[c],headerParameters:[p,f,g,{parameterPath:["options","deletedContainerName"],mapper:{serializedName:"x-ms-deleted-container-name",xmlName:"x-ms-deleted-container-name",type:{name:"String"}}},{parameterPath:["options","deletedContainerVersion"],mapper:{serializedName:"x-ms-deleted-container-version",xmlName:"x-ms-deleted-container-version",type:{name:"String"}}}],isXML:!0,serializer:tr},tu={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:s.ContainerRenameHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerRenameExceptionHeaders}},queryParameters:[d,I,{parameterPath:"comp",mapper:{defaultValue:"rename",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,{parameterPath:"sourceContainerName",mapper:{serializedName:"x-ms-source-container-name",required:!0,xmlName:"x-ms-source-container-name",type:{name:"String"}}},{parameterPath:["options","sourceLeaseId"],mapper:{serializedName:"x-ms-source-lease-id",xmlName:"x-ms-source-lease-id",type:{name:"String"}}}],isXML:!0,serializer:tr},th={path:"/{containerName}",httpMethod:"POST",responses:{202:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:s.ContainerSubmitBatchHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerSubmitBatchExceptionHeaders}},requestBody:C,queryParameters:[d,E,I],urlParameters:[c],headerParameters:[l,p,f,_,T],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:tr},td={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:s.FilterBlobSegment,headersMapper:s.ContainerFilterBlobsHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerFilterBlobsExceptionHeaders}},queryParameters:[d,b,v,P,R,I],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tr},tp={path:"/{containerName}
4",httpMethod:"PUT",responses:{201:{headersMapper:s.ContainerAcquireLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerAcquireLeaseExceptionHeaders}},queryParameters:[d,I,q],urlParameters:[c],headerParameters:[p,f,g,k,N,U,H,z],isXML:!0,serializer:tr},tf={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:s.ContainerReleaseLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerReleaseLeaseExceptionHeaders}},queryParameters:[d,I,q],urlParameters:[c],headerParameters:[p,f,g,k,N,F,j],isXML:!0,serializer:tr},tg={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:s.ContainerRenewLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerRenewLeaseExceptionHeaders}},queryParameters:[d,I,q],urlParameters:[c],headerParameters:[p,f,g,k,N,j,$],isXML:!0,serializer:tr},tm={path:"/{containerName}",httpMethod:"PUT",responses:{202:{headersMapper:s.ContainerBreakLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerBreakLeaseExceptionHeaders}},queryParameters:[d,I,q],urlParameters:[c],headerParameters:[p,f,g,k,N,K,V],isXML:!0,serializer:tr},ty={path:"/{containerName}",httpMethod:"PUT",responses:{200:{headersMapper:s.ContainerChangeLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerChangeLeaseExceptionHeaders}},queryParameters:[d,I,q],urlParameters:[c],headerParameters:[p,f,g,k,N,j,W,Q],isXML:!0,serializer:tr},tb={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:s.ListBlobsFlatSegmentResponse,headersMapper:s.ContainerListBlobFlatSegmentHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerListBlobFlatSegmentExceptionHeaders}},queryParameters:[d,m,y,b,v,I,G],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tr},tv={path:"/{containerName}",httpMethod:"GET",responses:{200:{bodyMapper:s.ListBlobsHierarchySegmentResponse,headersMapper:s.ContainerListBlobHierarchySegmentHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerListBlobHierarchySegmentExceptionHeaders}},queryParameters:[d,m,y,b,v,I,G,{parameterPath:"delimiter",mapper:{serializedName:"delimiter",required:!0,xmlName:"delimiter",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tr},tw={path:"/{containerName}",httpMethod:"GET",responses:{200:{headersMapper:s.ContainerGetAccountInfoHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.ContainerGetAccountInfoExceptionHeaders}},queryParameters:[h,d,S],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tr};class tx{constructor(e){this.client=e}download(e){return this.client.sendOperationRequest({options:e},tC)}getProperties(e){return this.client.sendOperationRequest({options:e},tE)}delete(e){return this.client.sendOperationRequest({options:e},t_)}undelete(e){return this.client.sendOperationRequest({options:e},tT)}setExpiry(e,t){return this.client.sendOperationRequest({expiryOptions:e,options:t},tP)}setHttpHeaders(e){return this.client.sendOperationRequest({options:e},tR)}setImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},tI)}deleteImmutabilityPolicy(e){return this.client.sendOperationRequest({options:e},tO)}setLegalHold(e,t){return this.client.sendOperationRequest({legalHold:e,options:t},tA)}setMetadata(e){return this.client.sendOperationRequest({options:e},tM)}acquireLease(e){return this.client.sendOperationRequest({options:e},tk)}releaseLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},tN)}renewLease(e,t){return this.client.sendOperationRequest({leaseId:e,options:t},tL)}changeLease(e,t,r){return this.client.sendOperationRequest({leaseId:e,proposedLeaseId:t,options:r},tD)}breakLease(e){return this.client.sendOperationRequest({options:e},tB)}createSnapshot(e){return this.client.sendOperationRequest({options:e},tq)}startCopyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},tU)}copyFromURL(e,t){return this.client.sendOperationRequest({copySource:e,options:t},tH)}abortCopyFromURL(e,t){return this.client.sendOperationRequest({copyId:e,options:t},tz)}setTier(e,t){return this.client.sendOperationRequest({tier:e,options:t},tF)}getAccountInfo(e){return this.client.sendOperationRequest({options:e},tj)}query(e){return this.client.sendOperationRequest({options:e},t$)}getTags(e){return this.client.sendOperationRequest({options:e},tK)}setTags(e){return this.client.sendOperationRequest({options:e},tV)}}let tS=n.rl(s,!0),tC={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:s.BlobDownloadHeaders},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:s.BlobDownloadHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobDownloadExceptionHeaders}},queryParameters:[d,X,J],urlParameters:[c],headerParameters:[p,f,g,M,k,N,Y,{parameterPath:["options","rangeGetContentMD5"],mapper:{serializedName:"x-ms-range-get-content-md5",xmlName:"x-ms-range-get-content-md5",type:{name:"Boolean"}}},{parameterPath:["options","rangeGetContentCRC64"],mapper:{serializedName:"x-ms-range-get-content-crc64",xmlName:"x-ms-range-get-content-crc64",type:{name:"Boolean"}}},Z,ee,et,er,ei,en],isXML:!0,serializer:tS},tE={path:"/{containerName}/{blob}",httpMethod:"HEAD",responses:{200:{headersMapper:s.BlobGetPropertiesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobGetPropertiesExceptionHeaders}},queryParameters:[d,X,J],urlParameters:[c],headerParameters:[p,f,g,M,k,N,Z,ee,et,er,ei,en],isXML:!0,serializer:tS},t_={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{202:{headersMapper:s.BlobDeleteHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobDeleteExceptionHeaders}},queryParameters:[d,X,J,{parameterPath:["options","blobDeleteType"],mapper:{serializedName:"deletetype",xmlName:"deletetype",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,M,k,N,er,ei,en,{parameterPath:["options","deleteSnapshots"],mapper:{serializedName:"x-ms-delete-snapsh
4ots",xmlName:"x-ms-delete-snapshots",type:{name:"Enum",allowedValues:["include","only"]}}}],isXML:!0,serializer:tS},tT={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobUndeleteHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobUndeleteExceptionHeaders}},queryParameters:[d,B],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tS},tP={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobSetExpiryHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetExpiryExceptionHeaders}},queryParameters:[d,{parameterPath:"comp",mapper:{defaultValue:"expiry",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,{parameterPath:"expiryOptions",mapper:{serializedName:"x-ms-expiry-option",required:!0,xmlName:"x-ms-expiry-option",type:{name:"String"}}},{parameterPath:["options","expiresOn"],mapper:{serializedName:"x-ms-expiry-time",xmlName:"x-ms-expiry-time",type:{name:"String"}}}],isXML:!0,serializer:tS},tR={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobSetHttpHeadersHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetHttpHeadersExceptionHeaders}},queryParameters:[h,d],urlParameters:[c],headerParameters:[p,f,g,M,k,N,er,ei,en,es,eo,ea,el,ec,eu],isXML:!0,serializer:tS},tI={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobSetImmutabilityPolicyHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetImmutabilityPolicyExceptionHeaders}},queryParameters:[d,X,J,eh],urlParameters:[c],headerParameters:[p,f,g,N,ed,ep],isXML:!0,serializer:tS},tO={path:"/{containerName}/{blob}",httpMethod:"DELETE",responses:{200:{headersMapper:s.BlobDeleteImmutabilityPolicyHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobDeleteImmutabilityPolicyExceptionHeaders}},queryParameters:[d,X,J,eh],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tS},tA={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobSetLegalHoldHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetLegalHoldExceptionHeaders}},queryParameters:[d,X,J,{parameterPath:"comp",mapper:{defaultValue:"legalhold",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,{parameterPath:"legalHold",mapper:{serializedName:"x-ms-legal-hold",required:!0,xmlName:"x-ms-legal-hold",type:{name:"Boolean"}}}],isXML:!0,serializer:tS},tM={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobSetMetadataHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetMetadataExceptionHeaders}},queryParameters:[d,L],urlParameters:[c],headerParameters:[p,f,g,O,M,k,N,Z,ee,et,er,ei,en,ef],isXML:!0,serializer:tS},tk={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.BlobAcquireLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobAcquireLeaseExceptionHeaders}},queryParameters:[d,q],urlParameters:[c],headerParameters:[p,f,g,k,N,U,H,z,er,ei,en],isXML:!0,serializer:tS},tN={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobReleaseLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobReleaseLeaseExceptionHeaders}},queryParameters:[d,q],urlParameters:[c],headerParameters:[p,f,g,k,N,F,j,er,ei,en],isXML:!0,serializer:tS},tL={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobRenewLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobRenewLeaseExceptionHeaders}},queryParameters:[d,q],urlParameters:[c],headerParameters:[p,f,g,k,N,j,$,er,ei,en],isXML:!0,serializer:tS},tD={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobChangeLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobChangeLeaseExceptionHeaders}},queryParameters:[d,q],urlParameters:[c],headerParameters:[p,f,g,k,N,j,W,Q,er,ei,en],isXML:!0,serializer:tS},tB={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:s.BlobBreakLeaseHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobBreakLeaseExceptionHeaders}},queryParameters:[d,q],urlParameters:[c],headerParameters:[p,f,g,k,N,K,V,er,ei,en],isXML:!0,serializer:tS},tq={path:"/{containerName}/{blob}
4",httpMethod:"PUT",responses:{201:{headersMapper:s.BlobCreateSnapshotHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobCreateSnapshotExceptionHeaders}},queryParameters:[d,{parameterPath:"comp",mapper:{defaultValue:"snapshot",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,O,M,k,N,Z,ee,et,er,ei,en,ef],isXML:!0,serializer:tS},tU={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:s.BlobStartCopyFromURLHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobStartCopyFromURLExceptionHeaders}},queryParameters:[d],urlParameters:[c],headerParameters:[p,f,g,O,M,k,N,er,ei,en,ed,ep,eg,em,ey,eb,ev,ew,ex,eS,eC,{parameterPath:["options","sealBlob"],mapper:{serializedName:"x-ms-seal-blob",xmlName:"x-ms-seal-blob",type:{name:"Boolean"}}},eE],isXML:!0,serializer:tS},tH={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:s.BlobCopyFromURLHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobCopyFromURLExceptionHeaders}},queryParameters:[d],urlParameters:[c],headerParameters:[p,f,g,O,M,k,N,er,ei,en,ed,ep,ef,eg,ey,eb,ev,ew,eS,eC,eE,{parameterPath:"xMsRequiresSync",mapper:{defaultValue:"true",isConstant:!0,serializedName:"x-ms-requires-sync",type:{name:"String"}}},e_,eT,eP],isXML:!0,serializer:tS},tz={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:s.BlobAbortCopyFromURLHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobAbortCopyFromURLExceptionHeaders}},queryParameters:[d,{parameterPath:"comp",mapper:{defaultValue:"copy",isConstant:!0,serializedName:"comp",type:{name:"String"}}},{parameterPath:"copyId",mapper:{serializedName:"copyid",required:!0,xmlName:"copyid",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,M,{parameterPath:"copyActionAbortConstant",mapper:{defaultValue:"abort",isConstant:!0,serializedName:"x-ms-copy-action",type:{name:"String"}}}],isXML:!0,serializer:tS},tF={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.BlobSetTierHeaders},202:{headersMapper:s.BlobSetTierHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetTierExceptionHeaders}},queryParameters:[d,X,J,{parameterPath:"comp",mapper:{defaultValue:"tier",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,M,en,em,{parameterPath:"tier",mapper:{serializedName:"x-ms-access-tier",required:!0,xmlName:"x-ms-access-tier",type:{name:"Enum",allowedValues:["P4","P6","P10","P15","P20","P30","P40","P50","P60","P70","P80","Hot","Cool","Archive","Cold"]}}}],isXML:!0,serializer:tS},tj={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{headersMapper:s.BlobGetAccountInfoHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobGetAccountInfoExceptionHeaders}},queryParameters:[h,d,S],urlParameters:[c],headerParameters:[p,f,g],isXML:!0,serializer:tS},t$={path:"/{containerName}/{blob}",httpMethod:"POST",responses:{200:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:s.BlobQueryHeaders},206:{bodyMapper:{type:{name:"Stream"},serializedName:"parsedResponse"},headersMapper:s.BlobQueryHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobQueryExceptionHeaders}},requestBody:eR,queryParameters:[d,X,{parameterPath:"comp",mapper:{defaultValue:"query",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[o,l,p,f,M,k,N,Z,ee,et,er,ei,en],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:tS},tK={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:s.BlobTags,headersMapper:s.BlobGetTagsHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobGetTagsExceptionHeaders}},queryParameters:[d,X,J,eI],urlParameters:[c],headerParameters:[p,f,g,M,en],isXML:!0,serializer:tS},tV={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{204:{headersMapper:s.BlobSetTagsHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlobSetTagsExceptionHeaders}},requestBody:eO,queryParameters:[d,J,eI],urlParameters:[c],headerParameters:[o,l,p,f,M,en,eA,eM],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:tS};class tW{constructor(e){this.client=e}create(e,t,r){return this.client.sendOperationRequest({contentLength:e,blobContentLength:t,options:r},tG)}uploadPages(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},tX)}clearPages(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},tJ)}uploadPagesFromURL(e,t,r,i,n){return this.client.sendOperationRequest({sourceUrl:e,sourceRange:t,contentLength:r,range:i,options:n},tY)}getPageRanges(e){return this.client.sendOperationRequest({options:e},tZ)}getPageRangesDiff(e){return this.client.sendOperationRequest({options:e},t0)}resize(e,t){return this.client.sendOperationRequest({blobContentLength:e,options:t},t1)}updateSequenceNumber(e,t){return this.client.sendOperationRequest({sequenceNumberAction:e,options:t},t2)}copyIncremental(e,t){return this.client.sendOperationRequest({copySource:e,options:t},t3)}}let tQ=n.rl(s,!0),tG={path:"/{containerName}/{blob}
4",httpMethod:"PUT",responses:{201:{headersMapper:s.PageBlobCreateHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobCreateExceptionHeaders}},queryParameters:[d],urlParameters:[c],headerParameters:[p,f,g,_,O,M,k,N,Z,ee,et,er,ei,en,es,eo,ea,el,ec,eu,ed,ep,ef,eg,eC,eE,{parameterPath:"blobType",mapper:{defaultValue:"PageBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}},ek,eN],isXML:!0,serializer:tQ},tX={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.PageBlobUploadPagesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobUploadPagesExceptionHeaders}},requestBody:eD,queryParameters:[d,eq],urlParameters:[c],headerParameters:[p,f,_,M,k,N,Y,Z,ee,et,er,ei,en,ef,eA,eM,eL,eB,eU,eH,ez,eF],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:tQ},tJ={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.PageBlobClearPagesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobClearPagesExceptionHeaders}},queryParameters:[d,eq],urlParameters:[c],headerParameters:[p,f,g,_,M,k,N,Y,Z,ee,et,er,ei,en,ef,eH,ez,eF,{parameterPath:"pageWrite",mapper:{defaultValue:"clear",isConstant:!0,serializedName:"x-ms-page-write",type:{name:"String"}}}],isXML:!0,serializer:tQ},tY={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.PageBlobUploadPagesFromURLHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobUploadPagesFromURLExceptionHeaders}},queryParameters:[d,eq],urlParameters:[c],headerParameters:[p,f,g,_,M,k,N,Z,ee,et,er,ei,en,ef,ey,eb,ev,ew,e_,eT,eU,eH,ez,eF,ej,{parameterPath:"sourceRange",mapper:{serializedName:"x-ms-source-range",required:!0,xmlName:"x-ms-source-range",type:{name:"String"}}},e$,{parameterPath:"range",mapper:{serializedName:"x-ms-range",required:!0,xmlName:"x-ms-range",type:{name:"String"}}}],isXML:!0,serializer:tQ},tZ={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:s.PageList,headersMapper:s.PageBlobGetPageRangesHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobGetPageRangesExceptionHeaders}},queryParameters:[d,b,v,X,eK],urlParameters:[c],headerParameters:[p,f,g,M,k,N,Y,er,ei,en],isXML:!0,serializer:tQ},t0={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:s.PageList,headersMapper:s.PageBlobGetPageRangesDiffHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobGetPageRangesDiffExceptionHeaders}},queryParameters:[d,b,v,X,eK,{parameterPath:["options","prevsnapshot"],mapper:{serializedName:"prevsnapshot",xmlName:"prevsnapshot",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,M,k,N,Y,er,ei,en,{parameterPath:["options","prevSnapshotUrl"],mapper:{serializedName:"x-ms-previous-snapshot-url",xmlName:"x-ms-previous-snapshot-url",type:{name:"String"}}}],isXML:!0,serializer:tQ},t1={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.PageBlobResizeHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobResizeExceptionHeaders}},queryParameters:[h,d],urlParameters:[c],headerParameters:[p,f,g,M,k,N,Z,ee,et,er,ei,en,ef,ek],isXML:!0,serializer:tQ},t2={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.PageBlobUpdateSequenceNumberHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobUpdateSequenceNumberExceptionHeaders}},queryParameters:[h,d],urlParameters:[c],headerParameters:[p,f,g,M,k,N,er,ei,en,eN,{parameterPath:"sequenceNumberAction",mapper:{serializedName:"x-ms-sequence-number-action",required:!0,xmlName:"x-ms-sequence-number-action",type:{name:"Enum",allowedValues:["max","update","increment"]}}}],isXML:!0,serializer:tQ},t3={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{202:{headersMapper:s.PageBlobCopyIncrementalHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.PageBlobCopyIncrementalExceptionHeaders}},queryParameters:[d,{parameterPath:"comp",mapper:{defaultValue:"incrementalcopy",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,k,N,er,ei,en,eS],isXML:!0,serializer:tQ};class t6{constructor(e){this.client=e}create(e,t){return this.client.sendOperationRequest({contentLength:e,options:t},t4)}
4appendBlock(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},t8)}appendBlockFromUrl(e,t,r){return this.client.sendOperationRequest({sourceUrl:e,contentLength:t,options:r},t7)}seal(e){return this.client.sendOperationRequest({options:e},t9)}}let t5=n.rl(s,!0),t4={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.AppendBlobCreateHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.AppendBlobCreateExceptionHeaders}},queryParameters:[d],urlParameters:[c],headerParameters:[p,f,g,_,O,M,k,N,Z,ee,et,er,ei,en,es,eo,ea,el,ec,eu,ed,ep,ef,eC,eE,{parameterPath:"blobType",mapper:{defaultValue:"AppendBlob",isConstant:!0,serializedName:"x-ms-blob-type",type:{name:"String"}}}],isXML:!0,serializer:t5},t8={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.AppendBlobAppendBlockHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.AppendBlobAppendBlockExceptionHeaders}},requestBody:eD,queryParameters:[d,eV],urlParameters:[c],headerParameters:[p,f,_,M,k,N,Z,ee,et,er,ei,en,ef,eA,eM,eL,eB,eW,eQ],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:t5},t7={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.AppendBlobAppendBlockFromUrlHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.AppendBlobAppendBlockFromUrlExceptionHeaders}},queryParameters:[d,eV],urlParameters:[c],headerParameters:[p,f,g,_,M,k,N,Z,ee,et,er,ei,en,ef,ey,eb,ev,ew,e_,eT,eA,ej,e$,eW,eQ,eG],isXML:!0,serializer:t5},t9={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{200:{headersMapper:s.AppendBlobSealHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.AppendBlobSealExceptionHeaders}},queryParameters:[d,{parameterPath:"comp",mapper:{defaultValue:"seal",isConstant:!0,serializedName:"comp",type:{name:"String"}}}],urlParameters:[c],headerParameters:[p,f,g,M,k,N,er,ei,eQ],isXML:!0,serializer:t5};class re{constructor(e){this.client=e}upload(e,t,r){return this.client.sendOperationRequest({contentLength:e,body:t,options:r},rr)}putBlobFromUrl(e,t,r){return this.client.sendOperationRequest({contentLength:e,copySource:t,options:r},ri)}stageBlock(e,t,r,i){return this.client.sendOperationRequest({blockId:e,contentLength:t,body:r,options:i},rn)}stageBlockFromURL(e,t,r,i){return this.client.sendOperationRequest({blockId:e,contentLength:t,sourceUrl:r,options:i},rs)}commitBlockList(e,t){return this.client.sendOperationRequest({blocks:e,options:t},ro)}getBlockList(e,t){return this.client.sendOperationRequest({listType:e,options:t},ra)}}let rt=n.rl(s,!0),rr={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.BlockBlobUploadHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlockBlobUploadExceptionHeaders}},requestBody:eD,queryParameters:[d],urlParameters:[c],headerParameters:[p,f,_,O,M,k,N,Z,ee,et,er,ei,en,es,eo,ea,el,ec,eu,ed,ep,ef,eg,eC,eE,eA,eM,eL,eB,eX],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:rt},ri={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.BlockBlobPutBlobFromUrlHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlockBlobPutBlobFromUrlExceptionHeaders}},queryParameters:[d],urlParameters:[c],headerParameters:[p,f,g,_,O,M,k,N,Z,ee,et,er,ei,en,es,eo,ea,el,ec,eu,ef,eg,ey,eb,ev,ew,ex,eS,eC,e_,eT,eP,eA,eX,{parameterPath:["options","copySourceBlobProperties"],mapper:{serializedName:"x-ms-copy-source-blob-properties",xmlName:"x-ms-copy-source-blob-properties",type:{name:"Boolean"}}}],isXML:!0,serializer:rt},rn={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.BlockBlobStageBlockHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlockBlobStageBlockExceptionHeaders}},requestBody:eD,queryParameters:[d,eJ,eY],urlParameters:[c],headerParameters:[p,f,_,M,Z,ee,et,ef,eA,eM,eL,eB],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"binary",serializer:rt},rs={path:"/{containerName}/{blob}",httpMethod:"PUT",responses:{201:{headersMapper:s.BlockBlobStageBlockFromURLHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlockBlobStageBlockFromURLExceptionHeaders}},queryParameters:[d,eJ,eY],urlParameters:[c],headerParameters:[p,f,g,_,M,Z,ee,et,ef,ey,eb,ev,ew,e_,eT,ej,e$,eG],isXML:!0,serializer:rt},ro={path:"/{containerName}/{blob}
4",httpMethod:"PUT",responses:{201:{headersMapper:s.BlockBlobCommitBlockListHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlockBlobCommitBlockListExceptionHeaders}},requestBody:eZ,queryParameters:[d,e0],urlParameters:[c],headerParameters:[o,l,p,f,O,M,k,N,Z,ee,et,er,ei,en,es,eo,ea,el,ec,eu,ed,ep,ef,eg,eC,eE,eA,eM],isXML:!0,contentType:"application/xml; charset=utf-8",mediaType:"xml",serializer:rt},ra={path:"/{containerName}/{blob}",httpMethod:"GET",responses:{200:{bodyMapper:s.BlockList,headersMapper:s.BlockBlobGetBlockListHeaders},default:{bodyMapper:s.StorageError,headersMapper:s.BlockBlobGetBlockListExceptionHeaders}},queryParameters:[d,X,e0,{parameterPath:"listType",mapper:{defaultValue:"committed",serializedName:"blocklisttype",required:!0,xmlName:"blocklisttype",type:{name:"Enum",allowedValues:["committed","uncommitted","all"]}}}],urlParameters:[c],headerParameters:[p,f,g,M,en],isXML:!0,serializer:rt};class rl extends i.m4{constructor(e,t){var r,i;if(void 0===e)throw Error("'url' cannot be null");t||(t={});let n="azsdk-js-azure-storage-blob/12.27.0";super(Object.assign(Object.assign(Object.assign({},{requestContentType:"application/json; charset=utf-8"}),t),{userAgentOptions:{userAgentPrefix:t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${n}`:`${n}`},endpoint:null!=(i=null!=(r=t.endpoint)?r:t.baseUri)?i:"{url}"})),this.url=e,this.version=t.version||"2025-05-05",this.service=new e1(this),this.container=new tt(this),this.blob=new tx(this),this.pageBlob=new tW(this),this.appendBlob=new t6(this),this.blockBlob=new re(this)}}class rc extends rl{async sendOperationRequest(e,t){let r=Object.assign({},t);return("/{containerName}"===r.path||"/{containerName}/{blob}"===r.path)&&(r.path=""),super.sendOperationRequest(e,r)}}},45972:function(e,t,r){(function(){(e.exports=r(1837)).version="5.1.2"}).call(this)},49351:(e,t,r)=>{"use strict";r.d(t,{y:()=>a});let i={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};class n{_contextMap;constructor(e){this._contextMap=e instanceof n?new Map(e._contextMap):new Map}setValue(e,t){let r=new n(this);return r._contextMap.set(e,t),r}getValue(e){return this._contextMap.get(e)}deleteValue(e){let t=new n(this);return t._contextMap.delete(e),t}}let s={instrumenterImplementation:void 0};function o(){return s.instrumenterImplementation||(s.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:function(e={}){let t=new n(e.parentContext);return e.span&&(t=t.setValue(i.span,e.span)),e.namespace&&(t=t.setValue(i.namespace,e.namespace)),t}({parentContext:t.tracingContext})}),withContext:(e,t,...r)=>t(...r)}),s.instrumenterImplementation}function a(e){let{namespace:t,packageName:r,packageVersion:n}=e;function s(e,s,a){let l=o().startSpan(e,{...a,packageName:r,packageVersion:n,tracingContext:s?.tracingOptions?.tracingContext}),c=l.tracingContext,u=l.span;return c.getValue(i.namespace)||(c=c.setValue(i.namespace,t)),u.setAttribute("az.namespace",c.getValue(i.namespace)),{span:u,updatedOptions:Object.assign({},s,{tracingOptions:{...s?.tracingOptions,tracingContext:c}})}}async function a(e,t,r,i){let{span:n,updatedOptions:o}=s(e,t,i);try{let e=await l(o.tracingOptions.tracingContext,()=>Promise.resolve(r(o,n)));return n.setStatus({status:"success"}),e}catch(e){throw n.setStatus({status:"error",error:e}),e}finally{n.end()}}function l(e,t,...r){return o().withContext(e,t,...r)}return{startSpan:s,withSpan:a,withContext:l,parseTraceparentHeader:function(e){return o().parseTraceparentHeader(e)},createRequestHeaders:function(e){return o().createRequestHeaders(e)}}}},52112:function(e,t,r){var i=r(51642).hp;(function(){var t,n,s=[].splice,o=function(e,t){if(!(e instanceof t))throw Error("Bound instance method accessed before binding")},a=[].indexOf;n=r(78694),t=r(35978).EventEmitter,e.exports=(function(){class e extends t{constructor(e={}){super(),this.get=this.get.bind(this),this.mget=this.mget.bind(this),this.set=this.set.bind(this),this.mset=this.mset.bind(this),this.del=this.del.bind(this),this.take=this.take.bind(this),this.ttl=this.ttl.bind(this),this.getTtl=this.getTtl.bind(this),this.keys=this.keys.bind(this),this.has=this.has.bind(this),this.get
4Stats=this.getStats.bind(this),this.flushAll=this.flushAll.bind(this),this.flushStats=this.flushStats.bind(this),this.close=this.close.bind(this),this._checkData=this._checkData.bind(this),this._check=this._check.bind(this),this._isInvalidKey=this._isInvalidKey.bind(this),this._wrap=this._wrap.bind(this),this._getValLength=this._getValLength.bind(this),this._error=this._error.bind(this),this._initErrors=this._initErrors.bind(this),this.options=e,this._initErrors(),this.data={},this.options=Object.assign({forceString:!1,objectValueSize:80,promiseValueSize:80,arrayValueSize:40,stdTTL:0,checkperiod:600,useClones:!0,deleteOnExpire:!0,enableLegacyCallbacks:!1,maxKeys:-1},this.options),this.options.enableLegacyCallbacks&&(console.warn("WARNING! node-cache legacy callback support will drop in v6.x"),["get","mget","set","del","ttl","getTtl","keys","has"].forEach(e=>{var t;t=this[e],this[e]=function(...e){var r,i,n;if(i=e,[...e]=i,[r]=s.call(e,-1),"function"!=typeof r)return t(...e,r);try{n=t(...e),r(null,n)}catch(e){r(e)}}})),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.validKeyTypes=["string","number"],this._checkData();return}get(t){var r;if(o(this,e),null!=(r=this._isInvalidKey(t)))throw r;return null!=this.data[t]&&this._check(t,this.data[t])?(this.stats.hits++,this._unwrap(this.data[t])):void this.stats.misses++}mget(t){var r,i,n,s,a;if(o(this,e),!Array.isArray(t))throw this._error("EKEYSTYPE");for(i=0,a={},s=t.length;i<s;i++){if(n=t[i],null!=(r=this._isInvalidKey(n)))throw r;null!=this.data[n]&&this._check(n,this.data[n])?(this.stats.hits++,a[n]=this._unwrap(this.data[n])):this.stats.misses++}return a}set(t,r,i){var n,s;if(o(this,e),this.options.maxKeys>-1&&this.stats.keys>=this.options.maxKeys)throw this._error("ECACHEFULL");if(this.options.forceString,null==i&&(i=this.options.stdTTL),null!=(n=this._isInvalidKey(t)))throw n;return s=!1,this.data[t]&&(s=!0,this.stats.vsize-=this._getValLength(this._unwrap(this.data[t],!1))),this.data[t]=this._wrap(r,i),this.stats.vsize+=this._getValLength(r),!s&&(this.stats.ksize+=this._getKeyLength(t),this.stats.keys++),this.emit("set",t,r),!0}mset(t){var r,i,n,s,a,l,c,u,h;if(o(this,e),this.options.maxKeys>-1&&this.stats.keys+t.length>=this.options.maxKeys)throw this._error("ECACHEFULL");for(i=0,l=t.length;i<l;i++){if(a=t[i],{key:s,val:h,ttl:u}=a,u&&"number"!=typeof u)throw this._error("ETTLTYPE");if(null!=(r=this._isInvalidKey(s)))throw r}for(n=0,c=t.length;n<c;n++)a=t[n],({key:s,val:h,ttl:u}=a),this.set(s,h,u);return!0}del(t){var r,i,n,s,a,l;for(o(this,e),Array.isArray(t)||(t=[t]),r=0,n=0,a=t.length;n<a;n++){if(s=t[n],null!=(i=this._isInvalidKey(s)))throw i;null!=this.data[s]&&(this.stats.vsize-=this._getValLength(this._unwrap(this.data[s],!1)),this.stats.ksize-=this._getKeyLength(s),this.stats.keys--,r++,l=this.data[s],delete this.data[s],this.emit("del",s,l.v))}return r}take(t){var r;return o(this,e),null!=(r=this.get(t))&&this.del(t),r}ttl(t,r){var i;if(o(this,e),r||(r=this.options.stdTTL),!t)return!1;if(null!=(i=this._isInvalidKey(t)))throw i;return!!(null!=this.data[t]&&this._check(t,this.data[t]))&&(r>=0?this.data[t]=this._wrap(this.data[t].v,r,!1):this.del(t),!0)}getTtl(t){var r;if(o(this,e),t){if(null!=(r=this._isInvalidKey(t)))throw r;return null!=this.data[t]&&this._check(t,this.data[t])?this.data[t].t:void 0}}keys(){return o(this,e),Object.keys(this.data)}has(t){return o(this,e),null!=this.data[t]&&this._check(t,this.data[t])}getStats(){return o(this,e),this.stats}flushAll(t=!0){o(this,e),this.data={},this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this._killCheckPeriod(),this._checkData(t),this.emit("flush")}flushStats(){o(this,e),this.stats={hits:0,misses:0,keys:0,ksize:0,vsize:0},this.emit("flush_stats")}close(){o(this,e),this._killCheckPeriod()}_checkData(t=!0){var r,i,n;for(r in o(this,e),i=this.data)n=i[r],this._check(r,n);t&&this.options.checkperiod>0&&(this.checkTimeout=setTimeout(this._checkData,1e3*this.options.checkperiod,t),null!=this.checkTimeout&&null!=this.checkTimeout.unref&&this.checkTimeout.unref())}_killCheckPeriod(){if(null!=this.checkTimeout)return clearTimeout(this.checkTimeout)}_check(t,r){var i;return o(this,e),i=!0,0!==r.t&&r.t<Date.now()&&(this.options.deleteOnExpire&&(i=!1,this.del(t)),this.emit
4("expired",t,this._unwrap(r))),i}_isInvalidKey(t){var r;if(o(this,e),r=typeof t,0>a.call(this.validKeyTypes,r))return this._error("EKEYTYPE",{type:typeof t})}_wrap(t,r,i=!0){var s;return o(this,e),this.options.useClones||(i=!1),s=Date.now(),{t:0===r?0:r?s+1e3*r:0===this.options.stdTTL?this.options.stdTTL:s+1e3*this.options.stdTTL,v:i?n(t):t}}_unwrap(e,t=!0){if(this.options.useClones||(t=!1),null!=e.v)if(t)return n(e.v);else return e.v;return null}_getKeyLength(e){return e.toString().length}_getValLength(t){if(o(this,e),"string"==typeof t)return t.length;if(this.options.forceString)return JSON.stringify(t).length;if(Array.isArray(t))return this.options.arrayValueSize*t.length;if("number"==typeof t)return 8;if("function"==typeof(null!=t?t.then:void 0))return this.options.promiseValueSize;else if(null!=i?i.isBuffer(t):void 0)return t.length;else if(null!=t&&"object"==typeof t)return this.options.objectValueSize*Object.keys(t).length;else if("boolean"==typeof t)return 8;else return 0}_error(t,r={}){var i;return o(this,e),(i=Error()).name=t,i.errorcode=t,i.message=null!=this.ERRORS[t]?this.ERRORS[t](r):"-",i.data=r,i}_initErrors(){var t,r,i;for(r in o(this,e),this.ERRORS={},i=this._ERRORS)t=i[r],this.ERRORS[r]=this.createErrorMessage(t)}createErrorMessage(e){return function(t){return e.replace("__key",t.type)}}}return e.prototype._ERRORS={ENOTFOUND:"Key `__key` not found",ECACHEFULL:"Cache max keys amount exceeded",EKEYTYPE:"The key argument has to be of type `string` or `number`. Found: `__key`",EKEYSTYPE:"The keys argument has to be an array.",ETTLTYPE:"The ttl argument has to be a number."},e}).call(this)}).call(this)},54247:(e,t,r)=>{"use strict";r.d(t,{m4:()=>y,H_:()=>w,g1:()=>v,LJ:()=>h});let i="DisableKeepAlivePolicy";var n,s=r(26494),o=r(73035);let a=Symbol("Original PipelineRequest"),l=Symbol.for("@azure/core-client original request");function c(e,t={}){let r=e[a],i=(0,s.Nc)(e.headers.toJson({preserveCase:!0}));if(r)return r.headers=i,r;{let r=(0,s.G6)({url:e.url,method:e.method,headers:i,withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,disableKeepAlive:!!e.keepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,agent:e.agent,requestOverrides:e.requestOverrides});return t.originalRequest&&(r[l]=t.originalRequest),r}}function u(e,t){let r=t?.originalRequest??e,i={url:e.url,method:e.method,headers:h(e.headers),withCredentials:e.withCredentials,timeout:e.timeout,requestId:e.headers.get("x-ms-client-request-id")||e.requestId,abortSignal:e.abortSignal,body:e.body,formData:e.formData,keepAlive:!!e.disableKeepAlive,onDownloadProgress:e.onDownloadProgress,onUploadProgress:e.onUploadProgress,proxySettings:e.proxySettings,streamResponseStatusCodes:e.streamResponseStatusCodes,agent:e.agent,requestOverrides:e.requestOverrides,clone(){throw Error("Cannot clone a non-proxied WebResourceLike")},prepare(){throw Error("WebResourceLike.prepare() is not supported by @azure/core-http-compat")},validateRequestProperties(){}};return t?.createProxy?new Proxy(i,{get:(t,n,s)=>n===a?e:"clone"===n?()=>u(c(i,{originalRequest:r}),{createProxy:!0,originalRequest:r}):Reflect.get(t,n,s),set:(t,r,i,n)=>("keepAlive"===r&&(e.disableKeepAlive=!i),"string"==typeof r&&["url","method","withCredentials","timeout","requestId","abortSignal","body","formData","onDownloadProgress","onUploadProgress","proxySettings","streamResponseStatusCodes","agent","requestOverrides"].includes(r)&&(e[r]=i),Reflect.set(t,r,i,n))}):i}function h(e){return new p(e.toJSON({preserveCase:!0}))}function d(e){return e.toLowerCase()}class p{_headersMap;constructor(e){if(this._headersMap={},e)for(let t in e)this.set(t,e[t])}set(e,t){this._headersMap[d(e)]={name:e,value:t.toString()}}get(e){let t=this._headersMap[d(e)];return t?t.value:void 0}contains(e){return!!this._headersMap[d(e)]}remove(e){let t=this.contains(e);return delete this._headersMap[d(e)],t}rawHeaders(){return this.toJson({preserveCase:!0})}headersArray(){let e=[];for(let t in this._headersMap)e.push(this._headersMap[t]);return e}headerNames(){let e=[],t=this.headersArray();for(let r=0;r<t.length;++r)e.push(t[r].name);return e}headerValues(){let e=[],t=this.headersArray();for(let r=0;r<t.length;++r)e.push(t[r].value);return e}toJson(e={}){let t={};if(e.preserveCase)for(let e in this._headersMap){let r=this._headersMap[e];t[r.name]=r.value}else for(let e in this._headersMap){let r=this._headersMap[e];t[d(r.name)]=r.value}return t}toString(){return JSON.stringify(this.toJson({preserveCase:!0}))}clone(){let e={};for(let t in this._headersMap){let r=this._headersMap[t];e[r.name]=r.value}return new p(e)}}let f=Symbol("Original FullOperationResponse");function g(e,t){let r=u(e.request),i=h(e.headers);return t?.createProxy?new Proxy(e,{get:(t,n,s)=>
4"headers"===n?i:"request"===n?r:n===f?e:Reflect.get(t,n,s),set:(e,t,n,s)=>("headers"===t?i=n:"request"===t&&(r=n),Reflect.set(e,t,n,s))}):{...e,request:r,headers:i}}function m(e){let t=e[f],r=(0,s.Nc)(e.headers.toJson({preserveCase:!0}));return t?(t.headers=r,t):{...e,headers:r,request:c(e.request)}}class y extends o.Nl{constructor(e){super(e),e.keepAliveOptions?.enable!==!1||this.pipeline.getOrderedPolicies().some(e=>e.name===i)||this.pipeline.addPolicy({name:i,sendRequest:async(e,t)=>(e.disableKeepAlive=!0,t(e))}),e.redirectOptions?.handleRedirects===!1&&this.pipeline.removePolicy({name:s.Ou})}async sendOperationRequest(e,t){let r,i=e?.options?.onResponse;e.options={...e.options,onResponse:function(e,t,n){r=e,i&&i(e,t,n)}};let n=await super.sendOperationRequest(e,t);return r&&Object.defineProperty(n,"_response",{value:g(r)}),n}}!function(e){e[e.ERROR=1]="ERROR",e[e.INFO=3]="INFO",e[e.OFF=0]="OFF",e[e.WARNING=2]="WARNING"}(n||(n={}));let b={log(e,t){},shouldLog:e=>!1};function v(e){let t=e.slice().reverse();return{name:"RequestPolicyFactoryPolicy",async sendRequest(e,r){let i={sendRequest:async e=>g(await r(c(e)),{createProxy:!0})};for(let e of t)i=e.create(i,b);let n=u(e,{createProxy:!0});return m(await i.sendRequest(n))}}}function w(e){return{sendRequest:async t=>m(await e.sendRequest(u(t,{createProxy:!0})))}}},54992:e=>{"use strict";let t="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0;if(!t)throw Error("Unable to find global scope. Are you sure this is running in the browser?");if(!t.AbortController)throw Error('Could not find "AbortController" in the global scope. You need to polyfill it first');e.exports.z=t.AbortController},55335:(e,t,r)=>{"use strict";r.d(t,{U:()=>s});var i=r(49351),n=r(2848);let s=(0,i.y)({packageName:"@azure/storage-blob",packageVersion:n.MF,namespace:"Microsoft.Storage"})},55853:(e,t,r)=>{"use strict";r.d(t,{C:()=>b});var i=r(15115);r(8562);var n=r(29143),s={hasSubscribers:!1},o="object"==typeof performance&&performance&&"function"==typeof performance.now?performance:Date,a=new Set,l="object"==typeof n&&n?n:{},c=e=>!!e&&e===Math.floor(e)&&e>0&&isFinite(e),u=e=>c(e)?e<=256?Uint8Array:e<=65536?Uint16Array:e<=0x100000000?Uint32Array:e<=Number.MAX_SAFE_INTEGER?h:null:null,h=class extends Array{constructor(e){super(e),this.fill(0)}},d=class e{heap;length;static #t=!1;static create(t){let r=u(t);if(!r)return[];e.#t=!0;let i=new e(t,r);return e.#t=!1,i}constructor(t,r){if(!e.#t)throw TypeError("instantiate Stack using Stack.create(n)");this.heap=new r(t),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},p=class e{#t;#r;#i;#n;#s;#o;#a;#l;get perf(){return this.#l}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#c;#u;#h;#d;#p;#f;#g;#m;#y;#b;#v;#w;#x;#S;#C;#E;#_;#T;#P;static unsafeExposeInternals(e){return{starts:e.#x,ttls:e.#S,autopurgeTimers:e.#C,sizes:e.#w,keyMap:e.#h,keyList:e.#d,valList:e.#p,next:e.#f,prev:e.#g,get head(){return e.#m},get tail(){return e.#y},free:e.#b,isBackgroundFetch:t=>e.#R(t),backgroundFetch:(t,r,i,n)=>e.#I(t,r,i,n),moveToTail:t=>e.#O(t),indexes:t=>e.#A(t),rindexes:t=>e.#M(t),isStale:t=>e.#k(t)}}get max(){return this.#t}get maxSize(){return this.#r}get calculatedSize(){return this.#u}get size(){return this.#c}get fetchMethod(){return this.#o}get memoMethod(){return this.#a}get dispose(){return this.#i}get onInsert(){return this.#n}get disposeAfter(){return this.#s}constructor(t){let{max:r=0,ttl:i,ttlResolution:n=1,ttlAutopurge:s,updateAgeOnGet:h,updateAgeOnHas:p,allowStale:f,dispose:g,onInsert:m,disposeAfter:y,noDisposeOnSet:b,noUpdateTTL:v,maxSize:w=0,maxEntrySize:x=0,sizeCalculation:S,fetchMethod:C,memoMethod:E,noDeleteOnFetchRejection:_,noDeleteOnStaleGet:T,allowStaleOnFetchRejection:P,allowStaleOnFetchAbort:R,ignoreFetchAbort:I,backgroundFetchSize:O=1,perf:A}=t;if(this.backgroundFetchSize=O,void 0!==A&&"function"!=typeof A?.now)throw TypeError("perf option must have a now() method if specified");if(this.#l=A??o,0!==r&&!c(r))throw TypeError("max option must be a nonnegative integer");let M=r?u(r):Array;if(!M)throw Error("invalid max value: "+r);if(this.#t=r,this.#r=w,this.maxEntrySize=x||this.#r,this.sizeCalculation=S,this.sizeCalculation){if(!this.#r&&!this.maxEntrySize)throw TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if("function"!=typeof this.sizeCalculation)throw TypeError("sizeCalculation set to non-function")}if(void 0!==E&&"function"!=typeof E)throw TypeError("memoMethod must be a function if defined");if(this.#a=E,void 0!==C&&"function"!=typeof C)throw TypeError("fetchMethod must be a function if specified");if(this.#o=C,this.#_=!!C,this.#h=new Map,this.#d=Array.from({length:r}).fill(void 0),this.#p=Array.from({length:r}).fill(void 0),this.#f=new M(r),this.#g=new M(r),this.#m=0,this.#y=0,this.#b=d.create(r),this.#c=0,this.#u=0,"function"==typeof g&&(this.#i=g),"function"==typeof m&&(this.#n=m),"function"==typeof y?(this.#s=y,this.#v=[]):(this.#s=void 0,this.#v=void 0),this.#E=!!this.#i,this.#P=!!this.#n,this.#T=!!this.#s,this.noDisposeOnSet=!!b,this.noUpdateTTL=!!v,this.noDeleteOnFetchRejection=!!_,this.allowStaleOnFetchRejection=!!P,this.allowStaleOnFetchAbort=!!R,this.ignoreFetchAbort=!!I,0!==this.maxEntrySize){if(0!==this.#r&&!c(this.#r))throw TypeError("maxSize must be a positive integer if specified");if(!c(this.maxEntrySize))throw TypeError("maxEntrySize must be a positive integer if specified");this.#N()}if(this.allowStale=!!f,this.noDeleteOnStaleGet=!!T,this.updateAgeOnGet=!!h,this.updateAgeOnHas=!!p,this.ttlResolution=c(n)||0===n?n:1,this.ttlAutopurge=!!s,this.ttl=i||0,this.ttl){if(!c(this.ttl))throw TypeError("ttl must be a positive integer if specified");this.#L()}if(0===this.#t&&0===this.ttl&&0===this.#r)throw TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#t&&!this.#r){let t="LRU_CACHE_UNBOUNDED";a.has(t)||(a.add(t),((e,t,r,i)=>
4{"function"==typeof l.emitWarning?l.emitWarning(e,t,r,i):console.error(`[${r}] ${t}: ${e}`)})("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",t,e))}}getRemainingTTL(e){return this.#h.has(e)?1/0:0}#L(){let e=new h(this.#t),t=new h(this.#t);this.#S=e,this.#x=t;let r=this.ttlAutopurge?Array.from({length:this.#t}):void 0;this.#C=r,this.#D=(r,n,s=this.#l.now())=>{t[r]=0!==n?s:0,e[r]=n,i(r,n)},this.#B=r=>{t[r]=0!==e[r]?this.#l.now():0,i(r,e[r])};let i=this.ttlAutopurge?(e,t)=>{if(r?.[e]&&(clearTimeout(r[e]),r[e]=void 0),t&&0!==t&&r){let i=setTimeout(()=>{this.#k(e)&&this.#q(this.#d[e],"expire")},t+1);i.unref&&i.unref(),r[e]=i}}:()=>{};this.#U=(r,i)=>{if(e[i]){let o=e[i],a=t[i];if(!o||!a)return;r.ttl=o,r.start=a,r.now=n||s();let l=r.now-a;r.remainingTTL=o-l}};let n=0,s=()=>{let e=this.#l.now();if(this.ttlResolution>0){n=e;let t=setTimeout(()=>n=0,this.ttlResolution);t.unref&&t.unref()}return e};this.getRemainingTTL=r=>{let i=this.#h.get(r);if(void 0===i)return 0;let o=e[i],a=t[i];return o&&a?o-((n||s())-a):1/0},this.#k=r=>{let i=t[r],o=e[r];return!!o&&!!i&&(n||s())-i>o}}#B=()=>{};#U=()=>{};#D=()=>{};#k=()=>!1;#N(){let e=new h(this.#t);this.#u=0,this.#w=e,this.#H=t=>{this.#u-=e[t],e[t]=0},this.#z=(e,t,r,i)=>{if(!c(r)){if(this.#R(t))return this.backgroundFetchSize;if(i){if("function"!=typeof i)throw TypeError("sizeCalculation must be a function");if(!c(r=i(t,e)))throw TypeError("sizeCalculation return invalid (expect positive integer)")}else throw TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return r},this.#F=(t,r,i)=>{if(e[t]=r,this.#r){let r=this.#r-e[t];for(;this.#u>r;)this.#j(!0)}this.#u+=e[t],i&&(i.entrySize=r,i.totalCalculatedSize=this.#u)}}#H=e=>{};#F=(e,t,r)=>{};#z=(e,t,r,i)=>{if(r||i)throw TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#A({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#y;this.#$(t)&&((e||!this.#k(t))&&(yield t),t!==this.#m);)t=this.#g[t]}*#M({allowStale:e=this.allowStale}={}){if(this.#c)for(let t=this.#m;this.#$(t)&&((e||!this.#k(t))&&(yield t),t!==this.#y);)t=this.#f[t]}#$(e){return void 0!==e&&this.#h.get(this.#d[e])===e}*entries(){for(let e of this.#A())void 0===this.#p[e]||void 0===this.#d[e]||this.#R(this.#p[e])||(yield[this.#d[e],this.#p[e]])}*rentries(){for(let e of this.#M())void 0===this.#p[e]||void 0===this.#d[e]||this.#R(this.#p[e])||(yield[this.#d[e],this.#p[e]])}*keys(){for(let e of this.#A()){let t=this.#d[e];void 0===t||this.#R(this.#p[e])||(yield t)}}*rkeys(){for(let e of this.#M()){let t=this.#d[e];void 0===t||this.#R(this.#p[e])||(yield t)}}*values(){for(let e of this.#A())void 0===this.#p[e]||this.#R(this.#p[e])||(yield this.#p[e])}*rvalues(){for(let e of this.#M())void 0===this.#p[e]||this.#R(this.#p[e])||(yield this.#p[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let r of this.#A()){let i=this.#p[r],n=this.#R(i)?i.__staleWhileFetching:i;if(void 0!==n&&e(n,this.#d[r],this))return this.#K(this.#d[r],t)}}forEach(e,t=this){for(let r of this.#A()){let i=this.#p[r],n=this.#R(i)?i.__staleWhileFetching:i;void 0!==n&&e.call(t,n,this.#d[r],this)}}rforEach(e,t=this){for(let r of this.#M()){let i=this.#p[r],n=this.#R(i)?i.__staleWhileFetching:i;void 0!==n&&e.call(t,n,this.#d[r],this)}}purgeStale(){let e=!1;for(let t of this.#M({allowStale:!0}))this.#k(t)&&(this.#q(this.#d[t],"expire"),e=!0);return e}info(e){let t=this.#h.get(e);if(void 0===t)return;let r=this.#p[t],i=this.#R(r)?r.__staleWhileFetching:r;if(void 0===i)return;let n={value:i};if(this.#S&&this.#x){let e=this.#S[t],r=this.#x[t];e&&r&&(n.ttl=e-(this.#l.now()-r),n.start=Date.now())}return this.#w&&(n.size=this.#w[t]),n}dump(){let e=[];for(let t of this.#A({allowStale:!0})){let r=this.#d[t],i=this.#p[t],n=this.#R(i)?i.__staleWhileFetching:i;if(void 0===n||void 0===r)continue;let s={value:n};if(this.#S&&this.#x){s.ttl=this.#S[t];let e=this.#l.now()-this.#x[t];s.start=Math.floor(Date.now()-e)}this.#w&&(s.size=this.#w[t]),e.unshift([r,s])}return e}load(e){for(let[t,r]of(this.clear(),e)){if(r.start){let e=Date.now()-r.start;r.start=this.#l.now()-e}this.#V(t,r.value,r)}}set(e,t,r={}){let{status:i=s.hasSubscribers?{}:void 0}=r;r.status=i,i&&(i.op="set",i.key=e,void 0!==t&&(i.value=t),i.cache=this);let n=this.#V(e,t,r);return i&&s.hasSubscribers&&s.publish(i),n}#V(e,t,r,i){let{ttl:n=this.ttl,start:s,noDisposeOnSet:o=this.noDisposeOnSet,sizeCalculation:a=this.sizeCalculation,status:l}=r,c=this.#R(t);if(void 0===t)return l&&(l.set="deleted"),this.delete(e),this;let{noUpdateTTL:u=this.noUpdateTTL}=r;l&&!c&&(l.value=t);let h=this.#z(e,t,r.size||0,a,l);if(this.maxEntrySize&&h>this.maxEntrySize)return this.#q(e,"set"),l&&(l.set="miss",l.maxEntrySizeExceeded=!0),this;let d=0===this.#c?void 0:this.#h.get(e);if(void 0===d)d=0===this.#c?this.#y:0!==this.#b.length?this.#b.pop():this.#c===this.#t?this.#j(!1):this.#c,this.#d[d]=e,this.#p[d]=t,this.#h.set(e,d),this.#f[this.#y]=d,this.#g[d]=this.#y,this.#y=d,this.#c++,this.#F(d,h,l),l&&(l.set="add"),u=!1,this.#P&&!c&&this.#n?.(t,e,"add");else{this.#O(d);let r=this.#p[d];if(t!==r){if(!o)if(this.#R(r)){r!==i&&r.__abortController.abort(Error("replaced"));let{__staleWhileFetching:n}=r;void 0!==n&&n!==t&&(this.#E&&this.#i?.(n,e,"set"),this.#T&&this.#v?.push([n,e,"set"]))}else this.#E&&this.#i?.(r,e,"set"),this.#T&&this.#v?.push([r,e,"set"]);if(this.#H(d),this.#F(d,h,l),this.#p[d]=t,!c){let i=r&&this.#R(r)?r.__staleWhileFetching:r,n=void 0===i?"add":t!==i?"replace":"update";l&&(l.set=n,void 0!==i&&(l.oldValue=i)),this.#P&&this.onInsert?.(t,e,n)}}else c||(l&&(l.set="update"),this.#P&&this.onInsert?.(t,e,"update"))}if(0===n||this.#S||this.#L(),this.#S&&(u||this.#D(d,n,s),l&&this.#U(l,d)),!o&&this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#s?.(...t)}return this}pop(){try{for(;this.#c;){let e=this.#p[this.#m];if(this.#j(!0),this.#R(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(void 0!==e)return e}}finally{if(this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#s?.(...t)}}}#j(e){let t=this.#m,r=this.#d[t],i=this.#p[t],n=this.#R(i);n&&i.__abortController.abort(Error("evicted"));let s=n?i.__staleWhileFetching:i;return(this.#E||this.#T)&&void 0!==s&&(this.#E&&this.#i?.(s,r,"evict"),this.#T&&this.#v?.push([s,r,"evict"])),this.#H(t),this.#C?.[t]&&(clearTimeout(this.#C[t]),this.#C[t]=void 0),e&&(this.#d[t]=void 0,this.#p[t]=void 0,this.#b.push(t)),1===this.#c?(this.#m=this.#y=0,this.#b.length=0):this.#m=this.#f[t],this.#h.delete(r),this.#c--,t}has(e,t={}){let{status:r=s.hasSubscribers?{}:void 0}=t;t.status=r,r&&(r.op="has",r.key=e,r.cache=this);let i=this.#W(e,t);return s.hasSubscribers&&s.publish(r),i}#W(e,t={}){let{updateAgeOnHas:r=this.updateAgeOnHas,status:i}=t,n=this.#h.get(e);if(void 0!==n){let e=this.#p[n];if(this.#R(e)&&void 0===e.__staleWhileFetching)return!1;if(!this.#k(n))return r&&this.#B(n),i&&(i.has="hit",this.#U(i,n)),!0;i&&(i.has="stale",this.#U(i,n))}else i&&(i.has="miss");return!1}peek(e,t={}){let{status:r=s.hasSubscribers||s.hasSubscribers?{}:void 0}=t;r&&(r.op="peek",r.key=e,r.cache=this),t.status=r;let i=this.#Q(e,t);return s.hasSubscribers&&s.publish(r),i}#Q(e,t){let{status:r,allowStale:i=this.allowStale}=t,n=this.#h.get(e);if(void 0===n||!i&&this.#k(n)){r&&(r.peek=void 0===n?"miss":"stale");return}let s=this.#p[n],o=this.#R(s)?s.__staleWhileFetching:s;return r&&(void 0!==o?(r.peek="hit",r.value=o):r.peek="miss"),o}
4#I(e,t,r,i){let n=void 0===t?void 0:this.#p[t];if(this.#R(n))return n;let s=new AbortController,{signal:o}=r;o?.addEventListener("abort",()=>s.abort(o.reason),{signal:s.signal});let a={signal:s.signal,options:r,context:i},l=(i,n=!1)=>{let{aborted:o}=s.signal,l=r.ignoreFetchAbort&&void 0!==i,u=r.ignoreFetchAbort||!!(r.allowStaleOnFetchAbort&&void 0!==i);if(r.status&&(o&&!n?(r.status.fetchAborted=!0,r.status.fetchError=s.signal.reason,l&&(r.status.fetchAbortIgnored=!0)):r.status.fetchResolved=!0),o&&!l&&!n)return c(s.signal.reason,u);let d=this.#p[t];return(d===h||void 0===d&&l&&n)&&(void 0===i?void 0!==h.__staleWhileFetching?this.#p[t]=h.__staleWhileFetching:this.#q(e,"fetch"):(r.status&&(r.status.fetchUpdated=!0),this.#V(e,i,a.options,h))),i},c=(i,n)=>{let{aborted:o}=s.signal,a=o&&r.allowStaleOnFetchAbort,l=a||r.allowStaleOnFetchRejection,c=l||r.noDeleteOnFetchRejection;if(this.#p[t]===h&&(c&&(n||void 0!==h.__staleWhileFetching)?a||(this.#p[t]=h.__staleWhileFetching):this.#q(e,"fetch")),l)return r.status&&void 0!==h.__staleWhileFetching&&(r.status.returnedStale=!0),h.__staleWhileFetching;if(h.__returned===h)throw i},u=(t,i)=>{let o=this.#o?.(e,n,a);s.signal.addEventListener("abort",()=>{(!r.ignoreFetchAbort||r.allowStaleOnFetchAbort)&&(t(void 0),r.allowStaleOnFetchAbort&&(t=e=>l(e,!0)))}),o&&o instanceof Promise?o.then(e=>t(void 0===e?void 0:e),i):void 0!==o&&t(o)};r.status&&(r.status.fetchDispatched=!0);let h=new Promise(u).then(l,e=>(r.status&&(r.status.fetchRejected=!0,r.status.fetchError=e),c(e,!1))),d=Object.assign(h,{__abortController:s,__staleWhileFetching:n,__returned:void 0});return void 0===t?(this.#V(e,d,{...a.options,status:void 0}),t=this.#h.get(e)):this.#p[t]=d,d}#R(e){return!!this.#_&&!!e&&e instanceof Promise&&e.hasOwnProperty("__staleWhileFetching")&&e.__abortController instanceof AbortController}fetch(e,t={}){let r=s.hasSubscribers,{status:i=s.hasSubscribers||s.hasSubscribers?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let n=this.#G(e,t);return i&&r&&(i.trace=!0,s.tracePromise(()=>n,i).catch(()=>{})),n}async #G(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,ttl:s=this.ttl,noDisposeOnSet:o=this.noDisposeOnSet,size:a=0,sizeCalculation:l=this.sizeCalculation,noUpdateTTL:c=this.noUpdateTTL,noDeleteOnFetchRejection:u=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:h=this.allowStaleOnFetchRejection,ignoreFetchAbort:d=this.ignoreFetchAbort,allowStaleOnFetchAbort:p=this.allowStaleOnFetchAbort,context:f,forceRefresh:g=!1,status:m,signal:y}=t;if(m&&(m.op="fetch",m.key=e,g&&(m.forceRefresh=!0),m.cache=this),!this.#_)return m&&(m.fetch="get"),this.#K(e,{allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,status:m});let b={allowStale:r,updateAgeOnGet:i,noDeleteOnStaleGet:n,ttl:s,noDisposeOnSet:o,size:a,sizeCalculation:l,noUpdateTTL:c,noDeleteOnFetchRejection:u,allowStaleOnFetchRejection:h,allowStaleOnFetchAbort:p,ignoreFetchAbort:d,status:m,signal:y},v=this.#h.get(e);if(void 0===v){m&&(m.fetch="miss");let t=this.#I(e,v,b,f);return t.__returned=t}{let t=this.#p[v];if(this.#R(t)){let e=r&&void 0!==t.__staleWhileFetching;return m&&(m.fetch="inflight",e&&(m.returnedStale=!0)),e?t.__staleWhileFetching:t.__returned=t}let n=this.#k(v);if(!g&&!n)return m&&(m.fetch="hit"),this.#O(v),i&&this.#B(v),m&&this.#U(m,v),t;let s=this.#I(e,v,b,f),o=void 0!==s.__staleWhileFetching&&r;return m&&(m.fetch=n?"stale":"refresh",o&&n&&(m.returnedStale=!0)),o?s.__staleWhileFetching:s.__returned=s}}forceFetch(e,t={}){let r=s.hasSubscribers,{status:i=s.hasSubscribers||s.hasSubscribers?{}:void 0}=t;t.status=i,i&&t.context&&(i.context=t.context);let n=this.#X(e,t);return i&&r&&(i.trace=!0,s.tracePromise(()=>n,i).catch(()=>{})),n}async #X(e,t={}){let r=await this.#G(e,t);if(void 0===r)throw Error("fetch() returned undefined");return r}memo(e,t={}){let{status:r=s.hasSubscribers?{}:void 0}=t;t.status=r,r&&(r.op="memo",r.key=e,t.context&&(r.context=t.context),r.cache=this);let i=this.#J(e,t);return r&&(r.value=i),s.hasSubscribers&&s.publish(r),i}#J(e,t={}){let r=this.#a;if(!r)throw Error("no memoMethod provided to constructor");let{context:i,status:n,forceRefresh:s,...o}=t;n&&s&&(n.forceRefresh=!0);let a=this.#K(e,o),l=s||void 0===a;if(n&&(n.memo=l?"miss":"hit",l||(n.value=a)),!l)return a;let c=r(e,a,{options:o,context:i});return n&&(n.value=c),this.#V(e,c,o),c}get(e,t={}){let{status:r=s.hasSubscribers?{}:void 0}=t;t.status=r,r&&(r.op="get",r.key=e,r.cache=this);let i=this.#K(e,t);return r&&(void 0!==i&&(r.value=i),s.hasSubscribers&&s.publish(r)),i}#K(e,t={}){let{allowStale:r=this.allowStale,updateAgeOnGet:i=this.updateAgeOnGet,noDeleteOnStaleGet:n=this.noDeleteOnStaleGet,status:s}=t,o=this.#h.get(e);if(void 0===o){s&&(s.get="miss");return}let a=this.#p[o],l=this.#R(a);return s&&this.#U(s,o),this.#k(o)?l?(s&&(s.get="stale-fetching"),r&&void 0!==a.__staleWhileFetching?(s&&(s.returnedStale=!0),a.__staleWhileFetching):void 0):(n||this.#q(e,"expire"),s&&(s.get="stale"),r?(s&&(s.returnedStale=!0),a):void 0):(s&&(s.get=l?"fetching":"hit"),this.#O(o),i&&this.#B(o),l?a.__staleWhileFetching:a)}#Y(e,t){this.#g[t]=e,this.#f[e]=t}#O(e){e!==this.#y&&(e===this.#m?this.#m=this.#f[e]:this.#Y(this.#g[e],this.#f[e]),this.#Y(this.#y,e),this.#y=e)}delete(e){return this.#q(e,"delete")}#q(e,t){s.hasSubscribers&&s.publish({op:"delete",delete:t,key:e,cache:this});let r=!1;if(0!==this.#c){let i=this.#h.get(e);if(void 0!==i)if(this.#C?.[i]&&(clearTimeout(this.#C?.[i]),this.#C[i]=void 0),r=!0,
41===this.#c)this.#Z(t);else{this.#H(i);let r=this.#p[i];if(this.#R(r)?r.__abortController.abort(Error("deleted")):(this.#E||this.#T)&&(this.#E&&this.#i?.(r,e,t),this.#T&&this.#v?.push([r,e,t])),this.#h.delete(e),this.#d[i]=void 0,this.#p[i]=void 0,i===this.#y)this.#y=this.#g[i];else if(i===this.#m)this.#m=this.#f[i];else{let e=this.#g[i];this.#f[e]=this.#f[i];let t=this.#f[i];this.#g[t]=this.#g[i]}this.#c--,this.#b.push(i)}}if(this.#T&&this.#v?.length){let e=this.#v,t;for(;t=e?.shift();)this.#s?.(...t)}return r}clear(){return this.#Z("delete")}#Z(e){for(let t of this.#M({allowStale:!0})){let r=this.#p[t];if(this.#R(r))r.__abortController.abort(Error("deleted"));else{let i=this.#d[t];this.#E&&this.#i?.(r,i,e),this.#T&&this.#v?.push([r,i,e])}}if(this.#h.clear(),this.#p.fill(void 0),this.#d.fill(void 0),this.#S&&this.#x){for(let e of(this.#S.fill(0),this.#x.fill(0),this.#C??[]))void 0!==e&&clearTimeout(e);this.#C?.fill(void 0)}if(this.#w&&this.#w.fill(0),this.#m=0,this.#y=0,this.#b.length=0,this.#u=0,this.#c=0,this.#T&&this.#v){let e=this.#v,t;for(;t=e?.shift();)this.#s?.(...t)}}},f=r(2921),g={format(e,t){let r=f.format(e,t);if(null===r)throw Error(`Received invalid bytes value: ${e}`);return r},parse(e){let t=f.parse(e);if(null===t)throw Error(`Received invalid bytes value: ${e}`);return t}},m=r(93485),y=r(51642).hp;function b(e={}){return{options:e,factory:e=>new v(e)}}var v=class e extends i.o{type="l1";#ee;constructor(e={}){if(super(e),e.cacheInstance){this.#ee=e.cacheInstance;return}if(!1===e.serialize&&(e.maxEntrySize||e.maxSize))throw new m.p("Cannot use maxSize or maxEntrySize when serialize is set to `false`");this.#ee=new p({max:e.maxItems??1e3,maxEntrySize:e.maxEntrySize?g.parse(e.maxEntrySize):void 0,ttlAutopurge:!1,...e.maxSize?{maxSize:e.maxSize?g.parse(e.maxSize):void 0,sizeCalculation:e=>y.byteLength(e,"utf-8")}:{}})}namespace(t){return new e({...this.config,cacheInstance:this.#ee,prefix:this.createNamespacePrefix(t)})}get(e){return this.#ee.get(this.getItemKey(e))}pull(e){let t=this.get(e);return this.delete(e),t}set(e,t,r){return this.#ee.set(this.getItemKey(e),t,{ttl:r}),!0}getRemainingTtl(e){return this.#ee.getRemainingTTL(this.getItemKey(e))}clear(){for(let e of this.#ee.keys())e.startsWith(`${this.prefix}:`)&&this.#ee.delete(e)}delete(e){return this.#ee.delete(this.getItemKey(e))}deleteMany(e){if(0===e.length)return!0;for(let t of e)this.delete(t);return!0}async disconnect(){}}},60458:function(e){e.exports=function(){"use strict";var e=Math.imul,t=Math.clz32,r=Math.abs,i=Math.max,n=Math.floor;class s extends Array{constructor(e,t){if(super(e),this.sign=t,e>s.__kMaxLength)throw RangeError("Maximum BigInt size exceeded")}static BigInt(e){var t=Number.isFinite;if("number"==typeof e){if(0===e)return s.__zero();if(s.__isOneDigitInt(e))return 0>e?s.__oneDigit(-e,!0):s.__oneDigit(e,!1);if(!t(e)||n(e)!==e)throw RangeError("The number "+e+" cannot be converted to BigInt because it is not an integer");return s.__fromDouble(e)}if("string"==typeof e){let t=s.__fromString(e);if(null===t)throw SyntaxError("Cannot convert "+e+" to a BigInt");return t}if("boolean"==typeof e)return!0===e?s.__oneDigit(1,!1):s.__zero();if("object"==typeof e){if(e.constructor===s)return e;let t=s.__toPrimitive(e);return s.BigInt(t)}throw TypeError("Cannot convert "+e+" to a BigInt")}toDebugString(){let e=["BigInt["];for(let t of this)e.push((t?(t>>>0).toString(16):t)+", ");return e.push("]"),e.join("")}toString(e=10){if(2>e||36<e)throw RangeError("toString() radix argument must be between 2 and 36");return 0===this.length?"0":0==(e&e-1)?s.__toStringBasePowerOfTwo(this,e):s.__toStringGeneric(this,e,!1)}static toNumber(e){let t=e.length;if(0===t)return 0;if(1===t){let t=e.__unsignedDigit(0);return e.sign?-t:t}let r=e.__digit(t-1),i=s.__clz30(r),n=30*t-i;if(1024<n)return e.sign?-1/0:1/0;let o=n-1,a=r,l=t-1,c=i+3,u=32===c?0:a<<c;u>>>=12;let h=c-12,d=12<=c?0:a<<20+c,p=20+c;for(0<h&&0<l&&(l--,u|=(a=e.__digit(l))>>>30-h,d=a<<h+2,p=h+2);0<p&&0<l;)l--,a=e.__digit(l),d|=30<=p?a<<p-30:a>>>30-p,p-=30;let f=s.__decideRounding(e,p,l,a);if((1===f||0===f&&1==(1&d))&&0==(d=d+1>>>0)&&0!=++u>>>20&&(u=0,1023<++o))return e.sign?-1/0:1/0;let g=e.sign?-0x80000000:0;return o=o+1023<<20,s.__kBitConversionInts[1]=g|o|u,s.__kBitConversionInts[0]=d,s.__kBitConversionDouble[0]}static unaryMinus(e){if(0===e.length)return e;let t=e.__copy();return t.sign=!e.sign,t}static bitwiseNot(e){return e.sign?s.__absoluteSubOne(e).__trim():s.__absoluteAddOne(e,!0)}static exponentiate(e,t){if(t.sign)throw RangeError("Exponent must be positive");
4if(0===t.length)return s.__oneDigit(1,!1);if(0===e.length)return e;if(1===e.length&&1===e.__digit(0))return e.sign&&0==(1&t.__digit(0))?s.unaryMinus(e):e;if(1<t.length)throw RangeError("BigInt too big");let r=t.__unsignedDigit(0);if(1===r)return e;if(r>=s.__kMaxLengthBits)throw RangeError("BigInt too big");if(1===e.length&&2===e.__digit(0)){let t=1+(0|r/30),i=new s(t,e.sign&&0!=(1&r));i.__initializeDigits();let n=1<<r%30;return i.__setDigit(t-1,n),i}let i=null,n=e;for(0!=(1&r)&&(i=e),r>>=1;0!==r;r>>=1)n=s.multiply(n,n),0!=(1&r)&&(i=null===i?n:s.multiply(i,n));return i}static multiply(e,t){if(0===e.length)return e;if(0===t.length)return t;let r=e.length+t.length;30<=e.__clzmsd()+t.__clzmsd()&&r--;let i=new s(r,e.sign!==t.sign);i.__initializeDigits();for(let r=0;r<e.length;r++)s.__multiplyAccumulate(t,e.__digit(r),i,r);return i.__trim()}static divide(e,t){let r;if(0===t.length)throw RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return s.__zero();let i=e.sign!==t.sign,n=t.__unsignedDigit(0);if(1===t.length&&32767>=n){if(1===n)return i===e.sign?e:s.unaryMinus(e);r=s.__absoluteDivSmall(e,n,null)}else r=s.__absoluteDivLarge(e,t,!0,!1);return r.sign=i,r.__trim()}static remainder(e,t){if(0===t.length)throw RangeError("Division by zero");if(0>s.__absoluteCompare(e,t))return e;let r=t.__unsignedDigit(0);if(1===t.length&&32767>=r){if(1===r)return s.__zero();let t=s.__absoluteModSmall(e,r);return 0===t?s.__zero():s.__oneDigit(t,e.sign)}let i=s.__absoluteDivLarge(e,t,!1,!0);return i.sign=e.sign,i.__trim()}static add(e,t){let r=e.sign;return r===t.sign?s.__absoluteAdd(e,t,r):0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,r):s.__absoluteSub(t,e,!r)}static subtract(e,t){let r=e.sign;return r===t.sign?0<=s.__absoluteCompare(e,t)?s.__absoluteSub(e,t,r):s.__absoluteSub(t,e,!r):s.__absoluteAdd(e,t,r)}static leftShift(e,t){return 0===t.length||0===e.length?e:t.sign?s.__rightShiftByAbsolute(e,t):s.__leftShiftByAbsolute(e,t)}static signedRightShift(e,t){return 0===t.length||0===e.length?e:t.sign?s.__leftShiftByAbsolute(e,t):s.__rightShiftByAbsolute(e,t)}static unsignedRightShift(){throw TypeError("BigInts have no unsigned right shift; use >> instead")}static lessThan(e,t){return 0>s.__compareToBigInt(e,t)}static lessThanOrEqual(e,t){return 0>=s.__compareToBigInt(e,t)}static greaterThan(e,t){return 0<s.__compareToBigInt(e,t)}static greaterThanOrEqual(e,t){return 0<=s.__compareToBigInt(e,t)}static equal(e,t){if(e.sign!==t.sign||e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e.__digit(r)!==t.__digit(r))return!1;return!0}static notEqual(e,t){return!s.equal(e,t)}static bitwiseAnd(e,t){if(!e.sign&&!t.sign)return s.__absoluteAnd(e,t).__trim();if(e.sign&&t.sign){let r=i(e.length,t.length)+1,n=s.__absoluteSubOne(e,r),o=s.__absoluteSubOne(t);return n=s.__absoluteOr(n,o,n),s.__absoluteAddOne(n,!0,n).__trim()}return e.sign&&([e,t]=[t,e]),s.__absoluteAndNot(e,s.__absoluteSubOne(t)).__trim()}static bitwiseXor(e,t){if(!e.sign&&!t.sign)return s.__absoluteXor(e,t).__trim();if(e.sign&&t.sign){let r=i(e.length,t.length),n=s.__absoluteSubOne(e,r),o=s.__absoluteSubOne(t);return s.__absoluteXor(n,o,n).__trim()}let r=i(e.length,t.length)+1;e.sign&&([e,t]=[t,e]);let n=s.__absoluteSubOne(t,r);return n=s.__absoluteXor(n,e,n),s.__absoluteAddOne(n,!0,n).__trim()}static bitwiseOr(e,t){let r=i(e.length,t.length);if(!e.sign&&!t.sign)return s.__absoluteOr(e,t).__trim();if(e.sign&&t.sign){let i=s.__absoluteSubOne(e,r),n=s.__absoluteSubOne(t);return i=s.__absoluteAnd(i,n,i),s.__absoluteAddOne(i,!0,i).__trim()}e.sign&&([e,t]=[t,e]);let n=s.__absoluteSubOne(t,r);return n=s.__absoluteAndNot(n,e,n),s.__absoluteAddOne(n,!0,n).__trim()}static asIntN(e,t){if(0===t.length)return t;if(0>(e=n(e)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return s.__zero();if(e>=s.__kMaxLengthBits)return t;let r=0|(e+29)/30;if(t.length<r)return t;let i=t.__unsignedDigit(r-1),o=1<<(e-1)%30;if(t.length===r&&i<o)return t;if((i&o)!==o)return s.__truncateToNBits(e,t);if(!t.sign)return s.__truncateAndSubFromPowerOfTwo(e,t,!0);if(0==(i&o-1)){for(let i=r-2;0<=i;i--)if(0!==t.__digit(i))return s.__truncateAndSubFromPowerOfTwo(e,t,!1);
4return t.length===r&&i===o?t:s.__truncateToNBits(e,t)}return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}static asUintN(e,t){if(0===t.length)return t;if(0>(e=n(e)))throw RangeError("Invalid value: not (convertible to) a safe integer");if(0===e)return s.__zero();if(t.sign){if(e>s.__kMaxLengthBits)throw RangeError("BigInt too big");return s.__truncateAndSubFromPowerOfTwo(e,t,!1)}if(e>=s.__kMaxLengthBits)return t;let r=0|(e+29)/30;if(t.length<r)return t;let i=e%30;return t.length==r&&(0===i||0==t.__digit(r-1)>>>i)?t:s.__truncateToNBits(e,t)}static ADD(e,t){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),"string"==typeof e)return"string"!=typeof t&&(t=t.toString()),e+t;if("string"==typeof t)return e.toString()+t;if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)&&s.__isBigInt(t))return s.add(e,t);if("number"==typeof e&&"number"==typeof t)return e+t;throw TypeError("Cannot mix BigInt and other types, use explicit conversions")}static LT(e,t){return s.__compare(e,t,0)}static LE(e,t){return s.__compare(e,t,1)}static GT(e,t){return s.__compare(e,t,2)}static GE(e,t){return s.__compare(e,t,3)}static EQ(e,t){for(;;){if(s.__isBigInt(e))return s.__isBigInt(t)?s.equal(e,t):s.EQ(t,e);if("number"==typeof e){if(s.__isBigInt(t))return s.__equalToNumber(t,e);if("object"!=typeof t)return e==t;t=s.__toPrimitive(t)}else if("string"==typeof e){if(s.__isBigInt(t))return null!==(e=s.__fromString(e))&&s.equal(e,t);if("object"!=typeof t)return e==t;t=s.__toPrimitive(t)}else if("boolean"==typeof e){if(s.__isBigInt(t))return s.__equalToNumber(t,+e);if("object"!=typeof t)return e==t;t=s.__toPrimitive(t)}else if("symbol"==typeof e){if(s.__isBigInt(t))return!1;if("object"!=typeof t)return e==t;t=s.__toPrimitive(t)}else{if("object"!=typeof e||"object"==typeof t&&t.constructor!==s)return e==t;e=s.__toPrimitive(e)}}}static NE(e,t){return!s.EQ(e,t)}static __zero(){return new s(0,!1)}static __oneDigit(e,t){let r=new s(1,t);return r.__setDigit(0,e),r}__copy(){let e=new s(this.length,this.sign);for(let t=0;t<this.length;t++)e[t]=this[t];return e}__trim(){let e=this.length,t=this[e-1];for(;0===t;)t=this[--e-1],this.pop();return 0===e&&(this.sign=!1),this}__initializeDigits(){for(let e=0;e<this.length;e++)this[e]=0}static __decideRounding(e,t,r,i){let n;if(0<t)return -1;if(0>t)n=-t-1;else{if(0===r)return -1;r--,i=e.__digit(r),n=29}let s=1<<n;if(0==(i&s))return -1;if(s-=1,0!=(i&s))return 1;for(;0<r;)if(r--,0!==e.__digit(r))return 1;return 0}static __fromDouble(e){s.__kBitConversionDouble[0]=e;let t=(2047&s.__kBitConversionInts[1]>>>20)-1023,r=(0|t/30)+1,i=new s(r,0>e),n=1048575&s.__kBitConversionInts[1]|1048576,o=s.__kBitConversionInts[0],a=t%30,l,c=0;if(20>a){let e=20-a;c=e+32,l=n>>>e,n=n<<32-e|o>>>e,o<<=32-e}else if(20===a)c=32,l=n,n=o,o=0;else{let e=a-20;c=32-e,l=n<<e|o>>>32-e,n=o<<e,o=0}i.__setDigit(r-1,l);for(let e=r-2;0<=e;e--)0<c?(c-=30,l=n>>>2,n=n<<30|o>>>2,o<<=30):l=0,i.__setDigit(e,l);return i.__trim()}static __isWhitespace(e){return!!(13>=e&&9<=e)||(159>=e?32==e:131071>=e?160==e||5760==e:196607>=e?10>=(e&=131071)||40==e||41==e||47==e||95==e||4096==e:65279==e)}static __fromString(e,t=0){let r=0,i=e.length,n=0;if(0===i)return s.__zero();let o=e.charCodeAt(n);for(;s.__isWhitespace(o);){if(++n===i)return s.__zero();o=e.charCodeAt(n)}if(43===o){if(++n===i)return null;o=e.charCodeAt(n),r=1}else if(45===o){if(++n===i)return null;o=e.charCodeAt(n),r=-1}if(0===t){if(t=10,48===o){if(++n===i)return s.__zero();if(88===(o=e.charCodeAt(n))||120===o){if(t=16,++n===i)return null;o=e.charCodeAt(n)}else if(79===o||111===o){if(t=8,++n===i)return null;o=e.charCodeAt(n)}else if(66===o||98===o){if(t=2,++n===i)return null;o=e.charCodeAt(n)}}}else if(16===t&&48===o){if(++n===i)return s.__zero();if(88===(o=e.charCodeAt(n))||120===o){if(++n===i)return null;o=e.charCodeAt(n)}}if(0!=r&&10!==t)return null;for(;48===o;){if(++n===i)return s.__zero();o=e.charCodeAt(n)}let a=i-n,l=s.__kMaxBitsPerChar[t],c=s.__kBitsPerCharTableMultiplier-1;if(a>0x40000000/l)return null;let u=l*a+c>>>s.__kBitsPerCharTableShift,h=new s(0|(u+29)/30,!1),d=10>t?t:10,p=10<t?t-10:0;if(0==(t&t-1)){l>>=s.__kBitsPerCharTableShift;let t=[],r=[],a=!1;do{let s=0,c=0;for(;;){let t;if(o-48>>>0<d)t=o-48;else if((32|o)-97>>>0<p)t=(32|o)-87;else{a=!0;break}if(c+=l,s=s<<l|t,++n===i){a=!0;break}if(o=e.charCodeAt(n),30<c+l)break}t.push(s),r.push(c)}while(!a);s.__fillFromParts(h,t,r)}else{h.__initializeDigits();let r=!1,a=0;do{let u=0,f=1;for(;;){let s;if(o-48>>>0<d)s=o-48;else if((32|o)-97>>>0<p)s=(32|o)-87;else{r=!0;break}let l=f*t;if(0x3fffffff<l)break;if(f=l,u=u*t+s,a++,++n===i){r=!0;break}o=e.charCodeAt(n)}let g=0|(l*a+(c=30*s.__kBitsPerCharTableMultiplier-1)>>>s.__kBitsPerCharTableShift)/30;h.__inplaceMultiplyAdd(f,u,g)}while(!r)}if(n!==i){if(!s.__isWhitespace(o))return null;for(n++;n<i;n++)if(o=e.charCodeAt(n),!s.__isWhitespace(o))return null}return h.sign=-1==r,h.__trim()}static __fillFromParts(e,t,r){let i=0,n=0,s=0;for(let o=t.length-1;0<=o;o--){let a=t[o],l=r[o];n|=a<<s,30===(s+=l)?(e.__setDigit(i++,n),s=0,n=0):30<s&&(e.__setDigit(i++,0x3fffffff&n),s-=30,n=a>>>l-s)}if(0!==n){if(i>=e.length)throw Error("implementation bug");e.__setDigit(i++,n)}for(;i<e.length;i++)e.__setDigit(i,0)}static __toStringBasePowerOfTwo(e,t){let r=e.length,i=t-1,n=i=(15&(i=(51&(i=(85&i>>>1)+(85&i))>>>2)+(51&i))>>>4)+(15&i),o=t-1,a=e.__digit(r-1),l=0|(30*r-s.__clz30(a)+n-1)/n;if(e.sign&&l++,0x10000000<l)throw Error("string too long");let c=Array(l),u=l-1,h=0,d=0;for(let t=0;t<r-1;t++){let r=e.__digit(t),i=(h|r<<d)&o;c[u--]=s.__kConversionChars[i];let a=n-d;for(h=r>>>a,d=30-a;d>=n;)c[u--]=s.__kConversionChars[h&o],h>>>=n,d-=n}let p=(h|a<<d)&o;for(c[u--]=s.__kConversionChars[p],h=a>>>n-d;0!==h;)c[u--]=s.__kConversionChars[h&o],h>>>=n;
4if(e.sign&&(c[u--]="-"),-1!=u)throw Error("implementation bug");return c.join("")}static __toStringGeneric(e,t,r){let i,n,o=e.length;if(0===o)return"";if(1===o){let i=e.__unsignedDigit(0).toString(t);return!1===r&&e.sign&&(i="-"+i),i}let a=30*o-s.__clz30(e.__digit(o-1)),l=s.__kMaxBitsPerChar[t]-1,c=a*s.__kBitsPerCharTableMultiplier;c+=l-1;let u=(c=0|c/l)+1>>1,h=s.exponentiate(s.__oneDigit(t,!1),s.__oneDigit(u,!1)),d=h.__unsignedDigit(0);if(1===h.length&&32767>=d){(i=new s(e.length,!1)).__initializeDigits();let r=0;for(let t=2*e.length-1;0<=t;t--){let n=r<<15|e.__halfDigit(t);i.__setHalfDigit(t,0|n/d),r=0|n%d}n=r.toString(t)}else{let r=s.__absoluteDivLarge(e,h,!0,!0);i=r.quotient;let o=r.remainder.__trim();n=s.__toStringGeneric(o,t,!0)}i.__trim();let p=s.__toStringGeneric(i,t,!0);for(;n.length<u;)n="0"+n;return!1===r&&e.sign&&(p="-"+p),p+n}static __unequalSign(e){return e?-1:1}static __absoluteGreater(e){return e?-1:1}static __absoluteLess(e){return e?1:-1}static __compareToBigInt(e,t){let r=e.sign;if(r!==t.sign)return s.__unequalSign(r);let i=s.__absoluteCompare(e,t);return 0<i?s.__absoluteGreater(r):0>i?s.__absoluteLess(r):0}static __compareToNumber(e,t){if(s.__isOneDigitInt(t)){let i=e.sign,n=0>t;if(i!==n)return s.__unequalSign(i);if(0===e.length){if(n)throw Error("implementation bug");return 0===t?0:-1}if(1<e.length)return s.__absoluteGreater(i);let o=r(t),a=e.__unsignedDigit(0);return a>o?s.__absoluteGreater(i):a<o?s.__absoluteLess(i):0}return s.__compareToDouble(e,t)}static __compareToDouble(e,t){if(t!=t)return t;if(t===1/0)return -1;if(t===-1/0)return 1;let r=e.sign;if(r!==0>t)return s.__unequalSign(r);if(0===t)throw Error("implementation bug: should be handled elsewhere");if(0===e.length)return -1;s.__kBitConversionDouble[0]=t;let i=2047&s.__kBitConversionInts[1]>>>20;if(2047==i)throw Error("implementation bug: handled elsewhere");let n=i-1023;if(0>n)return s.__absoluteGreater(r);let o=e.length,a=e.__digit(o-1),l=s.__clz30(a),c=30*o-l,u=n+1;if(c<u)return s.__absoluteLess(r);if(c>u)return s.__absoluteGreater(r);let h=1048576|1048575&s.__kBitConversionInts[1],d=s.__kBitConversionInts[0],p=29-l;if(p!==(0|(c-1)%30))throw Error("implementation bug");let f,g=0;if(20>p){let e=20-p;g=e+32,f=h>>>e,h=h<<32-e|d>>>e,d<<=32-e}else if(20===p)g=32,f=h,h=d,d=0;else{let e=p-20;g=32-e,f=h<<e|d>>>32-e,h=d<<e,d=0}if((a>>>=0)>(f>>>=0))return s.__absoluteGreater(r);if(a<f)return s.__absoluteLess(r);for(let t=o-2;0<=t;t--){0<g?(g-=30,f=h>>>2,h=h<<30|d>>>2,d<<=30):f=0;let i=e.__unsignedDigit(t);if(i>f)return s.__absoluteGreater(r);if(i<f)return s.__absoluteLess(r)}if(0!==h||0!==d){if(0===g)throw Error("implementation bug");return s.__absoluteLess(r)}return 0}static __equalToNumber(e,t){return s.__isOneDigitInt(t)?0===t?0===e.length:1===e.length&&e.sign===0>t&&e.__unsignedDigit(0)===r(t):0===s.__compareToDouble(e,t)}static __comparisonResultToBool(e,t){return 0===t?0>e:1===t?0>=e:2===t?0<e:3===t?0<=e:void 0}static __compare(e,t,r){if(e=s.__toPrimitive(e),t=s.__toPrimitive(t),"string"==typeof e&&"string"==typeof t)switch(r){case 0:return e<t;case 1:return e<=t;case 2:return e>t;case 3:return e>=t}if(s.__isBigInt(e)&&"string"==typeof t)return null!==(t=s.__fromString(t))&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),r);if("string"==typeof e&&s.__isBigInt(t))return null!==(e=s.__fromString(e))&&s.__comparisonResultToBool(s.__compareToBigInt(e,t),r);if(e=s.__toNumeric(e),t=s.__toNumeric(t),s.__isBigInt(e)){if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToBigInt(e,t),r);if("number"!=typeof t)throw Error("implementation bug");return s.__comparisonResultToBool(s.__compareToNumber(e,t),r)}if("number"!=typeof e)throw Error("implementation bug");if(s.__isBigInt(t))return s.__comparisonResultToBool(s.__compareToNumber(t,e),2^r);if("number"!=typeof t)throw Error("implementation bug");return 0===r?e<t:1===r?e<=t:2===r?e>t:3===r?e>=t:void 0}__clzmsd(){return s.__clz30(this.__digit(this.length-1))}static __absoluteAdd(e,t,r){if(e.length<t.length)return s.__absoluteAdd(t,e,r);if(0===e.length)return e;if(0===t.length)return e.sign===r?e:s.unaryMinus(e);let i=e.length;(0===e.__clzmsd()||t.length===e.length&&0===t.__clzmsd())&&i++;let n=new s(i,r),o=0,a=0;for(;a<t.length;a++){let r=e.__digit(a)+t.__digit(a)+o;o=r>>>30,n.__setDigit(a,0x3fffffff&r)}for(;a<e.length;a++){let t=e.__digit(a)+o;o=t>>>30,n.__setDigit(a,0x3fffffff&t)}return a<n.length&&n.__setDigit(a,o),n.__trim()}static __absoluteSub(e,t,r){if(0===e.length)return e;if(0===t.length)return e.sign===r?e:s.unaryMinus(e);let i=new s(e.length,r),n=0,o=0;for(;o<t.length;o++){let r=e.__digit(o)-t.__digit(o)-n;n=1&r>>>30,i.__setDigit(o,0x3fffffff&r)}for(;o<e.length;o++){let t=e.__digit(o)-n;n=1&t>>>30,i.__setDigit(o,0x3fffffff&t)}return i.__trim()}static __absoluteAddOne(e,t,r=null){let i=e.length;null===r?r=new s(i,t):r.sign=t;let n=1;for(let t=0;t<i;t++){let i=e.__digit(t)+n;n=i>>>30,r.__setDigit(t,0x3fffffff&i)}return 0!=n&&r.__setDigitGrow(i,1),r}static __absoluteSubOne(e,t){let r=e.length,i=new s(t=t||r,!1),n=1;for(let t=0;t<r;t++){let r=e.__digit(t)-n;n=1&r>>>30,i.__setDigit(t,0x3fffffff&r)}if(0!=n)throw Error("implementation bug");for(let e=r;e<t;e++)i.__setDigit(e,0);return i}static __absoluteAnd(e,t,r=null){let i=e.length,n=t.length,o=n;if(i<n){o=i;let r=e,s=i;e=t,i=n,t=r,n=s}let a=o;null===r?r=new s(a,!1):a=r.length;let l=0;for(;l<o;l++)r.__setDigit(l,e.__digit(l)&t.__digit(l));for(;l<a;l++)r.__setDigit(l,0);return r}static __absoluteAndNot(e,t,r=null){let i=e.length,n=t.length,o=n;i<n&&(o=i);let a=i;null===r?r=new s(a,!1):a=r.length;let l=0;for(;l<o;l++)r.__setDigit(l,e.__digit(l)&~t.__digit(l));for(;l<i;l++)r.__setDigit(l,e.__digit(l));for(;l<a;l++)r.__setDigit(l,0);return r}static __absoluteOr(e,t,r=null){let i=e.length,n=t.length,o=n;if(i<n){o=i;let r=e,s=i;e=t,i=n,t=r,n=s}let a=i;null===r?r=new s(a,!1):a=r.length;let l=0;for(;l<o;l++)r.__setDigit(l,e.__digit(l)|t.__digit(l));for(;l<i;l++)r.__setDigit(l,e.__digit(l));for(;l<a;l++)r.__setDigit(l,0);return r}static __absoluteXor(e,t,r=null){let i=e.length,n=t.length,o=n;if(i<n){o=i;let r=e,s=i;e=t,i=n,t=r,n=s}let a=i;null===r?r=new s(a,!1):a=r.length;let l=0;for(;l<o;l++)r.__setDigit(l,e.__digit(l)^t.__digit(l));for(;l<i;l++)r.__setDigit(l,e.__digit(l));for(;l<a;l++)r.__setDigit(l,0);return r}static __absoluteCompare(e,t){let r=e.length-t.length;if(0!=r)return r;let i=e.length-1;for(;0<=i&&e.__digit(i)===t.__digit(i);)i--;return 0>i?0:e.__unsignedDigit(i)>t.__unsignedDigit(i)?1:-1}
4static __multiplyAccumulate(e,t,r,i){if(0===t)return;let n=32767&t,o=t>>>15,a=0,l=0;for(let t,c=0;c<e.length;c++,i++){t=r.__digit(i);let u=e.__digit(c),h=32767&u,d=u>>>15,p=s.__imul(h,n),f=s.__imul(h,o),g=s.__imul(d,n),m=s.__imul(d,o);t+=l+p+a,a=t>>>30,t&=0x3fffffff,t+=((32767&f)<<15)+((32767&g)<<15),a+=t>>>30,l=m+(f>>>15)+(g>>>15),r.__setDigit(i,0x3fffffff&t)}for(;0!=a||0!==l;i++){let e=r.__digit(i);e+=a+l,l=0,a=e>>>30,r.__setDigit(i,0x3fffffff&e)}}static __internalMultiplyAdd(e,t,r,i,n){let o=r,a=0;for(let r=0;r<i;r++){let i=e.__digit(r),l=s.__imul(32767&i,t),c=s.__imul(i>>>15,t),u=l+((32767&c)<<15)+a+o;o=u>>>30,a=c>>>15,n.__setDigit(r,0x3fffffff&u)}if(n.length>i)for(n.__setDigit(i++,o+a);i<n.length;)n.__setDigit(i++,0);else if(0!==o+a)throw Error("implementation bug")}__inplaceMultiplyAdd(e,t,r){r>this.length&&(r=this.length);let i=32767&e,n=e>>>15,o=0,a=t;for(let e=0;e<r;e++){let t=this.__digit(e),r=32767&t,l=t>>>15,c=s.__imul(r,i),u=s.__imul(r,n),h=s.__imul(l,i),d=s.__imul(l,n),p=a+c+o;o=p>>>30,p&=0x3fffffff,p+=((32767&u)<<15)+((32767&h)<<15),o+=p>>>30,a=d+(u>>>15)+(h>>>15),this.__setDigit(e,0x3fffffff&p)}if(0!=o||0!==a)throw Error("implementation bug")}static __absoluteDivSmall(e,t,r=null){null===r&&(r=new s(e.length,!1));let i=0;for(let n,s=2*e.length-1;0<=s;s-=2){let o=0|(n=(i<<15|e.__halfDigit(s))>>>0)/t,a=0|(n=((i=0|n%t)<<15|e.__halfDigit(s-1))>>>0)/t;i=0|n%t,r.__setDigit(s>>>1,o<<15|a)}return r}static __absoluteModSmall(e,t){let r=0;for(let i=2*e.length-1;0<=i;i--)r=0|((r<<15|e.__halfDigit(i))>>>0)%t;return r}
4static __absoluteDivLarge(e,t,r,i){let n=t.__halfDigitLength(),o=t.length,a=e.__halfDigitLength()-n,l=null;r&&(l=new s(a+2>>>1,!1)).__initializeDigits();let c=new s(n+2>>>1,!1);c.__initializeDigits();let u=s.__clz15(t.__halfDigit(n-1));0<u&&(t=s.__specialLeftShift(t,u,0));let h=s.__specialLeftShift(e,u,1),d=t.__halfDigit(n-1),p=0;for(let e,i=a;0<=i;i--){e=32767;let a=h.__halfDigit(i+n);if(a!==d){let r=(a<<15|h.__halfDigit(i+n-1))>>>0;e=0|r/d;let o=0|r%d,l=t.__halfDigit(n-2),c=h.__halfDigit(i+n-2);for(;s.__imul(e,l)>>>0>(o<<16|c)>>>0&&(e--,!(32767<(o+=d))););}s.__internalMultiplyAdd(t,e,0,o,c);let u=h.__inplaceSub(c,i,n+1);0!==u&&(u=h.__inplaceAdd(t,i,n),h.__setHalfDigit(i+n,32767&h.__halfDigit(i+n)+u),e--),r&&(1&i?p=e<<15:l.__setDigit(i>>>1,p|e))}if(i)return h.__inplaceRightShift(u),r?{quotient:l,remainder:h}:h;if(r)return l;throw Error("unreachable")}static __clz15(e){return s.__clz30(e)-15}__inplaceAdd(e,t,r){let i=0;for(let n=0;n<r;n++){let r=this.__halfDigit(t+n)+e.__halfDigit(n)+i;i=r>>>15,this.__setHalfDigit(t+n,32767&r)}return i}__inplaceSub(e,t,r){let i=0;if(1&t){t>>=1;let n=this.__digit(t),s=32767&n,o=0;for(;o<r-1>>>1;o++){let r=e.__digit(o),a=(n>>>15)-(32767&r)-i;i=1&a>>>15,this.__setDigit(t+o,(32767&a)<<15|32767&s),i=1&(s=(32767&(n=this.__digit(t+o+1)))-(r>>>15)-i)>>>15}let a=e.__digit(o),l=(n>>>15)-(32767&a)-i;if(i=1&l>>>15,this.__setDigit(t+o,(32767&l)<<15|32767&s),t+o+1>=this.length)throw RangeError("out of bounds");0==(1&r)&&(i=1&(s=(32767&(n=this.__digit(t+o+1)))-(a>>>15)-i)>>>15,this.__setDigit(t+e.length,0x3fff8000&n|32767&s))}else{t>>=1;let n=0;for(;n<e.length-1;n++){let r=this.__digit(t+n),s=e.__digit(n),o=(32767&r)-(32767&s)-i,a=(r>>>15)-(s>>>15)-(i=1&o>>>15);i=1&a>>>15,this.__setDigit(t+n,(32767&a)<<15|32767&o)}let s=this.__digit(t+n),o=e.__digit(n),a=(32767&s)-(32767&o)-i;i=1&a>>>15;let l=0;0==(1&r)&&(i=1&(l=(s>>>15)-(o>>>15)-i)>>>15),this.__setDigit(t+n,(32767&l)<<15|32767&a)}return i}__inplaceRightShift(e){if(0===e)return;let t=this.__digit(0)>>>e,r=this.length-1;for(let i=0;i<r;i++){let r=this.__digit(i+1);this.__setDigit(i,0x3fffffff&r<<30-e|t),t=r>>>e}this.__setDigit(r,t)}static __specialLeftShift(e,t,r){let i=e.length,n=new s(i+r,!1);if(0===t){for(let t=0;t<i;t++)n.__setDigit(t,e.__digit(t));return 0<r&&n.__setDigit(i,0),n}let o=0;for(let r=0;r<i;r++){let i=e.__digit(r);n.__setDigit(r,0x3fffffff&i<<t|o),o=i>>>30-t}return 0<r&&n.__setDigit(i,o),n}static __leftShiftByAbsolute(e,t){let r=s.__toShiftAmount(t);if(0>r)throw RangeError("BigInt too big");let i=0|r/30,n=r%30,o=e.length,a=0!==n&&0!=e.__digit(o-1)>>>30-n,l=o+i+ +!!a,c=new s(l,e.sign);if(0===n){let t=0;for(;t<i;t++)c.__setDigit(t,0);for(;t<l;t++)c.__setDigit(t,e.__digit(t-i))}else{let t=0;for(let e=0;e<i;e++)c.__setDigit(e,0);for(let r=0;r<o;r++){let s=e.__digit(r);c.__setDigit(r+i,0x3fffffff&s<<n|t),t=s>>>30-n}if(a)c.__setDigit(o+i,t);else if(0!==t)throw Error("implementation bug")}return c.__trim()}static __rightShiftByAbsolute(e,t){let r=e.length,i=e.sign,n=s.__toShiftAmount(t);if(0>n)return s.__rightShiftByMaximum(i);let o=0|n/30,a=n%30,l=r-o;if(0>=l)return s.__rightShiftByMaximum(i);let c=!1;if(i){if(0!=(e.__digit(o)&(1<<a)-1))c=!0;else for(let t=0;t<o;t++)if(0!==e.__digit(t)){c=!0;break}}c&&0===a&&0==~e.__digit(r-1)&&l++;let u=new s(l,i);if(0===a){u.__setDigit(l-1,0);for(let t=o;t<r;t++)u.__setDigit(t-o,e.__digit(t))}else{let t=e.__digit(o)>>>a,i=r-o-1;for(let r=0;r<i;r++){let i=e.__digit(r+o+1);u.__setDigit(r,0x3fffffff&i<<30-a|t),t=i>>>a}u.__setDigit(i,t)}return c&&(u=s.__absoluteAddOne(u,!0,u)),u.__trim()}static __rightShiftByMaximum(e){return e?s.__oneDigit(1,!0):s.__zero()}static __toShiftAmount(e){if(1<e.length)return -1;let t=e.__unsignedDigit(0);return t>s.__kMaxLengthBits?-1:t}static __toPrimitive(e,t="default"){if("object"!=typeof e||e.constructor===s)return e;if("undefined"!=typeof Symbol&&"symbol"==typeof Symbol.toPrimitive){let r=e[Symbol.toPrimitive];if(r){let e=r(t);if("object"!=typeof e)return e;throw TypeError("Cannot convert object to primitive value")}}let r=e.valueOf;if(r){let t=r.call(e);if("object"!=typeof t)return t}let i=e.toString;if(i){let t=i.call(e);
4if("object"!=typeof t)return t}throw TypeError("Cannot convert object to primitive value")}static __toNumeric(e){return s.__isBigInt(e)?e:+e}static __isBigInt(e){return"object"==typeof e&&null!==e&&e.constructor===s}static __truncateToNBits(e,t){let r=0|(e+29)/30,i=new s(r,t.sign),n=r-1;for(let e=0;e<n;e++)i.__setDigit(e,t.__digit(e));let o=t.__digit(n);if(0!=e%30){let t=32-e%30;o=o<<t>>>t}return i.__setDigit(n,o),i.__trim()}static __truncateAndSubFromPowerOfTwo(e,t,r){let i;var n=Math.min;let o=0|(e+29)/30,a=new s(o,r),l=0,c=o-1,u=0;for(let e=n(c,t.length);l<e;l++){let e=0-t.__digit(l)-u;u=1&e>>>30,a.__setDigit(l,0x3fffffff&e)}for(;l<c;l++)a.__setDigit(l,0x3fffffff&-u);let h=c<t.length?t.__digit(c):0,d=e%30;if(0==d)i=0-h-u&0x3fffffff;else{let e=32-d;h=h<<e>>>e;let t=1<<32-e;i=t-h-u&t-1}return a.__setDigit(c,i),a.__trim()}__digit(e){return this[e]}__unsignedDigit(e){return this[e]>>>0}__setDigit(e,t){this[e]=0|t}__setDigitGrow(e,t){this[e]=0|t}__halfDigitLength(){let e=this.length;return 32767>=this.__unsignedDigit(e-1)?2*e-1:2*e}__halfDigit(e){return 32767&this[e>>>1]>>>15*(1&e)}__setHalfDigit(e,t){let r=e>>>1,i=this.__digit(r);this.__setDigit(r,1&e?32767&i|t<<15:0x3fff8000&i|32767&t)}static __digitPow(e,t){let r=1;for(;0<t;)1&t&&(r*=e),t>>>=1,e*=e;return r}static __isOneDigitInt(e){return(0x3fffffff&e)===e}}return s.__kMaxLength=0x2000000,s.__kMaxLengthBits=s.__kMaxLength<<5,s.__kMaxBitsPerChar=[0,0,32,51,64,75,83,90,96,102,107,111,115,119,122,126,128,131,134,136,139,141,143,145,147,149,151,153,154,156,158,159,160,162,163,165,166],s.__kBitsPerCharTableShift=5,s.__kBitsPerCharTableMultiplier=1<<s.__kBitsPerCharTableShift,s.__kConversionChars=["0","1","2","3","4","5","6","7","8","9","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"],s.__kBitConversionBuffer=new ArrayBuffer(8),s.__kBitConversionDouble=new Float64Array(s.__kBitConversionBuffer),s.__kBitConversionInts=new Int32Array(s.__kBitConversionBuffer),s.__clz30=t?function(e){return t(e)-2}:function(e){var t=Math.LN2,r=Math.log;return 0===e?30:0|29-(0|r(e>>>0)/t)},s.__imul=e||function(e,t){return 0|e*t},s}()},65808:(e,t,r)=>{"use strict";let i,n;if(r.d(t,{h4:()=>a,RB:()=>u}),!document||!DOMParser||!Node||!XMLSerializer)throw Error('This library depends on the following DOM objects: ["document", "DOMParser", "Node", "XMLSerializer"] to parse XML, but some of these are undefined. You may provide a polyfill to make these globally available in order to support your environment. For more information, please refer to https://aka.ms/azsdk/js/web-workers. ');try{void 0!==self.trustedTypes&&(i=self.trustedTypes.createPolicy("@azure/core-xml#xml.browser",{createHTML:e=>e}))}catch(e){console.warn('Could not create trusted types policy "@azure/core-xml#xml.browser"')}let s=document.implementation.createDocument(null,null,null),o=new DOMParser;function a(e,t={}){try{let r,s={rootName:t.rootName??"",includeRoot:t.includeRoot??!1,xmlCharKey:t.xmlCharKey??"_",cdataPropName:t.cdataPropName??"__cdata",stopNodes:t.stopNodes??[]},a=o.parseFromString(i?.createHTML(e)??e,"application/xml");return function(e){let t=e.getElementsByTagName("parsererror");if(t.length>0&&function(){if(void 0===n)try{let e=i?.createHTML("INVALID")??"INVALID";n=o.parseFromString(e,"text/xml").getElementsByTagName("parsererror")[0].namespaceURI??""}catch(e){n=""}return n}()){for(let e=0;e<t.length;e++)if(t[e].namespaceURI===n)throw Error(t[e].innerHTML)}}(a),r=s.includeRoot?l(a,s):l(a.childNodes[0],s),Promise.resolve(r)}catch(e){return Promise.reject(e)}}function l(e,t){var r;let i={},n=e.childNodes.length,s=e.childNodes[0],o=s&&1===n&&s.nodeType===Node.TEXT_NODE&&s.nodeValue||void 0,a=(r=e).attributes&&r.hasAttributes()?r:void 0;if(a){i.$={};for(let e=0;e<a.attributes.length;e++){let t=a.attributes[e];i.$[t.nodeName]=t.nodeValue}o&&(i[t.xmlCharKey]=o)}else 0===n?i="":o&&(i=o);if(!o)for(let r=0;r<n;r++){let n=e.childNodes[r];if(n?.nodeType===Node.CDATA_SECTION_NODE)i=n.textContent;else if(n?.firstChild?.nodeType===Node.CDATA_SECTION_NODE)i[n.nodeName]=n.textContent;else if(n.nodeType!==Node.TEXT_NODE){let e=l(n,t);i[n.nodeName]?Array.isArray(i[n.nodeName])?i[n.nodeName].push(e):i[n.nodeName]=[i[n.nodeName],e]:i[n.nodeName]=e}}return i}let c=new XMLSerializer;function u(e,t={}){let r={rootName:t.rootName??"root",includeRoot:t.includeRoot??!1,xmlCharKey:t.xmlCharKey??"_",cd
4ataPropName:t.cdataPropName??"__cdata",stopNodes:t.stopNodes??[]},i=function e(t,r,i){if(null==t||"string"==typeof t||"number"==typeof t||"boolean"==typeof t){let e=s.createElement(r);return e.textContent=null==t?"":t.toString(),[e]}if(Array.isArray(t)){let n=[];for(let s of t)for(let t of e(s,r,i))n.push(t);return n}if("object"==typeof t){let n;for(let o of(n=t.$?.xmlns?s.createElementNS(t.$.xmlns,r):s.createElement(r),Object.keys(t)))if("$"===o)for(let e of function(e){let t=[];for(let r of Object.keys(e)){let i=s.createAttribute(r);i.value=e[r].toString(),t.push(i)}return t}(t[o]))n.attributes.setNamedItem(e);else if(o===i.xmlCharKey)n.textContent=t[o].toString();else if(o===i.cdataPropName){let e=s.createCDATASection(t[o].toString());n.appendChild(e)}else for(let r of e(t[o],o,i))n.appendChild(r);return[n]}throw Error(`Illegal value passed to buildObject: ${t}`)}(e,r.rootName,r)[0];return'<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'+c.serializeToString(i).replace(/ xmlns=""/g,"")}},68142:(e,t,r)=>{"use strict";r.d(t,{t:()=>a});var i=r(88043);class n extends i.p{sendRequest(e){return this._nextPolicy.sendRequest(this.signRequest(e))}signRequest(e){return e}}class s extends n{constructor(e,t){super(e,t)}}class o{create(e,t){throw Error("Method should be implemented in children classes.")}}class a extends o{create(e,t){return new s(e,t)}}},68725:(e,t,r)=>{"use strict";r.d(t,{Ne:()=>U,jl:()=>q,wG:()=>H,cG:()=>z});var i,n,s,o,a=r(92092),l=r(26494),c=r(92584),u=r(94485);class h{get acceptRanges(){return this.originalResponse.acceptRanges}get cacheControl(){return this.originalResponse.cacheControl}get contentDisposition(){return this.originalResponse.contentDisposition}get contentEncoding(){return this.originalResponse.contentEncoding}get contentLanguage(){return this.originalResponse.contentLanguage}get blobSequenceNumber(){return this.originalResponse.blobSequenceNumber}get blobType(){return this.originalResponse.blobType}get contentLength(){return this.originalResponse.contentLength}get contentMD5(){return this.originalResponse.contentMD5}get contentRange(){return this.originalResponse.contentRange}get contentType(){return this.originalResponse.contentType}get copyCompletedOn(){}get copyId(){return this.originalResponse.copyId}get copyProgress(){return this.originalResponse.copyProgress}get copySource(){return this.originalResponse.copySource}get copyStatus(){return this.originalResponse.copyStatus}get copyStatusDescription(){return this.originalResponse.copyStatusDescription}get leaseDuration(){return this.originalResponse.leaseDuration}get leaseState(){return this.originalResponse.leaseState}get leaseStatus(){return this.originalResponse.leaseStatus}get date(){return this.originalResponse.date}get blobCommittedBlockCount(){return this.originalResponse.blobCommittedBlockCount}get etag(){return this.originalResponse.etag}get errorCode(){return this.originalResponse.errorCode}get isServerEncrypted(){return this.originalResponse.isServerEncrypted}get blobContentMD5(){return this.originalResponse.blobContentMD5}get lastModified(){return this.originalResponse.lastModified}get metadata(){return this.originalResponse.metadata}get requestId(){return this.originalResponse.requestId}get clientRequestId(){return this.originalResponse.clientRequestId}get version(){return this.originalResponse.version}get encryptionKeySha256(){return this.originalResponse.encryptionKeySha256}get contentCrc64(){return this.originalResponse.contentCrc64}get blobBody(){throw Error("Quick query in browser is not supported yet.")}get readableStreamBody(){}get _response(){return this.originalResponse._response}constructor(e,t={}){this.originalResponse=e}}var d=r(68142),p=r(87014),f=r(2848);function g(e){if(void 0!==e)return e}function m(e,t){if(e&&!t)throw RangeError("Customer-provided encryption key must be used over HTTPS.");e&&!e.encryptionAlgorithm&&(e.encryptionAlgorithm=f.ft)}function y(e){let t=(e._response.parsedBody.pageRange||[]).map(e=>({offset:e.start,count:e.end-e.start}
4)),r=(e._response.parsedBody.clearRange||[]).map(e=>({offset:e.start,count:e.end-e.start}));return Object.assign(Object.assign({},e),{pageRange:t,clearRange:r,_response:Object.assign(Object.assign({},e._response),{parsedBody:{pageRange:t,clearRange:r}})})}!function(e){e.Hot="Hot",e.Cool="Cool",e.Cold="Cold",e.Archive="Archive"}(i||(i={})),function(e){e.P4="P4",e.P6="P6",e.P10="P10",e.P15="P15",e.P20="P20",e.P30="P30",e.P40="P40",e.P50="P50",e.P60="P60",e.P70="P70",e.P80="P80"}(n||(n={})),function(e){e.StorageOAuthScopes="https://storage.azure.com/.default",e.DiskComputeOAuthScopes="https://disk.compute.azure.com/.default"}(s||(s={}));var b=r(72187);(0,r(17986).KV)("core-lro");class v extends Error{constructor(e){super(e),this.name="PollerStoppedError",Object.setPrototypeOf(this,v.prototype)}}class w extends Error{constructor(e){super(e),this.name="PollerCancelledError",Object.setPrototypeOf(this,w.prototype)}}class x{constructor(e){this.resolveOnUnsuccessful=!1,this.stopped=!0,this.pollProgressCallbacks=[],this.operation=e,this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t}),this.promise.catch(()=>{})}async startPolling(e={}){for(this.stopped&&(this.stopped=!1);!this.isStopped()&&!this.isDone();)await this.poll(e),await this.delay()}async pollOnce(e={}){this.isDone()||(this.operation=await this.operation.update({abortSignal:e.abortSignal,fireProgress:this.fireProgress.bind(this)})),this.processUpdatedState()}fireProgress(e){for(let t of this.pollProgressCallbacks)t(e)}async cancelOnce(e={}){this.operation=await this.operation.cancel(e)}poll(e={}){if(!this.pollOncePromise){this.pollOncePromise=this.pollOnce(e);let t=()=>{this.pollOncePromise=void 0};this.pollOncePromise.then(t,t).catch(this.reject)}return this.pollOncePromise}processUpdatedState(){if(this.operation.state.error&&(this.stopped=!0,!this.resolveOnUnsuccessful))throw this.reject(this.operation.state.error),this.operation.state.error;if(this.operation.state.isCancelled&&(this.stopped=!0,!this.resolveOnUnsuccessful)){let e=new w("Operation was canceled");throw this.reject(e),e}this.isDone()&&this.resolve&&this.resolve(this.getResult())}async pollUntilDone(e={}){return this.stopped&&this.startPolling(e).catch(this.reject),this.processUpdatedState(),this.promise}onProgress(e){return this.pollProgressCallbacks.push(e),()=>{this.pollProgressCallbacks=this.pollProgressCallbacks.filter(t=>t!==e)}}isDone(){let e=this.operation.state;return!!(e.isCompleted||e.isCancelled||e.error)}stopPolling(){!this.stopped&&(this.stopped=!0,this.reject&&this.reject(new v("This poller is already stopped")))}isStopped(){return this.stopped}cancelOperation(e={}){if(this.cancelPromise){if(e.abortSignal)throw Error("A cancel request is currently pending")}else this.cancelPromise=this.cancelOnce(e);return this.cancelPromise}getOperationState(){return this.operation.state}getResult(){return this.operation.state.result}toString(){return this.operation.toString()}}class S extends x{constructor(e){let t,{blobClient:r,copySource:i,intervalInMs:n=15e3,onProgress:s,resumeFrom:o,startCopyFromURLOptions:a}=e;o&&(t=JSON.parse(o).state),super(T(Object.assign(Object.assign({},t),{blobClient:r,copySource:i,startCopyFromURLOptions:a}))),"function"==typeof s&&this.onProgress(s),this.intervalInMs=n}delay(){return(0,u.cb)(this.intervalInMs)}}let C=async function(e={}){let t=this.state,{copyId:r}=t;return t.isCompleted||(r&&await t.blobClient.abortCopyFromURL(r,{abortSignal:e.abortSignal}),t.isCancelled=!0),T(t)},E=async function(e={}){let t=this.state,{blobClient:r,copySource:i,startCopyFromURLOptions:n}=t;if(t.isStarted){if(!t.isCompleted)try{let r=await t.blobClient.getProperties({abortSignal:e.abortSignal}),{copyStatus:i,copyProgress:n}=r,s=t.copyProgress;n&&(t.copyProgress=n),"pending"===i&&n!==s&&"function"==typeof e.fireProgress?e.fireProgress(t):"success"===i?(t.result=r,t.isCompleted=!0):"failed"===i&&(t.error=Error(`Blob copy failed with reason: "${r.copyStatusDescription||"unknown"}"`),t.isCompleted=!0)}catch(e){t.error=e,t.isCompleted=!0}}else{t.isStarted=!0;let e=await r.startCopyFromURL(i,n);t.copyId=e.copyId,"success"===e.copyStatus&&(t.result=e,t.isCompleted=!0)}return T(t)},_=function(){return JSON.stringify({state:this.state},(e,t)=>{if("blobClient"!==e)return t})};function T(e){return{state:Object.assign({}
4,e),cancel:C,toString:_,update:E}}function P(e){if(e.offset<0)throw RangeError("Range.offset cannot be smaller than 0.");if(e.count&&e.count<=0)throw RangeError("Range.count must be larger than 0. Leave it undefined if you want a range from offset to the end.");return e.count?`bytes=${e.offset}-${e.offset+e.count-1}`:`bytes=${e.offset}-`}var R=r(41553),I=r(35978);!function(e){e[e.Good=0]="Good",e[e.Error=1]="Error"}(o||(o={}));class O{constructor(e=5){if(this.actives=0,this.completed=0,this.offset=0,this.operations=[],this.state=o.Good,e<1)throw RangeError("concurrency must be larger than 0");this.concurrency=e,this.emitter=new I.EventEmitter}addOperation(e){this.operations.push(async()=>{try{this.actives++,await e(),this.actives--,this.completed++,this.parallelExecute()}catch(e){this.emitter.emit("error",e)}})}async do(){return 0===this.operations.length?Promise.resolve():(this.parallelExecute(),new Promise((e,t)=>{this.emitter.on("finish",e),this.emitter.on("error",e=>{this.state=o.Error,t(e)})}))}nextOperation(){return this.offset<this.operations.length?this.operations[this.offset++]:null}parallelExecute(){if(this.state!==o.Error){if(this.completed>=this.operations.length)return void this.emitter.emit("finish");for(;this.actives<this.concurrency;){let e=this.nextOperation();if(!e)return;e()}}}}class A{}var M=r(55335),k=r(28023),N=r(34046),L=r(97483),D=r(72211),B=r(51642).hp;class q extends R.L{get name(){return this._name}get containerName(){return this._containerName}
4constructor(e,t,r,i){let n,s;if(i=i||{},(0,b.O8)(t))s=e,n=t;else if(u.Ll&&t instanceof p.Z||t instanceof d.t||(0,c.Zp)(t))s=e,i=r,n=(0,b.vC)(t,i);else if(t||"string"==typeof t)if(t&&"string"==typeof t&&r&&"string"==typeof r){let o=(0,k.Tm)(e);if("AccountConnString"===o.kind)if(u.Ll){let e=new p.Z(o.accountName,o.accountKey);s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r)),i.proxyOptions||(i.proxyOptions=(0,l.nV)(o.proxyUri)),n=(0,b.vC)(e,i)}else throw Error("Account connection string is only supported in Node.js environment");else if("SASConnString"===o.kind)s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r))+"?"+o.accountSas,n=(0,b.vC)(new d.t,i);else throw Error("Connection string must be either an Account connection string or a SAS connection string")}else throw Error("Expecting non-empty strings for containerName and blobName parameters");else s=e,r&&"string"!=typeof r&&(i=r),n=(0,b.vC)(new d.t,i);super(s,n),({blobName:this._name,containerName:this._containerName}=this.getBlobAndContainerNamesFromUrl()),this.blobContext=this.storageClientContext.blob,this._snapshot=(0,k.LK)(this.url,f.Zh.Parameters.SNAPSHOT),this._versionId=(0,k.LK)(this.url,f.Zh.Parameters.VERSIONID)}withSnapshot(e){return new q((0,k.nM)(this.url,f.Zh.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}withVersion(e){return new q((0,k.nM)(this.url,f.Zh.Parameters.VERSIONID,0===e.length?void 0:e),this.pipeline)}getAppendBlobClient(){return new U(this.url,this.pipeline)}getBlockBlobClient(){return new H(this.url,this.pipeline)}getPageBlobClient(){return new z(this.url,this.pipeline)}async download(e=0,t,r={}){return r.conditions=r.conditions||{},r.conditions=r.conditions||{},m(r.customerProvidedKey,this.isHttps),M.U.withSpan("BlobClient-download",r,async i=>{var n;let s=(0,k.m6)(await this.blobContext.download({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null==(n=r.conditions)?void 0:n.tagConditions}),requestOptions:{onDownloadProgress:u.Ll?void 0:r.onProgress},range:0!==e||t?P({offset:e,count:t}):void 0,rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey,tracingOptions:i.tracingOptions})),o=Object.assign(Object.assign({},s),{_response:s._response,objectReplicationDestinationPolicyId:s.objectReplicationPolicyId,objectReplicationSourceProperties:(0,k.W9)(s.objectReplicationRules)});if(!u.Ll)return o;if((void 0===r.maxRetryRequests||r.maxRetryRequests<0)&&(r.maxRetryRequests=f.gJ),void 0===s.contentLength)throw RangeError("File download response doesn't contain valid content length header");if(!s.etag)throw RangeError("File download response doesn't contain valid etag header");return new(1)(o,async t=>{var i;let n={leaseAccessConditions:r.conditions,modifiedAccessConditions:{ifMatch:r.conditions.ifMatch||s.etag,ifModifiedSince:r.conditions.ifModifiedSince,ifNoneMatch:r.conditions.ifNoneMatch,ifUnmodifiedSince:r.conditions.ifUnmodifiedSince,ifTags:null==(i=r.conditions)?void 0:i.tagConditions},range:P({count:e+s.contentLength-t,offset:t}),rangeGetContentMD5:r.rangeGetContentMD5,rangeGetContentCRC64:r.rangeGetContentCrc64,snapshot:r.snapshot,cpkInfo:r.customerProvidedKey};return(await this.blobContext.download(Object.assign({abortSignal:r.abortSignal},n))).readableStreamBody},e,s.contentLength,{maxRetryRequests:r.maxRetryRequests,onProgress:r.onProgress})})}async exists(e={}){return M.U.withSpan("BlobClient-exists",e,async t=>{try{return m(e.customerProvidedKey,this.isHttps),await this.getProperties({abortSignal:e.abortSignal,customerProvidedKey:e.customerProvidedKey,conditions:e.conditions,tracingOptions:t.tracingOptions}),!0}catch(e){if(404===e.statusCode)return!1;if(409===e.statusCode&&(e.details.errorCode===f.Wn||e.details.errorCode===f.OR))return!0;throw e}})}async getProperties(e={}){return e.conditions=e.conditions||{},m(e.customerProvidedKey,this.isHttps),M.U.withSpan("BlobClient-getProperties",e,async t=>{var r;let i=(0,k.m6)(await this.blobContext.getProperties({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},i),{_response:i._response,objectReplicationDestinationPolicyId:i.objectReplicationPolicyId,objectReplicationSourceProperties:(0,k.W9)(i.objectReplicationRules)})})}async delete(e={}){return e.conditions=e.conditions||{},M.U.withSpan("BlobClient-delete",e,async t=>{var r;return(0,k.m6)(await this.blobContext.delete({abortSignal:e.abortSignal,deleteSnapshots:e.deleteSnapshots,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))})}async deleteIfExists(e={}){return M.U.withSpan("BlobClient-deleteIfExists",e,async e=>{var t,r;try{let t=(0,k.m6)(await this.delete(e));return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(e){if((null==(t=e.details)?void 0:t.errorCode)==="BlobNotFound")return Object.assign(Object.assign({succeeded:!1},null==(r=e.response)?void 0:r.parsedHeaders),{_response:e.response});throw e}})}async undelete(e={}){return M.U.withSpan("BlobClient-undelete",e,async t=>(0,k.m6)(await this.blobContext.undelete({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}async setHTTPHeaders(e,t={}){return t.conditions=t.conditions||{},m(t.customerProvidedKey,this.isHttps),M.U.withSpan("BlobClient-setHTTPHeaders",t,async r=>{var i;return(0,k.m6)(await this.blobContext.setHttpHeaders({abortSignal:t.abortSignal,blobHttpHeaders:e,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}))})}async setMetadata(e,t={}){return t.conditions=t.conditions||{},m(t.customerProvidedKey,this.isHttps),M.U.withSpan("BlobClient-setMetadata",t,async r=>{var i;return(0,k.m6)(await this.blobContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))})}async setTags(e,t={}){return M.U.withSpan("BlobClient-setTags",t,async r=>{var i;return(0,k.m6)(await this.blobContext.setTags({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),tracingOptions:r.tracingOptions,tags:(0,k.UG)(e)}))})}async getTags(e={}){return M.U.withSpan("BlobClient-getTags",e,async t=>{var r;let i=(0,k.m6)(await this.blobContext.getTags({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}));return Object.assign(Object.assign({},i),{_response:i._response,tags:(0,k.cl)({blobTagSet:i.blobTagSet})||{}})})}getBlobLeaseClient(e){return new D.j(this,e)}async createSnapshot(e={}){return e.conditions=e.conditions||{},m(e.customerProvidedKey,this.isHttps),M.U.withSpan("BlobClient-createSnapshot",e,async t=>{var r;return(0,k.m6)(await this.blobContext.createSnapshot({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,tracingOptions:t.tracingOptions}))})}async beginCopyFromURL(e,t={}){let r=new S({blobClient:{abortCopyFromURL:(...e)=>this.abortCopyFromURL(...e),getProperties:(...e)=>this.getProperties(...e),startCopyFromURL:(...e)=>this.startCopyFromURL(...e)},copySource:e,intervalInMs:t.intervalInMs,onProgress:t.onProgress,resumeFrom:t.resumeFrom,startCopyFromURLOptions:t});return await r.poll(),r}async abortCopyFromURL(e,t={}){return M.U.withSpan("BlobClient-abortCopyFromURL",t,async r=>(0,k.m6)(await this.blobContext.abortCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,tracingOptions:r.tracingOptions})))}async syncCopyFromURL(e,t={}){return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},M.U.withSpan("BlobClient-syncCopyFromURL",t,async r=>{var i,n,s,o,a,l,c;return(0,k.m6)(await this.blobContext.copyFromURL(e,{abortSignal:t.abortSignal,metadata:t.metadata,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null==(n=t.sourceConditions)?void 0:n.ifMatch,sourceIfModifiedSince:null==(s=t.sourceConditions)?void 0:s.ifModifiedSince,sourceIfNoneMatch:null==(o=t.sourceConditions)?void 0:o.ifNoneMatch,sourceIfUnmodifiedSince:null==(a=t.sourceConditions)?void 0:a.ifUnmodifiedSince},sourceContentMD5:t.sourceContentMD5,copySourceAuthorization:(0,k._L)(t.sourceAuthorization),tier:g(t.tier),blobTagsString:(0,k.rK)(t.tags),immutabilityPolicyExpiry:null==(l=t.immutabilityPolicy)?void 0:l.expiriesOn,immutabilityPolicyMode:null==(c=t.immutabilityPolicy)?void 0:c.policyMode,legalHold:t.legalHold,encryptionScope:t.encryptionScope,copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions}))})}async setAccessTier(e,t={}){return M.U.withSpan("BlobClient-setAccessTier",t,async r=>{var i;return(0,k.m6)(await this.blobContext.setTier(g(e),{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),rehydratePriority:t.rehydratePriority,tracingOptions:r.tracingOptions}))})}async downloadToBuffer(e,t,r,i={}){var n;let s,o=0,a=0,l=i;e instanceof B?(s=e,o=t||0,a="number"==typeof r?r:0):(o="number"==typeof e?e:0,a="number"==typeof t?t:0,l=r||{});let c=null!=(n=l.blockSize)?n:0;if(c<0)throw RangeError("blockSize option must be >= 0");if(0===c&&(c=f.R7),o<0)throw RangeError("offset option must be >= 0");if(a&&a<=0)throw RangeError("count option must be greater than 0");return l.conditions||(l.conditions={}),M.U.withSpan("BlobClient-downloadToBuffer",l,async e=>{if(!a){let t=await this.getProperties(Object.assign(Object.assign({},l),{tracingOptions:e.tracingOptions}));if((a=t.contentLength-o)<0)throw RangeError(`offset ${o} shouldn't be larger than blob size ${t.contentLength}`)}if(!s)try{s=B.alloc(a)}catch(e){throw Error(`Unable to allocate the buffer of size: ${a}(in bytes). Please try passing your own buffer to the "downloadToBuffer" method or try using other methods like "download" or "downloadToFile". ${e.message}`)}if(s.length<a)throw RangeError(`The buffer's size should be equal to or larger than the request count of bytes: ${a}`);let t=0,r=new O(l.concurrency);for(let i=o;i<o+a;i+=c)r.addOperation(async()=>{let r=o+a;i+c<r&&(r=i+c);let n=(await this.download(i,r-i,{abortSignal:l.abortSignal,conditions:l.conditions,maxRetryRequests:l.maxRetryRequestsPerBlock,customerProvidedKey:l.customerProvidedKey,tracingOptions:e.tracingOptions})).readableStreamBody;await (0,N.GV)(n,s,i-o,r-o),t+=r-i,l.onProgress&&l.onProgress({loadedBytes:t})});return await r.do(),s})}async downloadToFile(e,t=0,r,i={}){return M.U.withSpan("BlobClient-downloadToFile",i,async n=>{let s=await this.download(t,r,Object.assign(Object.assign({},i),{tracingOptions:n.tracingOptions}));return s.readableStreamBody&&await (0,N.Xl)(s.readableStreamBody,e),s.blobDownloadStream=void 0,s})}getBlobAndContainerNamesFromUrl(){let e,t;try{let r=new URL(this.url);if("blob"===r.host.split(".")[1]){let i=r.pathname.match("/([^/]*)(/(.*))?");e=i[1],t=i[3]}else if((0,k.Es)(r)){let i=r.pathname.match("/([^/]*)/([^/]*)(/(.*))?");e=i[2],t=i[4]}else{let i=r.pathname.match("/([^/]*)(/(.*))?");e=i[1],t=i[3]}if(e=decodeURIComponent(e),t=(t=decodeURIComponent(t)).replace(/\\/g,"/"),!e)throw Error("Provided containerName is invali
4d.");return{blobName:t,containerName:e}}catch(e){throw Error("Unable to extract blobName and containerName with provided information.")}}async startCopyFromURL(e,t={}){return M.U.withSpan("BlobClient-startCopyFromURL",t,async r=>{var i,n,s;return t.conditions=t.conditions||{},t.sourceConditions=t.sourceConditions||{},(0,k.m6)(await this.blobContext.startCopyFromURL(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:t.sourceConditions.ifMatch,sourceIfModifiedSince:t.sourceConditions.ifModifiedSince,sourceIfNoneMatch:t.sourceConditions.ifNoneMatch,sourceIfUnmodifiedSince:t.sourceConditions.ifUnmodifiedSince,sourceIfTags:t.sourceConditions.tagConditions},immutabilityPolicyExpiry:null==(n=t.immutabilityPolicy)?void 0:n.expiriesOn,immutabilityPolicyMode:null==(s=t.immutabilityPolicy)?void 0:s.policyMode,legalHold:t.legalHold,rehydratePriority:t.rehydratePriority,tier:g(t.tier),blobTagsString:(0,k.rK)(t.tags),sealBlob:t.sealBlob,tracingOptions:r.tracingOptions}))})}generateSasUrl(e){return new Promise(t=>{if(!(this.credential instanceof p.Z))throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");let r=(0,L.W)(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).toString();t((0,k.RV)(this.url,r))})}generateSasStringToSign(e){if(!(this.credential instanceof p.Z))throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");return(0,L.f)(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),this.credential).stringToSign}generateUserDelegationSasUrl(e,t){return new Promise(r=>{let i=(0,L.W)(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),t,this.accountName).toString();r((0,k.RV)(this.url,i))})}generateUserDelegationSasStringToSign(e,t){return(0,L.f)(Object.assign({containerName:this._containerName,blobName:this._name,snapshotTime:this._snapshot,versionId:this._versionId},e),t,this.accountName).stringToSign}async deleteImmutabilityPolicy(e={}){return M.U.withSpan("BlobClient-deleteImmutabilityPolicy",e,async e=>(0,k.m6)(await this.blobContext.deleteImmutabilityPolicy({tracingOptions:e.tracingOptions})))}async setImmutabilityPolicy(e,t={}){return M.U.withSpan("BlobClient-setImmutabilityPolicy",t,async t=>(0,k.m6)(await this.blobContext.setImmutabilityPolicy({immutabilityPolicyExpiry:e.expiriesOn,immutabilityPolicyMode:e.policyMode,tracingOptions:t.tracingOptions})))}async setLegalHold(e,t={}){return M.U.withSpan("BlobClient-setLegalHold",t,async t=>(0,k.m6)(await this.blobContext.setLegalHold(e,{tracingOptions:t.tracingOptions})))}async getAccountInfo(e={}){return M.U.withSpan("BlobClient-getAccountInfo",e,async t=>(0,k.m6)(await this.blobContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}}
4class U extends q{constructor(e,t,r,i){let n,s;if(i=i||{},(0,b.O8)(t))s=e,n=t;else if(u.Ll&&t instanceof p.Z||t instanceof d.t||(0,c.Zp)(t))s=e,i=r,n=(0,b.vC)(t,i);else if(t||"string"==typeof t)if(t&&"string"==typeof t&&r&&"string"==typeof r){let o=(0,k.Tm)(e);if("AccountConnString"===o.kind)if(u.Ll){let e=new p.Z(o.accountName,o.accountKey);s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r)),i.proxyOptions||(i.proxyOptions=(0,l.nV)(o.proxyUri)),n=(0,b.vC)(e,i)}else throw Error("Account connection string is only supported in Node.js environment");else if("SASConnString"===o.kind)s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r))+"?"+o.accountSas,n=(0,b.vC)(new d.t,i);else throw Error("Connection string must be either an Account connection string or a SAS connection string")}else throw Error("Expecting non-empty strings for containerName and blobName parameters");else s=e,n=(0,b.vC)(new d.t,i);super(s,n),this.appendBlobContext=this.storageClientContext.appendBlob}withSnapshot(e){return new U((0,k.nM)(this.url,f.Zh.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e={}){return e.conditions=e.conditions||{},m(e.customerProvidedKey,this.isHttps),M.U.withSpan("AppendBlobClient-create",e,async t=>{var r,i,n;return(0,k.m6)(await this.appendBlobContext.create(0,{abortSignal:e.abortSignal,blobHttpHeaders:e.blobHTTPHeaders,leaseAccessConditions:e.conditions,metadata:e.metadata,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),cpkInfo:e.customerProvidedKey,encryptionScope:e.encryptionScope,immutabilityPolicyExpiry:null==(i=e.immutabilityPolicy)?void 0:i.expiriesOn,immutabilityPolicyMode:null==(n=e.immutabilityPolicy)?void 0:n.policyMode,legalHold:e.legalHold,blobTagsString:(0,k.rK)(e.tags),tracingOptions:t.tracingOptions}))})}async createIfNotExists(e={}){let t={ifNoneMatch:f.wS};return M.U.withSpan("AppendBlobClient-createIfNotExists",e,async e=>{var r,i;try{let r=(0,k.m6)(await this.create(Object.assign(Object.assign({},e),{conditions:t})));return Object.assign(Object.assign({succeeded:!0},r),{_response:r._response})}catch(e){if((null==(r=e.details)?void 0:r.errorCode)==="BlobAlreadyExists")return Object.assign(Object.assign({succeeded:!1},null==(i=e.response)?void 0:i.parsedHeaders),{_response:e.response});throw e}})}async seal(e={}){return e.conditions=e.conditions||{},M.U.withSpan("AppendBlobClient-seal",e,async t=>{var r;return(0,k.m6)(await this.appendBlobContext.seal({abortSignal:e.abortSignal,appendPositionAccessConditions:e.conditions,leaseAccessConditions:e.conditions,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))})}async appendBlock(e,t,r={}){return r.conditions=r.conditions||{},m(r.customerProvidedKey,this.isHttps),M.U.withSpan("AppendBlobClient-appendBlock",r,async i=>{var n;return(0,k.m6)(await this.appendBlobContext.appendBlock(t,e,{abortSignal:r.abortSignal,appendPositionAccessConditions:r.conditions,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null==(n=r.conditions)?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},transactionalContentMD5:r.transactionalContentMD5,transactionalContentCrc64:r.transactionalContentCrc64,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}))})}async appendBlockFromURL(e,t,r,i={}){return i.conditions=i.conditions||{},i.sourceConditions=i.sourceConditions||{},m(i.customerProvidedKey,this.isHttps),M.U.withSpan("AppendBlobClient-appendBlockFromURL",i,async n=>{var s,o,a,l,c;return(0,k.m6)(await this.appendBlobContext.appendBlockFromUrl(e,0,{abortSignal:i.abortSignal,sourceRange:P({offset:t,count:r}),sourceContentMD5:i.sourceContentMD5,sourceContentCrc64:i.sourceContentCrc64,leaseAccessConditions:i.conditions,appendPositionAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null==(s=i.conditions)?void 0:s.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null==(o=i.sourceConditions)?void 0:o.ifMatch,sourceIfModifiedSince:null==(a=i.sourceConditions)?void 0:a.ifModifiedSince,sourceIfNoneMatch:null==(l=i.sourceConditions)?void 0:l.ifNoneMatch,sourceIfUnmodifiedSince:null==(c=i.sourceConditions)?void 0:c.ifUnmodifiedSince},copySourceAuthorization:(0,k._L)(i.sourceAuthorization),cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))})}}
4class H extends q{constructor(e,t,r,i){let n,s;if(i=i||{},(0,b.O8)(t))s=e,n=t;else if(u.Ll&&t instanceof p.Z||t instanceof d.t||(0,c.Zp)(t))s=e,i=r,n=(0,b.vC)(t,i);else if(t||"string"==typeof t)if(t&&"string"==typeof t&&r&&"string"==typeof r){let o=(0,k.Tm)(e);if("AccountConnString"===o.kind)if(u.Ll){let e=new p.Z(o.accountName,o.accountKey);s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r)),i.proxyOptions||(i.proxyOptions=(0,l.nV)(o.proxyUri)),n=(0,b.vC)(e,i)}else throw Error("Account connection string is only supported in Node.js environment");else if("SASConnString"===o.kind)s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r))+"?"+o.accountSas,n=(0,b.vC)(new d.t,i);else throw Error("Connection string must be either an Account connection string or a SAS connection string")}else throw Error("Expecting non-empty strings for containerName and blobName parameters");else s=e,r&&"string"!=typeof r&&(i=r),n=(0,b.vC)(new d.t,i);super(s,n),this.blockBlobContext=this.storageClientContext.blockBlob,this._blobContext=this.storageClientContext.blob}withSnapshot(e){return new H((0,k.nM)(this.url,f.Zh.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async query(e,t={}){if(m(t.customerProvidedKey,this.isHttps),!u.Ll)throw Error("This operation currently is only supported in Node.js.");return M.U.withSpan("BlockBlobClient-query",t,async r=>{var i;return new h((0,k.m6)(await this._blobContext.query({abortSignal:t.abortSignal,queryRequest:{queryType:"SQL",expression:e,inputSerialization:(0,k.mS)(t.inputTextConfiguration),outputSerialization:(0,k.mS)(t.outputTextConfiguration)},leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,tracingOptions:r.tracingOptions})),{abortSignal:t.abortSignal,onProgress:t.onProgress,onError:t.onError})})}async upload(e,t,r={}){return r.conditions=r.conditions||{},m(r.customerProvidedKey,this.isHttps),M.U.withSpan("BlockBlobClient-upload",r,async i=>{var n,s,o;return(0,k.m6)(await this.blockBlobContext.upload(t,e,{abortSignal:r.abortSignal,blobHttpHeaders:r.blobHTTPHeaders,leaseAccessConditions:r.conditions,metadata:r.metadata,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null==(n=r.conditions)?void 0:n.tagConditions}),requestOptions:{onUploadProgress:r.onProgress},cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,immutabilityPolicyExpiry:null==(s=r.immutabilityPolicy)?void 0:s.expiriesOn,immutabilityPolicyMode:null==(o=r.immutabilityPolicy)?void 0:o.policyMode,legalHold:r.legalHold,tier:g(r.tier),blobTagsString:(0,k.rK)(r.tags),tracingOptions:i.tracingOptions}))})}async syncUploadFromURL(e,t={}){return t.conditions=t.conditions||{},m(t.customerProvidedKey,this.isHttps),M.U.withSpan("BlockBlobClient-syncUploadFromURL",t,async r=>{var i,n,s,o,a,l;return(0,k.m6)(await this.blockBlobContext.putBlobFromUrl(0,e,Object.assign(Object.assign({},t),{blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null==(n=t.sourceConditions)?void 0:n.ifMatch,sourceIfModifiedSince:null==(s=t.sourceConditions)?void 0:s.ifModifiedSince,sourceIfNoneMatch:null==(o=t.sourceConditions)?void 0:o.ifNoneMatch,sourceIfUnmodifiedSince:null==(a=t.sourceConditions)?void 0:a.ifUnmodifiedSince,sourceIfTags:null==(l=t.sourceConditions)?void 0:l.tagConditions},cpkInfo:t.customerProvidedKey,copySourceAuthorization:(0,k._L)(t.sourceAuthorization),tier:g(t.tier),blobTagsString:(0,k.rK)(t.tags),copySourceTags:t.copySourceTags,tracingOptions:r.tracingOptions})))})}async stageBlock(e,t,r,i={}){return m(i.customerProvidedKey,this.isHttps),M.U.withSpan("BlockBlobClient-stageBlock",i,async n=>(0,k.m6)(await this.blockBlobContext.stageBlock(e,r,t,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,requestOptions:{onUploadProgress:i.onProgress},transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions})))}async stageBlockFromURL(e,t,r=0,i,n={}){return m(n.customerProvidedKey,this.isHttps),M.U.withSpan("BlockBlobClient-stageBlockFromURL",n,async s=>(0,k.m6)(await this.blockBlobContext.stageBlockFromURL(e,0,t,{abortSignal:n.abortSignal,leaseAccessConditions:n.conditions,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,sourceRange:0!==r||i?P({offset:r,count:i}):void 0,cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:(0,k._L)(n.sourceAuthorization),tracingOptions:s.tracingOptions})))}async commitBlockList(e,t={}){return t.conditions=t.conditions||{},m(t.customerProvidedKey,this.isHttps),M.U.withSpan("BlockBlobClient-commitBlockList",t,async r=>{var i,n,s;return(0,k.m6)(await this.blockBlobContext.commitBlockList({latest:e},{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null==(n=t.immutabilityPolicy)?void 0:n.expiriesOn,immutabilityPolicyMode:null==(s=t.immutabilityPolicy)?void 0:s.policyMode,legalHold:t.legalHold,tier:g(t.tier),blobTagsString:(0,k.rK)(t.tags),tracingOptions:r.tracingOptions}))})}async getBlockList(e,t={}){return M.U.withSpan("BlockBlobClient-getBlockList",t,async r=>{var i;let n=(0,k.m6)(await this.blockBlobContext.getBlockList(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}));return n.committedBlocks||(n.committedBlocks=[]),n.uncommittedBlocks||(n.uncommittedBlocks=[]),n})}async uploadData(e,t={}){return M.U.withSpan("BlockBlobClient-uploadData",t,async t=>{if(u.Ll){let r;return r=e instanceof B?e:e instanceof ArrayBuffer?B.from(e):B.from(e.buffer,e.byteOffset,e.byteLength),this.uploadSeekableInternal((e,t)=>
4r.slice(e,e+t),r.byteLength,t)}{let r=new Blob([e]);return this.uploadSeekableInternal((e,t)=>r.slice(e,e+t),r.size,t)}})}async uploadBrowserData(e,t={}){return M.U.withSpan("BlockBlobClient-uploadBrowserData",t,async t=>{let r=new Blob([e]);return this.uploadSeekableInternal((e,t)=>r.slice(e,e+t),r.size,t)})}async uploadSeekableInternal(e,t,r={}){var i,n;let s=null!=(i=r.blockSize)?i:0;if(s<0||s>f.AG)throw RangeError(`blockSize option must be >= 0 and <= ${f.AG}`);let o=null!=(n=r.maxSingleShotSize)?n:f.lx;if(o<0||o>f.lx)throw RangeError(`maxSingleShotSize option must be >= 0 and <= ${f.lx}`);if(0===s){if(t>f.AG*f.ED)throw RangeError(`${t} is too larger to upload to a block blob.`);t>o&&(s=Math.ceil(t/f.ED))<f.R7&&(s=f.R7)}return r.blobHTTPHeaders||(r.blobHTTPHeaders={}),r.conditions||(r.conditions={}),M.U.withSpan("BlockBlobClient-uploadSeekableInternal",r,async i=>{if(t<=o)return(0,k.m6)(await this.upload(e(0,t),t,i));let n=Math.floor((t-1)/s)+1;if(n>f.ED)throw RangeError(`The buffer's size is too big or the BlockSize is too small;the number of blocks must be <= ${f.ED}`);let a=[],l=(0,u.N4)(),c=0,h=new O(r.concurrency);for(let o=0;o<n;o++)h.addOperation(async()=>{let u=(0,k.sc)(l,o),h=s*o,d=(o===n-1?t:h+s)-h;a.push(u),await this.stageBlock(u,e(h,d),d,{abortSignal:r.abortSignal,conditions:r.conditions,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}),c+=d,r.onProgress&&r.onProgress({loadedBytes:c})});return await h.do(),this.commitBlockList(a,i)})}async uploadFile(e,t={}){return M.U.withSpan("BlockBlobClient-uploadFile",t,async r=>{let i=(await (0,N.uu)(e)).size;return this.uploadSeekableInternal((t,r)=>()=>(0,N.ib)(e,{autoClose:!0,end:r?t+r-1:1/0,start:t}),i,Object.assign(Object.assign({},t),{tracingOptions:r.tracingOptions}))})}async uploadStream(e,t=f.tS,r=5,i={}){return i.blobHTTPHeaders||(i.blobHTTPHeaders={}),i.conditions||(i.conditions={}),M.U.withSpan("BlockBlobClient-uploadStream",i,async n=>{let s=0,o=(0,u.N4)(),a=0,l=[],c=new A(e,t,r,async(e,t)=>{let r=(0,k.sc)(o,s);l.push(r),s++,await this.stageBlock(r,e,t,{customerProvidedKey:i.customerProvidedKey,conditions:i.conditions,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}),a+=t,i.onProgress&&i.onProgress({loadedBytes:a})},Math.ceil(r/4*3));return await c.do(),(0,k.m6)(await this.commitBlockList(l,Object.assign(Object.assign({},i),{tracingOptions:n.tracingOptions})))})}}
4class z extends q{constructor(e,t,r,i){let n,s;if(i=i||{},(0,b.O8)(t))s=e,n=t;else if(u.Ll&&t instanceof p.Z||t instanceof d.t||(0,c.Zp)(t))s=e,i=r,n=(0,b.vC)(t,i);else if(t||"string"==typeof t)if(t&&"string"==typeof t&&r&&"string"==typeof r){let o=(0,k.Tm)(e);if("AccountConnString"===o.kind)if(u.Ll){let e=new p.Z(o.accountName,o.accountKey);s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r)),i.proxyOptions||(i.proxyOptions=(0,l.nV)(o.proxyUri)),n=(0,b.vC)(e,i)}else throw Error("Account connection string is only supported in Node.js environment");else if("SASConnString"===o.kind)s=(0,k.sQ)((0,k.sQ)(o.url,encodeURIComponent(t)),encodeURIComponent(r))+"?"+o.accountSas,n=(0,b.vC)(new d.t,i);else throw Error("Connection string must be either an Account connection string or a SAS connection string")}else throw Error("Expecting non-empty strings for containerName and blobName parameters");else s=e,n=(0,b.vC)(new d.t,i);super(s,n),this.pageBlobContext=this.storageClientContext.pageBlob}withSnapshot(e){return new z((0,k.nM)(this.url,f.Zh.Parameters.SNAPSHOT,0===e.length?void 0:e),this.pipeline)}async create(e,t={}){return t.conditions=t.conditions||{},m(t.customerProvidedKey,this.isHttps),M.U.withSpan("PageBlobClient-create",t,async r=>{var i,n,s;return(0,k.m6)(await this.pageBlobContext.create(0,e,{abortSignal:t.abortSignal,blobHttpHeaders:t.blobHTTPHeaders,blobSequenceNumber:t.blobSequenceNumber,leaseAccessConditions:t.conditions,metadata:t.metadata,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),cpkInfo:t.customerProvidedKey,encryptionScope:t.encryptionScope,immutabilityPolicyExpiry:null==(n=t.immutabilityPolicy)?void 0:n.expiriesOn,immutabilityPolicyMode:null==(s=t.immutabilityPolicy)?void 0:s.policyMode,legalHold:t.legalHold,tier:g(t.tier),blobTagsString:(0,k.rK)(t.tags),tracingOptions:r.tracingOptions}))})}async createIfNotExists(e,t={}){return M.U.withSpan("PageBlobClient-createIfNotExists",t,async r=>{var i,n;try{let i={ifNoneMatch:f.wS},n=(0,k.m6)(await this.create(e,Object.assign(Object.assign({},t),{conditions:i,tracingOptions:r.tracingOptions})));return Object.assign(Object.assign({succeeded:!0},n),{_response:n._response})}catch(e){if((null==(i=e.details)?void 0:i.errorCode)==="BlobAlreadyExists")return Object.assign(Object.assign({succeeded:!1},null==(n=e.response)?void 0:n.parsedHeaders),{_response:e.response});throw e}})}async uploadPages(e,t,r,i={}){return i.conditions=i.conditions||{},m(i.customerProvidedKey,this.isHttps),M.U.withSpan("PageBlobClient-uploadPages",i,async n=>{var s;return(0,k.m6)(await this.pageBlobContext.uploadPages(r,e,{abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null==(s=i.conditions)?void 0:s.tagConditions}),requestOptions:{onUploadProgress:i.onProgress},range:P({offset:t,count:r}),sequenceNumberAccessConditions:i.conditions,transactionalContentMD5:i.transactionalContentMD5,transactionalContentCrc64:i.transactionalContentCrc64,cpkInfo:i.customerProvidedKey,encryptionScope:i.encryptionScope,tracingOptions:n.tracingOptions}))})}async uploadPagesFromURL(e,t,r,i,n={}){return n.conditions=n.conditions||{},n.sourceConditions=n.sourceConditions||{},m(n.customerProvidedKey,this.isHttps),M.U.withSpan("PageBlobClient-uploadPagesFromURL",n,async s=>{var o,a,l,c,u;return(0,k.m6)(await this.pageBlobContext.uploadPagesFromURL(e,P({offset:t,count:i}),0,P({offset:r,count:i}),{abortSignal:n.abortSignal,sourceContentMD5:n.sourceContentMD5,sourceContentCrc64:n.sourceContentCrc64,leaseAccessConditions:n.conditions,sequenceNumberAccessConditions:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},n.conditions),{ifTags:null==(o=n.conditions)?void 0:o.tagConditions}),sourceModifiedAccessConditions:{sourceIfMatch:null==(a=n.sourceConditions)?void 0:a.ifMatch,sourceIfModifiedSince:null==(l=n.sourceConditions)?void 0:l.ifModifiedSince,sourceIfNoneMatch:null==(c=n.sourceConditions)?void 0:c.ifNoneMatch,sourceIfUnmodifiedSince:null==(u=n.sourceConditions)?void 0:u.ifUnmodifiedSince},cpkInfo:n.customerProvidedKey,encryptionScope:n.encryptionScope,copySourceAuthorization:(0,k._L)(n.sourceAuthorization),tracingOptions:s.tracingOptions}))})}async clearPages(e=0,t,r={}){return r.conditions=r.conditions||{},M.U.withSpan("PageBlobClient-clearPages",r,async i=>{var n;return(0,k.m6)(await this.pageBlobContext.clearPages(0,{abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null==(n=r.conditions)?void 0:n.tagConditions}),range:P({offset:e,count:t}),sequenceNumberAccessConditions:r.conditions,cpkInfo:r.customerProvidedKey,encryptionScope:r.encryptionScope,tracingOptions:i.tracingOptions}))})}async getPageRanges(e=0,t,r={}){return r.conditions=r.conditions||{},M.U.withSpan("PageBlobClient-getPageRanges",r,async i=>{var n;return y((0,k.m6)(await this.pageBlobContext.getPageRanges({abortSignal:r.abortSignal,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null==(n=r.conditions)?void 0:n.tagConditions}),range:P({offset:e,count:t}),tracingOptions:i.tracingOptions})))})}async listPageRangesSegment(e=0,t,r,i={}){return M.U.withSpan("PageBlobClient-getPageRangesSegment",i,async n=>{var s;return(0,k.m6)(await this.pageBlobContext.getPageRanges({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null==(s=i.conditions)?void 0:s.tagConditions}),range:P({offset:e,count:t}),marker:r,maxPageSize:i.maxPageSize,tracingOptions:n.tracingOptions}))})}listPageRangeItemSegments(){return(0,a.AQ)(this,arguments,function*(e=0,t,r,i={}){let n;if(r||void 0===r)do r=(n=yield(0,a.N3)(this.listPageRangesSegment(e,t,r,i
4))).continuationToken,yield yield(0,a.N3)((yield(0,a.N3)(n)));while(r)})}listPageRangeItems(){return(0,a.AQ)(this,arguments,function*(e=0,t,r={}){let i;try{for(var n,s,o,l,c,u=!0,h=(0,a.xN)(this.listPageRangeItemSegments(e,t,i,r));!(n=(c=yield(0,a.N3)(h.next())).done);u=!0)l=c.value,u=!1,yield(0,a.N3)((yield*(0,a.Me)((0,a.xN)((0,k._9)(l)))))}catch(e){s={error:e}}finally{try{!u&&!n&&(o=h.return)&&(yield(0,a.N3)(o.call(h)))}finally{if(s)throw s.error}}})}listPageRanges(e=0,t,r={}){r.conditions=r.conditions||{};let i=this.listPageRangeItems(e,t,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(i={})=>this.listPageRangeItemSegments(e,t,i.continuationToken,Object.assign({maxPageSize:i.maxPageSize},r))}}async getPageRangesDiff(e,t,r,i={}){return i.conditions=i.conditions||{},M.U.withSpan("PageBlobClient-getPageRangesDiff",i,async n=>{var s;return y((0,k.m6)(await this.pageBlobContext.getPageRangesDiff({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null==(s=i.conditions)?void 0:s.tagConditions}),prevsnapshot:r,range:P({offset:e,count:t}),tracingOptions:n.tracingOptions})))})}async listPageRangesDiffSegment(e,t,r,i,n={}){return M.U.withSpan("PageBlobClient-getPageRangesDiffSegment",n,async s=>{var o;return(0,k.m6)(await this.pageBlobContext.getPageRangesDiff({abortSignal:null==n?void 0:n.abort
4Signal,leaseAccessConditions:null==n?void 0:n.conditions,modifiedAccessConditions:Object.assign(Object.assign({},null==n?void 0:n.conditions),{ifTags:null==(o=null==n?void 0:n.conditions)?void 0:o.tagConditions}),prevsnapshot:r,range:P({offset:e,count:t}),marker:i,maxPageSize:null==n?void 0:n.maxPageSize,tracingOptions:s.tracingOptions}))})}listPageRangeDiffItemSegments(e,t,r,i,n){return(0,a.AQ)(this,arguments,function*(){let s;if(i||void 0===i)do i=(s=yield(0,a.N3)(this.listPageRangesDiffSegment(e,t,r,i,n))).continuationToken,yield yield(0,a.N3)((yield(0,a.N3)(s)));while(i)})}listPageRangeDiffItems(e,t,r,i){return(0,a.AQ)(this,arguments,function*(){let n;try{for(var s,o,l,c,u,h=!0,d=(0,a.xN)(this.listPageRangeDiffItemSegments(e,t,r,n,i));!(s=(u=yield(0,a.N3)(d.next())).done);h=!0)c=u.value,h=!1,yield(0,a.N3)((yield*(0,a.Me)((0,a.xN)((0,k._9)(c)))))}catch(e){o={error:e}}finally{try{!h&&!s&&(l=d.return)&&(yield(0,a.N3)(l.call(d)))}finally{if(o)throw o.error}}})}listPageRangesDiff(e,t,r,i={}){i.conditions=i.conditions||{};let n=this.listPageRangeDiffItems(e,t,r,Object.assign({},i));return{next:()=>n.next(),[Symbol.asyncIterator](){return this},byPage:(n={})=>this.listPageRangeDiffItemSegments(e,t,r,n.continuationToken,Object.assign({maxPageSize:n.maxPageSize},i))}}async getPageRangesDiffForManagedDisks(e,t,r,i={}){return i.conditions=i.conditions||{},M.U.withSpan("PageBlobClient-GetPageRangesDiffForManagedDisks",i,async n=>{var s;return y((0,k.m6)(await this.pageBlobContext.getPageRangesDiff({abortSignal:i.abortSignal,leaseAccessConditions:i.conditions,modifiedAccessConditions:Object.assign(Object.assign({},i.conditions),{ifTags:null==(s=i.conditions)?void 0:s.tagConditions}),prevSnapshotUrl:r,range:P({offset:e,count:t}),tracingOptions:n.tracingOptions})))})}async resize(e,t={}){return t.conditions=t.conditions||{},M.U.withSpan("PageBlobClient-resize",t,async r=>{var i;return(0,k.m6)(await this.pageBlobContext.resize(e,{abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),encryptionScope:t.encryptionScope,tracingOptions:r.tracingOptions}))})}async updateSequenceNumber(e,t,r={}){return r.conditions=r.conditions||{},M.U.withSpan("PageBlobClient-updateSequenceNumber",r,async i=>{var n;return(0,k.m6)(await this.pageBlobContext.updateSequenceNumber(e,{abortSignal:r.abortSignal,blobSequenceNumber:t,leaseAccessConditions:r.conditions,modifiedAccessConditions:Object.assign(Object.assign({},r.conditions),{ifTags:null==(n=r.conditions)?void 0:n.tagConditions}),tracingOptions:i.tracingOptions}))})}async startCopyIncremental(e,t={}){return M.U.withSpan("PageBlobClient-startCopyIncremental",t,async r=>{var i;return(0,k.m6)(await this.pageBlobContext.copyIncremental(e,{abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}))})}}},70896:(e,t,r)=>{"use strict";r.d(t,{sL:()=>I,ih:()=>T,jU:()=>P,L5:()=>R});class i{constructor(e){this.interval=e}next(){return n(this.interval)}}let n=e=>({duration:e,next(){return this}}),s=new AbortController().signal,o=new AbortController;o.abort(),o.signal;class a extends Error{constructor(e="Operation cancelled"){super(e),this.message=e,this.isTaskCancelledError=!0}}let l={dispose:()=>void 0};!function(e){e.once=(e,t)=>{let r,i=!1;return(r=e(e=>{t(e),r?r.dispose():i=!0}),i)?(r.dispose(),l):r},e.toPromise=(t,r)=>r?r.aborted?Promise.reject(new a):new Promise((i,n)=>{let s=c(r)(()=>{o.dispose(),n(new a)}),o=e.once(t,e=>{s.dispose(),i(e)})}):new Promise(r=>e.once(t,r))}(d||(d={}));let c=e=>{let t=new h;if(e.aborted)return t.emit(),t.addListener;let r=()=>{t.emit(),e.removeEventListener("abort",r)};return e.addEventListener("abort",r),t.addListener};class u{constructor(){this.addListener=e=>this.addListenerInner(e)}get size(){return this.listeners?"function"==typeof this.listeners?1:this.listeners.length:0}emit(e){if(this.listeners)if("function"==typeof this.listeners)this.listeners(e);else for(let t of this.listeners)t(e)}addListenerInner(e){return this.listeners?"function"==typeof this.listeners?this.listeners=[this.listeners,e]:this.listeners.push(e):this.listeners=e,{dispose:()=>this.removeListener(e)}}removeListener(e){if(!this.listeners)return;if("function"==typeof this.listeners){this.listeners===e&&(this.listeners=void 0);return}let t=this.listeners.indexOf(e);-1!==t&&(2===this.listeners.length?this.listeners=0===t?this.listeners[1]:this.listeners[0]:this.listeners=this.listeners.slice(0,t).concat(this.listeners.slice(t+1)))}}class h extends u{constructor(){super(...arguments),this.addListener=e=>this.lastValue?(e(this.lastValue.value),l):this.addListenerInner(e)}emit(e){this.lastValue={value:e},super.emit(e),this.listeners=void 0}}var d,p,f=r(99742);let g=e=>{if("error"in e)throw e.error;return"success"in e?e.success:e.value};class m{constructor(e=()=>!1,t=()=>!1){this.errorFilter=e,this.resultFilter=t,this.successEmitter=new u,this.failureEmitter=new u,this.onSuccess=this.successEmitter.addListener,this.onFailure=this.failureEmitter.addListener}clone(){return new m(this.errorFilter,this.resultFilter)}async invoke(e,...t){let r=this.successEmitter.size||this.failureEmitter.size?(()=>{if("undefined"!=typeof performance){let e=performance.now();return()=>performance.now()-e}{let e=f.hrtime.bigint();return()=>Number(f.hrtime.bigint()-e)/1e6}})():null;try{let i=await e(...t);if(!this.resultFilter(i))return r&&this.successEmitter.emit({duration:r()}),{success:i};return r&&this.failureEmitter.emit({duration:r(),handled:!0,reason:{value:i}}),{value:i}}catch(t){let e=this.errorFilter(t);if(r&&this.failureEmitter.emit({duration:r(),handled:e,reason:{error:t}}),!e)throw t;return{error:t}}}}
4class y extends Error{constructor(e="Execution prevented because the circuit breaker is open"){super(e),this.isBrokenCircuitError=!0}}class b extends y{constructor(){super("Execution prevented because the circuit breaker is open"),this.isIsolatedCircuitError=!0}}!function(e){e[e.Closed=0]="Closed",e[e.Open=1]="Open",e[e.HalfOpen=2]="HalfOpen",e[e.Isolated=3]="Isolated"}(p||(p={}));class v{constructor(e,t){this.options=e,this.executor=t,this.breakEmitter=new u,this.resetEmitter=new u,this.halfOpenEmitter=new u,this.stateChangeEmitter=new u,this.innerState={value:p.Closed},this.onBreak=this.breakEmitter.addListener,this.onReset=this.resetEmitter.addListener,this.onHalfOpen=this.halfOpenEmitter.addListener,this.onStateChange=this.stateChangeEmitter.addListener,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure}get state(){return this.innerState.value}get lastFailure(){return this.innerLastFailure}isolate(){this.innerState.value!==p.Isolated&&(this.innerState={value:p.Isolated,counters:0},this.breakEmitter.emit({isolated:!0}),this.stateChangeEmitter.emit(p.Isolated)),this.innerState.counters++;let e=!1;return{dispose:()=>{!e&&(e=!0,this.innerState.value!==p.Isolated||--this.innerState.counters||(this.innerState={value:p.Closed},this.resetEmitter.emit(),this.stateChangeEmitter.emit(p.Closed)))}}}async execute(e,t=s){let r=this.innerState;switch(r.value){case p.Closed:let i=await this.executor.invoke(e,{signal:t});return"success"in i?this.options.breaker.success(r.value):(this.innerLastFailure=i,this.options.breaker.failure(r.value)&&this.open(i)),g(i);case p.HalfOpen:if(await r.test.catch(()=>void 0),this.state===p.Closed&&t.aborted)throw new a;return this.execute(e);case p.Open:if(Date.now()-r.openedAt<this.options.halfOpenAfter)throw new y;let n=this.halfOpen(e,t);return this.innerState={value:p.HalfOpen,test:n},this.stateChangeEmitter.emit(p.HalfOpen),n;case p.Isolated:throw new b;default:throw Error(`Unexpected circuit state ${r}`)}}async halfOpen(e,t){this.halfOpenEmitter.emit();try{let r=await this.executor.invoke(e,{signal:t});return"success"in r?(this.options.breaker.success(p.HalfOpen),this.close()):(this.innerLastFailure=r,this.options.breaker.failure(p.HalfOpen),this.open(r)),g(r)}catch(e){throw this.close(),e}}open(e){this.state!==p.Isolated&&this.state!==p.Open&&(this.innerState={value:p.Open,openedAt:Date.now()},this.breakEmitter.emit(e),this.stateChangeEmitter.emit(p.Open))}close(){this.state===p.HalfOpen&&(this.innerState={value:p.Closed},this.resetEmitter.emit(),this.stateChangeEmitter.emit(p.Closed))}}class w{constructor(){this.executor=new m,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure}async execute(e,t=s){return g(await this.executor.invoke(e,{signal:t}))}}let x=(e,t)=>new Promise(r=>{let i=setTimeout(r,e);t&&i.unref()});class S{constructor(e,t){this.options=e,this.executor=t,this.onGiveUpEmitter=new u,this.onRetryEmitter=new u,this.onSuccess=this.executor.onSuccess,this.onFailure=this.executor.onFailure,this.onRetry=this.onRetryEmitter.addListener,this.onGiveUp=this.onGiveUpEmitter.addListener}dangerouslyUnref(){return new S({...this.options,unref:!0},this.executor.clone())}async execute(e,t=s){let r,n=this.options.backoff||new i(0);for(let i=0;;i++){let s=await this.executor.invoke(e,{attempt:i,signal:t});if("success"in s)return s.success;if(!t.aborted&&i<this.options.maxAttempts){let e={attempt:i+1,signal:t,result:s},o=(r=r?r.next(e):n.next(e)).duration,a=x(o,!!this.options.unref);this.onRetryEmitter.emit({...s,delay:o}),await a;continue}if(this.onGiveUpEmitter.emit(s),"error"in s)throw s.error;return s.value}}}let C=(e,t)=>t?r=>r instanceof e&&t(r):t=>t instanceof e,E=()=>!1;class _{constructor(e){this.options=e}orType(e,t){let r=C(e,t);return new _({...this.options,errorFilter:e=>this.options.errorFilter(e)||r(e)})}orWhen(e){return new _({...this.options,errorFilter:t=>this.options.errorFilter(t)||e(t)})}orWhenResult(e){return new _({...this.options,resultFilter:t=>this.options.resultFilter(t)||e(t)})}orResultType(e,t){let r=C(e,t);return new _({...this.options,resultFilter:e=>this.options.resultFilter(e)||r(e)})}}new w;let T=new _({errorFilter:()=>!0,resultFilter:E});function P(e){return new _({errorFilter:e,resultFilter:E})}function R(e,t){return new S({backoff:t.backoff||new i(0),maxAttempts:t.maxAttempts??1/0},new m(e.options.errorFilter,e.options.resultFilter))}function I(e,t){return new v(t,new m(e.options.errorFilter,e.options.resultFilter))}},72187:(e,t,r)=>{"use strict";let i;r.d(t,{$U:()=>A,Vn:()=>k,Uv:()=>N,O8:()=>O,vC:()=>M});var n,s,o=r(92092),a=r(54247),l=r(26494),c=r(73035),u=r(65808),h=r(92584),d=r(83773);
4class p extends Error{constructor(e){super(e),this.name="AbortError"}}var f=r(88043),g=r(2848),m=r(28023);!function(e){e[e.EXPONENTIAL=0]="EXPONENTIAL",e[e.FIXED=1]="FIXED"}(n||(n={}));let y={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:n.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},b=new p("The operation was aborted.");class v extends f.p{constructor(e,t,r=y){super(e,t),this.retryOptions={retryPolicyType:r.retryPolicyType?r.retryPolicyType:y.retryPolicyType,maxTries:r.maxTries&&r.maxTries>=1?Math.floor(r.maxTries):y.maxTries,tryTimeoutInMs:r.tryTimeoutInMs&&r.tryTimeoutInMs>=0?r.tryTimeoutInMs:y.tryTimeoutInMs,retryDelayInMs:r.retryDelayInMs&&r.retryDelayInMs>=0?Math.min(r.retryDelayInMs,r.maxRetryDelayInMs?r.maxRetryDelayInMs:y.maxRetryDelayInMs):y.retryDelayInMs,maxRetryDelayInMs:r.maxRetryDelayInMs&&r.maxRetryDelayInMs>=0?r.maxRetryDelayInMs:y.maxRetryDelayInMs,secondaryHost:r.secondaryHost?r.secondaryHost:y.secondaryHost}}async sendRequest(e){return this.attemptSendRequest(e,!1,1)}async attemptSendRequest(e,t,r){let i,n=e.clone(),s=t||!this.retryOptions.secondaryHost||"GET"!==e.method&&"HEAD"!==e.method&&"OPTIONS"!==e.method||r%2==1;s||(n.url=(0,m.A8)(n.url,this.retryOptions.secondaryHost)),this.retryOptions.tryTimeoutInMs&&(n.url=(0,m.nM)(n.url,g.Zh.Parameters.TIMEOUT,Math.floor(this.retryOptions.tryTimeoutInMs/1e3).toString()));try{if(d.v.info(`RetryPolicy: =====> Try=${r} ${s?"Primary":"Secondary"}`),i=await this._nextPolicy.sendRequest(n),!this.shouldRetry(s,r,i))return i;t=t||!s&&404===i.status}catch(e){if(d.v.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),!this.shouldRetry(s,r,i,e))throw e}return await this.delay(s,r,e.abortSignal),this.attemptSendRequest(e,t,++r)}shouldRetry(e,t,r,i){if(t>=this.retryOptions.maxTries)return d.v.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${this.retryOptions.maxTries}, no further try.`),!1;if(i){for(let e of["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"])if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e)return d.v.info(`RetryPolicy: Network error ${e}
4 found, will retry.`),!0}if(r||i){let t=r?r.status:i?i.statusCode:0;if(!e&&404===t)return d.v.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return d.v.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!!((null==i?void 0:i.code)==="PARSE_ERROR"&&(null==i?void 0:i.message.startsWith('Error "Error: Unclosed root tag')))&&(d.v.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0)}async delay(e,t,r){let i=0;if(e)switch(this.retryOptions.retryPolicyType){case n.EXPONENTIAL:i=Math.min((Math.pow(2,t-1)-1)*this.retryOptions.retryDelayInMs,this.retryOptions.maxRetryDelayInMs);break;case n.FIXED:i=this.retryOptions.retryDelayInMs}else i=1e3*Math.random();return d.v.info(`RetryPolicy: Delay for ${i}ms`),(0,m.cb)(i,r,b)}}class w{constructor(e){this.retryOptions=e}create(e,t){return new v(e,t,this.retryOptions)}}var x=r(87014),S=r(68142),C=r(94485);!function(e){e[e.EXPONENTIAL=0]="EXPONENTIAL",e[e.FIXED=1]="FIXED"}(s||(s={}));let E={maxRetryDelayInMs:12e4,maxTries:4,retryDelayInMs:4e3,retryPolicyType:s.EXPONENTIAL,secondaryHost:"",tryTimeoutInMs:void 0},_=["ETIMEDOUT","ESOCKETTIMEDOUT","ECONNREFUSED","ECONNRESET","ENOENT","ENOTFOUND","TIMEOUT","EPIPE","REQUEST_SEND_ERROR"],T=new p("The operation was aborted.");var P=r(85630);class R extends f.p{constructor(e,t){super(e,t)}async sendRequest(e){return C.Ll||(("GET"===e.method.toUpperCase()||"HEAD"===e.method.toUpperCase())&&(e.url=(0,m.nM)(e.url,g.Zh.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.remove(g.BE.COOKIE),e.headers.remove(g.BE.CONTENT_LENGTH)),this._nextPolicy.sendRequest(e)}}class I{create(e,t){return new R(e,t)}}function O(e){return!!e&&"object"==typeof e&&Array.isArray(e.factories)&&"object"==typeof e.options&&"function"==typeof e.toServiceClientOptions}class A{constructor(e,t={}){this.factories=e,this.options=t}toServiceClientOptions(){return{httpClient:this.options.httpClient,requestPolicyFactories:this.factories}}}function M(e,t={}){e||(e=new S.t);let r=new A([],t);return r._credential=e,r}function k(e){var t;let r=e.options,{httpClient:n}=r,p=(0,o.Tt)(r,["httpClient"]),f=e._coreHttpClient;f||(e._coreHttpClient=f=n?(0,a.H_)(n):(i||(i=(0,l.fl)()),i));let y=e._corePipeline;if(!y){let r=`azsdk-js-azure-storage-blob/${g.MF}`,i=p.userAgentOptions&&p.userAgentOptions.userAgentPrefix?`${p.userAgentOptions.userAgentPrefix} ${r}`:`${r}`;(y=(0,c.uc)(Object.assign(Object.assign({},p),{loggingOptions:{additionalAllowedHeaderNames:g.jN,additionalAllowedQueryParameters:g.un,logger:d.v.info},userAgentOptions:{userAgentPrefix:i},serializationOptions:{stringifyXML:u.RB,serializerOptions:{xml:{xmlCharKey:"#"}}},deserializationOptions:{parseXML:u.h4,serializerOptions:{xml:{xmlCharKey:"#"}}}}))).removePolicy({phase:"Retry"}),y.removePolicy({name:l.e4}),y.addPolicy({name:"StorageCorrectContentLengthPolicy",sendRequest:async(e,t)=>t(e)}),y.addPolicy(function(e={}){var t,r,i,n,o,a;let c=null!=(t=e.retryPolicyType)?t:E.retryPolicyType,u=null!=(r=e.maxTries)?r:E.maxTries,h=null!=(i=e.retryDelayInMs)?i:E.retryDelayInMs,p=null!=(n=e.maxRetryDelayInMs)?n:E.maxRetryDelayInMs,f=null!=(o=e.secondaryHost)?o:E.secondaryHost,y=null!=(a=e.tryTimeoutInMs)?a:E.tryTimeoutInMs;return{name:"storageRetryPolicy",async sendRequest(e,t){let r,i;y&&(e.url=(0,m.nM)(e.url,g.Zh.Parameters.TIMEOUT,String(Math.floor(y/1e3))));let n=e.url,o=f?(0,m.A8)(e.url,f):void 0,a=!1,b=1,v=!0;for(;v;){let f=a||!o||!["GET","HEAD","OPTIONS"].includes(e.method)||b%2==1;e.url=f?n:o,r=void 0,i=void 0;try{d.v.info(`RetryPolicy: =====> Try=${b} ${f?"Primary":"Secondary"}`),r=await t(e),a=a||!f&&404===r.status}catch(e){if((0,l.T0)(e))d.v.error(`RetryPolicy: Caught error, message: ${e.message}, code: ${e.code}`),i=e;else throw d.v.error(`RetryPolicy: Caught error, message: ${(0,C.u1)(e)}`),e}(v=function({isPrimaryRetry:e,attempt:t,response:r,error:i}){var n,s;if(t>=u)return d.v.info(`RetryPolicy: Attempt(s) ${t} >= maxTries ${u}, no further try.`),!1;if(i){for(let e of _)if(i.name.toUpperCase().includes(e)||i.message.toUpperCase().includes(e)||i.code&&i.code.toString().toUpperCase()===e)return d.v.info(`RetryPolicy: Network error ${e}
4 found, will retry.`),!0;if((null==i?void 0:i.code)==="PARSE_ERROR"&&(null==i?void 0:i.message.startsWith('Error "Error: Unclosed root tag')))return d.v.info("RetryPolicy: Incomplete XML response likely due to service timeout, will retry."),!0}if(r||i){let t=null!=(s=null!=(n=null==r?void 0:r.status)?n:null==i?void 0:i.statusCode)?s:0;if(!e&&404===t)return d.v.info("RetryPolicy: Secondary access with 404, will retry."),!0;if(503===t||500===t)return d.v.info(`RetryPolicy: Will retry for status code ${t}.`),!0}return!1}({isPrimaryRetry:f,attempt:b,response:r,error:i}))&&await (0,m.cb)(function(e,t){let r=0;if(e)switch(c){case s.EXPONENTIAL:r=Math.min((Math.pow(2,t-1)-1)*h,p);break;case s.FIXED:r=h}else r=1e3*Math.random();return d.v.info(`RetryPolicy: Delay for ${r}ms`),r}(f,b),e.abortSignal,T),b++}if(r)return r;throw null!=i?i:new l.pj("RetryPolicy failed without known error.")}}}(p.retryOptions),{phase:"Retry"}),y.addPolicy({name:"storageBrowserPolicy",sendRequest:async(e,t)=>(C.Ll||(("GET"===e.method||"HEAD"===e.method)&&(e.url=(0,m.nM)(e.url,g.Zh.Parameters.FORCE_BROWSER_NO_CACHE,new Date().getTime().toString())),e.headers.delete(g.BE.COOKIE),e.headers.delete(g.BE.CONTENT_LENGTH)),t(e))});let n=function(e){let t=[D,L,B,q,U,H,z];if(e.factories.length){let r=e.factories.filter(e=>!t.some(t=>t(e)));if(r.length){let e=r.some(e=>"InjectorPolicyFactory"===e.constructor.name);return{wrappedPolicies:(0,a.g1)(r),afterRetry:e}}}}(e);n&&y.addPolicy(n.wrappedPolicies,n.afterRetry?{afterPhase:"Retry"}:void 0);let o=N(e);(0,h.Zp)(o)?y.addPolicy((0,l.N$)({credential:o,scopes:null!=(t=p.audience)?t:g.iO,challengeCallbacks:{authorizeRequestOnChallenge:c.rH}}),{phase:"Sign"}):o instanceof x.Z&&y.addPolicy((0,P.R)({accountName:o.accountName,accountKey:o.accountKey}),{phase:"Sign"}),e._corePipeline=y}return Object.assign(Object.assign({},p),{allowInsecureConnection:!0,httpClient:f,pipeline:y})}function N(e){if(e._credential)return e._credential;let t=new S.t;for(let r of e.factories)if((0,h.Zp)(r.credential))t=r.credential;else if(L(r))return r;return t}function L(e){return e instanceof x.Z||"StorageSharedKeyCredential"===e.constructor.name}function D(e){return e instanceof S.t||"AnonymousCredential"===e.constructor.name}function B(e){return(0,h.Zp)(e.credential)}function q(e){return e instanceof I||"StorageBrowserPolicyFactory"===e.constructor.name}function U(e){return e instanceof w||"StorageRetryPolicyFactory"===e.constructor.name}function H(e){return"TelemetryPolicyFactory"===e.constructor.name}function z(e){let t=e.create({sendRequest:async e=>({request:e,headers:e.headers.clone(),status:500})},{log(e,t){},shouldLog:e=>!1}).constructor.name;return["GenerateClientRequestIdPolicy","TracingPolicy","LogPolicy","ProxyPolicy","DisableResponseDecompressionPolicy","KeepAlivePolicy","DeserializationPolicy"].some(e=>
4t.startsWith(e))}},72211:(e,t,r)=>{"use strict";r.d(t,{j:()=>a});var i=r(94485),n=r(2848),s=r(55335),o=r(28023);class a{get leaseId(){return this._leaseId}get url(){return this._url}constructor(e,t){let r=e.storageClientContext;this._url=e.url,void 0===e.name?(this._isContainer=!0,this._containerOrBlobOperation=r.container):(this._isContainer=!1,this._containerOrBlobOperation=r.blob),t||(t=(0,i.N4)()),this._leaseId=t}async acquireLease(e,t={}){var r,i,a,l,c;if(this._isContainer&&((null==(r=t.conditions)?void 0:r.ifMatch)&&(null==(i=t.conditions)?void 0:i.ifMatch)!==n.yv||(null==(a=t.conditions)?void 0:a.ifNoneMatch)&&(null==(l=t.conditions)?void 0:l.ifNoneMatch)!==n.yv||(null==(c=t.conditions)?void 0:c.tagConditions)))throw RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return s.U.withSpan("BlobLeaseClient-acquireLease",t,async r=>{var i;return(0,o.m6)(await this._containerOrBlobOperation.acquireLease({abortSignal:t.abortSignal,duration:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),proposedLeaseId:this._leaseId,tracingOptions:r.tracingOptions}))})}async changeLease(e,t={}){var r,i,a,l,c;if(this._isContainer&&((null==(r=t.conditions)?void 0:r.ifMatch)&&(null==(i=t.conditions)?void 0:i.ifMatch)!==n.yv||(null==(a=t.conditions)?void 0:a.ifNoneMatch)&&(null==(l=t.conditions)?void 0:l.ifNoneMatch)!==n.yv||(null==(c=t.conditions)?void 0:c.tagConditions)))throw RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return s.U.withSpan("BlobLeaseClient-changeLease",t,async r=>{var i;let n=(0,o.m6)(await this._containerOrBlobOperation.changeLease(this._leaseId,e,{abortSignal:t.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),tracingOptions:r.tracingOptions}));return this._leaseId=e,n})}async releaseLease(e={}){var t,r,i,a,l;if(this._isContainer&&((null==(t=e.conditions)?void 0:t.ifMatch)&&(null==(r=e.conditions)?void 0:r.ifMatch)!==n.yv||(null==(i=e.conditions)?void 0:i.ifNoneMatch)&&(null==(a=e.conditions)?void 0:a.ifNoneMatch)!==n.yv||(null==(l=e.conditions)?void 0:l.tagConditions)))throw RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return s.U.withSpan("BlobLeaseClient-releaseLease",e,async t=>{var r;return(0,o.m6)(await this._containerOrBlobOperation.releaseLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),tracingOptions:t.tracingOptions}))})}async renewLease(e={}){var t,r,i,o,a;if(this._isContainer&&((null==(t=e.conditions)?void 0:t.ifMatch)&&(null==(r=e.conditions)?void 0:r.ifMatch)!==n.yv||(null==(i=e.conditions)?void 0:i.ifNoneMatch)&&(null==(o=e.conditions)?void 0:o.ifNoneMatch)!==n.yv||(null==(a=e.conditions)?void 0:a.tagConditions)))throw RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return s.U.withSpan("BlobLeaseClient-renewLease",e,async t=>{var r;return this._containerOrBlobOperation.renewLease(this._leaseId,{abortSignal:e.abortSignal,modifiedAccessConditions:Object.assign(Object.assign({},e.conditions),{ifTags:null==(r=e.conditions)?void 0:r.tagConditions}),tracingOptions:t.tracingOptions})})}async breakLease(e,t={}){var r,i,a,l,c;if(this._isContainer&&((null==(r=t.conditions)?void 0:r.ifMatch)&&(null==(i=t.conditions)?void 0:i.ifMatch)!==n.yv||(null==(a=t.conditions)?void 0:a.ifNoneMatch)&&(null==(l=t.conditions)?void 0:l.ifNoneMatch)!==n.yv||(null==(c=t.conditions)?void 0:c.tagConditions)))throw RangeError("The IfMatch, IfNoneMatch and tags access conditions are ignored by the service. Values other than undefined or their default values are not acceptable.");return s.U.withSpan("BlobLeaseClient-breakLease",t,async r=>{var i;let n={abortSignal:t.abortSignal,breakPeriod:e,modifiedAccessConditions:Object.assign(Object.assign({},t.conditions),{ifTags:null==(i=t.conditions)?void 0:i.tagConditions}),tracingOptions:r.tracingOptions};return(0,o.m6)(await this._containerOrBlobOperation.breakLease(n))})}}},72963:(e,t,r)=>{"use strict";r.d(t,{Tk:()=>to,mA:()=>ta,sO:()=>eQ});var i={number:function(e){return"number"==typeof e},function:function(e){return"function"==typeof e},undefined:function(e){return void 0===e}};let n=Error("timeout while waiting for mutex to become available");Error("mutex already locked");let s=Error("request for lock canceled");class o{constructor(e,t=s){this._value=e,this._cancelError=t,this._queue=[],this._weightedWaiters=[]}
4acquire(e=1,t=0){if(e<=0)throw Error(`invalid weight ${e}: must be positive`);return new Promise((r,i)=>{let n={resolve:r,reject:i,weight:e,priority:t},s=a(this._queue,e=>t<=e.priority);-1===s&&e<=this._value?this._dispatchItem(n):this._queue.splice(s+1,0,n)})}runExclusive(e){var t,r,i,n;return t=this,r=arguments,i=void 0,n=function*(e,t=1,r=0){let[i,n]=yield this.acquire(t,r);try{return yield e(i)}finally{n()}},new(i||(i=Promise))(function(e,s){function o(e){try{l(n.next(e))}catch(e){s(e)}}function a(e){try{l(n.throw(e))}catch(e){s(e)}}function l(t){var r;t.done?e(t.value):((r=t.value)instanceof i?r:new i(function(e){e(r)})).then(o,a)}l((n=n.apply(t,r||[])).next())})}waitForUnlock(e=1,t=0){if(e<=0)throw Error(`invalid weight ${e}: must be positive`);return this._couldLockImmediately(e,t)?Promise.resolve():new Promise(r=>{this._weightedWaiters[e-1]||(this._weightedWaiters[e-1]=[]),function(e,t){let r=a(e,e=>t.priority<=e.priority);e.splice(r+1,0,t)}(this._weightedWaiters[e-1],{resolve:r,priority:t})})}isLocked(){return this._value<=0}getValue(){return this._value}setValue(e){this._value=e,this._dispatchQueue()}release(e=1){if(e<=0)throw Error(`invalid weight ${e}: must be positive`);this._value+=e,this._dispatchQueue()}cancel(){this._queue.forEach(e=>e.reject(this._cancelError)),this._queue=[]}_dispatchQueue(){for(this._drainUnlockWaiters();this._queue.length>0&&this._queue[0].weight<=this._value;)this._dispatchItem(this._queue.shift()),this._drainUnlockWaiters()}_dispatchItem(e){let t=this._value;this._value-=e.weight,e.resolve([t,this._newReleaser(e.weight)])}_newReleaser(e){let t=!1;return()=>{t||(t=!0,this.release(e))}}_drainUnlockWaiters(){if(0===this._queue.length)for(let e=this._value;e>0;e--){let t=this._weightedWaiters[e-1];t&&(t.forEach(e=>e.resolve()),this._weightedWaiters[e-1]=[])}else{let e=this._queue[0].priority;for(let t=this._value;t>0;t--){let r=this._weightedWaiters[t-1];if(!r)continue;let i=r.findIndex(t=>t.priority<=e);(-1===i?r:r.splice(0,i)).forEach(e=>e.resolve())}}}_couldLockImmediately(e,t){return(0===this._queue.length||this._queue[0].priority<t)&&e<=this._value}}function a(e,t){for(let r=e.length-1;r>=0;r--)if(t(e[r]))return r;return -1}class l{constructor(e){this._semaphore=new o(1,e)}acquire(){var e,t,r,i;return e=this,t=arguments,r=void 0,i=function*(e=0){let[,t]=yield this._semaphore.acquire(1,e);return t},new(r||(r=Promise))(function(n,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((i=i.apply(e,t||[])).next())})}runExclusive(e,t=0){return this._semaphore.runExclusive(()=>e(),1,t)}isLocked(){return this._semaphore.isLocked()}waitForUnlock(e=0){return this._semaphore.waitForUnlock(1,e)}release(){this._semaphore.isLocked()&&this._semaphore.release()}cancel(){return this._semaphore.cancel()}}var c=function(e,t,r,i){return new(r||(r=Promise))(function(n,s){function o(e){try{l(i.next(e))}catch(e){s(e)}}function a(e){try{l(i.throw(e))}catch(e){s(e)}}function l(e){var t;e.done?n(e.value):((t=e.value)instanceof r?t:new r(function(e){e(t)})).then(o,a)}l((i=i.apply(e,t||[])).next())})};function u(e){return void 0!==e.getValue}var h=class{#et=new Map;getOrCreateForKey(e,t){let r=this.#et.get(e);return r||(r=new l,this.#et.set(e,r)),i.number(t)?function(e,t,r=n){return{acquire:(i,n)=>{let s;if(u(e)?s=i:(s=void 0,n=i),void 0!==s&&s<=0)throw Error(`invalid weight ${s}: must be positive`);return new Promise((i,o)=>c(this,void 0,void 0,function*(){let a=!1,l=setTimeout(()=>{a=!0,o(r)},t);try{let t=yield u(e)?e.acquire(s,n):e.acquire(n);a?(Array.isArray(t)?t[1]:t)():(clearTimeout(l),i(t))}catch(e){a||(clearTimeout(l),o(e))}}))},runExclusive(e,t,r){return c(this,void 0,void 0,function*(){let i=()=>void 0;try{let n=yield this.acquire(t,r);if(Array.isArray(n))return i=n[1],yield e(n[0]);return i=n,yield e()}finally{i()}})},release(t){e.release(t)},cancel:()=>e.cancel(),waitForUnlock:(i,n)=>{let s;if(u(e)?s=i:(s=void 0,n=i),void 0!==s&&s<=0)throw Error(`invalid weight ${s}: must be positive`);return new Promise((i,o)=>{let a=setTimeout(()=>
4o(r),t);(u(e)?e.waitForUnlock(s,n):e.waitForUnlock(n)).then(()=>{clearTimeout(a),i()})})},isLocked:()=>e.isLocked(),getValue:()=>e.getValue(),setValue:t=>e.setValue(t)}}(r,t):r}release(e,t){t(),this.#et.delete(e)}},d={Set:"set",Clear:"clear",Delete:"delete",Expire:"expire"},p=/^(-?(?:\d+)?\.?\d+) *(m(?:illiseconds?|s(?:ecs?)?))?(s(?:ec(?:onds?|s)?)?)?(m(?:in(?:utes?|s)?)?)?(h(?:ours?|rs?)?)?(d(?:ays?)?)?(w(?:eeks?|ks?)?)?(y(?:ears?|rs?)?)?$/;function f(e,t,r,i){var n=(0|e)===e?e:~~(e+.5);return t+n+(i?" "+r+(1!=n?"s":""):r[0])}var g={format:(e,t)=>(function(e,t){var r=e<0?"-":"",i=e<0?-e:e;return i<1e3?e+(t?" ms":"ms"):i<6e4?f(i/1e3,r,"second",t):i<36e5?f(i/6e4,r,"minute",t):i<864e5?f(i/36e5,r,"hour",t):i<315576e5?f(i/864e5,r,"day",t):f(i/315576e5,r,"year",t)})(e,t),parse(e){if("number"==typeof e)return e;let t=function(e){var t,r=e.toLowerCase().match(p);if(null!=r&&(t=parseFloat(r[1])))return null!=r[3]?1e3*t:null!=r[4]?6e4*t:null!=r[5]?36e5*t:null!=r[6]?864e5*t:null!=r[7]?864e5*t*7:null!=r[8]?315576e5*t:t}(e);if(void 0===t)throw Error(`Invalid duration expression "${e}"`);return t}};function m(e,t=3e4){if("number"==typeof e)return e;if(null!==e)return void 0===e?"number"==typeof t?t:"string"==typeof t?g.parse(t):void 0:g.parse(e)}for(var y=256,b=[];y--;)b[y]=(y+256).toString(16).substring(1);var v=r(15115),w=r(8562),x=r(93485),S=r(13535);class C extends Error{name="TimeoutError";constructor(e,t){super(e,t),Error.captureStackTrace?.(this,C)}}let E=e=>e.reason??new DOMException("This operation was aborted.","AbortError");async function _(e){try{return[await e?.(),null]}catch(e){if(e instanceof Error)return[null,e];throw e}}var T=(0,r(68994).debuglog)("boringnode:bus");Object.getOwnPropertyDescriptor,Object.getOwnPropertyNames,Object.prototype.hasOwnProperty;var P=r(63426),R=(r(94474),r(92290)),I=r(51642).hp,O=Object.create,A=Object.defineProperty,M=Object.getOwnPropertyDescriptor,k=Object.getOwnPropertyNames,N=Object.getPrototypeOf,L=Object.prototype.hasOwnProperty,D=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),B=(e,t,r)=>(r=null!=e?O(N(e)):{},((e,t,r,i)=>{if(t&&"object"==typeof t||"function"==typeof t)for(var n,s=k(t),o=0,a=s.length;o<a;o++)n=s[o],L.call(e,n)||n===r||A(e,n,{get:(e=>t[e]).bind(null,n),enumerable:!(i=M(t,n))||i.enumerable});return e})(!t&&e&&e.__esModule?r:A(r,"default",{value:e,enumerable:!0}),e));let q=P.randomUUID;function U(e){return q(e)}U.use=function(e){q=e},U.restore=function(){q=P.randomUUID};var H=/^(-?(?:\d+)?\.?\d+) *(m(?:illiseconds?|s(?:ecs?)?))?(s(?:ec(?:onds?|s)?)?)?(m(?:in(?:utes?|s)?)?)?(h(?:ours?|rs?)?)?(d(?:ays?)?)?(w(?:eeks?|ks?)?)?(y(?:ears?|rs?)?)?$/;function z(e,t,r,i){var n=(0|e)===e?e:~~(e+.5);return t+n+(i?" "+r+(1!=n?"s":""):r[0])}let F=e=>{let t=(e+1)*6,r=(0,P.randomBytes)(Math.ceil(t/8));return I.from(r).toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,"").slice(0,e)},j=F;function $(e){return j(e)}$.use=function(e){j=e},$.restore=function(){j=F};function K(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function V(e,t,r){return R(e,t,r)}[["bias","biases"],["canvas","canvases"],["cache","caches"],["cliche","cliches"],["fez","fezzes"],["lens","lenses"],["niche","niches"],["quiche","quiches"],["veto","vetoes"]].forEach(([e,t])=>{let r=t.slice(e.length),i=K(e),n=K(r);R.addPluralRule(RegExp(`(${i})$`,"i"),`$1${r}`),R.addSingularRule(RegExp(`(${i})${n}$`,"i"),"$1")}),V.addPluralRule=R.addPluralRule,V.addSingularRule=R.addSingularRule,V.addIrregularRule=R.addIrregularRule,V.addUncountableRule=R.addUncountableRule,R.plural,R.singular,R.isPlural,R.isSingular;var W={milliseconds:{format:(e,t)=>(function(e,t){var r=e<0?"-":"",i=e<0?-e:e;return i<1e3?e+(t?" ms":"ms"):i<6e4?z(i/1e3,r,"second",t):i<36e5?z(i/6e4,r,"minute",t):i<864e5?z(i/36e5,r,"hour",t):i<315576e5?z(i/864e5,r,"day",t):z(i/315576e5,r,"year",t)})(e,t),parse(e){if("number"==typeof e)return e;let t=function(e){var t,r=e.toLowerCase().match(H);if(null!=r&&(t=parseFloat(r[1])))return null!=r[3]?1e3*t:null!=r[4]?6e4*t:null!=r[5]?36e5*t:null!=r[6]?864e5*t:null!=r[7]?864e5*t*7:null!=r[8]?315576e5*t:t}(e);if(void 0===t)throw Error(`Invalid duration expression "${e}"`);return t}}};let Q=BigInt(0x100000000-1),G=BigInt(32);function X(e,t=""){if("number"!=typeof e){let r=t&&`"${t}" `;throw TypeError(`${r}expected number, got ${typeof e}`)}if(!Number.isSafeInteger(e)||e<0){let r=t&&`"${t}" `;throw RangeError(`${r}expected integer >= 0, got ${e}`)}}function J(e,t,r=""){let i=e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name&&"BYTES_PER_ELEMENT"in e&&1===e.BYTES_PER_ELEMENT,n=e?.length,s=void 0!==t;if(!i||s&&n!==t){let o=(r&&`"${r}" `)+"expected Uint8Array"+(s?` of length ${t}`:"")+", got "+(i?`length=${n}`:`type=${typeof e}`);if(!i)throw TypeError(o);throw RangeError(o)}return e}function Y(e,t=!0){if(e.destroyed)throw Error("Hash instance has been destroyed");if(t&&e.finished)throw Error("Hash#digest() has already been called")}function Z(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}let ee=68===new Uint8Array(new Uint32Array([0x11223344]).buffer)[0]?e=>e:function(e){for(let r=0;r<e.length;r++){var t;e[r]=(t=e[r])<<24&0xff000000|t<<8&0xff0000|t>>>8&65280|t>>>24&255}return e},et=BigInt(0),er=BigInt(1),ei=BigInt(2),en=BigInt(7),es=BigInt(256),eo=BigInt(113),ea=[],el=[],ec=[];for(let e=0,t=er,r=1,i=0;e<24;e++){[r,i]=[i,(2*r+3*i)%5],ea.push(2*(5*i+r)),el.push((e+1)*(e+2)/2%64);let n=et;for(let e=0;e<7;e++)(t=(t<<er^(t>>en)*eo)%es)&ei&&(n^=er<<(er<<BigInt(e))-er);ec.push(n)}let eu=function(e,t=!1){let r=e.length,i=new Uint32Array(r),n=new Uint32Array(r);for(let s=0;s<r;s++){let{h:r,l:o}=function(e,t=!1){return t?{h:Number(e&Q),l:Number(e>>G&Q)}:{h:0|Number(e>>G&Q),l:0|Number(e&Q)}}(e[s],t);[i[s],n[s]]=[r,o]}return[i,n]}(ec,!0),eh=eu[0],ed=eu[1],ep=(e,t,r)=>r>32?((e,t,r)=>t<<r-32|e>>>64-r)(e,t,r):((e,t,r)=>e<<r|t>>>32-r)(e,t,r),ef=(e,t,r)=>r>32?((e,t,r)=>e<<r-32|t>>>64-r)(e,t,r):((e,t,r)=>t<<r|e>>>32-r)(e,t,r);class eg{state;pos=0;posOut=0;finished=!1;state32;destroyed=!1;blockLen;suffix;outputLen;canXOF;enableXOF=!1;rounds;constructor(e,t,r,i=!1,n=24){if(this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.canXOF=i,this.rounds=n,X(r,"outputLen"),!(0<e&&e<200))throw Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))}(this.state)}clone(){return this._cloneInto()}keccak(){ee(this.state32),function(e,t=24){if(X(t,"rounds"),t<1||t>24)throw Error('"rounds" expected integer 1..24');let r=new Uint32Array(10);for(let i=24-t;i<24;i++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){let i=(t+8)%10,n=(t+2)%10,s=r[n],o=r[n+1],a=ep(s,o,1)^r[i],l=ef(s,o,1)^r[i+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=l}let t=e[2],n=e[3];for(let r=0;r<24;r++){let i=el[r],s=ep(t,n,i),o=ef(t,n,i),a=ea[r];t=e[a],n=e[a+1],e[a]=s,e[a+1]=o}for(let t=0;t<50;t+=10){let r=e[t],i=e[t+1],n=e[t+2],s=e[t+3];
4e[t]^=~e[t+2]&e[t+4],e[t+1]^=~e[t+3]&e[t+5],e[t+2]^=~e[t+4]&e[t+6],e[t+3]^=~e[t+5]&e[t+7],e[t+4]^=~e[t+6]&e[t+8],e[t+5]^=~e[t+7]&e[t+9],e[t+6]^=~e[t+8]&r,e[t+7]^=~e[t+9]&i,e[t+8]^=~r&n,e[t+9]^=~i&s}e[0]^=eh[i],e[1]^=ed[i]}Z(r)}(this.state32,this.rounds),ee(this.state32),this.posOut=0,this.pos=0}update(e){Y(this),J(e);let{blockLen:t,state:r}=this,i=e.length;for(let n=0;n<i;){let s=Math.min(t-this.pos,i-n);for(let t=0;t<s;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;let{state:e,suffix:t,pos:r,blockLen:i}=this;e[r]^=t,(128&t)!=0&&r===i-1&&this.keccak(),e[i-1]^=128,this.keccak()}writeInto(e){Y(this,!1),J(e),this.finish();let t=this.state,{blockLen:r}=this;for(let i=0,n=e.length;i<n;){this.posOut>=r&&this.keccak();let s=Math.min(r-this.posOut,n-i);e.set(t.subarray(this.posOut,this.posOut+s),i),this.posOut+=s,i+=s}return e}xofInto(e){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return X(e),this.xofInto(new Uint8Array(e))}digestInto(e){J(e,void 0,"digestInto() output");let t=this.outputLen;if(e.length<t)throw RangeError('"digestInto() output" expected to be of length >='+t);if(this.finished)throw Error("digest() was already called");this.writeInto(e.subarray(0,this.outputLen)),this.destroy()}digest(){let e=new Uint8Array(this.outputLen);return this.digestInto(e),e}destroy(){this.destroyed=!0,Z(this.state)}_cloneInto(e){let{blockLen:t,suffix:r,outputLen:i,rounds:n,enableXOF:s}=this;return(e||=new eg(t,r,i,s,n)).blockLen=t,e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=n,e.suffix=r,e.outputLen=i,e.enableXOF=s,e.canXOF=this.canXOF,e.destroyed=this.destroyed,e}}let em=((e,t,r,i={})=>(function(e,t={}){let r=(t,r)=>e(r).update(t).digest(),i=e(void 0);return r.outputLen=i.outputLen,r.blockLen=i.blockLen,r.canXOF=i.canXOF,r.create=t=>e(t),Object.assign(r,t),Object.freeze(r)})(()=>new eg(t,e,r),i))(6,72,64,{oid:Uint8Array.from([6,9,96,134,72,1,101,3,4,2,10])});var ey=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,eb=Math.ceil,ev=Math.floor,ew="[BigNumber Error] ",ex=ew+"Number primitive has more than 15 significant digits: ",eS=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function eC(e){var t=0|e;return e>0||e===t?t:t-1}function eE(e){for(var t,r,i=1,n=e.length,s=e[0]+"";i<n;){for(r=14-(t=e[i++]+"").length;r--;t="0"+t);s+=t}for(n=s.length;48===s.charCodeAt(--n););return s.slice(0,n+1||1)}function e_(e,t){var r,i,n=e.c,s=t.c,o=e.s,a=t.s,l=e.e,c=t.e;if(!o||!a)return null;if(r=n&&!n[0],i=s&&!s[0],r||i)return r?i?0:-a:o;if(o!=a)return o;if(r=o<0,i=l==c,!n||!s)return i?0:!n^r?1:-1;if(!i)return l>c^r?1:-1;for(o=0,a=(l=n.length)<(c=s.length)?l:c;o<a;o++)if(n[o]!=s[o])return n[o]>s[o]^r?1:-1;return l==c?0:l>c^r?1:-1}function eT(e,t,r,i){if(e<t||e>r||e!==ev(e))throw Error(ew+(i||"Argument")+("number"==typeof e?e<t||e>r?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function eP(e){var t=e.c.length-1;return eC(e.e/14)==t&&e.c[t]%2!=0}function eR(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function eI(e,t,r){var i,n;if(t<0){for(n=r+".";++t;n+=r);e=n+e}else if(i=e.length,++t>i){for(n=r,t-=i;--t;n+=r);e+=n}else t<i&&(e=e.slice(0,t)+"."+e.slice(t));return e}var eO=function e(t){var r,i,n,s,o,a,l,c,u,h=_.prototype={constructor:_,toString:null,valueOf:null},d=new _(1),p=20,f=4,g=-7,m=21,y=-1e7,b=1e7,v=!1,w=1,x=0,S={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:"\xa0",suffix:""},C="0123456789abcdefghijklmnopqrstuvwxyz",E=!0;function _(e,t){var r,i,n,s,o,a,l,h,d=this;if(!(d instanceof _))return new _(e,t);if(null==t){if(e&&!0===e._isBigNumber){d.s=e.s,!e.c||e.e>b?d.c=d.e=null:e.e<y?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice());return}if((a="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(s=0,o=e;o>=10;o/=10,s++);s>b?d.c=d.e=null:(d.e=s,d.c=[e]);return}h=String(e)}else{if(!ey.test(h=String(e)))return u(d,h,a);
4d.s=45==h.charCodeAt(0)?(h=h.slice(1),-1):1}(s=h.indexOf("."))>-1&&(h=h.replace(".","")),(o=h.search(/e/i))>0?(s<0&&(s=o),s+=+h.slice(o+1),h=h.substring(0,o)):s<0&&(s=h.length)}else{if(eT(t,2,C.length,"Base"),10==t&&E)return I(d=new _(e),p+d.e+1,f);if(h=String(e),a="number"==typeof e){if(0*e!=0)return u(d,h,a,t);if(d.s=1/e<0?(h=h.slice(1),-1):1,_.DEBUG&&h.replace(/^0\.0*|\./,"").length>15)throw Error(ex+e)}else d.s=45===h.charCodeAt(0)?(h=h.slice(1),-1):1;for(r=C.slice(0,t),s=o=0,l=h.length;o<l;o++)if(0>r.indexOf(i=h.charAt(o))){if("."==i){if(o>s){s=l;continue}}else if(!n&&(h==h.toUpperCase()&&(h=h.toLowerCase())||h==h.toLowerCase()&&(h=h.toUpperCase()))){n=!0,o=-1,s=0;continue}return u(d,String(e),a,t)}a=!1,(s=(h=c(h,t,10,d.s)).indexOf("."))>-1?h=h.replace(".",""):s=h.length}for(o=0;48===h.charCodeAt(o);o++);for(l=h.length;48===h.charCodeAt(--l););if(h=h.slice(o,++l)){if(l-=o,a&&_.DEBUG&&l>15&&(e>0x1fffffffffffff||e!==ev(e)))throw Error(ex+d.s*e);if((s=s-o-1)>b)d.c=d.e=null;else if(s<y)d.c=[d.e=0];else{if(d.e=s,d.c=[],o=(s+1)%14,s<0&&(o+=14),o<l){for(o&&d.c.push(+h.slice(0,o)),l-=14;o<l;)d.c.push(+h.slice(o,o+=14));o=14-(h=h.slice(o)).length}else o-=l;for(;o--;h+="0");d.c.push(+h)}}else d.c=[d.e=0]}
4function T(e,t,r,i){var n,s,o,a,l;if(null==r?r=f:eT(r,0,8),!e.c)return e.toString();if(n=e.c[0],o=e.e,null==t)l=eE(e.c),l=1==i||2==i&&(o<=g||o>=m)?eR(l,o):eI(l,o,"0");else if(s=(e=I(new _(e),t,r)).e,a=(l=eE(e.c)).length,1==i||2==i&&(t<=s||s<=g)){for(;a<t;l+="0",a++);l=eR(l,s)}else if(t-=o+(2===i&&s>o),l=eI(l,s,"0"),s+1>a){if(--t>0)for(l+=".";t--;l+="0");}else if((t+=s-a)>0)for(s+1==a&&(l+=".");t--;l+="0");return e.s<0&&n?"-"+l:l}function P(e,t){for(var r,i,n=1,s=new _(e[0]);n<e.length;n++)(i=new _(e[n])).s&&(r=e_(s,i))!==t&&(0!==r||s.s!==t)||(s=i);return s}function R(e,t,r){for(var i=1,n=t.length;!t[--n];t.pop());for(n=t[0];n>=10;n/=10,i++);return(r=i+14*r-1)>b?e.c=e.e=null:r<y?e.c=[e.e=0]:(e.e=r,e.c=t),e}function I(e,t,r,i){var n,s,o,a,l,c,u,h=e.c;if(h){t:{for(n=1,a=h[0];a>=10;a/=10,n++);if((s=t-n)<0)s+=14,o=t,u=ev((l=h[c=0])/eS[n-o-1]%10);else if((c=eb((s+1)/14))>=h.length)if(i){for(;h.length<=c;h.push(0));l=u=0,n=1,s%=14,o=s-14+1}else break t;else{for(n=1,l=a=h[c];a>=10;a/=10,n++);s%=14,u=(o=s-14+n)<0?0:ev(l/eS[n-o-1]%10)}if(i=i||t<0||null!=h[c+1]||(o<0?l:l%eS[n-o-1]),i=r<4?(u||i)&&(0==r||r==(e.s<0?3:2)):u>5||5==u&&(4==r||i||6==r&&(s>0?o>0?l/eS[n-o]:0:h[c-1])%10&1||r==(e.s<0?8:7)),t<1||!h[0])return h.length=0,i?(t-=e.e+1,h[0]=eS[(14-t%14)%14],e.e=-t||0):h[0]=e.e=0,e;if(0==s?(h.length=c,a=1,c--):(h.length=c+1,a=eS[14-s],h[c]=o>0?ev(l/eS[n-o]%eS[o])*a:0),i)for(;;)if(0==c){for(s=1,o=h[0];o>=10;o/=10,s++);for(o=h[0]+=a,a=1;o>=10;o/=10,a++);s!=a&&(e.e++,1e14==h[0]&&(h[0]=1));break}else{if(h[c]+=a,1e14!=h[c])break;h[c--]=0,a=1}for(s=h.length;0===h[--s];h.pop());}e.e>b?e.c=e.e=null:e.e<y&&(e.c=[e.e=0])}return e}function O(e){var t,r=e.e;return null===r?e.toString():(t=eE(e.c),t=r<=g||r>=m?eR(t,r):eI(t,r,"0"),e.s<0?"-"+t:t)}return _.clone=e,_.ROUND_UP=0,_.ROUND_DOWN=1,_.ROUND_CEIL=2,_.ROUND_FLOOR=3,_.ROUND_HALF_UP=4,_.ROUND_HALF_DOWN=5,_.ROUND_HALF_EVEN=6,_.ROUND_HALF_CEIL=7,_.ROUND_HALF_FLOOR=8,_.EUCLID=9,_.config=_.set=function(e){var t,r;if(null!=e)if("object"==typeof e){if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(eT(r=e[t],0,1e9,t),p=r),e.hasOwnProperty(t="ROUNDING_MODE")&&(eT(r=e[t],0,8,t),f=r),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((r=e[t])&&r.pop?(eT(r[0],-1e9,0,t),eT(r[1],0,1e9,t),g=r[0],m=r[1]):(eT(r,-1e9,1e9,t),g=-(m=r<0?-r:r))),e.hasOwnProperty(t="RANGE"))if((r=e[t])&&r.pop)eT(r[0],-1e9,-1,t),eT(r[1],1,1e9,t),y=r[0],b=r[1];else if(eT(r,-1e9,1e9,t),r)y=-(b=r<0?-r:r);else throw Error(ew+t+" cannot be zero: "+r);if(e.hasOwnProperty(t="CRYPTO"))if(!!(r=e[t])===r)if(r)if("undefined"!=typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))v=r;else throw v=!r,Error(ew+"crypto unavailable");else v=r;else throw Error(ew+t+" not true or false: "+r);if(e.hasOwnProperty(t="MODULO_MODE")&&(eT(r=e[t],0,9,t),w=r),e.hasOwnProperty(t="POW_PRECISION")&&(eT(r=e[t],0,1e9,t),x=r),e.hasOwnProperty(t="FORMAT"))if("object"==typeof(r=e[t]))S=r;else throw Error(ew+t+" not an object: "+r);if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(r=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(r))throw Error(ew+t+" invalid: "+r);E="0123456789"==r.slice(0,10),C=r}}else throw Error(ew+"Object expected: "+e);return{DECIMAL_PLACES:p,ROUNDING_MODE:f,EXPONENTIAL_AT:[g,m],RANGE:[y,b],CRYPTO:v,MODULO_MODE:w,POW_PRECISION:x,FORMAT:S,ALPHABET:C}},_.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!_.DEBUG)return!0;var t,r,i=e.c,n=e.e,s=e.s;t:if("[object Array]"==({}).toString.call(i)){if((1===s||-1===s)&&n>=-1e9&&n<=1e9&&n===ev(n)){if(0===i[0]){if(0===n&&1===i.length)return!0;break t}if((t=(n+1)%14)<1&&(t+=14),String(i[0]).length==t){for(t=0;t<i.length;t++)if((r=i[t])<0||r>=1e14||r!==ev(r))break t;if(0!==r)return!0}}}else if(null===i&&null===n&&(null===s||1===s||-1===s))return!0;throw Error(ew+"Invalid BigNumber: "+e)},_.maximum=_.max=function(){return P(arguments,-1)},_.minimum=_.min=function(){return P(arguments,1)},r=0x20000000000000*Math.random()&2097151?function(){return ev(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},_.random=function(e){var t,i,n,s,o,a=0,l=[],c=new _(d);if(null==e?e=p:eT(e,0,1e9),s=eb(e/14),v)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(s*=2));a<s;)(o=131072*t[a]+(t[a+1]>>>11))>=9e15?(i=crypto.getRandomValues(new Uint32Array(2)),t[a]=i[0],t[a+1]=i[1]):(l.push(o%1e14),a+=2);a=s/2}else if(crypto.randomBytes){for(t=crypto.randomBytes(s*=7);a<s;)(o=(31&t[a])*0x1000000000000+0x10000000000*t[a+1]+0x100000000*t[a+2]+0x1000000*t[a+3]+(t[a+4]<<16)+(t[a+5]<<8)+t[a+6])>=9e15?crypto.randomBytes(7).copy(t,a):(l.push(o%1e14),a+=7);a=s/7}else throw v=!1,Error(ew+"crypto unavailable");if(!v)for(;a<s;)(o=r())<9e15&&(l[a++]=o%1e14);for(s=l[--a],e%=14,s&&e&&(o=eS[14-e],l[a]=ev(s/o)*o);0===l[a];l.pop(),a--);if(a<0)l=[n=0];else{for(n=-1;0===l[0];l.splice(0,1),n-=14);for(a=1,o=l[0];o>=10;o/=10,a++);a<14&&(n-=14-a)}return c.e=n,c.c=l,c},_.sum=function(){for(var e=1,t=arguments,r=new _(t[0]);e<t.length;)r=r.plus(t[e++]);return r},c=function(){var e="0123456789";
4function t(e,t,r,i){for(var n,s,o=[0],a=0,l=e.length;a<l;){for(s=o.length;s--;o[s]*=t);for(o[0]+=i.indexOf(e.charAt(a++)),n=0;n<o.length;n++)o[n]>r-1&&(null==o[n+1]&&(o[n+1]=0),o[n+1]+=o[n]/r|0,o[n]%=r)}return o.reverse()}return function(r,i,n,s,o){var a,c,u,h,d,g,m,y,b=r.indexOf("."),v=p,w=f;for(b>=0&&(h=x,x=0,r=r.replace(".",""),g=(y=new _(i)).pow(r.length-b),x=h,y.c=t(eI(eE(g.c),g.e,"0"),10,n,e),y.e=y.c.length),u=h=(m=t(r,i,n,o?(a=C,e):(a=e,C))).length;0==m[--h];m.pop());if(!m[0])return a.charAt(0);if(b<0?--u:(g.c=m,g.e=u,g.s=s,m=(g=l(g,y,v,w,n)).c,d=g.r,u=g.e),b=m[c=u+v+1],h=n/2,d=d||c<0||null!=m[c+1],d=w<4?(null!=b||d)&&(0==w||w==(g.s<0?3:2)):b>h||b==h&&(4==w||d||6==w&&1&m[c-1]||w==(g.s<0?8:7)),c<1||!m[0])r=d?eI(a.charAt(1),-v,a.charAt(0)):a.charAt(0);else{if(m.length=c,d)for(--n;++m[--c]>n;)m[c]=0,c||(++u,m=[1].concat(m));for(h=m.length;!m[--h];);for(b=0,r="";b<=h;r+=a.charAt(m[b++]));r=eI(r,u,a.charAt(0))}return r}}(),l=function(){function e(e,t,r){var i,n,s,o,a=0,l=e.length,c=t%1e7,u=t/1e7|0;for(e=e.slice();l--;)i=u*(s=e[l]%1e7)+(o=e[l]/1e7|0)*c,a=((n=c*s+i%1e7*1e7+a)/r|0)+(i/1e7|0)+u*o,e[l]=n%r;return a&&(e=[a].concat(e)),e}function t(e,t,r,i){var n,s;if(r!=i)s=r>i?1:-1;else for(n=s=0;n<r;n++)if(e[n]!=t[n]){s=e[n]>t[n]?1:-1;break}return s}function r(e,t,r,i){for(var n=0;r--;)e[r]-=n,n=+(e[r]<t[r]),e[r]=n*i+e[r]-t[r];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(i,n,s,o,a){var l,c,u,h,d,p,f,g,m,y,b,v,w,x,S,C,E,T=i.s==n.s?1:-1,P=i.c,R=n.c;if(!P||!P[0]||!R||!R[0])return new _(!i.s||!n.s||(P?R&&P[0]==R[0]:!R)?NaN:P&&0==P[0]||!R?0*T:T/0);for(m=(g=new _(T)).c=[],T=s+(c=i.e-n.e)+1,a||(a=1e14,c=eC(i.e/14)-eC(n.e/14),T=T/14|0),u=0;R[u]==(P[u]||0);u++);if(R[u]>(P[u]||0)&&c--,T<0)m.push(1),h=!0;else{for(x=P.length,C=R.length,u=0,T+=2,(d=ev(a/(R[0]+1)))>1&&(R=e(R,d,a),P=e(P,d,a),C=R.length,x=P.length),w=C,b=(y=P.slice(0,C)).length;b<C;y[b++]=0);E=[0].concat(E=R.slice()),S=R[0],R[1]>=a/2&&S++;do{if(d=0,(l=t(R,y,C,b))<0){if(v=y[0],C!=b&&(v=v*a+(y[1]||0)),(d=ev(v/S))>1)for(d>=a&&(d=a-1),f=(p=e(R,d,a)).length,b=y.length;1==t(p,y,f,b);)d--,r(p,C<f?E:R,f,a),f=p.length,l=1;else 0==d&&(l=d=1),f=(p=R.slice()).length;if(f<b&&(p=[0].concat(p)),r(y,p,b,a),b=y.length,-1==l)for(;1>t(R,y,C,b);)d++,r(y,C<b?E:R,b,a),b=y.length}else 0===l&&(d++,y=[0]);m[u++]=d,y[0]?y[b++]=P[w]||0:(y=[P[w]],b=1)}while((w++<x||null!=y[0])&&T--);h=null!=y[0],m[0]||m.splice(0,1)}if(1e14==a){for(u=1,T=m[0];T>=10;T/=10,u++);I(g,s+(g.e=u+14*c-1)+1,o,h)}else g.e=c,g.r=+h;return g}}(),i=/^(-?)0([xbo])(?=\w[\w.]*$)/i,n=/^([^.]+)\.$/,s=/^\.([^.]+)$/,o=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g,u=function(e,t,r,l){var c,u=r?t:t.replace(a,"");if(o.test(u))e.s=isNaN(u)?null:u<0?-1:1;else{if(!r&&(u=u.replace(i,function(e,t,r){return c="x"==(r=r.toLowerCase())?16:"b"==r?2:8,l&&l!=c?e:t}),l&&(c=l,u=u.replace(n,"$1").replace(s,"0.$1")),t!=u))return new _(u,c);if(_.DEBUG)throw Error(ew+"Not a"+(l?" base "+l:"")+" number: "+t);e.s=null}e.c=e.e=null},h.absoluteValue=h.abs=function(){var e=new _(this);return e.s<0&&(e.s=1),e},h.comparedTo=function(e,t){return e_(this,new _(e,t))},h.decimalPlaces=h.dp=function(e,t){var r,i,n;if(null!=e)return eT(e,0,1e9),null==t?t=f:eT(t,0,8),I(new _(this),e+this.e+1,t);if(!(r=this.c))return null;if(i=((n=r.length-1)-eC(this.e/14))*14,n=r[n])for(;n%10==0;n/=10,i--);return i<0&&(i=0),i},h.dividedBy=h.div=function(e,t){return l(this,new _(e,t),p,f)},h.dividedToIntegerBy=h.idiv=function(e,t){return l(this,new _(e,t),0,1)},h.exponentiatedBy=h.pow=function(e,t){var r,i,n,s,o,a,l,c,u,h=this;if((e=new _(e)).c&&!e.isInteger())throw Error(ew+"Exponent not an integer: "+O(e));if(null!=t&&(t=new _(t)),a=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return u=new _(Math.pow(+O(h),a?e.s*(2-eP(e)):+O(e))),t?u.mod(t):u;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new _(NaN);(i=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||a&&h.c[1]>=24e7:h.c[0]<8e13||a&&h.c[0]<=9999975e7)))return s=h.s<0&&eP(e)?-0:0,h.e>-1&&(s=1/s),new _(l?1/s:s);x&&(s=eb(x/14+2))}for(a?(r=new _(.5),l&&(e.s=1),c=eP(e)):c=(n=Math.abs(+O(e)))%2,u=new _(d);;){if(c){if(!(u=u.times(h)).c)break;s?u.c.length>s&&(u.c.length=s):i&&(u=u.mod(t))}if(n){if(0===(n=ev(n/2)))break;c=n%2}else if(I(e=e.times(r),e.e+1,1),e.e>14)c=eP(e);else{if(0==(n=+O(e)))break;c=n%2}h=h.times(h),s?h.c&&h.c.length>s&&(h.c.length=s):i&&(h=h.mod(t))}return i?u:(l&&(u=d.div(u)),t?u.mod(t):s?I(u,x,f,o):u)},h.integerValue=function(e){var t=new _(this);return null==e?e=f:eT(e,0,8),I(t,t.e+1,e)},h.isEqualTo=h.eq=function(e,t){return 0===e_(this,new _(e,t))},h.isFinite=function(){return!!this.c},h.isGreaterThan=h.gt=function(e,t){return e_(this,new _(e,t))>0},h.isGreaterThanOrEqualTo=h.gte=function(e,t){return 1===(t=e_(this,new _(e,t)))||0===t},h.isInteger=function(){return!!this.c&&eC(this.e/14)>this.c.length-2},h.isLessThan=h.lt=function(e,t){return 0>e_(this,new _(e,t))},h.isLessThanOrEqualTo=h.lte=function(e,t){return -1===(t=e_(this,new _(e,t)))||0===t},h.isNaN=function(){return!this.s},h.isNegative=function(){return this.s<0},h.isPositive=function(){return this.s>0},h.isZero=function(){return!!this.c&&0==this.c[0]},h.minus=function(e,t){var r,i,n,s,o=this.s;if(t=(e=new _(e,t)).s,!o||!t)return new _(NaN);if(o!=t)return e.s=-t,this.plus(e);var a=this.e/14,l=e.e/14,c=this.c,u=e.c;if(!a||!l){if(!c||!u)return c?(e.s=-t,e):new _(u?this:NaN);if(!c[0]||!u[0])return u[0]?(e.s=-t,e):new _(c[0]?this:3==f?-0:0)}if(a=eC(a),l=eC(l),c=c.slice(),o=a-l){for((s=o<0)?(o=-o,n=c):(l=a,n=u),n.reverse(),t=o;t--;n.push(0));n.reverse()}else for(i=(s=(o=c.length)<(t=u.length))?o:t,o=t=0;t<i;t++)if(c[t]!=u[t]){s=c[t]<u[t];break}if(s&&(n=c,c=u,u=n,e.s=-e.s),(t=(i=u.length)-(r=c.length))>0)for(;t--;c[r++]=0);for(t=1e14-1;i>o;){if(c[--i]<u[i]){for(r=i;r&&!c[--r];c[r]=t);--c[r],c[i]+=1e14}c[i]-=u[i]}for(;0==c[0];c.splice(0,1),--l);return c[0]?R(e,c,l):(e.s=3==f?-1:1,e.c=[e.e=0],e)},h.modulo=h.mod=function(e,t){var r,i;return(e=new _(e,t),this.c&&e.s&&(!e.c||e.c[0]))?e.c&&(!this.c||this.c[0])?(9==w?(i=e.s,e.s=1,r=l(this,e,0,3),e.s=i,r.s*=i):r=l(this,e,0,w),(e=this.minus(r.times(e))).c[0]||1!=w||(e.s=this.s),e):new _(this):new _(NaN)},h.multipliedBy=h.times=function(e,t){var r,i,n,s,o,a,l,c,u,h,d,p,f,g=this.c,m=(e=new _(e,t)).c;if(!g||!m||!g[0]||!m[0])return this.s&&e.s&&(!g||g[0]||m)&&(!m||m[0]||g)?(e.s*=this.s,g&&m?(e.c=[0],e.e=0):e.c=e.e=null):e.c=e.e=e.s=null,e;for(i=eC(this.e/14)+eC(e.e/14),e.s*=this.s,(l=g.length)<(h=m.length)&&(f=g,g=m,m=f,n=l,l=h,h=n),n=l+h,f=[];n--;f.push(0));for(n=h;--n>=0;){for(r=0,d=m[n]%1e7,p=m[n]/1e7|0,s=n+(o=l);s>n;)a=p*(c=g[--o]%1e7)+(u=g[o]/1e7|0)*d,r=((c=d*c+a%1e7*1e7+f[s]+r)/1e14|0)+(a/1e7|0)+p*u,f[s--]=c%1e14;f[s]=r}return r?++i:f.splice(0,1),R(e,f,i)},h.negated=function(){var e=new _(this);return e.s=-e.s||null,e},h.plus=function(e,t){var r,i=this.s;if(t=(e=new _(e,t)).s,!i||!t)return new _(NaN);if(i!=t)return e.s=-t,this.minus(e);var n=this.e/14,s=e.e/14,o=this.c,a=e.c;if(!n||!s){if(!o||!a)return new _(i/0);if(!o[0]||!a[0])return a[0]?e:new _(o[0]?this:0*i)}if(n=eC(n),s=eC(s),o=o.slice(),i=n-s){for(i>0?(s=n,r=a):(i=-i,r=o),r.reverse();i--;r.push(0));r.reverse()}for((i=o.length)-(t=a.length)<0&&(r=a,a=o,o=r,t=i),i=0;t;)i=(o[--t]=o[t]+a[t]+i)/1e14|0,o[t]=1e14===o[t]?0:o[t]%1e14;return i&&(o=[i].concat(o),++s),R(e,o,s)},h.precision=h.sd=function(e,t){var r,i,n;
4if(null!=e&&!!e!==e)return eT(e,1,1e9),null==t?t=f:eT(t,0,8),I(new _(this),e,t);if(!(r=this.c))return null;if(i=14*(n=r.length-1)+1,n=r[n]){for(;n%10==0;n/=10,i--);for(n=r[0];n>=10;n/=10,i++);}return e&&this.e+1>i&&(i=this.e+1),i},h.shiftedBy=function(e){return eT(e,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+e)},h.squareRoot=h.sqrt=function(){var e,t,r,i,n,s=this.c,o=this.s,a=this.e,c=p+4,u=new _("0.5");if(1!==o||!s||!s[0])return new _(!o||o<0&&(!s||s[0])?NaN:s?this:1/0);if(0==(o=Math.sqrt(+O(this)))||o==1/0?(((t=eE(s)).length+a)%2==0&&(t+="0"),o=Math.sqrt(+t),a=eC((a+1)/2)-(a<0||a%2),r=new _(t=o==1/0?"5e"+a:(t=o.toExponential()).slice(0,t.indexOf("e")+1)+a)):r=new _(o+""),r.c[0]){for((o=(a=r.e)+c)<3&&(o=0);;)if(n=r,r=u.times(n.plus(l(this,n,c,1))),eE(n.c).slice(0,o)===(t=eE(r.c)).slice(0,o)){if(r.e<a&&--o,"9999"!=(t=t.slice(o-3,o+1))&&(i||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(I(r,r.e+p+2,1),e=!r.times(r).eq(this));break}if(!i&&(I(n,n.e+p+2,0),n.times(n).eq(this))){r=n;break}c+=4,o+=4,i=1}}return I(r,r.e+p+1,f,e)},h.toExponential=function(e,t){return null!=e&&(eT(e,0,1e9),e++),T(this,e,t,1)},h.toFixed=function(e,t){return null!=e&&(eT(e,0,1e9),e=e+this.e+1),T(this,e,t)},h.toFormat=function(e,t,r){var i;if(null==r)null!=e&&t&&"object"==typeof t?(r=t,t=null):e&&"object"==typeof e?(r=e,e=t=null):r=S;else if("object"!=typeof r)throw Error(ew+"Argument not an object: "+r);if(i=this.toFixed(e,t),this.c){var n,s=i.split("."),o=+r.groupSize,a=+r.secondaryGroupSize,l=r.groupSeparator||"",c=s[0],u=s[1],h=this.s<0,d=h?c.slice(1):c,p=d.length;if(a&&(n=o,o=a,a=n,p-=n),o>0&&p>0){for(n=p%o||o,c=d.substr(0,n);n<p;n+=o)c+=l+d.substr(n,o);a>0&&(c+=l+d.slice(n)),h&&(c="-"+c)}i=u?c+(r.decimalSeparator||"")+((a=+r.fractionGroupSize)?u.replace(RegExp("\\d{"+a+"}\\B","g"),"$&"+(r.fractionGroupSeparator||"")):u):c}return(r.prefix||"")+i+(r.suffix||"")},h.toFraction=function(e){var t,r,i,n,s,o,a,c,u,h,p,g,m=this.c;if(null!=e&&(!(a=new _(e)).isInteger()&&(a.c||1!==a.s)||a.lt(d)))throw Error(ew+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+O(a));if(!m)return new _(this);for(t=new _(d),u=r=new _(d),i=c=new _(d),g=eE(m),s=t.e=g.length-this.e-1,t.c[0]=eS[(o=s%14)<0?14+o:o],e=!e||a.comparedTo(t)>0?s>0?t:u:a,o=b,b=1/0,a=new _(g),c.c[0]=0;h=l(a,t,0,1),1!=(n=r.plus(h.times(i))).comparedTo(e);)r=i,i=n,u=c.plus(h.times(n=u)),c=n,t=a.minus(h.times(n=t)),a=n;return n=l(e.minus(r),i,0,1),c=c.plus(n.times(u)),r=r.plus(n.times(i)),c.s=u.s=this.s,s*=2,p=1>l(u,i,s,f).minus(this).abs().comparedTo(l(c,r,s,f).minus(this).abs())?[u,i]:[c,r],b=o,p},h.toNumber=function(){return+O(this)},h.toPrecision=function(e,t){return null!=e&&eT(e,1,1e9),T(this,e,t,2)},h.toString=function(e){var t,r=this,i=r.s,n=r.e;return null===n?i?(t="Infinity",i<0&&(t="-"+t)):t="NaN":(null==e?t=n<=g||n>=m?eR(eE(r.c),n):eI(eE(r.c),n,"0"):10===e&&E?t=eI(eE((r=I(new _(r),p+n+1,f)).c),r.e,"0"):(eT(e,2,C.length,"Base"),t=c(eI(eE(r.c),n,"0"),10,e,i,!0)),i<0&&r.c[0]&&(t="-"+t)),t},h.valueOf=h.toJSON=function(){return O(this)},h._isBigNumber=!0,h[Symbol.toStringTag]="BigNumber",h[Symbol.for("nodejs.util.inspect.custom")]=h.valueOf,null!=t&&_.set(t),_}();let eA=24,eM="undefined"!=typeof globalThis&&globalThis.crypto&&"function"==typeof globalThis.crypto.getRandomValues?()=>{let e=new Uint32Array(1);return globalThis.crypto.getRandomValues(e),e[0]/0x100000000}:Math.random,ek=(e=4,t=eM)=>{let r="";for(;r.length<e;)r+=Math.floor(36*t()).toString(36);return r},eN=(e="")=>(function(e){let t=new eO(0);for(let r of e.values())t=t.multipliedBy(256).plus(r);return t})(em(new TextEncoder().encode(e))).toString(36).slice(1),eL=Array.from({length:26},(e,t)=>String.fromCharCode(t+97)),eD=({globalObj:e="undefined"!=typeof global?global:"undefined"!=typeof window?window:{},random:t=eM}={})=>{let r=Object.keys(e).toString();return eN(r.length?r+ek(32,t):ek(32,t)).substring(0,32)},eB=e=>()=>e++,eq=0x1c6b1f1f,eU=function(e){let t;return()=>(t||(t=e()),t())}(({random:e=eM,counter:t=eB(Math.floor(e()*eq)),length:r=eA,fingerprint:i=eD({random:e})}={})=>{if(r>32)throw Error(`Length must be between 2 and 32. Received: ${r}`);return function(){let n=eL[Math.floor(e()*eL.length)],s=Date.now().toString(36),o=t().toString(36),a=ek(r,e),l=`${s+a+o+i}`;return`${n+eN(l).substring(1,r)}`}});var eH=r(79339),ez=class{#er=new Set;#ei;#en;constructor(e={}){let{enabled:t=!0,maxSize:r=null}=e;this.#ei=t,this.#en=r}size(){return this.#er.size}async process(e){if(this.#ei)for(let{channel:t,message:r}of this.#er){if(!await e(t,r).catch(()=>!1))break;this.dequeue()}}enqueue(e,t){return!!this.#ei&&(this.#en&&this.#er.size>=this.#en&&this.dequeue(),this.#er.add({channel:e,message:t}),!0)}dequeue(){if(!this.#ei)return;let[e]=this.#er;if(e)return this.#er.delete(e),e.message}},eF=class{hash(e){return eH(e,{algorithm:"sha1",encoding:"base64"})}},ej=class{#er=new Map;#es;#ei;#en;constructor(e={}){let{enabled:t=!0,maxSize:r=null}=e;this.#ei=t,this.#en=r,this.#es=new eF}#eo(e){return this.#es.hash(e.payload)}size(){return this.#er.size}async process(e){if(this.#ei)for(let{channel:t,message:r}of this.#er.values()){if(!await e(t,r).catch(()=>!1))break;this.dequeue()}}enqueue(e,t){if(!this.#ei)return!1;this.#en&&this.#er.size>=this.#en&&this.dequeue();let r=this.#eo(t);return!this.#er.has(r)&&(this.#er.set(r,{channel:e,message:t}),!0)}dequeue(){if(!this.#ei)return;let{message:e}=this.#er.values().next().value;if(e)return this.#er.delete(this.#eo(e)),e}},e$=class{#ea;#er;constructor(e={}){let{enabled:t=!0,maxSize:r=null,removeDuplicates:i=!0}=e;if(this.#ea={enabled:t,maxSize:r,removeDuplicates:i},i){this.#er=new ej({enabled:t,maxSize:r});return}this.#er=new ez({enabled:t,maxSize:r})}getOptions(){return this.#ea}getInternalQueue(){return this.#er}size(){return this.#er.size()}async process(e){return this.#er.process(e)}enqueue(e,t){return this.#er.enqueue(e,t)}dequeue(){this.#er.dequeue()}},eK=class{#el;#ec;#eu;#eh;constructor(e,t){if(this.#el=e,this.#ec=eU(),this.#eu=new e$(t?.retryQueue),t?.retryQueue?.retryInterval){let e="number"==typeof t?.retryQueue?.retryInterval?t?.retryQueue?.retryInterval:W.milliseconds.parse(t?.retryQueue?.retryInterval);this.#eh=setInterval(()=>{this.processErrorRetryQueue()},e)}e.setId(this.#ec).onReconnect(()=>this.#ed())}getRetryQueue(){return this.#eu}processErrorRetryQueue(){return T(`start error retry queue processing with ${this.#eu.size()} messages`),this.#eu.process(async(e,t)=>await this.publish(e,t.payload))}async #ed(){T(`bus transport ${this.#el.constructor.name} reconnected`),await this.processErrorRetryQueue()}subscribe(e,t){return T(`subscribing to channel ${e}`),this.#el.subscribe(e,async e=>{T("received message %j from bus",e),t(e)})}async publish(e,t){try{return T('publishing message "%j" to channel "%s"',t,e),await this.#el.publish(e,t),!0}catch(r){if(T('error publishing message "%j" to channel "%s". Retrying later',t,e),!this.#eu.enqueue(e,{payload:t,busI
4d:this.#ec}))return!1;return T("added message %j to error retry queue",t),!1}}disconnect(){return this.#eh&&clearInterval(this.#eh),this.#el.disconnect()}unsubscribe(e){return this.#el.unsubscribe(e)}},eV=r(35978),eW=class extends x.WJ{static code="E_UNDEFINED_VALUE";constructor(e){super(`Cannot set undefined value in the cache, key: ${e}`)}},eQ={E_FACTORY_ERROR:class e extends x.WJ{static code="E_FACTORY_ERROR";static message="Factory has thrown an error";key;isBackgroundFactory;constructor(t,r,i=!1){super(e.message,{cause:r}),this.key=t,this.isBackgroundFactory=i}},E_FACTORY_SOFT_TIMEOUT:class e extends x.WJ{static code="E_FACTORY_SOFT_TIMEOUT";static message="Factory has timed out after waiting for soft timeout";key;constructor(t){super(e.message,{code:e.code}),this.key=t}},E_FACTORY_HARD_TIMEOUT:class e extends x.WJ{static code="E_FACTORY_HARD_TIMEOUT";static message="Factory has timed out after waiting for hard timeout";key;constructor(t){super(e.message,{code:e.code}),this.key=t}},E_UNDEFINED_VALUE:eW,E_L2_CACHE_ERROR:class e extends x.WJ{static code="E_L2_CACHE_ERROR";static message="An error occurred while interacting with the L2 cache";constructor(t){super(e.message,{cause:t})}}},eG={cleared:e=>({name:"cache:cleared",data:{store:e}}),deleted:(e,t)=>({name:"cache:deleted",data:{key:e,store:t}}),hit:(e,t,r,i="l1",n=!1)=>({name:"cache:hit",data:{key:e,value:t,store:r,layer:i,graced:n}}),miss:(e,t)=>({name:"cache:miss",data:{key:e,store:t}}),written:(e,t,r)=>({name:"cache:written",data:{key:e,value:t,store:r}}),expire:(e,t)=>({name:"cache:expire",data:{key:e,store:t}})};(0,w.V)({},{cacheOperation:()=>eX});var eX=S.tracingChannel("bentocache.cache.operation"),eJ=class{#et;#ep;#ef=Symbol("bentocache.skip");constructor(e,t){this.#ep=e,this.#et=t}#eg(e,t){this.#ep.logger.warn({cache:this.#ep.name,opId:e.options.id,key:e.key,err:t},"factory failed"),this.#et.release(e.key,e.lockReleaser);let r=new eQ.E_FACTORY_ERROR(e.key,t,e.isBackground);if(e.options.onFactoryError?.(r),!e.isBackground)throw r}async #em(e){e.isBackground??=!1;let t={operation:"factory",key:this.#ep.getFullKey(e.key),store:this.#ep.name},[r,i]=await _(async()=>eX.tracePromise(async()=>{let t=await e.factory({skip:()=>this.#ef,fail:e=>{throw Error(e??"Factory failed")},setTtl:t=>e.options.setLogicalTtl(t),setTags:t=>e.options.tags.push(...t),setOptions:t=>{t.ttl&&e.options.setLogicalTtl(t.ttl),e.options.skipBusNotify=t.skipBusNotify??!1,e.options.skipL2Write=t.skipL2Write??!1},gracedEntry:e.gracedValue?{value:e.gracedValue?.entry.getValue()}:void 0});return this.#ep.logger.info({cache:this.#ep.name,opId:e.options.id,key:e.key},"factory success"),t},t));if(this.#ef===r)return void this.#et.release(e.key,e.lockReleaser);if(i)return this.#eg(e,i);try{await this.#ep.set(e.key,r,e.options)}finally{this.#et.release(e.key,e.lockReleaser)}return r}async run(e,t,r,i,n){let s=!!r,o=i.factoryTimeout(s);if(o?this.#ep.logger.info({cache:this.#ep.name,opId:i.id,key:e},`running factory with ${o.type} timeout of ${o.duration}ms`):this.#ep.logger.info({cache:this.#ep.name,opId:i.id,key:e},"running factory"),i.shouldSwr(s))throw this.#em({key:e,factory:t,options:i,lockReleaser:n,isBackground:!0}),new eQ.E_FACTORY_SOFT_TIMEOUT(e);let a=this.#em({key:e,factory:t,options:i,lockReleaser:n,gracedValue:r});return await function(e,t){let r,i,{milliseconds:n,fallback:s,message:o,customTimers:a={setTimeout,clearTimeout},signal:l}=t,c=new Promise((t,c)=>{if("number"!=typeof n||1!==Math.sign(n))throw TypeError(`Expected \`milliseconds\` to be a positive number, got \`${n}\``);if(l?.aborted)return void c(E(l));if(l&&(i=()=>{c(E(l))},l.addEventListener("abort",i,{once:!0})),e.then(t,c),n===1/0)return;let u=new C;r=a.setTimeout.call(void 0,()=>{if(s){try{t(s())}catch(e){c(e)}return}"function"==typeof e.cancel&&e.cancel(),!1===o?t():o instanceof Error?c(o):(u.message=o??`Promise timed out after ${n} milliseconds`,c(u))},n)}).finally(()=>{c.clear(),i&&l&&l.removeEventListener("abort",i)});return c.clear=()=>{a.clearTimeout.call(void 0,r),r=void 0},c}(a,{milliseconds:o?.duration??1/0,fallback:async()=>{throw this.#ep.logger.warn({cache:this.#ep.name,opId:i.id,key:e},`factory timed out after ${o?.duration}ms`),new o.exception(e)}})}},eY=class{constructor(e){this.stack=e,this.#ey=new eJ(this.stack,this.#et)}#et=new h;#ey;get logger(){return this.stack.logger}#eb(e){return this.stack.emitter.emit(e.name,e.data)}#ev(e,t,r){return r&&(r.hit=!0,r.tier="l1",r.graced=t.isGraced),this.#eb(eG.hit(e,t.entry.getValue(),this.stack.name,"l1",t.isGraced)),t.entry.getValue()}async #ew(e,t,r,i){return i&&(i.hit=!0,i.tier="l2"),this.stack.l1?.set(e,t.entry.serialize(),r),this.#eb(eG.hit(e,t.entry.getValue(),this.stack.name,"l2")),t.entry.getValue()}#ex(e,t,r){return this.#et.getOrCreateForKey(e,r.getApplicableLockTimeout(t)).acquire()}#eS(e,t,r,i,n){if(r.isGraceEnabled()&&t)return this.#ev(e,t,n);throw i}async #eC(e,t,r,i,n){return i.grace&&i.graceBackoff&&(this.logger.trace({key:e,cache:this.stack.name,opId:i.id},"apply fallback duration"),this.stack.l1?.set(e,t.entry.applyBackoff(i.graceBackoff).serialize(),i)),n&&(n.hit=!0,n.tier=r,n.graced=!0),this.logger.trace({key:e,cache:this.stack.name,opId:i.id},"returns stale value"),this.#eb(eG.hit(e,t.entry.getValue(),this.stack.name,r,!0)),t.entry.getValue()}async #eE(e,t,r,i,n){let s,o;try{this.logger.trace({key:e,cache:this.stack.name,opId:r.id},"acquiring lock..."),s=await this.#ex(e,!!i,r)}catch(t){return this.logger.trace({key:e,cache:this.stack.name,opId:r.id},"lock failed"),this.#eS(e,i,r,t,n)}if(this.logger.trace({key:e,cache:this.stack.name,opId:r.id},"acquired lock"),!r.forceFresh){if(i=this.stack.l1?.get(e,r),await this.stack.isEntryValid(i))return this.#et.release(e,s),this.#ev(e,i,n);if(o=await this.stack.l2?.get(e,r),await this.stack.isEntryValid(o))return this.#et.release(e,s),this.#ew(e,o,r,n)}try{let a=i||o,l=await this.#ey.run(e,t,a,r,s);return n&&(n.hit=!1),this.#eb(eG.miss(e,this.stack.name)),l}
4catch(a){let t=o??i;if(a instanceof eQ.E_FACTORY_SOFT_TIMEOUT&&t)return this.#eS(e,t,r,a,n);if(this.logger.trace({key:e,cache:this.stack.name,opId:r.id,err:a},"factory error"),t&&r.isGraceEnabled())return this.#et.release(e,s),this.#eC(e,t,t===i?"l1":"l2",r,n);throw this.#et.release(e,s),a}}handle(e,t,r){let i={operation:"getOrSet",key:this.stack.getFullKey(e),store:this.stack.name};return eX.tracePromise(async()=>{if(r.forceFresh)return this.#eE(e,t,r,void 0,i);let n=this.stack.l1?.get(e,r);return await this.stack.isEntryValid(n)?this.#ev(e,n,i):this.#eE(e,t,r,n,i)},i)}},eZ=class{constructor(e){this.stack=e,this.#ey=new eJ(this.stack,this.#et)}#et=new h;#ey;get logger(){return this.stack.logger}#eb(e){return this.stack.emitter.emit(e.name,e.data)}async #ew(e,t,r,i){return i&&(i.hit=!0,i.tier="l2"),this.logger.logL2Hit({cacheName:this.stack.name,key:e,options:r}),this.#eb(eG.hit(e,t.entry.getValue(),this.stack.name,"l2")),t.entry.getValue()}#ex(e,t,r){return this.#et.getOrCreateForKey(e,r.getApplicableLockTimeout(t)).acquire()}#eS(e,t,r,i,n){if(r.isGraceEnabled()&&t)return n&&(n.hit=!0,n.tier="l2",n.graced=t.isGraced),this.#eb(eG.hit(e,t.entry.getValue(),this.stack.name,"l2",t.isGraced)),t.entry.getValue();throw i}async #eC(e,t,r,i){return r.grace&&r.graceBackoff&&(this.logger.trace({key:e,cache:this.stack.name,opId:r.id},"apply fallback duration"),this.stack.l2?.set(e,t.entry.applyBackoff(r.graceBackoff).serialize(),r)),i&&(i.hit=!0,i.tier="l2",i.graced=!0),this.logger.trace({key:e,cache:this.stack.name,opId:r.id},"returns stale value"),this.#eb(eG.hit(e,t.entry.getValue(),this.stack.name,"l2",!0)),t.entry.getValue()}async #e_(e,t,r,i){let n,s;if(!r.forceFresh&&(n=await this.stack.l2?.get(e,r),await this.stack.isEntryValid(n)))return this.#ew(e,n,r,i);try{s=await this.#ex(e,!!n,r)}catch(t){return this.#eS(e,n,r,t,i)}if(!r.forceFresh&&(n=await this.stack.l2?.get(e,r),await this.stack.isEntryValid(n)))return this.#et.release(e,s),this.#ew(e,n,r,i);try{let o=await this.#ey.run(e,t,n,r,s);return i&&(i.hit=!1),this.#eb(eG.miss(e,this.stack.name)),o}catch(o){let t=n;if(o instanceof eQ.E_FACTORY_SOFT_TIMEOUT&&t)return this.#eS(e,t,r,o,i);if(this.logger.trace({key:e,cache:this.stack.name,opId:r.id,err:o},"factory error"),t&&r.isGraceEnabled())return this.#et.release(e,s),this.#eC(e,t,r,i);throw this.#et.release(e,s),o}}handle(e,t,r){let i={operation:"getOrSet",key:this.stack.getFullKey(e),store:this.stack.name};return eX.tracePromise(()=>this.#e_(e,t,r,i),i)}},e0=class{constructor(e){this.stack=e,this.#eT=new eY(this.stack),this.#eP=new eZ(this.stack)}#eP;#eT;handle(e,t,r){return this.stack.l2&&!this.stack.l1?this.#eP.handle(e,t,r):this.#eT.handle(e,t,r)}},e1=class e{name;#eR;#ep;#ea;constructor(e,t){this.name=e,this.#ep=t,this.#ea=t.options,this.#eR=new e0(this.#ep),this.#ep.setTagSystemGetSetHandler(this.#eR)}#eI(e){return i.function(e)?e():e??void 0}namespace(t){return new e(this.name,this.#ep.namespace(t))}async get(e){let t=e.key,r=this.#eI(e.defaultValue),i=this.#ep.defaultOptions.cloneWith(e);this.#ea.logger.logMethod({method:"get",key:t,options:i,cacheName:this.name});let n={operation:"get",key:this.#ep.getFullKey(t),store:this.name};return eX.tracePromise(async()=>{let e=this.#ep.l1?.get(t,i);if(await this.#ep.isEntryValid(e))return this.#ep.emit(eG.hit(t,e.entry.getValue(),this.name)),this.#ea.logger.logL1Hit({cacheName:this.name,key:t,options:i}),n.hit=!0,n.tier="l1",n.graced=!1,e.entry.getValue();let s=await this.#ep.l2?.get(t,i);return await this.#ep.isEntryValid(s)?(this.#ep.l1?.set(t,s.entry.serialize(),i),this.#ep.emit(eG.hit(t,s.entry.getValue(),this.name)),this.#ea.logger.logL2Hit({cacheName:this.name,key:t,options:i}),n.hit=!0,n.tier="l2",n.graced=!1,s.entry.getValue()):s&&i.isGraceEnabled()?(this.#ep.l1?.set(t,s.entry.serialize(),i),this.#ep.emit(eG.hit(t,s.entry.serialize(),this.name,"l2",!0)),this.#ea.logger.logL2Hit({cacheName:this.name,key:t,options:i,graced:!0}),n.hit=!0,n.tier="l2",n.graced=!0,s.entry.getValue()):e&&i.isGraceEnabled()?(this.#ep.emit(eG.hit(t,e.entry.serialize(),this.name,"l2",!0)),this.#ea.logger.logL1Hit({cacheName:this.name,key:t,options:i,graced:!0}),n.hit=!0,n.tier="l1",n.graced=!0,e.entry.getValue()):(this.#ep.emit(eG.miss(t,this.name)),this.#ea.logger.debug({key:t,cacheName:this.name}
4,"cache miss. using default value"),n.hit=!1,this.#eI(r))},n)}set(e){let t=this.#ep.defaultOptions.cloneWith(e);return this.#ea.logger.logMethod({method:"set",options:t,key:e.key,cacheName:this.name}),this.#ep.set(e.key,e.value,t)}setForever(e){return this.set({ttl:null,...e})}getOrSet(e){let t=this.#ep.defaultOptions.cloneWith(e);return this.#ea.logger.logMethod({method:"getOrSet",key:e.key,cacheName:this.name,options:t}),this.#eR.handle(e.key,e.factory,t)}getOrSetForever(e){let t=this.#ep.defaultOptions.cloneWith({ttl:null,...e});return this.#eR.handle(e.key,e.factory,t)}async has(e){let t=e.key,r=this.#ep.defaultOptions.cloneWith(e);this.#ea.logger.logMethod({method:"has",key:t,cacheName:this.name,options:r});let i=this.#ep.l1?.get(t,r);if(await this.#ep.isEntryValid(i))return!0;let n=await this.#ep.l2?.get(t,r);return!!await this.#ep.isEntryValid(n)}async missing(e){return!await this.has(e)}async pull(e){let t=await this.get({key:e});return await this.delete({key:e}),t}async delete(e){let t=e.key,r=this.#ep.defaultOptions.cloneWith(e);this.#ea.logger.logMethod({method:"delete",key:t,cacheName:this.name,options:r});let i={operation:"delete",key:this.#ep.getFullKey(t),store:this.name};return eX.tracePromise(async()=>(this.#ep.l1?.delete(t,r),await this.#ep.l2?.delete(t,r),this.#ep.emit(eG.deleted(t,this.name)),await this.#ep.publish({type:d.Delete,keys:[t]}),!0),i)}async deleteByTag(e){let t=e.tags,r=this.#ep.defaultOptions.cloneWith(e);return this.#ea.logger.logMethod({method:"deleteByTag",cacheName:this.name,tags:t,options:r}),await this.#ep.createTagInvalidations(t)}async deleteMany(e){let t=e.keys,r=this.#ep.defaultOptions.cloneWith(e);this.#ea.logger.logMethod({method:"deleteMany",key:t,cacheName:this.name,options:r});let i={operation:"deleteMany",keys:this.#ep.getFullKeys(t),store:this.name};return eX.tracePromise(async()=>{for(let e of(this.#ep.l1?.deleteMany(t,r),await this.#ep.l2?.deleteMany(t,r),t))this.#ep.emit(eG.deleted(e,this.name));return await this.#ep.publish({type:d.Delete,keys:t}),!0},i)}expire(e){let t=e.key,r=this.#ep.defaultOptions.cloneWith(e);return this.#ea.logger.logMethod({method:"expire",cacheName:this.name,key:t,options:r}),this.#ep.expire(t,r)}async clear(e){let t=this.#ep.defaultOptions.cloneWith(e);this.#ea.logger.logMethod({method:"clear",cacheName:this.name,options:t});let r={operation:"clear",store:this.name};return eX.tracePromise(async()=>{await Promise.all([this.#ep.l1?.clear(),this.#ep.l2?.clear(t),this.#ep.publish({type:d.Clear,keys:[]})]),this.#ep.emit(eG.cleared(this.name))},r)}prune(){return this.#ep.l2?.prune()??Promise.resolve()}async disconnect(){await Promise.all([this.#ep.l1?.disconnect(),this.#ep.l2?.disconnect(),this.#ep.bus?.disconnect()])}},e2={messagePublished:e=>({name:"bus:message:published",data:{message:{keys:e.keys,type:e.type}}}),messageReceived:e=>({name:"bus:message:received",data:{message:{keys:e.keys,type:e.type}}})},e3=class{#eO;#eA;#eM;#ek=new Map;#eN="bentocache.notifications";#eL;constructor(e,t,r,i,n={},s){this.#eM=i,this.#eA=r.child({context:"bentocache.bus"}),this.#eL=s,this.#eO=new eK(t,{retryQueue:{...n.retryQueue,removeDuplicates:!0,retryInterval:n.retryQueue?.retryInterval??2e3}}),e&&(this.#eN+=`:${e}`),this.#eD(()=>{this.#eO.subscribe(this.#eN,this.#eB.bind(this))}),this.#eA.trace({channel:this.#eN},"bus subscribed to channel")}#eD(e){return this.#eL?this.#eL(e):e()}manageCache(e,t){this.#eA.trace({namespace:e,channel:this.#eN},"added namespaced cache"),this.#ek?.set(e||"__default__",t)}async #eB(e){if(e.namespace=e.namespace||"__default__",!e.namespace||!this.#ek.has(e.namespace))return;this.#eA.trace({...e,channel:this.#eN},"received message from bus"),this.#eM.emit("bus:message:received",e2.messageReceived(e).data);let t=this.#ek.get(e.namespace);if(e.type===d.Delete)for(let r of e.keys)t?.delete(r);if(e.type===d.Set)for(let r of e.keys)t?.logicallyExpire(r);if(e.type===d.Expire)for(let r of e.keys)t?.logicallyExpire(r);e.type===d.Clear&&t?.clear()}async publish(e){return await this.#eD(()=>this.#eO.publish(this.#eN,e))?(this.#eM.emit("bus:message:published",e2.messagePublished(e).data),!0):(this.#eA.error("failed to publish message to bus"),!1)}async disconnect(){await this.#eD(()=>this.#eO.disconnect())}},e6=function(e){e=e||16;let t="",r=0;return function(){if(!t||256===r){for(t="",r=(1+e)/2|0;r--;)t+=b[256*Math.random()|0];t=t.substring(r=0,e-2)}return t+b[r++]}}(12);function e5(e={},t={}){let r={...t,...e},n=!1===r.grace?0:m(r.grace,null)??0,s=m(r.graceBackoff,null)??0,o=m(r.ttl),a=n>0?n:o,l=m(r.timeout,null),c=m(r.hardTimeout,null),u=m(r.lockTimeout,null),h=r.forceFresh??!1,d={id:e6(),grace:n,graceBackoff:s,getLogicalTtl:()=>o,getPhysicalTtl:()=>a,isGraceEnabled:()=>n>0,timeout:l,hardTimeout:c,tags:r.tags??[],skipL2Write:r.skipL2Write??!1,skipBusNotify:r.skipBusNotify??!1,lockTimeout:u,onFactoryError:r.onFactoryError??t.onFactoryError,suppressL2Errors:r.suppressL2Errors,forceFresh:h,cloneWith:e=>e?e5(e,r):d,setLogicalTtl:e=>(r.ttl=e,o=m(r.ttl),a=d.isGraceEnabled()?n:o,d),logicalTtlFromNow(){if(o)return Date.now()+o},physicalTtlFromNow(){if(a)return Date.now()+a},factoryTimeout:e=>e&&d.isGraceEnabled()&&i.number(l)?{type:"soft",duration:l,exception:eQ.E_FACTORY_SOFT_TIMEOUT}:c?{type:"hard",duration:c,exception:eQ.E_FACTORY_HARD_TIMEOUT}:void 0,shouldSwr:e=>d.isGraceEnabled()&&0===l&&e,getApplicableLockTimeout:e=>d.shouldSwr(e)?0:u||(e&&d.isGraceEnabled()&&"number"==typeof l?l:void 0)};return d}var e4=class{constructor(e){this.stack=e}#eR;#eq="___bc:t:";#eU=e5({});#eH=e5({ttl:"10d",grace:"10d"});setGetSetHandler(e){this.#eR=e}getTagCacheKey(e){return this.#eq+e}isTagKey(e){return e.startsWith(this.#eq)}#ez(e){let t=e.gracedEntry?.value??0;return 0===t&&e.setOptions({skipBusNotify:!0,skipL2Write:!0}),t}async isTagInvalidated(e){if(!e)return;if(this.isTagKey(e.getKey()))return!1;let t=e.getTags();if(!t.length)return!1;for(let r of t){let t=await this.#eR.handle(this.getTagCacheKey(r),this.#ez,this.#eH.cloneWith({}));if(e.getCreatedAt()<=t)return await this.stack.expire(e.getKey(),this.#eU),!0}}async createTagInvalidations(e){let t=Date.now();for(let r of new Set(e)){let e=this.getTagCacheKey(r);await this.stack.set(e,t,this.#eH)}return!0}},e8=class e{#eF;#ej;#e$;#eK;#eV;#eW;constructor(e,t,r){this.#eF=e,this.#ej=t.value,this.#e$=t.tags??[],this.#eK=t.logicalExpiration,this.#eW=r,this.#eV=t.createdAt}getValue(){return this.#ej}getKey(){return this.#eF}getCreatedAt(){return this.#eV}getLogicalExpiration(){return this.#eK}getTags(){return this.#e$}isLogicallyExpired(){return Date.now()>=this.#eK}static fromDriver(t,r,i){return i||"string"==typeof r?new e(t,i.deserialize(r)??r,i):new e(t,r,i)}
4applyBackoff(e){return this.#eK+=e,this}expire(){return this.#eK=Date.now()-100,this}serialize(){let e={value:this.#ej,createdAt:this.#eV,logicalExpiration:this.#eK,...this.#e$.length>0&&{tags:this.#e$}};return this.#eW?this.#eW.serialize(e):e}},e7=class{#eQ;#eA;#eW;constructor(e,t,r){this.#eQ=e,this.#eW=r,this.#eA=t.child({layer:"l1"})}get(e,t){this.#eA.trace({key:e,opId:t.id},"try getting from l1 cache");let r=this.#eQ.get(e);if(void 0===r)return void this.#eA.debug({key:e,opId:t.id},"cache miss");let i=e8.fromDriver(e,r,this.#eW),n=i.isLogicallyExpired();return n?this.#eA.debug({key:e,opId:t.id},"cache hit (graced)"):this.#eA.debug({key:e,opId:t.id},"cache hit"),{entry:i,isGraced:n}}set(e,t,r){let i=r.getPhysicalTtl();if(!r.isGraceEnabled()&&i&&i<=0)return this.delete(e,r);this.#eA.debug({key:e,opId:r.id},"saving item"),this.#eQ.set(e,t,i)}delete(e,t){return this.#eA.debug({key:e,opId:t?.id},"deleting item"),this.#eQ.delete(e)}deleteMany(e,t){this.#eA.debug({keys:e,options:t,opId:t.id},"deleting items"),this.#eQ.deleteMany(e)}logicallyExpire(e,t){this.#eA.debug({key:e,opId:t?.id},"logically expiring item");let r=this.#eQ.get(e);if(void 0===r)return;let i=e8.fromDriver(e,r,this.#eW).expire().serialize();return this.#eQ.set(e,i,this.#eQ.getRemainingTtl(e))}namespace(e){return this.#eQ.namespace(e)}clear(){return this.#eQ.clear()}disconnect(){return this.#eQ.disconnect()}},e9={Closed:0,Open:1},te=class{#eG=e9.Closed;#eX=null;#eJ;constructor(e){if(this.#eJ=e.breakDuration??0,this.#eJ<0)throw new x.p("breakDuration must be a positive number");this.#eG=e9.Closed}#eY(){this.#eX&&this.#eX<Date.now()&&this.close()}isOpen(){return this.#eY(),this.#eG===e9.Open}isClosed(){return this.#eY(),this.#eG===e9.Closed}open(){this.#eG!==e9.Open&&(this.#eG=e9.Open,this.#eX=Date.now()+this.#eJ)}close(){this.#eG=e9.Closed,this.#eX=null}},tt=class{#eQ;#eA;#eZ;#e0;#ea;
4constructor(e,t,r,i){this.#eQ=e,this.#ea=i,this.#eZ=r,this.#e0=i.l2CircuitBreakerDuration?new te({breakDuration:i.l2CircuitBreakerDuration}):void 0,this.#eA=t.child({layer:"l2"})}#eD(e){return this.#ea.internalOperationWrapper?this.#ea.internalOperationWrapper(e):e()}async #e1(e,t,r,n){if(this.#e0?.isOpen())return this.#eA.error({opId:t.id},"circuit breaker is open. ignoring operation"),r;try{return await this.#eD(n)}catch(n){if(this.#eA.error({err:n,opId:t.id},`(${e}) failed on remote cache`),this.#e0?.open(),i.undefined(t.suppressL2Errors)&&this.#eZ||t.suppressL2Errors)return r;throw new eQ.E_L2_CACHE_ERROR(n)}}async get(e,t){return await this.#e1("get",t,void 0,async()=>{let r=await this.#eQ.get(e);if(void 0===r)return;let i=e8.fromDriver(e,r,this.#ea.serializer),n=i.isLogicallyExpired();return n?this.#eA.debug({key:e,opId:t.id},"cache hit (graced)"):this.#eA.debug({key:e,opId:t.id},"cache hit"),{entry:i,isGraced:n}})}async set(e,t,r){return await this.#e1("set",r,!1,async()=>(this.#eA.debug({key:e,opId:r.id},"saving item"),await this.#eQ.set(e,t,r.getPhysicalTtl()),!0))}async delete(e,t){return await this.#e1("delete",t,!1,async()=>(this.#eA.debug({key:e,opId:t.id},"deleting item"),await this.#eQ.delete(e)))}async deleteMany(e,t){return await this.#e1("deleteMany",t,!1,async()=>(this.#eA.debug({keys:e,opId:t.id},"deleting items"),await this.#eQ.deleteMany(e)))}async logicallyExpire(e,t){return await this.#e1("logicallyExpire",t,!1,async()=>{this.#eA.debug({key:e,opId:t.id},"logically expiring item");let r=await this.#eQ.get(e);if(void 0===r)return;let i=e8.fromDriver(e,r,this.#ea.serializer).expire().serialize();return await this.#eQ.set(e,i,t.getPhysicalTtl())})}namespace(e){return this.#eQ.namespace(e)}async clear(e){return await this.#e1("clear",e,!1,async()=>await this.#eQ.clear())}prune(){return this.#eQ.prune?.()??Promise.resolve()}disconnect(){return this.#eQ.disconnect()}}
4,tr=class e extends v.o{constructor(e,t,r,i){super(t),this.name=e,this.options=t,this.logger=t.logger.child({cache:this.name}),r.l1Driver&&(this.l1=new e7(r.l1Driver,this.logger,this.options.serializeL1?this.options.serializer:void 0)),r.l2Driver&&(this.l2=new tt(r.l2Driver,this.logger,!!this.l1,this.options)),this.bus=i||this.#e2(r.busDriver,r.busOptions),this.l1&&this.bus?.manageCache(this.prefix,this.l1),this.#e3=new e4(this),this.defaultOptions=e5(this.options)}l1;l2;bus;defaultOptions;logger;#e6;#e5;#e3;#e4=new Map;get emitter(){return this.options.emitter}#e2(e,t){if(e)return this.#e6=e,this.#e5={retryQueue:{enabled:!0,maxSize:void 0},...t},new e3(this.name,this.#e6,this.logger,this.emitter,this.#e5,this.options.internalOperationWrapper)}setTagSystemGetSetHandler(e){this.#e3.setGetSetHandler(e)}namespace(t){return this.#e4.has(t)||this.#e4.set(t,new e(this.name,this.options.cloneWith({prefix:this.createNamespacePrefix(t)}),{l1Driver:this.l1?.namespace(t),l2Driver:this.l2?.namespace(t)},this.bus)),this.#e4.get(t)}async publish(e,t){if(!t?.skipBusNotify)return this.bus?.publish({...e,namespace:this.prefix})}emit(e){return this.emitter.emit(e.name,e.data)}getFullKey(e){return this.getItemKey(e)}getFullKeys(e){return e.map(e=>this.getItemKey(e))}async set(e,t,r){if(i.undefined(t))throw new eW(e);let n={operation:"set",key:this.getFullKey(e),store:this.name};return eX.tracePromise(async()=>{let i={value:t,logicalExpiration:r.logicalTtlFromNow(),tags:r.tags,createdAt:Date.now()},n=this.options.serializeL1?this.options.serializer.serialize(i):i;this.l1?.set(e,n,r);let s=!1;if(this.l2&&!0!==r.skipL2Write){let t=this.options.serializeL1?n:this.options.serializer.serialize(i);s=await this.l2?.set(e,t,r)}return(this.l2&&s||!this.l2)&&await this.publish({type:d.Set,keys:[e]},r),this.emit(eG.written(e,t,this.name)),!0},n)}async expire(e,t){let r={operation:"expire",key:this.getFullKey(e),store:this.name};return eX.tracePromise(async()=>(this.l1?.logicallyExpire(e,t),await this.l2?.logicallyExpire(e,t),await this.publish({type:d.Expire,keys:[e]}),this.emit(eG.expire(e,this.name)),!0),r)}isEntryValid(e){return!!e&&e?.isGraced!==!0&&(0===e.entry.getTags().length||this.#e3.isTagInvalidated(e.entry).then(e=>!e))}async createTagInvalidations(e){return this.#e3.createTagInvalidations(e)}},ti=class e{internalLogger;constructor(e){this.internalLogger=e}child(t){return new e(this.internalLogger.child(t))}trace(e,t){this.internalLogger.trace(e,t)}debug(e,t){this.internalLogger.debug(e,t)}warn(e,t){this.internalLogger.warn(e,t)}error(e,t){this.internalLogger.error(e,t)}fatal(e,t){this.internalLogger.fatal(e,t)}info(e,t){this.internalLogger.info(e,t)}logMethod(e){this.internalLogger.debug({cacheName:e.cacheName,opId:e.options.id,key:e.key,tags:e.tags},`'${e.method}' method called`)}logL1Hit(e){this.internalLogger.debug({cacheName:e.cacheName,opId:e.options.id,key:e.key,graced:e.graced},"memory hit")}logL2Hit(e){this.internalLogger.debug({cacheName:e.cacheName,opId:e.options.id,key:e.key,graced:e.graced},"remote hit")}},tn=new class{serialize(e){return JSON.stringify(e)}deserialize(e){return JSON.parse(e)}},ts=class e{#ea;ttl=g.parse("30m");prefix="bentocache";grace=!1;graceBackoff=g.parse("10s");suppressL2Errors;timeout=0;hardTimeout=null;logger;emitter=new eV;serializer;lockTimeout=null;l2CircuitBreakerDuration;serializeL1=!0;onFactoryError;internalOperationWrapper;constructor(e){this.#ea={...this,...e},this.prefix=this.#ea.prefix,this.ttl=this.#ea.ttl,this.timeout=this.#ea.timeout??0,this.hardTimeout=this.#ea.hardTimeout,this.suppressL2Errors=this.#ea.suppressL2Errors,this.lockTimeout=this.#ea.lockTimeout,this.grace=this.#ea.grace,this.graceBackoff=this.#ea.graceBackoff,this.emitter=this.#ea.emitter,this.serializer=this.#ea.serializer??tn,this.l2CircuitBreakerDuration=m(this.#ea.l2CircuitBreakerDuration,null),this.logger=new ti(this.#ea.logger??function e(){return{trace:()=>{},debug:()=>{},info:()=>{},warn:()=>{},error:()=>{},fatal:()=>{},child:()=>e()}}()),this.onFactoryError=this.#ea.onFactoryError,this.internalOperationWrapper=this.#ea.internalOperationWrapper}serializeL1Cache(e=!0){return this.serializeL1=e,this}cloneWith(t){return new e({...this.#ea,...t})}},to=class{#e8;#e7;#e9=new Map;#ea;constructor(e){this.#e7=e.stores,this.#e8=e.default,this.#ea=new ts(e),this.#ea.logger.trace("bentocache initialized"),e.plugins&&e.plugins.forEach(e
4=>e.register(this))}#te(e,t){let r=t.entry,i=this.#ea.cloneWith(r.options).serializeL1Cache(r.l1?.options.serialize??!0),n=new tr(e,i,{l1Driver:r.l1?.factory({prefix:i.prefix,logger:i.logger,...r.l1.options}),l2Driver:r.l2?.factory({prefix:i.prefix,logger:i.logger,...r.l2.options}),busDriver:r.bus?.factory(r.bus?.options),busOptions:r.bus?.options});return new e1(e,n)}get defaultStoreName(){return this.#e8}use(e){let t=e||this.#e8;if(!t)throw Error("No cache driver selected");if(this.#e9.has(t))return this.#e9.get(t);let r=this.#te(t,this.#e7[t]);return this.#e9.set(t,r),r}on(e,t){return this.#ea.emitter.on(e,t),this}once(e,t){return this.#ea.emitter.once(e,t),this}off(e,t){return this.#ea.emitter.off(e,t),this}namespace(e){return this.use().namespace(e)}async get(e){return this.use().get(e)}async set(e){return this.use().set(e)}async setForever(e){return this.use().setForever(e)}async getOrSet(e){return this.use().getOrSet(e)}getOrSetForever(e){return this.use().getOrSetForever(e)}async has(e){return this.use().has(e)}async missing(e){return this.use().missing(e)}async pull(e){return this.use().pull(e)}async delete(e){return this.use().delete(e)}async deleteMany(e){return this.use().deleteMany(e)}async deleteByTag(e){return this.use().deleteByTag(e)}async expire(e){return this.use().expire(e)}async clear(e){return this.use().clear(e)}prune(){return this.use().prune?.()??Promise.resolve()}async clearAll(e){await Promise.all(Object.keys(this.#e7).map(t=>this.use(t).clear(e)))}async disconnect(){return this.use().disconnect()}async disconnectAll(){await Promise.all(Object.keys(this.#e7).map(e=>this.use(e).disconnect()))}};function ta(e){return new tl(e)}var tl=class{#tt={};#tr;#ti;#eO;constructor(e={}){this.#tt=e}useL1Layer(e){return this.#tr=e,this}useL2Layer(e){return this.#ti=e,this}useBus(e){return this.#eO=e,this}get entry(){return{options:this.#tt,l1:this.#tr,l2:this.#ti,bus:this.#eO}}}},73035:(e,t,r)=>{"use strict";let i;function n(e){let t="";for(let r=0;r<e.length;r++)t+=String.fromCharCode(e[r]);return btoa(t)}function s(e){let t=atob(e),r=new Uint8Array(t.length);for(let e=0;e<t.length;e++)r[e]=t.charCodeAt(e);return r}r.d(t,{Nl:()=>L,rH:()=>B,uc:()=>A,rl:()=>u,h6:()=>O});let o=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,a=/^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/i;function l(e,t){let r=e.parsedHeaders;if("HEAD"===e.request.method)return{...r,body:e.parsedBody};let i=t&&t.bodyMapper,n=!!i?.nullable,s=i?.type.name;if("Stream"===s)return{...r,blobBody:e.blobBody,readableStreamBody:e.readableStreamBody};let o="Composite"===s&&i.type.modelProperties||{},a=Object.keys(o).some(e=>""===o[e].serializedName);if("Sequence"===s||a){let t=e.parsedBody??[];for(let r of Object.keys(o))o[r].serializedName&&(t[r]=e.parsedBody?.[r]);if(r)for(let e of Object.keys(r))t[e]=r[e];return!n||e.parsedBody||r||0!==Object.getOwnPropertyNames(o).length?t:null}var l,c={body:e.parsedBody,headers:r,hasNullableType:n,shouldWrapBody:(l=e.parsedBody,"Composite"!==s&&"Dictionary"!==s&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||s?.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i)!==null||null==l))};let u={...c.headers,...c.body};return c.hasNullableType&&0===Object.getOwnPropertyNames(u).length?c.shouldWrapBody?{body:null}:null:c.shouldWrapBody?{...c.headers,body:c.body}:u}class c{modelMappers;isXML;constructor(e={},t=!1){this.modelMappers=e,this.isXML=t}validateConstraints(e,t,r){let i=(e,i)=>{throw Error(`"${r}" with value "${t}" should satisfy the constraint "${e}": ${i}.`)};if(e.constraints&&null!=t){let{ExclusiveMaximum:r,ExclusiveMinimum:n,InclusiveMaximum:s,InclusiveMinimum:o,MaxItems:a,MaxLength:l,MinItems:c,MinLength:u,MultipleOf:h,Pattern:d,UniqueItems:p}=e.constraints;if(void 0!==r&&t>=r&&i("ExclusiveMaximum",r),void 0!==n&&t<=n&&i("ExclusiveMinimum",n),void 0!==s&&t>s&&i("InclusiveMaximum",s),void 0!==o&&t<o&&i("InclusiveMinimum",o),void 0!==a&&t.length>a&&i("MaxItems",a),void 0!==l&&t.length>l&&i("MaxLength",l),void 0!==c&&t.length<c&&i("MinItems",c),void 0!==u&&t.length<u&&i("MinLength",u),void 0!==h&&t%h!=0&&i("MultipleOf",h),d){let e="string"==typeof d?new RegExp(d):d;("string"!=typeof t||null===t.match(e))&&i("Pattern",d)}p&&t.some((e,t,r)=>r.indexOf(e)!==t)&&i("UniqueItems",p)}}serialize(e,t,r,i={xml:{}}){let s={xml:{rootName:i.xml.rootName??"",includeRoot:i.xml.includeRoot??!1,xmlCharKey:i.xml.xmlCharKey??"_"}},l={}
4,c=e.type.name;r||(r=e.serializedName),null!==c.match(/^Sequence$/i)&&(l=[]),e.isConstant&&(t=e.defaultValue);let{required:u,nullable:y}=e;if(u&&y&&void 0===t)throw Error(`${r} cannot be undefined.`);if(u&&!y&&null==t)throw Error(`${r} cannot be null or undefined.`);if(!u&&!1===y&&null===t)throw Error(`${r} cannot be null.`);return null==t||null!==c.match(/^any$/i)?l=t:null!==c.match(/^(Number|String|Boolean|Object|Stream|Uuid)$/i)?l=function(e,t,r){if(null!=r){if(null!==e.match(/^Number$/i)){if("number"!=typeof r)throw Error(`${t} with value ${r} must be of type number.`)}else if(null!==e.match(/^String$/i)){if("string"!=typeof r.valueOf())throw Error(`${t} with value "${r}" must be of type string.`)}else if(null!==e.match(/^Uuid$/i)){if(!("string"==typeof r.valueOf()&&a.test(r)))throw Error(`${t} with value "${r}" must be of type string and a valid uuid.`)}else if(null!==e.match(/^Boolean$/i)){if("boolean"!=typeof r)throw Error(`${t} with value ${r} must be of type boolean.`)}else if(null!==e.match(/^Stream$/i)){let e=typeof r;if("string"!==e&&"function"!=typeof r.pipe&&"function"!=typeof r.tee&&!(r instanceof ArrayBuffer)&&!ArrayBuffer.isView(r)&&!(("function"==typeof Blob||"object"==typeof Blob)&&r instanceof Blob)&&"function"!==e)throw Error(`${t} must be a string, Blob, ArrayBuffer, ArrayBufferView, ReadableStream, or () => ReadableStream.`)}}return r}(c,r,t):null!==c.match(/^Enum$/i)?l=function(e,t,r){if(!t)throw Error(`Please provide a set of allowedValues to validate ${e} as an Enum Type.`);if(!t.some(e=>"string"==typeof e.valueOf()?e.toLowerCase()===r.toLowerCase():e===r))throw Error(`${r} is not a valid value for ${e}. The valid values are: ${JSON.stringify(t)}.`);return r}(r,e.type.allowedValues,t):null!==c.match(/^(Date|DateTime|TimeSpan|DateTimeRfc1123|UnixTime)$/i)?l=function(e,t,r){if(null!=t)if(null!==e.match(/^Date$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString().substring(0,10):new Date(t).toISOString().substring(0,10)}else if(null!==e.match(/^DateTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw Error(`${r} must be an instanceof Date or a string in ISO8601 format.`);t=t instanceof Date?t.toISOString():new Date(t).toISOString()}else if(null!==e.match(/^DateTimeRfc1123$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw Error(`${r} must be an instanceof Date or a string in RFC-1123 format.`);t=t instanceof Date?t.toUTCString():new Date(t).toUTCString()}else if(null!==e.match(/^UnixTime$/i)){if(!(t instanceof Date||"string"==typeof t.valueOf()&&!isNaN(Date.parse(t))))throw Error(`${r} must be an instanceof Date or a string in RFC-1123/ISO8601 format for it to be serialized in UnixTime/Epoch format.`);t=function(e){if(e)return"string"==typeof e.valueOf()&&(e=new Date(e)),Math.floor(e.getTime()/1e3)}(t)}else{var i;if(null!==e.match(/^TimeSpan$/i)&&(i=t,!o.test(i)))throw Error(`${r} must be a string in ISO 8601 format. Instead was "${t}".`)}return t}(c,t,r):null!==c.match(/^ByteArray$/i)?l=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw Error(`${e} must be of type Uint8Array.`);t=n(t)}return t}(r,t):null!==c.match(/^Base64Url$/i)?l=function(e,t){if(null!=t){if(!(t instanceof Uint8Array))throw Error(`${e} must be of type Uint8Array.`);t=function(e){if(e){if(!(e instanceof Uint8Array))throw Error("Please provide an input of type Uint8Array for converting to Base64Url.");return(function(e,t){let r=e.length;for(;r-1>=0&&"="===e[r-1];)--r;return e.substr(0,r)})(n(e),0).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(r,t):null!==c.match(/^Sequence$/i)?l=function(e,t,r,i,n,s){if(!Array.isArray(r))throw Error(`${i} must be of type Array.`);let o=t.type.element;if(!o||"object"!=typeof o)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}.`);"Composite"===o.type.name&&o.type.className&&(o=e.modelMappers[o.type.className]??o);let a=[];for(let t=0;t<r.length;t++){let l=e.serialize(o,r[t],i,s);if(n&&o.xmlNamespace){let e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?a[t]={...l}:(a[t]={},a[t][s.xml.xmlCharKey]=l),a[t].$={[e]:o.xmlNamespace}}else a[t]=l}return a}(this,e,t,r,!!this.isXML,s):null!==c.match(/^Dictionary$/i)?l=function(e,t,r,i,n,s){if("object"!=typeof r)throw Error(`${i} must be of type object.`);let o=t.type.value;if(!o||"object"!=typeof o)throw Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${i}.`);let a={};for(let t of Object.keys(r)){let l=e.serialize(o,r[t],i,s);a[t]=f(o,l,n,s)}
4return n&&t.xmlNamespace?(a.$={[t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns"]:t.xmlNamespace},a):a}(this,e,t,r,!!this.isXML,s):null!==c.match(/^Composite$/i)&&(l=function(e,t,r,i,n,s){if(m(e,t)&&(t=g(e,t,r,"clientName")),null!=r){let o={},a=p(e,t,i);for(let l of Object.keys(a)){let c,u=a[l];if(u.readOnly)continue;let d=o;if(e.isXML)c=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{let e=h(u.serializedName);for(let t of(c=e.pop(),e))null==d[t]&&(void 0!==r[l]&&null!==r[l]||void 0!==u.defaultValue)&&(d[t]={}),d=d[t]}if(null!=d){if(n&&t.xmlNamespace){let e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";d.$={...d.$,[e]:t.xmlNamespace}}let o=""!==u.serializedName?i+"."+u.serializedName:i,a=r[l],h=m(e,t);h&&h.clientName===l&&null==a&&(a=t.serializedName);let p=e.serialize(u,a,o,s);if(void 0!==p&&null!=c){let e=f(u,p,n,s);n&&u.xmlIsAttribute?(d.$=d.$||{},d.$[c]=p):n&&u.xmlIsWrapped?d[c]={[u.xmlElementName]:e}:d[c]=e}}}let l=function(e,t,r){let i=t.type.additionalProperties;if(!i&&t.type.className){let i=d(e,t,r);return i?.type.additionalProperties}return i}(e,t,i);if(l){let t=Object.keys(a);for(let n in r)t.every(e=>e!==n)&&(o[n]=e.serialize(l,r[n],i+'["'+n+'"]',s))}return o}return r}(this,e,t,r,!!this.isXML,s)),l}deserialize(e,t,r,i={xml:{}}){let n,o={xml:{rootName:i.xml.rootName??"",includeRoot:i.xml.includeRoot??!1,xmlCharKey:i.xml.xmlCharKey??"_"},ignoreUnknownProperties:i.ignoreUnknownProperties??!1};if(null==t)return this.isXML&&"Sequence"===e.type.name&&!e.xmlIsWrapped&&(t=[]),void 0!==e.defaultValue&&(t=e.defaultValue),t;let a=e.type.name;if(r||(r=e.serializedName),null!==a.match(/^Composite$/i))n=function(e,t,r,i,n){let s=n.xml.xmlCharKey??"_";m(e,t)&&(t=g(e,t,r,"serializedName"));let o=p(e,t,i),a={},l=[];for(let c of Object.keys(o)){let u=o[c],d=h(o[c].serializedName);l.push(d[0]);let{serializedName:p,xmlName:f,xmlElementName:g}=u,m=i;""!==p&&void 0!==p&&(m=i+"."+p);let y=u.headerCollectionPrefix;if(y){let t={};for(let i of Object.keys(r))i.startsWith(y)&&(t[i.substring(y.length)]=e.deserialize(u.type.value,r[i],m,n)),l.push(i);a[c]=t}else if(e.isXML)if(u.xmlIsAttribute&&r.$)a[c]=e.deserialize(u,r.$[f],m,n);else if(u.xmlIsMsText)void 0!==r[s]?a[c]=r[s]:"string"==typeof r&&(a[c]=r);else{let t=g||f||p;if(u.xmlIsWrapped){let t=r[f],i=t?.[g]??[];a[c]=e.deserialize(u,i,m,n),l.push(f)}else{let i=r[t];a[c]=e.deserialize(u,i,m,n),l.push(t)}}else{let i,s,l=r,h=0;for(let e of d){if(!l)break;h++,l=l[e]}null===l&&h<d.length&&(l=void 0),i=l;let p=t.type.polymorphicDiscriminator;if(p&&c===p.clientName&&null==i&&(i=t.serializedName),Array.isArray(r[c])&&""===o[c].serializedName){i=r[c];let t=e.deserialize(u,i,m,n);for(let[e,r]of Object.entries(a))Object.prototype.hasOwnProperty.call(t,e)||(t[e]=r);a=t}else(void 0!==i||void 0!==u.defaultValue)&&(s=e.deserialize(u,i,m,n),a[c]=s)}}let c=t.type.additionalProperties;if(c){let t=e=>{for(let t in o)if(h(o[t].serializedName)[0]===e)return!1;return!0};for(let s in r)t(s)&&(a[s]=e.deserialize(c,r[s],i+'["'+s+'"]',n))}else if(r&&!n.ignoreUnknownProperties)for(let e of Object.keys(r))void 0!==a[e]||l.includes(e)||["$",n.xml.xmlCharKey].includes(e)||(a[e]=r[e]);return a}(this,e,t,r,o);else{if(this.isXML){let e=o.xml.xmlCharKey;void 0!==t.$&&void 0!==t[e]&&(t=t[e])}null!==a.match(/^Number$/i)?isNaN(n=parseFloat(t))&&(n=t):null!==a.match(/^Boolean$/i)?n="true"===t||"false"!==t&&t:null!==a.match(/^(String|Enum|Object|Stream|Uuid|TimeSpan|any)$/i)?n=t:null!==a.match(/^(Date|DateTime|DateTimeRfc1123)$/i)?n=new Date(t):null!==a.match(/^UnixTime$/i)?n=function(e){if(e)return new Date(1e3*e)}(t):null!==a.match(/^ByteArray$/i)?n=s(t):null!==a.match(/^Base64Url$/i)?n=function(e){if(e){if(e&&"string"!=typeof e.valueOf())throw Error("Please provide an input of type string for converting to Uint8Array");return s(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==a.match(/^Sequence$/i)?n=function(e,t,r,i,n){let s=t.type.element;if(!s||"object"!=typeof s)throw Error(`element" metadata for an Array must be defined in the mapper and it must of type "object" in ${i}`);if(r){Array.isArray(r)||(r=[r]),"Composite"===s.type.name&&s.type.className&&(s=e.modelMappers[s.type.className]??s);let t=[];for(let o=0;o<r.length;o++)t[o]=e.deserialize(s,r[o],`${i}[${o}]`,n);return t}return r}(this,e,t,r,o):null!==a.match(/^Dictionary$/i)&&(n=function(e,t,r,i,n){let s=t.type.value;if(!s||"object"!=typeof s)throw Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${i}`);if(r){let t={};for(let o of Object.keys(r))t[o]=e.deserialize(s,r[o],i,n);return t}return r}(this,e,t,r,o))}return e.isConstant&&(n=e.defaultValue),n}}function u(e={},t=!1){return new c(e,t)}function h(e){let t=[],r="";if(e)for(let i of e.split("."))"\\"===i.charAt(i.length-1)?r+=i.substr(0,i.length-1)+".":(r+=i,t.pu
4sh(r),r="");return t}function d(e,t,r){let i=t.type.className;if(!i)throw Error(`Class name for model "${r}" is not provided in the mapper "${JSON.stringify(t,void 0,2)}".`);return e.modelMappers[i]}function p(e,t,r){let i=t.type.modelProperties;if(!i){let n=d(e,t,r);if(!n)throw Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(!(i=n?.type.modelProperties))throw Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(n)}" of type "${t.type.className}" for object "${r}".`)}return i}function f(e,t,r,i){if(!r||!e.xmlNamespace)return t;let n={[e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns"]:e.xmlNamespace};if(["Composite"].includes(e.type.name))if(t.$)return t;else{let e={...t};return e.$=n,e}let s={};return s[i.xml.xmlCharKey]=t,s.$=n,s}function g(e,t,r,i){let n=m(e,t);if(n){let s=n[i];if(s){"serializedName"===i&&(s=s.replace(/\\/gi,""));let n=r[s],o=t.type.uberParent??t.type.className;if("string"==typeof n&&o){let r=function(e,t,r){let i=[r];for(;i.length;){let r=i.shift(),n=t===r?t:r+"."+t;if(Object.prototype.hasOwnProperty.call(e,n))return e[n];for(let[t,n]of Object.entries(e))t.startsWith(r+".")&&n.type.uberParent===r&&n.type.className&&i.push(n.type.className)}}(e.modelMappers.discriminators,n,o);r&&(t=r)}}}return t}function m(e,t){return t.type.polymorphicDiscriminator||y(e,t.type.uberParent)||y(e,t.type.className)}function y(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}let b={Sequence:"Sequence",String:"String",Stream:"Stream"};var v=r(26494);let w={operationRequestMap:new WeakMap};function x(e,t,r){let i,n=t.parameterPath,s=t.mapper;if("string"==typeof n&&(n=[n]),Array.isArray(n)){if(n.length>0)if(s.isConstant)i=s.defaultValue;else{let t=S(e,n);!t.propertyFound&&r&&(t=S(r,n));let o=!1;t.propertyFound||(o=s.required||"options"===n[0]&&2===n.length),i=o?s.defaultValue:t.propertyValue}}else for(let t in s.required&&(i={}),n){let o=s.type.modelProperties[t],a=x(e,{parameterPath:n[t],mapper:o},r);void 0!==a&&(i||(i={}),i[t]=a)}return i}function S(e,t){let r={propertyFound:!1},i=0;for(;i<t.length;++i){let r=t[i];if(e&&r in e)e=e[r];else break}return i===t.length&&(r.propertyValue=e,r.propertyFound=!0),r}let C=Symbol.for("@azure/core-client original request");function E(e){if(C in e)return E(e[C]);let t=w.operationRequestMap.get(e);return t||(t={},w.operationRequestMap.set(e,t)),t}let _=["application/json","text/json"],T=["application/xml","application/atom+xml"];async function P(e,t,r,i,n){let s=await R(e,t,r,i,n);if(!function(e){let t=E(e.request),r=t?.shouldDeserialize;return void 0===r||("boolean"==typeof r?r:r(e))}(s))return s;let o=E(s.request),a=o?.operationSpec;if(!a||!a.responses)return s;let l=function(e){let t,r=E(e.request),i=r?.operationSpec;return i&&(t=r?.operationResponseGetter?r?.operationResponseGetter(i,e):i.responses[e.status]),t}(s),{error:c,shouldReturnResponse:u}=function(e,t,r,i){let n=200<=e.status&&e.status<300;if(!function(e){let t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?!!r:n){if(!r)return{error:null,shouldReturnResponse:!1};else if(!r.isError)return{error:null,shouldReturnResponse:!1}}let s=r??t.responses.default,o=e.request.streamResponseStatusCodes?.has(e.status)?`Unexpected status code: ${e.status}`:e.bodyAsText,a=new v.pj(o,{statusCode:e.status,request:e.request,response:e});if(!s&&!(e.parsedBody?.error?.code&&e.parsedBody?.error?.message))throw a;let l=s?.bodyMapper,c=s?.headersMapper;try{if(e.parsedBody){let r,n=e.parsedBody;if(l){let e=n;if(t.isXML&&l.type.name===b.Sequence){e=[];let t=l.xmlElementName;"object"==typeof n&&t&&(e=n[t])}r=t.serializer.deserialize(l,e,"error.response.parsedBody",i)}let s=n.error||r||n;a.code=s.code,s.message&&(a.message=s.message),l&&(a.response.parsedBody=r)}e.headers&&c&&(a.response.parsedHeaders=t.serializer.deserialize(c,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){a.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:a,shouldReturnResponse:!1}}(s,a,l,i);if(c)throw c;if(u)return s;if(l){if(l.bodyMapper){let e=s.parsedBody;
4a.isXML&&l.bodyMapper.type.name===b.Sequence&&(e="object"==typeof e?e[l.bodyMapper.xmlElementName]:[]);try{s.parsedBody=a.serializer.deserialize(l.bodyMapper,e,"operationRes.parsedBody",i)}catch(e){throw new v.pj(`Error ${e} occurred in deserializing the responseBody - ${s.bodyAsText}`,{statusCode:s.status,request:s.request,response:s})}}else"HEAD"===a.httpMethod&&(s.parsedBody=r.status>=200&&r.status<300);l.headersMapper&&(s.parsedHeaders=a.serializer.deserialize(l.headersMapper,s.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return s}async function R(e,t,r,i,n){if(!r.request.streamResponseStatusCodes?.has(r.status)&&r.bodyAsText){let s=r.bodyAsText,o=r.headers.get("Content-Type")||"",a=o?o.split(";").map(e=>e.toLowerCase()):[];try{if(0===a.length||a.some(t=>-1!==e.indexOf(t)))r.parsedBody=JSON.parse(s);else if(a.some(e=>-1!==t.indexOf(e))){if(!n)throw Error("Parsing XML not supported.");r.parsedBody=await n(s,i.xml)}}catch(i){let e=`Error "${i}" occurred while parsing the response body - ${r.bodyAsText}.`,t=i.code||v.pj.PARSE_ERROR;throw new v.pj(e,{code:t,statusCode:r.status,request:r.request,response:r})}}return r}function I(e){let{parameterPath:t,mapper:r}=e;return"string"==typeof t?t:Array.isArray(t)?t.join("."):r.serializedName}function O(e={}){let t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,r){let i=E(e),n=i?.operationSpec,s=i?.operationArguments;return n&&s&&(function(e,t,r){if(r.headerParameters)for(let i of r.headerParameters){let n=x(t,i);if(null!=n||i.mapper.required){n=r.serializer.serialize(i.mapper,n,I(i));let t=i.mapper.headerCollectionPrefix;if(t)for(let r of Object.keys(n))e.headers.set(t+r,n[r]);else e.headers.set(i.mapper.serializedName||I(i),n)}}let i=t.options?.requestOptions?.customHeaders;if(i)for(let t of Object.keys(i))e.headers.set(t,i[t])}(e,s,n),function(e,t,r,i=function(){throw Error("XML serialization unsupported!")}){let n=t.options?.serializerOptions,s={xml:{rootName:n?.xml.rootName??"",includeRoot:n?.xml.includeRoot??!1,xmlCharKey:n?.xml.xmlCharKey??"_"}},o=s.xml.xmlCharKey;if(r.requestBody&&r.requestBody.mapper){e.body=x(t,r.requestBody);let n=r.requestBody.mapper,{required:a,serializedName:l,xmlName:c,xmlElementName:u,xmlNamespace:h,xmlNamespacePrefix:d,nullable:p}=n,f=n.type.name;try{if(void 0!==e.body&&null!==e.body||p&&null===e.body||a){let t=I(r.requestBody);e.body=r.serializer.serialize(n,e.body,t,s);let a=f===b.Stream;if(r.isXML){let t=d?`xmlns:${d}`:"xmlns",r=function(e,t,r,i,n){if(e&&!["Composite","Sequence","Dictionary"].includes(r)){let r={};return r[n.xml.xmlCharKey]=i,r.$={[t]:e},r}return i}(h,t,f,e.body,s);f===b.Sequence?e.body=i(function(e,t,r,i){if(Array.isArray(e)||(e=[e]),!r||!i)return{[t]:e};let n={[t]:e};return n.$={[r]:i},n}(r,u||c||l,t,h),{rootName:c||l,xmlCharKey:o}):a||(e.body=i(r,{rootName:c||l,xmlCharKey:o}))}else{if(f===b.String&&(r.contentType?.match("text/plain")||"text"===r.mediaType))return;a||(e.body=JSON.stringify(e.body))}}}catch(e){throw Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(l,void 0," ")}.`)}}else if(r.formDataParameters&&r.formDataParameters.length>0)for(let i of(e.formData={},r.formDataParameters)){let n=x(t,i);if(null!=n){let t=i.mapper.serializedName||I(i);e.formData[t]=r.serializer.serialize(i.mapper,n,I(i),s)}}}(e,s,n,t)),r(e)}}}function A(e={}){let t=(0,v.Fp)(e??{});return e.credentialOptions&&t.addPolicy((0,v.N$)({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(O(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){let t=e.expectedContentTypes?.json??_,r=e.expectedContentTypes?.xml??T,i=e.parseXML,n=e.serializerOptions,s={xml:{rootName:n?.xml.rootName??"",includeRoot:n?.xml.includeRoot??!1,xmlCharKey:n?.xml.xmlCharKey??"_"}};return{name:"deserializationPolicy",sendRequest:async(e,n)=>P(t,r,await n(e),s,i)}}(e.deserializationOptions),{phase:"Deserialize"}),t}let M={CSV:",",SSV:" ",Multi:"Multi",TSV:" ",Pipes:"|"};function k(e,t){let r=e;for(let[e,i]of t)r=r.split(e).join(i);return r}let N=(0,r(17986).KV)("core-client");class L{_endpoint;_requestContentType;_allowInsecureConnection;_httpClient;pipeline;constructor(e={}){if(this._requestContentType=e.requestContentType,this._endpoint=e.endpoint??e.baseUri,e.baseUri&&N.warning("The baseUri option for S
4DK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(i||(i=(0,v.fl)()),i),this.pipeline=e.pipeline||function(e){let t=function(e){if(e.credentialScopes)return e.credentialScopes;if(e.endpoint)return`${e.endpoint}/.default`;if(e.baseUri)return`${e.baseUri}/.default`;if(e.credential&&!e.credentialScopes)throw Error("When using credentials, the ServiceClientOptions must contain either a endpoint or a credentialScopes. Unable to create a bearerTokenAuthenticationPolicy")}(e),r=e.credential&&t?{credentialScopes:t,credential:e.credential}:void 0;return A({...e,credentialOptions:r})}(e),e.additionalPolicies?.length)for(let{policy:t,position:r}of e.additionalPolicies){let e="perRetry"===r?"Sign":void 0;this.pipeline.addPolicy(t,{afterPhase:e})}}async sendRequest(e){return this.pipeline.sendRequest(this._httpClient,e)}async sendOperationRequest(e,t){let r=t.baseUrl||this._endpoint;if(!r)throw Error("If operationSpec.baseUrl is not specified, then the ServiceClient must have a endpoint string property that contains the base URL to use.");let i=function(e,t,r,i){let n=function(e,t,r){let i=new Map;if(e.urlParameters?.length)for(let n of e.urlParameters){let s=x(t,n,r),o=I(n);s=e.serializer.serialize(n.mapper,s,o),n.skipEncoding||(s=encodeURIComponent(s)),i.set(`{${n.mapper.serializedName||o}}`,s)}return i}(t,r,i),s=!1,o=k(e,n);if(t.path){let e=k(t.path,n);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(o=e,s=!0):o=function(e,t){if(!t)return e;let r=new URL(e),i=r.pathname;i.endsWith("/")||(i=`${i}/`),t.startsWith("/")&&(t=t.substring(1));let n=t.indexOf("?");if(-1!==n){let e=t.substring(0,n),s=t.substring(n+1);i+=e,s&&(r.search=r.search?`${r.search}&${s}`:s)}else i+=t;return r.pathname=i,r.toString()}(o,e)}let{queryParams:a,sequenceParams:l}=function(e,t,r){let i=new Map,n=new Set;if(e.queryParameters?.length)for(let s of e.queryParameters){"Sequence"===s.mapper.type.name&&s.mapper.serializedName&&n.add(s.mapper.serializedName);let o=x(t,s,r);if(null!=o||s.mapper.required){o=e.serializer.serialize(s.mapper,o,I(s));let t=s.collectionFormat?M[s.collectionFormat]:"";if(Array.isArray(o)&&(o=o.map(e=>null==e?"":e)),"Multi"===s.collectionFormat&&0===o.length)continue;Array.isArray(o)&&("SSV"===s.collectionFormat||"TSV"===s.collectionFormat)&&(o=o.join(t)),s.skipEncoding||(o=Array.isArray(o)?o.map(e=>encodeURIComponent(e)):encodeURIComponent(o)),Array.isArray(o)&&("CSV"===s.collectionFormat||"Pipes"===s.collectionFormat)&&(o=o.join(t)),i.set(s.mapper.serializedName||I(s),o)}}return{queryParams:i,sequenceParams:n}}(t,r,i);return function(e,t,r,i=!1){if(0===t.size)return e;let n=new URL(e),s=function(e){let t=new Map;if(!e||"?"!==e[0])return t;for(let r of(e=e.slice(1)).split("&")){let[e,i]=r.split("=",2),n=t.get(e);n?Array.isArray(n)?n.push(i):t.set(e,[n,i]):t.set(e,i)}return t}(n.search);for(let[e,n]of t){let t=s.get(e);if(Array.isArray(t))if(Array.isArray(n)){t.push(...n);let r=new Set(t);s.set(e,Array.from(r))}else t.push(n);else t?(Array.isArray(n)?n.unshift(t):r.has(e)&&s.set(e,[t,n]),i||s.set(e,n)):s.set(e,n)}let o=[];for(let[e,t]of s)if("string"==typeof t)o.push(`${e}=${t}`);else if(Array.isArray(t))for(let r of t)o.push(`${e}=${r}`);else o.push(`${e}=${t}`);return n.search=o.length?`?${o.join("&")}`:"",n.toString()}(o,a,l,s)}(r,t,e,this),n=(0,v.G6)({url:i});n.method=t.httpMethod;let s=E(n);s.operationSpec=t,s.operationArguments=e;let o=t.contentType||this._requestContentType;o&&t.requestBody&&n.headers.set("Content-Type",o);let a=e.options;if(a){let e=a.requestOptions;e&&(e.timeout&&(n.timeout=e.timeout),e.onUploadProgress&&(n.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(n.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(s.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(n.allowInsecureConnection=!0)),a.abortSignal&&(n.abortSignal=a.abortSignal),a.tracingOptions&&(n.tracingOptions=a.tracingOptions)}this._allowInsecureConnection&&(n.allowInsecureConnection=!0),void 0===n.streamResponseStatusCodes&&(n.streamResponseStatusCodes=function(e){let t=new Set;for(let r in e.responses){let i=e.responses[r];
4i.bodyMapper&&i.bodyMapper.type.name===b.Stream&&t.add(Number(r))}return t}(t));try{let e=await this.sendRequest(n),r=l(e,t.responses[e.status]);return a?.onResponse&&a.onResponse(e,r),r}catch(e){if("object"==typeof e&&e?.response){let r=e.response,i=l(r,t.responses[e.statusCode]||t.responses.default);e.details=i,a?.onResponse&&a.onResponse(r,i,e)}throw e}}}let D={DefaultScope:"/.default",HeaderConstants:{AUTHORIZATION:"authorization"}},B=async e=>{let t=function(e){return{abortSignal:e.abortSignal,requestOptions:{timeout:e.timeout},tracingOptions:e.tracingOptions}}(e.request),r=function(e){let t=e.headers.get("WWW-Authenticate");if(401===e.status&&t)return t}(e.response);if(r){let i=function(e){let t=e.slice(7);return`${t.trim()} `.split(" ").filter(e=>e).map(e=>(([e,t])=>({[e]:t}))(e.trim().split("="))).reduce((e,t)=>({...e,...t}),{})}(r),n=function(e,t){if(!t.resource_id)return e.scopes;let r=new URL(t.resource_id);r.pathname=D.DefaultScope;let i=r.toString();return"https://disk.azure.com/.default"===i&&(i="https://disk.azure.com//.default"),[i]}(e,i),s=function(e){let t=new URL(e.authorization_uri).pathname.split("/")[1];if(t&&/^[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}$/.test(t))return t}(i);if(!s)return!1;let o=await e.getAccessToken(n,{...t,tenantId:s});return!!o&&(e.request.headers.set(D.HeaderConstants.AUTHORIZATION,`${o.tokenType??"Bearer"} ${o.token}`),!0)}return!1}},74593:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,i="boolean"==typeof t.cycles&&t.cycles,n=t.cmp&&(r=t.cmp,function(e){return function(t,i){return r({key:t,value:e[t]},{key:i,value:e[i]})}}),s=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);if(Array.isArray(t)){for(r=0,o="[";r<t.length;r++)r&&(o+=","),o+=e(t[r])||"null";return o+"]"}if(null===t)return"null";if(-1!==s.indexOf(t)){if(i)return JSON.stringify("__cycle__");throw TypeError("Converting circular structure to JSON")}var r,o,a=s.push(t)-1,l=Object.keys(t).sort(n&&n(t));for(r=0,o="";r<l.length;r++){var c=l[r],u=e(t[c]);u&&(o&&(o+=","),o+=JSON.stringify(c)+":"+u)}return s.splice(a,1),"{"+o+"}"}}(e)}},77765:e=>{function t(e){this._comparator=e||t.DEFAULT_COMPARATOR,this._elements=[]}e.exports=t,t.DEFAULT_COMPARATOR=function(e,t){return"number"==typeof e&&"number"==typeof t?e-t:(e=e.toString())==(t=t.toString())?0:e>t?1:-1},t.prototype.isEmpty=function(){return 0===this.size()},t.prototype.peek=function(){if(this.isEmpty())throw Error("PriorityQueue is empty");return this._elements[0]},t.prototype.deq=function(){var e=this.peek(),t=this._elements.pop(),r=this.size();if(0===r)return e;this._elements[0]=t;for(var i=0;i<r;){var n=i,s=2*i+1,o=2*i+2;if(s<r&&this._compare(s,n)>=0&&(n=s),o<r&&this._compare(o,n)>=0&&(n=o),n===i)break;this._swap(n,i),i=n}return e},t.prototype.enq=function(e){for(var t=this._elements.push(e),r=t-1;r>0;){var i=Math.floor((r-1)/2);if(0>=this._compare(r,i))break;this._swap(i,r),r=i}return t},t.prototype.size=function(){return this._elements.length},t.prototype.forEach=function(e){return this._elements.forEach(e)},t.prototype._compare=function(e,t){return this._comparator(this._elements[e],this._elements[t])},t.prototype._swap=function(e,t){var r=this._elements[e];this._elements[e]=this._elements[t],this._elements[t]=r}},78146:(e,t,r)=>{"use strict";r.d(t,{I:()=>a});var i=r(93629);let n="REDACTED",s=["x-ms-client-request-id","x-ms-return-client-request-id","x-ms-useragent","x-ms-correlation-request-id","x-ms-request-id","client-request-id","ms-cv","return-client-request-id","traceparent","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Origin","Accept","Accept-Encoding","Cache-Control","Connection","Content-Length","Content-Type","Date","ETag","Expires","If-Mat
4ch","If-Modified-Since","If-None-Match","If-Unmodified-Since","Last-Modified","Pragma","Request-Id","Retry-After","Server","Transfer-Encoding","User-Agent","WWW-Authenticate"],o=["api-version"];class a{allowedHeaderNames;allowedQueryParameters;constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=s.concat(e),t=o.concat(t),this.allowedHeaderNames=new Set(e.map(e=>e.toLowerCase())),this.allowedQueryParameters=new Set(t.map(e=>e.toLowerCase()))}sanitize(e){let t=new Set;return JSON.stringify(e,(e,r)=>{if(r instanceof Error)return{...r,name:r.name,message:r.message};if("headers"===e&&(0,i.G)(r))return this.sanitizeHeaders(r);if("url"===e&&"string"==typeof r)return this.sanitizeUrl(r);if("query"===e&&(0,i.G)(r))return this.sanitizeQuery(r);if("body"!==e){if("response"===e)return;else if("operationSpec"===e)return;else if(Array.isArray(r)||(0,i.G)(r)){if(t.has(r))return"[Circular]";t.add(r)}return r}},2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===e)return e;let t=new URL(e);if(!t.search)return e;for(let[e]of t.searchParams)this.allowedQueryParameters.has(e.toLowerCase())||t.searchParams.set(e,n);return t.toString()}sanitizeHeaders(e){let t={};for(let r of Object.keys(e))this.allowedHeaderNames.has(r.toLowerCase())?t[r]=e[r]:t[r]=n;return t}sanitizeQuery(e){if("object"!=typeof e||null===e)return e;let t={};for(let r of Object.keys(e))this.allowedQueryParameters.has(r.toLowerCase())?t[r]=e[r]:t[r]=n;return t}}},78694:(e,t,r)=>{var i=r(51642).hp,n=function(){"use strict";var e,t,r;function n(e,t){return null!=t&&e instanceof t}try{e=Map}catch(t){e=function(){}}try{t=Set}catch(e){t=function(){}}try{r=Promise}catch(e){r=function(){}}function s(o,l,c,u,h){"object"==typeof l&&(c=l.depth,u=l.prototype,h=l.includeNonEnumerable,l=l.circular);var d=[],p=[],f=void 0!==i;return void 0===l&&(l=!0),void 0===c&&(c=1/0),function o(c,g){if(null===c)return null;if(0===g||"object"!=typeof c)return c;if(n(c,e))m=new e;else if(n(c,t))m=new t;else if(n(c,r))m=new r(function(e,t){c.then(function(t){e(o(t,g-1))},function(e){t(o(e,g-1))})});else if(s.__isArray(c))m=[];else if(s.__isRegExp(c))m=new RegExp(c.source,a(c)),c.lastIndex&&(m.lastIndex=c.lastIndex);else if(s.__isDate(c))m=new Date(c.getTime());else{if(f&&i.isBuffer(c))return m=i.allocUnsafe?i.allocUnsafe(c.length):new i(c.length),c.copy(m),m;n(c,Error)?m=Object.create(c):void 0===u?m=Object.create(y=Object.getPrototypeOf(c)):(m=Object.create(u),y=u)}if(l){var m,y,b,v=d.indexOf(c);if(-1!=v)return p[v];d.push(c),p.push(m)}for(var w in n(c,e)&&c.forEach(function(e,t){var r=o(t,g-1),i=o(e,g-1);m.set(r,i)}),n(c,t)&&c.forEach(function(e){var t=o(e,g-1);m.add(t)}),c)y&&(b=Object.getOwnPropertyDescriptor(y,w)),b&&null==b.set||(m[w]=o(c[w],g-1));if(Object.getOwnPropertySymbols)for(var x=Object.getOwnPropertySymbols(c),w=0;w<x.length;w++){var S=x[w],C=Object.getOwnPropertyDescriptor(c,S);(!C||C.enumerable||h)&&(m[S]=o(c[S],g-1),C.enumerable||Object.defineProperty(m,S,{enumerable:!1}))}if(h)for(var E=Object.getOwnPropertyNames(c),w=0;w<E.length;w++){var _=E[w],C=Object.getOwnPropertyDescriptor(c,_);C&&C.enumerable||(m[_]=o(c[_],g-1),Object.defineProperty(m,_,{enumerable:!1}))}return m}(o,c)}function o(e){return Object.prototype.toString.call(e)}function a(e){var t="";return e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),t}return s.clonePrototype=function(e){if(null===e)return null;var t=function(){};return t.prototype=e,new t},s.__objToStr=o,s.__isDate=function(e){return"object"==typeof e&&"[object Date]"===o(e)},s.__isArray=function(e){return"object"==typeof e&&"[object Array]"===o(e)},s.__isRegExp=function(e){return"object"==typeof e&&"[object RegExp]"===o(e)},s.__getRegExpFlags=a,s}();e.exports&&(e.exports=n)},79339:e=>{e.exports=(function e(t,r,i){function n(o,a){if(!r[o]){if(!t[o]){if(s)return s(o,!0);throw Error("Cannot find module '"+o+"'")}a=r[o]={exports:{}},t[o][0].call(a.exports,function(e){return n(t[o][1][e]||e)},a,a.exports,e,t,r,i)}return r[o].exports}for(var s=void 0,o=0;o<i.length;o++)n(i[o]);return n})({1:[function(e,t,r){(function(i,n,s,o,a,l,c,u,h){"use strict";var d=e("crypto");function p(e,t){var r;return void 0===(r="passthrough"!==(t=m(e,t)).algorithm?d.createHash(t.algorithm):new v).write&&(r.write=r.update,r.end=r.update),b(t,r).dispatch(e),r.update||r.end(""),r.digest?r.digest("buffer"===t.encoding?void 0:t.encoding):(e=r.read(),"buffer"!==t.encoding?e.toString(t.encoding):e)}(r=t.exports=p).sha1=function(e){return p(e)}
4,r.keys=function(e){return p(e,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},r.MD5=function(e){return p(e,{algorithm:"md5",encoding:"hex"})},r.keysMD5=function(e){return p(e,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var f=d.getHashes?d.getHashes().slice():["sha1","md5"],g=(f.push("passthrough"),["buffer","hex","binary","base64"]);function m(e,t){var r={};if(r.algorithm=(t=t||{}).algorithm||"sha1",r.encoding=t.encoding||"hex",r.excludeValues=!!t.excludeValues,r.algorithm=r.algorithm.toLowerCase(),r.encoding=r.encoding.toLowerCase(),r.ignoreUnknown=!0===t.ignoreUnknown,r.respectType=!1!==t.respectType,r.respectFunctionNames=!1!==t.respectFunctionNames,r.respectFunctionProperties=!1!==t.respectFunctionProperties,r.unorderedArrays=!0===t.unorderedArrays,r.unorderedSets=!1!==t.unorderedSets,r.unorderedObjects=!1!==t.unorderedObjects,r.replacer=t.replacer||void 0,r.excludeKeys=t.excludeKeys||void 0,void 0===e)throw Error("Object argument required.");for(var i=0;i<f.length;++i)f[i].toLowerCase()===r.algorithm.toLowerCase()&&(r.algorithm=f[i]);if(-1===f.indexOf(r.algorithm))throw Error('Algorithm "'+r.algorithm+'" not supported. supported values: '+f.join(", "));if(-1===g.indexOf(r.encoding)&&"passthrough"!==r.algorithm)throw Error('Encoding "'+r.encoding+'" not supported. supported values: '+g.join(", "));return r}function y(e){if("function"==typeof e)return null!=/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(e))}function b(e,t,r){function i(e){return t.update?t.update(e,"utf8"):t.write(e,"utf8")}return r=r||[],{dispatch:function(t){return this["_"+(null===(t=e.replacer?e.replacer(t):t)?"null":typeof t)](t)},_object:function(t){var n,o=Object.prototype.toString.call(t),a=/\[object (.*)\]/i.exec(o);if(a=(a=a?a[1]:"unknown:["+o+"]").toLowerCase(),0<=(o=r.indexOf(t)))return this.dispatch("[CIRCULAR:"+o+"]");if(r.push(t),void 0!==s&&s.isBuffer&&s.isBuffer(t))return i("buffer:"),i(t);if("object"===a||"function"===a||"asyncfunction"===a)return o=Object.keys(t),e.unorderedObjects&&(o=o.sort()),!1===e.respectType||y(t)||o.splice(0,0,"prototype","__proto__","constructor"),e.excludeKeys&&(o=o.filter(function(t){return!e.excludeKeys(t)})),i("object:"+o.length+":"),n=this,o.forEach(function(r){n.dispatch(r),i(":"),e.excludeValues||n.dispatch(t[r]),i(",")});if(!this["_"+a]){if(e.ignoreUnknown)return i("["+a+"]");throw Error('Unknown object type "'+a+'"')}this["_"+a](t)},_array:function(t,n){n=void 0!==n?n:!1!==e.unorderedArrays;var s=this;if(i("array:"+t.length+":"),!n||t.length<=1)return t.forEach(function(e){return s.dispatch(e)});var o=[],n=t.map(function(t){var i=new v,n=r.slice();return b(e,i,n).dispatch(t),o=o.concat(n.slice(r.length)),i.read().toString()});return r=r.concat(o),n.sort(),this._array(n,!1)},_date:function(e){return i("date:"+e.toJSON())},_symbol:function(e){return i("symbol:"+e.toString())},_error:function(e){return i("error:"+e.toString())},_boolean:function(e){return i("bool:"+e.toString())},_string:function(e){i("string:"+e.length+":"),i(e.toString())},_function:function(t){i("fn:"),y(t)?this.dispatch("[native]"):this.dispatch(t.toString()),!1!==e.respectFunctionNames&&this.dispatch("function-name:"+String(t.name)),e.respectFunctionProperties&&this._object(t)},_number:function(e){return i("number:"+e.toString())},_xml:function(e){return i("xml:"+e.toString())},_null:function(){return i("Null")},_undefined:function(){return i("Undefined")},_regexp:function(e){return i("regex:"+e.toString())},_uint8array:function(e){return i("uint8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint8clampedarray:function(e){return i("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(e))},_int8array:function(e){return i("int8array:"),this.dispatch(Array.prototype.slice.call(e))},_uint16array:function(e){return i("uint16array:"),this.dispatch(Array.prototype.slice.call(e))},_int16array:function(e){return i("int16array:"),this.dispatch(Array.prototype.slice.call(e))},_uint32array:function(e){return i("uint32array:"),this.dispatch(Array.prototype.slice.call(e))},_int32array:function(e){return i("int32array:"),this.dispatch(Array.prototype.slice.call(e))},_float32array:function(e){return i("float32array:"),this.dispatch(Array.prototype.slice.call(e))},_float64array:function(e){return i("float64array:"),this.dispatch(Array.prototype.slice.call(e))},_arraybuffer:function(e){return i("arraybuffer:"),this.dispatch(new Uint8Array(e))},_url:function(e){return i("url:"+e.toString())},_map:function(t){return i("map:"),t=Array.from(t),this._array(t,!1!==e.unorderedSets)},_set:function(t){return i("set:"),t=Array.from(t),this._array(t,!1!==e.unorderedSets)},_file:function(e){return i("file:"),this.dispatch([e.name,e.size,e.type,e.lastModfied])},_blob:function(){if(e.ignoreUnknown)return i("[blob]");throw Error('Hashing Blob objects is currently not supported\n(see https://github.com/puleos/object-hash/issues/26)\nUse "options.replacer" or "options.ignoreUnknown"\n')},_domwindow:function(){return i("domwindow")},_bigint:function(e){return i("bigint:"+e.toString())},_process:function(){return i("process")},_timer:function(){return i("timer")},_pipe:function(){return i("pipe")},_tcp:function(){return i("tcp")},_udp:function(){return i("udp")},_tty:function(){return i("tty")},_statwatcher:function(){return i("statwatcher")},_securecontext:function(){return i("securecontext")},_connection:function(){return i("connection")},_zlib:function(){return i("zlib")},_context:function(){return i("context")},_nodescript:function(){return i("nodescript")},_httpparser:function(){return i("httpparser")},_dataview:function(){return i("dataview")},_signal:function(){return i("signal")},_fsevent:function(){return i("fsevent")},_tlswrap:function(){return i("tlswrap")}}}function v(){return{buf:"",write:function(e){this.buf+=e},end:function(e){this.buf+=e},read:function(){return this.buf}}}r.writeToStream=function(e,t,r){return void 0===r&&(r=t,t={}),b(t=m(e,t),r).dispatch(e)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(e,t,r){(function(e,t,i,n,s,o,a,l,c){!function(e){"use strict";var t="undefined"!=typeof Uint8Array?Uint8Array:Array;function r(e){return 43===(e=e.charCodeAt(0))||45===e?62:47===e||95===e?63:e<48?-1:e<58?e-48+26+26:e<91?e-65:e<123?e-97+26:void 0}e.toByteArray=function(e){if(0<e.length%4)throw Error("Invalid string. Length must be a multiple of 4");var i,n,s=e.length,s="="===e.charAt(s-2)?2:+("="===e.charAt(s-1)),o=new t(3*e.length/4-s),a=0<s?e.length-4:e.length,l=0;function c(e){o[l++]=e}for(i=0;i<a;i+=4)c((0xff0000&(n=r(e.charAt(i))<<18|r(e.charAt(i+1))<<12|r(e.charAt(i+2))<<6|r(e.charAt(i+3))))>>16),c((65280&n)>>8),c(255&n);return 2==s?c(255&(n=r(e.charAt(i))<<2|r(e.charAt(i+1))>>4)):1==s&&(c((n=r(e.charAt(i))<<10|r(e.charAt(i+1))<<4|r(e.charAt(i+2))>>2)>>8&255),c(255&n)),o},e.fromByteArray=function(e){var t,r,i,n,s=e.length%3,o="";function a(e){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
4+/".charAt(e)}for(t=0,i=e.length-s;t<i;t+=3)o+=a((n=r=(e[t]<<16)+(e[t+1]<<8)+e[t+2])>>18&63)+a(n>>12&63)+a(n>>6&63)+a(63&n);switch(s){case 1:o=(o+=a((r=e[e.length-1])>>2))+a(r<<4&63)+"==";break;case 2:o=(o=(o+=a((r=(e[e.length-2]<<8)+e[e.length-1])>>10))+a(r>>4&63))+a(r<<2&63)+"="}return o}}(void 0===r?this.base64js={}:r)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(e,t,r){(function(t,i,n,s,o,a,l,c,u){var h=e("base64-js"),d=e("ieee754");function n(e,t,r){if(!(this instanceof n))return new n(e,t,r);var i,s,o,a,l=typeof e;if("base64"===t&&"string"==l)for(e=(a=e).trim?a.trim():a.replace(/^\s+|\s+$/g,"");e.length%4!=0;)e+="=";if("number"==l)i=P(e);else if("string"==l)i=n.byteLength(e,t);else{if("object"!=l)throw Error("First argument needs to be a number, array or string.");i=P(e.length)}if(n._useTypedArrays?s=n._augment(new Uint8Array(i)):((s=this).length=i,s._isBuffer=!0),n._useTypedArrays&&"number"==typeof e.byteLength)s._set(e);else if(R(a=e)||n.isBuffer(a)||a&&"object"==typeof a&&"number"==typeof a.length)for(o=0;o<i;o++)n.isBuffer(e)?s[o]=e.readUInt8(o):s[o]=e[o];else if("string"==l)s.write(e,0,t);else if("number"==l&&!n._useTypedArrays&&!r)for(o=0;o<i;o++)s[o]=0;return s}function p(e,t,r,i){i||(B("boolean"==typeof r,"missing or invalid endian"),B(null!=t,"missing offset"),B(t+1<e.length,"Trying to read beyond buffer length"));var n,i=e.length;if(!(i<=t))return r?(n=e[t],t+1<i&&(n|=e[t+1]<<8)):(n=e[t]<<8,t+1<i&&(n|=e[t+1])),n}function f(e,t,r,i){i||(B("boolean"==typeof r,"missing or invalid endian"),B(null!=t,"missing offset"),B(t+3<e.length,"Trying to read beyond buffer length"));var n,i=e.length;if(!(i<=t))return r?(t+2<i&&(n=e[t+2]<<16),t+1<i&&(n|=e[t+1]<<8),n|=e[t],t+3<i&&(n+=e[t+3]<<24>>>0)):(t+1<i&&(n=e[t+1]<<16),t+2<i&&(n|=e[t+2]<<8),t+3<i&&(n|=e[t+3]),n+=e[t]<<24>>>0),n}function g(e,t,r,i){if(i||(B("boolean"==typeof r,"missing or invalid endian"),B(null!=t,"missing offset"),B(t+1<e.length,"Trying to read beyond buffer length")),!(e.length<=t))return 32768&(i=p(e,t,r,!0))?-1*(65535-i+1):i}function m(e,t,r,i){if(i||(B("boolean"==typeof r,"missing or invalid endian"),B(null!=t,"missing offset"),B(t+3<e.length,"Trying to read beyond buffer length")),!(e.length<=t))return 0x80000000&(i=f(e,t,r,!0))?-1*(0xffffffff-i+1):i}function y(e,t,r,i){return i||(B("boolean"==typeof r,"missing or invalid endian"),B(t+3<e.length,"Trying to read beyond buffer length")),d.read(e,t,r,23,4)}function b(e,t,r,i){return i||(B("boolean"==typeof r,"missing or invalid endian"),B(t+7<e.length,"Trying to read beyond buffer length")),d.read(e,t,r,52,8)}function v(e,t,r,i,n){if(n||(B(null!=t,"missing value"),B("boolean"==typeof i,"missing or invalid endian"),B(null!=r,"missing offset"),B(r+1<e.length,"trying to write beyond buffer length"),N(t,65535)),!((n=e.length)<=r))for(var s=0,o=Math.min(n-r,2);s<o;s++)e[r+s]=(t&255<<8*(i?s:1-s))>>>8*(i?s:1-s)}function w(e,t,r,i,n){if(n||(B(null!=t,"missing value"),B("boolean"==typeof i,"missing or invalid endian"),B(null!=r,"missing offset"),B(r+3<e.length,"trying to write beyond buffer length"),N(t,0xffffffff)),!((n=e.length)<=r))for(var s=0,o=Math.min(n-r,4);s<o;s++)e[r+s]=t>>>8*(i?s:3-s)&255}function x(e,t,r,i,n){n||(B(null!=t,"missing value"),B("boolean"==typeof i,"missing or invalid endian"),B(null!=r,"missing offset"),B(r+1<e.length,"Trying to write beyond buffer length"),L(t,32767,-32768)),e.length<=r||v(e,0<=t?t:65535+t+1,r,i,n)}function S(e,t,r,i,n){n||(B(null!=t,"missing value"),B("boolean"==typeof i,"missing or invalid endian"),B(null!=r,"missing offset"),B(r+3<e.length,"Trying to write beyond buffer length"),L(t,0x7fffffff,-0x80000000)),e.length<=r||w(e,0<=t?t:0xffffffff+t+1,r,i,n)}function C(e,t,r,i,n){n||(B(null!=t,"missing value"),B("boolean"==typeof i,"missing or invalid endian"),B(null!=r,"missing offset"),B(r+3<e.length,"Trying to write beyond buffer length"),D(t,34028234663852886e22,-34028234663852886e22)),e.length<=r||d.write(e,t,r,i,23,4)}function E(e,t,r,i,n){n||(B(null!=t,"missing value"),B("boolean"==typeof i,"missing or invalid endian"),B(null!=r,"missing offset"),B(r+7<e.length,"Trying to write beyond buffer length"),D(t,17976931348623157e292,-17976931348623157e292)),e.length<=r||d.write(e,t,r,i,52,8)}r.Buffer=n,r.SlowBuffer=n,r.INSPECT_MAX_BYTES=50,n.poolSize=8192,n._useTypedArrays=function(){try{var e=new ArrayBuffer(0),t=new Uint8Array(e);return t.foo=function(){return 42},42===t.foo()&&"function"==typeof t.subarray}catch(e){return!1}}(),n.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},n.isBuffer=function(e){return!(null==e||!e._isBuffer)},n.byteLength=function(e,t){var r;switch(e+="",t||"utf8"){case"hex":r=e.length/2;break;case"utf8":case"utf-8":r=O(e).length;break;case"ascii":case"binary":case"raw":r=e.length;break;case"base64":r=A(e).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":r=2*e.length;break;default:throw Error("Unknown encoding")}return r},n.concat=function(e,t){if(B(R(e),"Usage: Buffer.concat(list, [totalLength])\nlist should be an Array."),0===e.length)return new n(0);if(1===e.length)return e[0];if("number"!=typeof t)for(s=t=0;s<e.length;s++)t+=e[s].length;for(var r=new n(t),i=0,s=0;s<e.length;s++){var o=e[s];o.copy(r,i),i+=o.length}return r},n.prototype.write=function(e,t,r,i){isFinite(t)?isFinite(r)||(i=r,r=void 0):(p=i,i=t,t=r,r=p),t=Number(t)||0;var s,o,a,l,c,u,h,d,p=this.length-t;switch((!r||p<(r=Number(r)))&&(r=p),i=String(i||"utf8").toLowerCase()){case"hex":c=function(e,t,r,i){r=Number(r)||0;var s=e.length-r;(!i||s<(i=Number(i)))&&(i=s),B((s=t.length)%2==0,"Invalid hex string"),s/2<i&&(i=s/2);for(var o=0;o<i;o++){var a=parseInt(t.substr(2*o,2),16);B(!isNaN(a),"Invalid hex string"),e[r+o]=a}return n._charsWritten=2*o,o}(this,e,t,r);break;case"utf8":case"utf-8":u=this,h=t,d=r,c=n._charsWritten=M(O(e),u,h,d);break;case"ascii":case"binary":s=t,o=r,c=n._charsWritten=M(function(e){for(var t=[],r=0;r<e.length;r++)t.push(255&e.charCodeAt(r));return t}(e),this,s,o);break;case"base64":u=this,h=t,d=r,c=n._charsWritten=M(A(e),u,h,d);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":a=t,l=r,c=n._charsWritten=M(function(e){for(var t,r,i=[],n=0;n<e.length;n++)t=(r=e.charCodeAt(n))>>8,i.push(r%=256),i.push(t);return i}(e),this,a,l);break;default:throw Error("Unknown encoding")}return c},n.prototype.toString=function(e,t,r){var i,n,s;if(e=String(e||"utf8").toLowerCase(),t=Number(t)||0,(r=void 0!==r?Number(r):this.length)===t)return"";switch(e){case"hex":i=function(e,t,r){var i=e.length;(!t||t<0)&&(t=0),(!r||r<0||i<r)&&(r=i);for(var n="",s=t;s<r;s++)n+=I(e[s]);return n}(this,t,r);break;case"utf8":case"utf-8":i=function(e,t,r){var i="",n="";r=Math.min(e.length,r);for(var s=t;s<r;s++)e[s]<=127?(i+=k(n)+String.fromCharCode(e[s]),n=""):n+="%"+e[s].toString(16);return i+k(n)}(this,t,r);break;case"ascii":case"binary":i=function(e,t,r){var i="";r=Math.min(e.length,r);for(var n=t;n<r;n++)i+=String.fromCharCode(e[n]);return i}(this,t,r);break;case"base64":s=r,i=0===(n=t)&&s===this.length?h.fromByteArray(this):h.fromByteArray(this.slice(n,s));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":i=function(e,t,r){for(var i=e.slice(t,r),n="",s=0;s<i.length;s+=2)n+=String.fromCharCode(i[s]+256*i[s+1]);return n}(this,t,r);break;default:throw Error("Unknown encoding")}return i},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},n.prototype.copy=function(e,t,r,i){if(t=t||0,(i=i||0===i?i:this.length)!==(r=r||0)&&0!==e.length&&0!==this.length){B(r<=i,"sourceEnd < sourceStart"),B(0<=t&&t<e.length,"targetStart out of bounds"),B(0<=r&&r<this.length,"sourceStart out of bounds"),B(0<=i&&i<=this.length,"sourceEnd out of bounds"),i>this.length&&(i=this.length);var s=(i=e.length-t<i-r?e.length-t+r:i)-r;if(s<100||!n._useTypedArrays)for(var o=0;o<s;o++)e[o+t]=this[o+r];else e._set(this.subarray(r,r+s),t)}},n.prototype.slice=function(e,t){var r=this.length;if(e=T(e,r,0),t=T(t,r,r),n._useTypedArrays)return n._augment(this.subarray(e,t));for(var i=t-e,s=new n(i,void 0,!0),o=0;o<i;o++)s[o]=this[o+e];return s},n.prototype.get=function(e){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(e)},n.prototype.set=function(e,t){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(e,t)},n.prototype.readUInt8=function(e,t){if(t||(B(null!=e,"missing offset"),B(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return this[e]},n.prototype.readUInt16LE=function(e,t){return p(this,e,!0,t)},n.prototype.readUInt16BE=function(e,t){return p(this,e,!1,t)},n.prototype.readUInt32LE=function(e,t){return f(this,e,!0,t)},n.prototype.readUInt32BE=function(e,t){return f(this,e,!1,t)},n.prototype.readInt8=function(e,t){if(t||(B(null!=e,"missing offset"),B(e<this.length,"Trying to read beyond buffer length")),!(e>=this.length))return 128&this[e]?-1*(255-this[e]+1):this[e]},n.prototype.readInt16LE=function(e,t){return g(this,e,!0,t)},n.prototype.readInt16BE=function(e,t){return g(this,e,!1,t)},n.prototype.readInt32LE=function(e,t){return m(this,e,!0,t)},n.prototype.readInt32BE=function(e,t){return m(this,e,!1,t)},n.prototype.readFloatLE=function(e,t){return y(this,e,!0,t)},n.prototype.readFloatBE=function(e,t){return y(this,e,!1,t)},n.prototype.readDoubleLE=function(e,t){return b(this,e,!0,t)},n.prototype.readDoubleBE=function(e,t){return b(this,e,!1,t)},n.prototype.writeUInt8=function(e,t,r){r||(B(null!=e,"missing value"),B(null!=t,"missing offset"),B(t<this.length,"trying to write beyond buffer length"),N(e,255)),t>=this.length||(this[t]=e)},n.prototype.writeUInt16LE=function(e,t,r){v(this,e,t,!0,r)},n.prototype.writeUInt16BE=function(e,t,r){v(this,e,t,!1,r)},n.prototype.writeUInt32LE=function(e,t,r){w(this,e,t,!0,r)},n.prototype.writeUInt32BE=function(e,t,r){w(this,e,t,!1,r)},n.prototype.writeInt8=function(e,t,r){r||(B(null!=e,"missing value"),B(null!=t,"missing offset"),B(t<this.length,"Trying to write beyond buffer length"),L(e,127,-128)),t>=this.length||(0<=e?this.writeUInt8(e,t,r):this.writeUInt8(255+e+1,t,r))},n.prototype.writeInt16LE=function(e,t,r){x(this,e,t,!0,r)},n.prototype.writeInt16BE=function(e,t,r){x(this,e,t,!1,r)},n.prototype.writeInt32LE=function(e,t,r){S(this,e,t,!0,r)},n.prototype.writeInt32BE=function(e,t,r){S(this,e,t,!1,r)},n.prototype.writeFloatLE=function(e,t,r){C(this,e,t,!0,r)},n.prototype.writeFloatBE=function(e,t,r){C(this,e,t,!1,r)},n.prototype.writeDoubleLE=function(e,t,r){E(this,e,t,!0,r)},n.prototype.writeDoubleBE=function(e,t,r){E(this,e,t,!1,r)},n.prototype.fill=function(e,t,r){if(t=t||0,r=r||this.length,B("number"==typeof(e="string"==typeof(e=e||0)?e.charCodeAt(0):e)&&!isNaN(e),"value is not a number"),B(t<=r,"end < start"),r!==t&&0!==this.length){B(0<=t&&t<this.length,"start out of bounds"),B(0<=r&&r<=this.length,"end out of bounds");for(var i=t;i<r;i++)this[i]=e}},n.prototype.inspect=function(){for(var e=[],t=this.length,i=0;i<t;i++)if(e[i]=I(this[i]),i===r.INSPECT_MAX_BYTES){e[i+1]="...";break}return"<Buffer "+e.join(" ")+">"},n.prototype.toArrayBuffer=function(){if("undefined"==typeof Uint8Array)throw Error("Buffer.toArrayBuffer not supported in this browser");if(n._useTypedArrays)return new n(this).buffer;for(var e=new Uint8Array(this.length),t=0,r=e.length;t<r;t+=1)e[t]=this[t];return e.buffer};var _=n.prototype;function T(e,t,r){return"number"!=typeof e?r:t<=(e=~~e)?t:0<=e||0<=(e+=t)?e:0}function P(e){return(e=~~Math.ceil(+e))<0?0:e}function R(e){return(Array.isArray||function(e){return"[object Array]"===Object.prototype.toString.call(e)})(e)}function I(e){return e<16?"0"+e.toString(16):e.toString(16)}function O(e){for(var t=[],r=0;r<e.length;r++){var i=e.charCodeAt(r);if(i<=127)t.push(e.charCodeAt(r));else for(var n=r,s=(55296<=i&&i<=57343&&r++,encodeURIComponent(e.slice(n,r+1)).substr(1).split("%")),o=0;o<s.length;o++)t.push(parseInt(s[o],16))}return t}function A(e){return h.toByteArray(e)}function M(e,t,r,i){for(var n=0;n<i&&!(n+r>=t.length||n>=e.length);n++)t[n+r]=e[n];return n}function k(e){try{return decodeURIComponent(e)}catch(e){return String.fromCharCode(65533)}}function N(e,t){B("number"==typeof e,"cannot write a non-number as a number"),B(0<=e,"specified a negative value for writing an unsigned value"),B(e<=t,"value is larger than maximum value for type"),B(Math.floor(e)===e,"value has a fractional component")}function L(e,t,r){B("number"==typeof e,"cannot write a non-number as a number"),B(e<=t,"value larger than maximum allowed value"),B(r<=e,"value smaller than minimum allowed value"),B(Math.floor(e)===e,"value has a fractional component")}function D(e,t,r){B("number"==typeof e,"cannot write a non-number as a number"),B(e<=t,"value larger than maximum allowed value"),B(r<=e,"value smaller than minimum allowed value")}function B(e,t){if(!e)throw Error(t||"Failed assertion")}n._augment=function(e){return e._isBuffer=!0,e._get=e.get,e._set=e.set,e.get=_.get,e.set=_.set,e.write=_.write,e.toString=_.toString,e.toLocaleStr
4ing=_.toString,e.toJSON=_.toJSON,e.copy=_.copy,e.slice=_.slice,e.readUInt8=_.readUInt8,e.readUInt16LE=_.readUInt16LE,e.readUInt16BE=_.readUInt16BE,e.readUInt32LE=_.readUInt32LE,e.readUInt32BE=_.readUInt32BE,e.readInt8=_.readInt8,e.readInt16LE=_.readInt16LE,e.readInt16BE=_.readInt16BE,e.readInt32LE=_.readInt32LE,e.readInt32BE=_.readInt32BE,e.readFloatLE=_.readFloatLE,e.readFloatBE=_.readFloatBE,e.readDoubleLE=_.readDoubleLE,e.readDoubleBE=_.readDoubleBE,e.writeUInt8=_.writeUInt8,e.writeUInt16LE=_.writeUInt16LE,e.writeUInt16BE=_.writeUInt16BE,e.writeUInt32LE=_.writeUInt32LE,e.writeUInt32BE=_.writeUInt32BE,e.writeInt8=_.writeInt8,e.writeInt16LE=_.writeInt16LE,e.writeInt16BE=_.writeInt16BE,e.writeInt32LE=_.writeInt32LE,e.writeInt32BE=_.writeInt32BE,e.writeFloatLE=_.writeFloatLE,e.writeFloatBE=_.writeFloatBE,e.writeDoubleLE=_.writeDoubleLE,e.writeDoubleBE=_.writeDoubleBE,e.fill=_.fill,e.inspect=_.inspect,e.toArrayBuffer=_.toArrayBuffer,e}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(e,t,r){(function(r,i,n,s,o,a,l,c,u){var n=e("buffer").Buffer,h=new n(4);h.fill(0),t.exports={hash:function(e,t,r,i){for(var s=t(function(e,t){e.length%4!=0&&(r=e.length+(4-e.length%4),e=n.concat([e,h],r));for(var r,i=[],s=t?e.readInt32BE:e.readInt32LE,o=0;o<e.length;o+=4)i.push(s.call(e,o));return i}(e=n.isBuffer(e)?e:new n(e),i),8*e.length),t=i,o=new n(r),a=t?o.writeInt32BE:o.writeInt32LE,l=0;l<s.length;l++)a.call(o,s[l],4*l,!0);return o}}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(e,t,r){(function(t,i,n,s,o,a,l,c,u){var n=e("buffer").Buffer,h=e("./sha"),d=e("./sha256"),p=e("./rng"),f={sha1:h,sha256:d,md5:e("./md5")},g=new n(64);function m(e,t){var r=f[e=e||"sha1"],i=[];return r||y("algorithm:",e,"is not yet supported"),{update:function(e){return n.isBuffer(e)||(e=new n(e)),i.push(e),e.length,this},digest:function(e){var s=n.concat(i),s=t?function(e,t,r){n.isBuffer(t)||(t=new n(t)),n.isBuffer(r)||(r=new n(r)),t.length>64?t=e(t):t.length<64&&(t=n.concat([t,g],64));for(var i=new n(64),s=new n(64),o=0;o<64;o++)i[o]=54^t[o],s[o]=92^t[o];return r=e(n.concat([i,r])),e(n.concat([s,r]))}(r,t,s):r(s);return i=null,e?s.toString(e):s}}}function y(){var e=[].slice.call(arguments).join(" ");throw Error([e,"we accept pull requests\nhttp://github.com/dominictarr/crypto-browserify"].join("\n"))}g.fill(0),r.createHash=function(e){return m(e)},r.createHmac=m,r.randomBytes=function(e,t){if(!t||!t.call)return new n(p(e));try{t.call(this,void 0,new n(p(e)))}catch(e){t(e)}};var b,v=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],w=function(e){r[e]=function(){y("sorry,",e,"is not implemented yet")}};for(b in v)w(v[b],b)}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(e,t,r){(function(r,i,n,s,o,a,l,c,u){var h=e("./helpers");function d(e,t){e[t>>5]|=128<<t%32,e[14+(t+64>>>9<<4)]=t;for(var r=0x67452301,i=-0x10325477,n=-0x67452302,s=0x10325476,o=0;o<e.length;o+=16){var a=r,l=i,c=n,u=s,r=f(r,i,n,s,e[o+0],7,-0x28955b88),s=f(s,r,i,n,e[o+1],12,-0x173848aa),n=f(n,s,r,i,e[o+2],17,0x242070db),i=f(i,n,s,r,e[o+3],22,-0x3e423112);r=f(r,i,n,s,e[o+4],7,-0xa83f051),s=f(s,r,i,n,e[o+5],12,0x4787c62a),n=f(n,s,r,i,e[o+6],17,-0x57cfb9ed),i=f(i,n,s,r,e[o+7],22,-0x2b96aff),r=f(r,i,n,s,e[o+8],7,0x698098d8),s=f(s,r,i,n,e[o+9],12,-0x74bb0851),n=f(n,s,r,i,e[o+10],17,-42063),i=f(i,n,s,r,e[o+11],22,-0x76a32842),r=f(r,i,n,s,e[o+12],7,0x6b901122),s=f(s,r,i,n,e[o+13],12,-0x2678e6d),n=f(n,s,r,i,e[o+14],17,-0x5986bc72),r=g(r,i=f(i,n,s,r,e[o+15],22,0x49b40821),n,s,e[o+1],5,-0x9e1da9e),s=g(s,r,i,n,e[o+6],9,-0x3fbf4cc0),n=g(n,s,r,i,e[o+11],14,0x265e5a51),i=g(i,n,s,r,e[o+0],20,-0x16493856),r=g(r,i,n,s,e[o+5],5,-0x29d0efa3),s=g(s,r,i,n,e[o+10],9,0x2441453),n=g(n,s,r,i,e[o+15],14,-0x275e197f),i=g(i,n,s,r,e[o+4],20,-0x182c0438),r=g(r,i,n,s,e[o+9],5,0x21e1cde6),s=g(s,r,i,n,e[o+14],9,-0x3cc8f82a),n=g(n,s,r,i,e[o+3],14,-0xb2af279),i=g(i,n,s,r,e[o+8],20,0x455a14ed),r=g(r,i,n,s,e[o+13],5,-0x561c16fb),s=g(s,r,i,n,e[o+2],9,-0x3105c08),n=g(n,s,r,i,e[o+7],14,0x676f02d9),r=m(r,i=g(i,n,s,r,e[o+12],20,-0x72d5b376),n,s,e[o+5],4,-378558),s=m(s,r,i,n,e[o+8],11,-0x788e097f),n=m(n,s,r,i,e[o+11],16,0x6d9d6122),i=m(i,n,s,r,e[o+14],23,-0x21ac7f4),r=m(r,i,n,s,e[o+1],4,-0x5b4115bc),s=m(s,r,i,n,e[o+4],11,0x4bdecfa9),n=m(n,s,r,i,e[o+7],16,-0x944b4a0),i=m(i,n,s,r,e[o+10],23,-0x41404390),r=m(r,i,n,s,e[o+13],4,0x289b7ec6),s=m(s,r,i,n,e[o+0],11,-0x155ed806),n=m(n,s,r,i,e[o+3],16,-0x2b10cf7b),i=m(i,n,s,r,e[o+6],23,0x4881d05
4),r=m(r,i,n,s,e[o+9],4,-0x262b2fc7),s=m(s,r,i,n,e[o+12],11,-0x1924661b),n=m(n,s,r,i,e[o+15],16,0x1fa27cf8),r=y(r,i=m(i,n,s,r,e[o+2],23,-0x3b53a99b),n,s,e[o+0],6,-0xbd6ddbc),s=y(s,r,i,n,e[o+7],10,0x432aff97),n=y(n,s,r,i,e[o+14],15,-0x546bdc59),i=y(i,n,s,r,e[o+5],21,-0x36c5fc7),r=y(r,i,n,s,e[o+12],6,0x655b59c3),s=y(s,r,i,n,e[o+3],10,-0x70f3336e),n=y(n,s,r,i,e[o+10],15,-1051523),i=y(i,n,s,r,e[o+1],21,-0x7a7ba22f),r=y(r,i,n,s,e[o+8],6,0x6fa87e4f),s=y(s,r,i,n,e[o+15],10,-0x1d31920),n=y(n,s,r,i,e[o+6],15,-0x5cfebcec),i=y(i,n,s,r,e[o+13],21,0x4e0811a1),r=y(r,i,n,s,e[o+4],6,-0x8ac817e),s=y(s,r,i,n,e[o+11],10,-0x42c50dcb),n=y(n,s,r,i,e[o+2],15,0x2ad7d2bb),i=y(i,n,s,r,e[o+9],21,-0x14792c6f),r=b(r,a),i=b(i,l),n=b(n,c),s=b(s,u)}return[r,i,n,s]}function p(e,t,r,i,n,s){return b((t=b(b(t,e),b(i,s)))<<n|t>>>32-n,r)}function f(e,t,r,i,n,s,o){return p(t&r|~t&i,e,t,n,s,o)}function g(e,t,r,i,n,s,o){return p(t&i|r&~i,e,t,n,s,o)}function m(e,t,r,i,n,s,o){return p(t^r^i,e,t,n,s,o)}function y(e,t,r,i,n,s,o){return p(r^(t|~i),e,t,n,s,o)}function b(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}t.exports=function(e){return h.hash(e,d,16)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(e,t,r){(function(e,r,i,n,s,o,a,l,c){t.exports=function(e){for(var t,r=Array(e),i=0;i<e;i++)0==(3&i)&&(t=0x100000000*Math.random()),r[i]=t>>>((3&i)<<3)&255;return r}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(e,t,r){(function(r,i,n,s,o,a,l,c,u){var h=e("./helpers");function d(e,t){e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var r,i,n,s=Array(80),o=0x67452301,a=-0x10325477,l=-0x67452302,c=0x10325476,u=-0x3c2d1e10,h=0;h<e.length;h+=16){for(var d=o,g=a,m=l,y=c,b=u,v=0;v<80;v++){s[v]=v<16?e[h+v]:f(s[v-3]^s[v-8]^s[v-14]^s[v-16],1);var w=p(p(f(o,5),(w=a,i=l,n=c,(r=v)<20?w&i|~w&n:!(r<40)&&r<60?w&i|w&n|i&n:w^i^n)),p(p(u,s[v]),(r=v)<20?0x5a827999:r<40?0x6ed9eba1:r<60?-0x70e44324:-0x359d3e2a)),u=c,c=l,l=f(a,30),a=o,o=w}o=p(o,d),a=p(a,g),l=p(l,m),c=p(c,y),u=p(u,b)}return[o,a,l,c,u]}function p(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function f(e,t){return e<<t|e>>>32-t}t.exports=function(e){return h.hash(e,d,20,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(e,t,r){(function(r,i,n,s,o,a,l,c,u){function h(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function d(e,t){var r,i=[0x428a2f98,0x71374491,0xb5c0fbcf,0xe9b5dba5,0x3956c25b,0x59f111f1,0x923f82a4,0xab1c5ed5,0xd807aa98,0x12835b01,0x243185be,0x550c7dc3,0x72be5d74,0x80deb1fe,0x9bdc06a7,0xc19bf174,0xe49b69c1,0xefbe4786,0xfc19dc6,0x240ca1cc,0x2de92c6f,0x4a7484aa,0x5cb0a9dc,0x76f988da,0x983e5152,0xa831c66d,0xb00327c8,0xbf597fc7,0xc6e00bf3,0xd5a79147,0x6ca6351,0x14292967,0x27b70a85,0x2e1b2138,0x4d2c6dfc,0x53380d13,0x650a7354,0x766a0abb,0x81c2c92e,0x92722c85,0xa2bfe8a1,0xa81a664b,0xc24b8b70,0xc76c51a3,0xd192e819,0xd6990624,0xf40e3585,0x106aa070,0x19a4c116,0x1e376c08,0x2748774c,0x34b0bcb5,0x391c0cb3,0x4ed8aa4a,0x5b9cca4f,0x682e6ff3,0x748f82ee,0x78a5636f,0x84c87814,0x8cc70208,0x90befffa,0xa4506ceb,0xbef9a3f7,0xc67178f2],n=[0x6a09e66
47,0xbb67ae85,0x3c6ef372,0xa54ff53a,0x510e527f,0x9b05688c,0x1f83d9ab,0x5be0cd19],s=Array(64);e[t>>5]|=128<<24-t%32,e[15+(t+64>>9<<4)]=t;for(var o,a,l=0;l<e.length;l+=16){for(var c=n[0],u=n[1],d=n[2],p=n[3],m=n[4],y=n[5],b=n[6],v=n[7],w=0;w<64;w++)s[w]=w<16?e[w+l]:h(h(h(f(a=s[w-2],17)^f(a,19)^g(a,10),s[w-7]),f(a=s[w-15],7)^f(a,18)^g(a,3)),s[w-16]),r=h(h(h(h(v,f(a=m,6)^f(a,11)^f(a,25)),m&y^~m&b),i[w]),s[w]),o=h(f(o=c,2)^f(o,13)^f(o,22),c&u^c&d^u&d),v=b,b=y,y=m,m=h(p,r),p=d,d=u,u=c,c=h(r,o);n[0]=h(c,n[0]),n[1]=h(u,n[1]),n[2]=h(d,n[2]),n[3]=h(p,n[3]),n[4]=h(m,n[4]),n[5]=h(y,n[5]),n[6]=h(b,n[6]),n[7]=h(v,n[7])}return n}var p=e("./helpers"),f=function(e,t){return e>>>t|e<<32-t},g=function(e,t){return e>>>t};t.exports=function(e){return p.hash(e,d,32,!0)}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(e,t,r){(function(e,t,i,n,s,o,a,l,c){r.read=function(e,t,r,i,n){var s,o,a=8*n-i-1,l=(1<<a)-1,c=l>>1,u=-7,h=r?n-1:0,d=r?-1:1,n=e[t+h];for(h+=d,s=n&(1<<-u)-1,n>>=-u,u+=a;0<u;s=256*s+e[t+h],h+=d,u-=8);for(o=s&(1<<-u)-1,s>>=-u,u+=i;0<u;o=256*o+e[t+h],h+=d,u-=8);if(0===s)s=1-c;else{if(s===l)return o?NaN:1/0*(n?-1:1);o+=Math.pow(2,i),s-=c}return(n?-1:1)*o*Math.pow(2,s-i)},r.write=function(e,t,r,i,n,s){var o,a,l=8*s-n-1,c=(1<<l)-1,u=c>>1,h=5960464477539062e-23*(23===n),d=i?0:s-1,p=i?1:-1,s=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(a=+!!isNaN(t),o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(i=Math.pow(2,-o))<1&&(o--,i*=2),2<=(t+=1<=o+u?h/i:h*Math.pow(2,1-u))*i&&(o++,i/=2),c<=o+u?(a=0,o=c):1<=o+u?(a=(t*i-1)*Math.pow(2,n),o+=u):(a=t*Math.pow(2,u-1)*Math.pow(2,n),o=0));8<=n;e[r+d]=255&a,d+=p,a/=256,n-=8);for(o=o<<n|a,l+=n;0<l;e[r+d]=255&o,d+=p,o/=256,l-=8);e[r+d-p]|=128*s}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(e,t,r){(function(e,r,i,n,s,o,a,l,c){var u,h,d;function p(){}(e=t.exports={}).nextTick=(h="undefined"!=typeof window&&window.setImmediate,d="undefined"!=typeof window&&window.postMessage&&window.addEventListener,h?function(e){return window.setImmediate(e)}:d?(u=[],window.addEventListener("message",function(e){var t=e.source;t!==window&&null!==t||"process-tick"!==e.data||(e.stopPropagation(),0<u.length&&u.shift()())},!0),function(e){u.push(e),window.postMessage("process-tick","*")}):function(e){setTimeout(e,0)}),e.title="browser",e.browser=!0,e.env={},e.argv=[],e.on=p,e.addListener=p,e.once=p,e.off=p,e.removeListener=p,e.removeAllListeners=p,e.emit=p,e.binding=function(e){throw Error("process.binding is not supported")},e.cwd=function(){return"/"},e.chdir=function(e){throw Error("process.chdir is not supported")}}).call(this,e("lYpoI2"),"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},e("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)},81726:(e,t,r)=>{"use strict";r.d(t,{_:()=>s});let i=1/1.4,n={generator:(e,t)=>{let[r,n]=e||[0,0],s=r+Math.random(),o=Math.pow(t.exponent,s)*Math.tanh(Math.sqrt(4*s));return[Math.min((isFinite(o)?Math.max(0,o-n):1/0)*i*t.initialDelay,t.maxDelay),[r+1,o]]},maxDelay:3e4,exponent:2,initialDelay:128};class s{constructor(e){this.options=e?{...n,...e}:n}next(){return o(this.options).next(void 0)}}let o=(e,t,r=0,i=-1)=>({duration:r,next(){let[r,n]=e.generator(t,e);return o(e,n,r,i+1)}})},82076:(e,t,r)=>{"use strict";r.d(t,{k:()=>o});var i,n=r(85246),s=r(28023);!function(e){e.Https="https",e.HttpsAndHttp="https,http"}(i||(i={}));class o{get ipRange(){if(this.ipRangeInner)return{end:this.ipRangeInner.end,start:this.ipRangeInner.start}}constructor(e,t,r,i,n,s,o,a,l,c,u,h,d,p,f,g,m,y,b,v){this.version=e,this.signature=t,void 0!==r&&"string"!=typeof r?(this.permissions=r.permissions,this.services=r.services,this.resourceTypes=r.resourceTypes,this.protocol=r.protocol,this.startsOn=r.startsOn,this.expiresOn=r.expiresOn,this.ipRangeInner=r.ipRange,this.identifier=r.identifier,this.encryptionScope=r.encryptionScope,this.resource=r.resource,this.cacheControl=r.cacheControl,this.contentDisposition=r.contentDisposition,this.contentEncoding=r.contentEncoding,this.contentLanguage=r.contentLanguage,this.contentType=r.contentType,r.userDelegationKey&&(this.signedOid=r.userDelegationKey.signedObjectId,this.signedTenantId=r.userDelegationKey.signedTenantId,this.signedStartsOn=r.userDelegationKey.signedStartsOn,this.signedExpiresOn=r.userDelegationKey.signedExpiresOn,this.signedService=r.userDelegationKey.signedService,this.signedVersion=r.userDelegationKey.signedVersion,this.preauthorizedAgentObjectId=r.preauthorizedAgentObjectId,this.correlationId=r.correlationId)):(this.services=i,this.resourceTypes=n,this.expiresOn=a,this.permissions=r,this.protocol=s,this.startsOn=o,this.ipRangeInner=l,this.encryptionScope=v,this.identifier=c,this.resource=u,this.cacheControl=h,this.contentDisposition=d,this.contentEncoding=p,this.contentLanguage=f,this.contentType=g,m&&(this.signedOid=m.signedObjectId,this.signedTenantId=m.signedTenantId,this.signedStartsOn=m.signedStartsOn,this.signedExpiresOn=m.signedExpiresOn,this.signedService=m.signedService,this.signedVersion=m.signedVersion,this.preauthorizedAgentObjectId=y,this.correlationId=b))}toString(){let e=[];
4for(let t of["sv","ss","srt","spr","st","se","sip","si","ses","skoid","sktid","skt","ske","sks","skv","sr","sp","sig","rscc","rscd","rsce","rscl","rsct","saoid","scid"])switch(t){case"sv":this.tryAppendQueryParameter(e,t,this.version);break;case"ss":this.tryAppendQueryParameter(e,t,this.services);break;case"srt":this.tryAppendQueryParameter(e,t,this.resourceTypes);break;case"spr":this.tryAppendQueryParameter(e,t,this.protocol);break;case"st":this.tryAppendQueryParameter(e,t,this.startsOn?(0,s.JL)(this.startsOn,!1):void 0);break;case"se":this.tryAppendQueryParameter(e,t,this.expiresOn?(0,s.JL)(this.expiresOn,!1):void 0);break;case"sip":this.tryAppendQueryParameter(e,t,this.ipRange?(0,n.l)(this.ipRange):void 0);break;case"si":this.tryAppendQueryParameter(e,t,this.identifier);break;case"ses":this.tryAppendQueryParameter(e,t,this.encryptionScope);break;case"skoid":this.tryAppendQueryParameter(e,t,this.signedOid);break;case"sktid":this.tryAppendQueryParameter(e,t,this.signedTenantId);break;case"skt":this.tryAppendQueryParameter(e,t,this.signedStartsOn?(0,s.JL)(this.signedStartsOn,!1):void 0);break;case"ske":this.tryAppendQueryParameter(e,t,this.signedExpiresOn?(0,s.JL)(this.signedExpiresOn,!1):void 0);break;case"sks":this.tryAppendQueryParameter(e,t,this.signedService);break;case"skv":this.tryAppendQueryParameter(e,t,this.signedVersion);break;case"sr":this.tryAppendQueryParameter(e,t,this.resource);break;case"sp":this.tryAppendQueryParameter(e,t,this.permissions);break;case"sig":this.tryAppendQueryParameter(e,t,this.signature);break;case"rscc":this.tryAppendQueryParameter(e,t,this.cacheControl);break;case"rscd":this.tryAppendQueryParameter(e,t,this.contentDisposition);break;case"rsce":this.tryAppendQueryParameter(e,t,this.contentEncoding);break;case"rscl":this.tryAppendQueryParameter(e,t,this.contentLanguage);break;case"rsct":this.tryAppendQueryParameter(e,t,this.contentType);break;case"saoid":this.tryAppendQueryParameter(e,t,this.preauthorizedAgentObjectId);break;case"scid":this.tryAppendQueryParameter(e,t,this.correlationId)}return e.join("&")}tryAppendQueryParameter(e,t,r){r&&(t=encodeURIComponent(t),r=encodeURIComponent(r),t.length>0&&r.length>0&&e.push(`${t}=${r}`))}}},83773:(e,t,r)=>{"use strict";r.d(t,{v:()=>i});let i=(0,r(17986).KV)("storage-blob")},84761:(e,t,r)=>{"use strict";r(26494)},85246:(e,t,r)=>{"use strict";function i(e){return e.end?`${e.start}-${e.end}`:e.start}r.d(t,{l:()=>i})},85346:(e,t,r)=>{"use strict";r.d(t,{w:()=>S});var i=r(92092),n=r(92584),s=r(26494),o=r(94485),a=r(72187),l=r(89783),c=r(28023),u=r(87014),h=r(68142),d=r(55335),p=r(7953),f=r(41553);class g{constructor(){this.read=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.add=!1,this.create=!1,this.update=!1,this.process=!1,this.tag=!1,this.filter=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let t=new g;for(let r of e)switch(r){case"r":t.read=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"l":t.list=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"u":t.update=!0;break;case"p":t.process=!0;break;case"t":t.tag=!0;break;case"f":t.filter=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw RangeError(`Invalid permission character: ${r}`)}return t}static from(e){let t=new g;return e.read&&(t.read=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.filter&&(t.filter=!0),e.tag&&(t.tag=!0),e.list&&(t.list=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.update&&(t.update=!0),e.process&&(t.process=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.filter&&e.push("f"),this.tag&&e.push("t"),this.list&&e.push("l"),this.add&&e.push("a"),this.create&&e.push("c"),this.update&&e.push("u"),this.process&&e.push("p"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}}class m{constructor(){this.service=!1,this.container=!1,this.object=!1}static parse(e){let t=new m;for(let r of e)switch(r){case"s":t.service=!0;break;case"c":t.container=!0;break;case"o":t.object=!0;break;default:throw RangeError(`Invalid resource type: ${r}`)}return t}toString(){let e=[];return this.service&&e.push("s"),this.container&&e.push("c"),this.object&&e.push("o"),e.join("")}}class y{constructor(){this.blob=!1,this.file=!1,this.queue=!1,this.table=!1}static parse(e){let t=new y;for(let r of e)switch(r){case"b":t.blob=!0;break;case"f":t.file=!0;break;case"q":t.queue=!0;break;case"t":t.table=!0;break;default:throw RangeError(`Invalid service character: ${r}`)}return t}toString(){let e=[];return this.blob&&e.push("b"),this.table&&e.push("t"),this.queue&&e.push("q"),this.file&&e.push("f"),e.join("")}}var b=r(85246),v=r(82076),w=r(2848);function x(e,t){let r,i=e.version?e.version:w.vY;if(e.permissions&&e.permissions.setImmutabilityPolicy&&i<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");
4if(e.permissions&&e.permissions.deleteVersion&&i<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when provided 'x' permission.");if(e.permissions&&e.permissions.permanentDelete&&i<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when provided 'y' permission.");if(e.permissions&&e.permissions.tag&&i<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when provided 't' permission.");if(e.permissions&&e.permissions.filter&&i<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when provided 'f' permission.");if(e.encryptionScope&&i<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");let n=g.parse(e.permissions.toString()),s=y.parse(e.services).toString(),o=m.parse(e.resourceTypes).toString();r=i>="2020-12-06"?[t.accountName,n,s,o,e.startsOn?(0,c.JL)(e.startsOn,!1):"",(0,c.JL)(e.expiresOn,!1),e.ipRange?(0,b.l)(e.ipRange):"",e.protocol?e.protocol:"",i,e.encryptionScope?e.encryptionScope:"",""].join("\n"):[t.accountName,n,s,o,e.startsOn?(0,c.JL)(e.startsOn,!1):"",(0,c.JL)(e.expiresOn,!1),e.ipRange?(0,b.l)(e.ipRange):"",e.protocol?e.protocol:"",i,""].join("\n");let a=t.computeHMACSHA256(r);return{sasQueryParameters:new v.k(i,a,n.toString(),s,o,e.protocol,e.startsOn,e.expiresOn,e.ipRange,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,e.encryptionScope),stringToSign:r}}class S extends f.L{static fromConnectionString(e,t){t=t||{};let r=(0,c.Tm)(e);if("AccountConnString"===r.kind)if(o.Ll){let e=new u.Z(r.accountName,r.accountKey);t.proxyOptions||(t.proxyOptions=(0,s.nV)(r.proxyUri));let i=(0,a.vC)(e,t);return new S(r.url,i)}else throw Error("Account connection string is only supported in Node.js environment");if("SASConnString"===r.kind){let e=(0,a.vC)(new h.t,t);return new S(r.url+"?"+r.accountSas,e)}throw Error("Connection string must be either an Account connection string or a SAS connection string")}constructor(e,t,r){super(e,(0,a.O8)(t)?t:o.Ll&&t instanceof u.Z||t instanceof h.t||(0,n.Zp)(t)?(0,a.vC)(t,r):(0,a.vC)(new h.t,r)),this.serviceContext=this.storageClientContext.service}getContainerClient(e){return new l.b((0,c.sQ)(this.url,encodeURIComponent(e)),this.pipeline)}async createContainer(e,t={}){return d.U.withSpan("BlobServiceClient-createContainer",t,async t=>{let r=this.getContainerClient(e),i=await r.create(t);return{containerClient:r,containerCreateResponse:i}})}async deleteContainer(e,t={}){return d.U.withSpan("BlobServiceClient-deleteContainer",t,async t=>this.getContainerClient(e).delete(t))}async undeleteContainer(e,t,r={}){return d.U.withSpan("BlobServiceClient-undeleteContainer",r,async i=>{let n=this.getContainerClient(r.destinationContainerName||e),s=n.storageClientContext.container;return{containerClient:n,containerUndeleteResponse:(0,c.m6)(await s.restore({deletedContainerName:e,deletedContainerVersion:t,tracingOptions:i.tracingOptions}))}})}async renameContainer(e,t,r={}){return d.U.withSpan("BlobServiceClient-renameContainer",r,async i=>{var n;let s=this.getContainerClient(t),o=s.storageClientContext.container;return{containerClient:s,containerRenameResponse:(0,c.m6)(await o.rename(e,Object.assign(Object.assign({},i),{sourceLeaseId:null==(n=r.sourceCondition)?void 0:n.leaseId})))}})}async getProperties(e={}){return d.U.withSpan("BlobServiceClient-getProperties",e,async t=>(0,c.m6)(await this.serviceContext.getProperties({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}async setProperties(e,t={}){return d.U.withSpan("BlobServiceClient-setProperties",t,async r=>(0,c.m6)(await this.serviceContext.setProperties(e,{abortSignal:t.abortSignal,tracingOptions:r.tracingOptions})))}async getStatistics(e={}){return d.U.withSpan("BlobServiceClient-getStatistics",e,async t=>(0,c.m6)(await this.serviceContext.getStatistics({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}async getAccountInfo(e={}){return d.U.withSpan("BlobServiceClient-getAccountInfo",e,async t=>(0,c.m6)(await this.serviceContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}
4async listContainersSegment(e,t={}){return d.U.withSpan("BlobServiceClient-listContainersSegment",t,async r=>(0,c.m6)(await this.serviceContext.listContainersSegment(Object.assign(Object.assign({abortSignal:t.abortSignal,marker:e},t),{include:"string"==typeof t.include?[t.include]:t.include,tracingOptions:r.tracingOptions}))))}async findBlobsByTagsSegment(e,t,r={}){return d.U.withSpan("BlobServiceClient-findBlobsByTagsSegment",r,async i=>{let n=(0,c.m6)(await this.serviceContext.filterBlobs({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions}));return Object.assign(Object.assign({},n),{_response:n._response,blobs:n.blobs.map(e=>{var t;let r="";return(null==(t=e.tags)?void 0:t.blobTagSet.length)===1&&(r=e.tags.blobTagSet[0].value),Object.assign(Object.assign({},e),{tags:(0,c.cl)(e.tags),tagValue:r})})})})}findBlobsByTagsSegments(e,t){return(0,i.AQ)(this,arguments,function*(e,t,r={}){let n;if(t||void 0===t)do(n=yield(0,i.N3)(this.findBlobsByTagsSegment(e,t,r))).blobs=n.blobs||[],t=n.continuationToken,yield yield(0,i.N3)(n);while(t)})}findBlobsByTagsItems(e){return(0,i.AQ)(this,arguments,function*(e,t={}){let r;try{for(var n,s,o,a,l,c=!0,u=(0,i.xN)(this.findBlobsByTagsSegments(e,r,t));!(n=(l=yield(0,i.N3)(u.next())).done);c=!0)a=l.value,c=!1,yield(0,i.N3)((yield*(0,i.Me)((0,i.xN)(a.blobs))))}catch(e){s={error:e}}finally{try{!c&&!n&&(o=u.return)&&(yield(0,i.N3)(o.call(u)))}finally{if(s)throw s.error}}})}findBlobsByTags(e,t={}){let r=Object.assign({},t),i=this.findBlobsByTagsItems(e,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}listSegments(e){return(0,i.AQ)(this,arguments,function*(e,t={}){let r;if(e||void 0===e)do(r=yield(0,i.N3)(this.listContainersSegment(e,t))).containerItems=r.containerItems||[],e=r.continuationToken,yield yield(0,i.N3)((yield(0,i.N3)(r)));while(e)})}listItems(){return(0,i.AQ)(this,arguments,function*(e={}){let t;try{for(var r,n,s,o,a,l=!0,c=(0,i.xN)(this.listSegments(t,e));!(r=(a=yield(0,i.N3)(c.next())).done);l=!0)o=a.value,l=!1,yield(0,i.N3)((yield*(0,i.Me)((0,i.xN)(o.containerItems))))}catch(e){n={error:e}}finally{try{!l&&!r&&(s=c.return)&&(yield(0,i.N3)(s.call(c)))}finally{if(n)throw n.error}}})}listContainers(e={}){""===e.prefix&&(e.prefix=void 0);let t=[];e.includeDeleted&&t.push("deleted"),e.includeMetadata&&t.push("metadata"),e.includeSystem&&t.push("system");let r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{}),i=this.listItems(r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}async getUserDelegationKey(e,t,r={}){return d.U.withSpan("BlobServiceClient-getUserDelegationKey",r,async i=>{let n=(0,c.m6)(await this.serviceContext.getUserDelegationKey({startsOn:(0,c.JL)(e,!1),expiresOn:(0,c.JL)(t,!1)},{abortSignal:r.abortSignal,tracingOptions:i.tracingOptions})),s={signedObjectId:n.signedObjectId,signedTenantId:n.signedTenantId,signedStartsOn:new Date(n.signedStartsOn),signedExpiresOn:new Date(n.signedExpiresOn),signedService:n.signedService,signedVersion:n.signedVersion,value:n.value};return Object.assign({_response:n._response,requestId:n.requestId,clientRequestId:n.clientRequestId,version:n.version,date:n.date,errorCode:n.errorCode},s)})}getBlobBatchClient(){return new p.r(this.url,this.pipeline)}generateAccountSasUrl(e,t=g.parse("r"),r="sco",i={}){if(!(this.credential instanceof u.Z))throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");void 0===e&&(e=new Date(new Date().getTime()+36e5));let n=x(Object.assign({permissions:t,expiresOn:e,resourceTypes:r,services:y.parse("b").toString()},i),this.credential).sasQueryParameters.toString();return(0,c.RV)(this.url,n)}generateSasStringToSign(e,t=g.parse("r"),r="sco",i={}){if(!(this.credential instanceof u.Z))throw RangeError("Can only generate the account SAS when the client is initialized with a shared key credential");return void 0===e&&(e=new Date(new Date().getTime()+36e5)),x(Object.assign({permissions:t,expiresOn:e,resourceTypes:r,services:y.parse("b").toString()},i),this.credential).stringToSign}}},85630:(e,t,r)=>{"use strict";function i(e){return{name:"storageSharedKeyCredentialPolicy",sendRequest:async(e,t)=>t(e)}}r.d(t,{R:()=>i})},86578:function(e,t,r){var i=r(29143);!function(t){"use strict";var r=function(e){setTimeout(e,0)};void 0!==i&&i&&"function"==typeof i.nextTick&&(r=i.nextTick),e.exports=function(e){var t={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===t.firstHere){t.current++,t.firstHere=!0;var e=1}else var e=0;
4var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var i=r.task;if(r.task=function(){i(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,!t.queue.length){if(t.current<0)throw Error("leave called too many times.");return}var i=t.queue[0];i.n+t.current>t.capacity||(t.queue.shift(),t.current+=i.n,r(i.task))},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}}(0)},87014:(e,t,r)=>{"use strict";r.d(t,{Z:()=>i});class i{}},88043:(e,t,r)=>{"use strict";r.d(t,{p:()=>i});class i{constructor(e,t){this._nextPolicy=e,this._options=t}shouldLog(e){return this._options.shouldLog(e)}log(e,t){this._options.log(e,t)}}},89783:(e,t,r)=>{"use strict";r.d(t,{b:()=>y});var i=r(92092),n=r(26494),s=r(94485),o=r(92584),a=r(68142),l=r(87014),c=r(72187),u=r(41553),h=r(55335),d=r(28023),p=r(97483),f=r(72211),g=r(68725),m=r(7953);class y extends u.L{get containerName(){return this._containerName}constructor(e,t,r){let i,u;if(r=r||{},(0,c.O8)(t))u=e,i=t;else if(s.Ll&&t instanceof l.Z||t instanceof a.t||(0,o.Zp)(t))u=e,i=(0,c.vC)(t,r);else if(t||"string"==typeof t)if(t&&"string"==typeof t){let o=(0,d.Tm)(e);if("AccountConnString"===o.kind)if(s.Ll){let e=new l.Z(o.accountName,o.accountKey);u=(0,d.sQ)(o.url,encodeURIComponent(t)),r.proxyOptions||(r.proxyOptions=(0,n.nV)(o.proxyUri)),i=(0,c.vC)(e,r)}else throw Error("Account connection string is only supported in Node.js environment");else if("SASConnString"===o.kind)u=(0,d.sQ)(o.url,encodeURIComponent(t))+"?"+o.accountSas,i=(0,c.vC)(new a.t,r);else throw Error("Connection string must be either an Account connection string or a SAS connection string")}else throw Error("Expecting non-empty strings for containerName parameter");else u=e,i=(0,c.vC)(new a.t,r);super(u,i),this._containerName=this.getContainerNameFromUrl(),this.containerContext=this.storageClientContext.container}async create(e={}){return h.U.withSpan("ContainerClient-create",e,async e=>(0,d.m6)(await this.containerContext.create(e)))}async createIfNotExists(e={}){return h.U.withSpan("ContainerClient-createIfNotExists",e,async e=>{var t,r;try{let t=await this.create(e);return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(e){if((null==(t=e.details)?void 0:t.errorCode)==="ContainerAlreadyExists")return Object.assign(Object.assign({succeeded:!1},null==(r=e.response)?void 0:r.parsedHeaders),{_response:e.response});throw e}})}async exists(e={}){return h.U.withSpan("ContainerClient-exists",e,async t=>{try{return await this.getProperties({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions}),!0}catch(e){if(404===e.statusCode)return!1;throw e}})}getBlobClient(e){return new g.jl((0,d.sQ)(this.url,(0,d.LZ)(e)),this.pipeline)}getAppendBlobClient(e){return new g.Ne((0,d.sQ)(this.url,(0,d.LZ)(e)),this.pipeline)}getBlockBlobClient(e){return new g.wG((0,d.sQ)(this.url,(0,d.LZ)(e)),this.pipeline)}getPageBlobClient(e){return new g.cG((0,d.sQ)(this.url,(0,d.LZ)(e)),this.pipeline)}async getProperties(e={}){return e.conditions||(e.conditions={}),h.U.withSpan("ContainerClient-getProperties",e,async t=>(0,d.m6)(await this.containerContext.getProperties(Object.assign(Object.assign({abortSignal:e.abortSignal},e.conditions),{tracingOptions:t.tracingOptions}))))}async delete(e={}){return e.conditions||(e.conditions={}),h.U.withSpan("ContainerClient-delete",e,async t=>(0,d.m6)(await this.containerContext.delete({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,modifiedAccessConditions:e.conditions,tracingOptions:t.tracingOptions})))}async deleteIfExists(e={}){return h.U.withSpan("ContainerClient-deleteIfExists",e,async e=>{var t,r;try{let t=await this.delete(e);return Object.assign(Object.assign({succeeded:!0},t),{_response:t._response})}catch(e){if((null==(t=e.details)?void 0:t.errorCode)==="ContainerNotFound")return Object.assign(Object.assign({succeeded:!1},null==(r=e.response)?void 0:r.parsedHeaders),{_response:e.response});throw e}})}async setMetadata(e,t={}){if(t.conditions||(t.conditions={}),t.conditions.ifUnmodifiedSince)throw RangeError("the IfUnmodifiedSince must have their default values because they are ignored by the blob service");return h.U.withSpan("ContainerClient-setMetadata",t,async r=>(0,d.m6)(await this.containerContext.setMetadata({abortSignal:t.abortSignal,leaseAccessConditions:t.conditions,metadata:e,modifiedAccessConditions:t.conditions,tracingOptions:r.tracingOptions})))}
4async getAccessPolicy(e={}){return e.conditions||(e.conditions={}),h.U.withSpan("ContainerClient-getAccessPolicy",e,async t=>{let r=(0,d.m6)(await this.containerContext.getAccessPolicy({abortSignal:e.abortSignal,leaseAccessConditions:e.conditions,tracingOptions:t.tracingOptions})),i={_response:r._response,blobPublicAccess:r.blobPublicAccess,date:r.date,etag:r.etag,errorCode:r.errorCode,lastModified:r.lastModified,requestId:r.requestId,clientRequestId:r.clientRequestId,signedIdentifiers:[],version:r.version};for(let e of r){let t;e.accessPolicy&&(t={permissions:e.accessPolicy.permissions},e.accessPolicy.expiresOn&&(t.expiresOn=new Date(e.accessPolicy.expiresOn)),e.accessPolicy.startsOn&&(t.startsOn=new Date(e.accessPolicy.startsOn))),i.signedIdentifiers.push({accessPolicy:t,id:e.id})}return i})}async setAccessPolicy(e,t,r={}){return r.conditions=r.conditions||{},h.U.withSpan("ContainerClient-setAccessPolicy",r,async i=>{let n=[];for(let e of t||[])n.push({accessPolicy:{expiresOn:e.accessPolicy.expiresOn?(0,d.JL)(e.accessPolicy.expiresOn):"",permissions:e.accessPolicy.permissions,startsOn:e.accessPolicy.startsOn?(0,d.JL)(e.accessPolicy.startsOn):""},id:e.id});return(0,d.m6)(await this.containerContext.setAccessPolicy({abortSignal:r.abortSignal,access:e,containerAcl:n,leaseAccessConditions:r.conditions,modifiedAccessConditions:r.conditions,tracingOptions:i.tracingOptions}))})}getBlobLeaseClient(e){return new f.j(this,e)}async uploadBlockBlob(e,t,r,i={}){return h.U.withSpan("ContainerClient-uploadBlockBlob",i,async i=>{let n=this.getBlockBlobClient(e),s=await n.upload(t,r,i);return{blockBlobClient:n,response:s}})}async deleteBlob(e,t={}){return h.U.withSpan("ContainerClient-deleteBlob",t,async r=>{let i=this.getBlobClient(e);return t.versionId&&(i=i.withVersion(t.versionId)),i.delete(r)})}async listBlobFlatSegment(e,t={}){return h.U.withSpan("ContainerClient-listBlobFlatSegment",t,async r=>{let i=(0,d.m6)(await this.containerContext.listBlobFlatSegment(Object.assign(Object.assign({marker:e},t),{tracingOptions:r.tracingOptions})));return Object.assign(Object.assign({},i),{_response:Object.assign(Object.assign({},i._response),{parsedBody:(0,d.$s)(i._response.parsedBody)}),segment:Object.assign(Object.assign({},i.segment),{blobItems:i.segment.blobItems.map(e=>Object.assign(Object.assign({},e),{name:(0,d.tK)(e.name),tags:(0,d.cl)(e.blobTags),objectReplicationSourceProperties:(0,d.W9)(e.objectReplicationMetadata)}))})})})}async listBlobHierarchySegment(e,t,r={}){return h.U.withSpan("ContainerClient-listBlobHierarchySegment",r,async i=>{var n;let s=(0,d.m6)(await this.containerContext.listBlobHierarchySegment(e,Object.assign(Object.assign({marker:t},r),{tracingOptions:i.tracingOptions})));return Object.assign(Object.assign({},s),{_response:Object.assign(Object.assign({},s._response),{parsedBody:(0,d.zk)(s._response.parsedBody)}),segment:Object.assign(Object.assign({},s.segment),{blobItems:s.segment.blobItems.map(e=>Object.assign(Object.assign({},e),{name:(0,d.tK)(e.name),tags:(0,d.cl)(e.blobTags),objectReplicationSourceProperties:(0,d.W9)(e.objectReplicationMetadata)})),blobPrefixes:null==(n=s.segment.blobPrefixes)?void 0:n.map(e=>Object.assign(Object.assign({},e),{name:(0,d.tK)(e.name)}))})})})}listSegments(e){return(0,i.AQ)(this,arguments,function*(e,t={}){let r;if(e||void 0===e)do e=(r=yield(0,i.N3)(this.listBlobFlatSegment(e,t))).continuationToken,yield yield(0,i.N3)((yield(0,i.N3)(r)));while(e)})}listItems(){return(0,i.AQ)(this,arguments,function*(e={}){let t;try{for(var r,n,s,o,a,l=!0,c=(0,i.xN)(this.listSegments(t,e));!(r=(a=yield(0,i.N3)(c.next())).done);l=!0)o=a.value,l=!1,yield(0,i.N3)((yield*(0,i.Me)((0,i.xN)(o.segment.blobItems))))}catch(e){n={error:e}}finally{try{!l&&!r&&(s=c.return)&&(yield(0,i.N3)(s.call(c)))}finally{if(n)throw n.error}}})}listBlobsFlat(e={}){let t=[];e.includeCopy&&t.push("copy"),e.includeDeleted&&t.push("deleted"),e.includeMetadata&&t.push("metadata"),e.includeSnapshots&&t.push("snapshots"),e.includeVersions&&t.push("versions"),e.includeUncommitedBlobs&&t.push("uncommittedblobs"),e.includeTags&&t.push("tags"),e.includeDeletedWithVersions&&t.push("deletedwithversions"),e.includeImmutabilityPolicy&&t.push("immutabilitypolicy"),e.includeLegalHold&&t.push("legalhold"),""===e.prefix&&(e.prefix=void 0);let r=Object.assign(Object.assign({},e),t.length>0?{include:t}:{}),i=this.listItems(r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(e={})=>this.listSegments(e.continuationToken,Object.assign({maxPageSize:e.maxPageSize},r))}}listHierarchySegments(e,t){return(0,i.AQ)(this,arguments,function*(e,t,r={}){let n;if(t||void 0===t)do t=(n=yield(0,i.N3)(this.listBlobHierarchySegment(e,t,r))).continuationToken,yield yield(0,i.N3)((yield(0,i.N3)(n))
4);while(t)})}listItemsByHierarchy(e){return(0,i.AQ)(this,arguments,function*(e,t={}){let r;try{for(var n,s,o,a,l,c=!0,u=(0,i.xN)(this.listHierarchySegments(e,r,t));!(n=(l=yield(0,i.N3)(u.next())).done);c=!0){a=l.value,c=!1;let e=a.segment;if(e.blobPrefixes)for(let t of e.blobPrefixes)yield yield(0,i.N3)(Object.assign({kind:"prefix"},t));for(let t of e.blobItems)yield yield(0,i.N3)(Object.assign({kind:"blob"},t))}}catch(e){s={error:e}}finally{try{!c&&!n&&(o=u.return)&&(yield(0,i.N3)(o.call(u)))}finally{if(s)throw s.error}}})}listBlobsByHierarchy(e,t={}){if(""===e)throw RangeError("delimiter should contain one or more characters");let r=[];t.includeCopy&&r.push("copy"),t.includeDeleted&&r.push("deleted"),t.includeMetadata&&r.push("metadata"),t.includeSnapshots&&r.push("snapshots"),t.includeVersions&&r.push("versions"),t.includeUncommitedBlobs&&r.push("uncommittedblobs"),t.includeTags&&r.push("tags"),t.includeDeletedWithVersions&&r.push("deletedwithversions"),t.includeImmutabilityPolicy&&r.push("immutabilitypolicy"),t.includeLegalHold&&r.push("legalhold"),""===t.prefix&&(t.prefix=void 0);let i=Object.assign(Object.assign({},t),r.length>0?{include:r}:{}),n=this.listItemsByHierarchy(e,i);return{next:async()=>n.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.listHierarchySegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},i))}}async findBlobsByTagsSegment(e,t,r={}){return h.U.withSpan("ContainerClient-findBlobsByTagsSegment",r,async i=>{let n=(0,d.m6)(await this.containerContext.filterBlobs({abortSignal:r.abortSignal,where:e,marker:t,maxPageSize:r.maxPageSize,tracingOptions:i.tracingOptions}));return Object.assign(Object.assign({},n),{_response:n._response,blobs:n.blobs.map(e=>{var t;let r="";return(null==(t=e.tags)?void 0:t.blobTagSet.length)===1&&(r=e.tags.blobTagSet[0].value),Object.assign(Object.assign({},e),{tags:(0,d.cl)(e.tags),tagValue:r})})})})}findBlobsByTagsSegments(e,t){return(0,i.AQ)(this,arguments,function*(e,t,r={}){let n;if(t||void 0===t)do(n=yield(0,i.N3)(this.findBlobsByTagsSegment(e,t,r))).blobs=n.blobs||[],t=n.continuationToken,yield yield(0,i.N3)(n);while(t)})}findBlobsByTagsItems(e){return(0,i.AQ)(this,arguments,function*(e,t={}){let r;try{for(var n,s,o,a,l,c=!0,u=(0,i.xN)(this.findBlobsByTagsSegments(e,r,t));!(n=(l=yield(0,i.N3)(u.next())).done);c=!0)a=l.value,c=!1,yield(0,i.N3)((yield*(0,i.Me)((0,i.xN)(a.blobs))))}catch(e){s={error:e}}finally{try{!c&&!n&&(o=u.return)&&(yield(0,i.N3)(o.call(u)))}finally{if(s)throw s.error}}})}findBlobsByTags(e,t={}){let r=Object.assign({},t),i=this.findBlobsByTagsItems(e,r);return{next:()=>i.next(),[Symbol.asyncIterator](){return this},byPage:(t={})=>this.findBlobsByTagsSegments(e,t.continuationToken,Object.assign({maxPageSize:t.maxPageSize},r))}}async getAccountInfo(e={}){return h.U.withSpan("ContainerClient-getAccountInfo",e,async t=>(0,d.m6)(await this.containerContext.getAccountInfo({abortSignal:e.abortSignal,tracingOptions:t.tracingOptions})))}getContainerNameFromUrl(){let e;try{let t=new URL(this.url);if(e="blob"===t.hostname.split(".")[1]?t.pathname.split("/")[1]:(0,d.Es)(t)?t.pathname.split("/")[2]:t.pathname.split("/")[1],!(e=decodeURIComponent(e)))throw Error("Provided containerName is invalid.");return e}catch(e){throw Error("Unable to extract containerName with provided information.")}}generateSasUrl(e){return new Promise(t=>{if(!(this.credential instanceof l.Z))throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");let r=(0,p.W)(Object.assign({containerName:this._containerName},e),this.credential).toString();t((0,d.RV)(this.url,r))})}generateSasStringToSign(e){if(!(this.credential instanceof l.Z))throw RangeError("Can only generate the SAS when the client is initialized with a shared key credential");return(0,p.f)(Object.assign({containerName:this._containerName},e),this.credential).stringToSign}generateUserDelegationSasUrl(e,t){return new Promise(r=>{let i=(0,p.W)(Object.assign({containerName:this._containerName},e),t,this.accountName).toString();r((0,d.RV)(this.url,i))})}generateUserDelegationSasStringToSign(e,t){return(0,p.f)(Object.assign({containerName:this._containerName},e),t,this.accountName).stringToSign}getBlobBatchClient(){return new m.r(this.url,this.pipeline)}}},92092:(e,t,r)=>{"use strict";r.d(t,{AQ:()=>s,Me:()=>o,N3:()=>n,Tt:()=>i,xN:()=>a});function i(e,t){var r={};for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&0>t.indexOf(i)&&(r[i]=e[i]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols)for(var n=0,i=Object.getOwnPropertySymbols(e);n<i.length;n++)0>t.indexOf(i[n])&&Object.prototype.propertyIsEnumerable.call(e,i[n])&&(r[i[n]]=e[i[n]]);return r}Object.create;function n(e){return this instanceof n?(this.v=e,this):new n(e)}function s(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var i,s=r.apply(e,t||[]),o=[];return i=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),a("next"),a("throw"),a("return",function(e){return function(t){return Promise.resolve(t).then(e,u)}}),i[Symbol.asyncIterator]=function(){return this},i;function a(e,t){s[e]&&(i[e]=function(t){return new Promise(function(r,i){o.push([e,t,r,i])>1||l(e,t)})},t&&(i[e]=t(i[e])))}function l(e,t){try{var r;(r=s[e](t)).value instanceof n?Promise.resolve(r.value.v).then(c,u):h(o[0][2],r)}catch(e){h(o[0][3],e)}}function c(e){l("next",e)}function u(e){l("throw",e)}function h(e,t){e(t),o.shift(),o.length&&l(o[0][0],o[0][1])}}function o(e){var t,r;return t={},i("next"),i("throw",function(e){throw e}),i("return"),t[Symbol.iterator]=function(){return this},t;function i(i,s){t[i]=e[i]?function(t){return(r=!r)?{value:n(e[i](t)),done:!1}:s?s(t):t}:s}}function a(e){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],i=0;if(r)return r.call(e);
4if(e&&"number"==typeof e.length)return{next:function(){return e&&i>=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}(e),t={},i("next"),i("throw"),i("return"),t[Symbol.asyncIterator]=function(){return this},t);function i(r){t[r]=e[r]&&function(t){return new Promise(function(i,n){var s,o,a;s=i,o=n,a=(t=e[r](t)).done,Promise.resolve(t.value).then(function(e){s({value:e,done:a})},o)})}}}Object.create,"function"==typeof SuppressedError&&SuppressedError},92290:function(e){e.exports=function(){var e=[],t=[],r={},i={},n={};function s(e){return"string"==typeof e?RegExp("^"+e+"$","i"):e}function o(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function a(e,t,i){if(!e.length||r.hasOwnProperty(e))return t;for(var n=i.length;n--;){var s=i[n];if(s[0].test(t))return function(e,t){return e.replace(t[0],function(r,i){var n,s,a=(n=t[1],s=arguments,n.replace(/\$(\d{1,2})/g,function(e,t){return s[t]||""}));return""===r?o(e[i-1],a):o(r,a)})}(t,s)}return t}function l(e,t,r){return function(i){var n=i.toLowerCase();return t.hasOwnProperty(n)?o(i,n):e.hasOwnProperty(n)?o(i,e[n]):a(n,i,r)}}function c(e,t,r,i){return function(i){var n=i.toLowerCase();return!!t.hasOwnProperty(n)||!e.hasOwnProperty(n)&&a(n,n,r)===n}}function u(e,t,r){var i=1===t?u.singular(e):u.plural(e);return(r?t+" ":"")+i}return u.plural=l(n,i,e),u.isPlural=c(n,i,e),u.singular=l(i,n,t),u.isSingular=c(i,n,t),u.addPluralRule=function(t,r){e.push([s(t),r])},u.addSingularRule=function(e,r){t.push([s(e),r])},u.addUncountableRule=function(e){if("string"==typeof e){r[e.toLowerCase()]=!0;return}u.addPluralRule(e,"$0"),u.addSingularRule(e,"$0")},u.addIrregularRule=function(e,t){t=t.toLowerCase(),n[e=e.toLowerCase()]=t,i[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return u.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return u.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEac
4h(function(e){return u.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(u.addUncountableRule),u}()},92584:(e,t,r)=>{"use strict";function i(e){return e&&"function"==typeof e.getToken&&(void 0===e.signRequest||e.getToken.length>0)}r.d(t,{Zp:()=>i}),r(94485)},93179:(e,t,r)=>{"use strict";let i,n,s,o;r.d(t,{W:()=>iS});let a={HttpHeaders:{Authorization:"authorization",ETag:"etag",MethodOverride:"X-HTTP-Method",Slug:"Slug",ContentType:"Content-Type",LastModified:"Last-Modified",ContentEncoding:"Content-Encoding",CharacterSet:"CharacterSet",UserAgent:"User-Agent",IfModifiedSince:"If-Modified-Since",IfMatch:"If-Match",IfNoneMatch:"If-None-Match",ContentLength:"Content-Length",AcceptEncoding:"Accept-Encoding",KeepAlive:"Keep-Alive",CacheControl:"Cache-Control",TransferEncoding:"Transfer-Encoding",ContentLanguage:"Content-Language",ContentLocation:"Content-Location",ContentMd5:"Content-Md5",ContentRange:"Content-Range",Accept:"Accept",AcceptCharset:"Accept-Charset",AcceptLanguage:"Accept-Language",IfRange:"If-Range",IfUnmodifiedSince:"If-Unmodified-Since",MaxForwards:"Max-Forwards",ProxyAuthorization:"Proxy-Authorization",AcceptRanges:"Accept-Ranges",ProxyAuthenticate:"Proxy-Authenticate",RetryAfter:"Retry-After",SetCookie:"Set-Cookie",WwwAuthenticate:"Www-Authenticate",Origin:"Origin",Host:"Host",AccessControlAllowOrigin:"Access-Control-Allow-Origin",AccessControlAllowHeaders:"Access-Control-Allow-Headers",KeyValueEncodingFormat:"application/x-www-form-urlencoded",WrapAssertionFormat:"wrap_assertion_format",WrapAssertion:"wrap_assertion",WrapScope:"wrap_scope",SimpleToken:"SWT",HttpDate:"date",Prefer:"Prefer",Location:"Location",Referer:"referer",A_IM:"A-IM",Query:"x-ms-documentdb-query",IsQuery:"x-ms-documentdb-isquery",IsQueryPlan:"x-ms-cosmos-is-query-plan-request",SupportedQueryFeatures:"x-ms-cosmos-supported-query-features",QueryVersion:"x-ms-cosmos-query-version",Continuation:"x-ms-continuation",ContinuationToken:"x-ms-continuation-token",PageSize:"x-ms-max-item-count",ItemCount:"x-ms-item-count",ActivityId:"x-ms-activity-id",PreTriggerInclude:"x-ms-documentdb-pre-trigger-include",PreTriggerExclude:"x-ms-documentdb-pre-trigger-exclude",PostTriggerInclude:"x-ms-documentdb-post-trigger-include",PostTriggerExclude:"x-ms-documentdb-post-trigger-exclude",IndexingDirective:"x-ms-indexing-directive",SessionToken:"x-ms-session-token",ConsistencyLevel:"x-ms-consistency-level",XDate:"x-ms-date",CollectionPartitionInfo:"x-ms-collection-partition-info",CollectionServiceInfo:"x-ms-collection-service-info",RetryAfterInMilliseconds:"x-ms-retry-after-ms",RetryAfterInMs:"x-ms-retry-after-ms",IsFeedUnfiltered:"x-ms-is-feed-unfiltered",ResourceTokenExpiry:"x-ms-documentdb-expiry-seconds",EnableScanInQuery:"x-ms-documentdb-query-enable-scan",EmitVerboseTracesInQuery:"x-ms-documentdb-query-emit-traces",EnableCrossPartitionQuery:"x-ms-documentdb-query-enablecrosspartition",ParallelizeCrossPartitionQuery:"x-ms-documentdb-query-parallelizecrosspartitionquery",ResponseContinuationTokenLimitInKB:"x-ms-documentdb-responsecontinuationtokenlimitinkb",PopulateQueryMetrics:"x-ms-documentdb-populatequerymetrics",QueryMetrics:"x-ms-documentdb-query-metrics",PopulateIndexMetrics:"x-ms-cosmos-populateindexmetrics",IndexUtilization:"x-ms-cosmos-index-ut
4ilization",Version:"x-ms-version",OwnerFullName:"x-ms-alt-content-path",OwnerId:"x-ms-content-path",PartitionKey:"x-ms-documentdb-partitionkey",PartitionKeyRangeID:"x-ms-documentdb-partitionkeyrangeid",StartEpk:"x-ms-start-epk",EndEpk:"x-ms-end-epk",ReadFeedKeyType:"x-ms-read-key-type",MaxEntityCount:"x-ms-root-entity-max-count",CurrentEntityCount:"x-ms-root-entity-current-count",CollectionQuotaInMb:"x-ms-collection-quota-mb",CollectionCurrentUsageInMb:"x-ms-collection-usage-mb",MaxMediaStorageUsageInMB:"x-ms-max-media-storage-usage-mb",CurrentMediaStorageUsageInMB:"x-ms-media-storage-usage-mb",RequestCharge:"x-ms-request-charge",PopulateQuotaInfo:"x-ms-documentdb-populatequotainfo",MaxResourceQuota:"x-ms-resource-quota",OfferType:"x-ms-offer-type",OfferThroughput:"x-ms-offer-throughput",AutoscaleSettings:"x-ms-cosmos-offer-autopilot-settings",DisableRUPerMinuteUsage:"x-ms-documentdb-disable-ru-per-minute-usage",IsRUPerMinuteUsed:"x-ms-documentdb-is-ru-per-minute-used",OfferIsRUPerMinuteThroughputEnabled:"x-ms-offer-is-ru-per-minute-throughput-enabled",IndexTransformationProgress:"x-ms-documentdb-collection-index-transformation-progress",LazyIndexingProgress:"x-ms-documentdb-collection-lazy-indexing-progress",IsUpsert:"x-ms-documentdb-is-upsert",SubStatus:"x-ms-substatus",EnableScriptLogging:"x-ms-documentdb-script-enable-logging",ScriptLogResults:"x-ms-documentdb-script-log-results",ALLOW_MULTIPLE_WRITES:"x-ms-cosmos-allow-tentative-writes",IsBatchRequest:"x-ms-cosmos-is-batch-request",IsBatchAtomic:"x-ms-cosmos-batch-atomic",BatchContinueOnError:"x-ms-cosmos-batch-continue-on-error",DedicatedGatewayPerRequestCacheStaleness:"x-ms-dedicatedgateway-max-age",ForceRefresh:"x-ms-force-refresh",PriorityLevel:"x-ms-cosmos-priority-level"},WritableLocations:"writableLocations",ReadableLocations:"readableLocations",LocationUnavailableExpirationTimeInMs:3e5,ENABLE_MULTIPLE_WRITABLE_LOCATIONS:"enableMultipleWriteLocations",ThrottleRetryCount:"x-ms-throttle-retry-count",ThrottleRetryWaitTimeInMs:"x-ms-throttle-retry-wait-time-ms",CurrentVersion:"2020-07-15",SDKName:"azure-cosmos-js",SDKVersion:"4.0.0",CosmosDbDiagnosticLevelEnvVarName:"AZURE_COSMOSDB_DIAGNOSTICS_LEVEL",DefaultMaxBulkRequestBodySizeInBytes:220201,Path:{Root:"/",DatabasesPathSegment:"dbs",CollectionsPathSegment:"colls",UsersPathSegment:"users",DocumentsPathSegment:"docs",PermissionsPathSegment:"permissions",StoredProceduresPathSegment:"sprocs",TriggersPathSegment:"triggers",UserDefinedFunctionsPathSegment:"udfs",ConflictsPathSegment:"conflicts",AttachmentsPathSegment:"attachments",PartitionKeyRangesPathSegment:"pkranges",SchemasPathSegment:"schemas",OffersPathSegment:"offers",TopologyPathSegment:"topology",DatabaseAccountPathSegment:"databaseaccount"},PartitionKeyRange:{MinInclusive:"minInclusive",MaxExclusive:"maxExclusive",Id:"id"},EffectivePartitionKeyConstants:{MinimumInclusiveEffectivePartitionKey:"",MaximumExclusiveEffectivePartitionKey:"FF"}};!function(e){e.none="",e.database="dbs",e.offer="offers",e.user="users",e.permission="permissions",e.container="colls",e.conflicts="conflicts",e.sproc="sprocs",e.udf="udfs",e.trigger="triggers",e.item="docs",e.pkranges="pkranges",e.partitionkey="partitionKey"}(z||(z={})),function(e){e.get="GET",e.patch="PATCH",e.post="POST",e.put="PUT",e.delete="DELETE"}(F||(F={})),function(e){e.Create="create",e.Replace="replace",e.Upsert="upsert",e.Delete="delete",e.Read="read",e.Query="query",e.Execute="execute",e.Batch="batch",e.Patch="patch"}(j||(j={})),function(e){e.PrimaryMaster="PRIMARY_MASTER",e.SecondaryMaster="SECONDARY_MASTER",e.PrimaryReadOnly="PRIMARY_READONLY",e.SecondaryReadOnly="SECONDARY_READONLY"}($||($={})),function(e){e.Item="ITEM",e.StoredProcedure="STORED_PROCEDURE",e.UserDefinedFunction="USER_DEFINED_FUNCTION",e.Trigger="TRIGGER"}(K||(K={})),function(e){e[e.ScopeAccountReadValue=1]="ScopeAccountReadValue",e[e.ScopeAccountListDatabasesValue=2]="ScopeAccountListDatabasesValue",e[e.ScopeDatabaseReadValue=4]="ScopeDatabaseReadValue",e[e.ScopeDatabaseReadOfferValue=8]="ScopeDatabaseReadOfferValue",e[e.ScopeDatabaseListContainerValue=16]="ScopeDatabaseListContainerValue",e[e.ScopeContainerReadValue=32]="ScopeContainerReadValue",e[e.ScopeContainerReadOfferValue=64]="ScopeContainerReadOfferValue",e[e.ScopeAccountCreateDatabasesValue=1]="ScopeAccountCreateDatabasesValue",e[e.ScopeAccountDeleteDatabasesValue=2]="ScopeAccountDeleteDatabasesValue",e[e.ScopeDatabaseDeleteValue=4]="ScopeDatabaseDeleteValue",e[e.ScopeDatabaseReplaceOfferValue=8]="ScopeDatabaseReplaceOfferValue",e[e.ScopeDatabaseCreateContainerValue=16]="ScopeDatabaseCreateContainerValue",e[e.ScopeDatabaseDeleteContainerValue=32]="ScopeDatabaseDeleteContainerValue",e[e.ScopeContainerReplaceValue=64]="ScopeContainerReplaceValue",e[e.ScopeContainerDeleteValue=128]="ScopeContainerDeleteValue",e[e.ScopeContainerReplaceOfferValue=256]="ScopeContainerReplaceOfferValue",e[e.ScopeAccountReadAllAccessValue=65535]="ScopeAccountReadAllAccessValue",e[e.ScopeDatabaseReadAllAccessValue=124]="ScopeDatabaseReadAllAccessValue",e[e.ScopeContainersReadAllAccessValue=96]="ScopeContainersReadAllAccessValue",e[e.ScopeAccountWriteAllAccessValue=65535]="ScopeAccountWriteAllAccessValue",e[e.ScopeDatabaseWriteAllAccessValue=508]="ScopeDatabaseWriteAllAccessValue",e[e.ScopeContainersWriteAllAccessValue=448]="ScopeContainersWriteAllAccessValue",e[e.ScopeContainerExecuteQueriesValue=1]="ScopeContainerExecuteQueriesValue",e[e.ScopeContainerReadFeedsValue=2]="ScopeContainerReadFeedsValue",e[e.ScopeContainerReadStoredProceduresValue=4]="ScopeContainerReadStoredProceduresValue",e[e.ScopeContainerReadUserDefinedFunctionsValue=8]="ScopeContainerReadUserDefinedFunctionsValue",e[e.ScopeContainerReadTriggersValue=16]="ScopeContainerReadTriggersValue",e[e.ScopeContainerReadConflictsValue=32]="ScopeContainerReadConflictsValue",e[e.ScopeItemReadValue=64]="ScopeItemReadValue",e[e.ScopeStoredProcedureReadValue=128]="ScopeStoredProcedureReadValue",e[e.ScopeUserDefinedFunctionReadValue=256]="ScopeUserDefinedFunctionReadValue",e[e.ScopeTriggerReadValue=512]="ScopeTriggerReadValue",e[e.ScopeContainerCreateItemsValue=1]="ScopeContainerCreateItemsValue",e[e.ScopeContainerReplaceItemsValue=2]="ScopeContainerReplaceItemsValue",e[e.ScopeContainerUpsertItemsValue=4]="ScopeContainerUpsertItemsValue",e[e.ScopeContainerDeleteItemsValue=8]="ScopeContainerDeleteItemsValue",e[e.ScopeContainerCreateStoredProceduresValue=16]="ScopeContainerCreateStoredProceduresValue",e[e.ScopeContainerReplaceStoredProceduresValue=32]="ScopeContainerReplaceStoredProceduresValue",e[e.ScopeContainerDeleteStoredProceduresValue=64]="ScopeContainerDeleteStoredProceduresValue",e[e.ScopeContainerExecuteStoredProceduresValue=128]="ScopeContainerExecuteStoredProceduresValue",e[e.ScopeContainerCreateTriggersValue=256]="ScopeContainerCreateTriggersValue",e[e.ScopeContainerReplaceTriggersValue=512]="ScopeContainerReplaceTriggersValue",e[e.ScopeContainerDeleteTriggersValue=1024]="ScopeContainerDeleteTriggersValue",e[e.ScopeContainerCreateUserDefinedFunctionsValue=2048]="ScopeContainerCreateUserDefinedFunctionsValue",e[e.ScopeContainerReplaceUserDefinedFunctionsValue=4096]="ScopeContainerReplaceUserDefinedFunctionsValue",e[e.ScopeContainerDeleteUserDefinedFunctionSValue=8192]="ScopeContainerDeleteUserDefinedFunctionSValue",e[e.ScopeContainerDeleteCONFLICTSValue=16384]="ScopeContainerDeleteCONFLICTSValue",e[e.ScopeItemReplaceValue=65536]="ScopeItemReplaceValue",e[e.ScopeItemUpsertValue=131072]="ScopeItemUpsertValue",e[e.ScopeItemDeleteValue=262144]="ScopeItemDeleteValue",e[e.ScopeStoredProcedureReplaceValue=1048576]="ScopeStoredProcedureReplaceValue",e[e.ScopeStoredProcedureDeleteValue=2097152]="ScopeStoredProcedureDeleteValue",e[e.ScopeStoredProcedureExecuteValue=4194304]="ScopeStoredProcedureExecuteValue",e[e.ScopeUserDefinedFunctionReplaceValue=8388608]="ScopeUserDefinedFunctionReplaceValue",e[e.ScopeUserDefinedFunctionDeleteValue=0x1000000]="ScopeUserDefinedFunctionDeleteValue",e[e.ScopeTriggerReplaceValue=0x2000000]="ScopeTriggerReplaceValue",e[e.ScopeTriggerDeleteValue=0x4000000]="ScopeTriggerDeleteValue",e[e.ScopeContainerReadAllAccessValue=0xffffffff]="ScopeContainerReadAllAccessValue",e[e.ScopeItemReadAllAccessValue=65]="ScopeItemReadAllAccessValue",e[e.ScopeContainerWriteAllAccessValue=0xffffffff]="ScopeContainerWriteAllAccessValue",e[e.ScopeItemWriteAllAccessValue=458767]="ScopeItemWriteAllAccessValue",e[e.NoneValue=0]="NoneValue"}(V||(V={})),function(e){e[e.ContainerCreateItems=1]="ContainerCreateItems",e[e.ContainerReplaceItems=2]="ContainerReplaceItems",e[e.ContainerUpsertItems=4]="ContainerUpsertItems",e[e.ContainerDeleteItems=128]="ContainerDeleteItems",e[e.ContainerExecuteQueries=1]="ContainerExecuteQueries",e[e.ContainerReadFeeds=2]="ContainerReadFeeds",e[e.ContainerCreateStoreProcedure=16]="ContainerCreateStoreProcedure",e[e.ContainerReadStoreProcedure=4]="ContainerReadStoreProcedure",e[e.ContainerReplaceStoreProcedure=32]="ContainerReplaceStoreProcedure",e[e.ContainerDeleteStoreProcedure=64]="ContainerDeleteStoreProcedure",e[e.ContainerCreateTriggers=256]="ContainerCreateTriggers",e[e.ContainerReadTriggers=16]="ContainerReadTriggers",e[e.ContainerReplaceTriggers=512]="ContainerReplaceTriggers",e[e.ContainerDeleteTriggers=1024]="ContainerDeleteTriggers",e[e.ContainerCreateUserDefinedFunctions=2048]="ContainerCreateUserDefinedFunctions",e[e.ContainerReadUserDefinedFunctions=8]="ContainerReadUserDefinedFunctions",e[e.ContainerReplaceUserDefinedFunctions=4096]="ContainerReplaceUserDefinedFunctions",e[e.ContainerDeleteUserDefinedFunctions=8192]="ContainerDeleteUserDefinedFunctions",e[e.ContainerExecuteStoredProcedure=128]="ContainerExecuteStoredProcedure",e[e.ContainerReadConflicts=32]="ContainerReadConflicts",e[e.ContainerDeleteConflicts=16384]="ContainerDeleteConflicts",e[e.ContainerReadAny=64]="ContainerReadAny",e[e.ContainerFullAccess=0xffffffff]="ContainerFullAccess",e[e.ItemReadAny=65536]="ItemReadAny",e[e.ItemFullAccess=65]="ItemFullAccess",e[e.ItemRead=64]="ItemRead",e[e.ItemReplace=65536]="ItemReplace",e[e.ItemUpsert=131072]="ItemUpsert",e[e.ItemDelete=262144]="ItemDelete",e[e.StoreProcedureRead=128]="StoreProcedureRead",e[e.StoreProcedureReplace=1048576]="StoreProcedureReplace",e[e.StoreProcedureDelete=2097152]="StoreProcedureDelete",e[e.StoreProcedureExecute=4194304]="StoreProcedureExecute",e[e.UserDefinedFuntionRead=256]="UserDefinedFuntionRead",e[e.UserDefinedFuntionReplace=8388608]="UserDefinedFuntionReplace",e[e.UserDefinedFuntionDelete=0x1000000]="UserDefinedFuntionDelete",e[e.TriggerRead=512]="TriggerRead",e[e.TriggerReplace=0x2000000]="TriggerReplace",e[e.TriggerDelete=0x4000000]="TriggerDelete"}(W||(W={}));let l=RegExp("^[/]+"),c=RegExp("[/]+$"),u=RegExp("[/\\\\?#]"),h=RegExp("[/\\\\#]");function d(e){let t,r;if(0===e.length)return{type:void 0,objectBody:void 0};"/"!==e[e.length-1]&&(e+="/"),"/"!==e[0]&&(e="/"+e);let i=e.split("/");return i.length%2==0?(t=i[i.length-2],r=i[i.length-3]):(t=i[i.length-3],r=i[i.length-2]),{type:r,objectBody:{id:t,self:e}}}function p(e){return e===j.Read||e===j.Query}function f(e){return e.split("/").slice(0,4).join("/")}function g(e){return e.replace(l,"").replace(c,"")}function m(e,t){if(e.id){if("string"!=typeof e.id)return t.message="Id must be a string.",!1;
4if(-1!==e.id.indexOf("/")||-1!==e.id.indexOf("\\")||-1!==e.id.indexOf("?")||-1!==e.id.indexOf("#"))return t.message="Id contains illegal chars.",!1;if(" "===e.id[e.id.length-1])return t.message="Id ends with a space.",!1}return!0}function y(e,t){if(e.id){if("string"!=typeof e.id)return t.message="Id must be a string.",!1;if(-1!==e.id.indexOf("/")||-1!==e.id.indexOf("\\")||-1!==e.id.indexOf("#"))return t.message="Id contains illegal chars.",!1}return!0}function b(e,t){return(e=g(e),t)?"/"+encodeURI(e)+"/"+t:"/"+encodeURI(e)}function v(e){return!e||/^\s*$/.test(e)}function w(e){if("string"!=typeof e)throw Error("invalid input: input is not string");return e.replace(l,"").replace(c,"")}function x(e){if("string"!=typeof e||v(e))throw Error("Resource ID must be a string and cannot be undefined, null or empty");if(u.test(e))throw Error("Illegal characters ['/', '\\', '#', '?'] cannot be used in Resource ID");return!0}let S={Ok:200,NotModified:304,BadRequest:400,Forbidden:403,NotFound:404,Conflict:409,Gone:410,PreconditionFailed:412,TooManyRequests:429,ServiceUnavailable:503,ENOTFOUND:"ENOTFOUND"},C={PartitionKeyRangeGone:1002,CompletingSplit:1007,ReadSessionNotAvailable:1002,WriteForbidden:3,DatabaseAccountNotFound:1008};class E{constructor(e){this.requestCharge=e}add(...e){let t=this.requestCharge;for(let r of e){if(null==r)throw Error("clientSideMetrics has null or undefined item(s)");t+=r.requestCharge}return new E(t)}static createFromArray(...e){if(null==e)throw Error("clientSideMetricsArray is null or undefined item(s)");return this.zero.add(...e)}}E.zero=new E(0);let _={RetrievedDocumentCount:"retrievedDocumentCount",RetrievedDocumentSize:"retrievedDocumentSize",OutputDocumentCount:"outputDocumentCount",OutputDocumentSize:"outputDocumentSize",IndexHitRatio:"indexUtilizationRatio",TotalQueryExecutionTimeInMs:"totalExecutionTimeInMs",QueryCompileTimeInMs:"queryCompileTimeInMs",LogicalPlanBuildTimeInMs:"queryLogicalPlanBuildTimeInMs",PhysicalPlanBuildTimeInMs:"queryPhysicalPlanBuildTimeInMs",QueryOptimizationTimeInMs:"queryOptimizationTimeInMs",IndexLookupTimeInMs:"indexLookupTimeInMs",DocumentLoadTimeInMs:"documentLoadTimeInMs",VMExecutionTimeInMs:"VMExecutionTimeInMs",DocumentWriteTimeInMs:"writeOutputTimeInMs",SystemFunctionExecuteTimeInMs:"systemFunctionExecuteTimeInMs",UserDefinedFunctionExecutionTimeInMs:"userFunctionExecuteTimeInMs"},T=Number.MAX_SAFE_INTEGER/1e4,P=Number.MIN_SAFE_INTEGER/1e4;class R{constructor(e,t,r,i,n){if(!Number.isInteger(e))throw Error("days is not an integer");if(!Number.isInteger(t))throw Error("hours is not an integer");if(!Number.isInteger(r))throw Error("minutes is not an integer");if(!Number.isInteger(i))throw Error("seconds is not an integer");if(!Number.isInteger(n))throw Error("milliseconds is not an integer");let s=(3600*e*24+3600*t+60*r+i)*1e3+n;if(s>T||s<P)throw Error("Total number of milliseconds was either too large or too small");this._ticks=1e4*s}add(e){if(R.additionDoesOverflow(this._ticks,e._ticks))throw Error("Adding the two timestamps causes an overflow.");let t=this._ticks+e._ticks;return R.fromTicks(t)}subtract(e){if(R.subtractionDoesUnderflow(this._ticks,e._ticks))throw Error("Subtracting the two timestamps causes an underflow.");let t=this._ticks-e._ticks;return R.fromTicks(t)}compareTo(e){if(null==e)return 1;if(!R.isTimeSpan(e))throw Error("Argument must be a TimeSpan object");return R.compare(this,e)}duration(){return R.fromTicks(this._ticks>=0?this._ticks:-this._ticks)}equals(e){return!!R.isTimeSpan(e)&&this._ticks===e._ticks}negate(){return R.fromTicks(-this._ticks)}days(){return Math.floor(this._ticks/864e9)}hours(){return Math.floor(this._ticks/36e9)}milliseconds(){return Math.floor(this._ticks/1e4)}seconds(){return Math.floor(this._ticks/1e7)}ticks(){return this._ticks}totalDays(){return 11574074074074074e-28*this._ticks}totalHours(){return 27777777777777777e-27*this._ticks}totalMilliseconds(){return 1e-4*this._ticks}totalMinutes(){return 16666666666666667e-25*this._ticks}totalSeconds(){return 1e-7*this._ticks}static fromTicks(e){let t=new R(0,0,0,0,0);return t._ticks=e,t}static isTimeSpan(e){return e._ticks}static additionDoesOverflow(e,t){let r=e+t;return e!==r-t||t!==r-e}static subtractionDoesUnderflow(e,t){let r=e-t;return e!==r+t||t!==e-r}static compare(e,t){return e._ticks>t._ticks?1:e._ticks<t._ticks?-1:0}static interval(e,t){if(isNaN(e))throw Error("value must be a number");let r=e*t;if(r>T||r<P)throw Error("timespan too long");return R.fromTicks(Math.floor(1e4*r))}static fromMilliseconds(e){return R.interval(e,1)}static fromSeconds(e){return R.interval(e,1e3)}static fromMinutes(e){return R.interval(e,6e4)}static fromHours(e){return R.interval(e,36e5)}static fromDays(e){return R.interval(e,864e5)}}function I(e){if(null==e)throw Error("delimitedString is null or undefined");let t={};for(let r of e.split(";")){let e=r.split("=");if(2!==e.length)throw Error("recieved a malformed delimited string");let i=e[0],n=parseFloat(e[1]);t[i]=n}return t}function O(e,t){return t in e?R.fromMilliseconds(e[t]):R.zero}R.zero=new R(0,0,0,0,0),R.maxValue=R.fromTicks(Number.MAX_SAFE_INTEGER),R.minValue=R.fromTicks(Number.MIN_SAFE_INTEGER);
4class A{constructor(e,t,r,i){this.queryCompilationTime=e,this.logicalPlanBuildTime=t,this.physicalPlanBuildTime=r,this.queryOptimizationTime=i}add(...e){let t=this.queryCompilationTime,r=this.logicalPlanBuildTime,i=this.physicalPlanBuildTime,n=this.queryOptimizationTime;for(let s of e){if(null==s)throw Error("queryPreparationTimesArray has null or undefined item(s)");t=t.add(s.queryCompilationTime),r=r.add(s.logicalPlanBuildTime),i=i.add(s.physicalPlanBuildTime),n=n.add(s.queryOptimizationTime)}return new A(t,r,i,n)}toDelimitedString(){return`${_.QueryCompileTimeInMs}=${this.queryCompilationTime.totalMilliseconds()};${_.LogicalPlanBuildTimeInMs}=${this.logicalPlanBuildTime.totalMilliseconds()};${_.PhysicalPlanBuildTimeInMs}=${this.physicalPlanBuildTime.totalMilliseconds()};${_.QueryOptimizationTimeInMs}=${this.queryOptimizationTime.totalMilliseconds()}`}static createFromArray(e){if(null==e)throw Error("queryPreparationTimesArray is null or undefined item(s)");return A.zero.add(...e)}static createFromDelimitedString(e){let t=I(e);return new A(O(t,_.QueryCompileTimeInMs),O(t,_.LogicalPlanBuildTimeInMs),O(t,_.PhysicalPlanBuildTimeInMs),O(t,_.QueryOptimizationTimeInMs))}}A.zero=new A(R.zero,R.zero,R.zero,R.zero);class M{constructor(e,t,r){this.queryEngineExecutionTime=e,this.systemFunctionExecutionTime=t,this.userDefinedFunctionExecutionTime=r}add(...e){let t=this.queryEngineExecutionTime,r=this.systemFunctionExecutionTime,i=this.userDefinedFunctionExecutionTime;for(let n of e){if(null==n)throw Error("runtimeExecutionTimes has null or undefined item(s)");t=t.add(n.queryEngineExecutionTime),r=r.add(n.systemFunctionExecutionTime),i=i.add(n.userDefinedFunctionExecutionTime)}return new M(t,r,i)}toDelimitedString(){return`${_.SystemFunctionExecuteTimeInMs}=${this.systemFunctionExecutionTime.totalMilliseconds()};${_.UserDefinedFunctionExecutionTimeInMs}=${this.userDefinedFunctionExecutionTime.totalMilliseconds()}`}static createFromArray(e){if(null==e)throw Error("runtimeExecutionTimesArray is null or undefined item(s)");return M.zero.add(...e)}static createFromDelimitedString(e){let t=I(e),r=O(t,_.VMExecutionTimeInMs),i=O(t,_.IndexLookupTimeInMs),n=O(t,_.DocumentLoadTimeInMs),s=O(t,_.DocumentWriteTimeInMs),o=R.zero;return new M(o=(o=(o=(o=o.add(r)).subtract(i)).subtract(n)).subtract(s),O(t,_.SystemFunctionExecuteTimeInMs),O(t,_.UserDefinedFunctionExecutionTimeInMs))}}M.zero=new M(R.zero,R.zero,R.zero);class k{constructor(e,t,r,i,n,s,o,a,l,c,u,h,d){this.retrievedDocumentCount=e,this.retrievedDocumentSize=t,this.outputDocumentCount=r,this.outputDocumentSize=i,this.indexHitDocumentCount=n,this.totalQueryExecutionTime=s,this.queryPreparationTimes=o,this.indexLookupTime=a,this.documentLoadTime=l,this.vmExecutionTime=c,this.runtimeExecutionTimes=u,this.documentWriteTime=h,this.clientSideMetrics=d}get indexHitRatio(){return 0===this.retrievedDocumentCount?1:this.indexHitDocumentCount/this.retrievedDocumentCount}add(e){let t=0,r=0,i=0,n=0,s=0,o=R.zero,a=[],l=R.zero,c=R.zero,u=R.zero,h=[],d=R.zero,p=[];for(let f of(e.push(this),e))f&&(t+=f.retrievedDocumentCount,r+=f.retrievedDocumentSize,i+=f.outputDocumentCount,n+=f.outputDocumentSize,s+=f.indexHitDocumentCount,o=o.add(f.totalQueryExecutionTime),a.push(f.queryPreparationTimes),l=l.add(f.indexLookupTime),c=c.add(f.documentLoadTime),u=u.add(f.vmExecutionTime),h.push(f.runtimeExecutionTimes),d=d.add(f.documentWriteTime),p.push(f.clientSideMetrics));return new k(t,r,i,n,s,o,A.createFromArray(a),l,c,u,M.createFromArray(h),d,E.createFromArray(...p))}toDelimitedString(){return _.RetrievedDocumentCount+"="+this.retrievedDocumentCount+";"+_.RetrievedDocumentSize+"="+this.retrievedDocumentSize+";"+_.OutputDocumentCount+"="+this.outputDocumentCount+";"+_.OutputDocumentSize+"="+this.outputDocumentSize+";"+_.IndexHitRatio+"="+this.indexHitRatio+";"+_.TotalQueryExecutionTimeInMs+"="+this.totalQueryExecutionTime.totalMilliseconds()+";"+this.queryPreparationTimes.toDelimitedString()+";"+_.IndexLookupTimeInMs+"="+this.indexLookupTime.totalMilliseconds()+";"+_.DocumentLoadTimeInMs+"="+this.documentLoadTime.totalMilliseconds()+";
4"+_.VMExecutionTimeInMs+"="+this.vmExecutionTime.totalMilliseconds()+";"+this.runtimeExecutionTimes.toDelimitedString()+";"+_.DocumentWriteTimeInMs+"="+this.documentWriteTime.totalMilliseconds()}static createFromArray(e){if(!e)throw Error("queryMetricsArray is null or undefined item(s)");return k.zero.add(e)}static createFromDelimitedString(e,t){let r=I(e),i=r[_.IndexHitRatio]||0,n=r[_.RetrievedDocumentCount]||0,s=r[_.OutputDocumentCount]||0,o=r[_.OutputDocumentSize]||0;return new k(n,r[_.RetrievedDocumentSize]||0,s,o,i*n,O(r,_.TotalQueryExecutionTimeInMs),A.createFromDelimitedString(e),O(r,_.IndexLookupTimeInMs),O(r,_.DocumentLoadTimeInMs),O(r,_.VMExecutionTimeInMs),M.createFromDelimitedString(e),O(r,_.DocumentWriteTimeInMs),t||E.zero)}}function N(e){if("number"==typeof e)return e;if("string"==typeof e)return parseFloat(e);if(!e)return 0;{let t=e[a.HttpHeaders.RequestCharge];return t?parseFloat(t):0}}function L(){let e={};return e[a.HttpHeaders.RequestCharge]=0,e[a.HttpHeaders.QueryMetrics]={},e}function D(e,t){if(void 0===e[a.HttpHeaders.RequestCharge]&&(e[a.HttpHeaders.RequestCharge]=0),void 0===e[a.HttpHeaders.QueryMetrics]&&(e[a.HttpHeaders.QueryMetrics]=k.zero),t){if(e[a.HttpHeaders.RequestCharge]+=N(t),t[a.HttpHeaders.IsRUPerMinuteUsed]&&(e[a.HttpHeaders.IsRUPerMinuteUsed]=t[a.HttpHeaders.IsRUPerMinuteUsed]),a.HttpHeaders.QueryMetrics in t){let r=e[a.HttpHeaders.QueryMetrics],i=t[a.HttpHeaders.QueryMetrics];for(let e in i)if(r[e]){let t=r[e].add([i[e]]);r[e]=t}else r[e]=i[e]}a.HttpHeaders.IndexUtilization in t&&(e[a.HttpHeaders.IndexUtilization]=t[a.HttpHeaders.IndexUtilization])}}function B(e){return this instanceof B?(this.v=e,this):new B(e)}function q(e,t,r){if(!Symbol.asyncIterator)throw TypeError("Symbol.asyncIterator is not defined.");var i,n=r.apply(e,t||[]),s=[];return i={},o("next"),o("throw"),o("return"),i[Symbol.asyncIterator]=function(){return this},i;function o(e){n[e]&&(i[e]=function(t){return new Promise(function(r,i){s.push([e,t,r,i])>1||a(e,t)})})}function a(e,t){try{var r;(r=n[e](t)).value instanceof B?Promise.resolve(r.value.v).then(l,c):u(s[0][2],r)}catch(e){u(s[0][3],e)}}function l(e){a("next",e)}function c(e){a("throw",e)}function u(e,t){e(t),s.shift(),s.length&&a(s[0][0],s[0][1])}}function U(){return Date.now()}k.zero=new k(0,0,0,0,0,R.zero,A.zero,R.zero,R.zero,R.zero,M.zero,R.zero,E.zero),Object.create,Object.create;class H{constructor(){this.failedAttempts=[],this.metadataLookups=[],this.gaterwayStatistics=[],this.locationEndpointsContacted=new Set,this.requestStartTimeUTCinMs=U()}recordFailedAttempt(e,t){let r={attemptNumber:t,startTimeUTCInMs:e.startTimeUTCInMs,durationInMs:e.durationInMs,statusCode:e.statusCode,substatusCode:e.subStatusCode,requestPayloadLengthInBytes:e.requestPayloadLengthInBytes,responsePayloadLengthInBytes:e.responsePayloadLengthInBytes,activityId:e.activityId,operationType:e.operationType,resourceType:e.resourceType};this.failedAttempts.push(r)}recordNetworkCall(e){this.gaterwayStatistics.push(e)}mergeDiagnostics(e,t){e.locationEndpointsContacted.forEach(e=>this.locationEndpointsContacted.add(e)),e.gaterwayStatistics.forEach(e=>this.metadataLookups.push({activityId:e.activityId,requestPayloadLengthInBytes:e.requestPayloadLengthInBytes,responsePayloadLengthInBytes:e.responsePayloadLengthInBytes,startTimeUTCInMs:e.startTimeUTCInMs,operationType:e.operationType,resourceType:e.resourceType,durationInMs:e.durationInMs,metaDataType:t})),e.metadataLookups.forEach(e=>this.metadataLookups.push(e)),e.failedAttempts.forEach(e=>this.failedAttempts.push(e))}getClientSideStats(e=U()){return{requestStartTimeUTCInMs:this.requestStartTimeUTCinMs,requestDurationInMs:e-this.requestStartTimeUTCinMs,totalRequestPayloadLengthInBytes:this.getTotalRequestPayloadLength(),totalResponsePayloadLengthInBytes:this.getTotalResponsePayloadLength(),locationEndpointsContacted:[...this.locationEndpointsContacted.values()],metadataDiagnostics:{metadataLookups:[...this.metadataLookups]},retryDiagnostics:{failedAttempts:[...this.failedAttempts]},gatewayStatistics:this.gaterwayStatistics}}getTotalRequestPayloadLength(){let e=0;return this.gaterwayStatistics.forEach(t=>e+=t.requestPayloadLengthInBytes),this.metadataLookups.forEach(t=>
4e+=t.requestPayloadLengthInBytes),this.failedAttempts.forEach(t=>e+=t.requestPayloadLengthInBytes),e}getTotalResponsePayloadLength(){let e=0;return this.gaterwayStatistics.forEach(t=>e+=t.responsePayloadLengthInBytes),this.metadataLookups.forEach(t=>e+=t.responsePayloadLengthInBytes),this.failedAttempts.forEach(t=>e+=t.responsePayloadLengthInBytes),e}recordEndpointResolution(e){this.locationEndpointsContacted.add(e)}}var z,F,j,$,K,V,W,Q,G,X,J,Y,Z,ee,et,er,ei,en,es,eo,ea=new Uint8Array(16);let el=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var ec=[],eu=0;eu<256;++eu)ec.push((eu+256).toString(16).substr(1));let eh=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(ec[e[t+0]]+ec[e[t+1]]+ec[e[t+2]]+ec[e[t+3]]+"-"+ec[e[t+4]]+ec[e[t+5]]+"-"+ec[e[t+6]]+ec[e[t+7]]+"-"+ec[e[t+8]]+ec[e[t+9]]+"-"+ec[e[t+10]]+ec[e[t+11]]+ec[e[t+12]]+ec[e[t+13]]+ec[e[t+14]]+ec[e[t+15]]).toLowerCase();if(!("string"==typeof r&&el.test(r)))throw TypeError("Stringified UUID is invalid");return r},ed=function(e,t,r){var i=(e=e||{}).random||(e.rng||function(){if(!Q&&!(Q="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return Q(ea)})();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,t){r=r||0;for(var n=0;n<16;++n)t[r+n]=i[n];return t}return eh(i)};class ep{constructor(e,t,r){this.clientSideRequestStatistics=e,this.diagnosticNode=t,this.clientConfig=r}}!function(e){e.PartitionKeyRangeLookUp="PARTITION_KEY_RANGE_LOOK_UP",e.DatabaseAccountLookUp="DATABASE_ACCOUNT_LOOK_UP",e.QueryPlanLookUp="QUERY_PLAN_LOOK_UP",e.DatabaseLookUp="DATABASE_LOOK_UP",e.ContainerLookUp="CONTAINER_LOOK_UP"}(G||(G={})),!function(e){e.info="info",e.debug="debug",e.debugUnsafe="debug-unsafe"}(X||(X={}));let ef=[X.info,X.debug,X.debugUnsafe];function eg(e,t){let r=ef.indexOf(e),i=ef.indexOf(t);return -1!==r&&-1!==i&&r<=i}class em{constructor(e,t,r,i={},n=U(),s=new H){this.id=ed(),this.nodeType=t,this.startTimeUTCInMs=n,this.data=i,this.children=[],this.durationInMs=0,this.parent=r,this.diagnosticCtx=s,this.diagnosticLevel=e}addLog(e){this.data.log||(this.data.log=[]),this.data.log.push(e)}sanitizeHeaders(e){return e}updateTimestamp(e=U()){this.durationInMs=e-this.startTimeUTCInMs}recordSuccessfulNetworkCall(e,t,r,i,n){var s,o;let l={activityId:r.headers.toJSON()[a.HttpHeaders.ActivityId],startTimeUTCInMs:e,durationInMs:U()-e,statusCode:r.status,subStatusCode:i,requestPayloadLengthInBytes:ey(t),responsePayloadLengthInBytes:(null==(o=null==(s=r)?void 0:s.bodyAsText)?void 0:o.length)||0,operationType:t.operationType,resourceType:t.resourceType,partitionKeyRangeId:t.partitionKeyRangeId},c={OperationType:l.operationType,resourceType:l.resourceType,requestPayloadLengthInBytes:l.requestPayloadLengthInBytes};eg(X.debugUnsafe,this.diagnosticLevel)&&(c=Object.assign(Object.assign({},c),{headers:this.sanitizeHeaders(t.headers),requestBody:t.body,responseBody:r.bodyAsText,url:n})),this.addData({requestPayloadLengthInBytes:l.requestPayloadLengthInBytes,responsePayloadLengthInBytes:l.responsePayloadLengthInBytes,startTimeUTCInMs:l.startTimeUTCInMs,durationInMs:l.durationInMs,requestData:c}),this.diagnosticCtx.recordNetworkCall(l)}recordFailedNetworkCall(e,t,r,i,n,s){var o,l;this.addData({failedAttempty:!0});let c=ey(t);this.diagnosticCtx.recordFailedAttempt({activityId:s[a.HttpHeaders.ActivityId],startTimeUTCInMs:e,durationInMs:U()-e,statusCode:i,subStatusCode:n,requestPayloadLengthInBytes:c,responsePayloadLengthInBytes:0,operationType:t.operationType,resourceType:t.resourceType},r);let u={OperationType:t.operationType,resourceType:t.resourceType,requestPayloadLengthInBytes:c};eg(X.debugUnsafe,this.diagnosticLevel)&&(u=Object.assign(Object.assign({},u),{headers:this.sanitizeHeaders(t.headers),requestBody:t.body,url:(o=t.endpoint,l=t.path,g(o)+l)})),this.addData({failedAttempty:!0,requestData:u})}recordEndpointResolution(e){this.addData({selectedLocation:e}),this.diagnosticCtx.recordEndpointResolution(e)}addData(e,t,r=this.diagnosticLevel){r!==X.info&&(this.data=Object.assign(Object.assign({},this.data),e),t&&this.addLog(t))}addChildNode(e,t,r){return this.diagnosticCtx.mergeDiagnostics(e.diagnosticCtx,r),eg(t,this.diagnosticLevel)&&(e.parent=this,this.children.push(e)),e}initializeChildNode(e,t,r={}){if(!eg(t,this.diagnosticLevel))return this;{let t=new em(this.diagnosticLevel,e,this,r,U(),this.diagnosticCtx);return this.children.push(t),t}}recordQueryResult(e,t){var r;if(eg(t,this.diagnosticLevel)){let t=null!=(r=this.data.queryRecordsRead)?r:0;Array.isArray(e)&&(this.data.queryRecordsRead=t+e.length)}}toDiagnosticNode(){return{id:this.id,nodeType:this.nodeType,children:this.children.map(e=>e.toDiagnosticNode()),data:this.data,startTimeUTCInMs:this.startTimeUTCInMs,durationInMs:this.durationInMs}}toDiagnostic(e){let t=function e(t){return t.parent?e(t.parent):t}(this),r=eg(X.debug,this.diagnosticLevel)?t.toDiagnosticNode():void 0,i=eg(X.debug,this.diagnosticLevel)?e:void 0;return new ep(this.diagnosticCtx.getClientSideStats(),r,i)}}function ey(e){return e.body?e.body.length:0}!function(e){e.CLIENT_REQUEST_NODE="CLIENT_REQUEST_NODE",e.METADATA_REQUEST_NODE="METADATA_REQUEST_NODE",e.HTTP_REQUEST="HTTP_REQUEST",e.BATCH_REQUEST="BATCH_REQUEST",e.PARALLEL_QUERY_NODE="PARALLEL_QUERY_NODE",e.DEFAULT_QUERY_NODE="DEFAULT_QUERY_NODE",e.QUERY_REPAIR_NODE="QUERY_REPAIR_NODE",e.BACKGROUND_REFRESH_THREAD="BACKGROUND_REFRESH_THREAD",e.REQUEST_ATTEMPTS="REQUEST_ATTEMPTS"}(J||(J={}));var eb=r(17986);function ev(){return new ep({requestDurationInMs:0,requestStartTimeUTCInMs:U(),totalRequestPayloadLengthInBytes:0,totalResponsePayloadLengthInBytes:0,locationEndpointsContacted:[],retryDiagnostics:{failedAttempts:[]},metadataDiagnostics:{metadataLookups:[]},gatewayStatistics:[]},{id:ed(),nodeType:J.CLIENT_REQUEST_NODE,children:[],data:{},startTimeUTCInMs:U(),durationInMs:0})}async function ew(e,t,r,i={}){let n=t.initializeChildNode(r,X.debug,i);try{let t=await e(n);return n.updateTimestamp(),t}catch(e){throw n.addData({failure:!0}),n.updateTimestamp(),e}}async function ex(e,t,r){let i=new em(t.diagnosticLevel,J.METADATA_REQUEST_NODE,null);try{let n=await e(i);return t.addChildNode(i,X.debug,r),n}catch(e){throw t.addChildNode(i,X.debug,r),e}}async function eS(e,t,r=J.CLIENT_REQUEST_NODE){let i=new em(t.diagnosticLevel,r,null);try{let r=await e(i);i.updateTimestamp();let n=i.toDiagnostic(t.getClientConfig());return"object"==typeof r&&null!==r&&(r.diagnostics=n),t.recordDiagnostics(n),r}catch(r){i.updateTimestamp(),i.addData({failure:!0});let e=i.toDiagnostic(t.getClientConfig());throw r.diagnostics=e,t.recordDiagnostics(e),r}}let eC=(0,eb.KV)("ClientContext");!function(e){e.start="start",e.inProgress="inProgress",e.ended="ended"}(Y||(Y={}));class eE{get continuation(){return this.continuationToken}constructor(e,t){this.resources=[],this.currentIndex=0,this.currentPartitionIndex=0,this.fetchFunctions=Array.isArray(t)?t:[t],this.options=e||{},this.continuationToken=this.options.continuationToken||this.options.continuation||null,this.state=eE.STATES.start}async nextItem(e){return++this.currentIndex,await this.current(e)}
4async current(e){if(this.currentIndex<this.resources.length)return{result:this.resources[this.currentIndex],headers:L()};if(!this._canFetchMore())return this.state=eE.STATES.ended,{result:void 0,headers:L()};{let{result:t,headers:r}=await this.fetchMore(e);if(this.resources=t,0===this.resources.length)if(!this.continuationToken&&this.currentPartitionIndex>=this.fetchFunctions.length)return this.state=eE.STATES.ended,{result:void 0,headers:r};else return this.current(e);return{result:this.resources[this.currentIndex],headers:r}}}hasMoreResults(){return this.state===eE.STATES.start||void 0!==this.continuationToken||this.currentIndex<this.resources.length-1||this.currentPartitionIndex<this.fetchFunctions.length}async fetchMore(e){return ew(async e=>{let t,r;if(this.currentPartitionIndex>=this.fetchFunctions.length)return{headers:L(),result:void 0};let i=this.options.continuationToken||this.options.continuation;if(this.options.continuationToken=this.continuationToken,this.currentPartitionIndex>=this.fetchFunctions.length)return{headers:L(),result:void 0};try{let i;void 0!==this.nextFetchFunction?(eC.verbose("using prefetch"),i=this.nextFetchFunction,this.nextFetchFunction=void 0):(eC.verbose("using fresh fetch"),i=this.fetchFunctions[this.currentPartitionIndex](e,this.options));let n=await i;if(t=n.result,e.recordQueryResult(t,X.debugUnsafe),r=n.headers,this.continuationToken=r[a.HttpHeaders.Continuation],!this.continuationToken&&++this.currentPartitionIndex,this.options&&!0===this.options.bufferItems){let t=this.fetchFunctions[this.currentPartitionIndex];this.nextFetchFunction=t?t(e,Object.assign(Object.assign({},this.options),{continuationToken:this.continuationToken})):void 0}}catch(e){throw this.state=eE.STATES.ended,e}if(this.state=eE.STATES.inProgress,this.currentIndex=0,this.options.continuationToken=i,this.options.continuation=i,a.HttpHeaders.QueryMetrics in r){let e=r[a.HttpHeaders.QueryMetrics],t=k.createFromDelimitedString(e);if(a.HttpHeaders.RequestCharge in r){let e=Number(r[a.HttpHeaders.RequestCharge])||0;t=new k(t.retrievedDocumentCount,t.retrievedDocumentSize,t.outputDocumentCount,t.outputDocumentSize,t.indexHitDocumentCount,t.totalQueryExecutionTime,t.queryPreparationTimes,t.indexLookupTime,t.documentLoadTime,t.vmExecutionTime,t.runtimeExecutionTimes,t.documentWriteTime,new E(e))}r[a.HttpHeaders.QueryMetrics]={},r[a.HttpHeaders.QueryMetrics]["0"]=t}return{result:t,headers:r}},e,J.DEFAULT_QUERY_NODE,{queryMethodIdentifier:"fetchMore"})}_canFetchMore(){return this.state===eE.STATES.start||this.continuationToken&&this.state===eE.STATES.inProgress||this.currentPartitionIndex<this.fetchFunctions.length&&this.state===eE.STATES.inProgress}}eE.STATES=Y;class e_{constructor(e,t,r){this.executionContext=e,this.offset=t,this.limit=r}async nextItem(e){let t=L();for(;this.offset>0;){let{headers:r}=await this.executionContext.nextItem(e);this.offset--,D(t,r)}if(this.limit>0){let{result:r,headers:i}=await this.executionContext.nextItem(e);return this.limit--,D(t,i),{result:r,headers:t}}return{result:void 0,headers:L()}}hasMoreResults(){return(this.offset>0||this.limit>0)&&this.executionContext.hasMoreResults()}}class eT{constructor(e){this.executionContext=e}async nextItem(e){let{result:t,headers:r}=await this.executionContext.nextItem(e);return{result:void 0!==t?t.payload:void 0,headers:r}}hasMoreResults(){return this.executionContext.hasMoreResults()}}function eP(e){let t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return t}let eR="undefined"==typeof self?window:self;if(!eR)throw Error("Could not find global");let eI=eR.crypto||eR.msCrypto;if(!eI||!eI.subtle)throw Error("Browser does not support cryptography functions");async function eO(e){var t;let r=eP(e);return t=await eI.subtle.digest("SHA-256",r),Array.prototype.map.call(new Uint8Array(t),e=>("00"+e.toString(16)).slice(-2)).join("")}var eA=r(74593),eM=r.n(eA);async function ek(e){return eO(eM()(e))}class eN{constructor(e){this.executionContext=e}async nextItem(e){let{headers:t,result:r}=await this.executionContext.nextItem(e);if(r){let e=await ek(r);if(e===this.hashedLastResult)return{result:void 0,headers:t};this.hashedLastResult=e}return{result:r,headers:t}}hasMoreResults(){return this.executionContext.hasMoreResults()}}class eL{constructor(e){this.executionContext=e,this.hashedResults=new Set}async nextItem(e){let{headers:t,result:r}=await this.executionContext.nextItem(e);if(r){let e=await ek(r);if(this.hashedResults.has(e))return{result:void 0,headers:t};this.hashedResults.add(e)}return{result:r,headers:t}}hasMoreResults(){return this.executionContext.hasMoreResults()}}class eD{aggregate(e){null!=e&&null!=e.sum&&(null==this.sum&&(this.sum=0,this.count=0),this.sum+=e.sum,this.count+=e.count)}
4getResult(){if(null!=this.sum&&!(this.count<=0))return this.sum/this.count}}class eB{constructor(){this.value=0}aggregate(e){this.value+=e}getResult(){return this.value}}let eq=Object.freeze({NoValue:{ord:0},undefined:{ord:1},boolean:{ord:2,compFunc:(e,t)=>e===t?0:e>t?1:-1},number:{ord:4,compFunc:(e,t)=>e===t?0:e>t?1:-1},string:{ord:5,compFunc:(e,t)=>e===t?0:e>t?1:-1}});class eU{constructor(e){this.sortOrder=e}targetPartitionKeyRangeDocProdComparator(e,t){let r=e.getTargetParitionKeyRange().minInclusive,i=t.getTargetParitionKeyRange().minInclusive;return r===i?0:r>i?1:-1}compare(e,t){if(e.gotSplit())return -1;if(t.gotSplit())return 1;let r=this.getOrderByItems(e.peekBufferedItems()[0]),i=this.getOrderByItems(t.peekBufferedItems()[0]);this.validateOrderByItems(r,i);for(let e=0;e<r.length;e++){let t=this.compareOrderByItem(r[e],i[e]);if(0!==t){if("Ascending"===this.sortOrder[e])return t;else if("Descending"===this.sortOrder[e])return-t}}return this.targetPartitionKeyRangeDocProdComparator(e,t)}compareValue(e,t,r,i){if("object"===t||"object"===i)throw Error("Tried to compare an object type");let n=eq[t].ord,s=n-eq[i].ord;if(0!==s)return s;if(n===eq.undefined.ord||n===eq.NoValue.ord)return 0;let o=eq[t].compFunc;if(void 0===o)throw Error("Cannot find the comparison function");return o(e,r)}compareOrderByItem(e,t){let r=this.getType(e),i=this.getType(t);return this.compareValue(e.item,r,t.item,i)}validateOrderByItems(e,t){if(e.length!==t.length)throw Error(`Expected ${e.length}, but got ${t.length}.`);if(e.length!==this.sortOrder.length)throw Error("orderByItems cannot have a different size than sort orders.");for(let r=0;r<this.sortOrder.length;r++){let i=this.getType(e[r]),n=this.getType(t[r]);if(i!==n)throw Error(`Expected ${i}, but got ${n}. Cannot execute cross partition order-by queries on mixed types. Consider filtering your query using IS_STRING or IS_NUMBER to get around this exception.`)}}getType(e){if(void 0===e||void 0===e.item)return"NoValue";let t=typeof e.item;if(void 0===eq[t])throw Error(`unrecognizable type ${t}`);return t}getOrderByItems(e){return e.orderByItems}}class eH{constructor(){this.value=void 0,this.comparer=new eU(["Ascending"])}aggregate(e){void 0===this.value?this.value=e.max:this.comparer.compareValue(e.max,typeof e.max,this.value,typeof this.value)>0&&(this.value=e.max)}getResult(){return this.value}}class ez{constructor(){this.value=void 0,this.comparer=new eU(["Ascending"])}aggregate(e){if(void 0===this.value)this.value=e.min;else{let t=null===e.min?"NoValue":typeof e.min,r=null===this.value?"NoValue":typeof this.value;0>this.comparer.compareValue(e.min,t,this.value,r)&&(this.value=e.min)}}getResult(){return this.value}}class eF{aggregate(e){void 0!==e&&(void 0===this.sum?this.sum=e:this.sum+=e)}getResult(){return this.sum}}class ej{aggregate(e){void 0===this.value&&(this.value=e)}getResult(){return this.value}}function e$(e){switch(e){case"Average":return new eD;case"Count":return new eB;case"Max":return new eH;case"Min":return new ez;case"Sum":return new eF;default:return new ej}}let eK="__empty__",eV=e=>Object.keys(e).length>0?e.item2?e.item2:e.item:null;class eW{constructor(e,t){this.executionContext=e,this.queryInfo=t,this.groupings=new Map,this.aggregateResultArray=[],this.completed=!1}async nextItem(e){if(this.aggregateResultArray.length>0)return{result:this.aggregateResultArray.pop(),headers:L()};if(this.completed)return{result:void 0,headers:L()};let t=L();for(;this.executionContext.hasMoreResults();){let{result:r,headers:i}=await this.executionContext.nextItem(e);if(D(t,i),r){let e=r.groupByItems?await ek(r.groupByItems):eK,t=this.groupings.get(e),i=r.payload;if(t)Object.keys(i).map(e=>{let r=eV(i[e]?i[e]:new Map().set("item2",null));t.get(e).aggregate(r)});else{let t=new Map;this.groupings.set(e,t),Object.keys(i).map(e=>{let r=this.queryInfo.groupByAliasToAggregateType[e],n=e$(r);if(t.set(e,n),r){let t=eV(i[e]);n.aggregate(t)}else n.aggregate(i[e])})}}}for(let e of this.groupings.values()){let t={};for(let[r,i]of e.entries())t[r]=i.getResult();this.aggregateResultArray.push(t)}return this.completed=!0,{result:this.aggregateResultArray.pop(),headers:t}}hasMoreResults(){return this.executionContext.hasMoreResults()||this.aggregateResultArray.length>0}}var eQ=r(77765),eG=r.n(eQ),eX=r(86578),eJ=r.n(eX);
4class eY{constructor(e,t,r,i){this.min=e,this.max=t,this.isMinInclusive=r,this.isMaxInclusive=i}overlaps(e){return!(void 0===this||void 0===e||this.isEmpty()||e.isEmpty())&&(!!(this.min<=e.max)||!!(e.min<=this.max))&&(this.min!==e.max||!!(this.isMinInclusive&&e.isMaxInclusive))&&(e.min!==this.max||!!(e.isMinInclusive&&this.isMaxInclusive))}isFullRange(){return this.min===a.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey&&this.max===a.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey&&!0===this.isMinInclusive&&!1===this.isMaxInclusive}isEmpty(){return!(this.isMinInclusive&&this.isMaxInclusive)&&this.min===this.max}static parsePartitionKeyRange(e){return new eY(e[a.PartitionKeyRange.MinInclusive],e[a.PartitionKeyRange.MaxExclusive],!0,!1)}static parseFromDict(e){return new eY(e.min,e.max,e.isMinInclusive,e.isMaxInclusive)}}class eZ{constructor(e,t){this.orderedPartitionKeyRanges=e,this.orderedRanges=e.map(e=>new eY(e[a.PartitionKeyRange.MinInclusive],e[a.PartitionKeyRange.MaxExclusive],!0,!1)),this.orderedPartitionInfo=t}getOrderedParitionKeyRanges(){return this.orderedPartitionKeyRanges}getOverlappingRanges(e){let t=Array.isArray(e)?e:[e],r={};for(let e of t){let t;if(e.isEmpty())continue;if(e.isFullRange())return this.orderedPartitionKeyRanges;let i=this.orderedRanges.findIndex(t=>{if(e.min>t.min&&e.min<t.max||e.min===t.min||e.min===t.max)return!0});if(i<0)throw Error("error in collection routing map, queried value is less than the start range.");for(let r=this.orderedRanges.length-1;r>=0;r--){let i=this.orderedRanges[r];if(e.max>i.min&&e.max<i.max||e.max===i.min||e.max===i.max){t=r;break}}if(t>this.orderedRanges.length)throw Error("error in collection routing map, queried value is greater than the end range.");for(let n=i;n<t+1;n++)e.overlaps(this.orderedRanges[n])&&(r[this.orderedPartitionKeyRanges[n][a.PartitionKeyRange.MinInclusive]]=this.orderedPartitionKeyRanges[n])}return Object.keys(r).map(e=>r[e]).sort((e,t)=>e[a.PartitionKeyRange.MinInclusive].localeCompare(t[a.PartitionKeyRange.MinInclusive]))}}function e0(e,t){let r=e[0][a.PartitionKeyRange.MinInclusive],i=t[0][a.PartitionKeyRange.MinInclusive];return r>i?1:r<i?-1:0}class e1{constructor(e){this.clientContext=e,this.collectionRoutingMapByCollectionId={}}async onCollectionRoutingMap(e,t,r=!1){let i=g(e);return(void 0===this.collectionRoutingMapByCollectionId[i]||r)&&(this.collectionRoutingMapByCollectionId[i]=this.requestCollectionRoutingMap(e,t)),this.collectionRoutingMapByCollectionId[i]}async getOverlappingRanges(e,t,r,i=!1){return(await this.onCollectionRoutingMap(e,r,i)).getOverlappingRanges(t)}async requestCollectionRoutingMap(e,t){let{resources:r}=await ex(async t=>this.clientContext.queryPartitionKeyRanges(e).fetchAllInternal(t),t,G.PartitionKeyRangeLookUp);return function(e){let t={},r={},i=[];for(let n of e)t[n[0][a.PartitionKeyRange.Id]]=n,r[n[1]]=n[0],i.push(n);let n=(i=i.sort(e0)).map(e=>e[0]),s=i.map(e=>e[1]);if(function(e){let t=!1;if(e.length>0){let r=e[0],i=e[e.length-1];t=(t=r[a.PartitionKeyRange.MinInclusive]===a.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey)&&i[a.PartitionKeyRange.MaxExclusive]===a.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey;for(let r=1;r<e.length;r++){let i=e[r-1],n=e[r];if(!(t=t&&i[a.PartitionKeyRange.MaxExclusive]===n[a.PartitionKeyRange.MinInclusive])){if(i[a.PartitionKeyRange.MaxExclusive]>n[a.PartitionKeyRange.MinInclusive])throw Error("Ranges overlap");break}}}return t}(n))return new eZ(n,s)}(r.map(e=>[e,!0]))}}let e2=a.PartitionKeyRange;class e3{constructor(e){this.partitionKeyRangeCache=new e1(e)}static _secondRangeIsAfterFirstRange(e,t){if(void 0===e.max)throw Error("range1 must have max");if(void 0===t.min)throw Error("range2 must have min");return!(e.max>t.min)&&(e.max!==t.min||!e.isMaxInclusive||!t.isMinInclusive)}static _isSortedAndNonOverlapping(e){for(let t=1;t<e.length;t++){let r=e[t-1],i=e[t];if(!this._secondRangeIsAfterFirstRange(r,i))return!1}return!0}static _stringMax(e,t){return e>=t?e:t}static _stringCompare(e,t){return e===t?0:e>t?1:-1}static _subtractRange(e,t){let r=this._stringMax(t[e2.MaxExclusive],e.min),i=0===this._stringCompare(r,e.min)&&e.isMinInclusive;return new eY(r,e.max,i,e.isMaxInclusive)}async getOverlappingRanges(e,t,r){if(!e3._isSortedAndNonOverlapping(t))throw Error("the list of ranges is not a non-overlapping sorted ranges");let i=[];if(0===t.length)return i;let n=await this.partitionKeyRangeCache.onCollectionRoutingMap(e,r),s=0,o=t[0];for(;;){let e;if(o.isEmpty()){if(++s>=t.length)return i;o=t[s];continue}e=i.length>0?e3._subtractRange(o,i[i.length-1]):o;let r=n.getOverlappingRanges(e);if(r.length<=0)throw Error(`error: returned overlapping ranges for queryRange ${e} is empty`);i=i.concat(r);let a=eY.parsePartitionKeyRange(i[i.length-1]);if(!a)throw Error("expected lastKnowTargetRange to be truthy");if(e3._stringCompare(o.max,a.max)>0)throw Error(`error: returned overlapping ranges ${r} \ 5 does not contain the requested range ${e}`);if(++s>=t.length)return i;for(o=t[s];0>=e3._stringCompare(o.max,a.max);){if(++s>=t.length)return i;o=t[s]}}}}!function(e){e[e.Done=0]="Done",e[e.Exception=1]="Exception",e[e.Re
5sult=2]="Result"}(Z||(Z={}));class e6{constructor(e,t){void 0!==e?(this.feedResponse=e,this.fetchResultType=Z.Result):(this.error=t,this.fetchResultType=Z.Exception)}}class e5{constructor(e,t,r,i,n){this.clientContext=e,this.generation=0,this.fetchFunction=async(e,t)=>{let r=b(this.collectionLink,z.item);e.addData({partitionKeyRangeId:this.targetPartitionKeyRange.id});let i=function(e){return g(e)}(this.collectionLink);return this.clientContext.queryFeed({path:r,resourceType:z.item,resourceId:i,resultFn:e=>e.Documents,query:this.query,options:t,diagnosticNode:e,partitionKeyRangeId:this.targetPartitionKeyRange.id})},this.collectionLink=t,this.query=r,this.targetPartitionKeyRange=i,this.fetchResults=[],this.allFetched=!1,this.err=void 0,this.previousContinuationToken=void 0,this.continuationToken=void 0,this.respHeaders=L(),this.internalExecutionContext=new eE(n,this.fetchFunction)}peekBufferedItems(){let e=[];for(let t=0,r=!1;t<this.fetchResults.length&&!r;t++){let i=this.fetchResults[t];switch(i.fetchResultType){case Z.Done:case Z.Exception:r=!0;break;case Z.Result:e.push(i.feedResponse)}}return e}hasMoreResults(){return this.internalExecutionContext.hasMoreResults()||0!==this.fetchResults.length}gotSplit(){let e=this.fetchResults[0];return!!(e.fetchResultType===Z.Exception&&e5._needPartitionKeyRangeCacheRefresh(e.error))}_getAndResetActiveResponseHeaders(){let e=this.respHeaders;return this.respHeaders=L(),e}_updateStates(e,t){if(e){this.err=e;return}t&&(this.allFetched=!0),this.internalExecutionContext.continuationToken!==this.continuationToken&&(this.previousContinuationToken=this.continuationToken,this.continuationToken=this.internalExecutionContext.continuationToken)}static _needPartitionKeyRangeCacheRefresh(e){return e.code===S.Gone&&"substatus"in e&&e.substatus===C.PartitionKeyRangeGone}async bufferMore(e){if(this.err)throw this.err;try{let{result:t,headers:r}=await this.internalExecutionContext.fetchMore(e);if(++this.generation,this._updateStates(void 0,void 0===t),void 0!==t&&t.forEach(e=>{this.fetchResults.push(new e6(e,void 0))}),null!=r&&a.HttpHeaders.QueryMetrics in r){let e=r[a.HttpHeaders.QueryMetrics]["0"];r[a.HttpHeaders.QueryMetrics]={},r[a.HttpHeaders.QueryMetrics][this.targetPartitionKeyRange.id]=e}return{result:t,headers:r}}catch(e){if(e5._needPartitionKeyRangeCacheRefresh(e)){let t=new e6(void 0,e);return this.fetchResults.push(t),{result:[t],headers:e.headers}}throw this._updateStates(e,void 0===e.resources),e}}getTargetParitionKeyRange(){return this.targetPartitionKeyRange}async nextItem(e){if(this.err)throw this._updateStates(this.err,void 0),this.err;try{let{result:t,headers:r}=await this.current(e),i=this.fetchResults.shift();if(this._updateStates(void 0,void 0===t),i.feedResponse!==t)throw Error(`Expected ${i.feedResponse} to equal ${t}`);switch(i.fetchResultType){case Z.Done:return{result:void 0,headers:r};case Z.Exception:throw i.error.headers=r,i.error;case Z.Result:return{result:i.feedResponse,headers:r}}}catch(e){throw this._updateStates(e,void 0===e.item),e}}async current(e){if(this.fetchResults.length>0){let e=this.fetchResults[0];switch(e.fetchResultType){case Z.Done:return{result:void 0,headers:this._getAndResetActiveResponseHeaders()};case Z.Exception:throw e.error.headers=this._getAndResetActiveResponseHeaders(),e.error;case Z.Result:return{result:e.feedResponse,headers:this._getAndResetActiveResponseHeaders()}}}if(this.allFetched)return{result:void 0,headers:this._getAndResetActiveResponseHeaders()};let{result:t,headers:r}=await this.bufferMore(e);return(D(this.respHeaders,r),void 0===t)?{result:void 0,headers:this.respHeaders}:this.current(e)}}let e4=(0,eb.KV)("parallelQueryExecutionContextBase");!function(e){e.started="started",e.inProgress="inProgress",e.ended="ended"}(ee||(ee={}));class e8{constructor(e,t,r,i,n){this.clientContext=e,this.collectionLink=t,this.query=r,this.options=i,this.partitionedQueryExecutionInfo=n,this.clientContext=e,this.collectionLink=t,this.query=r,this.options=i,this.partitionedQueryExecutionInfo=n,this.diagnosticNodeWrapper={consumed:!1,diagnosticNode:new em(e.diagnosticLevel,J.PARALLEL_QUERY_NODE,null)},this.diagnosticNodeWrapper.diagnosticNode.addData({stateful:!0}),this.err=void 0,this.state=e8.STATES.started,this.routingProvider=new e3(this.clientContext),this.sortOrders=this.partitionedQueryExecutionInfo.queryInfo.orderBy,this.requestContinuation=i?i.continuationToken||i.c
5ontinuation:null,this.respHeaders=L(),this.orderByPQ=new(eG())((e,t)=>this.documentProducerComparator(t,e)),this.sem=eJ()(1);let s=async()=>{try{let e=await this._onTargetPartitionRanges();this.waitingForInternalExecutionContexts=e.length;let t=void 0===i.maxDegreeOfParallelism||i.maxDegreeOfParallelism<1?e.length:Math.min(i.maxDegreeOfParallelism,e.length);e4.info("Query starting against "+e.length+" ranges with parallelism of "+t);let r=eJ()(t),n=[];if(this.requestContinuation)throw Error("Continuation tokens are not yet supported for cross partition queries");e.forEach(e=>{n.push(this._createTargetPartitionQueryExecutionContext(e))}),n.forEach(e=>{let t=async()=>{try{let{result:t,headers:r}=await e.current(this.getDiagnosticNode());if(this._mergeWithActiveResponseHeaders(r),void 0===t)return;try{this.orderByPQ.enq(e)}catch(e){this.err=e}}catch(e){this._mergeWithActiveResponseHeaders(e.headers),this.err=e}finally{r.leave(),this._decrementInitiationLock()}};r.take(t)})}catch(e){this.err=e,this.sem.leave();return}};this.sem.take(s)}_decrementInitiationLock(){this.waitingForInternalExecutionContexts=this.waitingForInternalExecutionContexts-1,0===this.waitingForInternalExecutionContexts&&(this.sem.leave(),0===this.orderByPQ.size()&&(this.state=e8.STATES.inProgress))}_mergeWithActiveResponseHeaders(e){D(this.respHeaders,e)}_getAndResetActiveResponseHeaders(){let e=this.respHeaders;return this.respHeaders=L(),e}getDiagnosticNode(){return this.diagnosticNodeWrapper.diagnosticNode}async _onTargetPartitionRanges(){let e=this.partitionedQueryExecutionInfo.queryRanges.map(e=>eY.parseFromDict(e));return this.routingProvider.getOverlappingRanges(this.collectionLink,e,this.getDiagnosticNode())}async _getReplacementPartitionKeyRanges(e){let t=e.targetPartitionKeyRange;this.routingProvider=new e3(this.clientContext);let r=eY.parsePartitionKeyRange(t);return this.routingProvider.getOverlappingRanges(this.collectionLink,[r],this.getDiagnosticNode())}async _repairExecutionContext(e,t){let r=this.orderByPQ.deq();try{let i=await this._getReplacementPartitionKeyRanges(r),n=[];i.forEach(e=>{let t=this._createTargetPartitionQueryExecutionContext(e,r.continuationToken);n.push(t)});let s=async(t,r)=>{try{let{result:i}=await t.current(e);void 0===i||this.orderByPQ.enq(t),await r()}catch(e){this.err=e;return}},o=async e=>{if(!(e.length>0))return t();{let t=e.shift();await s(t,async()=>{await o(e)})}};await o(n)}catch(e){throw this.err=e,e}}static _needPartitionKeyRangeCacheRefresh(e){return e.code===S.Gone&&"substatus"in e&&e.substatus===C.PartitionKeyRangeGone}async _repairExecutionContextIfNeeded(e,t,r){let i=this.orderByPQ.peek();try{await i.current(e),r()}catch(r){if(e8._needPartitionKeyRangeCacheRefresh(r))return ew(e=>this._repairExecutionContext(e,t),e,J.QUERY_REPAIR_NODE);throw this.err=r,r}}async nextItem(e){if(this.err)throw this.err;return new Promise((t,r)=>{this.sem.take(()=>{if(this.diagnosticNodeWrapper.consumed?this.diagnosticNodeWrapper.diagnosticNode=e:(e.addChildNode(this.diagnosticNodeWrapper.diagnosticNode,X.debug,G.QueryPlanLookUp),this.diagnosticNodeWrapper.diagnosticNode=void 0,this.diagnosticNodeWrapper.consumed=!0),this.err){this.sem.leave(),this.err.headers=this._getAndResetActiveResponseHeaders(),r(this.err);return}if(0===this.orderByPQ.size())return this.state=e8.STATES.ended,this.sem.leave(),t({result:void 0,headers:this._getAndResetActiveResponseHeaders()});let i=()=>(this.sem.leave(),t(this.nextItem(e))),n=async()=>{let i,n,s;try{i=this.orderByPQ.deq()}catch(e){this.err=e,this.sem.leave(),this.err.headers=this._getAndResetActiveResponseHeaders(),r(this.err);return}try{let r=await i.nextItem(e);if(n=r.result,s=r.headers,this._mergeWithActiveResponseHeaders(s),void 0===n)return this.err=Error("Extracted DocumentProducer from the priority queue doesn't have any buffered item!"),this.sem.leave(),t({result:void 0,headers:this._getAndResetActiveResponseHeaders()})}catch(e){this.err=Error(`Extracted DocumentProducer from the priority queue fails to get the \ 6 buffered item. Due to ${JSON.stringify(e)}`),this.err.headers=this._getAndResetActiveResponseHeaders(),this.sem.leave(),r(this.err);return}try{let{result:t,headers:r}=await i.current(e);
6if(this._mergeWithActiveResponseHeaders(r),void 0===t);else try{let e=i.fetchResults[0];if(void 0===e)throw Error("Extracted DocumentProducer from PQ is invalid state with no result!");this.orderByPQ.enq(i)}catch(e){this.err=e}}catch(e){e8._needPartitionKeyRangeCacheRefresh(e)?this.orderByPQ.enq(i):(this.err=e,r(this.err))}finally{this.sem.leave()}return t({result:n,headers:this._getAndResetActiveResponseHeaders()})};this._repairExecutionContextIfNeeded(e,i,n).catch(r)})})}hasMoreResults(){return this.state!==e8.STATES.ended&&void 0===this.err}_createTargetPartitionQueryExecutionContext(e,t){let r,i=this.partitionedQueryExecutionInfo.queryInfo.rewrittenQuery,n=this.query;r="string"==typeof n?{query:n}:n,i&&(r=JSON.parse(JSON.stringify(r)),i=i.replace("{documentdb-formattableorderbyquery-filter}","true"),r.query=i);let s=Object.assign({},this.options);return s.continuationToken=t,new e5(this.clientContext,this.collectionLink,r,e,s)}}e8.STATES=ee;class e7 extends e8{constructor(e,t,r,i,n){super(e,t,r,i,n),this.orderByComparator=new eU(this.sortOrders)}documentProducerComparator(e,t){return this.orderByComparator.compare(e,t)}}class e9 extends e8{documentProducerComparator(e,t){return e.generation-t.generation}}class te{constructor(e,t){this.executionContext=e,this.queryInfo=t,this.aggregators=new Map,this.aggregateResultArray=[],this.completed=!1,this.aggregateType=this.queryInfo.aggregates[0]}async nextItem(e){if(this.aggregateResultArray.length>0)return{result:this.aggregateResultArray.pop(),headers:L()};if(this.completed)return{result:void 0,headers:L()};let t=L();for(;this.executionContext.hasMoreResults();){let{result:r,headers:i}=await this.executionContext.nextItem(e);if(D(t,i),r){let e=eK,t=r;if(r.groupByItems&&(t=r.payload,e=await ek(r.groupByItems)),this.aggregators.get(e)||this.aggregators.set(e,e$(this.aggregateType)),this.aggregateType){let r=eV(t[0]);null===r&&(this.completed=!0),this.aggregators.get(e).aggregate(r)}else this.aggregators.get(e).aggregate(t)}}if(this.completed)return{result:void 0,headers:t};for(let e of this.aggregators.values())this.aggregateResultArray.push(e.getResult());return this.completed=!0,{result:this.aggregateResultArray.pop(),headers:t}}hasMoreResults(){return this.executionContext.hasMoreResults()||this.aggregateResultArray.length>0}}class tt{constructor(e,t,r,i,n){this.clientContext=e,this.collectionLink=t,this.query=r,this.options=i,this.partitionedQueryExecutionInfo=n,this.endpoint=null,this.pageSize=i.maxItemCount,void 0===this.pageSize&&(this.pageSize=tt.DEFAULT_PAGE_SIZE);let s=n.queryInfo.orderBy;Array.isArray(s)&&s.length>0?this.endpoint=new eT(new e7(this.clientContext,this.collectionLink,this.query,this.options,this.partitionedQueryExecutionInfo)):this.endpoint=new e9(this.clientContext,this.collectionLink,this.query,this.options,this.partitionedQueryExecutionInfo),(Object.keys(n.queryInfo.groupByAliasToAggregateType).length>0||n.queryInfo.aggregates.length>0||n.queryInfo.groupByExpressions.length>0)&&(n.queryInfo.hasSelectValue?this.endpoint=new te(this.endpoint,n.queryInfo):this.endpoint=new eW(this.endpoint,n.queryInfo));let o=n.queryInfo.top;"number"==typeof o&&(this.endpoint=new e_(this.endpoint,0,o));let a=n.queryInfo.limit,l=n.queryInfo.offset;"number"==typeof a&&"number"==typeof l&&(this.endpoint=new e_(this.endpoint,l,a));let c=n.queryInfo.distinctType;"Ordered"===c&&(this.endpoint=new eN(this.endpoint)),"Unordered"===c&&(this.endpoint=new eL(this.endpoint))}async nextItem(e){return this.endpoint.nextItem(e)}hasMoreResults(){return this.endpoint.hasMoreResults()}async fetchMore(e){return"function"==typeof this.endpoint.fetchMore?this.endpoint.fetchMore(e):(this.fetchBuffer=[],this.fetchMoreRespHeaders=L(),this._fetchMoreImplementation(e))}async _fetchMoreImplementation(e){try{let{result:t,headers:r}=await this.endpoint.nextItem(e);if(D(this.fetchMoreRespHeaders,r),void 0===t)if(0===this.fetchBuffer.length)return{result:void 0,headers:this.fetchMoreRespHeaders};else{let e=this.fetchBuffer;return this.fetchBuffer=[],{result:e,headers:this.fetchMoreRespHeaders}}if(this.fetchBuffer.push(t),!(this.fetchBuffer.length>=this.pageSize))return this._fetchMoreImplementation(e);{let e=this.fetchBuffer.slice(0,this.pageSize);return this.fetchBuffer=this.fetchBuffer.splice(this.pageSize),{result:e,headers:this.fetchMoreRespHeaders}}}catch(e){if(D(this.fetchMoreRespHeaders,e.headers),e.headers=this.fetchMoreRespHeaders,e)throw e}}}tt.DEFAULT_PAGE_SIZE=10;let tr={IndexUtilizationInfo:"Index Utilization Information",UtilizedSingleIndexes:"Utilized Single Indexes",PotentialSingleIndexes:"Potential Single Indexes",UtilizedCompositeIndexes:"Utilized Composite Indexes",PotentialCompositeIndexes:"Potential Composite Indexes",IndexExpression:"Index Spec",IndexImpactScore:"Index Impact Score",IndexUtilizationSeparator:"---"};class ti{writeIndexMetrics(e){let t="";return t=this.writeBeforeIndexUtilizationInfo(t),t=this.writeIndexUtilizationInfo(t,e),t=this.writeAfterIndexUtilizationInfo(t)}writeBeforeIndexUtilizationInfo(e){return e=this.appendNewlineToResult(e),e=this.appendHeaderToResult(e,tr.IndexUtilizationInfo,0)}writeIndexUtilizationInfo(e,t){for(let r of(e=this.appendHeaderToResult(e,tr.UtilizedSingleIndexes,1),t.UtilizedSingleIndexes))e=this.writeSingleIndexUtilizationEntity(e,r);for(let r of(e=this.appendHeaderToResult(e,tr.PotentialSingleIndexes,1),t.PotentialSingleIndexes))e=this.writeSingleIndexUtilizationEntity(e,r);for(let r of(e=this.appendHeaderToResult(e,tr.UtilizedCompositeIndexes,1),t.UtilizedCompositeIndexes))e=this.writeCompositeIndexUtilizationEntity(e,r);for(let r of(e=this.appendHeaderToResult(e,tr.PotentialCompositeIndexes,1),t.PotentialCompositeIndexes))e=this.writeCompositeIndexUtilizationEntity(e,r);return e}writeAfterIndexUtilizationInfo(e){return e}writeSingleIndexUtilizationEntity(e,t){return e=this.appendHeaderToResult(e,`${tr.IndexExpression}: ${t.IndexSpec}`,2),e=this.appendHeaderToResult(e,`${tr.IndexImpactScore}: ${t.IndexImpactScore}`,2),e=this.appendHeaderToResult(e,tr.IndexUtilizationSeparator,2)}writeCompositeIndexUtilizationEntity(e,t){return e=this.appendHeaderToResult(e,`${tr.IndexExpression}: ${t.IndexSpecs.join(", ")}`,2),e=this.appendHeaderToResult(e,`${tr.IndexImpactScore}: ${t.IndexImpactScore}`,2),e=this.appendHeaderToResult(e,tr.IndexUtilizationSeparator,2)}appendNewlineToResult(e){return this.appendHeaderToResult(e,"",0)}appendHeaderToResult(e,t,r){let i=`${" ".repeat(r)}${t} 7`;return e+=i}}var tn=r(51642).hp;
7class ts{constructor(e,t,r,i){this.UtilizedSingleIndexes=e,this.PotentialSingleIndexes=t,this.UtilizedCompositeIndexes=r,this.PotentialCompositeIndexes=i}static tryCreateFromDelimitedBase64String(e,t){return null==e?(t.result=ts.Empty,!1):ts.tryCreateFromDelimitedString(tn.from(e,"base64").toString(),t)}static tryCreateFromDelimitedString(e,t){if(null==e)return t.result=ts.Empty,!1;try{return t.result=JSON.parse(e)||ts.Empty,!0}catch(e){return t.result=ts.Empty,!1}}static createFromString(e,t){var r;let i={result:void 0};return t?ts.tryCreateFromDelimitedBase64String(e,i):ts.tryCreateFromDelimitedString(e,i),null!=(r=i.result)?r:ts.Empty}}ts.Empty=new ts([],[],[],[]);class to{constructor(e,t,r,i){this.resources=e,this.headers=t,this.hasMoreResults=r,this.diagnostics=i}get continuation(){return this.continuationToken}get continuationToken(){return this.headers[a.HttpHeaders.Continuation]}get queryMetrics(){return this.headers[a.HttpHeaders.QueryMetrics]}get requestCharge(){return N(this.headers)}get activityId(){return this.headers[a.HttpHeaders.ActivityId]}get indexMetrics(){let e=new ti,t=ts.createFromString(this.headers[a.HttpHeaders.IndexUtilization],!0);return e.writeIndexMetrics(t)}}class ta{constructor(e,t,r,i,n,s){this.clientContext=e,this.query=t,this.options=r,this.fetchFunctions=i,this.resourceLink=n,this.resourceType=s,this.query=t,this.fetchFunctions=i,this.options=r||{},this.resourceLink=n,this.fetchAllLastResHeaders=L(),this.reset(),this.isInitialized=!1}getAsyncIterator(){return q(this,arguments,function*(){this.reset();let e=new em(this.clientContext.diagnosticLevel,J.CLIENT_REQUEST_NODE,null);for(this.queryPlanPromise=this.fetchQueryPlan(e);this.queryExecutionContext.hasMoreResults();){let t;try{t=yield B(this.queryExecutionContext.fetchMore(e))}catch(r){if(this.needsQueryPlan(r)){yield B(this.createPipelinedExecutionContext());try{t=yield B(this.queryExecutionContext.fetchMore(e))}catch(e){this.handleSplitError(e)}}else throw r}let r=new to(t.result,t.headers,this.queryExecutionContext.hasMoreResults(),e.toDiagnostic(this.clientContext.getClientConfig()));e=new em(this.clientContext.diagnosticLevel,J.CLIENT_REQUEST_NODE,null),void 0!==t.result&&(yield yield B(r))}})}hasMoreResults(){return this.queryExecutionContext.hasMoreResults()}async fetchAll(){return eS(async e=>this.fetchAllInternal(e),this.clientContext)}async fetchAllInternal(e){let t;this.reset();try{t=await this.toArrayImplementation(e)}catch(e){this.handleSplitError(e)}return t}async fetchNext(){return eS(async e=>{let t;this.queryPlanPromise=ex(async e=>this.fetchQueryPlan(e),e,G.QueryPlanLookUp),this.isInitialized||await this.init();try{t=await this.queryExecutionContext.fetchMore(e)}catch(r){if(this.needsQueryPlan(r)){await this.createPipelinedExecutionContext();try{t=await this.queryExecutionContext.fetchMore(e)}catch(e){this.handleSplitError(e)}}else throw r}return new to(t.result,t.headers,this.queryExecutionContext.hasMoreResults(),ev())},this.clientContext)}reset(){this.queryPlanPromise=void 0,this.fetchAllLastResHeaders=L(),this.fetchAllTempResources=[],this.queryExecutionContext=new eE(this.options,this.fetchFunctions)}async toArrayImplementation(e){for(this.queryPlanPromise=ex(async e=>this.fetchQueryPlan(e),e,G.QueryPlanLookUp),this.isInitialized||await this.init();this.queryExecutionContext.hasMoreResults();){let t;try{t=await this.queryExecutionContext.nextItem(e)}catch(r){if(this.needsQueryPlan(r))await this.createPipelinedExecutionContext(),t=await this.queryExecutionContext.nextItem(e);else throw r}let{result:r,headers:i}=t;D(this.fetchAllLastResHeaders,i),void 0!==r&&this.fetchAllTempResources.push(r)}return new to(this.fetchAllTempResources,this.fetchAllLastResHeaders,this.queryExecutionContext.hasMoreResults(),ev())}async createPipelinedExecutionContext(){let e=await this.queryPlanPromise;if(e instanceof Error)throw e;let t=e.result,r=t.queryInfo;if(r.aggregates.length>0&&!1===r.hasSelectValue)throw Error("Aggregate queries must use the VALUE keyword");this.queryExecutionContext=new tt(this.clientContext,this.resourceLink,this.query,this.options,t)}async fetchQueryPlan(e){return this.queryPlanPromise||this.resourceType!==z.
7item?this.queryPlanPromise:this.clientContext.getQueryPlan(b(this.resourceLink)+"/docs",z.item,this.resourceLink,this.query,this.options,e).catch(e=>e)}needsQueryPlan(e){var t;if((null==(t=e.body)?void 0:t.additionalErrorInfo)||e.message.includes("Cross partition query only supports"))return e.code===S.BadRequest&&this.resourceType===z.item;throw e}async init(){if(!0!==this.isInitialized)return void 0===this.initPromise&&(this.initPromise=this._init()),this.initPromise}async _init(){!0===this.options.forceQueryPlan&&this.resourceType===z.item&&await this.createPipelinedExecutionContext(),this.isInitialized=!0}handleSplitError(e){if(410===e.code){let t=Error("Encountered partition split and could not recover. This request is retryable");throw t.code=503,t.originalError=e,t}throw e}}function tl(e){return x(e=w(e)),a.Path.DatabasesPathSegment+"/"+e}function tc(e,t){return x(t=w(t)),tl(e)+"/"+a.Path.CollectionsPathSegment+"/"+t}function tu(e,t){return x(t=w(t)),tl(e)+"/"+a.Path.UsersPathSegment+"/"+t}let th="/_partitionKey";class td{constructor(e,t,r,i,n){this.resource=e,this.headers=t,this.statusCode=r,this.diagnostics=i,this.substatus=n}get requestCharge(){return Number(this.headers[a.HttpHeaders.RequestCharge])||0}get activityId(){return this.headers[a.HttpHeaders.ActivityId]}get etag(){return this.headers[a.HttpHeaders.ETag]}}class tp{constructor(e,t){this.container=e,this.clientContext=t}query(e,t){var r;let i=b(this.container.url,z.conflicts),n=g(r=this.container.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.conflicts,resourceId:n,resultFn:e=>e.Conflicts,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}}class tf extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.conflict=i}}let tg={};function tm(e){return Array.isArray(e)?e.map(e=>void 0===e?tg:e):[e]}let ty=(0,eb.KV)("extractPartitionKey");function tb(e,t){if(t&&t.paths&&t.paths.length>0){if(!0===t.systemKey)return[];if(1===t.paths.length&&t.paths[0]===th)return[tv(th,e)];let r=[];return t.paths.forEach(t=>{let i=tv(t,e);if(void 0===i)return void ty.warning("Unsupported PartitionKey found.");r.push(i)}),r}ty.error("Unexpected Partition Key Definition Found.")}function tv(e,t){for(let r of function(e){let t=[],r=0,i=()=>{throw Error("Path "+e+" is invalid at index "+r)},n=()=>{let t=e[r],n=++r;for(;-1===(n=e.indexOf(t,n))&&i(),"\\"===e[n-1];)++n;let s=e.substr(r,n-r);return r=n+1,s},s=()=>{let t=e.indexOf("/",r),i=null;return -1===t?(i=e.substr(r),r=e.length):(i=e.substr(r,t-r),r=t),i=i.trim()};for(;r<e.length&&("/"!==e[r]&&i(),++r!==e.length);)'"'===e[r]||"'"===e[r]?t.push(n()):t.push(s());return t}(e))if("object"==typeof t&&null!==t&&r in t)t=t[r];else{t=void 0;break}return"string"==typeof t||"number"==typeof t||"boolean"==typeof t?t:null===t?null:void 0===t||JSON.stringify(t)===JSON.stringify(tg)?tg:void 0}function tw(e){return!0===e.systemKey?[]:e.paths.map(()=>tg)}async function tx(e,t){return(await t.readPartitionKeyDefinition(e)).resource}class tS{get url(){return`/${this.container.url}/${a.Path.ConflictsPathSegment}/${this.id}`}
7constructor(e,t,r,i){this.container=e,this.id=t,this.clientContext=r,this.partitionKey=i,this.partitionKey=i}async read(e){return eS(async t=>{var r;let i=b(this.url,z.conflicts),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.user,resourceId:n,options:e,diagnosticNode:t});return new tf(s.result,s.headers,s.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;if(void 0===this.partitionKey){let e=await tx(t,this.container);this.partitionKey=tw(e)}let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.conflicts,resourceId:n,options:e,partitionKey:this.partitionKey,diagnosticNode:t});return new tf(s.result,s.headers,s.code,this,ev())},this.clientContext)}}class tC{constructor(e,t,r,i,n){this.result=e,this.count=t,this.statusCode=r,this.diagnostics=n,this.headers=Object.freeze(i)}get requestCharge(){let e=this.headers[a.HttpHeaders.RequestCharge];return e?parseInt(e,10):null}get activityId(){return this.headers[a.HttpHeaders.ActivityId]}get continuation(){return this.etag}get sessionToken(){return this.headers[a.HttpHeaders.SessionToken]}get etag(){return this.headers[a.HttpHeaders.ETag]}}class tE{constructor(e,t,r,i,n){this.clientContext=e,this.resourceId=t,this.resourceLink=r,this.partitionKey=i,this.changeFeedOptions=n,this.isPartitionSpecified=void 0!==i;let s=!0;n.continuation&&(this.nextIfNoneMatch=n.continuation,s=!1),n.startTime&&(this.ifModifiedSince=n.startTime.toUTCString(),s=!1),s&&!n.startFromBeginning&&(this.nextIfNoneMatch=tE.IfNoneMatchAllHeaderValue)}get hasMoreResults(){return this.lastStatusCode!==S.NotModified}getAsyncIterator(){return q(this,arguments,function*(){do{let e=yield B(this.fetchNext());e.count>0&&(yield yield B(e))}while(this.hasMoreResults)})}async fetchNext(){return eS(async e=>{let t=await this.getFeedResponse(e);return this.lastStatusCode=t.statusCode,this.nextIfNoneMatch=t.headers[a.HttpHeaders.ETag],t},this.clientContext)}async getFeedResponse(e){if(!this.isPartitionSpecified)throw Error("Container is partitioned, but no partition key or partition key range id was specified.");let t={initialHeaders:{},useIncrementalFeed:!0};"number"==typeof this.changeFeedOptions.maxItemCount&&(t.maxItemCount=this.changeFeedOptions.maxItemCount),this.changeFeedOptions.sessionToken&&(t.sessionToken=this.changeFeedOptions.sessionToken),this.nextIfNoneMatch&&(t.accessCondition={type:a.HttpHeaders.IfNoneMatch,condition:this.nextIfNoneMatch}),this.ifModifiedSince&&(t.initialHeaders[a.HttpHeaders.IfModifiedSince]=this.ifModifiedSince);let r=await this.clientContext.queryFeed({path:this.resourceLink,resourceType:z.item,resourceId:this.resourceId,resultFn:e=>e?e.Documents:[],query:void 0,options:t,partitionKey:this.partitionKey,diagnosticNode:e});return new tC(r.result,r.result?r.result.length:0,r.code,r.headers,ev())}}tE.IfNoneMatchAllHeaderValue="*";class t_ extends td{constructor(e,t,r,i,n,s){super(e,t,r,s,i),this.item=n}}class tT{get url(){var e,t,r;return e=this.container.database.id,t=this.container.id,!function(e){if("string"!=typeof e||v(e))throw Error("Resource ID must be a string and cannot be undefined, null or empty");if(h.test(e))throw Error("Illegal characters ['/', '\\', '#'] cannot be used in Resource ID")}(r=w(r=this.id)),tc(e,t)+"/"+a.Path.DocumentsPathSegment+"/"+r}
7constructor(e,t,r,i){this.container=e,this.id=t,this.clientContext=r,this.partitionKey=void 0===i?void 0:tm(i)}async read(e={}){return eS(async t=>{var r;let i;if(void 0===this.partitionKey){let e=await tx(t,this.container);this.partitionKey=tw(e)}let n=b(this.url),s=g(r=this.url);try{i=await this.clientContext.read({path:n,resourceType:z.item,resourceId:s,options:e,partitionKey:this.partitionKey,diagnosticNode:t})}catch(e){if(e.code!==S.NotFound)throw e;i=e}return new t_(i.result,i.headers,i.code,i.substatus,this,ev())},this.clientContext)}async replace(e,t={}){return eS(async r=>{var i;if(void 0===this.partitionKey){let t=await tx(r,this.container);this.partitionKey=tb(e,t)}let n={};if(!y(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.item,resourceId:o,options:t,partitionKey:this.partitionKey,diagnosticNode:r});return new t_(a.result,a.headers,a.code,a.substatus,this,ev())},this.clientContext)}async delete(e={}){return eS(async t=>{var r;if(void 0===this.partitionKey){let e=await tx(t,this.container);this.partitionKey=tw(e)}let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.item,resourceId:n,options:e,partitionKey:this.partitionKey,diagnosticNode:t});return new t_(s.result,s.headers,s.code,s.substatus,this,ev())},this.clientContext)}async patch(e,t={}){return eS(async r=>{var i;if(void 0===this.partitionKey){let t=await tx(r,this.container);this.partitionKey=tb(e,t)}let n=b(this.url),s=g(i=this.url),o=await this.clientContext.patch({body:e,path:n,resourceType:z.item,resourceId:s,options:t,partitionKey:this.partitionKey,diagnosticNode:r});return new t_(o.result,o.headers,o.code,o.substatus,this,ev())},this.clientContext)}}function tP(e,t){if(void 0!==e)return e;throw Error(t||"Unexpected 'undefined' value encountered")}function tR(e){var t,r;return"string"==typeof(t=e)||"boolean"==typeof t||"number"==typeof t||void 0!==(r=e)&&JSON.stringify(r)===JSON.stringify(tg)||null===e}function tI(e){return tR(e)||Array.isArray(e)}let tO="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",tA=/^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/,tM="function"!=typeof atob?e=>{let t,r,i;if(e=String(e).replace(/[\t\n\f\r ]+/g,""),!tA.test(e))throw TypeError("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");e+="==".slice(2-(3&e.length));let n="",s=0;for(;s<e.length;)t=tO.indexOf(e.charAt(s++))<<18|tO.indexOf(e.charAt(s++))<<12|(r=tO.indexOf(e.charAt(s++)))<<6|(i=tO.indexOf(e.charAt(s++))),n+=64===r?String.fromCharCode(t>>16&255):64===i?String.fromCharCode(t>>16&255,t>>8&255):String.fromCharCode(t>>16&255,t>>8&255,255&t);return n}:atob;async function tk(e,t){let r={name:"HMAC",hash:{name:"SHA-256"}},i=new Uint8Array([...unescape(encodeURIComponent(t))].map(e=>e.charCodeAt(0))),n=eP(tM(e)),s=await eI.subtle.importKey("raw",n,r,!1,["sign"]);var o=await eI.subtle.sign(r,s,i);if("function"!=typeof btoa)throw Error("Your browser environment is missing the global `btoa` function");let a="",l=new Uint8Array(o),c=l.byteLength;for(let e=0;e<c;e++)a+=String.fromCharCode(l[e]);return btoa(a)}async function tN(e,t,r=z.none,i="",n=new Date){if(e.startsWith("type=sas&"))return{[a.HttpHeaders.Authorization]:encodeURIComponent(e),[a.HttpHeaders.XDate]:n.toUTCString()};let s=await tL(e,t,r,i,n);return{[a.HttpHeaders.Authorization]:s,[a.HttpHeaders.XDate]:n.toUTCString()}}async function tL(e,t,r,i="",n=new Date){let s=t.toLowerCase()+"\n"+r.toLowerCase()+"\n"+i+"\n"+n.toUTCString().toLowerCase()+"\n\n";return encodeURIComponent("type=master&ver=1.0&sig="+await tk(e,s))}async function tD(e,t,r,i,n,s){if(e.permissionFeed)for(let t of(e.resourceTokens={},e.permissionFeed)){let r=function(e){if(!e||"string"!=typeof e)return null;let t=w(e).split("/");return t.length%2!=0?null:t[t.length-1]}(t.resource);if(!r)throw Error(`authorization error: ${r} \ 8 is an invalid resourceId in permissionFeed`);e.resourceTokens[r]=t._token}e.key?await tB(t,i,n,s,e.key):e.resourceTokens?s[a.HttpHeaders.Authorization]=encodeURIComponent(function(e,t,r){if(e&&Object.keys(e).length>0){if(!t&&!r)return e[Object.keys(e)[0]];if(r&&e[r])return e[r];if(!t||t.length<4)return null;let i=(t=w(t))&&t.split("/")||[];if(6===i.length){let t=i.slice(0,4).map(decodeURIComponent).join("/");if(e[t])return e[t]}let n=i.length%2==0?i.length-1:i.length-2;for(;n>0;n-=2){let t=decodeURI(i[n]);if(e[t])return e[t]}}return null}(e.resourceTokens,r,i)):e.tokenProvider&&(s[a.HttpHeaders.Authorization]=encodeURIComponent(await e.tokenProvider({verb:t,path:r,resourceId:i,resourceType:n,headers:s})))}async function tB(e,t,r,i,n){r===z.offer&&(t=t&&t.toLowerCase()),Object.assign(i,await tN(n,e,r,t))}let tq=(0,eb.KV)("cosmosdb");function tU(e){return"object"==typeof e?JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029"):e}let tH="application/json";async function tz({clientOptions:e,defaultHeaders:t,verb:r,path:i,resourceId:n,resourceType:s,options:o={},partitionKeyRangeId:l,useMultipleWriteLocations:c,partitionKey:u}){let h=Object.assign({[a.HttpHeaders.ResponseContinuationTokenLimitInKB]:1,[a.HttpHeaders.EnableCrossPartitionQuery]:!0},t);return c&&(h[a.HttpHeaders.ALLOW_MULTIPLE_WRITES]=!0),o.continuationTokenLimitInKB&&(h[a.HttpHeaders.ResponseContinuationTokenLimitInKB]=o.continuationTokenLimitInKB),o.continuationToken?h[a.HttpHeaders.Continuation]=o.continuationToken:o.c
8ontinuation&&(h[a.HttpHeaders.Continuation]=o.continuation),o.preTriggerInclude&&(h[a.HttpHeaders.PreTriggerInclude]=o.preTriggerInclude.constructor===Array?o.preTriggerInclude.join(","):o.preTriggerInclude),o.postTriggerInclude&&(h[a.HttpHeaders.PostTriggerInclude]=o.postTriggerInclude.constructor===Array?o.postTriggerInclude.join(","):o.postTriggerInclude),o.offerType&&(h[a.HttpHeaders.OfferType]=o.offerType),o.offerThroughput&&(h[a.HttpHeaders.OfferThroughput]=o.offerThroughput),o.maxItemCount&&(h[a.HttpHeaders.PageSize]=o.maxItemCount),o.accessCondition&&("IfMatch"===o.accessCondition.type?h[a.HttpHeaders.IfMatch]=o.accessCondition.condition:h[a.HttpHeaders.IfNoneMatch]=o.accessCondition.condition),o.useIncrementalFeed&&(h[a.HttpHeaders.A_IM]="Incremental Feed"),o.indexingDirective&&(h[a.HttpHeaders.IndexingDirective]=o.indexingDirective),o.consistencyLevel&&(h[a.HttpHeaders.ConsistencyLevel]=o.consistencyLevel),o.priorityLevel&&(h[a.HttpHeaders.PriorityLevel]=o.priorityLevel),o.maxIntegratedCacheStalenessInMs&&s===z.item&&("number"==typeof o.maxIntegratedCacheStalenessInMs?h[a.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness]=o.maxIntegratedCacheStalenessInMs.toString():(tq.error(`RangeError: maxIntegratedCacheStalenessInMs "${o.maxIntegratedCacheStalenessInMs}" is not a valid parameter.`),h[a.HttpHeaders.DedicatedGatewayPerRequestCacheStaleness]="null")),o.resourceTokenExpirySeconds&&(h[a.HttpHeaders.ResourceTokenExpiry]=o.resourceTokenExpirySeconds),o.sessionToken&&(h[a.HttpHeaders.SessionToken]=o.sessionToken),o.enableScanInQuery&&(h[a.HttpHeaders.EnableScanInQuery]=o.enableScanInQuery),o.populateQuotaInfo&&(h[a.HttpHeaders.PopulateQuotaInfo]=o.populateQuotaInfo),o.populateQueryMetrics&&(h[a.HttpHeaders.PopulateQueryMetrics]=o.populateQueryMetrics),void 0!==o.maxDegreeOfParallelism&&(h[a.HttpHeaders.ParallelizeCrossPartitionQuery]=!0),o.populateQuotaInfo&&(h[a.HttpHeaders.PopulateQuotaInfo]=!0),void 0===u||h[a.HttpHeaders.PartitionKey]||(h[a.HttpHeaders.PartitionKey]=JSON.stringify(u).replace(/[\u007F-\uFFFF]/g,e=>"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4))),(e.key||e.tokenProvider)&&(h[a.HttpHeaders.XDate]=new Date().toUTCString()),r!==F.post&&r!==F.put||h[a.HttpHeaders.ContentType]||(h[a.HttpHeaders.ContentType]=tH),h[a.HttpHeaders.Accept]||(h[a.HttpHeaders.Accept]=tH),void 0!==l&&(h[a.HttpHeaders.PartitionKeyRangeID]=l),o.enableScriptLogging&&(h[a.HttpHeaders.EnableScriptLogging]=o.enableScriptLogging),o.disableRUPerMinuteUsage&&(h[a.HttpHeaders.DisableRUPerMinuteUsage]=!0),o.populateIndexMetrics&&(h[a.HttpHeaders.PopulateIndexMetrics]=o.populateIndexMetrics),(e.key||e.resourceTokens||e.tokenProvider||e.permissionFeed)&&await tD(e,r,i,n,s,h),h}let tF={Create:"Create",Upsert:"Upsert",Read:"Read",Delete:"Delete",Replace:"Replace",Patch:"Patch"};function tj(e){return new TextEncoder().encode(tU(e)).length}!function(e){e.Hash="Hash",e.MultiHash="MultiHash"}(et||(et={})),function(e){e[e.V1=1]="V1",e[e.V2=2]="V2"}(er||(er={}));var t$=r(60458),tK=r.n(t$);let tV={Undefined:"00",Null:"01",False:"02",True:"03",Number:"05",String:"08",Infinity:"FF"};var tW=r(51642).hp;function tQ(e){let t,r,i=function(e){let t=tX(e),r=tK().BigInt(0x8000000000000000);return t<r?tK().bitwiseXor(t,r):tK().add(tK().bitwiseNot(t),tK().BigInt(1))}(e),n=tW.from(tV.Number,"hex"),s=tK().asUintN(64,tK().signedRightShift(i,tK().BigInt(56)));n=tW.concat([n,tW.from(s.toString(16),"hex")]),i=tK().asUintN(64,tK().leftShift(tK().BigInt(i),tK().BigInt(8)));let o=tK().BigInt(0),a=!1;do a?a=!1:"00"!==(r=o.toString(16).padStart(2,"0"))&&(n=tW.concat([n,tW.from(r,"hex")])),t=tK().asUintN(64,tK().signedRightShift(i,tK().BigInt(56))),o=tK().asUintN(64,tK().bitwiseOr(t,tK().BigInt(1))),i=tK().asUintN(64,tK().leftShift(i,tK().BigInt(7)));while(tK().notEqual(i,tK().BigInt(0)));return"00"!==(r=tK().asUintN(64,tK().bitwiseAnd(o,tK().BigInt(254))).toString(16).padStart(2,"0"))&&(n=tW.concat([n,tW.from(r,"hex")])),n}function tG(e){let t=tW.alloc(8),r=tX(e);for(let e=0;e<8;e++)t[e]=tK().toNumber(tK().bitwiseAnd(tK().signedRightShift(r,tK().multiply(tK().BigInt(e),tK().BigInt(8))),tK().BigInt(255)));return t}function tX(e){var t;let r=new DataView(new ArrayBuffer(8));return r.setFloat64(0,e),tK().BigInt(`0x${(t=r.buffer,Array.prototype.map.call(new Uint8Array(t),e=>("00"+e.toString(16)).slice(-2)).join(""))}`)}var tJ=r(51642).hp;function tY(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function tZ(e,t){return e<<t|e>>>32-t}function t0(e){return e^=e>>>16,e=tY(e,0x85ebca6b),e^=e>>>13,e=tY(e,0xc2b2ae35),e^=e>>>16}function t1(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];
8let r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function t2(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];let r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function t3(e,t){return 32==(t%=64)?[e[1],e[0]]:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:(t-=32,[e[1]<<t|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t])}function t6(e,t){return 0==(t%=64)?e:t<32?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function t5(e,t){return[e[0]^t[0],e[1]^t[1]]}function t4(e){return e=t2(e=t5(e,[0,e[0]>>>1]),[0xff51afd7,0xed558ccd]),e=t2(e=t5(e,[0,e[0]>>>1]),[0xc4ceb9fe,0x1a85ec53]),e=t5(e,[0,e[0]>>>1])}function t8(e){let t=tJ.allocUnsafe(e.length);for(let r=0,i=e.length-1;r<=i;++r,--i)t[r]=e[i],t[i]=e[r];return t}let t7={x86:{hash32:function(e,t){t=t||0;let r=e.length%4,i=e.length-r,n=t,s=0,o=0;for(let t=0;t<i;t+=4)s=tZ(s=tY(s=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,0xcc9e2d51),15),n^=s=tY(s,0x1b873593),n=tY(n=tZ(n,13),5)+0xe6546b64,o=t+4;switch(s=0,r){case 3:s^=e[o+2]<<16;case 2:s^=e[o+1]<<8;case 1:s^=e[o],s=tZ(s=tY(s,0xcc9e2d51),15),n^=s=tY(s,0x1b873593)}return n^=e.length,(n=t0(n))>>>0},hash128:function(e,t){t=t||0;let r=e.length%16,i=e.length-r,n=t,s=t,o=t,a=t,l=0,c=0,u=0,h=0,d=0;for(let t=0;t<i;t+=16)l=e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24,c=e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24,u=e[t+8]|e[t+9]<<8|e[t+10]<<16|e[t+11]<<24,h=e[t+12]|e[t+13]<<8|e[t+14]<<16|e[t+15]<<24,l=tZ(l=tY(l,0x239b961b),15),n^=l=tY(l,0xab0e9789),n=tY(n=tZ(n,19)+s,5)+0x561ccd1b,c=tZ(c=tY(c,0xab0e9789),16),s^=c=tY(c,0x38b34ae5),s=tY(s=tZ(s,17)+o,5)+0xbcaa747,u=tZ(u=tY(u,0x38b34ae5),17),o^=u=tY(u,0xa1e38b93),o=tY(o=tZ(o,15)+a,5)+0x96cd1c35,h=tZ(h=tY(h,0xa1e38b93),18),a^=h=tY(h,0x239b961b),a=tY(a=tZ(a,13)+n,5)+0x32ac3b17,d=t+16;switch(l=0,c=0,u=0,h=0,r){case 15:h^=e[d+14]<<16;case 14:h^=e[d+13]<<8;case 13:h^=e[d+12],h=tZ(h=tY(h,0xa1e38b93),18),a^=h=tY(h,0x239b961b);case 12:u^=e[d+11]<<24;case 11:u^=e[d+10]<<16;case 10:u^=e[d+9]<<8;case 9:u^=e[d+8],u=tZ(u=tY(u,0x38b34ae5),17),o^=u=tY(u,0xa1e38b93);case 8:c^=e[d+7]<<24;case 7:c^=e[d+6]<<16;case 6:c^=e[d+5]<<8;case 5:c^=e[d+4],c=tZ(c=tY(c,0xab0e9789),16),s^=c=tY(c,0x38b34ae5);case 4:l^=e[d+3]<<24;case 3:l^=e[d+2]<<16;case 2:l^=e[d+1]<<8;case 1:l^=e[d],l=tZ(l=tY(l,0x239b961b),15),n^=l=tY(l,0xab0e9789)}return n^=e.length,s^=e.length,o^=e.length,a^=e.length,n+=s,n+=o,n+=a,s+=n,o+=n,a+=n,n=t0(n),s=t0(s),o=t0(o),a=t0(a),n+=s,n+=o,n+=a,s+=n,o+=n,a+=n,("00000000"+(n>>>0).toString(16)).slice(-8)+("00000000"+(s>>>0).toString(16)).slice(-8)+("00000000"+(o>>>0).toString(16)).slice(-8)+("00000000"+(a>>>0).toString(16)).slice(-8)}},x64:{hash128:function(e,t){t=t||0;let r=e.length%16,i=e.length-r,n=[0,t],s=[0,t],o=[0,0],a=[0,0],l=[0x87c37b91,0x114253d5],c=[0x4cf5ad43,0x2745937f],u=0;for(let t=0;t<i;t+=16)o=[e[t+4]|e[t+5]<<8|e[t+6]<<16|e[t+7]<<24,e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24],a=[e[t+12]|e[t+13]<<8|e[t+14]<<16|e[t+15]<<24,e[t+8]|e[t+9]<<8|e[t+10]<<16|e[t+11]<<24],o=t3(o=t2(o,l),31),n=t1(n=t3(n=t5(n,o=t2(o,c)),27),s),n=t1(t2(n,[0,5]),[0,0x52dce729]),a=t3(a=t2(a,c),33),s=t1(s=t3(s=t5(s,a=t2(a,l)),31),n),s=t1(t2(s,[0,5]),[0,0x38495ab5]),u=t+16;switch(o=[0,0],a=[0,0],r){case 15:a=t5(a,t6([0,e[u+14]],48));case 14:a=t5(a,t6([0,e[u+13]],40));case 13:a=t5(a,t6([0,e[u+12]],32));case 12:a=t5(a,t6([0,e[u+11]],24));case 11:a=t5(a,t6([0,e[u+10]],16));case 10:a=t5(a,t6([0,e[u+9]],8));case 9:a=t3(a=t2(a=t5(a,[0,e[u+8]]),c),33),s=t5(s,a=t2(a,l));case 8:o=t5(o,t6([0,e[u+7]],56));case 7:o=t5(o,t6([0,e[u+6]],48));case 6:o=t5(o,t6([0,e[u+5]],40));case 5:o=t5(o,t6([0,e[u+4]],32));case 4:o=t5(o,t6([0,e[u+3]],24));case 3:o=t5(o,t6([0,e[u+2]],16));case 2:o=t5(o,t6([0,e[u+1]],8));
8case 1:o=t3(o=t2(o=t5(o,[0,e[u]]),l),31),n=t5(n,o=t2(o,c))}return n=t1(n=t5(n,[0,e.length]),s=t5(s,[0,e.length])),s=t1(s,n),n=t1(n=t4(n),s=t4(s)),s=t1(s,n),t8(tJ.from(("00000000"+(n[0]>>>0).toString(16)).slice(-8)+("00000000"+(n[1]>>>0).toString(16)).slice(-8),"hex")).toString("hex")+t8(tJ.from(("00000000"+(s[0]>>>0).toString(16)).slice(-8)+("00000000"+(s[1]>>>0).toString(16)).slice(-8),"hex")).toString("hex")}}};var t9=r(51642).hp;function re(e){let t=t9.concat(e.map(rt)),r=t7.x64.hash128(t),i=function(e){let t=t9.allocUnsafe(e.length);for(let r=0,i=e.length-1;r<=i;++r,--i)t[r]=e[i],t[i]=e[r];return t}(t9.from(r,"hex"));return i[0]&=63,i.toString("hex").toUpperCase()}function rt(e){switch(typeof e){case"string":return t9.concat([t9.from(tV.String,"hex"),t9.from(e),t9.from(tV.Infinity,"hex")]);case"number":{let t=tG(e);return t9.concat([t9.from(tV.Number,"hex"),t])}case"boolean":{let t=e?tV.True:tV.False;return t9.from(t,"hex")}case"object":if(null===e)return t9.from(tV.Null,"hex");return t9.from(tV.Undefined,"hex");case"undefined":return t9.from(tV.Undefined,"hex");default:throw Error(`Unexpected type: ${typeof e}`)}}var rr=r(51642).hp,ri=r(51642).hp;class rn{constructor(e){this.cfResource=e}getCfResource(){return this.cfResource}}class rs{constructor(e){this.cfResource=e}getCfResource(){return this.cfResource}}class ro{constructor(e,t){this.startTime=e,this.cfResource=t}getCfResource(){return this.cfResource}getStartTime(){return this.startTime}}class ra extends Error{}!function(e){e[e.FeedRange=0]="FeedRange",e[e.PartitionKey=1]="PartitionKey"}(ei||(ei={}));class rl{constructor(e){this.continuationToken=e}getCfResource(){return this.continuationToken}getCfResourceJson(){return JSON.parse(this.continuationToken)}getResourceType(){let e=this.getCfResourceJson();if(Object.prototype.hasOwnProperty.call(e,"partitionKey")&&Object.prototype.hasOwnProperty.call(e,"Continuation")&&"string"==typeof e.Continuation)return ei.PartitionKey;if(Object.prototype.hasOwnProperty.call(e,"Continuation")&&Array.isArray(e.Continuation)&&e.Continuation.length>0)return ei.FeedRange;throw new ra("Invalid continuation token.")}}class rc{constructor(e,t){if(new.target===rc)throw new ra("Cannot instantiate abstract class FeedRange");this.minInclusive=e,this.maxExclusive=t}}class ru extends rc{constructor(e,t){super(e,t)}}async function rh(e,t){return t.minInclusive>=e.min&&t.maxExclusive<=e.max?[void 0,void 0]:t.minInclusive<=e.min&&t.maxExclusive>=e.max?[e.min,e.max]:t.minInclusive<=e.min&&t.maxExclusive<=e.max&&t.maxExclusive>=e.min?[e.min,t.maxExclusive]:[t.minInclusive,e.max]}function rd(e,t,r){let i={};return i.maxItemCount=null==e?void 0:e.maxItemCount,i.sessionToken=null==e?void 0:e.sessionToken,i.continuationToken=t,i.startTime=r,i}class rp{static Beginning(e){return new rs(e)}static Now(e){return new rn(e)}static Time(e,t){if(!e)throw new ra("startTime must be present");if(e instanceof Date==!0)return new ro(e,t);throw new ra("startTime must be a Date object.")}static Continuation(e){if(!e)throw new ra("Argument continuation must be passed.");if(null==e||""===e.trim())throw new ra("Argument continuationToken must be a non-empty string.");return new rl(e)}}class rf{constructor(e,t,r,i,n,s){this.result=e,this.count=t,this.statusCode=r,this.diagnostics=n,this.subStatusCode=s,this.headers=i}get requestCharge(){let e=this.headers[a.HttpHeaders.RequestCharge];return e?parseInt(e,10):null}get activityId(){return this.headers[a.HttpHeaders.ActivityId]}get continuationToken(){return this.headers[a.HttpHeaders.ContinuationToken]}get sessionToken(){return this.headers[a.HttpHeaders.SessionToken]}}class rg{constructor(e,t,r){this.rid=e,this.partitionKey=t,this.Continuation=r}}class rm{constructor(e,t,r,i,n,s){this.clientContext=e,this.container=t,this.resourceId=r,this.resourceLink=i,this.partitionKey=n,this.changeFeedOptions=s,this.continuationToken=s.continuationToken?JSON.parse(s.continuationToken):void 0,this.isInstantiated=!1,s.startTime&&(this.startTime=s.startTime.toUTCString())}async instantiateIterator(e){if(await this.setIteratorRid(e),this.continuationToken){if(!this.continuationTokenRidMatchContainerRid())throw new ra("The continuation is not for the current container definition.")}else this.continuationToken=new rg(this.rId,this.partitionKey,"");this.isInstantiated=!0}continuationTokenRidMatchContainerRid(){return this.continuationToken.rid===this.rId}async setIteratorRid(e){let{resource:t}=await this.container.readInternal(e);this.rId=t._rid}get hasMoreResults(){return!0}getAsyncIterator(){return q(this,arguments,function*(){do{let e=yield B(this.readNext(
8));yield yield B(e)}while(this.hasMoreResults)})}async readNext(){return eS(async e=>(this.isInstantiated||await this.instantiateIterator(e),await this.fetchNext(e)),this.clientContext)}async fetchNext(e){let t=await this.getFeedResponse(e);return this.continuationToken.Continuation=t.headers[a.HttpHeaders.ETag],t.headers[a.HttpHeaders.ContinuationToken]=JSON.stringify(this.continuationToken),t}async getFeedResponse(e){let t={initialHeaders:{},useIncrementalFeed:!0};"number"==typeof this.changeFeedOptions.maxItemCount&&(t.maxItemCount=this.changeFeedOptions.maxItemCount),this.changeFeedOptions.sessionToken&&(t.sessionToken=this.changeFeedOptions.sessionToken);let r=this.continuationToken.Continuation;r&&(t.accessCondition={type:a.HttpHeaders.IfNoneMatch,condition:r}),this.startTime&&(t.initialHeaders[a.HttpHeaders.IfModifiedSince]=this.startTime);let i=await this.clientContext.queryFeed({path:this.resourceLink,resourceType:z.item,resourceId:this.resourceId,resultFn:e=>e?e.Documents:[],diagnosticNode:e,query:void 0,options:t,partitionKey:this.partitionKey});return new rf(i.result,i.result?i.result.length:0,i.code,i.headers,ev())}}class ry{constructor(e,t,r,i,n){this.minInclusive=e,this.maxExclusive=t,this.continuationToken=r,this.epkMinHeader=i,this.epkMaxHeader=n}}class rb{constructor(){this.elements=[]}modifyFirstElement(e){this.isEmpty()||(this.elements[0]=e)}enqueue(e){this.elements.push(e)}dequeue(){return this.elements.shift()}peek(){return this.isEmpty()?void 0:this.elements[0]}isEmpty(){return 0===this.elements.length}moveFirstElementToTheEnd(){this.isEmpty()||this.elements.push(this.dequeue())}returnSnapshot(){let e=[];return this.elements.map(t=>{let r=new ry(t.epkMinHeader?t.epkMinHeader:t.minInclusive,t.epkMaxHeader?t.epkMaxHeader:t.maxExclusive,t.continuationToken);e.push(r)}),e}}class rv{constructor(e,t){this.rid=e,this.Continuation=t}}class rw{constructor(e,t,r,i,n,s,o,a){this.clientContext=e,this.container=t,this.partitionKeyRangeCache=r,this.resourceId=i,this.resourceLink=n,this.url=s,this.changeFeedOptions=o,this.epkRange=a,this.generateContinuationToken=()=>JSON.stringify(new rv(this.rId,this.queue.returnSnapshot())),this.queue=new rb,this.continuationToken=o.continuationToken?JSON.parse(o.continuationToken):void 0,this.startTime=o.startTime?o.startTime.toUTCString():void 0,this.isInstantiated=!1}async setIteratorRid(e){let{resource:t}=await this.container.readInternal(e);this.rId=t._rid}continuationTokenRidMatchContainerRid(){return this.continuationToken.rid===this.rId}async fillChangeFeedQueue(e){this.continuationToken?await this.fetchContinuationTokenFeedRanges(e):await this.fetchOverLappingFeedRanges(e),this.isInstantiated=!0}async fetchOverLappingFeedRanges(e){try{for(let t of(await this.partitionKeyRangeCache.getOverlappingRanges(this.url,this.epkRange,e))){let[e,r]=await rh(this.epkRange,t),i=new ry(t.minInclusive,t.maxExclusive,"",e,r);this.queue.enqueue(i)}}catch(e){throw new ra(e.message)}}async fetchContinuationTokenFeedRanges(e){let t=this.continuationToken;if(this.continuationTokenRidMatchContainerRid())for(let r of t.Continuation){let t=new eY(r.minInclusive,r.maxExclusive,!0,!1);try{for(let i of(await this.partitionKeyRangeCache.getOverlappingRanges(this.url,t,e))){let[e,n]=await rh(t,i),s=new ry(i.minInclusive,i.maxExclusive,r.continuationToken,e,n);this.queue.enqueue(s)}}catch(e){throw new ra(e.message)}}else throw new ra("The continuation token is not for the current container definition")}get hasMoreResults(){return!0}getAsyncIterator(){return q(this,arguments,function*(){do{let e=yield B(this.readNext());yield yield B(e)}while(this.hasMoreResults)})}async readNext(){return eS(async e=>{let t,r;this.isInstantiated||(await this.setIteratorRid(e),await this.fillChangeFeedQueue(e));do{let[i,n]=await this.fetchNext(e);if(void 0!==(t=n)&&(void 0===r&&(r=i),this.queue.moveFirstElementToTheEnd(),t.statusCode===S.Ok))break}while(!this.checkedAllFeedRanges(r));return t.headers[a.HttpHeaders.ContinuationToken]=this.generateContinuationToken(),t},this.clientContext)}async fetchNext(e){let t=this.queue.peek();if(!t)return[[void 0,void 0],void 0];{let r=await this.getFeedResponse(t,e);if(await this.shouldRetryOnFailure(t,r,e))return this.queue.dequeue(),this.fetchNext(e);{let e=r.headers[a.HttpHeaders.ETag],t=this.queue.peek();return t.continuationToken=e,[[t.minInclusive,t.maxExclusive],r]}}}checkedAllFeedRanges(e){if(void 0===e)return!1;let t=this.queue.peek();return e[0]===(null==t?void 0:t.minInclusive)&&e[1]===(null==t?void 0:t.maxExclusive)}async shouldRetryOnFailure(e,t,r){if(t.statusCode===S.Ok||t.statusCode===S.NotModified)return!1;if(t.statusCode===S.Gone&&(t.subStatusCode===C.PartitionKeyRangeGone||t.subStatusCode===C.CompletingSplit)){let t=new eY(e.minInclusive,e.maxExclusive,!0,!1),i=await this.partitionKeyRangeCache.getOverlappingRanges(this.url,t,r,!0);if(i.length<1)throw new ra("Partition split/merge detected but no overlapping ranges found.");return i.length>=1&&await this.handleSplit(!1,i,t,e.continuationToken),!0}return!1}
8async handleSplit(e,t,r,i){let n=0;if(e){let[e,s]=await rh(r,t[0]),o=new ry(t[0].minInclusive,t[0].maxExclusive,i,e,s);this.queue.modifyFirstElement(o),n=1}for(let e=n;e<t.length;e++){let[n,s]=await rh(r,t[e]),o=new ry(t[e].minInclusive,t[e].maxExclusive,i,n,s);this.queue.enqueue(o)}}async getPartitionRangeId(e,t){let r=new eY(e.epkMinHeader?e.epkMinHeader:e.minInclusive,e.epkMaxHeader?e.epkMaxHeader:e.maxExclusive,!0,!1),i=await this.partitionKeyRangeCache.getOverlappingRanges(this.url,r,t,!1);if(i.length<1)throw new ra("No overlapping ranges found.");let n=i[0];return i.length>1&&await this.handleSplit(!0,i,r,e.continuationToken),n.id}async getFeedResponse(e,t){let r={initialHeaders:{},useIncrementalFeed:!0};"number"==typeof this.changeFeedOptions.maxItemCount&&(r.maxItemCount=this.changeFeedOptions.maxItemCount),this.changeFeedOptions.sessionToken&&(r.sessionToken=this.changeFeedOptions.sessionToken),e.continuationToken&&(r.accessCondition={type:a.HttpHeaders.IfNoneMatch,condition:e.continuationToken}),this.startTime&&(r.initialHeaders[a.HttpHeaders.IfModifiedSince]=this.startTime);let i=await this.getPartitionRangeId(e,t);try{let n=await this.clientContext.queryFeed({path:this.resourceLink,resourceType:z.item,resourceId:this.resourceId,resultFn:e=>e?e.Documents:[],query:void 0,options:r,diagnosticNode:t,partitionKey:void 0,partitionKeyRangeId:i,startEpk:e.epkMinHeader,endEpk:e.epkMaxHeader});return new rf(n.result,n.result?n.result.length:0,n.code,n.headers,ev())}catch(e){return new rf([],0,e.code,e.headers,ev(),e.substatus)}}}function rx(e){return e&&!(tR(e)||Array.isArray(e))}class rS{constructor(e,t){this.container=e,this.clientContext=t,this.partitionKeyRangeCache=new e1(this.clientContext)}query(e,t={}){var r;let i=b(this.container.url,z.item),n=g(r=this.container.url),s=async(r,s)=>await this.clientContext.queryFeed({path:i,resourceType:z.item,resourceId:n,resultFn:e=>e?e.Documents:[],query:e,options:s,partitionKey:t.partitionKey,diagnosticNode:r});return new ta(this.clientContext,e,t,s,this.container.url,z.item)}readChangeFeed(e,t){return rx(e)?this.changeFeed(e):this.changeFeed(e,t)}changeFeed(e,t){var r;let i;!t&&rx(e)?(i=void 0,t=e):void 0===e||rx(e)||(i=e),t||(t={});let n=b(this.container.url,z.item),s=g(r=this.container.url);return new tE(this.clientContext,s,n,i,t)}getChangeFeedIterator(e){var t;let r=void 0!==e?e:{};if(!("object"==typeof(t=r)&&(0===Object.keys(t).length&&"{}"===JSON.stringify(t)||t&&!(tR(t)||Array.isArray(t)))))throw new ra("Invalid Changefeed Iterator Options.");if((null==r?void 0:r.maxItemCount)&&"number"!=typeof(null==r?void 0:r.maxItemCount))throw new ra("maxItemCount must be number");if((null==r?void 0:r.maxItemCount)!==void 0&&(null==r?void 0:r.maxItemCount)<1)throw new ra("maxItemCount must be a positive number");return function(e,t,r,i){let n=r.url,s=b(n,z.item),o=g(n),l=e.changeFeedStartFrom;if(void 0===l&&(l=rp.Now()),l instanceof rl){let a=l.getCfResourceJson(),c=l.getResourceType(),u=rd(e,l.getCfResource());if(c===ei.PartitionKey&&tI(a.partitionKey))return new rm(t,r,o,s,a.partitionKey,u);if(c===ei.FeedRange)return new rw(t,r,i,o,s,n,u,void 0);throw new ra("Invalid continuation token.")}if(l instanceof rn||l instanceof ro||l instanceof rs){let c=rd(e,void 0,function(e){if(!(e instanceof rs)){if(e instanceof rn)return new Date;if(e instanceof ro)return e.getStartTime()}}(l)),u=l.getCfResource();if(tI(u))return new rm(t,r,o,s,u,c);{let e;if(void 0===u)e=new eY(a.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey,a.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey,!0,!1);else if(u instanceof ru&&"string"==typeof u.minInclusive&&"string"==typeof u.maxExclusive&&u.minInclusive>=a.EffectivePartitionKeyConstants.MinimumInclusiveEffectivePartitionKey&&u.maxExclusive<=a.EffectivePartitionKeyConstants.MaximumExclusiveEffectivePartitionKey&&u.maxExclusive>u.minInclusive)e=new eY(u.minInclusive,u.maxExclusive,!0,!1);else throw new ra("Invalid feed range.");return new rw(t,r,i,o,s,n,c,e)}}throw new ra("Invalid change feed start location.")}(r,this.clientContext,this.container,this.partitionKeyRangeCache)}readAll(e){return this.query("SELECT * from c",e)}async create(e,t={}){return eS(async r=>{var i;void 0!==e.id&&""!==e.id||t.disableAutomaticIdGeneration||(e.id=ed());let n=tb(e,await tx(r,this.container)),s={};if(!y(e,s))throw s;let o=b(this.container.url,z.item),a=g(i=this.container.url),l=await this.clientContext.create({body:e,path:o,resourceType:z.item,resourceId:a,diagnosticNode:r,options:t,partitionKey:n}),c=new tT(this.container,l.result.id,this.clientContext,n);return new t_(l.result,l.headers,l.code,l.substatus,c,ev())},this.clientContext)}async upsert(e,t={}){return eS(async r=>{var i;void 0!==e.id&&""!==e.id||t.disableAutomaticIdGeneration||(e.id=ed());let n=tb(e,await tx(r,this.container)),s={};if(!y(e,s))throw s;let o=b(this.container.url,z.item),a=g(i=this.container.url),l=await this.clientContext.upsert({body:e,path:o,resourceType:z.item,resourceId:a,options:t,partitionKey:n,diagnosticNode:r}),c=new tT(this.container,l.result.id,this.clientContext,n);return new t_(l.result,l.headers,l.code,l.substatus,c,ev())},this.clientContext)}async bulk(e,t,r){return eS(async i=>{let{resources:n}=await this.container.readPartitionKeyRanges().fetchAll(),s=await tx(i,this.container),o=n.map(e=>({min:e.minInclusive,max:e.maxExclusive,rangeId:e.id,indexes:[],operations:[]}));this.groupOperationsBasedOnPartitionKey(e,s,r,o);let l=b(this.container.url,z.item),c=[];return await Promise.all(o.filter(e=>e.operations.length).flatMap(e=>(function(e){if((null==e?void 0:e.operations)===void 0||e.operations.length<1)return[];let t=tj(e.operations[0]),r=Object.assign(Object.assign({},e),{operations:[e.operations[0]],indexes:[e.indexes[0]]}),i=[];i.push(r);for(let n=1;n<e.operations.length;n++){let s=e.operations[n],o=tj(s);t+o>a.DefaultMaxBulkRequestBodySizeInBytes&&(r=Object.assign(Object.assign({},e),{operations:[],indexes:[]}),i.push(r),t=0),r.operations.push(s),r.indexes.push(e.indexes[n]),t+=o}return i})(e)).map(async e=>{if(e.operations.length>100)throw Error("Cannot run bulk request with more than 100 operations per partition");try{(await ew(async i=>this.clientContext.bulk({body:e.operations,partitionKeyRangeId:e.rangeId,path:l,resourceId:this.container.url,bulkOptions:t,options:r,diagnosticNode:i}),i,J.BATCH_REQUEST)).result.forEach((t,r)=>{c[e.indexes[r]]=t})}catch(e){if(410===e.code)throw Error("Partition key error. Either the partitions have split or an operation has an unsupported partitionKey type"+e.message);throw Error(`Bulk request errored with: ${e.message}`)}})),c.diagnostics=i.toDiagnostic(this.clientContext.getClientConfig()),c},this.clientContext)}groupOperationsBasedOnPartitionKey(e,t,r,i){e.forEach((e,n)=>{let{operation:s,partitionKey:o}=function(e,t,r={}){var i,n;let s;if(i=e,n=r,i.operationType!==tF.Create&&i.operationType!==tF.Upsert||void 0!==i.resourceBody.id&&""!==i.resourceBody.id||n.disableAutomaticIdGeneration||(i.resourceBody.id=ed()),Object.prototype.hasOwnProperty.call(e,"partitionKey"))s=void 0===e.partitionKey?t.paths.map(()=>tg):tm(e.partitionKey);else switch(e.operationType){case tF.Create:case tF.Replace:case tF.Upsert:s=tP(tb(e.resourceBody,t),"Unexpected undefined Partition Key Found.");break;case tF.Read:case tF.Delete:case tF.Patch:s=t.paths.map(()=>tg)}return{operation:Object.assign(Object.assign({},e),{partitionKey:JSON.stringify(s)}),partitionKey:s}}(e,t,r),a=function(e,t){let r=(null==t?void 0:t.kind)||et.Hash,i=t&&t.version&&t.version===er.V2;switch(r){case et.Hash:return i?re(e):function(e){let t=e[0],r=function(e){switch(typeof e){case"string":{let t=e.substr(0,100);
8return ri.concat([ri.from(tV.String,"hex"),ri.from(t),ri.from(tV.Undefined,"hex")])}case"number":{let t=tG(e);return ri.concat([ri.from(tV.Number,"hex"),t])}case"boolean":{let t=e?tV.True:tV.False;return ri.from(t,"hex")}case"object":if(null===e)return ri.from(tV.Null,"hex");return ri.from(tV.Undefined,"hex");case"undefined":return ri.from(tV.Undefined,"hex");default:throw Error(`Unexpected type: ${typeof e}`)}}(t),i=tQ(t7.x86.hash32(r)),n=function(e){switch(typeof e){case"string":return function(e){let t=rr.from(tV.String,"hex"),r=[...rr.from(e)],i=e.length<=100;for(let e=0;e<(i?r.length:101);e++){let i=r[e];i<255&&i++,t=rr.concat([t,rr.from(i.toString(16),"hex")])}return i&&(t=rr.concat([t,rr.from(tV.Undefined,"hex")])),t}(e.substr(0,100));case"number":return tQ(e);case"boolean":{let t=e?tV.True:tV.False;return ri.from(t,"hex")}case"object":if(null===e)return ri.from(tV.Null,"hex");return ri.from(tV.Undefined,"hex");case"undefined":return ri.from(tV.Undefined,"hex");default:throw Error(`Unexpected type: ${typeof e}`)}}(t);return ri.concat([i,n]).toString("hex").toUpperCase()}(e);case et.MultiHash:return e.map(e=>re([e])).join("")}}(tP(o,"undefined value for PartitionKey is not expected during grouping of bulk operations."),t),l=tP(i.find(e=>(function(e,t,r){let i=r.localeCompare(e)>=0,n=0>r.localeCompare(t);return i&&n})(e.min,e.max,a)),"No suitable Batch found.");l.operations.push(s),l.indexes.push(n)})}async batch(e,t,r){return eS(async i=>{e.map(e=>(function(e,t={}){return e.operationType!==tF.Create&&e.operationType!==tF.Upsert||void 0!==e.resourceBody.id&&""!==e.resourceBody.id||t.disableAutomaticIdGeneration||(e.resourceBody.id=ed()),e})(e,r));let n=b(this.container.url,z.item);if(e.length>100)throw Error("Cannot run batch request with more than 100 operations per partition");try{return await this.clientContext.batch({body:e,partitionKey:t,path:n,resourceId:this.container.url,options:r,diagnosticNode:i})}catch(e){throw Error(`Batch request error: ${e.message}`)}},this.clientContext)}}class rC extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.storedProcedure=i}get sproc(){return this.storedProcedure}}class rE{get url(){var e,t,r;return e=this.container.database.id,t=this.container.id,x(r=w(r=this.id)),tc(e,t)+"/"+a.Path.StoredProceduresPathSegment+"/"+r}constructor(e,t,r){this.container=e,this.id=t,this.clientContext=r}async read(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.sproc,resourceId:n,options:e,diagnosticNode:t});return new rC(s.result,s.headers,s.code,this,ev())},this.clientContext)}async replace(e,t){return eS(async r=>{var i;e.body&&(e.body=e.body.toString());let n={};if(!m(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.sproc,resourceId:o,options:t,diagnosticNode:r});return new rC(a.result,a.headers,a.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.sproc,resourceId:n,options:e,diagnosticNode:t});return new rC(s.result,s.headers,s.code,this,ev())},this.clientContext)}async execute(e,t,r){return eS(async i=>{void 0===e&&(e=tw(await tx(i,this.container)));let n=await this.clientContext.execute({sprocLink:this.url,params:t,options:r,partitionKey:e,diagnosticNode:i});return new td(n.result,n.headers,n.code,ev())},this.clientContext)}}class r_{constructor(e,t){this.container=e,this.clientContext=t}query(e,t){var r;let i=b(this.container.url,z.sproc),n=g(r=this.container.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.sproc,resourceId:n,resultFn:e=>e.StoredProcedures,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}async create(e,t){return eS(async r=>{var i;e.body&&(e.body=e.body.toString());let n={};if(!m(e,n))throw n;let s=b(this.container.url,z.sproc),o=g(i=this.container.url),a=await this.clientContext.create({body:e,path:s,resourceType:z.sproc,resourceId:o,options:t,diagnosticNode:r}),l=new rE(this.container,a.result.id,this.clientContext);return new rC(a.result,a.headers,a.code,l,ev())},this.clientContext)}}class rT extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.trigger=i}}class rP{get url(){var e,t,r;return e=this.container.database.id,t=this.container.id,x(r=w(r=this.id
8)),tc(e,t)+"/"+a.Path.TriggersPathSegment+"/"+r}constructor(e,t,r){this.container=e,this.id=t,this.clientContext=r}async read(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.trigger,resourceId:n,options:e,diagnosticNode:t});return new rT(s.result,s.headers,s.code,this,ev())},this.clientContext)}async replace(e,t){return eS(async r=>{var i;e.body&&(e.body=e.body.toString());let n={};if(!m(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.trigger,resourceId:o,options:t,diagnosticNode:r});return new rT(a.result,a.headers,a.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.trigger,resourceId:n,options:e,diagnosticNode:t});return new rT(s.result,s.headers,s.code,this,ev())},this.clientContext)}}class rR{constructor(e,t){this.container=e,this.clientContext=t}query(e,t){var r;let i=b(this.container.url,z.trigger),n=g(r=this.container.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.trigger,resourceId:n,resultFn:e=>e.Triggers,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}async create(e,t){return eS(async r=>{var i;e.body&&(e.body=e.body.toString());let n={};if(!m(e,n))throw n;let s=b(this.container.url,z.trigger),o=g(i=this.container.url),a=await this.clientContext.create({body:e,path:s,resourceType:z.trigger,resourceId:o,options:t,diagnosticNode:r}),l=new rP(this.container,a.result.id,this.clientContext);return new rT(a.result,a.headers,a.code,l,ev())},this.clientContext)}}class rI extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.userDefinedFunction=i}get udf(){return this.userDefinedFunction}}class rO{get url(){var e,t,r;return e=this.container.database.id,t=this.container.id,x(r=w(r=this.id)),tc(e,t)+"/"+a.Path.UserDefinedFunctionsPathSegment+"/"+r}constructor(e,t,r){this.container=e,this.id=t,this.clientContext=r}async read(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.udf,resourceId:n,options:e,diagnosticNode:t});return new rI(s.result,s.headers,s.code,this,ev())},this.clientContext)}async replace(e,t){return eS(async r=>{var i;e.body&&(e.body=e.body.toString());let n={};if(!m(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.udf,resourceId:o,options:t,diagnosticNode:r});return new rI(a.result,a.headers,a.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.udf,resourceId:n,options:e,diagnosticNode:t});return new rI(s.result,s.headers,s.code,this,ev())},this.clientContext)}}class rA{constructor(e,t){this.container=e,this.clientContext=t}query(e,t){var r;let i=b(this.container.url,z.udf),n=g(r=this.container.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.udf,resourceId:n,resultFn:e=>e.UserDefinedFunctions,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}async create(e,t){return eS(async r=>{var i;e.body&&(e.body=e.body.toString());let n={};if(!m(e,n))throw n;let s=b(this.container.url,z.udf),o=g(i=this.container.url),a=await this.clientContext.create({body:e,path:s,resourceType:z.udf,resourceId:o,options:t,diagnosticNode:r}),l=new rO(this.container,a.result.id,this.clientContext);return new rI(a.result,a.headers,a.code,l,ev())},this.clientContext)}}class rM{constructor(e,t){this.container=e,this.clientContext=t}storedProcedure(e){return new rE(this.container,e,this.clientContext)}trigger(e){return new rP(this.container,e,this.clientContext)}userDefinedFunction(e){return new rO(this.container,e,this.clientContext)}get storedProcedures(){return this.$sprocs||(this.$sprocs=new r_(this.container,this.clientContext)),this.$sprocs}get triggers(){return this.$triggers||(this.$triggers=new rR(this.container,this.clientContext)),this.$triggers}get userDefinedFunctions(){return this.$udfs||(this.$udfs=new rA(this.container,this.clientContext)),this.$udfs}}class rk extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.container=i}}
8class rN extends td{constructor(e,t,r,i,n){super(e,t,r,i),this.offer=n}}class rL{get url(){return`/${a.Path.OffersPathSegment}/${this.id}`}constructor(e,t,r){this.client=e,this.id=t,this.clientContext=r}async read(e){return eS(async t=>{let r=await this.clientContext.read({path:this.url,resourceType:z.offer,resourceId:this.id,options:e,diagnosticNode:t});return new rN(r.result,r.headers,r.code,ev(),this)},this.clientContext)}async replace(e,t){return eS(async r=>{let i={};if(!m(e,i))throw i;let n=await this.clientContext.replace({body:e,path:this.url,resourceType:z.offer,resourceId:this.id,options:t,diagnosticNode:r});return new rN(n.result,n.headers,n.code,ev(),this)},this.clientContext)}}class rD{get items(){return this.$items||(this.$items=new rS(this,this.clientContext)),this.$items}get scripts(){return this.$scripts||(this.$scripts=new rM(this,this.clientContext)),this.$scripts}get conflicts(){return this.$conflicts||(this.$conflicts=new tp(this,this.clientContext)),this.$conflicts}get url(){return tc(this.database.id,this.id)}constructor(e,t,r){this.database=e,this.id=t,this.clientContext=r}item(e,t){return new tT(this,e,this.clientContext,t)}conflict(e,t){return new tS(this,e,this.clientContext,t)}async read(e){return eS(async t=>this.readInternal(t,e),this.clientContext)}async readInternal(e,t){var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.container,resourceId:n,options:t,diagnosticNode:e});return this.clientContext.partitionKeyDefinitionCache[this.url]=s.result.partitionKey,new rk(s.result,s.headers,s.code,this,ev())}async replace(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.container,resourceId:o,options:t,diagnosticNode:r});return new rk(a.result,a.headers,a.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.container,resourceId:n,options:e,diagnosticNode:t});return new rk(s.result,s.headers,s.code,this,ev())},this.clientContext)}async getPartitionKeyDefinition(){return eS(async e=>this.readPartitionKeyDefinition(e),this.clientContext)}async readPartitionKeyDefinition(e){if(this.url in this.clientContext.partitionKeyDefinitionCache)return e.addData({readFromCache:!0}),new td(this.clientContext.partitionKeyDefinitionCache[this.url],{},0,ev());let{headers:t,statusCode:r,diagnostics:i}=await ex(async e=>this.readInternal(e),e,G.ContainerLookUp);return new td(this.clientContext.partitionKeyDefinitionCache[this.url],t,r,i)}async readOffer(e={}){return eS(async t=>{let{resource:r}=await this.read(),i=r._self,n=await this.clientContext.queryFeed({path:"/offers",resourceId:"",resourceType:z.offer,query:`SELECT * from root where root.resource = "${i}"`,resultFn:e=>e.Offers,options:e,diagnosticNode:t}),s=n.result[0]?new rL(this.database.client,n.result[0].id,this.clientContext):void 0;return new rN(n.result[0],n.headers,n.code,ev(),s)},this.clientContext)}async getQueryPlan(e){return eS(async t=>{var r;let i=b(this.url);return this.clientContext.getQueryPlan(i+"/docs",z.item,g(r=this.url),e,{},t)},this.clientContext)}readPartitionKeyRanges(e){return e=e||{},this.clientContext.queryPartitionKeyRanges(this.url,void 0,e)}async getFeedRanges(){return eS(async e=>{let{resources:t}=await this.readPartitionKeyRanges().fetchAllInternal(e),r=[];for(let e of t){let t=new ru(e.minInclusive,e.maxExclusive);Object.freeze(t),r.push(t)}return r},this.clientContext)}async deleteAllItemsForPartitionKey(e,t){return eS(async r=>{var i;let n=b(this.url),s=g(i=this.url);n+="/operations/partitionkeydelete";let o=await this.clientContext.delete({path:n,resourceType:z.container,resourceId:s,options:t,partitionKey:e,method:F.post,diagnosticNode:r});return new rk(o.result,o.headers,o.code,this,ev())},this.clientContext)}}function rB(e){if(e.throughput){if(e.maxThroughput)throw console.log("should be erroring"),Error("Cannot specify `throughput` with `maxThroughput`");
8if(e.autoUpgradePolicy)throw Error("Cannot specify autoUpgradePolicy with throughput. Use `maxThroughput` instead")}}class rq{constructor(e,t){this.database=e,this.clientContext=t}query(e,t){var r;let i=b(this.database.url,z.container),n=g(r=this.database.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.container,resourceId:n,resultFn:e=>e.DocumentCollections,query:e,options:r,diagnosticNode:t}))}async create(e,t={}){return eS(async r=>this.createInternal(r,e,t),this.clientContext)}async createInternal(e,t,r={}){var i;let n={};if(!m(t,n))throw n;let s=b(this.database.url,z.container),o=g(i=this.database.url);if(rB(t),t.maxThroughput){let e={maxThroughput:t.maxThroughput};t.autoUpgradePolicy&&(e.autoUpgradePolicy=t.autoUpgradePolicy);let i=JSON.stringify(e);r.initialHeaders=Object.assign({},r.initialHeaders,{[a.HttpHeaders.AutoscaleSettings]:i}),delete t.maxThroughput,delete t.autoUpgradePolicy}if(t.throughput&&(r.initialHeaders=Object.assign({},r.initialHeaders,{[a.HttpHeaders.OfferThroughput]:t.throughput}),delete t.throughput),"string"==typeof t.partitionKey){if(!t.partitionKey.startsWith("/"))throw Error("Partition key must start with '/'");t.partitionKey={paths:[t.partitionKey]}}t.partitionKey&&t.partitionKey.paths||(t.partitionKey={paths:[th]});let l=await this.clientContext.create({body:t,path:s,resourceType:z.container,resourceId:o,diagnosticNode:e,options:r}),c=new rD(this.database,l.result.id,this.clientContext);return new rk(l.result,l.headers,l.code,c,ev())}async createIfNotExists(e,t){if(!e||null===e.id||void 0===e.id)throw Error("body parameter must be an object with an id property");return eS(async r=>{try{return await this.database.container(e.id).readInternal(r,t)}catch(i){if(i.code===S.NotFound){let n=await this.createInternal(r,e,t);return D(n.headers,i.headers),n}throw i}},this.clientContext)}readAll(e){return this.query(void 0,e)}}class rU extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.permission=i}}class rH{get url(){var e,t,r;return e=this.user.database.id,t=this.user.id,x(r=w(r=this.id)),tu(e,t)+"/"+a.Path.PermissionsPathSegment+"/"+r}constructor(e,t,r){this.user=e,this.id=t,this.clientContext=r}async read(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.permission,resourceId:n,options:e,diagnosticNode:t});return new rU(s.result,s.headers,s.code,this,ev())},this.clientContext)}async replace(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.permission,resourceId:o,options:t,diagnosticNode:r});return new rU(a.result,a.headers,a.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.permission,resourceId:n,options:e,diagnosticNode:t});return new rU(s.result,s.headers,s.code,this,ev())},this.clientContext)}}class rz{constructor(e,t){this.user=e,this.clientContext=t}query(e,t){var r;let i=b(this.user.url,z.permission),n=g(r=this.user.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.permission,resourceId:n,resultFn:e=>e.Permissions,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}async create(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.user.url,z.permission),o=g(i=this.user.url),a=await this.clientContext.create({body:e,path:s,resourceType:z.permission,resourceId:o,diagnosticNode:r,options:t}),l=new rH(this.user,a.result.id,this.clientContext);return new rU(a.result,a.headers,a.code,l,ev())},this.clientContext)}async upsert(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.user.url,z.permission),o=g(i=this.user.url),a=await this.clientContext.upsert({body:e,path:s,resourceType:z.permission,resourceId:o,options:t,diagnosticNode:r}),l=new rH(this.user,a.result.id,this.clientContext);return new rU(a.result,a.headers,a.code,l,ev())},this.clientContext)}}class rF extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.user=i}}class rj{get url(){return tu(this.database.id,this.id)}constructor(e,t,r){this.database=e,this.id=t,this.clientContext=r,this.permissions=new rz(this,this.clientContext)}permission(e){return new rH(this,e,this.clientContext)}async read(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.user,resourceId:n,options:e,diagnosticNode:t});return new rF(s.result,s.headers,s.code,this,ev())},this.clientContext)}async replace(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.url),o=g(i=this.url),a=await this.clientContext.replace({body:e,path:s,resourceType:z.user,resourceId:o,options:t,diagnosticNode:r});return new rF(a.result,a.headers,a.code,this,ev())},this.clientContext)}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.user,resourceId:n,options:e,diagnosticNode:t});return new rF(s.result,s.headers,s.code,this,ev())},this.clientContext)}}class r${constructor(e,t){this.database=e,this.clientContext=t}query(e,t){var r;let i=b(this.database.url,z.user),n=g(r=this.database.url);return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:i,resourceType:z.user,resourceId:n,resultFn:e=>e.Users,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}async create(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.database.url,z.user),o=g(i=this.database.url),a=await this.clientContext.create({body:e,path:s,resourceType:z.user,resourceId:o,options:t,diagnosticNode:r}),l=new rj(this.database,a.result.id,this.clientContext);return new rF(a.result,a.headers,a.code,l,ev())},this.clientContext)}async upsert(e,t){return eS(async r=>{var i;let n={};if(!m(e,n))throw n;let s=b(this.database.url,z.user),o=g(i=this.database.url),a=await this.clientContext.upsert({body:e,path:s,resourceType:z.user,resourceId:o,options:t,diagnosticNode:r}),l=new rj(this.database,a.result.id,this.clientContext);return new rF(a.result,a.headers,a.code,l,ev())},this.clientContext)}}class rK extends td{constructor(e,t,r,i,n){super(e,t,r,n),this.database=i}}
8class rV{get url(){return tl(this.id)}constructor(e,t,r){this.client=e,this.id=t,this.clientContext=r,this.containers=new rq(this,this.clientContext),this.users=new r$(this,this.clientContext)}container(e){return new rD(this,e,this.clientContext)}user(e){return new rj(this,e,this.clientContext)}async read(e){return eS(async t=>this.readInternal(t,e),this.clientContext)}async readInternal(e,t){var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.read({path:i,resourceType:z.database,resourceId:n,options:t,diagnosticNode:e});return new rK(s.result,s.headers,s.code,this,ev())}async delete(e){return eS(async t=>{var r;let i=b(this.url),n=g(r=this.url),s=await this.clientContext.delete({path:i,resourceType:z.database,resourceId:n,options:e,diagnosticNode:t});return new rK(s.result,s.headers,s.code,this,ev())},this.clientContext)}async readOffer(e={}){return eS(async t=>{let{resource:r}=await ex(async e=>this.readInternal(e),t,G.DatabaseLookUp),i=r._self,n=await this.clientContext.queryFeed({path:"/offers",resourceId:"",resourceType:z.offer,query:`SELECT * from root where root.resource = "${i}"`,resultFn:e=>e.Offers,options:e,diagnosticNode:t}),s=n.result[0]?new rL(this.client,n.result[0].id,this.clientContext):void 0;return new rN(n.result[0],n.headers,n.code,ev(),s)},this.clientContext)}}class rW{constructor(e,t){this.client=e,this.clientContext=t}query(e,t){let r=(t,r)=>this.clientContext.queryFeed({path:"/dbs",resourceType:z.database,resourceId:"",resultFn:e=>e.Databases,query:e,options:r,diagnosticNode:t});return new ta(this.clientContext,e,t,r)}async create(e,t={}){return eS(async r=>this.createInternal(r,e,t),this.clientContext)}async createInternal(e,t,r={}){let i={};if(!m(t,i))throw i;if(rB(t),t.maxThroughput){let e={maxThroughput:t.maxThroughput};t.autoUpgradePolicy&&(e.autoUpgradePolicy=t.autoUpgradePolicy);let i=JSON.stringify(e);r.initialHeaders=Object.assign({},r.initialHeaders,{[a.HttpHeaders.AutoscaleSettings]:i}),delete t.maxThroughput,delete t.autoUpgradePolicy}t.throughput&&(r.initialHeaders=Object.assign({},r.initialHeaders,{[a.HttpHeaders.OfferThroughput]:t.throughput}),delete t.throughput);let n=await this.clientContext.create({body:t,path:"/dbs",resourceType:z.database,resourceId:void 0,diagnosticNode:e,options:r}),s=new rV(this.client,t.id,this.clientContext);return new rK(n.result,n.headers,n.code,s,ev())}async createIfNotExists(e,t){if(!e||null===e.id||void 0===e.id)throw Error("body parameter must be an object with an id property");return eS(async r=>{try{return await this.client.database(e.id).readInternal(r,t)}catch(i){if(i.code===S.NotFound){let n=await this.createInternal(r,e,t);return D(n.headers,i.headers),n}throw i}},this.clientContext)}readAll(e){return this.query(void 0,e)}}class rQ{constructor(e,t){this.client=e,this.clientContext=t}query(e,t){return new ta(this.clientContext,e,t,(t,r)=>this.clientContext.queryFeed({path:"/offers",resourceType:z.offer,resourceId:"",resultFn:e=>e.Offers,query:e,options:r,diagnosticNode:t}))}readAll(e){return this.query(void 0,e)}}var rG=r(26494);!function(e){e.Strong="Strong",e.BoundedStaleness="BoundedStaleness",e.Session="Session",e.Eventual="Eventual",e.ConsistentPrefix="ConsistentPrefix"}(en||(en={}));class rX{get DatabasesLink(){return this.databasesLink}get MediaLink(){return this.mediaLink}get MaxMediaStorageUsageInMB(){return this.maxMediaStorageUsageInMB}get CurrentMediaStorageUsageInMB(){return this.currentMediaStorageUsageInMB}get ConsistencyPolicy(){return this.consistencyPolicy}constructor(e,t){this.writableLocations=[],this.readableLocations=[],this.databasesLink="/dbs/",this.mediaLink="/media/",this.maxMediaStorageUsageInMB=t[a.HttpHeaders.MaxMediaStorageUsageInMB],this.currentMediaStorageUsageInMB=t[a.HttpHeaders.CurrentMediaStorageUsageInMB],this.consistencyPolicy=e.userConsistencyPolicy?e.userConsistencyPolicy.defaultConsistencyLevel:en.Session,e[a.WritableLocations]&&"localhost"!==e.id&&(this.writableLocations=e[a.WritableLocations]),e[a.ReadableLocations]&&"localhost"!==e.id&&(this.readableLocations=e[a.ReadableLocations]),e[a.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]&&(this.enableMultipleWritableLocations=!0===e[a.ENABLE_MULTIPLE_WRITABLE_LOCATIONS]||"true"===e[a.ENABLE_MULTIPLE_WRITABLE_LOCATIONS])}}
8async function rJ(e,t,r,i){if(!t.plugins)return r(t,e,void 0);let n=0,s=o=>++n>=o.plugins.length?r(t,e,void 0):o.plugins[n].on!==i?s(t):o.plugins[n].plugin(o,e,s);return t.plugins[n].on!==i?s(t):t.plugins[n].plugin(t,e,s)}!function(e){e.request="request",e.operation="operation"}(es||(es={}));var rY=r(54992);let rZ="TimeoutError";class r0 extends Error{constructor(e="Timeout Error"){super(e),this.code=rZ,this.name=rZ}}let r1=[10004,10009,10013,10014,10022,10035,10036,10048,10054,10058,10060,10061,10063,10064,10065,"ECONNRESET",rZ,"EPIPE"];class r2{constructor(e){this.operationType=e,this.maxTries=10,this.currentRetryAttemptCount=0,this.retryAfterInMs=1e3}async shouldRetry(e,t){var r,i;return!!e&&this.currentRetryAttemptCount<this.maxTries&&(r=this.operationType,i=e.code,(r===j.Read||r===j.Query)&&-1!==r1.indexOf(i))&&(t.addData({successfulRetryPolicy:"default"}),this.currentRetryAttemptCount++,!0)}}class r3{constructor(e,t){this.globalEndpointManager=e,this.operationType=t,this.maxTries=r3.maxTries,this.currentRetryAttemptCount=0,this.retryAfterInMs=r3.retryAfterInMs}async shouldRetry(e,t,r,i){return!!e&&!!r&&!!i&&!!this.globalEndpointManager.enableEndpointDiscovery&&!(this.currentRetryAttemptCount>=this.maxTries)&&(this.currentRetryAttemptCount++,p(this.operationType)?await this.globalEndpointManager.markCurrentLocationUnavailableForRead(t,i):await this.globalEndpointManager.markCurrentLocationUnavailableForWrite(t,i),r.retryCount=this.currentRetryAttemptCount,r.clearSessionTokenNotAvailable=!1,r.retryRequestOnPreferredLocations=!1,t.addData({successfulRetryPolicy:"endpointDiscovery"}),!0)}}r3.maxTries=120,r3.retryAfterInMs=1e3;class r6{constructor(e=9,t=0,r=30){this.maxTries=e,this.fixedRetryIntervalInMs=t,this.currentRetryAttemptCount=0,this.cummulativeWaitTimeinMs=0,this.retryAfterInMs=0,this.timeoutInMs=1e3*r,this.currentRetryAttemptCount=0,this.cummulativeWaitTimeinMs=0}async shouldRetry(e,t){return!!e&&!!(this.currentRetryAttemptCount<this.maxTries)&&(this.currentRetryAttemptCount++,this.retryAfterInMs=0,this.fixedRetryIntervalInMs?this.retryAfterInMs=this.fixedRetryIntervalInMs:e.retryAfterInMs&&(this.retryAfterInMs=e.retryAfterInMs),!!(this.cummulativeWaitTimeinMs<this.timeoutInMs))&&(this.cummulativeWaitTimeinMs+=this.retryAfterInMs,t.addData({successfulRetryPolicy:"resourceThrottle"}),!0)}}
8class r5{constructor(e,t,r,i){this.globalEndpointManager=e,this.resourceType=t,this.operationType=r,this.connectionPolicy=i,this.currentRetryAttemptCount=0,this.retryAfterInMs=0}async shouldRetry(e,t,r){if(!e||!r||!this.connectionPolicy.enableEndpointDiscovery)return!1;if(this.globalEndpointManager.canUseMultipleWriteLocations(this.resourceType,this.operationType)){let e=p(this.operationType)?await this.globalEndpointManager.getReadEndpoints():await this.globalEndpointManager.getWriteEndpoints();return!(this.currentRetryAttemptCount>e.length)&&(this.currentRetryAttemptCount++,r.retryCount++,r.retryRequestOnPreferredLocations=this.currentRetryAttemptCount>1,r.clearSessionTokenNotAvailable=this.currentRetryAttemptCount===e.length,t.addData({successfulRetryPolicy:"session"}),!0)}return!(this.currentRetryAttemptCount>1)&&(this.currentRetryAttemptCount++,r.retryCount++,r.retryRequestOnPreferredLocations=!1,r.clearSessionTokenNotAvailable=!0,t.addData({successfulRetryPolicy:"session"}),!0)}}class r4{constructor(e,t,r,i,n,s){this.globalEndpointManager=e,this.headers=t,this.methodType=r,this.resourceType=i,this.operationType=n,this.enableEndPointDiscovery=s,this.maxRetryAttemptCount=120,this.maxServiceUnavailableRetryCount=1,this.retryAfterInMs=0,this.failoverRetryCount=0}isValidRequestForTimeoutError(){let e=a.HttpHeaders.IsQuery in this.headers,t=a.HttpHeaders.IsQueryPlan in this.headers;return this.methodType===F.get||!!e||!!t}async shouldRetry(e,t,r,i){if(!e||!r||!i||e.code===rZ&&!this.isValidRequestForTimeoutError()||!this.enableEndPointDiscovery||e.code===S.ServiceUnavailable&&this.failoverRetryCount>=this.maxServiceUnavailableRetryCount||this.failoverRetryCount>=this.maxRetryAttemptCount)return!1;let n=this.globalEndpointManager.canUseMultipleWriteLocations(this.resourceType,this.operationType),s=p(this.operationType);return(!!n||!!s)&&(this.failoverRetryCount++,r.retryLocationServerIndex=await this.findEndpointIndex(this.failoverRetryCount),t.addData({successfulRetryPolicy:"timeout-failover"}),!0)}async findEndpointIndex(e){let t=this.globalEndpointManager.preferredLocationsCount,r=p(this.operationType),i=0;if(0!==t)i=e%t;else if(r){let t=await this.globalEndpointManager.getReadEndpoints();t&&t.length>0&&(i=e%t.length)}else{let t=await this.globalEndpointManager.getWriteEndpoints();t&&t.length>0&&(i=e%t.length)}return i}}async function r8({diagnosticNode:e,retryContext:t={retryCount:0},retryPolicies:r,requestContext:i,executeRequest:n}){return ew(async s=>{s.addData({requestAttempNumber:t.retryCount}),r||(r={endpointDiscoveryRetryPolicy:new r3(i.globalEndpointManager,i.operationType),resourceThrottleRetryPolicy:new r6(i.connectionPolicy.retryOptions.maxRetryAttemptCount,i.connectionPolicy.retryOptions.fixedRetryIntervalInMilliseconds,i.connectionPolicy.retryOptions.maxWaitTimeInSeconds),sessionReadRetryPolicy:new r5(i.globalEndpointManager,i.resourceType,i.operationType,i.connectionPolicy),defaultRetryPolicy:new r2(i.operationType),timeoutFailoverRetryPolicy:new r4(i.globalEndpointManager,i.headers,i.method,i.resourceType,i.operationType,i.connectionPolicy.enableEndpointDiscovery)}),t&&t.clearSessionTokenNotAvailable&&(i.client.clearSessionToken(i.path),delete i.headers["x-ms-session-token"]),t&&t.retryLocationServerIndex?i.endpoint=await i.globalEndpointManager.resolveServiceEndpoint(s,i.resourceType,i.operationType,t.retryLocationServerIndex):i.endpoint=await i.globalEndpointManager.resolveServiceEndpoint(s,i.resourceType,i.operationType);let o=U();try{let e=await n(s,i);return e.headers[a.ThrottleRetryCount]=r.resourceThrottleRetryPolicy.currentRetryAttemptCount,e.headers[a.ThrottleRetryWaitTimeInMs]=r.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs,e}catch(d){let c=null,u=d.headers||{};c=d.code===S.ENOTFOUND||"REQUEST_SEND_ERROR"===d.code||d.code===S.Forbidden&&(d.substatus===C.DatabaseAccountNotFound||d.substatus===C.WriteForbidden)?r.endpointDiscoveryRetryPolicy:d.code===S.TooManyRequests?r.resourceThrottleRetryPolicy:d.code===S.NotFound&&d.substatus===C.ReadSessionNotAvailable?r.sessionReadRetryPolicy:d.code===S.ServiceUnavailable||d.code===rZ?r.timeoutFailoverRetryPolicy:r.defaultRetryPolicy;let h=await c.shouldRetry(d,s,t,i.endpoint);if(h){var l;i.retryCount++;let a=h[1];return void 0!==a&&(i.endpoint=a),s.recordFailedNetworkCall(o,i,t.retryCount,d.co
8de,d.subsstatusCode,u),await (l=c.retryAfterInMs,new Promise(e=>{setTimeout(()=>{e()},l)})),r8({diagnosticNode:e,executeRequest:n,requestContext:i,retryContext:t,retryPolicies:r})}throw u[a.ThrottleRetryCount]=r.resourceThrottleRetryPolicy.currentRetryAttemptCount,u[a.ThrottleRetryWaitTimeInMs]=r.resourceThrottleRetryPolicy.cummulativeWaitTimeinMs,d.headers=Object.assign(Object.assign({},d.headers),u),d}},e,J.HTTP_REQUEST)}let r7=(0,eb.KV)("RequestHandler");async function r9(e,t){return rJ(e,t,ie,es.request)}async function ie(e,t){var r,o;let l,c=new rY.z,u=c.signal,h=e.options&&e.options.abortSignal;h&&(h.aborted?c.abort():h.addEventListener("abort",()=>{c.abort()}));let d=setTimeout(()=>{c.abort()},e.connectionPolicy.requestTimeout);e.body&&(e.body=tU(e.body));let p=(s||(s=(0,rG.fl)()),s),f=(r=e.endpoint,o=e.path,g(r)+o),m=(0,rG.Nc)(e.headers),y=(0,rG.G6)({url:f,headers:m,method:e.method,abortSignal:u,body:e.body});e.requestAgent?y.agent=e.requestAgent:y.agent="http"===new URL(f).protocol?i:n;let b=U();try{l=e.pipeline?await e.pipeline.sendRequest(p,y):await p.sendRequest(y)}catch(t){if("AbortError"===t.name){if(h&&!0===h.aborted)throw clearTimeout(d),t;throw new r0(`Timeout Error! Request took more than ${e.connectionPolicy.requestTimeout} ms`)}throw t}clearTimeout(d);let v=204===l.status||304===l.status||""===l.bodyAsText?null:JSON.parse(l.bodyAsText),w=l.headers.toJSON(),x=w[a.HttpHeaders.SubStatus]?parseInt(w[a.HttpHeaders.SubStatus],10):void 0;if(t.recordSuccessfulNetworkCall(b,e,l,x,f),l.status>=400){let t=new ra(v.message);throw r7.warning(l.status+" "+e.endpoint+" "+e.path+" "+v.message),t.code=l.status,t.body=v,t.headers=w,a.HttpHeaders.ActivityId in w&&(t.activityId=w[a.HttpHeaders.ActivityId]),a.HttpHeaders.SubStatus in w&&(t.substatus=x),a.HttpHeaders.RetryAfterInMs in w&&(t.retryAfterInMs=parseInt(w[a.HttpHeaders.RetryAfterInMs],10),Object.defineProperty(t,"retryAfterInMilliseconds",{get:()=>t.retryAfterInMs})),t}return{headers:w,result:v,code:l.status,substatus:x}}let it={request:async function(e,t){if(e.body&&(e.body=tU(e.body),!e.body))throw Error("parameter data must be a javascript object, string, or Buffer");return ew(async t=>r8({diagnosticNode:t,requestContext:e,executeRequest:r9}),t,J.REQUEST_ATTEMPTS)}};
8class ir{constructor(e,t,r,i){if(this.version=e,this.globalLsn=t,this.localLsnByregion=r,this.sessionToken=i,!this.sessionToken){let e=[];for(let[t,r]of this.localLsnByregion.entries())e.push(`${t}${ir.REGION_PROGRESS_SEPARATOR}${r}`);let t=e.join(ir.SEGMENT_SEPARATOR);""===t?this.sessionToken=`${this.version}${ir.SEGMENT_SEPARATOR}${this.globalLsn}`:this.sessionToken=`${this.version}${ir.SEGMENT_SEPARATOR}${this.globalLsn}${ir.SEGMENT_SEPARATOR}${t}`}}static create(e){let[t,r,...i]=e.split(ir.SEGMENT_SEPARATOR),n=parseInt(t,10),s=parseFloat(r);if("number"!=typeof n||"number"!=typeof s)return null;let o=new Map;for(let e of i){let t,[r,i]=e.split(ir.REGION_PROGRESS_SEPARATOR);if(!r||!i)return null;let n=parseInt(r,10);try{t=i}catch(e){return null}if("number"!=typeof n)return null;o.set(n,t)}return new ir(n,s,o,e)}equals(e){return!!e&&this.version===e.version&&this.globalLsn===e.globalLsn&&this.areRegionProgressEqual(e.localLsnByregion)}merge(e){if(null==e)throw Error("other (Vector Session Token) must not be null");if(this.version===e.version&&this.localLsnByregion.size!==e.localLsnByregion.size)throw Error(`Compared session tokens ${this.sessionToken} and ${e.sessionToken} have unexpected regions`);let[t,r]=this.version<e.version?[e,this]:[this,e],i=new Map;for(let[o,a]of t.localLsnByregion.entries()){let t=r.localLsnByregion.get(o);if(t){var n,s;i.set(o,(n=a,s=t,n.length===s.length?n>s?n:s:n.length>s.length?n:s))}else if(this.version===e.version)throw Error(`Compared session tokens have unex
8pected regions. Session 1: ${this.sessionToken} - Session 2: ${this.sessionToken}`);else i.set(o,a)}return new ir(Math.max(this.version,e.version),Math.max(this.globalLsn,e.globalLsn),i)}toString(){return this.sessionToken}areRegionProgressEqual(e){if(this.localLsnByregion.size!==e.size)return!1;for(let[t,r]of this.localLsnByregion.entries())if(r!==e.get(t))return!1;return!0}}ir.SEGMENT_SEPARATOR="#",ir.REGION_PROGRESS_SEPARATOR="=";class ii{constructor(e=new Map,t=new Map){this.collectionNameToCollectionResourceId=e,this.collectionResourceIdToSessionTokens=t}get(e){if(!e)throw Error("request cannot be null");let t=f(g(e.resourceAddress)),r=this.getPartitionKeyRangeIdToTokenMap(t);return ii.getCombinedSessionTokenString(r)}remove(e){let t,r=f(g(e.resourceAddress));r&&(t=this.collectionNameToCollectionResourceId.get(r),this.collectionNameToCollectionResourceId.delete(r)),void 0!==t&&this.collectionResourceIdToSessionTokens.delete(t)}set(e,t){if(!t||ii.isReadingFromMaster(e.resourceType,e.operationType))return;let r=t[a.HttpHeaders.SessionToken];if(!r)return;let i=this.getContainerName(e,t),n=e.isNameBased&&t[a.HttpHeaders.OwnerId]||e.resourceId;if(n&&i&&this.validateOwnerID(n)){this.collectionResourceIdToSessionTokens.has(n)||this.collectionResourceIdToSessionTokens.set(n,new Map),this.collectionNameToCollectionResourceId.has(i)||this.collectionNameToCollectionResourceId.set(i,n);let e=this.collectionResourceIdToSessionTokens.get(n);ii.compareAndSetToken(r,e)}}validateOwnerID(e){return 8===tM(e.replace(/-/g,"/")).length}getPartitionKeyRangeIdToTokenMap(e){let t=null;return e&&this.collectionNameToCollectionResourceId.has(e)&&(t=this.collectionResourceIdToSessionTokens.get(this.collectionNameToCollectionResourceId.get(e))),t}static getCombinedSessionTokenString(e){if(!e||0===e.size)return ii.EMPTY_SESSION_TOKEN;let t="";for(let[r,i]of e.entries())t+=r+ii.SESSION_TOKEN_PARTITION_SPLITTER+i.toString()+ii.SESSION_TOKEN_SEPARATOR;return t.slice(0,-1)}static compareAndSetToken(e,t){if(e)for(let r of e.split(ii.SESSION_TOKEN_SEPARATOR)){let e=r.split(ii.SESSION_TOKEN_PARTITION_SPLITTER);if(2!==e.length)return;let i=e[0],n=ir.create(e[1]),s=t.get(i)?t.get(i).merge(n):n;t.set(i,s)}}static isReadingFromMaster(e,t){return e===a.Path.OffersPathSegment||e===a.Path.DatabasesPathSegment||e===a.Path.UsersPathSegment||e===a.Path.PermissionsPathSegment||e===a.Path.TopologyPathSegment||e===a.Path.DatabaseAccountPathSegment||e===a.Path.PartitionKeyRangesPathSegment||e===a.Path.CollectionsPathSegment&&t===j.Query||!1}getContainerName(e,t){let r=t[a.HttpHeaders.OwnerFullName];return r||(r=g(e.resourceAddress)),f(r)}}ii.EMPTY_SESSION_TOKEN="",ii.SESSION_TOKEN_SEPARATOR=",",ii.SESSION_TOKEN_PARTITION_SPLITTER=":";class is{constructor(){this.logger=(0,eb.KV)("CosmosDBDiagnostics")}async write(e){this.logger.verbose(e)}}class io{async write(e){}}class ia{format(e){return JSON.stringify(e)}}let il=(0,eb.KV)("ClientContext"),ic="application/query+json",iu=a.HttpHeaders;
8class ih{constructor(e,t,r,i){if(this.cosmosClientOptions=e,this.globalEndpointManager=t,this.clientConfig=r,this.diagnosticLevel=i,this.connectionPolicy=e.connectionPolicy,this.sessionContainer=new ii,this.partitionKeyDefinitionCache={},this.pipeline=null,e.aadCredentials){this.pipeline=(0,rG.O8)();let t=new URL(e.endpoint).href.replace(/\/$/,""),r=`${t}/.default`;this.pipeline.addPolicy((0,rG.N$)({credential:e.aadCredentials,scopes:r,challengeCallbacks:{async authorizeRequest({request:e,getAccessToken:t}){let i=await t([r],{}),n=`type=aad&ver=1.0&sig=${i.token}`;e.headers.set("Authorization",n)}}}))}this.initializeDiagnosticSettings(i)}async read({path:e,resourceType:t,resourceId:r,options:i={},partitionKey:n,diagnosticNode:s}){try{let o=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.get,path:e,operationType:j.Read,resourceId:r,options:i,resourceType:t,partitionKey:n});s.addData({operationType:j.Read,resourceType:t}),o.headers=await this.buildHeaders(o),this.applySessionToken(o),o.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(s,o.resourceType,o.operationType);let a=await rJ(s,o,it.request,es.operation);return this.captureSessionToken(void 0,e,j.Read,a.headers),a}catch(t){throw this.captureSessionToken(t,e,j.Upsert,t.headers),t}}async queryFeed({path:e,resourceType:t,resourceId:r,resultFn:i,query:n,options:s,diagnosticNode:o,partitionKeyRangeId:a,partitionKey:l,startEpk:c,endEpk:u}){let h=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.get,path:e,operationType:j.Query,partitionKeyRangeId:a,resourceId:r,resourceType:t,options:s,body:n,partitionKey:l});o.addData({operationType:j.Query,resourceType:t});let d=ed();void 0!==n&&(h.method=F.post),h.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(o,h.resourceType,h.operationType),h.headers=await this.buildHeaders(h),void 0!==c&&void 0!==u&&(h.headers[iu.StartEpk]=c,h.headers[iu.EndEpk]=u,h.headers[iu.ReadFeedKeyType]="EffectivePartitionKeyRange"),void 0!==n&&(h.headers[iu.IsQuery]="true",h.headers[iu.ContentType]=ic,"string"==typeof n&&(h.body={query:n})),this.applySessionToken(h),il.info("query "+d+" started"+(h.partitionKeyRangeId?" pkrid: "+h.partitionKeyRangeId:"")),il.verbose(h);let p=Date.now(),f=await it.request(h,o);return il.info("query "+d+" finished - "+(Date.now()-p)+"ms"),this.captureSessionToken(void 0,e,j.Query,f.headers),this.processQueryFeedResponse(f,!!n,i)}async getQueryPlan(e,t,r,i,n={},s){let o=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.post,path:e,operationType:j.Read,resourceId:r,resourceType:t,options:n,body:i});s.addData({operationType:j.Read,resourceType:t}),o.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(s,o.resourceType,o.operationType),o.headers=await this.buildHeaders(o),o.headers[iu.IsQueryPlan]="True",o.headers[iu.QueryVersion]="1.4",o.headers[iu.SupportedQueryFeatures]="NonValueAggregate, Aggregate, Distinct, MultipleOrderBy, OffsetAndLimit, OrderBy, Top, CompositeAggregate, GroupBy, MultipleAggregates",o.headers[iu.ContentType]=ic,"string"==typeof i&&(o.body={query:i}),this.applySessionToken(o);let a=await it.request(o,s);return this.captureSessionToken(void 0,e,j.Query,a.headers),a}queryPartitionKeyRanges(e,t,r){let i=b(e,z.pkranges),n=g(e),s=async(e,r)=>await this.queryFeed({path:i,resourceType:z.pkranges,resourceId:n,resultFn:e=>e.PartitionKeyRanges,query:t,options:r,diagnosticNode:e});return new ta(this,t,r,s)}async delete({path:e,resourceType:t,resourceId:r,options:i={},partitionKey:n,method:s=F.delete,diagnosticNode:o}){try{let a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:s,operationType:j.Delete,path:e,resourceType:t,options:i,resourceId:r,partitionKey:n});o.addData({operationType:j.Delete,resourceType:t}),a.headers=await this.buildHeaders(a),this.applySessionToken(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(o,a.resourceType,a.operationType);let l=await rJ(o,a,it.request,es.operation);return"colls"!==d(e).type?this.captureSessionToken(void 0,e,j.Delete,l.headers):this.clearSessionToken(e),l}catch(t){throw this.captureSessionToken(t,e,j.Upsert,t.headers),t}}async patch({body:e,path:t,resourceType:r,resourceId:i,options:n={},partitionKey:s,diagnosticNode:o}){try{let a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.patch,operationType:j.Patch,path:t,resourceType:r,body:e,resourceId:i,options:n,partitionKey:s});o.addData({operationType:j.Patch,resourceType:r}),a.headers=await this.buildHeaders(a),this.applySessionToken(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(o,a.resourceType,a.operationType);let l=await rJ(o,a,it.request,es.operation);return this.captureSessionToken(void 0,t,j.Patch,l.headers),l}catch(e){throw this.captureSessionToken(e,t,j.Upsert,e.headers),e}}async create({body:e,path:t,resourceType:r,resourceId:i,diagnosticNode:n,options:s={},partitionKey:o}){try{let a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.post,operationType:j.Create,path:t,resourceType:r,resourceId:i,body:e,options:s,partitionKey:o});n.addData({operationType:j.Create,resourceType:r}),a.headers=await this.buildHeaders(a),this.applySessionToken(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(n,a.resourceType,a.operationType);let l=await rJ(n,a,it.request,es.operation);return this.captureSessionToken(void 0,t,j.Create,l.headers),l}catch(e){throw this.captureSessionToken(e,t,j.Upsert,e.headers),e}}processQueryFeedResponse(e,t,r){return t?{result:r(e.result),headers:e.headers,code:e.code}:{result:r(e.result).map(e=>e),headers:e.headers,code:e.code}}applySessionToken(e){let t=this.getSessionParams(e.path);if(e.headers&&e.headers[iu.SessionToken])return;let r=e.headers[iu.ConsistencyLevel];if(r&&r===en.Session&&t.resourceAddress){let r=this.sessionContainer.get(t);r&&(e.headers[iu.SessionToken]=r)}}async replace({body:e,path:t,resourceType:r,resourceId:i,options:n={},partitionKey:s,diagnosticNode:o}){try{let a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.put,operationType:j.Replace,path:t,resourceType:r,body:e,resourceId:i,options:n,partitionKey:s});o.addData({operationType:j.Replace,resourceType:r}),a.headers=await this.buildHeaders(a),this.applySessionToken(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(o,a.resourceType,a.operationType);let l=await rJ(o,a,it.request,es.operation);return this.captureSessionToken(void 0,t,j.Replace,l.headers),l}catch(e){throw this.captureSessionToken(e,t,j.Upsert,e.headers),e}}async upsert({body:e,path:t,resourceType:r,resourceId:i,options:n={},partitionKey:s,diagnosticNode:o}){try{let a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.post,operationType:j.Upsert,path:t,resourceType:r,body:e,resourceId:i,options:n,partitionKey:s});o.addData({operationType:j.Upsert,resourceType:r}),a.headers=await this.buildHeaders(a),a.headers[iu.IsUpsert]=!0,this.applySessionToken(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(o,a.resourceType,a.operationType);let l=await rJ(o,a,it.request,es.operation);return this.captureSessionToken(void 0,t,j.Upsert,l.headers),l}catch(e){throw this.captureSessionToken(e,t,j.Upsert,e.headers),e}}async execute({sprocLink:e,params:t,options:r={},partitionKey:i,diagnosticNode:n}){null==t||Array.isArray(t)||(t=[t]);let s=b(e),o=g(e),a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.post,operationType:j.Execute,path:s,resourceType:z.sproc,options:r,resourceId:o,body:t,partitionKey:i});return n.addData({operationType:j.Execute,resourceType:z.sproc}),a.headers=await this.buildHeaders(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(n,a.resourceType,a.operationType),await rJ(n,a,it.request,es.operation)}async getDatabaseAccount(e,t={}){let r=t.urlConnection||this.cosmosClientOptions.endpoint,i=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{endpoint:r,method:F.get,operationType:j.Read,path:"",resourceType:z.none,options:t});e.addData({operationType:j.Read,resourceType:z.none}),i.headers=await this.buildHeaders(i);let{result:n,headers:s,code:o,substatus:a,diagnostics:l}=await rJ(e,i,it.request,es.operation);return{result:new rX(n,s),headers:s,diagnostics:l,code:o,substatus:a}}getWriteEndpoint(e){return this.globalEndpointManager.getWriteEndpoint(e)}getReadEndpoint(e){return this.globalEndpointManager.getReadEndpoint(e)}getWriteEndpoints(){return this.globalEndpointManager.getWriteEndpoints()}getReadEndpoints(){return this.globalEndpointManager.getReadEndpoints()}async batch({body:e,path:t,partitionKey:r,resourceId:i,options:n={},diagnosticNode:s}){try{let o=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.post,operationType:j.Batch,path:t,body:e,resourceType:z.item,resourceId:i,options:n,partitionKey:r});s.addData({operationType:j.Batch,resourceType:z.item}),o.headers=await this.buildHeaders(o),o.headers[iu.IsBatchRequest]=!0,o.headers[iu.IsBatchAtomic]=!0,this.applySessionToken(o),o.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(s,o.resourceType,o.operationType);let a=await rJ(s,o,it.request,es.operation);return this.captureSessionToken(void 0,t,j.Batch,a.headers),a.diagnostics=s.toDiagnostic(this.getClientConfig()),a}catch(e){throw this.captureSessionToken(e,t,j.Upsert,e.headers),e}}async bulk({body:e,path:t,partitionKeyRangeId:r,resourceId:i,bulkOptions:n={},options:s={},diagnosticNode:o}){try{let a=Object.assign(Object.assign({},this.getContextDerivedPropsForRequestCreation()),{method:F.post,operationType:j.Batch,path:t,body:e,resourceType:z.item,resourceId:i,options:s});o.addData({operationType:j.Batch,resourceType:z.item}),a.headers=await this.buildHeaders(a),a.headers[iu.IsBatchRequest]=!0,a.headers[iu.PartitionKeyRangeID]=r,a.headers[iu.IsBatchAtomic]=!1,a.headers[iu.BatchContinueOnError]=n.continueOnError||!1,this.applySessionToken(a),a.endpoint=await this.globalEndpointManager.resolveServiceEndpoint(o,a.resourceType,a.operationType);let l=await rJ(o,a,it.request,es.operation);return this.captureSessionToken(void 0,t,j.Batch,l.headers),l}catch(e){throw this.captureSessionToken(e,t,j.Upsert,e.headers),e}}captureSessionToken(e,t,r,i){let n=this.getSessionParams(t);n.operationType=r,e&&(this.isMasterResource(n.resourceType)||e.code!==S.PreconditionFailed&&e.code!==S.Conflict&&(e.code!==S.NotFound||e.substatus===C.ReadSessionNotAvailable))||this.sessionContainer.set(n,i)}clearSessionToken(e){let t=this.getSessionParams(e);this.sessionContainer.remove(t)}recordDiagnostics(e){let t=this.diagnosticFormatter.format(e);this.diagnosticWriter.write(t)}initializeDiagnosticSettings(e){this.diagnosticFormatter=new ia,e===X.info?this.diagnosticWriter=new io:this.diagnosticWriter=new is}getSessionParams(e){let t=null,r=d(e);return{resourceId:null,resourceAddress:t=r.objectBody.self,resourceType:r.type,isNameBased:!0}}isMasterResource(e){return e===a.Path.OffersPathSegment||e===a.Path.DatabasesPathSegment||e===a.Path.UsersPathSegment||e===a.Path.PermissionsPathSegment||e===a.Path.TopologyPathSegment||e===a.Path.DatabaseAccountPathSegment||e===a.Path.PartitionKeyRangesPathSegment||e===a.Path.CollectionsPathSegment||!1}buildHeaders(e){return tz({clientOptions:this.cosmosClientOptions,defaultHeaders:Object.assign(Object.assign({},this.cosmosClientOptions.defaultHeaders),e.options.initialHeaders),verb:e.method,path:e.path,resourceId:e.resourceId,resourceType:e.resourceType,options:e.options,partitionKeyRangeId:e.partitionKeyRangeId,useMultipleWriteLocations:this.connectionPolicy.useMultipleWriteLocations,partitionKey:void 0!==e.partitionKey?tm(e.partitionKey):void 0})}getContextDerivedPropsForRequestCreation(){return{globalEndpointManager:this.globalEndpointManager,requestAgent:this.cosmosClientOptions.agent,connectionPolicy:this.connectionPolicy,client:this,plugins:this.cosmosClientOptions.plugins,pipeline:this.pipeline}}getClientConfig(){return this.clientConfig}}var id=r(29143),ip=r(29143);let ig=X.info,im=void 0!==ip&&ip.env&&ip.env[a.CosmosDbDiagnosticLevelEnvVarName]||void 0,iy=Object.values(X).map(e=>e.toString());function ib(e){return iy.includes(e)}(function(e){return"string"==typeof e&&e.trim().length>0})(im)&&(ib(im)?function(e){if(e&&!ib(e))throw Error(`Unknown diagnostic level '${e}'. Acceptable values: ${iy.join(",")}`);o=e}(im):console.error(`${a.CosmosDbDiagnosticLevelEnvVarName} set to unknown diagnostic level '${im}'; Setting Cosmos Db diagnostic level to info. Acceptable values: ${iy.join(", ")}.`)),!function(e){e[e.Gateway=0]="Gateway"}(eo||(eo={}));let iv=Object.freeze({connectionMode:eo.Gateway,requestTimeout:6e4,enableEndpointDiscovery:!0,preferredLocations:[],retryOptions:{maxRetryAttemptCount:9,fixedRetryIntervalInMilliseconds:0,maxWaitTimeInSeconds:30},useMultipleWriteLocations:!0,endpointRefreshRateInMs:3e5,enableBackgroun
8dEndpointRefreshing:!0});class iw{constructor(e,t){this.readDatabaseAccount=t,this.writeableLocations=[],this.readableLocations=[],this.unavailableReadableLocations=[],this.unavailableWriteableLocations=[],this.options=e,this.defaultEndpoint=e.endpoint,this.enableEndpointDiscovery=e.connectionPolicy.enableEndpointDiscovery,this.isRefreshing=!1,this.preferredLocations=this.options.connectionPolicy.preferredLocations,this.preferredLocationsCount=this.preferredLocations?this.preferredLocations.length:0}async getReadEndpoint(e){return this.resolveServiceEndpoint(e,z.item,j.Read)}async getWriteEndpoint(e){return this.resolveServiceEndpoint(e,z.item,j.Replace)}async getReadEndpoints(){return this.readableLocations.map(e=>e.databaseAccountEndpoint)}async getWriteEndpoints(){return this.writeableLocations.map(e=>e.databaseAccountEndpoint)}async markCurrentLocationUnavailableForRead(e,t){await this.refreshEndpointList(e);let r=this.readableLocations.find(e=>e.databaseAccountEndpoint===t);r&&(r.unavailable=!0,r.lastUnavailabilityTimestampInMs=Date.now(),this.unavailableReadableLocations.push(r))}async markCurrentLocationUnavailableForWrite(e,t){await this.refreshEndpointList(e);let r=this.writeableLocations.find(e=>e.databaseAccountEndpoint===t);r&&(r.unavailable=!0,r.lastUnavailabilityTimestampInMs=Date.now(),this.unavailableWriteableLocations.push(r))}canUseMultipleWriteLocations(e,t){let r=this.options.connectionPolicy.useMultipleWriteLocations;return e&&(r=r&&(e===z.item||e===z.sproc&&t===j.Execute)),r}async resolveServiceEndpoint(e,t,r,i=0){let n;if(!this.options.connectionPolicy.enableEndpointDiscovery)return e.addData({readFromCache:!0},"default_endpoint"),e.recordEndpointResolution(this.defaultEndpoint),this.defaultEndpoint;if(t===z.none)return e.addData({readFromCache:!0},"none_resource"),e.recordEndpointResolution(this.defaultEndpoint),this.defaultEndpoint;if(0===this.readableLocations.length||0===this.writeableLocations.length){let t=await ex(async e=>this.readDatabaseAccount(e,{urlConnection:this.defaultEndpoint}),e,G.DatabaseAccountLookUp);this.writeableLocations=t.resource.writableLocations,this.readableLocations=t.resource.readableLocations}let s=p(r)?this.readableLocations:this.writeableLocations;if(this.preferredLocations&&this.preferredLocations.length>0&&i<this.preferredLocations.length)for(let e=i;e<this.preferredLocations.length;e++){let t=this.preferredLocations[e];if(n=s.find(e=>!0!==e.unavailable&&ix(e.name)===ix(t)))break}return n||(n=(i>=0&&i<s.length?s.slice(i):s).find(e=>!0!==e.unavailable)),n=n||{name:"",databaseAccountEndpoint:this.defaultEndpoint},e.recordEndpointResolution(n.databaseAccountEndpoint),n.databaseAccountEndpoint}async refreshEndpointList(e){if(!this.isRefreshing&&this.enableEndpointDiscovery){this.isRefreshing=!0;let t=await this.getDatabaseAccountFromAnyEndpoint(e);t&&(this.refreshStaleUnavailableLocations(),this.refreshEndpoints(t)),this.isRefreshing=!1}}refreshEndpoints(e){for(let t of e.writableLocations)this.writeableLocations.find(e=>e.name===t.name)||this.writeableLocations.push(t);for(let t of e.readableLocations)this.readableLocations.find(e=>e.name===t.name)||this.readableLocations.push(t)}refreshStaleUnavailableLocations(){let e=Date.now();this.updateLocation(e,this.unavailableReadableLocations,this.readableLocations),this.unavailableReadableLocations=this.cleanUnavailableLocationList(e,this.unavailableReadableLocations),this.updateLocation(e,this.unavailableWriteableLocations,this.writeableLocations),this.unavailableWriteableLocations=this.cleanUnavailableLocationList(e,this.unavailableWriteableLocations)}updateLocation(e,t,r){for(let i of t){let t=r.find(e=>e.name===i.name);t&&e-t.lastUnavailabilityTimestampInMs>a.LocationUnavailableExpirationTimeInMs&&(t.unavailable=!1)}}cleanUnavailableLocationList(e,t){return t.filter(t=>!t||!(e-t.lastUnavailabilityTimestampInMs>=a.LocationUnavailableExpirationTimeInMs))}async getDatabaseAccountFromAnyEndpoint(e){try{let t={urlConnection:this.defaultEndpoint},{resource:r}=await this.readDatabaseAccount(e,t);return r}catch(e){}if(this.preferredLocations)for(let t of this.preferredLocations)try{let r={urlC
8onnection:iw.getLocationalEndpoint(this.defaultEndpoint,t)},{resource:i}=await this.readDatabaseAccount(e,r);if(i)return i}catch(e){}}static getLocationalEndpoint(e,t){let r=new URL(e);if(r.hostname){let i=r.hostname.toString().toLowerCase().split(".");if(i){let r=i[0],n=r+"-"+t.replace(" ","");return e.toLowerCase().replace(r,n)}}return null}}function ix(e){return e.split(" ").join("").toLowerCase()}class iS{constructor(e){var t,r;"string"==typeof e&&(e=function(e){let{AccountEndpoint:t,AccountKey:r}=e.split(";").reduce((e,t)=>{let[r,...i]=t.split("=");return e[r]=i.join("="),e},{});if(!t||!r)throw Error("Could not parse the provided connection string");return{endpoint:t,key:r}}(e)),new URL(e.endpoint);let i=this.initializeClientConfigDiagnostic(e);e.connectionPolicy=Object.assign({},iv,e.connectionPolicy),e.defaultHeaders=e.defaultHeaders||{},e.defaultHeaders[a.HttpHeaders.CacheControl]="no-cache",e.defaultHeaders[a.HttpHeaders.Version]=a.CurrentVersion,void 0!==e.consistencyLevel&&(e.defaultHeaders[a.HttpHeaders.ConsistencyLevel]=e.consistencyLevel),e.defaultHeaders[a.HttpHeaders.UserAgent]=function(e){let t=`${"object"==typeof navigator&&"userAgent"in navigator?navigator.userAgent:"object"==typeof id&&void 0!==id.version?`Node.js/${id.version.substr(1)} (${id.platform}; ${id.arch})`:"<environment undetectable>"} ${a.SDKName}/${a.SDKVersion}`;return e?t+" "+e:t}(e.userAgentSuffix);let n=new iw(e,async(e,t)=>this.getDatabaseAccountInternal(e,t));this.clientContext=new ih(e,n,i,function(e,t){let r=null!=t?t:e;return null!=r?r:ig}(e.diagnosticLevel,o)),(null==(t=e.connectionPolicy)?void 0:t.enableEndpointDiscovery)&&(null==(r=e.connectionPolicy)?void 0:r.enableBackgroundEndpointRefreshing)&&this.backgroundRefreshEndpointList(n,e.connectionPolicy.endpointRefreshRateInMs||iv.endpointRefreshRateInMs),this.databases=new rW(this,this.clientContext),this.offers=new rQ(this,this.clientContext)}initializeClientConfigDiagnostic(e){return{endpoint:e.endpoint,resourceTokensConfigured:void 0!==e.resourceTokens,tokenProviderConfigured:void 0!==e.tokenProvider,aadCredentialsConfigured:void 0!==e.aadCredentials,connectionPolicyConfigured:void 0!==e.connectionPolicy,consistencyLevel:e.consistencyLevel,defaultHeaders:e.defaultHeaders,agentConfigured:void 0!==e.agent,userAgentSuffix:e.userAgentSuffix,diagnosticLevel:e.diagnosticLevel,pluginsConfigured:void 0!==e.plugins,sDKVersion:a.SDKVersion}}async getDatabaseAccount(e){return eS(async t=>this.getDatabaseAccountInternal(t,e),this.clientContext)}async getDatabaseAccountInternal(e,t){let r=await this.clientContext.getDatabaseAccount(e,t);return new td(r.result,r.headers,r.code,ev(),r.substatus)}async getWriteEndpoint(){return eS(async e=>this.clientContext.getWriteEndpoint(e),this.clientContext)}async getReadEndpoint(){return eS(async e=>this.clientContext.getReadEndpoint(e),this.clientContext)}getWriteEndpoints(){return this.clientContext.getWriteEndpoints()}getReadEndpoints(){return this.clientContext.getReadEndpoints()}database(e){return new rV(this,e,this.clientContext)}offer(e){return new rL(this,e,this.clientContext)}dispose(){clearTimeout(this.endpointRefresher)}async backgroundRefreshEndpointList(e,t){this.endpointRefresher=setInterval(()=>{try{return eS(async t=>e.refreshEndpointList(t),this.clientContext,J.BACKGROUND_REFRESH_THREAD)}catch(e){console.warn("Failed to refresh endpoints",e)}},t),this.endpointRefresher.unref&&"function"==typeof this.endpointRefresher.unref&&this.endpointRefresher.unref()}}},93485:(e,t,r)=>{"use strict";r.d(t,{WJ:()=>i,p:()=>n}),r(68994);var i=class extends Error{name;status;constructor(e,t){super(e,t);let r=this.constructor;this.name=r.name,this.message=e||r.message||"",this.status=t?.status||r.status||500;let i=t?.code||r.code;void 0!==i&&(this.code=i);let n=r.help;void 0!==n&&(this.help=n),Error.captureStackTrace(this,r)}get[Symbol.toStringTag](){return this.constructor.name}toString(){return this.code?`${this.name} [${this.code}]: ${this.message}`:`${this.name}: ${this.message}`}},n=class extends i{static code="E_INVALID_ARGUMENTS_EXCEPTION";static status=500}},93629:(e,t,r)=>{"use strict";function i(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)&&!(e instanceof RegExp)&&!(e instanceof Date)}r.d(t,{G:()=>i})},94474:function(e){var t;e.exports=(t=function(){var e=JSON.parse('{"$":"dollar","%":"percent","&":"and","<":"less",">":"greater","|":"or","\xa2":"cent","\xa3":"pound","\xa4":"currency","\xa5":"yen","\xa9":"(c)","\xaa":"a","\xae":"(r)","\xba":"o","\xc0":"A","\xc1":"A","\xc2":"A","\xc3":"A","\xc4":"A","\xc5":"A","\xc6":"AE","\xc7":"C","\xc8":"E","\xc9":"E","\xca":"E","\xcb":"E","\xcc":"I","\xcd":"I","\xce":"I","\xcf":"I","\xd0":"D","\xd1":"N","\xd2":"O","\xd3":"O","\xd4":"O","\xd5":"O","\xd6":"O","\xd8":"O","\xd9":"U","\xda":"U","\xdb":"U","\xdc":"U","\xdd":"Y","\xde":"TH","\xdf":"ss","\xe0":"a","\xe1":"a","\xe2":"a","\xe3":"a","\xe4":"a","\xe5":"a","\xe6":"ae","\xe7":"c","\xe8":"e","\xe9":"e","\xea":"e","\xeb":"e","\xec":"i","\xed":"i","\xee":"i","\xef":"i","\xf0":"d","\xf1":"n","\xf2":"o","\xf3":"o","\xf4":"o","\xf5":"o","\xf6":"o","\xf8":"o","\xf9":"u","\xfa":"u","\xfb":"u","\xfc":"u","\xfd":"y","\xfe":"th","\xff":"y","Ä":"A","Ä":"a","Ä":"A","Ä":"a","Ä":"A","Ä
":"a","Ä":"C","Ä":"
8c","Ä":"C","Ä":"c","Ä":"D","Ä":"d","Ä":"DJ","Ä":"dj","Ä":"E","Ä":"e","Ä":"E","Ä":"e","Ä":"e","Ä":"e","Ä":"E","Ä":"e","Ä":"G","Ä":"g","Ä¢":"G","Ä£":"g","Ĩ":"I","Ä©":"i","Ī":"i","Ä«":"i","Ä®":"I","į":"i","İ":"I","ı":"i","Ķ":"k","Ä·":"k","Ä»":"L","ļ":"l","Ľ":"L","ľ":"l","Å":"L","Å":"l","Å":"N","Å":"n","Å
":"N","Å":"n","Å":"N","Å":"n","Å":"O","Å":"o","Å":"O","Å":"o","Å":"OE","Å":"oe","Å":"R","Å":"r","Å":"R","Å":"r","Å":"S","Å":"s","Å":"S","Å":"s","Å ":"S","Å¡":"s","Å¢":"T","Å£":"t","Ť":"T","Å¥":"t","Ũ":"U","Å©":"u","Ū":"u","Å«":"u","Å®":"U","ů":"u","Ű":"U","ű":"u","Ų":"U","ų":"u","Å´":"W","ŵ":"w","Ŷ":"Y","Å·":"y","Ÿ":"Y","Ź":"Z","ź":"z","Å»":"Z","ż":"z","Ž":"Z","ž":"z","Æ":"E","Æ":"f","Æ ":"O","Æ¡":"o","Ư":"U","ư":"u","Ç":"LJ","Ç":"lj","Ç":"NJ","Ç":"nj","È":"S","È":"s","È":"T","È":"t","É":"e","Ë":"o","Î":"A","Î":"E","Î":"H","Î":"I","Î":"O","Î":"Y","Î":"W","Î":"i","Î":"A","Î":"B","Î":"G","Î":"D","Î":"E","Î":"Z","Î":"H","Î":"8","Î":"I","Î":"K","Î":"L","Î":"M","Î":"N","Î":"3","Î":"O","Î ":"P","Ρ":"R","Σ":"S","Τ":"T","Î¥":"Y","Φ":"F","Χ":"X","Ψ":"PS","Ω":"W","Ϊ":"I","Ϋ":"Y","ά":"a","Î":"e","ή":"h","ί":"i","ΰ":"y","α":"a","β":"b","γ":"g","δ":"d","ε":"e","ζ":"z","η":"h","θ":"8","ι":"i","κ":"k","λ":"l","μ":"m","ν":"n","ξ":"3","ο":"o","Ï":"p","Ï":"r","Ï":"s","Ï":"s","Ï":"t","Ï
":"y","Ï":"f","Ï":"x","Ï":"ps","Ï":"w","Ï":"i","Ï":"y","Ï":"o","Ï":"y","Ï":"w","Ð":"Yo","Ð":"DJ","Ð":"Ye","Ð":"I","Ð":"Yi","Ð":"J","Ð":"LJ","Ð":"NJ","Ð":"C","Ð":"DZ","Ð":"A","Ð":"B","Ð":"V","Ð":"G","Ð":"D","Ð":"E","Ð":"Zh","Ð":"Z","Ð":"I","Ð":"J","Ð":"K","Ð":"L","Ð":"M","Ð":"N","Ð":"O","Ð":"P","Ð ":"R","С":"S","Т":"T","У":"U","Ф":"F","Ð¥":"H","Ц":"C","Ч":"Ch","Ш":"Sh","Щ":"Sh","Ъ":"U","Ы":"Y","Ь":"","Ð":"E","Ю":"Yu","Я":"Ya","а":"a","б":"b","в":"v","г":"g","д":"d","е":"e","ж":"zh","з":"z","и":"i","й":"j","к":"k","л":"l","м":"m","н":"n","о":"o","п":"p","Ñ":"r","Ñ":"s","Ñ":"t","Ñ":"u","Ñ":"f","Ñ
":"h","Ñ":"c","Ñ":"ch","Ñ":"sh","Ñ":"sh","Ñ":"u","Ñ":"y","Ñ":"","Ñ":"e","Ñ":"yu","Ñ":"ya","Ñ":"yo","Ñ":"dj","Ñ":"ye","Ñ":"i","Ñ":"yi","Ñ":"j","Ñ":"lj","Ñ":"nj","Ñ":"c","Ñ":"u","Ñ":"dz","Ò":"G","Ò":"g","Ò":"GH","Ò":"gh","Ò":"KH","Ò":"kh","Ò¢":"NG","Ò£":"ng","Ò®":"UE","Ò¯":"ue","Ò°":"U","Ò±":"u","Òº":"H","Ò»":"h","Ó":"AE","Ó":"ae","Ó¨":"OE","Ó©":"oe","Ô±":"A","Ô²":"B","Ô³":"G","Ô´":"D","Ôµ":"E","Ô¶":"Z","Ô·":"E\'","Ô¸":"Y\'","Ô¹":"T\'","Ôº":"JH","Ô»":"I","Ô¼":"L","Ô½":"X","Ô¾":"C\'","Ô¿":"K","Õ":"H","Õ":"D\'","Õ":"GH","Õ":"TW","Õ":"M","Õ
":"Y","Õ":"N","Õ":"SH","Õ":"CH","Õ":"P","Õ":"J","Õ":"R\'","Õ":"S","Õ":"V","Õ":"T","Õ":"R","Õ":"C","Õ":"P\'","Õ":"Q\'","Õ":"O\'\'","Õ":"F","Ö":"EV","Ø¡":"a","Ø¢":"aa","Ø£":"a","ؤ":"u","Ø¥":"i","ئ":"e","ا":"a","ب":"b","Ø©":"h","ت":"t","Ø«":"th","ج":"j","Ø":"h","Ø®":"kh","د":"d","ذ":"th","ر":"r","ز":"z","س":"s","Ø´":"sh","ص":"s","ض":"dh","Ø·":"t","ظ":"z","ع":"a","غ":"gh","Ù":"f","Ù":"q","Ù":"k","Ù":"l","Ù
":"m","Ù":"n","Ù":"h","Ù":"w","Ù":"a","Ù":"y","Ù":"an","Ù":"on","Ù":"en","Ù":"a","Ù":"u","Ù":"e","Ù":"","Ù ":"0","Ù¡":"1","Ù¢":"2","Ù£":"3","Ù¤":"4","Ù¥":"5","Ù¦":"6","Ù§":"7","Ù¨":"8","Ù©":"9","Ù¾":"p","Ú":"ch","Ú":"zh","Ú©":"k","Ú¯":"g","Û":"y","Û°":"0","Û±":"1","Û²":"2","Û³":"3","Û´":"4","Ûµ":"5","Û¶":"6","Û·":"7","Û¸":"8","Û¹":"9","฿":"baht","á":"a","á":"b","á":"g","á":"d","á":"e","á":"v","á":"z","á":"t","á":"i","á":"k","á":"l","á":"m","á":"n","á":"o","á":"p","á":"zh","á ":"r","á¡":"s","á¢":"t","á£":"u","á¤":"f","á¥":"k","á¦":"gh","á§":"q","á¨":"sh","á©":"ch","áª":"ts","á«":"dz","á¬":"ts","á":"ch","á®":"kh","á¯":"j","á°":"h","á¹¢":"S","á¹£":"s","áº":"W","áº":"w","áº":"W","áº":"w","áº":"W","áº
":"w","áº":"SS","Ạ":"A","ạ":"a","Ả":"A","ả":"a","Ấ":"A","ấ":"a","Ầ":"A","ầ":"a","Ẩ":"A","ẩ":"a","Ẫ":"A","ẫ":"a","Ậ":"A","áº":"a","Ắ":"A","ắ":"a","Ằ":"A","ằ":"a","Ẳ":"A","ẳ":"a","Ẵ":"A","ẵ":"a","Ặ":"A","ặ":"a","Ẹ":"E","ẹ":"e","Ẻ":"E","ẻ":"e","Ẽ":"E","ẽ":"e","Ế":"E","ế":"e","á»":"E","á»":"e","á»":"E","á»":"e","á»":"E","á»
":"e","á»":"E","á»":"e","á»":"I","á»":"i","á»":"I","á»":"i","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á»":"O","á»":"o","á» ":"O","ỡ":"o","Ợ":"O","ợ":"o","Ụ":"U","ụ":"u","Ủ":"U","á»§":"u","Ứ":"U","ứ":"u","Ừ":"U","ừ":"u","Ử":"U","á»":"u","á»®":"U","ữ":"u","á»°":"U","á»±":"u","Ỳ":"Y","ỳ":"y","á»´":"Y","ỵ":"y","á»¶":"Y","á»·":"y","Ỹ":"Y","ỹ":"y","â":"-","â":"\'","â":"\'","â":"\\"","â":"\\"","â":"\\"","â ":"+","â¢":"*","â¦":"...","â ":"ecu","â¢":"cruzeiro","â£":"french franc","â¤":"lira","â¥":"mill","â¦":"naira","â
8§":"peseta","â¨":"rupee","â©":"won","âª":"new shequel","â«":"dong","â¬":"euro","â":"kip","â®":"tugrik","â¯":"drachma","â°":"penny","â±":"peso","â²":"guarani","â³":"austral","â´":"hryvnia","âµ":"cedi","â¸":"kazakhstani tenge","â¹":"indian rupee","âº":"turkish lira","â½":"russian ruble","â¿":"bitcoin","â ":"sm","â¢":"tm","â":"d","â":"delta","â":"sum","â":"infinity","â¥":"love","å
":"yuan","å":"yen","ï·¼":"rial","ﻵ":"laa","ï»·":"laa","ﻹ":"lai","ï»»":"la"}'),t=JSON.parse('{"bg":{"Ð":"Y","Ц":"Ts","Щ":"Sht","Ъ":"A","Ь":"Y","й":"y","Ñ":"ts","Ñ":"sht","Ñ":"a","Ñ":"y"},"de":{"\xc4":"AE","\xe4":"ae","\xd6":"OE","\xf6":"oe","\xdc":"UE","\xfc":"ue","\xdf":"ss","%":"prozent","&":"und","|":"oder","â":"summe","â":"unendlich","â¥":"liebe"},"es":{"%":"por ciento","&":"y","<":"menor que",">":"mayor que","|":"o","\xa2":"centavos","\xa3":"libras","\xa4":"moneda","â£":"francos","â":"suma","â":"infinito","â¥":"amor"},"fr":{"%":"pourcent","&":"et","<":"plus petit",">":"plus grand","|":"ou","\xa2":"centime","\xa3":"livre","\xa4":"devise","â£":"franc","â":"somme","â":"infini","â¥":"amour"},"pt":{"%":"porcento","&":"e","<":"menor",">":"maior","|":"ou","\xa2":"centavo","â":"soma","\xa3":"libra","â":"infinito","â¥":"amor"},"uk":{"Ð":"Y","и":"y","Ð":"Y","й":"y","Ц":"Ts","Ñ":"ts","Ð¥":"Kh","Ñ
":"kh","Щ":"Shch","Ñ":"shch","Ð":"H","г":"h"},"vi":{"Ä":"D","Ä":"d"},"da":{"\xd8":"OE","\xf8":"oe","\xc5":"AA","\xe5":"aa","%":"procent","&":"og","|":"eller","$":"dollar","<":"mindre end",">":"st\xf8rre end"},"nb":{"&":"og","\xc5":"AA","\xc6":"AE","\xd8":"OE","\xe5":"aa","\xe6":"ae","\xf8":"oe"},"it":{"&":"e"},"nl":{"&":"en"},"sv":{"&":"och","\xc5":"AA","\xc4":"AE","\xd6":"OE","\xe5":"aa","\xe4":"ae","\xf6":"oe"}}');function r(r,i){if("string"!=typeof r)throw Error("slugify: string argument expected");var n=t[(i="string"==typeof i?{replacement:i}:i||{}).locale]||{},s=void 0===i.replacement?"-":i.replacement,o=void 0===i.trim||i.trim,a=r.normalize().split("").reduce(function(t,r){var o=n[r];return void 0===o&&(o=e[r]),void 0===o&&(o=r),o===s&&(o=" "),t+o.replace(i.remove||/[^\w\s$*_+~.()'"!\-:@]+/g,"")},"");return i.strict&&(a=a.replace(/[^A-Za-z0-9\s]/g,"")),o&&(a=a.trim()),a=a.replace(/\s+/g,s),i.lower&&(a=a.toLowerCase()),a}return r.extend=function(t){Object.assign(e,t)},r})(),e.exports.default=t()},94485:(e,t,r)=>{"use strict";r.d(t,{cb:()=>s,u1:()=>o,bJ:()=>a,Ll:()=>c,qx:()=>u,N4:()=>l});var i=r(39208);class n extends Error{constructor(e){super(e),this.name="AbortError"}}function s(e,t){let r,{abortSignal:i,abortErrorMsg:s}=t??{};return function(e,t){let{cleanupBeforeAbort:r,abortSignal:i,abortErrorMsg:s}=t??{};return new Promise((t,o)=>{function a(){o(new n(s??"The operation was aborted."))}function l(){i?.removeEventListener("abort",c)}function c(){r?.(),l(),a()}if(i?.aborted)return a();try{e(e=>{l(),t(e)},e=>{l(),o(e)})}catch(e){o(e)}i?.addEventListener("abort",c)})}(t=>{r=setTimeout(t,e)},{cleanupBeforeAbort:()=>clearTimeout(r),abortSignal:i,abortErrorMsg:s??"The delay was aborted."})}function o(e){if((0,i.bJ)(e))return e.message;{let t;try{t="object"==typeof e&&e?JSON.stringify(e):String(e)}catch(e){t="[unable to stringify input]"}return`Unknown error ${t}`}}function a(e){return i.bJ(e)}function l(){return i.N4()}i.Bd,i.Qg,i.N6;let c=i.qx,u=i.qx;i.tX,i.lV,i.p7},97483:(e,t,r)=>{"use strict";r.d(t,{W:()=>h,f:()=>d});class i{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1}static parse(e){let t=new i;for(let r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"x":t.deleteVersion=!0;break;case"t":t.tag=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;default:throw RangeError(`Invalid permission: ${r}`)}return t}static from(e){let t=new i;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),e.join("")}}class n{constructor(){this.read=!1,this.add=!1,this.create=!1,this.write=!1,this.delete=!1,this.deleteVersion=!1,this.list=!1,this.tag=!1,this.move=!1,this.execute=!1,this.setImmutabilityPolicy=!1,this.permanentDelete=!1,this.filterByTags=!1}static parse(e){let t=new n;for(let r of e)switch(r){case"r":t.read=!0;break;case"a":t.add=!0;break;case"c":t.create=!0;break;case"w":t.write=!0;break;case"d":t.delete=!0;break;case"l":t.list=!0;break;case"t":t.tag=!0;break;case"x":t.deleteVersion=!0;break;case"m":t.move=!0;break;case"e":t.execute=!0;break;case"i":t.setImmutabilityPolicy=!0;break;case"y":t.permanentDelete=!0;break;case"f":t.filterByTags=!0;break;default:throw RangeError(`Invalid permission ${r}`)}return t}static from(e){let t=new n;return e.read&&(t.read=!0),e.add&&(t.add=!0),e.create&&(t.create=!0),e.write&&(t.write=!0),e.delete&&(t.delete=!0),e.list&&(t.list=!0),e.deleteVersion&&(t.deleteVersion=!0),e.tag&&(t.tag=!0),e.move&&(t.move=!0),e.execute&&(t.execute=!0),e.setImmutabilityPolicy&&(t.setImmutabilityPolicy=!0),e.permanentDelete&&(t.permanentDelete=!0),e.filterByTags&&(t.filterByTags=!0),t}toString(){let e=[];return this.read&&e.push("r"),this.add&&e.push("a"),this.create&&e.push("c"),this.write&&e.push("w"),this.delete&&e.push("d"),this.deleteVersion&&e.push("x"),this.list&&e.push("l"),this.tag&&e.push("t"),this.move&&e.push("m"),this.execute&&e.push("e"),this.setImmutabilityPolicy&&e.push("i"),this.permanentDelete&&e.push("y"),this.filterByTags&&e.push("f"),e.join("")}}var s=r(87014);class o{}var a=r(85246),l=r(82076),c=r(2848),u=r(28023);function h(e,t,r){return d(e,t,r).sasQueryParameters}function d(e,t,r){let h,d=e.version?e.version:c.vY,g=t instanceof s.Z?t:void 0;if(void 0===g&&void 0!==r&&(h=new o(r,t)),void 0===g&&void 0===h)throw TypeError("Invalid sharedKeyCredential, userDelegationKey or accountName.");if(d>="2020-12-06")if(void 0!==g)return function(e,t){let r;if(!(e=f(e)).identifier&&!(e.permissions&&e.expiresOn))throw RangeError("Mu
8st provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let s="c",o=e.snapshotTime;e.blobName&&(s="b",e.snapshotTime?s="bs":e.versionId&&(s="bv",o=e.versionId)),e.permissions&&(r=e.blobName?i.parse(e.permissions.toString()).toString():n.parse(e.permissions.toString()).toString());let c=[r||"",e.startsOn?(0,u.JL)(e.startsOn,!1):"",e.expiresOn?(0,u.JL)(e.expiresOn,!1):"",p(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?(0,a.l)(e.ipRange):"",e.protocol?e.protocol:"",e.version,s,o,e.encryptionScope,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),h=t.computeHMACSHA256(c);return{sasQueryParameters:new l.k(e.version,h,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,s,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,void 0,void 0,void 0,e.encryptionScope),stringToSign:c}}(e,g);else return function(e,t){let r;if(!(e=f(e)).permissions||!e.expiresOn)throw RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let s="c",o=e.snapshotTime;e.blobName&&(s="b",e.snapshotTime?s="bs":e.versionId&&(s="bv",o=e.versionId)),e.permissions&&(r=e.blobName?i.parse(e.permissions.toString()).toString():n.parse(e.permissions.toString()).toString());let c=[r||"",e.startsOn?(0,u.JL)(e.startsOn,!1):"",e.expiresOn?(0,u.JL)(e.expiresOn,!1):"",p(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?(0,u.JL)(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?(0,u.JL)(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?(0,a.l)(e.ipRange):"",e.protocol?e.protocol:"",e.version,s,o,e.encryptionScope,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),h=t.computeHMACSHA256(c);return{sasQueryParameters:new l.k(e.version,h,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,s,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId,e.encryptionScope),stringToSign:c}}(e,h);if(d>="2018-11-09")if(void 0!==g)return function(e,t){let r;if(!(e=f(e)).identifier&&!(e.permissions&&e.expiresOn))throw RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let s="c",o=e.snapshotTime;e.blobName&&(s="b",e.snapshotTime?s="bs":e.versionId&&(s="bv",o=e.versionId)),e.permissions&&(r=e.blobName?i.parse(e.permissions.toString()).toString():n.parse(e.permissions.toString()).toString());let c=[r||"",e.startsOn?(0,u.JL)(e.startsOn,!1):"",e.expiresOn?(0,u.JL)(e.expiresOn,!1):"",p(t.accountName,e.containerName,e.blobName),e.identifier,e.ipRange?(0,a.l)(e.ipRange):"",e.protocol?e.protocol:"",e.version,s,o,e.cacheControl?e.cacheControl:"",e.contentDisposition?e.contentDisposition:"",e.contentEncoding?e.contentEncoding:"",e.contentLanguage?e.contentLanguage:"",e.contentType?e.contentType:""].join("\n"),h=t.computeHMACSHA256(c);return{sasQueryParameters:new l.k(e.version,h,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,s,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType),stringToSign:c}}(e,g);else if(d>="2020-02-10")return function(e,t){let r;if(!(e=f(e)).permissions||!e.expiresOn)throw RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let s="c",o=e.snapshotTime;e.blobName&&(s="b",e.snapshotTime?s="bs":e.versionId&&(s="bv",o=e.versionId)),e.permissions&&(r=e.blobName?i.parse(e.permissions.toString()).toString():n.parse(e.permissions.toString()).toString());let c=[r||"",e.startsOn?(0,u.JL)(e.startsOn,!1):"",e.expiresOn?(0,u.JL)(e.expiresOn,!1):"",p(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?(0,u.JL)(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?(0,u.JL)(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.preauthorizedAgentObjectId,void 0,e.correlationId,e.ipRange?(0,a.l)(e.ipRange):"",e.protocol?e.protocol:"",e.version,s,o,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),h=t.computeHMACSHA256(c);return{sasQueryParameters:new l.k(e.version,h,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,s,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey,e.preauthorizedAgentObjectId,e.correlationId),stringToSign:c}}(e,h);else return function(e,t){let r;
8if(!(e=f(e)).permissions||!e.expiresOn)throw RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when generating user delegation SAS.");let s="c",o=e.snapshotTime;e.blobName&&(s="b",e.snapshotTime?s="bs":e.versionId&&(s="bv",o=e.versionId)),e.permissions&&(r=e.blobName?i.parse(e.permissions.toString()).toString():n.parse(e.permissions.toString()).toString());let c=[r||"",e.startsOn?(0,u.JL)(e.startsOn,!1):"",e.expiresOn?(0,u.JL)(e.expiresOn,!1):"",p(t.accountName,e.containerName,e.blobName),t.userDelegationKey.signedObjectId,t.userDelegationKey.signedTenantId,t.userDelegationKey.signedStartsOn?(0,u.JL)(t.userDelegationKey.signedStartsOn,!1):"",t.userDelegationKey.signedExpiresOn?(0,u.JL)(t.userDelegationKey.signedExpiresOn,!1):"",t.userDelegationKey.signedService,t.userDelegationKey.signedVersion,e.ipRange?(0,a.l)(e.ipRange):"",e.protocol?e.protocol:"",e.version,s,o,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType].join("\n"),h=t.computeHMACSHA256(c);return{sasQueryParameters:new l.k(e.version,h,r,void 0,void 0,e.protocol,e.startsOn,e.expiresOn,e.ipRange,e.identifier,s,e.cacheControl,e.contentDisposition,e.contentEncoding,e.contentLanguage,e.contentType,t.userDelegationKey),stringToSign:c}}(e,h);if(d>="2015-04-05")if(void 0!==g){let t;var m=e,y=g;if(!(m=f(m)).identifier&&!(m.permissions&&m.expiresOn))throw RangeError("Must provide 'permissions' and 'expiresOn' for Blob SAS generation when 'identifier' is not provided.");let r="c";m.blobName&&(r="b"),m.permissions&&(t=m.blobName?i.parse(m.permissions.toString()).toString():n.parse(m.permissions.toString()).toString());let s=[t||"",m.startsOn?(0,u.JL)(m.startsOn,!1):"",m.expiresOn?(0,u.JL)(m.expiresOn,!1):"",p(y.accountName,m.containerName,m.blobName),m.identifier,m.ipRange?(0,a.l)(m.ipRange):"",m.protocol?m.protocol:"",m.version,m.cacheControl?m.cacheControl:"",m.contentDisposition?m.contentDisposition:"",m.contentEncoding?m.contentEncoding:"",m.contentLanguage?m.contentLanguage:"",m.contentType?m.contentType:""].join("\n"),o=y.computeHMACSHA256(s);return{sasQueryParameters:new l.k(m.version,o,t,void 0,void 0,m.protocol,m.startsOn,m.expiresOn,m.ipRange,m.identifier,r,m.cacheControl,m.contentDisposition,m.contentEncoding,m.contentLanguage,m.contentType),stringToSign:s}}else throw RangeError("'version' must be >= '2018-11-09' when generating user delegation SAS using user delegation key.");throw RangeError("'version' must be >= '2015-04-05'.")}function p(e,t,r){let i=[`/blob/${e}/${t}`];return r&&i.push(`/${r}`),i.join("")}function f(e){let t=e.version?e.version:c.vY;if(e.snapshotTime&&t<"2018-11-09")throw RangeError("'version' must be >= '2018-11-09' when providing 'snapshotTime'.");if(void 0===e.blobName&&e.snapshotTime)throw RangeError("Must provide 'blobName' when providing 'snapshotTime'.");if(e.versionId&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'versionId'.");if(void 0===e.blobName&&e.versionId)throw RangeError("Must provide 'blobName' when providing 'versionId'.");if(e.permissions&&e.permissions.setImmutabilityPolicy&&t<"2020-08-04")throw RangeError("'version' must be >= '2020-08-04' when provided 'i' permission.");if(e.permissions&&e.permissions.deleteVersion&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'x' permission.");if(e.permissions&&e.permissions.permanentDelete&&t<"2019-10-10")throw RangeError("'version' must be >= '2019-10-10' when providing 'y' permission.");if(e.permissions&&e.permissions.tag&&t<"2019-12-12")throw RangeError("'version' must be >= '2019-12-12' when providing 't' permission.");if(t<"2020-02-10"&&e.permissions&&(e.permissions.move||e.permissions.execute))throw RangeError("'version' must be >= '2020-02-10' when providing the 'm' or 'e' permission.");if(t<"2021-04-10"&&e.permissions&&e.permissions.filterByTags)throw RangeError("'version' must be >= '2021-04-10' when providing the 'f' permission.");if(t<"2020-02-10"&&(e.preauthorizedAgentObjectId||e.correlationId))throw RangeError("'version' must be >= '2020-02-10' when providing 'preauthorizedAgentObjectId' or 'correlationId'.");if(e.encryptionScope&&t<"2020-12-06")throw RangeError("'version' must be >= '2020-12-06' when provided 'encryptionScope' in SAS.");return e.version=t,e}}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.