@dnb/eufemia
Version:
DNB Eufemia Design System UI Library
4 lines • 888 kB
JavaScript
import e,{createContext as t,useContext as n,useMemo as r,useState as o,useCallback as a,useRef as i,useEffect as s,Fragment as l,forwardRef as c,useLayoutEffect as u,useReducer as d}from"react";import*as p from"../icons/dnb/primary_icons";import*as f from"../icons/dnb/primary_icons_medium";import h from"react-dom";function m(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var v,g,b,y,w,_,O,E,k,A,S,P,x,j,D,C,N,T,M,$,I,R,B,F,L,V,H,z,U={},q="undefined"!=typeof global?global:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{};function K(){if(g)return v;g=1;var e=function(e){return e&&e.Math===Math&&e};return v=e("object"==typeof globalThis&&globalThis)||e("object"==typeof window&&window)||e("object"==typeof self&&self)||e("object"==typeof q&&q)||e("object"==typeof this&&this)||function(){return this}()||Function("return this")()}function W(){if(_)return w;_=1;var e="object"==typeof document&&document.all;return w=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(e){return"function"==typeof e}}function Z(){if(E)return O;E=1;var e=W();return O=function(t){return"object"==typeof t?null!==t:e(t)}}function Q(){if(A)return k;A=1;var e=K(),t=Z(),n=e.document,r=t(n)&&t(n.createElement);return k=function(e){return r?n.createElement(e):{}}}function G(){return j?x:(j=1,x=function(e){try{return!!e()}catch(e){return!0}})}function Y(){if(C)return D;C=1;var e=G();return D=!e((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")}))}function J(){if(T)return N;T=1;var e=Y(),t=Function.prototype,n=t.call,r=e&&t.bind.bind(n,n);return N=e?r:function(e){return function(){return n.apply(e,arguments)}},N}function X(){if($)return M;$=1;var e=J(),t=e({}.toString),n=e("".slice);return M=function(e){return n(t(e),8,-1)}}function ee(){if(R)return I;R=1;var e=J(),t=G(),n=X(),r=Object,o=e("".split);return I=t((function(){return!r("z").propertyIsEnumerable(0)}))?function(e){return"String"===n(e)?o(e,""):r(e)}:r}function te(){return F?B:(F=1,B=function(e){return null==e})}function ne(){if(V)return L;V=1;var e=te(),t=TypeError;return L=function(n){if(e(n))throw new t("Can't call method on "+n);return n}}function re(){if(z)return H;z=1;var e=ee(),t=ne();return H=function(n){return e(t(n))}}var oe,ae,ie,se,le,ce,ue,de,pe,fe,he,me,ve,ge,be,ye,we,_e,Oe,Ee,ke,Ae,Se,Pe,xe,je={exports:{}};function De(){return ae?oe:(ae=1,oe=!1)}function Ce(){if(se)return ie;se=1;var e=K(),t=Object.defineProperty;return ie=function(n,r){try{t(e,n,{value:r,configurable:!0,writable:!0})}catch(t){e[n]=r}return r}}function Ne(){if(le)return je.exports;le=1;var e=De(),t=K(),n=Ce(),r="__core-js_shared__",o=je.exports=t[r]||n(r,{});return(o.versions||(o.versions=[])).push({version:"3.41.0",mode:e?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"}),je.exports}function Te(){if(ue)return ce;ue=1;var e=Ne();return ce=function(t,n){return e[t]||(e[t]=n||{})}}function Me(){if(pe)return de;pe=1;var e=ne(),t=Object;return de=function(n){return t(e(n))}}function $e(){if(he)return fe;he=1;var e=J(),t=Me(),n=e({}.hasOwnProperty);return fe=Object.hasOwn||function(e,r){return n(t(e),r)}}function Ie(){if(ve)return me;ve=1;var e=J(),t=0,n=Math.random(),r=e(1..toString);return me=function(e){return"Symbol("+(void 0===e?"":e)+")_"+r(++t+n,36)}}function Re(){if(we)return ye;we=1;var e,t,n=K(),r=function(){if(be)return ge;be=1;var e=K().navigator,t=e&&e.userAgent;return ge=t?String(t):""}(),o=n.process,a=n.Deno,i=o&&o.versions||a&&a.version,s=i&&i.v8;return s&&(t=(e=s.split("."))[0]>0&&e[0]<4?1:+(e[0]+e[1])),!t&&r&&(!(e=r.match(/Edge\/(\d+)/))||e[1]>=74)&&(e=r.match(/Chrome\/(\d+)/))&&(t=+e[1]),ye=t}function Be(){if(Oe)return _e;Oe=1;var e=Re(),t=G(),n=K().String;return _e=!!Object.getOwnPropertySymbols&&!t((function(){var t=Symbol("symbol detection");return!n(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&e&&e<41}))}function Fe(){if(ke)return Ee;ke=1;var e=Be();return Ee=e&&!Symbol.sham&&"symbol"==typeof Symbol.iterator}function Le(){if(Se)return Ae;Se=1;var e=K(),t=Te(),n=$e(),r=Ie(),o=Be(),a=Fe(),i=e.Symbol,s=t("wks"),l=a?i.for||i:i&&i.withoutSetter||r;return Ae=function(e){return n(s,e)||(s[e]=o&&n(i,e)?i[e]:l("Symbol."+e)),s[e]}}function Ve(){if(xe)return Pe;xe=1;var e=Z(),t=String,n=TypeError;return Pe=function(r){if(e(r))return r;throw new n(t(r)+" is not an object")}}var He,ze,Ue,qe,Ke={};function We(){if(ze)return He;ze=1;var e=G();return He=!e((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))}function Ze(){if(qe)return Ue;qe=1;var e=We(),t=G();return Ue=e&&t((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))}var Qe,Ge,Ye,Je,Xe,et,tt,nt,rt,ot,at,it,st,lt,ct,ut,dt,pt,ft,ht,mt,vt,gt,bt,yt,wt,_t,Ot,Et,kt,At,St,Pt,xt,jt,Dt,Ct,Nt,Tt,Mt,$t,It,Rt,Bt,Ft,Lt,Vt,Ht,zt,Ut,qt,Kt,Wt,Zt,Qt,Gt,Yt,Jt,Xt,en,tn,nn,rn={};function on(){if(Ge)return Qe;Ge=1;var e=We(),t=G(),n=Q();return Qe=!e&&!t((function(){return 7!==Object.defineProperty(n("div"),"a",{get:function(){return 7}}).a}))}function an(){if(Je)return Ye;Je=1;var e=Y(),t=Function.prototype.call;return Ye=e?t.bind(t):function(){return t.apply(t,arguments)},Ye}function sn(){if(et)return Xe;et=1;var e=K(),t=W();return Xe=function(n,r){return arguments.length<2?(o=e[n],t(o)?o:void 0):e[n]&&e[n][r];var o},Xe}function ln(){if(nt)return tt;nt=1;var e=J();return tt=e({}.isPrototypeOf)}function cn(){if(ot)return rt;ot=1;var e=sn(),t=W(),n=ln(),r=Fe(),o=Object;return rt=r?function(e){return"symbol"==typeof e}:function(r){var a=e("Symbol");return t(a)&&n(a.prototype,o(r))}}function un(){if(it)return at;it=1;var e=String;return at=function(t){try{return e(t)}catch(e){return"Object"}}}function dn(){if(lt)return st;lt=1;var e=W(),t=un(),n=TypeError;return st=function(r){if(e(r))return r;throw new n(t(r)+" is not a function")}}function pn(){if(ut)return ct;ut=1;var e=dn(),t=te();return ct=function(n,r){var o=n[r];return t(o)?void 0:e(o)},ct}function fn(){if(pt)return dt;pt=1;var e=an(),t=W(),n=Z(),r=TypeError;return dt=function(o,a){var i,s;if("string"===a&&t(i=o.toString)&&!n(s=e(i,o)))return s;if(t(i=o.valueOf)&&!n(s=e(i,o)))return s;if("string"!==a&&t(i=o.toString)&&!n(s=e(i,o)))return s;throw new r("Can't convert object to primitive value")}}function hn(){if(vt)return mt;vt=1;var e=function(){if(ht)return ft;ht=1;var e=an(),t=Z(),n=cn(),r=pn(),o=fn(),a=Le(),i=TypeError,s=a("toPrimitive");return ft=function(a,l){if(!t(a)||n(a))return a;var c,u=r(a,s);if(u){if(void 0===l&&(l="default"),c=e(u,a,l),!t(c)||n(c))return c;throw new i("Can't convert object to primitive value")}return void 0===l&&(l="number"),o(a,l)}}(),t=cn();return mt=function(n){var r=e(n,"string");return t(r)?r:r+""}}function mn(){if(gt)return rn;gt=1;var e=We(),t=on(),n=Ze(),r=Ve(),o=hn(),a=TypeError,i=Object.defineProperty,s=Object.getOwnPropertyDescriptor,l="enumerable",c="configurable",u="writable";return rn.f=e?n?function(e,t,n){if(r(e),t=o(t),r(n),"function"==typeof e&&"prototype"===t&&"value"in n&&u in n&&!n[u]){var a=s(e,t);a&&a[u]&&(e[t]=n.value,n={configurable:c in n?n[c]:a[c],enumerable:l in n?n[l]:a[l],writable:!1})}return i(e,t,n)}:i:function(e,n,s){if(r(e),n=o(n),r(s),t)try{return i(e,n,s)}catch(e){}if("get"in s||"set"in s)throw new a("Accessors not supported");return"value"in s&&(e[n]=s.value),e},rn}function vn(){if(_t)return wt;_t=1;var e=function(){if(yt)return bt;yt=1;var e=Math.ceil,t=Math.floor;return bt=Math.trunc||function(n){var r=+n;return(r>0?t:e)(r)}}();return wt=function(t){var n=+t;return n!=n||0===n?0:e(n)},wt}function gn(){if(Et)return Ot;Et=1;var e=vn(),t=Math.max,n=Math.min;return Ot=function(r,o){var a=e(r);return a<0?t(a+o,0):n(a,o)}}function bn(){if(At)return kt;At=1;var e=vn(),t=Math.min;return kt=function(n){var r=e(n);return r>0?t(r,9007199254740991):0}}function yn(){if(Pt)return St;Pt=1;var e=bn();return St=function(t){return e(t.length)}}function wn(){return Ct?Dt:(Ct=1,Dt={})}function _n(){if(Tt)return Nt;Tt=1;var e=J(),t=$e(),n=re(),r=function(){if(jt)return xt;jt=1;var e=re(),t=gn(),n=yn(),r=function(r){return function(o,a,i){var s=e(o),l=n(s);if(0===l)return!r&&-1;var c,u=t(i,l);if(r&&a!=a){for(;l>u;)if((c=s[u++])!=c)return!0}else for(;l>u;u++)if((r||u in s)&&s[u]===a)return r||u||0;return!r&&-1}};return xt={includes:r(!0),indexOf:r(!1)}}().indexOf,o=wn(),a=e([].push);return Nt=function(e,i){var s,l=n(e),c=0,u=[];for(s in l)!t(o,s)&&t(l,s)&&a(u,s);for(;i.length>c;)t(l,s=i[c++])&&(~r(u,s)||a(u,s));return u},Nt}function On(){return $t?Mt:($t=1,Mt=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"])}function En(){if(Rt)return It;Rt=1;var e=_n(),t=On();return It=Object.keys||function(n){return e(n,t)}}function kn(){if(Lt)return Ft;Lt=1;var e=sn();return Ft=e("document","documentElement")}function An(){if(Ht)return Vt;Ht=1;var e=Te(),t=Ie(),n=e("keys");return Vt=function(e){return n[e]||(n[e]=t(e))}}function Sn(){if(Ut)return zt;Ut=1;var e,t=Ve(),n=function(){if(Bt)return Ke;Bt=1;var e=We(),t=Ze(),n=mn(),r=Ve(),o=re(),a=En();return Ke.f=e&&!t?Object.defineProperties:function(e,t){r(e);for(var i,s=o(t),l=a(t),c=l.length,u=0;c>u;)n.f(e,i=l[u++],s[i]);return e},Ke}(),r=On(),o=wn(),a=kn(),i=Q(),s=An(),l="prototype",c="script",u=s("IE_PROTO"),d=function(){},p=function(e){return"<"+c+">"+e+"</"+c+">"},f=function(e){e.write(p("")),e.close();var t=e.parentWindow.Object;return e=null,t},h=function(){try{e=new ActiveXObject("htmlfile")}catch(e){}var t,n,o;h="undefined"!=typeof document?document.domain&&e?f(e):(n=i("iframe"),o="java"+c+":",n.style.display="none",a.appendChild(n),n.src=String(o),(t=n.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F):f(e);for(var s=r.length;s--;)delete h[l][r[s]];return h()};return o[u]=!0,zt=Object.create||function(e,r){var o;return null!==e?(d[l]=t(e),o=new d,d[l]=null,o[u]=e):o=h(),void 0===r?o:n.f(o,r)}}function Pn(){if(Kt)return qt;Kt=1;var e=Le(),t=Sn(),n=mn().f,r=e("unscopables"),o=Array.prototype;return void 0===o[r]&&n(o,r,{configurable:!0,value:t(null)}),qt=function(e){o[r][e]=!0}}function xn(){return Zt?Wt:(Zt=1,Wt={})}function jn(){return Jt?Yt:(Jt=1,Yt=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}})}function Dn(){if(en)return Xt;en=1;var e=We(),t=mn(),n=jn();return Xt=e?function(e,r,o){return t.f(e,r,n(1,o))}:function(e,t,n){return e[t]=n,e}}function Cn(){if(nn)return tn;nn=1;var e,t,n,r=function(){if(Gt)return Qt;Gt=1;var e=K(),t=W(),n=e.WeakMap;return Qt=t(n)&&/native code/.test(String(n))}(),o=K(),a=Z(),i=Dn(),s=$e(),l=Ne(),c=An(),u=wn(),d="Object already initialized",p=o.TypeError,f=o.WeakMap;if(r||l.state){var h=l.state||(l.state=new f);h.get=h.get,h.has=h.has,h.set=h.set,e=function(e,t){if(h.has(e))throw new p(d);return t.facade=e,h.set(e,t),t},t=function(e){return h.get(e)||{}},n=function(e){return h.has(e)}}else{var m=c("state");u[m]=!0,e=function(e,t){if(s(e,m))throw new p(d);return t.facade=e,i(e,m,t),t},t=function(e){return s(e,m)?e[m]:{}},n=function(e){return s(e,m)}}return tn={set:e,get:t,has:n,enforce:function(r){return n(r)?t(r):e(r,{})},getterFor:function(e){return function(n){var r;if(!a(n)||(r=t(n)).type!==e)throw new p("Incompatible receiver, "+e+" required");return r}}}}var Nn,Tn,Mn={},$n={};function In(){if(Nn)return $n;Nn=1;var e={}.propertyIsEnumerable,t=Object.getOwnPropertyDescriptor,n=t&&!e.call({1:2},1);return $n.f=n?function(e){var n=t(this,e);return!!n&&n.enumerable}:e,$n}function Rn(){if(Tn)return Mn;Tn=1;var e=We(),t=an(),n=In(),r=jn(),o=re(),a=hn(),i=$e(),s=on(),l=Object.getOwnPropertyDescriptor;return Mn.f=e?l:function(e,c){if(e=o(e),c=a(c),s)try{return l(e,c)}catch(e){}if(i(e,c))return r(!t(n.f,e,c),e[c])},Mn}var Bn,Fn,Ln,Vn,Hn,zn,Un,qn={exports:{}};function Kn(){if(Fn)return Bn;Fn=1;var e=We(),t=$e(),n=Function.prototype,r=e&&Object.getOwnPropertyDescriptor,o=t(n,"name"),a=o&&"something"===function(){}.name,i=o&&(!e||e&&r(n,"name").configurable);return Bn={EXISTS:o,PROPER:a,CONFIGURABLE:i}}function Wn(){if(Vn)return Ln;Vn=1;var e=J(),t=W(),n=Ne(),r=e(Function.toString);return t(n.inspectSource)||(n.inspectSource=function(e){return r(e)}),Ln=n.inspectSource}function Zn(){if(Hn)return qn.exports;Hn=1;var e=J(),t=G(),n=W(),r=$e(),o=We(),a=Kn().CONFIGURABLE,i=Wn(),s=Cn(),l=s.enforce,c=s.get,u=String,d=Object.defineProperty,p=e("".slice),f=e("".replace),h=e([].join),m=o&&!t((function(){return 8!==d((function(){}),"length",{value:8}).length})),v=String(String).split("String"),g=qn.exports=function(e,t,n){"Symbol("===p(u(t),0,7)&&(t="["+f(u(t),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(t="get "+t),n&&n.setter&&(t="set "+t),(!r(e,"name")||a&&e.name!==t)&&(o?d(e,"name",{value:t,configurable:!0}):e.name=t),m&&n&&r(n,"arity")&&e.length!==n.arity&&d(e,"length",{value:n.arity});try{n&&r(n,"constructor")&&n.constructor?o&&d(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var i=l(e);return r(i,"source")||(i.source=h(v,"string"==typeof t?t:"")),e};return Function.prototype.toString=g((function(){return n(this)&&c(this).source||i(this)}),"toString"),qn.exports}function Qn(){if(Un)return zn;Un=1;var e=W(),t=mn(),n=Zn(),r=Ce();return zn=function(o,a,i,s){s||(s={});var l=s.enumerable,c=void 0!==s.name?s.name:a;if(e(i)&&n(i,c,s),s.global)l?o[a]=i:r(a,i);else{try{s.unsafe?o[a]&&(l=!0):delete o[a]}catch(e){}l?o[a]=i:t.f(o,a,{value:i,enumerable:!1,configurable:!s.nonConfigurable,writable:!s.nonWritable})}return o}}var Gn,Yn={};var Jn,Xn,er,tr,nr,rr,or,ar,ir,sr,lr,cr,ur,dr,pr,fr,hr,mr,vr,gr,br,yr,wr,_r,Or,Er,kr,Ar,Sr,Pr,xr,jr,Dr,Cr,Nr={};function Tr(){return Jn||(Jn=1,Nr.f=Object.getOwnPropertySymbols),Nr}function Mr(){if(er)return Xn;er=1;var e=sn(),t=J(),n=function(){if(Gn)return Yn;Gn=1;var e=_n(),t=On().concat("length","prototype");return Yn.f=Object.getOwnPropertyNames||function(n){return e(n,t)},Yn}(),r=Tr(),o=Ve(),a=t([].concat);return Xn=e("Reflect","ownKeys")||function(e){var t=n.f(o(e)),i=r.f;return i?a(t,i(e)):t}}function $r(){if(nr)return tr;nr=1;var e=$e(),t=Mr(),n=Rn(),r=mn();return tr=function(o,a,i){for(var s=t(a),l=r.f,c=n.f,u=0;u<s.length;u++){var d=s[u];e(o,d)||i&&e(i,d)||l(o,d,c(a,d))}}}function Ir(){if(ir)return ar;ir=1;var e=K(),t=Rn().f,n=Dn(),r=Qn(),o=Ce(),a=$r(),i=function(){if(or)return rr;or=1;var e=G(),t=W(),n=/#|\.prototype\./,r=function(n,r){var l=a[o(n)];return l===s||l!==i&&(t(r)?e(r):!!r)},o=r.normalize=function(e){return String(e).replace(n,".").toLowerCase()},a=r.data={},i=r.NATIVE="N",s=r.POLYFILL="P";return rr=r}();return ar=function(s,l){var c,u,d,p,f,h=s.target,m=s.global,v=s.stat;if(c=m?e:v?e[h]||o(h,{}):e[h]&&e[h].prototype)for(u in l){if(p=l[u],d=s.dontCallGetSet?(f=t(c,u))&&f.value:c[u],!i(m?u:h+(v?".":"#")+u,s.forced)&&void 0!==d){if(typeof p==typeof d)continue;a(p,d)}(s.sham||d&&d.sham)&&n(p,"sham",!0),r(c,u,p,s)}}}function Rr(){if(ur)return cr;ur=1;var e=$e(),t=W(),n=Me(),r=An(),o=function(){if(lr)return sr;lr=1;var e=G();return sr=!e((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype}))}(),a=r("IE_PROTO"),i=Object,s=i.prototype;return cr=o?i.getPrototypeOf:function(r){var o=n(r);if(e(o,a))return o[a];var l=o.constructor;return t(l)&&o instanceof l?l.prototype:o instanceof i?s:null}}function Br(){if(pr)return dr;pr=1;var e,t,n,r=G(),o=W(),a=Z(),i=Sn(),s=Rr(),l=Qn(),c=Le(),u=De(),d=c("iterator"),p=!1;return[].keys&&("next"in(n=[].keys())?(t=s(s(n)))!==Object.prototype&&(e=t):p=!0),!a(e)||r((function(){var t={};return e[d].call(t)!==t}))?e={}:u&&(e=i(e)),o(e[d])||l(e,d,(function(){return this})),dr={IteratorPrototype:e,BUGGY_SAFARI_ITERATORS:p}}function Fr(){if(hr)return fr;hr=1;var e=mn().f,t=$e(),n=Le()("toStringTag");return fr=function(r,o,a){r&&!a&&(r=r.prototype),r&&!t(r,n)&&e(r,n,{configurable:!0,value:o})}}function Lr(){if(vr)return mr;vr=1;var e=Br().IteratorPrototype,t=Sn(),n=jn(),r=Fr(),o=xn(),a=function(){return this};return mr=function(i,s,l,c){var u=s+" Iterator";return i.prototype=t(e,{next:n(+!c,l)}),r(i,u,!1,!0),o[u]=a,i},mr}function Vr(){if(wr)return yr;wr=1;var e=Z();return yr=function(t){return e(t)||null===t}}function Hr(){if(Or)return _r;Or=1;var e=Vr(),t=String,n=TypeError;return _r=function(r){if(e(r))return r;throw new n("Can't set "+t(r)+" as a prototype")}}function zr(){if(kr)return Er;kr=1;var e=function(){if(br)return gr;br=1;var e=J(),t=dn();return gr=function(n,r,o){try{return e(t(Object.getOwnPropertyDescriptor(n,r)[o]))}catch(e){}}}(),t=Z(),n=ne(),r=Hr();return Er=Object.setPrototypeOf||("__proto__"in{}?function(){var o,a=!1,i={};try{(o=e(Object.prototype,"__proto__","set"))(i,[]),a=i instanceof Array}catch(e){}return function(e,i){return n(e),r(i),t(e)?(a?o(e,i):e.__proto__=i,e):e}}():void 0)}function Ur(){if(Sr)return Ar;Sr=1;var e=Ir(),t=an(),n=De(),r=Kn(),o=W(),a=Lr(),i=Rr(),s=zr(),l=Fr(),c=Dn(),u=Qn(),d=Le(),p=xn(),f=Br(),h=r.PROPER,m=r.CONFIGURABLE,v=f.IteratorPrototype,g=f.BUGGY_SAFARI_ITERATORS,b=d("iterator"),y="keys",w="values",_="entries",O=function(){return this};return Ar=function(r,d,f,E,k,A,S){a(f,d,E);var P,x,j,D=function(e){if(e===k&&$)return $;if(!g&&e&&e in T)return T[e];switch(e){case y:case w:case _:return function(){return new f(this,e)}}return function(){return new f(this)}},C=d+" Iterator",N=!1,T=r.prototype,M=T[b]||T["@@iterator"]||k&&T[k],$=!g&&M||D(k),I="Array"===d&&T.entries||M;if(I&&(P=i(I.call(new r)))!==Object.prototype&&P.next&&(n||i(P)===v||(s?s(P,v):o(P[b])||u(P,b,O)),l(P,C,!0,!0),n&&(p[C]=O)),h&&k===w&&M&&M.name!==w&&(!n&&m?c(T,"name",w):(N=!0,$=function(){return t(M,this)})),k)if(x={values:D(w),keys:A?$:D(y),entries:D(_)},S)for(j in x)(g||N||!(j in T))&&u(T,j,x[j]);else e({target:d,proto:!0,forced:g||N},x);return n&&!S||T[b]===$||u(T,b,$,{name:k}),p[d]=$,x},Ar}function qr(){return xr?Pr:(xr=1,Pr=function(e,t){return{value:e,done:t}})}function Kr(){if(Dr)return jr;Dr=1;var e=re(),t=Pn(),n=xn(),r=Cn(),o=mn().f,a=Ur(),i=qr(),s=De(),l=We(),c="Array Iterator",u=r.set,d=r.getterFor(c);jr=a(Array,"Array",(function(t,n){u(this,{type:c,target:e(t),index:0,kind:n})}),(function(){var e=d(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,i(void 0,!0);switch(e.kind){case"keys":return i(n,!1);case"values":return i(t[n],!1)}return i([n,t[n]],!1)}),"values");var p=n.Arguments=n.Array;if(t("keys"),t("values"),t("entries"),!s&&l&&"values"!==p.name)try{o(p,"name",{value:"values"})}catch(e){}return jr}function Wr(e){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Wr(e)}function Zr(e){var t=function(e,t){if("object"!=Wr(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=Wr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==Wr(t)?t:t+""}function Qr(e,t,n){return(t=Zr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}!function(){if(Cr)return U;Cr=1;var e=K(),t=y?b:(y=1,b={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}),n=function(){if(P)return S;P=1;var e=Q()("span").classList,t=e&&e.constructor&&e.constructor.prototype;return S=t===Object.prototype?void 0:t}(),r=Kr(),o=Dn(),a=Fr(),i=Le()("iterator"),s=r.values,l=function(e,n){if(e){if(e[i]!==s)try{o(e,i,s)}catch(t){e[i]=s}if(a(e,n,!0),t[n])for(var l in r)if(e[l]!==r[l])try{o(e,l,r[l])}catch(t){e[l]=r[l]}}};for(var c in t)l(e[c]&&e[c].prototype,c);l(n,"DOMTokenList")}();var Gr,Yr={exports:{}},Jr={},Xr={},eo={},to={},no={},ro={};function oo(){return Gr||(Gr=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.regexpCode=e.getEsmExportName=e.getProperty=e.safeStringify=e.stringify=e.strConcat=e.addCodeArg=e.str=e._=e.nil=e._Code=e.Name=e.IDENTIFIER=e._CodeOrName=void 0;class t{}e._CodeOrName=t,e.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends t{constructor(t){if(super(),!e.IDENTIFIER.test(t))throw new Error("CodeGen: name must be a valid identifier");this.str=t}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=n;class r extends t{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function o(e,...t){const n=[e[0]];let o=0;for(;o<t.length;)s(n,t[o]),n.push(e[++o]);return new r(n)}e._Code=r,e.nil=new r(""),e._=o;const a=new r("+");function i(e,...t){const n=[c(e[0])];let o=0;for(;o<t.length;)n.push(a),s(n,t[o]),n.push(a,c(e[++o]));return function(e){let t=1;for(;t<e.length-1;){if(e[t]===a){const n=l(e[t-1],e[t+1]);if(void 0!==n){e.splice(t-1,3,n);continue}e[t++]="+"}t++}}(n),new r(n)}function s(e,t){var o;t instanceof r?e.push(...t._items):t instanceof n?e.push(t):e.push("number"==typeof(o=t)||"boolean"==typeof o||null===o?o:c(Array.isArray(o)?o.join(","):o))}function l(e,t){if('""'===t)return e;if('""'===e)return t;if("string"==typeof e){if(t instanceof n||'"'!==e[e.length-1])return;return"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0}return"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function c(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.str=i,e.addCodeArg=s,e.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:i`${e}${t}`},e.stringify=function(e){return new r(c(e))},e.safeStringify=c,e.getProperty=function(t){return"string"==typeof t&&e.IDENTIFIER.test(t)?new r(`.${t}`):o`[${t}]`},e.getEsmExportName=function(t){if("string"==typeof t&&e.IDENTIFIER.test(t))return new r(`${t}`);throw new Error(`CodeGen: invalid export name: ${t}, use explicit $id name mapping`)},e.regexpCode=function(e){return new r(e.toString())}}(ro)),ro}var ao,io,so={};function lo(){return ao||(ao=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=oo();class n extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var r;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(r||(e.UsedValueState=r={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class o{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof t.Name?e:this.name(e)}name(e){return new t.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,n;if((null===(n=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===n?void 0:n.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}e.Scope=o;class a extends t.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:n,itemIndex:r}){this.value=e,this.scopePath=t._`.${new t.Name(n)}[${r}]`}}e.ValueScopeName=a;const i=t._`\n`;e.ValueScope=class extends o{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?i:t.nil}}get(){return this._scope}name(e){return new a(e,this._newName(e))}value(e,t){var n;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const r=this.toName(e),{prefix:o}=r,a=null!==(n=t.key)&&void 0!==n?n:t.ref;let i=this._values[o];if(i){const e=i.get(a);if(e)return e}else i=this._values[o]=new Map;i.set(a,r);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,r.setValue(t,{property:o,itemIndex:l}),r}getValue(e,t){const n=this._values[e];if(n)return n.get(t)}scopeRefs(e,n=this._values){return this._reduceValues(n,(n=>{if(void 0===n.scopePath)throw new Error(`CodeGen: name "${n}" has no value`);return t._`${e}${n.scopePath}`}))}scopeCode(e=this._values,t,n){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,n)}_reduceValues(o,a,i={},s){let l=t.nil;for(const c in o){const u=o[c];if(!u)continue;const d=i[c]=i[c]||new Map;u.forEach((o=>{if(d.has(o))return;d.set(o,r.Started);let i=a(o);if(i){const n=this.opts.es5?e.varKinds.var:e.varKinds.const;l=t._`${l}${n} ${o} = ${i};${this.opts._n}`}else{if(!(i=null==s?void 0:s(o)))throw new n(o);l=t._`${l}${i}${this.opts._n}`}d.set(o,r.Completed)}))}return l}}}(so)),so}function co(){return io||(io=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.or=e.and=e.not=e.CodeGen=e.operators=e.varKinds=e.ValueScopeName=e.ValueScope=e.Scope=e.Name=e.regexpCode=e.stringify=e.getProperty=e.nil=e.strConcat=e.str=e._=void 0;const t=oo(),n=lo();var r=oo();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return r.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return r.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return r.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}});var o=lo();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return o.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return o.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return o.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return o.varKinds}}),e.operators={GT:new t._Code(">"),GTE:new t._Code(">="),LT:new t._Code("<"),LTE:new t._Code("<="),EQ:new t._Code("==="),NEQ:new t._Code("!=="),NOT:new t._Code("!"),OR:new t._Code("||"),AND:new t._Code("&&"),ADD:new t._Code("+")};class a{optimizeNodes(){return this}optimizeNames(e,t){return this}}class i extends a{constructor(e,t,n){super(),this.varKind=e,this.name=t,this.rhs=n}render({es5:e,_n:t}){const r=e?n.varKinds.var:this.varKind,o=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${o};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=j(this.rhs,e,t)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class s extends a{constructor(e,t,n){super(),this.lhs=e,this.rhs=t,this.sideEffects=n}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,n){if(!(this.lhs instanceof t.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=j(this.rhs,e,n),this}get names(){return x(this.lhs instanceof t.Name?{}:{...this.lhs.names},this.rhs)}}class l extends s{constructor(e,t,n,r){super(e,n,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class c extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class u extends a{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class d extends a{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class p extends a{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=j(this.code,e,t),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class f extends a{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,n)=>t+n.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const n=e[t].optimizeNodes();Array.isArray(n)?e.splice(t,1,...n):n?e[t]=n:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:n}=this;let r=n.length;for(;r--;){const o=n[r];o.optimizeNames(e,t)||(D(e,o.names),n.splice(r,1))}return n.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>P(e,t.names)),{})}}class h extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends f{}class v extends h{}v.kind="else";class g extends h{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof g?t:t.nodes:this.nodes.length?this:new g(C(e),t instanceof g?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var n;if(this.else=null===(n=this.else)||void 0===n?void 0:n.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=j(this.condition,e,t),this}get names(){const e=super.names;return x(e,this.condition),this.else&&P(e,this.else.names),e}}g.kind="if";class b extends h{}b.kind="for";class y extends b{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=j(this.iteration,e,t),this}get names(){return P(super.names,this.iteration.names)}}class w extends b{constructor(e,t,n,r){super(),this.varKind=e,this.name=t,this.from=n,this.to=r}render(e){const t=e.es5?n.varKinds.var:this.varKind,{name:r,from:o,to:a}=this;return`for(${t} ${r}=${o}; ${r}<${a}; ${r}++)`+super.render(e)}get names(){const e=x(super.names,this.from);return x(e,this.to)}}class _ extends b{constructor(e,t,n,r){super(),this.loop=e,this.varKind=t,this.name=n,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=j(this.iterable,e,t),this}get names(){return P(super.names,this.iterable.names)}}class O extends h{constructor(e,t,n){super(),this.name=e,this.args=t,this.async=n}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}O.kind="func";class E extends f{render(e){return"return "+super.render(e)}}E.kind="return";class k extends h{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var n,r;return super.optimizeNames(e,t),null===(n=this.catch)||void 0===n||n.optimizeNames(e,t),null===(r=this.finally)||void 0===r||r.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&P(e,this.catch.names),this.finally&&P(e,this.finally.names),e}}class A extends h{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}A.kind="catch";class S extends h{render(e){return"finally"+super.render(e)}}S.kind="finally";function P(e,t){for(const n in t)e[n]=(e[n]||0)+(t[n]||0);return e}function x(e,n){return n instanceof t._CodeOrName?P(e,n.names):e}function j(e,n,r){return e instanceof t.Name?a(e):(o=e)instanceof t._Code&&o._items.some((e=>e instanceof t.Name&&1===n[e.str]&&void 0!==r[e.str]))?new t._Code(e._items.reduce(((e,n)=>(n instanceof t.Name&&(n=a(n)),n instanceof t._Code?e.push(...n._items):e.push(n),e)),[])):e;var o;function a(e){const t=r[e.str];return void 0===t||1!==n[e.str]?e:(delete n[e.str],t)}}function D(e,t){for(const n in t)e[n]=(e[n]||0)-(t[n]||0)}function C(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:t._`!${$(e)}`}e.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const n=this._extScope.value(e,t);return(this._values[n.prefix]||(this._values[n.prefix]=new Set)).add(n),n}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,n,r){const o=this._scope.toName(t);return void 0!==n&&r&&(this._constants[o.str]=n),this._leafNode(new i(e,o,n)),o}const(e,t,r){return this._def(n.varKinds.const,e,t,r)}let(e,t,r){return this._def(n.varKinds.let,e,t,r)}var(e,t,r){return this._def(n.varKinds.var,e,t,r)}assign(e,t,n){return this._leafNode(new s(e,t,n))}add(t,n){return this._leafNode(new l(t,e.operators.ADD,n))}code(e){return"function"==typeof e?e():e!==t.nil&&this._leafNode(new p(e)),this}object(...e){const n=["{"];for(const[r,o]of e)n.length>1&&n.push(","),n.push(r),(r!==o||this.opts.es5)&&(n.push(":"),(0,t.addCodeArg)(n,o));return n.push("}"),new t._Code(n)}if(e,t,n){if(this._blockNode(new g(e)),t&&n)this.code(t).else().code(n).endIf();else if(t)this.code(t).endIf();else if(n)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new g(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(g,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new y(e),t)}forRange(e,t,r,o,a=(this.opts.es5?n.varKinds.var:n.varKinds.let)){const i=this._scope.toName(e);return this._for(new w(a,i,t,r),(()=>o(i)))}forOf(e,r,o,a=n.varKinds.const){const i=this._scope.toName(e);if(this.opts.es5){const e=r instanceof t.Name?r:this.var("_arr",r);return this.forRange("_i",0,t._`${e}.length`,(n=>{this.var(i,t._`${e}[${n}]`),o(i)}))}return this._for(new _("of",a,i,r),(()=>o(i)))}forIn(e,r,o,a=(this.opts.es5?n.varKinds.var:n.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,t._`Object.keys(${r})`,o);const i=this._scope.toName(e);return this._for(new _("in",a,i,r),(()=>o(i)))}endFor(){return this._endBlockNode(b)}label(e){return this._leafNode(new c(e))}break(e){return this._leafNode(new u(e))}return(e){const t=new E;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(E)}try(e,t,n){if(!t&&!n)throw new Error('CodeGen: "try" without "catch" and "finally"');const r=new k;if(this._blockNode(r),this.code(e),t){const e=this.name("e");this._currNode=r.catch=new A(e),t(e)}return n&&(this._currNode=r.finally=new S,this.code(n)),this._endBlockNode(A,S)}throw(e){return this._leafNode(new d(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const n=this._nodes.length-t;if(n<0||void 0!==e&&n!==e)throw new Error(`CodeGen: wrong number of nodes: ${n} vs ${e} expected`);return this._nodes.length=t,this}func(e,n=t.nil,r,o){return this._blockNode(new O(e,n,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(O)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const n=this._currNode;if(n instanceof e||t&&n instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof g))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},e.not=C;const N=M(e.operators.AND);e.and=function(...e){return e.reduce(N)};const T=M(e.operators.OR);function M(e){return(n,r)=>n===t.nil?r:r===t.nil?n:t._`${$(n)} ${e} ${$(r)}`}function $(e){return e instanceof t.Name?e:t._`(${e})`}e.or=function(...e){return e.reduce(T)}}(no)),no}var uo,po={};function fo(){if(uo)return po;uo=1,Object.defineProperty(po,"__esModule",{value:!0}),po.checkStrictMode=po.getErrorPath=po.Type=po.useFunc=po.setEvaluated=po.evaluatedPropsToName=po.mergeEvaluated=po.eachItem=po.unescapeJsonPointer=po.escapeJsonPointer=po.escapeFragment=po.unescapeFragment=po.schemaRefOrVal=po.schemaHasRulesButRef=po.schemaHasRules=po.checkUnknownRules=po.alwaysValidSchema=po.toHash=void 0;const e=co(),t=oo();function n(e,t=e.schema){const{opts:n,self:r}=e;if(!n.strictSchema)return;if("boolean"==typeof t)return;const o=r.RULES.keywords;for(const n in t)o[n]||d(e,`unknown keyword: "${n}"`)}function r(e,t){if("boolean"==typeof e)return!e;for(const n in e)if(t[n])return!0;return!1}function o(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function a(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function i({mergeNames:t,mergeToName:n,mergeValues:r,resultToName:o}){return(a,i,s,l)=>{const c=void 0===s?i:s instanceof e.Name?(i instanceof e.Name?t(a,i,s):n(a,i,s),s):i instanceof e.Name?(n(a,s,i),i):r(i,s);return l!==e.Name||c instanceof e.Name?c:o(a,c)}}function s(t,n){if(!0===n)return t.var("props",!0);const r=t.var("props",e._`{}`);return void 0!==n&&l(t,r,n),r}function l(t,n,r){Object.keys(r).forEach((r=>t.assign(e._`${n}${(0,e.getProperty)(r)}`,!0)))}po.toHash=function(e){const t={};for(const n of e)t[n]=!0;return t},po.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(n(e,t),!r(t,e.self.RULES.all))},po.checkUnknownRules=n,po.schemaHasRules=r,po.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const n in e)if("$ref"!==n&&t.all[n])return!0;return!1},po.schemaRefOrVal=function({topSchemaRef:t,schemaPath:n},r,o,a){if(!a){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return e._`${r}`}return e._`${t}${n}${(0,e.getProperty)(o)}`},po.unescapeFragment=function(e){return a(decodeURIComponent(e))},po.escapeFragment=function(e){return encodeURIComponent(o(e))},po.escapeJsonPointer=o,po.unescapeJsonPointer=a,po.eachItem=function(e,t){if(Array.isArray(e))for(const n of e)t(n);else t(e)},po.mergeEvaluated={props:i({mergeNames:(t,n,r)=>t.if(e._`${r} !== true && ${n} !== undefined`,(()=>{t.if(e._`${n} === true`,(()=>t.assign(r,!0)),(()=>t.assign(r,e._`${r} || {}`).code(e._`Object.assign(${r}, ${n})`)))})),mergeToName:(t,n,r)=>t.if(e._`${r} !== true`,(()=>{!0===n?t.assign(r,!0):(t.assign(r,e._`${r} || {}`),l(t,r,n))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:s}),items:i({mergeNames:(t,n,r)=>t.if(e._`${r} !== true && ${n} !== undefined`,(()=>t.assign(r,e._`${n} === true ? true : ${r} > ${n} ? ${r} : ${n}`))),mergeToName:(t,n,r)=>t.if(e._`${r} !== true`,(()=>t.assign(r,!0===n||e._`${r} > ${n} ? ${r} : ${n}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},po.evaluatedPropsToName=s,po.setEvaluated=l;const c={};var u;function d(e,t,n=e.opts.strictSchema){if(n){if(t=`strict mode: ${t}`,!0===n)throw new Error(t);e.self.logger.warn(t)}}return po.useFunc=function(e,n){return e.scopeValue("func",{ref:n,code:c[n.code]||(c[n.code]=new t._Code(n.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(u||(po.Type=u={})),po.getErrorPath=function(t,n,r){if(t instanceof e.Name){const o=n===u.Num;return r?o?e._`"[" + ${t} + "]"`:e._`"['" + ${t} + "']"`:o?e._`"/" + ${t}`:e._`"/" + ${t}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,e.getProperty)(t).toString():"/"+o(t)},po.checkStrictMode=d,po}var ho,mo,vo,go={};function bo(){if(ho)return go;ho=1,Object.defineProperty(go,"__esModule",{value:!0});const e=co(),t={data:new e.Name("data"),valCxt:new e.Name("valCxt"),instancePath:new e.Name("instancePath"),parentData:new e.Name("parentData"),parentDataProperty:new e.Name("parentDataProperty"),rootData:new e.Name("rootData"),dynamicAnchors:new e.Name("dynamicAnchors"),vErrors:new e.Name("vErrors"),errors:new e.Name("errors"),this:new e.Name("this"),self:new e.Name("self"),scope:new e.Name("scope"),json:new e.Name("json"),jsonPos:new e.Name("jsonPos"),jsonLen:new e.Name("jsonLen"),jsonPart:new e.Name("jsonPart")};return go.default=t,go}function yo(){return mo||(mo=1,function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.extendErrors=e.resetErrorsCount=e.reportExtraError=e.reportError=e.keyword$DataError=e.keywordError=void 0;const t=co(),n=fo(),r=bo();function o(e,n){const o=e.const("err",n);e.if(t._`${r.default.vErrors} === null`,(()=>e.assign(r.default.vErrors,t._`[${o}]`)),t._`${r.default.vErrors}.push(${o})`),e.code(t._`${r.default.errors}++`)}function a(e,n){const{gen:r,validateName:o,schemaEnv:a}=e;a.$async?r.throw(t._`new ${e.ValidationError}(${n})`):(r.assign(t._`${o}.errors`,n),r.return(!1))}e.keywordError={message:({keyword:e})=>t.str`must pass "${e}" keyword validation`},e.keyword$DataError={message:({keyword:e,schemaType:n})=>n?t.str`"${e}" keyword must be ${n} ($data)`:t.str`"${e}" keyword is invalid ($data)`},e.reportError=function(n,r=e.keywordError,i,l){const{it:c}=n,{gen:u,compositeRule:d,allErrors:p}=c,f=s(n,r,i);(null!=l?l:d||p)?o(u,f):a(c,t._`[${f}]`)},e.reportExtraError=function(t,n=e.keywordError,i){const{it:l}=t,{gen:c,compositeRule:u,allErrors:d}=l;o(c,s(t,n,i)),u||d||a(l,r.default.vErrors)},e.resetErrorsCount=function(e,n){e.assign(r.default.errors,n),e.if(t._`${r.default.vErrors} !== null`,(()=>e.if(n,(()=>e.assign(t._`${r.default.vErrors}.length`,n)),(()=>e.assign(r.default.vErrors,null)))))},e.extendErrors=function({gen:e,keyword:n,schemaValue:o,data:a,errsCount:i,it:s}){if(void 0===i)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",i,r.default.errors,(i=>{e.const(l,t._`${r.default.vErrors}[${i}]`),e.if(t._`${l}.instancePath === undefined`,(()=>e.assign(t._`${l}.instancePath`,(0,t.strConcat)(r.default.instancePath,s.errorPath)))),e.assign(t._`${l}.schemaPath`,t.str`${s.errSchemaPath}/${n}`),s.opts.verbose&&(e.assign(t._`${l}.schema`,o),e.assign(t._`${l}.data`,a))}))};const i={keyword:new t.Name("keyword"),schemaPath:new t.Name("schemaPath"),params:new t.Name("params"),propertyName:new t.Name("propertyName"),message:new t.Name("message"),schema:new t.Name("schema"),parentSchema:new t.Name("parentSchema")};function s(e,n,o){const{createErrors:a}=e.it;return!1===a?t._`{}`:function(e,n,o={}){const{gen:a,it:s}=e,u=[l(s,o),c(e,o)];return function(e,{params:n,message:o},a){const{keyword:s,data:l,schemaValue:c,it:u}=e,{opts:d,propertyName:p,topSchemaRef:f,schemaPath:h}=u;a.push([i.keyword,s],[i.params,"function"==typeof n?n(e):n||t._`{}`]),d.messages&&a.push([i.message,"function"==typeof o?o(e):o]);d.verbose&&a.push([i.schema,c],[i.parentSchema,t._`${f}${h}`],[r.default.data,l]);p&&a.push([i.propertyName,p])}(e,n,u),a.object(...u)}(e,n,o)}function l({errorPath:e},{instancePath:o}){const a=o?t.str`${e}${(0,n.getErrorPath)(o,n.Type.Str)}`:e;return[r.default.instancePath,(0,t.strConcat)(r.default.instancePath,a)]}function c({keyword:e,it:{errSchemaPath:r}},{schemaPath:o,parentSchema:a}){let s=a?r:t.str`${r}/${e}`;return o&&(s=t.str`${s}${(0,n.getErrorPath)(o,n.Type.Str)}`),[i.schemaPath,s]}}(to)),to}var wo,_o={},Oo={};function Eo(){if(wo)return Oo;wo=1,Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.getRules=Oo.isJSONType=void 0;const e=new Set(["string","number","integer","boolean","null","object","array"]);return Oo.isJSONType=function(t){return"string"==typeof t&&e.has(t)},Oo.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}},Oo}var ko,Ao,So={};function Po(){if(ko)return So;function e(e,n){return n.rules.some((n=>t(e,n)))}function t(e,t){var n;return void 0!==e[t.keyword]||(null===(n=t.definition.implements)||void 0===n?void 0:n.some((t=>void 0!==e[t])))}return ko=1,Object.defineProperty(So,"__esModule",{value:!0}),So.shouldUseRule=So.shouldUseGroup=So.schemaHasRulesForType=void 0,So.schemaHasRulesForType=function({schema:t,self:n},r){const o=n.RULES.types[r];return o&&!0!==o&&e(t,o)},So.shouldUseGroup=e,So.shouldUseRule=t,So}function xo(){if(Ao)return _o;Ao=1,Object.defineProperty(_o,"__esModule",{value:!0}),_o.reportTypeError=_o.checkDataTypes=_o.checkDataType=_o.coerceAndCheckDataType=_o.getJSONTypes=_o.getSchemaTypes=_o.DataType=void 0;const e=Eo(),t=Po(),n=yo(),r=co(),o=fo();var a;function i(t){const n=Array.isArray(t)?t:t?[t]:[];if(n.every(e.isJSONType))return n;throw new Error("type must be JSONType or JSONType[]: "+n.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(a||(_o.DataType=a={})),_o.getSchemaTypes=function(e){const t=i(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},_o.getJSONTypes=i,_o.coerceAndCheckDataType=function(e,n){const{gen:o,data:i,opts:l}=e,u=function(e,t){return t?e.filter((e=>s.has(e)||"array"===t&&"array"===e)):[]}(n,l.coerceTypes),p=n.length>0&&!(0===u.length&&1===n.length&&(0,t.schemaHasRulesForType)(e,n[0]));if(p){const t=c(n,i,l.strictNumbers,a.Wrong);o.if(t,(()=>{u.length?function(e,t,n){const{gen:o,data:a,opts:i}=e,l=o.let("dataType",r._`typeof ${a}`),u=o.let("coerced",r._`undefined`);"array"===i.coerceTypes&&o.if(r._`${l} == 'object' && Array.isArray(${a}) && ${a}.length == 1`,(()=>o.assign(a,r._`${a}[0]`).assign(l,r._`typeof ${a}`).if(c(t,a,i.strictNumbers),(()=>o.assign(u,a)))));o.if(r._`${u} !== undefined`);for(const e of n)(s.has(e)||"array"===e&&"array"===i.coerceTypes)&&p(e);function p(e){switch(e){case"string":return void o.elseIf(r._`${l} == "number" || ${l} == "boolean"`).assign(u,r._`"" + ${a}`).elseIf(r._`${a} === null`).assign(u,r._`""`);case"number":return void o.elseIf(r._`${l} == "boolean" || ${a} === null
|| (${l} == "string" && ${a} && ${a} == +${a})`).assign(u,r._`+${a}`);case"integer":return void o.elseIf(r._`${l} === "boolean" || ${a} === null
|| (${l} === "string" && ${a} && ${a} == +${a} && !(${a} % 1))`).assign(u,r._`+${a}`);case"boolean":return void o.elseIf(r._`${a} === "false" || ${a} === 0 || ${a} === null`).assign(u,!1).elseIf(r._`${a} === "true" || ${a} === 1`).assign(u,!0);case"null":return o.elseIf(r._`${a} === "" || ${a} === 0 || ${a} === false`),void o.assign(u,null);case"array":o.elseIf(r._`${l} === "string" || ${l} === "number"
|| ${l} === "boolean" || ${a} === null`).assign(u,r._`[${a}]`)}}o.else(),d(e),o.endIf(),o.if(r._`${u} !== undefined`,(()=>{o.assign(a,u),function({gen:e,parentData:t,parentDataProperty:n},o){e.if(r._`${t} !== undefined`,(()=>e.assign(r._`${t}[${n}]`,o)))}(e,u)}))}(e,n,u):d(e)}))}return p};const s=new Set(["string","number","integer","boolean","null"]);function l(e,t,n,o=a.Correct){const i=o===a.Correct?r.operators.EQ:r.operators.NEQ;let s;switch(e){case"null":return r._`${t} ${i} null`;case"array":s=r._`Array.isArray(${t})`;break;case"object":s=r._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=l(r._`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=l();break;default:return r._`typeof ${t} ${i} ${e}`}return o===a.Correct?s:(0,r.not)(s);function l(e=r.nil){return(0,r.and)(r._`typeof ${t} == "number"`,e,n?r._`isFinite(${t})`:r.nil)}}function c(e,t,n,a){if(1===e.length)return l(e[0],t,n,a);let i;const s=(0,o.toHash)(e);if(s.array&&s.object){const e=r._`typeof ${t} != "object"`;i=s.null?e:r._`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else i=r.nil;s.number&&delete s.integer;for(const e in s)i=(0,r.and)(i,l(e,t,n,a));return i}_o.checkDataType=l,_o.checkDataTypes=c;const u={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?r._`{type: ${e}}`:r._`{type: ${t}}`};function d(e){const t=function(e){const{gen:t,data:n,schema:r}=e,a=(0,o.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:n,schema:r.type,schemaCode:a,schemaValue:a,parentSchema:r,params:{},it:e}}(e);(0,n.reportError)(t,u)}return _o.reportTypeError=d,_o}var jo,Do={};var Co,No,To={},Mo={};function $o(){if(Co)return Mo;Co=1,Object.defineProperty(Mo,"__esModule",{value:!0}),Mo.validateUnion=Mo.validateArray=Mo.usePattern=Mo.callValidateCode=Mo.schemaProperties=Mo.allSchemaProperties=Mo.noPropertyInData=Mo.propertyInData=Mo.isOwnProperty=Mo.hasPropFunc=Mo.reportMissingProp=Mo.checkMissingProp=Mo.checkReportMissingProp=void 0;const e=co(),t=fo(),n=bo(),r=fo();function o(t){return t.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:e._`Object.prototype.hasOwnProperty`})}function a(t,n,r){return e._`${o(t)}.call(${n}, ${r})`}function i(t,n,r,o){const i=e._`${n}${(0,e.getProperty)(r)} === undefined`;return o?(0,e.or)(i,(0,e.not)(a(t,n,r))):i}function s(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}