cocoda-sdk 3.2.0 → 3.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cocoda-sdk.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* cocoda-sdk v3.2.
|
|
2
|
+
* cocoda-sdk v3.2.1
|
|
3
3
|
* Copyright (c) 2021 Verbundzentrale des GBV (VZG)
|
|
4
4
|
* @license MIT
|
|
5
5
|
*
|
|
@@ -9,7 +9,7 @@ var CDK=(()=>{var Jd=Object.create;var ft=Object.defineProperty,Yd=Object.define
|
|
|
9
9
|
`),function(o){if(s=o.indexOf(":"),n=ri.trim(o.substr(0,s)).toLowerCase(),i=ri.trim(o.substr(s+1)),n){if(t[n]&&Sm.indexOf(n)>=0)return;n==="set-cookie"?t[n]=(t[n]?t[n]:[]).concat([i]):t[n]=t[n]?t[n]+", "+i:i}}),t}});var aa=g((jE,sa)=>{"use strict";var ia=De();sa.exports=ia.isStandardBrowserEnv()?function(){var e=/(msie|trident)/i.test(navigator.userAgent),t=document.createElement("a"),n;function i(s){var a=s;return e&&(t.setAttribute("href",a),a=t.href),t.setAttribute("href",a),{href:t.href,protocol:t.protocol?t.protocol.replace(/:$/,""):"",host:t.host,search:t.search?t.search.replace(/^\?/,""):"",hash:t.hash?t.hash.replace(/^#/,""):"",hostname:t.hostname,port:t.port,pathname:t.pathname.charAt(0)==="/"?t.pathname:"/"+t.pathname}}return n=i(window.location.href),function(a){var o=ia.isString(a)?i(a):a;return o.protocol===n.protocol&&o.host===n.host}}():function(){return function(){return!0}}()});var mt=g((NE,oa)=>{"use strict";function ti(r){this.message=r}ti.prototype.toString=function(){return"Cancel"+(this.message?": "+this.message:"")};ti.prototype.__CANCEL__=!0;oa.exports=ti});var ii=g((UE,ua)=>{"use strict";var Wt=De(),Am=Ks(),qm=Js(),Om=Xn(),Cm=ra(),Em=na(),Im=aa(),ni=ei(),Tm=Qn(),Pm=mt();ua.exports=function(e){return new Promise(function(n,i){var s=e.data,a=e.headers,o=e.responseType,u;function m(){e.cancelToken&&e.cancelToken.unsubscribe(u),e.signal&&e.signal.removeEventListener("abort",u)}Wt.isFormData(s)&&delete a["Content-Type"];var h=new XMLHttpRequest;if(e.auth){var x=e.auth.username||"",w=e.auth.password?unescape(encodeURIComponent(e.auth.password)):"";a.Authorization="Basic "+btoa(x+":"+w)}var A=Cm(e.baseURL,e.url);h.open(e.method.toUpperCase(),Om(A,e.params,e.paramsSerializer),!0),h.timeout=e.timeout;function y(){if(!!h){var H="getAllResponseHeaders"in h?Em(h.getAllResponseHeaders()):null,K=!o||o==="text"||o==="json"?h.responseText:h.response,te={data:K,status:h.status,statusText:h.statusText,headers:H,config:e,request:h};Am(function(Z){n(Z),m()},function(Z){i(Z),m()},te),h=null}}if("onloadend"in h?h.onloadend=y:h.onreadystatechange=function(){!h||h.readyState!==4||h.status===0&&!(h.responseURL&&h.responseURL.indexOf("file:")===0)||setTimeout(y)},h.onabort=function(){!h||(i(ni("Request aborted",e,"ECONNABORTED",h)),h=null)},h.onerror=function(){i(ni("Network Error",e,null,h)),h=null},h.ontimeout=function(){var K=e.timeout?"timeout of "+e.timeout+"ms exceeded":"timeout exceeded",te=e.transitional||Tm;e.timeoutErrorMessage&&(K=e.timeoutErrorMessage),i(ni(K,e,te.clarifyTimeoutError?"ETIMEDOUT":"ECONNABORTED",h)),h=null},Wt.isStandardBrowserEnv()){var M=(e.withCredentials||Im(A))&&e.xsrfCookieName?qm.read(e.xsrfCookieName):void 0;M&&(a[e.xsrfHeaderName]=M)}"setRequestHeader"in h&&Wt.forEach(a,function(K,te){typeof s=="undefined"&&te.toLowerCase()==="content-type"?delete a[te]:h.setRequestHeader(te,K)}),Wt.isUndefined(e.withCredentials)||(h.withCredentials=!!e.withCredentials),o&&o!=="json"&&(h.responseType=e.responseType),typeof e.onDownloadProgress=="function"&&h.addEventListener("progress",e.onDownloadProgress),typeof e.onUploadProgress=="function"&&h.upload&&h.upload.addEventListener("progress",e.onUploadProgress),(e.cancelToken||e.signal)&&(u=function(H){!h||(i(!H||H&&H.type?new Pm("canceled"):H),h.abort(),h=null)},e.cancelToken&&e.cancelToken.subscribe(u),e.signal&&(e.signal.aborted?u():e.signal.addEventListener("abort",u))),s||(s=null),h.send(s)})}});var Kt=g((DE,la)=>{"use strict";var Pe=De(),fa=$s(),Mm=Zn(),Rm=Qn(),Lm={"Content-Type":"application/x-www-form-urlencoded"};function ca(r,e){!Pe.isUndefined(r)&&Pe.isUndefined(r["Content-Type"])&&(r["Content-Type"]=e)}function jm(){var r;return typeof XMLHttpRequest!="undefined"?r=ii():typeof process!="undefined"&&Object.prototype.toString.call(process)==="[object process]"&&(r=ii()),r}function Nm(r,e,t){if(Pe.isString(r))try{return(e||JSON.parse)(r),Pe.trim(r)}catch(n){if(n.name!=="SyntaxError")throw n}return(t||JSON.stringify)(r)}var Gt={transitional:Rm,adapter:jm(),transformRequest:[function(e,t){return fa(t,"Accept"),fa(t,"Content-Type"),Pe.isFormData(e)||Pe.isArrayBuffer(e)||Pe.isBuffer(e)||Pe.isStream(e)||Pe.isFile(e)||Pe.isBlob(e)?e:Pe.isArrayBufferView(e)?e.buffer:Pe.isURLSearchParams(e)?(ca(t,"application/x-www-form-urlencoded;charset=utf-8"),e.toString()):Pe.isObject(e)||t&&t["Content-Type"]==="application/json"?(ca(t,"application/json"),Nm(e)):e}],transformResponse:[function(e){var t=this.transitional||Gt.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,s=!n&&this.responseType==="json";if(s||i&&Pe.isString(e)&&e.length)try{return JSON.parse(e)}catch(a){if(s)throw a.name==="SyntaxError"?Mm(a,this,"E_JSON_PARSE"):a}return e}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:"application/json, text/plain, */*"}}};Pe.forEach(["delete","get","head"],function(e){Gt.headers[e]={}});Pe.forEach(["post","put","patch"],function(e){Gt.headers[e]=Pe.merge(Lm)});la.exports=Gt});var pa=g((FE,ha)=>{"use strict";var Um=De(),Dm=Kt();ha.exports=function(e,t,n){var i=this||Dm;return Um.forEach(n,function(a){e=a.call(i,e,t)}),e}});var si=g((BE,da)=>{"use strict";da.exports=function(e){return!!(e&&e.__CANCEL__)}});var va=g((kE,ga)=>{"use strict";var ma=De(),ai=pa(),Fm=si(),Bm=Kt(),km=mt();function oi(r){if(r.cancelToken&&r.cancelToken.throwIfRequested(),r.signal&&r.signal.aborted)throw new km("canceled")}ga.exports=function(e){oi(e),e.headers=e.headers||{},e.data=ai.call(e,e.data,e.headers,e.transformRequest),e.headers=ma.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),ma.forEach(["delete","get","head","post","put","patch","common"],function(i){delete e.headers[i]});var t=e.adapter||Bm.adapter;return t(e).then(function(i){return oi(e),i.data=ai.call(e,i.data,i.headers,e.transformResponse),i},function(i){return Fm(i)||(oi(e),i&&i.response&&(i.response.data=ai.call(e,i.response.data,i.response.headers,e.transformResponse))),Promise.reject(i)})}});var ui=g(($E,ya)=>{"use strict";var ze=De();ya.exports=function(e,t){t=t||{};var n={};function i(h,x){return ze.isPlainObject(h)&&ze.isPlainObject(x)?ze.merge(h,x):ze.isPlainObject(x)?ze.merge({},x):ze.isArray(x)?x.slice():x}function s(h){if(ze.isUndefined(t[h])){if(!ze.isUndefined(e[h]))return i(void 0,e[h])}else return i(e[h],t[h])}function a(h){if(!ze.isUndefined(t[h]))return i(void 0,t[h])}function o(h){if(ze.isUndefined(t[h])){if(!ze.isUndefined(e[h]))return i(void 0,e[h])}else return i(void 0,t[h])}function u(h){if(h in t)return i(e[h],t[h]);if(h in e)return i(void 0,e[h])}var m={url:a,method:a,data:a,baseURL:o,transformRequest:o,transformResponse:o,paramsSerializer:o,timeout:o,timeoutMessage:o,withCredentials:o,adapter:o,responseType:o,xsrfCookieName:o,xsrfHeaderName:o,onUploadProgress:o,onDownloadProgress:o,decompress:o,maxContentLength:o,maxBodyLength:o,transport:o,httpAgent:o,httpsAgent:o,cancelToken:o,socketPath:o,responseEncoding:o,validateStatus:u};return ze.forEach(Object.keys(e).concat(Object.keys(t)),function(x){var w=m[x]||s,A=w(x);ze.isUndefined(A)&&w!==u||(n[x]=A)}),n}});var fi=g((zE,_a)=>{_a.exports={version:"0.26.1"}});var xa=g((HE,ba)=>{"use strict";var $m=fi().version,ci={};["object","boolean","number","function","string","symbol"].forEach(function(r,e){ci[r]=function(n){return typeof n===r||"a"+(e<1?"n ":" ")+r}});var wa={};ci.transitional=function(e,t,n){function i(s,a){return"[Axios v"+$m+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return function(s,a,o){if(e===!1)throw new Error(i(a," has been removed"+(t?" in "+t:"")));return t&&!wa[a]&&(wa[a]=!0,console.warn(i(a," has been deprecated since v"+t+" and will be removed in the near future"))),e?e(s,a,o):!0}};function zm(r,e,t){if(typeof r!="object")throw new TypeError("options must be an object");for(var n=Object.keys(r),i=n.length;i-- >0;){var s=n[i],a=e[s];if(a){var o=r[s],u=o===void 0||a(o,s,r);if(u!==!0)throw new TypeError("option "+s+" must be "+u);continue}if(t!==!0)throw Error("Unknown option "+s)}}ba.exports={assertOptions:zm,validators:ci}});var Ea=g((WE,Ca)=>{"use strict";var qa=De(),Hm=Xn(),Sa=Bs(),Aa=va(),Vt=ui(),Oa=xa(),kr=Oa.validators;function gt(r){this.defaults=r,this.interceptors={request:new Sa,response:new Sa}}gt.prototype.request=function(e,t){typeof e=="string"?(t=t||{},t.url=e):t=e||{},t=Vt(this.defaults,t),t.method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method="get";var n=t.transitional;n!==void 0&&Oa.assertOptions(n,{silentJSONParsing:kr.transitional(kr.boolean),forcedJSONParsing:kr.transitional(kr.boolean),clarifyTimeoutError:kr.transitional(kr.boolean)},!1);var i=[],s=!0;this.interceptors.request.forEach(function(A){typeof A.runWhen=="function"&&A.runWhen(t)===!1||(s=s&&A.synchronous,i.unshift(A.fulfilled,A.rejected))});var a=[];this.interceptors.response.forEach(function(A){a.push(A.fulfilled,A.rejected)});var o;if(!s){var u=[Aa,void 0];for(Array.prototype.unshift.apply(u,i),u=u.concat(a),o=Promise.resolve(t);u.length;)o=o.then(u.shift(),u.shift());return o}for(var m=t;i.length;){var h=i.shift(),x=i.shift();try{m=h(m)}catch(w){x(w);break}}try{o=Aa(m)}catch(w){return Promise.reject(w)}for(;a.length;)o=o.then(a.shift(),a.shift());return o};gt.prototype.getUri=function(e){return e=Vt(this.defaults,e),Hm(e.url,e.params,e.paramsSerializer).replace(/^\?/,"")};qa.forEach(["delete","get","head","options"],function(e){gt.prototype[e]=function(t,n){return this.request(Vt(n||{},{method:e,url:t,data:(n||{}).data}))}});qa.forEach(["post","put","patch"],function(e){gt.prototype[e]=function(t,n,i){return this.request(Vt(i||{},{method:e,url:t,data:n}))}});Ca.exports=gt});var Ta=g((GE,Ia)=>{"use strict";var Wm=mt();function $r(r){if(typeof r!="function")throw new TypeError("executor must be a function.");var e;this.promise=new Promise(function(i){e=i});var t=this;this.promise.then(function(n){if(!!t._listeners){var i,s=t._listeners.length;for(i=0;i<s;i++)t._listeners[i](n);t._listeners=null}}),this.promise.then=function(n){var i,s=new Promise(function(a){t.subscribe(a),i=a}).then(n);return s.cancel=function(){t.unsubscribe(i)},s},r(function(i){t.reason||(t.reason=new Wm(i),e(t.reason))})}$r.prototype.throwIfRequested=function(){if(this.reason)throw this.reason};$r.prototype.subscribe=function(e){if(this.reason){e(this.reason);return}this._listeners?this._listeners.push(e):this._listeners=[e]};$r.prototype.unsubscribe=function(e){if(!!this._listeners){var t=this._listeners.indexOf(e);t!==-1&&this._listeners.splice(t,1)}};$r.source=function(){var e,t=new $r(function(i){e=i});return{token:t,cancel:e}};Ia.exports=$r});var Ma=g((KE,Pa)=>{"use strict";Pa.exports=function(e){return function(n){return e.apply(null,n)}}});var La=g((VE,Ra)=>{"use strict";var Gm=De();Ra.exports=function(e){return Gm.isObject(e)&&e.isAxiosError===!0}});var Ua=g((JE,li)=>{"use strict";var ja=De(),Km=Gn(),Jt=Ea(),Vm=ui(),Jm=Kt();function Na(r){var e=new Jt(r),t=Km(Jt.prototype.request,e);return ja.extend(t,Jt.prototype,e),ja.extend(t,e),t.create=function(i){return Na(Vm(r,i))},t}var Ze=Na(Jm);Ze.Axios=Jt;Ze.Cancel=mt();Ze.CancelToken=Ta();Ze.isCancel=si();Ze.VERSION=fi().version;Ze.all=function(e){return Promise.all(e)};Ze.spread=Ma();Ze.isAxiosError=La();li.exports=Ze;li.exports.default=Ze});var Yt=g((YE,Da)=>{Da.exports=Ua()});var Be=g((XE,Fa)=>{var Ym=Array.isArray;Fa.exports=Ym});var hi=g((ZE,Ba)=>{var Xm=typeof global=="object"&&global&&global.Object===Object&&global;Ba.exports=Xm});var Ve=g((QE,ka)=>{var Zm=hi(),Qm=typeof self=="object"&&self&&self.Object===Object&&self,eg=Zm||Qm||Function("return this")();ka.exports=eg});var Tr=g((e1,$a)=>{var rg=Ve(),tg=rg.Symbol;$a.exports=tg});var Ga=g((r1,Wa)=>{var za=Tr(),Ha=Object.prototype,ng=Ha.hasOwnProperty,ig=Ha.toString,vt=za?za.toStringTag:void 0;function sg(r){var e=ng.call(r,vt),t=r[vt];try{r[vt]=void 0;var n=!0}catch(s){}var i=ig.call(r);return n&&(e?r[vt]=t:delete r[vt]),i}Wa.exports=sg});var Va=g((t1,Ka)=>{var ag=Object.prototype,og=ag.toString;function ug(r){return og.call(r)}Ka.exports=ug});var hr=g((n1,Xa)=>{var Ja=Tr(),fg=Ga(),cg=Va(),lg="[object Null]",hg="[object Undefined]",Ya=Ja?Ja.toStringTag:void 0;function pg(r){return r==null?r===void 0?hg:lg:Ya&&Ya in Object(r)?fg(r):cg(r)}Xa.exports=pg});var Je=g((i1,Za)=>{function dg(r){return r!=null&&typeof r=="object"}Za.exports=dg});var Xt=g((s1,Qa)=>{var mg=hr(),gg=Je(),vg="[object Symbol]";function yg(r){return typeof r=="symbol"||gg(r)&&mg(r)==vg}Qa.exports=yg});var ro=g((a1,eo)=>{var _g=Be(),wg=Xt(),bg=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,xg=/^\w*$/;function Sg(r,e){if(_g(r))return!1;var t=typeof r;return t=="number"||t=="symbol"||t=="boolean"||r==null||wg(r)?!0:xg.test(r)||!bg.test(r)||e!=null&&r in Object(e)}eo.exports=Sg});var Ye=g((o1,to)=>{function Ag(r){var e=typeof r;return r!=null&&(e=="object"||e=="function")}to.exports=Ag});var Zt=g((u1,no)=>{var qg=hr(),Og=Ye(),Cg="[object AsyncFunction]",Eg="[object Function]",Ig="[object GeneratorFunction]",Tg="[object Proxy]";function Pg(r){if(!Og(r))return!1;var e=qg(r);return e==Eg||e==Ig||e==Cg||e==Tg}no.exports=Pg});var so=g((f1,io)=>{var Mg=Ve(),Rg=Mg["__core-js_shared__"];io.exports=Rg});var uo=g((c1,oo)=>{var pi=so(),ao=function(){var r=/[^.]+$/.exec(pi&&pi.keys&&pi.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}();function Lg(r){return!!ao&&ao in r}oo.exports=Lg});var di=g((l1,fo)=>{var jg=Function.prototype,Ng=jg.toString;function Ug(r){if(r!=null){try{return Ng.call(r)}catch(e){}try{return r+""}catch(e){}}return""}fo.exports=Ug});var lo=g((h1,co)=>{var Dg=Zt(),Fg=uo(),Bg=Ye(),kg=di(),$g=/[\\^$.*+?()[\]{}|]/g,zg=/^\[object .+?Constructor\]$/,Hg=Function.prototype,Wg=Object.prototype,Gg=Hg.toString,Kg=Wg.hasOwnProperty,Vg=RegExp("^"+Gg.call(Kg).replace($g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Jg(r){if(!Bg(r)||Fg(r))return!1;var e=Dg(r)?Vg:zg;return e.test(kg(r))}co.exports=Jg});var po=g((p1,ho)=>{function Yg(r,e){return r==null?void 0:r[e]}ho.exports=Yg});var pr=g((d1,mo)=>{var Xg=lo(),Zg=po();function Qg(r,e){var t=Zg(r,e);return Xg(t)?t:void 0}mo.exports=Qg});var yt=g((m1,go)=>{var ev=pr(),rv=ev(Object,"create");go.exports=rv});var _o=g((g1,yo)=>{var vo=yt();function tv(){this.__data__=vo?vo(null):{},this.size=0}yo.exports=tv});var bo=g((v1,wo)=>{function nv(r){var e=this.has(r)&&delete this.__data__[r];return this.size-=e?1:0,e}wo.exports=nv});var So=g((y1,xo)=>{var iv=yt(),sv="__lodash_hash_undefined__",av=Object.prototype,ov=av.hasOwnProperty;function uv(r){var e=this.__data__;if(iv){var t=e[r];return t===sv?void 0:t}return ov.call(e,r)?e[r]:void 0}xo.exports=uv});var qo=g((_1,Ao)=>{var fv=yt(),cv=Object.prototype,lv=cv.hasOwnProperty;function hv(r){var e=this.__data__;return fv?e[r]!==void 0:lv.call(e,r)}Ao.exports=hv});var Co=g((w1,Oo)=>{var pv=yt(),dv="__lodash_hash_undefined__";function mv(r,e){var t=this.__data__;return this.size+=this.has(r)?0:1,t[r]=pv&&e===void 0?dv:e,this}Oo.exports=mv});var Io=g((b1,Eo)=>{var gv=_o(),vv=bo(),yv=So(),_v=qo(),wv=Co();function zr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}zr.prototype.clear=gv;zr.prototype.delete=vv;zr.prototype.get=yv;zr.prototype.has=_v;zr.prototype.set=wv;Eo.exports=zr});var Po=g((x1,To)=>{function bv(){this.__data__=[],this.size=0}To.exports=bv});var Hr=g((S1,Mo)=>{function xv(r,e){return r===e||r!==r&&e!==e}Mo.exports=xv});var _t=g((A1,Ro)=>{var Sv=Hr();function Av(r,e){for(var t=r.length;t--;)if(Sv(r[t][0],e))return t;return-1}Ro.exports=Av});var jo=g((q1,Lo)=>{var qv=_t(),Ov=Array.prototype,Cv=Ov.splice;function Ev(r){var e=this.__data__,t=qv(e,r);if(t<0)return!1;var n=e.length-1;return t==n?e.pop():Cv.call(e,t,1),--this.size,!0}Lo.exports=Ev});var Uo=g((O1,No)=>{var Iv=_t();function Tv(r){var e=this.__data__,t=Iv(e,r);return t<0?void 0:e[t][1]}No.exports=Tv});var Fo=g((C1,Do)=>{var Pv=_t();function Mv(r){return Pv(this.__data__,r)>-1}Do.exports=Mv});var ko=g((E1,Bo)=>{var Rv=_t();function Lv(r,e){var t=this.__data__,n=Rv(t,r);return n<0?(++this.size,t.push([r,e])):t[n][1]=e,this}Bo.exports=Lv});var wt=g((I1,$o)=>{var jv=Po(),Nv=jo(),Uv=Uo(),Dv=Fo(),Fv=ko();function Wr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Wr.prototype.clear=jv;Wr.prototype.delete=Nv;Wr.prototype.get=Uv;Wr.prototype.has=Dv;Wr.prototype.set=Fv;$o.exports=Wr});var Qt=g((T1,zo)=>{var Bv=pr(),kv=Ve(),$v=Bv(kv,"Map");zo.exports=$v});var Go=g((P1,Wo)=>{var Ho=Io(),zv=wt(),Hv=Qt();function Wv(){this.size=0,this.__data__={hash:new Ho,map:new(Hv||zv),string:new Ho}}Wo.exports=Wv});var Vo=g((M1,Ko)=>{function Gv(r){var e=typeof r;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?r!=="__proto__":r===null}Ko.exports=Gv});var bt=g((R1,Jo)=>{var Kv=Vo();function Vv(r,e){var t=r.__data__;return Kv(e)?t[typeof e=="string"?"string":"hash"]:t.map}Jo.exports=Vv});var Xo=g((L1,Yo)=>{var Jv=bt();function Yv(r){var e=Jv(this,r).delete(r);return this.size-=e?1:0,e}Yo.exports=Yv});var Qo=g((j1,Zo)=>{var Xv=bt();function Zv(r){return Xv(this,r).get(r)}Zo.exports=Zv});var ru=g((N1,eu)=>{var Qv=bt();function ey(r){return Qv(this,r).has(r)}eu.exports=ey});var nu=g((U1,tu)=>{var ry=bt();function ty(r,e){var t=ry(this,r),n=t.size;return t.set(r,e),this.size+=t.size==n?0:1,this}tu.exports=ty});var en=g((D1,iu)=>{var ny=Go(),iy=Xo(),sy=Qo(),ay=ru(),oy=nu();function Gr(r){var e=-1,t=r==null?0:r.length;for(this.clear();++e<t;){var n=r[e];this.set(n[0],n[1])}}Gr.prototype.clear=ny;Gr.prototype.delete=iy;Gr.prototype.get=sy;Gr.prototype.has=ay;Gr.prototype.set=oy;iu.exports=Gr});var ou=g((F1,au)=>{var su=en(),uy="Expected a function";function mi(r,e){if(typeof r!="function"||e!=null&&typeof e!="function")throw new TypeError(uy);var t=function(){var n=arguments,i=e?e.apply(this,n):n[0],s=t.cache;if(s.has(i))return s.get(i);var a=r.apply(this,n);return t.cache=s.set(i,a)||s,a};return t.cache=new(mi.Cache||su),t}mi.Cache=su;au.exports=mi});var fu=g((B1,uu)=>{var fy=ou(),cy=500;function ly(r){var e=fy(r,function(n){return t.size===cy&&t.clear(),n}),t=e.cache;return e}uu.exports=ly});var lu=g((k1,cu)=>{var hy=fu(),py=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,dy=/\\(\\)?/g,my=hy(function(r){var e=[];return r.charCodeAt(0)===46&&e.push(""),r.replace(py,function(t,n,i,s){e.push(i?s.replace(dy,"$1"):n||t)}),e});cu.exports=my});var xt=g(($1,hu)=>{function gy(r,e){for(var t=-1,n=r==null?0:r.length,i=Array(n);++t<n;)i[t]=e(r[t],t,r);return i}hu.exports=gy});var yu=g((z1,vu)=>{var pu=Tr(),vy=xt(),yy=Be(),_y=Xt(),wy=1/0,du=pu?pu.prototype:void 0,mu=du?du.toString:void 0;function gu(r){if(typeof r=="string")return r;if(yy(r))return vy(r,gu)+"";if(_y(r))return mu?mu.call(r):"";var e=r+"";return e=="0"&&1/r==-wy?"-0":e}vu.exports=gu});var wu=g((H1,_u)=>{var by=yu();function xy(r){return r==null?"":by(r)}_u.exports=xy});var St=g((W1,bu)=>{var Sy=Be(),Ay=ro(),qy=lu(),Oy=wu();function Cy(r,e){return Sy(r)?r:Ay(r,e)?[r]:qy(Oy(r))}bu.exports=Cy});var rn=g((G1,xu)=>{var Ey=Xt(),Iy=1/0;function Ty(r){if(typeof r=="string"||Ey(r))return r;var e=r+"";return e=="0"&&1/r==-Iy?"-0":e}xu.exports=Ty});var gi=g((K1,Su)=>{var Py=St(),My=rn();function Ry(r,e){e=Py(e,r);for(var t=0,n=e.length;r!=null&&t<n;)r=r[My(e[t++])];return t&&t==n?r:void 0}Su.exports=Ry});var qu=g((V1,Au)=>{var Ly=gi();function jy(r,e,t){var n=r==null?void 0:Ly(r,e);return n===void 0?t:n}Au.exports=jy});var vi=g((J1,Ou)=>{var Ny=pr(),Uy=function(){try{var r=Ny(Object,"defineProperty");return r({},"",{}),r}catch(e){}}();Ou.exports=Uy});var tn=g((Y1,Eu)=>{var Cu=vi();function Dy(r,e,t){e=="__proto__"&&Cu?Cu(r,e,{configurable:!0,enumerable:!0,value:t,writable:!0}):r[e]=t}Eu.exports=Dy});var nn=g((X1,Iu)=>{var Fy=tn(),By=Hr(),ky=Object.prototype,$y=ky.hasOwnProperty;function zy(r,e,t){var n=r[e];(!($y.call(r,e)&&By(n,t))||t===void 0&&!(e in r))&&Fy(r,e,t)}Iu.exports=zy});var sn=g((Z1,Tu)=>{var Hy=9007199254740991,Wy=/^(?:0|[1-9]\d*)$/;function Gy(r,e){var t=typeof r;return e=e==null?Hy:e,!!e&&(t=="number"||t!="symbol"&&Wy.test(r))&&r>-1&&r%1==0&&r<e}Tu.exports=Gy});var Ru=g((Q1,Mu)=>{var Ky=nn(),Vy=St(),Jy=sn(),Pu=Ye(),Yy=rn();function Xy(r,e,t,n){if(!Pu(r))return r;e=Vy(e,r);for(var i=-1,s=e.length,a=s-1,o=r;o!=null&&++i<s;){var u=Yy(e[i]),m=t;if(u==="__proto__"||u==="constructor"||u==="prototype")return r;if(i!=a){var h=o[u];m=n?n(h,u,o):void 0,m===void 0&&(m=Pu(h)?h:Jy(e[i+1])?[]:{})}Ky(o,u,m),o=o[u]}return r}Mu.exports=Xy});var ju=g((eI,Lu)=>{var Zy=Ru();function Qy(r,e,t){return r==null?r:Zy(r,e,t)}Lu.exports=Qy});var Uu=g((rI,Nu)=>{var e_="__lodash_hash_undefined__";function r_(r){return this.__data__.set(r,e_),this}Nu.exports=r_});var Fu=g((tI,Du)=>{function t_(r){return this.__data__.has(r)}Du.exports=t_});var on=g((nI,Bu)=>{var n_=en(),i_=Uu(),s_=Fu();function an(r){var e=-1,t=r==null?0:r.length;for(this.__data__=new n_;++e<t;)this.add(r[e])}an.prototype.add=an.prototype.push=i_;an.prototype.has=s_;Bu.exports=an});var $u=g((iI,ku)=>{function a_(r,e,t,n){for(var i=r.length,s=t+(n?1:-1);n?s--:++s<i;)if(e(r[s],s,r))return s;return-1}ku.exports=a_});var Hu=g((sI,zu)=>{function o_(r){return r!==r}zu.exports=o_});var Gu=g((aI,Wu)=>{function u_(r,e,t){for(var n=t-1,i=r.length;++n<i;)if(r[n]===e)return n;return-1}Wu.exports=u_});var Vu=g((oI,Ku)=>{var f_=$u(),c_=Hu(),l_=Gu();function h_(r,e,t){return e===e?l_(r,e,t):f_(r,c_,t)}Ku.exports=h_});var yi=g((uI,Ju)=>{var p_=Vu();function d_(r,e){var t=r==null?0:r.length;return!!t&&p_(r,e,0)>-1}Ju.exports=d_});var _i=g((fI,Yu)=>{function m_(r,e,t){for(var n=-1,i=r==null?0:r.length;++n<i;)if(t(e,r[n]))return!0;return!1}Yu.exports=m_});var un=g((cI,Xu)=>{function g_(r,e){return r.has(e)}Xu.exports=g_});var wi=g((lI,Zu)=>{var v_=pr(),y_=Ve(),__=v_(y_,"Set");Zu.exports=__});var ef=g((hI,Qu)=>{function w_(){}Qu.exports=w_});var fn=g((pI,rf)=>{function b_(r){var e=-1,t=Array(r.size);return r.forEach(function(n){t[++e]=n}),t}rf.exports=b_});var nf=g((dI,tf)=>{var bi=wi(),x_=ef(),S_=fn(),A_=1/0,q_=bi&&1/S_(new bi([,-0]))[1]==A_?function(r){return new bi(r)}:x_;tf.exports=q_});var xi=g((mI,sf)=>{var O_=on(),C_=yi(),E_=_i(),I_=un(),T_=nf(),P_=fn(),M_=200;function R_(r,e,t){var n=-1,i=C_,s=r.length,a=!0,o=[],u=o;if(t)a=!1,i=E_;else if(s>=M_){var m=e?null:T_(r);if(m)return P_(m);a=!1,i=I_,u=new O_}else u=e?[]:o;e:for(;++n<s;){var h=r[n],x=e?e(h):h;if(h=t||h!==0?h:0,a&&x===x){for(var w=u.length;w--;)if(u[w]===x)continue e;e&&u.push(x),o.push(h)}else i(u,x,t)||(u!==o&&u.push(x),o.push(h))}return o}sf.exports=R_});var of=g((gI,af)=>{var L_=xi();function j_(r){return r&&r.length?L_(r):[]}af.exports=j_});var At=g((vI,uf)=>{function N_(r){return function(e){return r(e)}}uf.exports=N_});var lf=g((yI,cf)=>{var U_=on(),D_=yi(),F_=_i(),B_=xt(),k_=At(),ff=un(),$_=Math.min;function z_(r,e,t){for(var n=t?F_:D_,i=r[0].length,s=r.length,a=s,o=Array(s),u=1/0,m=[];a--;){var h=r[a];a&&e&&(h=B_(h,k_(e))),u=$_(h.length,u),o[a]=!t&&(e||i>=120&&h.length>=120)?new U_(a&&h):void 0}h=r[0];var x=-1,w=o[0];e:for(;++x<i&&m.length<u;){var A=h[x],y=e?e(A):A;if(A=t||A!==0?A:0,!(w?ff(w,y):n(m,y,t))){for(a=s;--a;){var M=o[a];if(!(M?ff(M,y):n(r[a],y,t)))continue e}w&&w.push(y),m.push(A)}}return m}cf.exports=z_});var cn=g((_I,hf)=>{function H_(r){return r}hf.exports=H_});var df=g((wI,pf)=>{function W_(r,e,t){switch(t.length){case 0:return r.call(e);case 1:return r.call(e,t[0]);case 2:return r.call(e,t[0],t[1]);case 3:return r.call(e,t[0],t[1],t[2])}return r.apply(e,t)}pf.exports=W_});var Si=g((bI,gf)=>{var G_=df(),mf=Math.max;function K_(r,e,t){return e=mf(e===void 0?r.length-1:e,0),function(){for(var n=arguments,i=-1,s=mf(n.length-e,0),a=Array(s);++i<s;)a[i]=n[e+i];i=-1;for(var o=Array(e+1);++i<e;)o[i]=n[i];return o[e]=t(a),G_(r,this,o)}}gf.exports=K_});var yf=g((xI,vf)=>{function V_(r){return function(){return r}}vf.exports=V_});var bf=g((SI,wf)=>{var J_=yf(),_f=vi(),Y_=cn(),X_=_f?function(r,e){return _f(r,"toString",{configurable:!0,enumerable:!1,value:J_(e),writable:!0})}:Y_;wf.exports=X_});var Sf=g((AI,xf)=>{var Z_=800,Q_=16,ew=Date.now;function rw(r){var e=0,t=0;return function(){var n=ew(),i=Q_-(n-t);if(t=n,i>0){if(++e>=Z_)return arguments[0]}else e=0;return r.apply(void 0,arguments)}}xf.exports=rw});var Ai=g((qI,Af)=>{var tw=bf(),nw=Sf(),iw=nw(tw);Af.exports=iw});var ln=g((OI,qf)=>{var sw=cn(),aw=Si(),ow=Ai();function uw(r,e){return ow(aw(r,e,sw),r+"")}qf.exports=uw});var qi=g((CI,Of)=>{var fw=9007199254740991;function cw(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=fw}Of.exports=cw});var Kr=g((EI,Cf)=>{var lw=Zt(),hw=qi();function pw(r){return r!=null&&hw(r.length)&&!lw(r)}Cf.exports=pw});var hn=g((II,Ef)=>{var dw=Kr(),mw=Je();function gw(r){return mw(r)&&dw(r)}Ef.exports=gw});var Tf=g((TI,If)=>{var vw=hn();function yw(r){return vw(r)?r:[]}If.exports=yw});var Mf=g((PI,Pf)=>{var _w=xt(),ww=lf(),bw=ln(),xw=Tf(),Sw=bw(function(r){var e=_w(r,xw);return e.length&&e[0]===r[0]?ww(e):[]});Pf.exports=Sw});var qt=g((MI,Rf)=>{function Aw(r,e){for(var t=-1,n=e.length,i=r.length;++t<n;)r[i+t]=e[t];return r}Rf.exports=Aw});var jf=g((RI,Lf)=>{var qw=hr(),Ow=Je(),Cw="[object Arguments]";function Ew(r){return Ow(r)&&qw(r)==Cw}Lf.exports=Ew});var Ot=g((LI,Df)=>{var Nf=jf(),Iw=Je(),Uf=Object.prototype,Tw=Uf.hasOwnProperty,Pw=Uf.propertyIsEnumerable,Mw=Nf(function(){return arguments}())?Nf:function(r){return Iw(r)&&Tw.call(r,"callee")&&!Pw.call(r,"callee")};Df.exports=Mw});var $f=g((jI,kf)=>{var Ff=Tr(),Rw=Ot(),Lw=Be(),Bf=Ff?Ff.isConcatSpreadable:void 0;function jw(r){return Lw(r)||Rw(r)||!!(Bf&&r&&r[Bf])}kf.exports=jw});var pn=g((NI,Hf)=>{var Nw=qt(),Uw=$f();function zf(r,e,t,n,i){var s=-1,a=r.length;for(t||(t=Uw),i||(i=[]);++s<a;){var o=r[s];e>0&&t(o)?e>1?zf(o,e-1,t,n,i):Nw(i,o):n||(i[i.length]=o)}return i}Hf.exports=zf});var Gf=g((UI,Wf)=>{var Dw=pn(),Fw=ln(),Bw=xi(),kw=hn(),$w=Fw(function(r){return Bw(Dw(r,1,kw,!0))});Wf.exports=$w});var Vf=g((DI,Kf)=>{function zw(r){return function(e,t,n){for(var i=-1,s=Object(e),a=n(e),o=a.length;o--;){var u=a[r?o:++i];if(t(s[u],u,s)===!1)break}return e}}Kf.exports=zw});var Oi=g((FI,Jf)=>{var Hw=Vf(),Ww=Hw();Jf.exports=Ww});var Xf=g((BI,Yf)=>{function Gw(r,e){for(var t=-1,n=Array(r);++t<r;)n[t]=e(t);return n}Yf.exports=Gw});var Qf=g((kI,Zf)=>{function Kw(){return!1}Zf.exports=Kw});var Jr=g((Ct,Vr)=>{var Vw=Ve(),Jw=Qf(),tc=typeof Ct=="object"&&Ct&&!Ct.nodeType&&Ct,ec=tc&&typeof Vr=="object"&&Vr&&!Vr.nodeType&&Vr,Yw=ec&&ec.exports===tc,rc=Yw?Vw.Buffer:void 0,Xw=rc?rc.isBuffer:void 0,Zw=Xw||Jw;Vr.exports=Zw});var ic=g(($I,nc)=>{var Qw=hr(),e0=qi(),r0=Je(),t0="[object Arguments]",n0="[object Array]",i0="[object Boolean]",s0="[object Date]",a0="[object Error]",o0="[object Function]",u0="[object Map]",f0="[object Number]",c0="[object Object]",l0="[object RegExp]",h0="[object Set]",p0="[object String]",d0="[object WeakMap]",m0="[object ArrayBuffer]",g0="[object DataView]",v0="[object Float32Array]",y0="[object Float64Array]",_0="[object Int8Array]",w0="[object Int16Array]",b0="[object Int32Array]",x0="[object Uint8Array]",S0="[object Uint8ClampedArray]",A0="[object Uint16Array]",q0="[object Uint32Array]",we={};we[v0]=we[y0]=we[_0]=we[w0]=we[b0]=we[x0]=we[S0]=we[A0]=we[q0]=!0;we[t0]=we[n0]=we[m0]=we[i0]=we[g0]=we[s0]=we[a0]=we[o0]=we[u0]=we[f0]=we[c0]=we[l0]=we[h0]=we[p0]=we[d0]=!1;function O0(r){return r0(r)&&e0(r.length)&&!!we[Qw(r)]}nc.exports=O0});var dn=g((Et,Yr)=>{var C0=hi(),sc=typeof Et=="object"&&Et&&!Et.nodeType&&Et,It=sc&&typeof Yr=="object"&&Yr&&!Yr.nodeType&&Yr,E0=It&&It.exports===sc,Ci=E0&&C0.process,I0=function(){try{var r=It&&It.require&&It.require("util").types;return r||Ci&&Ci.binding&&Ci.binding("util")}catch(e){}}();Yr.exports=I0});var Tt=g((zI,uc)=>{var T0=ic(),P0=At(),ac=dn(),oc=ac&&ac.isTypedArray,M0=oc?P0(oc):T0;uc.exports=M0});var Ei=g((HI,fc)=>{var R0=Xf(),L0=Ot(),j0=Be(),N0=Jr(),U0=sn(),D0=Tt(),F0=Object.prototype,B0=F0.hasOwnProperty;function k0(r,e){var t=j0(r),n=!t&&L0(r),i=!t&&!n&&N0(r),s=!t&&!n&&!i&&D0(r),a=t||n||i||s,o=a?R0(r.length,String):[],u=o.length;for(var m in r)(e||B0.call(r,m))&&!(a&&(m=="length"||i&&(m=="offset"||m=="parent")||s&&(m=="buffer"||m=="byteLength"||m=="byteOffset")||U0(m,u)))&&o.push(m);return o}fc.exports=k0});var Pt=g((WI,cc)=>{var $0=Object.prototype;function z0(r){var e=r&&r.constructor,t=typeof e=="function"&&e.prototype||$0;return r===t}cc.exports=z0});var Ii=g((GI,lc)=>{function H0(r,e){return function(t){return r(e(t))}}lc.exports=H0});var pc=g((KI,hc)=>{var W0=Ii(),G0=W0(Object.keys,Object);hc.exports=G0});var Ti=g((VI,dc)=>{var K0=Pt(),V0=pc(),J0=Object.prototype,Y0=J0.hasOwnProperty;function X0(r){if(!K0(r))return V0(r);var e=[];for(var t in Object(r))Y0.call(r,t)&&t!="constructor"&&e.push(t);return e}dc.exports=X0});var Mt=g((JI,mc)=>{var Z0=Ei(),Q0=Ti(),eb=Kr();function rb(r){return eb(r)?Z0(r):Q0(r)}mc.exports=rb});var vc=g((YI,gc)=>{var tb=Oi(),nb=Mt();function ib(r,e){return r&&tb(r,e,nb)}gc.exports=ib});var _c=g((XI,yc)=>{var sb=cn();function ab(r){return typeof r=="function"?r:sb}yc.exports=ab});var bc=g((ZI,wc)=>{var ob=vc(),ub=_c();function fb(r,e){return r&&ob(r,ub(e))}wc.exports=fb});var Sc=g((QI,xc)=>{var cb=hr(),lb=Be(),hb=Je(),pb="[object String]";function db(r){return typeof r=="string"||!lb(r)&&hb(r)&&cb(r)==pb}xc.exports=db});var qc=g((eT,Ac)=>{var mb=pr(),gb=Ve(),vb=mb(gb,"DataView");Ac.exports=vb});var Cc=g((rT,Oc)=>{var yb=pr(),_b=Ve(),wb=yb(_b,"Promise");Oc.exports=wb});var Ic=g((tT,Ec)=>{var bb=pr(),xb=Ve(),Sb=bb(xb,"WeakMap");Ec.exports=Sb});var Zr=g((nT,Nc)=>{var Pi=qc(),Mi=Qt(),Ri=Cc(),Li=wi(),ji=Ic(),jc=hr(),Xr=di(),Tc="[object Map]",Ab="[object Object]",Pc="[object Promise]",Mc="[object Set]",Rc="[object WeakMap]",Lc="[object DataView]",qb=Xr(Pi),Ob=Xr(Mi),Cb=Xr(Ri),Eb=Xr(Li),Ib=Xr(ji),Pr=jc;(Pi&&Pr(new Pi(new ArrayBuffer(1)))!=Lc||Mi&&Pr(new Mi)!=Tc||Ri&&Pr(Ri.resolve())!=Pc||Li&&Pr(new Li)!=Mc||ji&&Pr(new ji)!=Rc)&&(Pr=function(r){var e=jc(r),t=e==Ab?r.constructor:void 0,n=t?Xr(t):"";if(n)switch(n){case qb:return Lc;case Ob:return Tc;case Cb:return Pc;case Eb:return Mc;case Ib:return Rc}return e});Nc.exports=Pr});var Dc=g((iT,Uc)=>{var Tb=Ti(),Pb=Zr(),Mb=Ot(),Rb=Be(),Lb=Kr(),jb=Jr(),Nb=Pt(),Ub=Tt(),Db="[object Map]",Fb="[object Set]",Bb=Object.prototype,kb=Bb.hasOwnProperty;function $b(r){if(r==null)return!0;if(Lb(r)&&(Rb(r)||typeof r=="string"||typeof r.splice=="function"||jb(r)||Ub(r)||Mb(r)))return!r.length;var e=Pb(r);if(e==Db||e==Fb)return!r.size;if(Nb(r))return!Tb(r).length;for(var t in r)if(kb.call(r,t))return!1;return!0}Uc.exports=$b});var Bc=g((sT,Fc)=>{var zb=wt();function Hb(){this.__data__=new zb,this.size=0}Fc.exports=Hb});var $c=g((aT,kc)=>{function Wb(r){var e=this.__data__,t=e.delete(r);return this.size=e.size,t}kc.exports=Wb});var Hc=g((oT,zc)=>{function Gb(r){return this.__data__.get(r)}zc.exports=Gb});var Gc=g((uT,Wc)=>{function Kb(r){return this.__data__.has(r)}Wc.exports=Kb});var Vc=g((fT,Kc)=>{var Vb=wt(),Jb=Qt(),Yb=en(),Xb=200;function Zb(r,e){var t=this.__data__;if(t instanceof Vb){var n=t.__data__;if(!Jb||n.length<Xb-1)return n.push([r,e]),this.size=++t.size,this;t=this.__data__=new Yb(n)}return t.set(r,e),this.size=t.size,this}Kc.exports=Zb});var mn=g((cT,Jc)=>{var Qb=wt(),ex=Bc(),rx=$c(),tx=Hc(),nx=Gc(),ix=Vc();function Qr(r){var e=this.__data__=new Qb(r);this.size=e.size}Qr.prototype.clear=ex;Qr.prototype.delete=rx;Qr.prototype.get=tx;Qr.prototype.has=nx;Qr.prototype.set=ix;Jc.exports=Qr});var Xc=g((lT,Yc)=>{function sx(r,e){for(var t=-1,n=r==null?0:r.length;++t<n;)if(e(r[t],t,r))return!0;return!1}Yc.exports=sx});var Ni=g((hT,Zc)=>{var ax=on(),ox=Xc(),ux=un(),fx=1,cx=2;function lx(r,e,t,n,i,s){var a=t&fx,o=r.length,u=e.length;if(o!=u&&!(a&&u>o))return!1;var m=s.get(r),h=s.get(e);if(m&&h)return m==e&&h==r;var x=-1,w=!0,A=t&cx?new ax:void 0;for(s.set(r,e),s.set(e,r);++x<o;){var y=r[x],M=e[x];if(n)var H=a?n(M,y,x,e,r,s):n(y,M,x,r,e,s);if(H!==void 0){if(H)continue;w=!1;break}if(A){if(!ox(e,function(K,te){if(!ux(A,te)&&(y===K||i(y,K,t,n,s)))return A.push(te)})){w=!1;break}}else if(!(y===M||i(y,M,t,n,s))){w=!1;break}}return s.delete(r),s.delete(e),w}Zc.exports=lx});var Ui=g((pT,Qc)=>{var hx=Ve(),px=hx.Uint8Array;Qc.exports=px});var rl=g((dT,el)=>{function dx(r){var e=-1,t=Array(r.size);return r.forEach(function(n,i){t[++e]=[i,n]}),t}el.exports=dx});var al=g((mT,sl)=>{var tl=Tr(),nl=Ui(),mx=Hr(),gx=Ni(),vx=rl(),yx=fn(),_x=1,wx=2,bx="[object Boolean]",xx="[object Date]",Sx="[object Error]",Ax="[object Map]",qx="[object Number]",Ox="[object RegExp]",Cx="[object Set]",Ex="[object String]",Ix="[object Symbol]",Tx="[object ArrayBuffer]",Px="[object DataView]",il=tl?tl.prototype:void 0,Di=il?il.valueOf:void 0;function Mx(r,e,t,n,i,s,a){switch(t){case Px:if(r.byteLength!=e.byteLength||r.byteOffset!=e.byteOffset)return!1;r=r.buffer,e=e.buffer;case Tx:return!(r.byteLength!=e.byteLength||!s(new nl(r),new nl(e)));case bx:case xx:case qx:return mx(+r,+e);case Sx:return r.name==e.name&&r.message==e.message;case Ox:case Ex:return r==e+"";case Ax:var o=vx;case Cx:var u=n&_x;if(o||(o=yx),r.size!=e.size&&!u)return!1;var m=a.get(r);if(m)return m==e;n|=wx,a.set(r,e);var h=gx(o(r),o(e),n,i,s,a);return a.delete(r),h;case Ix:if(Di)return Di.call(r)==Di.call(e)}return!1}sl.exports=Mx});var Fi=g((gT,ol)=>{var Rx=qt(),Lx=Be();function jx(r,e,t){var n=e(r);return Lx(r)?n:Rx(n,t(r))}ol.exports=jx});var fl=g((vT,ul)=>{function Nx(r,e){for(var t=-1,n=r==null?0:r.length,i=0,s=[];++t<n;){var a=r[t];e(a,t,r)&&(s[i++]=a)}return s}ul.exports=Nx});var Bi=g((yT,cl)=>{function Ux(){return[]}cl.exports=Ux});var gn=g((_T,hl)=>{var Dx=fl(),Fx=Bi(),Bx=Object.prototype,kx=Bx.propertyIsEnumerable,ll=Object.getOwnPropertySymbols,$x=ll?function(r){return r==null?[]:(r=Object(r),Dx(ll(r),function(e){return kx.call(r,e)}))}:Fx;hl.exports=$x});var ki=g((wT,pl)=>{var zx=Fi(),Hx=gn(),Wx=Mt();function Gx(r){return zx(r,Wx,Hx)}pl.exports=Gx});var gl=g((bT,ml)=>{var dl=ki(),Kx=1,Vx=Object.prototype,Jx=Vx.hasOwnProperty;function Yx(r,e,t,n,i,s){var a=t&Kx,o=dl(r),u=o.length,m=dl(e),h=m.length;if(u!=h&&!a)return!1;for(var x=u;x--;){var w=o[x];if(!(a?w in e:Jx.call(e,w)))return!1}var A=s.get(r),y=s.get(e);if(A&&y)return A==e&&y==r;var M=!0;s.set(r,e),s.set(e,r);for(var H=a;++x<u;){w=o[x];var K=r[w],te=e[w];if(n)var D=a?n(te,K,w,e,r,s):n(K,te,w,r,e,s);if(!(D===void 0?K===te||i(K,te,t,n,s):D)){M=!1;break}H||(H=w=="constructor")}if(M&&!H){var Z=r.constructor,ee=e.constructor;Z!=ee&&"constructor"in r&&"constructor"in e&&!(typeof Z=="function"&&Z instanceof Z&&typeof ee=="function"&&ee instanceof ee)&&(M=!1)}return s.delete(r),s.delete(e),M}ml.exports=Yx});var Al=g((xT,Sl)=>{var $i=mn(),Xx=Ni(),Zx=al(),Qx=gl(),vl=Zr(),yl=Be(),_l=Jr(),eS=Tt(),rS=1,wl="[object Arguments]",bl="[object Array]",vn="[object Object]",tS=Object.prototype,xl=tS.hasOwnProperty;function nS(r,e,t,n,i,s){var a=yl(r),o=yl(e),u=a?bl:vl(r),m=o?bl:vl(e);u=u==wl?vn:u,m=m==wl?vn:m;var h=u==vn,x=m==vn,w=u==m;if(w&&_l(r)){if(!_l(e))return!1;a=!0,h=!1}if(w&&!h)return s||(s=new $i),a||eS(r)?Xx(r,e,t,n,i,s):Zx(r,e,u,t,n,i,s);if(!(t&rS)){var A=h&&xl.call(r,"__wrapped__"),y=x&&xl.call(e,"__wrapped__");if(A||y){var M=A?r.value():r,H=y?e.value():e;return s||(s=new $i),i(M,H,t,n,s)}}return w?(s||(s=new $i),Qx(r,e,t,n,i,s)):!1}Sl.exports=nS});var El=g((ST,Cl)=>{var iS=Al(),ql=Je();function Ol(r,e,t,n,i){return r===e?!0:r==null||e==null||!ql(r)&&!ql(e)?r!==r&&e!==e:iS(r,e,t,n,Ol,i)}Cl.exports=Ol});var Tl=g((AT,Il)=>{var sS=El();function aS(r,e){return sS(r,e)}Il.exports=aS});var zi=g((qT,Pl)=>{var oS=tn(),uS=Hr();function fS(r,e,t){(t!==void 0&&!uS(r[e],t)||t===void 0&&!(e in r))&&oS(r,e,t)}Pl.exports=fS});var Hi=g((Rt,et)=>{var cS=Ve(),jl=typeof Rt=="object"&&Rt&&!Rt.nodeType&&Rt,Ml=jl&&typeof et=="object"&&et&&!et.nodeType&&et,lS=Ml&&Ml.exports===jl,Rl=lS?cS.Buffer:void 0,Ll=Rl?Rl.allocUnsafe:void 0;function hS(r,e){if(e)return r.slice();var t=r.length,n=Ll?Ll(t):new r.constructor(t);return r.copy(n),n}et.exports=hS});var yn=g((OT,Ul)=>{var Nl=Ui();function pS(r){var e=new r.constructor(r.byteLength);return new Nl(e).set(new Nl(r)),e}Ul.exports=pS});var Wi=g((CT,Dl)=>{var dS=yn();function mS(r,e){var t=e?dS(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.length)}Dl.exports=mS});var _n=g((ET,Fl)=>{function gS(r,e){var t=-1,n=r.length;for(e||(e=Array(n));++t<n;)e[t]=r[t];return e}Fl.exports=gS});var $l=g((IT,kl)=>{var vS=Ye(),Bl=Object.create,yS=function(){function r(){}return function(e){if(!vS(e))return{};if(Bl)return Bl(e);r.prototype=e;var t=new r;return r.prototype=void 0,t}}();kl.exports=yS});var wn=g((TT,zl)=>{var _S=Ii(),wS=_S(Object.getPrototypeOf,Object);zl.exports=wS});var Gi=g((PT,Hl)=>{var bS=$l(),xS=wn(),SS=Pt();function AS(r){return typeof r.constructor=="function"&&!SS(r)?bS(xS(r)):{}}Hl.exports=AS});var Ki=g((MT,Gl)=>{var qS=hr(),OS=wn(),CS=Je(),ES="[object Object]",IS=Function.prototype,TS=Object.prototype,Wl=IS.toString,PS=TS.hasOwnProperty,MS=Wl.call(Object);function RS(r){if(!CS(r)||qS(r)!=ES)return!1;var e=OS(r);if(e===null)return!0;var t=PS.call(e,"constructor")&&e.constructor;return typeof t=="function"&&t instanceof t&&Wl.call(t)==MS}Gl.exports=RS});var Vi=g((RT,Kl)=>{function LS(r,e){if(!(e==="constructor"&&typeof r[e]=="function")&&e!="__proto__")return r[e]}Kl.exports=LS});var Mr=g((LT,Vl)=>{var jS=nn(),NS=tn();function US(r,e,t,n){var i=!t;t||(t={});for(var s=-1,a=e.length;++s<a;){var o=e[s],u=n?n(t[o],r[o],o,t,r):void 0;u===void 0&&(u=r[o]),i?NS(t,o,u):jS(t,o,u)}return t}Vl.exports=US});var Yl=g((jT,Jl)=>{function DS(r){var e=[];if(r!=null)for(var t in Object(r))e.push(t);return e}Jl.exports=DS});var Zl=g((NT,Xl)=>{var FS=Ye(),BS=Pt(),kS=Yl(),$S=Object.prototype,zS=$S.hasOwnProperty;function HS(r){if(!FS(r))return kS(r);var e=BS(r),t=[];for(var n in r)n=="constructor"&&(e||!zS.call(r,n))||t.push(n);return t}Xl.exports=HS});var rt=g((UT,Ql)=>{var WS=Ei(),GS=Zl(),KS=Kr();function VS(r){return KS(r)?WS(r,!0):GS(r)}Ql.exports=VS});var rh=g((DT,eh)=>{var JS=Mr(),YS=rt();function XS(r){return JS(r,YS(r))}eh.exports=XS});var oh=g((FT,ah)=>{var th=zi(),ZS=Hi(),QS=Wi(),eA=_n(),rA=Gi(),nh=Ot(),ih=Be(),tA=hn(),nA=Jr(),iA=Zt(),sA=Ye(),aA=Ki(),oA=Tt(),sh=Vi(),uA=rh();function fA(r,e,t,n,i,s,a){var o=sh(r,t),u=sh(e,t),m=a.get(u);if(m){th(r,t,m);return}var h=s?s(o,u,t+"",r,e,a):void 0,x=h===void 0;if(x){var w=ih(u),A=!w&&nA(u),y=!w&&!A&&oA(u);h=u,w||A||y?ih(o)?h=o:tA(o)?h=eA(o):A?(x=!1,h=ZS(u,!0)):y?(x=!1,h=QS(u,!0)):h=[]:aA(u)||nh(u)?(h=o,nh(o)?h=uA(o):(!sA(o)||iA(o))&&(h=rA(u))):x=!1}x&&(a.set(u,h),i(h,u,n,s,a),a.delete(u)),th(r,t,h)}ah.exports=fA});var ch=g((BT,fh)=>{var cA=mn(),lA=zi(),hA=Oi(),pA=oh(),dA=Ye(),mA=rt(),gA=Vi();function uh(r,e,t,n,i){r!==e&&hA(e,function(s,a){if(i||(i=new cA),dA(s))pA(r,e,a,t,uh,n,i);else{var o=n?n(gA(r,a),s,a+"",r,e,i):void 0;o===void 0&&(o=s),lA(r,a,o)}},mA)}fh.exports=uh});var hh=g((kT,lh)=>{var vA=Hr(),yA=Kr(),_A=sn(),wA=Ye();function bA(r,e,t){if(!wA(t))return!1;var n=typeof e;return(n=="number"?yA(t)&&_A(e,t.length):n=="string"&&e in t)?vA(t[e],r):!1}lh.exports=bA});var dh=g(($T,ph)=>{var xA=ln(),SA=hh();function AA(r){return xA(function(e,t){var n=-1,i=t.length,s=i>1?t[i-1]:void 0,a=i>2?t[2]:void 0;for(s=r.length>3&&typeof s=="function"?(i--,s):void 0,a&&SA(t[0],t[1],a)&&(s=i<3?void 0:s,i=1),e=Object(e);++n<i;){var o=t[n];o&&r(e,o,n,s)}return e})}ph.exports=AA});var gh=g((zT,mh)=>{var qA=ch(),OA=dh(),CA=OA(function(r,e,t){qA(r,e,t)});mh.exports=CA});var Ji=g((HT,vh)=>{function EA(r){var e=r==null?0:r.length;return e?r[e-1]:void 0}vh.exports=EA});var _h=g((WT,yh)=>{function IA(r,e){for(var t=-1,n=r==null?0:r.length;++t<n&&e(r[t],t,r)!==!1;);return r}yh.exports=IA});var bh=g((GT,wh)=>{var TA=Mr(),PA=Mt();function MA(r,e){return r&&TA(e,PA(e),r)}wh.exports=MA});var Sh=g((KT,xh)=>{var RA=Mr(),LA=rt();function jA(r,e){return r&&RA(e,LA(e),r)}xh.exports=jA});var qh=g((VT,Ah)=>{var NA=Mr(),UA=gn();function DA(r,e){return NA(r,UA(r),e)}Ah.exports=DA});var Yi=g((JT,Oh)=>{var FA=qt(),BA=wn(),kA=gn(),$A=Bi(),zA=Object.getOwnPropertySymbols,HA=zA?function(r){for(var e=[];r;)FA(e,kA(r)),r=BA(r);return e}:$A;Oh.exports=HA});var Eh=g((YT,Ch)=>{var WA=Mr(),GA=Yi();function KA(r,e){return WA(r,GA(r),e)}Ch.exports=KA});var Xi=g((XT,Ih)=>{var VA=Fi(),JA=Yi(),YA=rt();function XA(r){return VA(r,YA,JA)}Ih.exports=XA});var Ph=g((ZT,Th)=>{var ZA=Object.prototype,QA=ZA.hasOwnProperty;function eq(r){var e=r.length,t=new r.constructor(e);return e&&typeof r[0]=="string"&&QA.call(r,"index")&&(t.index=r.index,t.input=r.input),t}Th.exports=eq});var Rh=g((QT,Mh)=>{var rq=yn();function tq(r,e){var t=e?rq(r.buffer):r.buffer;return new r.constructor(t,r.byteOffset,r.byteLength)}Mh.exports=tq});var jh=g((eP,Lh)=>{var nq=/\w*$/;function iq(r){var e=new r.constructor(r.source,nq.exec(r));return e.lastIndex=r.lastIndex,e}Lh.exports=iq});var Bh=g((rP,Fh)=>{var Nh=Tr(),Uh=Nh?Nh.prototype:void 0,Dh=Uh?Uh.valueOf:void 0;function sq(r){return Dh?Object(Dh.call(r)):{}}Fh.exports=sq});var $h=g((tP,kh)=>{var aq=yn(),oq=Rh(),uq=jh(),fq=Bh(),cq=Wi(),lq="[object Boolean]",hq="[object Date]",pq="[object Map]",dq="[object Number]",mq="[object RegExp]",gq="[object Set]",vq="[object String]",yq="[object Symbol]",_q="[object ArrayBuffer]",wq="[object DataView]",bq="[object Float32Array]",xq="[object Float64Array]",Sq="[object Int8Array]",Aq="[object Int16Array]",qq="[object Int32Array]",Oq="[object Uint8Array]",Cq="[object Uint8ClampedArray]",Eq="[object Uint16Array]",Iq="[object Uint32Array]";function Tq(r,e,t){var n=r.constructor;switch(e){case _q:return aq(r);case lq:case hq:return new n(+r);case wq:return oq(r,t);case bq:case xq:case Sq:case Aq:case qq:case Oq:case Cq:case Eq:case Iq:return cq(r,t);case pq:return new n;case dq:case vq:return new n(r);case mq:return uq(r);case gq:return new n;case yq:return fq(r)}}kh.exports=Tq});var Hh=g((nP,zh)=>{var Pq=Zr(),Mq=Je(),Rq="[object Map]";function Lq(r){return Mq(r)&&Pq(r)==Rq}zh.exports=Lq});var Vh=g((iP,Kh)=>{var jq=Hh(),Nq=At(),Wh=dn(),Gh=Wh&&Wh.isMap,Uq=Gh?Nq(Gh):jq;Kh.exports=Uq});var Yh=g((sP,Jh)=>{var Dq=Zr(),Fq=Je(),Bq="[object Set]";function kq(r){return Fq(r)&&Dq(r)==Bq}Jh.exports=kq});var ep=g((aP,Qh)=>{var $q=Yh(),zq=At(),Xh=dn(),Zh=Xh&&Xh.isSet,Hq=Zh?zq(Zh):$q;Qh.exports=Hq});var sp=g((oP,ip)=>{var Wq=mn(),Gq=_h(),Kq=nn(),Vq=bh(),Jq=Sh(),Yq=Hi(),Xq=_n(),Zq=qh(),Qq=Eh(),eO=ki(),rO=Xi(),tO=Zr(),nO=Ph(),iO=$h(),sO=Gi(),aO=Be(),oO=Jr(),uO=Vh(),fO=Ye(),cO=ep(),lO=Mt(),hO=rt(),pO=1,dO=2,mO=4,rp="[object Arguments]",gO="[object Array]",vO="[object Boolean]",yO="[object Date]",_O="[object Error]",tp="[object Function]",wO="[object GeneratorFunction]",bO="[object Map]",xO="[object Number]",np="[object Object]",SO="[object RegExp]",AO="[object Set]",qO="[object String]",OO="[object Symbol]",CO="[object WeakMap]",EO="[object ArrayBuffer]",IO="[object DataView]",TO="[object Float32Array]",PO="[object Float64Array]",MO="[object Int8Array]",RO="[object Int16Array]",LO="[object Int32Array]",jO="[object Uint8Array]",NO="[object Uint8ClampedArray]",UO="[object Uint16Array]",DO="[object Uint32Array]",_e={};_e[rp]=_e[gO]=_e[EO]=_e[IO]=_e[vO]=_e[yO]=_e[TO]=_e[PO]=_e[MO]=_e[RO]=_e[LO]=_e[bO]=_e[xO]=_e[np]=_e[SO]=_e[AO]=_e[qO]=_e[OO]=_e[jO]=_e[NO]=_e[UO]=_e[DO]=!0;_e[_O]=_e[tp]=_e[CO]=!1;function bn(r,e,t,n,i,s){var a,o=e&pO,u=e&dO,m=e&mO;if(t&&(a=i?t(r,n,i,s):t(r)),a!==void 0)return a;if(!fO(r))return r;var h=aO(r);if(h){if(a=nO(r),!o)return Xq(r,a)}else{var x=tO(r),w=x==tp||x==wO;if(oO(r))return Yq(r,o);if(x==np||x==rp||w&&!i){if(a=u||w?{}:sO(r),!o)return u?Qq(r,Jq(a,r)):Zq(r,Vq(a,r))}else{if(!_e[x])return i?r:{};a=iO(r,x,o)}}s||(s=new Wq);var A=s.get(r);if(A)return A;s.set(r,a),cO(r)?r.forEach(function(H){a.add(bn(H,e,t,H,r,s))}):uO(r)&&r.forEach(function(H,K){a.set(K,bn(H,e,t,K,r,s))});var y=m?u?rO:eO:u?hO:lO,M=h?void 0:y(r);return Gq(M||r,function(H,K){M&&(K=H,H=r[K]),Kq(a,K,bn(H,e,t,K,r,s))}),a}ip.exports=bn});var op=g((uP,ap)=>{function FO(r,e,t){var n=-1,i=r.length;e<0&&(e=-e>i?0:i+e),t=t>i?i:t,t<0&&(t+=i),i=e>t?0:t-e>>>0,e>>>=0;for(var s=Array(i);++n<i;)s[n]=r[n+e];return s}ap.exports=FO});var fp=g((fP,up)=>{var BO=gi(),kO=op();function $O(r,e){return e.length<2?r:BO(r,kO(e,0,-1))}up.exports=$O});var lp=g((cP,cp)=>{var zO=St(),HO=Ji(),WO=fp(),GO=rn();function KO(r,e){return e=zO(e,r),r=WO(r,e),r==null||delete r[GO(HO(e))]}cp.exports=KO});var pp=g((lP,hp)=>{var VO=Ki();function JO(r){return VO(r)?void 0:r}hp.exports=JO});var mp=g((hP,dp)=>{var YO=pn();function XO(r){var e=r==null?0:r.length;return e?YO(r,1):[]}dp.exports=XO});var vp=g((pP,gp)=>{var ZO=mp(),QO=Si(),eC=Ai();function rC(r){return eC(QO(r,void 0,ZO),r+"")}gp.exports=rC});var _p=g((dP,yp)=>{var tC=xt(),nC=sp(),iC=lp(),sC=St(),aC=Mr(),oC=pp(),uC=vp(),fC=Xi(),cC=1,lC=2,hC=4,pC=uC(function(r,e){var t={};if(r==null)return t;var n=!1;e=tC(e,function(s){return s=sC(s,r),n||(n=s.length>1),s}),aC(r,fC(r),t),n&&(t=nC(t,cC|lC|hC,oC));for(var i=e.length;i--;)iC(t,e[i]);return t});yp.exports=pC});var bp=g((mP,wp)=>{var dC=qt(),mC=pn(),gC=_n(),vC=Be();function yC(){var r=arguments.length;if(!r)return[];for(var e=Array(r-1),t=arguments[0],n=r;n--;)e[n-1]=arguments[n];return dC(vC(t)?gC(t):[t],mC(e,1))}wp.exports=yC});var Sp=g((gP,xp)=>{xp.exports=function(e){var t=function(ee,O){var Q=ee<<O|ee>>>32-O;return Q},n=function(ee){var O="",Q,W;for(Q=7;Q>=0;Q--)W=ee>>>Q*4&15,O+=W.toString(16);return O},i,s,a,o=new Array(80),u=1732584193,m=4023233417,h=2562383102,x=271733878,w=3285377520,A,y,M,H,K,te;e=unescape(encodeURIComponent(e));var D=e.length,Z=[];for(s=0;s<D-3;s+=4)a=e.charCodeAt(s)<<24|e.charCodeAt(s+1)<<16|e.charCodeAt(s+2)<<8|e.charCodeAt(s+3),Z.push(a);switch(D%4){case 0:s=2147483648;break;case 1:s=e.charCodeAt(D-1)<<24|8388608;break;case 2:s=e.charCodeAt(D-2)<<24|e.charCodeAt(D-1)<<16|32768;break;case 3:s=e.charCodeAt(D-3)<<24|e.charCodeAt(D-2)<<16|e.charCodeAt(D-1)<<8|128;break}for(Z.push(s);Z.length%16!==14;)Z.push(0);for(Z.push(D>>>29),Z.push(D<<3&4294967295),i=0;i<Z.length;i+=16){for(s=0;s<16;s++)o[s]=Z[i+s];for(s=16;s<=79;s++)o[s]=t(o[s-3]^o[s-8]^o[s-14]^o[s-16],1);for(A=u,y=m,M=h,H=x,K=w,s=0;s<=19;s++)te=t(A,5)+(y&M|~y&H)+K+o[s]+1518500249&4294967295,K=H,H=M,M=t(y,30),y=A,A=te;for(s=20;s<=39;s++)te=t(A,5)+(y^M^H)+K+o[s]+1859775393&4294967295,K=H,H=M,M=t(y,30),y=A,A=te;for(s=40;s<=59;s++)te=t(A,5)+(y&M|y&H|M&H)+K+o[s]+2400959708&4294967295,K=H,H=M,M=t(y,30),y=A,A=te;for(s=60;s<=79;s++)te=t(A,5)+(y^M^H)+K+o[s]+3395469782&4294967295,K=H,H=M,M=t(y,30),y=A,A=te;u=u+A&4294967295,m=m+y&4294967295,h=h+M&4294967295,x=x+H&4294967295,w=w+K&4294967295}return te=n(u)+n(m)+n(h)+n(x)+n(w),te.toLowerCase()}});var Lp=g((vP,Rp)=>{var qp=Sp();function Op(r){return r.map(e=>e&&e.uri).filter(Boolean)}function is(r){return["memberSet","memberList","memberChoice"].find(e=>r[e])}function Ap(r){let e=is(r),t=r[e]?Op(r[e]):[];return{[t.length>1?e:"memberSet"]:t.map(n=>({uri:n}))}}function Cp(r){let{from:e,to:t,type:n}=r,i={from:Ap(e||{}),to:Ap(t||{}),type:[n&&n[0]||"http://www.w3.org/2004/02/skos/core#mappingRelation"]};for(let s of["from","to"])if((i[s][is(i[s])]||[]).length==0){let a=r[s+"Scheme"];a&&a.uri&&(i[s+"Scheme"]={uri:a.uri})}return i}function Ep(r){let{from:e,to:t}=r,n=[e,t].filter(Boolean).map(i=>Op(i[is(i)]||[]));return[].concat(...n).sort()}function Ip(r){let e=JSON.stringify(Cp(r),["from","fromScheme","to","toScheme","type","memberSet","memberList","memberChoice","uri"]);return"urn:jskos:mapping:content:"+qp(e+`
|
|
10
10
|
`)}function Tp(r){let e=JSON.stringify(Ep(r));return"urn:jskos:mapping:members:"+qp(e+`
|
|
11
11
|
`)}function ns(r){let e=(r.identifier||[]).filter(t=>t&&!t.startsWith("urn:jskos:mapping:")).concat([Tp(r),Ip(r)]).sort();return Object.assign({},r,{identifier:e})}function Pp(r,e,t){r=r&&ns(r),e=e&&ns(e);let n=r&&r.identifier?r.identifier.find(s=>s.startsWith(t)):null,i=e&&e.identifier?e.identifier.find(s=>s.startsWith(t)):null;return n==i}function Mp(r,e){return Pp(r,e,"urn:jskos:mapping:content:")}var wC=Mp;function bC(r,e){return Pp(r,e,"urn:jskos:mapping:members:")}Rp.exports={mappingContent:Cp,mappingMembers:Ep,mappingContentIdentifier:Ip,mappingMembersIdentifier:Tp,addMappingIdentifiers:ns,compareMappings:Mp,compareMappingContent:wC,compareMappingMembers:bC}});var ss=g((yP,Np)=>{function jp(r,e,t){var n=Array.prototype.slice,i=typeof Object.keys=="function"?Object.keys:function(m){var h=[];for(var x in m)h.push(x);return h},s=function(m,h){return m===h?!0:m instanceof Date&&h instanceof Date?m.getTime()===h.getTime():typeof m!="object"&&typeof h!="object"?m==h:u(m,h)};function a(m){return m==null}function o(m){return Object.prototype.toString.call(m)=="[object Arguments]"}function u(m,h){if(a(m)||a(h)||m.prototype!==h.prototype)return!1;if(o(m))return o(h)?(m=n.call(m),h=n.call(h),s(m,h)):!1;try{var x=i(m),w=i(h),A,y}catch(M){return!1}if(x.length!=w.length)return!1;for(x.sort(),w.sort(),y=x.length-1;y>=0;y--)if(x[y]!=w[y])return!1;for(y=x.length-1;y>=0;y--)if(A=x[y],t){let M=t(m[A],h[A],A);if(M===void 0&&(M=jp(m[A],h[A])),!M)return!1}else if(!s(m[A],h[A]))return!1;return!0}return s(r,e)}Np.exports={get:(r,e,t=void 0)=>{let n=s=>String.prototype.split.call(e,s).filter(Boolean).reduce((a,o)=>a!=null?a[o]:a,r),i=n(/[,[\]]+?/)||n(/[,[\].]+?/);return i===void 0||i===r?t:i},pick:(r,e)=>e.reduce((t,n)=>(r&&r.hasOwnProperty(n)&&(t[n]=r[n]),t),{}),forOwn:(r,e)=>{for(let t in r)r.hasOwnProperty(t)&&e(r[t],t)},isEqualWith:jp,intersection:(...r)=>r.reduce((e,t)=>e.filter(n=>t.includes(n))),isObject:r=>typeof r=="object"&&r!==null,isString:r=>!!(r&&typeof r.valueOf()=="string"),union:(r,e)=>[...new Set([...r,...e])],unionWith:(r,e,t)=>[...r,...e].reduce((n,i)=>(n.findIndex(s=>t(s,i))!==-1||n.push(i),n),[]),omitMod:(r,e)=>{for(let t of e){typeof t=="string"&&(t=t.split("."));for(let n=0;n<t.length-1;n++)r=r[t[n]];delete r[t.pop()]}}}});var as=g((_P,xC)=>{xC.exports=[{RELEVANCE:"very high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#closeMatch"}],definition:{de:["gleiche Bedeutung"],en:["same meaning"]},notation:["="],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u062A\u0627\u0645",be:"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u0446\u044C","be-tarask":"\u0434\u0430\u043A\u043B\u0430\u0434\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",bn:"\u09B9\u09C1\u09AC\u09C1\u09B9\u09C1 \u09AE\u09BF\u09B2",ca:"equival\xE8ncia exacta",cs:"p\u0159esn\xE1 shoda",da:"exact match",de:"exakte \xDCbereinstimmung",en:"exact match",eo:"ekzakta ekvivalento",es:"equivalencia exacta",fi:"vastaava k\xE4site",fr:"\xE9quivalence exacte",gl:"correspondencia exacta",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05DE\u05D3\u05D5\u05D9\u05E7\u05EA",hu:"pontos egyez\xE9s",id:"sama persis",it:"corrispondenza esatta",ja:"\u5B8C\u5168\u4E00\u81F4",lv:"tie\u0161a sakrit\u012Bba",mk:"\u0442\u043E\u0447\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan tepat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062A\u06A4\u062A",nb:"eksakt samsvar",nl:"exacte match",nn:"eksakt samsvar",pl:"dok\u0142adne dopasowanie",pt:"correspond\xEAncia exata",ro:"echivalentul exact",ru:"\u0442\u043E\u0447\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sq:"p\xEBrputhje e p\xEBrpikt\xEB",sr:"\u0442\u0430\u0447\u043D\u043E \u043F\u043E\u0434\u0443\u0434\u0430\u0440\u0430\u045A\u0435",sv:"exakt tr\xE4ff",tr:"tam e\u015Fle\u015Fme",uk:"\u0442\u043E\u0447\u043D\u0430 \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u043D\u0456\u0441\u0442\u044C",zh:"\u7CBE\u78BA\u5339\u914D","zh-hans":"\u7CBE\u786E\u5339\u914D","zh-hant":"\u7CBE\u78BA\u5339\u914D"},SHORT:"exact",uri:"http://www.w3.org/2004/02/skos/core#exactMatch"},{RELEVANCE:"high",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["in etwa gleiche Bedeutung"],en:["same general idea but not fully identical meaning"]},notation:["\u2248"],prefLabel:{ar:"\u062A\u0637\u0627\u0628\u0642 \u0642\u0631\u064A\u0628","be-tarask":"\u0431\u043B\u0456\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"equival\xE8ncia inexacta",de:"hohe \xDCbereinstimmung",en:"close match",eo:"proksima kongrua\u0135o",es:"equivalencia inexacta",fi:"l\xE4hes vastaava k\xE4site",fr:"quasi-\xE9quivalence",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E8\u05D5\u05D1\u05D4",it:"corrispondenza parziale",mk:"\u0431\u043B\u0438\u0441\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan dekat","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u062F\u06A9\u062A",nb:"n\xE6rt samsvar",nl:"nabije match",nn:"n\xE6rt samsvar",pl:"cz\u0119\u015Bciowe dopasowanie",pt:"correspond\xEAncia pr\xF3xima",ru:"\u0431\u043B\u0438\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0431\u043B\u0438\u0441\u043A\u043E \u043F\u043E\u043A\u043B\u0430\u043F\u0430\u045A\u0435",sv:"n\xE4ra matchning",tr:"yak\u0131n e\u015Fle\u015Fme","zh-hans":"\u9AD8\u5EA6\u5339\u914D"},SHORT:"close",uri:"http://www.w3.org/2004/02/skos/core#closeMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["umfassendere Bedeutung"],en:["broader meaning"]},notation:[">"],prefLabel:{"be-tarask":"\u0448\u044B\u0440\u043E\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 llunyana",de:"allgemeinere Bedeutung",en:"broad match",eo:"malstrikta kongruo",fi:"vastaava laajempi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E8\u05D7\u05D1\u05D4",it:"corrispondenza generica",ja:"\u90E8\u5206\u4E00\u81F4",mk:"\u043F\u043E\u0448\u0438\u0440\u043E\u043A\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"bredere samsvar",nl:"brede match",nn:"breitt samsvar",pl:"dopasowanie poj\u0119cia o szerszym znaczeniu","pt-br":"correspond\xEAncia gen\xE9rica",ru:"\u0431\u043E\u043B\u0435\u0435 \u0448\u0438\u0440\u043E\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0443 \u0448\u0438\u0440\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"bred tr\xE4ff","zh-hans":"\u5E7F\u6CDB\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"}],SHORT:"broad",uri:"http://www.w3.org/2004/02/skos/core#broadMatch"},{RELEVANCE:"medium",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{en:["more specific meaning"]},notation:["<"],prefLabel:{"be-tarask":"\u0432\u0443\u0437\u043A\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"relaci\xF3 estreta",de:"spezifischere Bedeutung",en:"narrow match",eo:"strikta kongruo",fi:"vastaava suppeampi k\xE4site",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E6\u05E8\u05D4",it:"corrispondenza con termine pi\xF9 specifico",mk:"\u043F\u043E\u0442\u0435\u0441\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",nb:"smalere samsvar",nl:"nauwe match",nn:"snevert samsvar",pl:"dopasowanie poj\u0119cia o w\u0119\u017Cszym znaczeniu","pt-br":"correspond\xEAncia aproximada",ru:"\u0431\u043E\u043B\u0435\u0435 \u0443\u0437\u043A\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",sr:"\u0443 \u0443\u0436\u0435\u043C \u0441\u043C\u0438\u0441\u043B\u0443",sv:"smal tr\xE4ff",ur:"\u0646\u06CC\u0631\u0648 \u0645\u06CC\u0686","zh-hans":"\u6709\u9650\u5339\u914D"},related:[{uri:"http://www.w3.org/2004/02/skos/core#broadMatch"}],SHORT:"narrow",uri:"http://www.w3.org/2004/02/skos/core#narrowMatch"},{RELEVANCE:"low",broader:[{uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}],definition:{de:["assoziative Verkn\xFCpfung unterschiedlicher Bedeutungen"],en:["associative link between meanings"]},notation:["~"],prefLabel:{"be-tarask":"\u0437\u044C\u0432\u044F\u0437\u0430\u043D\u0430\u044F \u0430\u0434\u043F\u0430\u0432\u0435\u0434\u043D\u0430\u0441\u044C\u0446\u044C",ca:"parella relacionada",de:"verwandte Bedeutung",en:"related match",eo:"rilata kongruo",he:"\u05D4\u05EA\u05D0\u05DE\u05D4 \u05E7\u05E9\u05D5\u05E8\u05D4",it:"corrispondenza correlata",lv:"saist\u012Bta sakrit\u012Bba",mk:"\u043F\u043E\u0432\u0440\u0437\u0430\u043D\u043E \u0441\u043E\u0432\u043F\u0430\u0453\u0430\u045A\u0435",ms:"padanan berkaitan","ms-arab":"\u06A4\u0627\u062F\u0646\u0646 \u0628\u0631\u06A9\u0627\u0621\u064A\u062A\u0646",nb:"relatert samsvar",nl:"gerelateerde match",pl:"dopasowanie poj\u0119cia o powi\u0105zanym znaczeniu",ru:"\u0430\u0441\u0441\u043E\u0446\u0438\u0430\u0442\u0438\u0432\u043D\u043E\u0435 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0438\u0435",tr:"ili\u015Fkili benze\u015Fme",ur:"\u0645\u062A\u0639\u0644\u0642\u06C1 \u0645\u06CC\u0686",vec:"parente\u0142a re\u0142asionada","zh-hans":"\u5173\u8054\u5339\u914D"},SHORT:"related",uri:"http://www.w3.org/2004/02/skos/core#relatedMatch"},{RELEVANCE:"generic",definition:{de:["unbekannter Bedeutungszusammenhang"],en:["unknown type of link between meanings"]},notation:["\u2192"],prefLabel:{ar:"\u0646\u0648\u0639 \u0639\u0644\u0627\u0642\u0629 \u0627\u0644\u062A\u0637\u0628\u064A\u0642",be:"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u043D\u044F","be-tarask":"\u0445\u0430\u0440\u0430\u043A\u0442\u044D\u0440\u043D\u0430\u044F \u0430\u0434\u043D\u043E\u0441\u0456\u043D\u0430 \u0430\u0434\u043B\u044E\u0441\u0442\u0440\u0430\u0432\u0430\u043D\u044C\u043D\u044F",ca:"relaci\xF3 de mapatge",de:"allgemeine Mapping-Relation",en:"SKOS generic mapping relation",fr:"lien de correspondance SKOS",he:"\u05D9\u05D7\u05E1 \u05DE\u05D9\u05E4\u05D5\u05D9 \u05DB\u05DC\u05DC\u05D9",id:"relasi pemetaan",mk:"\u043F\u0440\u0435\u0441\u043B\u0438\u043A\u0443\u0432\u0430\u0447\u043A\u0438 \u043E\u0434\u043D\u043E\u0441",nb:"generell mappingrelasjon","pt-br":"rela\xE7\xE3o gen\xE9rica de mapeamento",sr:"\u0440\u0435\u043B\u0430\u0446\u0438\u0458\u0430 \u043C\u0430\u043F\u0438\u0440\u0430\u045A\u0430",sv:"mappnings relation",zh:"\u6620\u5C04\u95DC\u4FC2","zh-hant":"\u6620\u5C04\u95DC\u4FC2"},SHORT:"",uri:"http://www.w3.org/2004/02/skos/core#mappingRelation"}]});var Dp=g((wP,Up)=>{var SC=as(),An={Concept:{type:["http://www.w3.org/2004/02/skos/core#Concept"]},ConceptScheme:{type:["http://www.w3.org/2004/02/skos/core#ConceptScheme"]},ConceptMapping:{type:SC.map(r=>r.uri)},ConceptOccurrence:{type:["http://purl.org/cld/cdtype/CatalogueOrIndex"]},Registry:{type:["http://www.w3.org/ns/dcat#Catalog"]},Distribution:{type:["http://www.w3.org/ns/dcat#Distribution"]},Concordance:{type:["http://rdfs.org/ns/void#Linkset","http://rdf-vocabulary.ddialliance.org/xkos#Correspondence"]},Resource:{},Item:{},ConceptBundle:{},Annotation:{type:["Annotation","http://www.w3.org/ns/oa#Annotation"]}},Sn=Object.keys(An).reduce((r,e)=>{for(let t of An[e].type||[])r[t]=e;return r},{});function AC(r,e=!1){var t;if(typeof r=="string"&&r)r in Sn?t=Sn[r]:(r=r.toLowerCase().replace(/s$/,""),t=Object.keys(An).find(n=>{let i=n.toLowerCase();if(i===r||i==="concept"+r)return!0}));else if(typeof r=="object"&&r.type){let n=Array.isArray(r.type)?r.type:[r.type];for(let i of n)if(i in Sn){t=Sn[i];break}}return e&&t?t.toLowerCase().replace(/^concept(.+)/,"$1"):t}Up.exports={objectTypes:An,guessObjectType:AC}});var us=g((bP,Fp)=>{var qC=/[\\^$.*+?()[\]{}|]/g,OC=r=>r.replace(qC,"\\$&"),CC=/[%ÄÖÜäöü ]/g,os=class{constructor(e={}){if(Object.assign(this,e),this.notationPattern||(this.notationPattern=".+"),!this.uriPattern&&this.namespace){this.uriPattern="^"+OC(this.namespace);let t=this.notationPattern.replace(CC,encodeURI);this.uriPattern+="("+t+")$"}this.NOTATION_REGEX=RegExp("^"+this.notationPattern+"$"),this.uriPattern&&(this.URI_REGEX=RegExp(this.uriPattern))}isValidNotation(e){return this.NOTATION_REGEX.exec(e)}notationFromUri(e){if(this.URI_REGEX){let t=this.URI_REGEX.exec(e);if(t)return decodeURI(t[1])}}uriFromNotation(e){if(this.uriPattern)return e=encodeURI(e),this.uriPattern.replace(/^\^|\$$/g,"").replace(/\\/g,"").replace(/\(.*\)/,e)}conceptFromUri(e,t={}){let n=this.notationFromUri(e);if(n===void 0)return;let i={uri:e,notation:[n]};return t.inScheme&&(i.inScheme=[{uri:this.uri}]),t.topConcept&&(i.topConceptOf=[{uri:this.uri}]),i}conceptFromNotation(e,t){if(this.isValidNotation(e))return this.conceptFromUri(this.uriFromNotation(e),t)}};Fp.exports=os});var fs=g((xP,kp)=>{var EC=ss(),qn={store:null,path:"",defaults:["en"],getLanguages:Bp,selectLanguage:IC};function Bp(){return EC.get(qn.store,qn.path)||qn.defaults}function IC(r){if(!r)return null;for(let e of Bp())if(r[e])return e;for(let e of Object.keys(r))if(e!="-")return e;return null}kp.exports=qn});var Yp=g((SP,Jp)=>{var re=ss(),TC=r=>/^[A-Z]*$/.test(r),tt=(r,e)=>e.split(".").reduce((t,n)=>t&&t[n]?t[n]:null,r),PC=r=>((r instanceof Array?r:[r]).forEach(t=>{t["@context"]="https://gbv.github.io/jskos/context.json"}),r),ps=r=>(Object.keys(r).forEach(e=>{TC(e)||e.startsWith("_")?delete r[e]:r[e]!=null&&typeof r[e]=="object"&&(r[e]=ps(r[e]))}),r),MC=ps,On=(r,e=[],t=!0)=>{e=e.concat(["ancestors","narrower","broader","mappings","memberList","TOPCONCEPTS","MAPPINGS","PROVIDER"]);let n=Array.isArray(r)?[]:{};for(let i in r)if(!(t&&i[0]=="_")){if(e.includes(i))if(r[i]&&Array.isArray(r[i])){r[i].length>0?n[i]=[null]:n[i]=[];continue}else{n[i]=null;continue}if(i=="inScheme"){let s=[];for(let a of r.inScheme){let o={uri:a.uri};a.notation&&(o.notation=a.notation),a.prefLabel&&(o.prefLabel=a.prefLabel),s.push(o)}n.inScheme=s;continue}r[i]!=null&&typeof r[i]=="object"?n[i]=On(r[i]):n[i]=r[i]}return n},RC=On,cs=r=>r?(r.uri?[r.uri]:[]).concat(r.identifier||[]):[],mr=(r,e)=>{if(r==null&&e==null)return!0;let t=s=>s.replace("http://").replace("https://"),n=cs(r).map(t),i=cs(e).map(t);return re.intersection(n,i).length>0},LC=mr,jC=mr,NC=mr,UC=r=>re.get(r,"type",[]).includes("http://www.w3.org/2004/02/skos/core#Concept")||re.get(r,"inScheme")!=null||re.get(r,"topConceptOf")!=null,$p=r=>re.get(r,"type",[]).includes("http://www.w3.org/2004/02/skos/core#ConceptScheme"),zp=(r,e)=>{if(!r||!e)return!1;for(let t of e)if(mr(r,t))return!0;return!1},DC=zp,FC=(r,e=!1)=>r.sort((t,n)=>{let i=re.get(t,"notation[0]"),s=re.get(n,"notation[0]");if(i&&s&&(i=i.toLowerCase(),s=s.toLowerCase()),e&&(i=parseFloat(i)||i,s=parseFloat(s)||s),(!i||!s||i==s)&&(i=t.uri,s=n.uri),i&&s){if(i>s)return 1;if(i<s)return-1}return 0}),BC=r=>{let e=["notation[0]",["prefLabel.de","prefLabel.en"],"uri"];return r.sort((t,n)=>{for(let i of e){let s,a;if(Array.isArray(i))for(let o of i)s=s||re.get(t,o),a=a||re.get(n,o);else s=re.get(t,i),a=re.get(n,i);if(s!=null&&a!=null){if(s=s.toLowerCase(),a=a.toLowerCase(),s>a)return 1;if(s<a)return-1}}return 0})},kC=r=>{let e=re.pick(On(r),["from","to","fromScheme","toScheme","creator","contributor","type","created","modified","note","identifier","uri","partOf"]);for(let t of[e.from,e.to])re.forOwn(t,(n,i)=>{let s=[];for(let a of n)s.push(re.pick(a,["uri","notation"]));t[i]=s});return e.fromScheme&&(e.fromScheme=re.pick(e.fromScheme,["uri","notation"])),e.toScheme&&(e.toScheme=re.pick(e.toScheme,["uri","notation"])),e.partOf&&(e.partOf=e.partOf.map(t=>re.pick(t,["uri"]))),e},Hp=as(),jt=function(r){for(let e of Hp)if(r==e.uri)return e;return null},Wp=jt("http://www.w3.org/2004/02/skos/core#mappingRelation"),$C=function(r,e=Wp){let t;return Array.isArray(r)&&r.length>0?t=r[0]:t=r,jt(t)||e},zC=(r,e={})=>{let{language:t}=e,n=tt(r,"from.memberSet.0.notation.0"),i=tt(r,"to.memberSet.0.notation.0");n=n!==null?n:"",i=i!==null?i:"";let s=jt(tt(r,"type.0"));s=s?s.SHORT:"";let a="",o="",u="";return t&&(a=tt(r,`from.memberSet.0.prefLabel.${t}`),o=tt(r,`to.memberSet.0.prefLabel.${t}`),u=tt(r,`creator.0.prefLabel.${t}`)),{fromNotation:n,toNotation:i,fromLabel:a,toLabel:o,type:s,creator:u}},HC=(r={})=>{let e=r.delimiter||",",t=r.quoteChar||'"',n=r.lineTerminator||`
|
|
12
|
-
`,i=t+t,s=a=>t+(a==null?"":a.split(t).join(i))+t;return a=>a.map(s).join(e)+n},Rr=(r,e)=>{let t=[];for(let n of["from","to"])(e==null||n===e)&&(t=t.concat(re.get(r,`${n}.memberSet`)||re.get(r,`${n}.memberChoice`)||re.get(r,`${n}.memberList`)||[]));return t.filter(n=>n!=null)},WC=(r={})=>{let e=HC(r),t=r.language||"en";r.type==null&&(r.type=!0);let n=a=>{a=a||[];let o=[];for(let u of["from","to"]){r.schemes&&o.push(`${u}Scheme`);let m=Math.max(...a.map(h=>Rr(h,u).length),1);for(let h=0;h<m;h+=1)o.push(`${u}Notation${h?h+1:""}`),r.labels&&o.push(`${u}Label${h?h+1:""}`)}return r.type&&o.push("type"),r.creator&&o.push("creator"),e(o)},i=(a,o={})=>{let u=[];for(let m of["from","to"]){r.schemes&&u.push(re.get(a,`${m}Scheme.notation[0]`,""));let h=Rr(a,m),x=o[`${m}Count`];x==null&&(x=h.length),x=Math.max(x,1);for(let w=0;w<x;w+=1)u.push(re.get(h[w],"notation[0]","")),r.labels&&u.push(re.get(h[w],`prefLabel.${t}`,""))}return r.type&&u.push(re.get(jt(re.get(a,"type[0]")),"SHORT","")),r.creator&&u.push(re.get(a,`creator[0].prefLabel.${t}`)),e(u)};return{header:n,fromMapping:i,fromMappings:(a,o={header:!0})=>{let u="";o.header&&(u+=n(a));let m={fromCount:Math.max(...a.map(h=>Rr(h,"from").length)),toCount:Math.max(...a.map(h=>Rr(h,"to").length))};for(let h of a)u+=i(h,m);return u}}};function GC(r,e){return re.isEqualWith(r,e,(t,n,i)=>{let s={[i]:t},a={[i]:n};if(i=="from"||i=="to")return re.isEqualWith(Object.getOwnPropertyNames(re.get(t,i,{})),Object.getOwnPropertyNames(re.get(n,i,{})))?re.isEqualWith(Rr(s,i),Rr(a,i),(o,u,m)=>{if(m!=null)return mr(o,u)}):!1;if(i=="fromScheme"||i=="toScheme")return mr(t,n)})}var{objectTypes:KC,guessObjectType:ls}=Dp(),VC=(r,e)=>{let t=ls(r),n=ls(e);return!(t&&n&&t!=n)},Gp=r=>{Array.isArray(r)&&r.sort((e,t)=>e===null?1:t===null?-1:0)},Kp=(r,e)=>(!r||!e||((Array.isArray(r.identifier)||Array.isArray(e.identifier))&&(r.identifier=re.union(r.identifier||[],e.identifier||[])),!r.uri&&e.uri&&(r.uri=e.uri),r.uri&&e.uri&&r.uri!=e.uri&&!(r.identifier||[]).includes(e.uri)&&(r.identifier=(r.identifier||[]).concat([e.uri])),Array.isArray(r.identifier)&&r.uri&&(r.identifier=r.identifier.filter(t=>t!==r.uri)),(r.identifier||[]).length==0&&delete r.identifier,Gp(r.identifier)),r),Vp=(r,e,t)=>{if(!r||!e)return r||e;t=t||{};let n=t._path||"",i=t.detectMismatch||[],s=t.skipPaths||[],a={};return re.forOwn(r,(o,u)=>{if(!s.includes(n+u))if(Array.isArray(o)&&Array.isArray(e[u]))a[u]=re.unionWith(o,e[u],(m,h)=>re.isObject(m)&&re.isObject(h)?mr(m,h):m===h),Gp(a[u]);else if(re.isObject(o)&&re.isObject(e[u]))a[u]=Vp(o,e[u],Object.assign({_path:`${n}${u}.`},t));else{if(o&&e[u]&&i.includes(n+u)&&!re.isEqualWith(o,e[u]))throw new Error("Property mismatch in "+n+u);a[u]=o}}),re.forOwn(e,(o,u)=>{r[u]||(a[u]=o)}),n==""&&re.omitMod(a,s),t.mergeUris&&Kp(a,e),a},hs=r=>Array.isArray(r)?r.map(e=>hs(e)):re.isObject(r)?(re.forOwn(r,(e,t)=>{r[t]=hs(e)}),r):re.isString(r)?r.normalize():r,JC=r=>{var e=/^[A-Za-z][A-Za-z0-9+\-.]*:(?:\/\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$/;return r.match(e)!==null},YC={mappingsByConcepts:(r,e,t)=>{let n=["memberSet","memberList","memberChoice"],i,s;for(let a of n)i=i||re.get(r,t+"."+a+"[0].notation[0]"),s=s||re.get(e,t+"."+a+"[0].notation[0]");return i==null||i<s?-1:s==null||i>s?1:0}},XC=(r,e)=>!r||!e?!1:[r.uri].concat(Object.values(r.identities||{}).map(t=>t.uri)).filter(t=>t!=null).includes(re.get(e,"creator[0].uri")),ZC=us(),QC=fs();function eE(r,e){let t;if(r&&r.notation&&r.notation.length)t=r.notation[0],($p(r)||e=="scheme")&&(t=t.toUpperCase());else if(r&&r.inScheme&&r.inScheme[0]&&r.uri)try{t=new ZC(r&&r.inScheme&&r.inScheme[0]).notationFromUri(r.uri)}catch(n){}return t||""}function ds(r,e,{language:t}={}){let n=r&&e?r[e]:r;return n&&(n[t]||(t=QC.selectLanguage(n),t))?n[t]:null}function rE(r,e={}){e=e||{};let t=e.fallbackToUri==null?!0:e.fallbackToUri;return re.get(r,`prefLabel.${e.language}`)||ds(r,"prefLabel",e)||(t&&r&&r.uri?r.uri:"")}function tE(r,e={}){e=e||{};let t=re.get(r,`definition.${e.language}`)||ds(r,"definition",e)||[];return re.isString(t)&&(t=[t]),t}function nE(r){return re.get(r,"stored",re.get(r,"constructor.stored",re.get(r,"provider.constructor.stored",!1)))}function iE(r){return re.isString(r.creator)?r.creator:r.creator&&r.creator.id}function sE(r){return re.get(r,"creator.name")||""}function aE(r,e){return!!(r&&re.isString(r.creator)?e&&e.includes(r.creator):e&&r.creator&&e.includes(r.creator.id))}Jp.exports={addContext:PC,clean:ps,cleanJSKOS:MC,copyDeep:On,deepCopy:RC,getAllUris:cs,compare:mr,compareObjects:LC,compareSchemes:jC,compareConcepts:NC,isConcept:UC,isScheme:$p,isContainedIn:zp,isSchemeInList:DC,sortConcepts:FC,sortSchemes:BC,minifyMapping:kC,mappingTypes:Hp,mappingTypeByUri:jt,mappingTypeByType:$C,flattenMapping:zC,mappingCSV:WC,defaultMappingType:Wp,conceptsOfMapping:Rr,compareMappingsDeep:GC,objectTypes:KC,guessObjectType:ls,matchObjectTypes:VC,mergeUris:Kp,merge:Vp,normalize:hs,isValidUri:JC,compareFunctions:YC,userOwnsMapping:XC,notation:eE,languageMapContent:ds,prefLabel:rE,definition:tE,mappingRegistryIsStored:nE,annotationCreatorUri:iE,annotationCreatorName:sE,annotationCreatorMatches:aE}});var We=g((AP,Xp)=>{var oE=Lp(),uE=Yp(),fE=us(),cE=fs();Xp.exports=Object.assign({ConceptScheme:fE,languagePreference:cE},oE,uE)});var ed=g((Qp,ms)=>{(function(r){if(typeof Qp=="object"&&typeof ms!="undefined")ms.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.localforage=r()}})(function(){var r,e,t;return function n(i,s,a){function o(h,x){if(!s[h]){if(!i[h]){var w=typeof ct=="function"&&ct;if(!x&&w)return w(h,!0);if(u)return u(h,!0);var A=new Error("Cannot find module '"+h+"'");throw A.code="MODULE_NOT_FOUND",A}var y=s[h]={exports:{}};i[h][0].call(y.exports,function(M){var H=i[h][1][M];return o(H||M)},y,y.exports,n,i,s,a)}return s[h].exports}for(var u=typeof ct=="function"&&ct,m=0;m<a.length;m++)o(a[m]);return o}({1:[function(n,i,s){(function(a){"use strict";var o=a.MutationObserver||a.WebKitMutationObserver,u;if(o){var m=0,h=new o(M),x=a.document.createTextNode("");h.observe(x,{characterData:!0}),u=function(){x.data=m=++m%2}}else if(!a.setImmediate&&typeof a.MessageChannel!="undefined"){var w=new a.MessageChannel;w.port1.onmessage=M,u=function(){w.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?u=function(){var K=a.document.createElement("script");K.onreadystatechange=function(){M(),K.onreadystatechange=null,K.parentNode.removeChild(K),K=null},a.document.documentElement.appendChild(K)}:u=function(){setTimeout(M,0)};var A,y=[];function M(){A=!0;for(var K,te,D=y.length;D;){for(te=y,y=[],K=-1;++K<D;)te[K]();D=y.length}A=!1}i.exports=H;function H(K){y.push(K)===1&&!A&&u()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(n,i,s){"use strict";var a=n(1);function o(){}var u={},m=["REJECTED"],h=["FULFILLED"],x=["PENDING"];i.exports=w;function w(O){if(typeof O!="function")throw new TypeError("resolver must be a function");this.state=x,this.queue=[],this.outcome=void 0,O!==o&&H(this,O)}w.prototype.catch=function(O){return this.then(null,O)},w.prototype.then=function(O,Q){if(typeof O!="function"&&this.state===h||typeof Q!="function"&&this.state===m)return this;var W=new this.constructor(o);if(this.state!==x){var de=this.state===h?O:Q;y(W,de,this.outcome)}else this.queue.push(new A(W,O,Q));return W};function A(O,Q,W){this.promise=O,typeof Q=="function"&&(this.onFulfilled=Q,this.callFulfilled=this.otherCallFulfilled),typeof W=="function"&&(this.onRejected=W,this.callRejected=this.otherCallRejected)}A.prototype.callFulfilled=function(O){u.resolve(this.promise,O)},A.prototype.otherCallFulfilled=function(O){y(this.promise,this.onFulfilled,O)},A.prototype.callRejected=function(O){u.reject(this.promise,O)},A.prototype.otherCallRejected=function(O){y(this.promise,this.onRejected,O)};function y(O,Q,W){a(function(){var de;try{de=Q(W)}catch(qe){return u.reject(O,qe)}de===O?u.reject(O,new TypeError("Cannot resolve promise with itself")):u.resolve(O,de)})}u.resolve=function(O,Q){var W=K(M,Q);if(W.status==="error")return u.reject(O,W.value);var de=W.value;if(de)H(O,de);else{O.state=h,O.outcome=Q;for(var qe=-1,ve=O.queue.length;++qe<ve;)O.queue[qe].callFulfilled(Q)}return O},u.reject=function(O,Q){O.state=m,O.outcome=Q;for(var W=-1,de=O.queue.length;++W<de;)O.queue[W].callRejected(Q);return O};function M(O){var Q=O&&O.then;if(O&&(typeof O=="object"||typeof O=="function")&&typeof Q=="function")return function(){Q.apply(O,arguments)}}function H(O,Q){var W=!1;function de(Ie){W||(W=!0,u.reject(O,Ie))}function qe(Ie){W||(W=!0,u.resolve(O,Ie))}function ve(){Q(qe,de)}var Ne=K(ve);Ne.status==="error"&&de(Ne.value)}function K(O,Q){var W={};try{W.value=O(Q),W.status="success"}catch(de){W.status="error",W.value=de}return W}w.resolve=te;function te(O){return O instanceof this?O:u.resolve(new this(o),O)}w.reject=D;function D(O){var Q=new this(o);return u.reject(Q,O)}w.all=Z;function Z(O){var Q=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var W=O.length,de=!1;if(!W)return this.resolve([]);for(var qe=new Array(W),ve=0,Ne=-1,Ie=new this(o);++Ne<W;)Ge(O[Ne],Ne);return Ie;function Ge(ur,Or){Q.resolve(ur).then(ke,function(fr){de||(de=!0,u.reject(Ie,fr))});function ke(fr){qe[Or]=fr,++ve===W&&!de&&(de=!0,u.resolve(Ie,qe))}}}w.race=ee;function ee(O){var Q=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var W=O.length,de=!1;if(!W)return this.resolve([]);for(var qe=-1,ve=new this(o);++qe<W;)Ne(O[qe]);return ve;function Ne(Ie){Q.resolve(Ie).then(function(Ge){de||(de=!0,u.resolve(ve,Ge))},function(Ge){de||(de=!0,u.reject(ve,Ge))})}}},{1:1}],3:[function(n,i,s){(function(a){"use strict";typeof a.Promise!="function"&&(a.Promise=n(2))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(n,i,s){"use strict";var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function o(f,v){if(!(f instanceof v))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(f){return}}var m=u();function h(){try{if(!m||!m.open)return!1;var f=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),v=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||v)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(c){return!1}}function x(f,v){f=f||[],v=v||{};try{return new Blob(f,v)}catch(_){if(_.name!=="TypeError")throw _;for(var c=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,b=new c,S=0;S<f.length;S+=1)b.append(f[S]);return b.getBlob(v.type)}}typeof Promise=="undefined"&&n(3);var w=Promise;function A(f,v){v&&f.then(function(c){v(null,c)},function(c){v(c)})}function y(f,v,c){typeof v=="function"&&f.then(v),typeof c=="function"&&f.catch(c)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function H(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var K="local-forage-detect-blob-support",te=void 0,D={},Z=Object.prototype.toString,ee="readonly",O="readwrite";function Q(f){for(var v=f.length,c=new ArrayBuffer(v),b=new Uint8Array(c),S=0;S<v;S++)b[S]=f.charCodeAt(S);return c}function W(f){return new w(function(v){var c=f.transaction(K,O),b=x([""]);c.objectStore(K).put(b,"key"),c.onabort=function(S){S.preventDefault(),S.stopPropagation(),v(!1)},c.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),_=navigator.userAgent.match(/Edge\//);v(_||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function de(f){return typeof te=="boolean"?w.resolve(te):W(f).then(function(v){return te=v,te})}function qe(f){var v=D[f.name],c={};c.promise=new w(function(b,S){c.resolve=b,c.reject=S}),v.deferredOperations.push(c),v.dbReady?v.dbReady=v.dbReady.then(function(){return c.promise}):v.dbReady=c.promise}function ve(f){var v=D[f.name],c=v.deferredOperations.pop();if(c)return c.resolve(),c.promise}function Ne(f,v){var c=D[f.name],b=c.deferredOperations.pop();if(b)return b.reject(v),b.promise}function Ie(f,v){return new w(function(c,b){if(D[f.name]=D[f.name]||d(),f.db)if(v)qe(f),f.db.close();else return c(f.db);var S=[f.name];v&&S.push(f.version);var _=m.open.apply(m,S);v&&(_.onupgradeneeded=function(E){var L=_.result;try{L.createObjectStore(f.storeName),E.oldVersion<=1&&L.createObjectStore(K)}catch(N){if(N.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw N}}),_.onerror=function(E){E.preventDefault(),b(_.error)},_.onsuccess=function(){var E=_.result;E.onversionchange=function(L){L.target.close()},c(E),ve(f)}})}function Ge(f){return Ie(f,!1)}function ur(f){return Ie(f,!0)}function Or(f,v){if(!f.db)return!0;var c=!f.db.objectStoreNames.contains(f.storeName),b=f.version<f.db.version,S=f.version>f.db.version;if(b&&(f.version!==v&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),S||c){if(c){var _=f.db.version+1;_>f.version&&(f.version=_)}return!0}return!1}function ke(f){return new w(function(v,c){var b=new FileReader;b.onerror=c,b.onloadend=function(S){var _=btoa(S.target.result||"");v({__local_forage_encoded_blob:!0,data:_,type:f.type})},b.readAsBinaryString(f)})}function fr(f){var v=Q(atob(f.data));return x([v],{type:f.type})}function ir(f){return f&&f.__local_forage_encoded_blob}function Un(f){var v=this,c=v._initReady().then(function(){var b=D[v._dbInfo.name];if(b&&b.dbReady)return b.dbReady});return y(c,f,f),c}function l(f){qe(f);for(var v=D[f.name],c=v.forages,b=0;b<c.length;b++){var S=c[b];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return f.db=null,Ge(f).then(function(_){return f.db=_,Or(f)?ur(f):_}).then(function(_){f.db=v.db=_;for(var E=0;E<c.length;E++)c[E]._dbInfo.db=_}).catch(function(_){throw Ne(f,_),_})}function p(f,v,c,b){b===void 0&&(b=1);try{var S=f.db.transaction(f.storeName,v);c(null,S)}catch(_){if(b>0&&(!f.db||_.name==="InvalidStateError"||_.name==="NotFoundError"))return w.resolve().then(function(){if(!f.db||_.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),ur(f)}).then(function(){return l(f).then(function(){p(f,v,c,b-1)})}).catch(c);c(_)}}function d(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function q(f){var v=this,c={db:null};if(f)for(var b in f)c[b]=f[b];var S=D[c.name];S||(S=d(),D[c.name]=S),S.forages.push(v),v._initReady||(v._initReady=v.ready,v.ready=Un);var _=[];function E(){return w.resolve()}for(var L=0;L<S.forages.length;L++){var N=S.forages[L];N!==v&&_.push(N._initReady().catch(E))}var U=S.forages.slice(0);return w.all(_).then(function(){return c.db=S.db,Ge(c)}).then(function(k){return c.db=k,Or(c,v._defaultConfig.version)?ur(c):k}).then(function(k){c.db=S.db=k,v._dbInfo=c;for(var X=0;X<U.length;X++){var ue=U[X];ue!==v&&(ue._dbInfo.db=c.db,ue._dbInfo.version=c.version)}})}function C(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){p(c._dbInfo,ee,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=N.get(f);U.onsuccess=function(){var k=U.result;k===void 0&&(k=null),ir(k)&&(k=fr(k)),S(k)},U.onerror=function(){_(U.error)}}catch(k){_(k)}})}).catch(_)});return A(b,v),b}function I(f,v){var c=this,b=new w(function(S,_){c.ready().then(function(){p(c._dbInfo,ee,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=N.openCursor(),k=1;U.onsuccess=function(){var X=U.result;if(X){var ue=X.value;ir(ue)&&(ue=fr(ue));var he=f(ue,X.key,k++);he!==void 0?S(he):X.continue()}else S()},U.onerror=function(){_(U.error)}}catch(X){_(X)}})}).catch(_)});return A(b,v),b}function P(f,v,c){var b=this;f=M(f);var S=new w(function(_,E){var L;b.ready().then(function(){return L=b._dbInfo,Z.call(v)==="[object Blob]"?de(L.db).then(function(N){return N?v:ke(v)}):v}).then(function(N){p(b._dbInfo,O,function(U,k){if(U)return E(U);try{var X=k.objectStore(b._dbInfo.storeName);N===null&&(N=void 0);var ue=X.put(N,f);k.oncomplete=function(){N===void 0&&(N=null),_(N)},k.onabort=k.onerror=function(){var he=ue.error?ue.error:ue.transaction.error;E(he)}}catch(he){E(he)}})}).catch(E)});return A(S,c),S}function T(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){p(c._dbInfo,O,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=N.delete(f);L.oncomplete=function(){S()},L.onerror=function(){_(U.error)},L.onabort=function(){var k=U.error?U.error:U.transaction.error;_(k)}}catch(k){_(k)}})}).catch(_)});return A(b,v),b}function j(f){var v=this,c=new w(function(b,S){v.ready().then(function(){p(v._dbInfo,O,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),N=L.clear();E.oncomplete=function(){b()},E.onabort=E.onerror=function(){var U=N.error?N.error:N.transaction.error;S(U)}}catch(U){S(U)}})}).catch(S)});return A(c,f),c}function B(f){var v=this,c=new w(function(b,S){v.ready().then(function(){p(v._dbInfo,ee,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),N=L.count();N.onsuccess=function(){b(N.result)},N.onerror=function(){S(N.error)}}catch(U){S(U)}})}).catch(S)});return A(c,f),c}function Y(f,v){var c=this,b=new w(function(S,_){if(f<0){S(null);return}c.ready().then(function(){p(c._dbInfo,ee,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=!1,k=N.openKeyCursor();k.onsuccess=function(){var X=k.result;if(!X){S(null);return}f===0||U?S(X.key):(U=!0,X.advance(f))},k.onerror=function(){_(k.error)}}catch(X){_(X)}})}).catch(_)});return A(b,v),b}function V(f){var v=this,c=new w(function(b,S){v.ready().then(function(){p(v._dbInfo,ee,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),N=L.openKeyCursor(),U=[];N.onsuccess=function(){var k=N.result;if(!k){b(U);return}U.push(k.key),k.continue()},N.onerror=function(){S(N.error)}}catch(k){S(k)}})}).catch(S)});return A(c,f),c}function z(f,v){v=H.apply(this,arguments);var c=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||c.name,f.storeName=f.storeName||c.storeName);var b=this,S;if(!f.name)S=w.reject("Invalid arguments");else{var _=f.name===c.name&&b._dbInfo.db,E=_?w.resolve(b._dbInfo.db):Ge(f).then(function(L){var N=D[f.name],U=N.forages;N.db=L;for(var k=0;k<U.length;k++)U[k]._dbInfo.db=L;return L});f.storeName?S=E.then(function(L){if(!!L.objectStoreNames.contains(f.storeName)){var N=L.version+1;qe(f);var U=D[f.name],k=U.forages;L.close();for(var X=0;X<k.length;X++){var ue=k[X];ue._dbInfo.db=null,ue._dbInfo.version=N}var he=new w(function(me,Ae){var Se=m.open(f.name,N);Se.onerror=function(He){var ut=Se.result;ut.close(),Ae(He)},Se.onupgradeneeded=function(){var He=Se.result;He.deleteObjectStore(f.storeName)},Se.onsuccess=function(){var He=Se.result;He.close(),me(He)}});return he.then(function(me){U.db=me;for(var Ae=0;Ae<k.length;Ae++){var Se=k[Ae];Se._dbInfo.db=me,ve(Se._dbInfo)}}).catch(function(me){throw(Ne(f,me)||w.resolve()).catch(function(){}),me})}}):S=E.then(function(L){qe(f);var N=D[f.name],U=N.forages;L.close();for(var k=0;k<U.length;k++){var X=U[k];X._dbInfo.db=null}var ue=new w(function(he,me){var Ae=m.deleteDatabase(f.name);Ae.onerror=function(){var Se=Ae.result;Se&&Se.close(),me(Ae.error)},Ae.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},Ae.onsuccess=function(){var Se=Ae.result;Se&&Se.close(),he(Se)}});return ue.then(function(he){N.db=he;for(var me=0;me<U.length;me++){var Ae=U[me];ve(Ae._dbInfo)}}).catch(function(he){throw(Ne(f,he)||w.resolve()).catch(function(){}),he})})}return A(S,v),S}var ae={_driver:"asyncStorage",_initStorage:q,_support:h(),iterate:I,getItem:C,setItem:P,removeItem:T,clear:j,length:B,key:Y,keys:V,dropInstance:z};function se(){return typeof openDatabase=="function"}var fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye="~~local_forage_type~",ge=/^~~local_forage_type~([^~]+)~/,ie="__lfsc__:",oe=ie.length,le="arbf",Ue="blob",Oe="si08",Te="ui08",Ke="uic8",Nr="si16",Cr="si32",Ur="ur16",Er="ui32",Ft="fl32",Ir="fl64",ws=oe+le.length,bs=Object.prototype.toString;function xs(f){var v=f.length*.75,c=f.length,b,S=0,_,E,L,N;f[f.length-1]==="="&&(v--,f[f.length-2]==="="&&v--);var U=new ArrayBuffer(v),k=new Uint8Array(U);for(b=0;b<c;b+=4)_=fe.indexOf(f[b]),E=fe.indexOf(f[b+1]),L=fe.indexOf(f[b+2]),N=fe.indexOf(f[b+3]),k[S++]=_<<2|E>>4,k[S++]=(E&15)<<4|L>>2,k[S++]=(L&3)<<6|N&63;return U}function Dn(f){var v=new Uint8Array(f),c="",b;for(b=0;b<v.length;b+=3)c+=fe[v[b]>>2],c+=fe[(v[b]&3)<<4|v[b+1]>>4],c+=fe[(v[b+1]&15)<<2|v[b+2]>>6],c+=fe[v[b+2]&63];return v.length%3===2?c=c.substring(0,c.length-1)+"=":v.length%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function ld(f,v){var c="";if(f&&(c=bs.call(f)),f&&(c==="[object ArrayBuffer]"||f.buffer&&bs.call(f.buffer)==="[object ArrayBuffer]")){var b,S=ie;f instanceof ArrayBuffer?(b=f,S+=le):(b=f.buffer,c==="[object Int8Array]"?S+=Oe:c==="[object Uint8Array]"?S+=Te:c==="[object Uint8ClampedArray]"?S+=Ke:c==="[object Int16Array]"?S+=Nr:c==="[object Uint16Array]"?S+=Ur:c==="[object Int32Array]"?S+=Cr:c==="[object Uint32Array]"?S+=Er:c==="[object Float32Array]"?S+=Ft:c==="[object Float64Array]"?S+=Ir:v(new Error("Failed to get type for BinaryArray"))),v(S+Dn(b))}else if(c==="[object Blob]"){var _=new FileReader;_.onload=function(){var E=ye+f.type+"~"+Dn(this.result);v(ie+Ue+E)},_.readAsArrayBuffer(f)}else try{v(JSON.stringify(f))}catch(E){console.error("Couldn't convert value into a JSON string: ",f),v(null,E)}}function hd(f){if(f.substring(0,oe)!==ie)return JSON.parse(f);var v=f.substring(ws),c=f.substring(oe,ws),b;if(c===Ue&&ge.test(v)){var S=v.match(ge);b=S[1],v=v.substring(S[0].length)}var _=xs(v);switch(c){case le:return _;case Ue:return x([_],{type:b});case Oe:return new Int8Array(_);case Te:return new Uint8Array(_);case Ke:return new Uint8ClampedArray(_);case Nr:return new Int16Array(_);case Ur:return new Uint16Array(_);case Cr:return new Int32Array(_);case Er:return new Uint32Array(_);case Ft:return new Float32Array(_);case Ir:return new Float64Array(_);default:throw new Error("Unkown type: "+c)}}var Fn={serialize:ld,deserialize:hd,stringToBuffer:xs,bufferToString:Dn};function Ss(f,v,c,b){f.executeSql("CREATE TABLE IF NOT EXISTS "+v.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,b)}function pd(f){var v=this,c={db:null};if(f)for(var b in f)c[b]=typeof f[b]!="string"?f[b].toString():f[b];var S=new w(function(_,E){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(L){return E(L)}c.db.transaction(function(L){Ss(L,c,function(){v._dbInfo=c,_()},function(N,U){E(U)})},E)});return c.serializer=Fn,S}function cr(f,v,c,b,S,_){f.executeSql(c,b,S,function(E,L){L.code===L.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[v.storeName],function(N,U){U.rows.length?_(N,L):Ss(N,v,function(){N.executeSql(c,b,S,_)},_)},_):_(E,L)},_)}function dd(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[f],function(N,U){var k=U.rows.length?U.rows.item(0).value:null;k&&(k=E.serializer.deserialize(k)),S(k)},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function md(f,v){var c=this,b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"SELECT * FROM "+E.storeName,[],function(N,U){for(var k=U.rows,X=k.length,ue=0;ue<X;ue++){var he=k.item(ue),me=he.value;if(me&&(me=E.serializer.deserialize(me)),me=f(me,he.key,ue+1),me!==void 0){S(me);return}}S()},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function As(f,v,c,b){var S=this;f=M(f);var _=new w(function(E,L){S.ready().then(function(){v===void 0&&(v=null);var N=v,U=S._dbInfo;U.serializer.serialize(v,function(k,X){X?L(X):U.db.transaction(function(ue){cr(ue,U,"INSERT OR REPLACE INTO "+U.storeName+" (key, value) VALUES (?, ?)",[f,k],function(){E(N)},function(he,me){L(me)})},function(ue){if(ue.code===ue.QUOTA_ERR){if(b>0){E(As.apply(S,[f,N,c,b-1]));return}L(ue)}})})}).catch(L)});return A(_,c),_}function gd(f,v,c){return As.apply(this,[f,v,c,1])}function vd(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[f],function(){S()},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function yd(f){var v=this,c=new w(function(b,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){cr(E,_,"DELETE FROM "+_.storeName,[],function(){b()},function(L,N){S(N)})})}).catch(S)});return A(c,f),c}function _d(f){var v=this,c=new w(function(b,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){cr(E,_,"SELECT COUNT(key) as c FROM "+_.storeName,[],function(L,N){var U=N.rows.item(0).c;b(U)},function(L,N){S(N)})})}).catch(S)});return A(c,f),c}function wd(f,v){var c=this,b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[f+1],function(N,U){var k=U.rows.length?U.rows.item(0).key:null;S(k)},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function bd(f){var v=this,c=new w(function(b,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){cr(E,_,"SELECT key FROM "+_.storeName,[],function(L,N){for(var U=[],k=0;k<N.rows.length;k++)U.push(N.rows.item(k).key);b(U)},function(L,N){S(N)})})}).catch(S)});return A(c,f),c}function xd(f){return new w(function(v,c){f.transaction(function(b){b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,_){for(var E=[],L=0;L<_.rows.length;L++)E.push(_.rows.item(L).name);v({db:f,storeNames:E})},function(S,_){c(_)})},function(b){c(b)})})}function Sd(f,v){v=H.apply(this,arguments);var c=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||c.name,f.storeName=f.storeName||c.storeName);var b=this,S;return f.name?S=new w(function(_){var E;f.name===c.name?E=b._dbInfo.db:E=openDatabase(f.name,"","",0),f.storeName?_({db:E,storeNames:[f.storeName]}):_(xd(E))}).then(function(_){return new w(function(E,L){_.db.transaction(function(N){function U(he){return new w(function(me,Ae){N.executeSql("DROP TABLE IF EXISTS "+he,[],function(){me()},function(Se,He){Ae(He)})})}for(var k=[],X=0,ue=_.storeNames.length;X<ue;X++)k.push(U(_.storeNames[X]));w.all(k).then(function(){E()}).catch(function(he){L(he)})},function(N){L(N)})})}):S=w.reject("Invalid arguments"),A(S,v),S}var Ad={_driver:"webSQLStorage",_initStorage:pd,_support:se(),iterate:md,getItem:dd,setItem:gd,removeItem:vd,clear:yd,length:_d,key:wd,keys:bd,dropInstance:Sd};function qd(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(f){return!1}}function qs(f,v){var c=f.name+"/";return f.storeName!==v.storeName&&(c+=f.storeName+"/"),c}function Od(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch(v){return!0}}function Cd(){return!Od()||localStorage.length>0}function Ed(f){var v=this,c={};if(f)for(var b in f)c[b]=f[b];return c.keyPrefix=qs(f,v._defaultConfig),Cd()?(v._dbInfo=c,c.serializer=Fn,w.resolve()):w.reject()}function Id(f){var v=this,c=v.ready().then(function(){for(var b=v._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var _=localStorage.key(S);_.indexOf(b)===0&&localStorage.removeItem(_)}});return A(c,f),c}function Td(f,v){var c=this;f=M(f);var b=c.ready().then(function(){var S=c._dbInfo,_=localStorage.getItem(S.keyPrefix+f);return _&&(_=S.serializer.deserialize(_)),_});return A(b,v),b}function Pd(f,v){var c=this,b=c.ready().then(function(){for(var S=c._dbInfo,_=S.keyPrefix,E=_.length,L=localStorage.length,N=1,U=0;U<L;U++){var k=localStorage.key(U);if(k.indexOf(_)===0){var X=localStorage.getItem(k);if(X&&(X=S.serializer.deserialize(X)),X=f(X,k.substring(E),N++),X!==void 0)return X}}});return A(b,v),b}function Md(f,v){var c=this,b=c.ready().then(function(){var S=c._dbInfo,_;try{_=localStorage.key(f)}catch(E){_=null}return _&&(_=_.substring(S.keyPrefix.length)),_});return A(b,v),b}function Rd(f){var v=this,c=v.ready().then(function(){for(var b=v._dbInfo,S=localStorage.length,_=[],E=0;E<S;E++){var L=localStorage.key(E);L.indexOf(b.keyPrefix)===0&&_.push(L.substring(b.keyPrefix.length))}return _});return A(c,f),c}function Ld(f){var v=this,c=v.keys().then(function(b){return b.length});return A(c,f),c}function jd(f,v){var c=this;f=M(f);var b=c.ready().then(function(){var S=c._dbInfo;localStorage.removeItem(S.keyPrefix+f)});return A(b,v),b}function Nd(f,v,c){var b=this;f=M(f);var S=b.ready().then(function(){v===void 0&&(v=null);var _=v;return new w(function(E,L){var N=b._dbInfo;N.serializer.serialize(v,function(U,k){if(k)L(k);else try{localStorage.setItem(N.keyPrefix+f,U),E(_)}catch(X){(X.name==="QuotaExceededError"||X.name==="NS_ERROR_DOM_QUOTA_REACHED")&&L(X),L(X)}})})});return A(S,c),S}function Ud(f,v){if(v=H.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var c=this.config();f.name=f.name||c.name,f.storeName=f.storeName||c.storeName}var b=this,S;return f.name?S=new w(function(_){f.storeName?_(qs(f,b._defaultConfig)):_(f.name+"/")}).then(function(_){for(var E=localStorage.length-1;E>=0;E--){var L=localStorage.key(E);L.indexOf(_)===0&&localStorage.removeItem(L)}}):S=w.reject("Invalid arguments"),A(S,v),S}var Dd={_driver:"localStorageWrapper",_initStorage:Ed,_support:qd(),iterate:Pd,getItem:Td,setItem:Nd,removeItem:jd,clear:Id,length:Ld,key:Md,keys:Rd,dropInstance:Ud},Fd=function(v,c){return v===c||typeof v=="number"&&typeof c=="number"&&isNaN(v)&&isNaN(c)},Bd=function(v,c){for(var b=v.length,S=0;S<b;){if(Fd(v[S],c))return!0;S++}return!1},Os=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},ot={},Cs={},Dr={INDEXEDDB:ae,WEBSQL:Ad,LOCALSTORAGE:Dd},kd=[Dr.INDEXEDDB._driver,Dr.WEBSQL._driver,Dr.LOCALSTORAGE._driver],Bt=["dropInstance"],Bn=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Bt),$d={description:"",driver:kd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function zd(f,v){f[v]=function(){var c=arguments;return f.ready().then(function(){return f[v].apply(f,c)})}}function kn(){for(var f=1;f<arguments.length;f++){var v=arguments[f];if(v)for(var c in v)v.hasOwnProperty(c)&&(Os(v[c])?arguments[0][c]=v[c].slice():arguments[0][c]=v[c])}return arguments[0]}var Hd=function(){function f(v){o(this,f);for(var c in Dr)if(Dr.hasOwnProperty(c)){var b=Dr[c],S=b._driver;this[c]=S,ot[S]||this.defineDriver(b)}this._defaultConfig=kn({},$d),this._config=kn({},this._defaultConfig,v),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(c){if((typeof c=="undefined"?"undefined":a(c))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in c){if(b==="storeName"&&(c[b]=c[b].replace(/\W/g,"_")),b==="version"&&typeof c[b]!="number")return new Error("Database version must be a number.");this._config[b]=c[b]}return"driver"in c&&c.driver?this.setDriver(this._config.driver):!0}else return typeof c=="string"?this._config[c]:this._config},f.prototype.defineDriver=function(c,b,S){var _=new w(function(E,L){try{var N=c._driver,U=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!c._driver){L(U);return}for(var k=Bn.concat("_initStorage"),X=0,ue=k.length;X<ue;X++){var he=k[X],me=!Bd(Bt,he);if((me||c[he])&&typeof c[he]!="function"){L(U);return}}var Ae=function(){for(var ut=function(Kd){return function(){var Vd=new Error("Method "+Kd+" is not implemented by the current driver"),Es=w.reject(Vd);return A(Es,arguments[arguments.length-1]),Es}},$n=0,Gd=Bt.length;$n<Gd;$n++){var zn=Bt[$n];c[zn]||(c[zn]=ut(zn))}};Ae();var Se=function(ut){ot[N]&&console.info("Redefining LocalForage driver: "+N),ot[N]=c,Cs[N]=ut,E()};"_support"in c?c._support&&typeof c._support=="function"?c._support().then(Se,L):Se(!!c._support):Se(!0)}catch(He){L(He)}});return y(_,b,S),_},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(c,b,S){var _=ot[c]?w.resolve(ot[c]):w.reject(new Error("Driver not found."));return y(_,b,S),_},f.prototype.getSerializer=function(c){var b=w.resolve(Fn);return y(b,c),b},f.prototype.ready=function(c){var b=this,S=b._driverSet.then(function(){return b._ready===null&&(b._ready=b._initDriver()),b._ready});return y(S,c,c),S},f.prototype.setDriver=function(c,b,S){var _=this;Os(c)||(c=[c]);var E=this._getSupportedDrivers(c);function L(){_._config.driver=_.driver()}function N(X){return _._extend(X),L(),_._ready=_._initStorage(_._config),_._ready}function U(X){return function(){var ue=0;function he(){for(;ue<X.length;){var me=X[ue];return ue++,_._dbInfo=null,_._ready=null,_.getDriver(me).then(N).catch(he)}L();var Ae=new Error("No available storage method found.");return _._driverSet=w.reject(Ae),_._driverSet}return he()}}var k=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=k.then(function(){var X=E[0];return _._dbInfo=null,_._ready=null,_.getDriver(X).then(function(ue){_._driver=ue._driver,L(),_._wrapLibraryMethodsWithReady(),_._initDriver=U(E)})}).catch(function(){L();var X=new Error("No available storage method found.");return _._driverSet=w.reject(X),_._driverSet}),y(this._driverSet,b,S),this._driverSet},f.prototype.supports=function(c){return!!Cs[c]},f.prototype._extend=function(c){kn(this,c)},f.prototype._getSupportedDrivers=function(c){for(var b=[],S=0,_=c.length;S<_;S++){var E=c[S];this.supports(E)&&b.push(E)}return b},f.prototype._wrapLibraryMethodsWithReady=function(){for(var c=0,b=Bn.length;c<b;c++)zd(this,Bn[c])},f.prototype.createInstance=function(c){return new f(c)},f}(),Wd=new Hd;i.exports=Wd},{3:3}]},{},[4])(4)})});var od=g((ys,ad)=>{"use strict";(function(r,e,t){let n;(n=t.define)&&n.amd?n([],function(){return e}):(n=t.modules)?n[r.toLowerCase()]=e:typeof ys=="object"?ad.exports=e:t[r]=e})("FlexSearch",function r(e){function t(l,p){let d=p?p.id:l&&l.id;this.id=d||d===0?d:Ge++,this.init(l,p),o(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)}),o(this,"length",function(){return this.index.length})}function n(l,p,d,q){return this.u!==this.g&&(this.o=this.o.concat(d),this.u++,q&&this.o.length>=q&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(p,this.o),this.F&&this.F(this.o))),this}function i(l){let p=W();for(let d in l)if(l.hasOwnProperty(d)){let q=l[d];D(q)?p[d]=q.slice(0):ee(q)?p[d]=i(q):p[d]=q}return p}function s(l,p){let d=l.length,q=Z(p),C=[];for(let I=0,P=0;I<d;I++){let T=l[I];(q&&p(T)||!q&&!p[T])&&(C[P++]=T)}return C}function a(l,p,d,q,C,I,P,T,j,B){d=K(d,P?0:C,T,I,p,j,B);let Y;if(T&&(T=d.page,Y=d.next,d=d.result),P)p=this.where(P,null,C,d);else{for(p=d,d=this.l,C=p.length,I=Array(C),P=0;P<C;P++)I[P]=d[p[P]];p=I}return d=p,q&&(Z(q)||(ke=q.split(":"),1<ke.length?q=M:(ke=ke[0],q=y)),d.sort(q)),d=H(T,Y,d),this.cache&&this.j.set(l,d),d}function o(l,p,d){Object.defineProperty(l,p,{get:d})}function u(l){return new RegExp(l,"g")}function m(l,p){for(let d=0;d<p.length;d+=2)l=l.replace(p[d],p[d+1]);return l}function h(l,p,d,q,C,I,P,T){return p[d]?p[d]:(C=C?(T-(P||T/1.5))*I+(P||T/1.5)*C:I,p[d]=C,C>=P&&(l=l[T-(C+.5>>0)],l=l[d]||(l[d]=[]),l[l.length]=q),C)}function x(l,p){if(l){let d=Object.keys(l);for(let q=0,C=d.length;q<C;q++){let I=d[q],P=l[I];if(P)for(let T=0,j=P.length;T<j;T++)if(P[T]===p){j===1?delete l[I]:P.splice(T,1);break}else ee(P[T])&&x(P[T],p)}}}function w(l){let p="",d="";var q="";for(let C=0;C<l.length;C++){let I=l[C];I!==d&&(C&&I==="h"?(q=q==="a"||q==="e"||q==="i"||q==="o"||q==="u"||q==="y",((d==="a"||d==="e"||d==="i"||d==="o"||d==="u"||d==="y")&&q||d===" ")&&(p+=I)):p+=I),q=C===l.length-1?"":l[C+1],d=I}return p}function A(l,p){return l=l.length-p.length,0>l?1:l?-1:0}function y(l,p){return l=l[ke],p=p[ke],l<p?-1:l>p?1:0}function M(l,p){let d=ke.length;for(let q=0;q<d;q++)l=l[ke[q]],p=p[ke[q]];return l<p?-1:l>p?1:0}function H(l,p,d){return l?{page:l,next:p?""+p:null,result:d}:d}function K(l,p,d,q,C,I,P){let T,j=[];if(d===!0){d="0";var B=""}else B=d&&d.split(":");let Y=l.length;if(1<Y){let ge=W(),ie=[],oe,le;var V=0,z;let Ue;var ae=!0;let Oe,Te=0,Ke,Nr,Cr,Ur;if(B&&(B.length===2?(Cr=B,B=!1):B=Ur=parseInt(B[0],10)),P){for(oe=W();V<Y;V++)if(C[V]==="not")for(le=l[V],Ue=le.length,z=0;z<Ue;z++)oe["@"+le[z]]=1;else Nr=V+1;if(O(Nr))return H(d,T,j);V=0}else Ke=te(C)&&C;let Er;for(;V<Y;V++){let Ft=V===(Nr||Y)-1;if(!Ke||!V)if((z=Ke||C&&C[V])&&z!=="and")if(z==="or")Er=!1;else continue;else Er=I=!0;if(le=l[V],Ue=le.length){if(ae)if(Oe){var se=Oe.length;for(z=0;z<se;z++){ae=Oe[z];var fe="@"+ae;P&&oe[fe]||(ge[fe]=1,I||(j[Te++]=ae))}Oe=null,ae=!1}else{Oe=le;continue}for(fe=!1,z=0;z<Ue;z++){se=le[z];var ye="@"+se;let Ir=I?ge[ye]||0:V;if(!(!Ir&&!q||P&&oe[ye]||!I&&ge[ye]))if(Ir===V){if(Ft){if((!Ur||--Ur<Te)&&(j[Te++]=se,p&&Te===p))return H(d,Te+(B||0),j)}else ge[ye]=V+1;fe=!0}else q&&(ye=ie[Ir]||(ie[Ir]=[]),ye[ye.length]=se)}if(Er&&!fe&&!q)break}else if(Er&&!q)return H(d,T,le)}if(Oe)if(V=Oe.length,P)for(z=B?parseInt(B,10):0;z<V;z++)l=Oe[z],oe["@"+l]||(j[Te++]=l);else j=Oe;if(q){for(Te=j.length,Cr?(V=parseInt(Cr[0],10)+1,z=parseInt(Cr[1],10)+1):(V=ie.length,z=0);V--;)if(se=ie[V]){for(Ue=se.length;z<Ue;z++)if(q=se[z],(!P||!oe["@"+q])&&(j[Te++]=q,p&&Te===p))return H(d,V+":"+z,j);z=0}}}else!Y||C&&C[0]==="not"||(j=l[0],B&&(B=parseInt(B[0],10)));return p&&(P=j.length,B&&B>P&&(B=0),B=B||0,T=B+p,T<P?j=j.slice(B,T):(T=0,B&&(j=j.slice(B)))),H(d,T,j)}function te(l){return typeof l=="string"}function D(l){return l.constructor===Array}function Z(l){return typeof l=="function"}function ee(l){return typeof l=="object"}function O(l){return typeof l=="undefined"}function Q(l){let p=Array(l);for(let d=0;d<l;d++)p[d]=W();return p}function W(){return Object.create(null)}function de(){let l,p;self.onmessage=function(d){if(d=d.data)if(d.search){let q=p.search(d.content,d.threshold?{limit:d.limit,threshold:d.threshold,where:d.where}:d.limit);self.postMessage({id:l,content:d.content,limit:d.limit,result:q})}else d.add?p.add(d.id,d.content):d.update?p.update(d.id,d.content):d.remove?p.remove(d.id):d.clear?p.clear():d.info?(d=p.info(),d.worker=l,console.log(d)):d.register&&(l=d.id,d.options.cache=!1,d.options.async=!1,d.options.worker=!1,p=new Function(d.register.substring(d.register.indexOf("{")+1,d.register.lastIndexOf("}")))(),p=new p(d.options))}}function qe(l,p,d,q){l=e("flexsearch","id"+l,de,function(I){(I=I.data)&&I.result&&q(I.id,I.content,I.result,I.limit,I.where,I.cursor,I.suggest)},p);let C=r.toString();return d.id=p,l.postMessage({register:C,options:d,id:p}),l}let ve={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},Ne={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},Ie=[],Ge=0,ur={},Or={};t.create=function(l,p){return new t(l,p)},t.registerMatcher=function(l){for(let p in l)l.hasOwnProperty(p)&&Ie.push(u(p),l[p]);return this},t.registerEncoder=function(l,p){return ir[l]=p.bind(ir),this},t.registerLanguage=function(l,p){return ur[l]=p.filter,Or[l]=p.stemmer,this},t.encode=function(l,p){return ir[l](p)},t.prototype.init=function(l,p){if(this.v=[],p){var d=p.preset;l=p}else l||(l=ve),d=l.preset;if(p={},te(l)?(p=Ne[l],l={}):d&&(p=Ne[d]),d=l.worker)if(typeof Worker=="undefined")l.worker=!1,this.m=null;else{var q=parseInt(d,10)||4;this.C=-1,this.u=0,this.o=[],this.F=null,this.m=Array(q);for(var C=0;C<q;C++)this.m[C]=qe(this.id,C,l,n.bind(this))}if(this.f=l.tokenize||p.f||this.f||ve.f,this.split=O(d=l.split)?this.split||ve.split:te(d)?u(d):d,this.D=l.rtl||this.D||ve.D,this.async=typeof Promise=="undefined"||O(d=l.async)?this.async||ve.async:d,this.g=O(d=l.worker)?this.g||ve.g:d,this.threshold=O(d=l.threshold)?p.threshold||this.threshold||ve.threshold:d,this.b=O(d=l.resolution)?d=p.b||this.b||ve.b:d,d<=this.threshold&&(this.b=this.threshold+1),this.depth=this.f!=="strict"||O(d=l.depth)?p.depth||this.depth||ve.depth:d,this.w=(d=O(d=l.encode)?p.encode||ve.encode:d)&&ir[d]&&ir[d].bind(ir)||(Z(d)?d:this.w||!1),(d=l.matcher)&&this.addMatcher(d),d=(p=l.lang)||l.filter){if(te(d)&&(d=ur[d]),D(d)){q=this.w,C=W();for(var I=0;I<d.length;I++){var P=q?q(d[I]):d[I];C[P]=1}d=C}this.filter=d}if(d=p||l.stemmer){var T;p=te(d)?Or[d]:d,q=this.w,C=[];for(T in p)p.hasOwnProperty(T)&&(I=q?q(T):T,C.push(u(I+"($|\\W)"),q?q(p[T]):p[T]));this.stemmer=T=C}if(this.a=C=(d=l.doc)?i(d):this.a||ve.a,this.i=Q(this.b-(this.threshold||0)),this.h=W(),this.c=W(),C){if(this.l=W(),l.doc=null,T=C.index={},p=C.keys=[],q=C.field,I=C.tag,P=C.store,D(C.id)||(C.id=C.id.split(":")),P){var j=W();if(te(P))j[P]=1;else if(D(P))for(let B=0;B<P.length;B++)j[P[B]]=1;else ee(P)&&(j=P);C.store=j}if(I){if(this.G=W(),P=W(),q)if(te(q))P[q]=l;else if(D(q))for(j=0;j<q.length;j++)P[q[j]]=l;else ee(q)&&(P=q);for(D(I)||(C.tag=I=[I]),q=0;q<I.length;q++)this.G[I[q]]=W();this.I=I,q=P}if(q){let B;for(D(q)||(ee(q)?(B=q,C.field=q=Object.keys(q)):C.field=q=[q]),C=0;C<q.length;C++)I=q[C],D(I)||(B&&(l=B[I]),p[C]=I,q[C]=I.split(":")),T[I]=new t(l)}l.doc=d}return this.B=!0,this.j=(this.cache=d=O(d=l.cache)?this.cache||ve.cache:d)?new Un(d):!1,this},t.prototype.encode=function(l){return l&&(Ie.length&&(l=m(l,Ie)),this.v.length&&(l=m(l,this.v)),this.w&&(l=this.w(l)),this.stemmer&&(l=m(l,this.stemmer))),l},t.prototype.addMatcher=function(l){let p=this.v;for(let d in l)l.hasOwnProperty(d)&&p.push(u(d),l[d]);return this},t.prototype.add=function(l,p,d,q,C){if(this.a&&ee(l))return this.A("add",l,p);if(p&&te(p)&&(l||l===0)){var I="@"+l;if(this.c[I]&&!q)return this.update(l,p);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:l,content:p}),this.c[I]=""+this.C,d&&d(),this;if(!C){if(this.async&&typeof importScripts!="function"){let ie=this;if(I=new Promise(function(oe){setTimeout(function(){ie.add(l,p,null,q,!0),ie=null,oe()})}),d)I.then(d);else return I;return this}if(d)return this.add(l,p,null,q,!0),d(),this}if(p=this.encode(p),!p.length)return this;d=this.f,C=Z(d)?d(p):p.split(this.split),this.filter&&(C=s(C,this.filter));let V=W();V._ctx=W();let z=C.length,ae=this.threshold,se=this.depth,fe=this.b,ye=this.i,ge=this.D;for(let ie=0;ie<z;ie++){var P=C[ie];if(P){var T=P.length,j=(ge?ie+1:z-ie)/z,B="";switch(d){case"reverse":case"both":for(var Y=T;--Y;)B=P[Y]+B,h(ye,V,B,l,ge?1:(T-Y)/T,j,ae,fe-1);B="";case"forward":for(Y=0;Y<T;Y++)B+=P[Y],h(ye,V,B,l,ge?(Y+1)/T:1,j,ae,fe-1);break;case"full":for(Y=0;Y<T;Y++){let oe=(ge?Y+1:T-Y)/T;for(let le=T;le>Y;le--)B=P.substring(Y,le),h(ye,V,B,l,oe,j,ae,fe-1)}break;default:if(T=h(ye,V,P,l,1,j,ae,fe-1),se&&1<z&&T>=ae)for(T=V._ctx[P]||(V._ctx[P]=W()),P=this.h[P]||(this.h[P]=Q(fe-(ae||0))),j=ie-se,B=ie+se+1,0>j&&(j=0),B>z&&(B=z);j<B;j++)j!==ie&&h(P,T,C[j],l,0,fe-(j<ie?ie-j:j-ie),ae,fe-1)}}}this.c[I]=1,this.B=!1}return this},t.prototype.A=function(l,p,d){if(D(p)){var q=p.length;if(q--){for(var C=0;C<q;C++)this.A(l,p[C]);return this.A(l,p[q],d)}}else{var I=this.a.index,P=this.a.keys,T=this.a.tag;C=this.a.store;var j,B=this.a.id;q=p;for(var Y=0;Y<B.length;Y++)q=q[B[Y]];if(l==="remove"&&(delete this.l[q],B=P.length,B--)){for(p=0;p<B;p++)I[P[p]].remove(q);return I[P[B]].remove(q,d)}if(T){for(j=0;j<T.length;j++){var V=T[j],z=p;for(B=V.split(":"),Y=0;Y<B.length;Y++)z=z[B[Y]];z="@"+z}j=this.G[V],j=j[z]||(j[z]=[])}B=this.a.field;for(let ae=0,se=B.length;ae<se;ae++){for(V=B[ae],T=p,z=0;z<V.length;z++)T=T[V[z]];V=I[P[ae]],z=l==="add"?V.add:V.update,ae===se-1?z.call(V,q,T,d):z.call(V,q,T)}if(C){for(d=Object.keys(C),l=W(),I=0;I<d.length;I++)if(P=d[I],C[P]){P=P.split(":");let ae,se;for(B=0;B<P.length;B++)T=P[B],ae=(ae||p)[T],se=(se||l)[T]=ae}p=l}j&&(j[j.length]=p),this.l[q]=p}return this},t.prototype.update=function(l,p,d){return this.a&&ee(l)?this.A("update",l,p):(this.c["@"+l]&&te(p)&&(this.remove(l),this.add(l,p,d,!0)),this)},t.prototype.remove=function(l,p,d){if(this.a&&ee(l))return this.A("remove",l,p);var q="@"+l;if(this.c[q]){if(this.g)return this.m[this.c[q]].postMessage({remove:!0,id:l}),delete this.c[q],p&&p(),this;if(!d){if(this.async&&typeof importScripts!="function"){let C=this;if(q=new Promise(function(I){setTimeout(function(){C.remove(l,null,!0),C=null,I()})}),p)q.then(p);else return q;return this}if(p)return this.remove(l,null,!0),p(),this}for(p=0;p<this.b-(this.threshold||0);p++)x(this.i[p],l);this.depth&&x(this.h,l),delete this.c[q],this.B=!1}return this};let ke;t.prototype.search=function(l,p,d,q){if(ee(p)){if(D(p))for(var C=0;C<p.length;C++)p[C].query=l;else p.query=l;l=p,p=1e3}else p&&Z(p)?(d=p,p=1e3):p||p===0||(p=1e3);if(this.g){this.F=d,this.u=0,this.o=[];for(var I=0;I<this.g;I++)this.m[I].postMessage({search:!0,limit:p,content:l})}else{var P=[],T=l;if(ee(l)&&!D(l)){d||(d=l.callback)&&(T.callback=null);var j=l.sort,B=l.page;p=l.limit,I=l.threshold;var Y=l.suggest;l=l.query}if(this.a){I=this.a.index;let ge=T.where;var V=T.bool||"or",z=T.field;let ie=V,oe,le;if(z)D(z)||(z=[z]);else if(D(T)){var ae=T;z=[],ie=[];for(var se=0;se<T.length;se++)q=T[se],C=q.bool||V,z[se]=q.field,ie[se]=C,C==="not"?oe=!0:C==="and"&&(le=!0)}else z=this.a.keys;for(V=z.length,se=0;se<V;se++)ae&&(T=ae[se]),B&&!te(T)&&(T.page=null,T.limit=0),P[se]=I[z[se]].search(T,0);if(d)return d(a.call(this,l,ie,P,j,p,Y,ge,B,le,oe));if(this.async){let Ue=this;return new Promise(function(Oe){Promise.all(P).then(function(Te){Oe(a.call(Ue,l,ie,Te,j,p,Y,ge,B,le,oe))})})}return a.call(this,l,ie,P,j,p,Y,ge,B,le,oe)}if(I||(I=this.threshold||0),!q){if(this.async&&typeof importScripts!="function"){let ge=this;if(I=new Promise(function(ie){setTimeout(function(){ie(ge.search(T,p,null,!0)),ge=null})}),d)I.then(d);else return I;return this}if(d)return d(this.search(T,p,null,!0)),this}if(!l||!te(l))return P;if(T=l,this.cache)if(this.B){if(d=this.j.get(l))return d}else this.j.clear(),this.B=!0;if(T=this.encode(T),!T.length)return P;d=this.f,d=Z(d)?d(T):T.split(this.split),this.filter&&(d=s(d,this.filter)),ae=d.length,q=!0,C=[];var fe=W(),ye=0;if(1<ae&&(this.depth&&this.f==="strict"?V=!0:d.sort(A)),!V||(se=this.h)){let ge=this.b;for(;ye<ae;ye++){let ie=d[ye];if(ie){if(V){if(!z){if(se[ie])z=ie,fe[ie]=1;else if(!Y)return P}if(Y&&ye===ae-1&&!C.length)V=!1,ie=z||ie,fe[ie]=0;else if(!z)continue}if(!fe[ie]){let oe=[],le=!1,Ue=0,Oe=V?se[z]:this.i;if(Oe){let Te;for(let Ke=0;Ke<ge-I;Ke++)(Te=Oe[Ke]&&Oe[Ke][ie])&&(oe[Ue++]=Te,le=!0)}if(le)z=ie,C[C.length]=1<Ue?oe.concat.apply([],oe):oe[0];else if(!Y){q=!1;break}fe[ie]=1}}}}else q=!1;return q&&(P=K(C,p,B,Y)),this.cache&&this.j.set(l,P),P}},t.prototype.find=function(l,p){return this.where(l,p,1)[0]||null},t.prototype.where=function(l,p,d,q){let C=this.l,I=[],P=0,T;var j;let B;if(ee(l)){d||(d=p);var Y=Object.keys(l),V=Y.length;if(T=!1,V===1&&Y[0]==="id")return[C[l.id]];if((j=this.I)&&!q)for(var z=0;z<j.length;z++){var ae=j[z],se=l[ae];if(!O(se)){if(B=this.G[ae]["@"+se],--V===0)return B;Y.splice(Y.indexOf(ae),1),delete l[ae];break}}for(j=Array(V),z=0;z<V;z++)j[z]=Y[z].split(":")}else{if(Z(l)){for(p=q||Object.keys(C),d=p.length,Y=0;Y<d;Y++)V=C[p[Y]],l(V)&&(I[P++]=V);return I}if(O(p))return[C[l]];if(l==="id")return[C[p]];Y=[l],V=1,j=[l.split(":")],T=!0}for(q=B||q||Object.keys(C),z=q.length,ae=0;ae<z;ae++){se=B?q[ae]:C[q[ae]];let fe=!0;for(let ye=0;ye<V;ye++){T||(p=l[Y[ye]]);let ge=j[ye],ie=ge.length,oe=se;if(1<ie)for(let le=0;le<ie;le++)oe=oe[ge[le]];else oe=oe[ge[0]];if(oe!==p){fe=!1;break}}if(fe&&(I[P++]=se,d&&P===d))break}return I},t.prototype.info=function(){if(this.g)for(let l=0;l<this.g;l++)this.m[l].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:Ie.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&this.f==="strict"}},t.prototype.clear=function(){return this.destroy().init()},t.prototype.destroy=function(){if(this.cache&&(this.j.clear(),this.j=null),this.i=this.h=this.c=null,this.a){let l=this.a.keys;for(let p=0;p<l.length;p++)this.a.index[l[p]].destroy();this.a=this.l=null}return this},t.prototype.export=function(l){let p=!l||O(l.serialize)||l.serialize;if(this.a){let q=!l||O(l.doc)||l.doc;var d=!l||O(l.index)||l.index;l=[];let C=0;if(d)for(d=this.a.keys;C<d.length;C++){let I=this.a.index[d[C]];l[C]=[I.i,I.h,Object.keys(I.c)]}q&&(l[C]=this.l)}else l=[this.i,this.h,Object.keys(this.c)];return p&&(l=JSON.stringify(l)),l},t.prototype.import=function(l,p){(!p||O(p.serialize)||p.serialize)&&(l=JSON.parse(l));let d=W();if(this.a){var q=!p||O(p.doc)||p.doc,C=0;if(!p||O(p.index)||p.index){p=this.a.keys;let P=p.length;for(var I=l[0][2];C<I.length;C++)d[I[C]]=1;for(C=0;C<P;C++){I=this.a.index[p[C]];let T=l[C];T&&(I.i=T[0],I.h=T[1],I.c=d)}}q&&(this.l=ee(q)?q:l[C])}else{for(q=l[2],C=0;C<q.length;C++)d[q[C]]=1;this.i=l[0],this.h=l[1],this.c=d}};let fr=function(){let l=u("\\s+"),p=u("[^a-z0-9 ]"),d=[u("[-/]")," ",p,"",l," "];return function(q){return w(m(q.toLowerCase(),d))}}(),ir={icase:function(l){return l.toLowerCase()},simple:function(){let l=u("\\s+"),p=u("[^a-z0-9 ]"),d=u("[-/]"),q=u("[\xE0\xE1\xE2\xE3\xE4\xE5]"),C=u("[\xE8\xE9\xEA\xEB]"),I=u("[\xEC\xED\xEE\xEF]"),P=u("[\xF2\xF3\xF4\xF5\xF6\u0151]"),T=u("[\xF9\xFA\xFB\xFC\u0171]"),j=u("[\xFD\u0177\xFF]"),B=u("\xF1"),Y=u("[\xE7c]"),V=u("\xDF"),z=u(" & "),ae=[q,"a",C,"e",I,"i",P,"o",T,"u",j,"y",B,"n",Y,"k",V,"s",z," and ",d," ",p,"",l," "];return function(se){return se=m(se.toLowerCase(),ae),se===" "?"":se}}(),advanced:function(){let l=u("ae"),p=u("ai"),d=u("ay"),q=u("ey"),C=u("oe"),I=u("ue"),P=u("ie"),T=u("sz"),j=u("zs"),B=u("ck"),Y=u("cc"),V=u("sh"),z=u("th"),ae=u("dt"),se=u("ph"),fe=u("pf"),ye=u("ou"),ge=u("uo"),ie=[l,"a",p,"ei",d,"ei",q,"ei",C,"o",I,"u",P,"i",T,"s",j,"s",V,"s",B,"k",Y,"k",z,"t",ae,"t",se,"f",fe,"f",ye,"o",ge,"u"];return function(oe,le){return oe&&(oe=this.simple(oe),2<oe.length&&(oe=m(oe,ie)),le||1<oe.length&&(oe=w(oe)),oe)}}(),extra:function(){let l=u("p"),p=u("z"),d=u("[cgq]"),q=u("n"),C=u("d"),I=u("[vw]"),P=u("[aeiouy]"),T=[l,"b",p,"s",d,"k",q,"m",C,"t",I,"f",P,""];return function(j){if(!j)return j;if(j=this.advanced(j,!0),1<j.length){j=j.split(" ");for(let B=0;B<j.length;B++){let Y=j[B];1<Y.length&&(j[B]=Y[0]+m(Y.substring(1),T))}j=j.join(" "),j=w(j)}return j}}(),balance:fr},Un=function(){function l(p){this.clear(),this.H=p!==!0&&p}return l.prototype.clear=function(){this.cache=W(),this.count=W(),this.index=W(),this.s=[]},l.prototype.set=function(p,d){if(this.H&&O(this.cache[p])){let q=this.s.length;if(q===this.H){q--;let C=this.s[q];delete this.cache[C],delete this.count[C],delete this.index[C]}this.index[p]=q,this.s[q]=p,this.count[p]=-1,this.cache[p]=d,this.get(p)}else this.cache[p]=d},l.prototype.get=function(p){let d=this.cache[p];if(this.H&&d){var q=++this.count[p];let I=this.index,P=I[p];if(0<P){let T=this.s;for(var C=P;this.count[T[--P]]<=q&&P!==-1;);if(P++,P!==C){for(q=C;q>P;q--)C=T[q-1],T[q]=C,I[C]=q;T[P]=p,I[p]=P}}}return d},l}();return t}(function(){let r={},e=typeof Blob!="undefined"&&typeof URL!="undefined"&&URL.createObjectURL;return function(t,n,i,s,a){return i=e?URL.createObjectURL(new Blob(["("+i.toString()+")()"],{type:"text/javascript"})):t+".min.js",t+="-"+n,r[t]||(r[t]=[]),r[t][a]=new Worker(i),r[t][a].onmessage=s,r[t][a]}}()),ys)});var yE={};Wn(yE,{BaseProvider:()=>pe,CocodaSDK:()=>qr,ConceptApiProvider:()=>tr,LabelSearchSuggestionProvider:()=>wr,LocApiProvider:()=>xr,LocalMappingsProvider:()=>vr,MappingsApiProvider:()=>rr,OccurrencesApiProvider:()=>yr,ReconciliationApiProvider:()=>_r,SkohubProvider:()=>Sr,SkosmosApiProvider:()=>br,addAllProviders:()=>vE,cdk:()=>cd,errors:()=>Fe});var Fe={};Wn(Fe,{BackendError:()=>ht,BackendUnavailableError:()=>pt,CDKError:()=>Ce,InvalidOrMissingParameterError:()=>G,InvalidProviderError:()=>Fr,InvalidRequestError:()=>Xe,MethodNotImplementedError:()=>lt,MissingApiUrlError:()=>$e,NetworkError:()=>dt});var Ce=class extends Error{constructor({message:e="",relatedError:t=null,code:n=null}={}){!e&&t&&t.message&&(e=t.message),super(e),this.name=this.constructor.name,this.relatedError=t,this.code=n}},lt=class extends Ce{constructor(i){var s=i,{method:e,message:t=""}=s,n=J(s,["method","message"]);n.message=`Method not implemented: ${e} (${t})`,super(n)}},G=class extends Ce{constructor(i){var s=i,{parameter:e,message:t=""}=s,n=J(s,["parameter","message"]);n.message=`Invalid or missing parameter: ${e} (${t})`,super(n)}},Xe=class extends Ce{},ht=class extends Ce{},pt=class extends Ce{},dt=class extends Ce{},$e=class extends Ce{},Fr=class extends Ce{};var fd=ce(Yt(),1);var ne=ce(qu(),1),xe=ce(ju(),1),dr=ce(of(),1),xn=ce(Mf(),1),Zi=ce(Gf(),1),Qi=ce(bc(),1),Le=ce(Be(),1),Lt=ce(Ye(),1),be=ce(Sc(),1),es=ce(Dc(),1),Qe=ce(Tl(),1),_C=ce(gh(),1),rs=ce(Ji(),1),sr=ce(_p(),1),ts=ce(bp(),1);var Ar=ce(We(),1);var Dt={};Wn(Dt,{BaseProvider:()=>pe,ConceptApiProvider:()=>tr,LabelSearchSuggestionProvider:()=>wr,LocApiProvider:()=>xr,LocalMappingsProvider:()=>vr,MappingsApiProvider:()=>rr,OccurrencesApiProvider:()=>yr,ReconciliationApiProvider:()=>_r,SkohubProvider:()=>Sr,SkosmosApiProvider:()=>br});var it=ce(We(),1);var En=ce(Yt(),1);var Zp=[{method:"getRegistries",fallback:[],type:"Registries"},{method:"getSchemes",fallback:[],type:"Schemes"},{method:"vocSearch",fallback:[],type:"Schemes"},{method:"getTypes",fallback:[],type:"Types"},{method:"suggest",fallback:["",[],[],[]]},{method:"vocSuggest",fallback:["",[],[],[]]},{method:"getConcordances",fallback:[],type:"Concordances"},{method:"getOccurrences",fallback:[],type:"Occurrences"},{method:"getTop",fallback:[],type:"Concepts"},{method:"getConcepts",fallback:[],type:"Concepts"},{method:"getNarrower",fallback:[],type:"Concepts"},{method:"getAncestors",fallback:[],type:"Concepts"},{method:"search",fallback:[],type:"Concepts"},{method:"getMapping",fallback:null,type:"Mapping"},{method:"getMappings",fallback:[],type:"Mappings"},{method:"postMapping",fallback:null,type:"Mapping"},{method:"postMappings",fallback:[],type:"Mapping"},{method:"putMapping",fallback:null,type:"Mapping"},{method:"patchMapping",fallback:null,type:"Mapping"},{method:"deleteMapping",fallback:!1},{method:"deleteMappings",fallback:[]},{method:"getAnnotations",fallback:[],type:"Annotations"},{method:"postAnnotation",fallback:null,type:"Annotation"},{method:"putAnnotation",fallback:null,type:"Annotation"},{method:"patchAnnotation",fallback:null,type:"Annotation"},{method:"deleteAnnotation",fallback:!1}];function gr(...r){let[e,...t]=r;for(let n of t)e.endsWith("/")||(e+="/"),n.startsWith("/")&&(n=n.slice(1)),e+=n;return e}function nt(r,e){return r._totalCount=e._totalCount,r._url=e._url,r}var Ee=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var pe=class{constructor(e={}){this._jskos=e,this.axios=En.default.create({timeout:2e4}),this._path=typeof window!="undefined"&&window.location.pathname,this.has={},this._defaultLanguages="en,de,fr,es,nl,it,fi,pl,ru,cs,jp".split(","),this.languages=[],this._auth={key:null,bearerToken:null},this._repeating=[],this._api={status:e.status,schemes:Array.isArray(e.schemes)?void 0:e.schemes,top:e.top,data:e.data,concepts:e.concepts,narrower:e.narrower,ancestors:e.ancestors,types:e.types,suggest:e.suggest,search:e.search,"voc-suggest":e["voc-suggest"],"voc-search":e["voc-search"],mappings:e.mappings,concordances:e.concordances,annotations:e.annotations,occurrences:e.occurrences,reconcile:e.reconcile,api:e.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use(n=>{if(!n._skipAdditionalParameters){let i=dr.default([].concat(ne.default(n,"params.language","").split(","),this.languages,this._defaultLanguages).filter(s=>s!="")).join(",");xe.default(n,"params.language",i),this.has.auth&&this._auth.bearerToken&&!ne.default(n,"headers.Authorization")&&xe.default(n,"headers.Authorization",`Bearer ${this._auth.bearerToken}`)}if(n.url.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new En.default.Cancel("Can't call http API from https.");return n}),this.axios.interceptors.response.use(({data:n,headers:i={},config:s={}})=>{n=it.default.normalize(n);let a=s.url;if(a.endsWith("?")||(a+="?"),Qi.default(s.params||{},(o,u)=>{a+=`${u}=${encodeURIComponent(o)}&`}),Le.default(n)||Lt.default(n)){let o=parseInt(i["x-total-count"]);isNaN(o)||(n._totalCount=o),n._url=a}return n},n=>{let i=ne.default(n,"config._retryCount",0),s=ne.default(n,"config.method"),a=ne.default(n,"response.status");return this._retryConfig.methods.includes(s)&&this._retryConfig.statusCodes.includes(a)&&i<this._retryConfig.count?(n.config._retryCount=i+1,n.config.data&&(n.config.data=JSON.parse(n.config.data)),new Promise((o,u)=>{setTimeout(()=>{this.axios(n.config).then(o).catch(u)},(()=>{let m=this._retryConfig.delay;return typeof m=="function"?m(i):m})())})):Promise.reject(n)});let t=[];for(let{method:n,type:i}of Zp){let s=this[n]&&this[n].bind(this);if(!s){this[n]=()=>{throw new lt({method:n})};continue}this[n]=(a={})=>{if(a._raw)return delete a._raw,s(a);let o=t.find(x=>x.method==n&&Qe.default(x.options,a));if(o)return o.promise;let u;a.cancelToken||(u=this.getCancelTokenSource(),a.cancelToken=u.token);let m=this.init().then(()=>s(a)).then(x=>(Le.default(x)&&x._totalCount===void 0?x._totalCount=x.length:Lt.default(x)&&x._totalCount===void 0&&(x._totalCount=1),x&&i&&this[`adjust${i}`]&&(x=this[`adjust${i}`](x)),x)).catch(x=>{throw x instanceof Ce?x:x.response?x.response.status.toString().startsWith(4)?new Xe({relatedError:x,code:x.response.status}):new ht({relatedError:x,code:x.response.status}):x.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new pt({relatedError:x}):new dt({relatedError:x}):new Ce({relatedError:x})});u&&(m.cancel=(...x)=>u.cancel(...x));let h={method:n,options:sr.default(a,["cancelToken"]),promise:m};return t.push(h),m.catch(()=>{}).then(()=>t.splice(t.indexOf(h),1)),m}}}get uri(){return this._jskos.uri}get notation(){return this._jskos.notation}get prefLabel(){return this._jskos.prefLabel}get definition(){return this._jskos.definition}get schemes(){return this._jskos.schemes}get excludedSchemes(){return this._jskos.excludedSchemes}get stored(){return this._jskos.stored!==void 0?this._jskos.stored:this.constructor.stored}init(){return F(this,null,function*(){return this._init?this._init:(this._init=(()=>F(this,null,function*(){this._prepare();let e;if(be.default(this._api.status))try{e=yield this.axios({method:"get",url:this._api.status})}catch(t){ne.default(t,"response.status")===404&&(this._api.status=null)}else e=this._api.status;if(Lt.default(e)&&!es.default(e)){this._config=e.config||{};for(let t of Object.keys(this._api))this._api[t]===void 0&&(this._api[t]=e[t]||null)}this._setup()}))(),this._init)})}_prepare(){}_setup(){}getCancelTokenSource(){return En.default.CancelToken.source()}setAuth({key:e=this._auth.key,bearerToken:t=this._auth.bearerToken}){this._auth.key=e,this._auth.bearerToken=t}setRetryConfig(e={}){this._retryConfig=Object.assign({methods:["get","head","options"],statusCodes:[401,403],count:3,delay:t=>300*t},e)}isAuthorizedFor({type:e,action:t,user:n,crossUser:i}){if(t=="read"&&this.has[e]===!0)return!0;if(!this.has[e])return!1;let s=ne.default(this._config,`${e}.${t}`);if(!s)return!!this.has[e][t];if(s.auth&&(!n||!this._auth.key)||s.auth&&this._auth.key!=ne.default(this._config,"auth.key"))return!1;if(s.auth&&s.identities){let a=[n.uri].concat(Object.values(n.identities||{}).map(o=>o.uri)).filter(o=>o!=null);if(xn.default(a,s.identities).length==0)return!1}if(s.auth&&s.identityProviders){let a=Object.keys(n&&n.identities||{});if(xn.default(a,s.identityProviders).length==0)return!1}return i?!!s.crossUser:!!this.has[e][t]}supportsScheme(e){if(!e)return!1;let t=Le.default(this.schemes)?this.schemes:null;return t==null&&!it.default.isContainedIn(e,this.excludedSchemes||[])?!0:it.default.isContainedIn(e,t)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=t=>this.getNarrower($(R({},t),{concept:e})),e._getAncestors=t=>this.getAncestors($(R({},t),{concept:e})),e._getDetails=t=>F(this,null,function*(){return(yield this.getConcepts($(R({},t),{concepts:[e]})))[0]});for(let t of["broader","narrower","ancestors"])Array.isArray(e[t])&&!e[t].includes(null)&&(e[t]=this.adjustConcepts(e[t]));return e._registry=this,e}adjustConcepts(e){return nt(e.map(t=>this.adjustConcept(t)),e)}adjustRegistries(e){return e}adjustScheme(e){if(!e||e.__SAVED__)return e;let t=e._registry;return e._registry=this.cdk&&this.cdk.registryForScheme(e),!e._registry||t===e._registry||e._registry._api.api===this._api.api?e._registry=t||this:["concepts","topConcepts"].forEach(n=>{Array.isArray(e[n])&&(e[n].length===0||e[n][0]===null)&&delete e[n]}),e._registry&&(e._getTop=n=>e._registry.getTop($(R({},n),{scheme:e})),e._getTypes=n=>e._registry.getTypes($(R({},n),{scheme:e})),e._suggest=s=>{var a=s,{search:n}=a,i=J(a,["search"]);return e._registry.suggest($(R({},i),{search:n,scheme:e}))}),e}adjustSchemes(e){return nt(e.map(t=>this.adjustScheme(t)),e)}adjustConcordances(e){for(let t of e)t._registry=this;return e}adjustMapping(e){for(let t of["from","to"]){let n=`${t}Scheme`;e[n]||(e[n]=ne.default(it.default.conceptsOfMapping(e,t),"[0].inScheme[0]",null))}if(e._registry=this,!e.identifier){let t=ne.default(it.default.addMappingIdentifiers(e),"identifier");t&&(e.identifier=t)}return e}adjustMappings(e){return nt(e.map(t=>this.adjustMapping(t)),e)}postMappings(){return F(this,arguments,function*(n={}){var i=n,{mappings:e}=i,t=J(i,["mappings"]);if(!e||!e.length)throw new G({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:t})})}deleteMappings(){return F(this,arguments,function*(n={}){var i=n,{mappings:e}=i,t=J(i,["mappings"]);if(!e||!e.length)throw new G({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:t})})}_callHelperForArrayWrappers(s){return F(this,arguments,function*({method:e,items:t,itemProperty:n,config:i}){let a=[],o=yield Promise.all(t.map(u=>F(this,null,function*(){try{return yield this[e]($(R({[n]:u},i),{_raw:!0}))}catch(m){return a[t.indexOf(u)]=m,null}})));return o._errors=a,o})}};pe.providerName="Base";var Re=ce(We(),1);var ar=ce(ed(),1);var In,lE=new Uint8Array(16);function gs(){if(!In&&(In=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!In))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return In(lE)}var rd=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function hE(r){return typeof r=="string"&&rd.test(r)}var td=hE;var Me=[];for(Tn=0;Tn<256;++Tn)Me.push((Tn+256).toString(16).substr(1));var Tn;function pE(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Me[r[e+0]]+Me[r[e+1]]+Me[r[e+2]]+Me[r[e+3]]+"-"+Me[r[e+4]]+Me[r[e+5]]+"-"+Me[r[e+6]]+Me[r[e+7]]+"-"+Me[r[e+8]]+Me[r[e+9]]+"-"+Me[r[e+10]]+Me[r[e+11]]+Me[r[e+12]]+Me[r[e+13]]+Me[r[e+14]]+Me[r[e+15]]).toLowerCase();if(!td(t))throw TypeError("Stringified UUID is invalid");return t}var nd=pE;function dE(r,e,t){r=r||{};var n=r.random||(r.rng||gs)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(var i=0;i<16;++i)e[t+i]=n[i];return e}return nd(n)}var Pn=dE;var Mn="urn:uuid:",vr=class extends pe{_prepare(){this.has.mappings={read:!0,create:!0,update:!0,delete:!0},Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this.queue=[],this.localStorageKey="cocoda-mappings--"+this._path;let e="mappings",t=()=>ar.default.getItem(this.localStorageKey).then(n=>{n=n||[];let i=0;for(let s of n.filter(a=>!a.uri||!a.uri.startsWith(Mn)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${Mn}${Pn()}`,i+=1;return i&&console.warn(`URIs added to ${i} local mappings.`),ar.default.setItem(this.localStorageKey,n)});ar.default.getItem(e).then(n=>{n&&console.warn(`Warning: There is old data in local storage (or IndexedDB, depending on the ) with the key "${e}". This data will not be used anymore. A manual export is necessary to get this data back.`)}),this.queue.push(t().catch(n=>{console.warn("Error when adding URIs to local mappings:",n)}))}isAuthorizedFor({type:e,action:t}){return e=="mappings"&&t!="anonymous"}_getMappingsQueue(){let e=rs.default(this.queue)||Promise.resolve();return new Promise(t=>{function n(){var a,o,u=new Promise((m,h)=>{a=m,o=h});return u.resolve=a,u.reject=o,u}let i=n(),s=()=>{i.resolve()};this.queue.push(i),e.then(()=>ar.default.getItem(this.localStorageKey)).then(a=>{t({mappings:a,done:s})})})}getMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(t._raw=!0,!e||!e.uri)throw new G({parameter:"mapping"});return(yield this.getMappings($(R({},t),{uri:e.uri})))[0]})}getMappings(){return F(this,arguments,function*({from:e,fromScheme:t,to:n,toScheme:i,creator:s,type:a,partOf:o,offset:u,limit:m,direction:h,mode:x,identifier:w,uri:A}={}){let y={};return e&&(y.from=be.default(e)?e:e.uri),t&&(y.fromScheme=be.default(t)?{uri:t}:t),n&&(y.to=be.default(n)?n:n.uri),i&&(y.toScheme=be.default(i)?{uri:i}:i),s&&(y.creator=be.default(s)?s:Re.default.prefLabel(s)),a&&(y.type=be.default(a)?a:a.uri),o&&(y.partOf=be.default(o)?o:o.uri),u&&(y.offset=u),m&&(y.limit=m),h&&(y.direction=h),x&&(y.mode=x),w&&(y.identifier=w),A&&(y.uri=A),this._getMappingsQueue().catch(M=>{throw new Ce({message:"Could not get mappings from local storage",relatedError:M})}).then(({mappings:M,done:H})=>{H();let K=(D,Z)=>D.uri==Z||Z&&D.notation&&D.notation[0].toLowerCase()==Z.toLowerCase();if((y.from||y.to)&&(M=M.filter(D=>{let Z=Re.default.conceptsOfMapping(D,"from").find(W=>K(W,y.from))!=null,ee=Re.default.conceptsOfMapping(D,"to").find(W=>K(W,y.from))!=null,O=Re.default.conceptsOfMapping(D,"from").find(W=>K(W,y.to))!=null,Q=Re.default.conceptsOfMapping(D,"to").find(W=>K(W,y.to))!=null;return y.direction=="backward"?y.mode=="or"?y.from&&ee||y.to&&O:(!y.from||ee)&&(!y.to||O):y.direction=="both"?y.mode=="or"?y.from&&(Z||ee)||y.to&&(O||Q):(!y.from||Z)&&(!y.to||Q)||(!y.from||ee)&&(!y.to||O):y.mode=="or"?y.from&&Z||y.to&&Q:(!y.from||Z)&&(!y.to||Q)})),(y.fromScheme||y.toScheme)&&(M=M.filter(D=>{let Z=Re.default.compare(D.fromScheme,y.fromScheme),ee=Re.default.compare(D.toScheme,y.fromScheme),O=Re.default.compare(D.fromScheme,y.toScheme),Q=Re.default.compare(D.toScheme,y.toScheme);return y.direction=="backward"?y.mode=="or"?y.fromScheme&&ee||y.toScheme&&O:(!y.fromScheme||ee)&&(!y.toScheme||O):y.direction=="both"?y.mode=="or"?y.fromScheme&&(Z||ee)||y.toScheme&&(O||Q):(!y.fromScheme||Z)&&(!y.toScheme||Q)||(!y.fromScheme||ee)&&(!y.toScheme||O):y.mode=="or"?y.fromScheme&&Z||y.toScheme&&Q:(!y.fromScheme||Z)&&(!y.toScheme||Q)})),y.creator){let D=y.creator.split("|");M=M.filter(Z=>(Z.creator&&Z.creator.find(ee=>D.includes(Re.default.prefLabel(ee))||D.includes(ee.uri)))!=null)}y.type&&(M=M.filter(D=>(D.type||[Re.default.defaultMappingType.uri]).includes(y.type))),y.partOf&&(M=M.filter(D=>D.partOf!=null&&D.partOf.find(Z=>Re.default.compare(Z,{uri:y.partOf}))!=null)),y.identifier&&(M=M.filter(D=>y.identifier.split("|").map(Z=>(D.identifier||[]).includes(Z)||D.uri==Z).reduce((Z,ee)=>Z||ee))),y.uri&&(M=M.filter(D=>D.uri==y.uri));let te=M.length;return M=M.sort((D,Z)=>{let ee=D.modified||D.created,O=Z.modified||Z.created;return O==null?-1:ee==null?1:ee>O?-1:1}),M=M.slice(y.offset||0),M=M.slice(0,y.limit),M._totalCount=te,M})})}postMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(Mn))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${Mn}${Pn()}`),n.find(s=>s.uri==e.uri))throw i(),new G({parameter:"mapping",message:"Duplicate URI"});e.created||(e.created=new Date().toISOString()),e.modified||(e.modified=e.created),n.push(e),n=n.map(s=>Re.default.minifyMapping(s));try{return yield ar.default.setItem(this.localStorageKey,n),i(),e}catch(s){throw i(),s}})}putMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(a=>a.uri==e.uri);if(s==-1)throw i(),new G({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),n[s]=e,n=n.map(a=>Re.default.minifyMapping(a));try{return yield ar.default.setItem(this.localStorageKey,n),i(),e}catch(a){throw i(),a}})}patchMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(a=>a.uri==e.uri);if(s==-1)throw i(),new G({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),n[s]=Object.assign(n[s],e),n=n.map(a=>Re.default.minifyMapping(a));try{return yield ar.default.setItem(this.localStorageKey,n),i(),e}catch(a){throw i(),a}})}deleteMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();try{return n=n.filter(s=>s.uri!=e.uri),n=n.map(s=>Re.default.minifyMapping(s)),yield ar.default.setItem(this.localStorageKey,n),i(),!0}catch(s){throw i(),s}})}};vr.providerName="LocalMappings";vr.stored=!0;var st=ce(We(),1);var rr=class extends pe{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=gr(this._api.api,"/status")),this.has.mappings=!0,this.has.concordances=!0,this.has.annotations=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=gr(this._api.api,e[t]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!ne.default(this._config,"mappings.read",!0),this.has.mappings.create=!!ne.default(this._config,"mappings.create"),this.has.mappings.update=!!ne.default(this._config,"mappings.update"),this.has.mappings.delete=!!ne.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!ne.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!ne.default(this._config,"concordances.read"),this.has.concordances.create=!!ne.default(this._config,"concordances.create"),this.has.concordances.update=!!ne.default(this._config,"concordances.update"),this.has.concordances.delete=!!ne.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!ne.default(this._config,"annotations.read"),this.has.annotations.create=!!ne.default(this._config,"annotations.create"),this.has.annotations.update=!!ne.default(this._config,"annotations.update"),this.has.annotations.delete=!!ne.default(this._config,"annotations.delete")),this.has.auth=ne.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});if(!e.uri||!e.uri.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});try{return yield this.axios($(R({},t),{url:e.uri,params:R(R({},this._defaultParams),t.params||{})}))}catch(s){if(ne.default(s,"response.status")==404)return null;throw s}})}getMappings(Z){return F(this,null,function*(){var ee=Z,{from:e,fromScheme:t,to:n,toScheme:i,creator:s,type:a,partOf:o,offset:u,limit:m,direction:h,mode:x,identifier:w,cardinality:A,annotatedBy:y,annotatedFor:M,annotatedWith:H,sort:K,order:te}=ee,D=J(ee,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let O={},Q=this._api.mappings;return e&&(O.from=be.default(e)?e:e.uri),t&&(O.fromScheme=be.default(t)?t:t.uri),n&&(O.to=be.default(n)?n:n.uri),i&&(O.toScheme=be.default(i)?i:i.uri),s&&(O.creator=be.default(s)?s:st.default.prefLabel(s)),a&&(O.type=be.default(a)?a:a.uri),o&&(O.partOf=be.default(o)?o:o.uri),u&&(O.offset=u),m&&(O.limit=m),h&&(O.direction=h),A&&(O.cardinality=A),y&&(O.annotatedBy=y),M&&(O.annotatedFor=M),H&&(O.annotatedWith=H),x&&(O.mode=x),w&&(O.identifier=w),K&&(O.sort=K),te&&(O.order=te),this.axios($(R({},D),{method:"get",url:Q,params:R(R(R({},this._defaultParams),D.params||{}),O)}))})}postMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});return e=st.default.minifyMapping(e),e=st.default.addMappingIdentifiers(e),this.axios($(R({},t),{method:"post",url:this._api.mappings,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});e=st.default.minifyMapping(e),e=st.default.addMappingIdentifiers(e);let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:sr.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getAnnotations(n){return F(this,null,function*(){var i=n,{target:e}=i,t=J(i,["target"]);return e&&xe.default(t,"params.target",e),this.axios($(R({},t),{method:"get",url:this._api.annotations}))})}postAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);return this.axios($(R({},t),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new G({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e}))})}patchAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new G({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:e}))})}deleteAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new G({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getConcordances(e){return F(this,null,function*(){return this.axios($(R({},e),{method:"get",url:this._api.concordances}))})}postConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});return this.axios($(R({},t),{method:"post",url:this._api.concordances,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new G({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new G({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:sr.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new G({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}};rr.providerName="MappingsApi";rr.stored=!0;var at=ce(We(),1);var yr=class extends pe{_prepare(){this._cache=[],this._occurrencesSupportedSchemes=[],this.has.occurrences=!0,this.has.mappings=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_occurrencesIsSupported(e){return F(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let n=gr(this._api.api,"voc"),i=yield this.axios({method:"get",url:n});this._occurrencesSupportedSchemes=i||[]}catch(n){}let t=!1;for(let n of this._occurrencesSupportedSchemes)at.default.compare(e,n)&&(t=!0);return t})}getMappings(e){return F(this,null,function*(){let t=yield this.getOccurrences(e),n=ne.default(e,"from.inScheme[0]")||e.fromScheme,i=ne.default(e,"to.inScheme[0]")||e.toScheme,s=[];for(let a of t){if(!a)continue;let o={};o.from=ne.default(a,"memberSet[0]"),o.from?o.from={memberSet:[o.from]}:o.from=null,o.fromScheme=ne.default(a,"memberSet[0].inScheme[0]"),o.to=ne.default(a,"memberSet[1]"),o.to?o.to={memberSet:[o.to]}:o.to={memberSet:[]},o.toScheme=ne.default(a,"memberSet[1].inScheme[0]"),(n&&o.fromScheme&&!at.default.compare(o.fromScheme,n)||i&&o.toScheme&&!at.default.compare(o.toScheme,i))&&([o.from,o.fromScheme,o.to,o.toScheme]=[o.to,o.toScheme,o.from,o.fromScheme]),!o.fromScheme&&n&&(o.fromScheme=n),!o.toScheme&&i&&(o.toScheme=i),o.type=[at.default.defaultMappingType.uri],o._occurrence=a,o=at.default.addMappingIdentifiers(o),a.database&&(o.creator=[a.database]),s.push(o)}return s})}getOccurrences(s){return F(this,null,function*(){var a=s,{from:e,to:t,concepts:n}=a,i=J(a,["from","to","concepts"]);let o=[];n=(n||[]).concat([e,t]).filter(A=>!!A);for(let A of n)o.push(this._occurrencesIsSupported(ne.default(A,"inScheme[0]")).then(y=>y&&A.uri?A.uri:null));let u=yield Promise.all(o);if(u=u.filter(A=>A!=null),u.length==0)throw new G({parameter:"concepts"});o=[];for(let A of u)o.push(this._getOccurrences($(R({},i),{params:{member:A,scheme:"*",threshold:5}})));if(u.length>1){let A=u.join(" ");o.push(this._getOccurrences($(R({},i),{params:{member:A,threshold:5}})))}let m=yield Promise.all(o),h=ts.default([],...m),x=[],w=[];for(let A=0;A<h.length;A+=1){let y=h[A];if(!y)continue;let M=y.memberSet.reduce((H,K)=>H.concat(K.uri),[]).sort().join(" ");x.includes(M)?w.push(A):x.push(M)}return w.forEach(A=>{delete h[A]}),h=h.filter(A=>A!=null),h.sort((A,y)=>parseInt(y.count||0)-parseInt(A.count||0))})}_getOccurrences(e){return F(this,null,function*(){let t=this._cache.find(i=>Qe.default(i.config.params,e.params));if(t)return t.data;let n=yield this.axios($(R({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:n}),this._cache.length>20&&(this._cache=this._cache.slice(this._cache.length-20)),n})}};yr.providerName="OccurrencesApi";yr.stored=!1;var Lr=ce(We(),1),tr=class extends pe{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=gr(this._api.api,"/status")),this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,this.has.auth=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=gr(this._api.api,e[t]))}this.has.schemes=!!this._api.schemes,!this.has.schemes&&Array.isArray(this.schemes)&&(this.has.schemes=!0),this.has.top=!!this._api.top,this.has.data=!!this._api.data,this.has.concepts=!!this._api.concepts||this.has.data,this.has.narrower=!!this._api.narrower,this.has.ancestors=!!this._api.ancestors,this.has.types=!!this._api.types,this.has.suggest=!!this._api.suggest,this.has.search=!!this._api.search,this.has.auth=ne.default(this._config,"auth.key")!=null,this._defaultParams={properties:"+created,issued,modified,editorialNote,scopeNote"}}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{api:e,schemes:[t]}}_getSchemeUri(e){return F(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(s=>Lr.default.compare(e,s));if(t)return t.uri;if(this._rejectedSchemes.find(s=>Lr.default.compare(e,s)))return null;let i=(yield this.getSchemes({params:{uri:Lr.default.getAllUris(e).join("|")}})).find(s=>Lr.default.compare(s,e));return i?(this._approvedSchemes.push({uri:i.uri,identifier:Lr.default.getAllUris(e)}),i.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(e){return F(this,null,function*(){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new $e}let t=yield this.axios($(R({},e),{method:"get",url:this._api.schemes,params:R($(R({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?nt(t.filter(n=>Lr.default.isContainedIn(n,this.schemes)),t):t})}getTop(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);if(!this._api.top)throw new $e;if(!e)throw new G({parameter:"scheme"});let s=yield this._getSchemeUri(e);if(!s)throw new G({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Array.isArray(this._api.top)?this._api.top:this.axios($(R({},t),{method:"get",url:this._api.top,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:s})}))})}getConcepts(n){return F(this,null,function*(){var i=n,{concepts:e}=i,t=J(i,["concepts"]);if(this.has.data===!1)throw new $e;if(!e)throw new G({parameter:"concepts"});Array.isArray(e)||(e=[e]);let s=e.map(a=>a.uri).filter(a=>a!=null);return this.axios($(R({},t),{method:"get",url:this._api.data,params:$(R($(R({},this._defaultParams),{limit:500}),t.params||{}),{uri:s.join("|")})}))})}getNarrower(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!this._api.narrower)throw new $e;if(!e||!e.uri)throw new G({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.narrower,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}getAncestors(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!this._api.ancestors)throw new $e;if(!e||!e.uri)throw new G({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.ancestors,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}suggest(s){return F(this,null,function*(){var a=s,{use:e="notation,label",types:t=[],sort:n="score"}=a,i=J(a,["use","types","sort"]);return this._search($(R({},i),{endpoint:"suggest",params:$(R({},i.params),{type:t.join("|"),use:e,sort:n})}))})}search(n){return F(this,null,function*(){var i=n,{types:e=[]}=i,t=J(i,["types"]);return this._search($(R({},t),{endpoint:"search",params:$(R({},t.params),{type:e.join("|")})}))})}vocSuggest(i){return F(this,null,function*(){var s=i,{use:e="notation,label",sort:t="score"}=s,n=J(s,["use","sort"]);return this._search($(R({},n),{endpoint:"voc-suggest",params:$(R({},n.params),{use:e,sort:t})}))})}vocSearch(e){return F(this,null,function*(){return this._search($(R({},e),{endpoint:"voc-search"}))})}_search(u){return F(this,null,function*(){var m=u,{endpoint:e,scheme:t,search:n,limit:i,offset:s,params:a}=m,o=J(m,["endpoint","scheme","search","limit","offset","params"]);let h=this._api[e];if(!h)throw new $e;if(!n)throw new G({parameter:"search"});i=i||this._jskos.suggestResultLimit||100,s=s||0;let x=t&&(yield this._getSchemeUri(t));return h=h.replace("{searchTerms}",n),this.axios($(R({},o),{params:$(R(R({},this._defaultParams),a),{limit:i,count:i,offset:s,search:n,query:n,voc:x}),method:"get",url:h}))})}getTypes(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);if(!this._api.types)throw new $e;if(Array.isArray(this._api.types))return this._api.types;let s=e&&(yield this._getSchemeUri(e));return s&&xe.default(t,"params.uri",s),this.axios($(R({},t),{method:"get",url:this._api.types}))})}};tr.providerName="ConceptApi";tr.providerType="http://bartoc.org/api-type/jskos";var Nt=ce(We(),1);var _r=class extends pe{_prepare(){this._cache=[],this.has.mappings=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}getMappings(s){return F(this,null,function*(){var a=s,{from:e,to:t,mode:n}=a,i=J(a,["from","to","mode"]);let o=[];Le.default(this.schemes)&&(o=this.schemes);let u,m,h=ne.default(e,"inScheme[0]"),x=ne.default(t,"inScheme[0]"),w,A;if(!e||Nt.default.isContainedIn(h,o)?(u=!0,m=t,w=x,A=o.find(O=>Nt.default.compare(O,h))||o[0]):(u=!1,m=e,w=h,A=o.find(O=>Nt.default.compare(O,x))||o[0]),n!="or")return[];if(!this._api.api)throw new $e;if(!m)throw new G({parameter:u?"to":"from"});let y=Nt.default.languagePreference.selectLanguage(m.prefLabel);if(!y)throw new G({parameter:u?"to":"from",message:"Missing language"});let M=ne.default(m,`altLabel.${y}`,[]);be.default(M)&&(M=[M]);let H=ne.default(m,`prefLabel.${y}`),K=M.concat([H]);K=[H];let{url:te,data:D}=yield this._getReconciliationResults($(R({},i),{labels:K,language:y}));D=[].concat(...Object.values(D).map(O=>O.result)).filter(O=>O),D=D.sort((O,Q)=>O.score!=Q.score?Q.score-O.score:O.match!=Q.match?O.match?-1:1:O.id.length-Q.id.length);let Z=ne.default(A,"namespace",""),ee=D.map(O=>({fromScheme:w,from:{memberSet:[m]},toScheme:A,to:{memberSet:[{uri:Z+O.id}]},type:[O.match?"http://www.w3.org/2004/02/skos/core#exactMatch":O.score>=80?"http://www.w3.org/2004/02/skos/core#closeMatch":"http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return u&&(ee=ee.map(O=>Object.assign(O,{fromScheme:O.toScheme,from:O.to,toScheme:O.fromScheme,to:O.from}))),ee._url=te,ee})}_getReconciliationResults(i){return F(this,null,function*(){var s=i,{labels:e,language:t}=s,n=J(s,["labels","language"]);e=e.sort();let a=this._cache.find(A=>Qe.default(A.labels,e)&&A.language==t);if(a)return a;let o={},u=0;for(let A of e)o[`q${u}`]={query:A},u+=1;let m=this._api.api;t&&(m=m.replace("{language}",t));let h=`queries=${encodeURIComponent(JSON.stringify(o))}`;xe.default(n,["headers","Content-Type"],"application/x-www-form-urlencoded");let x=yield this.axios($(R({},n),{method:"post",url:m,data:h}));x=x||{};let w={labels:e,language:t,data:x,url:`${m}${m.includes("?")?"&":"?"}${h}`};return this._cache.push(w),this._cache.length>20&&(this._cache=this._cache.slice(this._cache.length-20)),w})}};_r.providerName="ReconciliationApi";_r.stored=!1;var Ut=ce(We(),1);var wr=class extends pe{_prepare(){this._cache=[],this.has.mappings=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}supportsScheme(e){return ne.default(e,"_registry.has.search",!1)}getMappings(o){return F(this,null,function*(){var u=o,{from:e,to:t,mode:n,selected:i,limit:s=10}=u,a=J(u,["from","to","mode","selected","limit"]);if(n!="or")return[];if(!i)throw new G({parameter:"selected"});let m=[];e&&this.supportsScheme(i.scheme[!1])?m.push(this._getMappings($(R({},a),{concept:e,sourceScheme:i.scheme[!0],targetScheme:i.scheme[!1],limit:s}))):m.push(Promise.resolve([])),t&&this.supportsScheme(i.scheme[!0])?m.push(this._getMappings($(R({},a),{concept:t,sourceScheme:i.scheme[!1],targetScheme:i.scheme[!0],limit:s,swap:!0}))):m.push(Promise.resolve([]));let[h,x]=yield Promise.all(m);for(x=x.filter(w=>!h.find(A=>Ut.default.compareMappingMembers(w,A)));h.length+x.length>s;)x.length>=h.length?x=x.slice(0,-1):h=h.slice(0,-1);return Zi.default(h,x)})}_getMappings(o){return F(this,null,function*(){var u=o,{concept:e,sourceScheme:t,targetScheme:n,limit:i,swap:s=!1}=u,a=J(u,["concept","sourceScheme","targetScheme","limit","swap"]);if(!e||!t||!n)return[];if(Ut.default.compare(t,n))return[];let m=Ut.default.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],h=Ut.default.prefLabel(e,{fallbackToUri:!1,language:m});if(!h)return[];let x=/^[\s\wäüöÄÜÖß]*\w/.exec(h);h=x?x[0]:h;let A=(yield this._getResults($(R({},a),{label:h,targetScheme:n,limit:i}))).map(y=>({fromScheme:t,from:{memberSet:[e]},toScheme:n,to:{memberSet:[y]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(A=A.map(y=>Object.assign(y,{fromScheme:y.toScheme,from:y.to,toScheme:y.fromScheme,to:y.from}))),A})}_getResults(s){return F(this,null,function*(){var a=s,{label:e,targetScheme:t,limit:n}=a,i=J(a,["label","targetScheme","limit"]);let o=(this._cache[t.uri]||{})[e];if(o&&o._limit>=n)return o;let u=ne.default(t,"_registry");if(!u||u.has.search===!1)return[];let m=yield u.search($(R({},i),{search:e,scheme:t,limit:n}));return this._cache[t.uri]||(this._cache[t.uri]={}),this._cache[t.uri][e]=m,this._cache[t.uri][e]._limit=n,m})}};wr.providerName="LabelSearchSuggestion";wr.stored=!1;var je=ce(We(),1);var br=class extends pe{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){if(!e||!t)return null;let n={},i=e.match(/(.+\/)([^/]+)\/$/);return i?(n.api=i[1]+"rest/v1/",t.VOCID=i[2],n.schemes=[t],n):null}get _language(){return this.languages[0]||this._defaultLanguages[0]||"en"}_getApiUrl(e,t,n){let i=e&&e.VOCID||ne.default(this.schemes.find(a=>je.default.compare(a,e)),"VOCID");if(!i)throw new G({parameter:"scheme",message:"Missing scheme or VOCID property on scheme"});t=t||"",n=n||{},n.lang||(n.lang=this._language);let s=Object.keys(n).map(a=>`${a}=${encodeURIComponent(n[a])}`).join("&");return`${this._api.api}${i}${t}${s?"?"+s:""}`}_getDataUrl(e,{addFormatParameter:t=!0}={}){let n=ne.default(e,"inScheme[0]");if(!e||!e.uri)throw new G({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(n,"/data",t?{format:"application/json"}:{})}_getSchemeUri(e){return F(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(a=>je.default.compare(e,a));if(t)return t.uri;if(this._rejectedSchemes.find(a=>je.default.compare(e,a)))return null;let n=this._getApiUrl(e,"/"),s=(yield this.axios({method:"get",url:n})).conceptschemes.find(a=>je.default.compare(a,e));return s?(this._approvedSchemes.push({uri:s.uri,identifier:je.default.getAllUris(e)}),s.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:t,scheme:n,result:i,language:s}={}){if(!e)return null;t=je.default.deepCopy(t||{}),s=s||e.lang||"en",t.uri=e.uri,n&&(t.inScheme=[n]);let a=e.matchedPrefLabel||e.prefLabel||e.label;if(be.default(a))xe.default(t,`prefLabel.${s}`,a);else{a&&!Le.default(a)&&(a=[a]);for(let m of a||[])xe.default(t,`prefLabel.${m.lang}`,m.value)}let o=e.altLabel;if(be.default(o))xe.default(t,`altLabel.${s}`,[o]);else{o&&!Le.default(o)&&(o=[o]);for(let m of o||[])ne.default(t,`altLabel.${m.lang}`)?(t.altLabel[m.lang].push(m.value),t.altLabel[m.lang]=dr.default(t.altLabel[m.lang])):xe.default(t,`altLabel.${m.lang}`,[m.value])}let u=e.notation||e["skos:notation"]||je.default.notation(t);u&&(t.notation=[u.value||u]),e.broader&&(Le.default(e.broader)||(e.broader=[e.broader]),t.broader=e.broader.map(m=>be.default(m)?{uri:m}:m)),e.hasChildren===!0?t.narrower=[null]:e.hasChildren===!1&&(t.narrower=[]),e.type&&!Le.default(e.type)&&(e.type=[e.type]),t.type=t.type||[];for(let m of e.type||[]){if(!je.default.isValidUri(m))continue;let h=m.slice(0,m.indexOf(":"));i&&i["@context"]&&i["@context"][h]&&(m=m.replace(h+":",i["@context"][h])),t.type.push(m)}return t.type=dr.default(t.type),t.type.length||(t.type=["http://www.w3.org/2004/02/skos/core#Concept"]),t}getSchemes(t){return F(this,null,function*(){var e=J(t,[]);let n=[];for(let i of this.schemes||[]){let s=this._getApiUrl(i,"/"),o=(yield this.axios($(R({},e),{method:"get",url:s}))).conceptschemes.find(m=>je.default.compare(m,i)),u=o&&(o.prefLabel||o.label||o.title);u&&xe.default(i,`prefLabel.${this._language}`,u),n.push(i),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(m=>je.default.compare(i,m))||this._approvedSchemes.push({uri:o.uri,identifier:je.default.getAllUris(i)})}return n})}getTop(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);let s=this._getApiUrl(e,"/topConcepts"),a=yield this._getSchemeUri(e);if(!a)throw new G({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});xe.default(t,"params.scheme",a);let o=yield this.axios($(R({},t),{method:"get",url:s})),u=[];for(let m of o.topconcepts||[]){let h=this._toJskosConcept(m,{scheme:e,language:this._language});h.topConceptOf=[e],u.push(h)}return u})}getConcepts(n){return F(this,null,function*(){var i=n,{concepts:e}=i,t=J(i,["concepts"]);Le.default(e)||(e=[e]),e=e.map(a=>({uri:a.uri,inScheme:a.inScheme}));let s=[];for(let a of e){let o=this._getDataUrl(a,{addFormatParameter:!1});if(!o)continue;let u=yield this.axios($(R({},t),{method:"get",url:o,params:{uri:a.uri,format:"application/json"}})),m=u&&u.graph&&u.graph.find(h=>je.default.compare(h,a));if(m){let h=this._toJskosConcept(m,{concept:a,result:u});for(let x of["broader","narrower"]){let w=m[x]||h[x];w&&!Le.default(w)&&(w=[w]),w||(w=[]),h[x]=w.map(A=>this._toJskosConcept(u.graph.find(y=>je.default.compare(y,A)),{scheme:a.inScheme[0],result:u}))}h.ancestors=[],s.push(h)}}return s})}getNarrower(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/children");return xe.default(t,"params.uri",e.uri),((yield this.axios($(R({},t),{method:"get",url:a}))).narrower||[]).map(m=>this._toJskosConcept(m,{scheme:s}))})}getAncestors(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/broaderTransitive");xe.default(t,"params.uri",e.uri);let o=yield this.axios($(R({},t),{method:"get",url:a})),u=[],m=e.uri;for(;m;){if(m!=e.uri){let x=ne.default(o,`broaderTransitive["${m}"]`);u=u.concat([x])}m=ne.default(o,`broaderTransitive["${m}"].broader[0]`)}return u.map(x=>this._toJskosConcept(x,{scheme:s})).filter(x=>x.uri!=e.uri)})}suggest(e){return F(this,null,function*(){e._raw=!0;let t=yield this.search(e),n=[e.search,[],[],[]];for(let i of t){let s=je.default.notation(i),a=je.default.prefLabel(i);n[1].push((s?s+" ":"")+a),n[2].push(""),n[3].push(i.uri)}return t._totalCount!=null?n._totalCount=t._totalCount:n._totalCount=t.length,n})}search(a){return F(this,null,function*(){var o=a,{search:e,scheme:t,limit:n,types:i=[]}=o,s=J(o,["search","scheme","limit","types"]);let u=this._getApiUrl(t,"/search");return xe.default(s,"params.query",`${e}*`),xe.default(s,"params.unique",1),xe.default(s,"params.maxhits",n||100),xe.default(s,"params.type",i.join(" ")),((yield this.axios($(R({},s),{method:"get",url:u}))).results||[]).map(x=>this._toJskosConcept(x,{scheme:t}))})}getTypes(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);let s=this._getApiUrl(e,"/types"),a=[],o=yield this.axios($(R({},t),{method:"get",url:s}));for(let u of o&&o.types||[])u.uri!="http://www.w3.org/2004/02/skos/core#Concept"&&(u.label&&(u.prefLabel={[o["@context"]["@language"]]:u.label},delete u.label),a.push(u));return a._url=s,a})}};br.providerName="SkosmosApi";br.providerType="http://bartoc.org/api-type/skosmos";var or=ce(We(),1),Rn=ce(Yt(),1),jn="http://id.loc.gov/authorities/",Ln=[{uri:`${jn}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${jn}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],id=`${jn}classification`;function sd(r){let e={};e.uri=r["@id"],e.notation=(r["http://www.loc.gov/mads/rdf/v1#code"]||[]).map(i=>i["@value"]);let t=r["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||r["http://www.w3.org/2000/01/rdf-schema#label"]||[];t.length&&(e.prefLabel={},e.prefLabel[t[0]["@language"]||"en"]=t[0]["@value"]);let n=r["http://www.w3.org/2004/02/skos/core#altLabel"]||[];n.length&&(e.altLabel={en:n.map(i=>i["@value"])});for(let i of r["http://www.w3.org/2000/01/rdf-schema#comment"]||[])e.definition=e.definition||{},e.definition.en=e.definition.en||[],e.definition.en.push(i["@value"]);return e}function mE(r){let e=sd(r);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var vs=r=>e=>!e||!r||!r.namespace?!0:e.uri.startsWith(r.namespace);function gE(r,{scheme:e}){let t=sd(r);t.type=["http://www.w3.org/2004/02/skos/core#Concept"],t.inScheme=e?[e]:(r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]||[]).map(s=>Ln.find(a=>a.uri===s["@id"])),(!t.inScheme.length||!t.inScheme[0])&&delete t.inScheme;let n=r["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||or.default.compare(t.inScheme[0],{uri:id})&&r["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];t.narrower=n.map(s=>({uri:s["@id"]})).filter(vs(t.inScheme&&t.inScheme[0]));let i=r["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||or.default.compare(t.inScheme[0],{uri:id})&&r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return t.broader=i.map(s=>({uri:s["@id"]})).filter(vs(t.inScheme&&t.inScheme[0])),t}var xr=class extends pe{_prepare(){this.has.schemes=!0,this.has.top=!1,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!1,this.has.ancestors=!1,this.has.suggest=!0,this.has.search=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!Ln.find(t=>or.default.compare(t,e))?null:{schemes:[e]}}getSchemes(){return F(this,null,function*(){let e=[];for(let t of yield Promise.all(Ln.filter(n=>!this.schemes||!this.schemes.length||this.schemes.find(i=>or.default.compare(n,i))).map(n=>(0,Rn.default)({method:"get",url:`${n.uri.replace("http:","https:")}.json`}).then(({status:i,data:s})=>{if(i===200){let a=s.find(o=>n.uri===o["@id"]);if(a)return a=or.default.merge(mE(a),n),a.topConcepts=(a.topConcepts||[]).filter(o=>o),a}return null}))))t&&e.push(t);return e})}getConcepts(t){return F(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let n=[];for(let i of yield Promise.all(e.map(s=>(0,Rn.default)({method:"get",url:`${s.uri.replace("http:","https:")}.json`}).then(({status:a,data:o})=>{if(a===200){let u=o.find(m=>s.uri===m["@id"]);return u?gE(u,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))i&&n.push(i);return n})}suggest(e){return F(this,null,function*(){let t=yield this.search(e);return[e.search,t.map(n=>or.default.prefLabel(n,{fallbackToUri:!0})),[],t.map(n=>n.uri)]})}search(s){return F(this,arguments,function*({search:e,scheme:t,limit:n,offset:i}){let a=or.default.getAllUris(t).find(u=>u.startsWith(jn));if(!a||!Ln.find(u=>or.default.compare(u,{uri:a})))throw new G({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new G({parameter:"search",message:"parameter is empty or missing"});n=n||this._jskos.suggestResultLimit||100,i=i||0;let{data:o}=yield(0,Rn.default)({method:"get",url:`${a}/suggest2`.replace("http:","https:"),params:{q:e,count:n||100,offset:i,searchtype:"keyword"}});return(o.hits||[]).map(u=>({uri:u.uri,notation:[u.token],prefLabel:{en:u.aLabel},inScheme:[t]})).filter(vs(t))})}};xr.providerName="LocApi";xr.providerType="http://bartoc.org/api-type/loc";var jr=ce(We(),1),ud=ce(od(),1);function Nn(r){return r.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var Sr=class extends pe{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.suggest=!0,this.has.search=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this._index={},this._conceptCache={},this._schemeCache={}}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{schemes:[{uri:e,identifier:jr.default.getAllUris(t).filter(i=>i!==e)}]}}_loadScheme(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);let s=jr.default.getAllUris(e);for(let y of s)if(this._schemeCache[y])return this._schemeCache[y];let a=this.schemes.find(y=>jr.default.compare(y,e));if(!a||!a.uri)throw new Xe({message:`Tried to load unsupported scheme (${e&&e.uri})`});let o=a.uri;s=dr.default(s.concat(jr.default.getAllUris(a)));let u=".json";o.endsWith("/")&&(u="index.json");let m=yield this.axios($(R({},t),{url:`${o}${u}`,_skipAdditionalParameters:!0}));if(m.id!==o)throw new Xe({message:"Skohub URL did not return expected concept scheme"});let{title:h,preferredNamespaceUri:x,hasTopConcept:w,description:A}=m;e={uri:o,identifier:s.filter(y=>y!==o)},e.prefLabel=h,Object.keys(e.prefLabel||{}).forEach(y=>{e.prefLabel[y]=Nn(e.prefLabel[y])}),e.namespace=x,e.topConcepts=(w||[]).map(y=>this._toJskosConcept(y)),e.concepts=[null],A&&(e.definition=A,Object.keys(e.definition).forEach(y=>{e.definition[y]=[Nn(e.definition[y])]}));for(let y of Object.keys(e).filter(M=>!e[M]))delete e[y];for(let y of s)this._schemeCache[y]=e;return e})}_loadConcept(n){return F(this,null,function*(){var i=n,{uri:e}=i,t=J(i,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let s=yield this.axios($(R({},t),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(s.id!==e)throw new Xe({message:"Skohub URL did not return expected concept URI"});let a=this._toJskosConcept(s);return this._conceptCache[e]=a,a}catch(s){return null}})}_toJskosConcept(e){let t={uri:e.id};return t.prefLabel=e.prefLabel,Object.keys(t.prefLabel||{}).forEach(n=>{t.prefLabel[n]=Nn(t.prefLabel[n])}),t.narrower=(e.narrower||[]).map(n=>this._toJskosConcept(n)),t.notation=e.notation||[],e.broader&&e.broader.id&&(t.broader=[{uri:e.broader.id}]),e.inScheme&&e.inScheme.id&&(t.inScheme=[{uri:e.inScheme.id}]),e.scopeNote&&(t.scopeNote=e.scopeNote,Object.keys(t.scopeNote).forEach(n=>{t.scopeNote[n]=[Nn(t.scopeNote[n])]})),t}getSchemes(t){return F(this,null,function*(){var e=J(t,[]);return Promise.all(this.schemes.map(n=>this._loadScheme($(R({},e),{scheme:n}))))})}getTop(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);if(!e||!e.uri)throw new G({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(R({scheme:e},t)),e.topConcepts||[]})}getConcepts(n){return F(this,null,function*(){var i=n,{concepts:e}=i,t=J(i,["concepts"]);return Le.default(e)||(e=[e]),(yield Promise.all(e.map(({uri:s})=>this._loadConcept($(R({},t),{uri:s}))))).filter(Boolean)})}getAncestors(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept($(R({},t),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let s=e.broader[0];return[s].concat(yield this.getAncestors(R({concept:s},t))).map(a=>({uri:a.uri}))})}getNarrower(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept($(R({},t),{uri:e.uri}))),e.narrower})}search(i){return F(this,arguments,function*({search:e,scheme:t,limit:n=100}){if(!t||!t.uri)throw new G({parameter:"scheme"});if(!e)throw new G({parameter:"search"});let s;this._index[t.uri]||(this._index[t.uri]={});for(let u of[""].concat(this.languages)){if(this._index[t.uri][u]){s=this._index[t.uri][u];break}if(this._index[t.uri][u]!==null)try{let m=u?`.${u}.index`:".index";t.uri.endsWith("/")&&(m=`index${m}`);let h=yield this.axios({url:`${t.uri}${m}`,_skipAdditionalParameters:!0});if(h.length<100){this._index[t.uri][u]=null;continue}s=ud.default.create(),s.import(h),this._index[t.uri][u]=s;break}catch(m){this._index[t.uri][u]=null}}if(!s)throw new Xe({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let a=s.search(e);return(yield this.getConcepts({concepts:a.map(u=>({uri:u}))})).slice(0,n)})}suggest(e){return F(this,null,function*(){e._raw=!0;let t=yield this.search(e),n=[e.search,[],[],[]];for(let i of t){let s=jr.default.notation(i),a=jr.default.prefLabel(i);n[1].push((s?s+" ":"")+a),n[2].push(""),n[3].push(i.uri)}return t._totalCount!=null?n._totalCount=t._totalCount:n._totalCount=t.length,n})}};Sr.providerName="Skohub";Sr.providerType="http://bartoc.org/api-type/skohub";var nr={[pe.providerName]:pe,init(r){if(this[r.provider])return new this[r.provider](r);throw new Fr},addProvider(r){if(r.prototype instanceof pe||r===pe)this[r.providerName]=r;else throw new Fr}};nr.addProvider(tr);nr.addProvider(rr);Object.values(Dt).forEach(r=>{nr.addProvider(r)});var _s={},qr=class{constructor(e){this.config=e,this.axios=fd.default.create()}setConfig(e){this.config=e}get config(){return this._config}set config(e){e=e||{},e.registries=e.registries||[],e.registries=e.registries.map(t=>nr.init(t)).filter(t=>t),e.registries.forEach(t=>{t.cdk=this}),this._config=e}get providers(){return nr}createInstance(e){return new qr(e)}loadConfig(e){return F(this,null,function*(){let t=yield this.axios.get(e);this.config=t.data})}loadBuildInfo(a){var o=a,{url:e,buildInfo:t=null,interval:n=6e4,callback:i}=o,s=J(o,["url","buildInfo","interval","callback"]);if(!e&&!this.config.cocodaBaseUrl)throw new Ce({message:"Could not determine URL to load build config."});return e||(e=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat($(R({},s),{function:()=>F(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:n,callback:(u,m,h)=>{u?i(u):(h||!h&&t&&!Qe.default(m,t))&&i(null,m,h||t)}}))}getRegistryForUri(e){return this.config.registries.find(t=>t.uri==e)}initializeRegistry(e){return e=nr.init(e),e.cdk=this,e}addProvider(e){nr.addProvider(e)}static addProvider(e){nr.addProvider(e)}repeat({function:e,interval:t=15e3,callback:n,callImmediately:i=!0}={}){if(!e)throw new G({parameter:"function"});if(typeof e!="function")throw new G({parameter:"function",message:"function needs to be a function"});let s=()=>F(this,null,function*(){return e()});if(t=parseInt(t),isNaN(t))throw new G({parameter:"interval"});if(!n)throw new G({parameter:"callback"});if(typeof n!="function")throw new G({parameter:"callback",message:"callback needs to be a function"});let a={timer:null,result:null,error:null,isPaused:!1,interval:t},o=w=>{let A=a.result;Qe.default(A,w)||(a.result=w,a.error=null,n(null,w,A))},u=w=>{a.error=w,n(w)},m=w=>{a.isPaused||(a.timer=setTimeout(()=>{w()},a.interval))},h=()=>s().then(o).catch(u).then(()=>m(h)),x=(w=i)=>{w?h():m(h)};return x(),{start:(...w)=>{a.isPaused=!1,x(...w)},stop:()=>{a.isPaused=!0,a.timer?clearTimeout(a.timer):setTimeout(()=>{a.timer&&clearTimeout(a.timer)},a.interval)},get isPaused(){return a.isPaused},get lastResult(){return a.result},get hasErrored(){return!!a.error},get interval(){return a.interval},set interval(w){a.interval=w}}}getSchemes(){return F(this,arguments,function*(e={}){let t=[],n=[];for(let i of this.config.registries)if(i.has.schemes!==!1){let s=i.getSchemes(e).then(a=>{for(let o of a){o._registry=i,o.__DETAILSLOADED__=1,o.type=o.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let u=t.find(w=>Ar.default.compare(w,o)),m,h,x=!1;if(u){m=this.config.registries.indexOf(i),m!=-1&&(m=this.config.registries.length-m),h=this.config.registries.indexOf(ne.default(u,"_registry")),h!=-1&&(h=this.config.registries.length-h);let w=o.concepts?o.concepts.length==0?-1:1:0,A=u.concepts?u.concepts.length==0?-1:1:0;w>A?x=!0:w<A?x=!1:x=h<m}if(!u||x){if(x){let w=t.findIndex(A=>Ar.default.compare(A,u));w!=-1&&t.splice(w,1),o=Ar.default.merge(o,sr.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}o._registry=i,t.push(o)}else{let w=t.findIndex(A=>Ar.default.compare(A,o));if(w!=-1){let A=t[w]._registry;t[w]=Ar.default.merge(t[w],sr.default(o,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),t[w]._registry=A}}}}).catch(a=>{console.warn("Couldn't load schemes for registry",i.uri,a)});n.push(s)}return yield Promise.all(n),t.forEach(i=>{let s=i._registry;delete i._registry;let a=this.registryForScheme(i);!a||a._api.api===s._api.api?i._registry=s:i._registry=a}),Ar.default.sortSchemes(t.filter(Boolean))})}registryForScheme(e){let t=e._registry;if(t)return t;for(let n of e.API||[]){let i=n,{type:s}=i,a=J(i,["type"]);let o=a.url;if(_s[o]){let u=_s[o];return Array.isArray(u._jskos.schemes)&&!Ar.default.isContainedIn(e,u._jskos.schemes)&&u._jskos.schemes.push(e),u}else{let u=Object.values(nr).find(h=>h.providerType===s);if(!u||!u._registryConfigForBartocApiConfig)continue;let m=u.providerName;if(a.scheme=e,a=nr[m]._registryConfigForBartocApiConfig(a),!a)continue;a.provider=m;try{if(t=this.initializeRegistry(a),t)return _s[o]=t,t}catch(h){continue}}}return null}};var cd=new qr;function vE(r){Object.values(Dt).forEach(e=>(r||cd).addProvider(e))}return rm(yE);})();
|
|
12
|
+
`,i=t+t,s=a=>t+(a==null?"":a.split(t).join(i))+t;return a=>a.map(s).join(e)+n},Rr=(r,e)=>{let t=[];for(let n of["from","to"])(e==null||n===e)&&(t=t.concat(re.get(r,`${n}.memberSet`)||re.get(r,`${n}.memberChoice`)||re.get(r,`${n}.memberList`)||[]));return t.filter(n=>n!=null)},WC=(r={})=>{let e=HC(r),t=r.language||"en";r.type==null&&(r.type=!0);let n=a=>{a=a||[];let o=[];for(let u of["from","to"]){r.schemes&&o.push(`${u}Scheme`);let m=Math.max(...a.map(h=>Rr(h,u).length),1);for(let h=0;h<m;h+=1)o.push(`${u}Notation${h?h+1:""}`),r.labels&&o.push(`${u}Label${h?h+1:""}`)}return r.type&&o.push("type"),r.creator&&o.push("creator"),e(o)},i=(a,o={})=>{let u=[];for(let m of["from","to"]){r.schemes&&u.push(re.get(a,`${m}Scheme.notation[0]`,""));let h=Rr(a,m),x=o[`${m}Count`];x==null&&(x=h.length),x=Math.max(x,1);for(let w=0;w<x;w+=1)u.push(re.get(h[w],"notation[0]","")),r.labels&&u.push(re.get(h[w],`prefLabel.${t}`,""))}return r.type&&u.push(re.get(jt(re.get(a,"type[0]")),"SHORT","")),r.creator&&u.push(re.get(a,`creator[0].prefLabel.${t}`)),e(u)};return{header:n,fromMapping:i,fromMappings:(a,o={header:!0})=>{let u="";o.header&&(u+=n(a));let m={fromCount:Math.max(...a.map(h=>Rr(h,"from").length)),toCount:Math.max(...a.map(h=>Rr(h,"to").length))};for(let h of a)u+=i(h,m);return u}}};function GC(r,e){return re.isEqualWith(r,e,(t,n,i)=>{let s={[i]:t},a={[i]:n};if(i=="from"||i=="to")return re.isEqualWith(Object.getOwnPropertyNames(re.get(t,i,{})),Object.getOwnPropertyNames(re.get(n,i,{})))?re.isEqualWith(Rr(s,i),Rr(a,i),(o,u,m)=>{if(m!=null)return mr(o,u)}):!1;if(i=="fromScheme"||i=="toScheme")return mr(t,n)})}var{objectTypes:KC,guessObjectType:ls}=Dp(),VC=(r,e)=>{let t=ls(r),n=ls(e);return!(t&&n&&t!=n)},Gp=r=>{Array.isArray(r)&&r.sort((e,t)=>e===null?1:t===null?-1:0)},Kp=(r,e)=>(!r||!e||((Array.isArray(r.identifier)||Array.isArray(e.identifier))&&(r.identifier=re.union(r.identifier||[],e.identifier||[])),!r.uri&&e.uri&&(r.uri=e.uri),r.uri&&e.uri&&r.uri!=e.uri&&!(r.identifier||[]).includes(e.uri)&&(r.identifier=(r.identifier||[]).concat([e.uri])),Array.isArray(r.identifier)&&r.uri&&(r.identifier=r.identifier.filter(t=>t!==r.uri)),(r.identifier||[]).length==0&&delete r.identifier,Gp(r.identifier)),r),Vp=(r,e,t)=>{if(!r||!e)return r||e;t=t||{};let n=t._path||"",i=t.detectMismatch||[],s=t.skipPaths||[],a={};return re.forOwn(r,(o,u)=>{if(!s.includes(n+u))if(Array.isArray(o)&&Array.isArray(e[u]))a[u]=re.unionWith(o,e[u],(m,h)=>re.isObject(m)&&re.isObject(h)?mr(m,h):m===h),Gp(a[u]);else if(re.isObject(o)&&re.isObject(e[u]))a[u]=Vp(o,e[u],Object.assign({_path:`${n}${u}.`},t));else{if(o&&e[u]&&i.includes(n+u)&&!re.isEqualWith(o,e[u]))throw new Error("Property mismatch in "+n+u);a[u]=o}}),re.forOwn(e,(o,u)=>{r[u]||(a[u]=o)}),n==""&&re.omitMod(a,s),t.mergeUris&&Kp(a,e),a},hs=r=>Array.isArray(r)?r.map(e=>hs(e)):re.isObject(r)?(re.forOwn(r,(e,t)=>{r[t]=hs(e)}),r):re.isString(r)?r.normalize():r,JC=r=>{var e=/^[A-Za-z][A-Za-z0-9+\-.]*:(?:\/\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:]|%[0-9A-Fa-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9A-Fa-f]{1,4}:){6}|::(?:[0-9A-Fa-f]{1,4}:){5}|(?:[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,1}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){3}|(?:(?:[0-9A-Fa-f]{1,4}:){0,2}[0-9A-Fa-f]{1,4})?::(?:[0-9A-Fa-f]{1,4}:){2}|(?:(?:[0-9A-Fa-f]{1,4}:){0,3}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}:|(?:(?:[0-9A-Fa-f]{1,4}:){0,4}[0-9A-Fa-f]{1,4})?::)(?:[0-9A-Fa-f]{1,4}:[0-9A-Fa-f]{1,4}|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?))|(?:(?:[0-9A-Fa-f]{1,4}:){0,5}[0-9A-Fa-f]{1,4})?::[0-9A-Fa-f]{1,4}|(?:(?:[0-9A-Fa-f]{1,4}:){0,6}[0-9A-Fa-f]{1,4})?::)|[Vv][0-9A-Fa-f]+\.[A-Za-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)|(?:[A-Za-z0-9\-._~!$&'()*+,;=]|%[0-9A-Fa-f]{2})*)(?::[0-9]*)?(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|\/(?:(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*)?|(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})+(?:\/(?:[A-Za-z0-9\-._~!$&'()*+,;=:@]|%[0-9A-Fa-f]{2})*)*|)(?:\?(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?(?:#(?:[A-Za-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9A-Fa-f]{2})*)?$/;return r.match(e)!==null},YC={mappingsByConcepts:(r,e,t)=>{let n=["memberSet","memberList","memberChoice"],i,s;for(let a of n)i=i||re.get(r,t+"."+a+"[0].notation[0]"),s=s||re.get(e,t+"."+a+"[0].notation[0]");return i==null||i<s?-1:s==null||i>s?1:0}},XC=(r,e)=>!r||!e?!1:[r.uri].concat(Object.values(r.identities||{}).map(t=>t.uri)).filter(t=>t!=null).includes(re.get(e,"creator[0].uri")),ZC=us(),QC=fs();function eE(r,e){let t;if(r&&r.notation&&r.notation.length)t=r.notation[0],($p(r)||e=="scheme")&&(t=t.toUpperCase());else if(r&&r.inScheme&&r.inScheme[0]&&r.uri)try{t=new ZC(r&&r.inScheme&&r.inScheme[0]).notationFromUri(r.uri)}catch(n){}return t||""}function ds(r,e,{language:t}={}){let n=r&&e?r[e]:r;return n&&(n[t]||(t=QC.selectLanguage(n),t))?n[t]:null}function rE(r,e={}){e=e||{};let t=e.fallbackToUri==null?!0:e.fallbackToUri;return re.get(r,`prefLabel.${e.language}`)||ds(r,"prefLabel",e)||(t&&r&&r.uri?r.uri:"")}function tE(r,e={}){e=e||{};let t=re.get(r,`definition.${e.language}`)||ds(r,"definition",e)||[];return re.isString(t)&&(t=[t]),t}function nE(r){return re.get(r,"stored",re.get(r,"constructor.stored",re.get(r,"provider.constructor.stored",!1)))}function iE(r){return re.isString(r.creator)?r.creator:r.creator&&r.creator.id}function sE(r){return re.get(r,"creator.name")||""}function aE(r,e){return!!(r&&re.isString(r.creator)?e&&e.includes(r.creator):e&&r.creator&&e.includes(r.creator.id))}Jp.exports={addContext:PC,clean:ps,cleanJSKOS:MC,copyDeep:On,deepCopy:RC,getAllUris:cs,compare:mr,compareObjects:LC,compareSchemes:jC,compareConcepts:NC,isConcept:UC,isScheme:$p,isContainedIn:zp,isSchemeInList:DC,sortConcepts:FC,sortSchemes:BC,minifyMapping:kC,mappingTypes:Hp,mappingTypeByUri:jt,mappingTypeByType:$C,flattenMapping:zC,mappingCSV:WC,defaultMappingType:Wp,conceptsOfMapping:Rr,compareMappingsDeep:GC,objectTypes:KC,guessObjectType:ls,matchObjectTypes:VC,mergeUris:Kp,merge:Vp,normalize:hs,isValidUri:JC,compareFunctions:YC,userOwnsMapping:XC,notation:eE,languageMapContent:ds,prefLabel:rE,definition:tE,mappingRegistryIsStored:nE,annotationCreatorUri:iE,annotationCreatorName:sE,annotationCreatorMatches:aE}});var We=g((AP,Xp)=>{var oE=Lp(),uE=Yp(),fE=us(),cE=fs();Xp.exports=Object.assign({ConceptScheme:fE,languagePreference:cE},oE,uE)});var ed=g((Qp,ms)=>{(function(r){if(typeof Qp=="object"&&typeof ms!="undefined")ms.exports=r();else if(typeof define=="function"&&define.amd)define([],r);else{var e;typeof window!="undefined"?e=window:typeof global!="undefined"?e=global:typeof self!="undefined"?e=self:e=this,e.localforage=r()}})(function(){var r,e,t;return function n(i,s,a){function o(h,x){if(!s[h]){if(!i[h]){var w=typeof ct=="function"&&ct;if(!x&&w)return w(h,!0);if(u)return u(h,!0);var A=new Error("Cannot find module '"+h+"'");throw A.code="MODULE_NOT_FOUND",A}var y=s[h]={exports:{}};i[h][0].call(y.exports,function(M){var H=i[h][1][M];return o(H||M)},y,y.exports,n,i,s,a)}return s[h].exports}for(var u=typeof ct=="function"&&ct,m=0;m<a.length;m++)o(a[m]);return o}({1:[function(n,i,s){(function(a){"use strict";var o=a.MutationObserver||a.WebKitMutationObserver,u;if(o){var m=0,h=new o(M),x=a.document.createTextNode("");h.observe(x,{characterData:!0}),u=function(){x.data=m=++m%2}}else if(!a.setImmediate&&typeof a.MessageChannel!="undefined"){var w=new a.MessageChannel;w.port1.onmessage=M,u=function(){w.port2.postMessage(0)}}else"document"in a&&"onreadystatechange"in a.document.createElement("script")?u=function(){var K=a.document.createElement("script");K.onreadystatechange=function(){M(),K.onreadystatechange=null,K.parentNode.removeChild(K),K=null},a.document.documentElement.appendChild(K)}:u=function(){setTimeout(M,0)};var A,y=[];function M(){A=!0;for(var K,te,D=y.length;D;){for(te=y,y=[],K=-1;++K<D;)te[K]();D=y.length}A=!1}i.exports=H;function H(K){y.push(K)===1&&!A&&u()}}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{}],2:[function(n,i,s){"use strict";var a=n(1);function o(){}var u={},m=["REJECTED"],h=["FULFILLED"],x=["PENDING"];i.exports=w;function w(O){if(typeof O!="function")throw new TypeError("resolver must be a function");this.state=x,this.queue=[],this.outcome=void 0,O!==o&&H(this,O)}w.prototype.catch=function(O){return this.then(null,O)},w.prototype.then=function(O,Q){if(typeof O!="function"&&this.state===h||typeof Q!="function"&&this.state===m)return this;var W=new this.constructor(o);if(this.state!==x){var de=this.state===h?O:Q;y(W,de,this.outcome)}else this.queue.push(new A(W,O,Q));return W};function A(O,Q,W){this.promise=O,typeof Q=="function"&&(this.onFulfilled=Q,this.callFulfilled=this.otherCallFulfilled),typeof W=="function"&&(this.onRejected=W,this.callRejected=this.otherCallRejected)}A.prototype.callFulfilled=function(O){u.resolve(this.promise,O)},A.prototype.otherCallFulfilled=function(O){y(this.promise,this.onFulfilled,O)},A.prototype.callRejected=function(O){u.reject(this.promise,O)},A.prototype.otherCallRejected=function(O){y(this.promise,this.onRejected,O)};function y(O,Q,W){a(function(){var de;try{de=Q(W)}catch(qe){return u.reject(O,qe)}de===O?u.reject(O,new TypeError("Cannot resolve promise with itself")):u.resolve(O,de)})}u.resolve=function(O,Q){var W=K(M,Q);if(W.status==="error")return u.reject(O,W.value);var de=W.value;if(de)H(O,de);else{O.state=h,O.outcome=Q;for(var qe=-1,ve=O.queue.length;++qe<ve;)O.queue[qe].callFulfilled(Q)}return O},u.reject=function(O,Q){O.state=m,O.outcome=Q;for(var W=-1,de=O.queue.length;++W<de;)O.queue[W].callRejected(Q);return O};function M(O){var Q=O&&O.then;if(O&&(typeof O=="object"||typeof O=="function")&&typeof Q=="function")return function(){Q.apply(O,arguments)}}function H(O,Q){var W=!1;function de(Ie){W||(W=!0,u.reject(O,Ie))}function qe(Ie){W||(W=!0,u.resolve(O,Ie))}function ve(){Q(qe,de)}var Ne=K(ve);Ne.status==="error"&&de(Ne.value)}function K(O,Q){var W={};try{W.value=O(Q),W.status="success"}catch(de){W.status="error",W.value=de}return W}w.resolve=te;function te(O){return O instanceof this?O:u.resolve(new this(o),O)}w.reject=D;function D(O){var Q=new this(o);return u.reject(Q,O)}w.all=Z;function Z(O){var Q=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var W=O.length,de=!1;if(!W)return this.resolve([]);for(var qe=new Array(W),ve=0,Ne=-1,Ie=new this(o);++Ne<W;)Ge(O[Ne],Ne);return Ie;function Ge(ur,Or){Q.resolve(ur).then(ke,function(fr){de||(de=!0,u.reject(Ie,fr))});function ke(fr){qe[Or]=fr,++ve===W&&!de&&(de=!0,u.resolve(Ie,qe))}}}w.race=ee;function ee(O){var Q=this;if(Object.prototype.toString.call(O)!=="[object Array]")return this.reject(new TypeError("must be an array"));var W=O.length,de=!1;if(!W)return this.resolve([]);for(var qe=-1,ve=new this(o);++qe<W;)Ne(O[qe]);return ve;function Ne(Ie){Q.resolve(Ie).then(function(Ge){de||(de=!0,u.resolve(ve,Ge))},function(Ge){de||(de=!0,u.reject(ve,Ge))})}}},{1:1}],3:[function(n,i,s){(function(a){"use strict";typeof a.Promise!="function"&&(a.Promise=n(2))}).call(this,typeof global!="undefined"?global:typeof self!="undefined"?self:typeof window!="undefined"?window:{})},{2:2}],4:[function(n,i,s){"use strict";var a=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(f){return typeof f}:function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f};function o(f,v){if(!(f instanceof v))throw new TypeError("Cannot call a class as a function")}function u(){try{if(typeof indexedDB!="undefined")return indexedDB;if(typeof webkitIndexedDB!="undefined")return webkitIndexedDB;if(typeof mozIndexedDB!="undefined")return mozIndexedDB;if(typeof OIndexedDB!="undefined")return OIndexedDB;if(typeof msIndexedDB!="undefined")return msIndexedDB}catch(f){return}}var m=u();function h(){try{if(!m||!m.open)return!1;var f=typeof openDatabase!="undefined"&&/(Safari|iPhone|iPad|iPod)/.test(navigator.userAgent)&&!/Chrome/.test(navigator.userAgent)&&!/BlackBerry/.test(navigator.platform),v=typeof fetch=="function"&&fetch.toString().indexOf("[native code")!==-1;return(!f||v)&&typeof indexedDB!="undefined"&&typeof IDBKeyRange!="undefined"}catch(c){return!1}}function x(f,v){f=f||[],v=v||{};try{return new Blob(f,v)}catch(_){if(_.name!=="TypeError")throw _;for(var c=typeof BlobBuilder!="undefined"?BlobBuilder:typeof MSBlobBuilder!="undefined"?MSBlobBuilder:typeof MozBlobBuilder!="undefined"?MozBlobBuilder:WebKitBlobBuilder,b=new c,S=0;S<f.length;S+=1)b.append(f[S]);return b.getBlob(v.type)}}typeof Promise=="undefined"&&n(3);var w=Promise;function A(f,v){v&&f.then(function(c){v(null,c)},function(c){v(c)})}function y(f,v,c){typeof v=="function"&&f.then(v),typeof c=="function"&&f.catch(c)}function M(f){return typeof f!="string"&&(console.warn(f+" used as a key, but it is not a string."),f=String(f)),f}function H(){if(arguments.length&&typeof arguments[arguments.length-1]=="function")return arguments[arguments.length-1]}var K="local-forage-detect-blob-support",te=void 0,D={},Z=Object.prototype.toString,ee="readonly",O="readwrite";function Q(f){for(var v=f.length,c=new ArrayBuffer(v),b=new Uint8Array(c),S=0;S<v;S++)b[S]=f.charCodeAt(S);return c}function W(f){return new w(function(v){var c=f.transaction(K,O),b=x([""]);c.objectStore(K).put(b,"key"),c.onabort=function(S){S.preventDefault(),S.stopPropagation(),v(!1)},c.oncomplete=function(){var S=navigator.userAgent.match(/Chrome\/(\d+)/),_=navigator.userAgent.match(/Edge\//);v(_||!S||parseInt(S[1],10)>=43)}}).catch(function(){return!1})}function de(f){return typeof te=="boolean"?w.resolve(te):W(f).then(function(v){return te=v,te})}function qe(f){var v=D[f.name],c={};c.promise=new w(function(b,S){c.resolve=b,c.reject=S}),v.deferredOperations.push(c),v.dbReady?v.dbReady=v.dbReady.then(function(){return c.promise}):v.dbReady=c.promise}function ve(f){var v=D[f.name],c=v.deferredOperations.pop();if(c)return c.resolve(),c.promise}function Ne(f,v){var c=D[f.name],b=c.deferredOperations.pop();if(b)return b.reject(v),b.promise}function Ie(f,v){return new w(function(c,b){if(D[f.name]=D[f.name]||d(),f.db)if(v)qe(f),f.db.close();else return c(f.db);var S=[f.name];v&&S.push(f.version);var _=m.open.apply(m,S);v&&(_.onupgradeneeded=function(E){var L=_.result;try{L.createObjectStore(f.storeName),E.oldVersion<=1&&L.createObjectStore(K)}catch(N){if(N.name==="ConstraintError")console.warn('The database "'+f.name+'" has been upgraded from version '+E.oldVersion+" to version "+E.newVersion+', but the storage "'+f.storeName+'" already exists.');else throw N}}),_.onerror=function(E){E.preventDefault(),b(_.error)},_.onsuccess=function(){var E=_.result;E.onversionchange=function(L){L.target.close()},c(E),ve(f)}})}function Ge(f){return Ie(f,!1)}function ur(f){return Ie(f,!0)}function Or(f,v){if(!f.db)return!0;var c=!f.db.objectStoreNames.contains(f.storeName),b=f.version<f.db.version,S=f.version>f.db.version;if(b&&(f.version!==v&&console.warn('The database "'+f.name+`" can't be downgraded from version `+f.db.version+" to version "+f.version+"."),f.version=f.db.version),S||c){if(c){var _=f.db.version+1;_>f.version&&(f.version=_)}return!0}return!1}function ke(f){return new w(function(v,c){var b=new FileReader;b.onerror=c,b.onloadend=function(S){var _=btoa(S.target.result||"");v({__local_forage_encoded_blob:!0,data:_,type:f.type})},b.readAsBinaryString(f)})}function fr(f){var v=Q(atob(f.data));return x([v],{type:f.type})}function ir(f){return f&&f.__local_forage_encoded_blob}function Un(f){var v=this,c=v._initReady().then(function(){var b=D[v._dbInfo.name];if(b&&b.dbReady)return b.dbReady});return y(c,f,f),c}function l(f){qe(f);for(var v=D[f.name],c=v.forages,b=0;b<c.length;b++){var S=c[b];S._dbInfo.db&&(S._dbInfo.db.close(),S._dbInfo.db=null)}return f.db=null,Ge(f).then(function(_){return f.db=_,Or(f)?ur(f):_}).then(function(_){f.db=v.db=_;for(var E=0;E<c.length;E++)c[E]._dbInfo.db=_}).catch(function(_){throw Ne(f,_),_})}function p(f,v,c,b){b===void 0&&(b=1);try{var S=f.db.transaction(f.storeName,v);c(null,S)}catch(_){if(b>0&&(!f.db||_.name==="InvalidStateError"||_.name==="NotFoundError"))return w.resolve().then(function(){if(!f.db||_.name==="NotFoundError"&&!f.db.objectStoreNames.contains(f.storeName)&&f.version<=f.db.version)return f.db&&(f.version=f.db.version+1),ur(f)}).then(function(){return l(f).then(function(){p(f,v,c,b-1)})}).catch(c);c(_)}}function d(){return{forages:[],db:null,dbReady:null,deferredOperations:[]}}function q(f){var v=this,c={db:null};if(f)for(var b in f)c[b]=f[b];var S=D[c.name];S||(S=d(),D[c.name]=S),S.forages.push(v),v._initReady||(v._initReady=v.ready,v.ready=Un);var _=[];function E(){return w.resolve()}for(var L=0;L<S.forages.length;L++){var N=S.forages[L];N!==v&&_.push(N._initReady().catch(E))}var U=S.forages.slice(0);return w.all(_).then(function(){return c.db=S.db,Ge(c)}).then(function(k){return c.db=k,Or(c,v._defaultConfig.version)?ur(c):k}).then(function(k){c.db=S.db=k,v._dbInfo=c;for(var X=0;X<U.length;X++){var ue=U[X];ue!==v&&(ue._dbInfo.db=c.db,ue._dbInfo.version=c.version)}})}function C(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){p(c._dbInfo,ee,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=N.get(f);U.onsuccess=function(){var k=U.result;k===void 0&&(k=null),ir(k)&&(k=fr(k)),S(k)},U.onerror=function(){_(U.error)}}catch(k){_(k)}})}).catch(_)});return A(b,v),b}function I(f,v){var c=this,b=new w(function(S,_){c.ready().then(function(){p(c._dbInfo,ee,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=N.openCursor(),k=1;U.onsuccess=function(){var X=U.result;if(X){var ue=X.value;ir(ue)&&(ue=fr(ue));var he=f(ue,X.key,k++);he!==void 0?S(he):X.continue()}else S()},U.onerror=function(){_(U.error)}}catch(X){_(X)}})}).catch(_)});return A(b,v),b}function P(f,v,c){var b=this;f=M(f);var S=new w(function(_,E){var L;b.ready().then(function(){return L=b._dbInfo,Z.call(v)==="[object Blob]"?de(L.db).then(function(N){return N?v:ke(v)}):v}).then(function(N){p(b._dbInfo,O,function(U,k){if(U)return E(U);try{var X=k.objectStore(b._dbInfo.storeName);N===null&&(N=void 0);var ue=X.put(N,f);k.oncomplete=function(){N===void 0&&(N=null),_(N)},k.onabort=k.onerror=function(){var he=ue.error?ue.error:ue.transaction.error;E(he)}}catch(he){E(he)}})}).catch(E)});return A(S,c),S}function T(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){p(c._dbInfo,O,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=N.delete(f);L.oncomplete=function(){S()},L.onerror=function(){_(U.error)},L.onabort=function(){var k=U.error?U.error:U.transaction.error;_(k)}}catch(k){_(k)}})}).catch(_)});return A(b,v),b}function j(f){var v=this,c=new w(function(b,S){v.ready().then(function(){p(v._dbInfo,O,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),N=L.clear();E.oncomplete=function(){b()},E.onabort=E.onerror=function(){var U=N.error?N.error:N.transaction.error;S(U)}}catch(U){S(U)}})}).catch(S)});return A(c,f),c}function B(f){var v=this,c=new w(function(b,S){v.ready().then(function(){p(v._dbInfo,ee,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),N=L.count();N.onsuccess=function(){b(N.result)},N.onerror=function(){S(N.error)}}catch(U){S(U)}})}).catch(S)});return A(c,f),c}function Y(f,v){var c=this,b=new w(function(S,_){if(f<0){S(null);return}c.ready().then(function(){p(c._dbInfo,ee,function(E,L){if(E)return _(E);try{var N=L.objectStore(c._dbInfo.storeName),U=!1,k=N.openKeyCursor();k.onsuccess=function(){var X=k.result;if(!X){S(null);return}f===0||U?S(X.key):(U=!0,X.advance(f))},k.onerror=function(){_(k.error)}}catch(X){_(X)}})}).catch(_)});return A(b,v),b}function V(f){var v=this,c=new w(function(b,S){v.ready().then(function(){p(v._dbInfo,ee,function(_,E){if(_)return S(_);try{var L=E.objectStore(v._dbInfo.storeName),N=L.openKeyCursor(),U=[];N.onsuccess=function(){var k=N.result;if(!k){b(U);return}U.push(k.key),k.continue()},N.onerror=function(){S(N.error)}}catch(k){S(k)}})}).catch(S)});return A(c,f),c}function z(f,v){v=H.apply(this,arguments);var c=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||c.name,f.storeName=f.storeName||c.storeName);var b=this,S;if(!f.name)S=w.reject("Invalid arguments");else{var _=f.name===c.name&&b._dbInfo.db,E=_?w.resolve(b._dbInfo.db):Ge(f).then(function(L){var N=D[f.name],U=N.forages;N.db=L;for(var k=0;k<U.length;k++)U[k]._dbInfo.db=L;return L});f.storeName?S=E.then(function(L){if(!!L.objectStoreNames.contains(f.storeName)){var N=L.version+1;qe(f);var U=D[f.name],k=U.forages;L.close();for(var X=0;X<k.length;X++){var ue=k[X];ue._dbInfo.db=null,ue._dbInfo.version=N}var he=new w(function(me,Ae){var Se=m.open(f.name,N);Se.onerror=function(He){var ut=Se.result;ut.close(),Ae(He)},Se.onupgradeneeded=function(){var He=Se.result;He.deleteObjectStore(f.storeName)},Se.onsuccess=function(){var He=Se.result;He.close(),me(He)}});return he.then(function(me){U.db=me;for(var Ae=0;Ae<k.length;Ae++){var Se=k[Ae];Se._dbInfo.db=me,ve(Se._dbInfo)}}).catch(function(me){throw(Ne(f,me)||w.resolve()).catch(function(){}),me})}}):S=E.then(function(L){qe(f);var N=D[f.name],U=N.forages;L.close();for(var k=0;k<U.length;k++){var X=U[k];X._dbInfo.db=null}var ue=new w(function(he,me){var Ae=m.deleteDatabase(f.name);Ae.onerror=function(){var Se=Ae.result;Se&&Se.close(),me(Ae.error)},Ae.onblocked=function(){console.warn('dropInstance blocked for database "'+f.name+'" until all open connections are closed')},Ae.onsuccess=function(){var Se=Ae.result;Se&&Se.close(),he(Se)}});return ue.then(function(he){N.db=he;for(var me=0;me<U.length;me++){var Ae=U[me];ve(Ae._dbInfo)}}).catch(function(he){throw(Ne(f,he)||w.resolve()).catch(function(){}),he})})}return A(S,v),S}var ae={_driver:"asyncStorage",_initStorage:q,_support:h(),iterate:I,getItem:C,setItem:P,removeItem:T,clear:j,length:B,key:Y,keys:V,dropInstance:z};function se(){return typeof openDatabase=="function"}var fe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ye="~~local_forage_type~",ge=/^~~local_forage_type~([^~]+)~/,ie="__lfsc__:",oe=ie.length,le="arbf",Ue="blob",Oe="si08",Te="ui08",Ke="uic8",Nr="si16",Cr="si32",Ur="ur16",Er="ui32",Ft="fl32",Ir="fl64",ws=oe+le.length,bs=Object.prototype.toString;function xs(f){var v=f.length*.75,c=f.length,b,S=0,_,E,L,N;f[f.length-1]==="="&&(v--,f[f.length-2]==="="&&v--);var U=new ArrayBuffer(v),k=new Uint8Array(U);for(b=0;b<c;b+=4)_=fe.indexOf(f[b]),E=fe.indexOf(f[b+1]),L=fe.indexOf(f[b+2]),N=fe.indexOf(f[b+3]),k[S++]=_<<2|E>>4,k[S++]=(E&15)<<4|L>>2,k[S++]=(L&3)<<6|N&63;return U}function Dn(f){var v=new Uint8Array(f),c="",b;for(b=0;b<v.length;b+=3)c+=fe[v[b]>>2],c+=fe[(v[b]&3)<<4|v[b+1]>>4],c+=fe[(v[b+1]&15)<<2|v[b+2]>>6],c+=fe[v[b+2]&63];return v.length%3===2?c=c.substring(0,c.length-1)+"=":v.length%3===1&&(c=c.substring(0,c.length-2)+"=="),c}function ld(f,v){var c="";if(f&&(c=bs.call(f)),f&&(c==="[object ArrayBuffer]"||f.buffer&&bs.call(f.buffer)==="[object ArrayBuffer]")){var b,S=ie;f instanceof ArrayBuffer?(b=f,S+=le):(b=f.buffer,c==="[object Int8Array]"?S+=Oe:c==="[object Uint8Array]"?S+=Te:c==="[object Uint8ClampedArray]"?S+=Ke:c==="[object Int16Array]"?S+=Nr:c==="[object Uint16Array]"?S+=Ur:c==="[object Int32Array]"?S+=Cr:c==="[object Uint32Array]"?S+=Er:c==="[object Float32Array]"?S+=Ft:c==="[object Float64Array]"?S+=Ir:v(new Error("Failed to get type for BinaryArray"))),v(S+Dn(b))}else if(c==="[object Blob]"){var _=new FileReader;_.onload=function(){var E=ye+f.type+"~"+Dn(this.result);v(ie+Ue+E)},_.readAsArrayBuffer(f)}else try{v(JSON.stringify(f))}catch(E){console.error("Couldn't convert value into a JSON string: ",f),v(null,E)}}function hd(f){if(f.substring(0,oe)!==ie)return JSON.parse(f);var v=f.substring(ws),c=f.substring(oe,ws),b;if(c===Ue&&ge.test(v)){var S=v.match(ge);b=S[1],v=v.substring(S[0].length)}var _=xs(v);switch(c){case le:return _;case Ue:return x([_],{type:b});case Oe:return new Int8Array(_);case Te:return new Uint8Array(_);case Ke:return new Uint8ClampedArray(_);case Nr:return new Int16Array(_);case Ur:return new Uint16Array(_);case Cr:return new Int32Array(_);case Er:return new Uint32Array(_);case Ft:return new Float32Array(_);case Ir:return new Float64Array(_);default:throw new Error("Unkown type: "+c)}}var Fn={serialize:ld,deserialize:hd,stringToBuffer:xs,bufferToString:Dn};function Ss(f,v,c,b){f.executeSql("CREATE TABLE IF NOT EXISTS "+v.storeName+" (id INTEGER PRIMARY KEY, key unique, value)",[],c,b)}function pd(f){var v=this,c={db:null};if(f)for(var b in f)c[b]=typeof f[b]!="string"?f[b].toString():f[b];var S=new w(function(_,E){try{c.db=openDatabase(c.name,String(c.version),c.description,c.size)}catch(L){return E(L)}c.db.transaction(function(L){Ss(L,c,function(){v._dbInfo=c,_()},function(N,U){E(U)})},E)});return c.serializer=Fn,S}function cr(f,v,c,b,S,_){f.executeSql(c,b,S,function(E,L){L.code===L.SYNTAX_ERR?E.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name = ?",[v.storeName],function(N,U){U.rows.length?_(N,L):Ss(N,v,function(){N.executeSql(c,b,S,_)},_)},_):_(E,L)},_)}function dd(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"SELECT * FROM "+E.storeName+" WHERE key = ? LIMIT 1",[f],function(N,U){var k=U.rows.length?U.rows.item(0).value:null;k&&(k=E.serializer.deserialize(k)),S(k)},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function md(f,v){var c=this,b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"SELECT * FROM "+E.storeName,[],function(N,U){for(var k=U.rows,X=k.length,ue=0;ue<X;ue++){var he=k.item(ue),me=he.value;if(me&&(me=E.serializer.deserialize(me)),me=f(me,he.key,ue+1),me!==void 0){S(me);return}}S()},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function As(f,v,c,b){var S=this;f=M(f);var _=new w(function(E,L){S.ready().then(function(){v===void 0&&(v=null);var N=v,U=S._dbInfo;U.serializer.serialize(v,function(k,X){X?L(X):U.db.transaction(function(ue){cr(ue,U,"INSERT OR REPLACE INTO "+U.storeName+" (key, value) VALUES (?, ?)",[f,k],function(){E(N)},function(he,me){L(me)})},function(ue){if(ue.code===ue.QUOTA_ERR){if(b>0){E(As.apply(S,[f,N,c,b-1]));return}L(ue)}})})}).catch(L)});return A(_,c),_}function gd(f,v,c){return As.apply(this,[f,v,c,1])}function vd(f,v){var c=this;f=M(f);var b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"DELETE FROM "+E.storeName+" WHERE key = ?",[f],function(){S()},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function yd(f){var v=this,c=new w(function(b,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){cr(E,_,"DELETE FROM "+_.storeName,[],function(){b()},function(L,N){S(N)})})}).catch(S)});return A(c,f),c}function _d(f){var v=this,c=new w(function(b,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){cr(E,_,"SELECT COUNT(key) as c FROM "+_.storeName,[],function(L,N){var U=N.rows.item(0).c;b(U)},function(L,N){S(N)})})}).catch(S)});return A(c,f),c}function wd(f,v){var c=this,b=new w(function(S,_){c.ready().then(function(){var E=c._dbInfo;E.db.transaction(function(L){cr(L,E,"SELECT key FROM "+E.storeName+" WHERE id = ? LIMIT 1",[f+1],function(N,U){var k=U.rows.length?U.rows.item(0).key:null;S(k)},function(N,U){_(U)})})}).catch(_)});return A(b,v),b}function bd(f){var v=this,c=new w(function(b,S){v.ready().then(function(){var _=v._dbInfo;_.db.transaction(function(E){cr(E,_,"SELECT key FROM "+_.storeName,[],function(L,N){for(var U=[],k=0;k<N.rows.length;k++)U.push(N.rows.item(k).key);b(U)},function(L,N){S(N)})})}).catch(S)});return A(c,f),c}function xd(f){return new w(function(v,c){f.transaction(function(b){b.executeSql("SELECT name FROM sqlite_master WHERE type='table' AND name <> '__WebKitDatabaseInfoTable__'",[],function(S,_){for(var E=[],L=0;L<_.rows.length;L++)E.push(_.rows.item(L).name);v({db:f,storeNames:E})},function(S,_){c(_)})},function(b){c(b)})})}function Sd(f,v){v=H.apply(this,arguments);var c=this.config();f=typeof f!="function"&&f||{},f.name||(f.name=f.name||c.name,f.storeName=f.storeName||c.storeName);var b=this,S;return f.name?S=new w(function(_){var E;f.name===c.name?E=b._dbInfo.db:E=openDatabase(f.name,"","",0),f.storeName?_({db:E,storeNames:[f.storeName]}):_(xd(E))}).then(function(_){return new w(function(E,L){_.db.transaction(function(N){function U(he){return new w(function(me,Ae){N.executeSql("DROP TABLE IF EXISTS "+he,[],function(){me()},function(Se,He){Ae(He)})})}for(var k=[],X=0,ue=_.storeNames.length;X<ue;X++)k.push(U(_.storeNames[X]));w.all(k).then(function(){E()}).catch(function(he){L(he)})},function(N){L(N)})})}):S=w.reject("Invalid arguments"),A(S,v),S}var Ad={_driver:"webSQLStorage",_initStorage:pd,_support:se(),iterate:md,getItem:dd,setItem:gd,removeItem:vd,clear:yd,length:_d,key:wd,keys:bd,dropInstance:Sd};function qd(){try{return typeof localStorage!="undefined"&&"setItem"in localStorage&&!!localStorage.setItem}catch(f){return!1}}function qs(f,v){var c=f.name+"/";return f.storeName!==v.storeName&&(c+=f.storeName+"/"),c}function Od(){var f="_localforage_support_test";try{return localStorage.setItem(f,!0),localStorage.removeItem(f),!1}catch(v){return!0}}function Cd(){return!Od()||localStorage.length>0}function Ed(f){var v=this,c={};if(f)for(var b in f)c[b]=f[b];return c.keyPrefix=qs(f,v._defaultConfig),Cd()?(v._dbInfo=c,c.serializer=Fn,w.resolve()):w.reject()}function Id(f){var v=this,c=v.ready().then(function(){for(var b=v._dbInfo.keyPrefix,S=localStorage.length-1;S>=0;S--){var _=localStorage.key(S);_.indexOf(b)===0&&localStorage.removeItem(_)}});return A(c,f),c}function Td(f,v){var c=this;f=M(f);var b=c.ready().then(function(){var S=c._dbInfo,_=localStorage.getItem(S.keyPrefix+f);return _&&(_=S.serializer.deserialize(_)),_});return A(b,v),b}function Pd(f,v){var c=this,b=c.ready().then(function(){for(var S=c._dbInfo,_=S.keyPrefix,E=_.length,L=localStorage.length,N=1,U=0;U<L;U++){var k=localStorage.key(U);if(k.indexOf(_)===0){var X=localStorage.getItem(k);if(X&&(X=S.serializer.deserialize(X)),X=f(X,k.substring(E),N++),X!==void 0)return X}}});return A(b,v),b}function Md(f,v){var c=this,b=c.ready().then(function(){var S=c._dbInfo,_;try{_=localStorage.key(f)}catch(E){_=null}return _&&(_=_.substring(S.keyPrefix.length)),_});return A(b,v),b}function Rd(f){var v=this,c=v.ready().then(function(){for(var b=v._dbInfo,S=localStorage.length,_=[],E=0;E<S;E++){var L=localStorage.key(E);L.indexOf(b.keyPrefix)===0&&_.push(L.substring(b.keyPrefix.length))}return _});return A(c,f),c}function Ld(f){var v=this,c=v.keys().then(function(b){return b.length});return A(c,f),c}function jd(f,v){var c=this;f=M(f);var b=c.ready().then(function(){var S=c._dbInfo;localStorage.removeItem(S.keyPrefix+f)});return A(b,v),b}function Nd(f,v,c){var b=this;f=M(f);var S=b.ready().then(function(){v===void 0&&(v=null);var _=v;return new w(function(E,L){var N=b._dbInfo;N.serializer.serialize(v,function(U,k){if(k)L(k);else try{localStorage.setItem(N.keyPrefix+f,U),E(_)}catch(X){(X.name==="QuotaExceededError"||X.name==="NS_ERROR_DOM_QUOTA_REACHED")&&L(X),L(X)}})})});return A(S,c),S}function Ud(f,v){if(v=H.apply(this,arguments),f=typeof f!="function"&&f||{},!f.name){var c=this.config();f.name=f.name||c.name,f.storeName=f.storeName||c.storeName}var b=this,S;return f.name?S=new w(function(_){f.storeName?_(qs(f,b._defaultConfig)):_(f.name+"/")}).then(function(_){for(var E=localStorage.length-1;E>=0;E--){var L=localStorage.key(E);L.indexOf(_)===0&&localStorage.removeItem(L)}}):S=w.reject("Invalid arguments"),A(S,v),S}var Dd={_driver:"localStorageWrapper",_initStorage:Ed,_support:qd(),iterate:Pd,getItem:Td,setItem:Nd,removeItem:jd,clear:Id,length:Ld,key:Md,keys:Rd,dropInstance:Ud},Fd=function(v,c){return v===c||typeof v=="number"&&typeof c=="number"&&isNaN(v)&&isNaN(c)},Bd=function(v,c){for(var b=v.length,S=0;S<b;){if(Fd(v[S],c))return!0;S++}return!1},Os=Array.isArray||function(f){return Object.prototype.toString.call(f)==="[object Array]"},ot={},Cs={},Dr={INDEXEDDB:ae,WEBSQL:Ad,LOCALSTORAGE:Dd},kd=[Dr.INDEXEDDB._driver,Dr.WEBSQL._driver,Dr.LOCALSTORAGE._driver],Bt=["dropInstance"],Bn=["clear","getItem","iterate","key","keys","length","removeItem","setItem"].concat(Bt),$d={description:"",driver:kd.slice(),name:"localforage",size:4980736,storeName:"keyvaluepairs",version:1};function zd(f,v){f[v]=function(){var c=arguments;return f.ready().then(function(){return f[v].apply(f,c)})}}function kn(){for(var f=1;f<arguments.length;f++){var v=arguments[f];if(v)for(var c in v)v.hasOwnProperty(c)&&(Os(v[c])?arguments[0][c]=v[c].slice():arguments[0][c]=v[c])}return arguments[0]}var Hd=function(){function f(v){o(this,f);for(var c in Dr)if(Dr.hasOwnProperty(c)){var b=Dr[c],S=b._driver;this[c]=S,ot[S]||this.defineDriver(b)}this._defaultConfig=kn({},$d),this._config=kn({},this._defaultConfig,v),this._driverSet=null,this._initDriver=null,this._ready=!1,this._dbInfo=null,this._wrapLibraryMethodsWithReady(),this.setDriver(this._config.driver).catch(function(){})}return f.prototype.config=function(c){if((typeof c=="undefined"?"undefined":a(c))==="object"){if(this._ready)return new Error("Can't call config() after localforage has been used.");for(var b in c){if(b==="storeName"&&(c[b]=c[b].replace(/\W/g,"_")),b==="version"&&typeof c[b]!="number")return new Error("Database version must be a number.");this._config[b]=c[b]}return"driver"in c&&c.driver?this.setDriver(this._config.driver):!0}else return typeof c=="string"?this._config[c]:this._config},f.prototype.defineDriver=function(c,b,S){var _=new w(function(E,L){try{var N=c._driver,U=new Error("Custom driver not compliant; see https://mozilla.github.io/localForage/#definedriver");if(!c._driver){L(U);return}for(var k=Bn.concat("_initStorage"),X=0,ue=k.length;X<ue;X++){var he=k[X],me=!Bd(Bt,he);if((me||c[he])&&typeof c[he]!="function"){L(U);return}}var Ae=function(){for(var ut=function(Kd){return function(){var Vd=new Error("Method "+Kd+" is not implemented by the current driver"),Es=w.reject(Vd);return A(Es,arguments[arguments.length-1]),Es}},$n=0,Gd=Bt.length;$n<Gd;$n++){var zn=Bt[$n];c[zn]||(c[zn]=ut(zn))}};Ae();var Se=function(ut){ot[N]&&console.info("Redefining LocalForage driver: "+N),ot[N]=c,Cs[N]=ut,E()};"_support"in c?c._support&&typeof c._support=="function"?c._support().then(Se,L):Se(!!c._support):Se(!0)}catch(He){L(He)}});return y(_,b,S),_},f.prototype.driver=function(){return this._driver||null},f.prototype.getDriver=function(c,b,S){var _=ot[c]?w.resolve(ot[c]):w.reject(new Error("Driver not found."));return y(_,b,S),_},f.prototype.getSerializer=function(c){var b=w.resolve(Fn);return y(b,c),b},f.prototype.ready=function(c){var b=this,S=b._driverSet.then(function(){return b._ready===null&&(b._ready=b._initDriver()),b._ready});return y(S,c,c),S},f.prototype.setDriver=function(c,b,S){var _=this;Os(c)||(c=[c]);var E=this._getSupportedDrivers(c);function L(){_._config.driver=_.driver()}function N(X){return _._extend(X),L(),_._ready=_._initStorage(_._config),_._ready}function U(X){return function(){var ue=0;function he(){for(;ue<X.length;){var me=X[ue];return ue++,_._dbInfo=null,_._ready=null,_.getDriver(me).then(N).catch(he)}L();var Ae=new Error("No available storage method found.");return _._driverSet=w.reject(Ae),_._driverSet}return he()}}var k=this._driverSet!==null?this._driverSet.catch(function(){return w.resolve()}):w.resolve();return this._driverSet=k.then(function(){var X=E[0];return _._dbInfo=null,_._ready=null,_.getDriver(X).then(function(ue){_._driver=ue._driver,L(),_._wrapLibraryMethodsWithReady(),_._initDriver=U(E)})}).catch(function(){L();var X=new Error("No available storage method found.");return _._driverSet=w.reject(X),_._driverSet}),y(this._driverSet,b,S),this._driverSet},f.prototype.supports=function(c){return!!Cs[c]},f.prototype._extend=function(c){kn(this,c)},f.prototype._getSupportedDrivers=function(c){for(var b=[],S=0,_=c.length;S<_;S++){var E=c[S];this.supports(E)&&b.push(E)}return b},f.prototype._wrapLibraryMethodsWithReady=function(){for(var c=0,b=Bn.length;c<b;c++)zd(this,Bn[c])},f.prototype.createInstance=function(c){return new f(c)},f}(),Wd=new Hd;i.exports=Wd},{3:3}]},{},[4])(4)})});var od=g((ys,ad)=>{"use strict";(function(r,e,t){let n;(n=t.define)&&n.amd?n([],function(){return e}):(n=t.modules)?n[r.toLowerCase()]=e:typeof ys=="object"?ad.exports=e:t[r]=e})("FlexSearch",function r(e){function t(l,p){let d=p?p.id:l&&l.id;this.id=d||d===0?d:Ge++,this.init(l,p),o(this,"index",function(){return this.a?Object.keys(this.a.index[this.a.keys[0]].c):Object.keys(this.c)}),o(this,"length",function(){return this.index.length})}function n(l,p,d,q){return this.u!==this.g&&(this.o=this.o.concat(d),this.u++,q&&this.o.length>=q&&(this.u=this.g),this.u===this.g&&(this.cache&&this.j.set(p,this.o),this.F&&this.F(this.o))),this}function i(l){let p=W();for(let d in l)if(l.hasOwnProperty(d)){let q=l[d];D(q)?p[d]=q.slice(0):ee(q)?p[d]=i(q):p[d]=q}return p}function s(l,p){let d=l.length,q=Z(p),C=[];for(let I=0,P=0;I<d;I++){let T=l[I];(q&&p(T)||!q&&!p[T])&&(C[P++]=T)}return C}function a(l,p,d,q,C,I,P,T,j,B){d=K(d,P?0:C,T,I,p,j,B);let Y;if(T&&(T=d.page,Y=d.next,d=d.result),P)p=this.where(P,null,C,d);else{for(p=d,d=this.l,C=p.length,I=Array(C),P=0;P<C;P++)I[P]=d[p[P]];p=I}return d=p,q&&(Z(q)||(ke=q.split(":"),1<ke.length?q=M:(ke=ke[0],q=y)),d.sort(q)),d=H(T,Y,d),this.cache&&this.j.set(l,d),d}function o(l,p,d){Object.defineProperty(l,p,{get:d})}function u(l){return new RegExp(l,"g")}function m(l,p){for(let d=0;d<p.length;d+=2)l=l.replace(p[d],p[d+1]);return l}function h(l,p,d,q,C,I,P,T){return p[d]?p[d]:(C=C?(T-(P||T/1.5))*I+(P||T/1.5)*C:I,p[d]=C,C>=P&&(l=l[T-(C+.5>>0)],l=l[d]||(l[d]=[]),l[l.length]=q),C)}function x(l,p){if(l){let d=Object.keys(l);for(let q=0,C=d.length;q<C;q++){let I=d[q],P=l[I];if(P)for(let T=0,j=P.length;T<j;T++)if(P[T]===p){j===1?delete l[I]:P.splice(T,1);break}else ee(P[T])&&x(P[T],p)}}}function w(l){let p="",d="";var q="";for(let C=0;C<l.length;C++){let I=l[C];I!==d&&(C&&I==="h"?(q=q==="a"||q==="e"||q==="i"||q==="o"||q==="u"||q==="y",((d==="a"||d==="e"||d==="i"||d==="o"||d==="u"||d==="y")&&q||d===" ")&&(p+=I)):p+=I),q=C===l.length-1?"":l[C+1],d=I}return p}function A(l,p){return l=l.length-p.length,0>l?1:l?-1:0}function y(l,p){return l=l[ke],p=p[ke],l<p?-1:l>p?1:0}function M(l,p){let d=ke.length;for(let q=0;q<d;q++)l=l[ke[q]],p=p[ke[q]];return l<p?-1:l>p?1:0}function H(l,p,d){return l?{page:l,next:p?""+p:null,result:d}:d}function K(l,p,d,q,C,I,P){let T,j=[];if(d===!0){d="0";var B=""}else B=d&&d.split(":");let Y=l.length;if(1<Y){let ge=W(),ie=[],oe,le;var V=0,z;let Ue;var ae=!0;let Oe,Te=0,Ke,Nr,Cr,Ur;if(B&&(B.length===2?(Cr=B,B=!1):B=Ur=parseInt(B[0],10)),P){for(oe=W();V<Y;V++)if(C[V]==="not")for(le=l[V],Ue=le.length,z=0;z<Ue;z++)oe["@"+le[z]]=1;else Nr=V+1;if(O(Nr))return H(d,T,j);V=0}else Ke=te(C)&&C;let Er;for(;V<Y;V++){let Ft=V===(Nr||Y)-1;if(!Ke||!V)if((z=Ke||C&&C[V])&&z!=="and")if(z==="or")Er=!1;else continue;else Er=I=!0;if(le=l[V],Ue=le.length){if(ae)if(Oe){var se=Oe.length;for(z=0;z<se;z++){ae=Oe[z];var fe="@"+ae;P&&oe[fe]||(ge[fe]=1,I||(j[Te++]=ae))}Oe=null,ae=!1}else{Oe=le;continue}for(fe=!1,z=0;z<Ue;z++){se=le[z];var ye="@"+se;let Ir=I?ge[ye]||0:V;if(!(!Ir&&!q||P&&oe[ye]||!I&&ge[ye]))if(Ir===V){if(Ft){if((!Ur||--Ur<Te)&&(j[Te++]=se,p&&Te===p))return H(d,Te+(B||0),j)}else ge[ye]=V+1;fe=!0}else q&&(ye=ie[Ir]||(ie[Ir]=[]),ye[ye.length]=se)}if(Er&&!fe&&!q)break}else if(Er&&!q)return H(d,T,le)}if(Oe)if(V=Oe.length,P)for(z=B?parseInt(B,10):0;z<V;z++)l=Oe[z],oe["@"+l]||(j[Te++]=l);else j=Oe;if(q){for(Te=j.length,Cr?(V=parseInt(Cr[0],10)+1,z=parseInt(Cr[1],10)+1):(V=ie.length,z=0);V--;)if(se=ie[V]){for(Ue=se.length;z<Ue;z++)if(q=se[z],(!P||!oe["@"+q])&&(j[Te++]=q,p&&Te===p))return H(d,V+":"+z,j);z=0}}}else!Y||C&&C[0]==="not"||(j=l[0],B&&(B=parseInt(B[0],10)));return p&&(P=j.length,B&&B>P&&(B=0),B=B||0,T=B+p,T<P?j=j.slice(B,T):(T=0,B&&(j=j.slice(B)))),H(d,T,j)}function te(l){return typeof l=="string"}function D(l){return l.constructor===Array}function Z(l){return typeof l=="function"}function ee(l){return typeof l=="object"}function O(l){return typeof l=="undefined"}function Q(l){let p=Array(l);for(let d=0;d<l;d++)p[d]=W();return p}function W(){return Object.create(null)}function de(){let l,p;self.onmessage=function(d){if(d=d.data)if(d.search){let q=p.search(d.content,d.threshold?{limit:d.limit,threshold:d.threshold,where:d.where}:d.limit);self.postMessage({id:l,content:d.content,limit:d.limit,result:q})}else d.add?p.add(d.id,d.content):d.update?p.update(d.id,d.content):d.remove?p.remove(d.id):d.clear?p.clear():d.info?(d=p.info(),d.worker=l,console.log(d)):d.register&&(l=d.id,d.options.cache=!1,d.options.async=!1,d.options.worker=!1,p=new Function(d.register.substring(d.register.indexOf("{")+1,d.register.lastIndexOf("}")))(),p=new p(d.options))}}function qe(l,p,d,q){l=e("flexsearch","id"+l,de,function(I){(I=I.data)&&I.result&&q(I.id,I.content,I.result,I.limit,I.where,I.cursor,I.suggest)},p);let C=r.toString();return d.id=p,l.postMessage({register:C,options:d,id:p}),l}let ve={encode:"icase",f:"forward",split:/\W+/,cache:!1,async:!1,g:!1,D:!1,a:!1,b:9,threshold:0,depth:0},Ne={memory:{encode:"extra",f:"strict",threshold:0,b:1},speed:{encode:"icase",f:"strict",threshold:1,b:3,depth:2},match:{encode:"extra",f:"full",threshold:1,b:3},score:{encode:"extra",f:"strict",threshold:1,b:9,depth:4},balance:{encode:"balance",f:"strict",threshold:0,b:3,depth:3},fast:{encode:"icase",f:"strict",threshold:8,b:9,depth:1}},Ie=[],Ge=0,ur={},Or={};t.create=function(l,p){return new t(l,p)},t.registerMatcher=function(l){for(let p in l)l.hasOwnProperty(p)&&Ie.push(u(p),l[p]);return this},t.registerEncoder=function(l,p){return ir[l]=p.bind(ir),this},t.registerLanguage=function(l,p){return ur[l]=p.filter,Or[l]=p.stemmer,this},t.encode=function(l,p){return ir[l](p)},t.prototype.init=function(l,p){if(this.v=[],p){var d=p.preset;l=p}else l||(l=ve),d=l.preset;if(p={},te(l)?(p=Ne[l],l={}):d&&(p=Ne[d]),d=l.worker)if(typeof Worker=="undefined")l.worker=!1,this.m=null;else{var q=parseInt(d,10)||4;this.C=-1,this.u=0,this.o=[],this.F=null,this.m=Array(q);for(var C=0;C<q;C++)this.m[C]=qe(this.id,C,l,n.bind(this))}if(this.f=l.tokenize||p.f||this.f||ve.f,this.split=O(d=l.split)?this.split||ve.split:te(d)?u(d):d,this.D=l.rtl||this.D||ve.D,this.async=typeof Promise=="undefined"||O(d=l.async)?this.async||ve.async:d,this.g=O(d=l.worker)?this.g||ve.g:d,this.threshold=O(d=l.threshold)?p.threshold||this.threshold||ve.threshold:d,this.b=O(d=l.resolution)?d=p.b||this.b||ve.b:d,d<=this.threshold&&(this.b=this.threshold+1),this.depth=this.f!=="strict"||O(d=l.depth)?p.depth||this.depth||ve.depth:d,this.w=(d=O(d=l.encode)?p.encode||ve.encode:d)&&ir[d]&&ir[d].bind(ir)||(Z(d)?d:this.w||!1),(d=l.matcher)&&this.addMatcher(d),d=(p=l.lang)||l.filter){if(te(d)&&(d=ur[d]),D(d)){q=this.w,C=W();for(var I=0;I<d.length;I++){var P=q?q(d[I]):d[I];C[P]=1}d=C}this.filter=d}if(d=p||l.stemmer){var T;p=te(d)?Or[d]:d,q=this.w,C=[];for(T in p)p.hasOwnProperty(T)&&(I=q?q(T):T,C.push(u(I+"($|\\W)"),q?q(p[T]):p[T]));this.stemmer=T=C}if(this.a=C=(d=l.doc)?i(d):this.a||ve.a,this.i=Q(this.b-(this.threshold||0)),this.h=W(),this.c=W(),C){if(this.l=W(),l.doc=null,T=C.index={},p=C.keys=[],q=C.field,I=C.tag,P=C.store,D(C.id)||(C.id=C.id.split(":")),P){var j=W();if(te(P))j[P]=1;else if(D(P))for(let B=0;B<P.length;B++)j[P[B]]=1;else ee(P)&&(j=P);C.store=j}if(I){if(this.G=W(),P=W(),q)if(te(q))P[q]=l;else if(D(q))for(j=0;j<q.length;j++)P[q[j]]=l;else ee(q)&&(P=q);for(D(I)||(C.tag=I=[I]),q=0;q<I.length;q++)this.G[I[q]]=W();this.I=I,q=P}if(q){let B;for(D(q)||(ee(q)?(B=q,C.field=q=Object.keys(q)):C.field=q=[q]),C=0;C<q.length;C++)I=q[C],D(I)||(B&&(l=B[I]),p[C]=I,q[C]=I.split(":")),T[I]=new t(l)}l.doc=d}return this.B=!0,this.j=(this.cache=d=O(d=l.cache)?this.cache||ve.cache:d)?new Un(d):!1,this},t.prototype.encode=function(l){return l&&(Ie.length&&(l=m(l,Ie)),this.v.length&&(l=m(l,this.v)),this.w&&(l=this.w(l)),this.stemmer&&(l=m(l,this.stemmer))),l},t.prototype.addMatcher=function(l){let p=this.v;for(let d in l)l.hasOwnProperty(d)&&p.push(u(d),l[d]);return this},t.prototype.add=function(l,p,d,q,C){if(this.a&&ee(l))return this.A("add",l,p);if(p&&te(p)&&(l||l===0)){var I="@"+l;if(this.c[I]&&!q)return this.update(l,p);if(this.g)return++this.C>=this.m.length&&(this.C=0),this.m[this.C].postMessage({add:!0,id:l,content:p}),this.c[I]=""+this.C,d&&d(),this;if(!C){if(this.async&&typeof importScripts!="function"){let ie=this;if(I=new Promise(function(oe){setTimeout(function(){ie.add(l,p,null,q,!0),ie=null,oe()})}),d)I.then(d);else return I;return this}if(d)return this.add(l,p,null,q,!0),d(),this}if(p=this.encode(p),!p.length)return this;d=this.f,C=Z(d)?d(p):p.split(this.split),this.filter&&(C=s(C,this.filter));let V=W();V._ctx=W();let z=C.length,ae=this.threshold,se=this.depth,fe=this.b,ye=this.i,ge=this.D;for(let ie=0;ie<z;ie++){var P=C[ie];if(P){var T=P.length,j=(ge?ie+1:z-ie)/z,B="";switch(d){case"reverse":case"both":for(var Y=T;--Y;)B=P[Y]+B,h(ye,V,B,l,ge?1:(T-Y)/T,j,ae,fe-1);B="";case"forward":for(Y=0;Y<T;Y++)B+=P[Y],h(ye,V,B,l,ge?(Y+1)/T:1,j,ae,fe-1);break;case"full":for(Y=0;Y<T;Y++){let oe=(ge?Y+1:T-Y)/T;for(let le=T;le>Y;le--)B=P.substring(Y,le),h(ye,V,B,l,oe,j,ae,fe-1)}break;default:if(T=h(ye,V,P,l,1,j,ae,fe-1),se&&1<z&&T>=ae)for(T=V._ctx[P]||(V._ctx[P]=W()),P=this.h[P]||(this.h[P]=Q(fe-(ae||0))),j=ie-se,B=ie+se+1,0>j&&(j=0),B>z&&(B=z);j<B;j++)j!==ie&&h(P,T,C[j],l,0,fe-(j<ie?ie-j:j-ie),ae,fe-1)}}}this.c[I]=1,this.B=!1}return this},t.prototype.A=function(l,p,d){if(D(p)){var q=p.length;if(q--){for(var C=0;C<q;C++)this.A(l,p[C]);return this.A(l,p[q],d)}}else{var I=this.a.index,P=this.a.keys,T=this.a.tag;C=this.a.store;var j,B=this.a.id;q=p;for(var Y=0;Y<B.length;Y++)q=q[B[Y]];if(l==="remove"&&(delete this.l[q],B=P.length,B--)){for(p=0;p<B;p++)I[P[p]].remove(q);return I[P[B]].remove(q,d)}if(T){for(j=0;j<T.length;j++){var V=T[j],z=p;for(B=V.split(":"),Y=0;Y<B.length;Y++)z=z[B[Y]];z="@"+z}j=this.G[V],j=j[z]||(j[z]=[])}B=this.a.field;for(let ae=0,se=B.length;ae<se;ae++){for(V=B[ae],T=p,z=0;z<V.length;z++)T=T[V[z]];V=I[P[ae]],z=l==="add"?V.add:V.update,ae===se-1?z.call(V,q,T,d):z.call(V,q,T)}if(C){for(d=Object.keys(C),l=W(),I=0;I<d.length;I++)if(P=d[I],C[P]){P=P.split(":");let ae,se;for(B=0;B<P.length;B++)T=P[B],ae=(ae||p)[T],se=(se||l)[T]=ae}p=l}j&&(j[j.length]=p),this.l[q]=p}return this},t.prototype.update=function(l,p,d){return this.a&&ee(l)?this.A("update",l,p):(this.c["@"+l]&&te(p)&&(this.remove(l),this.add(l,p,d,!0)),this)},t.prototype.remove=function(l,p,d){if(this.a&&ee(l))return this.A("remove",l,p);var q="@"+l;if(this.c[q]){if(this.g)return this.m[this.c[q]].postMessage({remove:!0,id:l}),delete this.c[q],p&&p(),this;if(!d){if(this.async&&typeof importScripts!="function"){let C=this;if(q=new Promise(function(I){setTimeout(function(){C.remove(l,null,!0),C=null,I()})}),p)q.then(p);else return q;return this}if(p)return this.remove(l,null,!0),p(),this}for(p=0;p<this.b-(this.threshold||0);p++)x(this.i[p],l);this.depth&&x(this.h,l),delete this.c[q],this.B=!1}return this};let ke;t.prototype.search=function(l,p,d,q){if(ee(p)){if(D(p))for(var C=0;C<p.length;C++)p[C].query=l;else p.query=l;l=p,p=1e3}else p&&Z(p)?(d=p,p=1e3):p||p===0||(p=1e3);if(this.g){this.F=d,this.u=0,this.o=[];for(var I=0;I<this.g;I++)this.m[I].postMessage({search:!0,limit:p,content:l})}else{var P=[],T=l;if(ee(l)&&!D(l)){d||(d=l.callback)&&(T.callback=null);var j=l.sort,B=l.page;p=l.limit,I=l.threshold;var Y=l.suggest;l=l.query}if(this.a){I=this.a.index;let ge=T.where;var V=T.bool||"or",z=T.field;let ie=V,oe,le;if(z)D(z)||(z=[z]);else if(D(T)){var ae=T;z=[],ie=[];for(var se=0;se<T.length;se++)q=T[se],C=q.bool||V,z[se]=q.field,ie[se]=C,C==="not"?oe=!0:C==="and"&&(le=!0)}else z=this.a.keys;for(V=z.length,se=0;se<V;se++)ae&&(T=ae[se]),B&&!te(T)&&(T.page=null,T.limit=0),P[se]=I[z[se]].search(T,0);if(d)return d(a.call(this,l,ie,P,j,p,Y,ge,B,le,oe));if(this.async){let Ue=this;return new Promise(function(Oe){Promise.all(P).then(function(Te){Oe(a.call(Ue,l,ie,Te,j,p,Y,ge,B,le,oe))})})}return a.call(this,l,ie,P,j,p,Y,ge,B,le,oe)}if(I||(I=this.threshold||0),!q){if(this.async&&typeof importScripts!="function"){let ge=this;if(I=new Promise(function(ie){setTimeout(function(){ie(ge.search(T,p,null,!0)),ge=null})}),d)I.then(d);else return I;return this}if(d)return d(this.search(T,p,null,!0)),this}if(!l||!te(l))return P;if(T=l,this.cache)if(this.B){if(d=this.j.get(l))return d}else this.j.clear(),this.B=!0;if(T=this.encode(T),!T.length)return P;d=this.f,d=Z(d)?d(T):T.split(this.split),this.filter&&(d=s(d,this.filter)),ae=d.length,q=!0,C=[];var fe=W(),ye=0;if(1<ae&&(this.depth&&this.f==="strict"?V=!0:d.sort(A)),!V||(se=this.h)){let ge=this.b;for(;ye<ae;ye++){let ie=d[ye];if(ie){if(V){if(!z){if(se[ie])z=ie,fe[ie]=1;else if(!Y)return P}if(Y&&ye===ae-1&&!C.length)V=!1,ie=z||ie,fe[ie]=0;else if(!z)continue}if(!fe[ie]){let oe=[],le=!1,Ue=0,Oe=V?se[z]:this.i;if(Oe){let Te;for(let Ke=0;Ke<ge-I;Ke++)(Te=Oe[Ke]&&Oe[Ke][ie])&&(oe[Ue++]=Te,le=!0)}if(le)z=ie,C[C.length]=1<Ue?oe.concat.apply([],oe):oe[0];else if(!Y){q=!1;break}fe[ie]=1}}}}else q=!1;return q&&(P=K(C,p,B,Y)),this.cache&&this.j.set(l,P),P}},t.prototype.find=function(l,p){return this.where(l,p,1)[0]||null},t.prototype.where=function(l,p,d,q){let C=this.l,I=[],P=0,T;var j;let B;if(ee(l)){d||(d=p);var Y=Object.keys(l),V=Y.length;if(T=!1,V===1&&Y[0]==="id")return[C[l.id]];if((j=this.I)&&!q)for(var z=0;z<j.length;z++){var ae=j[z],se=l[ae];if(!O(se)){if(B=this.G[ae]["@"+se],--V===0)return B;Y.splice(Y.indexOf(ae),1),delete l[ae];break}}for(j=Array(V),z=0;z<V;z++)j[z]=Y[z].split(":")}else{if(Z(l)){for(p=q||Object.keys(C),d=p.length,Y=0;Y<d;Y++)V=C[p[Y]],l(V)&&(I[P++]=V);return I}if(O(p))return[C[l]];if(l==="id")return[C[p]];Y=[l],V=1,j=[l.split(":")],T=!0}for(q=B||q||Object.keys(C),z=q.length,ae=0;ae<z;ae++){se=B?q[ae]:C[q[ae]];let fe=!0;for(let ye=0;ye<V;ye++){T||(p=l[Y[ye]]);let ge=j[ye],ie=ge.length,oe=se;if(1<ie)for(let le=0;le<ie;le++)oe=oe[ge[le]];else oe=oe[ge[0]];if(oe!==p){fe=!1;break}}if(fe&&(I[P++]=se,d&&P===d))break}return I},t.prototype.info=function(){if(this.g)for(let l=0;l<this.g;l++)this.m[l].postMessage({info:!0,id:this.id});else return{id:this.id,items:this.length,cache:this.cache&&this.cache.s?this.cache.s.length:!1,matcher:Ie.length+(this.v?this.v.length:0),worker:this.g,threshold:this.threshold,depth:this.depth,resolution:this.b,contextual:this.depth&&this.f==="strict"}},t.prototype.clear=function(){return this.destroy().init()},t.prototype.destroy=function(){if(this.cache&&(this.j.clear(),this.j=null),this.i=this.h=this.c=null,this.a){let l=this.a.keys;for(let p=0;p<l.length;p++)this.a.index[l[p]].destroy();this.a=this.l=null}return this},t.prototype.export=function(l){let p=!l||O(l.serialize)||l.serialize;if(this.a){let q=!l||O(l.doc)||l.doc;var d=!l||O(l.index)||l.index;l=[];let C=0;if(d)for(d=this.a.keys;C<d.length;C++){let I=this.a.index[d[C]];l[C]=[I.i,I.h,Object.keys(I.c)]}q&&(l[C]=this.l)}else l=[this.i,this.h,Object.keys(this.c)];return p&&(l=JSON.stringify(l)),l},t.prototype.import=function(l,p){(!p||O(p.serialize)||p.serialize)&&(l=JSON.parse(l));let d=W();if(this.a){var q=!p||O(p.doc)||p.doc,C=0;if(!p||O(p.index)||p.index){p=this.a.keys;let P=p.length;for(var I=l[0][2];C<I.length;C++)d[I[C]]=1;for(C=0;C<P;C++){I=this.a.index[p[C]];let T=l[C];T&&(I.i=T[0],I.h=T[1],I.c=d)}}q&&(this.l=ee(q)?q:l[C])}else{for(q=l[2],C=0;C<q.length;C++)d[q[C]]=1;this.i=l[0],this.h=l[1],this.c=d}};let fr=function(){let l=u("\\s+"),p=u("[^a-z0-9 ]"),d=[u("[-/]")," ",p,"",l," "];return function(q){return w(m(q.toLowerCase(),d))}}(),ir={icase:function(l){return l.toLowerCase()},simple:function(){let l=u("\\s+"),p=u("[^a-z0-9 ]"),d=u("[-/]"),q=u("[\xE0\xE1\xE2\xE3\xE4\xE5]"),C=u("[\xE8\xE9\xEA\xEB]"),I=u("[\xEC\xED\xEE\xEF]"),P=u("[\xF2\xF3\xF4\xF5\xF6\u0151]"),T=u("[\xF9\xFA\xFB\xFC\u0171]"),j=u("[\xFD\u0177\xFF]"),B=u("\xF1"),Y=u("[\xE7c]"),V=u("\xDF"),z=u(" & "),ae=[q,"a",C,"e",I,"i",P,"o",T,"u",j,"y",B,"n",Y,"k",V,"s",z," and ",d," ",p,"",l," "];return function(se){return se=m(se.toLowerCase(),ae),se===" "?"":se}}(),advanced:function(){let l=u("ae"),p=u("ai"),d=u("ay"),q=u("ey"),C=u("oe"),I=u("ue"),P=u("ie"),T=u("sz"),j=u("zs"),B=u("ck"),Y=u("cc"),V=u("sh"),z=u("th"),ae=u("dt"),se=u("ph"),fe=u("pf"),ye=u("ou"),ge=u("uo"),ie=[l,"a",p,"ei",d,"ei",q,"ei",C,"o",I,"u",P,"i",T,"s",j,"s",V,"s",B,"k",Y,"k",z,"t",ae,"t",se,"f",fe,"f",ye,"o",ge,"u"];return function(oe,le){return oe&&(oe=this.simple(oe),2<oe.length&&(oe=m(oe,ie)),le||1<oe.length&&(oe=w(oe)),oe)}}(),extra:function(){let l=u("p"),p=u("z"),d=u("[cgq]"),q=u("n"),C=u("d"),I=u("[vw]"),P=u("[aeiouy]"),T=[l,"b",p,"s",d,"k",q,"m",C,"t",I,"f",P,""];return function(j){if(!j)return j;if(j=this.advanced(j,!0),1<j.length){j=j.split(" ");for(let B=0;B<j.length;B++){let Y=j[B];1<Y.length&&(j[B]=Y[0]+m(Y.substring(1),T))}j=j.join(" "),j=w(j)}return j}}(),balance:fr},Un=function(){function l(p){this.clear(),this.H=p!==!0&&p}return l.prototype.clear=function(){this.cache=W(),this.count=W(),this.index=W(),this.s=[]},l.prototype.set=function(p,d){if(this.H&&O(this.cache[p])){let q=this.s.length;if(q===this.H){q--;let C=this.s[q];delete this.cache[C],delete this.count[C],delete this.index[C]}this.index[p]=q,this.s[q]=p,this.count[p]=-1,this.cache[p]=d,this.get(p)}else this.cache[p]=d},l.prototype.get=function(p){let d=this.cache[p];if(this.H&&d){var q=++this.count[p];let I=this.index,P=I[p];if(0<P){let T=this.s;for(var C=P;this.count[T[--P]]<=q&&P!==-1;);if(P++,P!==C){for(q=C;q>P;q--)C=T[q-1],T[q]=C,I[C]=q;T[P]=p,I[p]=P}}}return d},l}();return t}(function(){let r={},e=typeof Blob!="undefined"&&typeof URL!="undefined"&&URL.createObjectURL;return function(t,n,i,s,a){return i=e?URL.createObjectURL(new Blob(["("+i.toString()+")()"],{type:"text/javascript"})):t+".min.js",t+="-"+n,r[t]||(r[t]=[]),r[t][a]=new Worker(i),r[t][a].onmessage=s,r[t][a]}}()),ys)});var yE={};Wn(yE,{BaseProvider:()=>pe,CocodaSDK:()=>qr,ConceptApiProvider:()=>tr,LabelSearchSuggestionProvider:()=>wr,LocApiProvider:()=>xr,LocalMappingsProvider:()=>vr,MappingsApiProvider:()=>rr,OccurrencesApiProvider:()=>yr,ReconciliationApiProvider:()=>_r,SkohubProvider:()=>Sr,SkosmosApiProvider:()=>br,addAllProviders:()=>vE,cdk:()=>cd,errors:()=>Fe});var Fe={};Wn(Fe,{BackendError:()=>ht,BackendUnavailableError:()=>pt,CDKError:()=>Ce,InvalidOrMissingParameterError:()=>G,InvalidProviderError:()=>Fr,InvalidRequestError:()=>Xe,MethodNotImplementedError:()=>lt,MissingApiUrlError:()=>$e,NetworkError:()=>dt});var Ce=class extends Error{constructor({message:e="",relatedError:t=null,code:n=null}={}){!e&&t&&t.message&&(e=t.message),super(e),this.name=this.constructor.name,this.relatedError=t,this.code=n}},lt=class extends Ce{constructor(i){var s=i,{method:e,message:t=""}=s,n=J(s,["method","message"]);n.message=`Method not implemented: ${e} (${t})`,super(n)}},G=class extends Ce{constructor(i){var s=i,{parameter:e,message:t=""}=s,n=J(s,["parameter","message"]);n.message=`Invalid or missing parameter: ${e} (${t})`,super(n)}},Xe=class extends Ce{},ht=class extends Ce{},pt=class extends Ce{},dt=class extends Ce{},$e=class extends Ce{},Fr=class extends Ce{};var fd=ce(Yt(),1);var ne=ce(qu(),1),xe=ce(ju(),1),dr=ce(of(),1),xn=ce(Mf(),1),Zi=ce(Gf(),1),Qi=ce(bc(),1),Le=ce(Be(),1),Lt=ce(Ye(),1),be=ce(Sc(),1),es=ce(Dc(),1),Qe=ce(Tl(),1),_C=ce(gh(),1),rs=ce(Ji(),1),sr=ce(_p(),1),ts=ce(bp(),1);var Ar=ce(We(),1);var Dt={};Wn(Dt,{BaseProvider:()=>pe,ConceptApiProvider:()=>tr,LabelSearchSuggestionProvider:()=>wr,LocApiProvider:()=>xr,LocalMappingsProvider:()=>vr,MappingsApiProvider:()=>rr,OccurrencesApiProvider:()=>yr,ReconciliationApiProvider:()=>_r,SkohubProvider:()=>Sr,SkosmosApiProvider:()=>br});var it=ce(We(),1);var En=ce(Yt(),1);var Zp=[{method:"getRegistries",fallback:[],type:"Registries"},{method:"getSchemes",fallback:[],type:"Schemes"},{method:"vocSearch",fallback:[],type:"Schemes"},{method:"getTypes",fallback:[],type:"Types"},{method:"suggest",fallback:["",[],[],[]]},{method:"vocSuggest",fallback:["",[],[],[]]},{method:"getConcordances",fallback:[],type:"Concordances"},{method:"getOccurrences",fallback:[],type:"Occurrences"},{method:"getTop",fallback:[],type:"Concepts"},{method:"getConcepts",fallback:[],type:"Concepts"},{method:"getNarrower",fallback:[],type:"Concepts"},{method:"getAncestors",fallback:[],type:"Concepts"},{method:"search",fallback:[],type:"Concepts"},{method:"getMapping",fallback:null,type:"Mapping"},{method:"getMappings",fallback:[],type:"Mappings"},{method:"postMapping",fallback:null,type:"Mapping"},{method:"postMappings",fallback:[],type:"Mapping"},{method:"putMapping",fallback:null,type:"Mapping"},{method:"patchMapping",fallback:null,type:"Mapping"},{method:"deleteMapping",fallback:!1},{method:"deleteMappings",fallback:[]},{method:"getAnnotations",fallback:[],type:"Annotations"},{method:"postAnnotation",fallback:null,type:"Annotation"},{method:"putAnnotation",fallback:null,type:"Annotation"},{method:"patchAnnotation",fallback:null,type:"Annotation"},{method:"deleteAnnotation",fallback:!1}];function gr(...r){let[e,...t]=r;for(let n of t)e.endsWith("/")||(e+="/"),n.startsWith("/")&&(n=n.slice(1)),e+=n;return e}function nt(r,e){return r._totalCount=e._totalCount,r._url=e._url,r}var Ee=["schemes","top","data","concepts","narrower","ancestors","types","suggest","search","auth","mappings","concordances","annotations","occurrences"];var pe=class{constructor(e={}){this._jskos=e,this.axios=En.default.create({timeout:2e4}),this._path=typeof window!="undefined"&&window.location.pathname,this.has={},this._defaultLanguages="en,de,fr,es,nl,it,fi,pl,ru,cs,jp".split(","),this.languages=[],this._auth={key:null,bearerToken:null},this._repeating=[],this._api={status:e.status,schemes:Array.isArray(e.schemes)?void 0:e.schemes,top:e.top,data:e.data,concepts:e.concepts,narrower:e.narrower,ancestors:e.ancestors,types:e.types,suggest:e.suggest,search:e.search,"voc-suggest":e["voc-suggest"],"voc-search":e["voc-search"],mappings:e.mappings,concordances:e.concordances,annotations:e.annotations,occurrences:e.occurrences,reconcile:e.reconcile,api:e.api},this._config={},this.setRetryConfig(),this.axios.interceptors.request.use(n=>{if(!n._skipAdditionalParameters){let i=dr.default([].concat(ne.default(n,"params.language","").split(","),this.languages,this._defaultLanguages).filter(s=>s!="")).join(",");xe.default(n,"params.language",i),this.has.auth&&this._auth.bearerToken&&!ne.default(n,"headers.Authorization")&&xe.default(n,"headers.Authorization",`Bearer ${this._auth.bearerToken}`)}if(n.url.startsWith("http:")&&typeof window!="undefined"&&window.location.protocol=="https:")throw new En.default.Cancel("Can't call http API from https.");return n}),this.axios.interceptors.response.use(({data:n,headers:i={},config:s={}})=>{n=it.default.normalize(n);let a=s.url;if(a.endsWith("?")||(a+="?"),Qi.default(s.params||{},(o,u)=>{a+=`${u}=${encodeURIComponent(o)}&`}),Le.default(n)||Lt.default(n)){let o=parseInt(i["x-total-count"]);isNaN(o)||(n._totalCount=o),n._url=a}return n},n=>{let i=ne.default(n,"config._retryCount",0),s=ne.default(n,"config.method"),a=ne.default(n,"response.status");return this._retryConfig.methods.includes(s)&&this._retryConfig.statusCodes.includes(a)&&i<this._retryConfig.count?(n.config._retryCount=i+1,n.config.data&&(n.config.data=JSON.parse(n.config.data)),new Promise((o,u)=>{setTimeout(()=>{this.axios(n.config).then(o).catch(u)},(()=>{let m=this._retryConfig.delay;return typeof m=="function"?m(i):m})())})):Promise.reject(n)});let t=[];for(let{method:n,type:i}of Zp){let s=this[n]&&this[n].bind(this);if(!s){this[n]=()=>{throw new lt({method:n})};continue}this[n]=(a={})=>{if(a._raw)return delete a._raw,s(a);let o=t.find(x=>x.method==n&&Qe.default(x.options,a));if(o)return o.promise;let u;a.cancelToken||(u=this.getCancelTokenSource(),a.cancelToken=u.token);let m=this.init().then(()=>s(a)).then(x=>(Le.default(x)&&x._totalCount===void 0?x._totalCount=x.length:Lt.default(x)&&x._totalCount===void 0&&(x._totalCount=1),x&&i&&this[`adjust${i}`]&&(x=this[`adjust${i}`](x)),x)).catch(x=>{throw x instanceof Ce?x:x.response?x.response.status.toString().startsWith(4)?new Xe({relatedError:x,code:x.response.status}):new ht({relatedError:x,code:x.response.status}):x.request?typeof navigator!="undefined"&&(navigator.connection||navigator.mozConnection||navigator.webkitConnection)?new pt({relatedError:x}):new dt({relatedError:x}):new Ce({relatedError:x})});u&&(m.cancel=(...x)=>u.cancel(...x));let h={method:n,options:sr.default(a,["cancelToken"]),promise:m};return t.push(h),m.catch(()=>{}).then(()=>t.splice(t.indexOf(h),1)),m}}}get uri(){return this._jskos.uri}get notation(){return this._jskos.notation}get prefLabel(){return this._jskos.prefLabel}get definition(){return this._jskos.definition}get schemes(){return this._jskos.schemes}get excludedSchemes(){return this._jskos.excludedSchemes}get stored(){return this._jskos.stored!==void 0?this._jskos.stored:this.constructor.stored}init(){return F(this,null,function*(){return this._init?this._init:(this._init=(()=>F(this,null,function*(){this._prepare();let e;if(be.default(this._api.status))try{e=yield this.axios({method:"get",url:this._api.status})}catch(t){ne.default(t,"response.status")===404&&(this._api.status=null)}else e=this._api.status;if(Lt.default(e)&&!es.default(e)){this._config=e.config||{};for(let t of Object.keys(this._api))this._api[t]===void 0&&(this._api[t]=e[t]||null)}this._setup()}))(),this._init)})}_prepare(){}_setup(){}getCancelTokenSource(){return En.default.CancelToken.source()}setAuth({key:e=this._auth.key,bearerToken:t=this._auth.bearerToken}){this._auth.key=e,this._auth.bearerToken=t}setRetryConfig(e={}){this._retryConfig=Object.assign({methods:["get","head","options"],statusCodes:[401,403],count:3,delay:t=>300*t},e)}isAuthorizedFor({type:e,action:t,user:n,crossUser:i}){if(t=="read"&&this.has[e]===!0)return!0;if(!this.has[e])return!1;let s=ne.default(this._config,`${e}.${t}`);if(!s)return!!this.has[e][t];if(s.auth&&(!n||!this._auth.key)||s.auth&&this._auth.key!=ne.default(this._config,"auth.key"))return!1;if(s.auth&&s.identities){let a=[n.uri].concat(Object.values(n.identities||{}).map(o=>o.uri)).filter(o=>o!=null);if(xn.default(a,s.identities).length==0)return!1}if(s.auth&&s.identityProviders){let a=Object.keys(n&&n.identities||{});if(xn.default(a,s.identityProviders).length==0)return!1}return i?!!s.crossUser:!!this.has[e][t]}supportsScheme(e){if(!e)return!1;let t=Le.default(this.schemes)?this.schemes:null;return t==null&&!it.default.isContainedIn(e,this.excludedSchemes||[])?!0:it.default.isContainedIn(e,t)}adjustConcept(e){if(!e||e.__SAVED__)return e;e._getNarrower=t=>this.getNarrower($(R({},t),{concept:e})),e._getAncestors=t=>this.getAncestors($(R({},t),{concept:e})),e._getDetails=t=>F(this,null,function*(){return(yield this.getConcepts($(R({},t),{concepts:[e]})))[0]});for(let t of["broader","narrower","ancestors"])Array.isArray(e[t])&&!e[t].includes(null)&&(e[t]=this.adjustConcepts(e[t]));return e._registry=this,e}adjustConcepts(e){return nt(e.map(t=>this.adjustConcept(t)),e)}adjustRegistries(e){return e}adjustScheme(e){if(!e||e.__SAVED__)return e;let t=e._registry;return e._registry=this.cdk&&this.cdk.registryForScheme(e),!e._registry||t===e._registry||e._registry._api.api===this._api.api?e._registry=t||this:["concepts","topConcepts"].forEach(n=>{Array.isArray(e[n])&&(e[n].length===0||e[n][0]===null)&&delete e[n]}),e._registry&&(e._getTop=n=>e._registry.getTop($(R({},n),{scheme:e})),e._getTypes=n=>e._registry.getTypes($(R({},n),{scheme:e})),e._suggest=s=>{var a=s,{search:n}=a,i=J(a,["search"]);return e._registry.suggest($(R({},i),{search:n,scheme:e}))}),e}adjustSchemes(e){return nt(e.map(t=>this.adjustScheme(t)),e)}adjustConcordances(e){for(let t of e)t._registry=this;return e}adjustMapping(e){for(let t of["from","to"]){let n=`${t}Scheme`;e[n]||(e[n]=ne.default(it.default.conceptsOfMapping(e,t),"[0].inScheme[0]",null))}if(e._registry=this,!e.identifier){let t=ne.default(it.default.addMappingIdentifiers(e),"identifier");t&&(e.identifier=t)}return e}adjustMappings(e){return nt(e.map(t=>this.adjustMapping(t)),e)}postMappings(){return F(this,arguments,function*(n={}){var i=n,{mappings:e}=i,t=J(i,["mappings"]);if(!e||!e.length)throw new G({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"postMapping",items:e,itemProperty:"mapping",config:t})})}deleteMappings(){return F(this,arguments,function*(n={}){var i=n,{mappings:e}=i,t=J(i,["mappings"]);if(!e||!e.length)throw new G({parameter:"mappings"});return this._callHelperForArrayWrappers({method:"deleteMapping",items:e,itemProperty:"mapping",config:t})})}_callHelperForArrayWrappers(s){return F(this,arguments,function*({method:e,items:t,itemProperty:n,config:i}){let a=[],o=yield Promise.all(t.map(u=>F(this,null,function*(){try{return yield this[e]($(R({[n]:u},i),{_raw:!0}))}catch(m){return a[t.indexOf(u)]=m,null}})));return o._errors=a,o})}};pe.providerName="Base";var Re=ce(We(),1);var ar=ce(ed(),1);var In,lE=new Uint8Array(16);function gs(){if(!In&&(In=typeof crypto!="undefined"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||typeof msCrypto!="undefined"&&typeof msCrypto.getRandomValues=="function"&&msCrypto.getRandomValues.bind(msCrypto),!In))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return In(lE)}var rd=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function hE(r){return typeof r=="string"&&rd.test(r)}var td=hE;var Me=[];for(Tn=0;Tn<256;++Tn)Me.push((Tn+256).toString(16).substr(1));var Tn;function pE(r){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,t=(Me[r[e+0]]+Me[r[e+1]]+Me[r[e+2]]+Me[r[e+3]]+"-"+Me[r[e+4]]+Me[r[e+5]]+"-"+Me[r[e+6]]+Me[r[e+7]]+"-"+Me[r[e+8]]+Me[r[e+9]]+"-"+Me[r[e+10]]+Me[r[e+11]]+Me[r[e+12]]+Me[r[e+13]]+Me[r[e+14]]+Me[r[e+15]]).toLowerCase();if(!td(t))throw TypeError("Stringified UUID is invalid");return t}var nd=pE;function dE(r,e,t){r=r||{};var n=r.random||(r.rng||gs)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){t=t||0;for(var i=0;i<16;++i)e[t+i]=n[i];return e}return nd(n)}var Pn=dE;var Mn="urn:uuid:",vr=class extends pe{_prepare(){this.has.mappings={read:!0,create:!0,update:!0,delete:!0},Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this.queue=[],this.localStorageKey="cocoda-mappings--"+this._path;let e="mappings",t=()=>ar.default.getItem(this.localStorageKey).then(n=>{n=n||[];let i=0;for(let s of n.filter(a=>!a.uri||!a.uri.startsWith(Mn)))s.uri&&(s.identifier||(s.identifier=[]),s.identifier.push(s.uri)),s.uri=`${Mn}${Pn()}`,i+=1;return i&&console.warn(`URIs added to ${i} local mappings.`),ar.default.setItem(this.localStorageKey,n)});ar.default.getItem(e).then(n=>{n&&console.warn(`Warning: There is old data in local storage (or IndexedDB, depending on the ) with the key "${e}". This data will not be used anymore. A manual export is necessary to get this data back.`)}),this.queue.push(t().catch(n=>{console.warn("Error when adding URIs to local mappings:",n)}))}isAuthorizedFor({type:e,action:t}){return e=="mappings"&&t!="anonymous"}_getMappingsQueue(){let e=rs.default(this.queue)||Promise.resolve();return new Promise(t=>{function n(){var a,o,u=new Promise((m,h)=>{a=m,o=h});return u.resolve=a,u.reject=o,u}let i=n(),s=()=>{i.resolve()};this.queue.push(i),e.then(()=>ar.default.getItem(this.localStorageKey)).then(a=>{t({mappings:a,done:s})})})}getMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(t._raw=!0,!e||!e.uri)throw new G({parameter:"mapping"});return(yield this.getMappings($(R({},t),{uri:e.uri})))[0]})}getMappings(){return F(this,arguments,function*({from:e,fromScheme:t,to:n,toScheme:i,creator:s,type:a,partOf:o,offset:u,limit:m,direction:h,mode:x,identifier:w,uri:A}={}){let y={};return e&&(y.from=be.default(e)?e:e.uri),t&&(y.fromScheme=be.default(t)?{uri:t}:t),n&&(y.to=be.default(n)?n:n.uri),i&&(y.toScheme=be.default(i)?{uri:i}:i),s&&(y.creator=be.default(s)?s:Re.default.prefLabel(s)),a&&(y.type=be.default(a)?a:a.uri),o&&(y.partOf=be.default(o)?o:o.uri),u&&(y.offset=u),m&&(y.limit=m),h&&(y.direction=h),x&&(y.mode=x),w&&(y.identifier=w),A&&(y.uri=A),this._getMappingsQueue().catch(M=>{throw new Ce({message:"Could not get mappings from local storage",relatedError:M})}).then(({mappings:M,done:H})=>{H();let K=(D,Z)=>D.uri==Z||Z&&D.notation&&D.notation[0].toLowerCase()==Z.toLowerCase();if((y.from||y.to)&&(M=M.filter(D=>{let Z=Re.default.conceptsOfMapping(D,"from").find(W=>K(W,y.from))!=null,ee=Re.default.conceptsOfMapping(D,"to").find(W=>K(W,y.from))!=null,O=Re.default.conceptsOfMapping(D,"from").find(W=>K(W,y.to))!=null,Q=Re.default.conceptsOfMapping(D,"to").find(W=>K(W,y.to))!=null;return y.direction=="backward"?y.mode=="or"?y.from&&ee||y.to&&O:(!y.from||ee)&&(!y.to||O):y.direction=="both"?y.mode=="or"?y.from&&(Z||ee)||y.to&&(O||Q):(!y.from||Z)&&(!y.to||Q)||(!y.from||ee)&&(!y.to||O):y.mode=="or"?y.from&&Z||y.to&&Q:(!y.from||Z)&&(!y.to||Q)})),(y.fromScheme||y.toScheme)&&(M=M.filter(D=>{let Z=Re.default.compare(D.fromScheme,y.fromScheme),ee=Re.default.compare(D.toScheme,y.fromScheme),O=Re.default.compare(D.fromScheme,y.toScheme),Q=Re.default.compare(D.toScheme,y.toScheme);return y.direction=="backward"?y.mode=="or"?y.fromScheme&&ee||y.toScheme&&O:(!y.fromScheme||ee)&&(!y.toScheme||O):y.direction=="both"?y.mode=="or"?y.fromScheme&&(Z||ee)||y.toScheme&&(O||Q):(!y.fromScheme||Z)&&(!y.toScheme||Q)||(!y.fromScheme||ee)&&(!y.toScheme||O):y.mode=="or"?y.fromScheme&&Z||y.toScheme&&Q:(!y.fromScheme||Z)&&(!y.toScheme||Q)})),y.creator){let D=y.creator.split("|");M=M.filter(Z=>(Z.creator&&Z.creator.find(ee=>D.includes(Re.default.prefLabel(ee))||D.includes(ee.uri)))!=null)}y.type&&(M=M.filter(D=>(D.type||[Re.default.defaultMappingType.uri]).includes(y.type))),y.partOf&&(M=M.filter(D=>D.partOf!=null&&D.partOf.find(Z=>Re.default.compare(Z,{uri:y.partOf}))!=null)),y.identifier&&(M=M.filter(D=>y.identifier.split("|").map(Z=>(D.identifier||[]).includes(Z)||D.uri==Z).reduce((Z,ee)=>Z||ee))),y.uri&&(M=M.filter(D=>D.uri==y.uri));let te=M.length;return M=M.sort((D,Z)=>{let ee=D.modified||D.created,O=Z.modified||Z.created;return O==null?-1:ee==null?1:ee>O?-1:1}),M=M.slice(y.offset||0),M=M.slice(0,y.limit),M._totalCount=te,M})})}postMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();if((!e.uri||!e.uri.startsWith(Mn))&&(e.uri&&(e.identifier||(e.identifier=[]),e.identifier.push(e.uri)),e.uri=`${Mn}${Pn()}`),n.find(s=>s.uri==e.uri))throw i(),new G({parameter:"mapping",message:"Duplicate URI"});e.created||(e.created=new Date().toISOString()),e.modified||(e.modified=e.created),n.push(e),n=n.map(s=>Re.default.minifyMapping(s));try{return yield ar.default.setItem(this.localStorageKey,n),i(),e}catch(s){throw i(),s}})}putMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(a=>a.uri==e.uri);if(s==-1)throw i(),new G({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),n[s]=e,n=n.map(a=>Re.default.minifyMapping(a));try{return yield ar.default.setItem(this.localStorageKey,n),i(),e}catch(a){throw i(),a}})}patchMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue(),s=n.findIndex(a=>a.uri==e.uri);if(s==-1)throw i(),new G({parameter:"mapping",message:"Mapping not found"});e.created||(e.created=n[s].created),e.modified=new Date().toISOString(),n[s]=Object.assign(n[s],e),n=n.map(a=>Re.default.minifyMapping(a));try{return yield ar.default.setItem(this.localStorageKey,n),i(),e}catch(a){throw i(),a}})}deleteMapping(t){return F(this,arguments,function*({mapping:e}){if(!e)throw new G({parameter:"mapping"});let{mappings:n,done:i}=yield this._getMappingsQueue();try{return n=n.filter(s=>s.uri!=e.uri),n=n.map(s=>Re.default.minifyMapping(s)),yield ar.default.setItem(this.localStorageKey,n),i(),!0}catch(s){throw i(),s}})}};vr.providerName="LocalMappings";vr.stored=!0;var st=ce(We(),1);var rr=class extends pe{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=gr(this._api.api,"/status")),this.has.mappings=!0,this.has.concordances=!0,this.has.annotations=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={mappings:"/mappings",concordances:"/concordances",annotations:"/annotations"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=gr(this._api.api,e[t]))}this.has.mappings=this._api.mappings?{}:!1,this.has.mappings&&(this.has.mappings.read=!!ne.default(this._config,"mappings.read",!0),this.has.mappings.create=!!ne.default(this._config,"mappings.create"),this.has.mappings.update=!!ne.default(this._config,"mappings.update"),this.has.mappings.delete=!!ne.default(this._config,"mappings.delete"),this.has.mappings.anonymous=!!ne.default(this._config,"mappings.anonymous")),this.has.concordances=this._api.concordances?{}:!1,this.has.concordances&&(this.has.concordances.read=!!ne.default(this._config,"concordances.read"),this.has.concordances.create=!!ne.default(this._config,"concordances.create"),this.has.concordances.update=!!ne.default(this._config,"concordances.update"),this.has.concordances.delete=!!ne.default(this._config,"concordances.delete")),this.has.annotations=this._api.annotations?{}:!1,this.has.annotations&&(this.has.annotations.read=!!ne.default(this._config,"annotations.read"),this.has.annotations.create=!!ne.default(this._config,"annotations.create"),this.has.annotations.update=!!ne.default(this._config,"annotations.update"),this.has.annotations.delete=!!ne.default(this._config,"annotations.delete")),this.has.auth=ne.default(this._config,"auth.key")!=null,this._defaultParams={properties:"annotations"}}getMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});if(!e.uri||!e.uri.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});try{return yield this.axios($(R({},t),{url:e.uri,params:R(R({},this._defaultParams),t.params||{})}))}catch(s){if(ne.default(s,"response.status")==404)return null;throw s}})}getMappings(Z){return F(this,null,function*(){var ee=Z,{from:e,fromScheme:t,to:n,toScheme:i,creator:s,type:a,partOf:o,offset:u,limit:m,direction:h,mode:x,identifier:w,cardinality:A,annotatedBy:y,annotatedFor:M,annotatedWith:H,sort:K,order:te}=ee,D=J(ee,["from","fromScheme","to","toScheme","creator","type","partOf","offset","limit","direction","mode","identifier","cardinality","annotatedBy","annotatedFor","annotatedWith","sort","order"]);let O={},Q=this._api.mappings;return e&&(O.from=be.default(e)?e:e.uri),t&&(O.fromScheme=be.default(t)?t:t.uri),n&&(O.to=be.default(n)?n:n.uri),i&&(O.toScheme=be.default(i)?i:i.uri),s&&(O.creator=be.default(s)?s:st.default.prefLabel(s)),a&&(O.type=be.default(a)?a:a.uri),o&&(O.partOf=be.default(o)?o:o.uri),u&&(O.offset=u),m&&(O.limit=m),h&&(O.direction=h),A&&(O.cardinality=A),y&&(O.annotatedBy=y),M&&(O.annotatedFor=M),H&&(O.annotatedWith=H),x&&(O.mode=x),w&&(O.identifier=w),K&&(O.sort=K),te&&(O.order=te),this.axios($(R({},D),{method:"get",url:Q,params:R(R(R({},this._defaultParams),D.params||{}),O)}))})}postMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});return e=st.default.minifyMapping(e),e=st.default.addMappingIdentifiers(e),this.axios($(R({},t),{method:"post",url:this._api.mappings,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});e=st.default.minifyMapping(e),e=st.default.addMappingIdentifiers(e);let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:sr.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteMapping(n){return F(this,null,function*(){var i=n,{mapping:e}=i,t=J(i,["mapping"]);if(!e)throw new G({parameter:"mapping"});let s=e.uri;if(!s||!s.startsWith(this._api.mappings))throw new G({parameter:"mapping",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getAnnotations(n){return F(this,null,function*(){var i=n,{target:e}=i,t=J(i,["target"]);return e&&xe.default(t,"params.target",e),this.axios($(R({},t),{method:"get",url:this._api.annotations}))})}postAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);return this.axios($(R({},t),{method:"post",url:this._api.annotations,data:e}))})}putAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new G({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e}))})}patchAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new G({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:e}))})}deleteAnnotation(n){return F(this,null,function*(){var i=n,{annotation:e}=i,t=J(i,["annotation"]);let s=e.id;if(!s||!s.startsWith(this._api.annotations))throw new G({parameter:"annotation",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}getConcordances(e){return F(this,null,function*(){return this.axios($(R({},e),{method:"get",url:this._api.concordances}))})}postConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});return this.axios($(R({},t),{method:"post",url:this._api.concordances,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}putConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new G({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"put",url:s,data:e,params:R(R({},this._defaultParams),t.params||{})}))})}patchConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new G({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return this.axios($(R({},t),{method:"patch",url:s,data:sr.default(e,"uri"),params:R(R({},this._defaultParams),t.params||{})}))})}deleteConcordance(n){return F(this,null,function*(){var i=n,{concordance:e}=i,t=J(i,["concordance"]);if(!e)throw new G({parameter:"concordance"});let s=e.uri;if(!s||!s.startsWith(this._api.concordances))throw new G({parameter:"concordance",message:"URI doesn't seem to be part of this registry."});return yield this.axios($(R({},t),{method:"delete",url:s})),!0})}};rr.providerName="MappingsApi";rr.stored=!0;var at=ce(We(),1);var yr=class extends pe{_prepare(){this._cache=[],this._occurrencesSupportedSchemes=[],this.has.occurrences=!0,this.has.mappings=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_occurrencesIsSupported(e){return F(this,null,function*(){if(!(this._occurrencesSupportedSchemes&&this._occurrencesSupportedSchemes.length))try{let n=gr(this._api.api,"voc"),i=yield this.axios({method:"get",url:n});this._occurrencesSupportedSchemes=i||[]}catch(n){}let t=!1;for(let n of this._occurrencesSupportedSchemes)at.default.compare(e,n)&&(t=!0);return t})}getMappings(e){return F(this,null,function*(){let t=yield this.getOccurrences(e),n=ne.default(e,"from.inScheme[0]")||e.fromScheme,i=ne.default(e,"to.inScheme[0]")||e.toScheme,s=[];for(let a of t){if(!a)continue;let o={};o.from=ne.default(a,"memberSet[0]"),o.from?o.from={memberSet:[o.from]}:o.from=null,o.fromScheme=ne.default(a,"memberSet[0].inScheme[0]"),o.to=ne.default(a,"memberSet[1]"),o.to?o.to={memberSet:[o.to]}:o.to={memberSet:[]},o.toScheme=ne.default(a,"memberSet[1].inScheme[0]"),(n&&o.fromScheme&&!at.default.compare(o.fromScheme,n)||i&&o.toScheme&&!at.default.compare(o.toScheme,i))&&([o.from,o.fromScheme,o.to,o.toScheme]=[o.to,o.toScheme,o.from,o.fromScheme]),!o.fromScheme&&n&&(o.fromScheme=n),!o.toScheme&&i&&(o.toScheme=i),o.type=[at.default.defaultMappingType.uri],o._occurrence=a,o=at.default.addMappingIdentifiers(o),a.database&&(o.creator=[a.database]),s.push(o)}return s})}getOccurrences(s){return F(this,null,function*(){var a=s,{from:e,to:t,concepts:n}=a,i=J(a,["from","to","concepts"]);let o=[];n=(n||[]).concat([e,t]).filter(A=>!!A);for(let A of n)o.push(this._occurrencesIsSupported(ne.default(A,"inScheme[0]")).then(y=>y&&A.uri?A.uri:null));let u=yield Promise.all(o);if(u=u.filter(A=>A!=null),u.length==0)throw new G({parameter:"concepts"});o=[];for(let A of u)o.push(this._getOccurrences($(R({},i),{params:{member:A,scheme:"*",threshold:5}})));if(u.length>1){let A=u.join(" ");o.push(this._getOccurrences($(R({},i),{params:{member:A,threshold:5}})))}let m=yield Promise.all(o),h=ts.default([],...m),x=[],w=[];for(let A=0;A<h.length;A+=1){let y=h[A];if(!y)continue;let M=y.memberSet.reduce((H,K)=>H.concat(K.uri),[]).sort().join(" ");x.includes(M)?w.push(A):x.push(M)}return w.forEach(A=>{delete h[A]}),h=h.filter(A=>A!=null),h.sort((A,y)=>parseInt(y.count||0)-parseInt(A.count||0))})}_getOccurrences(e){return F(this,null,function*(){let t=this._cache.find(i=>Qe.default(i.config.params,e.params));if(t)return t.data;let n=yield this.axios($(R({},e),{method:"get",url:this._api.api}));return this._cache.push({config:e,data:n}),this._cache.length>20&&(this._cache=this._cache.slice(this._cache.length-20)),n})}};yr.providerName="OccurrencesApi";yr.stored=!1;var Lr=ce(We(),1),tr=class extends pe{_prepare(){this._api.api&&this._api.status===void 0&&(this._api.status=gr(this._api.api,"/status")),this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,this.has.auth=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){if(this._api.api){let e={schemes:"/voc",top:"/voc/top",concepts:"/voc/concepts",data:"/data",narrower:"/narrower",ancestors:"/ancestors",types:"/types",suggest:"/suggest",search:"/search"};for(let t of Object.keys(e))this._api[t]===void 0&&(this._api[t]=gr(this._api.api,e[t]))}this.has.schemes=!!this._api.schemes,!this.has.schemes&&Array.isArray(this.schemes)&&(this.has.schemes=!0),this.has.top=!!this._api.top,this.has.data=!!this._api.data,this.has.concepts=!!this._api.concepts||this.has.data,this.has.narrower=!!this._api.narrower,this.has.ancestors=!!this._api.ancestors,this.has.types=!!this._api.types,this.has.suggest=!!this._api.suggest,this.has.search=!!this._api.search,this.has.auth=ne.default(this._config,"auth.key")!=null,this._defaultParams={properties:"+created,issued,modified,editorialNote,scopeNote"}}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{api:e,schemes:[t]}}_getSchemeUri(e){return F(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(s=>Lr.default.compare(e,s));if(t)return t.uri;if(this._rejectedSchemes.find(s=>Lr.default.compare(e,s)))return null;let i=(yield this.getSchemes({params:{uri:Lr.default.getAllUris(e).join("|")}})).find(s=>Lr.default.compare(s,e));return i?(this._approvedSchemes.push({uri:i.uri,identifier:Lr.default.getAllUris(e)}),i.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}getSchemes(e){return F(this,null,function*(){if(!this._api.schemes){if(Array.isArray(this.schemes))return this.schemes;throw new $e}let t=yield this.axios($(R({},e),{method:"get",url:this._api.schemes,params:R($(R({},this._defaultParams),{limit:500}),e.params||{})}));return Array.isArray(this.schemes)?nt(t.filter(n=>Lr.default.isContainedIn(n,this.schemes)),t):t})}getTop(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);if(!this._api.top)throw new $e;if(!e)throw new G({parameter:"scheme"});let s=yield this._getSchemeUri(e);if(!s)throw new G({parameter:"scheme",message:"Requested vocabulary seems to be unsupported by this API."});return Array.isArray(this._api.top)?this._api.top:this.axios($(R({},t),{method:"get",url:this._api.top,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:s})}))})}getConcepts(n){return F(this,null,function*(){var i=n,{concepts:e}=i,t=J(i,["concepts"]);if(this.has.data===!1)throw new $e;if(!e)throw new G({parameter:"concepts"});Array.isArray(e)||(e=[e]);let s=e.map(a=>a.uri).filter(a=>a!=null);return this.axios($(R({},t),{method:"get",url:this._api.data,params:$(R($(R({},this._defaultParams),{limit:500}),t.params||{}),{uri:s.join("|")})}))})}getNarrower(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!this._api.narrower)throw new $e;if(!e||!e.uri)throw new G({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.narrower,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}getAncestors(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!this._api.ancestors)throw new $e;if(!e||!e.uri)throw new G({parameter:"concept"});return this.axios($(R({},t),{method:"get",url:this._api.ancestors,params:$(R($(R({},this._defaultParams),{limit:1e4}),t.params||{}),{uri:e.uri})}))})}suggest(s){return F(this,null,function*(){var a=s,{use:e="notation,label",types:t=[],sort:n="score"}=a,i=J(a,["use","types","sort"]);return this._search($(R({},i),{endpoint:"suggest",params:$(R({},i.params),{type:t.join("|"),use:e,sort:n})}))})}search(n){return F(this,null,function*(){var i=n,{types:e=[]}=i,t=J(i,["types"]);return this._search($(R({},t),{endpoint:"search",params:$(R({},t.params),{type:e.join("|")})}))})}vocSuggest(i){return F(this,null,function*(){var s=i,{use:e="notation,label",sort:t="score"}=s,n=J(s,["use","sort"]);return this._search($(R({},n),{endpoint:"voc-suggest",params:$(R({},n.params),{use:e,sort:t})}))})}vocSearch(e){return F(this,null,function*(){return this._search($(R({},e),{endpoint:"voc-search"}))})}_search(u){return F(this,null,function*(){var m=u,{endpoint:e,scheme:t,search:n,limit:i,offset:s,params:a}=m,o=J(m,["endpoint","scheme","search","limit","offset","params"]);let h=this._api[e];if(!h)throw new $e;if(!n)throw new G({parameter:"search"});i=i||this._jskos.suggestResultLimit||100,s=s||0;let x=t&&(yield this._getSchemeUri(t));return h=h.replace("{searchTerms}",n),this.axios($(R({},o),{params:$(R(R({},this._defaultParams),a),{limit:i,count:i,offset:s,search:n,query:n,voc:x}),method:"get",url:h}))})}getTypes(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);if(!this._api.types)throw new $e;if(Array.isArray(this._api.types))return this._api.types;let s=e&&(yield this._getSchemeUri(e));return s&&xe.default(t,"params.uri",s),this.axios($(R({},t),{method:"get",url:this._api.types}))})}};tr.providerName="ConceptApi";tr.providerType="http://bartoc.org/api-type/jskos";var Nt=ce(We(),1);var _r=class extends pe{_prepare(){this._cache=[],this.has.mappings=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}getMappings(s){return F(this,null,function*(){var a=s,{from:e,to:t,mode:n}=a,i=J(a,["from","to","mode"]);let o=[];Le.default(this.schemes)&&(o=this.schemes);let u,m,h=ne.default(e,"inScheme[0]"),x=ne.default(t,"inScheme[0]"),w,A;if(!e||Nt.default.isContainedIn(h,o)?(u=!0,m=t,w=x,A=o.find(O=>Nt.default.compare(O,h))||o[0]):(u=!1,m=e,w=h,A=o.find(O=>Nt.default.compare(O,x))||o[0]),n!="or")return[];if(!this._api.api)throw new $e;if(!m)throw new G({parameter:u?"to":"from"});let y=Nt.default.languagePreference.selectLanguage(m.prefLabel);if(!y)throw new G({parameter:u?"to":"from",message:"Missing language"});let M=ne.default(m,`altLabel.${y}`,[]);be.default(M)&&(M=[M]);let H=ne.default(m,`prefLabel.${y}`),K=M.concat([H]);K=[H];let{url:te,data:D}=yield this._getReconciliationResults($(R({},i),{labels:K,language:y}));D=[].concat(...Object.values(D).map(O=>O.result)).filter(O=>O),D=D.sort((O,Q)=>O.score!=Q.score?Q.score-O.score:O.match!=Q.match?O.match?-1:1:O.id.length-Q.id.length);let Z=ne.default(A,"namespace",""),ee=D.map(O=>({fromScheme:w,from:{memberSet:[m]},toScheme:A,to:{memberSet:[{uri:Z+O.id}]},type:[O.match?"http://www.w3.org/2004/02/skos/core#exactMatch":O.score>=80?"http://www.w3.org/2004/02/skos/core#closeMatch":"http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return u&&(ee=ee.map(O=>Object.assign(O,{fromScheme:O.toScheme,from:O.to,toScheme:O.fromScheme,to:O.from}))),ee._url=te,ee})}_getReconciliationResults(i){return F(this,null,function*(){var s=i,{labels:e,language:t}=s,n=J(s,["labels","language"]);e=e.sort();let a=this._cache.find(A=>Qe.default(A.labels,e)&&A.language==t);if(a)return a;let o={},u=0;for(let A of e)o[`q${u}`]={query:A},u+=1;let m=this._api.api;t&&(m=m.replace("{language}",t));let h=`queries=${encodeURIComponent(JSON.stringify(o))}`;xe.default(n,["headers","Content-Type"],"application/x-www-form-urlencoded");let x=yield this.axios($(R({},n),{method:"post",url:m,data:h}));x=x||{};let w={labels:e,language:t,data:x,url:`${m}${m.includes("?")?"&":"?"}${h}`};return this._cache.push(w),this._cache.length>20&&(this._cache=this._cache.slice(this._cache.length-20)),w})}};_r.providerName="ReconciliationApi";_r.stored=!1;var Ut=ce(We(),1);var wr=class extends pe{_prepare(){this._cache=[],this.has.mappings=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}supportsScheme(e){return ne.default(e,"_registry.has.search",!1)}getMappings(o){return F(this,null,function*(){var u=o,{from:e,to:t,mode:n,selected:i,limit:s=10}=u,a=J(u,["from","to","mode","selected","limit"]);if(n!="or")return[];if(!i)throw new G({parameter:"selected"});let m=[];e&&this.supportsScheme(i.scheme[!1])?m.push(this._getMappings($(R({},a),{concept:e,sourceScheme:i.scheme[!0],targetScheme:i.scheme[!1],limit:s}))):m.push(Promise.resolve([])),t&&this.supportsScheme(i.scheme[!0])?m.push(this._getMappings($(R({},a),{concept:t,sourceScheme:i.scheme[!1],targetScheme:i.scheme[!0],limit:s,swap:!0}))):m.push(Promise.resolve([]));let[h,x]=yield Promise.all(m);for(x=x.filter(w=>!h.find(A=>Ut.default.compareMappingMembers(w,A)));h.length+x.length>s;)x.length>=h.length?x=x.slice(0,-1):h=h.slice(0,-1);return Zi.default(h,x)})}_getMappings(o){return F(this,null,function*(){var u=o,{concept:e,sourceScheme:t,targetScheme:n,limit:i,swap:s=!1}=u,a=J(u,["concept","sourceScheme","targetScheme","limit","swap"]);if(!e||!t||!n)return[];if(Ut.default.compare(t,n))return[];let m=Ut.default.languagePreference.selectLanguage(e.prefLabel)||this._defaultLanguages[0],h=Ut.default.prefLabel(e,{fallbackToUri:!1,language:m});if(!h)return[];let x=/^[\s\wäüöÄÜÖß]*\w/.exec(h);h=x?x[0]:h;let A=(yield this._getResults($(R({},a),{label:h,targetScheme:n,limit:i}))).map(y=>({fromScheme:t,from:{memberSet:[e]},toScheme:n,to:{memberSet:[y]},type:["http://www.w3.org/2004/02/skos/core#mappingRelation"]}));return s&&(A=A.map(y=>Object.assign(y,{fromScheme:y.toScheme,from:y.to,toScheme:y.fromScheme,to:y.from}))),A})}_getResults(s){return F(this,null,function*(){var a=s,{label:e,targetScheme:t,limit:n}=a,i=J(a,["label","targetScheme","limit"]);let o=(this._cache[t.uri]||{})[e];if(o&&o._limit>=n)return o;let u=ne.default(t,"_registry");if(!u||u.has.search===!1)return[];let m=yield u.search($(R({},i),{search:e,scheme:t,limit:n}));return this._cache[t.uri]||(this._cache[t.uri]={}),this._cache[t.uri][e]=m,this._cache[t.uri][e]._limit=n,m})}};wr.providerName="LabelSearchSuggestion";wr.stored=!1;var je=ce(We(),1);var br=class extends pe{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.types=!0,this.has.suggest=!0,this.has.search=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){if(!e||!t)return null;let n={},i=e.match(/(.+\/)([^/]+)\/$/);return i?(n.api=i[1]+"rest/v1/",t.VOCID=i[2],n.schemes=[t],n):null}get _language(){return this.languages[0]||this._defaultLanguages[0]||"en"}_getApiUrl(e,t,n){let i=e&&e.VOCID||ne.default(this.schemes.find(a=>je.default.compare(a,e)),"VOCID");if(!i)throw new G({parameter:"scheme",message:"Missing scheme or VOCID property on scheme"});t=t||"",n=n||{},n.lang||(n.lang=this._language);let s=Object.keys(n).map(a=>`${a}=${encodeURIComponent(n[a])}`).join("&");return`${this._api.api}${i}${t}${s?"?"+s:""}`}_getDataUrl(e,{addFormatParameter:t=!0}={}){let n=ne.default(e,"inScheme[0]");if(!e||!e.uri)throw new G({parameter:"concept",message:"Missing concept URI"});return this._getApiUrl(n,"/data",t?{format:"application/json"}:{})}_getSchemeUri(e){return F(this,null,function*(){this._approvedSchemes=this._approvedSchemes||[],this._rejectedSchemes=this._rejectedSchemes||[];let t=this._approvedSchemes.find(a=>je.default.compare(e,a));if(t)return t.uri;if(this._rejectedSchemes.find(a=>je.default.compare(e,a)))return null;let n=this._getApiUrl(e,"/"),s=(yield this.axios({method:"get",url:n})).conceptschemes.find(a=>je.default.compare(a,e));return s?(this._approvedSchemes.push({uri:s.uri,identifier:je.default.getAllUris(e)}),s.uri):(this._rejectedSchemes.push({uri:e.uri,identifier:e.identifier}),null)})}_toJskosConcept(e,{concept:t,scheme:n,result:i,language:s}={}){if(!e)return null;t=je.default.deepCopy(t||{}),s=s||e.lang||"en",t.uri=e.uri,n&&(t.inScheme=[n]);let a=e.matchedPrefLabel||e.prefLabel||e.label;if(be.default(a))xe.default(t,`prefLabel.${s}`,a);else{a&&!Le.default(a)&&(a=[a]);for(let m of a||[])xe.default(t,`prefLabel.${m.lang}`,m.value)}let o=e.altLabel;if(be.default(o))xe.default(t,`altLabel.${s}`,[o]);else{o&&!Le.default(o)&&(o=[o]);for(let m of o||[])ne.default(t,`altLabel.${m.lang}`)?(t.altLabel[m.lang].push(m.value),t.altLabel[m.lang]=dr.default(t.altLabel[m.lang])):xe.default(t,`altLabel.${m.lang}`,[m.value])}let u=e.notation||e["skos:notation"]||je.default.notation(t);u&&(t.notation=[u.value||u]),e.broader&&(Le.default(e.broader)||(e.broader=[e.broader]),t.broader=e.broader.map(m=>be.default(m)?{uri:m}:m)),e.hasChildren===!0?t.narrower=[null]:e.hasChildren===!1&&(t.narrower=[]),e.type&&!Le.default(e.type)&&(e.type=[e.type]),t.type=t.type||[];for(let m of e.type||[]){if(!je.default.isValidUri(m))continue;let h=m.slice(0,m.indexOf(":"));i&&i["@context"]&&i["@context"][h]&&(m=m.replace(h+":",i["@context"][h])),t.type.push(m)}return t.type=dr.default(t.type),t.type.length||(t.type=["http://www.w3.org/2004/02/skos/core#Concept"]),t}getSchemes(t){return F(this,null,function*(){var e=J(t,[]);let n=[];for(let i of this.schemes||[]){let s=this._getApiUrl(i,"/"),o=(yield this.axios($(R({},e),{method:"get",url:s}))).conceptschemes.find(m=>je.default.compare(m,i)),u=o&&(o.prefLabel||o.label||o.title);u&&xe.default(i,`prefLabel.${this._language}`,u),n.push(i),this._approvedSchemes=this._approvedSchemes||[],this._approvedSchemes.find(m=>je.default.compare(i,m))||this._approvedSchemes.push({uri:o.uri,identifier:je.default.getAllUris(i)})}return n})}getTop(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);let s=this._getApiUrl(e,"/topConcepts"),a=yield this._getSchemeUri(e);if(!a)throw new G({parameter:"scheme",message:"Missing or unsupported scheme or VOCID property on scheme"});xe.default(t,"params.scheme",a);let o=yield this.axios($(R({},t),{method:"get",url:s})),u=[];for(let m of o.topconcepts||[]){let h=this._toJskosConcept(m,{scheme:e,language:this._language});h.topConceptOf=[e],u.push(h)}return u})}getConcepts(n){return F(this,null,function*(){var i=n,{concepts:e}=i,t=J(i,["concepts"]);Le.default(e)||(e=[e]),e=e.map(a=>({uri:a.uri,inScheme:a.inScheme}));let s=[];for(let a of e){let o=this._getDataUrl(a,{addFormatParameter:!1});if(!o)continue;let u=yield this.axios($(R({},t),{method:"get",url:o,params:{uri:a.uri,format:"application/json"}})),m=u&&u.graph&&u.graph.find(h=>je.default.compare(h,a));if(m){let h=this._toJskosConcept(m,{concept:a,result:u});for(let x of["broader","narrower"]){let w=m[x]||h[x];w&&!Le.default(w)&&(w=[w]),w||(w=[]),h[x]=w.map(A=>this._toJskosConcept(u.graph.find(y=>je.default.compare(y,A)),{scheme:a.inScheme[0],result:u}))}h.ancestors=[],s.push(h)}}return s})}getNarrower(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/children");return xe.default(t,"params.uri",e.uri),((yield this.axios($(R({},t),{method:"get",url:a}))).narrower||[]).map(m=>this._toJskosConcept(m,{scheme:s}))})}getAncestors(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});let s=e.inScheme[0],a=this._getApiUrl(s,"/broaderTransitive");xe.default(t,"params.uri",e.uri);let o=yield this.axios($(R({},t),{method:"get",url:a})),u=[],m=e.uri;for(;m;){if(m!=e.uri){let x=ne.default(o,`broaderTransitive["${m}"]`);u=u.concat([x])}m=ne.default(o,`broaderTransitive["${m}"].broader[0]`)}return u.map(x=>this._toJskosConcept(x,{scheme:s})).filter(x=>x.uri!=e.uri)})}suggest(e){return F(this,null,function*(){e._raw=!0;let t=yield this.search(e),n=[e.search,[],[],[]];for(let i of t){let s=je.default.notation(i),a=je.default.prefLabel(i);n[1].push((s?s+" ":"")+a),n[2].push(""),n[3].push(i.uri)}return t._totalCount!=null?n._totalCount=t._totalCount:n._totalCount=t.length,n})}search(a){return F(this,null,function*(){var o=a,{search:e,scheme:t,limit:n,types:i=[]}=o,s=J(o,["search","scheme","limit","types"]);let u=this._getApiUrl(t,"/search");return xe.default(s,"params.query",`${e}*`),xe.default(s,"params.unique",1),xe.default(s,"params.maxhits",n||100),xe.default(s,"params.type",i.join(" ")),((yield this.axios($(R({},s),{method:"get",url:u}))).results||[]).map(x=>this._toJskosConcept(x,{scheme:t}))})}getTypes(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);let s=this._getApiUrl(e,"/types"),a=[],o=yield this.axios($(R({},t),{method:"get",url:s}));for(let u of o&&o.types||[])u.uri!="http://www.w3.org/2004/02/skos/core#Concept"&&(u.label&&(u.prefLabel={[o["@context"]["@language"]]:u.label},delete u.label),a.push(u));return a._url=s,a})}};br.providerName="SkosmosApi";br.providerType="http://bartoc.org/api-type/skosmos";var or=ce(We(),1),Rn=ce(Yt(),1),jn="http://id.loc.gov/authorities/",Ln=[{uri:`${jn}subjects`,identifier:["http://bartoc.org/en/node/454"],notation:["LCSH"],concepts:[null],topConcepts:[]},{uri:`${jn}names`,identifier:["http://bartoc.org/en/node/18536"],notation:["LCNAF"],concepts:[null],topConcepts:[]}],id=`${jn}classification`;function sd(r){let e={};e.uri=r["@id"],e.notation=(r["http://www.loc.gov/mads/rdf/v1#code"]||[]).map(i=>i["@value"]);let t=r["http://www.loc.gov/mads/rdf/v1#authoritativeLabel"]||r["http://www.w3.org/2000/01/rdf-schema#label"]||[];t.length&&(e.prefLabel={},e.prefLabel[t[0]["@language"]||"en"]=t[0]["@value"]);let n=r["http://www.w3.org/2004/02/skos/core#altLabel"]||[];n.length&&(e.altLabel={en:n.map(i=>i["@value"])});for(let i of r["http://www.w3.org/2000/01/rdf-schema#comment"]||[])e.definition=e.definition||{},e.definition.en=e.definition.en||[],e.definition.en.push(i["@value"]);return e}function mE(r){let e=sd(r);return e.namespace=e.uri+"/",e.type=["http://www.w3.org/2004/02/skos/core#ConceptScheme"],e}var vs=r=>e=>!e||!r||!r.namespace?!0:e.uri.startsWith(r.namespace);function gE(r,{scheme:e}){let t=sd(r);t.type=["http://www.w3.org/2004/02/skos/core#Concept"],t.inScheme=e?[e]:(r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSScheme"]||[]).map(s=>Ln.find(a=>a.uri===s["@id"])),(!t.inScheme.length||!t.inScheme[0])&&delete t.inScheme;let n=r["http://www.loc.gov/mads/rdf/v1#hasNarrowerAuthority"]||or.default.compare(t.inScheme[0],{uri:id})&&r["http://www.loc.gov/mads/rdf/v1#hasMADSCollectionMember"]||[];t.narrower=n.map(s=>({uri:s["@id"]})).filter(vs(t.inScheme&&t.inScheme[0]));let i=r["http://www.loc.gov/mads/rdf/v1#hasBroaderAuthority"]||or.default.compare(t.inScheme[0],{uri:id})&&r["http://www.loc.gov/mads/rdf/v1#isMemberOfMADSCollection"]||[];return t.broader=i.map(s=>({uri:s["@id"]})).filter(vs(t.inScheme&&t.inScheme[0])),t}var xr=class extends pe{_prepare(){this.has.schemes=!0,this.has.top=!1,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!1,this.has.ancestors=!1,this.has.suggest=!0,this.has.search=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}static _registryConfigForBartocApiConfig({scheme:e}={}){return!e||!Ln.find(t=>or.default.compare(t,e))?null:{schemes:[e]}}getSchemes(){return F(this,null,function*(){let e=[];for(let t of yield Promise.all(Ln.filter(n=>!this.schemes||!this.schemes.length||this.schemes.find(i=>or.default.compare(n,i))).map(n=>(0,Rn.default)({method:"get",url:`${n.uri.replace("http:","https:")}.json`}).then(({status:i,data:s})=>{if(i===200){let a=s.find(o=>n.uri===o["@id"]);if(a)return a=or.default.merge(mE(a),n),a.topConcepts=(a.topConcepts||[]).filter(o=>o),a}return null}))))t&&e.push(t);return e})}getConcepts(t){return F(this,arguments,function*({concepts:e}){Array.isArray(e)||(e=[e]);let n=[];for(let i of yield Promise.all(e.map(s=>(0,Rn.default)({method:"get",url:`${s.uri.replace("http:","https:")}.json`}).then(({status:a,data:o})=>{if(a===200){let u=o.find(m=>s.uri===m["@id"]);return u?gE(u,{scheme:s.inScheme&&s.inScheme[0]}):null}}))))i&&n.push(i);return n})}suggest(e){return F(this,null,function*(){let t=yield this.search(e);return[e.search,t.map(n=>or.default.prefLabel(n,{fallbackToUri:!0})),[],t.map(n=>n.uri)]})}search(s){return F(this,arguments,function*({search:e,scheme:t,limit:n,offset:i}){let a=or.default.getAllUris(t).find(u=>u.startsWith(jn));if(!a||!Ln.find(u=>or.default.compare(u,{uri:a})))throw new G({parameter:"scheme",message:"provided scheme is not supported (yet)"});if(!e)throw new G({parameter:"search",message:"parameter is empty or missing"});n=n||this._jskos.suggestResultLimit||100,i=i||0;let{data:o}=yield(0,Rn.default)({method:"get",url:`${a}/suggest2`.replace("http:","https:"),params:{q:e,count:n||100,offset:i,searchtype:"keyword"}});return(o.hits||[]).map(u=>({uri:u.uri,notation:[u.token],prefLabel:{en:u.aLabel},inScheme:[t]})).filter(vs(t))})}};xr.providerName="LocApi";xr.providerType="http://bartoc.org/api-type/loc";var jr=ce(We(),1),ud=ce(od(),1);function Nn(r){return r.replace(/\\u[\dA-F]{4}/gi,function(e){return String.fromCharCode(parseInt(e.replace(/\\u/g,""),16))})}var Sr=class extends pe{_prepare(){this.has.schemes=!0,this.has.top=!0,this.has.data=!0,this.has.concepts=!0,this.has.narrower=!0,this.has.ancestors=!0,this.has.suggest=!0,this.has.search=!0,Ee.filter(e=>!this.has[e]).forEach(e=>{this.has[e]=!1})}_setup(){this._index={},this._conceptCache={},this._schemeCache={}}static _registryConfigForBartocApiConfig({url:e,scheme:t}={}){return!e||!t?null:{schemes:[{uri:e,identifier:jr.default.getAllUris(t).filter(i=>i!==e)}]}}_loadScheme(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);let s=jr.default.getAllUris(e);for(let y of s)if(this._schemeCache[y])return this._schemeCache[y];let a=this.schemes.find(y=>jr.default.compare(y,e));if(!a||!a.uri)throw new Xe({message:`Tried to load unsupported scheme (${e&&e.uri})`});let o=a.uri;s=dr.default(s.concat(jr.default.getAllUris(a)));let u=".json";o.endsWith("/")&&(u="index.json");let m=yield this.axios($(R({},t),{url:`${o}${u}`,_skipAdditionalParameters:!0}));if(m.id!==o)throw new Xe({message:"Skohub URL did not return expected concept scheme"});let{title:h,preferredNamespaceUri:x,hasTopConcept:w,description:A}=m;e={uri:o,identifier:s.filter(y=>y!==o)},e.prefLabel=h,Object.keys(e.prefLabel||{}).forEach(y=>{e.prefLabel[y]=Nn(e.prefLabel[y])}),e.namespace=x,e.topConcepts=(w||[]).map(y=>this._toJskosConcept(y)),e.concepts=[null],A&&(e.definition=A,Object.keys(e.definition).forEach(y=>{e.definition[y]=[Nn(e.definition[y])]}));for(let y of Object.keys(e).filter(M=>!e[M]))delete e[y];for(let y of s)this._schemeCache[y]=e;return e})}_loadConcept(n){return F(this,null,function*(){var i=n,{uri:e}=i,t=J(i,["uri"]);if(this._conceptCache[e])return this._conceptCache[e];try{let s=yield this.axios($(R({},t),{url:`${e}.json`,_skipAdditionalParameters:!0}));if(s.id!==e)throw new Xe({message:"Skohub URL did not return expected concept URI"});let a=this._toJskosConcept(s);return this._conceptCache[e]=a,a}catch(s){return null}})}_toJskosConcept(e){let t={uri:e.id};return t.prefLabel=e.prefLabel,Object.keys(t.prefLabel||{}).forEach(n=>{t.prefLabel[n]=Nn(t.prefLabel[n])}),t.narrower=(e.narrower||[]).map(n=>this._toJskosConcept(n)),t.notation=e.notation||[],e.broader&&e.broader.id&&(t.broader=[{uri:e.broader.id}]),e.inScheme&&e.inScheme.id&&(t.inScheme=[{uri:e.inScheme.id}]),e.scopeNote&&(t.scopeNote=e.scopeNote,Object.keys(t.scopeNote).forEach(n=>{t.scopeNote[n]=[Nn(t.scopeNote[n])]})),t}getSchemes(t){return F(this,null,function*(){var e=J(t,[]);return Promise.all(this.schemes.map(n=>this._loadScheme($(R({},e),{scheme:n}))))})}getTop(n){return F(this,null,function*(){var i=n,{scheme:e}=i,t=J(i,["scheme"]);if(!e||!e.uri)throw new G({parameter:"scheme",message:"Missing scheme URI"});return e=yield this._loadScheme(R({scheme:e},t)),e.topConcepts||[]})}getConcepts(n){return F(this,null,function*(){var i=n,{concepts:e}=i,t=J(i,["concepts"]);return Le.default(e)||(e=[e]),(yield Promise.all(e.map(({uri:s})=>this._loadConcept($(R({},t),{uri:s}))))).filter(Boolean)})}getAncestors(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});if(e.ancestors&&e.ancestors[0]!==null)return e.ancestors;if(e=yield this._loadConcept($(R({},t),{uri:e.uri})),!e||!e.broader||!e.broader.length)return[];let s=e.broader[0];return[s].concat(yield this.getAncestors(R({concept:s},t))).map(a=>({uri:a.uri}))})}getNarrower(n){return F(this,null,function*(){var i=n,{concept:e}=i,t=J(i,["concept"]);if(!e||!e.uri)throw new G({parameter:"concept"});return e.narrower&&e.narrower[0]!==null||(e=yield this._loadConcept($(R({},t),{uri:e.uri}))),e.narrower})}search(i){return F(this,arguments,function*({search:e,scheme:t,limit:n=100}){if(t=yield this._loadScheme({scheme:t}),!t||!t.uri)throw new G({parameter:"scheme"});if(!e)throw new G({parameter:"search"});let s;this._index[t.uri]||(this._index[t.uri]={});for(let u of[""].concat(this.languages)){if(this._index[t.uri][u]){s=this._index[t.uri][u];break}if(this._index[t.uri][u]!==null)try{let m=u?`.${u}.index`:".index";t.uri.endsWith("/")&&(m=`index${m}`);let h=yield this.axios({url:`${t.uri}${m}`,_skipAdditionalParameters:!0});if(h.length<100){this._index[t.uri][u]=null;continue}s=ud.default.create(),s.import(h),this._index[t.uri][u]=s;break}catch(m){this._index[t.uri][u]=null}}if(!s)throw new Xe({message:"Could not find search index for any of the available languages "+this.languages.join(",")});let a=s.search(e);return(yield this.getConcepts({concepts:a.map(u=>({uri:u}))})).slice(0,n)})}suggest(e){return F(this,null,function*(){e._raw=!0;let t=yield this.search(e),n=[e.search,[],[],[]];for(let i of t){let s=jr.default.notation(i),a=jr.default.prefLabel(i);n[1].push((s?s+" ":"")+a),n[2].push(""),n[3].push(i.uri)}return t._totalCount!=null?n._totalCount=t._totalCount:n._totalCount=t.length,n})}};Sr.providerName="Skohub";Sr.providerType="http://bartoc.org/api-type/skohub";var nr={[pe.providerName]:pe,init(r){if(this[r.provider])return new this[r.provider](r);throw new Fr},addProvider(r){if(r.prototype instanceof pe||r===pe)this[r.providerName]=r;else throw new Fr}};nr.addProvider(tr);nr.addProvider(rr);Object.values(Dt).forEach(r=>{nr.addProvider(r)});var _s={},qr=class{constructor(e){this.config=e,this.axios=fd.default.create()}setConfig(e){this.config=e}get config(){return this._config}set config(e){e=e||{},e.registries=e.registries||[],e.registries=e.registries.map(t=>nr.init(t)).filter(t=>t),e.registries.forEach(t=>{t.cdk=this}),this._config=e}get providers(){return nr}createInstance(e){return new qr(e)}loadConfig(e){return F(this,null,function*(){let t=yield this.axios.get(e);this.config=t.data})}loadBuildInfo(a){var o=a,{url:e,buildInfo:t=null,interval:n=6e4,callback:i}=o,s=J(o,["url","buildInfo","interval","callback"]);if(!e&&!this.config.cocodaBaseUrl)throw new Ce({message:"Could not determine URL to load build config."});return e||(e=`${this.config.cocodaBaseUrl}build-info.json`),this.repeat($(R({},s),{function:()=>F(this,null,function*(){return(yield this.axios.get(e,{headers:{"Cache-Control":"no-cache"}})).data}),interval:n,callback:(u,m,h)=>{u?i(u):(h||!h&&t&&!Qe.default(m,t))&&i(null,m,h||t)}}))}getRegistryForUri(e){return this.config.registries.find(t=>t.uri==e)}initializeRegistry(e){return e=nr.init(e),e.cdk=this,e}addProvider(e){nr.addProvider(e)}static addProvider(e){nr.addProvider(e)}repeat({function:e,interval:t=15e3,callback:n,callImmediately:i=!0}={}){if(!e)throw new G({parameter:"function"});if(typeof e!="function")throw new G({parameter:"function",message:"function needs to be a function"});let s=()=>F(this,null,function*(){return e()});if(t=parseInt(t),isNaN(t))throw new G({parameter:"interval"});if(!n)throw new G({parameter:"callback"});if(typeof n!="function")throw new G({parameter:"callback",message:"callback needs to be a function"});let a={timer:null,result:null,error:null,isPaused:!1,interval:t},o=w=>{let A=a.result;Qe.default(A,w)||(a.result=w,a.error=null,n(null,w,A))},u=w=>{a.error=w,n(w)},m=w=>{a.isPaused||(a.timer=setTimeout(()=>{w()},a.interval))},h=()=>s().then(o).catch(u).then(()=>m(h)),x=(w=i)=>{w?h():m(h)};return x(),{start:(...w)=>{a.isPaused=!1,x(...w)},stop:()=>{a.isPaused=!0,a.timer?clearTimeout(a.timer):setTimeout(()=>{a.timer&&clearTimeout(a.timer)},a.interval)},get isPaused(){return a.isPaused},get lastResult(){return a.result},get hasErrored(){return!!a.error},get interval(){return a.interval},set interval(w){a.interval=w}}}getSchemes(){return F(this,arguments,function*(e={}){let t=[],n=[];for(let i of this.config.registries)if(i.has.schemes!==!1){let s=i.getSchemes(e).then(a=>{for(let o of a){o._registry=i,o.__DETAILSLOADED__=1,o.type=o.type||["http://www.w3.org/2004/02/skos/core#ConceptScheme"];let u=t.find(w=>Ar.default.compare(w,o)),m,h,x=!1;if(u){m=this.config.registries.indexOf(i),m!=-1&&(m=this.config.registries.length-m),h=this.config.registries.indexOf(ne.default(u,"_registry")),h!=-1&&(h=this.config.registries.length-h);let w=o.concepts?o.concepts.length==0?-1:1:0,A=u.concepts?u.concepts.length==0?-1:1:0;w>A?x=!0:w<A?x=!1:x=h<m}if(!u||x){if(x){let w=t.findIndex(A=>Ar.default.compare(A,u));w!=-1&&t.splice(w,1),o=Ar.default.merge(o,sr.default(u,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]})}o._registry=i,t.push(o)}else{let w=t.findIndex(A=>Ar.default.compare(A,o));if(w!=-1){let A=t[w]._registry;t[w]=Ar.default.merge(t[w],sr.default(o,["concepts","topConcepts"]),{mergeUris:!0,skipPaths:["_registry"]}),t[w]._registry=A}}}}).catch(a=>{console.warn("Couldn't load schemes for registry",i.uri,a)});n.push(s)}return yield Promise.all(n),t.forEach(i=>{let s=i._registry;delete i._registry;let a=this.registryForScheme(i);!a||a._api.api===s._api.api?i._registry=s:i._registry=a}),Ar.default.sortSchemes(t.filter(Boolean))})}registryForScheme(e){let t=e._registry;if(t)return t;for(let n of e.API||[]){let i=n,{type:s}=i,a=J(i,["type"]);let o=a.url;if(_s[o]){let u=_s[o];return Array.isArray(u._jskos.schemes)&&!Ar.default.isContainedIn(e,u._jskos.schemes)&&u._jskos.schemes.push(e),u}else{let u=Object.values(nr).find(h=>h.providerType===s);if(!u||!u._registryConfigForBartocApiConfig)continue;let m=u.providerName;if(a.scheme=e,a=nr[m]._registryConfigForBartocApiConfig(a),!a)continue;a.provider=m;try{if(t=this.initializeRegistry(a),t)return _s[o]=t,t}catch(h){continue}}}return null}};var cd=new qr;function vE(r){Object.values(Dt).forEach(e=>(r||cd).addProvider(e))}return rm(yE);})();
|
|
13
13
|
/*!
|
|
14
14
|
localForage -- Offline Storage, Improved
|
|
15
15
|
Version 1.10.0
|