@learncard/init 2.0.39 → 2.0.40
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";var AM=Object.create;var Ym=Object.defineProperty;var EM=Object.getOwnPropertyDescriptor;var kM=Object.getOwnPropertyNames;var IM=Object.getPrototypeOf,TM=Object.prototype.hasOwnProperty;var c=(e,t)=>Ym(e,"name",{value:t,configurable:!0});var SM=(e,t)=>{for(var r in t)Ym(e,r,{get:t[r],enumerable:!0})},DC=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of kM(t))!TM.call(e,i)&&i!==r&&Ym(e,i,{get:()=>t[i],enumerable:!(n=EM(t,i))||n.enumerable});return e};var V_=(e,t,r)=>(r=e!=null?AM(IM(e)):{},DC(t||!e||!e.__esModule?Ym(r,"default",{value:e,enumerable:!0}):r,e)),RM=e=>DC(Ym({},"__esModule",{value:!0}),e);var EX={};SM(EX,{customLearnCard:()=>r3,didWebLearnCardFromSeed:()=>q5,didWebNetworkLearnCardFromSeed:()=>$5,emptyLearnCard:()=>U3,initLearnCard:()=>AX,learnCardFromApiUrl:()=>s8,learnCardFromSeed:()=>h5,networkLearnCardFromSeed:()=>W5});module.exports=RM(EX);var Ev=V_(require("abort-controller/dist/abort-controller.js"),1),pA=V_(require("isomorphic-webcrypto"),1);var PM=Object.create,U_=Object.defineProperty,DM=Object.getOwnPropertyDescriptor,NC=Object.getOwnPropertyNames,OM=Object.getPrototypeOf,NM=Object.prototype.hasOwnProperty,tt=c((e,t)=>U_(e,"name",{value:t,configurable:!0}),"__name"),Le=c((e,t)=>c(function(){return t||(0,e[NC(e)[0]])((t={exports:{}}).exports,t),t.exports},"__require"),"__commonJS"),jM=c((e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of NC(t))!NM.call(e,i)&&i!==r&&U_(e,i,{get:()=>t[i],enumerable:!(n=DM(t,i))||n.enumerable});return e},"__copyProps"),BM=c((e,t,r)=>(r=e!=null?PM(OM(e)):{},jM(t||!e||!e.__esModule?U_(r,"default",{value:e,enumerable:!0}):r,e)),"__toESM"),Gi=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/global-this.js"(e,t){"use strict";var r=tt(function(n){return n&&n.Math===Math&&n},"check");t.exports=r(typeof globalThis=="object"&&globalThis)||r(typeof window=="object"&&window)||r(typeof self=="object"&&self)||r(typeof global=="object"&&global)||r(typeof e=="object"&&e)||function(){return this}()||Function("return this")()}}),os=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/fails.js"(e,t){"use strict";t.exports=function(r){try{return!!r()}catch{return!0}}}}),Rc=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/descriptors.js"(e,t){"use strict";var r=os();t.exports=!r(function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7})}}),hv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-bind-native.js"(e,t){"use strict";var r=os();t.exports=!r(function(){var n=function(){}.bind();return typeof n!="function"||n.hasOwnProperty("prototype")})}}),tc=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-call.js"(e,t){"use strict";var r=hv(),n=Function.prototype.call;t.exports=r?n.bind(n):function(){return n.apply(n,arguments)}}}),MM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-property-is-enumerable.js"(e){"use strict";var t={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,n=r&&!t.call({1:2},1);e.f=n?tt(c(function(s){var a=r(this,s);return!!a&&a.enumerable},"propertyIsEnumerable"),"propertyIsEnumerable"):t}}),tg=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/create-property-descriptor.js"(e,t){"use strict";t.exports=function(r,n){return{enumerable:!(r&1),configurable:!(r&2),writable:!(r&4),value:n}}}}),To=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-uncurry-this.js"(e,t){"use strict";var r=hv(),n=Function.prototype,i=n.call,s=r&&n.bind.bind(i,i);t.exports=r?s:function(a){return function(){return i.apply(a,arguments)}}}}),pv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/classof-raw.js"(e,t){"use strict";var r=To(),n=r({}.toString),i=r("".slice);t.exports=function(s){return i(n(s),8,-1)}}}),FM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/indexed-object.js"(e,t){"use strict";var r=To(),n=os(),i=pv(),s=Object,a=r("".split);t.exports=n(function(){return!s("z").propertyIsEnumerable(0)})?function(l){return i(l)==="String"?a(l,""):s(l)}:s}}),mv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-null-or-undefined.js"(e,t){"use strict";t.exports=function(r){return r==null}}}),gv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/require-object-coercible.js"(e,t){"use strict";var r=mv(),n=TypeError;t.exports=function(i){if(r(i))throw new n("Can't call method on "+i);return i}}}),rg=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-indexed-object.js"(e,t){"use strict";var r=FM(),n=gv();t.exports=function(i){return r(n(i))}}}),Ki=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-callable.js"(e,t){"use strict";var r=typeof document=="object"&&document.all;t.exports=typeof r>"u"&&r!==void 0?function(n){return typeof n=="function"||n===r}:function(n){return typeof n=="function"}}}),Pc=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-object.js"(e,t){"use strict";var r=Ki();t.exports=function(n){return typeof n=="object"?n!==null:r(n)}}}),Ad=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-built-in.js"(e,t){"use strict";var r=Gi(),n=Ki(),i=tt(function(s){return n(s)?s:void 0},"aFunction");t.exports=function(s,a){return arguments.length<2?i(r[s]):r[s]&&r[s][a]}}}),yv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-is-prototype-of.js"(e,t){"use strict";var r=To();t.exports=r({}.isPrototypeOf)}}),ng=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-user-agent.js"(e,t){"use strict";var r=Gi(),n=r.navigator,i=n&&n.userAgent;t.exports=i?String(i):""}}),jC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-v8-version.js"(e,t){"use strict";var r=Gi(),n=ng(),i=r.process,s=r.Deno,a=i&&i.versions||s&&s.version,l=a&&a.v8,f,g;l&&(f=l.split("."),g=f[0]>0&&f[0]<4?1:+(f[0]+f[1])),!g&&n&&(f=n.match(/Edge\/(\d+)/),(!f||f[1]>=74)&&(f=n.match(/Chrome\/(\d+)/),f&&(g=+f[1]))),t.exports=g}}),BC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/symbol-constructor-detection.js"(e,t){"use strict";var r=jC(),n=os(),i=Gi(),s=i.String;t.exports=!!Object.getOwnPropertySymbols&&!n(function(){var a=Symbol("symbol detection");return!s(a)||!(Object(a)instanceof Symbol)||!Symbol.sham&&r&&r<41})}}),MC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/use-symbol-as-uid.js"(e,t){"use strict";var r=BC();t.exports=r&&!Symbol.sham&&typeof Symbol.iterator=="symbol"}}),FC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-symbol.js"(e,t){"use strict";var r=Ad(),n=Ki(),i=yv(),s=MC(),a=Object;t.exports=s?function(l){return typeof l=="symbol"}:function(l){var f=r("Symbol");return n(f)&&i(f.prototype,a(l))}}}),vv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/try-to-string.js"(e,t){"use strict";var r=String;t.exports=function(n){try{return r(n)}catch{return"Object"}}}}),Dc=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/a-callable.js"(e,t){"use strict";var r=Ki(),n=vv(),i=TypeError;t.exports=function(s){if(r(s))return s;throw new i(n(s)+" is not a function")}}}),L_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-method.js"(e,t){"use strict";var r=Dc(),n=mv();t.exports=function(i,s){var a=i[s];return n(a)?void 0:r(a)}}}),VM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/ordinary-to-primitive.js"(e,t){"use strict";var r=tc(),n=Ki(),i=Pc(),s=TypeError;t.exports=function(a,l){var f,g;if(l==="string"&&n(f=a.toString)&&!i(g=r(f,a))||n(f=a.valueOf)&&!i(g=r(f,a))||l!=="string"&&n(f=a.toString)&&!i(g=r(f,a)))return g;throw new s("Can't convert object to primitive value")}}}),Ed=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-pure.js"(e,t){"use strict";t.exports=!1}}),Z_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/define-global-property.js"(e,t){"use strict";var r=Gi(),n=Object.defineProperty;t.exports=function(i,s){try{n(r,i,{value:s,configurable:!0,writable:!0})}catch{r[i]=s}return s}}}),z_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/shared-store.js"(e,t){"use strict";var r=Ed(),n=Gi(),i=Z_(),s="__core-js_shared__",a=t.exports=n[s]||i(s,{});(a.versions||(a.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"\xA9 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})}}),VC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/shared.js"(e,t){"use strict";var r=z_();t.exports=function(n,i){return r[n]||(r[n]=i||{})}}}),UC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-object.js"(e,t){"use strict";var r=gv(),n=Object;t.exports=function(i){return n(r(i))}}}),jl=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/has-own-property.js"(e,t){"use strict";var r=To(),n=UC(),i=r({}.hasOwnProperty);t.exports=Object.hasOwn||tt(c(function(a,l){return i(n(a),l)},"hasOwn"),"hasOwn")}}),LC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/uid.js"(e,t){"use strict";var r=To(),n=0,i=Math.random(),s=r(1 .toString);t.exports=function(a){return"Symbol("+(a===void 0?"":a)+")_"+s(++n+i,36)}}}),So=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/well-known-symbol.js"(e,t){"use strict";var r=Gi(),n=VC(),i=jl(),s=LC(),a=BC(),l=MC(),f=r.Symbol,g=n("wks"),_=l?f.for||f:f&&f.withoutSetter||s;t.exports=function(x){return i(g,x)||(g[x]=a&&i(f,x)?f[x]:_("Symbol."+x)),g[x]}}}),UM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-primitive.js"(e,t){"use strict";var r=tc(),n=Pc(),i=FC(),s=L_(),a=VM(),l=So(),f=TypeError,g=l("toPrimitive");t.exports=function(_,x){if(!n(_)||i(_))return _;var N=s(_,g),I;if(N){if(x===void 0&&(x="default"),I=r(N,_,x),!n(I)||i(I))return I;throw new f("Can't convert object to primitive value")}return x===void 0&&(x="number"),a(_,x)}}}),ZC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-property-key.js"(e,t){"use strict";var r=UM(),n=FC();t.exports=function(i){var s=r(i,"string");return n(s)?s:s+""}}}),bv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/document-create-element.js"(e,t){"use strict";var r=Gi(),n=Pc(),i=r.document,s=n(i)&&n(i.createElement);t.exports=function(a){return s?i.createElement(a):{}}}}),zC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/ie8-dom-define.js"(e,t){"use strict";var r=Rc(),n=os(),i=bv();t.exports=!r&&!n(function(){return Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a!==7})}}),WC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-own-property-descriptor.js"(e){"use strict";var t=Rc(),r=tc(),n=MM(),i=tg(),s=rg(),a=ZC(),l=jl(),f=zC(),g=Object.getOwnPropertyDescriptor;e.f=t?g:tt(c(function(x,N){if(x=s(x),N=a(N),f)try{return g(x,N)}catch{}if(l(x,N))return i(!r(n.f,x,N),x[N])},"getOwnPropertyDescriptor"),"getOwnPropertyDescriptor")}}),qC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/v8-prototype-define-bug.js"(e,t){"use strict";var r=Rc(),n=os();t.exports=r&&n(function(){return Object.defineProperty(function(){},"prototype",{value:42,writable:!1}).prototype!==42})}}),kd=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/an-object.js"(e,t){"use strict";var r=Pc(),n=String,i=TypeError;t.exports=function(s){if(r(s))return s;throw new i(n(s)+" is not an object")}}}),lu=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-define-property.js"(e){"use strict";var t=Rc(),r=zC(),n=qC(),i=kd(),s=ZC(),a=TypeError,l=Object.defineProperty,f=Object.getOwnPropertyDescriptor,g="enumerable",_="configurable",x="writable";e.f=t?n?tt(c(function(I,H,T){if(i(I),H=s(H),i(T),typeof I=="function"&&H==="prototype"&&"value"in T&&x in T&&!T[x]){var Z=f(I,H);Z&&Z[x]&&(I[H]=T.value,T={configurable:_ in T?T[_]:Z[_],enumerable:g in T?T[g]:Z[g],writable:!1})}return l(I,H,T)},"defineProperty"),"defineProperty"):l:tt(c(function(I,H,T){if(i(I),H=s(H),i(T),r)try{return l(I,H,T)}catch{}if("get"in T||"set"in T)throw new a("Accessors not supported");return"value"in T&&(I[H]=T.value),I},"defineProperty"),"defineProperty")}}),bf=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/create-non-enumerable-property.js"(e,t){"use strict";var r=Rc(),n=lu(),i=tg();t.exports=r?function(s,a,l){return n.f(s,a,i(1,l))}:function(s,a,l){return s[a]=l,s}}}),$C=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-name.js"(e,t){"use strict";var r=Rc(),n=jl(),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,a=n(i,"name"),l=a&&tt(c(function(){},"something"),"something").name==="something",f=a&&(!r||r&&s(i,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:f}}}),W_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/inspect-source.js"(e,t){"use strict";var r=To(),n=Ki(),i=z_(),s=r(Function.toString);n(i.inspectSource)||(i.inspectSource=function(a){return s(a)}),t.exports=i.inspectSource}}),LM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/weak-map-basic-detection.js"(e,t){"use strict";var r=Gi(),n=Ki(),i=r.WeakMap;t.exports=n(i)&&/native code/.test(String(i))}}),q_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/shared-key.js"(e,t){"use strict";var r=VC(),n=LC(),i=r("keys");t.exports=function(s){return i[s]||(i[s]=n(s))}}}),$_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/hidden-keys.js"(e,t){"use strict";t.exports={}}}),_v=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/internal-state.js"(e,t){"use strict";var r=LM(),n=Gi(),i=Pc(),s=bf(),a=jl(),l=z_(),f=q_(),g=$_(),_="Object already initialized",x=n.TypeError,N=n.WeakMap,I,H,T,Z=tt(function(le){return T(le)?H(le):I(le,{})},"enforce"),K=tt(function(le){return function(fe){var he;if(!i(fe)||(he=H(fe)).type!==le)throw new x("Incompatible receiver, "+le+" required");return he}},"getterFor");r||l.state?(ie=l.state||(l.state=new N),ie.get=ie.get,ie.has=ie.has,ie.set=ie.set,I=tt(function(le,fe){if(ie.has(le))throw new x(_);return fe.facade=le,ie.set(le,fe),fe},"set"),H=tt(function(le){return ie.get(le)||{}},"get"),T=tt(function(le){return ie.has(le)},"has")):(me=f("state"),g[me]=!0,I=tt(function(le,fe){if(a(le,me))throw new x(_);return fe.facade=le,s(le,me,fe),fe},"set"),H=tt(function(le){return a(le,me)?le[me]:{}},"get"),T=tt(function(le){return a(le,me)},"has"));var ie,me;t.exports={set:I,get:H,has:T,enforce:Z,getterFor:K}}}),GC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/make-built-in.js"(e,t){"use strict";var r=To(),n=os(),i=Ki(),s=jl(),a=Rc(),l=$C().CONFIGURABLE,f=W_(),g=_v(),_=g.enforce,x=g.get,N=String,I=Object.defineProperty,H=r("".slice),T=r("".replace),Z=r([].join),K=a&&!n(function(){return I(function(){},"length",{value:8}).length!==8}),ie=String(String).split("String"),me=t.exports=function(le,fe,he){H(N(fe),0,7)==="Symbol("&&(fe="["+T(N(fe),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),he&&he.getter&&(fe="get "+fe),he&&he.setter&&(fe="set "+fe),(!s(le,"name")||l&&le.name!==fe)&&(a?I(le,"name",{value:fe,configurable:!0}):le.name=fe),K&&he&&s(he,"arity")&&le.length!==he.arity&&I(le,"length",{value:he.arity});try{he&&s(he,"constructor")&&he.constructor?a&&I(le,"prototype",{writable:!1}):le.prototype&&(le.prototype=void 0)}catch{}var Se=_(le);return s(Se,"source")||(Se.source=Z(ie,typeof fe=="string"?fe:"")),le};Function.prototype.toString=me(tt(c(function(){return i(this)&&x(this).source||f(this)},"toString"),"toString"),"toString")}}),_f=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/define-built-in.js"(e,t){"use strict";var r=Ki(),n=lu(),i=GC(),s=Z_();t.exports=function(a,l,f,g){g||(g={});var _=g.enumerable,x=g.name!==void 0?g.name:l;if(r(f)&&i(f,x,g),g.global)_?a[l]=f:s(l,f);else{try{g.unsafe?a[l]&&(_=!0):delete a[l]}catch{}_?a[l]=f:n.f(a,l,{value:f,enumerable:!1,configurable:!g.nonConfigurable,writable:!g.nonWritable})}return a}}}),ZM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/math-trunc.js"(e,t){"use strict";var r=Math.ceil,n=Math.floor;t.exports=Math.trunc||tt(c(function(s){var a=+s;return(a>0?n:r)(a)},"trunc"),"trunc")}}),G_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-integer-or-infinity.js"(e,t){"use strict";var r=ZM();t.exports=function(n){var i=+n;return i!==i||i===0?0:r(i)}}}),zM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-absolute-index.js"(e,t){"use strict";var r=G_(),n=Math.max,i=Math.min;t.exports=function(s,a){var l=r(s);return l<0?n(l+a,0):i(l,a)}}}),WM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-length.js"(e,t){"use strict";var r=G_(),n=Math.min;t.exports=function(i){var s=r(i);return s>0?n(s,9007199254740991):0}}}),HC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/length-of-array-like.js"(e,t){"use strict";var r=WM();t.exports=function(n){return r(n.length)}}}),qM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/array-includes.js"(e,t){"use strict";var r=rg(),n=zM(),i=HC(),s=tt(function(a){return function(l,f,g){var _=r(l),x=i(_);if(x===0)return!a&&-1;var N=n(g,x),I;if(a&&f!==f){for(;x>N;)if(I=_[N++],I!==I)return!0}else for(;x>N;N++)if((a||N in _)&&_[N]===f)return a||N||0;return!a&&-1}},"createMethod");t.exports={includes:s(!0),indexOf:s(!1)}}}),KC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-keys-internal.js"(e,t){"use strict";var r=To(),n=jl(),i=rg(),s=qM().indexOf,a=$_(),l=r([].push);t.exports=function(f,g){var _=i(f),x=0,N=[],I;for(I in _)!n(a,I)&&n(_,I)&&l(N,I);for(;g.length>x;)n(_,I=g[x++])&&(~s(N,I)||l(N,I));return N}}}),H_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/enum-bug-keys.js"(e,t){"use strict";t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]}}),$M=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-own-property-names.js"(e){"use strict";var t=KC(),r=H_(),n=r.concat("length","prototype");e.f=Object.getOwnPropertyNames||tt(c(function(s){return t(s,n)},"getOwnPropertyNames"),"getOwnPropertyNames")}}),GM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-own-property-symbols.js"(e){"use strict";e.f=Object.getOwnPropertySymbols}}),HM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/own-keys.js"(e,t){"use strict";var r=Ad(),n=To(),i=$M(),s=GM(),a=kd(),l=n([].concat);t.exports=r("Reflect","ownKeys")||tt(c(function(g){var _=i.f(a(g)),x=s.f;return x?l(_,x(g)):_},"ownKeys"),"ownKeys")}}),JC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/copy-constructor-properties.js"(e,t){"use strict";var r=jl(),n=HM(),i=WC(),s=lu();t.exports=function(a,l,f){for(var g=n(l),_=s.f,x=i.f,N=0;N<g.length;N++){var I=g[N];!r(a,I)&&!(f&&r(f,I))&&_(a,I,x(l,I))}}}}),QC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-forced.js"(e,t){"use strict";var r=os(),n=Ki(),i=/#|\.prototype\./,s=tt(function(_,x){var N=l[a(_)];return N===g?!0:N===f?!1:n(x)?r(x):!!x},"isForced"),a=s.normalize=function(_){return String(_).replace(i,".").toLowerCase()},l=s.data={},f=s.NATIVE="N",g=s.POLYFILL="P";t.exports=s}}),Es=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/export.js"(e,t){"use strict";var r=Gi(),n=WC().f,i=bf(),s=_f(),a=Z_(),l=JC(),f=QC();t.exports=function(g,_){var x=g.target,N=g.global,I=g.stat,H,T,Z,K,ie,me;if(N?T=r:I?T=r[x]||a(x,{}):T=r[x]&&r[x].prototype,T)for(Z in _){if(ie=_[Z],g.dontCallGetSet?(me=n(T,Z),K=me&&me.value):K=T[Z],H=f(N?Z:x+(I?".":"#")+Z,g.forced),!H&&K!==void 0){if(typeof ie==typeof K)continue;l(ie,K)}(g.sham||K&&K.sham)&&i(ie,"sham",!0),s(T,Z,ie,g)}}}}),KM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/correct-prototype-getter.js"(e,t){"use strict";var r=os();t.exports=!r(function(){function n(){}return c(n,"F"),tt(n,"F"),n.prototype.constructor=null,Object.getPrototypeOf(new n)!==n.prototype})}}),K_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-get-prototype-of.js"(e,t){"use strict";var r=jl(),n=Ki(),i=UC(),s=q_(),a=KM(),l=s("IE_PROTO"),f=Object,g=f.prototype;t.exports=a?f.getPrototypeOf:function(_){var x=i(_);if(r(x,l))return x[l];var N=x.constructor;return n(N)&&x instanceof N?N.prototype:x instanceof f?g:null}}}),JM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-uncurry-this-accessor.js"(e,t){"use strict";var r=To(),n=Dc();t.exports=function(i,s,a){try{return r(n(Object.getOwnPropertyDescriptor(i,s)[a]))}catch{}}}}),QM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-possible-prototype.js"(e,t){"use strict";var r=Pc();t.exports=function(n){return r(n)||n===null}}}),YM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/a-possible-prototype.js"(e,t){"use strict";var r=QM(),n=String,i=TypeError;t.exports=function(s){if(r(s))return s;throw new i("Can't set "+n(s)+" as a prototype")}}}),J_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-set-prototype-of.js"(e,t){"use strict";var r=JM(),n=Pc(),i=gv(),s=YM();t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var a=!1,l={},f;try{f=r(Object.prototype,"__proto__","set"),f(l,[]),a=l instanceof Array}catch{}return tt(c(function(_,x){return i(_),s(x),n(_)&&(a?f(_,x):_.__proto__=x),_},"setPrototypeOf"),"setPrototypeOf")}():void 0)}}),XM=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-keys.js"(e,t){"use strict";var r=KC(),n=H_();t.exports=Object.keys||tt(c(function(s){return r(s,n)},"keys"),"keys")}}),eF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-define-properties.js"(e){"use strict";var t=Rc(),r=qC(),n=lu(),i=kd(),s=rg(),a=XM();e.f=t&&!r?Object.defineProperties:tt(c(function(f,g){i(f);for(var _=s(g),x=a(g),N=x.length,I=0,H;N>I;)n.f(f,H=x[I++],_[H]);return f},"defineProperties"),"defineProperties")}}),YC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/html.js"(e,t){"use strict";var r=Ad();t.exports=r("document","documentElement")}}),wv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-create.js"(e,t){"use strict";var r=kd(),n=eF(),i=H_(),s=$_(),a=YC(),l=bv(),f=q_(),g=">",_="<",x="prototype",N="script",I=f("IE_PROTO"),H=tt(function(){},"EmptyConstructor"),T=tt(function(le){return _+N+g+le+_+"/"+N+g},"scriptTag"),Z=tt(function(le){le.write(T("")),le.close();var fe=le.parentWindow.Object;return le=null,fe},"NullProtoObjectViaActiveX"),K=tt(function(){var le=l("iframe"),fe="java"+N+":",he;return le.style.display="none",a.appendChild(le),le.src=String(fe),he=le.contentWindow.document,he.open(),he.write(T("document.F=Object")),he.close(),he.F},"NullProtoObjectViaIFrame"),ie,me=tt(function(){try{ie=new ActiveXObject("htmlfile")}catch{}me=typeof document<"u"?document.domain&&ie?Z(ie):K():Z(ie);for(var le=i.length;le--;)delete me[x][i[le]];return me()},"NullProtoObject");s[I]=!0,t.exports=Object.create||tt(c(function(fe,he){var Se;return fe!==null?(H[x]=r(fe),Se=new H,H[x]=null,Se[I]=fe):Se=me(),he===void 0?Se:n.f(Se,he)},"create"),"create")}}),tF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/install-error-cause.js"(e,t){"use strict";var r=Pc(),n=bf();t.exports=function(i,s){r(s)&&"cause"in s&&n(i,"cause",s.cause)}}}),rF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/error-stack-clear.js"(e,t){"use strict";var r=To(),n=Error,i=r("".replace),s=function(f){return String(new n(f).stack)}("zxcasd"),a=/\n\s*at [^:]*:[^\n]*/,l=a.test(s);t.exports=function(f,g){if(l&&typeof f=="string"&&!n.prepareStackTrace)for(;g--;)f=i(f,a,"");return f}}}),nF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/error-stack-installable.js"(e,t){"use strict";var r=os(),n=tg();t.exports=!r(function(){var i=new Error("a");return"stack"in i?(Object.defineProperty(i,"stack",n(1,7)),i.stack!==7):!0})}}),iF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/error-stack-install.js"(e,t){"use strict";var r=bf(),n=rF(),i=nF(),s=Error.captureStackTrace;t.exports=function(a,l,f,g){i&&(s?s(a,l):r(a,"stack",n(f,g)))}}}),aF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-uncurry-this-clause.js"(e,t){"use strict";var r=pv(),n=To();t.exports=function(i){if(r(i)==="Function")return n(i)}}}),Q_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-bind-context.js"(e,t){"use strict";var r=aF(),n=Dc(),i=hv(),s=r(r.bind);t.exports=function(a,l){return n(a),l===void 0?a:i?s(a,l):function(){return a.apply(l,arguments)}}}}),ig=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterators.js"(e,t){"use strict";t.exports={}}}),oF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-array-iterator-method.js"(e,t){"use strict";var r=So(),n=ig(),i=r("iterator"),s=Array.prototype;t.exports=function(a){return a!==void 0&&(n.Array===a||s[i]===a)}}}),Y_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-string-tag-support.js"(e,t){"use strict";var r=So(),n=r("toStringTag"),i={};i[n]="z",t.exports=String(i)==="[object z]"}}),xv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/classof.js"(e,t){"use strict";var r=Y_(),n=Ki(),i=pv(),s=So(),a=s("toStringTag"),l=Object,f=i(function(){return arguments}())==="Arguments",g=tt(function(_,x){try{return _[x]}catch{}},"tryGet");t.exports=r?i:function(_){var x,N,I;return _===void 0?"Undefined":_===null?"Null":typeof(N=g(x=l(_),a))=="string"?N:f?i(x):(I=i(x))==="Object"&&n(x.callee)?"Arguments":I}}}),XC=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-iterator-method.js"(e,t){"use strict";var r=xv(),n=L_(),i=mv(),s=ig(),a=So(),l=a("iterator");t.exports=function(f){if(!i(f))return n(f,l)||n(f,"@@iterator")||s[r(f)]}}}),sF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/get-iterator.js"(e,t){"use strict";var r=tc(),n=Dc(),i=kd(),s=vv(),a=XC(),l=TypeError;t.exports=function(f,g){var _=arguments.length<2?a(f):g;if(n(_))return i(r(_,f));throw new l(s(f)+" is not iterable")}}}),cF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterator-close.js"(e,t){"use strict";var r=tc(),n=kd(),i=L_();t.exports=function(s,a,l){var f,g;n(s);try{if(f=i(s,"return"),!f){if(a==="throw")throw l;return l}f=r(f,s)}catch(_){g=!0,f=_}if(a==="throw")throw l;if(g)throw f;return n(f),l}}}),ag=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterate.js"(e,t){"use strict";var r=Q_(),n=tc(),i=kd(),s=vv(),a=oF(),l=HC(),f=yv(),g=sF(),_=XC(),x=cF(),N=TypeError,I=tt(function(T,Z){this.stopped=T,this.result=Z},"Result"),H=I.prototype;t.exports=function(T,Z,K){var ie=K&&K.that,me=!!(K&&K.AS_ENTRIES),le=!!(K&&K.IS_RECORD),fe=!!(K&&K.IS_ITERATOR),he=!!(K&&K.INTERRUPTED),Se=r(Z,ie),te,Oe,ye,nt,Ae,we,Ze,ee=tt(function(B){return te&&x(te,"normal",B),new I(!0,B)},"stop"),C=tt(function(B){return me?(i(B),he?Se(B[0],B[1],ee):Se(B[0],B[1])):he?Se(B,ee):Se(B)},"callFn");if(le)te=T.iterator;else if(fe)te=T;else{if(Oe=_(T),!Oe)throw new N(s(T)+" is not iterable");if(a(Oe)){for(ye=0,nt=l(T);nt>ye;ye++)if(Ae=C(T[ye]),Ae&&f(H,Ae))return Ae;return new I(!1)}te=g(T,Oe)}for(we=le?T.next:te.next;!(Ze=n(we,te)).done;){try{Ae=C(Ze.value)}catch(B){x(te,"throw",B)}if(typeof Ae=="object"&&Ae&&f(H,Ae))return Ae}return new I(!1)}}}),X_=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/to-string.js"(e,t){"use strict";var r=xv(),n=String;t.exports=function(i){if(r(i)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return n(i)}}}),lF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/normalize-string-argument.js"(e,t){"use strict";var r=X_();t.exports=function(n,i){return n===void 0?arguments.length<2?"":i:r(n)}}}),dF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.aggregate-error.constructor.js"(){"use strict";var e=Es(),t=yv(),r=K_(),n=J_(),i=JC(),s=wv(),a=bf(),l=tg(),f=tF(),g=iF(),_=ag(),x=lF(),N=So(),I=N("toStringTag"),H=Error,T=[].push,Z=tt(c(function(me,le){var fe=t(K,this),he;n?he=n(new H,fe?r(this):K):(he=fe?this:s(K),a(he,I,"Error")),le!==void 0&&a(he,"message",x(le)),g(he,Z,he.stack,1),arguments.length>2&&f(he,arguments[2]);var Se=[];return _(me,T,{that:Se}),a(he,"errors",Se),he},"AggregateError"),"AggregateError");n?n(Z,H):i(Z,H,{name:!0});var K=Z.prototype=s(H.prototype,{constructor:l(1,Z),message:l(1,""),name:l(1,"AggregateError")});e({global:!0,constructor:!0,arity:2},{AggregateError:Z})}}),uF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.aggregate-error.js"(){"use strict";dF()}}),fF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/add-to-unscopables.js"(e,t){"use strict";var r=So(),n=wv(),i=lu().f,s=r("unscopables"),a=Array.prototype;a[s]===void 0&&i(a,s,{configurable:!0,value:n(null)}),t.exports=function(l){a[s][l]=!0}}}),eA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterators-core.js"(e,t){"use strict";var r=os(),n=Ki(),i=Pc(),s=wv(),a=K_(),l=_f(),f=So(),g=Ed(),_=f("iterator"),x=!1,N,I,H;[].keys&&(H=[].keys(),"next"in H?(I=a(a(H)),I!==Object.prototype&&(N=I)):x=!0);var T=!i(N)||r(function(){var Z={};return N[_].call(Z)!==Z});T?N={}:g&&(N=s(N)),n(N[_])||l(N,_,function(){return this}),t.exports={IteratorPrototype:N,BUGGY_SAFARI_ITERATORS:x}}}),Cv=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/set-to-string-tag.js"(e,t){"use strict";var r=lu().f,n=jl(),i=So(),s=i("toStringTag");t.exports=function(a,l,f){a&&!f&&(a=a.prototype),a&&!n(a,s)&&r(a,s,{configurable:!0,value:l})}}}),hF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterator-create-constructor.js"(e,t){"use strict";var r=eA().IteratorPrototype,n=wv(),i=tg(),s=Cv(),a=ig(),l=tt(function(){return this},"returnThis");t.exports=function(f,g,_,x){var N=g+" Iterator";return f.prototype=n(r,{next:i(+!x,_)}),s(f,N,!1,!0),a[N]=l,f}}}),tA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/iterator-define.js"(e,t){"use strict";var r=Es(),n=tc(),i=Ed(),s=$C(),a=Ki(),l=hF(),f=K_(),g=J_(),_=Cv(),x=bf(),N=_f(),I=So(),H=ig(),T=eA(),Z=s.PROPER,K=s.CONFIGURABLE,ie=T.IteratorPrototype,me=T.BUGGY_SAFARI_ITERATORS,le=I("iterator"),fe="keys",he="values",Se="entries",te=tt(function(){return this},"returnThis");t.exports=function(Oe,ye,nt,Ae,we,Ze,ee){l(nt,ye,Ae);var C=tt(function(je){if(je===we&&V)return V;if(!me&&je&&je in j)return j[je];switch(je){case fe:return tt(c(function(){return new nt(this,je)},"keys"),"keys");case he:return tt(c(function(){return new nt(this,je)},"values"),"values");case Se:return tt(c(function(){return new nt(this,je)},"entries"),"entries")}return function(){return new nt(this)}},"getIterationMethod"),B=ye+" Iterator",W=!1,j=Oe.prototype,X=j[le]||j["@@iterator"]||we&&j[we],V=!me&&X||C(we),re=ye==="Array"&&j.entries||X,Y,E,L;if(re&&(Y=f(re.call(new Oe)),Y!==Object.prototype&&Y.next&&(!i&&f(Y)!==ie&&(g?g(Y,ie):a(Y[le])||N(Y,le,te)),_(Y,B,!0,!0),i&&(H[B]=te))),Z&&we===he&&X&&X.name!==he&&(!i&&K?x(j,"name",he):(W=!0,V=tt(c(function(){return n(X,this)},"values"),"values"))),we)if(E={values:C(he),keys:Ze?V:C(fe),entries:C(Se)},ee)for(L in E)(me||W||!(L in j))&&N(j,L,E[L]);else r({target:ye,proto:!0,forced:me||W},E);return(!i||ee)&&j[le]!==V&&N(j,le,V,{name:we}),H[ye]=V,E}}}),rA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/create-iter-result-object.js"(e,t){"use strict";t.exports=function(r,n){return{value:r,done:n}}}}),nA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.array.iterator.js"(e,t){"use strict";var r=rg(),n=fF(),i=ig(),s=_v(),a=lu().f,l=tA(),f=rA(),g=Ed(),_=Rc(),x="Array Iterator",N=s.set,I=s.getterFor(x);t.exports=l(Array,"Array",function(T,Z){N(this,{type:x,target:r(T),index:0,kind:Z})},function(){var T=I(this),Z=T.target,K=T.index++;if(!Z||K>=Z.length)return T.target=null,f(void 0,!0);switch(T.kind){case"keys":return f(K,!1);case"values":return f(Z[K],!1)}return f([K,Z[K]],!1)},"values");var H=i.Arguments=i.Array;if(n("keys"),n("values"),n("entries"),!g&&_&&H.name!=="values")try{a(H,"name",{value:"values"})}catch{}}}),pF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/object-to-string.js"(e,t){"use strict";var r=Y_(),n=xv();t.exports=r?{}.toString:tt(c(function(){return"[object "+n(this)+"]"},"toString"),"toString")}}),mF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.object.to-string.js"(){"use strict";var e=Y_(),t=_f(),r=pF();e||t(Object.prototype,"toString",r,{unsafe:!0})}}),iA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment.js"(e,t){"use strict";var r=Gi(),n=ng(),i=pv(),s=tt(function(a){return n.slice(0,a.length)===a},"userAgentStartsWith");t.exports=function(){return s("Bun/")?"BUN":s("Cloudflare-Workers")?"CLOUDFLARE":s("Deno/")?"DENO":s("Node.js/")?"NODE":r.Bun&&typeof Bun.version=="string"?"BUN":r.Deno&&typeof Deno.version=="object"?"DENO":i(r.process)==="process"?"NODE":r.window&&r.document?"BROWSER":"REST"}()}}),e3=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-node.js"(e,t){"use strict";var r=iA();t.exports=r==="NODE"}}),gF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/define-built-in-accessor.js"(e,t){"use strict";var r=GC(),n=lu();t.exports=function(i,s,a){return a.get&&r(a.get,s,{getter:!0}),a.set&&r(a.set,s,{setter:!0}),n.f(i,s,a)}}}),yF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/set-species.js"(e,t){"use strict";var r=Ad(),n=gF(),i=So(),s=Rc(),a=i("species");t.exports=function(l){var f=r(l);s&&f&&!f[a]&&n(f,a,{configurable:!0,get:function(){return this}})}}}),vF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/an-instance.js"(e,t){"use strict";var r=yv(),n=TypeError;t.exports=function(i,s){if(r(s,i))return i;throw new n("Incorrect invocation")}}}),bF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/is-constructor.js"(e,t){"use strict";var r=To(),n=os(),i=Ki(),s=xv(),a=Ad(),l=W_(),f=tt(function(){},"noop"),g=a("Reflect","construct"),_=/^\s*(?:class|function)\b/,x=r(_.exec),N=!_.test(f),I=tt(c(function(Z){if(!i(Z))return!1;try{return g(f,[],Z),!0}catch{return!1}},"isConstructor"),"isConstructor"),H=tt(c(function(Z){if(!i(Z))return!1;switch(s(Z)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return N||!!x(_,l(Z))}catch{return!0}},"isConstructor"),"isConstructor");H.sham=!0,t.exports=!g||n(function(){var T;return I(I.call)||!I(Object)||!I(function(){T=!0})||T})?H:I}}),_F=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/a-constructor.js"(e,t){"use strict";var r=bF(),n=vv(),i=TypeError;t.exports=function(s){if(r(s))return s;throw new i(n(s)+" is not a constructor")}}}),aA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/species-constructor.js"(e,t){"use strict";var r=kd(),n=_F(),i=mv(),s=So(),a=s("species");t.exports=function(l,f){var g=r(l).constructor,_;return g===void 0||i(_=r(g)[a])?f:n(_)}}}),oA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/function-apply.js"(e,t){"use strict";var r=hv(),n=Function.prototype,i=n.apply,s=n.call;t.exports=typeof Reflect=="object"&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})}}),sA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/array-slice.js"(e,t){"use strict";var r=To();t.exports=r([].slice)}}),wF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/validate-arguments-length.js"(e,t){"use strict";var r=TypeError;t.exports=function(n,i){if(n<i)throw new r("Not enough arguments");return n}}}),cA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-ios.js"(e,t){"use strict";var r=ng();t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(r)}}),lA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/task.js"(e,t){"use strict";var r=Gi(),n=oA(),i=Q_(),s=Ki(),a=jl(),l=os(),f=YC(),g=sA(),_=bv(),x=wF(),N=cA(),I=e3(),H=r.setImmediate,T=r.clearImmediate,Z=r.process,K=r.Dispatch,ie=r.Function,me=r.MessageChannel,le=r.String,fe=0,he={},Se="onreadystatechange",te,Oe,ye,nt;l(function(){te=r.location});var Ae=tt(function(C){if(a(he,C)){var B=he[C];delete he[C],B()}},"run"),we=tt(function(C){return function(){Ae(C)}},"runner"),Ze=tt(function(C){Ae(C.data)},"eventListener"),ee=tt(function(C){r.postMessage(le(C),te.protocol+"//"+te.host)},"globalPostMessageDefer");(!H||!T)&&(H=tt(c(function(B){x(arguments.length,1);var W=s(B)?B:ie(B),j=g(arguments,1);return he[++fe]=function(){n(W,void 0,j)},Oe(fe),fe},"setImmediate"),"setImmediate"),T=tt(c(function(B){delete he[B]},"clearImmediate"),"clearImmediate"),I?Oe=tt(function(C){Z.nextTick(we(C))},"defer"):K&&K.now?Oe=tt(function(C){K.now(we(C))},"defer"):me&&!N?(ye=new me,nt=ye.port2,ye.port1.onmessage=Ze,Oe=i(nt.postMessage,nt)):r.addEventListener&&s(r.postMessage)&&!r.importScripts&&te&&te.protocol!=="file:"&&!l(ee)?(Oe=ee,r.addEventListener("message",Ze,!1)):Se in _("script")?Oe=tt(function(C){f.appendChild(_("script"))[Se]=function(){f.removeChild(this),Ae(C)}},"defer"):Oe=tt(function(C){setTimeout(we(C),0)},"defer")),t.exports={set:H,clear:T}}}),xF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/safe-get-built-in.js"(e,t){"use strict";var r=Gi(),n=Rc(),i=Object.getOwnPropertyDescriptor;t.exports=function(s){if(!n)return r[s];var a=i(r,s);return a&&a.value}}}),dA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/queue.js"(e,t){"use strict";var r=tt(function(){this.head=null,this.tail=null},"Queue");r.prototype={add:function(n){var i={item:n,next:null},s=this.tail;s?s.next=i:this.head=i,this.tail=i},get:function(){var n=this.head;if(n){var i=this.head=n.next;return i===null&&(this.tail=null),n.item}}},t.exports=r}}),CF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-ios-pebble.js"(e,t){"use strict";var r=ng();t.exports=/ipad|iphone|ipod/i.test(r)&&typeof Pebble<"u"}}),AF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/environment-is-webos-webkit.js"(e,t){"use strict";var r=ng();t.exports=/web0s(?!.*chrome)/i.test(r)}}),EF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/microtask.js"(e,t){"use strict";var r=Gi(),n=xF(),i=Q_(),s=lA().set,a=dA(),l=cA(),f=CF(),g=AF(),_=e3(),x=r.MutationObserver||r.WebKitMutationObserver,N=r.document,I=r.process,H=r.Promise,T=n("queueMicrotask"),Z,K,ie,me,le;T||(fe=new a,he=tt(function(){var Se,te;for(_&&(Se=I.domain)&&Se.exit();te=fe.get();)try{te()}catch(Oe){throw fe.head&&Z(),Oe}Se&&Se.enter()},"flush"),!l&&!_&&!g&&x&&N?(K=!0,ie=N.createTextNode(""),new x(he).observe(ie,{characterData:!0}),Z=tt(function(){ie.data=K=!K},"notify")):!f&&H&&H.resolve?(me=H.resolve(void 0),me.constructor=H,le=i(me.then,me),Z=tt(function(){le(he)},"notify")):_?Z=tt(function(){I.nextTick(he)},"notify"):(s=i(s,r),Z=tt(function(){s(he)},"notify")),T=tt(function(Se){fe.head||Z(),fe.add(Se)},"microtask"));var fe,he;t.exports=T}}),kF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/host-report-errors.js"(e,t){"use strict";t.exports=function(r,n){try{arguments.length===1?console.error(r):console.error(r,n)}catch{}}}}),kh=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/perform.js"(e,t){"use strict";t.exports=function(r){try{return{error:!1,value:r()}}catch(n){return{error:!0,value:n}}}}}),Ih=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-native-constructor.js"(e,t){"use strict";var r=Gi();t.exports=r.Promise}}),og=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-constructor-detection.js"(e,t){"use strict";var r=Gi(),n=Ih(),i=Ki(),s=QC(),a=W_(),l=So(),f=iA(),g=Ed(),_=jC(),x=n&&n.prototype,N=l("species"),I=!1,H=i(r.PromiseRejectionEvent),T=s("Promise",function(){var Z=a(n),K=Z!==String(n);if(!K&&_===66||g&&!(x.catch&&x.finally))return!0;if(!_||_<51||!/native code/.test(Z)){var ie=new n(function(fe){fe(1)}),me=tt(function(fe){fe(function(){},function(){})},"FakePromise"),le=ie.constructor={};if(le[N]=me,I=ie.then(function(){})instanceof me,!I)return!0}return!K&&(f==="BROWSER"||f==="DENO")&&!H});t.exports={CONSTRUCTOR:T,REJECTION_EVENT:H,SUBCLASSING:I}}}),Id=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/new-promise-capability.js"(e,t){"use strict";var r=Dc(),n=TypeError,i=tt(function(s){var a,l;this.promise=new s(function(f,g){if(a!==void 0||l!==void 0)throw new n("Bad Promise constructor");a=f,l=g}),this.resolve=r(a),this.reject=r(l)},"PromiseCapability");t.exports.f=function(s){return new i(s)}}}),IF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.constructor.js"(){"use strict";var e=Es(),t=Ed(),r=e3(),n=Gi(),i=tc(),s=_f(),a=J_(),l=Cv(),f=yF(),g=Dc(),_=Ki(),x=Pc(),N=vF(),I=aA(),H=lA().set,T=EF(),Z=kF(),K=kh(),ie=dA(),me=_v(),le=Ih(),fe=og(),he=Id(),Se="Promise",te=fe.CONSTRUCTOR,Oe=fe.REJECTION_EVENT,ye=fe.SUBCLASSING,nt=me.getterFor(Se),Ae=me.set,we=le&&le.prototype,Ze=le,ee=we,C=n.TypeError,B=n.document,W=n.process,j=he.f,X=j,V=!!(B&&B.createEvent&&n.dispatchEvent),re="unhandledrejection",Y="rejectionhandled",E=0,L=1,je=2,G=1,Ce=2,Te,_e,qe,Ge,it=tt(function(Fe){var Qe;return x(Fe)&&_(Qe=Fe.then)?Qe:!1},"isThenable"),Ye=tt(function(Fe,Qe){var ot=Qe.value,Ve=Qe.state===L,Ke=Ve?Fe.ok:Fe.fail,St=Fe.resolve,Vt=Fe.reject,qr=Fe.domain,Ht,sr,tn;try{Ke?(Ve||(Qe.rejection===Ce&&de(Qe),Qe.rejection=G),Ke===!0?Ht=ot:(qr&&qr.enter(),Ht=Ke(ot),qr&&(qr.exit(),tn=!0)),Ht===Fe.promise?Vt(new C("Promise-chain cycle")):(sr=it(Ht))?i(sr,Ht,St,Vt):St(Ht)):Vt(ot)}catch(qt){qr&&!tn&&qr.exit(),Vt(qt)}},"callReaction"),gr=tt(function(Fe,Qe){Fe.notified||(Fe.notified=!0,T(function(){for(var ot=Fe.reactions,Ve;Ve=ot.get();)Ye(Ve,Fe);Fe.notified=!1,Qe&&!Fe.rejection&&F(Fe)}))},"notify"),ne=tt(function(Fe,Qe,ot){var Ve,Ke;V?(Ve=B.createEvent("Event"),Ve.promise=Qe,Ve.reason=ot,Ve.initEvent(Fe,!1,!0),n.dispatchEvent(Ve)):Ve={promise:Qe,reason:ot},!Oe&&(Ke=n["on"+Fe])?Ke(Ve):Fe===re&&Z("Unhandled promise rejection",ot)},"dispatchEvent"),F=tt(function(Fe){i(H,n,function(){var Qe=Fe.facade,ot=Fe.value,Ve=z(Fe),Ke;if(Ve&&(Ke=K(function(){r?W.emit("unhandledRejection",ot,Qe):ne(re,Qe,ot)}),Fe.rejection=r||z(Fe)?Ce:G,Ke.error))throw Ke.value})},"onUnhandled"),z=tt(function(Fe){return Fe.rejection!==G&&!Fe.parent},"isUnhandled"),de=tt(function(Fe){i(H,n,function(){var Qe=Fe.facade;r?W.emit("rejectionHandled",Qe):ne(Y,Qe,Fe.value)})},"onHandleUnhandled"),be=tt(function(Fe,Qe,ot){return function(Ve){Fe(Qe,Ve,ot)}},"bind"),Ie=tt(function(Fe,Qe,ot){Fe.done||(Fe.done=!0,ot&&(Fe=ot),Fe.value=Qe,Fe.state=je,gr(Fe,!0))},"internalReject"),Ue=tt(function(Fe,Qe,ot){if(!Fe.done){Fe.done=!0,ot&&(Fe=ot);try{if(Fe.facade===Qe)throw new C("Promise can't be resolved itself");var Ve=it(Qe);Ve?T(function(){var Ke={done:!1};try{i(Ve,Qe,be(Ue,Ke,Fe),be(Ie,Ke,Fe))}catch(St){Ie(Ke,St,Fe)}}):(Fe.value=Qe,Fe.state=L,gr(Fe,!1))}catch(Ke){Ie({done:!1},Ke,Fe)}}},"internalResolve");if(te&&(Ze=tt(c(function(Qe){N(this,ee),g(Qe),i(Te,this);var ot=nt(this);try{Qe(be(Ue,ot),be(Ie,ot))}catch(Ve){Ie(ot,Ve)}},"Promise2"),"Promise"),ee=Ze.prototype,Te=tt(c(function(Qe){Ae(this,{type:Se,done:!1,notified:!1,parent:!1,reactions:new ie,rejection:!1,state:E,value:null})},"Promise2"),"Promise"),Te.prototype=s(ee,"then",tt(c(function(Qe,ot){var Ve=nt(this),Ke=j(I(this,Ze));return Ve.parent=!0,Ke.ok=_(Qe)?Qe:!0,Ke.fail=_(ot)&&ot,Ke.domain=r?W.domain:void 0,Ve.state===E?Ve.reactions.add(Ke):T(function(){Ye(Ke,Ve)}),Ke.promise},"then"),"then")),_e=tt(function(){var Fe=new Te,Qe=nt(Fe);this.promise=Fe,this.resolve=be(Ue,Qe),this.reject=be(Ie,Qe)},"OwnPromiseCapability"),he.f=j=tt(function(Fe){return Fe===Ze||Fe===qe?new _e(Fe):X(Fe)},"newPromiseCapability"),!t&&_(le)&&we!==Object.prototype)){Ge=we.then,ye||s(we,"then",tt(c(function(Qe,ot){var Ve=this;return new Ze(function(Ke,St){i(Ge,Ve,Ke,St)}).then(Qe,ot)},"then"),"then"),{unsafe:!0});try{delete we.constructor}catch{}a&&a(we,ee)}e({global:!0,constructor:!0,wrap:!0,forced:te},{Promise:Ze}),l(Ze,Se,!1,!0),f(Se)}}),TF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/check-correctness-of-iteration.js"(e,t){"use strict";var r=So(),n=r("iterator"),i=!1;try{s=0,a={next:function(){return{done:!!s++}},return:function(){i=!0}},a[n]=function(){return this},Array.from(a,function(){throw 2})}catch{}var s,a;t.exports=function(l,f){try{if(!f&&!i)return!1}catch{return!1}var g=!1;try{var _={};_[n]=function(){return{next:function(){return{done:g=!0}}}},l(_)}catch{}return g}}}),Av=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-statics-incorrect-iteration.js"(e,t){"use strict";var r=Ih(),n=TF(),i=og().CONSTRUCTOR;t.exports=i||!n(function(s){r.all(s).then(void 0,function(){})})}}),SF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.all.js"(){"use strict";var e=Es(),t=tc(),r=Dc(),n=Id(),i=kh(),s=ag(),a=Av();e({target:"Promise",stat:!0,forced:a},{all:tt(c(function(f){var g=this,_=n.f(g),x=_.resolve,N=_.reject,I=i(function(){var H=r(g.resolve),T=[],Z=0,K=1;s(f,function(ie){var me=Z++,le=!1;K++,t(H,g,ie).then(function(fe){le||(le=!0,T[me]=fe,--K||x(T))},N)}),--K||x(T)});return I.error&&N(I.value),_.promise},"all"),"all")})}}),RF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.catch.js"(){"use strict";var e=Es(),t=Ed(),r=og().CONSTRUCTOR,n=Ih(),i=Ad(),s=Ki(),a=_f(),l=n&&n.prototype;e({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(g){return this.then(void 0,g)}}),!t&&s(n)&&(f=i("Promise").prototype.catch,l.catch!==f&&a(l,"catch",f,{unsafe:!0}));var f}}),PF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.race.js"(){"use strict";var e=Es(),t=tc(),r=Dc(),n=Id(),i=kh(),s=ag(),a=Av();e({target:"Promise",stat:!0,forced:a},{race:tt(c(function(f){var g=this,_=n.f(g),x=_.reject,N=i(function(){var I=r(g.resolve);s(f,function(H){t(I,g,H).then(_.resolve,x)})});return N.error&&x(N.value),_.promise},"race"),"race")})}}),DF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.reject.js"(){"use strict";var e=Es(),t=Id(),r=og().CONSTRUCTOR;e({target:"Promise",stat:!0,forced:r},{reject:tt(c(function(i){var s=t.f(this),a=s.reject;return a(i),s.promise},"reject"),"reject")})}}),uA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/promise-resolve.js"(e,t){"use strict";var r=kd(),n=Pc(),i=Id();t.exports=function(s,a){if(r(s),n(a)&&a.constructor===s)return a;var l=i.f(s),f=l.resolve;return f(a),l.promise}}}),OF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.resolve.js"(){"use strict";var e=Es(),t=Ad(),r=Ed(),n=Ih(),i=og().CONSTRUCTOR,s=uA(),a=t("Promise"),l=r&&!i;e({target:"Promise",stat:!0,forced:r||i},{resolve:tt(c(function(g){return s(l&&this===a?n:this,g)},"resolve"),"resolve")})}}),NF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.js"(){"use strict";IF(),SF(),RF(),PF(),DF(),OF()}}),jF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.all-settled.js"(){"use strict";var e=Es(),t=tc(),r=Dc(),n=Id(),i=kh(),s=ag(),a=Av();e({target:"Promise",stat:!0,forced:a},{allSettled:tt(c(function(f){var g=this,_=n.f(g),x=_.resolve,N=_.reject,I=i(function(){var H=r(g.resolve),T=[],Z=0,K=1;s(f,function(ie){var me=Z++,le=!1;K++,t(H,g,ie).then(function(fe){le||(le=!0,T[me]={status:"fulfilled",value:fe},--K||x(T))},function(fe){le||(le=!0,T[me]={status:"rejected",reason:fe},--K||x(T))})}),--K||x(T)});return I.error&&N(I.value),_.promise},"allSettled"),"allSettled")})}}),BF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.any.js"(){"use strict";var e=Es(),t=tc(),r=Dc(),n=Ad(),i=Id(),s=kh(),a=ag(),l=Av(),f="No one promise resolved";e({target:"Promise",stat:!0,forced:l},{any:tt(c(function(_){var x=this,N=n("AggregateError"),I=i.f(x),H=I.resolve,T=I.reject,Z=s(function(){var K=r(x.resolve),ie=[],me=0,le=1,fe=!1;a(_,function(he){var Se=me++,te=!1;le++,t(K,x,he).then(function(Oe){te||fe||(fe=!0,H(Oe))},function(Oe){te||fe||(te=!0,ie[Se]=Oe,--le||T(new N(ie,f)))})}),--le||T(new N(ie,f))});return Z.error&&T(Z.value),I.promise},"any"),"any")})}}),fA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.try.js"(){"use strict";var e=Es(),t=Gi(),r=oA(),n=sA(),i=Id(),s=Dc(),a=kh(),l=t.Promise,f=!1,g=!l||!l.try||a(function(){l.try(function(_){f=_===8},8)}).error||!f;e({target:"Promise",stat:!0,forced:g},{try:function(_){var x=arguments.length>1?n(arguments,1):[],N=i.f(this),I=a(function(){return r(s(_),void 0,x)});return(I.error?N.reject:N.resolve)(I.value),N.promise}})}}),hA=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.with-resolvers.js"(){"use strict";var e=Es(),t=Id();e({target:"Promise",stat:!0},{withResolvers:tt(c(function(){var n=t.f(this);return{promise:n.promise,resolve:n.resolve,reject:n.reject}},"withResolvers"),"withResolvers")})}}),MF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.promise.finally.js"(){"use strict";var e=Es(),t=Ed(),r=Ih(),n=os(),i=Ad(),s=Ki(),a=aA(),l=uA(),f=_f(),g=r&&r.prototype,_=!!r&&n(function(){g.finally.call({then:function(){}},function(){})});e({target:"Promise",proto:!0,real:!0,forced:_},{finally:function(N){var I=a(this,i("Promise")),H=s(N);return this.then(H?function(T){return l(I,N()).then(function(){return T})}:N,H?function(T){return l(I,N()).then(function(){throw T})}:N)}}),!t&&s(r)&&(x=i("Promise").prototype.finally,g.finally!==x&&f(g,"finally",x,{unsafe:!0}));var x}}),FF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/string-multibyte.js"(e,t){"use strict";var r=To(),n=G_(),i=X_(),s=gv(),a=r("".charAt),l=r("".charCodeAt),f=r("".slice),g=tt(function(_){return function(x,N){var I=i(s(x)),H=n(N),T=I.length,Z,K;return H<0||H>=T?_?"":void 0:(Z=l(I,H),Z<55296||Z>56319||H+1===T||(K=l(I,H+1))<56320||K>57343?_?a(I,H):Z:_?f(I,H,H+2):(Z-55296<<10)+(K-56320)+65536)}},"createMethod");t.exports={codeAt:g(!1),charAt:g(!0)}}}),VF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/es.string.iterator.js"(){"use strict";var e=FF().charAt,t=X_(),r=_v(),n=tA(),i=rA(),s="String Iterator",a=r.set,l=r.getterFor(s);n(String,"String",function(f){a(this,{type:s,string:t(f),index:0})},tt(c(function(){var g=l(this),_=g.string,x=g.index,N;return x>=_.length?i(void 0,!0):(N=e(_,x),g.index+=N.length,i(N,!1))},"next"),"next"))}}),UF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/path.js"(e,t){"use strict";var r=Gi();t.exports=r}}),LF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/es/promise/index.js"(e,t){"use strict";uF(),nA(),mF(),NF(),jF(),BF(),fA(),hA(),MF(),VF();var r=UF();t.exports=r.Promise}}),ZF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/dom-iterables.js"(e,t){"use strict";t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}}}),zF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/internals/dom-token-list-prototype.js"(e,t){"use strict";var r=bv(),n=r("span").classList,i=n&&n.constructor&&n.constructor.prototype;t.exports=i===Object.prototype?void 0:i}}),WF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/web.dom-collections.iterator.js"(){"use strict";var e=Gi(),t=ZF(),r=zF(),n=nA(),i=bf(),s=Cv(),a=So(),l=a("iterator"),f=n.values,g=tt(function(x,N){if(x){if(x[l]!==f)try{i(x,l,f)}catch{x[l]=f}if(s(x,N,!0),t[N]){for(var I in n)if(x[I]!==n[I])try{i(x,I,n[I])}catch{x[I]=n[I]}}}},"handlePrototype");for(_ in t)g(e[_]&&e[_].prototype,_);var _;g(r,"DOMTokenList")}}),qF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/stable/promise/index.js"(e,t){"use strict";var r=LF();WF(),t.exports=r}}),$F=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/esnext.promise.try.js"(){"use strict";fA()}}),GF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/modules/esnext.promise.with-resolvers.js"(){"use strict";hA()}}),HF=Le({"../../node_modules/.pnpm/core-js@3.41.0/node_modules/core-js/actual/promise/index.js"(e,t){"use strict";var r=qF();$F(),GF(),t.exports=r}}),IX=BM(HF(),1),Xm=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:typeof global<"u"?global:void 0;Xm&&(typeof Xm.AbortController>"u"&&(Xm.AbortController=Ev.AbortController),typeof Xm.AbortSignal>"u"&&(Xm.AbortSignal=Ev.AbortSignal));var OC=tt((e,t)=>e.reduce((r,n)=>r!==void 0?r:t(n),void 0),"findFirstResult"),ga=tt((e,t)=>t==="read"?"get"in(e.read??{}):t==="store"?"upload"in(e.store??{}):t==="index"?"get"in(e.index??{}):t==="cache"?"getIndex"in(e.cache??{}):t==="id"?"did"in(e.id??{}):t==="context"?"resolveStaticDocument"in(e.context??{}):!1,"pluginImplementsPlane"),hi=tt((e,t)=>t==="read"?"read"in e:t==="store"?"store"in e:t==="index"?"index"in e:t==="cache"?"cache"in e:t==="id"?"id"in e:t==="context"?"context"in e:!1,"learnCardImplementsPlane"),KF=tt((e,t)=>Object.fromEntries(Object.entries(e).map(([r,n],i)=>[r,t(n,i)])),"mapObject"),eg=tt(e=>e.status==="fulfilled"&&!!e.value,"isFulfilledAndNotEmpty"),JF=tt((e,t)=>[...new Map(e.map(r=>[t instanceof Function?t(r):r[t],r])).values()],"uniqBy"),Th=tt((e,t)=>e.reduce((r,n)=>(t in n&&(r[n.name]={name:n.name,displayName:n.displayName,description:n.description}),r),{}),"getPlaneProviders"),t3=tt((e,t)=>KF(t,r=>r.bind(e,e)),"bindLearnCardToFunctionsObject"),QF=tt(async(e,t)=>(e.debug?.("Adding plugin",t.name),Ro({plugins:[...e.plugins,t],debug:e.debug})),"addPluginToLearnCard"),YF=tt(e=>({get:async(t,{cache:r="cache-first"}={})=>{if(e.debug?.("learnCard.read.get",t),!t)return;if(r==="cache-only"&&!hi(e,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(hi(e,"cache")&&r!=="skip-cache"){let s=await e.cache.getVc(t);if(s)return r==="cache-first"&&hi(e,"read")&&e.read.get(t,{cache:"skip-cache"}).then(a=>e.cache.setVc(t,a)),s}let i=(await Promise.allSettled(e.plugins.map(async s=>{if(!ga(s,"read"))throw new Error("Plugin is not a Read Plugin");return s.read.get(e,t)}))).find(eg)?.value;return i&&hi(e,"cache")&&r!=="skip-cache"&&await e.cache.setVc(t,i),i},providers:Th(e.plugins,"read")}),"generateReadPlane"),XF=tt(e=>({upload:async(t,r,{cache:n="cache-first"}={})=>{let i=await e.upload(t,r);return n!=="skip-cache"&&hi(t,"cache")&&await t.cache.setVc(i,r),i},..."uploadMany"in e?{uploadMany:e.uploadMany}:{},..."uploadEncrypted"in e?{uploadEncrypted:async(t,r,n,{cache:i="cache-first"}={})=>{let s=await e.uploadEncrypted?.(t,r,n);return i!=="skip-cache"&&hi(t,"cache")&&await t.cache.setVc(s,r),s}}:{}}),"addCachingToStorePlane"),eV=tt(e=>({...e.plugins.reduce((r,n)=>(ga(n,"store")&&(r[n.name]=t3(e,XF(n.store))),r),{}),providers:Th(e.plugins,"store")}),"generateStorePlane"),tV=tt((e,t)=>({get:async(r,n,{cache:i="cache-first"}={})=>{if(i==="cache-only"&&!hi(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(hi(r,"cache")&&i!=="skip-cache"){let a=await r.cache.getIndex(t,n??{});if(a)return i==="cache-first"&&e.get(r,n,{cache:"skip-cache"}).then(l=>{r.cache.setIndex(t,n??{},l)}),a}let s=await e.get(r,n);return s&&hi(r,"cache")&&i!=="skip-cache"&&await r.cache.setIndex(t,n??{},s),s},...e.getPage?{getPage:async(r,n,i,{cache:s="cache-first"}={})=>{if(s==="cache-only"&&!hi(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(hi(r,"cache")&&s!=="skip-cache"){let l=await r.cache.getIndexPage(t,n??{},i);if(l)return s==="cache-first"&&e.getPage?.(r,n,i,{cache:"skip-cache"}).then(f=>{r.cache.setIndexPage(t,n??{},f,i)}),l}let a=await e.getPage?.(r,n,i);return a&&hi(r,"cache")&&s!=="skip-cache"&&await r.cache.setIndexPage(t,n??{},a,i),a}}:{},...e.getCount?{getCount:async(r,n,{cache:i="cache-first"}={})=>{if(i==="cache-only"&&!hi(r,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(hi(r,"cache")&&i!=="skip-cache"){let a=await r.cache.getIndexCount?.(t,n??{});if(a)return i==="cache-first"&&e.getCount?.(r,n,{cache:"skip-cache"}).then(l=>r.cache.setIndexCount?.(t,n??{},l)),a}let s=await e.getCount?.(r,n);return s&&hi(r,"cache")&&i!=="skip-cache"&&await r.cache.setIndexCount?.(t,n??{},s),s}}:{},add:async(r,n,{cache:i="cache-first"}={})=>{let s=await e.add(r,n);return i!=="skip-cache"&&hi(r,"cache")&&await r.cache.flushIndex(),s},...e.addMany?{addMany:async(r,n,{cache:i="cache-first"}={})=>{let s=await e.addMany?.(r,n);return i!=="skip-cache"&&hi(r,"cache")&&await r.cache.flushIndex(),s}}:{},update:async(r,n,i,{cache:s="cache-first"}={})=>{let a=await e.update(r,n,i);return s!=="skip-cache"&&hi(r,"cache")&&await r.cache.flushIndex(),a},remove:async(r,n,{cache:i="cache-first"}={})=>{let s=await e.remove(r,n);return i!=="skip-cache"&&hi(r,"cache")&&await r.cache.flushIndex(),s},...e.removeAll?{removeAll:async(r,{cache:n="cache-first"}={})=>{let i=await e.removeAll?.(r);return n!=="skip-cache"&&hi(r,"cache")&&await r.cache.flushIndex(),i}}:{}}),"addCachingToIndexPlane"),rV=tt(e=>({...e.plugins.reduce((n,i)=>(ga(i,"index")&&(n[i.name]=t3(e,tV(i.index,i.name))),n),{}),all:{get:async(n,{cache:i="cache-first"}={})=>{if(e.debug?.("learnCard.index.all.get"),i==="cache-only"&&!hi(e,"cache"))throw new Error("Cannot read from cache. Cache Plane is not implemented!");if(hi(e,"cache")&&i!=="skip-cache"){let l=await e.cache.getIndex("all",n??{});if(l)return i==="cache-first"&&hi(e,"index")&&e.index.all.get(n,{cache:"skip-cache"}).then(f=>e.cache.setIndex("all",n??{},f)),l}let s=(await Promise.all(e.plugins.map(async l=>ga(l,"index")?l.index.get(e,n):[]))).flat(),a=JF(s,"id");return a&&hi(e,"cache")&&i!=="skip-cache"&&await e.cache.setIndex("all",n??{},a),a}},providers:Th(e.plugins,"index")}),"generateIndexPlane"),nV=tt(e=>({getIndex:async(t,r)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async s=>{if(!ga(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.getIndex(e,t,r)}))).find(eg)?.value}catch{return}},setIndex:async(t,r,n)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async s=>{if(!ga(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.setIndex(e,t,r,n)}))).some(s=>s.status==="fulfilled")),getIndexPage:async(t,r,n)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async a=>{if(!ga(a,"cache"))throw new Error("Plugin is not a Cache Plugin");return a.cache.getIndexPage(e,t,r,n)}))).find(eg)?.value}catch{return}},setIndexPage:async(t,r,n,i)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async a=>{if(!ga(a,"cache"))throw new Error("Plugin is not a Cache Plugin");return a.cache.setIndexPage(e,t,r,n,i)}))).some(a=>a.status==="fulfilled")),getIndexCount:async(t,r)=>{e.debug?.("learnCard.cache.getIndex");try{return(await Promise.allSettled(e.plugins.map(async s=>{if(!ga(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.getIndexCount?.(e,t,r)}))).find(eg)?.value}catch{return}},setIndexCount:async(t,r,n)=>(e.debug?.("learnCard.cache.setIndex"),(await Promise.allSettled(e.plugins.map(async s=>{if(!ga(s,"cache"))throw new Error("Plugin is not a Cache Plugin");return s.cache.setIndexCount?.(e,t,r,n)}))).some(s=>s.status==="fulfilled")),flushIndex:async()=>(e.debug?.("learnCard.cache.flushIndex"),(await Promise.allSettled(e.plugins.map(async r=>{if(!ga(r,"cache"))throw new Error("Plugin is not a Cache Plugin");return r.cache.flushIndex(e)}))).some(r=>r.status==="fulfilled")),getVc:async t=>{e.debug?.("learnCard.cache.getVc");try{return(await Promise.allSettled(e.plugins.map(async i=>{if(!ga(i,"cache"))throw new Error("Plugin is not a Cache Plugin");return i.cache.getVc(e,t)}))).find(eg)?.value}catch{return}},setVc:async(t,r)=>(e.debug?.("learnCard.cache.setVc"),(await Promise.allSettled(e.plugins.map(async i=>{if(!ga(i,"cache"))throw new Error("Plugin is not a Cache Plugin");return i.cache.setVc(e,t,r)}))).some(i=>i.status==="fulfilled")),flushVc:async()=>(e.debug?.("learnCard.cache.flushVc"),(await Promise.allSettled(e.plugins.map(async r=>{if(!ga(r,"cache"))throw new Error("Plugin is not a Cache Plugin");return r.cache.flushVc(e)}))).some(r=>r.status==="fulfilled")),providers:Th(e.plugins,"cache")}),"generateCachePlane"),iV=tt(e=>({did:t=>{e.debug?.("learnCard.id.did",t);let r=OC([...e.plugins].reverse(),n=>{try{return ga(n,"id")?n.id.did(e,t):void 0}catch{return}});if(!r)throw new Error(`No plugin supports did method ${t}`);return r},keypair:t=>{e.debug?.("learnCard.id.keypair",t);let r=OC(e.plugins,n=>{try{return ga(n,"id")?n.id.keypair(e,t):void 0}catch{return}});if(!r)throw new Error(`No plugin supports keypair type ${t}`);return r},providers:Th(e.plugins,"id")}),"generateIdPlane"),aV=tt(e=>({resolveDocument:async(t,r=!1)=>{e.debug?.("learnCard.context.resolveDocument",t);let i=(await Promise.all(e.plugins.map(async a=>{if(!!ga(a,"context"))return a.context.resolveStaticDocument(e,t)}))).find(Boolean);return i||!r?i:(await Promise.all(e.plugins.map(async a=>{if(!!ga(a,"context"))return a.context.resolveRemoteDocument?.(e,t)}))).find(Boolean)},providers:Th(e.plugins,"context")}),"generateContextPlane"),oV=tt((e,t)=>t3(e,t),"bindMethods"),Ro=tt(async(e={})=>{let{plugins:t=[]}=e,r=t.reduce((i,s)=>({...i,...s.methods}),{}),n={read:{},store:{},index:{},cache:{},id:{},context:{},plugins:t,invoke:r,addPlugin:function(i){return QF(this,i)},debug:e.debug};return n.read=YF(n),n.store=eV(n),n.index=rV(n),n.cache=nV(n),n.id=iV(n),n.context=aV(n),r&&(n.invoke=oV(n,r)),n},"generateLearnCard");typeof window>"u"&&!globalThis.crypto&&(globalThis.crypto=pA.default);var r3=c(async({debug:e}={})=>Ro({debug:e}),"customLearnCard");var Bl={name:"Dynamic Loader",displayName:"Dynamic Loader",description:"Resolve JSON-LD Contexts dynamically via fetch",context:{resolveStaticDocument:async()=>{},resolveRemoteDocument:async(e,t)=>{try{let r=await fetch(t);if(r.status!==200)throw new Error("Status Code not 200!");return await r.json()}catch(r){e.debug?.("Error fetching remote context!",r);return}}},methods:{}};var n3=V_(require("isomorphic-webcrypto"));typeof window>"u"&&!globalThis.crypto&&(globalThis.crypto=n3.default);var sV=n3.default,rc={name:"Crypto",displayName:"Crypto Plugin",description:"Exposes a standardized, isomorphic Crypto object",methods:{crypto:()=>sV}};var yV={};var cV=Object.defineProperty,Or=c((e,t)=>cV(e,"name",{value:t,configurable:!0}),"__name"),st,Jr=0,sg=null;function Cf(){return(sg===null||sg.byteLength===0)&&(sg=new Uint8Array(st.memory.buffer)),sg}c(Cf,"getUint8ArrayMemory0");Or(Cf,"getUint8ArrayMemory0");var Tv=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},lV=typeof Tv.encodeInto=="function"?function(e,t){return Tv.encodeInto(e,t)}:function(e,t){let r=Tv.encode(e);return t.set(r),{read:e.length,written:r.length}};function Nn(e,t,r){if(r===void 0){let l=Tv.encode(e),f=t(l.length,1)>>>0;return Cf().subarray(f,f+l.length).set(l),Jr=l.length,f}let n=e.length,i=t(n,1)>>>0,s=Cf(),a=0;for(;a<n;a++){let l=e.charCodeAt(a);if(l>127)break;s[i+a]=l}if(a!==n){a!==0&&(e=e.slice(a)),i=r(i,n,n=a+e.length*3,1)>>>0;let l=Cf().subarray(i+a,i+n);a+=lV(e,l).written,i=r(i,n,a,1)>>>0}return Jr=a,i}c(Nn,"passStringToWasm0");Or(Nn,"passStringToWasm0");var wf=null;function ss(){return(wf===null||wf.buffer.detached===!0||wf.buffer.detached===void 0&&wf.buffer!==st.memory.buffer)&&(wf=new DataView(st.memory.buffer)),wf}c(ss,"getDataViewMemory0");Or(ss,"getDataViewMemory0");var yA=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&yA.decode();function ks(e,t){return e=e>>>0,yA.decode(Cf().subarray(e,e+t))}c(ks,"getStringFromWasm0");Or(ks,"getStringFromWasm0");function xf(e){let t=st.__externref_table_alloc();return st.__wbindgen_export_4.set(t,e),t}c(xf,"addToExternrefTable0");Or(xf,"addToExternrefTable0");function ya(e,t){try{return e.apply(this,t)}catch(r){let n=xf(r);st.__wbindgen_exn_store(n)}}c(ya,"handleError");Or(ya,"handleError");function i3(e,t){return e=e>>>0,Cf().subarray(e/1,e/1+t)}c(i3,"getArrayU8FromWasm0");Or(i3,"getArrayU8FromWasm0");function Ml(e){return e==null}c(Ml,"isLikeNone");Or(Ml,"isLikeNone");var mA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>{st.__wbindgen_export_5.get(e.dtor)(e.a,e.b)});function vA(e,t,r,n){let i={a:e,b:t,cnt:1,dtor:r},s=Or((...a)=>{i.cnt++;let l=i.a;i.a=0;try{return n(l,i.b,...a)}finally{--i.cnt===0?(st.__wbindgen_export_5.get(i.dtor)(l,i.b),mA.unregister(i)):i.a=l}},"real");return s.original=i,mA.register(s,i,i),s}c(vA,"makeMutClosure");Or(vA,"makeMutClosure");function Sv(e){let t=typeof e;if(t=="number"||t=="boolean"||e==null)return`${e}`;if(t=="string")return`"${e}"`;if(t=="symbol"){let i=e.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){let i=e.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(e)){let i=e.length,s="[";i>0&&(s+=Sv(e[0]));for(let a=1;a<i;a++)s+=", "+Sv(e[a]);return s+="]",s}let r=/\[object ([^\]]+)\]/.exec(toString.call(e)),n;if(r&&r.length>1)n=r[1];else return toString.call(e);if(n=="Object")try{return"Object("+JSON.stringify(e)+")"}catch{return"Object"}return e instanceof Error?`${e.name}: ${e.message}
|
|
2
|
-
${e.stack}`:n}c(Sv,"debugString");Or(Sv,"debugString");function bA(){return st.clearCache()}c(bA,"clearCache");Or(bA,"clearCache");function _A(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;return st.didResolver(r,n,i,s)}c(_A,"didResolver");Or(_A,"didResolver");function wA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;return st.resolveDID(r,n,i,s)}c(wA,"resolveDID");Or(wA,"resolveDID");function Rv(e){let t=st.__wbindgen_export_4.get(e);return st.__externref_table_dealloc(e),t}c(Rv,"takeFromExternrefTable0");Or(Rv,"takeFromExternrefTable0");function o3(e,t){let r=t(e.length*1,1)>>>0;return Cf().set(e,r/1),Jr=e.length,r}c(o3,"passArray8ToWasm0");Or(o3,"passArray8ToWasm0");function xA(e){let t,r;try{let s=o3(e,st.__wbindgen_malloc),a=Jr,l=st.generateEd25519KeyFromBytes(s,a);var n=l[0],i=l[1];if(l[3])throw n=0,i=0,Rv(l[2]);return t=n,r=i,ks(n,i)}finally{st.__wbindgen_free(t,r,1)}}c(xA,"generateEd25519KeyFromBytes");Or(xA,"generateEd25519KeyFromBytes");function CA(e){let t,r;try{let s=o3(e,st.__wbindgen_malloc),a=Jr,l=st.generateSecp256k1KeyFromBytes(s,a);var n=l[0],i=l[1];if(l[3])throw n=0,i=0,Rv(l[2]);return t=n,r=i,ks(n,i)}finally{st.__wbindgen_free(t,r,1)}}c(CA,"generateSecp256k1KeyFromBytes");Or(CA,"generateSecp256k1KeyFromBytes");function cg(e,t){let r=t(e.length*4,4)>>>0;for(let n=0;n<e.length;n++){let i=xf(e[n]);ss().setUint32(r+4*n,i,!0)}return Jr=e.length,r}c(cg,"passArrayJsValueToWasm0");Or(cg,"passArrayJsValueToWasm0");function AA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=cg(t,st.__wbindgen_malloc),s=Jr;return st.createJwe(r,n,i,s)}c(AA,"createJwe");Or(AA,"createJwe");function EA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=cg(t,st.__wbindgen_malloc),s=Jr;return st.decryptJwe(r,n,i,s)}c(EA,"decryptJwe");Or(EA,"decryptJwe");function kA(e,t){let r=cg(t,st.__wbindgen_malloc),n=Jr;return st.createDagJwe(e,r,n)}c(kA,"createDagJwe");Or(kA,"createDagJwe");function IA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=cg(t,st.__wbindgen_malloc),s=Jr;return st.decryptDagJwe(r,n,i,s)}c(IA,"decryptDagJwe");Or(IA,"decryptDagJwe");function TA(e,t){let r,n;try{let a=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Jr,f=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),g=Jr,_=st.keyToDID(a,l,f,g);var i=_[0],s=_[1];if(_[3])throw i=0,s=0,Rv(_[2]);return r=i,n=s,ks(i,s)}finally{st.__wbindgen_free(r,n,1)}}c(TA,"keyToDID");Or(TA,"keyToDID");function SA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;return st.keyToVerificationMethod(r,n,i,s)}c(SA,"keyToVerificationMethod");Or(SA,"keyToVerificationMethod");function RA(e){let t=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),r=Jr;return st.didToVerificationMethod(t,r)}c(RA,"didToVerificationMethod");Or(RA,"didToVerificationMethod");function PA(e,t,r,n){let i=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr,a=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Jr,f=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),g=Jr,_=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),x=Jr;return st.issueCredential(i,s,a,l,f,g,_,x)}c(PA,"issueCredential");Or(PA,"issueCredential");function DA(e,t,r){let n=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),i=Jr,s=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),a=Jr,l=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),f=Jr;return st.verifyCredential(n,i,s,a,l,f)}c(DA,"verifyCredential");Or(DA,"verifyCredential");function OA(e,t,r,n){let i=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr,a=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Jr,f=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),g=Jr,_=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),x=Jr;return st.issuePresentation(i,s,a,l,f,g,_,x)}c(OA,"issuePresentation");Or(OA,"issuePresentation");function NA(e,t,r){let n=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),i=Jr,s=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),a=Jr,l=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),f=Jr;return st.verifyPresentation(n,i,s,a,l,f)}c(NA,"verifyPresentation");Or(NA,"verifyPresentation");function a3(e){let t=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),r=Jr;return st.contextLoader(t,r)}c(a3,"contextLoader");Or(a3,"contextLoader");function jA(e,t,r){st.closure4174_externref_shim(e,t,r)}c(jA,"__wbg_adapter_54");Or(jA,"__wbg_adapter_54");function BA(e,t,r,n){st.closure4576_externref_shim(e,t,r,n)}c(BA,"__wbg_adapter_222");Or(BA,"__wbg_adapter_222");var dV=["omit","same-origin","include"],uV=["same-origin","no-cors","cors","navigate"];async function MA(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(n){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}c(MA,"__wbg_load");Or(MA,"__wbg_load");function FA(){let e={};return e.wbg={},e.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,r){let n=String(r),i=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;ss().setInt32(t+4*1,s,!0),ss().setInt32(t+4*0,i,!0)},e.wbg.__wbg_abort_775ef1d17fc65868=function(t){t.abort()},e.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return ya(function(t,r,n,i,s){t.append(ks(r,n),ks(i,s))},arguments)},e.wbg.__wbg_arrayBuffer_d1b44c4390db422f=function(){return ya(function(t){return t.arrayBuffer()},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},e.wbg.__wbg_call_672a4d21634d4a24=function(){return ya(function(t,r){return t.call(r)},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return ya(function(t,r,n){return t.call(r,n)},arguments)},e.wbg.__wbg_crypto_038798f665f985e2=function(t){return t.crypto},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},e.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},e.wbg.__wbg_entries_3265d4158b33e5dc=function(t){return Object.entries(t)},e.wbg.__wbg_fetch_509096533071c657=function(t,r){return t.fetch(r)},e.wbg.__wbg_fetch_f1856afdb49415d1=function(t){return fetch(t)},e.wbg.__wbg_from_2a5d3e218e67aa85=function(t){return Array.from(t)},e.wbg.__wbg_getRandomValues_371e7ade8bd92088=function(t,r){t.getRandomValues(r)},e.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return ya(function(t,r){globalThis.crypto.getRandomValues(i3(t,r))},arguments)},e.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1=function(t){return t.getRandomValues},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return ya(function(t,r){t.getRandomValues(r)},arguments)},e.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return ya(function(t,r){return Reflect.get(t,r)},arguments)},e.wbg.__wbg_get_b9b93047fe3cf45b=function(t,r){return t[r>>>0]},e.wbg.__wbg_has_a5ea9117f258a0ec=function(){return ya(function(t,r){return Reflect.has(t,r)},arguments)},e.wbg.__wbg_headers_9cb51cfd2ac780a4=function(t){return t.headers},e.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let r;try{r=t instanceof ArrayBuffer}catch{r=!1}return r},e.wbg.__wbg_instanceof_Map_f3469ce2244d2430=function(t){let r;try{r=t instanceof Map}catch{r=!1}return r},e.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(t){let r;try{r=t instanceof Response}catch{r=!1}return r},e.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let r;try{r=t instanceof Uint8Array}catch{r=!1}return r},e.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},e.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},e.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},e.wbg.__wbg_keys_5c77a08ddc2fb8a6=function(t){return Object.keys(t)},e.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},e.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},e.wbg.__wbg_msCrypto_ff35fce085fab2a3=function(t){return t.msCrypto},e.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},e.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return ya(function(){return new Headers},arguments)},e.wbg.__wbg_new_23a2665fac83c611=function(t,r){try{var n={a:t,b:r},i=Or((a,l)=>{let f=n.a;n.a=0;try{return BA(f,n.b,a,l)}finally{n.a=f}},"cb0");return new Promise(i)}finally{n.a=n.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return new Array},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},e.wbg.__wbg_new_e25e5aab09ff45db=function(){return ya(function(){return new AbortController},arguments)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,r){return new Function(ks(t,r))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,r,n){return new Uint8Array(t,r>>>0,n>>>0)},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},e.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return ya(function(t,r,n){return new Request(ks(t,r),n)},arguments)},e.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},e.wbg.__wbg_next_6574e1a8a62d1055=function(){return ya(function(t){return t.next()},arguments)},e.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},e.wbg.__wbg_now_d18023d54d4e5500=function(t){return t.now()},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},e.wbg.__wbg_push_737cfc8c1432c2c6=function(t,r){return t.push(r)},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(t){queueMicrotask(t)},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(t){return t.queueMicrotask},e.wbg.__wbg_randomFillSync_994ac6d9ade7a695=function(t,r,n){t.randomFillSync(i3(r,n))},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return ya(function(t,r){t.randomFillSync(r)},arguments)},e.wbg.__wbg_require_0d6aeaec3c042c88=function(t,r,n){return t.require(ks(r,n))},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return ya(function(){return module.require},arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(t){return Promise.resolve(t)},e.wbg.__wbg_self_25aabeb5a7b41685=function(){return ya(function(){return self.self},arguments)},e.wbg.__wbg_set_37837023f3d740e8=function(t,r,n){t[r>>>0]=n},e.wbg.__wbg_set_3f1d0b984ed272ed=function(t,r,n){t[r]=n},e.wbg.__wbg_set_65595bdd868b3009=function(t,r,n){t.set(r,n>>>0)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(t,r,n){return t.set(r,n)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return ya(function(t,r,n){return Reflect.set(t,r,n)},arguments)},e.wbg.__wbg_setbody_5923b78a95eedf29=function(t,r){t.body=r},e.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(t,r){t.credentials=dV[r]},e.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(t,r){t.headers=r},e.wbg.__wbg_setmethod_3c5280fe5d890842=function(t,r,n){t.method=ks(r,n)},e.wbg.__wbg_setmode_5dc300b865044b65=function(t,r){t.mode=uV[r]},e.wbg.__wbg_setsignal_75b21ef3a81de905=function(t,r){t.signal=r},e.wbg.__wbg_signal_aaf9ad74119f20a4=function(t){return t.signal},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return Ml(t)?0:xf(t)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return Ml(t)?0:xf(t)},e.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5=function(){return module},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return Ml(t)?0:xf(t)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return Ml(t)?0:xf(t)},e.wbg.__wbg_status_f6360336ca686bf0=function(t){return t.status},e.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return ya(function(t){return JSON.stringify(t)},arguments)},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,r,n){return t.subarray(r>>>0,n>>>0)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(t,r){return t.then(r)},e.wbg.__wbg_then_48b406749878a531=function(t,r,n){return t.then(r,n)},e.wbg.__wbg_url_ae10c34ca209681d=function(t,r){let n=r.url,i=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;ss().setInt32(t+4*1,s,!0),ss().setInt32(t+4*0,i,!0)},e.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},e.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},e.wbg.__wbindgen_bigint_from_i128=function(t,r){return t<<BigInt(64)|BigInt.asUintN(64,r)},e.wbg.__wbindgen_bigint_from_i64=function(t){return t},e.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},e.wbg.__wbindgen_bigint_get_as_i64=function(t,r){let n=r,i=typeof n=="bigint"?n:void 0;ss().setBigInt64(t+8*1,Ml(i)?BigInt(0):i,!0),ss().setInt32(t+4*0,!Ml(i),!0)},e.wbg.__wbindgen_boolean_get=function(t){let r=t;return typeof r=="boolean"?r?1:0:2},e.wbg.__wbindgen_cb_drop=function(t){let r=t.original;return r.cnt--==1?(r.a=0,!0):!1},e.wbg.__wbindgen_closure_wrapper12259=function(t,r,n){return vA(t,r,4175,jA)},e.wbg.__wbindgen_debug_string=function(t,r){let n=Sv(r),i=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;ss().setInt32(t+4*1,s,!0),ss().setInt32(t+4*0,i,!0)},e.wbg.__wbindgen_error_new=function(t,r){return new Error(ks(t,r))},e.wbg.__wbindgen_in=function(t,r){return t in r},e.wbg.__wbindgen_init_externref_table=function(){let t=st.__wbindgen_export_4,r=t.grow(4);t.set(0,void 0),t.set(r+0,void 0),t.set(r+1,null),t.set(r+2,!0),t.set(r+3,!1)},e.wbg.__wbindgen_is_bigint=function(t){return typeof t=="bigint"},e.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},e.wbg.__wbindgen_is_null=function(t){return t===null},e.wbg.__wbindgen_is_object=function(t){let r=t;return typeof r=="object"&&r!==null},e.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},e.wbg.__wbindgen_is_undefined=function(t){return t===void 0},e.wbg.__wbindgen_jsval_eq=function(t,r){return t===r},e.wbg.__wbindgen_jsval_loose_eq=function(t,r){return t==r},e.wbg.__wbindgen_memory=function(){return st.memory},e.wbg.__wbindgen_number_get=function(t,r){let n=r,i=typeof n=="number"?n:void 0;ss().setFloat64(t+8*1,Ml(i)?0:i,!0),ss().setInt32(t+4*0,!Ml(i),!0)},e.wbg.__wbindgen_number_new=function(t){return t},e.wbg.__wbindgen_string_get=function(t,r){let n=r,i=typeof n=="string"?n:void 0;var s=Ml(i)?0:Nn(i,st.__wbindgen_malloc,st.__wbindgen_realloc),a=Jr;ss().setInt32(t+4*1,a,!0),ss().setInt32(t+4*0,s,!0)},e.wbg.__wbindgen_string_new=function(t,r){return ks(t,r)},e.wbg.__wbindgen_throw=function(t,r){throw new Error(ks(t,r))},e}c(FA,"__wbg_get_imports");Or(FA,"__wbg_get_imports");function fV(e,t){}c(fV,"__wbg_init_memory");Or(fV,"__wbg_init_memory");function VA(e,t){return st=e.exports,s3.__wbindgen_wasm_module=t,wf=null,sg=null,st.__wbindgen_start(),st}c(VA,"__wbg_finalize_init");Or(VA,"__wbg_finalize_init");async function s3(e){if(st!==void 0)return st;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("didkit_wasm_bg.wasm",yV.url));let t=FA();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:n}=await MA(await e,t);return VA(r,n)}c(s3,"__wbg_init");Or(s3,"__wbg_init");var hV=s3,gA=!1,kv=!1,pV=Or(async(e="https://cdn.filestackcontent.com/8SbZJYqfRLa5MZAf4yEw")=>{for(;kv;)await new Promise(t=>setTimeout(t,250));if(!gA)try{kv=!0,await hV({module_or_path:e}),kv=!1,gA=!0}catch(t){throw kv=!1,t}},"init"),mV=pV,gV=Or(e=>{let t=[],r=Or(n=>{typeof n!="object"||n===null||(n["@context"]&&(Array.isArray(n["@context"])?t.push(...n["@context"]):t.push(n["@context"])),Object.keys(n).forEach(i=>{r(n[i])}))},"traverse");return r(e),t},"getContextURIs"),Iv=Or(async(e,t,r=!1)=>{let n=gV(t),i=await Promise.all(n.map(async s=>e.context.resolveDocument(s,r)));return n.reduce((s,a,l)=>{let f=i[l];return f&&(s[a]=JSON.stringify(f)),s},{})},"getDocumentMap"),Fl=Or(async(e,t=!1)=>{await mV(e);let r={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",context:{resolveStaticDocument:async(n,i)=>{try{return JSON.parse(await a3(i)??"")||void 0}catch(s){n.debug?.(s);return}}},methods:{generateEd25519KeyFromBytes:(n,i)=>JSON.parse(xA(i)),generateSecp256k1KeyFromBytes:(n,i)=>JSON.parse(CA(i)),keyToDid:(n,i,s)=>TA(i,JSON.stringify(s)),keyToVerificationMethod:async(n,i,s)=>SA(i,JSON.stringify(s)),didToVerificationMethod:async(n,i)=>RA(i),issueCredential:async(n,i,s,a)=>JSON.parse(await PA(JSON.stringify(i),JSON.stringify(s),JSON.stringify(a),JSON.stringify(await Iv(n,i,t)))),verifyCredential:async(n,i,s={})=>JSON.parse(await DA(JSON.stringify(i),JSON.stringify(s),JSON.stringify(await Iv(n,i,t)))),issuePresentation:async(n,i,s,a)=>{let l=s.proofFormat==="jwt",f=await OA(JSON.stringify(i),JSON.stringify(s),JSON.stringify(a),JSON.stringify(await Iv(n,i,t)));return l?f:JSON.parse(f)},verifyPresentation:async(n,i,s={})=>{let a=typeof i=="string";return JSON.parse(await NA(a?i:JSON.stringify(i),JSON.stringify(s),a?"{}":JSON.stringify(await Iv(n,i,t))))},contextLoader:async(n,i)=>{try{return JSON.parse(await a3(i)??"")||void 0}catch(s){n.debug?.(s);return}},resolveDid:async(n,i,s={})=>JSON.parse(await wA(i,JSON.stringify(s))),didResolver:async(n,i,s={})=>JSON.parse(await _A(i,JSON.stringify(s))),createJwe:async(n,i,s)=>JSON.parse(await AA(i,s)),decryptJwe:async(n,i,s)=>EA(JSON.stringify(i),s.map(a=>JSON.stringify(a))),createDagJwe:async(n,i,s)=>JSON.parse(await kA(i,s)),decryptDagJwe:async(n,i,s)=>{let a=Or(l=>{if(l==null)return l;if(typeof l=="bigint")return Number(l);if(Array.isArray(l))return l.map(a);if(typeof l!="object"||!Object.values(l).some(_=>typeof _=="bigint"||typeof _=="object"&&_!==null))return l;let g={};for(let _ in l)g[_]=a(l[_]);return g},"convertBigIntsToNumbers");return a(await IA(JSON.stringify(i),s.map(l=>JSON.stringify(l))))},clearDidWebCache:async()=>{await bA()}}}},"getDidKitPlugin");var vV=Object.defineProperty,bV=c((e,t)=>vV(e,"name",{value:t,configurable:!0}),"__name"),nc=bV(e=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(t,r,n)=>{let i=await e.invoke.verifyCredential(r,n);return r.expirationDate&&new Date>new Date(r.expirationDate)?i.errors.push("expiration error: Credential is expired"):r.validFrom&&new Date<new Date(r.validFrom)?i.errors.push("expiration error: Credential is not valid yet"):r.validUntil&&new Date>new Date(r.validUntil)?i.errors.push("expiration error: Credential is no longer valid"):i.checks.push("expiration"),i}}}),"expirationPlugin");var _V=Object.defineProperty,wV=c((e,t)=>_V(e,"name",{value:t,configurable:!0}),"__name"),UA={basic:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/ns/credentials/v2"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential"],issuer:e,validFrom:r,credentialSubject:{id:t}}),achievement:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",name:r="Teamwork Badge",achievementName:n="Teamwork",description:i="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:s="Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.",issuanceDate:a="2020-08-19T21:41:50Z"}={},l)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"],id:`urn:uuid:${l.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],issuer:{id:e},validFrom:a,name:r,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:`urn:uuid:${l.randomUUID()}`,type:["Achievement"],criteria:{narrative:s},description:i,name:n}}}),jff2:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json","https://w3id.org/security/suites/ed25519-2020/v1"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],name:"JFF x vc-edu PlugFest 2 Interoperability",issuer:{type:["Profile"],id:e,name:"Jobs for the Future (JFF)",image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png",type:"Image"}},issuanceDate:r,credentialSubject:{type:["AchievementSubject"],id:t,achievement:{id:`urn:uuid:${n.randomUUID()}`,type:["Achievement"],name:"JFF x vc-edu PlugFest 2 Interoperability",description:"This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.",criteria:{narrative:"Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers."},image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png",type:"Image"}}}}),boost:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:s,achievementId:a,achievementType:l="Influencer",achievementName:f="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:x="",attachments:N,display:I,familyTitles:H,skills:T,groupID:Z=""}={},K)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.1.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],id:`urn:uuid:${K.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${K.randomUUID()}`,type:["Achievement"],achievementType:l,name:f,description:g,image:x,criteria:{narrative:_}}},display:I,familyTitles:H,image:s,attachments:N,skills:T,groupID:Z}),boostID:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:s,achievementId:a,achievementType:l="Influencer",achievementName:f="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:x="",address:N,attachments:I,skills:H,display:T,familyTitles:Z,boostID:K,groupID:ie=""}={},me)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.1.json","https://ctx.learncard.com/boostIDs/1.0.0.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],id:`urn:uuid:${me.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${me.randomUUID()}`,type:["Achievement"],achievementType:l,name:f,description:g,image:x,criteria:{narrative:_}}},...N?{address:{type:["Address"],...N,...N.geo?{geo:{type:["GeoCoordinates"],...N.geo}}:{}}}:{},display:T,familyTitles:Z,image:s,attachments:I,skills:H,boostID:K,groupID:ie}),delegate:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r=new Date().toISOString(),access:n=["read"]}={},i)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://ctx.learncard.com/delegates/1.0.0.json"],type:["VerifiableCredential","DelegateCredential"],id:`urn:uuid:${i.randomUUID()}`,issuer:{id:e},validFrom:r,credentialSubject:{id:t},permissions:{statementAccess:n}})},ic=wV(()=>({name:"VC Templates",displayName:"VC Templates",description:"Allows for the easy creation of VCs and VPs based on predefined templates",methods:{newCredential:(e,t={type:"basic"})=>{let r=t.did||e.id.did();if(!r)throw new Error("Could not get issuer did!");let n={did:r,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:new Date().toISOString()},{type:i="basic",...s}=t;if(!(i in UA))throw new Error("Invalid Test VC Type!");return UA[i]({...n,...s},e.invoke.crypto())},newPresentation:async(e,t,r={})=>{let n=r?.did||e.id.did();if(!n)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/ns/credentials/v2"],type:["VerifiablePresentation"],holder:n,verifiableCredential:t}}}}),"getVCTemplatesPlugin");var xV=Object.defineProperty,mr=c((e,t)=>xV(e,"name",{value:t,configurable:!0}),"__name"),ZA={ParseError:{message:"Parse error",code:-32700},InvalidRequest:{message:"Invalid Request",code:-32600},MethodNotFound:{message:"Method not found",code:-32601},InvalidParams:{message:"Invalid params",code:-32602},InternalError:{message:"Internal Error",code:-32603},ServerError:{message:"Server error",code:-32e3}};function lg(e,t){if(t===void 0&&(t=window.location.href),typeof URL=="function")return new URL(e,t);if(typeof e!="string")throw new TypeError('"url" must be a string.');e.includes(":")||(t.startsWith("http")&&!e.startsWith("/")?e=t+"/"+e:e=t+e);let r=document.createElement("a");r.href=e;let n=(r.protocol||window.location.protocol)+"//";r.host?r.protocol==="http:"&&r.port==="80"||r.protocol==="https:"&&r.port==="443"?n+=r.hostname:n+=r.host:n+=window.location.host;let i=r.pathname;return i.startsWith("/")||(i="/"+i),{host:r.host||window.location.host,hostname:r.hostname,origin:n,protocol:r.protocol,pathname:i}}c(lg,"parseUrl");mr(lg,"parseUrl");function zA(e,t){for(t=e="";e++<36;t+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return t}c(zA,"uuidv4");mr(zA,"uuidv4");function f3(e){return e&&typeof e=="object"&&e.jsonrpc==="2.0"&&e.id&&typeof e.id=="string"}c(f3,"isValidMessage");mr(f3,"isValidMessage");function WA(e){return f3(e)&&Array.isArray(e.params)}c(WA,"isValidRequest");mr(WA,"isValidRequest");function qA(e){return f3(e)&&!!("result"in e^"error"in e)&&(!("error"in e)||$A(e.error))}c(qA,"isValidResponse");mr(qA,"isValidResponse");function $A(e){return e&&typeof e=="object"&&typeof e.code=="number"&&typeof e.message=="string"}c($A,"isValidError");mr($A,"isValidError");function GA(e){let t={message:e.message};return e.constructor.name!=="Error"&&(t.constructor=e.constructor.name),"name"in e&&(t.name=e.name),"code"in e?t.code=e.code:t.code=ZA.ServerError.code,"details"in e&&(t.details=e.details),t}c(GA,"serializeError");mr(GA,"serializeError");function HA(e){let t;return e.constructor==="DOMException"?t=new DOMException(e.message,e.name):(t=new Error(e.message),"code"in e&&(t.code=e.code)),e.details&&(t.details=e.details),t}c(HA,"deserializeError");mr(HA,"deserializeError");function h3({listener:e,origin:t,handle:r,expectRequest:n}){if(dg(r)){let i=r;r=!1,i.then(s=>r=s)}return i=>{!(i.source===r&&i.origin===t&&(n&&WA(i.data)||!n&&qA(i.data)))||e(i.data,i)}}c(h3,"createMessageListener");mr(h3,"createMessageListener");function KA(e){let[t,...r]=e.split("."),n=r.pop();return t=[t,...r].join("."),{name:t,method:n}}c(KA,"destructureMethodName");mr(KA,"destructureMethodName");function dg(e){try{return typeof e.then=="function"}catch{}return!1}c(dg,"isHandlePromise");mr(dg,"isHandlePromise");var CV=3e4,p3=c(class{constructor(){this.origin=null,this._handle=null,this._listener=null,this._pending=new Map}async connect(e,t){if(this._listener)throw new Error("Already connected.");t=t||{};let r=this;r.origin=lg(e).origin,r._handle=t.handle||window.opener||window.parent;let n=r._pending;return r._listener=h3({origin:r.origin,handle:r._handle,expectRequest:!1,listener:i=>{if(!n.has(i.id))return;let{resolve:s,reject:a,cancelTimeout:l}=n.get(i.id);if(l(),"result"in i)return s(i.result);a(HA(i.error))}}),window.addEventListener("message",r._listener),new JA(r)}async send(e,t,{timeout:r=CV}){if(!this._listener)throw new Error("RPC client not connected.");let n=this,i={jsonrpc:"2.0",id:zA(),method:e,params:t};return dg(n._handle)?(await n._handle).postMessage(i,n.origin):n._handle.postMessage(i,n.origin),new Promise((s,a)=>{let l=n._pending,f;if(r>0){let g=setTimeout(()=>{l.delete(i.id),a(new Error("RPC call timed out."))},r);f=mr(()=>{l.delete(i.id),clearTimeout(g)},"cancelTimeout")}else f=mr(()=>{l.delete(i.id)},"cancelTimeout");l.set(i.id,{resolve:s,reject:a,cancelTimeout:f})})}close(){if(this._listener){window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null;for(let e of this._pending.values())e.reject(new Error("RPC client closed."));this._pending=new Map}}},"Client");mr(p3,"Client");var JA=c(class{constructor(e){this.client=e,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&typeof t=="object"&&Array.isArray(t.functions)))throw new TypeError("`definition.function` must be an array of function names or function definition objects to be defined.");let r=this,n={};return t.functions.forEach(i=>{typeof i=="string"&&(i={name:i,options:{}}),n[i.name]=async function(){return r.client.send(e+"."+i.name,[...arguments],i.options)}}),r._apis[e]=n,n}get(e,t){if(!this._apis[e]){if(t)return this.define(e,t);throw new Error(`API "${e}" has not been defined.`)}return this._apis[e]}},"Injector");mr(JA,"Injector");var QA=c(class{constructor({deserialize:e=mr(r=>r,"deserialize"),waitUntil:t=mr(async()=>{},"waitUntil")}={}){this._listeners=[],this._deserialize=e,this._waitUntil=t}async emit(e){return e=this._deserialize(e),(this._listeners[e.type]||[]).forEach(t=>t(e)),this._waitUntil(e)}addEventListener(e,t){this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t]}removeEventListener(e,t){let r=this._listeners[e];if(!r)return;let n=r.indexOf(t);n!==-1&&r.splice(n,1)}},"EventEmitter");mr(QA,"EventEmitter");var m3=c(class{constructor(){this.origin=null,this._handle=null,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&t!=="object"))throw new TypeError("`api` must be an object.");if(e in this._apis)throw new Error(`The "${e}" API is already defined.`);this._apis[e]=t}async listen(e,t){if(this._listener)throw new Error("Already listening.");t=t||{};let r=this;r.origin=lg(e).origin,r._handle=t.handle||window.opener||window.parent;let n=t.ignoreUnknownApi==="true"||!1;r._listener=h3({origin:r.origin,handle:r._handle,expectRequest:!0,listener:i=>{let{name:s,method:a}=KA(i.method),l=r._apis[s];if(a&&a.startsWith("_"))return l3(r._handle,r.origin,i);if(!l&&n)return;if(!l||typeof l[a]!="function")return l3(r._handle,r.origin,i);let f=l[a];(async()=>{let g={jsonrpc:"2.0",id:i.id};try{g.result=await f.apply(l,i.params)}catch(_){g.error=GA(_)}r._handle&&(dg(r._handle)?r._handle.then(_=>_.postMessage(g,r.origin)):r._handle.postMessage(g,r.origin))})()}}),window.addEventListener("message",r._listener)}close(){this._listener&&(window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null)}},"Server");mr(m3,"Server");function l3(e,t,r){let n={jsonrpc:"2.0",id:r.id,error:Object.assign({},ZA.MethodNotFound)};return dg(e)?e.then(i=>i.postMessage(n,t)):e.postMessage(n,t)}c(l3,"sendMethodNotFound");mr(l3,"sendMethodNotFound");var g3=c(class{constructor(e){this.relyingOrigin=lg(e).origin,this.client=null,this.injector=null,this.client=new p3,this.server=new m3,this._control=null,this._connected=!1}async connect(){return this.injector=await this.client.connect(this.relyingOrigin),this._connected=!0,this._control=this.injector.define("core.control",{functions:["ready","show","hide"]}),this.server.listen(this.relyingOrigin),this.injector}async ready(){if(!this._connected)throw new Error('WebApp not connected. Did you call ".connect()"?');return await this._control.ready(),this}close(){this._connected&&(this.server.close(),this.client.close(),this._connected=!1)}async show(){if(!this._connected)throw new Error('Cannot "show" yet; not connected. Did you call ".connect()"?');return this._control.show()}async hide(){if(!this._connected)throw new Error('Cannot "hide" yet; not connected. Did you call ".connect()?"');return this._control.hide()}},"WebApp");mr(g3,"WebApp");var y3=c(class{constructor(){this._closeEventListeners=new Set}addEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.add(t)}removeEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.delete(t)}show(){}close(){for(let e of this._closeEventListeners)e({})}destroy(){this._closeEventListeners.clear()}},"WebAppWindowDialog");mr(y3,"WebAppWindowDialog");var YA=c(class extends y3{constructor({url:e,handle:t,className:r}){super(),this.url=e,this.handle=t,this.dialog=document.createElement("dialog"),Pv(this.dialog,{position:"fixed",top:0,left:0,width:"100%",height:"100%","max-width":"100%","max-height":"100%",display:"none",margin:0,padding:0,border:"none",background:"transparent",color:"black","box-sizing":"border-box",overflow:"hidden","user-select":"none","z-index":1e6}),this.dialog.className="web-app-window",typeof r=="string"&&(this.dialog.className=this.dialog.className+" "+r);let n=document.createElement("style");n.appendChild(document.createTextNode(`dialog.web-app-window::backdrop {
|
|
2
|
+
${e.stack}`:n}c(Sv,"debugString");Or(Sv,"debugString");function bA(){return st.clearCache()}c(bA,"clearCache");Or(bA,"clearCache");function _A(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;return st.didResolver(r,n,i,s)}c(_A,"didResolver");Or(_A,"didResolver");function wA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;return st.resolveDID(r,n,i,s)}c(wA,"resolveDID");Or(wA,"resolveDID");function Rv(e){let t=st.__wbindgen_export_4.get(e);return st.__externref_table_dealloc(e),t}c(Rv,"takeFromExternrefTable0");Or(Rv,"takeFromExternrefTable0");function o3(e,t){let r=t(e.length*1,1)>>>0;return Cf().set(e,r/1),Jr=e.length,r}c(o3,"passArray8ToWasm0");Or(o3,"passArray8ToWasm0");function xA(e){let t,r;try{let s=o3(e,st.__wbindgen_malloc),a=Jr,l=st.generateEd25519KeyFromBytes(s,a);var n=l[0],i=l[1];if(l[3])throw n=0,i=0,Rv(l[2]);return t=n,r=i,ks(n,i)}finally{st.__wbindgen_free(t,r,1)}}c(xA,"generateEd25519KeyFromBytes");Or(xA,"generateEd25519KeyFromBytes");function CA(e){let t,r;try{let s=o3(e,st.__wbindgen_malloc),a=Jr,l=st.generateSecp256k1KeyFromBytes(s,a);var n=l[0],i=l[1];if(l[3])throw n=0,i=0,Rv(l[2]);return t=n,r=i,ks(n,i)}finally{st.__wbindgen_free(t,r,1)}}c(CA,"generateSecp256k1KeyFromBytes");Or(CA,"generateSecp256k1KeyFromBytes");function cg(e,t){let r=t(e.length*4,4)>>>0;for(let n=0;n<e.length;n++){let i=xf(e[n]);ss().setUint32(r+4*n,i,!0)}return Jr=e.length,r}c(cg,"passArrayJsValueToWasm0");Or(cg,"passArrayJsValueToWasm0");function AA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=cg(t,st.__wbindgen_malloc),s=Jr;return st.createJwe(r,n,i,s)}c(AA,"createJwe");Or(AA,"createJwe");function EA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=cg(t,st.__wbindgen_malloc),s=Jr;return st.decryptJwe(r,n,i,s)}c(EA,"decryptJwe");Or(EA,"decryptJwe");function kA(e,t){let r=cg(t,st.__wbindgen_malloc),n=Jr;return st.createDagJwe(e,r,n)}c(kA,"createDagJwe");Or(kA,"createDagJwe");function IA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=cg(t,st.__wbindgen_malloc),s=Jr;return st.decryptDagJwe(r,n,i,s)}c(IA,"decryptDagJwe");Or(IA,"decryptDagJwe");function TA(e,t){let r,n;try{let a=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Jr,f=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),g=Jr,_=st.keyToDID(a,l,f,g);var i=_[0],s=_[1];if(_[3])throw i=0,s=0,Rv(_[2]);return r=i,n=s,ks(i,s)}finally{st.__wbindgen_free(r,n,1)}}c(TA,"keyToDID");Or(TA,"keyToDID");function SA(e,t){let r=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),n=Jr,i=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;return st.keyToVerificationMethod(r,n,i,s)}c(SA,"keyToVerificationMethod");Or(SA,"keyToVerificationMethod");function RA(e){let t=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),r=Jr;return st.didToVerificationMethod(t,r)}c(RA,"didToVerificationMethod");Or(RA,"didToVerificationMethod");function PA(e,t,r,n){let i=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr,a=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Jr,f=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),g=Jr,_=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),x=Jr;return st.issueCredential(i,s,a,l,f,g,_,x)}c(PA,"issueCredential");Or(PA,"issueCredential");function DA(e,t,r){let n=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),i=Jr,s=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),a=Jr,l=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),f=Jr;return st.verifyCredential(n,i,s,a,l,f)}c(DA,"verifyCredential");Or(DA,"verifyCredential");function OA(e,t,r,n){let i=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr,a=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),l=Jr,f=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),g=Jr,_=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),x=Jr;return st.issuePresentation(i,s,a,l,f,g,_,x)}c(OA,"issuePresentation");Or(OA,"issuePresentation");function NA(e,t,r){let n=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),i=Jr,s=Nn(t,st.__wbindgen_malloc,st.__wbindgen_realloc),a=Jr,l=Nn(r,st.__wbindgen_malloc,st.__wbindgen_realloc),f=Jr;return st.verifyPresentation(n,i,s,a,l,f)}c(NA,"verifyPresentation");Or(NA,"verifyPresentation");function a3(e){let t=Nn(e,st.__wbindgen_malloc,st.__wbindgen_realloc),r=Jr;return st.contextLoader(t,r)}c(a3,"contextLoader");Or(a3,"contextLoader");function jA(e,t,r){st.closure4178_externref_shim(e,t,r)}c(jA,"__wbg_adapter_54");Or(jA,"__wbg_adapter_54");function BA(e,t,r,n){st.closure4580_externref_shim(e,t,r,n)}c(BA,"__wbg_adapter_222");Or(BA,"__wbg_adapter_222");var dV=["omit","same-origin","include"],uV=["same-origin","no-cors","cors","navigate"];async function MA(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(n){if(e.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",n);else throw n}let r=await e.arrayBuffer();return await WebAssembly.instantiate(r,t)}else{let r=await WebAssembly.instantiate(e,t);return r instanceof WebAssembly.Instance?{instance:r,module:e}:r}}c(MA,"__wbg_load");Or(MA,"__wbg_load");function FA(){let e={};return e.wbg={},e.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,r){let n=String(r),i=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;ss().setInt32(t+4*1,s,!0),ss().setInt32(t+4*0,i,!0)},e.wbg.__wbg_abort_775ef1d17fc65868=function(t){t.abort()},e.wbg.__wbg_append_8c7dd8d641a5f01b=function(){return ya(function(t,r,n,i,s){t.append(ks(r,n),ks(i,s))},arguments)},e.wbg.__wbg_arrayBuffer_d1b44c4390db422f=function(){return ya(function(t){return t.arrayBuffer()},arguments)},e.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},e.wbg.__wbg_call_672a4d21634d4a24=function(){return ya(function(t,r){return t.call(r)},arguments)},e.wbg.__wbg_call_7cccdd69e0791ae2=function(){return ya(function(t,r,n){return t.call(r,n)},arguments)},e.wbg.__wbg_crypto_038798f665f985e2=function(t){return t.crypto},e.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},e.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},e.wbg.__wbg_entries_3265d4158b33e5dc=function(t){return Object.entries(t)},e.wbg.__wbg_fetch_509096533071c657=function(t,r){return t.fetch(r)},e.wbg.__wbg_fetch_f1856afdb49415d1=function(t){return fetch(t)},e.wbg.__wbg_from_2a5d3e218e67aa85=function(t){return Array.from(t)},e.wbg.__wbg_getRandomValues_371e7ade8bd92088=function(t,r){t.getRandomValues(r)},e.wbg.__wbg_getRandomValues_3c9c0d586e575a16=function(){return ya(function(t,r){globalThis.crypto.getRandomValues(i3(t,r))},arguments)},e.wbg.__wbg_getRandomValues_7dfe5bd1b67c9ca1=function(t){return t.getRandomValues},e.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return ya(function(t,r){t.getRandomValues(r)},arguments)},e.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},e.wbg.__wbg_get_67b2ba62fc30de12=function(){return ya(function(t,r){return Reflect.get(t,r)},arguments)},e.wbg.__wbg_get_b9b93047fe3cf45b=function(t,r){return t[r>>>0]},e.wbg.__wbg_has_a5ea9117f258a0ec=function(){return ya(function(t,r){return Reflect.has(t,r)},arguments)},e.wbg.__wbg_headers_9cb51cfd2ac780a4=function(t){return t.headers},e.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let r;try{r=t instanceof ArrayBuffer}catch{r=!1}return r},e.wbg.__wbg_instanceof_Map_f3469ce2244d2430=function(t){let r;try{r=t instanceof Map}catch{r=!1}return r},e.wbg.__wbg_instanceof_Response_f2cc20d9f7dfd644=function(t){let r;try{r=t instanceof Response}catch{r=!1}return r},e.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let r;try{r=t instanceof Uint8Array}catch{r=!1}return r},e.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},e.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},e.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},e.wbg.__wbg_keys_5c77a08ddc2fb8a6=function(t){return Object.keys(t)},e.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},e.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},e.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},e.wbg.__wbg_msCrypto_ff35fce085fab2a3=function(t){return t.msCrypto},e.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},e.wbg.__wbg_new_018dcc2d6c8c2f6a=function(){return ya(function(){return new Headers},arguments)},e.wbg.__wbg_new_23a2665fac83c611=function(t,r){try{var n={a:t,b:r},i=Or((a,l)=>{let f=n.a;n.a=0;try{return BA(f,n.b,a,l)}finally{n.a=f}},"cb0");return new Promise(i)}finally{n.a=n.b=0}},e.wbg.__wbg_new_405e22f390576ce2=function(){return new Object},e.wbg.__wbg_new_5e0be73521bc8c17=function(){return new Map},e.wbg.__wbg_new_78feb108b6472713=function(){return new Array},e.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},e.wbg.__wbg_new_e25e5aab09ff45db=function(){return ya(function(){return new AbortController},arguments)},e.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,r){return new Function(ks(t,r))},e.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,r,n){return new Uint8Array(t,r>>>0,n>>>0)},e.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},e.wbg.__wbg_newwithstrandinit_06c535e0a867c635=function(){return ya(function(t,r,n){return new Request(ks(t,r),n)},arguments)},e.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},e.wbg.__wbg_next_6574e1a8a62d1055=function(){return ya(function(t){return t.next()},arguments)},e.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},e.wbg.__wbg_now_d18023d54d4e5500=function(t){return t.now()},e.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},e.wbg.__wbg_push_737cfc8c1432c2c6=function(t,r){return t.push(r)},e.wbg.__wbg_queueMicrotask_97d92b4fcc8a61c5=function(t){queueMicrotask(t)},e.wbg.__wbg_queueMicrotask_d3219def82552485=function(t){return t.queueMicrotask},e.wbg.__wbg_randomFillSync_994ac6d9ade7a695=function(t,r,n){t.randomFillSync(i3(r,n))},e.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return ya(function(t,r){t.randomFillSync(r)},arguments)},e.wbg.__wbg_require_0d6aeaec3c042c88=function(t,r,n){return t.require(ks(r,n))},e.wbg.__wbg_require_60cc747a6bc5215a=function(){return ya(function(){return module.require},arguments)},e.wbg.__wbg_resolve_4851785c9c5f573d=function(t){return Promise.resolve(t)},e.wbg.__wbg_self_25aabeb5a7b41685=function(){return ya(function(){return self.self},arguments)},e.wbg.__wbg_set_37837023f3d740e8=function(t,r,n){t[r>>>0]=n},e.wbg.__wbg_set_3f1d0b984ed272ed=function(t,r,n){t[r]=n},e.wbg.__wbg_set_65595bdd868b3009=function(t,r,n){t.set(r,n>>>0)},e.wbg.__wbg_set_8fc6bf8a5b1071d1=function(t,r,n){return t.set(r,n)},e.wbg.__wbg_set_bb8cecf6a62b9f46=function(){return ya(function(t,r,n){return Reflect.set(t,r,n)},arguments)},e.wbg.__wbg_setbody_5923b78a95eedf29=function(t,r){t.body=r},e.wbg.__wbg_setcredentials_c3a22f1cd105a2c6=function(t,r){t.credentials=dV[r]},e.wbg.__wbg_setheaders_834c0bdb6a8949ad=function(t,r){t.headers=r},e.wbg.__wbg_setmethod_3c5280fe5d890842=function(t,r,n){t.method=ks(r,n)},e.wbg.__wbg_setmode_5dc300b865044b65=function(t,r){t.mode=uV[r]},e.wbg.__wbg_setsignal_75b21ef3a81de905=function(t,r){t.signal=r},e.wbg.__wbg_signal_aaf9ad74119f20a4=function(t){return t.signal},e.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){let t=typeof global>"u"?null:global;return Ml(t)?0:xf(t)},e.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){let t=typeof globalThis>"u"?null:globalThis;return Ml(t)?0:xf(t)},e.wbg.__wbg_static_accessor_MODULE_ef3aa2eb251158a5=function(){return module},e.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){let t=typeof self>"u"?null:self;return Ml(t)?0:xf(t)},e.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){let t=typeof window>"u"?null:window;return Ml(t)?0:xf(t)},e.wbg.__wbg_status_f6360336ca686bf0=function(t){return t.status},e.wbg.__wbg_stringify_f7ed6987935b4a24=function(){return ya(function(t){return JSON.stringify(t)},arguments)},e.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,r,n){return t.subarray(r>>>0,n>>>0)},e.wbg.__wbg_then_44b73946d2fb3e7d=function(t,r){return t.then(r)},e.wbg.__wbg_then_48b406749878a531=function(t,r,n){return t.then(r,n)},e.wbg.__wbg_url_ae10c34ca209681d=function(t,r){let n=r.url,i=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;ss().setInt32(t+4*1,s,!0),ss().setInt32(t+4*0,i,!0)},e.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},e.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},e.wbg.__wbindgen_bigint_from_i128=function(t,r){return t<<BigInt(64)|BigInt.asUintN(64,r)},e.wbg.__wbindgen_bigint_from_i64=function(t){return t},e.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},e.wbg.__wbindgen_bigint_get_as_i64=function(t,r){let n=r,i=typeof n=="bigint"?n:void 0;ss().setBigInt64(t+8*1,Ml(i)?BigInt(0):i,!0),ss().setInt32(t+4*0,!Ml(i),!0)},e.wbg.__wbindgen_boolean_get=function(t){let r=t;return typeof r=="boolean"?r?1:0:2},e.wbg.__wbindgen_cb_drop=function(t){let r=t.original;return r.cnt--==1?(r.a=0,!0):!1},e.wbg.__wbindgen_closure_wrapper12234=function(t,r,n){return vA(t,r,4179,jA)},e.wbg.__wbindgen_debug_string=function(t,r){let n=Sv(r),i=Nn(n,st.__wbindgen_malloc,st.__wbindgen_realloc),s=Jr;ss().setInt32(t+4*1,s,!0),ss().setInt32(t+4*0,i,!0)},e.wbg.__wbindgen_error_new=function(t,r){return new Error(ks(t,r))},e.wbg.__wbindgen_in=function(t,r){return t in r},e.wbg.__wbindgen_init_externref_table=function(){let t=st.__wbindgen_export_4,r=t.grow(4);t.set(0,void 0),t.set(r+0,void 0),t.set(r+1,null),t.set(r+2,!0),t.set(r+3,!1)},e.wbg.__wbindgen_is_bigint=function(t){return typeof t=="bigint"},e.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},e.wbg.__wbindgen_is_null=function(t){return t===null},e.wbg.__wbindgen_is_object=function(t){let r=t;return typeof r=="object"&&r!==null},e.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},e.wbg.__wbindgen_is_undefined=function(t){return t===void 0},e.wbg.__wbindgen_jsval_eq=function(t,r){return t===r},e.wbg.__wbindgen_jsval_loose_eq=function(t,r){return t==r},e.wbg.__wbindgen_memory=function(){return st.memory},e.wbg.__wbindgen_number_get=function(t,r){let n=r,i=typeof n=="number"?n:void 0;ss().setFloat64(t+8*1,Ml(i)?0:i,!0),ss().setInt32(t+4*0,!Ml(i),!0)},e.wbg.__wbindgen_number_new=function(t){return t},e.wbg.__wbindgen_string_get=function(t,r){let n=r,i=typeof n=="string"?n:void 0;var s=Ml(i)?0:Nn(i,st.__wbindgen_malloc,st.__wbindgen_realloc),a=Jr;ss().setInt32(t+4*1,a,!0),ss().setInt32(t+4*0,s,!0)},e.wbg.__wbindgen_string_new=function(t,r){return ks(t,r)},e.wbg.__wbindgen_throw=function(t,r){throw new Error(ks(t,r))},e}c(FA,"__wbg_get_imports");Or(FA,"__wbg_get_imports");function fV(e,t){}c(fV,"__wbg_init_memory");Or(fV,"__wbg_init_memory");function VA(e,t){return st=e.exports,s3.__wbindgen_wasm_module=t,wf=null,sg=null,st.__wbindgen_start(),st}c(VA,"__wbg_finalize_init");Or(VA,"__wbg_finalize_init");async function s3(e){if(st!==void 0)return st;typeof e<"u"&&(Object.getPrototypeOf(e)===Object.prototype?{module_or_path:e}=e:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof e>"u"&&(e=new URL("didkit_wasm_bg.wasm",yV.url));let t=FA();(typeof e=="string"||typeof Request=="function"&&e instanceof Request||typeof URL=="function"&&e instanceof URL)&&(e=fetch(e));let{instance:r,module:n}=await MA(await e,t);return VA(r,n)}c(s3,"__wbg_init");Or(s3,"__wbg_init");var hV=s3,gA=!1,kv=!1,pV=Or(async(e="https://cdn.filestackcontent.com/us30bfBYRT67YBqribZu")=>{for(;kv;)await new Promise(t=>setTimeout(t,250));if(!gA)try{kv=!0,await hV({module_or_path:e}),kv=!1,gA=!0}catch(t){throw kv=!1,t}},"init"),mV=pV,gV=Or(e=>{let t=[],r=Or(n=>{typeof n!="object"||n===null||(n["@context"]&&(Array.isArray(n["@context"])?t.push(...n["@context"]):t.push(n["@context"])),Object.keys(n).forEach(i=>{r(n[i])}))},"traverse");return r(e),t},"getContextURIs"),Iv=Or(async(e,t,r=!1)=>{let n=gV(t),i=await Promise.all(n.map(async s=>e.context.resolveDocument(s,r)));return n.reduce((s,a,l)=>{let f=i[l];return f&&(s[a]=JSON.stringify(f)),s},{})},"getDocumentMap"),Fl=Or(async(e,t=!1)=>{await mV(e);let r={};return{name:"DIDKit",displayName:"DIDKit",description:"Provides an interface to DIDKit, which allows for the generation of key material, as well as signing and verifying credentials and presentations",context:{resolveStaticDocument:async(n,i)=>{try{return JSON.parse(await a3(i)??"")||void 0}catch(s){n.debug?.(s);return}}},methods:{generateEd25519KeyFromBytes:(n,i)=>JSON.parse(xA(i)),generateSecp256k1KeyFromBytes:(n,i)=>JSON.parse(CA(i)),keyToDid:(n,i,s)=>TA(i,JSON.stringify(s)),keyToVerificationMethod:async(n,i,s)=>SA(i,JSON.stringify(s)),didToVerificationMethod:async(n,i)=>RA(i),issueCredential:async(n,i,s,a)=>JSON.parse(await PA(JSON.stringify(i),JSON.stringify(s),JSON.stringify(a),JSON.stringify(await Iv(n,i,t)))),verifyCredential:async(n,i,s={})=>JSON.parse(await DA(JSON.stringify(i),JSON.stringify(s),JSON.stringify(await Iv(n,i,t)))),issuePresentation:async(n,i,s,a)=>{let l=s.proofFormat==="jwt",f=await OA(JSON.stringify(i),JSON.stringify(s),JSON.stringify(a),JSON.stringify(await Iv(n,i,t)));return l?f:JSON.parse(f)},verifyPresentation:async(n,i,s={})=>{let a=typeof i=="string";return JSON.parse(await NA(a?i:JSON.stringify(i),JSON.stringify(s),a?"{}":JSON.stringify(await Iv(n,i,t))))},contextLoader:async(n,i)=>{try{return JSON.parse(await a3(i)??"")||void 0}catch(s){n.debug?.(s);return}},resolveDid:async(n,i,s={})=>JSON.parse(await wA(i,JSON.stringify(s))),didResolver:async(n,i,s={})=>JSON.parse(await _A(i,JSON.stringify(s))),createJwe:async(n,i,s)=>JSON.parse(await AA(i,s)),decryptJwe:async(n,i,s)=>EA(JSON.stringify(i),s.map(a=>JSON.stringify(a))),createDagJwe:async(n,i,s)=>JSON.parse(await kA(i,s)),decryptDagJwe:async(n,i,s)=>{let a=Or(l=>{if(l==null)return l;if(typeof l=="bigint")return Number(l);if(Array.isArray(l))return l.map(a);if(typeof l!="object"||!Object.values(l).some(_=>typeof _=="bigint"||typeof _=="object"&&_!==null))return l;let g={};for(let _ in l)g[_]=a(l[_]);return g},"convertBigIntsToNumbers");return a(await IA(JSON.stringify(i),s.map(l=>JSON.stringify(l))))},clearDidWebCache:async()=>{await bA()}}}},"getDidKitPlugin");var vV=Object.defineProperty,bV=c((e,t)=>vV(e,"name",{value:t,configurable:!0}),"__name"),nc=bV(e=>({name:"Expiration",displayName:"Expiration Extension",description:"Adds a check to make sure credentials aren't expired when verifying them",methods:{verifyCredential:async(t,r,n)=>{let i=await e.invoke.verifyCredential(r,n);return r.expirationDate&&new Date>new Date(r.expirationDate)?i.errors.push("expiration error: Credential is expired"):r.validFrom&&new Date<new Date(r.validFrom)?i.errors.push("expiration error: Credential is not valid yet"):r.validUntil&&new Date>new Date(r.validUntil)?i.errors.push("expiration error: Credential is no longer valid"):i.checks.push("expiration"),i}}}),"expirationPlugin");var _V=Object.defineProperty,wV=c((e,t)=>_V(e,"name",{value:t,configurable:!0}),"__name"),UA={basic:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/ns/credentials/v2"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential"],issuer:e,validFrom:r,credentialSubject:{id:t}}),achievement:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",name:r="Teamwork Badge",achievementName:n="Teamwork",description:i="This badge recognizes the development of the capacity to collaborate within a group environment.",criteriaNarrative:s="Team members are nominated for this badge by their peers and recognized upon review by Example Corp management.",issuanceDate:a="2020-08-19T21:41:50Z"}={},l)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json"],id:`urn:uuid:${l.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],issuer:{id:e},validFrom:a,name:r,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:`urn:uuid:${l.randomUUID()}`,type:["Achievement"],criteria:{narrative:s},description:i,name:n}}}),jff2:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z"}={},n)=>({"@context":["https://www.w3.org/2018/credentials/v1","https://purl.imsglobal.org/spec/ob/v3p0/context.json","https://w3id.org/security/suites/ed25519-2020/v1"],id:`urn:uuid:${n.randomUUID()}`,type:["VerifiableCredential","OpenBadgeCredential"],name:"JFF x vc-edu PlugFest 2 Interoperability",issuer:{type:["Profile"],id:e,name:"Jobs for the Future (JFF)",image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-1-2022/images/JFF_LogoLockup.png",type:"Image"}},issuanceDate:r,credentialSubject:{type:["AchievementSubject"],id:t,achievement:{id:`urn:uuid:${n.randomUUID()}`,type:["Achievement"],name:"JFF x vc-edu PlugFest 2 Interoperability",description:"This credential solution supports the use of OBv3 and w3c Verifiable Credentials and is interoperable with at least two other solutions. This was demonstrated successfully during JFF x vc-edu PlugFest 2.",criteria:{narrative:"Solutions providers earned this badge by demonstrating interoperability between multiple providers based on the OBv3 candidate final standard, with some additional required fields. Credential issuers earning this badge successfully issued a credential into at least two wallets. Wallet implementers earning this badge successfully displayed credentials issued by at least two different credential issuers."},image:{id:"https://w3c-ccg.github.io/vc-ed/plugfest-2-2022/images/JFF-VC-EDU-PLUGFEST2-badge-image.png",type:"Image"}}}}),boost:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:s,achievementId:a,achievementType:l="Influencer",achievementName:f="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:x="",attachments:N,display:I,familyTitles:H,skills:T,groupID:Z=""}={},K)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.1.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential"],id:`urn:uuid:${K.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${K.randomUUID()}`,type:["Achievement"],achievementType:l,name:f,description:g,image:x,criteria:{narrative:_}}},display:I,familyTitles:H,image:s,attachments:N,skills:T,groupID:Z}),boostID:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r="2020-08-19T21:41:50Z",expirationDate:n,boostName:i="Example Boost",boostImage:s,achievementId:a,achievementType:l="Influencer",achievementName:f="Awesome Badge",achievementDescription:g="Awesome People Earn Awesome Badge",achievementNarrative:_="Earned by being awesome.",achievementImage:x="",address:N,attachments:I,skills:H,display:T,familyTitles:Z,boostID:K,groupID:ie=""}={},me)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://purl.imsglobal.org/spec/ob/v3p0/context-3.0.3.json","https://ctx.learncard.com/boosts/1.0.1.json","https://ctx.learncard.com/boostIDs/1.0.0.json"],type:["VerifiableCredential","OpenBadgeCredential","BoostCredential","BoostID"],id:`urn:uuid:${me.randomUUID()}`,issuer:{id:e},validFrom:r,...n&&{validUntil:n},name:i,credentialSubject:{id:t,type:["AchievementSubject"],achievement:{id:a??`urn:uuid:${me.randomUUID()}`,type:["Achievement"],achievementType:l,name:f,description:g,image:x,criteria:{narrative:_}}},...N?{address:{type:["Address"],...N,...N.geo?{geo:{type:["GeoCoordinates"],...N.geo}}:{}}}:{},display:T,familyTitles:Z,image:s,attachments:I,skills:H,boostID:K,groupID:ie}),delegate:({did:e="did:example:d23dd687a7dc6787646f2eb98d0",subject:t="did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:r=new Date().toISOString(),access:n=["read"]}={},i)=>({"@context":["https://www.w3.org/ns/credentials/v2","https://ctx.learncard.com/delegates/1.0.0.json"],type:["VerifiableCredential","DelegateCredential"],id:`urn:uuid:${i.randomUUID()}`,issuer:{id:e},validFrom:r,credentialSubject:{id:t},permissions:{statementAccess:n}})},ic=wV(()=>({name:"VC Templates",displayName:"VC Templates",description:"Allows for the easy creation of VCs and VPs based on predefined templates",methods:{newCredential:(e,t={type:"basic"})=>{let r=t.did||e.id.did();if(!r)throw new Error("Could not get issuer did!");let n={did:r,subject:"did:example:d23dd687a7dc6787646f2eb98d0",issuanceDate:new Date().toISOString()},{type:i="basic",...s}=t;if(!(i in UA))throw new Error("Invalid Test VC Type!");return UA[i]({...n,...s},e.invoke.crypto())},newPresentation:async(e,t,r={})=>{let n=r?.did||e.id.did();if(!n)throw new Error("Could not get issuer did!");return{"@context":["https://www.w3.org/ns/credentials/v2"],type:["VerifiablePresentation"],holder:n,verifiableCredential:t}}}}),"getVCTemplatesPlugin");var xV=Object.defineProperty,mr=c((e,t)=>xV(e,"name",{value:t,configurable:!0}),"__name"),ZA={ParseError:{message:"Parse error",code:-32700},InvalidRequest:{message:"Invalid Request",code:-32600},MethodNotFound:{message:"Method not found",code:-32601},InvalidParams:{message:"Invalid params",code:-32602},InternalError:{message:"Internal Error",code:-32603},ServerError:{message:"Server error",code:-32e3}};function lg(e,t){if(t===void 0&&(t=window.location.href),typeof URL=="function")return new URL(e,t);if(typeof e!="string")throw new TypeError('"url" must be a string.');e.includes(":")||(t.startsWith("http")&&!e.startsWith("/")?e=t+"/"+e:e=t+e);let r=document.createElement("a");r.href=e;let n=(r.protocol||window.location.protocol)+"//";r.host?r.protocol==="http:"&&r.port==="80"||r.protocol==="https:"&&r.port==="443"?n+=r.hostname:n+=r.host:n+=window.location.host;let i=r.pathname;return i.startsWith("/")||(i="/"+i),{host:r.host||window.location.host,hostname:r.hostname,origin:n,protocol:r.protocol,pathname:i}}c(lg,"parseUrl");mr(lg,"parseUrl");function zA(e,t){for(t=e="";e++<36;t+=e*51&52?(e^15?8^Math.random()*(e^20?16:4):4).toString(16):"-");return t}c(zA,"uuidv4");mr(zA,"uuidv4");function f3(e){return e&&typeof e=="object"&&e.jsonrpc==="2.0"&&e.id&&typeof e.id=="string"}c(f3,"isValidMessage");mr(f3,"isValidMessage");function WA(e){return f3(e)&&Array.isArray(e.params)}c(WA,"isValidRequest");mr(WA,"isValidRequest");function qA(e){return f3(e)&&!!("result"in e^"error"in e)&&(!("error"in e)||$A(e.error))}c(qA,"isValidResponse");mr(qA,"isValidResponse");function $A(e){return e&&typeof e=="object"&&typeof e.code=="number"&&typeof e.message=="string"}c($A,"isValidError");mr($A,"isValidError");function GA(e){let t={message:e.message};return e.constructor.name!=="Error"&&(t.constructor=e.constructor.name),"name"in e&&(t.name=e.name),"code"in e?t.code=e.code:t.code=ZA.ServerError.code,"details"in e&&(t.details=e.details),t}c(GA,"serializeError");mr(GA,"serializeError");function HA(e){let t;return e.constructor==="DOMException"?t=new DOMException(e.message,e.name):(t=new Error(e.message),"code"in e&&(t.code=e.code)),e.details&&(t.details=e.details),t}c(HA,"deserializeError");mr(HA,"deserializeError");function h3({listener:e,origin:t,handle:r,expectRequest:n}){if(dg(r)){let i=r;r=!1,i.then(s=>r=s)}return i=>{!(i.source===r&&i.origin===t&&(n&&WA(i.data)||!n&&qA(i.data)))||e(i.data,i)}}c(h3,"createMessageListener");mr(h3,"createMessageListener");function KA(e){let[t,...r]=e.split("."),n=r.pop();return t=[t,...r].join("."),{name:t,method:n}}c(KA,"destructureMethodName");mr(KA,"destructureMethodName");function dg(e){try{return typeof e.then=="function"}catch{}return!1}c(dg,"isHandlePromise");mr(dg,"isHandlePromise");var CV=3e4,p3=c(class{constructor(){this.origin=null,this._handle=null,this._listener=null,this._pending=new Map}async connect(e,t){if(this._listener)throw new Error("Already connected.");t=t||{};let r=this;r.origin=lg(e).origin,r._handle=t.handle||window.opener||window.parent;let n=r._pending;return r._listener=h3({origin:r.origin,handle:r._handle,expectRequest:!1,listener:i=>{if(!n.has(i.id))return;let{resolve:s,reject:a,cancelTimeout:l}=n.get(i.id);if(l(),"result"in i)return s(i.result);a(HA(i.error))}}),window.addEventListener("message",r._listener),new JA(r)}async send(e,t,{timeout:r=CV}){if(!this._listener)throw new Error("RPC client not connected.");let n=this,i={jsonrpc:"2.0",id:zA(),method:e,params:t};return dg(n._handle)?(await n._handle).postMessage(i,n.origin):n._handle.postMessage(i,n.origin),new Promise((s,a)=>{let l=n._pending,f;if(r>0){let g=setTimeout(()=>{l.delete(i.id),a(new Error("RPC call timed out."))},r);f=mr(()=>{l.delete(i.id),clearTimeout(g)},"cancelTimeout")}else f=mr(()=>{l.delete(i.id)},"cancelTimeout");l.set(i.id,{resolve:s,reject:a,cancelTimeout:f})})}close(){if(this._listener){window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null;for(let e of this._pending.values())e.reject(new Error("RPC client closed."));this._pending=new Map}}},"Client");mr(p3,"Client");var JA=c(class{constructor(e){this.client=e,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&typeof t=="object"&&Array.isArray(t.functions)))throw new TypeError("`definition.function` must be an array of function names or function definition objects to be defined.");let r=this,n={};return t.functions.forEach(i=>{typeof i=="string"&&(i={name:i,options:{}}),n[i.name]=async function(){return r.client.send(e+"."+i.name,[...arguments],i.options)}}),r._apis[e]=n,n}get(e,t){if(!this._apis[e]){if(t)return this.define(e,t);throw new Error(`API "${e}" has not been defined.`)}return this._apis[e]}},"Injector");mr(JA,"Injector");var QA=c(class{constructor({deserialize:e=mr(r=>r,"deserialize"),waitUntil:t=mr(async()=>{},"waitUntil")}={}){this._listeners=[],this._deserialize=e,this._waitUntil=t}async emit(e){return e=this._deserialize(e),(this._listeners[e.type]||[]).forEach(t=>t(e)),this._waitUntil(e)}addEventListener(e,t){this._listeners[e]?this._listeners[e].push(t):this._listeners[e]=[t]}removeEventListener(e,t){let r=this._listeners[e];if(!r)return;let n=r.indexOf(t);n!==-1&&r.splice(n,1)}},"EventEmitter");mr(QA,"EventEmitter");var m3=c(class{constructor(){this.origin=null,this._handle=null,this._apis=new Map}define(e,t){if(!(e&&typeof e=="string"))throw new TypeError("`name` must be a non-empty string.");if(!(t&&t!=="object"))throw new TypeError("`api` must be an object.");if(e in this._apis)throw new Error(`The "${e}" API is already defined.`);this._apis[e]=t}async listen(e,t){if(this._listener)throw new Error("Already listening.");t=t||{};let r=this;r.origin=lg(e).origin,r._handle=t.handle||window.opener||window.parent;let n=t.ignoreUnknownApi==="true"||!1;r._listener=h3({origin:r.origin,handle:r._handle,expectRequest:!0,listener:i=>{let{name:s,method:a}=KA(i.method),l=r._apis[s];if(a&&a.startsWith("_"))return l3(r._handle,r.origin,i);if(!l&&n)return;if(!l||typeof l[a]!="function")return l3(r._handle,r.origin,i);let f=l[a];(async()=>{let g={jsonrpc:"2.0",id:i.id};try{g.result=await f.apply(l,i.params)}catch(_){g.error=GA(_)}r._handle&&(dg(r._handle)?r._handle.then(_=>_.postMessage(g,r.origin)):r._handle.postMessage(g,r.origin))})()}}),window.addEventListener("message",r._listener)}close(){this._listener&&(window.removeEventListener("message",this._listener),this._handle=this.origin=this._listener=null)}},"Server");mr(m3,"Server");function l3(e,t,r){let n={jsonrpc:"2.0",id:r.id,error:Object.assign({},ZA.MethodNotFound)};return dg(e)?e.then(i=>i.postMessage(n,t)):e.postMessage(n,t)}c(l3,"sendMethodNotFound");mr(l3,"sendMethodNotFound");var g3=c(class{constructor(e){this.relyingOrigin=lg(e).origin,this.client=null,this.injector=null,this.client=new p3,this.server=new m3,this._control=null,this._connected=!1}async connect(){return this.injector=await this.client.connect(this.relyingOrigin),this._connected=!0,this._control=this.injector.define("core.control",{functions:["ready","show","hide"]}),this.server.listen(this.relyingOrigin),this.injector}async ready(){if(!this._connected)throw new Error('WebApp not connected. Did you call ".connect()"?');return await this._control.ready(),this}close(){this._connected&&(this.server.close(),this.client.close(),this._connected=!1)}async show(){if(!this._connected)throw new Error('Cannot "show" yet; not connected. Did you call ".connect()"?');return this._control.show()}async hide(){if(!this._connected)throw new Error('Cannot "hide" yet; not connected. Did you call ".connect()?"');return this._control.hide()}},"WebApp");mr(g3,"WebApp");var y3=c(class{constructor(){this._closeEventListeners=new Set}addEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.add(t)}removeEventListener(e,t){if(e!=="close")throw new Error(`Unknown event "${e}".`);if(typeof t!="function")throw new TypeError('"listener" must be a function.');this._closeEventListeners.delete(t)}show(){}close(){for(let e of this._closeEventListeners)e({})}destroy(){this._closeEventListeners.clear()}},"WebAppWindowDialog");mr(y3,"WebAppWindowDialog");var YA=c(class extends y3{constructor({url:e,handle:t,className:r}){super(),this.url=e,this.handle=t,this.dialog=document.createElement("dialog"),Pv(this.dialog,{position:"fixed",top:0,left:0,width:"100%",height:"100%","max-width":"100%","max-height":"100%",display:"none",margin:0,padding:0,border:"none",background:"transparent",color:"black","box-sizing":"border-box",overflow:"hidden","user-select":"none","z-index":1e6}),this.dialog.className="web-app-window",typeof r=="string"&&(this.dialog.className=this.dialog.className+" "+r);let n=document.createElement("style");n.appendChild(document.createTextNode(`dialog.web-app-window::backdrop {
|
|
3
3
|
background-color: transparent;
|
|
4
4
|
}`)),this.container=document.createElement("div"),Pv(this.container,{position:"relative",width:"100%",height:"100%",margin:0,padding:0,display:"flex","flex-direction":"column"}),this.container.className="web-app-window-backdrop",this.iframe=document.createElement("iframe"),this.iframe.src=e,this.iframe.scrolling="auto",Pv(this.iframe,{position:"fixed",top:0,left:0,width:"100%",height:"100%",border:"none",background:"transparent",overflow:"hidden",margin:0,padding:0,"flex-grow":1,"user-select":"none"}),this.dialog.appendChild(n),this.container.appendChild(this.iframe),this.dialog.appendChild(this.container),this.dialog.addEventListener("cancel",i=>{i.preventDefault(),this.hide()}),document.body.appendChild(this.dialog),this.handle=this.iframe.contentWindow}show(){this.dialog.style.display="block",this.dialog.showModal&&this.dialog.showModal();try{this.dialog.style.pointerEvents="none"}catch{}setTimeout(()=>{try{this.dialog.style.pointerEvents=""}catch{}},32)}close(){if(this.dialog.style.display="none",this.dialog.close)try{this.dialog.close()}catch(e){console.error(e)}super.close()}destroy(){this.dialog.parentNode.removeChild(this.dialog),super.destroy()}},"WebAppWindowInlineDialog");mr(YA,"WebAppWindowInlineDialog");function Pv(e,t){for(let r in t)e.style[r]=t[r]}c(Pv,"applyStyle");mr(Pv,"applyStyle");var XA=c(class extends y3{constructor({url:e,handle:t,bounds:r={width:500,height:400}}){super(),this.url=e,this.handle=t,this._locationChanging=!1,t||this._openWindow({url:e,name:"web-app-window",bounds:r}),this.destroyed=!1,this._removeListeners=()=>{}}show(){}close(){this.destroy()}destroy(){this.handle&&!this.destroyed&&(this.handle.close(),super.close(),this.handle=null,this.destroyed=!0,this._removeListeners(),super.destroy())}isClosed(){return!this.handle||this.handle.closed}_openWindow({url:e,name:t,bounds:r}){let{x:n,y:i}=r,{width:s=500,height:a=400}=r;s=Math.min(s,window.innerWidth),a=Math.min(a,window.innerHeight);let l=Math.floor(n!==void 0?n:window.screenX+(window.innerWidth-s)/2),f=Math.floor(i!==void 0?i:window.screenY+(window.innerHeight-a)/2),g=`popup=yes,menubar=no,location=no,resizable=no,scrollbars=no,status=no,width=${s},height=${a},left=${l},top=${f}`;this._locationChanging=!0,this.handle=window.open(e,t,g),this._addListeners()}setLocation(e){this.url=e,this._locationChanging=!0,this.handle.location.replace(e)}_addListeners(){let e=mr(()=>this.destroy(),"destroyDialog"),t=mr(()=>{this._locationChanging=!1},"loadDialog"),r=mr(()=>{this._locationChanging||this.destroy()},"unloadDialog");this.handle.addEventListener("unload",r),this.handle.addEventListener("load",t),window.addEventListener("beforeUnload",e,{once:!0});let n=setInterval(()=>{this.isClosed()&&(this.destroy(),clearInterval(n))},250);this._removeListeners=()=>{clearInterval(n),this.handle.removeListener("unload",r),this.handle.removeListener("load",t),window.removeEventListener("beforeUnload",e)}}},"WebAppWindowPopupDialog");mr(XA,"WebAppWindowPopupDialog");var AV=6e4,Ov=c(class{constructor(e,{timeout:t=AV,dialog:r=null,handle:n,popup:i=!1,className:s=null,customize:a=null,bounds:l}={}){if(this.visible=!1,this.dialog=r,this.handle=null,this.popup=i,this.windowControl=null,this._destroyed=!1,this._ready=!1,this._private={},this._timeoutId=null,n&&n._dialog&&(this.dialog=r=n._dialog),this._private._readyPromise=new Promise((f,g)=>{this._timeoutId=setTimeout(()=>g(new DOMException("Loading Web application window timed out.","TimeoutError")),t),this._private._resolveReady=_=>{clearTimeout(this.timeoutId),this._timeoutId=null,f(_)},this._private._rejectReady=_=>{clearTimeout(this.timeoutId),this._timeoutId=null,g(_)}}),this._private.isReady=async()=>this._private._readyPromise,this._private.destroy=()=>{this._timeoutId&&this._private._rejectReady(new DOMException("Web application window closed before ready.","AbortError")),this._destroyed||(this.dialog.destroy(),this.dialog=null,this._destroyed=!0)},a&&!typeof a==="function")throw new TypeError("`options.customize` must be a function.");if(this.dialog||(this.popup?this.dialog=new XA({url:e,handle:n,bounds:l}):this.dialog=new YA({url:e,handle:n,className:s})),this.popup&&l){let{x:f,y:g,width:_=500,height:x=400}=l;_=Math.min(_,window.innerWidth),x=Math.min(x+30,window.innerHeight),f=Math.floor(f!==void 0?f:window.screenX+(window.innerWidth-_)/2),g=Math.floor(g!==void 0?g:window.screenY+(window.innerHeight-x)/2+15),this.dialog.handle.resizeTo(_,x),this.dialog.handle.moveTo(f,g)}if(this.handle=this.dialog.handle,a)try{a({dialog:this.dialog.dialog,container:this.dialog.container,iframe:this.dialog.iframe,webAppWindow:this})}catch(f){console.error(f)}}ready(){this._ready=!0,this._private._resolveReady(!0)}show(){if(!this.visible){this.visible=!0;let e=document.querySelector("body");this._bodyOverflowStyle=e.style.overflow,e.style.overflow="hidden",this._destroyed?this.windowControl.show&&this.windowControl.show():this.dialog.show()}}hide(){if(this.visible){this.visible=!1;let e=document.querySelector("body");this._bodyOverflowStyle?e.style.overflow=this._bodyOverflowStyle:e.style.overflow="",this._destroyed?this.windowControl.hide&&this.windowControl.hide():this.dialog.close()}}},"WebAppWindow");mr(Ov,"WebAppWindow");var EV=1e4,v3=c(class{constructor(){this.client=new p3,this.server=new m3,this.injector=null,this.control=null,this.loaded=!1,this.closed=!1}async createWindow(e,{timeout:t=EV,iframe:r,dialog:n=null,popup:i=!1,handle:s,windowControl:a,className:l,customize:f,bounds:g}={}){if(this.loaded)throw new Error("AppContext already loaded.");this.loaded=!0,this.control=new Ov(e,{timeout:t,dialog:n,iframe:r,popup:i,handle:s,windowControl:a,className:l,customize:f,bounds:g}),window.addEventListener("pagehide",()=>this.close(),{once:!0}),this.server.define("core.control",this.control);let _=lg(e).origin;return this.server.listen(_,{handle:this.control.handle,ignoreUnknownApi:!0}),await this.control._private.isReady(),this.injector=await this.client.connect(_,{handle:this.control.handle}),this.injector}close(){this.closed||(this.closed=!0,this.control._private.destroy(),this.server.close(),this.client.close())}},"WebAppContext");mr(v3,"WebAppContext");var eE=c(class{constructor({credentialHandler:e,credentialRequestOrigin:t,credentialRequestOptions:r,hintKey:n}){this.type="credentialrequest",this._credentialHandler=e,this.credentialRequestOrigin=t,this.credentialRequestOptions=r,this.hintKey=n}async openWindow(e){await this._credentialHandler.show();let t=new Ov(e,{className:"credential-handler"});return t.ready(),t.show(),t.handle._dialog=t.dialog,t.handle}respondWith(e){this._promise=e}},"CredentialRequestEvent");mr(eE,"CredentialRequestEvent");var tE=c(class{constructor({credentialHandler:e,credentialRequestOrigin:t,credential:r,hintKey:n}){this.type="credentialstore",this._credentialHandler=e,this.credentialRequestOrigin=t,this.credential=r,this.hintKey=n}async openWindow(e){await this._credentialHandler.show();let t=new Ov(e);return t.ready(),t.show(),t.handle._dialog=t.dialog,t.handle}respondWith(e){this._promise=e}},"CredentialStoreEvent");mr(tE,"CredentialStoreEvent");var rE=c(class{constructor(e){this._credentialHandler=e}async request(e){return await this._credentialHandler._emitter.emit(new eE(Object.assign({credentialHandler:this._credentialHandler},e)))}async store(e){return await this._credentialHandler._emitter.emit(new tE(Object.assign({credentialHandler:this._credentialHandler},e)))}},"CredentialHandlerService");mr(rE,"CredentialHandlerService");var LA=["credentialrequest","credentialstore"],nE=c(class extends g3{constructor(e,t=!1){if(typeof e!="string")throw new TypeError('"mediatorOrigin" must be a string.');super(e,t),this._emitter=new QA({async waitUntil(r){return r._promise||Promise.reject(new DOMException('No "credentialrequest" event handler found.',"NotFoundError"))}})}async connect(){let e=await super.connect();return this.server.define("credentialHandler",new rE(this)),await this.ready(),e}addEventListener(e,t){if(!LA.includes(e))throw new DOMException(`Unsupported event type "${e}"`,"NotSupportedError");return this._emitter.addEventListener(e,t)}removeEventListener(e,t){if(!LA.includes(e))throw new DOMException(`Unsupported event type "${e}"`,"NotSupportedError");return this._emitter.removeEventListener(e,t)}},"CredentialHandler");mr(nE,"CredentialHandler");var iE=c(class{constructor(e,t){let r=t.get("credentialHints",{functions:["delete","get","keys","has","set","clear"]});for(let n in r)if(n!=="set"){let i=r[n].bind(this,e);this[n]=function(...s){return this._deprecateNotice(),i(...s)}}this._remoteSet=r.set.bind(this,e)}async set(e,t){this._deprecateNotice(),t.icons=t.icons||[];let r=t.icons.map(n=>aE(n.src).then(i=>{n.fetchedImage=i}));return await Promise.all(r),this._remoteSet(e,t)}_deprecateNotice(){console.warn("Credential hints are deprecated and no longer used.")}},"CredentialHints");mr(iE,"CredentialHints");function aE(e){return new Promise(t=>{let r=new Image;r.crossOrigin="Anonymous",r.onload=()=>{let n=document.createElement("canvas"),i=n.getContext("2d");n.height=r.height,n.width=r.width,i.drawImage(r,0,0);let s=n.toDataURL();t(s),n=null},r.onerror=()=>t(null),r.src=e})}c(aE,"imageToDataUrl");mr(aE,"imageToDataUrl");var Dv=c(class{constructor(e,t){if(!(e&&typeof e=="string"))throw new TypeError('"url" must be a non-empty string.');this.hints=new iE(e,t)}static async requestPermission(){return(await navigator.credentialsPolyfill.permissions.request({name:"credentialhandler"})).state}},"CredentialManager");mr(Dv,"CredentialManager");var d3=c(class{constructor(e,t){if(!(e&&typeof e=="string"))throw new TypeError('"url" must be a non-empty string.');this.credentialManager=new Dv(e,t)}},"CredentialHandlerRegistration");mr(d3,"CredentialHandlerRegistration");var oE=c(class{constructor(e){this._init=(async()=>{this._injector=await e,this._remote=this._injector.get("credentialHandlers",{functions:["register","unregister","getRegistration","hasRegistration"]})})()}async register(e){return this._deprecateNotice(),await this._init,e=await this._remote.register("credential",e),new d3(e,this._injector)}async unregister(e){return this._deprecateNotice(),await this._init,this._remote.unregister("credential",e)}async getRegistration(e){return this._deprecateNotice(),await this._init,e=await this._remote.getRegistration("credential",e),e?new d3(e,this._injector):null}async hasRegistration(e){return this._deprecateNotice(),await this._init,await this._remote.hasRegistration("credential",e)}_deprecateNotice(){console.warn('Credential handler registration APIs are deprecated. The credential handler specified in "manifest.json" is now automatically registered when a user grants permission to install a credential handler via "CredentialManager.requestPermission()".')}},"CredentialHandlers");mr(oE,"CredentialHandlers");var Sh=c(class{constructor(e,t,{recommendedHandlerOrigins:r=[],protocols:n={}}={}){if(typeof e!="string")throw new TypeError('"dataType" must be a string.');this.type="web",this.dataType=e,this.data=t,this.options={recommendedHandlerOrigins:r,protocols:n}}},"WebCredential2");mr(Sh,"WebCredential");var kV=0,IV=0,sE=c(class{constructor(e){this._nativeCredentialsContainer={get:navigator.credentials&&navigator.credentials.get&&navigator.credentials.get.bind(navigator.credentials),store:navigator.credentials&&navigator.credentials.store&&navigator.credentials.store.bind(navigator.credentials)},this._init=(async()=>{this._remote=(await e).get("credentialsContainer",{functions:[{name:"get",options:{timeout:kV}},{name:"store",options:{timeout:IV}}]})})()}async get(e={}){if(e.web){await this._init;let t=await this._remote.get(e);return t?new Sh(t.dataType,t.data):null}if(this._nativeCredentialsContainer.get)return this._nativeCredentialsContainer.get(e);throw new DOMException("Not implemented.","NotSupportedError")}async store(e){if(e instanceof Sh){await this._init;let t=await this._remote.store(e);return t?new Sh(t.dataType,t.data):null}if(this._nativeCredentialsContainer.store)return this._nativeCredentialsContainer.store(e);throw new DOMException("Not implemented.","NotSupportedError")}},"CredentialsContainer");mr(sE,"CredentialsContainer");var TV=0,cE=c(class{constructor(e){this._init=(async()=>{this._remote=(await e).get("permissionManager",{functions:["query",{name:"request",options:{timeout:TV}},"revoke"]})})()}async query(e){return await this._init,await this._remote.query(e)}async request(e){return await this._init,await this._remote.request(e)}async revoke(e){return await this._init,await this._remote.revoke(e)}},"PermissionManager");mr(cE,"PermissionManager");var SV="https://authn.io",c3;async function lE(e){return c3||(c3=!0,dE(e))}c(lE,"loadOnce");mr(lE,"loadOnce");async function dE(e={mediatorOrigin:SV}){uE();let t;if(typeof e=="string")t=e;else if(e&&typeof e=="object"&&typeof e.mediatorOrigin=="string")t=`${e.mediatorOrigin}/mediator`;else throw new Error('"options.mediatorOrigin" must be a string expressing the origin of the mediator.');let n=new v3().createWindow(t,{className:"credential-mediator",timeout:3e4}),i=document.createElement("style");i.appendChild(document.createTextNode(`dialog.web-app-window.credential-mediator > .web-app-window-backdrop {
|
|
5
5
|
background-color: rgba(0, 0, 0, 0.25);
|