!function(){"use strict";vare;lett;varn,o;!function(e){constt=[],n="__jsObjectId",o="__dotNetObject",r="__byte[]",i="__dotNetStream",s="__jsStreamReferenceLength";leta,c,l;classh{constructor(e){this._jsObject=e,this._cachedHandlers=newMap}resolveInvocationHandler(e,t){varn;consto=null===(n=this._cachedHandlers.get(e))||void0===n?void0:n[t];if(o)returno;const[r,i]=E(this._jsObject,e),s=function(e,t,n,o){switch(n){casel.FunctionCall:constn=e[t];if(ninstanceofFunction)returnn.bind(e);thrownewError(`The value '${o}' is not a function.`);casel.ConstructorCall:constr=e[t];if(rinstanceofFunction){constt=r.bind(e);return(...e)=>newt(...e)}thrownewError(`The value '${o}' is not a function.`);casel.GetValue:if(!function(e,t){if(!(tine))return!1;for(;void0!==e;){constn=Object.getOwnPropertyDescriptor(e,t);if(n)return!!n.hasOwnProperty("value")||n.hasOwnProperty("get")&&"function"==typeofn.get;e=Object.getPrototypeOf(e)}return!1}(e,t))thrownewError(`The property '${o}' is not defined or is not readable.`);return()=>e[t];casel.SetValue:if(!function(e,t){if(!(tine))returnObject.isExtensible(e);for(;void0!==e;){constn=Object.getOwnPropertyDescriptor(e,t);if(n)return!(!n.hasOwnProperty("value")||!n.writable)||n.hasOwnProperty("set")&&"function"==typeofn.set;e=Object.getPrototypeOf(e)}return!1}(e,t))thrownewError(`The property '${o}' is not writable.`);return(...n)=>e[t]=n[0]}}(r,i,t,e);returnthis.addHandlerToCache(e,s,t),s}getWrappedObject(){returnthis._jsObject}addHandlerToCache(e,t,n){consto=this._cachedHandlers.get(e);o?o[n]=t:this._cachedHandlers.set(e,{[n]:t})}}!function(e){e[e.FunctionCall=1]="FunctionCall",e[e.ConstructorCall=2]="ConstructorCall",e[e.GetValue=3]="GetValue",e[e.SetValue=4]="SetValue"}(l=e.JSCallType||(e.JSCallType={}));constd=0,u={[d]:newh(window)};u[0]._cachedHandlers.set("import",{[l.FunctionCall]:e=>("string"==typeofe&&e.startsWith("./")&&(e=newURL(e.substring(2),document.baseURI).toString()),import(e))});letp,f=1;functiong(e){t.push(e)}functionm(e){if(null==e)return{[n]:-1};if(e&&("object"==typeofe||einstanceofFunction)){u[f]=newh(e);constt={[n]:f};returnf++,t}thrownewError(`Cannot create a JSObjectReference from the value '${e}'.`)}functiony(e){lett=-1;if(einstanceofArrayBuffer&&(e=newUint8Array(e)),einstanceofBlob)t=e.size;else{if(!(e.bufferinstanceofArrayBuffer))thrownewError("Supplied value is not a typed array or blob.");if(void0===e.byteLength)thrownewError(`Cannot create a JSStreamReference from the value '${e}' as it doesn't have a byteLength.`);t=e.byteLength}consto={[s]:t};try{constt=m(e);o[n]=t[n]}catch(t){thrownewError(`Cannot create a JSStreamReference from the value '${e}'.`)}returno}functionv(e,n){c=e;consto=n?JSON.parse(n,(e,n)=>t.reduce((t,n)=>n(e,t),n)):null;returnc=void0,o}functionw(){if(void0===a)thrownewError("No call dispatcher has been set.");if(null===a)thrownewError("There are multiple .NET runtimes present, so a default dispatcher could not be resolved. Use DotNetObject to invoke .NET instance methods.");returna}e.attachDispatcher=function(e){constt=newb(e);returnvoid0===a?a=t:a&&(a=null),t},e.attachReviver=g,e.invokeMethod=function(e,t,...n){returnw().invokeDotNetStaticMethod(e,t,...n)},e.invokeMethodAsync=function(e,t,...n){returnw().invokeDotNetStaticMethodAsync(e,t,...n)},e.createJSObjectReference=m,e.createJSStreamReference=y,e.disposeJSObjectReference=function(e){constt=e&&e[n];"number"==typeoft&&-1!==t&&C(t)},function(e){e[e.Default=0]="Default",e[e.JSObjectReference=1]="JSObjectReference",e[e.JSStreamReference=2]="JSStreamReference",e[e.JSVoidResult=3]="JSVoidResult"}(p=e.JSCallResultType||(e.JSCallResultType={}));classb{constructor(e){this._dotNetCallDispatcher=e,this._byteArraysToBeRevived=newMap,this._pendingDotNetToJSStreams=newMap,this._pendingAsyncCalls={},this._nextAsyncCallId=1}getDotNetCallDispatcher(){returnthis._dotNetCallDispatcher}invokeJSFromDotNet(e,t,n,o,r){consti=T(this.processJSCall(o,e,r,t),n);returnnull==i?null:D(this,i)}asyncbeginInvokeJSFromDotNet(e