beanbagdb-components 0.1.1 → 0.2.0

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/main.umd.cjs CHANGED
@@ -1,15 +1,30 @@
1
- (function(ct,zt){typeof exports=="object"&&typeof module<"u"?zt(exports,require("svelte")):typeof define=="function"&&define.amd?define(["exports","svelte"],zt):(ct=typeof globalThis<"u"?globalThis:ct||self,zt(ct.BBDBComponents={},ct.Svelte))})(this,(function(ct,zt){"use strict";function ws(e,t){return function(){return e.apply(t,arguments)}}const{toString:To}=Object.prototype,{getPrototypeOf:On}=Object,{iterator:ur,toStringTag:bs}=Symbol,dr=(e=>t=>{const r=To.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),qe=e=>(e=e.toLowerCase(),t=>dr(t)===e),fr=e=>t=>typeof t===e,{isArray:Nt}=Array,At=fr("undefined");function Ht(e){return e!==null&&!At(e)&&e.constructor!==null&&!At(e.constructor)&&we(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const $s=qe("ArrayBuffer");function No(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&$s(e.buffer),t}const Ao=fr("string"),we=fr("function"),Es=fr("number"),Kt=e=>e!==null&&typeof e=="object",jo=e=>e===!0||e===!1,hr=e=>{if(dr(e)!=="object")return!1;const t=On(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(bs in e)&&!(ur in e)},Co=e=>{if(!Kt(e)||Ht(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},qo=qe("Date"),Io=qe("File"),Do=qe("Blob"),Mo=qe("FileList"),Lo=e=>Kt(e)&&we(e.pipe),xo=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||we(e.append)&&((t=dr(e))==="formdata"||t==="object"&&we(e.toString)&&e.toString()==="[object FormData]"))},Fo=qe("URLSearchParams"),[Uo,Vo,zo,Ho]=["ReadableStream","Request","Response","Headers"].map(qe),Ko=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Bt(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let n,i;if(typeof e!="object"&&(e=[e]),Nt(e))for(n=0,i=e.length;n<i;n++)t.call(null,e[n],n,e);else{if(Ht(e))return;const s=r?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let o;for(n=0;n<a;n++)o=s[n],t.call(null,e[o],o,e)}}function Ss(e,t){if(Ht(e))return null;t=t.toLowerCase();const r=Object.keys(e);let n=r.length,i;for(;n-- >0;)if(i=r[n],t===i.toLowerCase())return i;return null}const mt=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,Ps=e=>!At(e)&&e!==mt;function Tn(){const{caseless:e,skipUndefined:t}=Ps(this)&&this||{},r={},n=(i,s)=>{const a=e&&Ss(r,s)||s;hr(r[a])&&hr(i)?r[a]=Tn(r[a],i):hr(i)?r[a]=Tn({},i):Nt(i)?r[a]=i.slice():(!t||!At(i))&&(r[a]=i)};for(let i=0,s=arguments.length;i<s;i++)arguments[i]&&Bt(arguments[i],n);return r}const Bo=(e,t,r,{allOwnKeys:n}={})=>(Bt(t,(i,s)=>{r&&we(i)?e[s]=ws(i,r):e[s]=i},{allOwnKeys:n}),e),Jo=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Go=(e,t,r,n)=>{e.prototype=Object.create(t.prototype,n),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},Wo=(e,t,r,n)=>{let i,s,a;const o={};if(t=t||{},e==null)return t;do{for(i=Object.getOwnPropertyNames(e),s=i.length;s-- >0;)a=i[s],(!n||n(a,e,t))&&!o[a]&&(t[a]=e[a],o[a]=!0);e=r!==!1&&On(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},Zo=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const n=e.indexOf(t,r);return n!==-1&&n===r},Xo=e=>{if(!e)return null;if(Nt(e))return e;let t=e.length;if(!Es(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},Yo=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&On(Uint8Array)),Qo=(e,t)=>{const n=(e&&e[ur]).call(e);let i;for(;(i=n.next())&&!i.done;){const s=i.value;t.call(e,s[0],s[1])}},ec=(e,t)=>{let r;const n=[];for(;(r=e.exec(t))!==null;)n.push(r);return n},tc=qe("HTMLFormElement"),rc=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,n,i){return n.toUpperCase()+i}),ks=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),nc=qe("RegExp"),Rs=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),n={};Bt(r,(i,s)=>{let a;(a=t(i,s,e))!==!1&&(n[s]=a||i)}),Object.defineProperties(e,n)},sc=e=>{Rs(e,(t,r)=>{if(we(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const n=e[r];if(we(n)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},ic=(e,t)=>{const r={},n=i=>{i.forEach(s=>{r[s]=!0})};return Nt(e)?n(e):n(String(e).split(t)),r},ac=()=>{},oc=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function cc(e){return!!(e&&we(e.append)&&e[bs]==="FormData"&&e[ur])}const lc=e=>{const t=new Array(10),r=(n,i)=>{if(Kt(n)){if(t.indexOf(n)>=0)return;if(Ht(n))return n;if(!("toJSON"in n)){t[i]=n;const s=Nt(n)?[]:{};return Bt(n,(a,o)=>{const c=r(a,i+1);!At(c)&&(s[o]=c)}),t[i]=void 0,s}}return n};return r(e,0)},uc=qe("AsyncFunction"),dc=e=>e&&(Kt(e)||we(e))&&we(e.then)&&we(e.catch),Os=((e,t)=>e?setImmediate:t?((r,n)=>(mt.addEventListener("message",({source:i,data:s})=>{i===mt&&s===r&&n.length&&n.shift()()},!1),i=>{n.push(i),mt.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",we(mt.postMessage)),fc=typeof queueMicrotask<"u"?queueMicrotask.bind(mt):typeof process<"u"&&process.nextTick||Os,N={isArray:Nt,isArrayBuffer:$s,isBuffer:Ht,isFormData:xo,isArrayBufferView:No,isString:Ao,isNumber:Es,isBoolean:jo,isObject:Kt,isPlainObject:hr,isEmptyObject:Co,isReadableStream:Uo,isRequest:Vo,isResponse:zo,isHeaders:Ho,isUndefined:At,isDate:qo,isFile:Io,isBlob:Do,isRegExp:nc,isFunction:we,isStream:Lo,isURLSearchParams:Fo,isTypedArray:Yo,isFileList:Mo,forEach:Bt,merge:Tn,extend:Bo,trim:Ko,stripBOM:Jo,inherits:Go,toFlatObject:Wo,kindOf:dr,kindOfTest:qe,endsWith:Zo,toArray:Xo,forEachEntry:Qo,matchAll:ec,isHTMLForm:tc,hasOwnProperty:ks,hasOwnProp:ks,reduceDescriptors:Rs,freezeMethods:sc,toObjectSet:ic,toCamelCase:rc,noop:ac,toFiniteNumber:oc,findKey:Ss,global:mt,isContextDefined:Ps,isSpecCompliantForm:cc,toJSONObject:lc,isAsyncFn:uc,isThenable:dc,setImmediate:Os,asap:fc,isIterable:e=>e!=null&&we(e[ur])};function K(e,t,r,n,i){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),n&&(this.request=n),i&&(this.response=i,this.status=i.status?i.status:null)}N.inherits(K,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:N.toJSONObject(this.config),code:this.code,status:this.status}}});const Ts=K.prototype,Ns={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{Ns[e]={value:e}}),Object.defineProperties(K,Ns),Object.defineProperty(Ts,"isAxiosError",{value:!0}),K.from=(e,t,r,n,i,s)=>{const a=Object.create(Ts);N.toFlatObject(e,a,function(u){return u!==Error.prototype},l=>l!=="isAxiosError");const o=e&&e.message?e.message:"Error",c=t==null&&e?e.code:t;return K.call(a,o,c,r,n,i),e&&a.cause==null&&Object.defineProperty(a,"cause",{value:e,configurable:!0}),a.name=e&&e.name||"Error",s&&Object.assign(a,s),a};const hc=null;function Nn(e){return N.isPlainObject(e)||N.isArray(e)}function As(e){return N.endsWith(e,"[]")?e.slice(0,-2):e}function js(e,t,r){return e?e.concat(t).map(function(i,s){return i=As(i),!r&&s?"["+i+"]":i}).join(r?".":""):t}function pc(e){return N.isArray(e)&&!e.some(Nn)}const mc=N.toFlatObject(N,{},null,function(t){return/^is[A-Z]/.test(t)});function pr(e,t,r){if(!N.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=N.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(w,d){return!N.isUndefined(d[w])});const n=r.metaTokens,i=r.visitor||u,s=r.dots,a=r.indexes,c=(r.Blob||typeof Blob<"u"&&Blob)&&N.isSpecCompliantForm(t);if(!N.isFunction(i))throw new TypeError("visitor must be a function");function l(h){if(h===null)return"";if(N.isDate(h))return h.toISOString();if(N.isBoolean(h))return h.toString();if(!c&&N.isBlob(h))throw new K("Blob is not supported. Use a Buffer instead.");return N.isArrayBuffer(h)||N.isTypedArray(h)?c&&typeof Blob=="function"?new Blob([h]):Buffer.from(h):h}function u(h,w,d){let _=h;if(h&&!d&&typeof h=="object"){if(N.endsWith(w,"{}"))w=n?w:w.slice(0,-2),h=JSON.stringify(h);else if(N.isArray(h)&&pc(h)||(N.isFileList(h)||N.endsWith(w,"[]"))&&(_=N.toArray(h)))return w=As(w),_.forEach(function(g,E){!(N.isUndefined(g)||g===null)&&t.append(a===!0?js([w],E,s):a===null?w:w+"[]",l(g))}),!1}return Nn(h)?!0:(t.append(js(d,w,s),l(h)),!1)}const v=[],m=Object.assign(mc,{defaultVisitor:u,convertValue:l,isVisitable:Nn});function y(h,w){if(!N.isUndefined(h)){if(v.indexOf(h)!==-1)throw Error("Circular reference detected in "+w.join("."));v.push(h),N.forEach(h,function(_,f){(!(N.isUndefined(_)||_===null)&&i.call(t,_,N.isString(f)?f.trim():f,w,m))===!0&&y(_,w?w.concat(f):[f])}),v.pop()}}if(!N.isObject(e))throw new TypeError("data must be an object");return y(e),t}function Cs(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(n){return t[n]})}function An(e,t){this._pairs=[],e&&pr(e,this,t)}const qs=An.prototype;qs.append=function(t,r){this._pairs.push([t,r])},qs.toString=function(t){const r=t?function(n){return t.call(this,n,Cs)}:Cs;return this._pairs.map(function(i){return r(i[0])+"="+r(i[1])},"").join("&")};function _c(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Is(e,t,r){if(!t)return e;const n=r&&r.encode||_c;N.isFunction(r)&&(r={serialize:r});const i=r&&r.serialize;let s;if(i?s=i(t,r):s=N.isURLSearchParams(t)?t.toString():new An(t,r).toString(n),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class Ds{constructor(){this.handlers=[]}use(t,r,n){return this.handlers.push({fulfilled:t,rejected:r,synchronous:n?n.synchronous:!1,runWhen:n?n.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){N.forEach(this.handlers,function(n){n!==null&&t(n)})}}const Ms={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},yc={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:An,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},jn=typeof window<"u"&&typeof document<"u",Cn=typeof navigator=="object"&&navigator||void 0,gc=jn&&(!Cn||["ReactNative","NativeScript","NS"].indexOf(Cn.product)<0),vc=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",wc=jn&&window.location.href||"http://localhost",fe={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:jn,hasStandardBrowserEnv:gc,hasStandardBrowserWebWorkerEnv:vc,navigator:Cn,origin:wc},Symbol.toStringTag,{value:"Module"})),...yc};function bc(e,t){return pr(e,new fe.classes.URLSearchParams,{visitor:function(r,n,i,s){return fe.isNode&&N.isBuffer(r)?(this.append(n,r.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)},...t})}function $c(e){return N.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function Ec(e){const t={},r=Object.keys(e);let n;const i=r.length;let s;for(n=0;n<i;n++)s=r[n],t[s]=e[s];return t}function Ls(e){function t(r,n,i,s){let a=r[s++];if(a==="__proto__")return!0;const o=Number.isFinite(+a),c=s>=r.length;return a=!a&&N.isArray(i)?i.length:a,c?(N.hasOwnProp(i,a)?i[a]=[i[a],n]:i[a]=n,!o):((!i[a]||!N.isObject(i[a]))&&(i[a]=[]),t(r,n,i[a],s)&&N.isArray(i[a])&&(i[a]=Ec(i[a])),!o)}if(N.isFormData(e)&&N.isFunction(e.entries)){const r={};return N.forEachEntry(e,(n,i)=>{t($c(n),i,r,0)}),r}return null}function Sc(e,t,r){if(N.isString(e))try{return(t||JSON.parse)(e),N.trim(e)}catch(n){if(n.name!=="SyntaxError")throw n}return(r||JSON.stringify)(e)}const Jt={transitional:Ms,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const n=r.getContentType()||"",i=n.indexOf("application/json")>-1,s=N.isObject(t);if(s&&N.isHTMLForm(t)&&(t=new FormData(t)),N.isFormData(t))return i?JSON.stringify(Ls(t)):t;if(N.isArrayBuffer(t)||N.isBuffer(t)||N.isStream(t)||N.isFile(t)||N.isBlob(t)||N.isReadableStream(t))return t;if(N.isArrayBufferView(t))return t.buffer;if(N.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let o;if(s){if(n.indexOf("application/x-www-form-urlencoded")>-1)return bc(t,this.formSerializer).toString();if((o=N.isFileList(t))||n.indexOf("multipart/form-data")>-1){const c=this.env&&this.env.FormData;return pr(o?{"files[]":t}:t,c&&new c,this.formSerializer)}}return s||i?(r.setContentType("application/json",!1),Sc(t)):t}],transformResponse:[function(t){const r=this.transitional||Jt.transitional,n=r&&r.forcedJSONParsing,i=this.responseType==="json";if(N.isResponse(t)||N.isReadableStream(t))return t;if(t&&N.isString(t)&&(n&&!this.responseType||i)){const a=!(r&&r.silentJSONParsing)&&i;try{return JSON.parse(t,this.parseReviver)}catch(o){if(a)throw o.name==="SyntaxError"?K.from(o,K.ERR_BAD_RESPONSE,this,null,this.response):o}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:fe.classes.FormData,Blob:fe.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};N.forEach(["delete","get","head","post","put","patch"],e=>{Jt.headers[e]={}});const Pc=N.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),kc=e=>{const t={};let r,n,i;return e&&e.split(`
2
- `).forEach(function(a){i=a.indexOf(":"),r=a.substring(0,i).trim().toLowerCase(),n=a.substring(i+1).trim(),!(!r||t[r]&&Pc[r])&&(r==="set-cookie"?t[r]?t[r].push(n):t[r]=[n]:t[r]=t[r]?t[r]+", "+n:n)}),t},xs=Symbol("internals");function Gt(e){return e&&String(e).trim().toLowerCase()}function mr(e){return e===!1||e==null?e:N.isArray(e)?e.map(mr):String(e)}function Rc(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let n;for(;n=r.exec(e);)t[n[1]]=n[2];return t}const Oc=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function qn(e,t,r,n,i){if(N.isFunction(n))return n.call(this,t,r);if(i&&(t=r),!!N.isString(t)){if(N.isString(n))return t.indexOf(n)!==-1;if(N.isRegExp(n))return n.test(t)}}function Tc(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,n)=>r.toUpperCase()+n)}function Nc(e,t){const r=N.toCamelCase(" "+t);["get","set","has"].forEach(n=>{Object.defineProperty(e,n+r,{value:function(i,s,a){return this[n].call(this,t,i,s,a)},configurable:!0})})}let be=class{constructor(t){t&&this.set(t)}set(t,r,n){const i=this;function s(o,c,l){const u=Gt(c);if(!u)throw new Error("header name must be a non-empty string");const v=N.findKey(i,u);(!v||i[v]===void 0||l===!0||l===void 0&&i[v]!==!1)&&(i[v||c]=mr(o))}const a=(o,c)=>N.forEach(o,(l,u)=>s(l,u,c));if(N.isPlainObject(t)||t instanceof this.constructor)a(t,r);else if(N.isString(t)&&(t=t.trim())&&!Oc(t))a(kc(t),r);else if(N.isObject(t)&&N.isIterable(t)){let o={},c,l;for(const u of t){if(!N.isArray(u))throw TypeError("Object iterator must return a key-value pair");o[l=u[0]]=(c=o[l])?N.isArray(c)?[...c,u[1]]:[c,u[1]]:u[1]}a(o,r)}else t!=null&&s(r,t,n);return this}get(t,r){if(t=Gt(t),t){const n=N.findKey(this,t);if(n){const i=this[n];if(!r)return i;if(r===!0)return Rc(i);if(N.isFunction(r))return r.call(this,i,n);if(N.isRegExp(r))return r.exec(i);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Gt(t),t){const n=N.findKey(this,t);return!!(n&&this[n]!==void 0&&(!r||qn(this,this[n],n,r)))}return!1}delete(t,r){const n=this;let i=!1;function s(a){if(a=Gt(a),a){const o=N.findKey(n,a);o&&(!r||qn(n,n[o],o,r))&&(delete n[o],i=!0)}}return N.isArray(t)?t.forEach(s):s(t),i}clear(t){const r=Object.keys(this);let n=r.length,i=!1;for(;n--;){const s=r[n];(!t||qn(this,this[s],s,t,!0))&&(delete this[s],i=!0)}return i}normalize(t){const r=this,n={};return N.forEach(this,(i,s)=>{const a=N.findKey(n,s);if(a){r[a]=mr(i),delete r[s];return}const o=t?Tc(s):String(s).trim();o!==s&&delete r[s],r[o]=mr(i),n[o]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return N.forEach(this,(n,i)=>{n!=null&&n!==!1&&(r[i]=t&&N.isArray(n)?n.join(", "):n)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
3
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const n=new this(t);return r.forEach(i=>n.set(i)),n}static accessor(t){const n=(this[xs]=this[xs]={accessors:{}}).accessors,i=this.prototype;function s(a){const o=Gt(a);n[o]||(Nc(i,a),n[o]=!0)}return N.isArray(t)?t.forEach(s):s(t),this}};be.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),N.reduceDescriptors(be.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(n){this[r]=n}}}),N.freezeMethods(be);function In(e,t){const r=this||Jt,n=t||r,i=be.from(n.headers);let s=n.data;return N.forEach(e,function(o){s=o.call(r,s,i.normalize(),t?t.status:void 0)}),i.normalize(),s}function Fs(e){return!!(e&&e.__CANCEL__)}function jt(e,t,r){K.call(this,e??"canceled",K.ERR_CANCELED,t,r),this.name="CanceledError"}N.inherits(jt,K,{__CANCEL__:!0});function Us(e,t,r){const n=r.config.validateStatus;!r.status||!n||n(r.status)?e(r):t(new K("Request failed with status code "+r.status,[K.ERR_BAD_REQUEST,K.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function Ac(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function jc(e,t){e=e||10;const r=new Array(e),n=new Array(e);let i=0,s=0,a;return t=t!==void 0?t:1e3,function(c){const l=Date.now(),u=n[s];a||(a=l),r[i]=c,n[i]=l;let v=s,m=0;for(;v!==i;)m+=r[v++],v=v%e;if(i=(i+1)%e,i===s&&(s=(s+1)%e),l-a<t)return;const y=u&&l-u;return y?Math.round(m*1e3/y):void 0}}function Cc(e,t){let r=0,n=1e3/t,i,s;const a=(l,u=Date.now())=>{r=u,i=null,s&&(clearTimeout(s),s=null),e(...l)};return[(...l)=>{const u=Date.now(),v=u-r;v>=n?a(l,u):(i=l,s||(s=setTimeout(()=>{s=null,a(i)},n-v)))},()=>i&&a(i)]}const _r=(e,t,r=3)=>{let n=0;const i=jc(50,250);return Cc(s=>{const a=s.loaded,o=s.lengthComputable?s.total:void 0,c=a-n,l=i(c),u=a<=o;n=a;const v={loaded:a,total:o,progress:o?a/o:void 0,bytes:c,rate:l||void 0,estimated:l&&o&&u?(o-a)/l:void 0,event:s,lengthComputable:o!=null,[t?"download":"upload"]:!0};e(v)},r)},Vs=(e,t)=>{const r=e!=null;return[n=>t[0]({lengthComputable:r,total:e,loaded:n}),t[1]]},zs=e=>(...t)=>N.asap(()=>e(...t)),qc=fe.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,fe.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(fe.origin),fe.navigator&&/(msie|trident)/i.test(fe.navigator.userAgent)):()=>!0,Ic=fe.hasStandardBrowserEnv?{write(e,t,r,n,i,s,a){if(typeof document>"u")return;const o=[`${e}=${encodeURIComponent(t)}`];N.isNumber(r)&&o.push(`expires=${new Date(r).toUTCString()}`),N.isString(n)&&o.push(`path=${n}`),N.isString(i)&&o.push(`domain=${i}`),s===!0&&o.push("secure"),N.isString(a)&&o.push(`SameSite=${a}`),document.cookie=o.join("; ")},read(e){if(typeof document>"u")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Dc(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function Mc(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function Hs(e,t,r){let n=!Dc(t);return e&&(n||r==!1)?Mc(e,t):t}const Ks=e=>e instanceof be?{...e}:e;function _t(e,t){t=t||{};const r={};function n(l,u,v,m){return N.isPlainObject(l)&&N.isPlainObject(u)?N.merge.call({caseless:m},l,u):N.isPlainObject(u)?N.merge({},u):N.isArray(u)?u.slice():u}function i(l,u,v,m){if(N.isUndefined(u)){if(!N.isUndefined(l))return n(void 0,l,v,m)}else return n(l,u,v,m)}function s(l,u){if(!N.isUndefined(u))return n(void 0,u)}function a(l,u){if(N.isUndefined(u)){if(!N.isUndefined(l))return n(void 0,l)}else return n(void 0,u)}function o(l,u,v){if(v in t)return n(l,u);if(v in e)return n(void 0,l)}const c={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:o,headers:(l,u,v)=>i(Ks(l),Ks(u),v,!0)};return N.forEach(Object.keys({...e,...t}),function(u){const v=c[u]||i,m=v(e[u],t[u],u);N.isUndefined(m)&&v!==o||(r[u]=m)}),r}const Bs=e=>{const t=_t({},e);let{data:r,withXSRFToken:n,xsrfHeaderName:i,xsrfCookieName:s,headers:a,auth:o}=t;if(t.headers=a=be.from(a),t.url=Is(Hs(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),o&&a.set("Authorization","Basic "+btoa((o.username||"")+":"+(o.password?unescape(encodeURIComponent(o.password)):""))),N.isFormData(r)){if(fe.hasStandardBrowserEnv||fe.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if(N.isFunction(r.getHeaders)){const c=r.getHeaders(),l=["content-type","content-length"];Object.entries(c).forEach(([u,v])=>{l.includes(u.toLowerCase())&&a.set(u,v)})}}if(fe.hasStandardBrowserEnv&&(n&&N.isFunction(n)&&(n=n(t)),n||n!==!1&&qc(t.url))){const c=i&&s&&Ic.read(s);c&&a.set(i,c)}return t},Lc=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(r,n){const i=Bs(e);let s=i.data;const a=be.from(i.headers).normalize();let{responseType:o,onUploadProgress:c,onDownloadProgress:l}=i,u,v,m,y,h;function w(){y&&y(),h&&h(),i.cancelToken&&i.cancelToken.unsubscribe(u),i.signal&&i.signal.removeEventListener("abort",u)}let d=new XMLHttpRequest;d.open(i.method.toUpperCase(),i.url,!0),d.timeout=i.timeout;function _(){if(!d)return;const g=be.from("getAllResponseHeaders"in d&&d.getAllResponseHeaders()),p={data:!o||o==="text"||o==="json"?d.responseText:d.response,status:d.status,statusText:d.statusText,headers:g,config:e,request:d};Us(function(S){r(S),w()},function(S){n(S),w()},p),d=null}"onloadend"in d?d.onloadend=_:d.onreadystatechange=function(){!d||d.readyState!==4||d.status===0&&!(d.responseURL&&d.responseURL.indexOf("file:")===0)||setTimeout(_)},d.onabort=function(){d&&(n(new K("Request aborted",K.ECONNABORTED,e,d)),d=null)},d.onerror=function(E){const p=E&&E.message?E.message:"Network Error",$=new K(p,K.ERR_NETWORK,e,d);$.event=E||null,n($),d=null},d.ontimeout=function(){let E=i.timeout?"timeout of "+i.timeout+"ms exceeded":"timeout exceeded";const p=i.transitional||Ms;i.timeoutErrorMessage&&(E=i.timeoutErrorMessage),n(new K(E,p.clarifyTimeoutError?K.ETIMEDOUT:K.ECONNABORTED,e,d)),d=null},s===void 0&&a.setContentType(null),"setRequestHeader"in d&&N.forEach(a.toJSON(),function(E,p){d.setRequestHeader(p,E)}),N.isUndefined(i.withCredentials)||(d.withCredentials=!!i.withCredentials),o&&o!=="json"&&(d.responseType=i.responseType),l&&([m,h]=_r(l,!0),d.addEventListener("progress",m)),c&&d.upload&&([v,y]=_r(c),d.upload.addEventListener("progress",v),d.upload.addEventListener("loadend",y)),(i.cancelToken||i.signal)&&(u=g=>{d&&(n(!g||g.type?new jt(null,e,d):g),d.abort(),d=null)},i.cancelToken&&i.cancelToken.subscribe(u),i.signal&&(i.signal.aborted?u():i.signal.addEventListener("abort",u)));const f=Ac(i.url);if(f&&fe.protocols.indexOf(f)===-1){n(new K("Unsupported protocol "+f+":",K.ERR_BAD_REQUEST,e));return}d.send(s||null)})},xc=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let n=new AbortController,i;const s=function(l){if(!i){i=!0,o();const u=l instanceof Error?l:this.reason;n.abort(u instanceof K?u:new jt(u instanceof Error?u.message:u))}};let a=t&&setTimeout(()=>{a=null,s(new K(`timeout ${t} of ms exceeded`,K.ETIMEDOUT))},t);const o=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(l=>{l.unsubscribe?l.unsubscribe(s):l.removeEventListener("abort",s)}),e=null)};e.forEach(l=>l.addEventListener("abort",s));const{signal:c}=n;return c.unsubscribe=()=>N.asap(o),c}},Fc=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let n=0,i;for(;n<r;)i=n+t,yield e.slice(n,i),n=i},Uc=async function*(e,t){for await(const r of Vc(e))yield*Fc(r,t)},Vc=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:n}=await t.read();if(r)break;yield n}}finally{await t.cancel()}},Js=(e,t,r,n)=>{const i=Uc(e,t);let s=0,a,o=c=>{a||(a=!0,n&&n(c))};return new ReadableStream({async pull(c){try{const{done:l,value:u}=await i.next();if(l){o(),c.close();return}let v=u.byteLength;if(r){let m=s+=v;r(m)}c.enqueue(new Uint8Array(u))}catch(l){throw o(l),l}},cancel(c){return o(c),i.return()}},{highWaterMark:2})},Gs=64*1024,{isFunction:yr}=N,zc=(({Request:e,Response:t})=>({Request:e,Response:t}))(N.global),{ReadableStream:Ws,TextEncoder:Zs}=N.global,Xs=(e,...t)=>{try{return!!e(...t)}catch{return!1}},Hc=e=>{e=N.merge.call({skipUndefined:!0},zc,e);const{fetch:t,Request:r,Response:n}=e,i=t?yr(t):typeof fetch=="function",s=yr(r),a=yr(n);if(!i)return!1;const o=i&&yr(Ws),c=i&&(typeof Zs=="function"?(h=>w=>h.encode(w))(new Zs):async h=>new Uint8Array(await new r(h).arrayBuffer())),l=s&&o&&Xs(()=>{let h=!1;const w=new r(fe.origin,{body:new Ws,method:"POST",get duplex(){return h=!0,"half"}}).headers.has("Content-Type");return h&&!w}),u=a&&o&&Xs(()=>N.isReadableStream(new n("").body)),v={stream:u&&(h=>h.body)};i&&["text","arrayBuffer","blob","formData","stream"].forEach(h=>{!v[h]&&(v[h]=(w,d)=>{let _=w&&w[h];if(_)return _.call(w);throw new K(`Response type '${h}' is not supported`,K.ERR_NOT_SUPPORT,d)})});const m=async h=>{if(h==null)return 0;if(N.isBlob(h))return h.size;if(N.isSpecCompliantForm(h))return(await new r(fe.origin,{method:"POST",body:h}).arrayBuffer()).byteLength;if(N.isArrayBufferView(h)||N.isArrayBuffer(h))return h.byteLength;if(N.isURLSearchParams(h)&&(h=h+""),N.isString(h))return(await c(h)).byteLength},y=async(h,w)=>{const d=N.toFiniteNumber(h.getContentLength());return d??m(w)};return async h=>{let{url:w,method:d,data:_,signal:f,cancelToken:g,timeout:E,onDownloadProgress:p,onUploadProgress:$,responseType:S,headers:A,withCredentials:I="same-origin",fetchOptions:L}=Bs(h),x=t||fetch;S=S?(S+"").toLowerCase():"text";let H=xc([f,g&&g.toAbortSignal()],E),z=null;const B=H&&H.unsubscribe&&(()=>{H.unsubscribe()});let ae;try{if($&&l&&d!=="get"&&d!=="head"&&(ae=await y(A,_))!==0){let R=new r(w,{method:"POST",body:_,duplex:"half"}),C;if(N.isFormData(_)&&(C=R.headers.get("content-type"))&&A.setContentType(C),R.body){const[T,b]=Vs(ae,_r(zs($)));_=Js(R.body,Gs,T,b)}}N.isString(I)||(I=I?"include":"omit");const oe=s&&"credentials"in r.prototype,je={...L,signal:H,method:d.toUpperCase(),headers:A.normalize().toJSON(),body:_,duplex:"half",credentials:oe?I:void 0};z=s&&new r(w,je);let Z=await(s?x(z,L):x(w,je));const Ue=u&&(S==="stream"||S==="response");if(u&&(p||Ue&&B)){const R={};["status","statusText","headers"].forEach(P=>{R[P]=Z[P]});const C=N.toFiniteNumber(Z.headers.get("content-length")),[T,b]=p&&Vs(C,_r(zs(p),!0))||[];Z=new n(Js(Z.body,Gs,T,()=>{b&&b(),B&&B()}),R)}S=S||"text";let D=await v[N.findKey(v,S)||"text"](Z,h);return!Ue&&B&&B(),await new Promise((R,C)=>{Us(R,C,{data:D,headers:be.from(Z.headers),status:Z.status,statusText:Z.statusText,config:h,request:z})})}catch(oe){throw B&&B(),oe&&oe.name==="TypeError"&&/Load failed|fetch/i.test(oe.message)?Object.assign(new K("Network Error",K.ERR_NETWORK,h,z),{cause:oe.cause||oe}):K.from(oe,oe&&oe.code,h,z)}}},Kc=new Map,Ys=e=>{let t=e&&e.env||{};const{fetch:r,Request:n,Response:i}=t,s=[n,i,r];let a=s.length,o=a,c,l,u=Kc;for(;o--;)c=s[o],l=u.get(c),l===void 0&&u.set(c,l=o?new Map:Hc(t)),u=l;return l};Ys();const Dn={http:hc,xhr:Lc,fetch:{get:Ys}};N.forEach(Dn,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Qs=e=>`- ${e}`,Bc=e=>N.isFunction(e)||e===null||e===!1;function Jc(e,t){e=N.isArray(e)?e:[e];const{length:r}=e;let n,i;const s={};for(let a=0;a<r;a++){n=e[a];let o;if(i=n,!Bc(n)&&(i=Dn[(o=String(n)).toLowerCase()],i===void 0))throw new K(`Unknown adapter '${o}'`);if(i&&(N.isFunction(i)||(i=i.get(t))))break;s[o||"#"+a]=i}if(!i){const a=Object.entries(s).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let o=r?a.length>1?`since :
4
- `+a.map(Qs).join(`
5
- `):" "+Qs(a[0]):"as no adapter specified";throw new K("There is no suitable adapter to dispatch the request "+o,"ERR_NOT_SUPPORT")}return i}const ei={getAdapter:Jc,adapters:Dn};function Mn(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new jt(null,e)}function ti(e){return Mn(e),e.headers=be.from(e.headers),e.data=In.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),ei.getAdapter(e.adapter||Jt.adapter,e)(e).then(function(n){return Mn(e),n.data=In.call(e,e.transformResponse,n),n.headers=be.from(n.headers),n},function(n){return Fs(n)||(Mn(e),n&&n.response&&(n.response.data=In.call(e,e.transformResponse,n.response),n.response.headers=be.from(n.response.headers))),Promise.reject(n)})}const ri="1.13.2",gr={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{gr[e]=function(n){return typeof n===e||"a"+(t<1?"n ":" ")+e}});const ni={};gr.transitional=function(t,r,n){function i(s,a){return"[Axios v"+ri+"] Transitional option '"+s+"'"+a+(n?". "+n:"")}return(s,a,o)=>{if(t===!1)throw new K(i(a," has been removed"+(r?" in "+r:"")),K.ERR_DEPRECATED);return r&&!ni[a]&&(ni[a]=!0,console.warn(i(a," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(s,a,o):!0}},gr.spelling=function(t){return(r,n)=>(console.warn(`${n} is likely a misspelling of ${t}`),!0)};function Gc(e,t,r){if(typeof e!="object")throw new K("options must be an object",K.ERR_BAD_OPTION_VALUE);const n=Object.keys(e);let i=n.length;for(;i-- >0;){const s=n[i],a=t[s];if(a){const o=e[s],c=o===void 0||a(o,s,e);if(c!==!0)throw new K("option "+s+" must be "+c,K.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new K("Unknown option "+s,K.ERR_BAD_OPTION)}}const vr={assertOptions:Gc,validators:gr},ze=vr.validators;let yt=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Ds,response:new Ds}}async request(t,r){try{return await this._request(t,r)}catch(n){if(n instanceof Error){let i={};Error.captureStackTrace?Error.captureStackTrace(i):i=new Error;const s=i.stack?i.stack.replace(/^.+\n/,""):"";try{n.stack?s&&!String(n.stack).endsWith(s.replace(/^.+\n.+\n/,""))&&(n.stack+=`
6
- `+s):n.stack=s}catch{}}throw n}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=_t(this.defaults,r);const{transitional:n,paramsSerializer:i,headers:s}=r;n!==void 0&&vr.assertOptions(n,{silentJSONParsing:ze.transitional(ze.boolean),forcedJSONParsing:ze.transitional(ze.boolean),clarifyTimeoutError:ze.transitional(ze.boolean)},!1),i!=null&&(N.isFunction(i)?r.paramsSerializer={serialize:i}:vr.assertOptions(i,{encode:ze.function,serialize:ze.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),vr.assertOptions(r,{baseUrl:ze.spelling("baseURL"),withXsrfToken:ze.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let a=s&&N.merge(s.common,s[r.method]);s&&N.forEach(["delete","get","head","post","put","patch","common"],h=>{delete s[h]}),r.headers=be.concat(a,s);const o=[];let c=!0;this.interceptors.request.forEach(function(w){typeof w.runWhen=="function"&&w.runWhen(r)===!1||(c=c&&w.synchronous,o.unshift(w.fulfilled,w.rejected))});const l=[];this.interceptors.response.forEach(function(w){l.push(w.fulfilled,w.rejected)});let u,v=0,m;if(!c){const h=[ti.bind(this),void 0];for(h.unshift(...o),h.push(...l),m=h.length,u=Promise.resolve(r);v<m;)u=u.then(h[v++],h[v++]);return u}m=o.length;let y=r;for(;v<m;){const h=o[v++],w=o[v++];try{y=h(y)}catch(d){w.call(this,d);break}}try{u=ti.call(this,y)}catch(h){return Promise.reject(h)}for(v=0,m=l.length;v<m;)u=u.then(l[v++],l[v++]);return u}getUri(t){t=_t(this.defaults,t);const r=Hs(t.baseURL,t.url,t.allowAbsoluteUrls);return Is(r,t.params,t.paramsSerializer)}};N.forEach(["delete","get","head","options"],function(t){yt.prototype[t]=function(r,n){return this.request(_t(n||{},{method:t,url:r,data:(n||{}).data}))}}),N.forEach(["post","put","patch"],function(t){function r(n){return function(s,a,o){return this.request(_t(o||{},{method:t,headers:n?{"Content-Type":"multipart/form-data"}:{},url:s,data:a}))}}yt.prototype[t]=r(),yt.prototype[t+"Form"]=r(!0)});let Wc=class Oo{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(s){r=s});const n=this;this.promise.then(i=>{if(!n._listeners)return;let s=n._listeners.length;for(;s-- >0;)n._listeners[s](i);n._listeners=null}),this.promise.then=i=>{let s;const a=new Promise(o=>{n.subscribe(o),s=o}).then(i);return a.cancel=function(){n.unsubscribe(s)},a},t(function(s,a,o){n.reason||(n.reason=new jt(s,a,o),r(n.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=n=>{t.abort(n)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new Oo(function(i){t=i}),cancel:t}}};function Zc(e){return function(r){return e.apply(null,r)}}function Xc(e){return N.isObject(e)&&e.isAxiosError===!0}const Ln={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ln).forEach(([e,t])=>{Ln[t]=e});function si(e){const t=new yt(e),r=ws(yt.prototype.request,t);return N.extend(r,yt.prototype,t,{allOwnKeys:!0}),N.extend(r,t,null,{allOwnKeys:!0}),r.create=function(i){return si(_t(e,i))},r}const se=si(Jt);se.Axios=yt,se.CanceledError=jt,se.CancelToken=Wc,se.isCancel=Fs,se.VERSION=ri,se.toFormData=pr,se.AxiosError=K,se.Cancel=se.CanceledError,se.all=function(t){return Promise.all(t)},se.spread=Zc,se.isAxiosError=Xc,se.mergeConfig=_t,se.AxiosHeaders=be,se.formToJSON=e=>Ls(N.isHTMLForm(e)?new FormData(e):e),se.getAdapter=ei.getAdapter,se.HttpStatusCode=Ln,se.default=se;const{Axios:yd,AxiosError:gd,CanceledError:vd,isCancel:wd,CancelToken:bd,VERSION:$d,all:Ed,Cancel:Sd,isAxiosError:Pd,spread:kd,toFormData:Rd,AxiosHeaders:Od,HttpStatusCode:Td,formToJSON:Nd,getAdapter:Ad,mergeConfig:jd}=se;function Yc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var wr={exports:{}},xn={},Ze={},gt={},Fn={},Un={},Vn={},ii;function br(){return ii||(ii=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 r extends t{constructor(f){if(super(),!e.IDENTIFIER.test(f))throw new Error("CodeGen: name must be a valid identifier");this.str=f}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}e.Name=r;class n extends t{constructor(f){super(),this._items=typeof f=="string"?[f]:f}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const f=this._items[0];return f===""||f==='""'}get str(){var f;return(f=this._str)!==null&&f!==void 0?f:this._str=this._items.reduce((g,E)=>`${g}${E}`,"")}get names(){var f;return(f=this._names)!==null&&f!==void 0?f:this._names=this._items.reduce((g,E)=>(E instanceof r&&(g[E.str]=(g[E.str]||0)+1),g),{})}}e._Code=n,e.nil=new n("");function i(_,...f){const g=[_[0]];let E=0;for(;E<f.length;)o(g,f[E]),g.push(_[++E]);return new n(g)}e._=i;const s=new n("+");function a(_,...f){const g=[y(_[0])];let E=0;for(;E<f.length;)g.push(s),o(g,f[E]),g.push(s,y(_[++E]));return c(g),new n(g)}e.str=a;function o(_,f){f instanceof n?_.push(...f._items):f instanceof r?_.push(f):_.push(v(f))}e.addCodeArg=o;function c(_){let f=1;for(;f<_.length-1;){if(_[f]===s){const g=l(_[f-1],_[f+1]);if(g!==void 0){_.splice(f-1,3,g);continue}_[f++]="+"}f++}}function l(_,f){if(f==='""')return _;if(_==='""')return f;if(typeof _=="string")return f instanceof r||_[_.length-1]!=='"'?void 0:typeof f!="string"?`${_.slice(0,-1)}${f}"`:f[0]==='"'?_.slice(0,-1)+f.slice(1):void 0;if(typeof f=="string"&&f[0]==='"'&&!(_ instanceof r))return`"${_}${f.slice(1)}`}function u(_,f){return f.emptyStr()?_:_.emptyStr()?f:a`${_}${f}`}e.strConcat=u;function v(_){return typeof _=="number"||typeof _=="boolean"||_===null?_:y(Array.isArray(_)?_.join(","):_)}function m(_){return new n(y(_))}e.stringify=m;function y(_){return JSON.stringify(_).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}e.safeStringify=y;function h(_){return typeof _=="string"&&e.IDENTIFIER.test(_)?new n(`.${_}`):i`[${_}]`}e.getProperty=h;function w(_){if(typeof _=="string"&&e.IDENTIFIER.test(_))return new n(`${_}`);throw new Error(`CodeGen: invalid export name: ${_}, use explicit $id name mapping`)}e.getEsmExportName=w;function d(_){return new n(_.toString())}e.regexpCode=d})(Vn)),Vn}var zn={},ai;function oi(){return ai||(ai=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.ValueScope=e.ValueScopeName=e.Scope=e.varKinds=e.UsedValueState=void 0;const t=br();class r extends Error{constructor(l){super(`CodeGen: "code" for ${l} not defined`),this.value=l.value}}var n;(function(c){c[c.Started=0]="Started",c[c.Completed=1]="Completed"})(n||(e.UsedValueState=n={})),e.varKinds={const:new t.Name("const"),let:new t.Name("let"),var:new t.Name("var")};class i{constructor({prefixes:l,parent:u}={}){this._names={},this._prefixes=l,this._parent=u}toName(l){return l instanceof t.Name?l:this.name(l)}name(l){return new t.Name(this._newName(l))}_newName(l){const u=this._names[l]||this._nameGroup(l);return`${l}${u.index++}`}_nameGroup(l){var u,v;if(!((v=(u=this._parent)===null||u===void 0?void 0:u._prefixes)===null||v===void 0)&&v.has(l)||this._prefixes&&!this._prefixes.has(l))throw new Error(`CodeGen: prefix "${l}" is not allowed in this scope`);return this._names[l]={prefix:l,index:0}}}e.Scope=i;class s extends t.Name{constructor(l,u){super(u),this.prefix=l}setValue(l,{property:u,itemIndex:v}){this.value=l,this.scopePath=(0,t._)`.${new t.Name(u)}[${v}]`}}e.ValueScopeName=s;const a=(0,t._)`\n`;class o extends i{constructor(l){super(l),this._values={},this._scope=l.scope,this.opts={...l,_n:l.lines?a:t.nil}}get(){return this._scope}name(l){return new s(l,this._newName(l))}value(l,u){var v;if(u.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const m=this.toName(l),{prefix:y}=m,h=(v=u.key)!==null&&v!==void 0?v:u.ref;let w=this._values[y];if(w){const f=w.get(h);if(f)return f}else w=this._values[y]=new Map;w.set(h,m);const d=this._scope[y]||(this._scope[y]=[]),_=d.length;return d[_]=u.ref,m.setValue(u,{property:y,itemIndex:_}),m}getValue(l,u){const v=this._values[l];if(v)return v.get(u)}scopeRefs(l,u=this._values){return this._reduceValues(u,v=>{if(v.scopePath===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return(0,t._)`${l}${v.scopePath}`})}scopeCode(l=this._values,u,v){return this._reduceValues(l,m=>{if(m.value===void 0)throw new Error(`CodeGen: name "${m}" has no value`);return m.value.code},u,v)}_reduceValues(l,u,v={},m){let y=t.nil;for(const h in l){const w=l[h];if(!w)continue;const d=v[h]=v[h]||new Map;w.forEach(_=>{if(d.has(_))return;d.set(_,n.Started);let f=u(_);if(f){const g=this.opts.es5?e.varKinds.var:e.varKinds.const;y=(0,t._)`${y}${g} ${_} = ${f};${this.opts._n}`}else if(f=m?.(_))y=(0,t._)`${y}${f}${this.opts._n}`;else throw new r(_);d.set(_,n.Completed)})}return y}}e.ValueScope=o})(zn)),zn}var ci;function W(){return ci||(ci=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=br(),r=oi();var n=br();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(e,"strConcat",{enumerable:!0,get:function(){return n.strConcat}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(e,"getProperty",{enumerable:!0,get:function(){return n.getProperty}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(e,"regexpCode",{enumerable:!0,get:function(){return n.regexpCode}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return n.Name}});var i=oi();Object.defineProperty(e,"Scope",{enumerable:!0,get:function(){return i.Scope}}),Object.defineProperty(e,"ValueScope",{enumerable:!0,get:function(){return i.ValueScope}}),Object.defineProperty(e,"ValueScopeName",{enumerable:!0,get:function(){return i.ValueScopeName}}),Object.defineProperty(e,"varKinds",{enumerable:!0,get:function(){return i.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 s{optimizeNodes(){return this}optimizeNames(b,P){return this}}class a extends s{constructor(b,P,j){super(),this.varKind=b,this.name=P,this.rhs=j}render({es5:b,_n:P}){const j=b?r.varKinds.var:this.varKind,F=this.rhs===void 0?"":` = ${this.rhs}`;return`${j} ${this.name}${F};`+P}optimizeNames(b,P){if(b[this.name.str])return this.rhs&&(this.rhs=B(this.rhs,b,P)),this}get names(){return this.rhs instanceof t._CodeOrName?this.rhs.names:{}}}class o extends s{constructor(b,P,j){super(),this.lhs=b,this.rhs=P,this.sideEffects=j}render({_n:b}){return`${this.lhs} = ${this.rhs};`+b}optimizeNames(b,P){if(!(this.lhs instanceof t.Name&&!b[this.lhs.str]&&!this.sideEffects))return this.rhs=B(this.rhs,b,P),this}get names(){const b=this.lhs instanceof t.Name?{}:{...this.lhs.names};return z(b,this.rhs)}}class c extends o{constructor(b,P,j,F){super(b,j,F),this.op=P}render({_n:b}){return`${this.lhs} ${this.op}= ${this.rhs};`+b}}class l extends s{constructor(b){super(),this.label=b,this.names={}}render({_n:b}){return`${this.label}:`+b}}class u extends s{constructor(b){super(),this.label=b,this.names={}}render({_n:b}){return`break${this.label?` ${this.label}`:""};`+b}}class v extends s{constructor(b){super(),this.error=b}render({_n:b}){return`throw ${this.error};`+b}get names(){return this.error.names}}class m extends s{constructor(b){super(),this.code=b}render({_n:b}){return`${this.code};`+b}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(b,P){return this.code=B(this.code,b,P),this}get names(){return this.code instanceof t._CodeOrName?this.code.names:{}}}class y extends s{constructor(b=[]){super(),this.nodes=b}render(b){return this.nodes.reduce((P,j)=>P+j.render(b),"")}optimizeNodes(){const{nodes:b}=this;let P=b.length;for(;P--;){const j=b[P].optimizeNodes();Array.isArray(j)?b.splice(P,1,...j):j?b[P]=j:b.splice(P,1)}return b.length>0?this:void 0}optimizeNames(b,P){const{nodes:j}=this;let F=j.length;for(;F--;){const V=j[F];V.optimizeNames(b,P)||(ae(b,V.names),j.splice(F,1))}return j.length>0?this:void 0}get names(){return this.nodes.reduce((b,P)=>H(b,P.names),{})}}class h extends y{render(b){return"{"+b._n+super.render(b)+"}"+b._n}}class w extends y{}class d extends h{}d.kind="else";class _ extends h{constructor(b,P){super(P),this.condition=b}render(b){let P=`if(${this.condition})`+super.render(b);return this.else&&(P+="else "+this.else.render(b)),P}optimizeNodes(){super.optimizeNodes();const b=this.condition;if(b===!0)return this.nodes;let P=this.else;if(P){const j=P.optimizeNodes();P=this.else=Array.isArray(j)?new d(j):j}if(P)return b===!1?P instanceof _?P:P.nodes:this.nodes.length?this:new _(oe(b),P instanceof _?[P]:P.nodes);if(!(b===!1||!this.nodes.length))return this}optimizeNames(b,P){var j;if(this.else=(j=this.else)===null||j===void 0?void 0:j.optimizeNames(b,P),!!(super.optimizeNames(b,P)||this.else))return this.condition=B(this.condition,b,P),this}get names(){const b=super.names;return z(b,this.condition),this.else&&H(b,this.else.names),b}}_.kind="if";class f extends h{}f.kind="for";class g extends f{constructor(b){super(),this.iteration=b}render(b){return`for(${this.iteration})`+super.render(b)}optimizeNames(b,P){if(super.optimizeNames(b,P))return this.iteration=B(this.iteration,b,P),this}get names(){return H(super.names,this.iteration.names)}}class E extends f{constructor(b,P,j,F){super(),this.varKind=b,this.name=P,this.from=j,this.to=F}render(b){const P=b.es5?r.varKinds.var:this.varKind,{name:j,from:F,to:V}=this;return`for(${P} ${j}=${F}; ${j}<${V}; ${j}++)`+super.render(b)}get names(){const b=z(super.names,this.from);return z(b,this.to)}}class p extends f{constructor(b,P,j,F){super(),this.loop=b,this.varKind=P,this.name=j,this.iterable=F}render(b){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(b)}optimizeNames(b,P){if(super.optimizeNames(b,P))return this.iterable=B(this.iterable,b,P),this}get names(){return H(super.names,this.iterable.names)}}class $ extends h{constructor(b,P,j){super(),this.name=b,this.args=P,this.async=j}render(b){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(b)}}$.kind="func";class S extends y{render(b){return"return "+super.render(b)}}S.kind="return";class A extends h{render(b){let P="try"+super.render(b);return this.catch&&(P+=this.catch.render(b)),this.finally&&(P+=this.finally.render(b)),P}optimizeNodes(){var b,P;return super.optimizeNodes(),(b=this.catch)===null||b===void 0||b.optimizeNodes(),(P=this.finally)===null||P===void 0||P.optimizeNodes(),this}optimizeNames(b,P){var j,F;return super.optimizeNames(b,P),(j=this.catch)===null||j===void 0||j.optimizeNames(b,P),(F=this.finally)===null||F===void 0||F.optimizeNames(b,P),this}get names(){const b=super.names;return this.catch&&H(b,this.catch.names),this.finally&&H(b,this.finally.names),b}}class I extends h{constructor(b){super(),this.error=b}render(b){return`catch(${this.error})`+super.render(b)}}I.kind="catch";class L extends h{render(b){return"finally"+super.render(b)}}L.kind="finally";class x{constructor(b,P={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...P,_n:P.lines?`
7
- `:""},this._extScope=b,this._scope=new r.Scope({parent:b}),this._nodes=[new w]}toString(){return this._root.render(this.opts)}name(b){return this._scope.name(b)}scopeName(b){return this._extScope.name(b)}scopeValue(b,P){const j=this._extScope.value(b,P);return(this._values[j.prefix]||(this._values[j.prefix]=new Set)).add(j),j}getScopeValue(b,P){return this._extScope.getValue(b,P)}scopeRefs(b){return this._extScope.scopeRefs(b,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(b,P,j,F){const V=this._scope.toName(P);return j!==void 0&&F&&(this._constants[V.str]=j),this._leafNode(new a(b,V,j)),V}const(b,P,j){return this._def(r.varKinds.const,b,P,j)}let(b,P,j){return this._def(r.varKinds.let,b,P,j)}var(b,P,j){return this._def(r.varKinds.var,b,P,j)}assign(b,P,j){return this._leafNode(new o(b,P,j))}add(b,P){return this._leafNode(new c(b,e.operators.ADD,P))}code(b){return typeof b=="function"?b():b!==t.nil&&this._leafNode(new m(b)),this}object(...b){const P=["{"];for(const[j,F]of b)P.length>1&&P.push(","),P.push(j),(j!==F||this.opts.es5)&&(P.push(":"),(0,t.addCodeArg)(P,F));return P.push("}"),new t._Code(P)}if(b,P,j){if(this._blockNode(new _(b)),P&&j)this.code(P).else().code(j).endIf();else if(P)this.code(P).endIf();else if(j)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(b){return this._elseNode(new _(b))}else(){return this._elseNode(new d)}endIf(){return this._endBlockNode(_,d)}_for(b,P){return this._blockNode(b),P&&this.code(P).endFor(),this}for(b,P){return this._for(new g(b),P)}forRange(b,P,j,F,V=this.opts.es5?r.varKinds.var:r.varKinds.let){const ee=this._scope.toName(b);return this._for(new E(V,ee,P,j),()=>F(ee))}forOf(b,P,j,F=r.varKinds.const){const V=this._scope.toName(b);if(this.opts.es5){const ee=P instanceof t.Name?P:this.var("_arr",P);return this.forRange("_i",0,(0,t._)`${ee}.length`,X=>{this.var(V,(0,t._)`${ee}[${X}]`),j(V)})}return this._for(new p("of",F,V,P),()=>j(V))}forIn(b,P,j,F=this.opts.es5?r.varKinds.var:r.varKinds.const){if(this.opts.ownProperties)return this.forOf(b,(0,t._)`Object.keys(${P})`,j);const V=this._scope.toName(b);return this._for(new p("in",F,V,P),()=>j(V))}endFor(){return this._endBlockNode(f)}label(b){return this._leafNode(new l(b))}break(b){return this._leafNode(new u(b))}return(b){const P=new S;if(this._blockNode(P),this.code(b),P.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(S)}try(b,P,j){if(!P&&!j)throw new Error('CodeGen: "try" without "catch" and "finally"');const F=new A;if(this._blockNode(F),this.code(b),P){const V=this.name("e");this._currNode=F.catch=new I(V),P(V)}return j&&(this._currNode=F.finally=new L,this.code(j)),this._endBlockNode(I,L)}throw(b){return this._leafNode(new v(b))}block(b,P){return this._blockStarts.push(this._nodes.length),b&&this.code(b).endBlock(P),this}endBlock(b){const P=this._blockStarts.pop();if(P===void 0)throw new Error("CodeGen: not in self-balancing block");const j=this._nodes.length-P;if(j<0||b!==void 0&&j!==b)throw new Error(`CodeGen: wrong number of nodes: ${j} vs ${b} expected`);return this._nodes.length=P,this}func(b,P=t.nil,j,F){return this._blockNode(new $(b,P,j)),F&&this.code(F).endFunc(),this}endFunc(){return this._endBlockNode($)}optimize(b=1){for(;b-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(b){return this._currNode.nodes.push(b),this}_blockNode(b){this._currNode.nodes.push(b),this._nodes.push(b)}_endBlockNode(b,P){const j=this._currNode;if(j instanceof b||P&&j instanceof P)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${P?`${b.kind}/${P.kind}`:b.kind}"`)}_elseNode(b){const P=this._currNode;if(!(P instanceof _))throw new Error('CodeGen: "else" without "if"');return this._currNode=P.else=b,this}get _root(){return this._nodes[0]}get _currNode(){const b=this._nodes;return b[b.length-1]}set _currNode(b){const P=this._nodes;P[P.length-1]=b}}e.CodeGen=x;function H(T,b){for(const P in b)T[P]=(T[P]||0)+(b[P]||0);return T}function z(T,b){return b instanceof t._CodeOrName?H(T,b.names):T}function B(T,b,P){if(T instanceof t.Name)return j(T);if(!F(T))return T;return new t._Code(T._items.reduce((V,ee)=>(ee instanceof t.Name&&(ee=j(ee)),ee instanceof t._Code?V.push(...ee._items):V.push(ee),V),[]));function j(V){const ee=P[V.str];return ee===void 0||b[V.str]!==1?V:(delete b[V.str],ee)}function F(V){return V instanceof t._Code&&V._items.some(ee=>ee instanceof t.Name&&b[ee.str]===1&&P[ee.str]!==void 0)}}function ae(T,b){for(const P in b)T[P]=(T[P]||0)-(b[P]||0)}function oe(T){return typeof T=="boolean"||typeof T=="number"||T===null?!T:(0,t._)`!${C(T)}`}e.not=oe;const je=R(e.operators.AND);function Z(...T){return T.reduce(je)}e.and=Z;const Ue=R(e.operators.OR);function D(...T){return T.reduce(Ue)}e.or=D;function R(T){return(b,P)=>b===t.nil?P:P===t.nil?b:(0,t._)`${C(b)} ${T} ${C(P)}`}function C(T){return T instanceof t.Name?T:(0,t._)`(${T})`}})(Un)),Un}var J={},li;function Y(){if(li)return J;li=1,Object.defineProperty(J,"__esModule",{value:!0}),J.checkStrictMode=J.getErrorPath=J.Type=J.useFunc=J.setEvaluated=J.evaluatedPropsToName=J.mergeEvaluated=J.eachItem=J.unescapeJsonPointer=J.escapeJsonPointer=J.escapeFragment=J.unescapeFragment=J.schemaRefOrVal=J.schemaHasRulesButRef=J.schemaHasRules=J.checkUnknownRules=J.alwaysValidSchema=J.toHash=void 0;const e=W(),t=br();function r(p){const $={};for(const S of p)$[S]=!0;return $}J.toHash=r;function n(p,$){return typeof $=="boolean"?$:Object.keys($).length===0?!0:(i(p,$),!s($,p.self.RULES.all))}J.alwaysValidSchema=n;function i(p,$=p.schema){const{opts:S,self:A}=p;if(!S.strictSchema||typeof $=="boolean")return;const I=A.RULES.keywords;for(const L in $)I[L]||E(p,`unknown keyword: "${L}"`)}J.checkUnknownRules=i;function s(p,$){if(typeof p=="boolean")return!p;for(const S in p)if($[S])return!0;return!1}J.schemaHasRules=s;function a(p,$){if(typeof p=="boolean")return!p;for(const S in p)if(S!=="$ref"&&$.all[S])return!0;return!1}J.schemaHasRulesButRef=a;function o({topSchemaRef:p,schemaPath:$},S,A,I){if(!I){if(typeof S=="number"||typeof S=="boolean")return S;if(typeof S=="string")return(0,e._)`${S}`}return(0,e._)`${p}${$}${(0,e.getProperty)(A)}`}J.schemaRefOrVal=o;function c(p){return v(decodeURIComponent(p))}J.unescapeFragment=c;function l(p){return encodeURIComponent(u(p))}J.escapeFragment=l;function u(p){return typeof p=="number"?`${p}`:p.replace(/~/g,"~0").replace(/\//g,"~1")}J.escapeJsonPointer=u;function v(p){return p.replace(/~1/g,"/").replace(/~0/g,"~")}J.unescapeJsonPointer=v;function m(p,$){if(Array.isArray(p))for(const S of p)$(S);else $(p)}J.eachItem=m;function y({mergeNames:p,mergeToName:$,mergeValues:S,resultToName:A}){return(I,L,x,H)=>{const z=x===void 0?L:x instanceof e.Name?(L instanceof e.Name?p(I,L,x):$(I,L,x),x):L instanceof e.Name?($(I,x,L),L):S(L,x);return H===e.Name&&!(z instanceof e.Name)?A(I,z):z}}J.mergeEvaluated={props:y({mergeNames:(p,$,S)=>p.if((0,e._)`${S} !== true && ${$} !== undefined`,()=>{p.if((0,e._)`${$} === true`,()=>p.assign(S,!0),()=>p.assign(S,(0,e._)`${S} || {}`).code((0,e._)`Object.assign(${S}, ${$})`))}),mergeToName:(p,$,S)=>p.if((0,e._)`${S} !== true`,()=>{$===!0?p.assign(S,!0):(p.assign(S,(0,e._)`${S} || {}`),w(p,S,$))}),mergeValues:(p,$)=>p===!0?!0:{...p,...$},resultToName:h}),items:y({mergeNames:(p,$,S)=>p.if((0,e._)`${S} !== true && ${$} !== undefined`,()=>p.assign(S,(0,e._)`${$} === true ? true : ${S} > ${$} ? ${S} : ${$}`)),mergeToName:(p,$,S)=>p.if((0,e._)`${S} !== true`,()=>p.assign(S,$===!0?!0:(0,e._)`${S} > ${$} ? ${S} : ${$}`)),mergeValues:(p,$)=>p===!0?!0:Math.max(p,$),resultToName:(p,$)=>p.var("items",$)})};function h(p,$){if($===!0)return p.var("props",!0);const S=p.var("props",(0,e._)`{}`);return $!==void 0&&w(p,S,$),S}J.evaluatedPropsToName=h;function w(p,$,S){Object.keys(S).forEach(A=>p.assign((0,e._)`${$}${(0,e.getProperty)(A)}`,!0))}J.setEvaluated=w;const d={};function _(p,$){return p.scopeValue("func",{ref:$,code:d[$.code]||(d[$.code]=new t._Code($.code))})}J.useFunc=_;var f;(function(p){p[p.Num=0]="Num",p[p.Str=1]="Str"})(f||(J.Type=f={}));function g(p,$,S){if(p instanceof e.Name){const A=$===f.Num;return S?A?(0,e._)`"[" + ${p} + "]"`:(0,e._)`"['" + ${p} + "']"`:A?(0,e._)`"/" + ${p}`:(0,e._)`"/" + ${p}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return S?(0,e.getProperty)(p).toString():"/"+u(p)}J.getErrorPath=g;function E(p,$,S=p.opts.strictSchema){if(S){if($=`strict mode: ${$}`,S===!0)throw new Error($);p.self.logger.warn($)}}return J.checkStrictMode=E,J}var $r={},ui;function lt(){if(ui)return $r;ui=1,Object.defineProperty($r,"__esModule",{value:!0});const e=W(),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 $r.default=t,$r}var di;function Er(){return di||(di=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=W(),r=Y(),n=lt();e.keywordError={message:({keyword:d})=>(0,t.str)`must pass "${d}" keyword validation`},e.keyword$DataError={message:({keyword:d,schemaType:_})=>_?(0,t.str)`"${d}" keyword must be ${_} ($data)`:(0,t.str)`"${d}" keyword is invalid ($data)`};function i(d,_=e.keywordError,f,g){const{it:E}=d,{gen:p,compositeRule:$,allErrors:S}=E,A=v(d,_,f);g??($||S)?c(p,A):l(E,(0,t._)`[${A}]`)}e.reportError=i;function s(d,_=e.keywordError,f){const{it:g}=d,{gen:E,compositeRule:p,allErrors:$}=g,S=v(d,_,f);c(E,S),p||$||l(g,n.default.vErrors)}e.reportExtraError=s;function a(d,_){d.assign(n.default.errors,_),d.if((0,t._)`${n.default.vErrors} !== null`,()=>d.if(_,()=>d.assign((0,t._)`${n.default.vErrors}.length`,_),()=>d.assign(n.default.vErrors,null)))}e.resetErrorsCount=a;function o({gen:d,keyword:_,schemaValue:f,data:g,errsCount:E,it:p}){if(E===void 0)throw new Error("ajv implementation error");const $=d.name("err");d.forRange("i",E,n.default.errors,S=>{d.const($,(0,t._)`${n.default.vErrors}[${S}]`),d.if((0,t._)`${$}.instancePath === undefined`,()=>d.assign((0,t._)`${$}.instancePath`,(0,t.strConcat)(n.default.instancePath,p.errorPath))),d.assign((0,t._)`${$}.schemaPath`,(0,t.str)`${p.errSchemaPath}/${_}`),p.opts.verbose&&(d.assign((0,t._)`${$}.schema`,f),d.assign((0,t._)`${$}.data`,g))})}e.extendErrors=o;function c(d,_){const f=d.const("err",_);d.if((0,t._)`${n.default.vErrors} === null`,()=>d.assign(n.default.vErrors,(0,t._)`[${f}]`),(0,t._)`${n.default.vErrors}.push(${f})`),d.code((0,t._)`${n.default.errors}++`)}function l(d,_){const{gen:f,validateName:g,schemaEnv:E}=d;E.$async?f.throw((0,t._)`new ${d.ValidationError}(${_})`):(f.assign((0,t._)`${g}.errors`,_),f.return(!1))}const u={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 v(d,_,f){const{createErrors:g}=d.it;return g===!1?(0,t._)`{}`:m(d,_,f)}function m(d,_,f={}){const{gen:g,it:E}=d,p=[y(E,f),h(d,f)];return w(d,_,p),g.object(...p)}function y({errorPath:d},{instancePath:_}){const f=_?(0,t.str)`${d}${(0,r.getErrorPath)(_,r.Type.Str)}`:d;return[n.default.instancePath,(0,t.strConcat)(n.default.instancePath,f)]}function h({keyword:d,it:{errSchemaPath:_}},{schemaPath:f,parentSchema:g}){let E=g?_:(0,t.str)`${_}/${d}`;return f&&(E=(0,t.str)`${E}${(0,r.getErrorPath)(f,r.Type.Str)}`),[u.schemaPath,E]}function w(d,{params:_,message:f},g){const{keyword:E,data:p,schemaValue:$,it:S}=d,{opts:A,propertyName:I,topSchemaRef:L,schemaPath:x}=S;g.push([u.keyword,E],[u.params,typeof _=="function"?_(d):_||(0,t._)`{}`]),A.messages&&g.push([u.message,typeof f=="function"?f(d):f]),A.verbose&&g.push([u.schema,$],[u.parentSchema,(0,t._)`${L}${x}`],[n.default.data,p]),I&&g.push([u.propertyName,I])}})(Fn)),Fn}var fi;function Qc(){if(fi)return gt;fi=1,Object.defineProperty(gt,"__esModule",{value:!0}),gt.boolOrEmptySchema=gt.topBoolOrEmptySchema=void 0;const e=Er(),t=W(),r=lt(),n={message:"boolean schema is false"};function i(o){const{gen:c,schema:l,validateName:u}=o;l===!1?a(o,!1):typeof l=="object"&&l.$async===!0?c.return(r.default.data):(c.assign((0,t._)`${u}.errors`,null),c.return(!0))}gt.topBoolOrEmptySchema=i;function s(o,c){const{gen:l,schema:u}=o;u===!1?(l.var(c,!1),a(o)):l.var(c,!0)}gt.boolOrEmptySchema=s;function a(o,c){const{gen:l,data:u}=o,v={gen:l,keyword:"false schema",data:u,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:o};(0,e.reportError)(v,n,void 0,c)}return gt}var ce={},vt={},hi;function pi(){if(hi)return vt;hi=1,Object.defineProperty(vt,"__esModule",{value:!0}),vt.getRules=vt.isJSONType=void 0;const e=["string","number","integer","boolean","null","object","array"],t=new Set(e);function r(i){return typeof i=="string"&&t.has(i)}vt.isJSONType=r;function n(){const i={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...i,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},i.number,i.string,i.array,i.object],post:{rules:[]},all:{},keywords:{}}}return vt.getRules=n,vt}var Xe={},mi;function _i(){if(mi)return Xe;mi=1,Object.defineProperty(Xe,"__esModule",{value:!0}),Xe.shouldUseRule=Xe.shouldUseGroup=Xe.schemaHasRulesForType=void 0;function e({schema:n,self:i},s){const a=i.RULES.types[s];return a&&a!==!0&&t(n,a)}Xe.schemaHasRulesForType=e;function t(n,i){return i.rules.some(s=>r(n,s))}Xe.shouldUseGroup=t;function r(n,i){var s;return n[i.keyword]!==void 0||((s=i.definition.implements)===null||s===void 0?void 0:s.some(a=>n[a]!==void 0))}return Xe.shouldUseRule=r,Xe}var yi;function Sr(){if(yi)return ce;yi=1,Object.defineProperty(ce,"__esModule",{value:!0}),ce.reportTypeError=ce.checkDataTypes=ce.checkDataType=ce.coerceAndCheckDataType=ce.getJSONTypes=ce.getSchemaTypes=ce.DataType=void 0;const e=pi(),t=_i(),r=Er(),n=W(),i=Y();var s;(function(f){f[f.Correct=0]="Correct",f[f.Wrong=1]="Wrong"})(s||(ce.DataType=s={}));function a(f){const g=o(f.type);if(g.includes("null")){if(f.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!g.length&&f.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');f.nullable===!0&&g.push("null")}return g}ce.getSchemaTypes=a;function o(f){const g=Array.isArray(f)?f:f?[f]:[];if(g.every(e.isJSONType))return g;throw new Error("type must be JSONType or JSONType[]: "+g.join(","))}ce.getJSONTypes=o;function c(f,g){const{gen:E,data:p,opts:$}=f,S=u(g,$.coerceTypes),A=g.length>0&&!(S.length===0&&g.length===1&&(0,t.schemaHasRulesForType)(f,g[0]));if(A){const I=h(g,p,$.strictNumbers,s.Wrong);E.if(I,()=>{S.length?v(f,g,S):d(f)})}return A}ce.coerceAndCheckDataType=c;const l=new Set(["string","number","integer","boolean","null"]);function u(f,g){return g?f.filter(E=>l.has(E)||g==="array"&&E==="array"):[]}function v(f,g,E){const{gen:p,data:$,opts:S}=f,A=p.let("dataType",(0,n._)`typeof ${$}`),I=p.let("coerced",(0,n._)`undefined`);S.coerceTypes==="array"&&p.if((0,n._)`${A} == 'object' && Array.isArray(${$}) && ${$}.length == 1`,()=>p.assign($,(0,n._)`${$}[0]`).assign(A,(0,n._)`typeof ${$}`).if(h(g,$,S.strictNumbers),()=>p.assign(I,$))),p.if((0,n._)`${I} !== undefined`);for(const x of E)(l.has(x)||x==="array"&&S.coerceTypes==="array")&&L(x);p.else(),d(f),p.endIf(),p.if((0,n._)`${I} !== undefined`,()=>{p.assign($,I),m(f,I)});function L(x){switch(x){case"string":p.elseIf((0,n._)`${A} == "number" || ${A} == "boolean"`).assign(I,(0,n._)`"" + ${$}`).elseIf((0,n._)`${$} === null`).assign(I,(0,n._)`""`);return;case"number":p.elseIf((0,n._)`${A} == "boolean" || ${$} === null
8
- || (${A} == "string" && ${$} && ${$} == +${$})`).assign(I,(0,n._)`+${$}`);return;case"integer":p.elseIf((0,n._)`${A} === "boolean" || ${$} === null
9
- || (${A} === "string" && ${$} && ${$} == +${$} && !(${$} % 1))`).assign(I,(0,n._)`+${$}`);return;case"boolean":p.elseIf((0,n._)`${$} === "false" || ${$} === 0 || ${$} === null`).assign(I,!1).elseIf((0,n._)`${$} === "true" || ${$} === 1`).assign(I,!0);return;case"null":p.elseIf((0,n._)`${$} === "" || ${$} === 0 || ${$} === false`),p.assign(I,null);return;case"array":p.elseIf((0,n._)`${A} === "string" || ${A} === "number"
10
- || ${A} === "boolean" || ${$} === null`).assign(I,(0,n._)`[${$}]`)}}}function m({gen:f,parentData:g,parentDataProperty:E},p){f.if((0,n._)`${g} !== undefined`,()=>f.assign((0,n._)`${g}[${E}]`,p))}function y(f,g,E,p=s.Correct){const $=p===s.Correct?n.operators.EQ:n.operators.NEQ;let S;switch(f){case"null":return(0,n._)`${g} ${$} null`;case"array":S=(0,n._)`Array.isArray(${g})`;break;case"object":S=(0,n._)`${g} && typeof ${g} == "object" && !Array.isArray(${g})`;break;case"integer":S=A((0,n._)`!(${g} % 1) && !isNaN(${g})`);break;case"number":S=A();break;default:return(0,n._)`typeof ${g} ${$} ${f}`}return p===s.Correct?S:(0,n.not)(S);function A(I=n.nil){return(0,n.and)((0,n._)`typeof ${g} == "number"`,I,E?(0,n._)`isFinite(${g})`:n.nil)}}ce.checkDataType=y;function h(f,g,E,p){if(f.length===1)return y(f[0],g,E,p);let $;const S=(0,i.toHash)(f);if(S.array&&S.object){const A=(0,n._)`typeof ${g} != "object"`;$=S.null?A:(0,n._)`!${g} || ${A}`,delete S.null,delete S.array,delete S.object}else $=n.nil;S.number&&delete S.integer;for(const A in S)$=(0,n.and)($,y(A,g,E,p));return $}ce.checkDataTypes=h;const w={message:({schema:f})=>`must be ${f}`,params:({schema:f,schemaValue:g})=>typeof f=="string"?(0,n._)`{type: ${f}}`:(0,n._)`{type: ${g}}`};function d(f){const g=_(f);(0,r.reportError)(g,w)}ce.reportTypeError=d;function _(f){const{gen:g,data:E,schema:p}=f,$=(0,i.schemaRefOrVal)(f,p,"type");return{gen:g,keyword:"type",data:E,schema:p.type,schemaCode:$,schemaValue:$,parentSchema:p,params:{},it:f}}return ce}var Wt={},gi;function el(){if(gi)return Wt;gi=1,Object.defineProperty(Wt,"__esModule",{value:!0}),Wt.assignDefaults=void 0;const e=W(),t=Y();function r(i,s){const{properties:a,items:o}=i.schema;if(s==="object"&&a)for(const c in a)n(i,c,a[c].default);else s==="array"&&Array.isArray(o)&&o.forEach((c,l)=>n(i,l,c.default))}Wt.assignDefaults=r;function n(i,s,a){const{gen:o,compositeRule:c,data:l,opts:u}=i;if(a===void 0)return;const v=(0,e._)`${l}${(0,e.getProperty)(s)}`;if(c){(0,t.checkStrictMode)(i,`default is ignored for: ${v}`);return}let m=(0,e._)`${v} === undefined`;u.useDefaults==="empty"&&(m=(0,e._)`${m} || ${v} === null || ${v} === ""`),o.if(m,(0,e._)`${v} = ${(0,e.stringify)(a)}`)}return Wt}var Ie={},te={},vi;function De(){if(vi)return te;vi=1,Object.defineProperty(te,"__esModule",{value:!0}),te.validateUnion=te.validateArray=te.usePattern=te.callValidateCode=te.schemaProperties=te.allSchemaProperties=te.noPropertyInData=te.propertyInData=te.isOwnProperty=te.hasPropFunc=te.reportMissingProp=te.checkMissingProp=te.checkReportMissingProp=void 0;const e=W(),t=Y(),r=lt(),n=Y();function i(f,g){const{gen:E,data:p,it:$}=f;E.if(u(E,p,g,$.opts.ownProperties),()=>{f.setParams({missingProperty:(0,e._)`${g}`},!0),f.error()})}te.checkReportMissingProp=i;function s({gen:f,data:g,it:{opts:E}},p,$){return(0,e.or)(...p.map(S=>(0,e.and)(u(f,g,S,E.ownProperties),(0,e._)`${$} = ${S}`)))}te.checkMissingProp=s;function a(f,g){f.setParams({missingProperty:g},!0),f.error()}te.reportMissingProp=a;function o(f){return f.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,e._)`Object.prototype.hasOwnProperty`})}te.hasPropFunc=o;function c(f,g,E){return(0,e._)`${o(f)}.call(${g}, ${E})`}te.isOwnProperty=c;function l(f,g,E,p){const $=(0,e._)`${g}${(0,e.getProperty)(E)} !== undefined`;return p?(0,e._)`${$} && ${c(f,g,E)}`:$}te.propertyInData=l;function u(f,g,E,p){const $=(0,e._)`${g}${(0,e.getProperty)(E)} === undefined`;return p?(0,e.or)($,(0,e.not)(c(f,g,E))):$}te.noPropertyInData=u;function v(f){return f?Object.keys(f).filter(g=>g!=="__proto__"):[]}te.allSchemaProperties=v;function m(f,g){return v(g).filter(E=>!(0,t.alwaysValidSchema)(f,g[E]))}te.schemaProperties=m;function y({schemaCode:f,data:g,it:{gen:E,topSchemaRef:p,schemaPath:$,errorPath:S},it:A},I,L,x){const H=x?(0,e._)`${f}, ${g}, ${p}${$}`:g,z=[[r.default.instancePath,(0,e.strConcat)(r.default.instancePath,S)],[r.default.parentData,A.parentData],[r.default.parentDataProperty,A.parentDataProperty],[r.default.rootData,r.default.rootData]];A.opts.dynamicRef&&z.push([r.default.dynamicAnchors,r.default.dynamicAnchors]);const B=(0,e._)`${H}, ${E.object(...z)}`;return L!==e.nil?(0,e._)`${I}.call(${L}, ${B})`:(0,e._)`${I}(${B})`}te.callValidateCode=y;const h=(0,e._)`new RegExp`;function w({gen:f,it:{opts:g}},E){const p=g.unicodeRegExp?"u":"",{regExp:$}=g.code,S=$(E,p);return f.scopeValue("pattern",{key:S.toString(),ref:S,code:(0,e._)`${$.code==="new RegExp"?h:(0,n.useFunc)(f,$)}(${E}, ${p})`})}te.usePattern=w;function d(f){const{gen:g,data:E,keyword:p,it:$}=f,S=g.name("valid");if($.allErrors){const I=g.let("valid",!0);return A(()=>g.assign(I,!1)),I}return g.var(S,!0),A(()=>g.break()),S;function A(I){const L=g.const("len",(0,e._)`${E}.length`);g.forRange("i",0,L,x=>{f.subschema({keyword:p,dataProp:x,dataPropType:t.Type.Num},S),g.if((0,e.not)(S),I)})}}te.validateArray=d;function _(f){const{gen:g,schema:E,keyword:p,it:$}=f;if(!Array.isArray(E))throw new Error("ajv implementation error");if(E.some(L=>(0,t.alwaysValidSchema)($,L))&&!$.opts.unevaluated)return;const A=g.let("valid",!1),I=g.name("_valid");g.block(()=>E.forEach((L,x)=>{const H=f.subschema({keyword:p,schemaProp:x,compositeRule:!0},I);g.assign(A,(0,e._)`${A} || ${I}`),f.mergeValidEvaluated(H,I)||g.if((0,e.not)(A))})),f.result(A,()=>f.reset(),()=>f.error(!0))}return te.validateUnion=_,te}var wi;function tl(){if(wi)return Ie;wi=1,Object.defineProperty(Ie,"__esModule",{value:!0}),Ie.validateKeywordUsage=Ie.validSchemaType=Ie.funcKeywordCode=Ie.macroKeywordCode=void 0;const e=W(),t=lt(),r=De(),n=Er();function i(m,y){const{gen:h,keyword:w,schema:d,parentSchema:_,it:f}=m,g=y.macro.call(f.self,d,_,f),E=l(h,w,g);f.opts.validateSchema!==!1&&f.self.validateSchema(g,!0);const p=h.name("valid");m.subschema({schema:g,schemaPath:e.nil,errSchemaPath:`${f.errSchemaPath}/${w}`,topSchemaRef:E,compositeRule:!0},p),m.pass(p,()=>m.error(!0))}Ie.macroKeywordCode=i;function s(m,y){var h;const{gen:w,keyword:d,schema:_,parentSchema:f,$data:g,it:E}=m;c(E,y);const p=!g&&y.compile?y.compile.call(E.self,_,f,E):y.validate,$=l(w,d,p),S=w.let("valid");m.block$data(S,A),m.ok((h=y.valid)!==null&&h!==void 0?h:S);function A(){if(y.errors===!1)x(),y.modifying&&a(m),H(()=>m.error());else{const z=y.async?I():L();y.modifying&&a(m),H(()=>o(m,z))}}function I(){const z=w.let("ruleErrs",null);return w.try(()=>x((0,e._)`await `),B=>w.assign(S,!1).if((0,e._)`${B} instanceof ${E.ValidationError}`,()=>w.assign(z,(0,e._)`${B}.errors`),()=>w.throw(B))),z}function L(){const z=(0,e._)`${$}.errors`;return w.assign(z,null),x(e.nil),z}function x(z=y.async?(0,e._)`await `:e.nil){const B=E.opts.passContext?t.default.this:t.default.self,ae=!("compile"in y&&!g||y.schema===!1);w.assign(S,(0,e._)`${z}${(0,r.callValidateCode)(m,$,B,ae)}`,y.modifying)}function H(z){var B;w.if((0,e.not)((B=y.valid)!==null&&B!==void 0?B:S),z)}}Ie.funcKeywordCode=s;function a(m){const{gen:y,data:h,it:w}=m;y.if(w.parentData,()=>y.assign(h,(0,e._)`${w.parentData}[${w.parentDataProperty}]`))}function o(m,y){const{gen:h}=m;h.if((0,e._)`Array.isArray(${y})`,()=>{h.assign(t.default.vErrors,(0,e._)`${t.default.vErrors} === null ? ${y} : ${t.default.vErrors}.concat(${y})`).assign(t.default.errors,(0,e._)`${t.default.vErrors}.length`),(0,n.extendErrors)(m)},()=>m.error())}function c({schemaEnv:m},y){if(y.async&&!m.$async)throw new Error("async keyword in sync schema")}function l(m,y,h){if(h===void 0)throw new Error(`keyword "${y}" failed to compile`);return m.scopeValue("keyword",typeof h=="function"?{ref:h}:{ref:h,code:(0,e.stringify)(h)})}function u(m,y,h=!1){return!y.length||y.some(w=>w==="array"?Array.isArray(m):w==="object"?m&&typeof m=="object"&&!Array.isArray(m):typeof m==w||h&&typeof m>"u")}Ie.validSchemaType=u;function v({schema:m,opts:y,self:h,errSchemaPath:w},d,_){if(Array.isArray(d.keyword)?!d.keyword.includes(_):d.keyword!==_)throw new Error("ajv implementation error");const f=d.dependencies;if(f?.some(g=>!Object.prototype.hasOwnProperty.call(m,g)))throw new Error(`parent schema must have dependencies of ${_}: ${f.join(",")}`);if(d.validateSchema&&!d.validateSchema(m[_])){const E=`keyword "${_}" value is invalid at path "${w}": `+h.errorsText(d.validateSchema.errors);if(y.validateSchema==="log")h.logger.error(E);else throw new Error(E)}}return Ie.validateKeywordUsage=v,Ie}var Ye={},bi;function rl(){if(bi)return Ye;bi=1,Object.defineProperty(Ye,"__esModule",{value:!0}),Ye.extendSubschemaMode=Ye.extendSubschemaData=Ye.getSubschema=void 0;const e=W(),t=Y();function r(s,{keyword:a,schemaProp:o,schema:c,schemaPath:l,errSchemaPath:u,topSchemaRef:v}){if(a!==void 0&&c!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(a!==void 0){const m=s.schema[a];return o===void 0?{schema:m,schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}`,errSchemaPath:`${s.errSchemaPath}/${a}`}:{schema:m[o],schemaPath:(0,e._)`${s.schemaPath}${(0,e.getProperty)(a)}${(0,e.getProperty)(o)}`,errSchemaPath:`${s.errSchemaPath}/${a}/${(0,t.escapeFragment)(o)}`}}if(c!==void 0){if(l===void 0||u===void 0||v===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:c,schemaPath:l,topSchemaRef:v,errSchemaPath:u}}throw new Error('either "keyword" or "schema" must be passed')}Ye.getSubschema=r;function n(s,a,{dataProp:o,dataPropType:c,data:l,dataTypes:u,propertyName:v}){if(l!==void 0&&o!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:m}=a;if(o!==void 0){const{errorPath:h,dataPathArr:w,opts:d}=a,_=m.let("data",(0,e._)`${a.data}${(0,e.getProperty)(o)}`,!0);y(_),s.errorPath=(0,e.str)`${h}${(0,t.getErrorPath)(o,c,d.jsPropertySyntax)}`,s.parentDataProperty=(0,e._)`${o}`,s.dataPathArr=[...w,s.parentDataProperty]}if(l!==void 0){const h=l instanceof e.Name?l:m.let("data",l,!0);y(h),v!==void 0&&(s.propertyName=v)}u&&(s.dataTypes=u);function y(h){s.data=h,s.dataLevel=a.dataLevel+1,s.dataTypes=[],a.definedProperties=new Set,s.parentData=a.data,s.dataNames=[...a.dataNames,h]}}Ye.extendSubschemaData=n;function i(s,{jtdDiscriminator:a,jtdMetadata:o,compositeRule:c,createErrors:l,allErrors:u}){c!==void 0&&(s.compositeRule=c),l!==void 0&&(s.createErrors=l),u!==void 0&&(s.allErrors=u),s.jtdDiscriminator=a,s.jtdMetadata=o}return Ye.extendSubschemaMode=i,Ye}var _e={},Hn,$i;function Ei(){return $i||($i=1,Hn=function e(t,r){if(t===r)return!0;if(t&&r&&typeof t=="object"&&typeof r=="object"){if(t.constructor!==r.constructor)return!1;var n,i,s;if(Array.isArray(t)){if(n=t.length,n!=r.length)return!1;for(i=n;i--!==0;)if(!e(t[i],r[i]))return!1;return!0}if(t.constructor===RegExp)return t.source===r.source&&t.flags===r.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===r.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===r.toString();if(s=Object.keys(t),n=s.length,n!==Object.keys(r).length)return!1;for(i=n;i--!==0;)if(!Object.prototype.hasOwnProperty.call(r,s[i]))return!1;for(i=n;i--!==0;){var a=s[i];if(!e(t[a],r[a]))return!1}return!0}return t!==t&&r!==r}),Hn}var Kn={exports:{}},Si;function nl(){if(Si)return Kn.exports;Si=1;var e=Kn.exports=function(n,i,s){typeof i=="function"&&(s=i,i={}),s=i.cb||s;var a=typeof s=="function"?s:s.pre||function(){},o=s.post||function(){};t(i,a,o,n,"",n)};e.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},e.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},e.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},e.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function t(n,i,s,a,o,c,l,u,v,m){if(a&&typeof a=="object"&&!Array.isArray(a)){i(a,o,c,l,u,v,m);for(var y in a){var h=a[y];if(Array.isArray(h)){if(y in e.arrayKeywords)for(var w=0;w<h.length;w++)t(n,i,s,h[w],o+"/"+y+"/"+w,c,o,y,a,w)}else if(y in e.propsKeywords){if(h&&typeof h=="object")for(var d in h)t(n,i,s,h[d],o+"/"+y+"/"+r(d),c,o,y,a,d)}else(y in e.keywords||n.allKeys&&!(y in e.skipKeywords))&&t(n,i,s,h,o+"/"+y,c,o,y,a)}s(a,o,c,l,u,v,m)}}function r(n){return n.replace(/~/g,"~0").replace(/\//g,"~1")}return Kn.exports}var Pi;function Pr(){if(Pi)return _e;Pi=1,Object.defineProperty(_e,"__esModule",{value:!0}),_e.getSchemaRefs=_e.resolveUrl=_e.normalizeId=_e._getFullPath=_e.getFullPath=_e.inlineRef=void 0;const e=Y(),t=Ei(),r=nl(),n=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function i(w,d=!0){return typeof w=="boolean"?!0:d===!0?!a(w):d?o(w)<=d:!1}_e.inlineRef=i;const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function a(w){for(const d in w){if(s.has(d))return!0;const _=w[d];if(Array.isArray(_)&&_.some(a)||typeof _=="object"&&a(_))return!0}return!1}function o(w){let d=0;for(const _ in w){if(_==="$ref")return 1/0;if(d++,!n.has(_)&&(typeof w[_]=="object"&&(0,e.eachItem)(w[_],f=>d+=o(f)),d===1/0))return 1/0}return d}function c(w,d="",_){_!==!1&&(d=v(d));const f=w.parse(d);return l(w,f)}_e.getFullPath=c;function l(w,d){return w.serialize(d).split("#")[0]+"#"}_e._getFullPath=l;const u=/#\/?$/;function v(w){return w?w.replace(u,""):""}_e.normalizeId=v;function m(w,d,_){return _=v(_),w.resolve(d,_)}_e.resolveUrl=m;const y=/^[a-z_][-a-z0-9._]*$/i;function h(w,d){if(typeof w=="boolean")return{};const{schemaId:_,uriResolver:f}=this.opts,g=v(w[_]||d),E={"":g},p=c(f,g,!1),$={},S=new Set;return r(w,{allKeys:!0},(L,x,H,z)=>{if(z===void 0)return;const B=p+x;let ae=E[z];typeof L[_]=="string"&&(ae=oe.call(this,L[_])),je.call(this,L.$anchor),je.call(this,L.$dynamicAnchor),E[x]=ae;function oe(Z){const Ue=this.opts.uriResolver.resolve;if(Z=v(ae?Ue(ae,Z):Z),S.has(Z))throw I(Z);S.add(Z);let D=this.refs[Z];return typeof D=="string"&&(D=this.refs[D]),typeof D=="object"?A(L,D.schema,Z):Z!==v(B)&&(Z[0]==="#"?(A(L,$[Z],Z),$[Z]=L):this.refs[Z]=B),Z}function je(Z){if(typeof Z=="string"){if(!y.test(Z))throw new Error(`invalid anchor "${Z}"`);oe.call(this,`#${Z}`)}}}),$;function A(L,x,H){if(x!==void 0&&!t(L,x))throw I(H)}function I(L){return new Error(`reference "${L}" resolves to more than one schema`)}}return _e.getSchemaRefs=h,_e}var ki;function kr(){if(ki)return Ze;ki=1,Object.defineProperty(Ze,"__esModule",{value:!0}),Ze.getData=Ze.KeywordCxt=Ze.validateFunctionCode=void 0;const e=Qc(),t=Sr(),r=_i(),n=Sr(),i=el(),s=tl(),a=rl(),o=W(),c=lt(),l=Pr(),u=Y(),v=Er();function m(k){if(p(k)&&(S(k),E(k))){d(k);return}y(k,()=>(0,e.topBoolOrEmptySchema)(k))}Ze.validateFunctionCode=m;function y({gen:k,validateName:O,schema:q,schemaEnv:M,opts:U},G){U.code.es5?k.func(O,(0,o._)`${c.default.data}, ${c.default.valCxt}`,M.$async,()=>{k.code((0,o._)`"use strict"; ${f(q,U)}`),w(k,U),k.code(G)}):k.func(O,(0,o._)`${c.default.data}, ${h(U)}`,M.$async,()=>k.code(f(q,U)).code(G))}function h(k){return(0,o._)`{${c.default.instancePath}="", ${c.default.parentData}, ${c.default.parentDataProperty}, ${c.default.rootData}=${c.default.data}${k.dynamicRef?(0,o._)`, ${c.default.dynamicAnchors}={}`:o.nil}}={}`}function w(k,O){k.if(c.default.valCxt,()=>{k.var(c.default.instancePath,(0,o._)`${c.default.valCxt}.${c.default.instancePath}`),k.var(c.default.parentData,(0,o._)`${c.default.valCxt}.${c.default.parentData}`),k.var(c.default.parentDataProperty,(0,o._)`${c.default.valCxt}.${c.default.parentDataProperty}`),k.var(c.default.rootData,(0,o._)`${c.default.valCxt}.${c.default.rootData}`),O.dynamicRef&&k.var(c.default.dynamicAnchors,(0,o._)`${c.default.valCxt}.${c.default.dynamicAnchors}`)},()=>{k.var(c.default.instancePath,(0,o._)`""`),k.var(c.default.parentData,(0,o._)`undefined`),k.var(c.default.parentDataProperty,(0,o._)`undefined`),k.var(c.default.rootData,c.default.data),O.dynamicRef&&k.var(c.default.dynamicAnchors,(0,o._)`{}`)})}function d(k){const{schema:O,opts:q,gen:M}=k;y(k,()=>{q.$comment&&O.$comment&&z(k),L(k),M.let(c.default.vErrors,null),M.let(c.default.errors,0),q.unevaluated&&_(k),A(k),B(k)})}function _(k){const{gen:O,validateName:q}=k;k.evaluated=O.const("evaluated",(0,o._)`${q}.evaluated`),O.if((0,o._)`${k.evaluated}.dynamicProps`,()=>O.assign((0,o._)`${k.evaluated}.props`,(0,o._)`undefined`)),O.if((0,o._)`${k.evaluated}.dynamicItems`,()=>O.assign((0,o._)`${k.evaluated}.items`,(0,o._)`undefined`))}function f(k,O){const q=typeof k=="object"&&k[O.schemaId];return q&&(O.code.source||O.code.process)?(0,o._)`/*# sourceURL=${q} */`:o.nil}function g(k,O){if(p(k)&&(S(k),E(k))){$(k,O);return}(0,e.boolOrEmptySchema)(k,O)}function E({schema:k,self:O}){if(typeof k=="boolean")return!k;for(const q in k)if(O.RULES.all[q])return!0;return!1}function p(k){return typeof k.schema!="boolean"}function $(k,O){const{schema:q,gen:M,opts:U}=k;U.$comment&&q.$comment&&z(k),x(k),H(k);const G=M.const("_errs",c.default.errors);A(k,G),M.var(O,(0,o._)`${G} === ${c.default.errors}`)}function S(k){(0,u.checkUnknownRules)(k),I(k)}function A(k,O){if(k.opts.jtd)return oe(k,[],!1,O);const q=(0,t.getSchemaTypes)(k.schema),M=(0,t.coerceAndCheckDataType)(k,q);oe(k,q,!M,O)}function I(k){const{schema:O,errSchemaPath:q,opts:M,self:U}=k;O.$ref&&M.ignoreKeywordsWithRef&&(0,u.schemaHasRulesButRef)(O,U.RULES)&&U.logger.warn(`$ref: keywords ignored in schema at path "${q}"`)}function L(k){const{schema:O,opts:q}=k;O.default!==void 0&&q.useDefaults&&q.strictSchema&&(0,u.checkStrictMode)(k,"default is ignored in the schema root")}function x(k){const O=k.schema[k.opts.schemaId];O&&(k.baseId=(0,l.resolveUrl)(k.opts.uriResolver,k.baseId,O))}function H(k){if(k.schema.$async&&!k.schemaEnv.$async)throw new Error("async schema in sync schema")}function z({gen:k,schemaEnv:O,schema:q,errSchemaPath:M,opts:U}){const G=q.$comment;if(U.$comment===!0)k.code((0,o._)`${c.default.self}.logger.log(${G})`);else if(typeof U.$comment=="function"){const ue=(0,o.str)`${M}/$comment`,Ve=k.scopeValue("root",{ref:O.root});k.code((0,o._)`${c.default.self}.opts.$comment(${G}, ${ue}, ${Ve}.schema)`)}}function B(k){const{gen:O,schemaEnv:q,validateName:M,ValidationError:U,opts:G}=k;q.$async?O.if((0,o._)`${c.default.errors} === 0`,()=>O.return(c.default.data),()=>O.throw((0,o._)`new ${U}(${c.default.vErrors})`)):(O.assign((0,o._)`${M}.errors`,c.default.vErrors),G.unevaluated&&ae(k),O.return((0,o._)`${c.default.errors} === 0`))}function ae({gen:k,evaluated:O,props:q,items:M}){q instanceof o.Name&&k.assign((0,o._)`${O}.props`,q),M instanceof o.Name&&k.assign((0,o._)`${O}.items`,M)}function oe(k,O,q,M){const{gen:U,schema:G,data:ue,allErrors:Ve,opts:Ee,self:Se}=k,{RULES:de}=Se;if(G.$ref&&(Ee.ignoreKeywordsWithRef||!(0,u.schemaHasRulesButRef)(G,de))){U.block(()=>F(k,"$ref",de.all.$ref.definition));return}Ee.jtd||Z(k,O),U.block(()=>{for(const Ce of de.rules)Vt(Ce);Vt(de.post)});function Vt(Ce){(0,r.shouldUseGroup)(G,Ce)&&(Ce.type?(U.if((0,n.checkDataType)(Ce.type,ue,Ee.strictNumbers)),je(k,Ce),O.length===1&&O[0]===Ce.type&&q&&(U.else(),(0,n.reportTypeError)(k)),U.endIf()):je(k,Ce),Ve||U.if((0,o._)`${c.default.errors} === ${M||0}`))}}function je(k,O){const{gen:q,schema:M,opts:{useDefaults:U}}=k;U&&(0,i.assignDefaults)(k,O.type),q.block(()=>{for(const G of O.rules)(0,r.shouldUseRule)(M,G)&&F(k,G.keyword,G.definition,O.type)})}function Z(k,O){k.schemaEnv.meta||!k.opts.strictTypes||(Ue(k,O),k.opts.allowUnionTypes||D(k,O),R(k,k.dataTypes))}function Ue(k,O){if(O.length){if(!k.dataTypes.length){k.dataTypes=O;return}O.forEach(q=>{T(k.dataTypes,q)||P(k,`type "${q}" not allowed by context "${k.dataTypes.join(",")}"`)}),b(k,O)}}function D(k,O){O.length>1&&!(O.length===2&&O.includes("null"))&&P(k,"use allowUnionTypes to allow union type keyword")}function R(k,O){const q=k.self.RULES.all;for(const M in q){const U=q[M];if(typeof U=="object"&&(0,r.shouldUseRule)(k.schema,U)){const{type:G}=U.definition;G.length&&!G.some(ue=>C(O,ue))&&P(k,`missing type "${G.join(",")}" for keyword "${M}"`)}}}function C(k,O){return k.includes(O)||O==="number"&&k.includes("integer")}function T(k,O){return k.includes(O)||O==="integer"&&k.includes("number")}function b(k,O){const q=[];for(const M of k.dataTypes)T(O,M)?q.push(M):O.includes("integer")&&M==="number"&&q.push("integer");k.dataTypes=q}function P(k,O){const q=k.schemaEnv.baseId+k.errSchemaPath;O+=` at "${q}" (strictTypes)`,(0,u.checkStrictMode)(k,O,k.opts.strictTypes)}class j{constructor(O,q,M){if((0,s.validateKeywordUsage)(O,q,M),this.gen=O.gen,this.allErrors=O.allErrors,this.keyword=M,this.data=O.data,this.schema=O.schema[M],this.$data=q.$data&&O.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,u.schemaRefOrVal)(O,this.schema,M,this.$data),this.schemaType=q.schemaType,this.parentSchema=O.schema,this.params={},this.it=O,this.def=q,this.$data)this.schemaCode=O.gen.const("vSchema",X(this.$data,O));else if(this.schemaCode=this.schemaValue,!(0,s.validSchemaType)(this.schema,q.schemaType,q.allowUndefined))throw new Error(`${M} value must be ${JSON.stringify(q.schemaType)}`);("code"in q?q.trackErrors:q.errors!==!1)&&(this.errsCount=O.gen.const("_errs",c.default.errors))}result(O,q,M){this.failResult((0,o.not)(O),q,M)}failResult(O,q,M){this.gen.if(O),M?M():this.error(),q?(this.gen.else(),q(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(O,q){this.failResult((0,o.not)(O),void 0,q)}fail(O){if(O===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(O),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(O){if(!this.$data)return this.fail(O);const{schemaCode:q}=this;this.fail((0,o._)`${q} !== undefined && (${(0,o.or)(this.invalid$data(),O)})`)}error(O,q,M){if(q){this.setParams(q),this._error(O,M),this.setParams({});return}this._error(O,M)}_error(O,q){(O?v.reportExtraError:v.reportError)(this,this.def.error,q)}$dataError(){(0,v.reportError)(this,this.def.$dataError||v.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,v.resetErrorsCount)(this.gen,this.errsCount)}ok(O){this.allErrors||this.gen.if(O)}setParams(O,q){q?Object.assign(this.params,O):this.params=O}block$data(O,q,M=o.nil){this.gen.block(()=>{this.check$data(O,M),q()})}check$data(O=o.nil,q=o.nil){if(!this.$data)return;const{gen:M,schemaCode:U,schemaType:G,def:ue}=this;M.if((0,o.or)((0,o._)`${U} === undefined`,q)),O!==o.nil&&M.assign(O,!0),(G.length||ue.validateSchema)&&(M.elseIf(this.invalid$data()),this.$dataError(),O!==o.nil&&M.assign(O,!1)),M.else()}invalid$data(){const{gen:O,schemaCode:q,schemaType:M,def:U,it:G}=this;return(0,o.or)(ue(),Ve());function ue(){if(M.length){if(!(q instanceof o.Name))throw new Error("ajv implementation error");const Ee=Array.isArray(M)?M:[M];return(0,o._)`${(0,n.checkDataTypes)(Ee,q,G.opts.strictNumbers,n.DataType.Wrong)}`}return o.nil}function Ve(){if(U.validateSchema){const Ee=O.scopeValue("validate$data",{ref:U.validateSchema});return(0,o._)`!${Ee}(${q})`}return o.nil}}subschema(O,q){const M=(0,a.getSubschema)(this.it,O);(0,a.extendSubschemaData)(M,this.it,O),(0,a.extendSubschemaMode)(M,O);const U={...this.it,...M,items:void 0,props:void 0};return g(U,q),U}mergeEvaluated(O,q){const{it:M,gen:U}=this;M.opts.unevaluated&&(M.props!==!0&&O.props!==void 0&&(M.props=u.mergeEvaluated.props(U,O.props,M.props,q)),M.items!==!0&&O.items!==void 0&&(M.items=u.mergeEvaluated.items(U,O.items,M.items,q)))}mergeValidEvaluated(O,q){const{it:M,gen:U}=this;if(M.opts.unevaluated&&(M.props!==!0||M.items!==!0))return U.if(q,()=>this.mergeEvaluated(O,o.Name)),!0}}Ze.KeywordCxt=j;function F(k,O,q,M){const U=new j(k,q,O);"code"in q?q.code(U,M):U.$data&&q.validate?(0,s.funcKeywordCode)(U,q):"macro"in q?(0,s.macroKeywordCode)(U,q):(q.compile||q.validate)&&(0,s.funcKeywordCode)(U,q)}const V=/^\/(?:[^~]|~0|~1)*$/,ee=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function X(k,{dataLevel:O,dataNames:q,dataPathArr:M}){let U,G;if(k==="")return c.default.rootData;if(k[0]==="/"){if(!V.test(k))throw new Error(`Invalid JSON-pointer: ${k}`);U=k,G=c.default.rootData}else{const Se=ee.exec(k);if(!Se)throw new Error(`Invalid JSON-pointer: ${k}`);const de=+Se[1];if(U=Se[2],U==="#"){if(de>=O)throw new Error(Ee("property/index",de));return M[O-de]}if(de>O)throw new Error(Ee("data",de));if(G=q[O-de],!U)return G}let ue=G;const Ve=U.split("/");for(const Se of Ve)Se&&(G=(0,o._)`${G}${(0,o.getProperty)((0,u.unescapeJsonPointer)(Se))}`,ue=(0,o._)`${ue} && ${G}`);return ue;function Ee(Se,de){return`Cannot access ${Se} ${de} levels up, current level is ${O}`}}return Ze.getData=X,Ze}var Rr={},Ri;function Bn(){if(Ri)return Rr;Ri=1,Object.defineProperty(Rr,"__esModule",{value:!0});class e extends Error{constructor(r){super("validation failed"),this.errors=r,this.ajv=this.validation=!0}}return Rr.default=e,Rr}var Or={},Oi;function Tr(){if(Oi)return Or;Oi=1,Object.defineProperty(Or,"__esModule",{value:!0});const e=Pr();class t extends Error{constructor(n,i,s,a){super(a||`can't resolve reference ${s} from id ${i}`),this.missingRef=(0,e.resolveUrl)(n,i,s),this.missingSchema=(0,e.normalizeId)((0,e.getFullPath)(n,this.missingRef))}}return Or.default=t,Or}var Pe={},Ti;function Jn(){if(Ti)return Pe;Ti=1,Object.defineProperty(Pe,"__esModule",{value:!0}),Pe.resolveSchema=Pe.getCompilingSchema=Pe.resolveRef=Pe.compileSchema=Pe.SchemaEnv=void 0;const e=W(),t=Bn(),r=lt(),n=Pr(),i=Y(),s=kr();class a{constructor(_){var f;this.refs={},this.dynamicAnchors={};let g;typeof _.schema=="object"&&(g=_.schema),this.schema=_.schema,this.schemaId=_.schemaId,this.root=_.root||this,this.baseId=(f=_.baseId)!==null&&f!==void 0?f:(0,n.normalizeId)(g?.[_.schemaId||"$id"]),this.schemaPath=_.schemaPath,this.localRefs=_.localRefs,this.meta=_.meta,this.$async=g?.$async,this.refs={}}}Pe.SchemaEnv=a;function o(d){const _=u.call(this,d);if(_)return _;const f=(0,n.getFullPath)(this.opts.uriResolver,d.root.baseId),{es5:g,lines:E}=this.opts.code,{ownProperties:p}=this.opts,$=new e.CodeGen(this.scope,{es5:g,lines:E,ownProperties:p});let S;d.$async&&(S=$.scopeValue("Error",{ref:t.default,code:(0,e._)`require("ajv/dist/runtime/validation_error").default`}));const A=$.scopeName("validate");d.validateName=A;const I={gen:$,allErrors:this.opts.allErrors,data:r.default.data,parentData:r.default.parentData,parentDataProperty:r.default.parentDataProperty,dataNames:[r.default.data],dataPathArr:[e.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:$.scopeValue("schema",this.opts.code.source===!0?{ref:d.schema,code:(0,e.stringify)(d.schema)}:{ref:d.schema}),validateName:A,ValidationError:S,schema:d.schema,schemaEnv:d,rootId:f,baseId:d.baseId||f,schemaPath:e.nil,errSchemaPath:d.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,e._)`""`,opts:this.opts,self:this};let L;try{this._compilations.add(d),(0,s.validateFunctionCode)(I),$.optimize(this.opts.code.optimize);const x=$.toString();L=`${$.scopeRefs(r.default.scope)}return ${x}`,this.opts.code.process&&(L=this.opts.code.process(L,d));const z=new Function(`${r.default.self}`,`${r.default.scope}`,L)(this,this.scope.get());if(this.scope.value(A,{ref:z}),z.errors=null,z.schema=d.schema,z.schemaEnv=d,d.$async&&(z.$async=!0),this.opts.code.source===!0&&(z.source={validateName:A,validateCode:x,scopeValues:$._values}),this.opts.unevaluated){const{props:B,items:ae}=I;z.evaluated={props:B instanceof e.Name?void 0:B,items:ae instanceof e.Name?void 0:ae,dynamicProps:B instanceof e.Name,dynamicItems:ae instanceof e.Name},z.source&&(z.source.evaluated=(0,e.stringify)(z.evaluated))}return d.validate=z,d}catch(x){throw delete d.validate,delete d.validateName,L&&this.logger.error("Error compiling schema, function code:",L),x}finally{this._compilations.delete(d)}}Pe.compileSchema=o;function c(d,_,f){var g;f=(0,n.resolveUrl)(this.opts.uriResolver,_,f);const E=d.refs[f];if(E)return E;let p=m.call(this,d,f);if(p===void 0){const $=(g=d.localRefs)===null||g===void 0?void 0:g[f],{schemaId:S}=this.opts;$&&(p=new a({schema:$,schemaId:S,root:d,baseId:_}))}if(p!==void 0)return d.refs[f]=l.call(this,p)}Pe.resolveRef=c;function l(d){return(0,n.inlineRef)(d.schema,this.opts.inlineRefs)?d.schema:d.validate?d:o.call(this,d)}function u(d){for(const _ of this._compilations)if(v(_,d))return _}Pe.getCompilingSchema=u;function v(d,_){return d.schema===_.schema&&d.root===_.root&&d.baseId===_.baseId}function m(d,_){let f;for(;typeof(f=this.refs[_])=="string";)_=f;return f||this.schemas[_]||y.call(this,d,_)}function y(d,_){const f=this.opts.uriResolver.parse(_),g=(0,n._getFullPath)(this.opts.uriResolver,f);let E=(0,n.getFullPath)(this.opts.uriResolver,d.baseId,void 0);if(Object.keys(d.schema).length>0&&g===E)return w.call(this,f,d);const p=(0,n.normalizeId)(g),$=this.refs[p]||this.schemas[p];if(typeof $=="string"){const S=y.call(this,d,$);return typeof S?.schema!="object"?void 0:w.call(this,f,S)}if(typeof $?.schema=="object"){if($.validate||o.call(this,$),p===(0,n.normalizeId)(_)){const{schema:S}=$,{schemaId:A}=this.opts,I=S[A];return I&&(E=(0,n.resolveUrl)(this.opts.uriResolver,E,I)),new a({schema:S,schemaId:A,root:d,baseId:E})}return w.call(this,f,$)}}Pe.resolveSchema=y;const h=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function w(d,{baseId:_,schema:f,root:g}){var E;if(((E=d.fragment)===null||E===void 0?void 0:E[0])!=="/")return;for(const S of d.fragment.slice(1).split("/")){if(typeof f=="boolean")return;const A=f[(0,i.unescapeFragment)(S)];if(A===void 0)return;f=A;const I=typeof f=="object"&&f[this.opts.schemaId];!h.has(S)&&I&&(_=(0,n.resolveUrl)(this.opts.uriResolver,_,I))}let p;if(typeof f!="boolean"&&f.$ref&&!(0,i.schemaHasRulesButRef)(f,this.RULES)){const S=(0,n.resolveUrl)(this.opts.uriResolver,_,f.$ref);p=y.call(this,g,S)}const{schemaId:$}=this.opts;if(p=p||new a({schema:f,schemaId:$,root:g,baseId:_}),p.schema!==p.root.schema)return p}return Pe}const sl={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var Nr={},Zt={exports:{}},Gn,Ni;function Ai(){if(Ni)return Gn;Ni=1;const e=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),t=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function r(m){let y="",h=0,w=0;for(w=0;w<m.length;w++)if(h=m[w].charCodeAt(0),h!==48){if(!(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102))return"";y+=m[w];break}for(w+=1;w<m.length;w++){if(h=m[w].charCodeAt(0),!(h>=48&&h<=57||h>=65&&h<=70||h>=97&&h<=102))return"";y+=m[w]}return y}const n=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function i(m){return m.length=0,!0}function s(m,y,h){if(m.length){const w=r(m);if(w!=="")y.push(w);else return h.error=!0,!1;m.length=0}return!0}function a(m){let y=0;const h={error:!1,address:"",zone:""},w=[],d=[];let _=!1,f=!1,g=s;for(let E=0;E<m.length;E++){const p=m[E];if(!(p==="["||p==="]"))if(p===":"){if(_===!0&&(f=!0),!g(d,w,h))break;if(++y>7){h.error=!0;break}E>0&&m[E-1]===":"&&(_=!0),w.push(":");continue}else if(p==="%"){if(!g(d,w,h))break;g=i}else{d.push(p);continue}}return d.length&&(g===i?h.zone=d.join(""):f?w.push(d.join("")):w.push(r(d))),h.address=w.join(""),h}function o(m){if(c(m,":")<2)return{host:m,isIPV6:!1};const y=a(m);if(y.error)return{host:m,isIPV6:!1};{let h=y.address,w=y.address;return y.zone&&(h+="%"+y.zone,w+="%25"+y.zone),{host:h,isIPV6:!0,escapedHost:w}}}function c(m,y){let h=0;for(let w=0;w<m.length;w++)m[w]===y&&h++;return h}function l(m){let y=m;const h=[];let w=-1,d=0;for(;d=y.length;){if(d===1){if(y===".")break;if(y==="/"){h.push("/");break}else{h.push(y);break}}else if(d===2){if(y[0]==="."){if(y[1]===".")break;if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&(y[1]==="."||y[1]==="/")){h.push("/");break}}else if(d===3&&y==="/.."){h.length!==0&&h.pop(),h.push("/");break}if(y[0]==="."){if(y[1]==="."){if(y[2]==="/"){y=y.slice(3);continue}}else if(y[1]==="/"){y=y.slice(2);continue}}else if(y[0]==="/"&&y[1]==="."){if(y[2]==="/"){y=y.slice(2);continue}else if(y[2]==="."&&y[3]==="/"){y=y.slice(3),h.length!==0&&h.pop();continue}}if((w=y.indexOf("/",1))===-1){h.push(y);break}else h.push(y.slice(0,w)),y=y.slice(w)}return h.join("")}function u(m,y){const h=y!==!0?escape:unescape;return m.scheme!==void 0&&(m.scheme=h(m.scheme)),m.userinfo!==void 0&&(m.userinfo=h(m.userinfo)),m.host!==void 0&&(m.host=h(m.host)),m.path!==void 0&&(m.path=h(m.path)),m.query!==void 0&&(m.query=h(m.query)),m.fragment!==void 0&&(m.fragment=h(m.fragment)),m}function v(m){const y=[];if(m.userinfo!==void 0&&(y.push(m.userinfo),y.push("@")),m.host!==void 0){let h=unescape(m.host);if(!t(h)){const w=o(h);w.isIPV6===!0?h=`[${w.escapedHost}]`:h=m.host}y.push(h)}return(typeof m.port=="number"||typeof m.port=="string")&&(y.push(":"),y.push(String(m.port))),y.length?y.join(""):void 0}return Gn={nonSimpleDomain:n,recomposeAuthority:v,normalizeComponentEncoding:u,removeDotSegments:l,isIPv4:t,isUUID:e,normalizeIPv6:o,stringArrayToHexStripped:r},Gn}var Wn,ji;function il(){if(ji)return Wn;ji=1;const{isUUID:e}=Ai(),t=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,r=["http","https","ws","wss","urn","urn:uuid"];function n(p){return r.indexOf(p)!==-1}function i(p){return p.secure===!0?!0:p.secure===!1?!1:p.scheme?p.scheme.length===3&&(p.scheme[0]==="w"||p.scheme[0]==="W")&&(p.scheme[1]==="s"||p.scheme[1]==="S")&&(p.scheme[2]==="s"||p.scheme[2]==="S"):!1}function s(p){return p.host||(p.error=p.error||"HTTP URIs must have a host."),p}function a(p){const $=String(p.scheme).toLowerCase()==="https";return(p.port===($?443:80)||p.port==="")&&(p.port=void 0),p.path||(p.path="/"),p}function o(p){return p.secure=i(p),p.resourceName=(p.path||"/")+(p.query?"?"+p.query:""),p.path=void 0,p.query=void 0,p}function c(p){if((p.port===(i(p)?443:80)||p.port==="")&&(p.port=void 0),typeof p.secure=="boolean"&&(p.scheme=p.secure?"wss":"ws",p.secure=void 0),p.resourceName){const[$,S]=p.resourceName.split("?");p.path=$&&$!=="/"?$:void 0,p.query=S,p.resourceName=void 0}return p.fragment=void 0,p}function l(p,$){if(!p.path)return p.error="URN can not be parsed",p;const S=p.path.match(t);if(S){const A=$.scheme||p.scheme||"urn";p.nid=S[1].toLowerCase(),p.nss=S[2];const I=`${A}:${$.nid||p.nid}`,L=E(I);p.path=void 0,L&&(p=L.parse(p,$))}else p.error=p.error||"URN can not be parsed.";return p}function u(p,$){if(p.nid===void 0)throw new Error("URN without nid cannot be serialized");const S=$.scheme||p.scheme||"urn",A=p.nid.toLowerCase(),I=`${S}:${$.nid||A}`,L=E(I);L&&(p=L.serialize(p,$));const x=p,H=p.nss;return x.path=`${A||$.nid}:${H}`,$.skipEscape=!0,x}function v(p,$){const S=p;return S.uuid=S.nss,S.nss=void 0,!$.tolerant&&(!S.uuid||!e(S.uuid))&&(S.error=S.error||"UUID is not valid."),S}function m(p){const $=p;return $.nss=(p.uuid||"").toLowerCase(),$}const y={scheme:"http",domainHost:!0,parse:s,serialize:a},h={scheme:"https",domainHost:y.domainHost,parse:s,serialize:a},w={scheme:"ws",domainHost:!0,parse:o,serialize:c},d={scheme:"wss",domainHost:w.domainHost,parse:w.parse,serialize:w.serialize},g={http:y,https:h,ws:w,wss:d,urn:{scheme:"urn",parse:l,serialize:u,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:v,serialize:m,skipNormalize:!0}};Object.setPrototypeOf(g,null);function E(p){return p&&(g[p]||g[p.toLowerCase()])||void 0}return Wn={wsIsSecure:i,SCHEMES:g,isValidSchemeName:n,getSchemeHandler:E},Wn}var Ci;function al(){if(Ci)return Zt.exports;Ci=1;const{normalizeIPv6:e,removeDotSegments:t,recomposeAuthority:r,normalizeComponentEncoding:n,isIPv4:i,nonSimpleDomain:s}=Ai(),{SCHEMES:a,getSchemeHandler:o}=il();function c(d,_){return typeof d=="string"?d=m(h(d,_),_):typeof d=="object"&&(d=h(m(d,_),_)),d}function l(d,_,f){const g=f?Object.assign({scheme:"null"},f):{scheme:"null"},E=u(h(d,g),h(_,g),g,!0);return g.skipEscape=!0,m(E,g)}function u(d,_,f,g){const E={};return g||(d=h(m(d,f),f),_=h(m(_,f),f)),f=f||{},!f.tolerant&&_.scheme?(E.scheme=_.scheme,E.userinfo=_.userinfo,E.host=_.host,E.port=_.port,E.path=t(_.path||""),E.query=_.query):(_.userinfo!==void 0||_.host!==void 0||_.port!==void 0?(E.userinfo=_.userinfo,E.host=_.host,E.port=_.port,E.path=t(_.path||""),E.query=_.query):(_.path?(_.path[0]==="/"?E.path=t(_.path):((d.userinfo!==void 0||d.host!==void 0||d.port!==void 0)&&!d.path?E.path="/"+_.path:d.path?E.path=d.path.slice(0,d.path.lastIndexOf("/")+1)+_.path:E.path=_.path,E.path=t(E.path)),E.query=_.query):(E.path=d.path,_.query!==void 0?E.query=_.query:E.query=d.query),E.userinfo=d.userinfo,E.host=d.host,E.port=d.port),E.scheme=d.scheme),E.fragment=_.fragment,E}function v(d,_,f){return typeof d=="string"?(d=unescape(d),d=m(n(h(d,f),!0),{...f,skipEscape:!0})):typeof d=="object"&&(d=m(n(d,!0),{...f,skipEscape:!0})),typeof _=="string"?(_=unescape(_),_=m(n(h(_,f),!0),{...f,skipEscape:!0})):typeof _=="object"&&(_=m(n(_,!0),{...f,skipEscape:!0})),d.toLowerCase()===_.toLowerCase()}function m(d,_){const f={host:d.host,scheme:d.scheme,userinfo:d.userinfo,port:d.port,path:d.path,query:d.query,nid:d.nid,nss:d.nss,uuid:d.uuid,fragment:d.fragment,reference:d.reference,resourceName:d.resourceName,secure:d.secure,error:""},g=Object.assign({},_),E=[],p=o(g.scheme||f.scheme);p&&p.serialize&&p.serialize(f,g),f.path!==void 0&&(g.skipEscape?f.path=unescape(f.path):(f.path=escape(f.path),f.scheme!==void 0&&(f.path=f.path.split("%3A").join(":")))),g.reference!=="suffix"&&f.scheme&&E.push(f.scheme,":");const $=r(f);if($!==void 0&&(g.reference!=="suffix"&&E.push("//"),E.push($),f.path&&f.path[0]!=="/"&&E.push("/")),f.path!==void 0){let S=f.path;!g.absolutePath&&(!p||!p.absolutePath)&&(S=t(S)),$===void 0&&S[0]==="/"&&S[1]==="/"&&(S="/%2F"+S.slice(2)),E.push(S)}return f.query!==void 0&&E.push("?",f.query),f.fragment!==void 0&&E.push("#",f.fragment),E.join("")}const y=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function h(d,_){const f=Object.assign({},_),g={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let E=!1;f.reference==="suffix"&&(f.scheme?d=f.scheme+":"+d:d="//"+d);const p=d.match(y);if(p){if(g.scheme=p[1],g.userinfo=p[3],g.host=p[4],g.port=parseInt(p[5],10),g.path=p[6]||"",g.query=p[7],g.fragment=p[8],isNaN(g.port)&&(g.port=p[5]),g.host)if(i(g.host)===!1){const A=e(g.host);g.host=A.host.toLowerCase(),E=A.isIPV6}else E=!0;g.scheme===void 0&&g.userinfo===void 0&&g.host===void 0&&g.port===void 0&&g.query===void 0&&!g.path?g.reference="same-document":g.scheme===void 0?g.reference="relative":g.fragment===void 0?g.reference="absolute":g.reference="uri",f.reference&&f.reference!=="suffix"&&f.reference!==g.reference&&(g.error=g.error||"URI is not a "+f.reference+" reference.");const $=o(f.scheme||g.scheme);if(!f.unicodeSupport&&(!$||!$.unicodeSupport)&&g.host&&(f.domainHost||$&&$.domainHost)&&E===!1&&s(g.host))try{g.host=URL.domainToASCII(g.host.toLowerCase())}catch(S){g.error=g.error||"Host's domain name can not be converted to ASCII: "+S}(!$||$&&!$.skipNormalize)&&(d.indexOf("%")!==-1&&(g.scheme!==void 0&&(g.scheme=unescape(g.scheme)),g.host!==void 0&&(g.host=unescape(g.host))),g.path&&(g.path=escape(unescape(g.path))),g.fragment&&(g.fragment=encodeURI(decodeURIComponent(g.fragment)))),$&&$.parse&&$.parse(g,f)}else g.error=g.error||"URI can not be parsed.";return g}const w={SCHEMES:a,normalize:c,resolve:l,resolveComponent:u,equal:v,serialize:m,parse:h};return Zt.exports=w,Zt.exports.default=w,Zt.exports.fastUri=w,Zt.exports}var qi;function ol(){if(qi)return Nr;qi=1,Object.defineProperty(Nr,"__esModule",{value:!0});const e=al();return e.code='require("ajv/dist/runtime/uri").default',Nr.default=e,Nr}var Ii;function cl(){return Ii||(Ii=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.CodeGen=e.Name=e.nil=e.stringify=e.str=e._=e.KeywordCxt=void 0;var t=kr();Object.defineProperty(e,"KeywordCxt",{enumerable:!0,get:function(){return t.KeywordCxt}});var r=W();Object.defineProperty(e,"_",{enumerable:!0,get:function(){return r._}}),Object.defineProperty(e,"str",{enumerable:!0,get:function(){return r.str}}),Object.defineProperty(e,"stringify",{enumerable:!0,get:function(){return r.stringify}}),Object.defineProperty(e,"nil",{enumerable:!0,get:function(){return r.nil}}),Object.defineProperty(e,"Name",{enumerable:!0,get:function(){return r.Name}}),Object.defineProperty(e,"CodeGen",{enumerable:!0,get:function(){return r.CodeGen}});const n=Bn(),i=Tr(),s=pi(),a=Jn(),o=W(),c=Pr(),l=Sr(),u=Y(),v=sl,m=ol(),y=(D,R)=>new RegExp(D,R);y.code="new RegExp";const h=["removeAdditional","useDefaults","coerceTypes"],w=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),d={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},_={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},f=200;function g(D){var R,C,T,b,P,j,F,V,ee,X,k,O,q,M,U,G,ue,Ve,Ee,Se,de,Vt,Ce,ys,gs;const lr=D.strict,vs=(R=D.code)===null||R===void 0?void 0:R.optimize,ko=vs===!0||vs===void 0?1:vs||0,Ro=(T=(C=D.code)===null||C===void 0?void 0:C.regExp)!==null&&T!==void 0?T:y,ud=(b=D.uriResolver)!==null&&b!==void 0?b:m.default;return{strictSchema:(j=(P=D.strictSchema)!==null&&P!==void 0?P:lr)!==null&&j!==void 0?j:!0,strictNumbers:(V=(F=D.strictNumbers)!==null&&F!==void 0?F:lr)!==null&&V!==void 0?V:!0,strictTypes:(X=(ee=D.strictTypes)!==null&&ee!==void 0?ee:lr)!==null&&X!==void 0?X:"log",strictTuples:(O=(k=D.strictTuples)!==null&&k!==void 0?k:lr)!==null&&O!==void 0?O:"log",strictRequired:(M=(q=D.strictRequired)!==null&&q!==void 0?q:lr)!==null&&M!==void 0?M:!1,code:D.code?{...D.code,optimize:ko,regExp:Ro}:{optimize:ko,regExp:Ro},loopRequired:(U=D.loopRequired)!==null&&U!==void 0?U:f,loopEnum:(G=D.loopEnum)!==null&&G!==void 0?G:f,meta:(ue=D.meta)!==null&&ue!==void 0?ue:!0,messages:(Ve=D.messages)!==null&&Ve!==void 0?Ve:!0,inlineRefs:(Ee=D.inlineRefs)!==null&&Ee!==void 0?Ee:!0,schemaId:(Se=D.schemaId)!==null&&Se!==void 0?Se:"$id",addUsedSchema:(de=D.addUsedSchema)!==null&&de!==void 0?de:!0,validateSchema:(Vt=D.validateSchema)!==null&&Vt!==void 0?Vt:!0,validateFormats:(Ce=D.validateFormats)!==null&&Ce!==void 0?Ce:!0,unicodeRegExp:(ys=D.unicodeRegExp)!==null&&ys!==void 0?ys:!0,int32range:(gs=D.int32range)!==null&&gs!==void 0?gs:!0,uriResolver:ud}}class E{constructor(R={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,R=this.opts={...R,...g(R)};const{es5:C,lines:T}=this.opts.code;this.scope=new o.ValueScope({scope:{},prefixes:w,es5:C,lines:T}),this.logger=H(R.logger);const b=R.validateFormats;R.validateFormats=!1,this.RULES=(0,s.getRules)(),p.call(this,d,R,"NOT SUPPORTED"),p.call(this,_,R,"DEPRECATED","warn"),this._metaOpts=L.call(this),R.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),R.keywords&&I.call(this,R.keywords),typeof R.meta=="object"&&this.addMetaSchema(R.meta),S.call(this),R.validateFormats=b}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:R,meta:C,schemaId:T}=this.opts;let b=v;T==="id"&&(b={...v},b.id=b.$id,delete b.$id),C&&R&&this.addMetaSchema(b,b[T],!1)}defaultMeta(){const{meta:R,schemaId:C}=this.opts;return this.opts.defaultMeta=typeof R=="object"?R[C]||R:void 0}validate(R,C){let T;if(typeof R=="string"){if(T=this.getSchema(R),!T)throw new Error(`no schema with key or ref "${R}"`)}else T=this.compile(R);const b=T(C);return"$async"in T||(this.errors=T.errors),b}compile(R,C){const T=this._addSchema(R,C);return T.validate||this._compileSchemaEnv(T)}compileAsync(R,C){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:T}=this.opts;return b.call(this,R,C);async function b(X,k){await P.call(this,X.$schema);const O=this._addSchema(X,k);return O.validate||j.call(this,O)}async function P(X){X&&!this.getSchema(X)&&await b.call(this,{$ref:X},!0)}async function j(X){try{return this._compileSchemaEnv(X)}catch(k){if(!(k instanceof i.default))throw k;return F.call(this,k),await V.call(this,k.missingSchema),j.call(this,X)}}function F({missingSchema:X,missingRef:k}){if(this.refs[X])throw new Error(`AnySchema ${X} is loaded but ${k} cannot be resolved`)}async function V(X){const k=await ee.call(this,X);this.refs[X]||await P.call(this,k.$schema),this.refs[X]||this.addSchema(k,X,C)}async function ee(X){const k=this._loading[X];if(k)return k;try{return await(this._loading[X]=T(X))}finally{delete this._loading[X]}}}addSchema(R,C,T,b=this.opts.validateSchema){if(Array.isArray(R)){for(const j of R)this.addSchema(j,void 0,T,b);return this}let P;if(typeof R=="object"){const{schemaId:j}=this.opts;if(P=R[j],P!==void 0&&typeof P!="string")throw new Error(`schema ${j} must be string`)}return C=(0,c.normalizeId)(C||P),this._checkUnique(C),this.schemas[C]=this._addSchema(R,T,C,b,!0),this}addMetaSchema(R,C,T=this.opts.validateSchema){return this.addSchema(R,C,!0,T),this}validateSchema(R,C){if(typeof R=="boolean")return!0;let T;if(T=R.$schema,T!==void 0&&typeof T!="string")throw new Error("$schema must be a string");if(T=T||this.opts.defaultMeta||this.defaultMeta(),!T)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const b=this.validate(T,R);if(!b&&C){const P="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(P);else throw new Error(P)}return b}getSchema(R){let C;for(;typeof(C=$.call(this,R))=="string";)R=C;if(C===void 0){const{schemaId:T}=this.opts,b=new a.SchemaEnv({schema:{},schemaId:T});if(C=a.resolveSchema.call(this,b,R),!C)return;this.refs[R]=C}return C.validate||this._compileSchemaEnv(C)}removeSchema(R){if(R instanceof RegExp)return this._removeAllSchemas(this.schemas,R),this._removeAllSchemas(this.refs,R),this;switch(typeof R){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const C=$.call(this,R);return typeof C=="object"&&this._cache.delete(C.schema),delete this.schemas[R],delete this.refs[R],this}case"object":{const C=R;this._cache.delete(C);let T=R[this.opts.schemaId];return T&&(T=(0,c.normalizeId)(T),delete this.schemas[T],delete this.refs[T]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(R){for(const C of R)this.addKeyword(C);return this}addKeyword(R,C){let T;if(typeof R=="string")T=R,typeof C=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),C.keyword=T);else if(typeof R=="object"&&C===void 0){if(C=R,T=C.keyword,Array.isArray(T)&&!T.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(B.call(this,T,C),!C)return(0,u.eachItem)(T,P=>ae.call(this,P)),this;je.call(this,C);const b={...C,type:(0,l.getJSONTypes)(C.type),schemaType:(0,l.getJSONTypes)(C.schemaType)};return(0,u.eachItem)(T,b.type.length===0?P=>ae.call(this,P,b):P=>b.type.forEach(j=>ae.call(this,P,b,j))),this}getKeyword(R){const C=this.RULES.all[R];return typeof C=="object"?C.definition:!!C}removeKeyword(R){const{RULES:C}=this;delete C.keywords[R],delete C.all[R];for(const T of C.rules){const b=T.rules.findIndex(P=>P.keyword===R);b>=0&&T.rules.splice(b,1)}return this}addFormat(R,C){return typeof C=="string"&&(C=new RegExp(C)),this.formats[R]=C,this}errorsText(R=this.errors,{separator:C=", ",dataVar:T="data"}={}){return!R||R.length===0?"No errors":R.map(b=>`${T}${b.instancePath} ${b.message}`).reduce((b,P)=>b+C+P)}$dataMetaSchema(R,C){const T=this.RULES.all;R=JSON.parse(JSON.stringify(R));for(const b of C){const P=b.split("/").slice(1);let j=R;for(const F of P)j=j[F];for(const F in T){const V=T[F];if(typeof V!="object")continue;const{$data:ee}=V.definition,X=j[F];ee&&X&&(j[F]=Ue(X))}}return R}_removeAllSchemas(R,C){for(const T in R){const b=R[T];(!C||C.test(T))&&(typeof b=="string"?delete R[T]:b&&!b.meta&&(this._cache.delete(b.schema),delete R[T]))}}_addSchema(R,C,T,b=this.opts.validateSchema,P=this.opts.addUsedSchema){let j;const{schemaId:F}=this.opts;if(typeof R=="object")j=R[F];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof R!="boolean")throw new Error("schema must be object or boolean")}let V=this._cache.get(R);if(V!==void 0)return V;T=(0,c.normalizeId)(j||T);const ee=c.getSchemaRefs.call(this,R,T);return V=new a.SchemaEnv({schema:R,schemaId:F,meta:C,baseId:T,localRefs:ee}),this._cache.set(V.schema,V),P&&!T.startsWith("#")&&(T&&this._checkUnique(T),this.refs[T]=V),b&&this.validateSchema(R,!0),V}_checkUnique(R){if(this.schemas[R]||this.refs[R])throw new Error(`schema with key or id "${R}" already exists`)}_compileSchemaEnv(R){if(R.meta?this._compileMetaSchema(R):a.compileSchema.call(this,R),!R.validate)throw new Error("ajv implementation error");return R.validate}_compileMetaSchema(R){const C=this.opts;this.opts=this._metaOpts;try{a.compileSchema.call(this,R)}finally{this.opts=C}}}E.ValidationError=n.default,E.MissingRefError=i.default,e.default=E;function p(D,R,C,T="error"){for(const b in D){const P=b;P in R&&this.logger[T](`${C}: option ${b}. ${D[P]}`)}}function $(D){return D=(0,c.normalizeId)(D),this.schemas[D]||this.refs[D]}function S(){const D=this.opts.schemas;if(D)if(Array.isArray(D))this.addSchema(D);else for(const R in D)this.addSchema(D[R],R)}function A(){for(const D in this.opts.formats){const R=this.opts.formats[D];R&&this.addFormat(D,R)}}function I(D){if(Array.isArray(D)){this.addVocabulary(D);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const R in D){const C=D[R];C.keyword||(C.keyword=R),this.addKeyword(C)}}function L(){const D={...this.opts};for(const R of h)delete D[R];return D}const x={log(){},warn(){},error(){}};function H(D){if(D===!1)return x;if(D===void 0)return console;if(D.log&&D.warn&&D.error)return D;throw new Error("logger must implement log, warn and error methods")}const z=/^[a-z_$][a-z0-9_$:-]*$/i;function B(D,R){const{RULES:C}=this;if((0,u.eachItem)(D,T=>{if(C.keywords[T])throw new Error(`Keyword ${T} is already defined`);if(!z.test(T))throw new Error(`Keyword ${T} has invalid name`)}),!!R&&R.$data&&!("code"in R||"validate"in R))throw new Error('$data keyword must have "code" or "validate" function')}function ae(D,R,C){var T;const b=R?.post;if(C&&b)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:P}=this;let j=b?P.post:P.rules.find(({type:V})=>V===C);if(j||(j={type:C,rules:[]},P.rules.push(j)),P.keywords[D]=!0,!R)return;const F={keyword:D,definition:{...R,type:(0,l.getJSONTypes)(R.type),schemaType:(0,l.getJSONTypes)(R.schemaType)}};R.before?oe.call(this,j,F,R.before):j.rules.push(F),P.all[D]=F,(T=R.implements)===null||T===void 0||T.forEach(V=>this.addKeyword(V))}function oe(D,R,C){const T=D.rules.findIndex(b=>b.keyword===C);T>=0?D.rules.splice(T,0,R):(D.rules.push(R),this.logger.warn(`rule ${C} is not defined`))}function je(D){let{metaSchema:R}=D;R!==void 0&&(D.$data&&this.opts.$data&&(R=Ue(R)),D.validateSchema=this.compile(R,!0))}const Z={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function Ue(D){return{anyOf:[D,Z]}}})(xn)),xn}var Ar={},jr={},Cr={},Di;function ll(){if(Di)return Cr;Di=1,Object.defineProperty(Cr,"__esModule",{value:!0});const e={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return Cr.default=e,Cr}var ut={},Mi;function ul(){if(Mi)return ut;Mi=1,Object.defineProperty(ut,"__esModule",{value:!0}),ut.callRef=ut.getValidate=void 0;const e=Tr(),t=De(),r=W(),n=lt(),i=Jn(),s=Y(),a={keyword:"$ref",schemaType:"string",code(l){const{gen:u,schema:v,it:m}=l,{baseId:y,schemaEnv:h,validateName:w,opts:d,self:_}=m,{root:f}=h;if((v==="#"||v==="#/")&&y===f.baseId)return E();const g=i.resolveRef.call(_,f,y,v);if(g===void 0)throw new e.default(m.opts.uriResolver,y,v);if(g instanceof i.SchemaEnv)return p(g);return $(g);function E(){if(h===f)return c(l,w,h,h.$async);const S=u.scopeValue("root",{ref:f});return c(l,(0,r._)`${S}.validate`,f,f.$async)}function p(S){const A=o(l,S);c(l,A,S,S.$async)}function $(S){const A=u.scopeValue("schema",d.code.source===!0?{ref:S,code:(0,r.stringify)(S)}:{ref:S}),I=u.name("valid"),L=l.subschema({schema:S,dataTypes:[],schemaPath:r.nil,topSchemaRef:A,errSchemaPath:v},I);l.mergeEvaluated(L),l.ok(I)}}};function o(l,u){const{gen:v}=l;return u.validate?v.scopeValue("validate",{ref:u.validate}):(0,r._)`${v.scopeValue("wrapper",{ref:u})}.validate`}ut.getValidate=o;function c(l,u,v,m){const{gen:y,it:h}=l,{allErrors:w,schemaEnv:d,opts:_}=h,f=_.passContext?n.default.this:r.nil;m?g():E();function g(){if(!d.$async)throw new Error("async schema referenced by sync schema");const S=y.let("valid");y.try(()=>{y.code((0,r._)`await ${(0,t.callValidateCode)(l,u,f)}`),$(u),w||y.assign(S,!0)},A=>{y.if((0,r._)`!(${A} instanceof ${h.ValidationError})`,()=>y.throw(A)),p(A),w||y.assign(S,!1)}),l.ok(S)}function E(){l.result((0,t.callValidateCode)(l,u,f),()=>$(u),()=>p(u))}function p(S){const A=(0,r._)`${S}.errors`;y.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${A} : ${n.default.vErrors}.concat(${A})`),y.assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`)}function $(S){var A;if(!h.opts.unevaluated)return;const I=(A=v?.validate)===null||A===void 0?void 0:A.evaluated;if(h.props!==!0)if(I&&!I.dynamicProps)I.props!==void 0&&(h.props=s.mergeEvaluated.props(y,I.props,h.props));else{const L=y.var("props",(0,r._)`${S}.evaluated.props`);h.props=s.mergeEvaluated.props(y,L,h.props,r.Name)}if(h.items!==!0)if(I&&!I.dynamicItems)I.items!==void 0&&(h.items=s.mergeEvaluated.items(y,I.items,h.items));else{const L=y.var("items",(0,r._)`${S}.evaluated.items`);h.items=s.mergeEvaluated.items(y,L,h.items,r.Name)}}}return ut.callRef=c,ut.default=a,ut}var Li;function dl(){if(Li)return jr;Li=1,Object.defineProperty(jr,"__esModule",{value:!0});const e=ll(),t=ul(),r=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",e.default,t.default];return jr.default=r,jr}var qr={},Ir={},xi;function fl(){if(xi)return Ir;xi=1,Object.defineProperty(Ir,"__esModule",{value:!0});const e=W(),t=e.operators,r={maximum:{okStr:"<=",ok:t.LTE,fail:t.GT},minimum:{okStr:">=",ok:t.GTE,fail:t.LT},exclusiveMaximum:{okStr:"<",ok:t.LT,fail:t.GTE},exclusiveMinimum:{okStr:">",ok:t.GT,fail:t.LTE}},n={message:({keyword:s,schemaCode:a})=>(0,e.str)`must be ${r[s].okStr} ${a}`,params:({keyword:s,schemaCode:a})=>(0,e._)`{comparison: ${r[s].okStr}, limit: ${a}}`},i={keyword:Object.keys(r),type:"number",schemaType:"number",$data:!0,error:n,code(s){const{keyword:a,data:o,schemaCode:c}=s;s.fail$data((0,e._)`${o} ${r[a].fail} ${c} || isNaN(${o})`)}};return Ir.default=i,Ir}var Dr={},Fi;function hl(){if(Fi)return Dr;Fi=1,Object.defineProperty(Dr,"__esModule",{value:!0});const e=W(),r={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must be multiple of ${n}`,params:({schemaCode:n})=>(0,e._)`{multipleOf: ${n}}`},code(n){const{gen:i,data:s,schemaCode:a,it:o}=n,c=o.opts.multipleOfPrecision,l=i.let("res"),u=c?(0,e._)`Math.abs(Math.round(${l}) - ${l}) > 1e-${c}`:(0,e._)`${l} !== parseInt(${l})`;n.fail$data((0,e._)`(${a} === 0 || (${l} = ${s}/${a}, ${u}))`)}};return Dr.default=r,Dr}var Mr={},Lr={},Ui;function pl(){if(Ui)return Lr;Ui=1,Object.defineProperty(Lr,"__esModule",{value:!0});function e(t){const r=t.length;let n=0,i=0,s;for(;i<r;)n++,s=t.charCodeAt(i++),s>=55296&&s<=56319&&i<r&&(s=t.charCodeAt(i),(s&64512)===56320&&i++);return n}return Lr.default=e,e.code='require("ajv/dist/runtime/ucs2length").default',Lr}var Vi;function ml(){if(Vi)return Mr;Vi=1,Object.defineProperty(Mr,"__esModule",{value:!0});const e=W(),t=Y(),r=pl(),i={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:s,schemaCode:a}){const o=s==="maxLength"?"more":"fewer";return(0,e.str)`must NOT have ${o} than ${a} characters`},params:({schemaCode:s})=>(0,e._)`{limit: ${s}}`},code(s){const{keyword:a,data:o,schemaCode:c,it:l}=s,u=a==="maxLength"?e.operators.GT:e.operators.LT,v=l.opts.unicode===!1?(0,e._)`${o}.length`:(0,e._)`${(0,t.useFunc)(s.gen,r.default)}(${o})`;s.fail$data((0,e._)`${v} ${u} ${c}`)}};return Mr.default=i,Mr}var xr={},zi;function _l(){if(zi)return xr;zi=1,Object.defineProperty(xr,"__esModule",{value:!0});const e=De(),t=W(),n={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:i})=>(0,t.str)`must match pattern "${i}"`,params:({schemaCode:i})=>(0,t._)`{pattern: ${i}}`},code(i){const{data:s,$data:a,schema:o,schemaCode:c,it:l}=i,u=l.opts.unicodeRegExp?"u":"",v=a?(0,t._)`(new RegExp(${c}, ${u}))`:(0,e.usePattern)(i,o);i.fail$data((0,t._)`!${v}.test(${s})`)}};return xr.default=n,xr}var Fr={},Hi;function yl(){if(Hi)return Fr;Hi=1,Object.defineProperty(Fr,"__esModule",{value:!0});const e=W(),r={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxProperties"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} properties`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:a}=n,o=i==="maxProperties"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`Object.keys(${s}).length ${o} ${a}`)}};return Fr.default=r,Fr}var Ur={},Ki;function gl(){if(Ki)return Ur;Ki=1,Object.defineProperty(Ur,"__esModule",{value:!0});const e=De(),t=W(),r=Y(),i={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:s}})=>(0,t.str)`must have required property '${s}'`,params:({params:{missingProperty:s}})=>(0,t._)`{missingProperty: ${s}}`},code(s){const{gen:a,schema:o,schemaCode:c,data:l,$data:u,it:v}=s,{opts:m}=v;if(!u&&o.length===0)return;const y=o.length>=m.loopRequired;if(v.allErrors?h():w(),m.strictRequired){const f=s.parentSchema.properties,{definedProperties:g}=s.it;for(const E of o)if(f?.[E]===void 0&&!g.has(E)){const p=v.schemaEnv.baseId+v.errSchemaPath,$=`required property "${E}" is not defined at "${p}" (strictRequired)`;(0,r.checkStrictMode)(v,$,v.opts.strictRequired)}}function h(){if(y||u)s.block$data(t.nil,d);else for(const f of o)(0,e.checkReportMissingProp)(s,f)}function w(){const f=a.let("missing");if(y||u){const g=a.let("valid",!0);s.block$data(g,()=>_(f,g)),s.ok(g)}else a.if((0,e.checkMissingProp)(s,o,f)),(0,e.reportMissingProp)(s,f),a.else()}function d(){a.forOf("prop",c,f=>{s.setParams({missingProperty:f}),a.if((0,e.noPropertyInData)(a,l,f,m.ownProperties),()=>s.error())})}function _(f,g){s.setParams({missingProperty:f}),a.forOf(f,c,()=>{a.assign(g,(0,e.propertyInData)(a,l,f,m.ownProperties)),a.if((0,t.not)(g),()=>{s.error(),a.break()})},t.nil)}}};return Ur.default=i,Ur}var Vr={},Bi;function vl(){if(Bi)return Vr;Bi=1,Object.defineProperty(Vr,"__esModule",{value:!0});const e=W(),r={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:n,schemaCode:i}){const s=n==="maxItems"?"more":"fewer";return(0,e.str)`must NOT have ${s} than ${i} items`},params:({schemaCode:n})=>(0,e._)`{limit: ${n}}`},code(n){const{keyword:i,data:s,schemaCode:a}=n,o=i==="maxItems"?e.operators.GT:e.operators.LT;n.fail$data((0,e._)`${s}.length ${o} ${a}`)}};return Vr.default=r,Vr}var zr={},Hr={},Ji;function Zn(){if(Ji)return Hr;Ji=1,Object.defineProperty(Hr,"__esModule",{value:!0});const e=Ei();return e.code='require("ajv/dist/runtime/equal").default',Hr.default=e,Hr}var Gi;function wl(){if(Gi)return zr;Gi=1,Object.defineProperty(zr,"__esModule",{value:!0});const e=Sr(),t=W(),r=Y(),n=Zn(),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:a,j:o}})=>(0,t.str)`must NOT have duplicate items (items ## ${o} and ${a} are identical)`,params:({params:{i:a,j:o}})=>(0,t._)`{i: ${a}, j: ${o}}`},code(a){const{gen:o,data:c,$data:l,schema:u,parentSchema:v,schemaCode:m,it:y}=a;if(!l&&!u)return;const h=o.let("valid"),w=v.items?(0,e.getSchemaTypes)(v.items):[];a.block$data(h,d,(0,t._)`${m} === false`),a.ok(h);function d(){const E=o.let("i",(0,t._)`${c}.length`),p=o.let("j");a.setParams({i:E,j:p}),o.assign(h,!0),o.if((0,t._)`${E} > 1`,()=>(_()?f:g)(E,p))}function _(){return w.length>0&&!w.some(E=>E==="object"||E==="array")}function f(E,p){const $=o.name("item"),S=(0,e.checkDataTypes)(w,$,y.opts.strictNumbers,e.DataType.Wrong),A=o.const("indices",(0,t._)`{}`);o.for((0,t._)`;${E}--;`,()=>{o.let($,(0,t._)`${c}[${E}]`),o.if(S,(0,t._)`continue`),w.length>1&&o.if((0,t._)`typeof ${$} == "string"`,(0,t._)`${$} += "_"`),o.if((0,t._)`typeof ${A}[${$}] == "number"`,()=>{o.assign(p,(0,t._)`${A}[${$}]`),a.error(),o.assign(h,!1).break()}).code((0,t._)`${A}[${$}] = ${E}`)})}function g(E,p){const $=(0,r.useFunc)(o,n.default),S=o.name("outer");o.label(S).for((0,t._)`;${E}--;`,()=>o.for((0,t._)`${p} = ${E}; ${p}--;`,()=>o.if((0,t._)`${$}(${c}[${E}], ${c}[${p}])`,()=>{a.error(),o.assign(h,!1).break(S)})))}}};return zr.default=s,zr}var Kr={},Wi;function bl(){if(Wi)return Kr;Wi=1,Object.defineProperty(Kr,"__esModule",{value:!0});const e=W(),t=Y(),r=Zn(),i={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:s})=>(0,e._)`{allowedValue: ${s}}`},code(s){const{gen:a,data:o,$data:c,schemaCode:l,schema:u}=s;c||u&&typeof u=="object"?s.fail$data((0,e._)`!${(0,t.useFunc)(a,r.default)}(${o}, ${l})`):s.fail((0,e._)`${u} !== ${o}`)}};return Kr.default=i,Kr}var Br={},Zi;function $l(){if(Zi)return Br;Zi=1,Object.defineProperty(Br,"__esModule",{value:!0});const e=W(),t=Y(),r=Zn(),i={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:s})=>(0,e._)`{allowedValues: ${s}}`},code(s){const{gen:a,data:o,$data:c,schema:l,schemaCode:u,it:v}=s;if(!c&&l.length===0)throw new Error("enum must have non-empty array");const m=l.length>=v.opts.loopEnum;let y;const h=()=>y??(y=(0,t.useFunc)(a,r.default));let w;if(m||c)w=a.let("valid"),s.block$data(w,d);else{if(!Array.isArray(l))throw new Error("ajv implementation error");const f=a.const("vSchema",u);w=(0,e.or)(...l.map((g,E)=>_(f,E)))}s.pass(w);function d(){a.assign(w,!1),a.forOf("v",u,f=>a.if((0,e._)`${h()}(${o}, ${f})`,()=>a.assign(w,!0).break()))}function _(f,g){const E=l[g];return typeof E=="object"&&E!==null?(0,e._)`${h()}(${o}, ${f}[${g}])`:(0,e._)`${o} === ${E}`}}};return Br.default=i,Br}var Xi;function El(){if(Xi)return qr;Xi=1,Object.defineProperty(qr,"__esModule",{value:!0});const e=fl(),t=hl(),r=ml(),n=_l(),i=yl(),s=gl(),a=vl(),o=wl(),c=bl(),l=$l(),u=[e.default,t.default,r.default,n.default,i.default,s.default,a.default,o.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},c.default,l.default];return qr.default=u,qr}var Jr={},Ct={},Yi;function Qi(){if(Yi)return Ct;Yi=1,Object.defineProperty(Ct,"__esModule",{value:!0}),Ct.validateAdditionalItems=void 0;const e=W(),t=Y(),n={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:s}})=>(0,e.str)`must NOT have more than ${s} items`,params:({params:{len:s}})=>(0,e._)`{limit: ${s}}`},code(s){const{parentSchema:a,it:o}=s,{items:c}=a;if(!Array.isArray(c)){(0,t.checkStrictMode)(o,'"additionalItems" is ignored when "items" is not an array of schemas');return}i(s,c)}};function i(s,a){const{gen:o,schema:c,data:l,keyword:u,it:v}=s;v.items=!0;const m=o.const("len",(0,e._)`${l}.length`);if(c===!1)s.setParams({len:a.length}),s.pass((0,e._)`${m} <= ${a.length}`);else if(typeof c=="object"&&!(0,t.alwaysValidSchema)(v,c)){const h=o.var("valid",(0,e._)`${m} <= ${a.length}`);o.if((0,e.not)(h),()=>y(h)),s.ok(h)}function y(h){o.forRange("i",a.length,m,w=>{s.subschema({keyword:u,dataProp:w,dataPropType:t.Type.Num},h),v.allErrors||o.if((0,e.not)(h),()=>o.break())})}}return Ct.validateAdditionalItems=i,Ct.default=n,Ct}var Gr={},qt={},ea;function ta(){if(ea)return qt;ea=1,Object.defineProperty(qt,"__esModule",{value:!0}),qt.validateTuple=void 0;const e=W(),t=Y(),r=De(),n={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(s){const{schema:a,it:o}=s;if(Array.isArray(a))return i(s,"additionalItems",a);o.items=!0,!(0,t.alwaysValidSchema)(o,a)&&s.ok((0,r.validateArray)(s))}};function i(s,a,o=s.schema){const{gen:c,parentSchema:l,data:u,keyword:v,it:m}=s;w(l),m.opts.unevaluated&&o.length&&m.items!==!0&&(m.items=t.mergeEvaluated.items(c,o.length,m.items));const y=c.name("valid"),h=c.const("len",(0,e._)`${u}.length`);o.forEach((d,_)=>{(0,t.alwaysValidSchema)(m,d)||(c.if((0,e._)`${h} > ${_}`,()=>s.subschema({keyword:v,schemaProp:_,dataProp:_},y)),s.ok(y))});function w(d){const{opts:_,errSchemaPath:f}=m,g=o.length,E=g===d.minItems&&(g===d.maxItems||d[a]===!1);if(_.strictTuples&&!E){const p=`"${v}" is ${g}-tuple, but minItems or maxItems/${a} are not specified or different at path "${f}"`;(0,t.checkStrictMode)(m,p,_.strictTuples)}}}return qt.validateTuple=i,qt.default=n,qt}var ra;function Sl(){if(ra)return Gr;ra=1,Object.defineProperty(Gr,"__esModule",{value:!0});const e=ta(),t={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:r=>(0,e.validateTuple)(r,"items")};return Gr.default=t,Gr}var Wr={},na;function Pl(){if(na)return Wr;na=1,Object.defineProperty(Wr,"__esModule",{value:!0});const e=W(),t=Y(),r=De(),n=Qi(),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:a}})=>(0,e.str)`must NOT have more than ${a} items`,params:({params:{len:a}})=>(0,e._)`{limit: ${a}}`},code(a){const{schema:o,parentSchema:c,it:l}=a,{prefixItems:u}=c;l.items=!0,!(0,t.alwaysValidSchema)(l,o)&&(u?(0,n.validateAdditionalItems)(a,u):a.ok((0,r.validateArray)(a)))}};return Wr.default=s,Wr}var Zr={},sa;function kl(){if(sa)return Zr;sa=1,Object.defineProperty(Zr,"__esModule",{value:!0});const e=W(),t=Y(),n={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:i,max:s}})=>s===void 0?(0,e.str)`must contain at least ${i} valid item(s)`:(0,e.str)`must contain at least ${i} and no more than ${s} valid item(s)`,params:({params:{min:i,max:s}})=>s===void 0?(0,e._)`{minContains: ${i}}`:(0,e._)`{minContains: ${i}, maxContains: ${s}}`},code(i){const{gen:s,schema:a,parentSchema:o,data:c,it:l}=i;let u,v;const{minContains:m,maxContains:y}=o;l.opts.next?(u=m===void 0?1:m,v=y):u=1;const h=s.const("len",(0,e._)`${c}.length`);if(i.setParams({min:u,max:v}),v===void 0&&u===0){(0,t.checkStrictMode)(l,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(v!==void 0&&u>v){(0,t.checkStrictMode)(l,'"minContains" > "maxContains" is always invalid'),i.fail();return}if((0,t.alwaysValidSchema)(l,a)){let g=(0,e._)`${h} >= ${u}`;v!==void 0&&(g=(0,e._)`${g} && ${h} <= ${v}`),i.pass(g);return}l.items=!0;const w=s.name("valid");v===void 0&&u===1?_(w,()=>s.if(w,()=>s.break())):u===0?(s.let(w,!0),v!==void 0&&s.if((0,e._)`${c}.length > 0`,d)):(s.let(w,!1),d()),i.result(w,()=>i.reset());function d(){const g=s.name("_valid"),E=s.let("count",0);_(g,()=>s.if(g,()=>f(E)))}function _(g,E){s.forRange("i",0,h,p=>{i.subschema({keyword:"contains",dataProp:p,dataPropType:t.Type.Num,compositeRule:!0},g),E()})}function f(g){s.code((0,e._)`${g}++`),v===void 0?s.if((0,e._)`${g} >= ${u}`,()=>s.assign(w,!0).break()):(s.if((0,e._)`${g} > ${v}`,()=>s.assign(w,!1).break()),u===1?s.assign(w,!0):s.if((0,e._)`${g} >= ${u}`,()=>s.assign(w,!0)))}}};return Zr.default=n,Zr}var Xn={},ia;function Rl(){return ia||(ia=1,(function(e){Object.defineProperty(e,"__esModule",{value:!0}),e.validateSchemaDeps=e.validatePropertyDeps=e.error=void 0;const t=W(),r=Y(),n=De();e.error={message:({params:{property:c,depsCount:l,deps:u}})=>{const v=l===1?"property":"properties";return(0,t.str)`must have ${v} ${u} when property ${c} is present`},params:({params:{property:c,depsCount:l,deps:u,missingProperty:v}})=>(0,t._)`{property: ${c},
11
- missingProperty: ${v},
12
- depsCount: ${l},
13
- deps: ${u}}`};const i={keyword:"dependencies",type:"object",schemaType:"object",error:e.error,code(c){const[l,u]=s(c);a(c,l),o(c,u)}};function s({schema:c}){const l={},u={};for(const v in c){if(v==="__proto__")continue;const m=Array.isArray(c[v])?l:u;m[v]=c[v]}return[l,u]}function a(c,l=c.schema){const{gen:u,data:v,it:m}=c;if(Object.keys(l).length===0)return;const y=u.let("missing");for(const h in l){const w=l[h];if(w.length===0)continue;const d=(0,n.propertyInData)(u,v,h,m.opts.ownProperties);c.setParams({property:h,depsCount:w.length,deps:w.join(", ")}),m.allErrors?u.if(d,()=>{for(const _ of w)(0,n.checkReportMissingProp)(c,_)}):(u.if((0,t._)`${d} && (${(0,n.checkMissingProp)(c,w,y)})`),(0,n.reportMissingProp)(c,y),u.else())}}e.validatePropertyDeps=a;function o(c,l=c.schema){const{gen:u,data:v,keyword:m,it:y}=c,h=u.name("valid");for(const w in l)(0,r.alwaysValidSchema)(y,l[w])||(u.if((0,n.propertyInData)(u,v,w,y.opts.ownProperties),()=>{const d=c.subschema({keyword:m,schemaProp:w},h);c.mergeValidEvaluated(d,h)},()=>u.var(h,!0)),c.ok(h))}e.validateSchemaDeps=o,e.default=i})(Xn)),Xn}var Xr={},aa;function Ol(){if(aa)return Xr;aa=1,Object.defineProperty(Xr,"__esModule",{value:!0});const e=W(),t=Y(),n={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:i})=>(0,e._)`{propertyName: ${i.propertyName}}`},code(i){const{gen:s,schema:a,data:o,it:c}=i;if((0,t.alwaysValidSchema)(c,a))return;const l=s.name("valid");s.forIn("key",o,u=>{i.setParams({propertyName:u}),i.subschema({keyword:"propertyNames",data:u,dataTypes:["string"],propertyName:u,compositeRule:!0},l),s.if((0,e.not)(l),()=>{i.error(!0),c.allErrors||s.break()})}),i.ok(l)}};return Xr.default=n,Xr}var Yr={},oa;function ca(){if(oa)return Yr;oa=1,Object.defineProperty(Yr,"__esModule",{value:!0});const e=De(),t=W(),r=lt(),n=Y(),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:a})=>(0,t._)`{additionalProperty: ${a.additionalProperty}}`},code(a){const{gen:o,schema:c,parentSchema:l,data:u,errsCount:v,it:m}=a;if(!v)throw new Error("ajv implementation error");const{allErrors:y,opts:h}=m;if(m.props=!0,h.removeAdditional!=="all"&&(0,n.alwaysValidSchema)(m,c))return;const w=(0,e.allSchemaProperties)(l.properties),d=(0,e.allSchemaProperties)(l.patternProperties);_(),a.ok((0,t._)`${v} === ${r.default.errors}`);function _(){o.forIn("key",u,$=>{!w.length&&!d.length?E($):o.if(f($),()=>E($))})}function f($){let S;if(w.length>8){const A=(0,n.schemaRefOrVal)(m,l.properties,"properties");S=(0,e.isOwnProperty)(o,A,$)}else w.length?S=(0,t.or)(...w.map(A=>(0,t._)`${$} === ${A}`)):S=t.nil;return d.length&&(S=(0,t.or)(S,...d.map(A=>(0,t._)`${(0,e.usePattern)(a,A)}.test(${$})`))),(0,t.not)(S)}function g($){o.code((0,t._)`delete ${u}[${$}]`)}function E($){if(h.removeAdditional==="all"||h.removeAdditional&&c===!1){g($);return}if(c===!1){a.setParams({additionalProperty:$}),a.error(),y||o.break();return}if(typeof c=="object"&&!(0,n.alwaysValidSchema)(m,c)){const S=o.name("valid");h.removeAdditional==="failing"?(p($,S,!1),o.if((0,t.not)(S),()=>{a.reset(),g($)})):(p($,S),y||o.if((0,t.not)(S),()=>o.break()))}}function p($,S,A){const I={keyword:"additionalProperties",dataProp:$,dataPropType:n.Type.Str};A===!1&&Object.assign(I,{compositeRule:!0,createErrors:!1,allErrors:!1}),a.subschema(I,S)}}};return Yr.default=s,Yr}var Qr={},la;function Tl(){if(la)return Qr;la=1,Object.defineProperty(Qr,"__esModule",{value:!0});const e=kr(),t=De(),r=Y(),n=ca(),i={keyword:"properties",type:"object",schemaType:"object",code(s){const{gen:a,schema:o,parentSchema:c,data:l,it:u}=s;u.opts.removeAdditional==="all"&&c.additionalProperties===void 0&&n.default.code(new e.KeywordCxt(u,n.default,"additionalProperties"));const v=(0,t.allSchemaProperties)(o);for(const d of v)u.definedProperties.add(d);u.opts.unevaluated&&v.length&&u.props!==!0&&(u.props=r.mergeEvaluated.props(a,(0,r.toHash)(v),u.props));const m=v.filter(d=>!(0,r.alwaysValidSchema)(u,o[d]));if(m.length===0)return;const y=a.name("valid");for(const d of m)h(d)?w(d):(a.if((0,t.propertyInData)(a,l,d,u.opts.ownProperties)),w(d),u.allErrors||a.else().var(y,!0),a.endIf()),s.it.definedProperties.add(d),s.ok(y);function h(d){return u.opts.useDefaults&&!u.compositeRule&&o[d].default!==void 0}function w(d){s.subschema({keyword:"properties",schemaProp:d,dataProp:d},y)}}};return Qr.default=i,Qr}var en={},ua;function Nl(){if(ua)return en;ua=1,Object.defineProperty(en,"__esModule",{value:!0});const e=De(),t=W(),r=Y(),n=Y(),i={keyword:"patternProperties",type:"object",schemaType:"object",code(s){const{gen:a,schema:o,data:c,parentSchema:l,it:u}=s,{opts:v}=u,m=(0,e.allSchemaProperties)(o),y=m.filter(E=>(0,r.alwaysValidSchema)(u,o[E]));if(m.length===0||y.length===m.length&&(!u.opts.unevaluated||u.props===!0))return;const h=v.strictSchema&&!v.allowMatchingProperties&&l.properties,w=a.name("valid");u.props!==!0&&!(u.props instanceof t.Name)&&(u.props=(0,n.evaluatedPropsToName)(a,u.props));const{props:d}=u;_();function _(){for(const E of m)h&&f(E),u.allErrors?g(E):(a.var(w,!0),g(E),a.if(w))}function f(E){for(const p in h)new RegExp(E).test(p)&&(0,r.checkStrictMode)(u,`property ${p} matches pattern ${E} (use allowMatchingProperties)`)}function g(E){a.forIn("key",c,p=>{a.if((0,t._)`${(0,e.usePattern)(s,E)}.test(${p})`,()=>{const $=y.includes(E);$||s.subschema({keyword:"patternProperties",schemaProp:E,dataProp:p,dataPropType:n.Type.Str},w),u.opts.unevaluated&&d!==!0?a.assign((0,t._)`${d}[${p}]`,!0):!$&&!u.allErrors&&a.if((0,t.not)(w),()=>a.break())})})}}};return en.default=i,en}var tn={},da;function Al(){if(da)return tn;da=1,Object.defineProperty(tn,"__esModule",{value:!0});const e=Y(),t={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(r){const{gen:n,schema:i,it:s}=r;if((0,e.alwaysValidSchema)(s,i)){r.fail();return}const a=n.name("valid");r.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},a),r.failResult(a,()=>r.reset(),()=>r.error())},error:{message:"must NOT be valid"}};return tn.default=t,tn}var rn={},fa;function jl(){if(fa)return rn;fa=1,Object.defineProperty(rn,"__esModule",{value:!0});const t={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:De().validateUnion,error:{message:"must match a schema in anyOf"}};return rn.default=t,rn}var nn={},ha;function Cl(){if(ha)return nn;ha=1,Object.defineProperty(nn,"__esModule",{value:!0});const e=W(),t=Y(),n={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:i})=>(0,e._)`{passingSchemas: ${i.passing}}`},code(i){const{gen:s,schema:a,parentSchema:o,it:c}=i;if(!Array.isArray(a))throw new Error("ajv implementation error");if(c.opts.discriminator&&o.discriminator)return;const l=a,u=s.let("valid",!1),v=s.let("passing",null),m=s.name("_valid");i.setParams({passing:v}),s.block(y),i.result(u,()=>i.reset(),()=>i.error(!0));function y(){l.forEach((h,w)=>{let d;(0,t.alwaysValidSchema)(c,h)?s.var(m,!0):d=i.subschema({keyword:"oneOf",schemaProp:w,compositeRule:!0},m),w>0&&s.if((0,e._)`${m} && ${u}`).assign(u,!1).assign(v,(0,e._)`[${v}, ${w}]`).else(),s.if(m,()=>{s.assign(u,!0),s.assign(v,w),d&&i.mergeEvaluated(d,e.Name)})})}}};return nn.default=n,nn}var sn={},pa;function ql(){if(pa)return sn;pa=1,Object.defineProperty(sn,"__esModule",{value:!0});const e=Y(),t={keyword:"allOf",schemaType:"array",code(r){const{gen:n,schema:i,it:s}=r;if(!Array.isArray(i))throw new Error("ajv implementation error");const a=n.name("valid");i.forEach((o,c)=>{if((0,e.alwaysValidSchema)(s,o))return;const l=r.subschema({keyword:"allOf",schemaProp:c},a);r.ok(a),r.mergeEvaluated(l)})}};return sn.default=t,sn}var an={},ma;function Il(){if(ma)return an;ma=1,Object.defineProperty(an,"__esModule",{value:!0});const e=W(),t=Y(),n={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:s})=>(0,e.str)`must match "${s.ifClause}" schema`,params:({params:s})=>(0,e._)`{failingKeyword: ${s.ifClause}}`},code(s){const{gen:a,parentSchema:o,it:c}=s;o.then===void 0&&o.else===void 0&&(0,t.checkStrictMode)(c,'"if" without "then" and "else" is ignored');const l=i(c,"then"),u=i(c,"else");if(!l&&!u)return;const v=a.let("valid",!0),m=a.name("_valid");if(y(),s.reset(),l&&u){const w=a.let("ifClause");s.setParams({ifClause:w}),a.if(m,h("then",w),h("else",w))}else l?a.if(m,h("then")):a.if((0,e.not)(m),h("else"));s.pass(v,()=>s.error(!0));function y(){const w=s.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},m);s.mergeEvaluated(w)}function h(w,d){return()=>{const _=s.subschema({keyword:w},m);a.assign(v,m),s.mergeValidEvaluated(_,v),d?a.assign(d,(0,e._)`${w}`):s.setParams({ifClause:w})}}}};function i(s,a){const o=s.schema[a];return o!==void 0&&!(0,t.alwaysValidSchema)(s,o)}return an.default=n,an}var on={},_a;function Dl(){if(_a)return on;_a=1,Object.defineProperty(on,"__esModule",{value:!0});const e=Y(),t={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:r,parentSchema:n,it:i}){n.if===void 0&&(0,e.checkStrictMode)(i,`"${r}" without "if" is ignored`)}};return on.default=t,on}var ya;function Ml(){if(ya)return Jr;ya=1,Object.defineProperty(Jr,"__esModule",{value:!0});const e=Qi(),t=Sl(),r=ta(),n=Pl(),i=kl(),s=Rl(),a=Ol(),o=ca(),c=Tl(),l=Nl(),u=Al(),v=jl(),m=Cl(),y=ql(),h=Il(),w=Dl();function d(_=!1){const f=[u.default,v.default,m.default,y.default,h.default,w.default,a.default,o.default,s.default,c.default,l.default];return _?f.push(t.default,n.default):f.push(e.default,r.default),f.push(i.default),f}return Jr.default=d,Jr}var cn={},ln={},ga;function Ll(){if(ga)return ln;ga=1,Object.defineProperty(ln,"__esModule",{value:!0});const e=W(),r={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:n})=>(0,e.str)`must match format "${n}"`,params:({schemaCode:n})=>(0,e._)`{format: ${n}}`},code(n,i){const{gen:s,data:a,$data:o,schema:c,schemaCode:l,it:u}=n,{opts:v,errSchemaPath:m,schemaEnv:y,self:h}=u;if(!v.validateFormats)return;o?w():d();function w(){const _=s.scopeValue("formats",{ref:h.formats,code:v.code.formats}),f=s.const("fDef",(0,e._)`${_}[${l}]`),g=s.let("fType"),E=s.let("format");s.if((0,e._)`typeof ${f} == "object" && !(${f} instanceof RegExp)`,()=>s.assign(g,(0,e._)`${f}.type || "string"`).assign(E,(0,e._)`${f}.validate`),()=>s.assign(g,(0,e._)`"string"`).assign(E,f)),n.fail$data((0,e.or)(p(),$()));function p(){return v.strictSchema===!1?e.nil:(0,e._)`${l} && !${E}`}function $(){const S=y.$async?(0,e._)`(${f}.async ? await ${E}(${a}) : ${E}(${a}))`:(0,e._)`${E}(${a})`,A=(0,e._)`(typeof ${E} == "function" ? ${S} : ${E}.test(${a}))`;return(0,e._)`${E} && ${E} !== true && ${g} === ${i} && !${A}`}}function d(){const _=h.formats[c];if(!_){p();return}if(_===!0)return;const[f,g,E]=$(_);f===i&&n.pass(S());function p(){if(v.strictSchema===!1){h.logger.warn(A());return}throw new Error(A());function A(){return`unknown format "${c}" ignored in schema at path "${m}"`}}function $(A){const I=A instanceof RegExp?(0,e.regexpCode)(A):v.code.formats?(0,e._)`${v.code.formats}${(0,e.getProperty)(c)}`:void 0,L=s.scopeValue("formats",{key:c,ref:A,code:I});return typeof A=="object"&&!(A instanceof RegExp)?[A.type||"string",A.validate,(0,e._)`${L}.validate`]:["string",A,L]}function S(){if(typeof _=="object"&&!(_ instanceof RegExp)&&_.async){if(!y.$async)throw new Error("async format in sync schema");return(0,e._)`await ${E}(${a})`}return typeof g=="function"?(0,e._)`${E}(${a})`:(0,e._)`${E}.test(${a})`}}}};return ln.default=r,ln}var va;function xl(){if(va)return cn;va=1,Object.defineProperty(cn,"__esModule",{value:!0});const t=[Ll().default];return cn.default=t,cn}var wt={},wa;function Fl(){return wa||(wa=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.contentVocabulary=wt.metadataVocabulary=void 0,wt.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],wt.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),wt}var ba;function Ul(){if(ba)return Ar;ba=1,Object.defineProperty(Ar,"__esModule",{value:!0});const e=dl(),t=El(),r=Ml(),n=xl(),i=Fl(),s=[e.default,t.default,(0,r.default)(),n.default,i.metadataVocabulary,i.contentVocabulary];return Ar.default=s,Ar}var un={},Xt={},$a;function Vl(){if($a)return Xt;$a=1,Object.defineProperty(Xt,"__esModule",{value:!0}),Xt.DiscrError=void 0;var e;return(function(t){t.Tag="tag",t.Mapping="mapping"})(e||(Xt.DiscrError=e={})),Xt}var Ea;function zl(){if(Ea)return un;Ea=1,Object.defineProperty(un,"__esModule",{value:!0});const e=W(),t=Vl(),r=Jn(),n=Tr(),i=Y(),a={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:o,tagName:c}})=>o===t.DiscrError.Tag?`tag "${c}" must be string`:`value of tag "${c}" must be in oneOf`,params:({params:{discrError:o,tag:c,tagName:l}})=>(0,e._)`{error: ${o}, tag: ${l}, tagValue: ${c}}`},code(o){const{gen:c,data:l,schema:u,parentSchema:v,it:m}=o,{oneOf:y}=v;if(!m.opts.discriminator)throw new Error("discriminator: requires discriminator option");const h=u.propertyName;if(typeof h!="string")throw new Error("discriminator: requires propertyName");if(u.mapping)throw new Error("discriminator: mapping is not supported");if(!y)throw new Error("discriminator: requires oneOf keyword");const w=c.let("valid",!1),d=c.const("tag",(0,e._)`${l}${(0,e.getProperty)(h)}`);c.if((0,e._)`typeof ${d} == "string"`,()=>_(),()=>o.error(!1,{discrError:t.DiscrError.Tag,tag:d,tagName:h})),o.ok(w);function _(){const E=g();c.if(!1);for(const p in E)c.elseIf((0,e._)`${d} === ${p}`),c.assign(w,f(E[p]));c.else(),o.error(!1,{discrError:t.DiscrError.Mapping,tag:d,tagName:h}),c.endIf()}function f(E){const p=c.name("valid"),$=o.subschema({keyword:"oneOf",schemaProp:E},p);return o.mergeEvaluated($,e.Name),p}function g(){var E;const p={},$=A(v);let S=!0;for(let x=0;x<y.length;x++){let H=y[x];if(H?.$ref&&!(0,i.schemaHasRulesButRef)(H,m.self.RULES)){const B=H.$ref;if(H=r.resolveRef.call(m.self,m.schemaEnv.root,m.baseId,B),H instanceof r.SchemaEnv&&(H=H.schema),H===void 0)throw new n.default(m.opts.uriResolver,m.baseId,B)}const z=(E=H?.properties)===null||E===void 0?void 0:E[h];if(typeof z!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${h}"`);S=S&&($||A(H)),I(z,x)}if(!S)throw new Error(`discriminator: "${h}" must be required`);return p;function A({required:x}){return Array.isArray(x)&&x.includes(h)}function I(x,H){if(x.const)L(x.const,H);else if(x.enum)for(const z of x.enum)L(z,H);else throw new Error(`discriminator: "properties/${h}" must have "const" or "enum"`)}function L(x,H){if(typeof x!="string"||x in p)throw new Error(`discriminator: "${h}" values must be unique strings`);p[x]=H}}}};return un.default=a,un}const Hl={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Sa;function Kl(){return Sa||(Sa=1,(function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=t.Ajv=void 0;const r=cl(),n=Ul(),i=zl(),s=Hl,a=["/properties"],o="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(h=>this.addVocabulary(h)),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const h=this.opts.$data?this.$dataMetaSchema(s,a):s;this.addMetaSchema(h,o,!1),this.refs["http://json-schema.org/schema"]=o}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(o)?o:void 0)}}t.Ajv=c,e.exports=t=c,e.exports.Ajv=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var l=kr();Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return l.KeywordCxt}});var u=W();Object.defineProperty(t,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var v=Bn();Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return v.default}});var m=Tr();Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return m.default}})})(wr,wr.exports)),wr.exports}var Bl=Kl();const Jl=Yc(Bl),Yt={app_id:"beanbagdb_system",meta:{name:"beanbagdb_system",description:"This is the default system app required for proper functioning of the database"},schemas:[{name:"schema",active:!0,description:"Meta-schema or the schema for defining other schemas",system_generated:!0,version:1.25,title:"Schema document",schema:{type:"object",additionalProperties:!1,properties:{system_generated:{title:"System generated schema",type:"boolean",default:!1},active:{title:"Active",description:"This indicates where new documents can be created using this schema or not. Old documents can still be edited",type:"boolean",default:!1},version:{type:"number",title:"Version",minimum:0,default:1,description:"This is an optional field.To be used primarily for system schemas"},name:{type:"string",title:"Name",minLength:4,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$",description:"This is the name of the schema.It cannot be changed later"},title:{type:"string",title:"Title",minLength:0,maxLength:1e3,description:"A title to display with records."},description:{type:"string",title:"About",minLength:0,maxLength:1e3,description:"A small description of what data in this schema stores."},schema:{type:"object",title:"JSON Schema specification",additionalProperties:!0,minProperties:1,maxProperties:50,description:"This must be a valid JSON Schema which will be used to validate documents created with this schema.See this https://tour.json-schema.org/",default:{}},settings:{type:"object",title:"Additional Settings",additionalProperties:!0,properties:{primary_keys:{title:"Primary key",type:"array",default:[],items:{type:"string"},maxItems:10,description:"Fields that makes each document unique in the schema.Leave it blank if you do not need it. You can still be able to distinguish documents using the link field and the document id."},non_editable_fields:{type:"array",title:"Non editable fields",default:[],items:{type:"string"},maxItems:50,minItems:0,description:"The list of fields whose values are added when the document is created but cannot be edited later in future."},encrypted_fields:{type:"array",title:"List of fields encrypted",default:[],items:{type:"string"},maxItems:50,description:"Once set, all the data in this field will be encrypted before storing it in the database. Encryption key must be provided during the time of BeanBagDB initialization and must be managed by the user as it is NOT stored in the database"},display_fields:{type:"array",title:"List of fields to show in short view",default:[],items:{type:"string"},maxItems:50,description:"These fields will be used when a record is displayed in short"},install_source:{type:"string",title:"Installation source",default:"human",description:"Describes how this schema was installed in database. This is determined by the system. By default the value is human. Possible value: name of the app , where it was cloned from etc..."},svg_icon25:{type:"string",title:"SVG Icon for schema",default:"human",description:"The height and width should be 25px"}},required:["primary_keys","non_editable_fields","encrypted_fields"]}},required:["name","description","schema","settings","title"]},settings:{primary_keys:["name"],non_editable_fields:["system_generated"],encrypted_fields:[],display_fields:["name","version","description","title","active"],svg_icon25:"<svg xmlns='http://www.w3.org/2000/svg' width='25' height='16' fill='currentColor' class='bi bi-database-fill-gear' viewBox='0 0 16 16'><path d='M8 1c-1.573 0-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4s.875 1.755 1.904 2.223C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777C13.125 5.755 14 5.007 14 4s-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1'/><path d='M2 7v-.839c.457.432 1.004.751 1.49.972C4.722 7.693 6.318 8 8 8s3.278-.307 4.51-.867c.486-.22 1.033-.54 1.49-.972V7c0 .424-.155.802-.411 1.133a4.51 4.51 0 0 0-4.815 1.843A12 12 0 0 1 8 10c-1.573 0-3.022-.289-4.096-.777C2.875 8.755 2 8.007 2 7m6.257 3.998L8 11c-1.682 0-3.278-.307-4.51-.867-.486-.22-1.033-.54-1.49-.972V10c0 1.007.875 1.755 1.904 2.223C4.978 12.711 6.427 13 8 13h.027a4.55 4.55 0 0 1 .23-2.002m-.002 3L8 14c-1.682 0-3.278-.307-4.51-.867-.486-.22-1.033-.54-1.49-.972V13c0 1.007.875 1.755 1.904 2.223C4.978 15.711 6.427 16 8 16c.536 0 1.058-.034 1.555-.097a4.5 4.5 0 0 1-1.3-1.905m3.631-4.538c.18-.613 1.048-.613 1.229 0l.043.148a.64.64 0 0 0 .921.382l.136-.074c.561-.306 1.175.308.87.869l-.075.136a.64.64 0 0 0 .382.92l.149.045c.612.18.612 1.048 0 1.229l-.15.043a.64.64 0 0 0-.38.921l.074.136c.305.561-.309 1.175-.87.87l-.136-.075a.64.64 0 0 0-.92.382l-.045.149c-.18.612-1.048.612-1.229 0l-.043-.15a.64.64 0 0 0-.921-.38l-.136.074c-.561.305-1.175-.309-.87-.87l.075-.136a.64.64 0 0 0-.382-.92l-.148-.045c-.613-.18-.613-1.048 0-1.229l.148-.043a.64.64 0 0 0 .382-.921l-.074-.136c-.306-.561.308-1.175.869-.87l.136.075a.64.64 0 0 0 .92-.382zM14 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0'/></svg>"}},{system_generated:!0,version:1,description:"To store user defined key. this can include anything like API tokens etc. There is a special method to fetch this. The values are encrypted",name:"system_key",title:"System key",active:!0,schema:{type:"object",additionalProperties:!0,required:["name","value"],properties:{name:{type:"string",minLength:5,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:"string",minLength:5,maxLength:5e3,pattern:`^[^
14
- \r]*$`,description:"Must be a single line string"},note:{type:"string",minLength:1,maxLength:5e3}}},settings:{primary_keys:["name"],encrypted_fields:["value"],non_editable_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-key-fill" viewBox="0 0 16 16"><path d="M3.5 11.5a3.5 3.5 0 1 1 3.163-5H14L15.5 8 14 9.5l-1-1-1 1-1-1-1 1-1-1-1 1H6.663a3.5 3.5 0 0 1-3.163 2M2.5 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'}},{version:1,system_generated:!0,description:"The system relies on these settings for proper functioning or enabling optional features.",name:"system_setting",title:"System Setting",active:!0,schema:{required:["name","value"],type:"object",additionalProperties:!0,properties:{name:{type:"string",minLength:5,maxLength:1e3,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:["array","object"]}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-gear-fill" viewBox="0 0 16 16"><path d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z"/></svg>'}},{name:"system_edge_constraint",title:"Edge constraint",system_generated:!0,active:!0,version:1,description:"To define edge constraints for simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","name"],properties:{node1:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},node2:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},name:{type:"string",minLength:1,maxLength:500,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},label:{type:"string",maxLength:500},note:{type:"string",maxLength:5e3},max_from_node1:{type:"number",default:-1},max_to_node2:{type:"number",default:-1}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-node-plus-fill" viewBox="0 0 16 16"><path d="M11 13a5 5 0 1 0-4.975-5.5H4A1.5 1.5 0 0 0 2.5 6h-1A1.5 1.5 0 0 0 0 7.5v1A1.5 1.5 0 0 0 1.5 10h1A1.5 1.5 0 0 0 4 8.5h2.025A5 5 0 0 0 11 13m.5-7.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2a.5.5 0 0 1 1 0"/></svg>'}},{name:"system_edge",title:"Edge in the system graph",active:!0,system_generated:!0,version:1.5,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","edge_name"],properties:{node1:{type:"string"},node2:{type:"string"},edge_name:{type:"string"},note:{type:"string",default:" "},level_weight:{type:"number",default:1,description:"This helps order nodes at the same level in the graph. Nodes at the same level will be ordered in ascending order"}}},settings:{primary_keys:["node1","node2","edge_name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-diagram-2-fill" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6 3.5A1.5 1.5 0 0 1 7.5 2h1A1.5 1.5 0 0 1 10 3.5v1A1.5 1.5 0 0 1 8.5 6v1H11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 5 7h2.5V6A1.5 1.5 0 0 1 6 4.5zm-3 8A1.5 1.5 0 0 1 4.5 10h1A1.5 1.5 0 0 1 7 11.5v1A1.5 1.5 0 0 1 5.5 14h-1A1.5 1.5 0 0 1 3 12.5zm6 0a1.5 1.5 0 0 1 1.5-1.5h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1A1.5 1.5 0 0 1 9 12.5z"/></svg>'}},{name:"system_media",title:"Media content",active:!0,system_generated:!0,version:1,description:"To store images as Base64",schema:{type:"object",additionalProperties:!0,required:["imageBase64","caption","source"],properties:{imageBase64:{type:"string",media:{binaryEncoding:"base64"}},caption:{type:"string"},source:{type:"string"}}},settings:{primary_keys:["caption"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-image" viewBox="0 0 16 16"><path d="M8.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/><path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2M3 2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8l-2.083-2.083a.5.5 0 0 0-.76.063L8 11 5.835 9.7a.5.5 0 0 0-.611.076L3 12z"/></svg>'}},{name:"system_log",system_generated:!0,title:"System log",active:!0,version:1.25,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["text"],properties:{text:{type:"string"},app:{type:"string"}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-clock-history" viewBox="0 0 16 16"><path d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/><path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/><path d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/></svg>'}},{name:"system_script",system_generated:!0,title:"Executable script",active:!0,version:1,description:"To create scripts that implement some logic. Can run both on browser and client.",schema:{type:"object",additionalProperties:!0,required:["script","type","version"],properties:{type:{type:"string",default:"JS"},name:{type:"string",default:"script-name",pattern:"^[a-zA-Z0-9\\-]+$"},script:{type:"string",description:"The script",default:""},usage:{type:"string",description:"Documentation",default:" "},version:{type:"number",default:.1},log_execution:{type:"boolean",default:!1}}},settings:{primary_keys:["name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-braces-asterisk" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C2.25 2 1.49 2.759 1.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6M14.886 7.9v.164c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456v-1.3c-1.114 0-1.49-.362-1.49-1.456V4.352C14.51 2.759 13.75 2 12.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6M7.5 11.5V9.207l-1.621 1.621-.707-.707L6.792 8.5H4.5v-1h2.293L5.172 5.879l.707-.707L7.5 6.792V4.5h1v2.293l1.621-1.621.707.707L9.208 7.5H11.5v1H9.207l1.621 1.621-.707.707L8.5 9.208V11.5z"/></svg>'}},{name:"system_text",system_generated:!0,title:"Plain text",active:!0,version:1,description:"Plain text nothing more",schema:{type:"object",additionalProperties:!1,required:[],properties:{text:{type:"string",default:"Text..."}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>'}}],records:[]},Yn={additionalProperties:!0,type:"object",properties:{tags:{type:"array",items:{type:"string"},default:[],maxItems:40},link:{type:"string",minLength:2,maxLength:2e3,pattern:"^[a-zA-Z0-9-]+$"},title:{type:"string",default:"Document",maxLength:1e4},ref:{type:"object",description:"This can be used by apps to add additional data for later user like version ",default:{}},location:{type:"object",description:"this can be used to add created_from and last_updated_from location to the doc",default:{}}}},Gl={additionalProperties:!0,type:"object",required:["app_id"],properties:{app_id:{type:"string"},meta:{type:"object",additionalProperties:!0},schemas:{type:"array",minItems:1},records:{type:"array",default:[]},default_setting:{type:"object",additionalProperties:!0,default:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-earmark" viewBox="0 0 16 16"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"/></svg>'}}}};class He{constructor(t){if(this.util_check_required_fields(["name","encryption_key","api","utils","db_name"],t),this.util_check_required_fields(["insert","update","delete","search","get","createIndex"],t.api),this.util_check_required_fields(["encrypt","decrypt","ping","validate_schema"],t.utils),t.encryption_key.length<20)throw new he([{message:He.error_codes.key_short}]);this.encryption_key=t.encryption_key,this.db_name=t.db_name,this.db_api=t.api,this.utils=t.utils,this.meta={database_name:t.name,backend_database:this.db_name,beanbagdb_version_db:null},this._version=this._get_current_version(),this.active=!1,this.apps={},console.log("Run ready() now")}static error_codes={key_short:"The encryption key must at least contain 20 characters",not_active:"Database is not ready. Run ready() first",schema_not_found:"Schema not found",doc_not_found:"Document with selected criteria does not exists"};static rest_enabled={ready:{use:"Makes the database ready to use"},metadata:{use:"Returns metadata related to the current BeanBagDB instance "},initialize_app:{use:"To install/initialize an external app",input:"{...app_data}"},update_indexes:{use:"Updates the indexes in the database for better searching"},create:{input:"{schema,data,meta}",use:"Creates a new doc"},read:{input:"{criteria,include_schema:false}",use:"Returns a doc. 3 ways to search for a doc : by _id, by link or by the primary key of the schema "},update:{input:"{criteria,updates}",use:"Updates a document"},delete:{input:"{criteria}",use:"Deletes a doc"},search:{input:"{criteria:{selector:{...}}}",use:"To search in the database"},get:{input:"{type,criteria}",use:"Returns special types of documents "},create_edge:{input:"{node1:{..criteria},node2:{..criteria},edge_name,edge_label}",use:"Creates a new edge in the system's simple directed graph "},util_get_now_unix_timestamp:{use:"Returns the current UNIX timestamp"},util_validate_data:{input:"{schema:{},data:{}}",use:"Validate the given data against the given schema and returns errors/validated doc"},util_validate_schema_object:{input:"{...schema_object...}",use:"Validated the schema document without inserting it in the DB"},util_generate_random_link:{use:"Returns a random link"}};metadata(){return{...this.meta,beanbagdb_version_code:this._version,ready_to_use:this.active}}async check_ready(){console.log("checking if DB is ready to be used");let t=await this.db_api.search({selector:{schema:"system_setting","data.name":"beanbagdb_system"}});if(t.docs.length>0){let r=t.docs[0];this.active=r.data.value.version==this._version,this.meta.beanbagdb_version_db=r.data.value.version}return this.active||console.log("Version mismatch.Init of default required"),this.active}async ready(t=!0){if(await this.check_ready())console.log("Ready.Set.Go");else if(t)console.log("Initializing"),await this.initialize();else throw new Error("DB cannot be used because there is a version mismatch between the DB and the script. Since automatically init flag was set to true, exiting")}async initialize(){try{let t=await this.initialize_app(Yt);return this.meta.beanbagdb_version_db=this._version,this.active=!0,t}catch(t){throw console.log("Error in initializing instance"),console.log(t),t}}async initialize_app(t){if(!t)throw new Error("app_data_input is required");let r=this.util_validate_data({schema:Gl,data:t}),n=0;r.schemas.map(u=>{n=n+u.version,u.settings.install_source=`app:${r.app_id}`}),r.records.map(u=>{n=n+u.version});let i=await this.db_api.search({selector:{schema:"system_setting","data.name":r.app_id}}),s=!0,a;if(i.docs.length>0&&(a=i.docs[0],a.data.value.version==n&&(s=!1)),!s)return a;let o=`Initializing ${r.app_id} app to v.${n}`,c=["update started"];for(let u=0;u<r.schemas.length;u++){const v=r.schemas[u].name,m=r.schemas[u];c.push(`checking.${v}`);try{let y=await this.get({type:"schema",criteria:{name:v}});if(y.data.version!=m.version){c.push(`old.${v}.v.${y.data.version}`);let h=await this.db_api.get(y._id);h.data={...m},h.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(h),await this.db_api.update(h),c.push(`new.${v}.v=${m.version}`)}else c.push(`${v}.v.${y.data.version}=latest`)}catch(y){if(y instanceof Qe){if(v=="schema"&&r.app_id=="beanbagdb_system"){let h=this._get_blank_doc("schema");h.data=m,await this.db_api.insert(h)}else{let h=Yt.schemas[0].schema,w=this._get_blank_schema_doc("schema",h,m);await this.db_api.insert(w)}c.push(`init.${v}.v=${m.version}`)}else c.push(`${v}.error.message : ${y.message} `)}}for(let u=0;u<r.records.length;u++){const v=r.records[u].schema,m=r.records[u].record,y=r.records[u].title;c.push(`checking.records.${y}`);try{let h=await this.create({schema:v,data:m,meta:r.records[u].meta});c.push(`doc.${y}.created`)}catch(h){h instanceof bt||c.push(`error in doc ${y} insertion: ${h.message}, doc: ${JSON.stringify(m)}`)}}let l={...r.meta,app_id:r.app_id,version:n};try{await this.modify_setting(r.app_id,l,"update");let u=this._get_blank_doc("system_log");u.data={text:o,steps:c,app:r.app_id},u.meta.title=o,await this.db_api.insert(u),console.log("init logged")}catch(u){throw console.log(u),console.log("error in storing/updating beanbagdb_version"),u}return l}async update_indexes(){this._check_ready_to_use();let t=await this.db_api.search({selector:{schema:"schema"}}),r=[];t.docs.map(n=>{Object.keys(n.data.schema.properties).map(i=>{r.push("data."+i)})}),await this.db_api.createIndex({index:{fields:r}})}async create(t){this._check_ready_to_use();let r=[];if(t.schema||r.push("schema is required"),t.data||r.push("data is required"),r.length>0)throw new bt(`${r.join(",")}.`);if(Object.keys(t.data).length==0)throw new bt("No data provided");try{let n=await this._insert_pre_checks(t.schema,t.data,t?.meta||{},t?.app||{},t?.settings||{}),i=await this.db_api.insert(n);return{_id:i.id,_rev:i.rev,...n}}catch(n){throw n}}async read(t){this._check_ready_to_use();let r={doc:null},n=null;if(t._id)try{let i=await this.db_api.get(t._id);r.doc=i}catch{throw new Qe(He.error_codes.doc_not_found)}else if(t.link){let i=await this.db_api.search({selector:{"meta.link":t.link}});if(i.docs.length==0)throw new Qe(He.error_codes.doc_not_found);r.doc=i.docs[0]}else if(t.hasOwnProperty("schema")&t.hasOwnProperty("data")){n=await this.get({type:"schema",criteria:{name:t.schema}});let i=n.data.settings.primary_keys,s={schema:t.schema};i.forEach(o=>{if(!t.data[o])throw new he("Incomplete Primary key set. Required field(s) : "+i.join(","));s["data."+o]=t.data[o]});let a=await this.db_api.search({selector:s});if(a.docs.length==0)throw new Qe(He.error_codes.doc_not_found);r.doc=a.docs[0]}else throw new he('Invalid criteria to read a document. Valid ways : {"schema":"schema_name","data":{...primary key}} or {"_id":""} or {"link":""} ');return n||(n=await this.get({type:"schema",criteria:{name:r.doc.schema}})),t.include_schema&&(r.schema=n.data),r.doc=await this._decrypt_doc(n.data,r.doc),r}async update(t){this._check_ready_to_use();const{criteria:r,updates:n,rev_id:i="",update_source:s="api",save_conflict:a=!0}=t;if(!r)throw new Ke("Doc search criteria not provided");if(!n)throw new Ke("No updates provided. Format {'update':{'data':{...selected fields},'meta':{},'app':{... used by apps to manage app data} }}");let o=await this.read({...r,include_schema:!0}),c=o.schema,l=o.doc;if(l.schema=="schema"&&l.data.system_generated==!0)throw new Ke("System schemas cannot be updated using this API");let u=Object.keys(c.schema.properties),v=c.settings.non_editable_fields,m=u.filter(w=>!v.includes(w)),y=!1,h=this.util_filter_object(n.data||{},m);if(Object.keys(h).length>0){let w={...l.data,...h};if(l.schema=="system_edge"&&(w=await this._create_edge(w)),w=this.util_validate_data({schema:c.schema,data:w}),c.settings.primary_keys.length>0){let d=c.settings.primary_keys,_={schema:c.name};d.map(g=>{_["data."+g]=w[g]});let f=await this.search({selector:_});if(f.docs.length>0)if(f.docs.length==1){if(f.docs[0]._id!=l._id)throw new Ke("Update not allowed. Document with the same primary key already exists")}else throw new Error("There is something wrong with the schema primary keys")}l.data=w,y=!0}if(n.meta){let w=Yn;Object.keys(w.properties);let d={...l.meta,...n.meta};if(d=this.util_validate_data({schema:w,data:d}),d.link){let _=await this.search({selector:{"meta.link":d.link}});if(_.docs.length>0)if(_.docs.length==1){if(_.docs[0]._id!=l._id)throw new Ke("Update not allowed. Document with the same link already exists")}else throw new Error("There is something wrong.")}l.meta={...d},y=!0}if(n.app&&(l.app||(l.app={}),Object.entries(n.app).forEach(([w,d])=>{if(!d||typeof d!="object"||!d.mode||!d.data)throw console.warn(`Invalid update format for ${w}`),new Ke(`Invalid update format for app ${w}. Must be an object {mode:"update|replace|append|remove", data:{} }`);switch(d.mode){case"update":l.app[w]={...l.app[w],...d.data},y=!0;break;case"replace":l.app[w]=d.data,y=!0;break;case"append":Object.entries(d.data).forEach(([_,f])=>{Array.isArray(l.app[w]?.[_])||(l.app[w]=l.app[w]||{},l.app[w][_]=[]),l.app[w][_].push(f)}),y=!0;break;case"remove":delete l.app[w],y=!0;break;default:throw new Ke(`Unknown mode: ${d.mode} app ${w}. Must be an object {mode:"update|replace|append|remove", data:{} }`)}})),y)return l=await this._encrypt_doc(c,l),l.meta.updated_on=this.util_get_now_unix_timestamp(),l.meta.updated_by=s,await this.db_api.update(l);throw new Ke("Nothing to update")}async delete(t){this._check_ready_to_use();let r=await this.read(t);if(["schema","system_setting","system_log"].includes(r.schema))throw new Error(`Deletion of ${r.schema} doc is not support yet.`);await this.db_api.delete(r.doc._id)}async search(t={}){if(this._check_ready_to_use(),!t.selector)throw new he("Invalid search query.Use {selector:{...query...}}");let r=await this.db_api.search(t);return{...{decrypt_docs:!1},...t?.options||{}}.decrypt_docs&&r.docs.length>0&&(r=await this._decrypt_docs(r)),r}async _decrypt_docs(t){const r=[...new Set(t.docs.map(a=>a.schema))];let n=await this.db_api.search({selector:{schema:"schema","data.name":{$in:r}}}),i={};n.docs.map(a=>{i[a.data.name]=a.data});let s=[];for(let a=0;a<t.docs.length;a++){const o=t.docs[a];s.push(await this._decrypt_doc(i[o.schema],o))}return{docs:s}}async get(t){const r={schema:async n=>{let i=await this.db_api.search({selector:{schema:"schema","data.name":n.name}});if(i.docs.length==0)throw new Qe(He.error_codes.schema_not_found);return i.docs[0]},schema_list:async n=>{let i=await this.db_api.search({selector:{schema:"schema"}});if(i.docs.length==0)throw new Qe(He.error_codes.schema_not_found);{let s=[];return i.docs.map(a=>{s.push({name:a.data.name,version:a.data.version,system_defined:a.data.system_generated,description:a.data.description,link:a.meta.link,title:a.data.title,_id:a._id})}),s}},schema_icons:async n=>{let i=await this.db_api.search({selector:{schema:"schema"}});if(i.docs.length==0)throw new Qe(He.error_codes.schema_not_found);{let s={};return i.docs.map(a=>{s[a.data.name]=a.data.settings.svg_icon25||""}),s}},editable_meta_schema:async n=>Yn};if(!t.type)throw new he("No type provided. Must be: "+Object.keys(r).join(","));if(Object.keys(r).includes(t.type))return await r[t.type](t?.criteria||{});throw new he("Invalid name. Must be : "+Object.keys(r).join(","))}async load_scripts(t,r){if(this._check_ready_to_use(),this.apps[t]={},r)for(let n in r)typeof r[n]=="function"&&(this.apps[t][n]=r[n].bind(null,this));else console.log("app_module is blank")}async modify_setting(t,r,n){if(!t||!r||!n)throw new Ke("All 3 inputs (setting name, value and update_mode) are required");let i=await this.db_api.search({selector:{schema:"system_setting","data.name":t}});if(!["append","update"].includes(n))throw new Ke("Invalid update_mode");if(i.docs.length>0){let s={...i.docs[0]};return Array.isArray(r)?s.data.value=n==="append"?[...s.data.value,r]:r:s.data.value=n==="append"?{...s.data.value,...r}:r,s.meta.updated_on=this.util_get_now_unix_timestamp(),await this.db_api.update(s),s}else{let s=this._get_blank_doc("system_setting");s.data={value:r,name:t},await this.db_api.insert(s)}}async _create_edge(t){console.log(t);let{node1:r,node2:n,edge_name:i,note:s="",level_weight:a=1}=t;if(this._check_ready_to_use(),!i)throw new he("edge_name required");if(!r||Object.keys(r).length==0)throw new he("node1 required");if(!n||Object.keys(n).length==0)throw new he("node2 required");typeof r=="string"&&(r={_id:r}),typeof n=="string"&&(n={_id:n});let o=await this.read(r),c=await this.read(n);if(o.doc._id==c.doc._id)throw new he("Both nodes cannot be the same");if(o.doc.schema=="system_edge"||c.doc.schema=="system_edge")throw new he("A node cannot be an existing edge document");let l;try{l=(await this.read({schema:"system_edge_constraint",data:{name:i}})).doc.data;let v=[],m=o.doc._id,y=c.doc._id,h=this._check_nodes_edge(l.node1,l.node2,o.doc.schema,c.doc.schema);h.valid?h.swapped&&(m=c.doc._id,y=o.doc._id):v.push("Invalid nodes.This config of nodes not allowed");let w=await this.search({selector:{schema:"system_edge","data.edge_name":i}});if(l.max_from_node1!=-1&&w.docs.filter(_=>_.data.node1==m).length>=l.max_from_node1&&v.push("max limit reached"),l.max_to_node2!=-1){let d=w.docs.filter(_=>_.data.node2==y);filter1.length>=l.max_from_node1&&v.push("max limit reached")}if(v.length==0)return{node1:m,node2:y,edge_name:i,note:s,level_weight:a};throw new Wl(v)}catch(u){if(u instanceof Qe){let v={node1:"*",node2:"*",name:i,note:s};return await this.create({schema:"system_edge_constraint",data:v}),{node1:o.doc._id,node2:c.doc._id,edge_name:i,note:s,level_weight:a}}else throw u}}_check_node_schema_match(t,r){return t==="*"?!0:t.startsWith("*-")?!t.slice(2).split(",").includes(r):t.split(",").includes(r)}_check_nodes_edge(t,r,n,i){const s=this._check_node_schema_match(t,n),a=this._check_node_schema_match(r,i),o=this._check_node_schema_match(r,n),c=this._check_node_schema_match(t,i);return s&&a?{valid:!0,swapped:!1}:o&&c?{valid:!0,swapped:!0}:{valid:!1,swapped:!1}}async _upgrade_schema_in_bulk(t,r=!1,n="Schema Upgrade in bulk"){let i=["schema update started"],s=!1;for(let a=0;a<t.length;a++){const o=t[a].name,c=t[a];i.push(`checking.${o}`);try{let l=await this.get({type:"schema",criteria:{name:o}});if(l.data.version!=c.version){i.push(`old.${o}.v.${l.data.version}`);let u=await this.db_api.get(l._id);u.data={...c},u.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(u),await this.db_api.update(u),i.push(`new.${o}.v=${c.version}`),s=s||!0}else i.push(`${o}.v.${l.data.version}=latest`)}catch(l){if(l instanceof Qe){let u=Yt.schemas[0].schema,v=this._get_blank_schema_doc("schema",u,c);await this.db_api.insert(v),i.push(`init.${o}.v=${c.version}`),s=s||!0}else i.push(`${o}.error.message : ${l.message} `)}}if(s&&r)try{let a=this._get_blank_doc("system_log");a.data={text:n,data:{steps:i},time:this.util_get_now_unix_timestamp()},await this.db_api.insert(a)}catch(a){console.log(a)}return{update_was_required:s,logs:i}}_get_current_version(){let t=0;if(Yt.schemas.map(r=>{t=t+r.version}),Yt.records.map(r=>{t=t+r.version}),t==NaN)throw Error("Error in system schema version numbers");return t}_check_ready_to_use(){if(!this.active)throw new Error(He.error_codes.not_active)}_get_blank_doc(t){if(!t)throw new Error("Schema name not provided for the blank doc");let r=this.util_get_now_unix_timestamp(),n=`${r}`;return{data:{},meta:{created_on:r,tags:[],link:this.util_generate_random_link(),title:n},app:{},schema:t}}_get_blank_schema_doc(t,r,n){let i=this.util_validate_data({schema:r,data:n}),s=this._get_blank_doc(t);return s.data=i,s}async _decrypt_doc(t,r){try{for(let n of t.settings.encrypted_fields)r.data[n]=await this.utils.decrypt(r.data[n],this.encryption_key);return{...r}}catch(n){throw console.log(n),new Pa([{message:n.message}])}}async _encrypt_doc(t,r){try{if(t.settings.encrypted_fields.length>0)for(let n of t.settings.encrypted_fields)r.data[n]=await this.utils.encrypt(r.data[n],this.encryption_key);return{...r}}catch(n){throw new Pa([{message:n.message}])}}async _insert_pre_checks(t,r,n={},i={},s={}){let a=await this.search({selector:{schema:"schema","data.name":t}});if(a.docs.length==0)throw new bt(`The schema "${t}" does not exists`);let o=a.docs[0].data;if(!o.active)throw new bt(`The schema "${t}" is not active`);let c;if(t!="system_edge"&&(c=this.util_validate_data({schema:o.schema,data:r})),Object.keys(n).length>0&&(n=this.util_validate_data({schema:Yn,data:n})),Object.keys(i).length>0){let u={type:"object",patternProperties:{".*":{type:"object"}},additionalProperties:!1};this.util_validate_data({schema:u,data:i})}if(n.link&&(await this.search({selector:{"meta.link":n.link}})).docs.length>0)throw new bt(`Document with the link "${n.link}" already exists in the Database.`);if(t=="schema"?this.util_validate_schema_object(c):t=="system_edge"&&(c=await this._create_edge(r)),o.settings.primary_keys.length>0){let u={schema:t};if(o.settings.primary_keys.map(m=>{u["data."+m]=c[m]}),(await this.search({selector:u})).docs.length>0)throw new bt(`Document with the given primary key (${o.settings.primary_keys.join(",")}) already exists in the schema "${t}"`)}if(o.settings.encrypted_fields.length>0)for(let u of o.settings.encrypted_fields)c[u]=await this.utils.encrypt(c[u],this.encryption_key);let l=this._get_blank_doc(t);return l.data=c,n&&(l.meta={...l.meta,...n}),i&&(l.app=i),l}util_get_now_unix_timestamp(){return Math.floor(Date.now()/1e3)}util_check_required_fields(t,r){for(const n of t)if(!r[n])throw new he(`The field ${n} is required.`)}util_filter_object(t,r){return r.reduce((n,i)=>(Object.prototype.hasOwnProperty.call(t,i)&&(n[i]=t[i]),n),{})}util_validate_data(t){if(!t.schema)throw new he("schema is required");if(!t.data)throw new he("data is required");const{valid:r,validate:n,data:i}=this.utils.validate_schema(t.schema,t.data);if(r)return i;throw new he(n.errors)}util_validate_schema_object(t){let r=[{message:"Schema validation errors "}];t.schema.type?t.schema.type!="object"&&r.push({message:"The schema.'type' value is invalid.Only 'object' allowed"}):r.push({message:"Schema must have the field schema.'type' which can only be 'object' "}),t.schema.properties?(typeof t.schema.properties!="object"&&r.push({message:"Invalid schema.properties. It must be an object and must have atleast one field inside."}),Object.keys(t.schema.properties).length==0&&r.push({message:"You must define at least one property"})):r.push({message:"The schema.'properties' object does not exists"}),t.schema.hasOwnProperty("additionalProperties")?typeof t.schema.additionalProperties!="boolean"&&r.push({message:"Invalid schema.additionalProperties. It must be a boolean value"}):r.push({message:"The schema.'additionalProperties' field is required"});const n=Object.keys(t.schema.properties);if(t.settings.primary_keys.length>0&&(t.settings.primary_keys.every(s=>n.includes(s)&&t.schema.properties[s].type!="object"&&t.schema.properties[s].type!="array")||r.push({message:"Primary keys invalid. All keys must be defined in the schema and must be non object"})),t.settings.non_editable_fields.length>0&&(t.settings.non_editable_fields.every(s=>n.includes(s))||r.push({message:"Non editable fields invalid. All fields must be defined in the schema "})),t.settings.encrypted_fields.length>0&&(t.settings.encrypted_fields.every(a=>n.includes(a)&&t.schema.properties[a].type=="string")||r.push({message:"Invalid encrypted fields. All fields must be defined in the schema and must be string "}),t.settings.encrypted_fields.every(a=>!t.settings.primary_keys.includes(a))||r.push({message:"Invalid encrypted fields.Primary key fields cannot be encrypted "})),r.length>1)throw new he(r)}util_generate_random_link(t={type:1}){return{0:()=>{const n=["rain","mars","banana","earth","kiwi","mercury","fuji","hurricane","matterhorn","snow","saturn","jupiter","peach","wind","pluto","apple","k2","storm","venus","denali","cloud","sunshine","mango","drizzle","pineapple","aconcagua","gasherbrum","apricot","neptune","fog","orange","blueberry","kilimanjaro","uranus","grape","storm","montblanc","lemon","chooyu","raspberry","cherry","thunder","vinson","breeze","elbrus","everest","parbat","makalu","nanga","kangchenjunga","lightning","cyclone","comet","asteroid","pomegranate","nectarine","clementine","strawberry","tornado","avalanche","andes","rockies","himalayas","pyrenees","carpathians","cascade","etna","vesuvius","volcano","tundra","whirlwind","iceberg","eclipse","zephyr","tropic","monsoon","aurora"];return Array.from({length:3},()=>n[Math.floor(Math.random()*n.length)]).join("-")},1:()=>{const n=Math.floor(Math.random()*3)+6;return Math.floor(Math.random()*Math.pow(16,n)).toString(16).padStart(n,"0")}}[t.type]()}}class he extends Error{constructor(t=[]){let r;Array.isArray(t)?r=t.map(i=>` ${(i.instancePath||" ").replace("/","")} ${i.message} `):r=[t];let n=`Validation failed with error(s): ${r.join(",")}`;super(n),this.name="ValidationError",this.errors=t}}class Ke extends Error{constructor(t=[]){let r;Array.isArray(t)?r=t.map(i=>` ${(i.instancePath||" ").replace("/","")} ${i.message} `):r=[t];let n=`Error in document update. ${r.join(",")}`;super(n),this.name="DocUpdateError",this.errors=t}}class bt extends Error{constructor(t=[]){let r;Array.isArray(t)?r=t.map(i=>` ${(i.instancePath||" ").replace("/","")} ${i.message} `):r=[t];let n=`Error in document creation. ${r.join(",")}`;super(n),this.name="DocCreationError",this.errors=t}}class Qe extends Error{constructor(t=[]){let r;Array.isArray(t)?r=t.map(i=>` ${(i.instancePath||" ").replace("/","")} ${i.message} `):r=[t];let n=`Error in fetching document. Criteria : ${r.join(",")}`;super(n),this.name="DocNotFoundError",this.errors=t}}class Pa extends Error{constructor(t=[]){let r;Array.isArray(t)?r=t.map(i=>` ${(i.instancePath||" ").replace("/","")} ${i.message} `):r=[t];let n=`Error in encryption/decryption of data : ${r.join(",")}`;super(n),this.name="EncryptionError",this.errors=t}}class Wl extends Error{constructor(t=[]){let r;Array.isArray(t)?r=t.map(i=>` ${(i.instancePath||" ").replace("/","")} ${i.message} `):r=[t];let n=`Error in relation of the simple digraph : ${r.join(",")}`;super(n),this.name="RelationError",this.errors=t}}const Zl=DB=async e=>{if(!e.url)throw new Error("No DB URL provided");if(!e.name)throw new Error("No DB name provided");if(!e.encryption_key)throw new Error("No encryption key provided");let t=e.url,r=e.name;const n=e.url.match(/^(https?:\/\/[^\/]+(?:\/[^\/]+)*)\/([^\/]+)$/);n&&(t=n[1],r=e.name||n[2]);const i=`${t}/${r}`,s=se.create({baseURL:i,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"}});try{await s.get("/")}catch(c){if(c.response?.status===404)await se.put(`${t}/${r}`);else throw c}const a={db_name:"couchdb-rest",name:r,encryption_key:e.encryption_key,api:{insert:async c=>(await s.post("/",c)).data,update:async c=>{if(!c._id||!c._rev)throw new Error("Document must have _id and _rev for update");return(await s.put(`/${c._id}`,c)).data},search:async c=>(await s.post("_find",c)).data,get:async c=>(await s.get(`/${c}`)).data,createIndex:async c=>(await s.post("_index",c)).data,delete:async c=>{const l=await s.get(`/${c}`);return(await s.delete(`/${c}?rev=${l._rev}`)).data}},utils:{encrypt:async(c,l)=>{const u=new TextEncoder,v=u.encode(c),m=u.encode(l);if(![16,24,32].includes(m.length))throw new Error("Encryption key must be 16, 24, or 32 bytes long.");const y=await crypto.subtle.importKey("raw",m,{name:"AES-GCM"},!1,["encrypt"]),h=crypto.getRandomValues(new Uint8Array(12)),w=await crypto.subtle.encrypt({name:"AES-GCM",iv:h},y,v),d=new Uint8Array(w),_=btoa(String.fromCharCode(...d));return`${btoa(String.fromCharCode(...h))}:${_}`},decrypt:async(c,l)=>{const[u,v]=c.split(":"),m=Uint8Array.from(atob(u),f=>f.charCodeAt(0)),y=Uint8Array.from(atob(v),f=>f.charCodeAt(0)),h=new TextEncoder,w=await crypto.subtle.importKey("raw",h.encode(l),{name:"AES-GCM"},!1,["decrypt"]),d=await crypto.subtle.decrypt({name:"AES-GCM",iv:m},w,y);return new TextDecoder().decode(d)},ping:async()=>{try{return await s.get("/"),!0}catch{return!1}},validate_schema:(c,l)=>{const u=new Jl({code:{esm:!0},strict:!1,useDefaults:!0}),v={...l},m=u.compile(c);return{valid:m(v),validate:m,data:v}}}},o=new He(a);return await o.ready(!1),o},Xl="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(Xl);const Yl=2,ka="[",Ra="[!",Oa="]",Qt={},pe=Symbol(),Qn=!1;var Ql=Array.isArray,eu=Array.prototype.indexOf,tu=Array.from,dn=Object.keys,fn=Object.defineProperty,$t=Object.getOwnPropertyDescriptor,ru=Object.prototype,nu=Array.prototype,su=Object.getPrototypeOf,Ta=Object.isExtensible;function iu(e){for(var t=0;t<e.length;t++)e[t]()}function Na(){var e,t,r=new Promise((n,i)=>{e=n,t=i});return{promise:r,resolve:e,reject:t}}const le=2,Aa=4,es=8,au=1<<24,et=16,Et=32,dt=64,hn=128,Me=512,ye=1024,ke=2048,Be=4096,ft=8192,tt=16384,ts=32768,pn=65536,ja=1<<17,Ca=1<<18,St=1<<19,ou=1<<20,Pt=32768,rs=1<<21,ns=1<<22,ht=1<<23,mn=Symbol("$state"),qa=Symbol("legacy props"),It=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},Ia=3,_n=8;function cu(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function lu(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function uu(){throw new Error("https://svelte.dev/e/hydration_failed")}function du(e){throw new Error("https://svelte.dev/e/props_invalid_value")}function fu(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function hu(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function pu(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function mu(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ss(e){console.warn("https://svelte.dev/e/hydration_mismatch")}function _u(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let me=!1;function yn(e){me=e}let ne;function rt(e){if(e===null)throw ss(),Qt;return ne=e}function Da(){return rt(it(ne))}function is(e){if(me){if(it(ne)!==null)throw ss(),Qt;ne=e}}function Ma(e=1){if(me){for(var t=e,r=ne;t--;)r=it(r);ne=r}}function yu(e=!0){for(var t=0,r=ne;;){if(r.nodeType===_n){var n=r.data;if(n===Oa){if(t===0)return r;t-=1}else(n===ka||n===Ra)&&(t+=1)}var i=it(r);e&&r.remove(),r=i}}function La(e){return e===this.v}function gu(e,t){return e!=e?t==t:e!==t||e!==null&&typeof e=="object"||typeof e=="function"}function vu(e){return!gu(e,this.v)}let wu=!1,Le=null;function Dt(e){Le=e}function xa(e,t=!1,r){Le={p:Le,i:!1,c:null,e:null,s:e,x:null,l:null}}function Fa(e){var t=Le,r=t.e;if(r!==null){t.e=null;for(var n of r)Mu(n)}return e!==void 0&&(t.x=e),t.i=!0,Le=t.p,e??{}}function Ua(){return!0}let kt=[];function Va(){var e=kt;kt=[],iu(e)}function as(e){if(kt.length===0&&!er){var t=kt;queueMicrotask(()=>{t===kt&&Va()})}kt.push(e)}function bu(){for(;kt.length>0;)Va()}function za(e){var t=re;if(t===null)return Q.f|=ht,e;if((t.f&ts)===0){if((t.f&hn)===0)throw e;t.b.error(e)}else Mt(e,t)}function Mt(e,t){for(;t!==null;){if((t.f&hn)!==0)try{t.b.error(e);return}catch(r){e=r}t=t.parent}throw e}const gn=new Set;let ie=null,Te=null,Ne=[],vn=null,os=!1,er=!1;class xe{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#c=0;#s=0;#l=null;#a=new Set;#n=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#s>0}process(t){Ne=[],this.apply();var r={parent:null,effect:null,effects:[],render_effects:[]};for(const n of t)this.#r(n,r);this.is_fork||this.#u(),this.is_deferred()?(this.#i(r.effects),this.#i(r.render_effects)):(ie=null,Ka(r.render_effects),Ka(r.effects),this.#l?.resolve()),Te=null}#r(t,r){t.f^=ye;for(var n=t.first;n!==null;){var i=n.f,s=(i&(Et|dt))!==0,a=s&&(i&ye)!==0,o=a||(i&ft)!==0||this.skipped_effects.has(n);if((n.f&hn)!==0&&n.b?.is_pending()&&(r={parent:r,effect:n,effects:[],render_effects:[]}),!o&&n.fn!==null){s?n.f^=ye:(i&Aa)!==0?r.effects.push(n):or(n)&&((n.f&et)!==0&&this.#a.add(n),cr(n));var c=n.first;if(c!==null){n=c;continue}}var l=n.parent;for(n=n.next;n===null&&l!==null;)l===r.effect&&(this.#i(r.effects),this.#i(r.render_effects),r=r.parent),n=l.next,l=l.parent}}#i(t){for(const r of t)(r.f&ke)!==0?this.#a.add(r):(r.f&Be)!==0&&this.#n.add(r),this.#o(r.deps),ve(r,ye)}#o(t){if(t!==null)for(const r of t)(r.f&le)===0||(r.f&Pt)===0||(r.f^=Pt,this.#o(r.deps))}capture(t,r){this.previous.has(t)||this.previous.set(t,r),(t.f&ht)===0&&(this.current.set(t,t.v),Te?.set(t,t.v))}activate(){ie=this,this.apply()}deactivate(){ie===this&&(ie=null,Te=null)}flush(){if(this.activate(),Ne.length>0){if(Ha(),ie!==null&&ie!==this)return}else this.#c===0&&this.process([]);this.deactivate()}discard(){for(const t of this.#e)t(this);this.#e.clear()}#u(){if(this.#s===0){for(const t of this.#t)t();this.#t.clear()}this.#c===0&&this.#d()}#d(){if(gn.size>1){this.previous.clear();var t=Te,r=!0,n={parent:null,effect:null,effects:[],render_effects:[]};for(const s of gn){if(s===this){r=!1;continue}const a=[];for(const[c,l]of this.current){if(s.current.has(c))if(r&&l!==s.current.get(c))s.current.set(c,l);else continue;a.push(c)}if(a.length===0)continue;const o=[...s.current.keys()].filter(c=>!this.current.has(c));if(o.length>0){var i=Ne;Ne=[];const c=new Set,l=new Map;for(const u of a)Ba(u,o,c,l);if(Ne.length>0){ie=s,s.apply();for(const u of Ne)s.#r(u,n);s.deactivate()}Ne=i}}ie=null,Te=t}this.committed=!0,gn.delete(this)}increment(t){this.#c+=1,t&&(this.#s+=1)}decrement(t){this.#c-=1,t&&(this.#s-=1),this.revive()}revive(){for(const t of this.#a)this.#n.delete(t),ve(t,ke),Lt(t);for(const t of this.#n)ve(t,Be),Lt(t);this.flush()}oncommit(t){this.#t.add(t)}ondiscard(t){this.#e.add(t)}settled(){return(this.#l??=Na()).promise}static ensure(){if(ie===null){const t=ie=new xe;gn.add(ie),er||xe.enqueue(()=>{ie===t&&t.flush()})}return ie}static enqueue(t){as(t)}apply(){}}function cs(e){var t=er;er=!0;try{for(var r;;){if(bu(),Ne.length===0&&(ie?.flush(),Ne.length===0))return vn=null,r;Ha()}}finally{er=t}}function Ha(){var e=Ot;os=!0;var t=null;try{var r=0;for(En(!0);Ne.length>0;){var n=xe.ensure();if(r++>1e3){var i,s;$u()}n.process(Ne),pt.clear()}}finally{os=!1,En(e),vn=null}}function $u(){try{lu()}catch(e){Mt(e,vn)}}let nt=null;function Ka(e){var t=e.length;if(t!==0){for(var r=0;r<t;){var n=e[r++];if((n.f&(tt|ft))===0&&or(n)&&(nt=new Set,cr(n),n.deps===null&&n.first===null&&n.nodes===null&&(n.teardown===null&&n.ac===null?oo(n):n.fn=null),nt?.size>0)){pt.clear();for(const i of nt){if((i.f&(tt|ft))!==0)continue;const s=[i];let a=i.parent;for(;a!==null;)nt.has(a)&&(nt.delete(a),s.push(a)),a=a.parent;for(let o=s.length-1;o>=0;o--){const c=s[o];(c.f&(tt|ft))===0&&cr(c)}}nt.clear()}}nt=null}}function Ba(e,t,r,n){if(!r.has(e)&&(r.add(e),e.reactions!==null))for(const i of e.reactions){const s=i.f;(s&le)!==0?Ba(i,t,r,n):(s&(ns|et))!==0&&(s&ke)===0&&Ja(i,t,n)&&(ve(i,ke),Lt(i))}}function Ja(e,t,r){const n=r.get(e);if(n!==void 0)return n;if(e.deps!==null)for(const i of e.deps){if(t.includes(i))return!0;if((i.f&le)!==0&&Ja(i,t,r))return r.set(i,!0),!0}return r.set(e,!1),!1}function Lt(e){for(var t=vn=e;t.parent!==null;){t=t.parent;var r=t.f;if(os&&t===re&&(r&et)!==0&&(r&Ca)===0)return;if((r&(dt|Et))!==0){if((r&ye)===0)return;t.f^=ye}}Ne.push(t)}function Eu(e){let t=0,r=tr(0),n;return()=>{ir()&&(Oe(r),so(()=>(t===0&&(n=Wu(()=>e(()=>rr(r)))),t+=1,()=>{as(()=>{t-=1,t===0&&(n?.(),n=void 0,rr(r))})})))}}var Su=pn|St|hn;function Pu(e,t,r){new ku(e,t,r)}class ku{parent;#t=!1;#e;#c=me?ne:null;#s;#l;#a;#n=null;#r=null;#i=null;#o=null;#u=null;#d=0;#f=0;#p=!1;#h=null;#v=Eu(()=>(this.#h=tr(this.#d),()=>{this.#h=null}));constructor(t,r,n){this.#e=t,this.#s=r,this.#l=n,this.parent=re.b,this.#t=!!this.#s.pending,this.#a=Vu(()=>{if(re.b=this,me){const s=this.#c;Da(),s.nodeType===_n&&s.data===Ra?this.#b():this.#w()}else{var i=this.#y();try{this.#n=Rt(()=>n(i))}catch(s){this.error(s)}this.#f>0?this.#_():this.#t=!1}return()=>{this.#u?.remove()}},Su),me&&(this.#e=ne)}#w(){try{this.#n=Rt(()=>this.#l(this.#e))}catch(t){this.error(t)}this.#t=!1}#b(){const t=this.#s.pending;t&&(this.#r=Rt(()=>t(this.#e)),xe.enqueue(()=>{var r=this.#y();this.#n=this.#m(()=>(xe.ensure(),Rt(()=>this.#l(r)))),this.#f>0?this.#_():($n(this.#r,()=>{this.#r=null}),this.#t=!1)}))}#y(){var t=this.#e;return this.#t&&(this.#u=nr(),this.#e.before(this.#u),t=this.#u),t}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#s.pending}#m(t){var r=re,n=Q,i=Le;We(this.#a),$e(this.#a),Dt(this.#a.ctx);try{return t()}catch(s){return za(s),null}finally{We(r),$e(n),Dt(i)}}#_(){const t=this.#s.pending;this.#n!==null&&(this.#o=document.createDocumentFragment(),this.#o.append(this.#u),Ku(this.#n,this.#o)),this.#r===null&&(this.#r=Rt(()=>t(this.#e)))}#g(t){if(!this.has_pending_snippet()){this.parent&&this.parent.#g(t);return}this.#f+=t,this.#f===0&&(this.#t=!1,this.#r&&$n(this.#r,()=>{this.#r=null}),this.#o&&(this.#e.before(this.#o),this.#o=null))}update_pending_count(t){this.#g(t),this.#d+=t,this.#h&&bn(this.#h,this.#d)}get_effect_pending(){return this.#v(),Oe(this.#h)}error(t){var r=this.#s.onerror;let n=this.#s.failed;if(this.#p||!r&&!n)throw t;this.#n&&(Fe(this.#n),this.#n=null),this.#r&&(Fe(this.#r),this.#r=null),this.#i&&(Fe(this.#i),this.#i=null),me&&(rt(this.#c),Ma(),rt(yu()));var i=!1,s=!1;const a=()=>{if(i){_u();return}i=!0,s&&mu(),xe.ensure(),this.#d=0,this.#i!==null&&$n(this.#i,()=>{this.#i=null}),this.#t=this.has_pending_snippet(),this.#n=this.#m(()=>(this.#p=!1,Rt(()=>this.#l(this.#e)))),this.#f>0?this.#_():this.#t=!1};var o=Q;try{$e(null),s=!0,r?.(t,a),s=!1}catch(c){Mt(c,this.#a&&this.#a.parent)}finally{$e(o)}n&&as(()=>{this.#i=this.#m(()=>{xe.ensure(),this.#p=!0;try{return Rt(()=>{n(this.#e,()=>t,()=>a)})}catch(c){return Mt(c,this.#a.parent),null}finally{this.#p=!1}})})}}function Ru(e,t,r,n){const i=Ga;if(r.length===0&&e.length===0){n(t.map(i));return}var s=ie,a=re,o=Ou();function c(){Promise.all(r.map(l=>Tu(l))).then(l=>{o();try{n([...t.map(i),...l])}catch(u){(a.f&tt)===0&&Mt(u,a)}s?.deactivate(),wn()}).catch(l=>{Mt(l,a)})}e.length>0?Promise.all(e).then(()=>{o();try{return c()}finally{s?.deactivate(),wn()}}):c()}function Ou(){var e=re,t=Q,r=Le,n=ie;return function(s=!0){We(e),$e(t),Dt(r),s&&n?.activate()}}function wn(){We(null),$e(null),Dt(null)}function Ga(e){var t=le|ke,r=Q!==null&&(Q.f&le)!==0?Q:null;return re!==null&&(re.f|=St),{ctx:Le,deps:null,effects:null,equals:La,f:t,fn:e,reactions:null,rv:0,v:pe,wv:0,parent:r??re,ac:null}}function Tu(e,t){let r=re;r===null&&cu();var n=r.b,i=void 0,s=tr(pe),a=!Q,o=new Map;return Fu(()=>{var c=Na();i=c.promise;try{Promise.resolve(e()).then(c.resolve,c.reject).then(()=>{l===ie&&l.committed&&l.deactivate(),wn()})}catch(m){c.reject(m),wn()}var l=ie;if(a){var u=!n.is_pending();n.update_pending_count(1),l.increment(u),o.get(l)?.reject(It),o.delete(l),o.set(l,c)}const v=(m,y=void 0)=>{if(l.activate(),y)y!==It&&(s.f|=ht,bn(s,y));else{(s.f&ht)!==0&&(s.f^=ht),bn(s,m);for(const[h,w]of o){if(o.delete(h),h===l)break;w.reject(It)}}a&&(n.update_pending_count(-1),l.decrement(u))};c.promise.then(v,m=>v(null,m||"unknown"))}),Du(()=>{for(const c of o.values())c.reject(It)}),new Promise(c=>{function l(u){function v(){u===i?c(s):l(i)}u.then(v,v)}l(i)})}function Wa(e){var t=e.effects;if(t!==null){e.effects=null;for(var r=0;r<t.length;r+=1)Fe(t[r])}}function Nu(e){for(var t=e.parent;t!==null;){if((t.f&le)===0)return(t.f&tt)===0?t:null;t=t.parent}return null}function ls(e){var t,r=re;We(Nu(e));try{e.f&=~Pt,Wa(e),t=mo(e)}finally{We(r)}return t}function Za(e){var t=ls(e);if(e.equals(t)||(ie?.is_fork||(e.v=t),e.wv=ho()),!Ft)if(Te!==null)(ir()||ie?.is_fork)&&Te.set(e,t);else{var r=(e.f&Me)===0?Be:ye;ve(e,r)}}let us=new Set;const pt=new Map;let Xa=!1;function tr(e,t){var r={f:0,v:e,reactions:null,equals:La,rv:0,wv:0};return r}function st(e,t){const r=tr(e);return Bu(r),r}function Au(e,t=!1,r=!0){const n=tr(e);return t||(n.equals=vu),n}function Je(e,t,r=!1){Q!==null&&(!Ge||(Q.f&ja)!==0)&&Ua()&&(Q.f&(le|et|ns|ja))!==0&&!ot?.includes(e)&&pu();let n=r?xt(t):t;return bn(e,n)}function bn(e,t){if(!e.equals(t)){var r=e.v;Ft?pt.set(e,t):pt.set(e,r),e.v=t;var n=xe.ensure();n.capture(e,r),(e.f&le)!==0&&((e.f&ke)!==0&&ls(e),ve(e,(e.f&Me)!==0?ye:Be)),e.wv=ho(),Ya(e,ke),re!==null&&(re.f&ye)!==0&&(re.f&(Et|dt))===0&&(Ae===null?Ju([e]):Ae.push(e)),!n.is_fork&&us.size>0&&!Xa&&ju()}return t}function ju(){Xa=!1;var e=Ot;En(!0);const t=Array.from(us);try{for(const r of t)(r.f&ye)!==0&&ve(r,Be),or(r)&&cr(r)}finally{En(e)}us.clear()}function rr(e){Je(e,e.v+1)}function Ya(e,t){var r=e.reactions;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i],a=s.f,o=(a&ke)===0;if(o&&ve(s,t),(a&le)!==0){var c=s;Te?.delete(c),(a&Pt)===0&&(a&Me&&(s.f|=Pt),Ya(c,Be))}else o&&((a&et)!==0&&nt!==null&&nt.add(s),Lt(s))}}function xt(e){if(typeof e!="object"||e===null||mn in e)return e;const t=su(e);if(t!==ru&&t!==nu)return e;var r=new Map,n=Ql(e),i=st(0),s=Tt,a=o=>{if(Tt===s)return o();var c=Q,l=Tt;$e(null),fo(s);var u=o();return $e(c),fo(l),u};return n&&r.set("length",st(e.length)),new Proxy(e,{defineProperty(o,c,l){(!("value"in l)||l.configurable===!1||l.enumerable===!1||l.writable===!1)&&fu();var u=r.get(c);return u===void 0?u=a(()=>{var v=st(l.value);return r.set(c,v),v}):Je(u,l.value,!0),!0},deleteProperty(o,c){var l=r.get(c);if(l===void 0){if(c in o){const u=a(()=>st(pe));r.set(c,u),rr(i)}}else Je(l,pe),rr(i);return!0},get(o,c,l){if(c===mn)return e;var u=r.get(c),v=c in o;if(u===void 0&&(!v||$t(o,c)?.writable)&&(u=a(()=>{var y=xt(v?o[c]:pe),h=st(y);return h}),r.set(c,u)),u!==void 0){var m=Oe(u);return m===pe?void 0:m}return Reflect.get(o,c,l)},getOwnPropertyDescriptor(o,c){var l=Reflect.getOwnPropertyDescriptor(o,c);if(l&&"value"in l){var u=r.get(c);u&&(l.value=Oe(u))}else if(l===void 0){var v=r.get(c),m=v?.v;if(v!==void 0&&m!==pe)return{enumerable:!0,configurable:!0,value:m,writable:!0}}return l},has(o,c){if(c===mn)return!0;var l=r.get(c),u=l!==void 0&&l.v!==pe||Reflect.has(o,c);if(l!==void 0||re!==null&&(!u||$t(o,c)?.writable)){l===void 0&&(l=a(()=>{var m=u?xt(o[c]):pe,y=st(m);return y}),r.set(c,l));var v=Oe(l);if(v===pe)return!1}return u},set(o,c,l,u){var v=r.get(c),m=c in o;if(n&&c==="length")for(var y=l;y<v.v;y+=1){var h=r.get(y+"");h!==void 0?Je(h,pe):y in o&&(h=a(()=>st(pe)),r.set(y+"",h))}if(v===void 0)(!m||$t(o,c)?.writable)&&(v=a(()=>st(void 0)),Je(v,xt(l)),r.set(c,v));else{m=v.v!==pe;var w=a(()=>xt(l));Je(v,w)}var d=Reflect.getOwnPropertyDescriptor(o,c);if(d?.set&&d.set.call(u,l),!m){if(n&&typeof c=="string"){var _=r.get("length"),f=Number(c);Number.isInteger(f)&&f>=_.v&&Je(_,f+1)}rr(i)}return!0},ownKeys(o){Oe(i);var c=Reflect.ownKeys(o).filter(v=>{var m=r.get(v);return m===void 0||m.v!==pe});for(var[l,u]of r)u.v!==pe&&!(l in o)&&c.push(l);return c},setPrototypeOf(){hu()}})}var Qa,eo,to,ro;function ds(){if(Qa===void 0){Qa=window,eo=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,r=Text.prototype;to=$t(t,"firstChild").get,ro=$t(t,"nextSibling").get,Ta(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),Ta(r)&&(r.__t=void 0)}}function nr(e=""){return document.createTextNode(e)}function sr(e){return to.call(e)}function it(e){return ro.call(e)}function fs(e,t){if(!me)return sr(e);var r=sr(ne);return r===null&&(r=ne.appendChild(nr())),rt(r),r}function Cu(e,t=!1){if(!me){var r=sr(e);return r instanceof Comment&&r.data===""?it(r):r}if(t&&ne?.nodeType!==Ia){var n=nr();return ne?.before(n),rt(n),n}return ne}function hs(e,t=1,r=!1){let n=me?ne:e;for(var i;t--;)i=n,n=it(n);if(!me)return n;if(r&&n?.nodeType!==Ia){var s=nr();return n===null?i?.after(s):n.before(s),rt(s),s}return rt(n),n}function qu(e){e.textContent=""}function no(e){var t=Q,r=re;$e(null),We(null);try{return e()}finally{$e(t),We(r)}}function Iu(e,t){var r=t.last;r===null?t.last=t.first=e:(r.next=e,e.prev=r,t.last=e)}function at(e,t,r){var n=re;n!==null&&(n.f&ft)!==0&&(e|=ft);var i={ctx:Le,deps:null,nodes:null,f:e|ke|Me,first:null,fn:t,last:null,next:null,parent:n,b:n&&n.b,prev:null,teardown:null,wv:0,ac:null};if(r)try{cr(i),i.f|=ts}catch(o){throw Fe(i),o}else t!==null&&Lt(i);var s=i;if(r&&s.deps===null&&s.teardown===null&&s.nodes===null&&s.first===s.last&&(s.f&St)===0&&(s=s.first,(e&et)!==0&&(e&pn)!==0&&s!==null&&(s.f|=pn)),s!==null&&(s.parent=n,n!==null&&Iu(s,n),Q!==null&&(Q.f&le)!==0&&(e&dt)===0)){var a=Q;(a.effects??=[]).push(s)}return i}function ir(){return Q!==null&&!Ge}function Du(e){const t=at(es,null,!1);return ve(t,ye),t.teardown=e,t}function Mu(e){return at(Aa|ou,e,!1)}function Lu(e){xe.ensure();const t=at(dt|St,e,!0);return()=>{Fe(t)}}function xu(e){xe.ensure();const t=at(dt|St,e,!0);return(r={})=>new Promise(n=>{r.outro?$n(t,()=>{Fe(t),n(void 0)}):(Fe(t),n(void 0))})}function Fu(e){return at(ns|St,e,!0)}function so(e,t=0){return at(es|t,e,!0)}function Uu(e,t=[],r=[],n=[]){Ru(n,t,r,i=>{at(es,()=>e(...i.map(Oe)),!0)})}function Vu(e,t=0){var r=at(et|t,e,!0);return r}function Rt(e){return at(Et|St,e,!0)}function io(e){var t=e.teardown;if(t!==null){const r=Ft,n=Q;lo(!0),$e(null);try{t.call(null)}finally{lo(r),$e(n)}}}function ao(e,t=!1){var r=e.first;for(e.first=e.last=null;r!==null;){const i=r.ac;i!==null&&no(()=>{i.abort(It)});var n=r.next;(r.f&dt)!==0?r.parent=null:Fe(r,t),r=n}}function zu(e){for(var t=e.first;t!==null;){var r=t.next;(t.f&Et)===0&&Fe(t),t=r}}function Fe(e,t=!0){var r=!1;(t||(e.f&Ca)!==0)&&e.nodes!==null&&e.nodes.end!==null&&(Hu(e.nodes.start,e.nodes.end),r=!0),ao(e,t&&!r),Sn(e,0),ve(e,tt);var n=e.nodes&&e.nodes.t;if(n!==null)for(const s of n)s.stop();io(e);var i=e.parent;i!==null&&i.first!==null&&oo(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes=e.ac=null}function Hu(e,t){for(;e!==null;){var r=e===t?null:it(e);e.remove(),e=r}}function oo(e){var t=e.parent,r=e.prev,n=e.next;r!==null&&(r.next=n),n!==null&&(n.prev=r),t!==null&&(t.first===e&&(t.first=n),t.last===e&&(t.last=r))}function $n(e,t,r=!0){var n=[];co(e,n,!0);var i=()=>{r&&Fe(e),t&&t()},s=n.length;if(s>0){var a=()=>--s||i();for(var o of n)o.out(a)}else i()}function co(e,t,r){if((e.f&ft)===0){e.f^=ft;var n=e.nodes&&e.nodes.t;if(n!==null)for(const o of n)(o.is_global||r)&&t.push(o);for(var i=e.first;i!==null;){var s=i.next,a=(i.f&pn)!==0||(i.f&Et)!==0&&(e.f&et)!==0;co(i,t,a?r:!1),i=s}}}function Ku(e,t){if(e.nodes)for(var r=e.nodes.start,n=e.nodes.end;r!==null;){var i=r===n?null:it(r);t.append(r),r=i}}let Ot=!1;function En(e){Ot=e}let Ft=!1;function lo(e){Ft=e}let Q=null,Ge=!1;function $e(e){Q=e}let re=null;function We(e){re=e}let ot=null;function Bu(e){Q!==null&&(ot===null?ot=[e]:ot.push(e))}let ge=null,Re=0,Ae=null;function Ju(e){Ae=e}let uo=1,ar=0,Tt=ar;function fo(e){Tt=e}function ho(){return++uo}function or(e){var t=e.f;if((t&ke)!==0)return!0;if(t&le&&(e.f&=~Pt),(t&Be)!==0){var r=e.deps;if(r!==null)for(var n=r.length,i=0;i<n;i++){var s=r[i];if(or(s)&&Za(s),s.wv>e.wv)return!0}(t&Me)!==0&&Te===null&&ve(e,ye)}return!1}function po(e,t,r=!0){var n=e.reactions;if(n!==null&&!ot?.includes(e))for(var i=0;i<n.length;i++){var s=n[i];(s.f&le)!==0?po(s,t,!1):t===s&&(r?ve(s,ke):(s.f&ye)!==0&&ve(s,Be),Lt(s))}}function mo(e){var t=ge,r=Re,n=Ae,i=Q,s=ot,a=Le,o=Ge,c=Tt,l=e.f;ge=null,Re=0,Ae=null,Q=(l&(Et|dt))===0?e:null,ot=null,Dt(e.ctx),Ge=!1,Tt=++ar,e.ac!==null&&(no(()=>{e.ac.abort(It)}),e.ac=null);try{e.f|=rs;var u=e.fn,v=u(),m=e.deps;if(ge!==null){var y;if(Sn(e,Re),m!==null&&Re>0)for(m.length=Re+ge.length,y=0;y<ge.length;y++)m[Re+y]=ge[y];else e.deps=m=ge;if(ir()&&(e.f&Me)!==0)for(y=Re;y<m.length;y++)(m[y].reactions??=[]).push(e)}else m!==null&&Re<m.length&&(Sn(e,Re),m.length=Re);if(Ua()&&Ae!==null&&!Ge&&m!==null&&(e.f&(le|Be|ke))===0)for(y=0;y<Ae.length;y++)po(Ae[y],e);return i!==null&&i!==e&&(ar++,Ae!==null&&(n===null?n=Ae:n.push(...Ae))),(e.f&ht)!==0&&(e.f^=ht),v}catch(h){return za(h)}finally{e.f^=rs,ge=t,Re=r,Ae=n,Q=i,ot=s,Dt(a),Ge=o,Tt=c}}function Gu(e,t){let r=t.reactions;if(r!==null){var n=eu.call(r,e);if(n!==-1){var i=r.length-1;i===0?r=t.reactions=null:(r[n]=r[i],r.pop())}}r===null&&(t.f&le)!==0&&(ge===null||!ge.includes(t))&&(ve(t,Be),(t.f&Me)!==0&&(t.f^=Me,t.f&=~Pt),Wa(t),Sn(t,0))}function Sn(e,t){var r=e.deps;if(r!==null)for(var n=t;n<r.length;n++)Gu(e,r[n])}function cr(e){var t=e.f;if((t&tt)===0){ve(e,ye);var r=re,n=Ot;re=e,Ot=!0;try{(t&(et|au))!==0?zu(e):ao(e),io(e);var i=mo(e);e.teardown=typeof i=="function"?i:null,e.wv=uo;var s;Qn&&wu&&(e.f&ke)!==0&&e.deps}finally{Ot=n,re=r}}}function Oe(e){var t=e.f,r=(t&le)!==0;if(Q!==null&&!Ge){var n=re!==null&&(re.f&tt)!==0;if(!n&&!ot?.includes(e)){var i=Q.deps;if((Q.f&rs)!==0)e.rv<ar&&(e.rv=ar,ge===null&&i!==null&&i[Re]===e?Re++:ge===null?ge=[e]:ge.includes(e)||ge.push(e));else{(Q.deps??=[]).push(e);var s=e.reactions;s===null?e.reactions=[Q]:s.includes(Q)||s.push(Q)}}}if(Ft){if(pt.has(e))return pt.get(e);if(r){var a=e,o=a.v;return((a.f&ye)===0&&a.reactions!==null||yo(a))&&(o=ls(a)),pt.set(a,o),o}}else r&&(!Te?.has(e)||ie?.is_fork&&!ir())&&(a=e,or(a)&&Za(a),Ot&&ir()&&(a.f&Me)===0&&_o(a));if(Te?.has(e))return Te.get(e);if((e.f&ht)!==0)throw e.v;return e.v}function _o(e){if(e.deps!==null){e.f^=Me;for(const t of e.deps)(t.reactions??=[]).push(e),(t.f&le)!==0&&(t.f&Me)===0&&_o(t)}}function yo(e){if(e.v===pe)return!0;if(e.deps===null)return!1;for(const t of e.deps)if(pt.has(t)||(t.f&le)!==0&&yo(t))return!0;return!1}function Wu(e){var t=Ge;try{return Ge=!0,e()}finally{Ge=t}}const Zu=-7169;function ve(e,t){e.f=e.f&Zu|t}const Xu=new Set,go=new Set;let vo=null;function Pn(e){var t=this,r=t.ownerDocument,n=e.type,i=e.composedPath?.()||[],s=i[0]||e.target;vo=e;var a=0,o=vo===e&&e.__root;if(o){var c=i.indexOf(o);if(c!==-1&&(t===document||t===window)){e.__root=t;return}var l=i.indexOf(t);if(l===-1)return;c<=l&&(a=c)}if(s=i[a]||e.target,s!==t){fn(e,"currentTarget",{configurable:!0,get(){return s||r}});var u=Q,v=re;$e(null),We(null);try{for(var m,y=[];s!==null;){var h=s.assignedSlot||s.parentNode||s.host||null;try{var w=s["__"+n];w!=null&&(!s.disabled||e.target===s)&&w.call(s,e)}catch(d){m?y.push(d):m=d}if(e.cancelBubble||h===t||h===null)break;s=h}if(m){for(let d of y)queueMicrotask(()=>{throw d});throw m}}finally{e.__root=t,delete e.currentTarget,$e(u),We(v)}}}function Yu(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","<!---->"),t.content}function ps(e,t){var r=re;r.nodes===null&&(r.nodes={start:e,end:t,a:null,t:null})}function Qu(e,t){var r=(t&Yl)!==0,n,i=!e.startsWith("<!>");return()=>{if(me)return ps(ne,null),ne;n===void 0&&(n=Yu(i?e:"<!>"+e));var s=r||eo?document.importNode(n,!0):n.cloneNode(!0);{var a=sr(s),o=s.lastChild;ps(a,o)}return s}}function wo(e,t){if(me){var r=re;((r.f&ts)===0||r.nodes.end===null)&&(r.nodes.end=ne),Da();return}e!==null&&e.before(t)}const ed=["touchstart","touchmove"];function td(e){return ed.includes(e)}function ms(e,t){var r=t==null?"":typeof t=="object"?t+"":t;r!==(e.__t??=e.nodeValue)&&(e.__t=r,e.nodeValue=r+"")}function bo(e,t){return $o(e,t)}function rd(e,t){ds(),t.intro=t.intro??!1;const r=t.target,n=me,i=ne;try{for(var s=sr(r);s&&(s.nodeType!==_n||s.data!==ka);)s=it(s);if(!s)throw Qt;yn(!0),rt(s);const a=$o(e,{...t,anchor:s});return yn(!1),a}catch(a){if(a instanceof Error&&a.message.split(`
15
- `).some(o=>o.startsWith("https://svelte.dev/e/")))throw a;return a!==Qt&&console.warn("Failed to hydrate: ",a),t.recover===!1&&uu(),ds(),qu(r),yn(!1),bo(e,t)}finally{yn(n),rt(i)}}const Ut=new Map;function $o(e,{target:t,anchor:r,props:n={},events:i,context:s,intro:a=!0}){ds();var o=new Set,c=v=>{for(var m=0;m<v.length;m++){var y=v[m];if(!o.has(y)){o.add(y);var h=td(y);t.addEventListener(y,Pn,{passive:h});var w=Ut.get(y);w===void 0?(document.addEventListener(y,Pn,{passive:h}),Ut.set(y,1)):Ut.set(y,w+1)}}};c(tu(Xu)),go.add(c);var l=void 0,u=xu(()=>{var v=r??t.appendChild(nr());return Pu(v,{pending:()=>{}},m=>{if(s){xa({});var y=Le;y.c=s}if(i&&(n.$$events=i),me&&ps(m,null),l=e(m,n)||{},me&&(re.nodes.end=ne,ne===null||ne.nodeType!==_n||ne.data!==Oa))throw ss(),Qt;s&&Fa()}),()=>{for(var m of o){t.removeEventListener(m,Pn);var y=Ut.get(m);--y===0?(document.removeEventListener(m,Pn),Ut.delete(m)):Ut.set(m,y)}go.delete(c),v!==r&&v.parentNode?.removeChild(v)}});return _s.set(l,u),l}let _s=new WeakMap;function nd(e,t){const r=_s.get(e);return r?(_s.delete(e),r(t)):Promise.resolve()}let kn=!1;function sd(e){var t=kn;try{return kn=!1,[e(),kn]}finally{kn=t}}function Eo(e,t,r,n){var i=n,s=!0,a=()=>(s&&(s=!1,i=n),i),o;{var c=mn in e||qa in e;o=$t(e,t)?.set??(c&&t in e?d=>e[t]=d:void 0)}var l,u=!1;[l,u]=sd(()=>e[t]),l===void 0&&n!==void 0&&(l=a(),o&&(du(),o(l)));var v;if(v=()=>{var d=e[t];return d===void 0?a():(s=!0,d)},o){var m=e.$$legacy;return(function(d,_){return arguments.length>0?((!_||m||u)&&o(_?v():d),d):v()})}var y=!1,h=Ga(()=>(y=!1,v()));Oe(h);var w=re;return(function(d,_){if(arguments.length>0){const f=_?Oe(h):xt(d);return Je(h,f),y=!0,i!==void 0&&(i=f),d}return Ft&&y||(w.f&tt)!==0?h.v:Oe(h)})}function id(e){return new ad(e)}class ad{#t;#e;constructor(t){var r=new Map,n=(s,a)=>{var o=Au(a,!1,!1);return r.set(s,o),o};const i=new Proxy({...t.props||{},$$events:{}},{get(s,a){return Oe(r.get(a)??n(a,Reflect.get(s,a)))},has(s,a){return a===qa?!0:(Oe(r.get(a)??n(a,Reflect.get(s,a))),Reflect.has(s,a))},set(s,a,o){return Je(r.get(a)??n(a,o),o),Reflect.set(s,a,o)}});this.#e=(t.hydrate?rd:bo)(t.component,{target:t.target,anchor:t.anchor,props:i,context:t.context,intro:t.intro??!1,recover:t.recover}),(!t?.props?.$$host||t.sync===!1)&&cs(),this.#t=i.$$events;for(const s of Object.keys(this.#e))s==="$set"||s==="$destroy"||s==="$on"||fn(this,s,{get(){return this.#e[s]},set(a){this.#e[s]=a},enumerable:!0});this.#e.$set=s=>{Object.assign(i,s)},this.#e.$destroy=()=>{nd(this.#e)}}$set(t){this.#e.$set(t)}$on(t,r){this.#t[t]=this.#t[t]||[];const n=(...i)=>r.call(this,...i);return this.#t[t].push(n),()=>{this.#t[t]=this.#t[t].filter(i=>i!==n)}}$destroy(){this.#e.$destroy()}}let So;typeof HTMLElement=="function"&&(So=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(e,t,r){super(),this.$$ctor=e,this.$$s=t,r&&this.attachShadow({mode:"open"})}addEventListener(e,t,r){if(this.$$l[e]=this.$$l[e]||[],this.$$l[e].push(t),this.$$c){const n=this.$$c.$on(e,t);this.$$l_u.set(t,n)}super.addEventListener(e,t,r)}removeEventListener(e,t,r){if(super.removeEventListener(e,t,r),this.$$c){const n=this.$$l_u.get(t);n&&(n(),this.$$l_u.delete(t))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let e=function(n){return i=>{const s=document.createElement("slot");n!=="default"&&(s.name=n),wo(i,s)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const t={},r=od(this);for(const n of this.$$s)n in r&&(n==="default"&&!this.$$d.children?(this.$$d.children=e(n),t.default=!0):t[n]=e(n));for(const n of this.attributes){const i=this.$$g_p(n.name);i in this.$$d||(this.$$d[i]=Rn(i,n.value,this.$$p_d,"toProp"))}for(const n in this.$$p_d)!(n in this.$$d)&&this[n]!==void 0&&(this.$$d[n]=this[n],delete this[n]);this.$$c=id({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:t,$$host:this}}),this.$$me=Lu(()=>{so(()=>{this.$$r=!0;for(const n of dn(this.$$c)){if(!this.$$p_d[n]?.reflect)continue;this.$$d[n]=this.$$c[n];const i=Rn(n,this.$$d[n],this.$$p_d,"toAttribute");i==null?this.removeAttribute(this.$$p_d[n].attribute||n):this.setAttribute(this.$$p_d[n].attribute||n,i)}this.$$r=!1})});for(const n in this.$$l)for(const i of this.$$l[n]){const s=this.$$c.$on(n,i);this.$$l_u.set(i,s)}this.$$l={}}}attributeChangedCallback(e,t,r){this.$$r||(e=this.$$g_p(e),this.$$d[e]=Rn(e,r,this.$$p_d,"toProp"),this.$$c?.$set({[e]:this.$$d[e]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(e){return dn(this.$$p_d).find(t=>this.$$p_d[t].attribute===e||!this.$$p_d[t].attribute&&t.toLowerCase()===e)||e}});function Rn(e,t,r,n){const i=r[e]?.type;if(t=i==="Boolean"&&typeof t!="boolean"?t!=null:t,!n||!r[e])return t;if(n==="toAttribute")switch(i){case"Object":case"Array":return t==null?null:JSON.stringify(t);case"Boolean":return t?"":null;case"Number":return t??null;default:return t}else switch(i){case"Object":case"Array":return t&&JSON.parse(t);case"Boolean":return t;case"Number":return t!=null?+t:t;default:return t}}function od(e){const t={};return e.childNodes.forEach(r=>{t[r.slot||"default"]=!0}),t}function cd(e,t,r,n,i,s){let a=class extends So{constructor(){super(e,r,i),this.$$p_d=t}static get observedAttributes(){return dn(t).map(o=>(t[o].attribute||o).toLowerCase())}};return dn(t).forEach(o=>{fn(a.prototype,o,{get(){return this.$$c&&o in this.$$c?this.$$c[o]:this.$$d[o]},set(c){c=Rn(o,c,t),this.$$d[o]=c;var l=this.$$c;if(l){var u=$t(l,o)?.get;u?l[o]=c:l.$set({[o]:c})}}})}),n.forEach(o=>{fn(a.prototype,o,{get(){return this.$$c?.[o]}})}),e.element=a,a}var ld=Qu("This is the test component <p> </p> <p> </p> <p> </p>",1);function Po(e,t){xa(t,!0);let r=Eo(t,"a",15,0),n=Eo(t,"b",15,0),i=st(0);zt.onMount(()=>{console.log(r(),n())});var a={getSum:()=>{Je(i,r()+n())},get a(){return r()},set a(h=0){r(h),cs()},get b(){return n()},set b(h=0){n(h),cs()}};Ma();var o=ld(),c=hs(Cu(o)),l=fs(c);is(c);var u=hs(c,2),v=fs(u);is(u);var m=hs(u,2),y=fs(m);return is(m),Uu(()=>{ms(l,`a = ${r()??""}`),ms(v,`b = ${n()??""}`),ms(y,`sum = ${Oe(i)??""}`)}),wo(e,o),Fa(a)}customElements.define("test-one",cd(Po,{a:{},b:{}},[],["getSum"],!0)),ct.DB=Zl,ct.Test=Po,Object.defineProperty(ct,Symbol.toStringTag,{value:"Module"})}));
1
+ (function(An,yi){typeof exports=="object"&&typeof module<"u"?yi(exports):typeof define=="function"&&define.amd?define(["exports"],yi):(An=typeof globalThis<"u"?globalThis:An||self,yi(An.BBDBComponents={}))})(this,(function(An){"use strict";function yi(s,u){return function(){return s.apply(u,arguments)}}const{toString:vp}=Object.prototype,{getPrototypeOf:Ia}=Object,{iterator:Ko,toStringTag:Du}=Symbol,Wo=(s=>u=>{const f=vp.call(u);return s[f]||(s[f]=f.slice(8,-1).toLowerCase())})(Object.create(null)),rr=s=>(s=s.toLowerCase(),u=>Wo(u)===s),Zo=s=>u=>typeof u===s,{isArray:vi}=Array,bi=Zo("undefined");function bo(s){return s!==null&&!bi(s)&&s.constructor!==null&&!bi(s.constructor)&&Mt(s.constructor.isBuffer)&&s.constructor.isBuffer(s)}const Bu=rr("ArrayBuffer");function bp(s){let u;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?u=ArrayBuffer.isView(s):u=s&&s.buffer&&Bu(s.buffer),u}const gp=Zo("string"),Mt=Zo("function"),Fu=Zo("number"),go=s=>s!==null&&typeof s=="object",_p=s=>s===!0||s===!1,Yo=s=>{if(Wo(s)!=="object")return!1;const u=Ia(s);return(u===null||u===Object.prototype||Object.getPrototypeOf(u)===null)&&!(Du in s)&&!(Ko in s)},wp=s=>{if(!go(s)||bo(s))return!1;try{return Object.keys(s).length===0&&Object.getPrototypeOf(s)===Object.prototype}catch{return!1}},kp=rr("Date"),jp=rr("File"),Op=rr("Blob"),Ep=rr("FileList"),Sp=s=>go(s)&&Mt(s.pipe),xp=s=>{let u;return s&&(typeof FormData=="function"&&s instanceof FormData||Mt(s.append)&&((u=Wo(s))==="formdata"||u==="object"&&Mt(s.toString)&&s.toString()==="[object FormData]"))},Cp=rr("URLSearchParams"),[Pp,Tp,Rp,Lp]=["ReadableStream","Request","Response","Headers"].map(rr),Ap=s=>s.trim?s.trim():s.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function _o(s,u,{allOwnKeys:f=!1}={}){if(s===null||typeof s>"u")return;let m,b;if(typeof s!="object"&&(s=[s]),vi(s))for(m=0,b=s.length;m<b;m++)u.call(null,s[m],m,s);else{if(bo(s))return;const w=f?Object.getOwnPropertyNames(s):Object.keys(s),d=w.length;let y;for(m=0;m<d;m++)y=w[m],u.call(null,s[y],y,s)}}function Mu(s,u){if(bo(s))return null;u=u.toLowerCase();const f=Object.keys(s);let m=f.length,b;for(;m-- >0;)if(b=f[m],u===b.toLowerCase())return b;return null}const $n=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,qu=s=>!bi(s)&&s!==$n;function Na(){const{caseless:s,skipUndefined:u}=qu(this)&&this||{},f={},m=(b,w)=>{const d=s&&Mu(f,w)||w;Yo(f[d])&&Yo(b)?f[d]=Na(f[d],b):Yo(b)?f[d]=Na({},b):vi(b)?f[d]=b.slice():(!u||!bi(b))&&(f[d]=b)};for(let b=0,w=arguments.length;b<w;b++)arguments[b]&&_o(arguments[b],m);return f}const $p=(s,u,f,{allOwnKeys:m}={})=>(_o(u,(b,w)=>{f&&Mt(b)?s[w]=yi(b,f):s[w]=b},{allOwnKeys:m}),s),Ip=s=>(s.charCodeAt(0)===65279&&(s=s.slice(1)),s),Np=(s,u,f,m)=>{s.prototype=Object.create(u.prototype,m),s.prototype.constructor=s,Object.defineProperty(s,"super",{value:u.prototype}),f&&Object.assign(s.prototype,f)},Dp=(s,u,f,m)=>{let b,w,d;const y={};if(u=u||{},s==null)return u;do{for(b=Object.getOwnPropertyNames(s),w=b.length;w-- >0;)d=b[w],(!m||m(d,s,u))&&!y[d]&&(u[d]=s[d],y[d]=!0);s=f!==!1&&Ia(s)}while(s&&(!f||f(s,u))&&s!==Object.prototype);return u},Bp=(s,u,f)=>{s=String(s),(f===void 0||f>s.length)&&(f=s.length),f-=u.length;const m=s.indexOf(u,f);return m!==-1&&m===f},Fp=s=>{if(!s)return null;if(vi(s))return s;let u=s.length;if(!Fu(u))return null;const f=new Array(u);for(;u-- >0;)f[u]=s[u];return f},Mp=(s=>u=>s&&u instanceof s)(typeof Uint8Array<"u"&&Ia(Uint8Array)),qp=(s,u)=>{const m=(s&&s[Ko]).call(s);let b;for(;(b=m.next())&&!b.done;){const w=b.value;u.call(s,w[0],w[1])}},Vp=(s,u)=>{let f;const m=[];for(;(f=s.exec(u))!==null;)m.push(f);return m},zp=rr("HTMLFormElement"),Hp=s=>s.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(f,m,b){return m.toUpperCase()+b}),Vu=(({hasOwnProperty:s})=>(u,f)=>s.call(u,f))(Object.prototype),Up=rr("RegExp"),zu=(s,u)=>{const f=Object.getOwnPropertyDescriptors(s),m={};_o(f,(b,w)=>{let d;(d=u(b,w,s))!==!1&&(m[w]=d||b)}),Object.defineProperties(s,m)},Gp=s=>{zu(s,(u,f)=>{if(Mt(s)&&["arguments","caller","callee"].indexOf(f)!==-1)return!1;const m=s[f];if(Mt(m)){if(u.enumerable=!1,"writable"in u){u.writable=!1;return}u.set||(u.set=()=>{throw Error("Can not rewrite read-only method '"+f+"'")})}})},Jp=(s,u)=>{const f={},m=b=>{b.forEach(w=>{f[w]=!0})};return vi(s)?m(s):m(String(s).split(u)),f},Kp=()=>{},Wp=(s,u)=>s!=null&&Number.isFinite(s=+s)?s:u;function Zp(s){return!!(s&&Mt(s.append)&&s[Du]==="FormData"&&s[Ko])}const Yp=s=>{const u=new Array(10),f=(m,b)=>{if(go(m)){if(u.indexOf(m)>=0)return;if(bo(m))return m;if(!("toJSON"in m)){u[b]=m;const w=vi(m)?[]:{};return _o(m,(d,y)=>{const i=f(d,b+1);!bi(i)&&(w[y]=i)}),u[b]=void 0,w}}return m};return f(s,0)},Qp=rr("AsyncFunction"),Xp=s=>s&&(go(s)||Mt(s))&&Mt(s.then)&&Mt(s.catch),Hu=((s,u)=>s?setImmediate:u?((f,m)=>($n.addEventListener("message",({source:b,data:w})=>{b===$n&&w===f&&m.length&&m.shift()()},!1),b=>{m.push(b),$n.postMessage(f,"*")}))(`axios@${Math.random()}`,[]):f=>setTimeout(f))(typeof setImmediate=="function",Mt($n.postMessage)),em=typeof queueMicrotask<"u"?queueMicrotask.bind($n):typeof process<"u"&&process.nextTick||Hu,oe={isArray:vi,isArrayBuffer:Bu,isBuffer:bo,isFormData:xp,isArrayBufferView:bp,isString:gp,isNumber:Fu,isBoolean:_p,isObject:go,isPlainObject:Yo,isEmptyObject:wp,isReadableStream:Pp,isRequest:Tp,isResponse:Rp,isHeaders:Lp,isUndefined:bi,isDate:kp,isFile:jp,isBlob:Op,isRegExp:Up,isFunction:Mt,isStream:Sp,isURLSearchParams:Cp,isTypedArray:Mp,isFileList:Ep,forEach:_o,merge:Na,extend:$p,trim:Ap,stripBOM:Ip,inherits:Np,toFlatObject:Dp,kindOf:Wo,kindOfTest:rr,endsWith:Bp,toArray:Fp,forEachEntry:qp,matchAll:Vp,isHTMLForm:zp,hasOwnProperty:Vu,hasOwnProp:Vu,reduceDescriptors:zu,freezeMethods:Gp,toObjectSet:Jp,toCamelCase:Hp,noop:Kp,toFiniteNumber:Wp,findKey:Mu,global:$n,isContextDefined:qu,isSpecCompliantForm:Zp,toJSONObject:Yp,isAsyncFn:Qp,isThenable:Xp,setImmediate:Hu,asap:em,isIterable:s=>s!=null&&Mt(s[Ko])};function Ae(s,u,f,m,b){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=s,this.name="AxiosError",u&&(this.code=u),f&&(this.config=f),m&&(this.request=m),b&&(this.response=b,this.status=b.status?b.status:null)}oe.inherits(Ae,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:oe.toJSONObject(this.config),code:this.code,status:this.status}}});const Uu=Ae.prototype,Gu={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(s=>{Gu[s]={value:s}}),Object.defineProperties(Ae,Gu),Object.defineProperty(Uu,"isAxiosError",{value:!0}),Ae.from=(s,u,f,m,b,w)=>{const d=Object.create(Uu);oe.toFlatObject(s,d,function(p){return p!==Error.prototype},h=>h!=="isAxiosError");const y=s&&s.message?s.message:"Error",i=u==null&&s?s.code:u;return Ae.call(d,y,i,f,m,b),s&&d.cause==null&&Object.defineProperty(d,"cause",{value:s,configurable:!0}),d.name=s&&s.name||"Error",w&&Object.assign(d,w),d};const tm=null;function Da(s){return oe.isPlainObject(s)||oe.isArray(s)}function Ju(s){return oe.endsWith(s,"[]")?s.slice(0,-2):s}function Ku(s,u,f){return s?s.concat(u).map(function(b,w){return b=Ju(b),!f&&w?"["+b+"]":b}).join(f?".":""):u}function rm(s){return oe.isArray(s)&&!s.some(Da)}const nm=oe.toFlatObject(oe,{},null,function(u){return/^is[A-Z]/.test(u)});function Qo(s,u,f){if(!oe.isObject(s))throw new TypeError("target must be an object");u=u||new FormData,f=oe.toFlatObject(f,{metaTokens:!0,dots:!1,indexes:!1},!1,function(E,O){return!oe.isUndefined(O[E])});const m=f.metaTokens,b=f.visitor||p,w=f.dots,d=f.indexes,i=(f.Blob||typeof Blob<"u"&&Blob)&&oe.isSpecCompliantForm(u);if(!oe.isFunction(b))throw new TypeError("visitor must be a function");function h(k){if(k===null)return"";if(oe.isDate(k))return k.toISOString();if(oe.isBoolean(k))return k.toString();if(!i&&oe.isBlob(k))throw new Ae("Blob is not supported. Use a Buffer instead.");return oe.isArrayBuffer(k)||oe.isTypedArray(k)?i&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function p(k,E,O){let x=k;if(k&&!O&&typeof k=="object"){if(oe.endsWith(E,"{}"))E=m?E:E.slice(0,-2),k=JSON.stringify(k);else if(oe.isArray(k)&&rm(k)||(oe.isFileList(k)||oe.endsWith(E,"[]"))&&(x=oe.toArray(k)))return E=Ju(E),x.forEach(function(P,L){!(oe.isUndefined(P)||P===null)&&u.append(d===!0?Ku([E],L,w):d===null?E:E+"[]",h(P))}),!1}return Da(k)?!0:(u.append(Ku(O,E,w),h(k)),!1)}const g=[],v=Object.assign(nm,{defaultVisitor:p,convertValue:h,isVisitable:Da});function j(k,E){if(!oe.isUndefined(k)){if(g.indexOf(k)!==-1)throw Error("Circular reference detected in "+E.join("."));g.push(k),oe.forEach(k,function(x,S){(!(oe.isUndefined(x)||x===null)&&b.call(u,x,oe.isString(S)?S.trim():S,E,v))===!0&&j(x,E?E.concat(S):[S])}),g.pop()}}if(!oe.isObject(s))throw new TypeError("data must be an object");return j(s),u}function Wu(s){const u={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(s).replace(/[!'()~]|%20|%00/g,function(m){return u[m]})}function Ba(s,u){this._pairs=[],s&&Qo(s,this,u)}const Zu=Ba.prototype;Zu.append=function(u,f){this._pairs.push([u,f])},Zu.toString=function(u){const f=u?function(m){return u.call(this,m,Wu)}:Wu;return this._pairs.map(function(b){return f(b[0])+"="+f(b[1])},"").join("&")};function im(s){return encodeURIComponent(s).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Yu(s,u,f){if(!u)return s;const m=f&&f.encode||im;oe.isFunction(f)&&(f={serialize:f});const b=f&&f.serialize;let w;if(b?w=b(u,f):w=oe.isURLSearchParams(u)?u.toString():new Ba(u,f).toString(m),w){const d=s.indexOf("#");d!==-1&&(s=s.slice(0,d)),s+=(s.indexOf("?")===-1?"?":"&")+w}return s}class Qu{constructor(){this.handlers=[]}use(u,f,m){return this.handlers.push({fulfilled:u,rejected:f,synchronous:m?m.synchronous:!1,runWhen:m?m.runWhen:null}),this.handlers.length-1}eject(u){this.handlers[u]&&(this.handlers[u]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(u){oe.forEach(this.handlers,function(m){m!==null&&u(m)})}}const Xu={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},om={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:Ba,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},Fa=typeof window<"u"&&typeof document<"u",Ma=typeof navigator=="object"&&navigator||void 0,sm=Fa&&(!Ma||["ReactNative","NativeScript","NS"].indexOf(Ma.product)<0),am=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",lm=Fa&&window.location.href||"http://localhost",St={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Fa,hasStandardBrowserEnv:sm,hasStandardBrowserWebWorkerEnv:am,navigator:Ma,origin:lm},Symbol.toStringTag,{value:"Module"})),...om};function um(s,u){return Qo(s,new St.classes.URLSearchParams,{visitor:function(f,m,b,w){return St.isNode&&oe.isBuffer(f)?(this.append(m,f.toString("base64")),!1):w.defaultVisitor.apply(this,arguments)},...u})}function cm(s){return oe.matchAll(/\w+|\[(\w*)]/g,s).map(u=>u[0]==="[]"?"":u[1]||u[0])}function dm(s){const u={},f=Object.keys(s);let m;const b=f.length;let w;for(m=0;m<b;m++)w=f[m],u[w]=s[w];return u}function ec(s){function u(f,m,b,w){let d=f[w++];if(d==="__proto__")return!0;const y=Number.isFinite(+d),i=w>=f.length;return d=!d&&oe.isArray(b)?b.length:d,i?(oe.hasOwnProp(b,d)?b[d]=[b[d],m]:b[d]=m,!y):((!b[d]||!oe.isObject(b[d]))&&(b[d]=[]),u(f,m,b[d],w)&&oe.isArray(b[d])&&(b[d]=dm(b[d])),!y)}if(oe.isFormData(s)&&oe.isFunction(s.entries)){const f={};return oe.forEachEntry(s,(m,b)=>{u(cm(m),b,f,0)}),f}return null}function hm(s,u,f){if(oe.isString(s))try{return(u||JSON.parse)(s),oe.trim(s)}catch(m){if(m.name!=="SyntaxError")throw m}return(f||JSON.stringify)(s)}const wo={transitional:Xu,adapter:["xhr","http","fetch"],transformRequest:[function(u,f){const m=f.getContentType()||"",b=m.indexOf("application/json")>-1,w=oe.isObject(u);if(w&&oe.isHTMLForm(u)&&(u=new FormData(u)),oe.isFormData(u))return b?JSON.stringify(ec(u)):u;if(oe.isArrayBuffer(u)||oe.isBuffer(u)||oe.isStream(u)||oe.isFile(u)||oe.isBlob(u)||oe.isReadableStream(u))return u;if(oe.isArrayBufferView(u))return u.buffer;if(oe.isURLSearchParams(u))return f.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),u.toString();let y;if(w){if(m.indexOf("application/x-www-form-urlencoded")>-1)return um(u,this.formSerializer).toString();if((y=oe.isFileList(u))||m.indexOf("multipart/form-data")>-1){const i=this.env&&this.env.FormData;return Qo(y?{"files[]":u}:u,i&&new i,this.formSerializer)}}return w||b?(f.setContentType("application/json",!1),hm(u)):u}],transformResponse:[function(u){const f=this.transitional||wo.transitional,m=f&&f.forcedJSONParsing,b=this.responseType==="json";if(oe.isResponse(u)||oe.isReadableStream(u))return u;if(u&&oe.isString(u)&&(m&&!this.responseType||b)){const d=!(f&&f.silentJSONParsing)&&b;try{return JSON.parse(u,this.parseReviver)}catch(y){if(d)throw y.name==="SyntaxError"?Ae.from(y,Ae.ERR_BAD_RESPONSE,this,null,this.response):y}}return u}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:St.classes.FormData,Blob:St.classes.Blob},validateStatus:function(u){return u>=200&&u<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};oe.forEach(["delete","get","head","post","put","patch"],s=>{wo.headers[s]={}});const fm=oe.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),pm=s=>{const u={};let f,m,b;return s&&s.split(`
2
+ `).forEach(function(d){b=d.indexOf(":"),f=d.substring(0,b).trim().toLowerCase(),m=d.substring(b+1).trim(),!(!f||u[f]&&fm[f])&&(f==="set-cookie"?u[f]?u[f].push(m):u[f]=[m]:u[f]=u[f]?u[f]+", "+m:m)}),u},tc=Symbol("internals");function ko(s){return s&&String(s).trim().toLowerCase()}function Xo(s){return s===!1||s==null?s:oe.isArray(s)?s.map(Xo):String(s)}function mm(s){const u=Object.create(null),f=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let m;for(;m=f.exec(s);)u[m[1]]=m[2];return u}const ym=s=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(s.trim());function qa(s,u,f,m,b){if(oe.isFunction(m))return m.call(this,u,f);if(b&&(u=f),!!oe.isString(u)){if(oe.isString(m))return u.indexOf(m)!==-1;if(oe.isRegExp(m))return m.test(u)}}function vm(s){return s.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(u,f,m)=>f.toUpperCase()+m)}function bm(s,u){const f=oe.toCamelCase(" "+u);["get","set","has"].forEach(m=>{Object.defineProperty(s,m+f,{value:function(b,w,d){return this[m].call(this,u,b,w,d)},configurable:!0})})}let qt=class{constructor(u){u&&this.set(u)}set(u,f,m){const b=this;function w(y,i,h){const p=ko(i);if(!p)throw new Error("header name must be a non-empty string");const g=oe.findKey(b,p);(!g||b[g]===void 0||h===!0||h===void 0&&b[g]!==!1)&&(b[g||i]=Xo(y))}const d=(y,i)=>oe.forEach(y,(h,p)=>w(h,p,i));if(oe.isPlainObject(u)||u instanceof this.constructor)d(u,f);else if(oe.isString(u)&&(u=u.trim())&&!ym(u))d(pm(u),f);else if(oe.isObject(u)&&oe.isIterable(u)){let y={},i,h;for(const p of u){if(!oe.isArray(p))throw TypeError("Object iterator must return a key-value pair");y[h=p[0]]=(i=y[h])?oe.isArray(i)?[...i,p[1]]:[i,p[1]]:p[1]}d(y,f)}else u!=null&&w(f,u,m);return this}get(u,f){if(u=ko(u),u){const m=oe.findKey(this,u);if(m){const b=this[m];if(!f)return b;if(f===!0)return mm(b);if(oe.isFunction(f))return f.call(this,b,m);if(oe.isRegExp(f))return f.exec(b);throw new TypeError("parser must be boolean|regexp|function")}}}has(u,f){if(u=ko(u),u){const m=oe.findKey(this,u);return!!(m&&this[m]!==void 0&&(!f||qa(this,this[m],m,f)))}return!1}delete(u,f){const m=this;let b=!1;function w(d){if(d=ko(d),d){const y=oe.findKey(m,d);y&&(!f||qa(m,m[y],y,f))&&(delete m[y],b=!0)}}return oe.isArray(u)?u.forEach(w):w(u),b}clear(u){const f=Object.keys(this);let m=f.length,b=!1;for(;m--;){const w=f[m];(!u||qa(this,this[w],w,u,!0))&&(delete this[w],b=!0)}return b}normalize(u){const f=this,m={};return oe.forEach(this,(b,w)=>{const d=oe.findKey(m,w);if(d){f[d]=Xo(b),delete f[w];return}const y=u?vm(w):String(w).trim();y!==w&&delete f[w],f[y]=Xo(b),m[y]=!0}),this}concat(...u){return this.constructor.concat(this,...u)}toJSON(u){const f=Object.create(null);return oe.forEach(this,(m,b)=>{m!=null&&m!==!1&&(f[b]=u&&oe.isArray(m)?m.join(", "):m)}),f}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([u,f])=>u+": "+f).join(`
3
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(u){return u instanceof this?u:new this(u)}static concat(u,...f){const m=new this(u);return f.forEach(b=>m.set(b)),m}static accessor(u){const m=(this[tc]=this[tc]={accessors:{}}).accessors,b=this.prototype;function w(d){const y=ko(d);m[y]||(bm(b,d),m[y]=!0)}return oe.isArray(u)?u.forEach(w):w(u),this}};qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),oe.reduceDescriptors(qt.prototype,({value:s},u)=>{let f=u[0].toUpperCase()+u.slice(1);return{get:()=>s,set(m){this[f]=m}}}),oe.freezeMethods(qt);function Va(s,u){const f=this||wo,m=u||f,b=qt.from(m.headers);let w=m.data;return oe.forEach(s,function(y){w=y.call(f,w,b.normalize(),u?u.status:void 0)}),b.normalize(),w}function rc(s){return!!(s&&s.__CANCEL__)}function gi(s,u,f){Ae.call(this,s??"canceled",Ae.ERR_CANCELED,u,f),this.name="CanceledError"}oe.inherits(gi,Ae,{__CANCEL__:!0});function nc(s,u,f){const m=f.config.validateStatus;!f.status||!m||m(f.status)?s(f):u(new Ae("Request failed with status code "+f.status,[Ae.ERR_BAD_REQUEST,Ae.ERR_BAD_RESPONSE][Math.floor(f.status/100)-4],f.config,f.request,f))}function gm(s){const u=/^([-+\w]{1,25})(:?\/\/|:)/.exec(s);return u&&u[1]||""}function _m(s,u){s=s||10;const f=new Array(s),m=new Array(s);let b=0,w=0,d;return u=u!==void 0?u:1e3,function(i){const h=Date.now(),p=m[w];d||(d=h),f[b]=i,m[b]=h;let g=w,v=0;for(;g!==b;)v+=f[g++],g=g%s;if(b=(b+1)%s,b===w&&(w=(w+1)%s),h-d<u)return;const j=p&&h-p;return j?Math.round(v*1e3/j):void 0}}function wm(s,u){let f=0,m=1e3/u,b,w;const d=(h,p=Date.now())=>{f=p,b=null,w&&(clearTimeout(w),w=null),s(...h)};return[(...h)=>{const p=Date.now(),g=p-f;g>=m?d(h,p):(b=h,w||(w=setTimeout(()=>{w=null,d(b)},m-g)))},()=>b&&d(b)]}const es=(s,u,f=3)=>{let m=0;const b=_m(50,250);return wm(w=>{const d=w.loaded,y=w.lengthComputable?w.total:void 0,i=d-m,h=b(i),p=d<=y;m=d;const g={loaded:d,total:y,progress:y?d/y:void 0,bytes:i,rate:h||void 0,estimated:h&&y&&p?(y-d)/h:void 0,event:w,lengthComputable:y!=null,[u?"download":"upload"]:!0};s(g)},f)},ic=(s,u)=>{const f=s!=null;return[m=>u[0]({lengthComputable:f,total:s,loaded:m}),u[1]]},oc=s=>(...u)=>oe.asap(()=>s(...u)),km=St.hasStandardBrowserEnv?((s,u)=>f=>(f=new URL(f,St.origin),s.protocol===f.protocol&&s.host===f.host&&(u||s.port===f.port)))(new URL(St.origin),St.navigator&&/(msie|trident)/i.test(St.navigator.userAgent)):()=>!0,jm=St.hasStandardBrowserEnv?{write(s,u,f,m,b,w,d){if(typeof document>"u")return;const y=[`${s}=${encodeURIComponent(u)}`];oe.isNumber(f)&&y.push(`expires=${new Date(f).toUTCString()}`),oe.isString(m)&&y.push(`path=${m}`),oe.isString(b)&&y.push(`domain=${b}`),w===!0&&y.push("secure"),oe.isString(d)&&y.push(`SameSite=${d}`),document.cookie=y.join("; ")},read(s){if(typeof document>"u")return null;const u=document.cookie.match(new RegExp("(?:^|; )"+s+"=([^;]*)"));return u?decodeURIComponent(u[1]):null},remove(s){this.write(s,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function Om(s){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(s)}function Em(s,u){return u?s.replace(/\/?\/$/,"")+"/"+u.replace(/^\/+/,""):s}function sc(s,u,f){let m=!Om(u);return s&&(m||f==!1)?Em(s,u):u}const ac=s=>s instanceof qt?{...s}:s;function In(s,u){u=u||{};const f={};function m(h,p,g,v){return oe.isPlainObject(h)&&oe.isPlainObject(p)?oe.merge.call({caseless:v},h,p):oe.isPlainObject(p)?oe.merge({},p):oe.isArray(p)?p.slice():p}function b(h,p,g,v){if(oe.isUndefined(p)){if(!oe.isUndefined(h))return m(void 0,h,g,v)}else return m(h,p,g,v)}function w(h,p){if(!oe.isUndefined(p))return m(void 0,p)}function d(h,p){if(oe.isUndefined(p)){if(!oe.isUndefined(h))return m(void 0,h)}else return m(void 0,p)}function y(h,p,g){if(g in u)return m(h,p);if(g in s)return m(void 0,h)}const i={url:w,method:w,data:w,baseURL:d,transformRequest:d,transformResponse:d,paramsSerializer:d,timeout:d,timeoutMessage:d,withCredentials:d,withXSRFToken:d,adapter:d,responseType:d,xsrfCookieName:d,xsrfHeaderName:d,onUploadProgress:d,onDownloadProgress:d,decompress:d,maxContentLength:d,maxBodyLength:d,beforeRedirect:d,transport:d,httpAgent:d,httpsAgent:d,cancelToken:d,socketPath:d,responseEncoding:d,validateStatus:y,headers:(h,p,g)=>b(ac(h),ac(p),g,!0)};return oe.forEach(Object.keys({...s,...u}),function(p){const g=i[p]||b,v=g(s[p],u[p],p);oe.isUndefined(v)&&g!==y||(f[p]=v)}),f}const lc=s=>{const u=In({},s);let{data:f,withXSRFToken:m,xsrfHeaderName:b,xsrfCookieName:w,headers:d,auth:y}=u;if(u.headers=d=qt.from(d),u.url=Yu(sc(u.baseURL,u.url,u.allowAbsoluteUrls),s.params,s.paramsSerializer),y&&d.set("Authorization","Basic "+btoa((y.username||"")+":"+(y.password?unescape(encodeURIComponent(y.password)):""))),oe.isFormData(f)){if(St.hasStandardBrowserEnv||St.hasStandardBrowserWebWorkerEnv)d.setContentType(void 0);else if(oe.isFunction(f.getHeaders)){const i=f.getHeaders(),h=["content-type","content-length"];Object.entries(i).forEach(([p,g])=>{h.includes(p.toLowerCase())&&d.set(p,g)})}}if(St.hasStandardBrowserEnv&&(m&&oe.isFunction(m)&&(m=m(u)),m||m!==!1&&km(u.url))){const i=b&&w&&jm.read(w);i&&d.set(b,i)}return u},Sm=typeof XMLHttpRequest<"u"&&function(s){return new Promise(function(f,m){const b=lc(s);let w=b.data;const d=qt.from(b.headers).normalize();let{responseType:y,onUploadProgress:i,onDownloadProgress:h}=b,p,g,v,j,k;function E(){j&&j(),k&&k(),b.cancelToken&&b.cancelToken.unsubscribe(p),b.signal&&b.signal.removeEventListener("abort",p)}let O=new XMLHttpRequest;O.open(b.method.toUpperCase(),b.url,!0),O.timeout=b.timeout;function x(){if(!O)return;const P=qt.from("getAllResponseHeaders"in O&&O.getAllResponseHeaders()),T={data:!y||y==="text"||y==="json"?O.responseText:O.response,status:O.status,statusText:O.statusText,headers:P,config:s,request:O};nc(function(A){f(A),E()},function(A){m(A),E()},T),O=null}"onloadend"in O?O.onloadend=x:O.onreadystatechange=function(){!O||O.readyState!==4||O.status===0&&!(O.responseURL&&O.responseURL.indexOf("file:")===0)||setTimeout(x)},O.onabort=function(){O&&(m(new Ae("Request aborted",Ae.ECONNABORTED,s,O)),O=null)},O.onerror=function(L){const T=L&&L.message?L.message:"Network Error",R=new Ae(T,Ae.ERR_NETWORK,s,O);R.event=L||null,m(R),O=null},O.ontimeout=function(){let L=b.timeout?"timeout of "+b.timeout+"ms exceeded":"timeout exceeded";const T=b.transitional||Xu;b.timeoutErrorMessage&&(L=b.timeoutErrorMessage),m(new Ae(L,T.clarifyTimeoutError?Ae.ETIMEDOUT:Ae.ECONNABORTED,s,O)),O=null},w===void 0&&d.setContentType(null),"setRequestHeader"in O&&oe.forEach(d.toJSON(),function(L,T){O.setRequestHeader(T,L)}),oe.isUndefined(b.withCredentials)||(O.withCredentials=!!b.withCredentials),y&&y!=="json"&&(O.responseType=b.responseType),h&&([v,k]=es(h,!0),O.addEventListener("progress",v)),i&&O.upload&&([g,j]=es(i),O.upload.addEventListener("progress",g),O.upload.addEventListener("loadend",j)),(b.cancelToken||b.signal)&&(p=P=>{O&&(m(!P||P.type?new gi(null,s,O):P),O.abort(),O=null)},b.cancelToken&&b.cancelToken.subscribe(p),b.signal&&(b.signal.aborted?p():b.signal.addEventListener("abort",p)));const S=gm(b.url);if(S&&St.protocols.indexOf(S)===-1){m(new Ae("Unsupported protocol "+S+":",Ae.ERR_BAD_REQUEST,s));return}O.send(w||null)})},xm=(s,u)=>{const{length:f}=s=s?s.filter(Boolean):[];if(u||f){let m=new AbortController,b;const w=function(h){if(!b){b=!0,y();const p=h instanceof Error?h:this.reason;m.abort(p instanceof Ae?p:new gi(p instanceof Error?p.message:p))}};let d=u&&setTimeout(()=>{d=null,w(new Ae(`timeout ${u} of ms exceeded`,Ae.ETIMEDOUT))},u);const y=()=>{s&&(d&&clearTimeout(d),d=null,s.forEach(h=>{h.unsubscribe?h.unsubscribe(w):h.removeEventListener("abort",w)}),s=null)};s.forEach(h=>h.addEventListener("abort",w));const{signal:i}=m;return i.unsubscribe=()=>oe.asap(y),i}},Cm=function*(s,u){let f=s.byteLength;if(f<u){yield s;return}let m=0,b;for(;m<f;)b=m+u,yield s.slice(m,b),m=b},Pm=async function*(s,u){for await(const f of Tm(s))yield*Cm(f,u)},Tm=async function*(s){if(s[Symbol.asyncIterator]){yield*s;return}const u=s.getReader();try{for(;;){const{done:f,value:m}=await u.read();if(f)break;yield m}}finally{await u.cancel()}},uc=(s,u,f,m)=>{const b=Pm(s,u);let w=0,d,y=i=>{d||(d=!0,m&&m(i))};return new ReadableStream({async pull(i){try{const{done:h,value:p}=await b.next();if(h){y(),i.close();return}let g=p.byteLength;if(f){let v=w+=g;f(v)}i.enqueue(new Uint8Array(p))}catch(h){throw y(h),h}},cancel(i){return y(i),b.return()}},{highWaterMark:2})},cc=64*1024,{isFunction:ts}=oe,Rm=(({Request:s,Response:u})=>({Request:s,Response:u}))(oe.global),{ReadableStream:dc,TextEncoder:hc}=oe.global,fc=(s,...u)=>{try{return!!s(...u)}catch{return!1}},Lm=s=>{s=oe.merge.call({skipUndefined:!0},Rm,s);const{fetch:u,Request:f,Response:m}=s,b=u?ts(u):typeof fetch=="function",w=ts(f),d=ts(m);if(!b)return!1;const y=b&&ts(dc),i=b&&(typeof hc=="function"?(k=>E=>k.encode(E))(new hc):async k=>new Uint8Array(await new f(k).arrayBuffer())),h=w&&y&&fc(()=>{let k=!1;const E=new f(St.origin,{body:new dc,method:"POST",get duplex(){return k=!0,"half"}}).headers.has("Content-Type");return k&&!E}),p=d&&y&&fc(()=>oe.isReadableStream(new m("").body)),g={stream:p&&(k=>k.body)};b&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!g[k]&&(g[k]=(E,O)=>{let x=E&&E[k];if(x)return x.call(E);throw new Ae(`Response type '${k}' is not supported`,Ae.ERR_NOT_SUPPORT,O)})});const v=async k=>{if(k==null)return 0;if(oe.isBlob(k))return k.size;if(oe.isSpecCompliantForm(k))return(await new f(St.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(oe.isArrayBufferView(k)||oe.isArrayBuffer(k))return k.byteLength;if(oe.isURLSearchParams(k)&&(k=k+""),oe.isString(k))return(await i(k)).byteLength},j=async(k,E)=>{const O=oe.toFiniteNumber(k.getContentLength());return O??v(E)};return async k=>{let{url:E,method:O,data:x,signal:S,cancelToken:P,timeout:L,onDownloadProgress:T,onUploadProgress:R,responseType:A,headers:N,withCredentials:D="same-origin",fetchOptions:M}=lc(k),q=u||fetch;A=A?(A+"").toLowerCase():"text";let J=xm([S,P&&P.toAbortSignal()],L),G=null;const X=J&&J.unsubscribe&&(()=>{J.unsubscribe()});let le;try{if(R&&h&&O!=="get"&&O!=="head"&&(le=await j(N,x))!==0){let H=new f(E,{method:"POST",body:x,duplex:"half"}),ee;if(oe.isFormData(x)&&(ee=H.headers.get("content-type"))&&N.setContentType(ee),H.body){const[V,I]=ic(le,es(oc(R)));x=uc(H.body,cc,V,I)}}oe.isString(D)||(D=D?"include":"omit");const ue=w&&"credentials"in f.prototype,he={...M,signal:J,method:O.toUpperCase(),headers:N.normalize().toJSON(),body:x,duplex:"half",credentials:ue?D:void 0};G=w&&new f(E,he);let ce=await(w?q(G,M):q(E,he));const me=p&&(A==="stream"||A==="response");if(p&&(T||me&&X)){const H={};["status","statusText","headers"].forEach(F=>{H[F]=ce[F]});const ee=oe.toFiniteNumber(ce.headers.get("content-length")),[V,I]=T&&ic(ee,es(oc(T),!0))||[];ce=new m(uc(ce.body,cc,V,()=>{I&&I(),X&&X()}),H)}A=A||"text";let ie=await g[oe.findKey(g,A)||"text"](ce,k);return!me&&X&&X(),await new Promise((H,ee)=>{nc(H,ee,{data:ie,headers:qt.from(ce.headers),status:ce.status,statusText:ce.statusText,config:k,request:G})})}catch(ue){throw X&&X(),ue&&ue.name==="TypeError"&&/Load failed|fetch/i.test(ue.message)?Object.assign(new Ae("Network Error",Ae.ERR_NETWORK,k,G),{cause:ue.cause||ue}):Ae.from(ue,ue&&ue.code,k,G)}}},Am=new Map,pc=s=>{let u=s&&s.env||{};const{fetch:f,Request:m,Response:b}=u,w=[m,b,f];let d=w.length,y=d,i,h,p=Am;for(;y--;)i=w[y],h=p.get(i),h===void 0&&p.set(i,h=y?new Map:Lm(u)),p=h;return h};pc();const za={http:tm,xhr:Sm,fetch:{get:pc}};oe.forEach(za,(s,u)=>{if(s){try{Object.defineProperty(s,"name",{value:u})}catch{}Object.defineProperty(s,"adapterName",{value:u})}});const mc=s=>`- ${s}`,$m=s=>oe.isFunction(s)||s===null||s===!1;function Im(s,u){s=oe.isArray(s)?s:[s];const{length:f}=s;let m,b;const w={};for(let d=0;d<f;d++){m=s[d];let y;if(b=m,!$m(m)&&(b=za[(y=String(m)).toLowerCase()],b===void 0))throw new Ae(`Unknown adapter '${y}'`);if(b&&(oe.isFunction(b)||(b=b.get(u))))break;w[y||"#"+d]=b}if(!b){const d=Object.entries(w).map(([i,h])=>`adapter ${i} `+(h===!1?"is not supported by the environment":"is not available in the build"));let y=f?d.length>1?`since :
4
+ `+d.map(mc).join(`
5
+ `):" "+mc(d[0]):"as no adapter specified";throw new Ae("There is no suitable adapter to dispatch the request "+y,"ERR_NOT_SUPPORT")}return b}const yc={getAdapter:Im,adapters:za};function Ha(s){if(s.cancelToken&&s.cancelToken.throwIfRequested(),s.signal&&s.signal.aborted)throw new gi(null,s)}function vc(s){return Ha(s),s.headers=qt.from(s.headers),s.data=Va.call(s,s.transformRequest),["post","put","patch"].indexOf(s.method)!==-1&&s.headers.setContentType("application/x-www-form-urlencoded",!1),yc.getAdapter(s.adapter||wo.adapter,s)(s).then(function(m){return Ha(s),m.data=Va.call(s,s.transformResponse,m),m.headers=qt.from(m.headers),m},function(m){return rc(m)||(Ha(s),m&&m.response&&(m.response.data=Va.call(s,s.transformResponse,m.response),m.response.headers=qt.from(m.response.headers))),Promise.reject(m)})}const bc="1.13.2",rs={};["object","boolean","number","function","string","symbol"].forEach((s,u)=>{rs[s]=function(m){return typeof m===s||"a"+(u<1?"n ":" ")+s}});const gc={};rs.transitional=function(u,f,m){function b(w,d){return"[Axios v"+bc+"] Transitional option '"+w+"'"+d+(m?". "+m:"")}return(w,d,y)=>{if(u===!1)throw new Ae(b(d," has been removed"+(f?" in "+f:"")),Ae.ERR_DEPRECATED);return f&&!gc[d]&&(gc[d]=!0,console.warn(b(d," has been deprecated since v"+f+" and will be removed in the near future"))),u?u(w,d,y):!0}},rs.spelling=function(u){return(f,m)=>(console.warn(`${m} is likely a misspelling of ${u}`),!0)};function Nm(s,u,f){if(typeof s!="object")throw new Ae("options must be an object",Ae.ERR_BAD_OPTION_VALUE);const m=Object.keys(s);let b=m.length;for(;b-- >0;){const w=m[b],d=u[w];if(d){const y=s[w],i=y===void 0||d(y,w,s);if(i!==!0)throw new Ae("option "+w+" must be "+i,Ae.ERR_BAD_OPTION_VALUE);continue}if(f!==!0)throw new Ae("Unknown option "+w,Ae.ERR_BAD_OPTION)}}const ns={assertOptions:Nm,validators:rs},_r=ns.validators;let Nn=class{constructor(u){this.defaults=u||{},this.interceptors={request:new Qu,response:new Qu}}async request(u,f){try{return await this._request(u,f)}catch(m){if(m instanceof Error){let b={};Error.captureStackTrace?Error.captureStackTrace(b):b=new Error;const w=b.stack?b.stack.replace(/^.+\n/,""):"";try{m.stack?w&&!String(m.stack).endsWith(w.replace(/^.+\n.+\n/,""))&&(m.stack+=`
6
+ `+w):m.stack=w}catch{}}throw m}}_request(u,f){typeof u=="string"?(f=f||{},f.url=u):f=u||{},f=In(this.defaults,f);const{transitional:m,paramsSerializer:b,headers:w}=f;m!==void 0&&ns.assertOptions(m,{silentJSONParsing:_r.transitional(_r.boolean),forcedJSONParsing:_r.transitional(_r.boolean),clarifyTimeoutError:_r.transitional(_r.boolean)},!1),b!=null&&(oe.isFunction(b)?f.paramsSerializer={serialize:b}:ns.assertOptions(b,{encode:_r.function,serialize:_r.function},!0)),f.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?f.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:f.allowAbsoluteUrls=!0),ns.assertOptions(f,{baseUrl:_r.spelling("baseURL"),withXsrfToken:_r.spelling("withXSRFToken")},!0),f.method=(f.method||this.defaults.method||"get").toLowerCase();let d=w&&oe.merge(w.common,w[f.method]);w&&oe.forEach(["delete","get","head","post","put","patch","common"],k=>{delete w[k]}),f.headers=qt.concat(d,w);const y=[];let i=!0;this.interceptors.request.forEach(function(E){typeof E.runWhen=="function"&&E.runWhen(f)===!1||(i=i&&E.synchronous,y.unshift(E.fulfilled,E.rejected))});const h=[];this.interceptors.response.forEach(function(E){h.push(E.fulfilled,E.rejected)});let p,g=0,v;if(!i){const k=[vc.bind(this),void 0];for(k.unshift(...y),k.push(...h),v=k.length,p=Promise.resolve(f);g<v;)p=p.then(k[g++],k[g++]);return p}v=y.length;let j=f;for(;g<v;){const k=y[g++],E=y[g++];try{j=k(j)}catch(O){E.call(this,O);break}}try{p=vc.call(this,j)}catch(k){return Promise.reject(k)}for(g=0,v=h.length;g<v;)p=p.then(h[g++],h[g++]);return p}getUri(u){u=In(this.defaults,u);const f=sc(u.baseURL,u.url,u.allowAbsoluteUrls);return Yu(f,u.params,u.paramsSerializer)}};oe.forEach(["delete","get","head","options"],function(u){Nn.prototype[u]=function(f,m){return this.request(In(m||{},{method:u,url:f,data:(m||{}).data}))}}),oe.forEach(["post","put","patch"],function(u){function f(m){return function(w,d,y){return this.request(In(y||{},{method:u,headers:m?{"Content-Type":"multipart/form-data"}:{},url:w,data:d}))}}Nn.prototype[u]=f(),Nn.prototype[u+"Form"]=f(!0)});let Dm=class yp{constructor(u){if(typeof u!="function")throw new TypeError("executor must be a function.");let f;this.promise=new Promise(function(w){f=w});const m=this;this.promise.then(b=>{if(!m._listeners)return;let w=m._listeners.length;for(;w-- >0;)m._listeners[w](b);m._listeners=null}),this.promise.then=b=>{let w;const d=new Promise(y=>{m.subscribe(y),w=y}).then(b);return d.cancel=function(){m.unsubscribe(w)},d},u(function(w,d,y){m.reason||(m.reason=new gi(w,d,y),f(m.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(u){if(this.reason){u(this.reason);return}this._listeners?this._listeners.push(u):this._listeners=[u]}unsubscribe(u){if(!this._listeners)return;const f=this._listeners.indexOf(u);f!==-1&&this._listeners.splice(f,1)}toAbortSignal(){const u=new AbortController,f=m=>{u.abort(m)};return this.subscribe(f),u.signal.unsubscribe=()=>this.unsubscribe(f),u.signal}static source(){let u;return{token:new yp(function(b){u=b}),cancel:u}}};function Bm(s){return function(f){return s.apply(null,f)}}function Fm(s){return oe.isObject(s)&&s.isAxiosError===!0}const Ua={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Ua).forEach(([s,u])=>{Ua[u]=s});function _c(s){const u=new Nn(s),f=yi(Nn.prototype.request,u);return oe.extend(f,Nn.prototype,u,{allOwnKeys:!0}),oe.extend(f,u,null,{allOwnKeys:!0}),f.create=function(b){return _c(In(s,b))},f}const dt=_c(wo);dt.Axios=Nn,dt.CanceledError=gi,dt.CancelToken=Dm,dt.isCancel=rc,dt.VERSION=bc,dt.toFormData=Qo,dt.AxiosError=Ae,dt.Cancel=dt.CanceledError,dt.all=function(u){return Promise.all(u)},dt.spread=Bm,dt.isAxiosError=Fm,dt.mergeConfig=In,dt.AxiosHeaders=qt,dt.formToJSON=s=>ec(oe.isHTMLForm(s)?new FormData(s):s),dt.getAdapter=yc.getAdapter,dt.HttpStatusCode=Ua,dt.default=dt;const{Axios:U0,AxiosError:G0,CanceledError:J0,isCancel:K0,CancelToken:W0,VERSION:Z0,all:Y0,Cancel:Q0,isAxiosError:X0,spread:ew,toFormData:tw,AxiosHeaders:rw,HttpStatusCode:nw,formToJSON:iw,getAdapter:ow,mergeConfig:sw}=dt;function Mm(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}var is={exports:{}},Ga={},Fr={},Dn={},Ja={},Ka={},Wa={},wc;function os(){return wc||(wc=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.regexpCode=s.getEsmExportName=s.getProperty=s.safeStringify=s.stringify=s.strConcat=s.addCodeArg=s.str=s._=s.nil=s._Code=s.Name=s.IDENTIFIER=s._CodeOrName=void 0;class u{}s._CodeOrName=u,s.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class f extends u{constructor(S){if(super(),!s.IDENTIFIER.test(S))throw new Error("CodeGen: name must be a valid identifier");this.str=S}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}s.Name=f;class m extends u{constructor(S){super(),this._items=typeof S=="string"?[S]:S}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const S=this._items[0];return S===""||S==='""'}get str(){var S;return(S=this._str)!==null&&S!==void 0?S:this._str=this._items.reduce((P,L)=>`${P}${L}`,"")}get names(){var S;return(S=this._names)!==null&&S!==void 0?S:this._names=this._items.reduce((P,L)=>(L instanceof f&&(P[L.str]=(P[L.str]||0)+1),P),{})}}s._Code=m,s.nil=new m("");function b(x,...S){const P=[x[0]];let L=0;for(;L<S.length;)y(P,S[L]),P.push(x[++L]);return new m(P)}s._=b;const w=new m("+");function d(x,...S){const P=[j(x[0])];let L=0;for(;L<S.length;)P.push(w),y(P,S[L]),P.push(w,j(x[++L]));return i(P),new m(P)}s.str=d;function y(x,S){S instanceof m?x.push(...S._items):S instanceof f?x.push(S):x.push(g(S))}s.addCodeArg=y;function i(x){let S=1;for(;S<x.length-1;){if(x[S]===w){const P=h(x[S-1],x[S+1]);if(P!==void 0){x.splice(S-1,3,P);continue}x[S++]="+"}S++}}function h(x,S){if(S==='""')return x;if(x==='""')return S;if(typeof x=="string")return S instanceof f||x[x.length-1]!=='"'?void 0:typeof S!="string"?`${x.slice(0,-1)}${S}"`:S[0]==='"'?x.slice(0,-1)+S.slice(1):void 0;if(typeof S=="string"&&S[0]==='"'&&!(x instanceof f))return`"${x}${S.slice(1)}`}function p(x,S){return S.emptyStr()?x:x.emptyStr()?S:d`${x}${S}`}s.strConcat=p;function g(x){return typeof x=="number"||typeof x=="boolean"||x===null?x:j(Array.isArray(x)?x.join(","):x)}function v(x){return new m(j(x))}s.stringify=v;function j(x){return JSON.stringify(x).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}s.safeStringify=j;function k(x){return typeof x=="string"&&s.IDENTIFIER.test(x)?new m(`.${x}`):b`[${x}]`}s.getProperty=k;function E(x){if(typeof x=="string"&&s.IDENTIFIER.test(x))return new m(`${x}`);throw new Error(`CodeGen: invalid export name: ${x}, use explicit $id name mapping`)}s.getEsmExportName=E;function O(x){return new m(x.toString())}s.regexpCode=O})(Wa)),Wa}var Za={},kc;function jc(){return kc||(kc=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.ValueScope=s.ValueScopeName=s.Scope=s.varKinds=s.UsedValueState=void 0;const u=os();class f extends Error{constructor(h){super(`CodeGen: "code" for ${h} not defined`),this.value=h.value}}var m;(function(i){i[i.Started=0]="Started",i[i.Completed=1]="Completed"})(m||(s.UsedValueState=m={})),s.varKinds={const:new u.Name("const"),let:new u.Name("let"),var:new u.Name("var")};class b{constructor({prefixes:h,parent:p}={}){this._names={},this._prefixes=h,this._parent=p}toName(h){return h instanceof u.Name?h:this.name(h)}name(h){return new u.Name(this._newName(h))}_newName(h){const p=this._names[h]||this._nameGroup(h);return`${h}${p.index++}`}_nameGroup(h){var p,g;if(!((g=(p=this._parent)===null||p===void 0?void 0:p._prefixes)===null||g===void 0)&&g.has(h)||this._prefixes&&!this._prefixes.has(h))throw new Error(`CodeGen: prefix "${h}" is not allowed in this scope`);return this._names[h]={prefix:h,index:0}}}s.Scope=b;class w extends u.Name{constructor(h,p){super(p),this.prefix=h}setValue(h,{property:p,itemIndex:g}){this.value=h,this.scopePath=(0,u._)`.${new u.Name(p)}[${g}]`}}s.ValueScopeName=w;const d=(0,u._)`\n`;class y extends b{constructor(h){super(h),this._values={},this._scope=h.scope,this.opts={...h,_n:h.lines?d:u.nil}}get(){return this._scope}name(h){return new w(h,this._newName(h))}value(h,p){var g;if(p.ref===void 0)throw new Error("CodeGen: ref must be passed in value");const v=this.toName(h),{prefix:j}=v,k=(g=p.key)!==null&&g!==void 0?g:p.ref;let E=this._values[j];if(E){const S=E.get(k);if(S)return S}else E=this._values[j]=new Map;E.set(k,v);const O=this._scope[j]||(this._scope[j]=[]),x=O.length;return O[x]=p.ref,v.setValue(p,{property:j,itemIndex:x}),v}getValue(h,p){const g=this._values[h];if(g)return g.get(p)}scopeRefs(h,p=this._values){return this._reduceValues(p,g=>{if(g.scopePath===void 0)throw new Error(`CodeGen: name "${g}" has no value`);return(0,u._)`${h}${g.scopePath}`})}scopeCode(h=this._values,p,g){return this._reduceValues(h,v=>{if(v.value===void 0)throw new Error(`CodeGen: name "${v}" has no value`);return v.value.code},p,g)}_reduceValues(h,p,g={},v){let j=u.nil;for(const k in h){const E=h[k];if(!E)continue;const O=g[k]=g[k]||new Map;E.forEach(x=>{if(O.has(x))return;O.set(x,m.Started);let S=p(x);if(S){const P=this.opts.es5?s.varKinds.var:s.varKinds.const;j=(0,u._)`${j}${P} ${x} = ${S};${this.opts._n}`}else if(S=v?.(x))j=(0,u._)`${j}${S}${this.opts._n}`;else throw new f(x);O.set(x,m.Completed)})}return j}}s.ValueScope=y})(Za)),Za}var Oc;function ze(){return Oc||(Oc=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.or=s.and=s.not=s.CodeGen=s.operators=s.varKinds=s.ValueScopeName=s.ValueScope=s.Scope=s.Name=s.regexpCode=s.stringify=s.getProperty=s.nil=s.strConcat=s.str=s._=void 0;const u=os(),f=jc();var m=os();Object.defineProperty(s,"_",{enumerable:!0,get:function(){return m._}}),Object.defineProperty(s,"str",{enumerable:!0,get:function(){return m.str}}),Object.defineProperty(s,"strConcat",{enumerable:!0,get:function(){return m.strConcat}}),Object.defineProperty(s,"nil",{enumerable:!0,get:function(){return m.nil}}),Object.defineProperty(s,"getProperty",{enumerable:!0,get:function(){return m.getProperty}}),Object.defineProperty(s,"stringify",{enumerable:!0,get:function(){return m.stringify}}),Object.defineProperty(s,"regexpCode",{enumerable:!0,get:function(){return m.regexpCode}}),Object.defineProperty(s,"Name",{enumerable:!0,get:function(){return m.Name}});var b=jc();Object.defineProperty(s,"Scope",{enumerable:!0,get:function(){return b.Scope}}),Object.defineProperty(s,"ValueScope",{enumerable:!0,get:function(){return b.ValueScope}}),Object.defineProperty(s,"ValueScopeName",{enumerable:!0,get:function(){return b.ValueScopeName}}),Object.defineProperty(s,"varKinds",{enumerable:!0,get:function(){return b.varKinds}}),s.operators={GT:new u._Code(">"),GTE:new u._Code(">="),LT:new u._Code("<"),LTE:new u._Code("<="),EQ:new u._Code("==="),NEQ:new u._Code("!=="),NOT:new u._Code("!"),OR:new u._Code("||"),AND:new u._Code("&&"),ADD:new u._Code("+")};class w{optimizeNodes(){return this}optimizeNames(I,F){return this}}class d extends w{constructor(I,F,te){super(),this.varKind=I,this.name=F,this.rhs=te}render({es5:I,_n:F}){const te=I?f.varKinds.var:this.varKind,ge=this.rhs===void 0?"":` = ${this.rhs}`;return`${te} ${this.name}${ge};`+F}optimizeNames(I,F){if(I[this.name.str])return this.rhs&&(this.rhs=X(this.rhs,I,F)),this}get names(){return this.rhs instanceof u._CodeOrName?this.rhs.names:{}}}class y extends w{constructor(I,F,te){super(),this.lhs=I,this.rhs=F,this.sideEffects=te}render({_n:I}){return`${this.lhs} = ${this.rhs};`+I}optimizeNames(I,F){if(!(this.lhs instanceof u.Name&&!I[this.lhs.str]&&!this.sideEffects))return this.rhs=X(this.rhs,I,F),this}get names(){const I=this.lhs instanceof u.Name?{}:{...this.lhs.names};return G(I,this.rhs)}}class i extends y{constructor(I,F,te,ge){super(I,te,ge),this.op=F}render({_n:I}){return`${this.lhs} ${this.op}= ${this.rhs};`+I}}class h extends w{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`${this.label}:`+I}}class p extends w{constructor(I){super(),this.label=I,this.names={}}render({_n:I}){return`break${this.label?` ${this.label}`:""};`+I}}class g extends w{constructor(I){super(),this.error=I}render({_n:I}){return`throw ${this.error};`+I}get names(){return this.error.names}}class v extends w{constructor(I){super(),this.code=I}render({_n:I}){return`${this.code};`+I}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(I,F){return this.code=X(this.code,I,F),this}get names(){return this.code instanceof u._CodeOrName?this.code.names:{}}}class j extends w{constructor(I=[]){super(),this.nodes=I}render(I){return this.nodes.reduce((F,te)=>F+te.render(I),"")}optimizeNodes(){const{nodes:I}=this;let F=I.length;for(;F--;){const te=I[F].optimizeNodes();Array.isArray(te)?I.splice(F,1,...te):te?I[F]=te:I.splice(F,1)}return I.length>0?this:void 0}optimizeNames(I,F){const{nodes:te}=this;let ge=te.length;for(;ge--;){const be=te[ge];be.optimizeNames(I,F)||(le(I,be.names),te.splice(ge,1))}return te.length>0?this:void 0}get names(){return this.nodes.reduce((I,F)=>J(I,F.names),{})}}class k extends j{render(I){return"{"+I._n+super.render(I)+"}"+I._n}}class E extends j{}class O extends k{}O.kind="else";class x extends k{constructor(I,F){super(F),this.condition=I}render(I){let F=`if(${this.condition})`+super.render(I);return this.else&&(F+="else "+this.else.render(I)),F}optimizeNodes(){super.optimizeNodes();const I=this.condition;if(I===!0)return this.nodes;let F=this.else;if(F){const te=F.optimizeNodes();F=this.else=Array.isArray(te)?new O(te):te}if(F)return I===!1?F instanceof x?F:F.nodes:this.nodes.length?this:new x(ue(I),F instanceof x?[F]:F.nodes);if(!(I===!1||!this.nodes.length))return this}optimizeNames(I,F){var te;if(this.else=(te=this.else)===null||te===void 0?void 0:te.optimizeNames(I,F),!!(super.optimizeNames(I,F)||this.else))return this.condition=X(this.condition,I,F),this}get names(){const I=super.names;return G(I,this.condition),this.else&&J(I,this.else.names),I}}x.kind="if";class S extends k{}S.kind="for";class P extends S{constructor(I){super(),this.iteration=I}render(I){return`for(${this.iteration})`+super.render(I)}optimizeNames(I,F){if(super.optimizeNames(I,F))return this.iteration=X(this.iteration,I,F),this}get names(){return J(super.names,this.iteration.names)}}class L extends S{constructor(I,F,te,ge){super(),this.varKind=I,this.name=F,this.from=te,this.to=ge}render(I){const F=I.es5?f.varKinds.var:this.varKind,{name:te,from:ge,to:be}=this;return`for(${F} ${te}=${ge}; ${te}<${be}; ${te}++)`+super.render(I)}get names(){const I=G(super.names,this.from);return G(I,this.to)}}class T extends S{constructor(I,F,te,ge){super(),this.loop=I,this.varKind=F,this.name=te,this.iterable=ge}render(I){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(I)}optimizeNames(I,F){if(super.optimizeNames(I,F))return this.iterable=X(this.iterable,I,F),this}get names(){return J(super.names,this.iterable.names)}}class R extends k{constructor(I,F,te){super(),this.name=I,this.args=F,this.async=te}render(I){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(I)}}R.kind="func";class A extends j{render(I){return"return "+super.render(I)}}A.kind="return";class N extends k{render(I){let F="try"+super.render(I);return this.catch&&(F+=this.catch.render(I)),this.finally&&(F+=this.finally.render(I)),F}optimizeNodes(){var I,F;return super.optimizeNodes(),(I=this.catch)===null||I===void 0||I.optimizeNodes(),(F=this.finally)===null||F===void 0||F.optimizeNodes(),this}optimizeNames(I,F){var te,ge;return super.optimizeNames(I,F),(te=this.catch)===null||te===void 0||te.optimizeNames(I,F),(ge=this.finally)===null||ge===void 0||ge.optimizeNames(I,F),this}get names(){const I=super.names;return this.catch&&J(I,this.catch.names),this.finally&&J(I,this.finally.names),I}}class D extends k{constructor(I){super(),this.error=I}render(I){return`catch(${this.error})`+super.render(I)}}D.kind="catch";class M extends k{render(I){return"finally"+super.render(I)}}M.kind="finally";class q{constructor(I,F={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...F,_n:F.lines?`
7
+ `:""},this._extScope=I,this._scope=new f.Scope({parent:I}),this._nodes=[new E]}toString(){return this._root.render(this.opts)}name(I){return this._scope.name(I)}scopeName(I){return this._extScope.name(I)}scopeValue(I,F){const te=this._extScope.value(I,F);return(this._values[te.prefix]||(this._values[te.prefix]=new Set)).add(te),te}getScopeValue(I,F){return this._extScope.getValue(I,F)}scopeRefs(I){return this._extScope.scopeRefs(I,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(I,F,te,ge){const be=this._scope.toName(F);return te!==void 0&&ge&&(this._constants[be.str]=te),this._leafNode(new d(I,be,te)),be}const(I,F,te){return this._def(f.varKinds.const,I,F,te)}let(I,F,te){return this._def(f.varKinds.let,I,F,te)}var(I,F,te){return this._def(f.varKinds.var,I,F,te)}assign(I,F,te){return this._leafNode(new y(I,F,te))}add(I,F){return this._leafNode(new i(I,s.operators.ADD,F))}code(I){return typeof I=="function"?I():I!==u.nil&&this._leafNode(new v(I)),this}object(...I){const F=["{"];for(const[te,ge]of I)F.length>1&&F.push(","),F.push(te),(te!==ge||this.opts.es5)&&(F.push(":"),(0,u.addCodeArg)(F,ge));return F.push("}"),new u._Code(F)}if(I,F,te){if(this._blockNode(new x(I)),F&&te)this.code(F).else().code(te).endIf();else if(F)this.code(F).endIf();else if(te)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(I){return this._elseNode(new x(I))}else(){return this._elseNode(new O)}endIf(){return this._endBlockNode(x,O)}_for(I,F){return this._blockNode(I),F&&this.code(F).endFor(),this}for(I,F){return this._for(new P(I),F)}forRange(I,F,te,ge,be=this.opts.es5?f.varKinds.var:f.varKinds.let){const Oe=this._scope.toName(I);return this._for(new L(be,Oe,F,te),()=>ge(Oe))}forOf(I,F,te,ge=f.varKinds.const){const be=this._scope.toName(I);if(this.opts.es5){const Oe=F instanceof u.Name?F:this.var("_arr",F);return this.forRange("_i",0,(0,u._)`${Oe}.length`,ve=>{this.var(be,(0,u._)`${Oe}[${ve}]`),te(be)})}return this._for(new T("of",ge,be,F),()=>te(be))}forIn(I,F,te,ge=this.opts.es5?f.varKinds.var:f.varKinds.const){if(this.opts.ownProperties)return this.forOf(I,(0,u._)`Object.keys(${F})`,te);const be=this._scope.toName(I);return this._for(new T("in",ge,be,F),()=>te(be))}endFor(){return this._endBlockNode(S)}label(I){return this._leafNode(new h(I))}break(I){return this._leafNode(new p(I))}return(I){const F=new A;if(this._blockNode(F),this.code(I),F.nodes.length!==1)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(I,F,te){if(!F&&!te)throw new Error('CodeGen: "try" without "catch" and "finally"');const ge=new N;if(this._blockNode(ge),this.code(I),F){const be=this.name("e");this._currNode=ge.catch=new D(be),F(be)}return te&&(this._currNode=ge.finally=new M,this.code(te)),this._endBlockNode(D,M)}throw(I){return this._leafNode(new g(I))}block(I,F){return this._blockStarts.push(this._nodes.length),I&&this.code(I).endBlock(F),this}endBlock(I){const F=this._blockStarts.pop();if(F===void 0)throw new Error("CodeGen: not in self-balancing block");const te=this._nodes.length-F;if(te<0||I!==void 0&&te!==I)throw new Error(`CodeGen: wrong number of nodes: ${te} vs ${I} expected`);return this._nodes.length=F,this}func(I,F=u.nil,te,ge){return this._blockNode(new R(I,F,te)),ge&&this.code(ge).endFunc(),this}endFunc(){return this._endBlockNode(R)}optimize(I=1){for(;I-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(I){return this._currNode.nodes.push(I),this}_blockNode(I){this._currNode.nodes.push(I),this._nodes.push(I)}_endBlockNode(I,F){const te=this._currNode;if(te instanceof I||F&&te instanceof F)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${F?`${I.kind}/${F.kind}`:I.kind}"`)}_elseNode(I){const F=this._currNode;if(!(F instanceof x))throw new Error('CodeGen: "else" without "if"');return this._currNode=F.else=I,this}get _root(){return this._nodes[0]}get _currNode(){const I=this._nodes;return I[I.length-1]}set _currNode(I){const F=this._nodes;F[F.length-1]=I}}s.CodeGen=q;function J(V,I){for(const F in I)V[F]=(V[F]||0)+(I[F]||0);return V}function G(V,I){return I instanceof u._CodeOrName?J(V,I.names):V}function X(V,I,F){if(V instanceof u.Name)return te(V);if(!ge(V))return V;return new u._Code(V._items.reduce((be,Oe)=>(Oe instanceof u.Name&&(Oe=te(Oe)),Oe instanceof u._Code?be.push(...Oe._items):be.push(Oe),be),[]));function te(be){const Oe=F[be.str];return Oe===void 0||I[be.str]!==1?be:(delete I[be.str],Oe)}function ge(be){return be instanceof u._Code&&be._items.some(Oe=>Oe instanceof u.Name&&I[Oe.str]===1&&F[Oe.str]!==void 0)}}function le(V,I){for(const F in I)V[F]=(V[F]||0)-(I[F]||0)}function ue(V){return typeof V=="boolean"||typeof V=="number"||V===null?!V:(0,u._)`!${ee(V)}`}s.not=ue;const he=H(s.operators.AND);function ce(...V){return V.reduce(he)}s.and=ce;const me=H(s.operators.OR);function ie(...V){return V.reduce(me)}s.or=ie;function H(V){return(I,F)=>I===u.nil?F:F===u.nil?I:(0,u._)`${ee(I)} ${V} ${ee(F)}`}function ee(V){return V instanceof u.Name?V:(0,u._)`(${V})`}})(Ka)),Ka}var Ne={},Ec;function Ye(){if(Ec)return Ne;Ec=1,Object.defineProperty(Ne,"__esModule",{value:!0}),Ne.checkStrictMode=Ne.getErrorPath=Ne.Type=Ne.useFunc=Ne.setEvaluated=Ne.evaluatedPropsToName=Ne.mergeEvaluated=Ne.eachItem=Ne.unescapeJsonPointer=Ne.escapeJsonPointer=Ne.escapeFragment=Ne.unescapeFragment=Ne.schemaRefOrVal=Ne.schemaHasRulesButRef=Ne.schemaHasRules=Ne.checkUnknownRules=Ne.alwaysValidSchema=Ne.toHash=void 0;const s=ze(),u=os();function f(T){const R={};for(const A of T)R[A]=!0;return R}Ne.toHash=f;function m(T,R){return typeof R=="boolean"?R:Object.keys(R).length===0?!0:(b(T,R),!w(R,T.self.RULES.all))}Ne.alwaysValidSchema=m;function b(T,R=T.schema){const{opts:A,self:N}=T;if(!A.strictSchema||typeof R=="boolean")return;const D=N.RULES.keywords;for(const M in R)D[M]||L(T,`unknown keyword: "${M}"`)}Ne.checkUnknownRules=b;function w(T,R){if(typeof T=="boolean")return!T;for(const A in T)if(R[A])return!0;return!1}Ne.schemaHasRules=w;function d(T,R){if(typeof T=="boolean")return!T;for(const A in T)if(A!=="$ref"&&R.all[A])return!0;return!1}Ne.schemaHasRulesButRef=d;function y({topSchemaRef:T,schemaPath:R},A,N,D){if(!D){if(typeof A=="number"||typeof A=="boolean")return A;if(typeof A=="string")return(0,s._)`${A}`}return(0,s._)`${T}${R}${(0,s.getProperty)(N)}`}Ne.schemaRefOrVal=y;function i(T){return g(decodeURIComponent(T))}Ne.unescapeFragment=i;function h(T){return encodeURIComponent(p(T))}Ne.escapeFragment=h;function p(T){return typeof T=="number"?`${T}`:T.replace(/~/g,"~0").replace(/\//g,"~1")}Ne.escapeJsonPointer=p;function g(T){return T.replace(/~1/g,"/").replace(/~0/g,"~")}Ne.unescapeJsonPointer=g;function v(T,R){if(Array.isArray(T))for(const A of T)R(A);else R(T)}Ne.eachItem=v;function j({mergeNames:T,mergeToName:R,mergeValues:A,resultToName:N}){return(D,M,q,J)=>{const G=q===void 0?M:q instanceof s.Name?(M instanceof s.Name?T(D,M,q):R(D,M,q),q):M instanceof s.Name?(R(D,q,M),M):A(M,q);return J===s.Name&&!(G instanceof s.Name)?N(D,G):G}}Ne.mergeEvaluated={props:j({mergeNames:(T,R,A)=>T.if((0,s._)`${A} !== true && ${R} !== undefined`,()=>{T.if((0,s._)`${R} === true`,()=>T.assign(A,!0),()=>T.assign(A,(0,s._)`${A} || {}`).code((0,s._)`Object.assign(${A}, ${R})`))}),mergeToName:(T,R,A)=>T.if((0,s._)`${A} !== true`,()=>{R===!0?T.assign(A,!0):(T.assign(A,(0,s._)`${A} || {}`),E(T,A,R))}),mergeValues:(T,R)=>T===!0?!0:{...T,...R},resultToName:k}),items:j({mergeNames:(T,R,A)=>T.if((0,s._)`${A} !== true && ${R} !== undefined`,()=>T.assign(A,(0,s._)`${R} === true ? true : ${A} > ${R} ? ${A} : ${R}`)),mergeToName:(T,R,A)=>T.if((0,s._)`${A} !== true`,()=>T.assign(A,R===!0?!0:(0,s._)`${A} > ${R} ? ${A} : ${R}`)),mergeValues:(T,R)=>T===!0?!0:Math.max(T,R),resultToName:(T,R)=>T.var("items",R)})};function k(T,R){if(R===!0)return T.var("props",!0);const A=T.var("props",(0,s._)`{}`);return R!==void 0&&E(T,A,R),A}Ne.evaluatedPropsToName=k;function E(T,R,A){Object.keys(A).forEach(N=>T.assign((0,s._)`${R}${(0,s.getProperty)(N)}`,!0))}Ne.setEvaluated=E;const O={};function x(T,R){return T.scopeValue("func",{ref:R,code:O[R.code]||(O[R.code]=new u._Code(R.code))})}Ne.useFunc=x;var S;(function(T){T[T.Num=0]="Num",T[T.Str=1]="Str"})(S||(Ne.Type=S={}));function P(T,R,A){if(T instanceof s.Name){const N=R===S.Num;return A?N?(0,s._)`"[" + ${T} + "]"`:(0,s._)`"['" + ${T} + "']"`:N?(0,s._)`"/" + ${T}`:(0,s._)`"/" + ${T}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return A?(0,s.getProperty)(T).toString():"/"+p(T)}Ne.getErrorPath=P;function L(T,R,A=T.opts.strictSchema){if(A){if(R=`strict mode: ${R}`,A===!0)throw new Error(R);T.self.logger.warn(R)}}return Ne.checkStrictMode=L,Ne}var ss={},Sc;function rn(){if(Sc)return ss;Sc=1,Object.defineProperty(ss,"__esModule",{value:!0});const s=ze(),u={data:new s.Name("data"),valCxt:new s.Name("valCxt"),instancePath:new s.Name("instancePath"),parentData:new s.Name("parentData"),parentDataProperty:new s.Name("parentDataProperty"),rootData:new s.Name("rootData"),dynamicAnchors:new s.Name("dynamicAnchors"),vErrors:new s.Name("vErrors"),errors:new s.Name("errors"),this:new s.Name("this"),self:new s.Name("self"),scope:new s.Name("scope"),json:new s.Name("json"),jsonPos:new s.Name("jsonPos"),jsonLen:new s.Name("jsonLen"),jsonPart:new s.Name("jsonPart")};return ss.default=u,ss}var xc;function as(){return xc||(xc=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.extendErrors=s.resetErrorsCount=s.reportExtraError=s.reportError=s.keyword$DataError=s.keywordError=void 0;const u=ze(),f=Ye(),m=rn();s.keywordError={message:({keyword:O})=>(0,u.str)`must pass "${O}" keyword validation`},s.keyword$DataError={message:({keyword:O,schemaType:x})=>x?(0,u.str)`"${O}" keyword must be ${x} ($data)`:(0,u.str)`"${O}" keyword is invalid ($data)`};function b(O,x=s.keywordError,S,P){const{it:L}=O,{gen:T,compositeRule:R,allErrors:A}=L,N=g(O,x,S);P??(R||A)?i(T,N):h(L,(0,u._)`[${N}]`)}s.reportError=b;function w(O,x=s.keywordError,S){const{it:P}=O,{gen:L,compositeRule:T,allErrors:R}=P,A=g(O,x,S);i(L,A),T||R||h(P,m.default.vErrors)}s.reportExtraError=w;function d(O,x){O.assign(m.default.errors,x),O.if((0,u._)`${m.default.vErrors} !== null`,()=>O.if(x,()=>O.assign((0,u._)`${m.default.vErrors}.length`,x),()=>O.assign(m.default.vErrors,null)))}s.resetErrorsCount=d;function y({gen:O,keyword:x,schemaValue:S,data:P,errsCount:L,it:T}){if(L===void 0)throw new Error("ajv implementation error");const R=O.name("err");O.forRange("i",L,m.default.errors,A=>{O.const(R,(0,u._)`${m.default.vErrors}[${A}]`),O.if((0,u._)`${R}.instancePath === undefined`,()=>O.assign((0,u._)`${R}.instancePath`,(0,u.strConcat)(m.default.instancePath,T.errorPath))),O.assign((0,u._)`${R}.schemaPath`,(0,u.str)`${T.errSchemaPath}/${x}`),T.opts.verbose&&(O.assign((0,u._)`${R}.schema`,S),O.assign((0,u._)`${R}.data`,P))})}s.extendErrors=y;function i(O,x){const S=O.const("err",x);O.if((0,u._)`${m.default.vErrors} === null`,()=>O.assign(m.default.vErrors,(0,u._)`[${S}]`),(0,u._)`${m.default.vErrors}.push(${S})`),O.code((0,u._)`${m.default.errors}++`)}function h(O,x){const{gen:S,validateName:P,schemaEnv:L}=O;L.$async?S.throw((0,u._)`new ${O.ValidationError}(${x})`):(S.assign((0,u._)`${P}.errors`,x),S.return(!1))}const p={keyword:new u.Name("keyword"),schemaPath:new u.Name("schemaPath"),params:new u.Name("params"),propertyName:new u.Name("propertyName"),message:new u.Name("message"),schema:new u.Name("schema"),parentSchema:new u.Name("parentSchema")};function g(O,x,S){const{createErrors:P}=O.it;return P===!1?(0,u._)`{}`:v(O,x,S)}function v(O,x,S={}){const{gen:P,it:L}=O,T=[j(L,S),k(O,S)];return E(O,x,T),P.object(...T)}function j({errorPath:O},{instancePath:x}){const S=x?(0,u.str)`${O}${(0,f.getErrorPath)(x,f.Type.Str)}`:O;return[m.default.instancePath,(0,u.strConcat)(m.default.instancePath,S)]}function k({keyword:O,it:{errSchemaPath:x}},{schemaPath:S,parentSchema:P}){let L=P?x:(0,u.str)`${x}/${O}`;return S&&(L=(0,u.str)`${L}${(0,f.getErrorPath)(S,f.Type.Str)}`),[p.schemaPath,L]}function E(O,{params:x,message:S},P){const{keyword:L,data:T,schemaValue:R,it:A}=O,{opts:N,propertyName:D,topSchemaRef:M,schemaPath:q}=A;P.push([p.keyword,L],[p.params,typeof x=="function"?x(O):x||(0,u._)`{}`]),N.messages&&P.push([p.message,typeof S=="function"?S(O):S]),N.verbose&&P.push([p.schema,R],[p.parentSchema,(0,u._)`${M}${q}`],[m.default.data,T]),D&&P.push([p.propertyName,D])}})(Ja)),Ja}var Cc;function qm(){if(Cc)return Dn;Cc=1,Object.defineProperty(Dn,"__esModule",{value:!0}),Dn.boolOrEmptySchema=Dn.topBoolOrEmptySchema=void 0;const s=as(),u=ze(),f=rn(),m={message:"boolean schema is false"};function b(y){const{gen:i,schema:h,validateName:p}=y;h===!1?d(y,!1):typeof h=="object"&&h.$async===!0?i.return(f.default.data):(i.assign((0,u._)`${p}.errors`,null),i.return(!0))}Dn.topBoolOrEmptySchema=b;function w(y,i){const{gen:h,schema:p}=y;p===!1?(h.var(i,!1),d(y)):h.var(i,!0)}Dn.boolOrEmptySchema=w;function d(y,i){const{gen:h,data:p}=y,g={gen:h,keyword:"false schema",data:p,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:y};(0,s.reportError)(g,m,void 0,i)}return Dn}var wt={},Bn={},Pc;function Tc(){if(Pc)return Bn;Pc=1,Object.defineProperty(Bn,"__esModule",{value:!0}),Bn.getRules=Bn.isJSONType=void 0;const s=["string","number","integer","boolean","null","object","array"],u=new Set(s);function f(b){return typeof b=="string"&&u.has(b)}Bn.isJSONType=f;function m(){const b={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...b,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},b.number,b.string,b.array,b.object],post:{rules:[]},all:{},keywords:{}}}return Bn.getRules=m,Bn}var Mr={},Rc;function Lc(){if(Rc)return Mr;Rc=1,Object.defineProperty(Mr,"__esModule",{value:!0}),Mr.shouldUseRule=Mr.shouldUseGroup=Mr.schemaHasRulesForType=void 0;function s({schema:m,self:b},w){const d=b.RULES.types[w];return d&&d!==!0&&u(m,d)}Mr.schemaHasRulesForType=s;function u(m,b){return b.rules.some(w=>f(m,w))}Mr.shouldUseGroup=u;function f(m,b){var w;return m[b.keyword]!==void 0||((w=b.definition.implements)===null||w===void 0?void 0:w.some(d=>m[d]!==void 0))}return Mr.shouldUseRule=f,Mr}var Ac;function ls(){if(Ac)return wt;Ac=1,Object.defineProperty(wt,"__esModule",{value:!0}),wt.reportTypeError=wt.checkDataTypes=wt.checkDataType=wt.coerceAndCheckDataType=wt.getJSONTypes=wt.getSchemaTypes=wt.DataType=void 0;const s=Tc(),u=Lc(),f=as(),m=ze(),b=Ye();var w;(function(S){S[S.Correct=0]="Correct",S[S.Wrong=1]="Wrong"})(w||(wt.DataType=w={}));function d(S){const P=y(S.type);if(P.includes("null")){if(S.nullable===!1)throw new Error("type: null contradicts nullable: false")}else{if(!P.length&&S.nullable!==void 0)throw new Error('"nullable" cannot be used without "type"');S.nullable===!0&&P.push("null")}return P}wt.getSchemaTypes=d;function y(S){const P=Array.isArray(S)?S:S?[S]:[];if(P.every(s.isJSONType))return P;throw new Error("type must be JSONType or JSONType[]: "+P.join(","))}wt.getJSONTypes=y;function i(S,P){const{gen:L,data:T,opts:R}=S,A=p(P,R.coerceTypes),N=P.length>0&&!(A.length===0&&P.length===1&&(0,u.schemaHasRulesForType)(S,P[0]));if(N){const D=k(P,T,R.strictNumbers,w.Wrong);L.if(D,()=>{A.length?g(S,P,A):O(S)})}return N}wt.coerceAndCheckDataType=i;const h=new Set(["string","number","integer","boolean","null"]);function p(S,P){return P?S.filter(L=>h.has(L)||P==="array"&&L==="array"):[]}function g(S,P,L){const{gen:T,data:R,opts:A}=S,N=T.let("dataType",(0,m._)`typeof ${R}`),D=T.let("coerced",(0,m._)`undefined`);A.coerceTypes==="array"&&T.if((0,m._)`${N} == 'object' && Array.isArray(${R}) && ${R}.length == 1`,()=>T.assign(R,(0,m._)`${R}[0]`).assign(N,(0,m._)`typeof ${R}`).if(k(P,R,A.strictNumbers),()=>T.assign(D,R))),T.if((0,m._)`${D} !== undefined`);for(const q of L)(h.has(q)||q==="array"&&A.coerceTypes==="array")&&M(q);T.else(),O(S),T.endIf(),T.if((0,m._)`${D} !== undefined`,()=>{T.assign(R,D),v(S,D)});function M(q){switch(q){case"string":T.elseIf((0,m._)`${N} == "number" || ${N} == "boolean"`).assign(D,(0,m._)`"" + ${R}`).elseIf((0,m._)`${R} === null`).assign(D,(0,m._)`""`);return;case"number":T.elseIf((0,m._)`${N} == "boolean" || ${R} === null
8
+ || (${N} == "string" && ${R} && ${R} == +${R})`).assign(D,(0,m._)`+${R}`);return;case"integer":T.elseIf((0,m._)`${N} === "boolean" || ${R} === null
9
+ || (${N} === "string" && ${R} && ${R} == +${R} && !(${R} % 1))`).assign(D,(0,m._)`+${R}`);return;case"boolean":T.elseIf((0,m._)`${R} === "false" || ${R} === 0 || ${R} === null`).assign(D,!1).elseIf((0,m._)`${R} === "true" || ${R} === 1`).assign(D,!0);return;case"null":T.elseIf((0,m._)`${R} === "" || ${R} === 0 || ${R} === false`),T.assign(D,null);return;case"array":T.elseIf((0,m._)`${N} === "string" || ${N} === "number"
10
+ || ${N} === "boolean" || ${R} === null`).assign(D,(0,m._)`[${R}]`)}}}function v({gen:S,parentData:P,parentDataProperty:L},T){S.if((0,m._)`${P} !== undefined`,()=>S.assign((0,m._)`${P}[${L}]`,T))}function j(S,P,L,T=w.Correct){const R=T===w.Correct?m.operators.EQ:m.operators.NEQ;let A;switch(S){case"null":return(0,m._)`${P} ${R} null`;case"array":A=(0,m._)`Array.isArray(${P})`;break;case"object":A=(0,m._)`${P} && typeof ${P} == "object" && !Array.isArray(${P})`;break;case"integer":A=N((0,m._)`!(${P} % 1) && !isNaN(${P})`);break;case"number":A=N();break;default:return(0,m._)`typeof ${P} ${R} ${S}`}return T===w.Correct?A:(0,m.not)(A);function N(D=m.nil){return(0,m.and)((0,m._)`typeof ${P} == "number"`,D,L?(0,m._)`isFinite(${P})`:m.nil)}}wt.checkDataType=j;function k(S,P,L,T){if(S.length===1)return j(S[0],P,L,T);let R;const A=(0,b.toHash)(S);if(A.array&&A.object){const N=(0,m._)`typeof ${P} != "object"`;R=A.null?N:(0,m._)`!${P} || ${N}`,delete A.null,delete A.array,delete A.object}else R=m.nil;A.number&&delete A.integer;for(const N in A)R=(0,m.and)(R,j(N,P,L,T));return R}wt.checkDataTypes=k;const E={message:({schema:S})=>`must be ${S}`,params:({schema:S,schemaValue:P})=>typeof S=="string"?(0,m._)`{type: ${S}}`:(0,m._)`{type: ${P}}`};function O(S){const P=x(S);(0,f.reportError)(P,E)}wt.reportTypeError=O;function x(S){const{gen:P,data:L,schema:T}=S,R=(0,b.schemaRefOrVal)(S,T,"type");return{gen:P,keyword:"type",data:L,schema:T.type,schemaCode:R,schemaValue:R,parentSchema:T,params:{},it:S}}return wt}var jo={},$c;function Vm(){if($c)return jo;$c=1,Object.defineProperty(jo,"__esModule",{value:!0}),jo.assignDefaults=void 0;const s=ze(),u=Ye();function f(b,w){const{properties:d,items:y}=b.schema;if(w==="object"&&d)for(const i in d)m(b,i,d[i].default);else w==="array"&&Array.isArray(y)&&y.forEach((i,h)=>m(b,h,i.default))}jo.assignDefaults=f;function m(b,w,d){const{gen:y,compositeRule:i,data:h,opts:p}=b;if(d===void 0)return;const g=(0,s._)`${h}${(0,s.getProperty)(w)}`;if(i){(0,u.checkStrictMode)(b,`default is ignored for: ${g}`);return}let v=(0,s._)`${g} === undefined`;p.useDefaults==="empty"&&(v=(0,s._)`${v} || ${g} === null || ${g} === ""`),y.if(v,(0,s._)`${g} = ${(0,s.stringify)(d)}`)}return jo}var nr={},rt={},Ic;function ir(){if(Ic)return rt;Ic=1,Object.defineProperty(rt,"__esModule",{value:!0}),rt.validateUnion=rt.validateArray=rt.usePattern=rt.callValidateCode=rt.schemaProperties=rt.allSchemaProperties=rt.noPropertyInData=rt.propertyInData=rt.isOwnProperty=rt.hasPropFunc=rt.reportMissingProp=rt.checkMissingProp=rt.checkReportMissingProp=void 0;const s=ze(),u=Ye(),f=rn(),m=Ye();function b(S,P){const{gen:L,data:T,it:R}=S;L.if(p(L,T,P,R.opts.ownProperties),()=>{S.setParams({missingProperty:(0,s._)`${P}`},!0),S.error()})}rt.checkReportMissingProp=b;function w({gen:S,data:P,it:{opts:L}},T,R){return(0,s.or)(...T.map(A=>(0,s.and)(p(S,P,A,L.ownProperties),(0,s._)`${R} = ${A}`)))}rt.checkMissingProp=w;function d(S,P){S.setParams({missingProperty:P},!0),S.error()}rt.reportMissingProp=d;function y(S){return S.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,s._)`Object.prototype.hasOwnProperty`})}rt.hasPropFunc=y;function i(S,P,L){return(0,s._)`${y(S)}.call(${P}, ${L})`}rt.isOwnProperty=i;function h(S,P,L,T){const R=(0,s._)`${P}${(0,s.getProperty)(L)} !== undefined`;return T?(0,s._)`${R} && ${i(S,P,L)}`:R}rt.propertyInData=h;function p(S,P,L,T){const R=(0,s._)`${P}${(0,s.getProperty)(L)} === undefined`;return T?(0,s.or)(R,(0,s.not)(i(S,P,L))):R}rt.noPropertyInData=p;function g(S){return S?Object.keys(S).filter(P=>P!=="__proto__"):[]}rt.allSchemaProperties=g;function v(S,P){return g(P).filter(L=>!(0,u.alwaysValidSchema)(S,P[L]))}rt.schemaProperties=v;function j({schemaCode:S,data:P,it:{gen:L,topSchemaRef:T,schemaPath:R,errorPath:A},it:N},D,M,q){const J=q?(0,s._)`${S}, ${P}, ${T}${R}`:P,G=[[f.default.instancePath,(0,s.strConcat)(f.default.instancePath,A)],[f.default.parentData,N.parentData],[f.default.parentDataProperty,N.parentDataProperty],[f.default.rootData,f.default.rootData]];N.opts.dynamicRef&&G.push([f.default.dynamicAnchors,f.default.dynamicAnchors]);const X=(0,s._)`${J}, ${L.object(...G)}`;return M!==s.nil?(0,s._)`${D}.call(${M}, ${X})`:(0,s._)`${D}(${X})`}rt.callValidateCode=j;const k=(0,s._)`new RegExp`;function E({gen:S,it:{opts:P}},L){const T=P.unicodeRegExp?"u":"",{regExp:R}=P.code,A=R(L,T);return S.scopeValue("pattern",{key:A.toString(),ref:A,code:(0,s._)`${R.code==="new RegExp"?k:(0,m.useFunc)(S,R)}(${L}, ${T})`})}rt.usePattern=E;function O(S){const{gen:P,data:L,keyword:T,it:R}=S,A=P.name("valid");if(R.allErrors){const D=P.let("valid",!0);return N(()=>P.assign(D,!1)),D}return P.var(A,!0),N(()=>P.break()),A;function N(D){const M=P.const("len",(0,s._)`${L}.length`);P.forRange("i",0,M,q=>{S.subschema({keyword:T,dataProp:q,dataPropType:u.Type.Num},A),P.if((0,s.not)(A),D)})}}rt.validateArray=O;function x(S){const{gen:P,schema:L,keyword:T,it:R}=S;if(!Array.isArray(L))throw new Error("ajv implementation error");if(L.some(M=>(0,u.alwaysValidSchema)(R,M))&&!R.opts.unevaluated)return;const N=P.let("valid",!1),D=P.name("_valid");P.block(()=>L.forEach((M,q)=>{const J=S.subschema({keyword:T,schemaProp:q,compositeRule:!0},D);P.assign(N,(0,s._)`${N} || ${D}`),S.mergeValidEvaluated(J,D)||P.if((0,s.not)(N))})),S.result(N,()=>S.reset(),()=>S.error(!0))}return rt.validateUnion=x,rt}var Nc;function zm(){if(Nc)return nr;Nc=1,Object.defineProperty(nr,"__esModule",{value:!0}),nr.validateKeywordUsage=nr.validSchemaType=nr.funcKeywordCode=nr.macroKeywordCode=void 0;const s=ze(),u=rn(),f=ir(),m=as();function b(v,j){const{gen:k,keyword:E,schema:O,parentSchema:x,it:S}=v,P=j.macro.call(S.self,O,x,S),L=h(k,E,P);S.opts.validateSchema!==!1&&S.self.validateSchema(P,!0);const T=k.name("valid");v.subschema({schema:P,schemaPath:s.nil,errSchemaPath:`${S.errSchemaPath}/${E}`,topSchemaRef:L,compositeRule:!0},T),v.pass(T,()=>v.error(!0))}nr.macroKeywordCode=b;function w(v,j){var k;const{gen:E,keyword:O,schema:x,parentSchema:S,$data:P,it:L}=v;i(L,j);const T=!P&&j.compile?j.compile.call(L.self,x,S,L):j.validate,R=h(E,O,T),A=E.let("valid");v.block$data(A,N),v.ok((k=j.valid)!==null&&k!==void 0?k:A);function N(){if(j.errors===!1)q(),j.modifying&&d(v),J(()=>v.error());else{const G=j.async?D():M();j.modifying&&d(v),J(()=>y(v,G))}}function D(){const G=E.let("ruleErrs",null);return E.try(()=>q((0,s._)`await `),X=>E.assign(A,!1).if((0,s._)`${X} instanceof ${L.ValidationError}`,()=>E.assign(G,(0,s._)`${X}.errors`),()=>E.throw(X))),G}function M(){const G=(0,s._)`${R}.errors`;return E.assign(G,null),q(s.nil),G}function q(G=j.async?(0,s._)`await `:s.nil){const X=L.opts.passContext?u.default.this:u.default.self,le=!("compile"in j&&!P||j.schema===!1);E.assign(A,(0,s._)`${G}${(0,f.callValidateCode)(v,R,X,le)}`,j.modifying)}function J(G){var X;E.if((0,s.not)((X=j.valid)!==null&&X!==void 0?X:A),G)}}nr.funcKeywordCode=w;function d(v){const{gen:j,data:k,it:E}=v;j.if(E.parentData,()=>j.assign(k,(0,s._)`${E.parentData}[${E.parentDataProperty}]`))}function y(v,j){const{gen:k}=v;k.if((0,s._)`Array.isArray(${j})`,()=>{k.assign(u.default.vErrors,(0,s._)`${u.default.vErrors} === null ? ${j} : ${u.default.vErrors}.concat(${j})`).assign(u.default.errors,(0,s._)`${u.default.vErrors}.length`),(0,m.extendErrors)(v)},()=>v.error())}function i({schemaEnv:v},j){if(j.async&&!v.$async)throw new Error("async keyword in sync schema")}function h(v,j,k){if(k===void 0)throw new Error(`keyword "${j}" failed to compile`);return v.scopeValue("keyword",typeof k=="function"?{ref:k}:{ref:k,code:(0,s.stringify)(k)})}function p(v,j,k=!1){return!j.length||j.some(E=>E==="array"?Array.isArray(v):E==="object"?v&&typeof v=="object"&&!Array.isArray(v):typeof v==E||k&&typeof v>"u")}nr.validSchemaType=p;function g({schema:v,opts:j,self:k,errSchemaPath:E},O,x){if(Array.isArray(O.keyword)?!O.keyword.includes(x):O.keyword!==x)throw new Error("ajv implementation error");const S=O.dependencies;if(S?.some(P=>!Object.prototype.hasOwnProperty.call(v,P)))throw new Error(`parent schema must have dependencies of ${x}: ${S.join(",")}`);if(O.validateSchema&&!O.validateSchema(v[x])){const L=`keyword "${x}" value is invalid at path "${E}": `+k.errorsText(O.validateSchema.errors);if(j.validateSchema==="log")k.logger.error(L);else throw new Error(L)}}return nr.validateKeywordUsage=g,nr}var qr={},Dc;function Hm(){if(Dc)return qr;Dc=1,Object.defineProperty(qr,"__esModule",{value:!0}),qr.extendSubschemaMode=qr.extendSubschemaData=qr.getSubschema=void 0;const s=ze(),u=Ye();function f(w,{keyword:d,schemaProp:y,schema:i,schemaPath:h,errSchemaPath:p,topSchemaRef:g}){if(d!==void 0&&i!==void 0)throw new Error('both "keyword" and "schema" passed, only one allowed');if(d!==void 0){const v=w.schema[d];return y===void 0?{schema:v,schemaPath:(0,s._)`${w.schemaPath}${(0,s.getProperty)(d)}`,errSchemaPath:`${w.errSchemaPath}/${d}`}:{schema:v[y],schemaPath:(0,s._)`${w.schemaPath}${(0,s.getProperty)(d)}${(0,s.getProperty)(y)}`,errSchemaPath:`${w.errSchemaPath}/${d}/${(0,u.escapeFragment)(y)}`}}if(i!==void 0){if(h===void 0||p===void 0||g===void 0)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:h,topSchemaRef:g,errSchemaPath:p}}throw new Error('either "keyword" or "schema" must be passed')}qr.getSubschema=f;function m(w,d,{dataProp:y,dataPropType:i,data:h,dataTypes:p,propertyName:g}){if(h!==void 0&&y!==void 0)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:v}=d;if(y!==void 0){const{errorPath:k,dataPathArr:E,opts:O}=d,x=v.let("data",(0,s._)`${d.data}${(0,s.getProperty)(y)}`,!0);j(x),w.errorPath=(0,s.str)`${k}${(0,u.getErrorPath)(y,i,O.jsPropertySyntax)}`,w.parentDataProperty=(0,s._)`${y}`,w.dataPathArr=[...E,w.parentDataProperty]}if(h!==void 0){const k=h instanceof s.Name?h:v.let("data",h,!0);j(k),g!==void 0&&(w.propertyName=g)}p&&(w.dataTypes=p);function j(k){w.data=k,w.dataLevel=d.dataLevel+1,w.dataTypes=[],d.definedProperties=new Set,w.parentData=d.data,w.dataNames=[...d.dataNames,k]}}qr.extendSubschemaData=m;function b(w,{jtdDiscriminator:d,jtdMetadata:y,compositeRule:i,createErrors:h,allErrors:p}){i!==void 0&&(w.compositeRule=i),h!==void 0&&(w.createErrors=h),p!==void 0&&(w.allErrors=p),w.jtdDiscriminator=d,w.jtdMetadata=y}return qr.extendSubschemaMode=b,qr}var Lt={},Ya,Bc;function Fc(){return Bc||(Bc=1,Ya=function s(u,f){if(u===f)return!0;if(u&&f&&typeof u=="object"&&typeof f=="object"){if(u.constructor!==f.constructor)return!1;var m,b,w;if(Array.isArray(u)){if(m=u.length,m!=f.length)return!1;for(b=m;b--!==0;)if(!s(u[b],f[b]))return!1;return!0}if(u.constructor===RegExp)return u.source===f.source&&u.flags===f.flags;if(u.valueOf!==Object.prototype.valueOf)return u.valueOf()===f.valueOf();if(u.toString!==Object.prototype.toString)return u.toString()===f.toString();if(w=Object.keys(u),m=w.length,m!==Object.keys(f).length)return!1;for(b=m;b--!==0;)if(!Object.prototype.hasOwnProperty.call(f,w[b]))return!1;for(b=m;b--!==0;){var d=w[b];if(!s(u[d],f[d]))return!1}return!0}return u!==u&&f!==f}),Ya}var Qa={exports:{}},Mc;function Um(){if(Mc)return Qa.exports;Mc=1;var s=Qa.exports=function(m,b,w){typeof b=="function"&&(w=b,b={}),w=b.cb||w;var d=typeof w=="function"?w:w.pre||function(){},y=w.post||function(){};u(b,d,y,m,"",m)};s.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},s.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},s.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},s.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0};function u(m,b,w,d,y,i,h,p,g,v){if(d&&typeof d=="object"&&!Array.isArray(d)){b(d,y,i,h,p,g,v);for(var j in d){var k=d[j];if(Array.isArray(k)){if(j in s.arrayKeywords)for(var E=0;E<k.length;E++)u(m,b,w,k[E],y+"/"+j+"/"+E,i,y,j,d,E)}else if(j in s.propsKeywords){if(k&&typeof k=="object")for(var O in k)u(m,b,w,k[O],y+"/"+j+"/"+f(O),i,y,j,d,O)}else(j in s.keywords||m.allKeys&&!(j in s.skipKeywords))&&u(m,b,w,k,y+"/"+j,i,y,j,d)}w(d,y,i,h,p,g,v)}}function f(m){return m.replace(/~/g,"~0").replace(/\//g,"~1")}return Qa.exports}var qc;function us(){if(qc)return Lt;qc=1,Object.defineProperty(Lt,"__esModule",{value:!0}),Lt.getSchemaRefs=Lt.resolveUrl=Lt.normalizeId=Lt._getFullPath=Lt.getFullPath=Lt.inlineRef=void 0;const s=Ye(),u=Fc(),f=Um(),m=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);function b(E,O=!0){return typeof E=="boolean"?!0:O===!0?!d(E):O?y(E)<=O:!1}Lt.inlineRef=b;const w=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function d(E){for(const O in E){if(w.has(O))return!0;const x=E[O];if(Array.isArray(x)&&x.some(d)||typeof x=="object"&&d(x))return!0}return!1}function y(E){let O=0;for(const x in E){if(x==="$ref")return 1/0;if(O++,!m.has(x)&&(typeof E[x]=="object"&&(0,s.eachItem)(E[x],S=>O+=y(S)),O===1/0))return 1/0}return O}function i(E,O="",x){x!==!1&&(O=g(O));const S=E.parse(O);return h(E,S)}Lt.getFullPath=i;function h(E,O){return E.serialize(O).split("#")[0]+"#"}Lt._getFullPath=h;const p=/#\/?$/;function g(E){return E?E.replace(p,""):""}Lt.normalizeId=g;function v(E,O,x){return x=g(x),E.resolve(O,x)}Lt.resolveUrl=v;const j=/^[a-z_][-a-z0-9._]*$/i;function k(E,O){if(typeof E=="boolean")return{};const{schemaId:x,uriResolver:S}=this.opts,P=g(E[x]||O),L={"":P},T=i(S,P,!1),R={},A=new Set;return f(E,{allKeys:!0},(M,q,J,G)=>{if(G===void 0)return;const X=T+q;let le=L[G];typeof M[x]=="string"&&(le=ue.call(this,M[x])),he.call(this,M.$anchor),he.call(this,M.$dynamicAnchor),L[q]=le;function ue(ce){const me=this.opts.uriResolver.resolve;if(ce=g(le?me(le,ce):ce),A.has(ce))throw D(ce);A.add(ce);let ie=this.refs[ce];return typeof ie=="string"&&(ie=this.refs[ie]),typeof ie=="object"?N(M,ie.schema,ce):ce!==g(X)&&(ce[0]==="#"?(N(M,R[ce],ce),R[ce]=M):this.refs[ce]=X),ce}function he(ce){if(typeof ce=="string"){if(!j.test(ce))throw new Error(`invalid anchor "${ce}"`);ue.call(this,`#${ce}`)}}}),R;function N(M,q,J){if(q!==void 0&&!u(M,q))throw D(J)}function D(M){return new Error(`reference "${M}" resolves to more than one schema`)}}return Lt.getSchemaRefs=k,Lt}var Vc;function cs(){if(Vc)return Fr;Vc=1,Object.defineProperty(Fr,"__esModule",{value:!0}),Fr.getData=Fr.KeywordCxt=Fr.validateFunctionCode=void 0;const s=qm(),u=ls(),f=Lc(),m=ls(),b=Vm(),w=zm(),d=Hm(),y=ze(),i=rn(),h=us(),p=Ye(),g=as();function v(U){if(T(U)&&(A(U),L(U))){O(U);return}j(U,()=>(0,s.topBoolOrEmptySchema)(U))}Fr.validateFunctionCode=v;function j({gen:U,validateName:Z,schema:re,schemaEnv:ae,opts:fe},Ce){fe.code.es5?U.func(Z,(0,y._)`${i.default.data}, ${i.default.valCxt}`,ae.$async,()=>{U.code((0,y._)`"use strict"; ${S(re,fe)}`),E(U,fe),U.code(Ce)}):U.func(Z,(0,y._)`${i.default.data}, ${k(fe)}`,ae.$async,()=>U.code(S(re,fe)).code(Ce))}function k(U){return(0,y._)`{${i.default.instancePath}="", ${i.default.parentData}, ${i.default.parentDataProperty}, ${i.default.rootData}=${i.default.data}${U.dynamicRef?(0,y._)`, ${i.default.dynamicAnchors}={}`:y.nil}}={}`}function E(U,Z){U.if(i.default.valCxt,()=>{U.var(i.default.instancePath,(0,y._)`${i.default.valCxt}.${i.default.instancePath}`),U.var(i.default.parentData,(0,y._)`${i.default.valCxt}.${i.default.parentData}`),U.var(i.default.parentDataProperty,(0,y._)`${i.default.valCxt}.${i.default.parentDataProperty}`),U.var(i.default.rootData,(0,y._)`${i.default.valCxt}.${i.default.rootData}`),Z.dynamicRef&&U.var(i.default.dynamicAnchors,(0,y._)`${i.default.valCxt}.${i.default.dynamicAnchors}`)},()=>{U.var(i.default.instancePath,(0,y._)`""`),U.var(i.default.parentData,(0,y._)`undefined`),U.var(i.default.parentDataProperty,(0,y._)`undefined`),U.var(i.default.rootData,i.default.data),Z.dynamicRef&&U.var(i.default.dynamicAnchors,(0,y._)`{}`)})}function O(U){const{schema:Z,opts:re,gen:ae}=U;j(U,()=>{re.$comment&&Z.$comment&&G(U),M(U),ae.let(i.default.vErrors,null),ae.let(i.default.errors,0),re.unevaluated&&x(U),N(U),X(U)})}function x(U){const{gen:Z,validateName:re}=U;U.evaluated=Z.const("evaluated",(0,y._)`${re}.evaluated`),Z.if((0,y._)`${U.evaluated}.dynamicProps`,()=>Z.assign((0,y._)`${U.evaluated}.props`,(0,y._)`undefined`)),Z.if((0,y._)`${U.evaluated}.dynamicItems`,()=>Z.assign((0,y._)`${U.evaluated}.items`,(0,y._)`undefined`))}function S(U,Z){const re=typeof U=="object"&&U[Z.schemaId];return re&&(Z.code.source||Z.code.process)?(0,y._)`/*# sourceURL=${re} */`:y.nil}function P(U,Z){if(T(U)&&(A(U),L(U))){R(U,Z);return}(0,s.boolOrEmptySchema)(U,Z)}function L({schema:U,self:Z}){if(typeof U=="boolean")return!U;for(const re in U)if(Z.RULES.all[re])return!0;return!1}function T(U){return typeof U.schema!="boolean"}function R(U,Z){const{schema:re,gen:ae,opts:fe}=U;fe.$comment&&re.$comment&&G(U),q(U),J(U);const Ce=ae.const("_errs",i.default.errors);N(U,Ce),ae.var(Z,(0,y._)`${Ce} === ${i.default.errors}`)}function A(U){(0,p.checkUnknownRules)(U),D(U)}function N(U,Z){if(U.opts.jtd)return ue(U,[],!1,Z);const re=(0,u.getSchemaTypes)(U.schema),ae=(0,u.coerceAndCheckDataType)(U,re);ue(U,re,!ae,Z)}function D(U){const{schema:Z,errSchemaPath:re,opts:ae,self:fe}=U;Z.$ref&&ae.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(Z,fe.RULES)&&fe.logger.warn(`$ref: keywords ignored in schema at path "${re}"`)}function M(U){const{schema:Z,opts:re}=U;Z.default!==void 0&&re.useDefaults&&re.strictSchema&&(0,p.checkStrictMode)(U,"default is ignored in the schema root")}function q(U){const Z=U.schema[U.opts.schemaId];Z&&(U.baseId=(0,h.resolveUrl)(U.opts.uriResolver,U.baseId,Z))}function J(U){if(U.schema.$async&&!U.schemaEnv.$async)throw new Error("async schema in sync schema")}function G({gen:U,schemaEnv:Z,schema:re,errSchemaPath:ae,opts:fe}){const Ce=re.$comment;if(fe.$comment===!0)U.code((0,y._)`${i.default.self}.logger.log(${Ce})`);else if(typeof fe.$comment=="function"){const He=(0,y.str)`${ae}/$comment`,We=U.scopeValue("root",{ref:Z.root});U.code((0,y._)`${i.default.self}.opts.$comment(${Ce}, ${He}, ${We}.schema)`)}}function X(U){const{gen:Z,schemaEnv:re,validateName:ae,ValidationError:fe,opts:Ce}=U;re.$async?Z.if((0,y._)`${i.default.errors} === 0`,()=>Z.return(i.default.data),()=>Z.throw((0,y._)`new ${fe}(${i.default.vErrors})`)):(Z.assign((0,y._)`${ae}.errors`,i.default.vErrors),Ce.unevaluated&&le(U),Z.return((0,y._)`${i.default.errors} === 0`))}function le({gen:U,evaluated:Z,props:re,items:ae}){re instanceof y.Name&&U.assign((0,y._)`${Z}.props`,re),ae instanceof y.Name&&U.assign((0,y._)`${Z}.items`,ae)}function ue(U,Z,re,ae){const{gen:fe,schema:Ce,data:He,allErrors:We,opts:nt,self:Ze}=U,{RULES:et}=Ze;if(Ce.$ref&&(nt.ignoreKeywordsWithRef||!(0,p.schemaHasRulesButRef)(Ce,et))){fe.block(()=>ge(U,"$ref",et.all.$ref.definition));return}nt.jtd||ce(U,Z),fe.block(()=>{for(const Ue of et.rules)tt(Ue);tt(et.post)});function tt(Ue){(0,f.shouldUseGroup)(Ce,Ue)&&(Ue.type?(fe.if((0,m.checkDataType)(Ue.type,He,nt.strictNumbers)),he(U,Ue),Z.length===1&&Z[0]===Ue.type&&re&&(fe.else(),(0,m.reportTypeError)(U)),fe.endIf()):he(U,Ue),We||fe.if((0,y._)`${i.default.errors} === ${ae||0}`))}}function he(U,Z){const{gen:re,schema:ae,opts:{useDefaults:fe}}=U;fe&&(0,b.assignDefaults)(U,Z.type),re.block(()=>{for(const Ce of Z.rules)(0,f.shouldUseRule)(ae,Ce)&&ge(U,Ce.keyword,Ce.definition,Z.type)})}function ce(U,Z){U.schemaEnv.meta||!U.opts.strictTypes||(me(U,Z),U.opts.allowUnionTypes||ie(U,Z),H(U,U.dataTypes))}function me(U,Z){if(Z.length){if(!U.dataTypes.length){U.dataTypes=Z;return}Z.forEach(re=>{V(U.dataTypes,re)||F(U,`type "${re}" not allowed by context "${U.dataTypes.join(",")}"`)}),I(U,Z)}}function ie(U,Z){Z.length>1&&!(Z.length===2&&Z.includes("null"))&&F(U,"use allowUnionTypes to allow union type keyword")}function H(U,Z){const re=U.self.RULES.all;for(const ae in re){const fe=re[ae];if(typeof fe=="object"&&(0,f.shouldUseRule)(U.schema,fe)){const{type:Ce}=fe.definition;Ce.length&&!Ce.some(He=>ee(Z,He))&&F(U,`missing type "${Ce.join(",")}" for keyword "${ae}"`)}}}function ee(U,Z){return U.includes(Z)||Z==="number"&&U.includes("integer")}function V(U,Z){return U.includes(Z)||Z==="integer"&&U.includes("number")}function I(U,Z){const re=[];for(const ae of U.dataTypes)V(Z,ae)?re.push(ae):Z.includes("integer")&&ae==="number"&&re.push("integer");U.dataTypes=re}function F(U,Z){const re=U.schemaEnv.baseId+U.errSchemaPath;Z+=` at "${re}" (strictTypes)`,(0,p.checkStrictMode)(U,Z,U.opts.strictTypes)}class te{constructor(Z,re,ae){if((0,w.validateKeywordUsage)(Z,re,ae),this.gen=Z.gen,this.allErrors=Z.allErrors,this.keyword=ae,this.data=Z.data,this.schema=Z.schema[ae],this.$data=re.$data&&Z.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(Z,this.schema,ae,this.$data),this.schemaType=re.schemaType,this.parentSchema=Z.schema,this.params={},this.it=Z,this.def=re,this.$data)this.schemaCode=Z.gen.const("vSchema",ve(this.$data,Z));else if(this.schemaCode=this.schemaValue,!(0,w.validSchemaType)(this.schema,re.schemaType,re.allowUndefined))throw new Error(`${ae} value must be ${JSON.stringify(re.schemaType)}`);("code"in re?re.trackErrors:re.errors!==!1)&&(this.errsCount=Z.gen.const("_errs",i.default.errors))}result(Z,re,ae){this.failResult((0,y.not)(Z),re,ae)}failResult(Z,re,ae){this.gen.if(Z),ae?ae():this.error(),re?(this.gen.else(),re(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(Z,re){this.failResult((0,y.not)(Z),void 0,re)}fail(Z){if(Z===void 0){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(Z),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(Z){if(!this.$data)return this.fail(Z);const{schemaCode:re}=this;this.fail((0,y._)`${re} !== undefined && (${(0,y.or)(this.invalid$data(),Z)})`)}error(Z,re,ae){if(re){this.setParams(re),this._error(Z,ae),this.setParams({});return}this._error(Z,ae)}_error(Z,re){(Z?g.reportExtraError:g.reportError)(this,this.def.error,re)}$dataError(){(0,g.reportError)(this,this.def.$dataError||g.keyword$DataError)}reset(){if(this.errsCount===void 0)throw new Error('add "trackErrors" to keyword definition');(0,g.resetErrorsCount)(this.gen,this.errsCount)}ok(Z){this.allErrors||this.gen.if(Z)}setParams(Z,re){re?Object.assign(this.params,Z):this.params=Z}block$data(Z,re,ae=y.nil){this.gen.block(()=>{this.check$data(Z,ae),re()})}check$data(Z=y.nil,re=y.nil){if(!this.$data)return;const{gen:ae,schemaCode:fe,schemaType:Ce,def:He}=this;ae.if((0,y.or)((0,y._)`${fe} === undefined`,re)),Z!==y.nil&&ae.assign(Z,!0),(Ce.length||He.validateSchema)&&(ae.elseIf(this.invalid$data()),this.$dataError(),Z!==y.nil&&ae.assign(Z,!1)),ae.else()}invalid$data(){const{gen:Z,schemaCode:re,schemaType:ae,def:fe,it:Ce}=this;return(0,y.or)(He(),We());function He(){if(ae.length){if(!(re instanceof y.Name))throw new Error("ajv implementation error");const nt=Array.isArray(ae)?ae:[ae];return(0,y._)`${(0,m.checkDataTypes)(nt,re,Ce.opts.strictNumbers,m.DataType.Wrong)}`}return y.nil}function We(){if(fe.validateSchema){const nt=Z.scopeValue("validate$data",{ref:fe.validateSchema});return(0,y._)`!${nt}(${re})`}return y.nil}}subschema(Z,re){const ae=(0,d.getSubschema)(this.it,Z);(0,d.extendSubschemaData)(ae,this.it,Z),(0,d.extendSubschemaMode)(ae,Z);const fe={...this.it,...ae,items:void 0,props:void 0};return P(fe,re),fe}mergeEvaluated(Z,re){const{it:ae,gen:fe}=this;ae.opts.unevaluated&&(ae.props!==!0&&Z.props!==void 0&&(ae.props=p.mergeEvaluated.props(fe,Z.props,ae.props,re)),ae.items!==!0&&Z.items!==void 0&&(ae.items=p.mergeEvaluated.items(fe,Z.items,ae.items,re)))}mergeValidEvaluated(Z,re){const{it:ae,gen:fe}=this;if(ae.opts.unevaluated&&(ae.props!==!0||ae.items!==!0))return fe.if(re,()=>this.mergeEvaluated(Z,y.Name)),!0}}Fr.KeywordCxt=te;function ge(U,Z,re,ae){const fe=new te(U,re,Z);"code"in re?re.code(fe,ae):fe.$data&&re.validate?(0,w.funcKeywordCode)(fe,re):"macro"in re?(0,w.macroKeywordCode)(fe,re):(re.compile||re.validate)&&(0,w.funcKeywordCode)(fe,re)}const be=/^\/(?:[^~]|~0|~1)*$/,Oe=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function ve(U,{dataLevel:Z,dataNames:re,dataPathArr:ae}){let fe,Ce;if(U==="")return i.default.rootData;if(U[0]==="/"){if(!be.test(U))throw new Error(`Invalid JSON-pointer: ${U}`);fe=U,Ce=i.default.rootData}else{const Ze=Oe.exec(U);if(!Ze)throw new Error(`Invalid JSON-pointer: ${U}`);const et=+Ze[1];if(fe=Ze[2],fe==="#"){if(et>=Z)throw new Error(nt("property/index",et));return ae[Z-et]}if(et>Z)throw new Error(nt("data",et));if(Ce=re[Z-et],!fe)return Ce}let He=Ce;const We=fe.split("/");for(const Ze of We)Ze&&(Ce=(0,y._)`${Ce}${(0,y.getProperty)((0,p.unescapeJsonPointer)(Ze))}`,He=(0,y._)`${He} && ${Ce}`);return He;function nt(Ze,et){return`Cannot access ${Ze} ${et} levels up, current level is ${Z}`}}return Fr.getData=ve,Fr}var ds={},zc;function Xa(){if(zc)return ds;zc=1,Object.defineProperty(ds,"__esModule",{value:!0});class s extends Error{constructor(f){super("validation failed"),this.errors=f,this.ajv=this.validation=!0}}return ds.default=s,ds}var hs={},Hc;function fs(){if(Hc)return hs;Hc=1,Object.defineProperty(hs,"__esModule",{value:!0});const s=us();class u extends Error{constructor(m,b,w,d){super(d||`can't resolve reference ${w} from id ${b}`),this.missingRef=(0,s.resolveUrl)(m,b,w),this.missingSchema=(0,s.normalizeId)((0,s.getFullPath)(m,this.missingRef))}}return hs.default=u,hs}var Gt={},Uc;function el(){if(Uc)return Gt;Uc=1,Object.defineProperty(Gt,"__esModule",{value:!0}),Gt.resolveSchema=Gt.getCompilingSchema=Gt.resolveRef=Gt.compileSchema=Gt.SchemaEnv=void 0;const s=ze(),u=Xa(),f=rn(),m=us(),b=Ye(),w=cs();class d{constructor(x){var S;this.refs={},this.dynamicAnchors={};let P;typeof x.schema=="object"&&(P=x.schema),this.schema=x.schema,this.schemaId=x.schemaId,this.root=x.root||this,this.baseId=(S=x.baseId)!==null&&S!==void 0?S:(0,m.normalizeId)(P?.[x.schemaId||"$id"]),this.schemaPath=x.schemaPath,this.localRefs=x.localRefs,this.meta=x.meta,this.$async=P?.$async,this.refs={}}}Gt.SchemaEnv=d;function y(O){const x=p.call(this,O);if(x)return x;const S=(0,m.getFullPath)(this.opts.uriResolver,O.root.baseId),{es5:P,lines:L}=this.opts.code,{ownProperties:T}=this.opts,R=new s.CodeGen(this.scope,{es5:P,lines:L,ownProperties:T});let A;O.$async&&(A=R.scopeValue("Error",{ref:u.default,code:(0,s._)`require("ajv/dist/runtime/validation_error").default`}));const N=R.scopeName("validate");O.validateName=N;const D={gen:R,allErrors:this.opts.allErrors,data:f.default.data,parentData:f.default.parentData,parentDataProperty:f.default.parentDataProperty,dataNames:[f.default.data],dataPathArr:[s.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:R.scopeValue("schema",this.opts.code.source===!0?{ref:O.schema,code:(0,s.stringify)(O.schema)}:{ref:O.schema}),validateName:N,ValidationError:A,schema:O.schema,schemaEnv:O,rootId:S,baseId:O.baseId||S,schemaPath:s.nil,errSchemaPath:O.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,s._)`""`,opts:this.opts,self:this};let M;try{this._compilations.add(O),(0,w.validateFunctionCode)(D),R.optimize(this.opts.code.optimize);const q=R.toString();M=`${R.scopeRefs(f.default.scope)}return ${q}`,this.opts.code.process&&(M=this.opts.code.process(M,O));const G=new Function(`${f.default.self}`,`${f.default.scope}`,M)(this,this.scope.get());if(this.scope.value(N,{ref:G}),G.errors=null,G.schema=O.schema,G.schemaEnv=O,O.$async&&(G.$async=!0),this.opts.code.source===!0&&(G.source={validateName:N,validateCode:q,scopeValues:R._values}),this.opts.unevaluated){const{props:X,items:le}=D;G.evaluated={props:X instanceof s.Name?void 0:X,items:le instanceof s.Name?void 0:le,dynamicProps:X instanceof s.Name,dynamicItems:le instanceof s.Name},G.source&&(G.source.evaluated=(0,s.stringify)(G.evaluated))}return O.validate=G,O}catch(q){throw delete O.validate,delete O.validateName,M&&this.logger.error("Error compiling schema, function code:",M),q}finally{this._compilations.delete(O)}}Gt.compileSchema=y;function i(O,x,S){var P;S=(0,m.resolveUrl)(this.opts.uriResolver,x,S);const L=O.refs[S];if(L)return L;let T=v.call(this,O,S);if(T===void 0){const R=(P=O.localRefs)===null||P===void 0?void 0:P[S],{schemaId:A}=this.opts;R&&(T=new d({schema:R,schemaId:A,root:O,baseId:x}))}if(T!==void 0)return O.refs[S]=h.call(this,T)}Gt.resolveRef=i;function h(O){return(0,m.inlineRef)(O.schema,this.opts.inlineRefs)?O.schema:O.validate?O:y.call(this,O)}function p(O){for(const x of this._compilations)if(g(x,O))return x}Gt.getCompilingSchema=p;function g(O,x){return O.schema===x.schema&&O.root===x.root&&O.baseId===x.baseId}function v(O,x){let S;for(;typeof(S=this.refs[x])=="string";)x=S;return S||this.schemas[x]||j.call(this,O,x)}function j(O,x){const S=this.opts.uriResolver.parse(x),P=(0,m._getFullPath)(this.opts.uriResolver,S);let L=(0,m.getFullPath)(this.opts.uriResolver,O.baseId,void 0);if(Object.keys(O.schema).length>0&&P===L)return E.call(this,S,O);const T=(0,m.normalizeId)(P),R=this.refs[T]||this.schemas[T];if(typeof R=="string"){const A=j.call(this,O,R);return typeof A?.schema!="object"?void 0:E.call(this,S,A)}if(typeof R?.schema=="object"){if(R.validate||y.call(this,R),T===(0,m.normalizeId)(x)){const{schema:A}=R,{schemaId:N}=this.opts,D=A[N];return D&&(L=(0,m.resolveUrl)(this.opts.uriResolver,L,D)),new d({schema:A,schemaId:N,root:O,baseId:L})}return E.call(this,S,R)}}Gt.resolveSchema=j;const k=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function E(O,{baseId:x,schema:S,root:P}){var L;if(((L=O.fragment)===null||L===void 0?void 0:L[0])!=="/")return;for(const A of O.fragment.slice(1).split("/")){if(typeof S=="boolean")return;const N=S[(0,b.unescapeFragment)(A)];if(N===void 0)return;S=N;const D=typeof S=="object"&&S[this.opts.schemaId];!k.has(A)&&D&&(x=(0,m.resolveUrl)(this.opts.uriResolver,x,D))}let T;if(typeof S!="boolean"&&S.$ref&&!(0,b.schemaHasRulesButRef)(S,this.RULES)){const A=(0,m.resolveUrl)(this.opts.uriResolver,x,S.$ref);T=j.call(this,P,A)}const{schemaId:R}=this.opts;if(T=T||new d({schema:S,schemaId:R,root:P,baseId:x}),T.schema!==T.root.schema)return T}return Gt}const Gm={$id:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#",description:"Meta-schema for $data reference (JSON AnySchema extension proposal)",type:"object",required:["$data"],properties:{$data:{type:"string",anyOf:[{format:"relative-json-pointer"},{format:"json-pointer"}]}},additionalProperties:!1};var ps={},Oo={exports:{}},tl,Gc;function Jc(){if(Gc)return tl;Gc=1;const s=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),u=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function f(v){let j="",k=0,E=0;for(E=0;E<v.length;E++)if(k=v[E].charCodeAt(0),k!==48){if(!(k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102))return"";j+=v[E];break}for(E+=1;E<v.length;E++){if(k=v[E].charCodeAt(0),!(k>=48&&k<=57||k>=65&&k<=70||k>=97&&k<=102))return"";j+=v[E]}return j}const m=RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u);function b(v){return v.length=0,!0}function w(v,j,k){if(v.length){const E=f(v);if(E!=="")j.push(E);else return k.error=!0,!1;v.length=0}return!0}function d(v){let j=0;const k={error:!1,address:"",zone:""},E=[],O=[];let x=!1,S=!1,P=w;for(let L=0;L<v.length;L++){const T=v[L];if(!(T==="["||T==="]"))if(T===":"){if(x===!0&&(S=!0),!P(O,E,k))break;if(++j>7){k.error=!0;break}L>0&&v[L-1]===":"&&(x=!0),E.push(":");continue}else if(T==="%"){if(!P(O,E,k))break;P=b}else{O.push(T);continue}}return O.length&&(P===b?k.zone=O.join(""):S?E.push(O.join("")):E.push(f(O))),k.address=E.join(""),k}function y(v){if(i(v,":")<2)return{host:v,isIPV6:!1};const j=d(v);if(j.error)return{host:v,isIPV6:!1};{let k=j.address,E=j.address;return j.zone&&(k+="%"+j.zone,E+="%25"+j.zone),{host:k,isIPV6:!0,escapedHost:E}}}function i(v,j){let k=0;for(let E=0;E<v.length;E++)v[E]===j&&k++;return k}function h(v){let j=v;const k=[];let E=-1,O=0;for(;O=j.length;){if(O===1){if(j===".")break;if(j==="/"){k.push("/");break}else{k.push(j);break}}else if(O===2){if(j[0]==="."){if(j[1]===".")break;if(j[1]==="/"){j=j.slice(2);continue}}else if(j[0]==="/"&&(j[1]==="."||j[1]==="/")){k.push("/");break}}else if(O===3&&j==="/.."){k.length!==0&&k.pop(),k.push("/");break}if(j[0]==="."){if(j[1]==="."){if(j[2]==="/"){j=j.slice(3);continue}}else if(j[1]==="/"){j=j.slice(2);continue}}else if(j[0]==="/"&&j[1]==="."){if(j[2]==="/"){j=j.slice(2);continue}else if(j[2]==="."&&j[3]==="/"){j=j.slice(3),k.length!==0&&k.pop();continue}}if((E=j.indexOf("/",1))===-1){k.push(j);break}else k.push(j.slice(0,E)),j=j.slice(E)}return k.join("")}function p(v,j){const k=j!==!0?escape:unescape;return v.scheme!==void 0&&(v.scheme=k(v.scheme)),v.userinfo!==void 0&&(v.userinfo=k(v.userinfo)),v.host!==void 0&&(v.host=k(v.host)),v.path!==void 0&&(v.path=k(v.path)),v.query!==void 0&&(v.query=k(v.query)),v.fragment!==void 0&&(v.fragment=k(v.fragment)),v}function g(v){const j=[];if(v.userinfo!==void 0&&(j.push(v.userinfo),j.push("@")),v.host!==void 0){let k=unescape(v.host);if(!u(k)){const E=y(k);E.isIPV6===!0?k=`[${E.escapedHost}]`:k=v.host}j.push(k)}return(typeof v.port=="number"||typeof v.port=="string")&&(j.push(":"),j.push(String(v.port))),j.length?j.join(""):void 0}return tl={nonSimpleDomain:m,recomposeAuthority:g,normalizeComponentEncoding:p,removeDotSegments:h,isIPv4:u,isUUID:s,normalizeIPv6:y,stringArrayToHexStripped:f},tl}var rl,Kc;function Jm(){if(Kc)return rl;Kc=1;const{isUUID:s}=Jc(),u=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,f=["http","https","ws","wss","urn","urn:uuid"];function m(T){return f.indexOf(T)!==-1}function b(T){return T.secure===!0?!0:T.secure===!1?!1:T.scheme?T.scheme.length===3&&(T.scheme[0]==="w"||T.scheme[0]==="W")&&(T.scheme[1]==="s"||T.scheme[1]==="S")&&(T.scheme[2]==="s"||T.scheme[2]==="S"):!1}function w(T){return T.host||(T.error=T.error||"HTTP URIs must have a host."),T}function d(T){const R=String(T.scheme).toLowerCase()==="https";return(T.port===(R?443:80)||T.port==="")&&(T.port=void 0),T.path||(T.path="/"),T}function y(T){return T.secure=b(T),T.resourceName=(T.path||"/")+(T.query?"?"+T.query:""),T.path=void 0,T.query=void 0,T}function i(T){if((T.port===(b(T)?443:80)||T.port==="")&&(T.port=void 0),typeof T.secure=="boolean"&&(T.scheme=T.secure?"wss":"ws",T.secure=void 0),T.resourceName){const[R,A]=T.resourceName.split("?");T.path=R&&R!=="/"?R:void 0,T.query=A,T.resourceName=void 0}return T.fragment=void 0,T}function h(T,R){if(!T.path)return T.error="URN can not be parsed",T;const A=T.path.match(u);if(A){const N=R.scheme||T.scheme||"urn";T.nid=A[1].toLowerCase(),T.nss=A[2];const D=`${N}:${R.nid||T.nid}`,M=L(D);T.path=void 0,M&&(T=M.parse(T,R))}else T.error=T.error||"URN can not be parsed.";return T}function p(T,R){if(T.nid===void 0)throw new Error("URN without nid cannot be serialized");const A=R.scheme||T.scheme||"urn",N=T.nid.toLowerCase(),D=`${A}:${R.nid||N}`,M=L(D);M&&(T=M.serialize(T,R));const q=T,J=T.nss;return q.path=`${N||R.nid}:${J}`,R.skipEscape=!0,q}function g(T,R){const A=T;return A.uuid=A.nss,A.nss=void 0,!R.tolerant&&(!A.uuid||!s(A.uuid))&&(A.error=A.error||"UUID is not valid."),A}function v(T){const R=T;return R.nss=(T.uuid||"").toLowerCase(),R}const j={scheme:"http",domainHost:!0,parse:w,serialize:d},k={scheme:"https",domainHost:j.domainHost,parse:w,serialize:d},E={scheme:"ws",domainHost:!0,parse:y,serialize:i},O={scheme:"wss",domainHost:E.domainHost,parse:E.parse,serialize:E.serialize},P={http:j,https:k,ws:E,wss:O,urn:{scheme:"urn",parse:h,serialize:p,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:g,serialize:v,skipNormalize:!0}};Object.setPrototypeOf(P,null);function L(T){return T&&(P[T]||P[T.toLowerCase()])||void 0}return rl={wsIsSecure:b,SCHEMES:P,isValidSchemeName:m,getSchemeHandler:L},rl}var Wc;function Km(){if(Wc)return Oo.exports;Wc=1;const{normalizeIPv6:s,removeDotSegments:u,recomposeAuthority:f,normalizeComponentEncoding:m,isIPv4:b,nonSimpleDomain:w}=Jc(),{SCHEMES:d,getSchemeHandler:y}=Jm();function i(O,x){return typeof O=="string"?O=v(k(O,x),x):typeof O=="object"&&(O=k(v(O,x),x)),O}function h(O,x,S){const P=S?Object.assign({scheme:"null"},S):{scheme:"null"},L=p(k(O,P),k(x,P),P,!0);return P.skipEscape=!0,v(L,P)}function p(O,x,S,P){const L={};return P||(O=k(v(O,S),S),x=k(v(x,S),S)),S=S||{},!S.tolerant&&x.scheme?(L.scheme=x.scheme,L.userinfo=x.userinfo,L.host=x.host,L.port=x.port,L.path=u(x.path||""),L.query=x.query):(x.userinfo!==void 0||x.host!==void 0||x.port!==void 0?(L.userinfo=x.userinfo,L.host=x.host,L.port=x.port,L.path=u(x.path||""),L.query=x.query):(x.path?(x.path[0]==="/"?L.path=u(x.path):((O.userinfo!==void 0||O.host!==void 0||O.port!==void 0)&&!O.path?L.path="/"+x.path:O.path?L.path=O.path.slice(0,O.path.lastIndexOf("/")+1)+x.path:L.path=x.path,L.path=u(L.path)),L.query=x.query):(L.path=O.path,x.query!==void 0?L.query=x.query:L.query=O.query),L.userinfo=O.userinfo,L.host=O.host,L.port=O.port),L.scheme=O.scheme),L.fragment=x.fragment,L}function g(O,x,S){return typeof O=="string"?(O=unescape(O),O=v(m(k(O,S),!0),{...S,skipEscape:!0})):typeof O=="object"&&(O=v(m(O,!0),{...S,skipEscape:!0})),typeof x=="string"?(x=unescape(x),x=v(m(k(x,S),!0),{...S,skipEscape:!0})):typeof x=="object"&&(x=v(m(x,!0),{...S,skipEscape:!0})),O.toLowerCase()===x.toLowerCase()}function v(O,x){const S={host:O.host,scheme:O.scheme,userinfo:O.userinfo,port:O.port,path:O.path,query:O.query,nid:O.nid,nss:O.nss,uuid:O.uuid,fragment:O.fragment,reference:O.reference,resourceName:O.resourceName,secure:O.secure,error:""},P=Object.assign({},x),L=[],T=y(P.scheme||S.scheme);T&&T.serialize&&T.serialize(S,P),S.path!==void 0&&(P.skipEscape?S.path=unescape(S.path):(S.path=escape(S.path),S.scheme!==void 0&&(S.path=S.path.split("%3A").join(":")))),P.reference!=="suffix"&&S.scheme&&L.push(S.scheme,":");const R=f(S);if(R!==void 0&&(P.reference!=="suffix"&&L.push("//"),L.push(R),S.path&&S.path[0]!=="/"&&L.push("/")),S.path!==void 0){let A=S.path;!P.absolutePath&&(!T||!T.absolutePath)&&(A=u(A)),R===void 0&&A[0]==="/"&&A[1]==="/"&&(A="/%2F"+A.slice(2)),L.push(A)}return S.query!==void 0&&L.push("?",S.query),S.fragment!==void 0&&L.push("#",S.fragment),L.join("")}const j=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function k(O,x){const S=Object.assign({},x),P={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0};let L=!1;S.reference==="suffix"&&(S.scheme?O=S.scheme+":"+O:O="//"+O);const T=O.match(j);if(T){if(P.scheme=T[1],P.userinfo=T[3],P.host=T[4],P.port=parseInt(T[5],10),P.path=T[6]||"",P.query=T[7],P.fragment=T[8],isNaN(P.port)&&(P.port=T[5]),P.host)if(b(P.host)===!1){const N=s(P.host);P.host=N.host.toLowerCase(),L=N.isIPV6}else L=!0;P.scheme===void 0&&P.userinfo===void 0&&P.host===void 0&&P.port===void 0&&P.query===void 0&&!P.path?P.reference="same-document":P.scheme===void 0?P.reference="relative":P.fragment===void 0?P.reference="absolute":P.reference="uri",S.reference&&S.reference!=="suffix"&&S.reference!==P.reference&&(P.error=P.error||"URI is not a "+S.reference+" reference.");const R=y(S.scheme||P.scheme);if(!S.unicodeSupport&&(!R||!R.unicodeSupport)&&P.host&&(S.domainHost||R&&R.domainHost)&&L===!1&&w(P.host))try{P.host=URL.domainToASCII(P.host.toLowerCase())}catch(A){P.error=P.error||"Host's domain name can not be converted to ASCII: "+A}(!R||R&&!R.skipNormalize)&&(O.indexOf("%")!==-1&&(P.scheme!==void 0&&(P.scheme=unescape(P.scheme)),P.host!==void 0&&(P.host=unescape(P.host))),P.path&&(P.path=escape(unescape(P.path))),P.fragment&&(P.fragment=encodeURI(decodeURIComponent(P.fragment)))),R&&R.parse&&R.parse(P,S)}else P.error=P.error||"URI can not be parsed.";return P}const E={SCHEMES:d,normalize:i,resolve:h,resolveComponent:p,equal:g,serialize:v,parse:k};return Oo.exports=E,Oo.exports.default=E,Oo.exports.fastUri=E,Oo.exports}var Zc;function Wm(){if(Zc)return ps;Zc=1,Object.defineProperty(ps,"__esModule",{value:!0});const s=Km();return s.code='require("ajv/dist/runtime/uri").default',ps.default=s,ps}var Yc;function Zm(){return Yc||(Yc=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.CodeGen=s.Name=s.nil=s.stringify=s.str=s._=s.KeywordCxt=void 0;var u=cs();Object.defineProperty(s,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var f=ze();Object.defineProperty(s,"_",{enumerable:!0,get:function(){return f._}}),Object.defineProperty(s,"str",{enumerable:!0,get:function(){return f.str}}),Object.defineProperty(s,"stringify",{enumerable:!0,get:function(){return f.stringify}}),Object.defineProperty(s,"nil",{enumerable:!0,get:function(){return f.nil}}),Object.defineProperty(s,"Name",{enumerable:!0,get:function(){return f.Name}}),Object.defineProperty(s,"CodeGen",{enumerable:!0,get:function(){return f.CodeGen}});const m=Xa(),b=fs(),w=Tc(),d=el(),y=ze(),i=us(),h=ls(),p=Ye(),g=Gm,v=Wm(),j=(ie,H)=>new RegExp(ie,H);j.code="new RegExp";const k=["removeAdditional","useDefaults","coerceTypes"],E=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),O={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},x={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},S=200;function P(ie){var H,ee,V,I,F,te,ge,be,Oe,ve,U,Z,re,ae,fe,Ce,He,We,nt,Ze,et,tt,Ue,ot,ye;const ke=ie.strict,xe=(H=ie.code)===null||H===void 0?void 0:H.optimize,De=xe===!0||xe===void 0?1:xe||0,Je=(V=(ee=ie.code)===null||ee===void 0?void 0:ee.regExp)!==null&&V!==void 0?V:j,pt=(I=ie.uriResolver)!==null&&I!==void 0?I:v.default;return{strictSchema:(te=(F=ie.strictSchema)!==null&&F!==void 0?F:ke)!==null&&te!==void 0?te:!0,strictNumbers:(be=(ge=ie.strictNumbers)!==null&&ge!==void 0?ge:ke)!==null&&be!==void 0?be:!0,strictTypes:(ve=(Oe=ie.strictTypes)!==null&&Oe!==void 0?Oe:ke)!==null&&ve!==void 0?ve:"log",strictTuples:(Z=(U=ie.strictTuples)!==null&&U!==void 0?U:ke)!==null&&Z!==void 0?Z:"log",strictRequired:(ae=(re=ie.strictRequired)!==null&&re!==void 0?re:ke)!==null&&ae!==void 0?ae:!1,code:ie.code?{...ie.code,optimize:De,regExp:Je}:{optimize:De,regExp:Je},loopRequired:(fe=ie.loopRequired)!==null&&fe!==void 0?fe:S,loopEnum:(Ce=ie.loopEnum)!==null&&Ce!==void 0?Ce:S,meta:(He=ie.meta)!==null&&He!==void 0?He:!0,messages:(We=ie.messages)!==null&&We!==void 0?We:!0,inlineRefs:(nt=ie.inlineRefs)!==null&&nt!==void 0?nt:!0,schemaId:(Ze=ie.schemaId)!==null&&Ze!==void 0?Ze:"$id",addUsedSchema:(et=ie.addUsedSchema)!==null&&et!==void 0?et:!0,validateSchema:(tt=ie.validateSchema)!==null&&tt!==void 0?tt:!0,validateFormats:(Ue=ie.validateFormats)!==null&&Ue!==void 0?Ue:!0,unicodeRegExp:(ot=ie.unicodeRegExp)!==null&&ot!==void 0?ot:!0,int32range:(ye=ie.int32range)!==null&&ye!==void 0?ye:!0,uriResolver:pt}}class L{constructor(H={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,H=this.opts={...H,...P(H)};const{es5:ee,lines:V}=this.opts.code;this.scope=new y.ValueScope({scope:{},prefixes:E,es5:ee,lines:V}),this.logger=J(H.logger);const I=H.validateFormats;H.validateFormats=!1,this.RULES=(0,w.getRules)(),T.call(this,O,H,"NOT SUPPORTED"),T.call(this,x,H,"DEPRECATED","warn"),this._metaOpts=M.call(this),H.formats&&N.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),H.keywords&&D.call(this,H.keywords),typeof H.meta=="object"&&this.addMetaSchema(H.meta),A.call(this),H.validateFormats=I}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:H,meta:ee,schemaId:V}=this.opts;let I=g;V==="id"&&(I={...g},I.id=I.$id,delete I.$id),ee&&H&&this.addMetaSchema(I,I[V],!1)}defaultMeta(){const{meta:H,schemaId:ee}=this.opts;return this.opts.defaultMeta=typeof H=="object"?H[ee]||H:void 0}validate(H,ee){let V;if(typeof H=="string"){if(V=this.getSchema(H),!V)throw new Error(`no schema with key or ref "${H}"`)}else V=this.compile(H);const I=V(ee);return"$async"in V||(this.errors=V.errors),I}compile(H,ee){const V=this._addSchema(H,ee);return V.validate||this._compileSchemaEnv(V)}compileAsync(H,ee){if(typeof this.opts.loadSchema!="function")throw new Error("options.loadSchema should be a function");const{loadSchema:V}=this.opts;return I.call(this,H,ee);async function I(ve,U){await F.call(this,ve.$schema);const Z=this._addSchema(ve,U);return Z.validate||te.call(this,Z)}async function F(ve){ve&&!this.getSchema(ve)&&await I.call(this,{$ref:ve},!0)}async function te(ve){try{return this._compileSchemaEnv(ve)}catch(U){if(!(U instanceof b.default))throw U;return ge.call(this,U),await be.call(this,U.missingSchema),te.call(this,ve)}}function ge({missingSchema:ve,missingRef:U}){if(this.refs[ve])throw new Error(`AnySchema ${ve} is loaded but ${U} cannot be resolved`)}async function be(ve){const U=await Oe.call(this,ve);this.refs[ve]||await F.call(this,U.$schema),this.refs[ve]||this.addSchema(U,ve,ee)}async function Oe(ve){const U=this._loading[ve];if(U)return U;try{return await(this._loading[ve]=V(ve))}finally{delete this._loading[ve]}}}addSchema(H,ee,V,I=this.opts.validateSchema){if(Array.isArray(H)){for(const te of H)this.addSchema(te,void 0,V,I);return this}let F;if(typeof H=="object"){const{schemaId:te}=this.opts;if(F=H[te],F!==void 0&&typeof F!="string")throw new Error(`schema ${te} must be string`)}return ee=(0,i.normalizeId)(ee||F),this._checkUnique(ee),this.schemas[ee]=this._addSchema(H,V,ee,I,!0),this}addMetaSchema(H,ee,V=this.opts.validateSchema){return this.addSchema(H,ee,!0,V),this}validateSchema(H,ee){if(typeof H=="boolean")return!0;let V;if(V=H.$schema,V!==void 0&&typeof V!="string")throw new Error("$schema must be a string");if(V=V||this.opts.defaultMeta||this.defaultMeta(),!V)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const I=this.validate(V,H);if(!I&&ee){const F="schema is invalid: "+this.errorsText();if(this.opts.validateSchema==="log")this.logger.error(F);else throw new Error(F)}return I}getSchema(H){let ee;for(;typeof(ee=R.call(this,H))=="string";)H=ee;if(ee===void 0){const{schemaId:V}=this.opts,I=new d.SchemaEnv({schema:{},schemaId:V});if(ee=d.resolveSchema.call(this,I,H),!ee)return;this.refs[H]=ee}return ee.validate||this._compileSchemaEnv(ee)}removeSchema(H){if(H instanceof RegExp)return this._removeAllSchemas(this.schemas,H),this._removeAllSchemas(this.refs,H),this;switch(typeof H){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const ee=R.call(this,H);return typeof ee=="object"&&this._cache.delete(ee.schema),delete this.schemas[H],delete this.refs[H],this}case"object":{const ee=H;this._cache.delete(ee);let V=H[this.opts.schemaId];return V&&(V=(0,i.normalizeId)(V),delete this.schemas[V],delete this.refs[V]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(H){for(const ee of H)this.addKeyword(ee);return this}addKeyword(H,ee){let V;if(typeof H=="string")V=H,typeof ee=="object"&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),ee.keyword=V);else if(typeof H=="object"&&ee===void 0){if(ee=H,V=ee.keyword,Array.isArray(V)&&!V.length)throw new Error("addKeywords: keyword must be string or non-empty array")}else throw new Error("invalid addKeywords parameters");if(X.call(this,V,ee),!ee)return(0,p.eachItem)(V,F=>le.call(this,F)),this;he.call(this,ee);const I={...ee,type:(0,h.getJSONTypes)(ee.type),schemaType:(0,h.getJSONTypes)(ee.schemaType)};return(0,p.eachItem)(V,I.type.length===0?F=>le.call(this,F,I):F=>I.type.forEach(te=>le.call(this,F,I,te))),this}getKeyword(H){const ee=this.RULES.all[H];return typeof ee=="object"?ee.definition:!!ee}removeKeyword(H){const{RULES:ee}=this;delete ee.keywords[H],delete ee.all[H];for(const V of ee.rules){const I=V.rules.findIndex(F=>F.keyword===H);I>=0&&V.rules.splice(I,1)}return this}addFormat(H,ee){return typeof ee=="string"&&(ee=new RegExp(ee)),this.formats[H]=ee,this}errorsText(H=this.errors,{separator:ee=", ",dataVar:V="data"}={}){return!H||H.length===0?"No errors":H.map(I=>`${V}${I.instancePath} ${I.message}`).reduce((I,F)=>I+ee+F)}$dataMetaSchema(H,ee){const V=this.RULES.all;H=JSON.parse(JSON.stringify(H));for(const I of ee){const F=I.split("/").slice(1);let te=H;for(const ge of F)te=te[ge];for(const ge in V){const be=V[ge];if(typeof be!="object")continue;const{$data:Oe}=be.definition,ve=te[ge];Oe&&ve&&(te[ge]=me(ve))}}return H}_removeAllSchemas(H,ee){for(const V in H){const I=H[V];(!ee||ee.test(V))&&(typeof I=="string"?delete H[V]:I&&!I.meta&&(this._cache.delete(I.schema),delete H[V]))}}_addSchema(H,ee,V,I=this.opts.validateSchema,F=this.opts.addUsedSchema){let te;const{schemaId:ge}=this.opts;if(typeof H=="object")te=H[ge];else{if(this.opts.jtd)throw new Error("schema must be object");if(typeof H!="boolean")throw new Error("schema must be object or boolean")}let be=this._cache.get(H);if(be!==void 0)return be;V=(0,i.normalizeId)(te||V);const Oe=i.getSchemaRefs.call(this,H,V);return be=new d.SchemaEnv({schema:H,schemaId:ge,meta:ee,baseId:V,localRefs:Oe}),this._cache.set(be.schema,be),F&&!V.startsWith("#")&&(V&&this._checkUnique(V),this.refs[V]=be),I&&this.validateSchema(H,!0),be}_checkUnique(H){if(this.schemas[H]||this.refs[H])throw new Error(`schema with key or id "${H}" already exists`)}_compileSchemaEnv(H){if(H.meta?this._compileMetaSchema(H):d.compileSchema.call(this,H),!H.validate)throw new Error("ajv implementation error");return H.validate}_compileMetaSchema(H){const ee=this.opts;this.opts=this._metaOpts;try{d.compileSchema.call(this,H)}finally{this.opts=ee}}}L.ValidationError=m.default,L.MissingRefError=b.default,s.default=L;function T(ie,H,ee,V="error"){for(const I in ie){const F=I;F in H&&this.logger[V](`${ee}: option ${I}. ${ie[F]}`)}}function R(ie){return ie=(0,i.normalizeId)(ie),this.schemas[ie]||this.refs[ie]}function A(){const ie=this.opts.schemas;if(ie)if(Array.isArray(ie))this.addSchema(ie);else for(const H in ie)this.addSchema(ie[H],H)}function N(){for(const ie in this.opts.formats){const H=this.opts.formats[ie];H&&this.addFormat(ie,H)}}function D(ie){if(Array.isArray(ie)){this.addVocabulary(ie);return}this.logger.warn("keywords option as map is deprecated, pass array");for(const H in ie){const ee=ie[H];ee.keyword||(ee.keyword=H),this.addKeyword(ee)}}function M(){const ie={...this.opts};for(const H of k)delete ie[H];return ie}const q={log(){},warn(){},error(){}};function J(ie){if(ie===!1)return q;if(ie===void 0)return console;if(ie.log&&ie.warn&&ie.error)return ie;throw new Error("logger must implement log, warn and error methods")}const G=/^[a-z_$][a-z0-9_$:-]*$/i;function X(ie,H){const{RULES:ee}=this;if((0,p.eachItem)(ie,V=>{if(ee.keywords[V])throw new Error(`Keyword ${V} is already defined`);if(!G.test(V))throw new Error(`Keyword ${V} has invalid name`)}),!!H&&H.$data&&!("code"in H||"validate"in H))throw new Error('$data keyword must have "code" or "validate" function')}function le(ie,H,ee){var V;const I=H?.post;if(ee&&I)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:F}=this;let te=I?F.post:F.rules.find(({type:be})=>be===ee);if(te||(te={type:ee,rules:[]},F.rules.push(te)),F.keywords[ie]=!0,!H)return;const ge={keyword:ie,definition:{...H,type:(0,h.getJSONTypes)(H.type),schemaType:(0,h.getJSONTypes)(H.schemaType)}};H.before?ue.call(this,te,ge,H.before):te.rules.push(ge),F.all[ie]=ge,(V=H.implements)===null||V===void 0||V.forEach(be=>this.addKeyword(be))}function ue(ie,H,ee){const V=ie.rules.findIndex(I=>I.keyword===ee);V>=0?ie.rules.splice(V,0,H):(ie.rules.push(H),this.logger.warn(`rule ${ee} is not defined`))}function he(ie){let{metaSchema:H}=ie;H!==void 0&&(ie.$data&&this.opts.$data&&(H=me(H)),ie.validateSchema=this.compile(H,!0))}const ce={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function me(ie){return{anyOf:[ie,ce]}}})(Ga)),Ga}var ms={},ys={},vs={},Qc;function Ym(){if(Qc)return vs;Qc=1,Object.defineProperty(vs,"__esModule",{value:!0});const s={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};return vs.default=s,vs}var nn={},Xc;function Qm(){if(Xc)return nn;Xc=1,Object.defineProperty(nn,"__esModule",{value:!0}),nn.callRef=nn.getValidate=void 0;const s=fs(),u=ir(),f=ze(),m=rn(),b=el(),w=Ye(),d={keyword:"$ref",schemaType:"string",code(h){const{gen:p,schema:g,it:v}=h,{baseId:j,schemaEnv:k,validateName:E,opts:O,self:x}=v,{root:S}=k;if((g==="#"||g==="#/")&&j===S.baseId)return L();const P=b.resolveRef.call(x,S,j,g);if(P===void 0)throw new s.default(v.opts.uriResolver,j,g);if(P instanceof b.SchemaEnv)return T(P);return R(P);function L(){if(k===S)return i(h,E,k,k.$async);const A=p.scopeValue("root",{ref:S});return i(h,(0,f._)`${A}.validate`,S,S.$async)}function T(A){const N=y(h,A);i(h,N,A,A.$async)}function R(A){const N=p.scopeValue("schema",O.code.source===!0?{ref:A,code:(0,f.stringify)(A)}:{ref:A}),D=p.name("valid"),M=h.subschema({schema:A,dataTypes:[],schemaPath:f.nil,topSchemaRef:N,errSchemaPath:g},D);h.mergeEvaluated(M),h.ok(D)}}};function y(h,p){const{gen:g}=h;return p.validate?g.scopeValue("validate",{ref:p.validate}):(0,f._)`${g.scopeValue("wrapper",{ref:p})}.validate`}nn.getValidate=y;function i(h,p,g,v){const{gen:j,it:k}=h,{allErrors:E,schemaEnv:O,opts:x}=k,S=x.passContext?m.default.this:f.nil;v?P():L();function P(){if(!O.$async)throw new Error("async schema referenced by sync schema");const A=j.let("valid");j.try(()=>{j.code((0,f._)`await ${(0,u.callValidateCode)(h,p,S)}`),R(p),E||j.assign(A,!0)},N=>{j.if((0,f._)`!(${N} instanceof ${k.ValidationError})`,()=>j.throw(N)),T(N),E||j.assign(A,!1)}),h.ok(A)}function L(){h.result((0,u.callValidateCode)(h,p,S),()=>R(p),()=>T(p))}function T(A){const N=(0,f._)`${A}.errors`;j.assign(m.default.vErrors,(0,f._)`${m.default.vErrors} === null ? ${N} : ${m.default.vErrors}.concat(${N})`),j.assign(m.default.errors,(0,f._)`${m.default.vErrors}.length`)}function R(A){var N;if(!k.opts.unevaluated)return;const D=(N=g?.validate)===null||N===void 0?void 0:N.evaluated;if(k.props!==!0)if(D&&!D.dynamicProps)D.props!==void 0&&(k.props=w.mergeEvaluated.props(j,D.props,k.props));else{const M=j.var("props",(0,f._)`${A}.evaluated.props`);k.props=w.mergeEvaluated.props(j,M,k.props,f.Name)}if(k.items!==!0)if(D&&!D.dynamicItems)D.items!==void 0&&(k.items=w.mergeEvaluated.items(j,D.items,k.items));else{const M=j.var("items",(0,f._)`${A}.evaluated.items`);k.items=w.mergeEvaluated.items(j,M,k.items,f.Name)}}}return nn.callRef=i,nn.default=d,nn}var ed;function Xm(){if(ed)return ys;ed=1,Object.defineProperty(ys,"__esModule",{value:!0});const s=Ym(),u=Qm(),f=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",s.default,u.default];return ys.default=f,ys}var bs={},gs={},td;function ey(){if(td)return gs;td=1,Object.defineProperty(gs,"__esModule",{value:!0});const s=ze(),u=s.operators,f={maximum:{okStr:"<=",ok:u.LTE,fail:u.GT},minimum:{okStr:">=",ok:u.GTE,fail:u.LT},exclusiveMaximum:{okStr:"<",ok:u.LT,fail:u.GTE},exclusiveMinimum:{okStr:">",ok:u.GT,fail:u.LTE}},m={message:({keyword:w,schemaCode:d})=>(0,s.str)`must be ${f[w].okStr} ${d}`,params:({keyword:w,schemaCode:d})=>(0,s._)`{comparison: ${f[w].okStr}, limit: ${d}}`},b={keyword:Object.keys(f),type:"number",schemaType:"number",$data:!0,error:m,code(w){const{keyword:d,data:y,schemaCode:i}=w;w.fail$data((0,s._)`${y} ${f[d].fail} ${i} || isNaN(${y})`)}};return gs.default=b,gs}var _s={},rd;function ty(){if(rd)return _s;rd=1,Object.defineProperty(_s,"__esModule",{value:!0});const s=ze(),f={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:m})=>(0,s.str)`must be multiple of ${m}`,params:({schemaCode:m})=>(0,s._)`{multipleOf: ${m}}`},code(m){const{gen:b,data:w,schemaCode:d,it:y}=m,i=y.opts.multipleOfPrecision,h=b.let("res"),p=i?(0,s._)`Math.abs(Math.round(${h}) - ${h}) > 1e-${i}`:(0,s._)`${h} !== parseInt(${h})`;m.fail$data((0,s._)`(${d} === 0 || (${h} = ${w}/${d}, ${p}))`)}};return _s.default=f,_s}var ws={},ks={},nd;function ry(){if(nd)return ks;nd=1,Object.defineProperty(ks,"__esModule",{value:!0});function s(u){const f=u.length;let m=0,b=0,w;for(;b<f;)m++,w=u.charCodeAt(b++),w>=55296&&w<=56319&&b<f&&(w=u.charCodeAt(b),(w&64512)===56320&&b++);return m}return ks.default=s,s.code='require("ajv/dist/runtime/ucs2length").default',ks}var id;function ny(){if(id)return ws;id=1,Object.defineProperty(ws,"__esModule",{value:!0});const s=ze(),u=Ye(),f=ry(),b={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:w,schemaCode:d}){const y=w==="maxLength"?"more":"fewer";return(0,s.str)`must NOT have ${y} than ${d} characters`},params:({schemaCode:w})=>(0,s._)`{limit: ${w}}`},code(w){const{keyword:d,data:y,schemaCode:i,it:h}=w,p=d==="maxLength"?s.operators.GT:s.operators.LT,g=h.opts.unicode===!1?(0,s._)`${y}.length`:(0,s._)`${(0,u.useFunc)(w.gen,f.default)}(${y})`;w.fail$data((0,s._)`${g} ${p} ${i}`)}};return ws.default=b,ws}var js={},od;function iy(){if(od)return js;od=1,Object.defineProperty(js,"__esModule",{value:!0});const s=ir(),u=ze(),m={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:b})=>(0,u.str)`must match pattern "${b}"`,params:({schemaCode:b})=>(0,u._)`{pattern: ${b}}`},code(b){const{data:w,$data:d,schema:y,schemaCode:i,it:h}=b,p=h.opts.unicodeRegExp?"u":"",g=d?(0,u._)`(new RegExp(${i}, ${p}))`:(0,s.usePattern)(b,y);b.fail$data((0,u._)`!${g}.test(${w})`)}};return js.default=m,js}var Os={},sd;function oy(){if(sd)return Os;sd=1,Object.defineProperty(Os,"__esModule",{value:!0});const s=ze(),f={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:b}){const w=m==="maxProperties"?"more":"fewer";return(0,s.str)`must NOT have ${w} than ${b} properties`},params:({schemaCode:m})=>(0,s._)`{limit: ${m}}`},code(m){const{keyword:b,data:w,schemaCode:d}=m,y=b==="maxProperties"?s.operators.GT:s.operators.LT;m.fail$data((0,s._)`Object.keys(${w}).length ${y} ${d}`)}};return Os.default=f,Os}var Es={},ad;function sy(){if(ad)return Es;ad=1,Object.defineProperty(Es,"__esModule",{value:!0});const s=ir(),u=ze(),f=Ye(),b={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:w}})=>(0,u.str)`must have required property '${w}'`,params:({params:{missingProperty:w}})=>(0,u._)`{missingProperty: ${w}}`},code(w){const{gen:d,schema:y,schemaCode:i,data:h,$data:p,it:g}=w,{opts:v}=g;if(!p&&y.length===0)return;const j=y.length>=v.loopRequired;if(g.allErrors?k():E(),v.strictRequired){const S=w.parentSchema.properties,{definedProperties:P}=w.it;for(const L of y)if(S?.[L]===void 0&&!P.has(L)){const T=g.schemaEnv.baseId+g.errSchemaPath,R=`required property "${L}" is not defined at "${T}" (strictRequired)`;(0,f.checkStrictMode)(g,R,g.opts.strictRequired)}}function k(){if(j||p)w.block$data(u.nil,O);else for(const S of y)(0,s.checkReportMissingProp)(w,S)}function E(){const S=d.let("missing");if(j||p){const P=d.let("valid",!0);w.block$data(P,()=>x(S,P)),w.ok(P)}else d.if((0,s.checkMissingProp)(w,y,S)),(0,s.reportMissingProp)(w,S),d.else()}function O(){d.forOf("prop",i,S=>{w.setParams({missingProperty:S}),d.if((0,s.noPropertyInData)(d,h,S,v.ownProperties),()=>w.error())})}function x(S,P){w.setParams({missingProperty:S}),d.forOf(S,i,()=>{d.assign(P,(0,s.propertyInData)(d,h,S,v.ownProperties)),d.if((0,u.not)(P),()=>{w.error(),d.break()})},u.nil)}}};return Es.default=b,Es}var Ss={},ld;function ay(){if(ld)return Ss;ld=1,Object.defineProperty(Ss,"__esModule",{value:!0});const s=ze(),f={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:m,schemaCode:b}){const w=m==="maxItems"?"more":"fewer";return(0,s.str)`must NOT have ${w} than ${b} items`},params:({schemaCode:m})=>(0,s._)`{limit: ${m}}`},code(m){const{keyword:b,data:w,schemaCode:d}=m,y=b==="maxItems"?s.operators.GT:s.operators.LT;m.fail$data((0,s._)`${w}.length ${y} ${d}`)}};return Ss.default=f,Ss}var xs={},Cs={},ud;function nl(){if(ud)return Cs;ud=1,Object.defineProperty(Cs,"__esModule",{value:!0});const s=Fc();return s.code='require("ajv/dist/runtime/equal").default',Cs.default=s,Cs}var cd;function ly(){if(cd)return xs;cd=1,Object.defineProperty(xs,"__esModule",{value:!0});const s=ls(),u=ze(),f=Ye(),m=nl(),w={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:d,j:y}})=>(0,u.str)`must NOT have duplicate items (items ## ${y} and ${d} are identical)`,params:({params:{i:d,j:y}})=>(0,u._)`{i: ${d}, j: ${y}}`},code(d){const{gen:y,data:i,$data:h,schema:p,parentSchema:g,schemaCode:v,it:j}=d;if(!h&&!p)return;const k=y.let("valid"),E=g.items?(0,s.getSchemaTypes)(g.items):[];d.block$data(k,O,(0,u._)`${v} === false`),d.ok(k);function O(){const L=y.let("i",(0,u._)`${i}.length`),T=y.let("j");d.setParams({i:L,j:T}),y.assign(k,!0),y.if((0,u._)`${L} > 1`,()=>(x()?S:P)(L,T))}function x(){return E.length>0&&!E.some(L=>L==="object"||L==="array")}function S(L,T){const R=y.name("item"),A=(0,s.checkDataTypes)(E,R,j.opts.strictNumbers,s.DataType.Wrong),N=y.const("indices",(0,u._)`{}`);y.for((0,u._)`;${L}--;`,()=>{y.let(R,(0,u._)`${i}[${L}]`),y.if(A,(0,u._)`continue`),E.length>1&&y.if((0,u._)`typeof ${R} == "string"`,(0,u._)`${R} += "_"`),y.if((0,u._)`typeof ${N}[${R}] == "number"`,()=>{y.assign(T,(0,u._)`${N}[${R}]`),d.error(),y.assign(k,!1).break()}).code((0,u._)`${N}[${R}] = ${L}`)})}function P(L,T){const R=(0,f.useFunc)(y,m.default),A=y.name("outer");y.label(A).for((0,u._)`;${L}--;`,()=>y.for((0,u._)`${T} = ${L}; ${T}--;`,()=>y.if((0,u._)`${R}(${i}[${L}], ${i}[${T}])`,()=>{d.error(),y.assign(k,!1).break(A)})))}}};return xs.default=w,xs}var Ps={},dd;function uy(){if(dd)return Ps;dd=1,Object.defineProperty(Ps,"__esModule",{value:!0});const s=ze(),u=Ye(),f=nl(),b={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:w})=>(0,s._)`{allowedValue: ${w}}`},code(w){const{gen:d,data:y,$data:i,schemaCode:h,schema:p}=w;i||p&&typeof p=="object"?w.fail$data((0,s._)`!${(0,u.useFunc)(d,f.default)}(${y}, ${h})`):w.fail((0,s._)`${p} !== ${y}`)}};return Ps.default=b,Ps}var Ts={},hd;function cy(){if(hd)return Ts;hd=1,Object.defineProperty(Ts,"__esModule",{value:!0});const s=ze(),u=Ye(),f=nl(),b={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:w})=>(0,s._)`{allowedValues: ${w}}`},code(w){const{gen:d,data:y,$data:i,schema:h,schemaCode:p,it:g}=w;if(!i&&h.length===0)throw new Error("enum must have non-empty array");const v=h.length>=g.opts.loopEnum;let j;const k=()=>j??(j=(0,u.useFunc)(d,f.default));let E;if(v||i)E=d.let("valid"),w.block$data(E,O);else{if(!Array.isArray(h))throw new Error("ajv implementation error");const S=d.const("vSchema",p);E=(0,s.or)(...h.map((P,L)=>x(S,L)))}w.pass(E);function O(){d.assign(E,!1),d.forOf("v",p,S=>d.if((0,s._)`${k()}(${y}, ${S})`,()=>d.assign(E,!0).break()))}function x(S,P){const L=h[P];return typeof L=="object"&&L!==null?(0,s._)`${k()}(${y}, ${S}[${P}])`:(0,s._)`${y} === ${L}`}}};return Ts.default=b,Ts}var fd;function dy(){if(fd)return bs;fd=1,Object.defineProperty(bs,"__esModule",{value:!0});const s=ey(),u=ty(),f=ny(),m=iy(),b=oy(),w=sy(),d=ay(),y=ly(),i=uy(),h=cy(),p=[s.default,u.default,f.default,m.default,b.default,w.default,d.default,y.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},i.default,h.default];return bs.default=p,bs}var Rs={},_i={},pd;function md(){if(pd)return _i;pd=1,Object.defineProperty(_i,"__esModule",{value:!0}),_i.validateAdditionalItems=void 0;const s=ze(),u=Ye(),m={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:w}})=>(0,s.str)`must NOT have more than ${w} items`,params:({params:{len:w}})=>(0,s._)`{limit: ${w}}`},code(w){const{parentSchema:d,it:y}=w,{items:i}=d;if(!Array.isArray(i)){(0,u.checkStrictMode)(y,'"additionalItems" is ignored when "items" is not an array of schemas');return}b(w,i)}};function b(w,d){const{gen:y,schema:i,data:h,keyword:p,it:g}=w;g.items=!0;const v=y.const("len",(0,s._)`${h}.length`);if(i===!1)w.setParams({len:d.length}),w.pass((0,s._)`${v} <= ${d.length}`);else if(typeof i=="object"&&!(0,u.alwaysValidSchema)(g,i)){const k=y.var("valid",(0,s._)`${v} <= ${d.length}`);y.if((0,s.not)(k),()=>j(k)),w.ok(k)}function j(k){y.forRange("i",d.length,v,E=>{w.subschema({keyword:p,dataProp:E,dataPropType:u.Type.Num},k),g.allErrors||y.if((0,s.not)(k),()=>y.break())})}}return _i.validateAdditionalItems=b,_i.default=m,_i}var Ls={},wi={},yd;function vd(){if(yd)return wi;yd=1,Object.defineProperty(wi,"__esModule",{value:!0}),wi.validateTuple=void 0;const s=ze(),u=Ye(),f=ir(),m={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(w){const{schema:d,it:y}=w;if(Array.isArray(d))return b(w,"additionalItems",d);y.items=!0,!(0,u.alwaysValidSchema)(y,d)&&w.ok((0,f.validateArray)(w))}};function b(w,d,y=w.schema){const{gen:i,parentSchema:h,data:p,keyword:g,it:v}=w;E(h),v.opts.unevaluated&&y.length&&v.items!==!0&&(v.items=u.mergeEvaluated.items(i,y.length,v.items));const j=i.name("valid"),k=i.const("len",(0,s._)`${p}.length`);y.forEach((O,x)=>{(0,u.alwaysValidSchema)(v,O)||(i.if((0,s._)`${k} > ${x}`,()=>w.subschema({keyword:g,schemaProp:x,dataProp:x},j)),w.ok(j))});function E(O){const{opts:x,errSchemaPath:S}=v,P=y.length,L=P===O.minItems&&(P===O.maxItems||O[d]===!1);if(x.strictTuples&&!L){const T=`"${g}" is ${P}-tuple, but minItems or maxItems/${d} are not specified or different at path "${S}"`;(0,u.checkStrictMode)(v,T,x.strictTuples)}}}return wi.validateTuple=b,wi.default=m,wi}var bd;function hy(){if(bd)return Ls;bd=1,Object.defineProperty(Ls,"__esModule",{value:!0});const s=vd(),u={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:f=>(0,s.validateTuple)(f,"items")};return Ls.default=u,Ls}var As={},gd;function fy(){if(gd)return As;gd=1,Object.defineProperty(As,"__esModule",{value:!0});const s=ze(),u=Ye(),f=ir(),m=md(),w={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:d}})=>(0,s.str)`must NOT have more than ${d} items`,params:({params:{len:d}})=>(0,s._)`{limit: ${d}}`},code(d){const{schema:y,parentSchema:i,it:h}=d,{prefixItems:p}=i;h.items=!0,!(0,u.alwaysValidSchema)(h,y)&&(p?(0,m.validateAdditionalItems)(d,p):d.ok((0,f.validateArray)(d)))}};return As.default=w,As}var $s={},_d;function py(){if(_d)return $s;_d=1,Object.defineProperty($s,"__esModule",{value:!0});const s=ze(),u=Ye(),m={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:b,max:w}})=>w===void 0?(0,s.str)`must contain at least ${b} valid item(s)`:(0,s.str)`must contain at least ${b} and no more than ${w} valid item(s)`,params:({params:{min:b,max:w}})=>w===void 0?(0,s._)`{minContains: ${b}}`:(0,s._)`{minContains: ${b}, maxContains: ${w}}`},code(b){const{gen:w,schema:d,parentSchema:y,data:i,it:h}=b;let p,g;const{minContains:v,maxContains:j}=y;h.opts.next?(p=v===void 0?1:v,g=j):p=1;const k=w.const("len",(0,s._)`${i}.length`);if(b.setParams({min:p,max:g}),g===void 0&&p===0){(0,u.checkStrictMode)(h,'"minContains" == 0 without "maxContains": "contains" keyword ignored');return}if(g!==void 0&&p>g){(0,u.checkStrictMode)(h,'"minContains" > "maxContains" is always invalid'),b.fail();return}if((0,u.alwaysValidSchema)(h,d)){let P=(0,s._)`${k} >= ${p}`;g!==void 0&&(P=(0,s._)`${P} && ${k} <= ${g}`),b.pass(P);return}h.items=!0;const E=w.name("valid");g===void 0&&p===1?x(E,()=>w.if(E,()=>w.break())):p===0?(w.let(E,!0),g!==void 0&&w.if((0,s._)`${i}.length > 0`,O)):(w.let(E,!1),O()),b.result(E,()=>b.reset());function O(){const P=w.name("_valid"),L=w.let("count",0);x(P,()=>w.if(P,()=>S(L)))}function x(P,L){w.forRange("i",0,k,T=>{b.subschema({keyword:"contains",dataProp:T,dataPropType:u.Type.Num,compositeRule:!0},P),L()})}function S(P){w.code((0,s._)`${P}++`),g===void 0?w.if((0,s._)`${P} >= ${p}`,()=>w.assign(E,!0).break()):(w.if((0,s._)`${P} > ${g}`,()=>w.assign(E,!1).break()),p===1?w.assign(E,!0):w.if((0,s._)`${P} >= ${p}`,()=>w.assign(E,!0)))}}};return $s.default=m,$s}var il={},wd;function my(){return wd||(wd=1,(function(s){Object.defineProperty(s,"__esModule",{value:!0}),s.validateSchemaDeps=s.validatePropertyDeps=s.error=void 0;const u=ze(),f=Ye(),m=ir();s.error={message:({params:{property:i,depsCount:h,deps:p}})=>{const g=h===1?"property":"properties";return(0,u.str)`must have ${g} ${p} when property ${i} is present`},params:({params:{property:i,depsCount:h,deps:p,missingProperty:g}})=>(0,u._)`{property: ${i},
11
+ missingProperty: ${g},
12
+ depsCount: ${h},
13
+ deps: ${p}}`};const b={keyword:"dependencies",type:"object",schemaType:"object",error:s.error,code(i){const[h,p]=w(i);d(i,h),y(i,p)}};function w({schema:i}){const h={},p={};for(const g in i){if(g==="__proto__")continue;const v=Array.isArray(i[g])?h:p;v[g]=i[g]}return[h,p]}function d(i,h=i.schema){const{gen:p,data:g,it:v}=i;if(Object.keys(h).length===0)return;const j=p.let("missing");for(const k in h){const E=h[k];if(E.length===0)continue;const O=(0,m.propertyInData)(p,g,k,v.opts.ownProperties);i.setParams({property:k,depsCount:E.length,deps:E.join(", ")}),v.allErrors?p.if(O,()=>{for(const x of E)(0,m.checkReportMissingProp)(i,x)}):(p.if((0,u._)`${O} && (${(0,m.checkMissingProp)(i,E,j)})`),(0,m.reportMissingProp)(i,j),p.else())}}s.validatePropertyDeps=d;function y(i,h=i.schema){const{gen:p,data:g,keyword:v,it:j}=i,k=p.name("valid");for(const E in h)(0,f.alwaysValidSchema)(j,h[E])||(p.if((0,m.propertyInData)(p,g,E,j.opts.ownProperties),()=>{const O=i.subschema({keyword:v,schemaProp:E},k);i.mergeValidEvaluated(O,k)},()=>p.var(k,!0)),i.ok(k))}s.validateSchemaDeps=y,s.default=b})(il)),il}var Is={},kd;function yy(){if(kd)return Is;kd=1,Object.defineProperty(Is,"__esModule",{value:!0});const s=ze(),u=Ye(),m={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:b})=>(0,s._)`{propertyName: ${b.propertyName}}`},code(b){const{gen:w,schema:d,data:y,it:i}=b;if((0,u.alwaysValidSchema)(i,d))return;const h=w.name("valid");w.forIn("key",y,p=>{b.setParams({propertyName:p}),b.subschema({keyword:"propertyNames",data:p,dataTypes:["string"],propertyName:p,compositeRule:!0},h),w.if((0,s.not)(h),()=>{b.error(!0),i.allErrors||w.break()})}),b.ok(h)}};return Is.default=m,Is}var Ns={},jd;function Od(){if(jd)return Ns;jd=1,Object.defineProperty(Ns,"__esModule",{value:!0});const s=ir(),u=ze(),f=rn(),m=Ye(),w={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:d})=>(0,u._)`{additionalProperty: ${d.additionalProperty}}`},code(d){const{gen:y,schema:i,parentSchema:h,data:p,errsCount:g,it:v}=d;if(!g)throw new Error("ajv implementation error");const{allErrors:j,opts:k}=v;if(v.props=!0,k.removeAdditional!=="all"&&(0,m.alwaysValidSchema)(v,i))return;const E=(0,s.allSchemaProperties)(h.properties),O=(0,s.allSchemaProperties)(h.patternProperties);x(),d.ok((0,u._)`${g} === ${f.default.errors}`);function x(){y.forIn("key",p,R=>{!E.length&&!O.length?L(R):y.if(S(R),()=>L(R))})}function S(R){let A;if(E.length>8){const N=(0,m.schemaRefOrVal)(v,h.properties,"properties");A=(0,s.isOwnProperty)(y,N,R)}else E.length?A=(0,u.or)(...E.map(N=>(0,u._)`${R} === ${N}`)):A=u.nil;return O.length&&(A=(0,u.or)(A,...O.map(N=>(0,u._)`${(0,s.usePattern)(d,N)}.test(${R})`))),(0,u.not)(A)}function P(R){y.code((0,u._)`delete ${p}[${R}]`)}function L(R){if(k.removeAdditional==="all"||k.removeAdditional&&i===!1){P(R);return}if(i===!1){d.setParams({additionalProperty:R}),d.error(),j||y.break();return}if(typeof i=="object"&&!(0,m.alwaysValidSchema)(v,i)){const A=y.name("valid");k.removeAdditional==="failing"?(T(R,A,!1),y.if((0,u.not)(A),()=>{d.reset(),P(R)})):(T(R,A),j||y.if((0,u.not)(A),()=>y.break()))}}function T(R,A,N){const D={keyword:"additionalProperties",dataProp:R,dataPropType:m.Type.Str};N===!1&&Object.assign(D,{compositeRule:!0,createErrors:!1,allErrors:!1}),d.subschema(D,A)}}};return Ns.default=w,Ns}var Ds={},Ed;function vy(){if(Ed)return Ds;Ed=1,Object.defineProperty(Ds,"__esModule",{value:!0});const s=cs(),u=ir(),f=Ye(),m=Od(),b={keyword:"properties",type:"object",schemaType:"object",code(w){const{gen:d,schema:y,parentSchema:i,data:h,it:p}=w;p.opts.removeAdditional==="all"&&i.additionalProperties===void 0&&m.default.code(new s.KeywordCxt(p,m.default,"additionalProperties"));const g=(0,u.allSchemaProperties)(y);for(const O of g)p.definedProperties.add(O);p.opts.unevaluated&&g.length&&p.props!==!0&&(p.props=f.mergeEvaluated.props(d,(0,f.toHash)(g),p.props));const v=g.filter(O=>!(0,f.alwaysValidSchema)(p,y[O]));if(v.length===0)return;const j=d.name("valid");for(const O of v)k(O)?E(O):(d.if((0,u.propertyInData)(d,h,O,p.opts.ownProperties)),E(O),p.allErrors||d.else().var(j,!0),d.endIf()),w.it.definedProperties.add(O),w.ok(j);function k(O){return p.opts.useDefaults&&!p.compositeRule&&y[O].default!==void 0}function E(O){w.subschema({keyword:"properties",schemaProp:O,dataProp:O},j)}}};return Ds.default=b,Ds}var Bs={},Sd;function by(){if(Sd)return Bs;Sd=1,Object.defineProperty(Bs,"__esModule",{value:!0});const s=ir(),u=ze(),f=Ye(),m=Ye(),b={keyword:"patternProperties",type:"object",schemaType:"object",code(w){const{gen:d,schema:y,data:i,parentSchema:h,it:p}=w,{opts:g}=p,v=(0,s.allSchemaProperties)(y),j=v.filter(L=>(0,f.alwaysValidSchema)(p,y[L]));if(v.length===0||j.length===v.length&&(!p.opts.unevaluated||p.props===!0))return;const k=g.strictSchema&&!g.allowMatchingProperties&&h.properties,E=d.name("valid");p.props!==!0&&!(p.props instanceof u.Name)&&(p.props=(0,m.evaluatedPropsToName)(d,p.props));const{props:O}=p;x();function x(){for(const L of v)k&&S(L),p.allErrors?P(L):(d.var(E,!0),P(L),d.if(E))}function S(L){for(const T in k)new RegExp(L).test(T)&&(0,f.checkStrictMode)(p,`property ${T} matches pattern ${L} (use allowMatchingProperties)`)}function P(L){d.forIn("key",i,T=>{d.if((0,u._)`${(0,s.usePattern)(w,L)}.test(${T})`,()=>{const R=j.includes(L);R||w.subschema({keyword:"patternProperties",schemaProp:L,dataProp:T,dataPropType:m.Type.Str},E),p.opts.unevaluated&&O!==!0?d.assign((0,u._)`${O}[${T}]`,!0):!R&&!p.allErrors&&d.if((0,u.not)(E),()=>d.break())})})}}};return Bs.default=b,Bs}var Fs={},xd;function gy(){if(xd)return Fs;xd=1,Object.defineProperty(Fs,"__esModule",{value:!0});const s=Ye(),u={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(f){const{gen:m,schema:b,it:w}=f;if((0,s.alwaysValidSchema)(w,b)){f.fail();return}const d=m.name("valid");f.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},d),f.failResult(d,()=>f.reset(),()=>f.error())},error:{message:"must NOT be valid"}};return Fs.default=u,Fs}var Ms={},Cd;function _y(){if(Cd)return Ms;Cd=1,Object.defineProperty(Ms,"__esModule",{value:!0});const u={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:ir().validateUnion,error:{message:"must match a schema in anyOf"}};return Ms.default=u,Ms}var qs={},Pd;function wy(){if(Pd)return qs;Pd=1,Object.defineProperty(qs,"__esModule",{value:!0});const s=ze(),u=Ye(),m={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:b})=>(0,s._)`{passingSchemas: ${b.passing}}`},code(b){const{gen:w,schema:d,parentSchema:y,it:i}=b;if(!Array.isArray(d))throw new Error("ajv implementation error");if(i.opts.discriminator&&y.discriminator)return;const h=d,p=w.let("valid",!1),g=w.let("passing",null),v=w.name("_valid");b.setParams({passing:g}),w.block(j),b.result(p,()=>b.reset(),()=>b.error(!0));function j(){h.forEach((k,E)=>{let O;(0,u.alwaysValidSchema)(i,k)?w.var(v,!0):O=b.subschema({keyword:"oneOf",schemaProp:E,compositeRule:!0},v),E>0&&w.if((0,s._)`${v} && ${p}`).assign(p,!1).assign(g,(0,s._)`[${g}, ${E}]`).else(),w.if(v,()=>{w.assign(p,!0),w.assign(g,E),O&&b.mergeEvaluated(O,s.Name)})})}}};return qs.default=m,qs}var Vs={},Td;function ky(){if(Td)return Vs;Td=1,Object.defineProperty(Vs,"__esModule",{value:!0});const s=Ye(),u={keyword:"allOf",schemaType:"array",code(f){const{gen:m,schema:b,it:w}=f;if(!Array.isArray(b))throw new Error("ajv implementation error");const d=m.name("valid");b.forEach((y,i)=>{if((0,s.alwaysValidSchema)(w,y))return;const h=f.subschema({keyword:"allOf",schemaProp:i},d);f.ok(d),f.mergeEvaluated(h)})}};return Vs.default=u,Vs}var zs={},Rd;function jy(){if(Rd)return zs;Rd=1,Object.defineProperty(zs,"__esModule",{value:!0});const s=ze(),u=Ye(),m={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:w})=>(0,s.str)`must match "${w.ifClause}" schema`,params:({params:w})=>(0,s._)`{failingKeyword: ${w.ifClause}}`},code(w){const{gen:d,parentSchema:y,it:i}=w;y.then===void 0&&y.else===void 0&&(0,u.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const h=b(i,"then"),p=b(i,"else");if(!h&&!p)return;const g=d.let("valid",!0),v=d.name("_valid");if(j(),w.reset(),h&&p){const E=d.let("ifClause");w.setParams({ifClause:E}),d.if(v,k("then",E),k("else",E))}else h?d.if(v,k("then")):d.if((0,s.not)(v),k("else"));w.pass(g,()=>w.error(!0));function j(){const E=w.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},v);w.mergeEvaluated(E)}function k(E,O){return()=>{const x=w.subschema({keyword:E},v);d.assign(g,v),w.mergeValidEvaluated(x,g),O?d.assign(O,(0,s._)`${E}`):w.setParams({ifClause:E})}}}};function b(w,d){const y=w.schema[d];return y!==void 0&&!(0,u.alwaysValidSchema)(w,y)}return zs.default=m,zs}var Hs={},Ld;function Oy(){if(Ld)return Hs;Ld=1,Object.defineProperty(Hs,"__esModule",{value:!0});const s=Ye(),u={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:f,parentSchema:m,it:b}){m.if===void 0&&(0,s.checkStrictMode)(b,`"${f}" without "if" is ignored`)}};return Hs.default=u,Hs}var Ad;function Ey(){if(Ad)return Rs;Ad=1,Object.defineProperty(Rs,"__esModule",{value:!0});const s=md(),u=hy(),f=vd(),m=fy(),b=py(),w=my(),d=yy(),y=Od(),i=vy(),h=by(),p=gy(),g=_y(),v=wy(),j=ky(),k=jy(),E=Oy();function O(x=!1){const S=[p.default,g.default,v.default,j.default,k.default,E.default,d.default,y.default,w.default,i.default,h.default];return x?S.push(u.default,m.default):S.push(s.default,f.default),S.push(b.default),S}return Rs.default=O,Rs}var Us={},Gs={},$d;function Sy(){if($d)return Gs;$d=1,Object.defineProperty(Gs,"__esModule",{value:!0});const s=ze(),f={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:m})=>(0,s.str)`must match format "${m}"`,params:({schemaCode:m})=>(0,s._)`{format: ${m}}`},code(m,b){const{gen:w,data:d,$data:y,schema:i,schemaCode:h,it:p}=m,{opts:g,errSchemaPath:v,schemaEnv:j,self:k}=p;if(!g.validateFormats)return;y?E():O();function E(){const x=w.scopeValue("formats",{ref:k.formats,code:g.code.formats}),S=w.const("fDef",(0,s._)`${x}[${h}]`),P=w.let("fType"),L=w.let("format");w.if((0,s._)`typeof ${S} == "object" && !(${S} instanceof RegExp)`,()=>w.assign(P,(0,s._)`${S}.type || "string"`).assign(L,(0,s._)`${S}.validate`),()=>w.assign(P,(0,s._)`"string"`).assign(L,S)),m.fail$data((0,s.or)(T(),R()));function T(){return g.strictSchema===!1?s.nil:(0,s._)`${h} && !${L}`}function R(){const A=j.$async?(0,s._)`(${S}.async ? await ${L}(${d}) : ${L}(${d}))`:(0,s._)`${L}(${d})`,N=(0,s._)`(typeof ${L} == "function" ? ${A} : ${L}.test(${d}))`;return(0,s._)`${L} && ${L} !== true && ${P} === ${b} && !${N}`}}function O(){const x=k.formats[i];if(!x){T();return}if(x===!0)return;const[S,P,L]=R(x);S===b&&m.pass(A());function T(){if(g.strictSchema===!1){k.logger.warn(N());return}throw new Error(N());function N(){return`unknown format "${i}" ignored in schema at path "${v}"`}}function R(N){const D=N instanceof RegExp?(0,s.regexpCode)(N):g.code.formats?(0,s._)`${g.code.formats}${(0,s.getProperty)(i)}`:void 0,M=w.scopeValue("formats",{key:i,ref:N,code:D});return typeof N=="object"&&!(N instanceof RegExp)?[N.type||"string",N.validate,(0,s._)`${M}.validate`]:["string",N,M]}function A(){if(typeof x=="object"&&!(x instanceof RegExp)&&x.async){if(!j.$async)throw new Error("async format in sync schema");return(0,s._)`await ${L}(${d})`}return typeof P=="function"?(0,s._)`${L}(${d})`:(0,s._)`${L}.test(${d})`}}}};return Gs.default=f,Gs}var Id;function xy(){if(Id)return Us;Id=1,Object.defineProperty(Us,"__esModule",{value:!0});const u=[Sy().default];return Us.default=u,Us}var Fn={},Nd;function Cy(){return Nd||(Nd=1,Object.defineProperty(Fn,"__esModule",{value:!0}),Fn.contentVocabulary=Fn.metadataVocabulary=void 0,Fn.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],Fn.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]),Fn}var Dd;function Py(){if(Dd)return ms;Dd=1,Object.defineProperty(ms,"__esModule",{value:!0});const s=Xm(),u=dy(),f=Ey(),m=xy(),b=Cy(),w=[s.default,u.default,(0,f.default)(),m.default,b.metadataVocabulary,b.contentVocabulary];return ms.default=w,ms}var Js={},Eo={},Bd;function Ty(){if(Bd)return Eo;Bd=1,Object.defineProperty(Eo,"__esModule",{value:!0}),Eo.DiscrError=void 0;var s;return(function(u){u.Tag="tag",u.Mapping="mapping"})(s||(Eo.DiscrError=s={})),Eo}var Fd;function Ry(){if(Fd)return Js;Fd=1,Object.defineProperty(Js,"__esModule",{value:!0});const s=ze(),u=Ty(),f=el(),m=fs(),b=Ye(),d={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:y,tagName:i}})=>y===u.DiscrError.Tag?`tag "${i}" must be string`:`value of tag "${i}" must be in oneOf`,params:({params:{discrError:y,tag:i,tagName:h}})=>(0,s._)`{error: ${y}, tag: ${h}, tagValue: ${i}}`},code(y){const{gen:i,data:h,schema:p,parentSchema:g,it:v}=y,{oneOf:j}=g;if(!v.opts.discriminator)throw new Error("discriminator: requires discriminator option");const k=p.propertyName;if(typeof k!="string")throw new Error("discriminator: requires propertyName");if(p.mapping)throw new Error("discriminator: mapping is not supported");if(!j)throw new Error("discriminator: requires oneOf keyword");const E=i.let("valid",!1),O=i.const("tag",(0,s._)`${h}${(0,s.getProperty)(k)}`);i.if((0,s._)`typeof ${O} == "string"`,()=>x(),()=>y.error(!1,{discrError:u.DiscrError.Tag,tag:O,tagName:k})),y.ok(E);function x(){const L=P();i.if(!1);for(const T in L)i.elseIf((0,s._)`${O} === ${T}`),i.assign(E,S(L[T]));i.else(),y.error(!1,{discrError:u.DiscrError.Mapping,tag:O,tagName:k}),i.endIf()}function S(L){const T=i.name("valid"),R=y.subschema({keyword:"oneOf",schemaProp:L},T);return y.mergeEvaluated(R,s.Name),T}function P(){var L;const T={},R=N(g);let A=!0;for(let q=0;q<j.length;q++){let J=j[q];if(J?.$ref&&!(0,b.schemaHasRulesButRef)(J,v.self.RULES)){const X=J.$ref;if(J=f.resolveRef.call(v.self,v.schemaEnv.root,v.baseId,X),J instanceof f.SchemaEnv&&(J=J.schema),J===void 0)throw new m.default(v.opts.uriResolver,v.baseId,X)}const G=(L=J?.properties)===null||L===void 0?void 0:L[k];if(typeof G!="object")throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${k}"`);A=A&&(R||N(J)),D(G,q)}if(!A)throw new Error(`discriminator: "${k}" must be required`);return T;function N({required:q}){return Array.isArray(q)&&q.includes(k)}function D(q,J){if(q.const)M(q.const,J);else if(q.enum)for(const G of q.enum)M(G,J);else throw new Error(`discriminator: "properties/${k}" must have "const" or "enum"`)}function M(q,J){if(typeof q!="string"||q in T)throw new Error(`discriminator: "${k}" values must be unique strings`);T[q]=J}}}};return Js.default=d,Js}const Ly={$schema:"http://json-schema.org/draft-07/schema#",$id:"http://json-schema.org/draft-07/schema#",title:"Core schema meta-schema",definitions:{schemaArray:{type:"array",minItems:1,items:{$ref:"#"}},nonNegativeInteger:{type:"integer",minimum:0},nonNegativeIntegerDefault0:{allOf:[{$ref:"#/definitions/nonNegativeInteger"},{default:0}]},simpleTypes:{enum:["array","boolean","integer","null","number","object","string"]},stringArray:{type:"array",items:{type:"string"},uniqueItems:!0,default:[]}},type:["object","boolean"],properties:{$id:{type:"string",format:"uri-reference"},$schema:{type:"string",format:"uri"},$ref:{type:"string",format:"uri-reference"},$comment:{type:"string"},title:{type:"string"},description:{type:"string"},default:!0,readOnly:{type:"boolean",default:!1},examples:{type:"array",items:!0},multipleOf:{type:"number",exclusiveMinimum:0},maximum:{type:"number"},exclusiveMaximum:{type:"number"},minimum:{type:"number"},exclusiveMinimum:{type:"number"},maxLength:{$ref:"#/definitions/nonNegativeInteger"},minLength:{$ref:"#/definitions/nonNegativeIntegerDefault0"},pattern:{type:"string",format:"regex"},additionalItems:{$ref:"#"},items:{anyOf:[{$ref:"#"},{$ref:"#/definitions/schemaArray"}],default:!0},maxItems:{$ref:"#/definitions/nonNegativeInteger"},minItems:{$ref:"#/definitions/nonNegativeIntegerDefault0"},uniqueItems:{type:"boolean",default:!1},contains:{$ref:"#"},maxProperties:{$ref:"#/definitions/nonNegativeInteger"},minProperties:{$ref:"#/definitions/nonNegativeIntegerDefault0"},required:{$ref:"#/definitions/stringArray"},additionalProperties:{$ref:"#"},definitions:{type:"object",additionalProperties:{$ref:"#"},default:{}},properties:{type:"object",additionalProperties:{$ref:"#"},default:{}},patternProperties:{type:"object",additionalProperties:{$ref:"#"},propertyNames:{format:"regex"},default:{}},dependencies:{type:"object",additionalProperties:{anyOf:[{$ref:"#"},{$ref:"#/definitions/stringArray"}]}},propertyNames:{$ref:"#"},const:!0,enum:{type:"array",items:!0,minItems:1,uniqueItems:!0},type:{anyOf:[{$ref:"#/definitions/simpleTypes"},{type:"array",items:{$ref:"#/definitions/simpleTypes"},minItems:1,uniqueItems:!0}]},format:{type:"string"},contentMediaType:{type:"string"},contentEncoding:{type:"string"},if:{$ref:"#"},then:{$ref:"#"},else:{$ref:"#"},allOf:{$ref:"#/definitions/schemaArray"},anyOf:{$ref:"#/definitions/schemaArray"},oneOf:{$ref:"#/definitions/schemaArray"},not:{$ref:"#"}},default:!0};var Md;function Ay(){return Md||(Md=1,(function(s,u){Object.defineProperty(u,"__esModule",{value:!0}),u.MissingRefError=u.ValidationError=u.CodeGen=u.Name=u.nil=u.stringify=u.str=u._=u.KeywordCxt=u.Ajv=void 0;const f=Zm(),m=Py(),b=Ry(),w=Ly,d=["/properties"],y="http://json-schema.org/draft-07/schema";class i extends f.default{_addVocabularies(){super._addVocabularies(),m.default.forEach(k=>this.addVocabulary(k)),this.opts.discriminator&&this.addKeyword(b.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const k=this.opts.$data?this.$dataMetaSchema(w,d):w;this.addMetaSchema(k,y,!1),this.refs["http://json-schema.org/schema"]=y}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(y)?y:void 0)}}u.Ajv=i,s.exports=u=i,s.exports.Ajv=i,Object.defineProperty(u,"__esModule",{value:!0}),u.default=i;var h=cs();Object.defineProperty(u,"KeywordCxt",{enumerable:!0,get:function(){return h.KeywordCxt}});var p=ze();Object.defineProperty(u,"_",{enumerable:!0,get:function(){return p._}}),Object.defineProperty(u,"str",{enumerable:!0,get:function(){return p.str}}),Object.defineProperty(u,"stringify",{enumerable:!0,get:function(){return p.stringify}}),Object.defineProperty(u,"nil",{enumerable:!0,get:function(){return p.nil}}),Object.defineProperty(u,"Name",{enumerable:!0,get:function(){return p.Name}}),Object.defineProperty(u,"CodeGen",{enumerable:!0,get:function(){return p.CodeGen}});var g=Xa();Object.defineProperty(u,"ValidationError",{enumerable:!0,get:function(){return g.default}});var v=fs();Object.defineProperty(u,"MissingRefError",{enumerable:!0,get:function(){return v.default}})})(is,is.exports)),is.exports}var $y=Ay();const Iy=Mm($y),So={app_id:"beanbagdb_system",meta:{name:"beanbagdb_system",description:"This is the default system app required for proper functioning of the database"},schemas:[{name:"schema",active:!0,description:"Meta-schema or the schema for defining other schemas",system_generated:!0,version:1.25,title:"Schema document",schema:{type:"object",additionalProperties:!1,properties:{system_generated:{title:"System generated schema",type:"boolean",default:!1},active:{title:"Active",description:"This indicates where new documents can be created using this schema or not. Old documents can still be edited",type:"boolean",default:!1},version:{type:"number",title:"Version",minimum:0,default:1,description:"This is an optional field.To be used primarily for system schemas"},name:{type:"string",title:"Name",minLength:4,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$",description:"This is the name of the schema.It cannot be changed later"},title:{type:"string",title:"Title",minLength:0,maxLength:1e3,description:"A title to display with records."},description:{type:"string",title:"About",minLength:0,maxLength:1e3,description:"A small description of what data in this schema stores."},schema:{type:"object",title:"JSON Schema specification",additionalProperties:!0,minProperties:1,maxProperties:50,description:"This must be a valid JSON Schema which will be used to validate documents created with this schema.See this https://tour.json-schema.org/",default:{}},settings:{type:"object",title:"Additional Settings",additionalProperties:!0,properties:{primary_keys:{title:"Primary key",type:"array",default:[],items:{type:"string"},maxItems:10,description:"Fields that makes each document unique in the schema.Leave it blank if you do not need it. You can still be able to distinguish documents using the link field and the document id."},non_editable_fields:{type:"array",title:"Non editable fields",default:[],items:{type:"string"},maxItems:50,minItems:0,description:"The list of fields whose values are added when the document is created but cannot be edited later in future."},encrypted_fields:{type:"array",title:"List of fields encrypted",default:[],items:{type:"string"},maxItems:50,description:"Once set, all the data in this field will be encrypted before storing it in the database. Encryption key must be provided during the time of BeanBagDB initialization and must be managed by the user as it is NOT stored in the database"},display_fields:{type:"array",title:"List of fields to show in short view",default:[],items:{type:"string"},maxItems:50,description:"These fields will be used when a record is displayed in short"},install_source:{type:"string",title:"Installation source",default:"human",description:"Describes how this schema was installed in database. This is determined by the system. By default the value is human. Possible value: name of the app , where it was cloned from etc..."},svg_icon25:{type:"string",title:"SVG Icon for schema",default:"human",description:"The height and width should be 25px"}},required:["primary_keys","non_editable_fields","encrypted_fields"]}},required:["name","description","schema","settings","title"]},settings:{primary_keys:["name"],non_editable_fields:["system_generated"],encrypted_fields:[],display_fields:["name","version","description","title","active"],svg_icon25:"<svg xmlns='http://www.w3.org/2000/svg' width='25' height='16' fill='currentColor' class='bi bi-database-fill-gear' viewBox='0 0 16 16'><path d='M8 1c-1.573 0-3.022.289-4.096.777C2.875 2.245 2 2.993 2 4s.875 1.755 1.904 2.223C4.978 6.711 6.427 7 8 7s3.022-.289 4.096-.777C13.125 5.755 14 5.007 14 4s-.875-1.755-1.904-2.223C11.022 1.289 9.573 1 8 1'/><path d='M2 7v-.839c.457.432 1.004.751 1.49.972C4.722 7.693 6.318 8 8 8s3.278-.307 4.51-.867c.486-.22 1.033-.54 1.49-.972V7c0 .424-.155.802-.411 1.133a4.51 4.51 0 0 0-4.815 1.843A12 12 0 0 1 8 10c-1.573 0-3.022-.289-4.096-.777C2.875 8.755 2 8.007 2 7m6.257 3.998L8 11c-1.682 0-3.278-.307-4.51-.867-.486-.22-1.033-.54-1.49-.972V10c0 1.007.875 1.755 1.904 2.223C4.978 12.711 6.427 13 8 13h.027a4.55 4.55 0 0 1 .23-2.002m-.002 3L8 14c-1.682 0-3.278-.307-4.51-.867-.486-.22-1.033-.54-1.49-.972V13c0 1.007.875 1.755 1.904 2.223C4.978 15.711 6.427 16 8 16c.536 0 1.058-.034 1.555-.097a4.5 4.5 0 0 1-1.3-1.905m3.631-4.538c.18-.613 1.048-.613 1.229 0l.043.148a.64.64 0 0 0 .921.382l.136-.074c.561-.306 1.175.308.87.869l-.075.136a.64.64 0 0 0 .382.92l.149.045c.612.18.612 1.048 0 1.229l-.15.043a.64.64 0 0 0-.38.921l.074.136c.305.561-.309 1.175-.87.87l-.136-.075a.64.64 0 0 0-.92.382l-.045.149c-.18.612-1.048.612-1.229 0l-.043-.15a.64.64 0 0 0-.921-.38l-.136.074c-.561.305-1.175-.309-.87-.87l.075-.136a.64.64 0 0 0-.382-.92l-.148-.045c-.613-.18-.613-1.048 0-1.229l.148-.043a.64.64 0 0 0 .382-.921l-.074-.136c-.306-.561.308-1.175.869-.87l.136.075a.64.64 0 0 0 .92-.382zM14 12.5a1.5 1.5 0 1 0-3 0 1.5 1.5 0 0 0 3 0'/></svg>"}},{system_generated:!0,version:1,description:"To store user defined key. this can include anything like API tokens etc. There is a special method to fetch this. The values are encrypted",name:"system_key",title:"System key",active:!0,schema:{type:"object",additionalProperties:!0,required:["name","value"],properties:{name:{type:"string",minLength:5,maxLength:50,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:"string",minLength:5,maxLength:5e3,pattern:`^[^
14
+ \r]*$`,description:"Must be a single line string"},note:{type:"string",minLength:1,maxLength:5e3}}},settings:{primary_keys:["name"],encrypted_fields:["value"],non_editable_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-key-fill" viewBox="0 0 16 16"><path d="M3.5 11.5a3.5 3.5 0 1 1 3.163-5H14L15.5 8 14 9.5l-1-1-1 1-1-1-1 1-1-1-1 1H6.663a3.5 3.5 0 0 1-3.163 2M2.5 9a1 1 0 1 0 0-2 1 1 0 0 0 0 2"/></svg>'}},{version:1,system_generated:!0,description:"The system relies on these settings for proper functioning or enabling optional features.",name:"system_setting",title:"System Setting",active:!0,schema:{required:["name","value"],type:"object",additionalProperties:!0,properties:{name:{type:"string",minLength:5,maxLength:1e3,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},value:{type:["array","object"]}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-gear-fill" viewBox="0 0 16 16"><path d="M9.405 1.05c-.413-1.4-2.397-1.4-2.81 0l-.1.34a1.464 1.464 0 0 1-2.105.872l-.31-.17c-1.283-.698-2.686.705-1.987 1.987l.169.311c.446.82.023 1.841-.872 2.105l-.34.1c-1.4.413-1.4 2.397 0 2.81l.34.1a1.464 1.464 0 0 1 .872 2.105l-.17.31c-.698 1.283.705 2.686 1.987 1.987l.311-.169a1.464 1.464 0 0 1 2.105.872l.1.34c.413 1.4 2.397 1.4 2.81 0l.1-.34a1.464 1.464 0 0 1 2.105-.872l.31.17c1.283.698 2.686-.705 1.987-1.987l-.169-.311a1.464 1.464 0 0 1 .872-2.105l.34-.1c1.4-.413 1.4-2.397 0-2.81l-.34-.1a1.464 1.464 0 0 1-.872-2.105l.17-.31c.698-1.283-.705-2.686-1.987-1.987l-.311.169a1.464 1.464 0 0 1-2.105-.872zM8 10.93a2.929 2.929 0 1 1 0-5.86 2.929 2.929 0 0 1 0 5.858z"/></svg>'}},{name:"system_edge_constraint",title:"Edge constraint",system_generated:!0,active:!0,version:1,description:"To define edge constraints for simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","name"],properties:{node1:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},node2:{type:"string",minLength:1,maxLength:500,pattern:"^(\\*|(\\*-[a-zA-Z0-9_-]+)(,[a-zA-Z0-9_-]+)*|[a-zA-Z0-9_-]+(,[a-zA-Z0-9_-]+)*)$"},name:{type:"string",minLength:1,maxLength:500,pattern:"^[a-zA-Z][a-zA-Z0-9_]*$"},label:{type:"string",maxLength:500},note:{type:"string",maxLength:5e3},max_from_node1:{type:"number",default:-1},max_to_node2:{type:"number",default:-1}}},settings:{primary_keys:["name"],non_editable_fields:["name"],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-node-plus-fill" viewBox="0 0 16 16"><path d="M11 13a5 5 0 1 0-4.975-5.5H4A1.5 1.5 0 0 0 2.5 6h-1A1.5 1.5 0 0 0 0 7.5v1A1.5 1.5 0 0 0 1.5 10h1A1.5 1.5 0 0 0 4 8.5h2.025A5 5 0 0 0 11 13m.5-7.5v2h2a.5.5 0 0 1 0 1h-2v2a.5.5 0 0 1-1 0v-2h-2a.5.5 0 0 1 0-1h2v-2a.5.5 0 0 1 1 0"/></svg>'}},{name:"system_edge",title:"Edge in the system graph",active:!0,system_generated:!0,version:1.5,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["node1","node2","edge_name"],properties:{node1:{type:"string"},node2:{type:"string"},edge_name:{type:"string"},note:{type:"string",default:" "},level_weight:{type:"number",default:1,description:"This helps order nodes at the same level in the graph. Nodes at the same level will be ordered in ascending order"}}},settings:{primary_keys:["node1","node2","edge_name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-diagram-2-fill" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M6 3.5A1.5 1.5 0 0 1 7.5 2h1A1.5 1.5 0 0 1 10 3.5v1A1.5 1.5 0 0 1 8.5 6v1H11a.5.5 0 0 1 .5.5v1a.5.5 0 0 1-1 0V8h-5v.5a.5.5 0 0 1-1 0v-1A.5.5 0 0 1 5 7h2.5V6A1.5 1.5 0 0 1 6 4.5zm-3 8A1.5 1.5 0 0 1 4.5 10h1A1.5 1.5 0 0 1 7 11.5v1A1.5 1.5 0 0 1 5.5 14h-1A1.5 1.5 0 0 1 3 12.5zm6 0a1.5 1.5 0 0 1 1.5-1.5h1a1.5 1.5 0 0 1 1.5 1.5v1a1.5 1.5 0 0 1-1.5 1.5h-1A1.5 1.5 0 0 1 9 12.5z"/></svg>'}},{name:"system_media",title:"Media content",active:!0,system_generated:!0,version:1,description:"To store images as Base64",schema:{type:"object",additionalProperties:!0,required:["imageBase64","caption","source"],properties:{imageBase64:{type:"string",media:{binaryEncoding:"base64"}},caption:{type:"string"},source:{type:"string"}}},settings:{primary_keys:["caption"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-image" viewBox="0 0 16 16"><path d="M8.002 5.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"/><path d="M12 0H4a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V2a2 2 0 0 0-2-2M3 2a1 1 0 0 1 1-1h8a1 1 0 0 1 1 1v8l-2.083-2.083a.5.5 0 0 0-.76.063L8 11 5.835 9.7a.5.5 0 0 0-.611.076L3 12z"/></svg>'}},{name:"system_log",system_generated:!0,title:"System log",active:!0,version:1.25,description:"To define edges in the simple directed graph of records.",schema:{type:"object",additionalProperties:!0,required:["text"],properties:{text:{type:"string"},app:{type:"string"}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-clock-history" viewBox="0 0 16 16"><path d="M8.515 1.019A7 7 0 0 0 8 1V0a8 8 0 0 1 .589.022zm2.004.45a7 7 0 0 0-.985-.299l.219-.976q.576.129 1.126.342zm1.37.71a7 7 0 0 0-.439-.27l.493-.87a8 8 0 0 1 .979.654l-.615.789a7 7 0 0 0-.418-.302zm1.834 1.79a7 7 0 0 0-.653-.796l.724-.69q.406.429.747.91zm.744 1.352a7 7 0 0 0-.214-.468l.893-.45a8 8 0 0 1 .45 1.088l-.95.313a7 7 0 0 0-.179-.483m.53 2.507a7 7 0 0 0-.1-1.025l.985-.17q.1.58.116 1.17zm-.131 1.538q.05-.254.081-.51l.993.123a8 8 0 0 1-.23 1.155l-.964-.267q.069-.247.12-.501m-.952 2.379q.276-.436.486-.908l.914.405q-.24.54-.555 1.038zm-.964 1.205q.183-.183.35-.378l.758.653a8 8 0 0 1-.401.432z"/><path d="M8 1a7 7 0 1 0 4.95 11.95l.707.707A8.001 8.001 0 1 1 8 0z"/><path d="M7.5 3a.5.5 0 0 1 .5.5v5.21l3.248 1.856a.5.5 0 0 1-.496.868l-3.5-2A.5.5 0 0 1 7 9V3.5a.5.5 0 0 1 .5-.5"/></svg>'}},{name:"system_script",system_generated:!0,title:"Executable script",active:!0,version:1,description:"To create scripts that implement some logic. Can run both on browser and client.",schema:{type:"object",additionalProperties:!0,required:["script","type","version"],properties:{type:{type:"string",default:"JS"},name:{type:"string",default:"script-name",pattern:"^[a-zA-Z0-9\\-]+$"},script:{type:"string",description:"The script",default:""},usage:{type:"string",description:"Documentation",default:" "},version:{type:"number",default:.1},log_execution:{type:"boolean",default:!1}}},settings:{primary_keys:["name"],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-braces-asterisk" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M1.114 8.063V7.9c1.005-.102 1.497-.615 1.497-1.6V4.503c0-1.094.39-1.538 1.354-1.538h.273V2h-.376C2.25 2 1.49 2.759 1.49 4.352v1.524c0 1.094-.376 1.456-1.49 1.456v1.299c1.114 0 1.49.362 1.49 1.456v1.524c0 1.593.759 2.352 2.372 2.352h.376v-.964h-.273c-.964 0-1.354-.444-1.354-1.538V9.663c0-.984-.492-1.497-1.497-1.6M14.886 7.9v.164c-1.005.103-1.497.616-1.497 1.6v1.798c0 1.094-.39 1.538-1.354 1.538h-.273v.964h.376c1.613 0 2.372-.759 2.372-2.352v-1.524c0-1.094.376-1.456 1.49-1.456v-1.3c-1.114 0-1.49-.362-1.49-1.456V4.352C14.51 2.759 13.75 2 12.138 2h-.376v.964h.273c.964 0 1.354.444 1.354 1.538V6.3c0 .984.492 1.497 1.497 1.6M7.5 11.5V9.207l-1.621 1.621-.707-.707L6.792 8.5H4.5v-1h2.293L5.172 5.879l.707-.707L7.5 6.792V4.5h1v2.293l1.621-1.621.707.707L9.208 7.5H11.5v1H9.207l1.621 1.621-.707.707L8.5 9.208V11.5z"/></svg>'}},{name:"system_text",system_generated:!0,title:"Plain text",active:!0,version:1,description:"Plain text nothing more",schema:{type:"object",additionalProperties:!1,required:[],properties:{text:{type:"string",default:"Text..."}}},settings:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-justify-left" viewBox="0 0 16 16"><path fill-rule="evenodd" d="M2 12.5a.5.5 0 0 1 .5-.5h7a.5.5 0 0 1 0 1h-7a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5m0-3a.5.5 0 0 1 .5-.5h11a.5.5 0 0 1 0 1h-11a.5.5 0 0 1-.5-.5"/></svg>'}}],records:[]},ol={additionalProperties:!0,type:"object",properties:{tags:{type:"array",items:{type:"string"},default:[],maxItems:40},link:{type:"string",minLength:2,maxLength:2e3,pattern:"^[a-zA-Z0-9-]+$"},title:{type:"string",default:"Document",maxLength:1e4},ref:{type:"object",description:"This can be used by apps to add additional data for later user like version ",default:{}},location:{type:"object",description:"this can be used to add created_from and last_updated_from location to the doc",default:{}}}},Ny={additionalProperties:!0,type:"object",required:["app_id"],properties:{app_id:{type:"string"},meta:{type:"object",additionalProperties:!0},schemas:{type:"array",minItems:1},records:{type:"array",default:[]},default_setting:{type:"object",additionalProperties:!0,default:{primary_keys:[],non_editable_fields:[],encrypted_fields:[],svg_icon25:'<svg xmlns="http://www.w3.org/2000/svg" width="25" height="25" fill="currentColor" class="bi bi-file-earmark" viewBox="0 0 16 16"><path d="M14 4.5V14a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V2a2 2 0 0 1 2-2h5.5zm-3 0A1.5 1.5 0 0 1 9.5 3V1H4a1 1 0 0 0-1 1v12a1 1 0 0 0 1 1h8a1 1 0 0 0 1-1V4.5z"/></svg>'}}}};class wr{constructor(u){if(this.util_check_required_fields(["name","encryption_key","api","utils","db_name"],u),this.util_check_required_fields(["insert","update","delete","search","get","createIndex"],u.api),this.util_check_required_fields(["encrypt","decrypt","ping","validate_schema"],u.utils),u.encryption_key.length<20)throw new xt([{message:wr.error_codes.key_short}]);this.encryption_key=u.encryption_key,this.db_name=u.db_name,this.db_api=u.api,this.utils=u.utils,this.meta={database_name:u.name,backend_database:this.db_name,beanbagdb_version_db:null},this._version=this._get_current_version(),this.active=!1,this.apps={},console.log("Run ready() now")}static error_codes={key_short:"The encryption key must at least contain 20 characters",not_active:"Database is not ready. Run ready() first",schema_not_found:"Schema not found",doc_not_found:"Document with selected criteria does not exists"};static rest_enabled={ready:{use:"Makes the database ready to use"},metadata:{use:"Returns metadata related to the current BeanBagDB instance "},initialize_app:{use:"To install/initialize an external app",input:"{...app_data}"},update_indexes:{use:"Updates the indexes in the database for better searching"},create:{input:"{schema,data,meta}",use:"Creates a new doc"},read:{input:"{criteria,include_schema:false}",use:"Returns a doc. 3 ways to search for a doc : by _id, by link or by the primary key of the schema "},update:{input:"{criteria,updates}",use:"Updates a document"},delete:{input:"{criteria}",use:"Deletes a doc"},search:{input:"{criteria:{selector:{...}}}",use:"To search in the database"},get:{input:"{type,criteria}",use:"Returns special types of documents "},create_edge:{input:"{node1:{..criteria},node2:{..criteria},edge_name,edge_label}",use:"Creates a new edge in the system's simple directed graph "},util_get_now_unix_timestamp:{use:"Returns the current UNIX timestamp"},util_validate_data:{input:"{schema:{},data:{}}",use:"Validate the given data against the given schema and returns errors/validated doc"},util_validate_schema_object:{input:"{...schema_object...}",use:"Validated the schema document without inserting it in the DB"},util_generate_random_link:{use:"Returns a random link"}};metadata(){return{...this.meta,beanbagdb_version_code:this._version,ready_to_use:this.active}}async check_ready(){console.log("checking if DB is ready to be used");let u=await this.db_api.search({selector:{schema:"system_setting","data.name":"beanbagdb_system"}});if(u.docs.length>0){let f=u.docs[0];this.active=f.data.value.version==this._version,this.meta.beanbagdb_version_db=f.data.value.version}return this.active||console.log("Version mismatch.Init of default required"),this.active}async ready(u=!0){if(await this.check_ready())console.log("Ready.Set.Go");else if(u)console.log("Initializing"),await this.initialize();else throw new Error("DB cannot be used because there is a version mismatch between the DB and the script. Since automatically init flag was set to true, exiting")}async initialize(){try{let u=await this.initialize_app(So);return this.meta.beanbagdb_version_db=this._version,this.active=!0,u}catch(u){throw console.log("Error in initializing instance"),console.log(u),u}}async initialize_app(u){if(!u)throw new Error("app_data_input is required");let f=this.util_validate_data({schema:Ny,data:u}),m=0;f.schemas.map(p=>{m=m+p.version,p.settings.install_source=`app:${f.app_id}`}),f.records.map(p=>{m=m+p.version});let b=await this.db_api.search({selector:{schema:"system_setting","data.name":f.app_id}}),w=!0,d;if(b.docs.length>0&&(d=b.docs[0],d.data.value.version==m&&(w=!1)),!w)return d;let y=`Initializing ${f.app_id} app to v.${m}`,i=["update started"];for(let p=0;p<f.schemas.length;p++){const g=f.schemas[p].name,v=f.schemas[p];i.push(`checking.${g}`);try{let j=await this.get({type:"schema",criteria:{name:g}});if(j.data.version!=v.version){i.push(`old.${g}.v.${j.data.version}`);let k=await this.db_api.get(j._id);k.data={...v},k.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(k),await this.db_api.update(k),i.push(`new.${g}.v=${v.version}`)}else i.push(`${g}.v.${j.data.version}=latest`)}catch(j){if(j instanceof Vr){if(g=="schema"&&f.app_id=="beanbagdb_system"){let k=this._get_blank_doc("schema");k.data=v,await this.db_api.insert(k)}else{let k=So.schemas[0].schema,E=this._get_blank_schema_doc("schema",k,v);await this.db_api.insert(E)}i.push(`init.${g}.v=${v.version}`)}else i.push(`${g}.error.message : ${j.message} `)}}for(let p=0;p<f.records.length;p++){const g=f.records[p].schema,v=f.records[p].record,j=f.records[p].title;i.push(`checking.records.${j}`);try{let k=await this.create({schema:g,data:v,meta:f.records[p].meta});i.push(`doc.${j}.created`)}catch(k){k instanceof Mn||i.push(`error in doc ${j} insertion: ${k.message}, doc: ${JSON.stringify(v)}`)}}let h={...f.meta,app_id:f.app_id,version:m};try{await this.modify_setting(f.app_id,h,"update");let p=this._get_blank_doc("system_log");p.data={text:y,steps:i,app:f.app_id},p.meta.title=y,await this.db_api.insert(p),console.log("init logged")}catch(p){throw console.log(p),console.log("error in storing/updating beanbagdb_version"),p}return h}async update_indexes(){this._check_ready_to_use();let u=await this.db_api.search({selector:{schema:"schema"}}),f=[];u.docs.map(m=>{Object.keys(m.data.schema.properties).map(b=>{f.push("data."+b)})}),await this.db_api.createIndex({index:{fields:f}})}async create(u){this._check_ready_to_use();let f=[];if(u.schema||f.push("schema is required"),u.data||f.push("data is required"),f.length>0)throw new Mn(`${f.join(",")}.`);if(Object.keys(u.data).length==0)throw new Mn("No data provided");try{let m=await this._insert_pre_checks(u.schema,u.data,u?.meta||{},u?.app||{},u?.settings||{}),b=await this.db_api.insert(m);return{_id:b.id,_rev:b.rev,...m}}catch(m){throw m}}async read(u){this._check_ready_to_use();let f={doc:null},m=null;if(u._id)try{let b=await this.db_api.get(u._id);f.doc=b}catch{throw new Vr(wr.error_codes.doc_not_found)}else if(u.link){let b=await this.db_api.search({selector:{"meta.link":u.link}});if(b.docs.length==0)throw new Vr(wr.error_codes.doc_not_found);f.doc=b.docs[0]}else if(u.hasOwnProperty("schema")&u.hasOwnProperty("data")){m=await this.get({type:"schema",criteria:{name:u.schema}});let b=m.data.settings.primary_keys,w={schema:u.schema};b.forEach(y=>{if(!u.data[y])throw new xt("Incomplete Primary key set. Required field(s) : "+b.join(","));w["data."+y]=u.data[y]});let d=await this.db_api.search({selector:w});if(d.docs.length==0)throw new Vr(wr.error_codes.doc_not_found);f.doc=d.docs[0]}else throw new xt('Invalid criteria to read a document. Valid ways : {"schema":"schema_name","data":{...primary key}} or {"_id":""} or {"link":""} ');return m||(m=await this.get({type:"schema",criteria:{name:f.doc.schema}})),u.include_schema&&(f.schema=m.data),f.doc=await this._decrypt_doc(m.data,f.doc),f}async update(u){this._check_ready_to_use();const{criteria:f,updates:m,rev_id:b="",update_source:w="api",save_conflict:d=!0}=u;if(!f)throw new kr("Doc search criteria not provided");if(!m)throw new kr("No updates provided. Format {'update':{'data':{...selected fields},'meta':{},'app':{... used by apps to manage app data} }}");let y=await this.read({...f,include_schema:!0}),i=y.schema,h=y.doc;if(h.schema=="schema"&&h.data.system_generated==!0)throw new kr("System schemas cannot be updated using this API");let p=Object.keys(i.schema.properties),g=i.settings.non_editable_fields,v=p.filter(E=>!g.includes(E)),j=!1,k=this.util_filter_object(m.data||{},v);if(Object.keys(k).length>0){let E={...h.data,...k};if(h.schema=="system_edge"&&(E=await this._create_edge(E)),E=this.util_validate_data({schema:i.schema,data:E}),i.settings.primary_keys.length>0){let O=i.settings.primary_keys,x={schema:i.name};O.map(P=>{x["data."+P]=E[P]});let S=await this.search({selector:x});if(S.docs.length>0)if(S.docs.length==1){if(S.docs[0]._id!=h._id)throw new kr("Update not allowed. Document with the same primary key already exists")}else throw new Error("There is something wrong with the schema primary keys")}h.data=E,j=!0}if(m.meta){let E=ol;Object.keys(E.properties);let O={...h.meta,...m.meta};if(O=this.util_validate_data({schema:E,data:O}),O.link){let x=await this.search({selector:{"meta.link":O.link}});if(x.docs.length>0)if(x.docs.length==1){if(x.docs[0]._id!=h._id)throw new kr("Update not allowed. Document with the same link already exists")}else throw new Error("There is something wrong.")}h.meta={...O},j=!0}if(m.app&&(h.app||(h.app={}),Object.entries(m.app).forEach(([E,O])=>{if(!O||typeof O!="object"||!O.mode||!O.data)throw console.warn(`Invalid update format for ${E}`),new kr(`Invalid update format for app ${E}. Must be an object {mode:"update|replace|append|remove", data:{} }`);switch(O.mode){case"update":h.app[E]={...h.app[E],...O.data},j=!0;break;case"replace":h.app[E]=O.data,j=!0;break;case"append":Object.entries(O.data).forEach(([x,S])=>{Array.isArray(h.app[E]?.[x])||(h.app[E]=h.app[E]||{},h.app[E][x]=[]),h.app[E][x].push(S)}),j=!0;break;case"remove":delete h.app[E],j=!0;break;default:throw new kr(`Unknown mode: ${O.mode} app ${E}. Must be an object {mode:"update|replace|append|remove", data:{} }`)}})),j)return h=await this._encrypt_doc(i,h),h.meta.updated_on=this.util_get_now_unix_timestamp(),h.meta.updated_by=w,await this.db_api.update(h);throw new kr("Nothing to update")}async delete(u){this._check_ready_to_use();let f=await this.read(u);if(["schema","system_setting","system_log"].includes(f.schema))throw new Error(`Deletion of ${f.schema} doc is not support yet.`);await this.db_api.delete(f.doc._id)}async search(u={}){if(this._check_ready_to_use(),!u.selector)throw new xt("Invalid search query.Use {selector:{...query...}}");let f=await this.db_api.search(u);return{...{decrypt_docs:!1},...u?.options||{}}.decrypt_docs&&f.docs.length>0&&(f=await this._decrypt_docs(f)),f}async _decrypt_docs(u){const f=[...new Set(u.docs.map(d=>d.schema))];let m=await this.db_api.search({selector:{schema:"schema","data.name":{$in:f}}}),b={};m.docs.map(d=>{b[d.data.name]=d.data});let w=[];for(let d=0;d<u.docs.length;d++){const y=u.docs[d];w.push(await this._decrypt_doc(b[y.schema],y))}return{docs:w}}async get(u){const f={schema:async m=>{let b=await this.db_api.search({selector:{schema:"schema","data.name":m.name}});if(b.docs.length==0)throw new Vr(wr.error_codes.schema_not_found);return b.docs[0]},schema_list:async m=>{let b=await this.db_api.search({selector:{schema:"schema"}});if(b.docs.length==0)throw new Vr(wr.error_codes.schema_not_found);{let w=[];return b.docs.map(d=>{w.push({name:d.data.name,version:d.data.version,system_defined:d.data.system_generated,description:d.data.description,link:d.meta.link,title:d.data.title,_id:d._id})}),w}},schema_icons:async m=>{let b=await this.db_api.search({selector:{schema:"schema"}});if(b.docs.length==0)throw new Vr(wr.error_codes.schema_not_found);{let w={};return b.docs.map(d=>{w[d.data.name]=d.data.settings.svg_icon25||""}),w}},editable_meta_schema:async m=>ol};if(!u.type)throw new xt("No type provided. Must be: "+Object.keys(f).join(","));if(Object.keys(f).includes(u.type))return await f[u.type](u?.criteria||{});throw new xt("Invalid name. Must be : "+Object.keys(f).join(","))}async load_scripts(u,f){if(this._check_ready_to_use(),this.apps[u]={},f)for(let m in f)typeof f[m]=="function"&&(this.apps[u][m]=f[m].bind(null,this));else console.log("app_module is blank")}async modify_setting(u,f,m){if(!u||!f||!m)throw new kr("All 3 inputs (setting name, value and update_mode) are required");let b=await this.db_api.search({selector:{schema:"system_setting","data.name":u}});if(!["append","update"].includes(m))throw new kr("Invalid update_mode");if(b.docs.length>0){let w={...b.docs[0]};return Array.isArray(f)?w.data.value=m==="append"?[...w.data.value,f]:f:w.data.value=m==="append"?{...w.data.value,...f}:f,w.meta.updated_on=this.util_get_now_unix_timestamp(),await this.db_api.update(w),w}else{let w=this._get_blank_doc("system_setting");w.data={value:f,name:u},await this.db_api.insert(w)}}async _create_edge(u){console.log(u);let{node1:f,node2:m,edge_name:b,note:w="",level_weight:d=1}=u;if(this._check_ready_to_use(),!b)throw new xt("edge_name required");if(!f||Object.keys(f).length==0)throw new xt("node1 required");if(!m||Object.keys(m).length==0)throw new xt("node2 required");typeof f=="string"&&(f={_id:f}),typeof m=="string"&&(m={_id:m});let y=await this.read(f),i=await this.read(m);if(y.doc._id==i.doc._id)throw new xt("Both nodes cannot be the same");if(y.doc.schema=="system_edge"||i.doc.schema=="system_edge")throw new xt("A node cannot be an existing edge document");let h;try{h=(await this.read({schema:"system_edge_constraint",data:{name:b}})).doc.data;let g=[],v=y.doc._id,j=i.doc._id,k=this._check_nodes_edge(h.node1,h.node2,y.doc.schema,i.doc.schema);k.valid?k.swapped&&(v=i.doc._id,j=y.doc._id):g.push("Invalid nodes.This config of nodes not allowed");let E=await this.search({selector:{schema:"system_edge","data.edge_name":b}});if(h.max_from_node1!=-1&&E.docs.filter(x=>x.data.node1==v).length>=h.max_from_node1&&g.push("max limit reached"),h.max_to_node2!=-1){let O=E.docs.filter(x=>x.data.node2==j);filter1.length>=h.max_from_node1&&g.push("max limit reached")}if(g.length==0)return{node1:v,node2:j,edge_name:b,note:w,level_weight:d};throw new Dy(g)}catch(p){if(p instanceof Vr){let g={node1:"*",node2:"*",name:b,note:w};return await this.create({schema:"system_edge_constraint",data:g}),{node1:y.doc._id,node2:i.doc._id,edge_name:b,note:w,level_weight:d}}else throw p}}_check_node_schema_match(u,f){return u==="*"?!0:u.startsWith("*-")?!u.slice(2).split(",").includes(f):u.split(",").includes(f)}_check_nodes_edge(u,f,m,b){const w=this._check_node_schema_match(u,m),d=this._check_node_schema_match(f,b),y=this._check_node_schema_match(f,m),i=this._check_node_schema_match(u,b);return w&&d?{valid:!0,swapped:!1}:y&&i?{valid:!0,swapped:!0}:{valid:!1,swapped:!1}}async _upgrade_schema_in_bulk(u,f=!1,m="Schema Upgrade in bulk"){let b=["schema update started"],w=!1;for(let d=0;d<u.length;d++){const y=u[d].name,i=u[d];b.push(`checking.${y}`);try{let h=await this.get({type:"schema",criteria:{name:y}});if(h.data.version!=i.version){b.push(`old.${y}.v.${h.data.version}`);let p=await this.db_api.get(h._id);p.data={...i},p.meta.updated_on=this.util_get_now_unix_timestamp(),console.log(p),await this.db_api.update(p),b.push(`new.${y}.v=${i.version}`),w=w||!0}else b.push(`${y}.v.${h.data.version}=latest`)}catch(h){if(h instanceof Vr){let p=So.schemas[0].schema,g=this._get_blank_schema_doc("schema",p,i);await this.db_api.insert(g),b.push(`init.${y}.v=${i.version}`),w=w||!0}else b.push(`${y}.error.message : ${h.message} `)}}if(w&&f)try{let d=this._get_blank_doc("system_log");d.data={text:m,data:{steps:b},time:this.util_get_now_unix_timestamp()},await this.db_api.insert(d)}catch(d){console.log(d)}return{update_was_required:w,logs:b}}_get_current_version(){let u=0;if(So.schemas.map(f=>{u=u+f.version}),So.records.map(f=>{u=u+f.version}),u==NaN)throw Error("Error in system schema version numbers");return u}_check_ready_to_use(){if(!this.active)throw new Error(wr.error_codes.not_active)}_get_blank_doc(u){if(!u)throw new Error("Schema name not provided for the blank doc");let f=this.util_get_now_unix_timestamp(),m=`${f}`;return{data:{},meta:{created_on:f,tags:[],link:this.util_generate_random_link(),title:m},app:{},schema:u}}_get_blank_schema_doc(u,f,m){let b=this.util_validate_data({schema:f,data:m}),w=this._get_blank_doc(u);return w.data=b,w}async _decrypt_doc(u,f){try{for(let m of u.settings.encrypted_fields)f.data[m]=await this.utils.decrypt(f.data[m],this.encryption_key);return{...f}}catch(m){throw console.log(m),new qd([{message:m.message}])}}async _encrypt_doc(u,f){try{if(u.settings.encrypted_fields.length>0)for(let m of u.settings.encrypted_fields)f.data[m]=await this.utils.encrypt(f.data[m],this.encryption_key);return{...f}}catch(m){throw new qd([{message:m.message}])}}async _insert_pre_checks(u,f,m={},b={},w={}){let d=await this.search({selector:{schema:"schema","data.name":u}});if(d.docs.length==0)throw new Mn(`The schema "${u}" does not exists`);let y=d.docs[0].data;if(!y.active)throw new Mn(`The schema "${u}" is not active`);let i;if(u!="system_edge"&&(i=this.util_validate_data({schema:y.schema,data:f})),Object.keys(m).length>0&&(m=this.util_validate_data({schema:ol,data:m})),Object.keys(b).length>0){let p={type:"object",patternProperties:{".*":{type:"object"}},additionalProperties:!1};this.util_validate_data({schema:p,data:b})}if(m.link&&(await this.search({selector:{"meta.link":m.link}})).docs.length>0)throw new Mn(`Document with the link "${m.link}" already exists in the Database.`);if(u=="schema"?this.util_validate_schema_object(i):u=="system_edge"&&(i=await this._create_edge(f)),y.settings.primary_keys.length>0){let p={schema:u};if(y.settings.primary_keys.map(v=>{p["data."+v]=i[v]}),(await this.search({selector:p})).docs.length>0)throw new Mn(`Document with the given primary key (${y.settings.primary_keys.join(",")}) already exists in the schema "${u}"`)}if(y.settings.encrypted_fields.length>0)for(let p of y.settings.encrypted_fields)i[p]=await this.utils.encrypt(i[p],this.encryption_key);let h=this._get_blank_doc(u);return h.data=i,m&&(h.meta={...h.meta,...m}),b&&(h.app=b),h}util_get_now_unix_timestamp(){return Math.floor(Date.now()/1e3)}util_check_required_fields(u,f){for(const m of u)if(!f[m])throw new xt(`The field ${m} is required.`)}util_filter_object(u,f){return f.reduce((m,b)=>(Object.prototype.hasOwnProperty.call(u,b)&&(m[b]=u[b]),m),{})}util_validate_data(u){if(!u.schema)throw new xt("schema is required");if(!u.data)throw new xt("data is required");const{valid:f,validate:m,data:b}=this.utils.validate_schema(u.schema,u.data);if(f)return b;throw new xt(m.errors)}util_validate_schema_object(u){let f=[{message:"Schema validation errors "}];u.schema.type?u.schema.type!="object"&&f.push({message:"The schema.'type' value is invalid.Only 'object' allowed"}):f.push({message:"Schema must have the field schema.'type' which can only be 'object' "}),u.schema.properties?(typeof u.schema.properties!="object"&&f.push({message:"Invalid schema.properties. It must be an object and must have atleast one field inside."}),Object.keys(u.schema.properties).length==0&&f.push({message:"You must define at least one property"})):f.push({message:"The schema.'properties' object does not exists"}),u.schema.hasOwnProperty("additionalProperties")?typeof u.schema.additionalProperties!="boolean"&&f.push({message:"Invalid schema.additionalProperties. It must be a boolean value"}):f.push({message:"The schema.'additionalProperties' field is required"});const m=Object.keys(u.schema.properties);if(u.settings.primary_keys.length>0&&(u.settings.primary_keys.every(w=>m.includes(w)&&u.schema.properties[w].type!="object"&&u.schema.properties[w].type!="array")||f.push({message:"Primary keys invalid. All keys must be defined in the schema and must be non object"})),u.settings.non_editable_fields.length>0&&(u.settings.non_editable_fields.every(w=>m.includes(w))||f.push({message:"Non editable fields invalid. All fields must be defined in the schema "})),u.settings.encrypted_fields.length>0&&(u.settings.encrypted_fields.every(d=>m.includes(d)&&u.schema.properties[d].type=="string")||f.push({message:"Invalid encrypted fields. All fields must be defined in the schema and must be string "}),u.settings.encrypted_fields.every(d=>!u.settings.primary_keys.includes(d))||f.push({message:"Invalid encrypted fields.Primary key fields cannot be encrypted "})),f.length>1)throw new xt(f)}util_generate_random_link(u={type:1}){return{0:()=>{const m=["rain","mars","banana","earth","kiwi","mercury","fuji","hurricane","matterhorn","snow","saturn","jupiter","peach","wind","pluto","apple","k2","storm","venus","denali","cloud","sunshine","mango","drizzle","pineapple","aconcagua","gasherbrum","apricot","neptune","fog","orange","blueberry","kilimanjaro","uranus","grape","storm","montblanc","lemon","chooyu","raspberry","cherry","thunder","vinson","breeze","elbrus","everest","parbat","makalu","nanga","kangchenjunga","lightning","cyclone","comet","asteroid","pomegranate","nectarine","clementine","strawberry","tornado","avalanche","andes","rockies","himalayas","pyrenees","carpathians","cascade","etna","vesuvius","volcano","tundra","whirlwind","iceberg","eclipse","zephyr","tropic","monsoon","aurora"];return Array.from({length:3},()=>m[Math.floor(Math.random()*m.length)]).join("-")},1:()=>{const m=Math.floor(Math.random()*3)+6;return Math.floor(Math.random()*Math.pow(16,m)).toString(16).padStart(m,"0")}}[u.type]()}}class xt extends Error{constructor(u=[]){let f;Array.isArray(u)?f=u.map(b=>` ${(b.instancePath||" ").replace("/","")} ${b.message} `):f=[u];let m=`Validation failed with error(s): ${f.join(",")}`;super(m),this.name="ValidationError",this.errors=u}}class kr extends Error{constructor(u=[]){let f;Array.isArray(u)?f=u.map(b=>` ${(b.instancePath||" ").replace("/","")} ${b.message} `):f=[u];let m=`Error in document update. ${f.join(",")}`;super(m),this.name="DocUpdateError",this.errors=u}}class Mn extends Error{constructor(u=[]){let f;Array.isArray(u)?f=u.map(b=>` ${(b.instancePath||" ").replace("/","")} ${b.message} `):f=[u];let m=`Error in document creation. ${f.join(",")}`;super(m),this.name="DocCreationError",this.errors=u}}class Vr extends Error{constructor(u=[]){let f;Array.isArray(u)?f=u.map(b=>` ${(b.instancePath||" ").replace("/","")} ${b.message} `):f=[u];let m=`Error in fetching document. Criteria : ${f.join(",")}`;super(m),this.name="DocNotFoundError",this.errors=u}}class qd extends Error{constructor(u=[]){let f;Array.isArray(u)?f=u.map(b=>` ${(b.instancePath||" ").replace("/","")} ${b.message} `):f=[u];let m=`Error in encryption/decryption of data : ${f.join(",")}`;super(m),this.name="EncryptionError",this.errors=u}}class Dy extends Error{constructor(u=[]){let f;Array.isArray(u)?f=u.map(b=>` ${(b.instancePath||" ").replace("/","")} ${b.message} `):f=[u];let m=`Error in relation of the simple digraph : ${f.join(",")}`;super(m),this.name="RelationError",this.errors=u}}function By(s){try{const u=new URL(s),f=u.username,m=u.password;if(!f||!m)throw new Error("Username and password must be in URL (http://user:pass@host:port)");const b=`${u.protocol}//${u.host}`;return{username:f,password:m,baseUrl:b}}catch(u){throw new Error(`Invalid CouchDB URL format: ${u.message}. Use: http://user:pass@host:port`)}}const Fy=async s=>{if(!s.url)throw new Error("No DB URL provided");if(!s.name)throw new Error("No DB name provided");if(!s.encryption_key)throw new Error("No encryption key provided");const{username:u,password:f,baseUrl:m}=By(s.url);let b=s.name;console.log(m);const w=s.url.match(/^(https?:\/\/[^\/]+(?:\/[^\/]+)*)\/([^\/]+)$/);w&&(w[1],b=s.name||w[2]);const d=dt.create({baseURL:`${m}/${b}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:u,password:f}}),y=dt.create({baseURL:`${m}/${b}`,timeout:1e4,headers:{"Content-Type":"application/json",Accept:"application/json"},auth:{username:u,password:f}});try{await y.get("/")}catch(p){if(p.response?.status===404)await d.put(`/${b}`),console.log(`Created database: ${b}`);else throw p}const i={db_name:"couchdb-rest",name:b,encryption_key:s.encryption_key,api:{insert:async p=>(await y.post("/",p)).data,update:async p=>{if(!p._id||!p._rev)throw new Error("Document must have _id and _rev for update");return(await y.put(`/${p._id}`,p)).data},search:async p=>(await y.post("_find",p)).data,get:async p=>(await y.get(`/${p}`)).data,createIndex:async p=>(await y.post("_index",p)).data,delete:async p=>{const g=await y.get(`/${p}`);return(await y.delete(`/${g._id}?rev=${g._rev}`)).data}},utils:{encrypt:async(p,g)=>{const v=new TextEncoder,j=v.encode(p),k=v.encode(g);if(![16,24,32].includes(k.length))throw new Error("Encryption key must be 16, 24, or 32 bytes long.");const E=await crypto.subtle.importKey("raw",k,{name:"AES-GCM"},!1,["encrypt"]),O=crypto.getRandomValues(new Uint8Array(12)),x=await crypto.subtle.encrypt({name:"AES-GCM",iv:O},E,j),S=new Uint8Array(x),P=btoa(String.fromCharCode(...S));return`${btoa(String.fromCharCode(...O))}:${P}`},decrypt:async(p,g)=>{const[v,j]=p.split(":"),k=Uint8Array.from(atob(v),L=>L.charCodeAt(0)),E=Uint8Array.from(atob(j),L=>L.charCodeAt(0)),O=new TextEncoder,x=await crypto.subtle.importKey("raw",O.encode(g),{name:"AES-GCM"},!1,["decrypt"]),S=await crypto.subtle.decrypt({name:"AES-GCM",iv:k},x,E);return new TextDecoder().decode(S)},ping:async()=>{try{return await y.get("/"),!0}catch{return!1}},validate_schema:(p,g)=>{const v=new Iy({code:{esm:!0},strict:!1,useDefaults:!0}),j={...g},k=v.compile(p);return{valid:k(j),validate:k,data:j}}}};return new wr(i)},My="5";typeof window<"u"&&((window.__svelte??={}).v??=new Set).add(My);const qy=1,Vy=2,zy=16,Hy=1,Uy=4,Gy=8,Jy=16,Ky=1,Wy=2,Vd="[",Ks="[!",sl="]",ki={},Ct=Symbol(),al=!1;var zd=Array.isArray,Zy=Array.prototype.indexOf,Ws=Array.from,Zs=Object.keys,Ys=Object.defineProperty,qn=Object.getOwnPropertyDescriptor,Yy=Object.prototype,Qy=Array.prototype,Xy=Object.getPrototypeOf,Hd=Object.isExtensible;function ev(s){for(var u=0;u<s.length;u++)s[u]()}function Ud(){var s,u,f=new Promise((m,b)=>{s=m,u=b});return{promise:f,resolve:s,reject:u}}const kt=2,ll=4,ul=8,tv=1<<24,zr=16,Hr=32,on=64,Qs=128,or=512,Pt=1024,Vt=2048,jr=4096,Jt=8192,Ur=16384,Xs=32768,ji=65536,Gd=1<<17,Jd=1<<18,Vn=1<<19,rv=1<<20,sn=1<<25,zn=32768,cl=1<<21,dl=1<<22,an=1<<23,xo=Symbol("$state"),Kd=Symbol("legacy props"),Oi=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"},ea=3,Ei=8;function nv(s){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function iv(){throw new Error("https://svelte.dev/e/async_derived_orphan")}function ov(s){throw new Error("https://svelte.dev/e/effect_in_teardown")}function sv(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function av(s){throw new Error("https://svelte.dev/e/effect_orphan")}function lv(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function uv(){throw new Error("https://svelte.dev/e/hydration_failed")}function cv(s){throw new Error("https://svelte.dev/e/props_invalid_value")}function dv(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function hv(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function fv(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}function pv(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}function ta(s){console.warn("https://svelte.dev/e/hydration_mismatch")}function mv(){console.warn("https://svelte.dev/e/svelte_boundary_reset_noop")}let it=!1;function Gr(s){it=s}let Qe;function At(s){if(s===null)throw ta(),ki;return Qe=s}function ra(){return At(Er(Qe))}function Or(s){if(it){if(Er(Qe)!==null)throw ta(),ki;Qe=s}}function yv(s=1){if(it){for(var u=s,f=Qe;u--;)f=Er(f);Qe=f}}function na(s=!0){for(var u=0,f=Qe;;){if(f.nodeType===Ei){var m=f.data;if(m===sl){if(u===0)return f;u-=1}else(m===Vd||m===Ks)&&(u+=1)}var b=Er(f);s&&f.remove(),f=b}}function Wd(s){if(!s||s.nodeType!==Ei)throw ta(),ki;return s.data}function Zd(s){return s===this.v}function vv(s,u){return s!=s?u==u:s!==u||s!==null&&typeof s=="object"||typeof s=="function"}function Yd(s){return!vv(s,this.v)}let bv=!1,Kt=null;function Si(s){Kt=s}function hl(s,u=!1,f){Kt={p:Kt,i:!1,c:null,e:null,s,x:null,l:null}}function fl(s){var u=Kt,f=u.e;if(f!==null){u.e=null;for(var m of f)bh(m)}return s!==void 0&&(u.x=s),u.i=!0,Kt=u.p,s??{}}function Qd(){return!0}let Hn=[];function Xd(){var s=Hn;Hn=[],ev(s)}function ia(s){if(Hn.length===0&&!Co){var u=Hn;queueMicrotask(()=>{u===Hn&&Xd()})}Hn.push(s)}function gv(){for(;Hn.length>0;)Xd()}function eh(s){var u=Xe;if(u===null)return Ke.f|=an,s;if((u.f&Xs)===0){if((u.f&Qs)===0)throw s;u.b.error(s)}else xi(s,u)}function xi(s,u){for(;u!==null;){if((u.f&Qs)!==0)try{u.b.error(s);return}catch(f){s=f}u=u.parent}throw s}const oa=new Set;let ct=null,Qt=null,Xt=[],sa=null,pl=!1,Co=!1;class sr{committed=!1;current=new Map;previous=new Map;#t=new Set;#e=new Set;#r=0;#n=0;#l=null;#o=new Set;#i=new Set;skipped_effects=new Set;is_fork=!1;is_deferred(){return this.is_fork||this.#n>0}process(u){Xt=[],this.apply();var f={parent:null,effect:null,effects:[],render_effects:[]};for(const m of u)this.#s(m,f);this.is_fork||this.#c(),this.is_deferred()?(this.#a(f.effects),this.#a(f.render_effects)):(ct=null,rh(f.render_effects),rh(f.effects),this.#l?.resolve()),Qt=null}#s(u,f){u.f^=Pt;for(var m=u.first;m!==null;){var b=m.f,w=(b&(Hr|on))!==0,d=w&&(b&Pt)!==0,y=d||(b&Jt)!==0||this.skipped_effects.has(m);if((m.f&Qs)!==0&&m.b?.is_pending()&&(f={parent:f,effect:m,effects:[],render_effects:[]}),!y&&m.fn!==null){w?m.f^=Pt:(b&ll)!==0?f.effects.push(m):Lo(m)&&((m.f&zr)!==0&&this.#o.add(m),Ao(m));var i=m.first;if(i!==null){m=i;continue}}var h=m.parent;for(m=m.next;m===null&&h!==null;)h===f.effect&&(this.#a(f.effects),this.#a(f.render_effects),f=f.parent),m=h.next,h=h.parent}}#a(u){for(const f of u)(f.f&Vt)!==0?this.#o.add(f):(f.f&jr)!==0&&this.#i.add(f),this.#u(f.deps),Tt(f,Pt)}#u(u){if(u!==null)for(const f of u)(f.f&kt)===0||(f.f&zn)===0||(f.f^=zn,this.#u(f.deps))}capture(u,f){this.previous.has(u)||this.previous.set(u,f),(u.f&an)===0&&(this.current.set(u,u.v),Qt?.set(u,u.v))}activate(){ct=this,this.apply()}deactivate(){ct===this&&(ct=null,Qt=null)}flush(){if(this.activate(),Xt.length>0){if(th(),ct!==null&&ct!==this)return}else this.#r===0&&this.process([]);this.deactivate()}discard(){for(const u of this.#e)u(this);this.#e.clear()}#c(){if(this.#n===0){for(const u of this.#t)u();this.#t.clear()}this.#r===0&&this.#d()}#d(){if(oa.size>1){this.previous.clear();var u=Qt,f=!0,m={parent:null,effect:null,effects:[],render_effects:[]};for(const w of oa){if(w===this){f=!1;continue}const d=[];for(const[i,h]of this.current){if(w.current.has(i))if(f&&h!==w.current.get(i))w.current.set(i,h);else continue;d.push(i)}if(d.length===0)continue;const y=[...w.current.keys()].filter(i=>!this.current.has(i));if(y.length>0){var b=Xt;Xt=[];const i=new Set,h=new Map;for(const p of d)nh(p,y,i,h);if(Xt.length>0){ct=w,w.apply();for(const p of Xt)w.#s(p,m);w.deactivate()}Xt=b}}ct=null,Qt=u}this.committed=!0,oa.delete(this)}increment(u){this.#r+=1,u&&(this.#n+=1)}decrement(u){this.#r-=1,u&&(this.#n-=1),this.revive()}revive(){for(const u of this.#o)this.#i.delete(u),Tt(u,Vt),Un(u);for(const u of this.#i)Tt(u,jr),Un(u);this.flush()}oncommit(u){this.#t.add(u)}ondiscard(u){this.#e.add(u)}settled(){return(this.#l??=Ud()).promise}static ensure(){if(ct===null){const u=ct=new sr;oa.add(ct),Co||sr.enqueue(()=>{ct===u&&u.flush()})}return ct}static enqueue(u){ia(u)}apply(){}}function Ci(s){var u=Co;Co=!0;try{for(var f;;){if(gv(),Xt.length===0&&(ct?.flush(),Xt.length===0))return sa=null,f;th()}}finally{Co=u}}function th(){var s=Zn;pl=!0;var u=null;try{var f=0;for(ua(!0);Xt.length>0;){var m=sr.ensure();if(f++>1e3){var b,w;_v()}m.process(Xt),ln.clear()}}finally{pl=!1,ua(s),sa=null}}function _v(){try{lv()}catch(s){xi(s,sa)}}let Jr=null;function rh(s){var u=s.length;if(u!==0){for(var f=0;f<u;){var m=s[f++];if((m.f&(Ur|Jt))===0&&Lo(m)&&(Jr=new Set,Ao(m),m.deps===null&&m.first===null&&m.nodes===null&&(m.teardown===null&&m.ac===null?kh(m):m.fn=null),Jr?.size>0)){ln.clear();for(const b of Jr){if((b.f&(Ur|Jt))!==0)continue;const w=[b];let d=b.parent;for(;d!==null;)Jr.has(d)&&(Jr.delete(d),w.push(d)),d=d.parent;for(let y=w.length-1;y>=0;y--){const i=w[y];(i.f&(Ur|Jt))===0&&Ao(i)}}Jr.clear()}}Jr=null}}function nh(s,u,f,m){if(!f.has(s)&&(f.add(s),s.reactions!==null))for(const b of s.reactions){const w=b.f;(w&kt)!==0?nh(b,u,f,m):(w&(dl|zr))!==0&&(w&Vt)===0&&ih(b,u,m)&&(Tt(b,Vt),Un(b))}}function ih(s,u,f){const m=f.get(s);if(m!==void 0)return m;if(s.deps!==null)for(const b of s.deps){if(u.includes(b))return!0;if((b.f&kt)!==0&&ih(b,u,f))return f.set(b,!0),!0}return f.set(s,!1),!1}function Un(s){for(var u=sa=s;u.parent!==null;){u=u.parent;var f=u.f;if(pl&&u===Xe&&(f&zr)!==0&&(f&Jd)===0)return;if((f&(on|Hr))!==0){if((f&Pt)===0)return;u.f^=Pt}}Xt.push(u)}function wv(s){let u=0,f=Gn(0),m;return()=>{To()&&(qe(f),gl(()=>(u===0&&(m=da(()=>s(()=>Po(f)))),u+=1,()=>{ia(()=>{u-=1,u===0&&(m?.(),m=void 0,Po(f))})})))}}var kv=ji|Vn|Qs;function jv(s,u,f){new Ov(s,u,f)}class Ov{parent;#t=!1;#e;#r=it?Qe:null;#n;#l;#o;#i=null;#s=null;#a=null;#u=null;#c=null;#d=0;#h=0;#p=!1;#f=null;#g=wv(()=>(this.#f=Gn(this.#d),()=>{this.#f=null}));constructor(u,f,m){this.#e=u,this.#n=f,this.#l=m,this.parent=Xe.b,this.#t=!!this.#n.pending,this.#o=wl(()=>{if(Xe.b=this,it){const w=this.#r;ra(),w.nodeType===Ei&&w.data===Ks?this.#w():this.#_()}else{var b=this.#v();try{this.#i=er(()=>m(b))}catch(w){this.error(w)}this.#h>0?this.#y():this.#t=!1}return()=>{this.#c?.remove()}},kv),it&&(this.#e=Qe)}#_(){try{this.#i=er(()=>this.#l(this.#e))}catch(u){this.error(u)}this.#t=!1}#w(){const u=this.#n.pending;u&&(this.#s=er(()=>u(this.#e)),sr.enqueue(()=>{var f=this.#v();this.#i=this.#m(()=>(sr.ensure(),er(()=>this.#l(f)))),this.#h>0?this.#y():(Wn(this.#s,()=>{this.#s=null}),this.#t=!1)}))}#v(){var u=this.#e;return this.#t&&(this.#c=Ht(),this.#e.before(this.#c),u=this.#c),u}is_pending(){return this.#t||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#n.pending}#m(u){var f=Xe,m=Ke,b=Kt;Cr(this.#o),Ut(this.#o),Si(this.#o.ctx);try{return u()}catch(w){return eh(w),null}finally{Cr(f),Ut(m),Si(b)}}#y(){const u=this.#n.pending;this.#i!==null&&(this.#u=document.createDocumentFragment(),this.#u.append(this.#c),Eh(this.#i,this.#u)),this.#s===null&&(this.#s=er(()=>u(this.#e)))}#b(u){if(!this.has_pending_snippet()){this.parent&&this.parent.#b(u);return}this.#h+=u,this.#h===0&&(this.#t=!1,this.#s&&Wn(this.#s,()=>{this.#s=null}),this.#u&&(this.#e.before(this.#u),this.#u=null))}update_pending_count(u){this.#b(u),this.#d+=u,this.#f&&Pi(this.#f,this.#d)}get_effect_pending(){return this.#g(),qe(this.#f)}error(u){var f=this.#n.onerror;let m=this.#n.failed;if(this.#p||!f&&!m)throw u;this.#i&&($t(this.#i),this.#i=null),this.#s&&($t(this.#s),this.#s=null),this.#a&&($t(this.#a),this.#a=null),it&&(At(this.#r),yv(),At(na()));var b=!1,w=!1;const d=()=>{if(b){mv();return}b=!0,w&&pv(),sr.ensure(),this.#d=0,this.#a!==null&&Wn(this.#a,()=>{this.#a=null}),this.#t=this.has_pending_snippet(),this.#i=this.#m(()=>(this.#p=!1,er(()=>this.#l(this.#e)))),this.#h>0?this.#y():this.#t=!1};var y=Ke;try{Ut(null),w=!0,f?.(u,d),w=!1}catch(i){xi(i,this.#o&&this.#o.parent)}finally{Ut(y)}m&&ia(()=>{this.#a=this.#m(()=>{sr.ensure(),this.#p=!0;try{return er(()=>{m(this.#e,()=>u,()=>d)})}catch(i){return xi(i,this.#o.parent),null}finally{this.#p=!1}})})}}function Ev(s,u,f,m){const b=ml;if(f.length===0&&s.length===0){m(u.map(b));return}var w=ct,d=Xe,y=Sv();function i(){Promise.all(f.map(h=>xv(h))).then(h=>{y();try{m([...u.map(b),...h])}catch(p){(d.f&Ur)===0&&xi(p,d)}w?.deactivate(),aa()}).catch(h=>{xi(h,d)})}s.length>0?Promise.all(s).then(()=>{y();try{return i()}finally{w?.deactivate(),aa()}}):i()}function Sv(){var s=Xe,u=Ke,f=Kt,m=ct;return function(w=!0){Cr(s),Ut(u),Si(f),w&&m?.activate()}}function aa(){Cr(null),Ut(null),Si(null)}function ml(s){var u=kt|Vt,f=Ke!==null&&(Ke.f&kt)!==0?Ke:null;return Xe!==null&&(Xe.f|=Vn),{ctx:Kt,deps:null,effects:null,equals:Zd,f:u,fn:s,reactions:null,rv:0,v:Ct,wv:0,parent:f??Xe,ac:null}}function xv(s,u){let f=Xe;f===null&&iv();var m=f.b,b=void 0,w=Gn(Ct),d=!Ke,y=new Map;return Nv(()=>{var i=Ud();b=i.promise;try{Promise.resolve(s()).then(i.resolve,i.reject).then(()=>{h===ct&&h.committed&&h.deactivate(),aa()})}catch(v){i.reject(v),aa()}var h=ct;if(d){var p=!m.is_pending();m.update_pending_count(1),h.increment(p),y.get(h)?.reject(Oi),y.delete(h),y.set(h,i)}const g=(v,j=void 0)=>{if(h.activate(),j)j!==Oi&&(w.f|=an,Pi(w,j));else{(w.f&an)!==0&&(w.f^=an),Pi(w,v);for(const[k,E]of y){if(y.delete(k),k===h)break;E.reject(Oi)}}d&&(m.update_pending_count(-1),h.decrement(p))};i.promise.then(g,v=>g(null,v||"unknown"))}),Lv(()=>{for(const i of y.values())i.reject(Oi)}),new Promise(i=>{function h(p){function g(){p===b?i(w):h(b)}p.then(g,g)}h(b)})}function oh(s){const u=ml(s);return u.equals=Yd,u}function sh(s){var u=s.effects;if(u!==null){s.effects=null;for(var f=0;f<u.length;f+=1)$t(u[f])}}function Cv(s){for(var u=s.parent;u!==null;){if((u.f&kt)===0)return(u.f&Ur)===0?u:null;u=u.parent}return null}function yl(s){var u,f=Xe;Cr(Cv(s));try{s.f&=~zn,sh(s),u=Rh(s)}finally{Cr(f)}return u}function ah(s){var u=yl(s);if(s.equals(u)||(ct?.is_fork||(s.v=u),s.wv=Ph()),!Yn)if(Qt!==null)(To()||ct?.is_fork)&&Qt.set(s,u);else{var f=(s.f&or)===0?jr:Pt;Tt(s,f)}}let vl=new Set;const ln=new Map;let lh=!1;function Gn(s,u){var f={f:0,v:s,reactions:null,equals:Zd,rv:0,wv:0};return f}function zt(s,u){const f=Gn(s);return Fv(f),f}function uh(s,u=!1,f=!0){const m=Gn(s);return u||(m.equals=Yd),m}function vt(s,u,f=!1){Ke!==null&&(!xr||(Ke.f&Gd)!==0)&&Qd()&&(Ke.f&(kt|zr|dl|Gd))!==0&&!Kr?.includes(s)&&fv();let m=f?Jn(u):u;return Pi(s,m)}function Pi(s,u){if(!s.equals(u)){var f=s.v;Yn?ln.set(s,u):ln.set(s,f),s.v=u;var m=sr.ensure();m.capture(s,f),(s.f&kt)!==0&&((s.f&Vt)!==0&&yl(s),Tt(s,(s.f&or)!==0?Pt:jr)),s.wv=Ph(),ch(s,Vt),Xe!==null&&(Xe.f&Pt)!==0&&(Xe.f&(Hr|on))===0&&(tr===null?Mv([s]):tr.push(s)),!m.is_fork&&vl.size>0&&!lh&&Pv()}return u}function Pv(){lh=!1;var s=Zn;ua(!0);const u=Array.from(vl);try{for(const f of u)(f.f&Pt)!==0&&Tt(f,jr),Lo(f)&&Ao(f)}finally{ua(s)}vl.clear()}function Po(s){vt(s,s.v+1)}function ch(s,u){var f=s.reactions;if(f!==null)for(var m=f.length,b=0;b<m;b++){var w=f[b],d=w.f,y=(d&Vt)===0;if(y&&Tt(w,u),(d&kt)!==0){var i=w;Qt?.delete(i),(d&zn)===0&&(d&or&&(w.f|=zn),ch(i,jr))}else y&&((d&zr)!==0&&Jr!==null&&Jr.add(w),Un(w))}}function Jn(s){if(typeof s!="object"||s===null||xo in s)return s;const u=Xy(s);if(u!==Yy&&u!==Qy)return s;var f=new Map,m=zd(s),b=zt(0),w=Qn,d=y=>{if(Qn===w)return y();var i=Ke,h=Qn;Ut(null),Ch(w);var p=y();return Ut(i),Ch(h),p};return m&&f.set("length",zt(s.length)),new Proxy(s,{defineProperty(y,i,h){(!("value"in h)||h.configurable===!1||h.enumerable===!1||h.writable===!1)&&dv();var p=f.get(i);return p===void 0?p=d(()=>{var g=zt(h.value);return f.set(i,g),g}):vt(p,h.value,!0),!0},deleteProperty(y,i){var h=f.get(i);if(h===void 0){if(i in y){const p=d(()=>zt(Ct));f.set(i,p),Po(b)}}else vt(h,Ct),Po(b);return!0},get(y,i,h){if(i===xo)return s;var p=f.get(i),g=i in y;if(p===void 0&&(!g||qn(y,i)?.writable)&&(p=d(()=>{var j=Jn(g?y[i]:Ct),k=zt(j);return k}),f.set(i,p)),p!==void 0){var v=qe(p);return v===Ct?void 0:v}return Reflect.get(y,i,h)},getOwnPropertyDescriptor(y,i){var h=Reflect.getOwnPropertyDescriptor(y,i);if(h&&"value"in h){var p=f.get(i);p&&(h.value=qe(p))}else if(h===void 0){var g=f.get(i),v=g?.v;if(g!==void 0&&v!==Ct)return{enumerable:!0,configurable:!0,value:v,writable:!0}}return h},has(y,i){if(i===xo)return!0;var h=f.get(i),p=h!==void 0&&h.v!==Ct||Reflect.has(y,i);if(h!==void 0||Xe!==null&&(!p||qn(y,i)?.writable)){h===void 0&&(h=d(()=>{var v=p?Jn(y[i]):Ct,j=zt(v);return j}),f.set(i,h));var g=qe(h);if(g===Ct)return!1}return p},set(y,i,h,p){var g=f.get(i),v=i in y;if(m&&i==="length")for(var j=h;j<g.v;j+=1){var k=f.get(j+"");k!==void 0?vt(k,Ct):j in y&&(k=d(()=>zt(Ct)),f.set(j+"",k))}if(g===void 0)(!v||qn(y,i)?.writable)&&(g=d(()=>zt(void 0)),vt(g,Jn(h)),f.set(i,g));else{v=g.v!==Ct;var E=d(()=>Jn(h));vt(g,E)}var O=Reflect.getOwnPropertyDescriptor(y,i);if(O?.set&&O.set.call(p,h),!v){if(m&&typeof i=="string"){var x=f.get("length"),S=Number(i);Number.isInteger(S)&&S>=x.v&&vt(x,S+1)}Po(b)}return!0},ownKeys(y){qe(b);var i=Reflect.ownKeys(y).filter(g=>{var v=f.get(g);return v===void 0||v.v!==Ct});for(var[h,p]of f)p.v!==Ct&&!(h in y)&&i.push(h);return i},setPrototypeOf(){hv()}})}var dh,hh,fh,ph;function bl(){if(dh===void 0){dh=window,hh=/Firefox/.test(navigator.userAgent);var s=Element.prototype,u=Node.prototype,f=Text.prototype;fh=qn(u,"firstChild").get,ph=qn(u,"nextSibling").get,Hd(s)&&(s.__click=void 0,s.__className=void 0,s.__attributes=null,s.__style=void 0,s.__e=void 0),Hd(f)&&(f.__t=void 0)}}function Ht(s=""){return document.createTextNode(s)}function Kn(s){return fh.call(s)}function Er(s){return ph.call(s)}function un(s,u){if(!it)return Kn(s);var f=Kn(Qe);if(f===null)f=Qe.appendChild(Ht());else if(u&&f.nodeType!==ea){var m=Ht();return f?.before(m),At(m),m}return At(f),f}function la(s,u=!1){if(!it){var f=Kn(s);return f instanceof Comment&&f.data===""?Er(f):f}if(u&&Qe?.nodeType!==ea){var m=Ht();return Qe?.before(m),At(m),m}return Qe}function cn(s,u=1,f=!1){let m=it?Qe:s;for(var b;u--;)b=m,m=Er(m);if(!it)return m;if(f&&m?.nodeType!==ea){var w=Ht();return m===null?b?.after(w):m.before(w),At(w),w}return At(m),m}function mh(s){s.textContent=""}function yh(){return!1}function vh(s){var u=Ke,f=Xe;Ut(null),Cr(null);try{return s()}finally{Ut(u),Cr(f)}}function Tv(s){Xe===null&&(Ke===null&&av(),sv()),Yn&&ov()}function Rv(s,u){var f=u.last;f===null?u.last=u.first=s:(f.next=s,s.prev=f,u.last=s)}function Sr(s,u,f){var m=Xe;m!==null&&(m.f&Jt)!==0&&(s|=Jt);var b={ctx:Kt,deps:null,nodes:null,f:s|Vt|or,first:null,fn:u,last:null,next:null,parent:m,b:m&&m.b,prev:null,teardown:null,wv:0,ac:null};if(f)try{Ao(b),b.f|=Xs}catch(y){throw $t(b),y}else u!==null&&Un(b);var w=b;if(f&&w.deps===null&&w.teardown===null&&w.nodes===null&&w.first===w.last&&(w.f&Vn)===0&&(w=w.first,(s&zr)!==0&&(s&ji)!==0&&w!==null&&(w.f|=ji)),w!==null&&(w.parent=m,m!==null&&Rv(w,m),Ke!==null&&(Ke.f&kt)!==0&&(s&on)===0)){var d=Ke;(d.effects??=[]).push(w)}return b}function To(){return Ke!==null&&!xr}function Lv(s){const u=Sr(ul,null,!1);return Tt(u,Pt),u.teardown=s,u}function Av(s){Tv();var u=Xe.f,f=!Ke&&(u&Hr)!==0&&(u&Xs)===0;if(f){var m=Kt;(m.e??=[]).push(s)}else return bh(s)}function bh(s){return Sr(ll|rv,s,!1)}function $v(s){sr.ensure();const u=Sr(on|Vn,s,!0);return()=>{$t(u)}}function Iv(s){sr.ensure();const u=Sr(on|Vn,s,!0);return(f={})=>new Promise(m=>{f.outro?Wn(u,()=>{$t(u),m(void 0)}):($t(u),m(void 0))})}function gh(s){return Sr(ll,s,!1)}function Nv(s){return Sr(dl|Vn,s,!0)}function gl(s,u=0){return Sr(ul|u,s,!0)}function _l(s,u=[],f=[],m=[]){Ev(m,u,f,b=>{Sr(ul,()=>s(...b.map(qe)),!0)})}function wl(s,u=0){var f=Sr(zr|u,s,!0);return f}function er(s){return Sr(Hr|Vn,s,!0)}function _h(s){var u=s.teardown;if(u!==null){const f=Yn,m=Ke;Sh(!0),Ut(null);try{u.call(null)}finally{Sh(f),Ut(m)}}}function wh(s,u=!1){var f=s.first;for(s.first=s.last=null;f!==null;){const b=f.ac;b!==null&&vh(()=>{b.abort(Oi)});var m=f.next;(f.f&on)!==0?f.parent=null:$t(f,u),f=m}}function Dv(s){for(var u=s.first;u!==null;){var f=u.next;(u.f&Hr)===0&&$t(u),u=f}}function $t(s,u=!0){var f=!1;(u||(s.f&Jd)!==0)&&s.nodes!==null&&s.nodes.end!==null&&(Bv(s.nodes.start,s.nodes.end),f=!0),wh(s,u&&!f),ca(s,0),Tt(s,Ur);var m=s.nodes&&s.nodes.t;if(m!==null)for(const w of m)w.stop();_h(s);var b=s.parent;b!==null&&b.first!==null&&kh(s),s.next=s.prev=s.teardown=s.ctx=s.deps=s.fn=s.nodes=s.ac=null}function Bv(s,u){for(;s!==null;){var f=s===u?null:Er(s);s.remove(),s=f}}function kh(s){var u=s.parent,f=s.prev,m=s.next;f!==null&&(f.next=m),m!==null&&(m.prev=f),u!==null&&(u.first===s&&(u.first=m),u.last===s&&(u.last=f))}function Wn(s,u,f=!0){var m=[];jh(s,m,!0);var b=()=>{f&&$t(s),u&&u()},w=m.length;if(w>0){var d=()=>--w||b();for(var y of m)y.out(d)}else b()}function jh(s,u,f){if((s.f&Jt)===0){s.f^=Jt;var m=s.nodes&&s.nodes.t;if(m!==null)for(const y of m)(y.is_global||f)&&u.push(y);for(var b=s.first;b!==null;){var w=b.next,d=(b.f&ji)!==0||(b.f&Hr)!==0&&(s.f&zr)!==0;jh(b,u,d?f:!1),b=w}}}function kl(s){Oh(s,!0)}function Oh(s,u){if((s.f&Jt)!==0){s.f^=Jt,(s.f&Pt)===0&&(Tt(s,Vt),Un(s));for(var f=s.first;f!==null;){var m=f.next,b=(f.f&ji)!==0||(f.f&Hr)!==0;Oh(f,b?u:!1),f=m}var w=s.nodes&&s.nodes.t;if(w!==null)for(const d of w)(d.is_global||u)&&d.in()}}function Eh(s,u){if(s.nodes)for(var f=s.nodes.start,m=s.nodes.end;f!==null;){var b=f===m?null:Er(f);u.append(f),f=b}}let Zn=!1;function ua(s){Zn=s}let Yn=!1;function Sh(s){Yn=s}let Ke=null,xr=!1;function Ut(s){Ke=s}let Xe=null;function Cr(s){Xe=s}let Kr=null;function Fv(s){Ke!==null&&(Kr===null?Kr=[s]:Kr.push(s))}let It=null,Wt=0,tr=null;function Mv(s){tr=s}let xh=1,Ro=0,Qn=Ro;function Ch(s){Qn=s}function Ph(){return++xh}function Lo(s){var u=s.f;if((u&Vt)!==0)return!0;if(u&kt&&(s.f&=~zn),(u&jr)!==0){var f=s.deps;if(f!==null)for(var m=f.length,b=0;b<m;b++){var w=f[b];if(Lo(w)&&ah(w),w.wv>s.wv)return!0}(u&or)!==0&&Qt===null&&Tt(s,Pt)}return!1}function Th(s,u,f=!0){var m=s.reactions;if(m!==null&&!Kr?.includes(s))for(var b=0;b<m.length;b++){var w=m[b];(w.f&kt)!==0?Th(w,u,!1):u===w&&(f?Tt(w,Vt):(w.f&Pt)!==0&&Tt(w,jr),Un(w))}}function Rh(s){var u=It,f=Wt,m=tr,b=Ke,w=Kr,d=Kt,y=xr,i=Qn,h=s.f;It=null,Wt=0,tr=null,Ke=(h&(Hr|on))===0?s:null,Kr=null,Si(s.ctx),xr=!1,Qn=++Ro,s.ac!==null&&(vh(()=>{s.ac.abort(Oi)}),s.ac=null);try{s.f|=cl;var p=s.fn,g=p(),v=s.deps;if(It!==null){var j;if(ca(s,Wt),v!==null&&Wt>0)for(v.length=Wt+It.length,j=0;j<It.length;j++)v[Wt+j]=It[j];else s.deps=v=It;if(To()&&(s.f&or)!==0)for(j=Wt;j<v.length;j++)(v[j].reactions??=[]).push(s)}else v!==null&&Wt<v.length&&(ca(s,Wt),v.length=Wt);if(Qd()&&tr!==null&&!xr&&v!==null&&(s.f&(kt|jr|Vt))===0)for(j=0;j<tr.length;j++)Th(tr[j],s);return b!==null&&b!==s&&(Ro++,tr!==null&&(m===null?m=tr:m.push(...tr))),(s.f&an)!==0&&(s.f^=an),g}catch(k){return eh(k)}finally{s.f^=cl,It=u,Wt=f,tr=m,Ke=b,Kr=w,Si(d),xr=y,Qn=i}}function qv(s,u){let f=u.reactions;if(f!==null){var m=Zy.call(f,s);if(m!==-1){var b=f.length-1;b===0?f=u.reactions=null:(f[m]=f[b],f.pop())}}f===null&&(u.f&kt)!==0&&(It===null||!It.includes(u))&&(Tt(u,jr),(u.f&or)!==0&&(u.f^=or,u.f&=~zn),sh(u),ca(u,0))}function ca(s,u){var f=s.deps;if(f!==null)for(var m=u;m<f.length;m++)qv(s,f[m])}function Ao(s){var u=s.f;if((u&Ur)===0){Tt(s,Pt);var f=Xe,m=Zn;Xe=s,Zn=!0;try{(u&(zr|tv))!==0?Dv(s):wh(s),_h(s);var b=Rh(s);s.teardown=typeof b=="function"?b:null,s.wv=xh;var w;al&&bv&&(s.f&Vt)!==0&&s.deps}finally{Zn=m,Xe=f}}}function qe(s){var u=s.f,f=(u&kt)!==0;if(Ke!==null&&!xr){var m=Xe!==null&&(Xe.f&Ur)!==0;if(!m&&!Kr?.includes(s)){var b=Ke.deps;if((Ke.f&cl)!==0)s.rv<Ro&&(s.rv=Ro,It===null&&b!==null&&b[Wt]===s?Wt++:It===null?It=[s]:It.includes(s)||It.push(s));else{(Ke.deps??=[]).push(s);var w=s.reactions;w===null?s.reactions=[Ke]:w.includes(Ke)||w.push(Ke)}}}if(Yn){if(ln.has(s))return ln.get(s);if(f){var d=s,y=d.v;return((d.f&Pt)===0&&d.reactions!==null||Ah(d))&&(y=yl(d)),ln.set(d,y),y}}else f&&(!Qt?.has(s)||ct?.is_fork&&!To())&&(d=s,Lo(d)&&ah(d),Zn&&To()&&(d.f&or)===0&&Lh(d));if(Qt?.has(s))return Qt.get(s);if((s.f&an)!==0)throw s.v;return s.v}function Lh(s){if(s.deps!==null){s.f^=or;for(const u of s.deps)(u.reactions??=[]).push(s),(u.f&kt)!==0&&(u.f&or)===0&&Lh(u)}}function Ah(s){if(s.v===Ct)return!0;if(s.deps===null)return!1;for(const u of s.deps)if(ln.has(u)||(u.f&kt)!==0&&Ah(u))return!0;return!1}function da(s){var u=xr;try{return xr=!0,s()}finally{xr=u}}const Vv=-7169;function Tt(s,u){s.f=s.f&Vv|u}const $h=new Set,jl=new Set;function zv(s){for(var u=0;u<s.length;u++)$h.add(s[u]);for(var f of jl)f(s)}let Ih=null;function ha(s){var u=this,f=u.ownerDocument,m=s.type,b=s.composedPath?.()||[],w=b[0]||s.target;Ih=s;var d=0,y=Ih===s&&s.__root;if(y){var i=b.indexOf(y);if(i!==-1&&(u===document||u===window)){s.__root=u;return}var h=b.indexOf(u);if(h===-1)return;i<=h&&(d=i)}if(w=b[d]||s.target,w!==u){Ys(s,"currentTarget",{configurable:!0,get(){return w||f}});var p=Ke,g=Xe;Ut(null),Cr(null);try{for(var v,j=[];w!==null;){var k=w.assignedSlot||w.parentNode||w.host||null;try{var E=w["__"+m];E!=null&&(!w.disabled||s.target===w)&&E.call(w,s)}catch(O){v?j.push(O):v=O}if(s.cancelBubble||k===u||k===null)break;w=k}if(v){for(let O of j)queueMicrotask(()=>{throw O});throw v}}finally{s.__root=u,delete s.currentTarget,Ut(p),Cr(g)}}}function Hv(s){var u=document.createElement("template");return u.innerHTML=s.replaceAll("<!>","<!---->"),u.content}function dn(s,u){var f=Xe;f.nodes===null&&(f.nodes={start:s,end:u,a:null,t:null})}function hn(s,u){var f=(u&Ky)!==0,m=(u&Wy)!==0,b,w=!s.startsWith("<!>");return()=>{if(it)return dn(Qe,null),Qe;b===void 0&&(b=Hv(w?s:"<!>"+s),f||(b=Kn(b)));var d=m||hh?document.importNode(b,!0):b.cloneNode(!0);if(f){var y=Kn(d),i=d.lastChild;dn(y,i)}else dn(d,d);return d}}function Uv(s=""){if(!it){var u=Ht(s+"");return dn(u,u),u}var f=Qe;return f.nodeType!==ea&&(f.before(f=Ht()),At(f)),dn(f,f),f}function Gv(){if(it)return dn(Qe,null),Qe;var s=document.createDocumentFragment(),u=document.createComment(""),f=Ht();return s.append(u,f),dn(u,f),s}function ar(s,u){if(it){var f=Xe;((f.f&Xs)===0||f.nodes.end===null)&&(f.nodes.end=Qe),ra();return}s!==null&&s.before(u)}const Jv=["touchstart","touchmove"];function Kv(s){return Jv.includes(s)}function fa(s,u){var f=u==null?"":typeof u=="object"?u+"":u;f!==(s.__t??=s.nodeValue)&&(s.__t=f,s.nodeValue=f+"")}function Nh(s,u){return Dh(s,u)}function Wv(s,u){bl(),u.intro=u.intro??!1;const f=u.target,m=it,b=Qe;try{for(var w=Kn(f);w&&(w.nodeType!==Ei||w.data!==Vd);)w=Er(w);if(!w)throw ki;Gr(!0),At(w);const d=Dh(s,{...u,anchor:w});return Gr(!1),d}catch(d){if(d instanceof Error&&d.message.split(`
15
+ `).some(y=>y.startsWith("https://svelte.dev/e/")))throw d;return d!==ki&&console.warn("Failed to hydrate: ",d),u.recover===!1&&uv(),bl(),mh(f),Gr(!1),Nh(s,u)}finally{Gr(m),At(b)}}const Ti=new Map;function Dh(s,{target:u,anchor:f,props:m={},events:b,context:w,intro:d=!0}){bl();var y=new Set,i=g=>{for(var v=0;v<g.length;v++){var j=g[v];if(!y.has(j)){y.add(j);var k=Kv(j);u.addEventListener(j,ha,{passive:k});var E=Ti.get(j);E===void 0?(document.addEventListener(j,ha,{passive:k}),Ti.set(j,1)):Ti.set(j,E+1)}}};i(Ws($h)),jl.add(i);var h=void 0,p=Iv(()=>{var g=f??u.appendChild(Ht());return jv(g,{pending:()=>{}},v=>{if(w){hl({});var j=Kt;j.c=w}if(b&&(m.$$events=b),it&&dn(v,null),h=s(v,m)||{},it&&(Xe.nodes.end=Qe,Qe===null||Qe.nodeType!==Ei||Qe.data!==sl))throw ta(),ki;w&&fl()}),()=>{for(var v of y){u.removeEventListener(v,ha);var j=Ti.get(v);--j===0?(document.removeEventListener(v,ha),Ti.delete(v)):Ti.set(v,j)}jl.delete(i),g!==f&&g.parentNode?.removeChild(g)}});return Ol.set(h,p),h}let Ol=new WeakMap;function Zv(s,u){const f=Ol.get(s);return f?(Ol.delete(s),f(u)):Promise.resolve()}class Yv{anchor;#t=new Map;#e=new Map;#r=new Map;#n=new Set;#l=!0;constructor(u,f=!0){this.anchor=u,this.#l=f}#o=()=>{var u=ct;if(this.#t.has(u)){var f=this.#t.get(u),m=this.#e.get(f);if(m)kl(m),this.#n.delete(f);else{var b=this.#r.get(f);b&&(this.#e.set(f,b.effect),this.#r.delete(f),b.fragment.lastChild.remove(),this.anchor.before(b.fragment),m=b.effect)}for(const[w,d]of this.#t){if(this.#t.delete(w),w===u)break;const y=this.#r.get(d);y&&($t(y.effect),this.#r.delete(d))}for(const[w,d]of this.#e){if(w===f||this.#n.has(w))continue;const y=()=>{if(Array.from(this.#t.values()).includes(w)){var h=document.createDocumentFragment();Eh(d,h),h.append(Ht()),this.#r.set(w,{effect:d,fragment:h})}else $t(d);this.#n.delete(w),this.#e.delete(w)};this.#l||!m?(this.#n.add(w),Wn(d,y,!1)):y()}}};#i=u=>{this.#t.delete(u);const f=Array.from(this.#t.values());for(const[m,b]of this.#r)f.includes(m)||($t(b.effect),this.#r.delete(m))};ensure(u,f){var m=ct,b=yh();if(f&&!this.#e.has(u)&&!this.#r.has(u))if(b){var w=document.createDocumentFragment(),d=Ht();w.append(d),this.#r.set(u,{effect:er(()=>f(d)),fragment:w})}else this.#e.set(u,er(()=>f(this.anchor)));if(this.#t.set(m,u),b){for(const[y,i]of this.#e)y===u?m.skipped_effects.delete(i):m.skipped_effects.add(i);for(const[y,i]of this.#r)y===u?m.skipped_effects.delete(i.effect):m.skipped_effects.add(i.effect);m.oncommit(this.#o),m.ondiscard(this.#i)}else it&&(this.anchor=Qe),this.#o()}}function Bh(s){Kt===null&&nv(),Av(()=>{const u=da(s);if(typeof u=="function")return u})}function El(s,u,f=!1){it&&ra();var m=new Yv(s),b=f?ji:0;function w(d,y){if(it){const h=Wd(s)===Ks;if(d===h){var i=na();At(i),m.anchor=i,Gr(!1),m.ensure(d,y),Gr(!0);return}}m.ensure(d,y)}wl(()=>{var d=!1;u((y,i=!0)=>{d=!0,w(i,y)}),d||w(!1,null)},b)}function Fh(s,u){return u}function Qv(s,u,f){for(var m=[],b=u.length,w,d=u.length,y=0;y<b;y++){let g=u[y];Wn(g,()=>{if(w){if(w.pending.delete(g),w.done.add(g),w.pending.size===0){var v=s.outrogroups;Sl(Ws(w.done)),v.delete(w),v.size===0&&(s.outrogroups=null)}}else d-=1},!1)}if(d===0){var i=m.length===0&&f!==null;if(i){var h=f,p=h.parentNode;mh(p),p.append(h),s.items.clear()}Sl(u,!i)}else w={pending:new Set(u),done:new Set},(s.outrogroups??=new Set).add(w)}function Sl(s,u=!0){for(var f=0;f<s.length;f++)$t(s[f],u)}var Mh;function qh(s,u,f,m,b,w=null){var d=s,y=new Map;{var i=s;d=it?At(Kn(i)):i.appendChild(Ht())}it&&ra();var h=null,p=oh(()=>{var O=f();return zd(O)?O:O==null?[]:Ws(O)}),g,v=!0;function j(){E.fallback=h,Xv(E,g,d,u,m),h!==null&&(g.length===0?(h.f&sn)===0?kl(h):(h.f^=sn,$o(h,null,d)):Wn(h,()=>{h=null}))}var k=wl(()=>{g=qe(p);var O=g.length;let x=!1;if(it){var S=Wd(d)===Ks;S!==(O===0)&&(d=na(),At(d),Gr(!1),x=!0)}for(var P=new Set,L=ct,T=yh(),R=0;R<O;R+=1){it&&Qe.nodeType===Ei&&Qe.data===sl&&(d=Qe,x=!0,Gr(!1));var A=g[R],N=m(A,R),D=v?null:y.get(N);D?(D.v&&Pi(D.v,A),D.i&&Pi(D.i,R),T&&L.skipped_effects.delete(D.e)):(D=eb(y,v?d:Mh??=Ht(),A,N,R,b,u,f),v||(D.e.f|=sn),y.set(N,D)),P.add(N)}if(O===0&&w&&!h&&(v?h=er(()=>w(d)):(h=er(()=>w(Mh??=Ht())),h.f|=sn)),it&&O>0&&At(na()),!v)if(T){for(const[M,q]of y)P.has(M)||L.skipped_effects.add(q.e);L.oncommit(j),L.ondiscard(()=>{})}else j();x&&Gr(!0),qe(p)}),E={effect:k,items:y,outrogroups:null,fallback:h};v=!1,it&&(d=Qe)}function Xv(s,u,f,m,b){var w=u.length,d=s.items,y=s.effect.first,i,h=null,p=[],g=[],v,j,k,E;for(E=0;E<w;E+=1){if(v=u[E],j=b(v,E),k=d.get(j).e,s.outrogroups!==null)for(const N of s.outrogroups)N.pending.delete(k),N.done.delete(k);if((k.f&sn)!==0)if(k.f^=sn,k===y)$o(k,null,f);else{var O=h?h.next:y;k===s.effect.last&&(s.effect.last=k.prev),k.prev&&(k.prev.next=k.next),k.next&&(k.next.prev=k.prev),fn(s,h,k),fn(s,k,O),$o(k,O,f),h=k,p=[],g=[],y=h.next;continue}if((k.f&Jt)!==0&&kl(k),k!==y){if(i!==void 0&&i.has(k)){if(p.length<g.length){var x=g[0],S;h=x.prev;var P=p[0],L=p[p.length-1];for(S=0;S<p.length;S+=1)$o(p[S],x,f);for(S=0;S<g.length;S+=1)i.delete(g[S]);fn(s,P.prev,L.next),fn(s,h,P),fn(s,L,x),y=x,h=L,E-=1,p=[],g=[]}else i.delete(k),$o(k,y,f),fn(s,k.prev,k.next),fn(s,k,h===null?s.effect.first:h.next),fn(s,h,k),h=k;continue}for(p=[],g=[];y!==null&&y!==k;)(i??=new Set).add(y),g.push(y),y=y.next;if(y===null)continue}(k.f&sn)===0&&p.push(k),h=k,y=k.next}if(s.outrogroups!==null){for(const N of s.outrogroups)N.pending.size===0&&(Sl(Ws(N.done)),s.outrogroups?.delete(N));s.outrogroups.size===0&&(s.outrogroups=null)}if(y!==null||i!==void 0){var T=[];if(i!==void 0)for(k of i)(k.f&Jt)===0&&T.push(k);for(;y!==null;)(y.f&Jt)===0&&y!==s.fallback&&T.push(y),y=y.next;var R=T.length;if(R>0){var A=w===0?f:null;Qv(s,T,A)}}}function eb(s,u,f,m,b,w,d,y){var i=(d&qy)!==0?(d&zy)===0?uh(f,!1,!1):Gn(f):null,h=(d&Vy)!==0?Gn(b):null;return{v:i,i:h,e:er(()=>(w(u,i??f,h??b,y),()=>{s.delete(m)}))}}function $o(s,u,f){if(s.nodes)for(var m=s.nodes.start,b=s.nodes.end,w=u&&(u.f&sn)===0?u.nodes.start:f;m!==null;){var d=Er(m);if(w.before(m),m===b)return;m=d}}function fn(s,u,f){u===null?s.effect.first=f:u.next=f,f===null?s.effect.last=u:f.prev=u}function tb(s,u){gh(()=>{var f=s.getRootNode(),m=f.host?f:f.head??f.ownerDocument.head;if(!m.querySelector("#"+u.hash)){const b=document.createElement("style");b.id=u.hash,b.textContent=u.code,m.appendChild(b)}})}function Vh(s,u){return s===u||s?.[xo]===u}function rb(s={},u,f,m){return gh(()=>{var b,w;return gl(()=>{b=w,w=[],da(()=>{s!==f(...w)&&(u(s,...w),b&&Vh(f(...b),s)&&u(null,...b))})}),()=>{ia(()=>{w&&Vh(f(...w),s)&&u(null,...w)})}}),s}let pa=!1;function nb(s){var u=pa;try{return pa=!1,[s(),pa]}finally{pa=u}}function Io(s,u,f,m){var b=(f&Gy)!==0,w=(f&Jy)!==0,d=m,y=!0,i=()=>(y&&(y=!1,d=w?da(m):m),d),h;if(b){var p=xo in s||Kd in s;h=qn(s,u)?.set??(p&&u in s?S=>s[u]=S:void 0)}var g,v=!1;b?[g,v]=nb(()=>s[u]):g=s[u],g===void 0&&m!==void 0&&(g=i(),h&&(cv(),h(g)));var j;if(j=()=>{var S=s[u];return S===void 0?i():(y=!0,S)},(f&Uy)===0)return j;if(h){var k=s.$$legacy;return(function(S,P){return arguments.length>0?((!P||k||v)&&h(P?j():S),S):j()})}var E=!1,O=((f&Hy)!==0?ml:oh)(()=>(E=!1,j()));b&&qe(O);var x=Xe;return(function(S,P){if(arguments.length>0){const L=P?qe(O):b?Jn(S):S;return vt(O,L),E=!0,d!==void 0&&(d=L),S}return Yn&&E||(x.f&Ur)!==0?O.v:qe(O)})}function ib(s){return new ob(s)}class ob{#t;#e;constructor(u){var f=new Map,m=(w,d)=>{var y=uh(d,!1,!1);return f.set(w,y),y};const b=new Proxy({...u.props||{},$$events:{}},{get(w,d){return qe(f.get(d)??m(d,Reflect.get(w,d)))},has(w,d){return d===Kd?!0:(qe(f.get(d)??m(d,Reflect.get(w,d))),Reflect.has(w,d))},set(w,d,y){return vt(f.get(d)??m(d,y),y),Reflect.set(w,d,y)}});this.#e=(u.hydrate?Wv:Nh)(u.component,{target:u.target,anchor:u.anchor,props:b,context:u.context,intro:u.intro??!1,recover:u.recover}),(!u?.props?.$$host||u.sync===!1)&&Ci(),this.#t=b.$$events;for(const w of Object.keys(this.#e))w==="$set"||w==="$destroy"||w==="$on"||Ys(this,w,{get(){return this.#e[w]},set(d){this.#e[w]=d},enumerable:!0});this.#e.$set=w=>{Object.assign(b,w)},this.#e.$destroy=()=>{Zv(this.#e)}}$set(u){this.#e.$set(u)}$on(u,f){this.#t[u]=this.#t[u]||[];const m=(...b)=>f.call(this,...b);return this.#t[u].push(m),()=>{this.#t[u]=this.#t[u].filter(b=>b!==m)}}$destroy(){this.#e.$destroy()}}let zh;typeof HTMLElement=="function"&&(zh=class extends HTMLElement{$$ctor;$$s;$$c;$$cn=!1;$$d={};$$r=!1;$$p_d={};$$l={};$$l_u=new Map;$$me;constructor(s,u,f){super(),this.$$ctor=s,this.$$s=u,f&&this.attachShadow({mode:"open"})}addEventListener(s,u,f){if(this.$$l[s]=this.$$l[s]||[],this.$$l[s].push(u),this.$$c){const m=this.$$c.$on(s,u);this.$$l_u.set(u,m)}super.addEventListener(s,u,f)}removeEventListener(s,u,f){if(super.removeEventListener(s,u,f),this.$$c){const m=this.$$l_u.get(u);m&&(m(),this.$$l_u.delete(u))}}async connectedCallback(){if(this.$$cn=!0,!this.$$c){let s=function(m){return b=>{const w=document.createElement("slot");m!=="default"&&(w.name=m),ar(b,w)}};if(await Promise.resolve(),!this.$$cn||this.$$c)return;const u={},f=sb(this);for(const m of this.$$s)m in f&&(m==="default"&&!this.$$d.children?(this.$$d.children=s(m),u.default=!0):u[m]=s(m));for(const m of this.attributes){const b=this.$$g_p(m.name);b in this.$$d||(this.$$d[b]=ma(b,m.value,this.$$p_d,"toProp"))}for(const m in this.$$p_d)!(m in this.$$d)&&this[m]!==void 0&&(this.$$d[m]=this[m],delete this[m]);this.$$c=ib({component:this.$$ctor,target:this.shadowRoot||this,props:{...this.$$d,$$slots:u,$$host:this}}),this.$$me=$v(()=>{gl(()=>{this.$$r=!0;for(const m of Zs(this.$$c)){if(!this.$$p_d[m]?.reflect)continue;this.$$d[m]=this.$$c[m];const b=ma(m,this.$$d[m],this.$$p_d,"toAttribute");b==null?this.removeAttribute(this.$$p_d[m].attribute||m):this.setAttribute(this.$$p_d[m].attribute||m,b)}this.$$r=!1})});for(const m in this.$$l)for(const b of this.$$l[m]){const w=this.$$c.$on(m,b);this.$$l_u.set(b,w)}this.$$l={}}}attributeChangedCallback(s,u,f){this.$$r||(s=this.$$g_p(s),this.$$d[s]=ma(s,f,this.$$p_d,"toProp"),this.$$c?.$set({[s]:this.$$d[s]}))}disconnectedCallback(){this.$$cn=!1,Promise.resolve().then(()=>{!this.$$cn&&this.$$c&&(this.$$c.$destroy(),this.$$me(),this.$$c=void 0)})}$$g_p(s){return Zs(this.$$p_d).find(u=>this.$$p_d[u].attribute===s||!this.$$p_d[u].attribute&&u.toLowerCase()===s)||s}});function ma(s,u,f,m){const b=f[s]?.type;if(u=b==="Boolean"&&typeof u!="boolean"?u!=null:u,!m||!f[s])return u;if(m==="toAttribute")switch(b){case"Object":case"Array":return u==null?null:JSON.stringify(u);case"Boolean":return u?"":null;case"Number":return u??null;default:return u}else switch(b){case"Object":case"Array":return u&&JSON.parse(u);case"Boolean":return u;case"Number":return u!=null?+u:u;default:return u}}function sb(s){const u={};return s.childNodes.forEach(f=>{u[f.slot||"default"]=!0}),u}function Hh(s,u,f,m,b,w){let d=class extends zh{constructor(){super(s,f,b),this.$$p_d=u}static get observedAttributes(){return Zs(u).map(y=>(u[y].attribute||y).toLowerCase())}};return Zs(u).forEach(y=>{Ys(d.prototype,y,{get(){return this.$$c&&y in this.$$c?this.$$c[y]:this.$$d[y]},set(i){i=ma(y,i,u),this.$$d[y]=i;var h=this.$$c;if(h){var p=qn(h,y)?.get;p?h[y]=i:h.$set({[y]:i})}}})}),m.forEach(y=>{Ys(d.prototype,y,{get(){return this.$$c?.[y]}})}),s.element=d,d}var xl={exports:{}};var Uh;function ab(){return Uh||(Uh=1,(function(s,u){(function(f,m){s.exports=m()})(self,(()=>(()=>{var f={9306:(d,y,i)=>{var h=i(4901),p=i(6823),g=TypeError;d.exports=function(v){if(h(v))return v;throw new g(p(v)+" is not a function")}},5548:(d,y,i)=>{var h=i(3517),p=i(6823),g=TypeError;d.exports=function(v){if(h(v))return v;throw new g(p(v)+" is not a constructor")}},3506:(d,y,i)=>{var h=i(3925),p=String,g=TypeError;d.exports=function(v){if(h(v))return v;throw new g("Can't set "+p(v)+" as a prototype")}},6469:(d,y,i)=>{var h=i(8227),p=i(2360),g=i(4913).f,v=h("unscopables"),j=Array.prototype;j[v]===void 0&&g(j,v,{configurable:!0,value:p(null)}),d.exports=function(k){j[v][k]=!0}},7829:(d,y,i)=>{var h=i(8183).charAt;d.exports=function(p,g,v){return g+(v?h(p,g).length:1)}},679:(d,y,i)=>{var h=i(1625),p=TypeError;d.exports=function(g,v){if(h(v,g))return g;throw new p("Incorrect invocation")}},8551:(d,y,i)=>{var h=i(34),p=String,g=TypeError;d.exports=function(v){if(h(v))return v;throw new g(p(v)+" is not an object")}},235:(d,y,i)=>{var h=i(9213).forEach,p=i(4598)("forEach");d.exports=p?[].forEach:function(g){return h(this,g,arguments.length>1?arguments[1]:void 0)}},7916:(d,y,i)=>{var h=i(6080),p=i(9565),g=i(8981),v=i(6319),j=i(4209),k=i(3517),E=i(6198),O=i(4659),x=i(81),S=i(851),P=Array;d.exports=function(L){var T=g(L),R=k(this),A=arguments.length,N=A>1?arguments[1]:void 0,D=N!==void 0;D&&(N=h(N,A>2?arguments[2]:void 0));var M,q,J,G,X,le,ue=S(T),he=0;if(!ue||this===P&&j(ue))for(M=E(T),q=R?new this(M):P(M);M>he;he++)le=D?N(T[he],he):T[he],O(q,he,le);else for(q=R?new this:[],X=(G=x(T,ue)).next;!(J=p(X,G)).done;he++)le=D?v(G,N,[J.value,he],!0):J.value,O(q,he,le);return q.length=he,q}},9617:(d,y,i)=>{var h=i(5397),p=i(5610),g=i(6198),v=function(j){return function(k,E,O){var x=h(k),S=g(x);if(S===0)return!j&&-1;var P,L=p(O,S);if(j&&E!=E){for(;S>L;)if((P=x[L++])!=P)return!0}else for(;S>L;L++)if((j||L in x)&&x[L]===E)return j||L||0;return!j&&-1}};d.exports={includes:v(!0),indexOf:v(!1)}},9213:(d,y,i)=>{var h=i(6080),p=i(9504),g=i(7055),v=i(8981),j=i(6198),k=i(1469),E=p([].push),O=function(x){var S=x===1,P=x===2,L=x===3,T=x===4,R=x===6,A=x===7,N=x===5||R;return function(D,M,q,J){for(var G,X,le=v(D),ue=g(le),he=j(ue),ce=h(M,q),me=0,ie=J||k,H=S?ie(D,he):P||A?ie(D,0):void 0;he>me;me++)if((N||me in ue)&&(X=ce(G=ue[me],me,le),x))if(S)H[me]=X;else if(X)switch(x){case 3:return!0;case 5:return G;case 6:return me;case 2:E(H,G)}else switch(x){case 4:return!1;case 7:E(H,G)}return R?-1:L||T?T:H}};d.exports={forEach:O(0),map:O(1),filter:O(2),some:O(3),every:O(4),find:O(5),findIndex:O(6),filterReject:O(7)}},597:(d,y,i)=>{var h=i(9039),p=i(8227),g=i(7388),v=p("species");d.exports=function(j){return g>=51||!h((function(){var k=[];return(k.constructor={})[v]=function(){return{foo:1}},k[j](Boolean).foo!==1}))}},4598:(d,y,i)=>{var h=i(9039);d.exports=function(p,g){var v=[][p];return!!v&&h((function(){v.call(null,g||function(){return 1},1)}))}},926:(d,y,i)=>{var h=i(9306),p=i(8981),g=i(7055),v=i(6198),j=TypeError,k="Reduce of empty array with no initial value",E=function(O){return function(x,S,P,L){var T=p(x),R=g(T),A=v(T);if(h(S),A===0&&P<2)throw new j(k);var N=O?A-1:0,D=O?-1:1;if(P<2)for(;;){if(N in R){L=R[N],N+=D;break}if(N+=D,O?N<0:A<=N)throw new j(k)}for(;O?N>=0:A>N;N+=D)N in R&&(L=S(L,R[N],N,T));return L}};d.exports={left:E(!1),right:E(!0)}},4527:(d,y,i)=>{var h=i(3724),p=i(4376),g=TypeError,v=Object.getOwnPropertyDescriptor,j=h&&!(function(){if(this!==void 0)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(k){return k instanceof TypeError}})();d.exports=j?function(k,E){if(p(k)&&!v(k,"length").writable)throw new g("Cannot set read only .length");return k.length=E}:function(k,E){return k.length=E}},7680:(d,y,i)=>{var h=i(9504);d.exports=h([].slice)},4488:(d,y,i)=>{var h=i(7680),p=Math.floor,g=function(v,j){var k=v.length;if(k<8)for(var E,O,x=1;x<k;){for(O=x,E=v[x];O&&j(v[O-1],E)>0;)v[O]=v[--O];O!==x++&&(v[O]=E)}else for(var S=p(k/2),P=g(h(v,0,S),j),L=g(h(v,S),j),T=P.length,R=L.length,A=0,N=0;A<T||N<R;)v[A+N]=A<T&&N<R?j(P[A],L[N])<=0?P[A++]:L[N++]:A<T?P[A++]:L[N++];return v};d.exports=g},7433:(d,y,i)=>{var h=i(4376),p=i(3517),g=i(34),v=i(8227)("species"),j=Array;d.exports=function(k){var E;return h(k)&&(E=k.constructor,(p(E)&&(E===j||h(E.prototype))||g(E)&&(E=E[v])===null)&&(E=void 0)),E===void 0?j:E}},1469:(d,y,i)=>{var h=i(7433);d.exports=function(p,g){return new(h(p))(g===0?0:g)}},6319:(d,y,i)=>{var h=i(8551),p=i(9539);d.exports=function(g,v,j,k){try{return k?v(h(j)[0],j[1]):v(j)}catch(E){p(g,"throw",E)}}},4428:(d,y,i)=>{var h=i(8227)("iterator"),p=!1;try{var g=0,v={next:function(){return{done:!!g++}},return:function(){p=!0}};v[h]=function(){return this},Array.from(v,(function(){throw 2}))}catch{}d.exports=function(j,k){try{if(!k&&!p)return!1}catch{return!1}var E=!1;try{var O={};O[h]=function(){return{next:function(){return{done:E=!0}}}},j(O)}catch{}return E}},4576:(d,y,i)=>{var h=i(9504),p=h({}.toString),g=h("".slice);d.exports=function(v){return g(p(v),8,-1)}},6955:(d,y,i)=>{var h=i(2140),p=i(4901),g=i(4576),v=i(8227)("toStringTag"),j=Object,k=g((function(){return arguments})())==="Arguments";d.exports=h?g:function(E){var O,x,S;return E===void 0?"Undefined":E===null?"Null":typeof(x=(function(P,L){try{return P[L]}catch{}})(O=j(E),v))=="string"?x:k?g(O):(S=g(O))==="Object"&&p(O.callee)?"Arguments":S}},7740:(d,y,i)=>{var h=i(9297),p=i(5031),g=i(7347),v=i(4913);d.exports=function(j,k,E){for(var O=p(k),x=v.f,S=g.f,P=0;P<O.length;P++){var L=O[P];h(j,L)||E&&h(E,L)||x(j,L,S(k,L))}}},1436:(d,y,i)=>{var h=i(8227)("match");d.exports=function(p){var g=/./;try{"/./"[p](g)}catch{try{return g[h]=!1,"/./"[p](g)}catch{}}return!1}},2211:(d,y,i)=>{var h=i(9039);d.exports=!h((function(){function p(){}return p.prototype.constructor=null,Object.getPrototypeOf(new p)!==p.prototype}))},2529:d=>{d.exports=function(y,i){return{value:y,done:i}}},6699:(d,y,i)=>{var h=i(3724),p=i(4913),g=i(6980);d.exports=h?function(v,j,k){return p.f(v,j,g(1,k))}:function(v,j,k){return v[j]=k,v}},6980:d=>{d.exports=function(y,i){return{enumerable:!(1&y),configurable:!(2&y),writable:!(4&y),value:i}}},4659:(d,y,i)=>{var h=i(3724),p=i(4913),g=i(6980);d.exports=function(v,j,k){h?p.f(v,j,g(0,k)):v[j]=k}},380:(d,y,i)=>{var h=i(9504),p=i(9039),g=i(533).start,v=RangeError,j=isFinite,k=Math.abs,E=Date.prototype,O=E.toISOString,x=h(E.getTime),S=h(E.getUTCDate),P=h(E.getUTCFullYear),L=h(E.getUTCHours),T=h(E.getUTCMilliseconds),R=h(E.getUTCMinutes),A=h(E.getUTCMonth),N=h(E.getUTCSeconds);d.exports=p((function(){return O.call(new Date(-50000000000001))!=="0385-07-25T07:06:39.999Z"}))||!p((function(){O.call(new Date(NaN))}))?function(){if(!j(x(this)))throw new v("Invalid time value");var D=this,M=P(D),q=T(D),J=M<0?"-":M>9999?"+":"";return J+g(k(M),J?6:4,0)+"-"+g(A(D)+1,2,0)+"-"+g(S(D),2,0)+"T"+g(L(D),2,0)+":"+g(R(D),2,0)+":"+g(N(D),2,0)+"."+g(q,3,0)+"Z"}:O},3640:(d,y,i)=>{var h=i(8551),p=i(4270),g=TypeError;d.exports=function(v){if(h(this),v==="string"||v==="default")v="string";else if(v!=="number")throw new g("Incorrect hint");return p(this,v)}},2106:(d,y,i)=>{var h=i(283),p=i(4913);d.exports=function(g,v,j){return j.get&&h(j.get,v,{getter:!0}),j.set&&h(j.set,v,{setter:!0}),p.f(g,v,j)}},6840:(d,y,i)=>{var h=i(4901),p=i(4913),g=i(283),v=i(9433);d.exports=function(j,k,E,O){O||(O={});var x=O.enumerable,S=O.name!==void 0?O.name:k;if(h(E)&&g(E,S,O),O.global)x?j[k]=E:v(k,E);else{try{O.unsafe?j[k]&&(x=!0):delete j[k]}catch{}x?j[k]=E:p.f(j,k,{value:E,enumerable:!1,configurable:!O.nonConfigurable,writable:!O.nonWritable})}return j}},9433:(d,y,i)=>{var h=i(4475),p=Object.defineProperty;d.exports=function(g,v){try{p(h,g,{value:v,configurable:!0,writable:!0})}catch{h[g]=v}return v}},4606:(d,y,i)=>{var h=i(6823),p=TypeError;d.exports=function(g,v){if(!delete g[v])throw new p("Cannot delete property "+h(v)+" of "+h(g))}},3724:(d,y,i)=>{var h=i(9039);d.exports=!h((function(){return Object.defineProperty({},1,{get:function(){return 7}})[1]!==7}))},4055:(d,y,i)=>{var h=i(4475),p=i(34),g=h.document,v=p(g)&&p(g.createElement);d.exports=function(j){return v?g.createElement(j):{}}},6837:d=>{var y=TypeError;d.exports=function(i){if(i>9007199254740991)throw y("Maximum allowed index exceeded");return i}},7400:d=>{d.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:(d,y,i)=>{var h=i(4055)("span").classList,p=h&&h.constructor&&h.constructor.prototype;d.exports=p===Object.prototype?void 0:p},8834:(d,y,i)=>{var h=i(9392).match(/firefox\/(\d+)/i);d.exports=!!h&&+h[1]},7290:(d,y,i)=>{var h=i(516),p=i(9088);d.exports=!h&&!p&&typeof window=="object"&&typeof document=="object"},6763:d=>{d.exports=typeof Bun=="function"&&Bun&&typeof Bun.version=="string"},516:d=>{d.exports=typeof Deno=="object"&&Deno&&typeof Deno.version=="object"},3202:(d,y,i)=>{var h=i(9392);d.exports=/MSIE|Trident/.test(h)},28:(d,y,i)=>{var h=i(9392);d.exports=/ipad|iphone|ipod/i.test(h)&&typeof Pebble<"u"},8119:(d,y,i)=>{var h=i(9392);d.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(h)},9088:(d,y,i)=>{var h=i(4475),p=i(4576);d.exports=p(h.process)==="process"},6765:(d,y,i)=>{var h=i(9392);d.exports=/web0s(?!.*chrome)/i.test(h)},9392:d=>{d.exports=typeof navigator<"u"&&String(navigator.userAgent)||""},7388:(d,y,i)=>{var h,p,g=i(4475),v=i(9392),j=g.process,k=g.Deno,E=j&&j.versions||k&&k.version,O=E&&E.v8;O&&(p=(h=O.split("."))[0]>0&&h[0]<4?1:+(h[0]+h[1])),!p&&v&&(!(h=v.match(/Edge\/(\d+)/))||h[1]>=74)&&(h=v.match(/Chrome\/(\d+)/))&&(p=+h[1]),d.exports=p},9160:(d,y,i)=>{var h=i(9392).match(/AppleWebKit\/(\d+)\./);d.exports=!!h&&+h[1]},8727:d=>{d.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(d,y,i)=>{var h=i(4475),p=i(7347).f,g=i(6699),v=i(6840),j=i(9433),k=i(7740),E=i(2796);d.exports=function(O,x){var S,P,L,T,R,A=O.target,N=O.global,D=O.stat;if(S=N?h:D?h[A]||j(A,{}):h[A]&&h[A].prototype)for(P in x){if(T=x[P],L=O.dontCallGetSet?(R=p(S,P))&&R.value:S[P],!E(N?P:A+(D?".":"#")+P,O.forced)&&L!==void 0){if(typeof T==typeof L)continue;k(T,L)}(O.sham||L&&L.sham)&&g(T,"sham",!0),v(S,P,T,O)}}},9039:d=>{d.exports=function(y){try{return!!y()}catch{return!0}}},9228:(d,y,i)=>{i(7495);var h=i(9565),p=i(6840),g=i(7323),v=i(9039),j=i(8227),k=i(6699),E=j("species"),O=RegExp.prototype;d.exports=function(x,S,P,L){var T=j(x),R=!v((function(){var M={};return M[T]=function(){return 7},""[x](M)!==7})),A=R&&!v((function(){var M=!1,q=/a/;return x==="split"&&((q={}).constructor={},q.constructor[E]=function(){return q},q.flags="",q[T]=/./[T]),q.exec=function(){return M=!0,null},q[T](""),!M}));if(!R||!A||P){var N=/./[T],D=S(T,""[x],(function(M,q,J,G,X){var le=q.exec;return le===g||le===O.exec?R&&!X?{done:!0,value:h(N,q,J,G)}:{done:!0,value:h(M,J,q,G)}:{done:!1}}));p(String.prototype,x,D[0]),p(O,T,D[1])}L&&k(O[T],"sham",!0)}},8745:(d,y,i)=>{var h=i(616),p=Function.prototype,g=p.apply,v=p.call;d.exports=typeof Reflect=="object"&&Reflect.apply||(h?v.bind(g):function(){return v.apply(g,arguments)})},6080:(d,y,i)=>{var h=i(7476),p=i(9306),g=i(616),v=h(h.bind);d.exports=function(j,k){return p(j),k===void 0?j:g?v(j,k):function(){return j.apply(k,arguments)}}},616:(d,y,i)=>{var h=i(9039);d.exports=!h((function(){var p=(function(){}).bind();return typeof p!="function"||p.hasOwnProperty("prototype")}))},566:(d,y,i)=>{var h=i(9504),p=i(9306),g=i(34),v=i(9297),j=i(7680),k=i(616),E=Function,O=h([].concat),x=h([].join),S={};d.exports=k?E.bind:function(P){var L=p(this),T=L.prototype,R=j(arguments,1),A=function(){var N=O(R,j(arguments));return this instanceof A?(function(D,M,q){if(!v(S,M)){for(var J=[],G=0;G<M;G++)J[G]="a["+G+"]";S[M]=E("C,a","return new C("+x(J,",")+")")}return S[M](D,q)})(L,N.length,N):L.apply(P,N)};return g(T)&&(A.prototype=T),A}},9565:(d,y,i)=>{var h=i(616),p=Function.prototype.call;d.exports=h?p.bind(p):function(){return p.apply(p,arguments)}},350:(d,y,i)=>{var h=i(3724),p=i(9297),g=Function.prototype,v=h&&Object.getOwnPropertyDescriptor,j=p(g,"name"),k=j&&(function(){}).name==="something",E=j&&(!h||h&&v(g,"name").configurable);d.exports={EXISTS:j,PROPER:k,CONFIGURABLE:E}},6706:(d,y,i)=>{var h=i(9504),p=i(9306);d.exports=function(g,v,j){try{return h(p(Object.getOwnPropertyDescriptor(g,v)[j]))}catch{}}},7476:(d,y,i)=>{var h=i(4576),p=i(9504);d.exports=function(g){if(h(g)==="Function")return p(g)}},9504:(d,y,i)=>{var h=i(616),p=Function.prototype,g=p.call,v=h&&p.bind.bind(g,g);d.exports=h?v:function(j){return function(){return g.apply(j,arguments)}}},7751:(d,y,i)=>{var h=i(4475),p=i(4901);d.exports=function(g,v){return arguments.length<2?(j=h[g],p(j)?j:void 0):h[g]&&h[g][v];var j}},851:(d,y,i)=>{var h=i(6955),p=i(5966),g=i(4117),v=i(6269),j=i(8227)("iterator");d.exports=function(k){if(!g(k))return p(k,j)||p(k,"@@iterator")||v[h(k)]}},81:(d,y,i)=>{var h=i(9565),p=i(9306),g=i(8551),v=i(6823),j=i(851),k=TypeError;d.exports=function(E,O){var x=arguments.length<2?j(E):O;if(p(x))return g(h(x,E));throw new k(v(E)+" is not iterable")}},6933:(d,y,i)=>{var h=i(9504),p=i(4376),g=i(4901),v=i(4576),j=i(655),k=h([].push);d.exports=function(E){if(g(E))return E;if(p(E)){for(var O=E.length,x=[],S=0;S<O;S++){var P=E[S];typeof P=="string"?k(x,P):typeof P!="number"&&v(P)!=="Number"&&v(P)!=="String"||k(x,j(P))}var L=x.length,T=!0;return function(R,A){if(T)return T=!1,A;if(p(this))return A;for(var N=0;N<L;N++)if(x[N]===R)return A}}}},5966:(d,y,i)=>{var h=i(9306),p=i(4117);d.exports=function(g,v){var j=g[v];return p(j)?void 0:h(j)}},2478:(d,y,i)=>{var h=i(9504),p=i(8981),g=Math.floor,v=h("".charAt),j=h("".replace),k=h("".slice),E=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,O=/\$([$&'`]|\d{1,2})/g;d.exports=function(x,S,P,L,T,R){var A=P+x.length,N=L.length,D=O;return T!==void 0&&(T=p(T),D=E),j(R,D,(function(M,q){var J;switch(v(q,0)){case"$":return"$";case"&":return x;case"`":return k(S,0,P);case"'":return k(S,A);case"<":J=T[k(q,1,-1)];break;default:var G=+q;if(G===0)return M;if(G>N){var X=g(G/10);return X===0?M:X<=N?L[X-1]===void 0?v(q,1):L[X-1]+v(q,1):M}J=L[G-1]}return J===void 0?"":J}))}},4475:function(d,y,i){var h=function(p){return p&&p.Math===Math&&p};d.exports=h(typeof globalThis=="object"&&globalThis)||h(typeof window=="object"&&window)||h(typeof self=="object"&&self)||h(typeof i.g=="object"&&i.g)||h(typeof this=="object"&&this)||(function(){return this})()||Function("return this")()},9297:(d,y,i)=>{var h=i(9504),p=i(8981),g=h({}.hasOwnProperty);d.exports=Object.hasOwn||function(v,j){return g(p(v),j)}},421:d=>{d.exports={}},3138:d=>{d.exports=function(y,i){try{arguments.length===1?console.error(y):console.error(y,i)}catch{}}},397:(d,y,i)=>{var h=i(7751);d.exports=h("document","documentElement")},5917:(d,y,i)=>{var h=i(3724),p=i(9039),g=i(4055);d.exports=!h&&!p((function(){return Object.defineProperty(g("div"),"a",{get:function(){return 7}}).a!==7}))},7055:(d,y,i)=>{var h=i(9504),p=i(9039),g=i(4576),v=Object,j=h("".split);d.exports=p((function(){return!v("z").propertyIsEnumerable(0)}))?function(k){return g(k)==="String"?j(k,""):v(k)}:v},3167:(d,y,i)=>{var h=i(4901),p=i(34),g=i(2967);d.exports=function(v,j,k){var E,O;return g&&h(E=j.constructor)&&E!==k&&p(O=E.prototype)&&O!==k.prototype&&g(v,O),v}},3706:(d,y,i)=>{var h=i(9504),p=i(4901),g=i(7629),v=h(Function.toString);p(g.inspectSource)||(g.inspectSource=function(j){return v(j)}),d.exports=g.inspectSource},1181:(d,y,i)=>{var h,p,g,v=i(8622),j=i(4475),k=i(34),E=i(6699),O=i(9297),x=i(7629),S=i(6119),P=i(421),L="Object already initialized",T=j.TypeError,R=j.WeakMap;if(v||x.state){var A=x.state||(x.state=new R);A.get=A.get,A.has=A.has,A.set=A.set,h=function(D,M){if(A.has(D))throw new T(L);return M.facade=D,A.set(D,M),M},p=function(D){return A.get(D)||{}},g=function(D){return A.has(D)}}else{var N=S("state");P[N]=!0,h=function(D,M){if(O(D,N))throw new T(L);return M.facade=D,E(D,N,M),M},p=function(D){return O(D,N)?D[N]:{}},g=function(D){return O(D,N)}}d.exports={set:h,get:p,has:g,enforce:function(D){return g(D)?p(D):h(D,{})},getterFor:function(D){return function(M){var q;if(!k(M)||(q=p(M)).type!==D)throw new T("Incompatible receiver, "+D+" required");return q}}}},4209:(d,y,i)=>{var h=i(8227),p=i(6269),g=h("iterator"),v=Array.prototype;d.exports=function(j){return j!==void 0&&(p.Array===j||v[g]===j)}},4376:(d,y,i)=>{var h=i(4576);d.exports=Array.isArray||function(p){return h(p)==="Array"}},4901:d=>{var y=typeof document=="object"&&document.all;d.exports=y===void 0&&y!==void 0?function(i){return typeof i=="function"||i===y}:function(i){return typeof i=="function"}},3517:(d,y,i)=>{var h=i(9504),p=i(9039),g=i(4901),v=i(6955),j=i(7751),k=i(3706),E=function(){},O=j("Reflect","construct"),x=/^\s*(?:class|function)\b/,S=h(x.exec),P=!x.test(E),L=function(R){if(!g(R))return!1;try{return O(E,[],R),!0}catch{return!1}},T=function(R){if(!g(R))return!1;switch(v(R)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return P||!!S(x,k(R))}catch{return!0}};T.sham=!0,d.exports=!O||p((function(){var R;return L(L.call)||!L(Object)||!L((function(){R=!0}))||R}))?T:L},6575:(d,y,i)=>{var h=i(9297);d.exports=function(p){return p!==void 0&&(h(p,"value")||h(p,"writable"))}},2796:(d,y,i)=>{var h=i(9039),p=i(4901),g=/#|\.prototype\./,v=function(x,S){var P=k[j(x)];return P===O||P!==E&&(p(S)?h(S):!!S)},j=v.normalize=function(x){return String(x).replace(g,".").toLowerCase()},k=v.data={},E=v.NATIVE="N",O=v.POLYFILL="P";d.exports=v},4117:d=>{d.exports=function(y){return y==null}},34:(d,y,i)=>{var h=i(4901);d.exports=function(p){return typeof p=="object"?p!==null:h(p)}},3925:(d,y,i)=>{var h=i(34);d.exports=function(p){return h(p)||p===null}},6395:d=>{d.exports=!1},788:(d,y,i)=>{var h=i(34),p=i(4576),g=i(8227)("match");d.exports=function(v){var j;return h(v)&&((j=v[g])!==void 0?!!j:p(v)==="RegExp")}},757:(d,y,i)=>{var h=i(7751),p=i(4901),g=i(1625),v=i(7040),j=Object;d.exports=v?function(k){return typeof k=="symbol"}:function(k){var E=h("Symbol");return p(E)&&g(E.prototype,j(k))}},2652:(d,y,i)=>{var h=i(6080),p=i(9565),g=i(8551),v=i(6823),j=i(4209),k=i(6198),E=i(1625),O=i(81),x=i(851),S=i(9539),P=TypeError,L=function(R,A){this.stopped=R,this.result=A},T=L.prototype;d.exports=function(R,A,N){var D,M,q,J,G,X,le,ue=N&&N.that,he=!(!N||!N.AS_ENTRIES),ce=!(!N||!N.IS_RECORD),me=!(!N||!N.IS_ITERATOR),ie=!(!N||!N.INTERRUPTED),H=h(A,ue),ee=function(I){return D&&S(D,"normal",I),new L(!0,I)},V=function(I){return he?(g(I),ie?H(I[0],I[1],ee):H(I[0],I[1])):ie?H(I,ee):H(I)};if(ce)D=R.iterator;else if(me)D=R;else{if(!(M=x(R)))throw new P(v(R)+" is not iterable");if(j(M)){for(q=0,J=k(R);J>q;q++)if((G=V(R[q]))&&E(T,G))return G;return new L(!1)}D=O(R,M)}for(X=ce?R.next:D.next;!(le=p(X,D)).done;){try{G=V(le.value)}catch(I){S(D,"throw",I)}if(typeof G=="object"&&G&&E(T,G))return G}return new L(!1)}},9539:(d,y,i)=>{var h=i(9565),p=i(8551),g=i(5966);d.exports=function(v,j,k){var E,O;p(v);try{if(!(E=g(v,"return"))){if(j==="throw")throw k;return k}E=h(E,v)}catch(x){O=!0,E=x}if(j==="throw")throw k;if(O)throw E;return p(E),k}},3994:(d,y,i)=>{var h=i(7657).IteratorPrototype,p=i(2360),g=i(6980),v=i(687),j=i(6269),k=function(){return this};d.exports=function(E,O,x,S){var P=O+" Iterator";return E.prototype=p(h,{next:g(+!S,x)}),v(E,P,!1,!0),j[P]=k,E}},1088:(d,y,i)=>{var h=i(6518),p=i(9565),g=i(6395),v=i(350),j=i(4901),k=i(3994),E=i(2787),O=i(2967),x=i(687),S=i(6699),P=i(6840),L=i(8227),T=i(6269),R=i(7657),A=v.PROPER,N=v.CONFIGURABLE,D=R.IteratorPrototype,M=R.BUGGY_SAFARI_ITERATORS,q=L("iterator"),J="keys",G="values",X="entries",le=function(){return this};d.exports=function(ue,he,ce,me,ie,H,ee){k(ce,he,me);var V,I,F,te=function(re){if(re===ie&&U)return U;if(!M&&re&&re in Oe)return Oe[re];switch(re){case J:case G:case X:return function(){return new ce(this,re)}}return function(){return new ce(this)}},ge=he+" Iterator",be=!1,Oe=ue.prototype,ve=Oe[q]||Oe["@@iterator"]||ie&&Oe[ie],U=!M&&ve||te(ie),Z=he==="Array"&&Oe.entries||ve;if(Z&&(V=E(Z.call(new ue)))!==Object.prototype&&V.next&&(g||E(V)===D||(O?O(V,D):j(V[q])||P(V,q,le)),x(V,ge,!0,!0),g&&(T[ge]=le)),A&&ie===G&&ve&&ve.name!==G&&(!g&&N?S(Oe,"name",G):(be=!0,U=function(){return p(ve,this)})),ie)if(I={values:te(G),keys:H?U:te(J),entries:te(X)},ee)for(F in I)(M||be||!(F in Oe))&&P(Oe,F,I[F]);else h({target:he,proto:!0,forced:M||be},I);return g&&!ee||Oe[q]===U||P(Oe,q,U,{name:ie}),T[he]=U,I}},7657:(d,y,i)=>{var h,p,g,v=i(9039),j=i(4901),k=i(34),E=i(2360),O=i(2787),x=i(6840),S=i(8227),P=i(6395),L=S("iterator"),T=!1;[].keys&&("next"in(g=[].keys())?(p=O(O(g)))!==Object.prototype&&(h=p):T=!0),!k(h)||v((function(){var R={};return h[L].call(R)!==R}))?h={}:P&&(h=E(h)),j(h[L])||x(h,L,(function(){return this})),d.exports={IteratorPrototype:h,BUGGY_SAFARI_ITERATORS:T}},6269:d=>{d.exports={}},6198:(d,y,i)=>{var h=i(8014);d.exports=function(p){return h(p.length)}},283:(d,y,i)=>{var h=i(9504),p=i(9039),g=i(4901),v=i(9297),j=i(3724),k=i(350).CONFIGURABLE,E=i(3706),O=i(1181),x=O.enforce,S=O.get,P=String,L=Object.defineProperty,T=h("".slice),R=h("".replace),A=h([].join),N=j&&!p((function(){return L((function(){}),"length",{value:8}).length!==8})),D=String(String).split("String"),M=d.exports=function(q,J,G){T(P(J),0,7)==="Symbol("&&(J="["+R(P(J),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),G&&G.getter&&(J="get "+J),G&&G.setter&&(J="set "+J),(!v(q,"name")||k&&q.name!==J)&&(j?L(q,"name",{value:J,configurable:!0}):q.name=J),N&&G&&v(G,"arity")&&q.length!==G.arity&&L(q,"length",{value:G.arity});try{G&&v(G,"constructor")&&G.constructor?j&&L(q,"prototype",{writable:!1}):q.prototype&&(q.prototype=void 0)}catch{}var X=x(q);return v(X,"source")||(X.source=A(D,typeof J=="string"?J:"")),q};Function.prototype.toString=M((function(){return g(this)&&S(this).source||E(this)}),"toString")},741:d=>{var y=Math.ceil,i=Math.floor;d.exports=Math.trunc||function(h){var p=+h;return(p>0?i:y)(p)}},1955:(d,y,i)=>{var h,p,g,v,j,k=i(4475),E=i(3389),O=i(6080),x=i(9225).set,S=i(8265),P=i(8119),L=i(28),T=i(6765),R=i(9088),A=k.MutationObserver||k.WebKitMutationObserver,N=k.document,D=k.process,M=k.Promise,q=E("queueMicrotask");if(!q){var J=new S,G=function(){var X,le;for(R&&(X=D.domain)&&X.exit();le=J.get();)try{le()}catch(ue){throw J.head&&h(),ue}X&&X.enter()};P||R||T||!A||!N?!L&&M&&M.resolve?((v=M.resolve(void 0)).constructor=M,j=O(v.then,v),h=function(){j(G)}):R?h=function(){D.nextTick(G)}:(x=O(x,k),h=function(){x(G)}):(p=!0,g=N.createTextNode(""),new A(G).observe(g,{characterData:!0}),h=function(){g.data=p=!p}),q=function(X){J.head||h(),J.add(X)}}d.exports=q},6043:(d,y,i)=>{var h=i(9306),p=TypeError,g=function(v){var j,k;this.promise=new v((function(E,O){if(j!==void 0||k!==void 0)throw new p("Bad Promise constructor");j=E,k=O})),this.resolve=h(j),this.reject=h(k)};d.exports.f=function(v){return new g(v)}},5749:(d,y,i)=>{var h=i(788),p=TypeError;d.exports=function(g){if(h(g))throw new p("The method doesn't accept regular expressions");return g}},3904:(d,y,i)=>{var h=i(4475),p=i(9039),g=i(9504),v=i(655),j=i(3802).trim,k=i(7452),E=g("".charAt),O=h.parseFloat,x=h.Symbol,S=x&&x.iterator,P=1/O(k+"-0")!=-1/0||S&&!p((function(){O(Object(S))}));d.exports=P?function(L){var T=j(v(L)),R=O(T);return R===0&&E(T,0)==="-"?-0:R}:O},2703:(d,y,i)=>{var h=i(4475),p=i(9039),g=i(9504),v=i(655),j=i(3802).trim,k=i(7452),E=h.parseInt,O=h.Symbol,x=O&&O.iterator,S=/^[+-]?0x/i,P=g(S.exec),L=E(k+"08")!==8||E(k+"0x16")!==22||x&&!p((function(){E(Object(x))}));d.exports=L?function(T,R){var A=j(v(T));return E(A,R>>>0||(P(S,A)?16:10))}:E},4213:(d,y,i)=>{var h=i(3724),p=i(9504),g=i(9565),v=i(9039),j=i(1072),k=i(3717),E=i(8773),O=i(8981),x=i(7055),S=Object.assign,P=Object.defineProperty,L=p([].concat);d.exports=!S||v((function(){if(h&&S({b:1},S(P({},"a",{enumerable:!0,get:function(){P(this,"b",{value:3,enumerable:!1})}}),{b:2})).b!==1)return!0;var T={},R={},A=Symbol("assign detection"),N="abcdefghijklmnopqrst";return T[A]=7,N.split("").forEach((function(D){R[D]=D})),S({},T)[A]!==7||j(S({},R)).join("")!==N}))?function(T,R){for(var A=O(T),N=arguments.length,D=1,M=k.f,q=E.f;N>D;)for(var J,G=x(arguments[D++]),X=M?L(j(G),M(G)):j(G),le=X.length,ue=0;le>ue;)J=X[ue++],h&&!g(q,G,J)||(A[J]=G[J]);return A}:S},2360:(d,y,i)=>{var h,p=i(8551),g=i(6801),v=i(8727),j=i(421),k=i(397),E=i(4055),O=i(6119),x="prototype",S="script",P=O("IE_PROTO"),L=function(){},T=function(N){return"<"+S+">"+N+"</"+S+">"},R=function(N){N.write(T("")),N.close();var D=N.parentWindow.Object;return N=null,D},A=function(){try{h=new ActiveXObject("htmlfile")}catch{}var N,D,M;A=typeof document<"u"?document.domain&&h?R(h):(D=E("iframe"),M="java"+S+":",D.style.display="none",k.appendChild(D),D.src=String(M),(N=D.contentWindow.document).open(),N.write(T("document.F=Object")),N.close(),N.F):R(h);for(var q=v.length;q--;)delete A[x][v[q]];return A()};j[P]=!0,d.exports=Object.create||function(N,D){var M;return N!==null?(L[x]=p(N),M=new L,L[x]=null,M[P]=N):M=A(),D===void 0?M:g.f(M,D)}},6801:(d,y,i)=>{var h=i(3724),p=i(8686),g=i(4913),v=i(8551),j=i(5397),k=i(1072);y.f=h&&!p?Object.defineProperties:function(E,O){v(E);for(var x,S=j(O),P=k(O),L=P.length,T=0;L>T;)g.f(E,x=P[T++],S[x]);return E}},4913:(d,y,i)=>{var h=i(3724),p=i(5917),g=i(8686),v=i(8551),j=i(6969),k=TypeError,E=Object.defineProperty,O=Object.getOwnPropertyDescriptor,x="enumerable",S="configurable",P="writable";y.f=h?g?function(L,T,R){if(v(L),T=j(T),v(R),typeof L=="function"&&T==="prototype"&&"value"in R&&P in R&&!R[P]){var A=O(L,T);A&&A[P]&&(L[T]=R.value,R={configurable:S in R?R[S]:A[S],enumerable:x in R?R[x]:A[x],writable:!1})}return E(L,T,R)}:E:function(L,T,R){if(v(L),T=j(T),v(R),p)try{return E(L,T,R)}catch{}if("get"in R||"set"in R)throw new k("Accessors not supported");return"value"in R&&(L[T]=R.value),L}},7347:(d,y,i)=>{var h=i(3724),p=i(9565),g=i(8773),v=i(6980),j=i(5397),k=i(6969),E=i(9297),O=i(5917),x=Object.getOwnPropertyDescriptor;y.f=h?x:function(S,P){if(S=j(S),P=k(P),O)try{return x(S,P)}catch{}if(E(S,P))return v(!p(g.f,S,P),S[P])}},298:(d,y,i)=>{var h=i(4576),p=i(5397),g=i(8480).f,v=i(7680),j=typeof window=="object"&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];d.exports.f=function(k){return j&&h(k)==="Window"?(function(E){try{return g(E)}catch{return v(j)}})(k):g(p(k))}},8480:(d,y,i)=>{var h=i(1828),p=i(8727).concat("length","prototype");y.f=Object.getOwnPropertyNames||function(g){return h(g,p)}},3717:(d,y)=>{y.f=Object.getOwnPropertySymbols},2787:(d,y,i)=>{var h=i(9297),p=i(4901),g=i(8981),v=i(6119),j=i(2211),k=v("IE_PROTO"),E=Object,O=E.prototype;d.exports=j?E.getPrototypeOf:function(x){var S=g(x);if(h(S,k))return S[k];var P=S.constructor;return p(P)&&S instanceof P?P.prototype:S instanceof E?O:null}},1625:(d,y,i)=>{var h=i(9504);d.exports=h({}.isPrototypeOf)},1828:(d,y,i)=>{var h=i(9504),p=i(9297),g=i(5397),v=i(9617).indexOf,j=i(421),k=h([].push);d.exports=function(E,O){var x,S=g(E),P=0,L=[];for(x in S)!p(j,x)&&p(S,x)&&k(L,x);for(;O.length>P;)p(S,x=O[P++])&&(~v(L,x)||k(L,x));return L}},1072:(d,y,i)=>{var h=i(1828),p=i(8727);d.exports=Object.keys||function(g){return h(g,p)}},8773:(d,y)=>{var i={}.propertyIsEnumerable,h=Object.getOwnPropertyDescriptor,p=h&&!i.call({1:2},1);y.f=p?function(g){var v=h(this,g);return!!v&&v.enumerable}:i},2967:(d,y,i)=>{var h=i(6706),p=i(34),g=i(7750),v=i(3506);d.exports=Object.setPrototypeOf||("__proto__"in{}?(function(){var j,k=!1,E={};try{(j=h(Object.prototype,"__proto__","set"))(E,[]),k=E instanceof Array}catch{}return function(O,x){return g(O),v(x),p(O)&&(k?j(O,x):O.__proto__=x),O}})():void 0)},2357:(d,y,i)=>{var h=i(3724),p=i(9039),g=i(9504),v=i(2787),j=i(1072),k=i(5397),E=g(i(8773).f),O=g([].push),x=h&&p((function(){var P=Object.create(null);return P[2]=2,!E(P,2)})),S=function(P){return function(L){for(var T,R=k(L),A=j(R),N=x&&v(R)===null,D=A.length,M=0,q=[];D>M;)T=A[M++],h&&!(N?T in R:E(R,T))||O(q,P?[T,R[T]]:R[T]);return q}};d.exports={entries:S(!0),values:S(!1)}},3179:(d,y,i)=>{var h=i(2140),p=i(6955);d.exports=h?{}.toString:function(){return"[object "+p(this)+"]"}},4270:(d,y,i)=>{var h=i(9565),p=i(4901),g=i(34),v=TypeError;d.exports=function(j,k){var E,O;if(k==="string"&&p(E=j.toString)&&!g(O=h(E,j))||p(E=j.valueOf)&&!g(O=h(E,j))||k!=="string"&&p(E=j.toString)&&!g(O=h(E,j)))return O;throw new v("Can't convert object to primitive value")}},5031:(d,y,i)=>{var h=i(7751),p=i(9504),g=i(8480),v=i(3717),j=i(8551),k=p([].concat);d.exports=h("Reflect","ownKeys")||function(E){var O=g.f(j(E)),x=v.f;return x?k(O,x(E)):O}},9167:(d,y,i)=>{var h=i(4475);d.exports=h},1103:d=>{d.exports=function(y){try{return{error:!1,value:y()}}catch(i){return{error:!0,value:i}}}},916:(d,y,i)=>{var h=i(4475),p=i(550),g=i(4901),v=i(2796),j=i(3706),k=i(8227),E=i(7290),O=i(516),x=i(6395),S=i(7388),P=p&&p.prototype,L=k("species"),T=!1,R=g(h.PromiseRejectionEvent),A=v("Promise",(function(){var N=j(p),D=N!==String(p);if(!D&&S===66||x&&(!P.catch||!P.finally))return!0;if(!S||S<51||!/native code/.test(N)){var M=new p((function(J){J(1)})),q=function(J){J((function(){}),(function(){}))};if((M.constructor={})[L]=q,!(T=M.then((function(){}))instanceof q))return!0}return!D&&(E||O)&&!R}));d.exports={CONSTRUCTOR:A,REJECTION_EVENT:R,SUBCLASSING:T}},550:(d,y,i)=>{var h=i(4475);d.exports=h.Promise},3438:(d,y,i)=>{var h=i(8551),p=i(34),g=i(6043);d.exports=function(v,j){if(h(v),p(j)&&j.constructor===v)return j;var k=g.f(v);return(0,k.resolve)(j),k.promise}},537:(d,y,i)=>{var h=i(550),p=i(4428),g=i(916).CONSTRUCTOR;d.exports=g||!p((function(v){h.all(v).then(void 0,(function(){}))}))},1056:(d,y,i)=>{var h=i(4913).f;d.exports=function(p,g,v){v in p||h(p,v,{configurable:!0,get:function(){return g[v]},set:function(j){g[v]=j}})}},8265:d=>{var y=function(){this.head=null,this.tail=null};y.prototype={add:function(i){var h={item:i,next:null},p=this.tail;p?p.next=h:this.head=h,this.tail=h},get:function(){var i=this.head;if(i)return(this.head=i.next)===null&&(this.tail=null),i.item}},d.exports=y},6682:(d,y,i)=>{var h=i(9565),p=i(8551),g=i(4901),v=i(4576),j=i(7323),k=TypeError;d.exports=function(E,O){var x=E.exec;if(g(x)){var S=h(x,E,O);return S!==null&&p(S),S}if(v(E)==="RegExp")return h(j,E,O);throw new k("RegExp#exec called on incompatible receiver")}},7323:(d,y,i)=>{var h,p,g=i(9565),v=i(9504),j=i(655),k=i(7979),E=i(8429),O=i(5745),x=i(2360),S=i(1181).get,P=i(3635),L=i(8814),T=O("native-string-replace",String.prototype.replace),R=RegExp.prototype.exec,A=R,N=v("".charAt),D=v("".indexOf),M=v("".replace),q=v("".slice),J=(p=/b*/g,g(R,h=/a/,"a"),g(R,p,"a"),h.lastIndex!==0||p.lastIndex!==0),G=E.BROKEN_CARET,X=/()??/.exec("")[1]!==void 0;(J||X||G||P||L)&&(A=function(le){var ue,he,ce,me,ie,H,ee,V=this,I=S(V),F=j(le),te=I.raw;if(te)return te.lastIndex=V.lastIndex,ue=g(A,te,F),V.lastIndex=te.lastIndex,ue;var ge=I.groups,be=G&&V.sticky,Oe=g(k,V),ve=V.source,U=0,Z=F;if(be&&(Oe=M(Oe,"y",""),D(Oe,"g")===-1&&(Oe+="g"),Z=q(F,V.lastIndex),V.lastIndex>0&&(!V.multiline||V.multiline&&N(F,V.lastIndex-1)!==`
16
+ `)&&(ve="(?: "+ve+")",Z=" "+Z,U++),he=new RegExp("^(?:"+ve+")",Oe)),X&&(he=new RegExp("^"+ve+"$(?!\\s)",Oe)),J&&(ce=V.lastIndex),me=g(R,be?he:V,Z),be?me?(me.input=q(me.input,U),me[0]=q(me[0],U),me.index=V.lastIndex,V.lastIndex+=me[0].length):V.lastIndex=0:J&&me&&(V.lastIndex=V.global?me.index+me[0].length:ce),X&&me&&me.length>1&&g(T,me[0],he,(function(){for(ie=1;ie<arguments.length-2;ie++)arguments[ie]===void 0&&(me[ie]=void 0)})),me&&ge)for(me.groups=H=x(null),ie=0;ie<ge.length;ie++)H[(ee=ge[ie])[0]]=me[ee[1]];return me}),d.exports=A},7979:(d,y,i)=>{var h=i(8551);d.exports=function(){var p=h(this),g="";return p.hasIndices&&(g+="d"),p.global&&(g+="g"),p.ignoreCase&&(g+="i"),p.multiline&&(g+="m"),p.dotAll&&(g+="s"),p.unicode&&(g+="u"),p.unicodeSets&&(g+="v"),p.sticky&&(g+="y"),g}},1034:(d,y,i)=>{var h=i(9565),p=i(9297),g=i(1625),v=i(7979),j=RegExp.prototype;d.exports=function(k){var E=k.flags;return E!==void 0||"flags"in j||p(k,"flags")||!g(j,k)?E:h(v,k)}},8429:(d,y,i)=>{var h=i(9039),p=i(4475).RegExp,g=h((function(){var k=p("a","y");return k.lastIndex=2,k.exec("abcd")!==null})),v=g||h((function(){return!p("a","y").sticky})),j=g||h((function(){var k=p("^r","gy");return k.lastIndex=2,k.exec("str")!==null}));d.exports={BROKEN_CARET:j,MISSED_STICKY:v,UNSUPPORTED_Y:g}},3635:(d,y,i)=>{var h=i(9039),p=i(4475).RegExp;d.exports=h((function(){var g=p(".","s");return!(g.dotAll&&g.test(`
17
+ `)&&g.flags==="s")}))},8814:(d,y,i)=>{var h=i(9039),p=i(4475).RegExp;d.exports=h((function(){var g=p("(?<a>b)","g");return g.exec("b").groups.a!=="b"||"b".replace(g,"$<a>c")!=="bc"}))},7750:(d,y,i)=>{var h=i(4117),p=TypeError;d.exports=function(g){if(h(g))throw new p("Can't call method on "+g);return g}},3389:(d,y,i)=>{var h=i(4475),p=i(3724),g=Object.getOwnPropertyDescriptor;d.exports=function(v){if(!p)return h[v];var j=g(h,v);return j&&j.value}},9472:(d,y,i)=>{var h,p=i(4475),g=i(8745),v=i(4901),j=i(6763),k=i(9392),E=i(7680),O=i(2812),x=p.Function,S=/MSIE .\./.test(k)||j&&((h=p.Bun.version.split(".")).length<3||h[0]==="0"&&(h[1]<3||h[1]==="3"&&h[2]==="0"));d.exports=function(P,L){var T=L?2:1;return S?function(R,A){var N=O(arguments.length,1)>T,D=v(R)?R:x(R),M=N?E(arguments,T):[],q=N?function(){g(D,this,M)}:D;return L?P(q,A):P(q)}:P}},7633:(d,y,i)=>{var h=i(7751),p=i(2106),g=i(8227),v=i(3724),j=g("species");d.exports=function(k){var E=h(k);v&&E&&!E[j]&&p(E,j,{configurable:!0,get:function(){return this}})}},687:(d,y,i)=>{var h=i(4913).f,p=i(9297),g=i(8227)("toStringTag");d.exports=function(v,j,k){v&&!k&&(v=v.prototype),v&&!p(v,g)&&h(v,g,{configurable:!0,value:j})}},6119:(d,y,i)=>{var h=i(5745),p=i(3392),g=h("keys");d.exports=function(v){return g[v]||(g[v]=p(v))}},7629:(d,y,i)=>{var h=i(6395),p=i(4475),g=i(9433),v="__core-js_shared__",j=d.exports=p[v]||g(v,{});(j.versions||(j.versions=[])).push({version:"3.36.1",mode:h?"pure":"global",copyright:"© 2014-2024 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.36.1/LICENSE",source:"https://github.com/zloirock/core-js"})},5745:(d,y,i)=>{var h=i(7629);d.exports=function(p,g){return h[p]||(h[p]=g||{})}},2293:(d,y,i)=>{var h=i(8551),p=i(5548),g=i(4117),v=i(8227)("species");d.exports=function(j,k){var E,O=h(j).constructor;return O===void 0||g(E=h(O)[v])?k:p(E)}},8183:(d,y,i)=>{var h=i(9504),p=i(1291),g=i(655),v=i(7750),j=h("".charAt),k=h("".charCodeAt),E=h("".slice),O=function(x){return function(S,P){var L,T,R=g(v(S)),A=p(P),N=R.length;return A<0||A>=N?x?"":void 0:(L=k(R,A))<55296||L>56319||A+1===N||(T=k(R,A+1))<56320||T>57343?x?j(R,A):L:x?E(R,A,A+2):T-56320+(L-55296<<10)+65536}};d.exports={codeAt:O(!1),charAt:O(!0)}},533:(d,y,i)=>{var h=i(9504),p=i(8014),g=i(655),v=i(2333),j=i(7750),k=h(v),E=h("".slice),O=Math.ceil,x=function(S){return function(P,L,T){var R,A,N=g(j(P)),D=p(L),M=N.length,q=T===void 0?" ":g(T);return D<=M||q===""?N:((A=k(q,O((R=D-M)/q.length))).length>R&&(A=E(A,0,R)),S?N+A:A+N)}};d.exports={start:x(!1),end:x(!0)}},2333:(d,y,i)=>{var h=i(1291),p=i(655),g=i(7750),v=RangeError;d.exports=function(j){var k=p(g(this)),E="",O=h(j);if(O<0||O===1/0)throw new v("Wrong number of repetitions");for(;O>0;(O>>>=1)&&(k+=k))1&O&&(E+=k);return E}},706:(d,y,i)=>{var h=i(350).PROPER,p=i(9039),g=i(7452);d.exports=function(v){return p((function(){return!!g[v]()||"​…᠎"[v]()!=="​…᠎"||h&&g[v].name!==v}))}},3802:(d,y,i)=>{var h=i(9504),p=i(7750),g=i(655),v=i(7452),j=h("".replace),k=RegExp("^["+v+"]+"),E=RegExp("(^|[^"+v+"])["+v+"]+$"),O=function(x){return function(S){var P=g(p(S));return 1&x&&(P=j(P,k,"")),2&x&&(P=j(P,E,"$1")),P}};d.exports={start:O(1),end:O(2),trim:O(3)}},4495:(d,y,i)=>{var h=i(7388),p=i(9039),g=i(4475).String;d.exports=!!Object.getOwnPropertySymbols&&!p((function(){var v=Symbol("symbol detection");return!g(v)||!(Object(v)instanceof Symbol)||!Symbol.sham&&h&&h<41}))},8242:(d,y,i)=>{var h=i(9565),p=i(7751),g=i(8227),v=i(6840);d.exports=function(){var j=p("Symbol"),k=j&&j.prototype,E=k&&k.valueOf,O=g("toPrimitive");k&&!k[O]&&v(k,O,(function(x){return h(E,this)}),{arity:1})}},1296:(d,y,i)=>{var h=i(4495);d.exports=h&&!!Symbol.for&&!!Symbol.keyFor},9225:(d,y,i)=>{var h,p,g,v,j=i(4475),k=i(8745),E=i(6080),O=i(4901),x=i(9297),S=i(9039),P=i(397),L=i(7680),T=i(4055),R=i(2812),A=i(8119),N=i(9088),D=j.setImmediate,M=j.clearImmediate,q=j.process,J=j.Dispatch,G=j.Function,X=j.MessageChannel,le=j.String,ue=0,he={},ce="onreadystatechange";S((function(){h=j.location}));var me=function(V){if(x(he,V)){var I=he[V];delete he[V],I()}},ie=function(V){return function(){me(V)}},H=function(V){me(V.data)},ee=function(V){j.postMessage(le(V),h.protocol+"//"+h.host)};D&&M||(D=function(V){R(arguments.length,1);var I=O(V)?V:G(V),F=L(arguments,1);return he[++ue]=function(){k(I,void 0,F)},p(ue),ue},M=function(V){delete he[V]},N?p=function(V){q.nextTick(ie(V))}:J&&J.now?p=function(V){J.now(ie(V))}:X&&!A?(v=(g=new X).port2,g.port1.onmessage=H,p=E(v.postMessage,v)):j.addEventListener&&O(j.postMessage)&&!j.importScripts&&h&&h.protocol!=="file:"&&!S(ee)?(p=ee,j.addEventListener("message",H,!1)):p=ce in T("script")?function(V){P.appendChild(T("script"))[ce]=function(){P.removeChild(this),me(V)}}:function(V){setTimeout(ie(V),0)}),d.exports={set:D,clear:M}},1240:(d,y,i)=>{var h=i(9504);d.exports=h(1 .valueOf)},5610:(d,y,i)=>{var h=i(1291),p=Math.max,g=Math.min;d.exports=function(v,j){var k=h(v);return k<0?p(k+j,0):g(k,j)}},5397:(d,y,i)=>{var h=i(7055),p=i(7750);d.exports=function(g){return h(p(g))}},1291:(d,y,i)=>{var h=i(741);d.exports=function(p){var g=+p;return g!=g||g===0?0:h(g)}},8014:(d,y,i)=>{var h=i(1291),p=Math.min;d.exports=function(g){var v=h(g);return v>0?p(v,9007199254740991):0}},8981:(d,y,i)=>{var h=i(7750),p=Object;d.exports=function(g){return p(h(g))}},2777:(d,y,i)=>{var h=i(9565),p=i(34),g=i(757),v=i(5966),j=i(4270),k=i(8227),E=TypeError,O=k("toPrimitive");d.exports=function(x,S){if(!p(x)||g(x))return x;var P,L=v(x,O);if(L){if(S===void 0&&(S="default"),P=h(L,x,S),!p(P)||g(P))return P;throw new E("Can't convert object to primitive value")}return S===void 0&&(S="number"),j(x,S)}},6969:(d,y,i)=>{var h=i(2777),p=i(757);d.exports=function(g){var v=h(g,"string");return p(v)?v:v+""}},2140:(d,y,i)=>{var h={};h[i(8227)("toStringTag")]="z",d.exports=String(h)==="[object z]"},655:(d,y,i)=>{var h=i(6955),p=String;d.exports=function(g){if(h(g)==="Symbol")throw new TypeError("Cannot convert a Symbol value to a string");return p(g)}},6823:d=>{var y=String;d.exports=function(i){try{return y(i)}catch{return"Object"}}},3392:(d,y,i)=>{var h=i(9504),p=0,g=Math.random(),v=h(1 .toString);d.exports=function(j){return"Symbol("+(j===void 0?"":j)+")_"+v(++p+g,36)}},7040:(d,y,i)=>{var h=i(4495);d.exports=h&&!Symbol.sham&&typeof Symbol.iterator=="symbol"},8686:(d,y,i)=>{var h=i(3724),p=i(9039);d.exports=h&&p((function(){return Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype!==42}))},2812:d=>{var y=TypeError;d.exports=function(i,h){if(i<h)throw new y("Not enough arguments");return i}},8622:(d,y,i)=>{var h=i(4475),p=i(4901),g=h.WeakMap;d.exports=p(g)&&/native code/.test(String(g))},511:(d,y,i)=>{var h=i(9167),p=i(9297),g=i(1951),v=i(4913).f;d.exports=function(j){var k=h.Symbol||(h.Symbol={});p(k,j)||v(k,j,{value:g.f(j)})}},1951:(d,y,i)=>{var h=i(8227);y.f=h},8227:(d,y,i)=>{var h=i(4475),p=i(5745),g=i(9297),v=i(3392),j=i(4495),k=i(7040),E=h.Symbol,O=p("wks"),x=k?E.for||E:E&&E.withoutSetter||v;d.exports=function(S){return g(O,S)||(O[S]=j&&g(E,S)?E[S]:x("Symbol."+S)),O[S]}},7452:d=>{d.exports=`
18
+ \v\f\r                 \u2028\u2029\uFEFF`},8706:(d,y,i)=>{var h=i(6518),p=i(9039),g=i(4376),v=i(34),j=i(8981),k=i(6198),E=i(6837),O=i(4659),x=i(1469),S=i(597),P=i(8227),L=i(7388),T=P("isConcatSpreadable"),R=L>=51||!p((function(){var N=[];return N[T]=!1,N.concat()[0]!==N})),A=function(N){if(!v(N))return!1;var D=N[T];return D!==void 0?!!D:g(N)};h({target:"Array",proto:!0,arity:1,forced:!R||!S("concat")},{concat:function(N){var D,M,q,J,G,X=j(this),le=x(X,0),ue=0;for(D=-1,q=arguments.length;D<q;D++)if(A(G=D===-1?X:arguments[D]))for(J=k(G),E(ue+J),M=0;M<J;M++,ue++)M in G&&O(le,ue,G[M]);else E(ue+1),O(le,ue++,G);return le.length=ue,le}})},8431:(d,y,i)=>{var h=i(6518),p=i(9213).every;h({target:"Array",proto:!0,forced:!i(4598)("every")},{every:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},2008:(d,y,i)=>{var h=i(6518),p=i(9213).filter;h({target:"Array",proto:!0,forced:!i(597)("filter")},{filter:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},113:(d,y,i)=>{var h=i(6518),p=i(9213).find,g=i(6469),v="find",j=!0;v in[]&&Array(1)[v]((function(){j=!1})),h({target:"Array",proto:!0,forced:j},{find:function(k){return p(this,k,arguments.length>1?arguments[1]:void 0)}}),g(v)},1629:(d,y,i)=>{var h=i(6518),p=i(235);h({target:"Array",proto:!0,forced:[].forEach!==p},{forEach:p})},3418:(d,y,i)=>{var h=i(6518),p=i(7916);h({target:"Array",stat:!0,forced:!i(4428)((function(g){Array.from(g)}))},{from:p})},4423:(d,y,i)=>{var h=i(6518),p=i(9617).includes,g=i(9039),v=i(6469);h({target:"Array",proto:!0,forced:g((function(){return!Array(1).includes()}))},{includes:function(j){return p(this,j,arguments.length>1?arguments[1]:void 0)}}),v("includes")},5276:(d,y,i)=>{var h=i(6518),p=i(7476),g=i(9617).indexOf,v=i(4598),j=p([].indexOf),k=!!j&&1/j([1],1,-0)<0;h({target:"Array",proto:!0,forced:k||!v("indexOf")},{indexOf:function(E){var O=arguments.length>1?arguments[1]:void 0;return k?j(this,E,O)||0:g(this,E,O)}})},4346:(d,y,i)=>{i(6518)({target:"Array",stat:!0},{isArray:i(4376)})},3792:(d,y,i)=>{var h=i(5397),p=i(6469),g=i(6269),v=i(1181),j=i(4913).f,k=i(1088),E=i(2529),O=i(6395),x=i(3724),S="Array Iterator",P=v.set,L=v.getterFor(S);d.exports=k(Array,"Array",(function(R,A){P(this,{type:S,target:h(R),index:0,kind:A})}),(function(){var R=L(this),A=R.target,N=R.index++;if(!A||N>=A.length)return R.target=void 0,E(void 0,!0);switch(R.kind){case"keys":return E(N,!1);case"values":return E(A[N],!1)}return E([N,A[N]],!1)}),"values");var T=g.Arguments=g.Array;if(p("keys"),p("values"),p("entries"),!O&&x&&T.name!=="values")try{j(T,"name",{value:"values"})}catch{}},8598:(d,y,i)=>{var h=i(6518),p=i(9504),g=i(7055),v=i(5397),j=i(4598),k=p([].join);h({target:"Array",proto:!0,forced:g!==Object||!j("join",",")},{join:function(E){return k(v(this),E===void 0?",":E)}})},2062:(d,y,i)=>{var h=i(6518),p=i(9213).map;h({target:"Array",proto:!0,forced:!i(597)("map")},{map:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},2712:(d,y,i)=>{var h=i(6518),p=i(926).left,g=i(4598),v=i(7388);h({target:"Array",proto:!0,forced:!i(9088)&&v>79&&v<83||!g("reduce")},{reduce:function(j){var k=arguments.length;return p(this,j,k,k>1?arguments[1]:void 0)}})},4490:(d,y,i)=>{var h=i(6518),p=i(9504),g=i(4376),v=p([].reverse),j=[1,2];h({target:"Array",proto:!0,forced:String(j)===String(j.reverse())},{reverse:function(){return g(this)&&(this.length=this.length),v(this)}})},4782:(d,y,i)=>{var h=i(6518),p=i(4376),g=i(3517),v=i(34),j=i(5610),k=i(6198),E=i(5397),O=i(4659),x=i(8227),S=i(597),P=i(7680),L=S("slice"),T=x("species"),R=Array,A=Math.max;h({target:"Array",proto:!0,forced:!L},{slice:function(N,D){var M,q,J,G=E(this),X=k(G),le=j(N,X),ue=j(D===void 0?X:D,X);if(p(G)&&(M=G.constructor,(g(M)&&(M===R||p(M.prototype))||v(M)&&(M=M[T])===null)&&(M=void 0),M===R||M===void 0))return P(G,le,ue);for(q=new(M===void 0?R:M)(A(ue-le,0)),J=0;le<ue;le++,J++)le in G&&O(q,J,G[le]);return q.length=J,q}})},5086:(d,y,i)=>{var h=i(6518),p=i(9213).some;h({target:"Array",proto:!0,forced:!i(4598)("some")},{some:function(g){return p(this,g,arguments.length>1?arguments[1]:void 0)}})},6910:(d,y,i)=>{var h=i(6518),p=i(9504),g=i(9306),v=i(8981),j=i(6198),k=i(4606),E=i(655),O=i(9039),x=i(4488),S=i(4598),P=i(8834),L=i(3202),T=i(7388),R=i(9160),A=[],N=p(A.sort),D=p(A.push),M=O((function(){A.sort(void 0)})),q=O((function(){A.sort(null)})),J=S("sort"),G=!O((function(){if(T)return T<70;if(!(P&&P>3)){if(L)return!0;if(R)return R<603;var X,le,ue,he,ce="";for(X=65;X<76;X++){switch(le=String.fromCharCode(X),X){case 66:case 69:case 70:case 72:ue=3;break;case 68:case 71:ue=4;break;default:ue=2}for(he=0;he<47;he++)A.push({k:le+he,v:ue})}for(A.sort((function(me,ie){return ie.v-me.v})),he=0;he<A.length;he++)le=A[he].k.charAt(0),ce.charAt(ce.length-1)!==le&&(ce+=le);return ce!=="DGBEFHACIJK"}}));h({target:"Array",proto:!0,forced:M||!q||!J||!G},{sort:function(X){X!==void 0&&g(X);var le=v(this);if(G)return X===void 0?N(le):N(le,X);var ue,he,ce=[],me=j(le);for(he=0;he<me;he++)he in le&&D(ce,le[he]);for(x(ce,(function(ie){return function(H,ee){return ee===void 0?-1:H===void 0?1:ie!==void 0?+ie(H,ee)||0:E(H)>E(ee)?1:-1}})(X)),ue=j(ce),he=0;he<ue;)le[he]=ce[he++];for(;he<me;)k(le,he++);return le}})},4554:(d,y,i)=>{var h=i(6518),p=i(8981),g=i(5610),v=i(1291),j=i(6198),k=i(4527),E=i(6837),O=i(1469),x=i(4659),S=i(4606),P=i(597)("splice"),L=Math.max,T=Math.min;h({target:"Array",proto:!0,forced:!P},{splice:function(R,A){var N,D,M,q,J,G,X=p(this),le=j(X),ue=g(R,le),he=arguments.length;for(he===0?N=D=0:he===1?(N=0,D=le-ue):(N=he-2,D=T(L(v(A),0),le-ue)),E(le+N-D),M=O(X,D),q=0;q<D;q++)(J=ue+q)in X&&x(M,q,X[J]);if(M.length=D,N<D){for(q=ue;q<le-D;q++)G=q+N,(J=q+D)in X?X[G]=X[J]:S(X,G);for(q=le;q>le-D+N;q--)S(X,q-1)}else if(N>D)for(q=le-D;q>ue;q--)G=q+N-1,(J=q+D-1)in X?X[G]=X[J]:S(X,G);for(q=0;q<N;q++)X[q+ue]=arguments[q+2];return k(X,le-D+N),M}})},1688:(d,y,i)=>{var h=i(6518),p=i(380);h({target:"Date",proto:!0,forced:Date.prototype.toISOString!==p},{toISOString:p})},739:(d,y,i)=>{var h=i(6518),p=i(9039),g=i(8981),v=i(2777);h({target:"Date",proto:!0,arity:1,forced:p((function(){return new Date(NaN).toJSON()!==null||Date.prototype.toJSON.call({toISOString:function(){return 1}})!==1}))},{toJSON:function(j){var k=g(this),E=v(k,"number");return typeof E!="number"||isFinite(E)?k.toISOString():null}})},9572:(d,y,i)=>{var h=i(9297),p=i(6840),g=i(3640),v=i(8227)("toPrimitive"),j=Date.prototype;h(j,v)||p(j,v,g)},3288:(d,y,i)=>{var h=i(9504),p=i(6840),g=Date.prototype,v="Invalid Date",j="toString",k=h(g[j]),E=h(g.getTime);String(new Date(NaN))!==v&&p(g,j,(function(){var O=E(this);return O==O?k(this):v}))},4170:(d,y,i)=>{var h=i(6518),p=i(566);h({target:"Function",proto:!0,forced:Function.bind!==p},{bind:p})},2010:(d,y,i)=>{var h=i(3724),p=i(350).EXISTS,g=i(9504),v=i(2106),j=Function.prototype,k=g(j.toString),E=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,O=g(E.exec);h&&!p&&v(j,"name",{configurable:!0,get:function(){try{return O(E,k(this))[1]}catch{return""}}})},3110:(d,y,i)=>{var h=i(6518),p=i(7751),g=i(8745),v=i(9565),j=i(9504),k=i(9039),E=i(4901),O=i(757),x=i(7680),S=i(6933),P=i(4495),L=String,T=p("JSON","stringify"),R=j(/./.exec),A=j("".charAt),N=j("".charCodeAt),D=j("".replace),M=j(1 .toString),q=/[\uD800-\uDFFF]/g,J=/^[\uD800-\uDBFF]$/,G=/^[\uDC00-\uDFFF]$/,X=!P||k((function(){var ce=p("Symbol")("stringify detection");return T([ce])!=="[null]"||T({a:ce})!=="{}"||T(Object(ce))!=="{}"})),le=k((function(){return T("\uDF06\uD834")!=='"\\udf06\\ud834"'||T("\uDEAD")!=='"\\udead"'})),ue=function(ce,me){var ie=x(arguments),H=S(me);if(E(H)||ce!==void 0&&!O(ce))return ie[1]=function(ee,V){if(E(H)&&(V=v(H,this,L(ee),V)),!O(V))return V},g(T,null,ie)},he=function(ce,me,ie){var H=A(ie,me-1),ee=A(ie,me+1);return R(J,ce)&&!R(G,ee)||R(G,ce)&&!R(J,H)?"\\u"+M(N(ce,0),16):ce};T&&h({target:"JSON",stat:!0,arity:3,forced:X||le},{stringify:function(ce,me,ie){var H=x(arguments),ee=g(X?ue:T,null,H);return le&&typeof ee=="string"?D(ee,q,he):ee}})},4731:(d,y,i)=>{var h=i(4475);i(687)(h.JSON,"JSON",!0)},479:(d,y,i)=>{i(687)(Math,"Math",!0)},2892:(d,y,i)=>{var h=i(6518),p=i(6395),g=i(3724),v=i(4475),j=i(9167),k=i(9504),E=i(2796),O=i(9297),x=i(3167),S=i(1625),P=i(757),L=i(2777),T=i(9039),R=i(8480).f,A=i(7347).f,N=i(4913).f,D=i(1240),M=i(3802).trim,q="Number",J=v[q],G=j[q],X=J.prototype,le=v.TypeError,ue=k("".slice),he=k("".charCodeAt),ce=E(q,!J(" 0o1")||!J("0b1")||J("+0x1")),me=function(H){var ee,V=arguments.length<1?0:J((function(I){var F=L(I,"number");return typeof F=="bigint"?F:(function(te){var ge,be,Oe,ve,U,Z,re,ae,fe=L(te,"number");if(P(fe))throw new le("Cannot convert a Symbol value to a number");if(typeof fe=="string"&&fe.length>2){if(fe=M(fe),(ge=he(fe,0))===43||ge===45){if((be=he(fe,2))===88||be===120)return NaN}else if(ge===48){switch(he(fe,1)){case 66:case 98:Oe=2,ve=49;break;case 79:case 111:Oe=8,ve=55;break;default:return+fe}for(Z=(U=ue(fe,2)).length,re=0;re<Z;re++)if((ae=he(U,re))<48||ae>ve)return NaN;return parseInt(U,Oe)}}return+fe})(F)})(H));return S(X,ee=this)&&T((function(){D(ee)}))?x(Object(V),this,me):V};me.prototype=X,ce&&!p&&(X.constructor=me),h({global:!0,constructor:!0,wrap:!0,forced:ce},{Number:me});var ie=function(H,ee){for(var V,I=g?R(ee):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),F=0;I.length>F;F++)O(ee,V=I[F])&&!O(H,V)&&N(H,V,A(ee,V))};p&&G&&ie(j[q],G),(ce||p)&&ie(j[q],J)},9868:(d,y,i)=>{var h=i(6518),p=i(9504),g=i(1291),v=i(1240),j=i(2333),k=i(9039),E=RangeError,O=String,x=Math.floor,S=p(j),P=p("".slice),L=p(1 .toFixed),T=function(D,M,q){return M===0?q:M%2==1?T(D,M-1,q*D):T(D*D,M/2,q)},R=function(D,M,q){for(var J=-1,G=q;++J<6;)G+=M*D[J],D[J]=G%1e7,G=x(G/1e7)},A=function(D,M){for(var q=6,J=0;--q>=0;)J+=D[q],D[q]=x(J/M),J=J%M*1e7},N=function(D){for(var M=6,q="";--M>=0;)if(q!==""||M===0||D[M]!==0){var J=O(D[M]);q=q===""?J:q+S("0",7-J.length)+J}return q};h({target:"Number",proto:!0,forced:k((function(){return L(8e-5,3)!=="0.000"||L(.9,0)!=="1"||L(1.255,2)!=="1.25"||L(0xde0b6b3a7640080,0)!=="1000000000000000128"}))||!k((function(){L({})}))},{toFixed:function(D){var M,q,J,G,X=v(this),le=g(D),ue=[0,0,0,0,0,0],he="",ce="0";if(le<0||le>20)throw new E("Incorrect fraction digits");if(X!=X)return"NaN";if(X<=-1e21||X>=1e21)return O(X);if(X<0&&(he="-",X=-X),X>1e-21)if(q=(M=(function(me){for(var ie=0,H=me;H>=4096;)ie+=12,H/=4096;for(;H>=2;)ie+=1,H/=2;return ie})(X*T(2,69,1))-69)<0?X*T(2,-M,1):X/T(2,M,1),q*=4503599627370496,(M=52-M)>0){for(R(ue,0,q),J=le;J>=7;)R(ue,1e7,0),J-=7;for(R(ue,T(10,J,1),0),J=M-1;J>=23;)A(ue,8388608),J-=23;A(ue,1<<J),R(ue,1,1),A(ue,2),ce=N(ue)}else R(ue,0,q),R(ue,1<<-M,0),ce=N(ue)+S("0",le);return le>0?he+((G=ce.length)<=le?"0."+S("0",le-G)+ce:P(ce,0,G-le)+"."+P(ce,G-le)):he+ce}})},9085:(d,y,i)=>{var h=i(6518),p=i(4213);h({target:"Object",stat:!0,arity:2,forced:Object.assign!==p},{assign:p})},9904:(d,y,i)=>{i(6518)({target:"Object",stat:!0,sham:!i(3724)},{create:i(2360)})},7945:(d,y,i)=>{var h=i(6518),p=i(3724),g=i(6801).f;h({target:"Object",stat:!0,forced:Object.defineProperties!==g,sham:!p},{defineProperties:g})},4185:(d,y,i)=>{var h=i(6518),p=i(3724),g=i(4913).f;h({target:"Object",stat:!0,forced:Object.defineProperty!==g,sham:!p},{defineProperty:g})},5506:(d,y,i)=>{var h=i(6518),p=i(2357).entries;h({target:"Object",stat:!0},{entries:function(g){return p(g)}})},3851:(d,y,i)=>{var h=i(6518),p=i(9039),g=i(5397),v=i(7347).f,j=i(3724);h({target:"Object",stat:!0,forced:!j||p((function(){v(1)})),sham:!j},{getOwnPropertyDescriptor:function(k,E){return v(g(k),E)}})},1278:(d,y,i)=>{var h=i(6518),p=i(3724),g=i(5031),v=i(5397),j=i(7347),k=i(4659);h({target:"Object",stat:!0,sham:!p},{getOwnPropertyDescriptors:function(E){for(var O,x,S=v(E),P=j.f,L=g(S),T={},R=0;L.length>R;)(x=P(S,O=L[R++]))!==void 0&&k(T,O,x);return T}})},9773:(d,y,i)=>{var h=i(6518),p=i(4495),g=i(9039),v=i(3717),j=i(8981);h({target:"Object",stat:!0,forced:!p||g((function(){v.f(1)}))},{getOwnPropertySymbols:function(k){var E=v.f;return E?E(j(k)):[]}})},875:(d,y,i)=>{var h=i(6518),p=i(9039),g=i(8981),v=i(2787),j=i(2211);h({target:"Object",stat:!0,forced:p((function(){v(1)})),sham:!j},{getPrototypeOf:function(k){return v(g(k))}})},9432:(d,y,i)=>{var h=i(6518),p=i(8981),g=i(1072);h({target:"Object",stat:!0,forced:i(9039)((function(){g(1)}))},{keys:function(v){return g(p(v))}})},287:(d,y,i)=>{i(6518)({target:"Object",stat:!0},{setPrototypeOf:i(2967)})},6099:(d,y,i)=>{var h=i(2140),p=i(6840),g=i(3179);h||p(Object.prototype,"toString",g,{unsafe:!0})},6034:(d,y,i)=>{var h=i(6518),p=i(2357).values;h({target:"Object",stat:!0},{values:function(g){return p(g)}})},8459:(d,y,i)=>{var h=i(6518),p=i(3904);h({global:!0,forced:parseFloat!==p},{parseFloat:p})},8940:(d,y,i)=>{var h=i(6518),p=i(2703);h({global:!0,forced:parseInt!==p},{parseInt:p})},6499:(d,y,i)=>{var h=i(6518),p=i(9565),g=i(9306),v=i(6043),j=i(1103),k=i(2652);h({target:"Promise",stat:!0,forced:i(537)},{all:function(E){var O=this,x=v.f(O),S=x.resolve,P=x.reject,L=j((function(){var T=g(O.resolve),R=[],A=0,N=1;k(E,(function(D){var M=A++,q=!1;N++,p(T,O,D).then((function(J){q||(q=!0,R[M]=J,--N||S(R))}),P)})),--N||S(R)}));return L.error&&P(L.value),x.promise}})},2003:(d,y,i)=>{var h=i(6518),p=i(6395),g=i(916).CONSTRUCTOR,v=i(550),j=i(7751),k=i(4901),E=i(6840),O=v&&v.prototype;if(h({target:"Promise",proto:!0,forced:g,real:!0},{catch:function(S){return this.then(void 0,S)}}),!p&&k(v)){var x=j("Promise").prototype.catch;O.catch!==x&&E(O,"catch",x,{unsafe:!0})}},436:(d,y,i)=>{var h,p,g,v=i(6518),j=i(6395),k=i(9088),E=i(4475),O=i(9565),x=i(6840),S=i(2967),P=i(687),L=i(7633),T=i(9306),R=i(4901),A=i(34),N=i(679),D=i(2293),M=i(9225).set,q=i(1955),J=i(3138),G=i(1103),X=i(8265),le=i(1181),ue=i(550),he=i(916),ce=i(6043),me="Promise",ie=he.CONSTRUCTOR,H=he.REJECTION_EVENT,ee=he.SUBCLASSING,V=le.getterFor(me),I=le.set,F=ue&&ue.prototype,te=ue,ge=F,be=E.TypeError,Oe=E.document,ve=E.process,U=ce.f,Z=U,re=!!(Oe&&Oe.createEvent&&E.dispatchEvent),ae="unhandledrejection",fe=function(ye){var ke;return!(!A(ye)||!R(ke=ye.then))&&ke},Ce=function(ye,ke){var xe,De,Je,pt=ke.value,jt=ke.state===1,bt=jt?ye.ok:ye.fail,ht=ye.resolve,Ot=ye.reject,Nt=ye.domain;try{bt?(jt||(ke.rejection===2&&et(ke),ke.rejection=1),bt===!0?xe=pt:(Nt&&Nt.enter(),xe=bt(pt),Nt&&(Nt.exit(),Je=!0)),xe===ye.promise?Ot(new be("Promise-chain cycle")):(De=fe(xe))?O(De,xe,ht,Ot):ht(xe)):Ot(pt)}catch(gt){Nt&&!Je&&Nt.exit(),Ot(gt)}},He=function(ye,ke){ye.notified||(ye.notified=!0,q((function(){for(var xe,De=ye.reactions;xe=De.get();)Ce(xe,ye);ye.notified=!1,ke&&!ye.rejection&&nt(ye)})))},We=function(ye,ke,xe){var De,Je;re?((De=Oe.createEvent("Event")).promise=ke,De.reason=xe,De.initEvent(ye,!1,!0),E.dispatchEvent(De)):De={promise:ke,reason:xe},!H&&(Je=E["on"+ye])?Je(De):ye===ae&&J("Unhandled promise rejection",xe)},nt=function(ye){O(M,E,(function(){var ke,xe=ye.facade,De=ye.value;if(Ze(ye)&&(ke=G((function(){k?ve.emit("unhandledRejection",De,xe):We(ae,xe,De)})),ye.rejection=k||Ze(ye)?2:1,ke.error))throw ke.value}))},Ze=function(ye){return ye.rejection!==1&&!ye.parent},et=function(ye){O(M,E,(function(){var ke=ye.facade;k?ve.emit("rejectionHandled",ke):We("rejectionhandled",ke,ye.value)}))},tt=function(ye,ke,xe){return function(De){ye(ke,De,xe)}},Ue=function(ye,ke,xe){ye.done||(ye.done=!0,xe&&(ye=xe),ye.value=ke,ye.state=2,He(ye,!0))},ot=function(ye,ke,xe){if(!ye.done){ye.done=!0,xe&&(ye=xe);try{if(ye.facade===ke)throw new be("Promise can't be resolved itself");var De=fe(ke);De?q((function(){var Je={done:!1};try{O(De,ke,tt(ot,Je,ye),tt(Ue,Je,ye))}catch(pt){Ue(Je,pt,ye)}})):(ye.value=ke,ye.state=1,He(ye,!1))}catch(Je){Ue({done:!1},Je,ye)}}};if(ie&&(ge=(te=function(ye){N(this,ge),T(ye),O(h,this);var ke=V(this);try{ye(tt(ot,ke),tt(Ue,ke))}catch(xe){Ue(ke,xe)}}).prototype,(h=function(ye){I(this,{type:me,done:!1,notified:!1,parent:!1,reactions:new X,rejection:!1,state:0,value:void 0})}).prototype=x(ge,"then",(function(ye,ke){var xe=V(this),De=U(D(this,te));return xe.parent=!0,De.ok=!R(ye)||ye,De.fail=R(ke)&&ke,De.domain=k?ve.domain:void 0,xe.state===0?xe.reactions.add(De):q((function(){Ce(De,xe)})),De.promise})),p=function(){var ye=new h,ke=V(ye);this.promise=ye,this.resolve=tt(ot,ke),this.reject=tt(Ue,ke)},ce.f=U=function(ye){return ye===te||ye===void 0?new p(ye):Z(ye)},!j&&R(ue)&&F!==Object.prototype)){g=F.then,ee||x(F,"then",(function(ye,ke){var xe=this;return new te((function(De,Je){O(g,xe,De,Je)})).then(ye,ke)}),{unsafe:!0});try{delete F.constructor}catch{}S&&S(F,ge)}v({global:!0,constructor:!0,wrap:!0,forced:ie},{Promise:te}),P(te,me,!1,!0),L(me)},3362:(d,y,i)=>{i(436),i(6499),i(2003),i(7743),i(1481),i(280)},7743:(d,y,i)=>{var h=i(6518),p=i(9565),g=i(9306),v=i(6043),j=i(1103),k=i(2652);h({target:"Promise",stat:!0,forced:i(537)},{race:function(E){var O=this,x=v.f(O),S=x.reject,P=j((function(){var L=g(O.resolve);k(E,(function(T){p(L,O,T).then(x.resolve,S)}))}));return P.error&&S(P.value),x.promise}})},1481:(d,y,i)=>{var h=i(6518),p=i(6043);h({target:"Promise",stat:!0,forced:i(916).CONSTRUCTOR},{reject:function(g){var v=p.f(this);return(0,v.reject)(g),v.promise}})},280:(d,y,i)=>{var h=i(6518),p=i(7751),g=i(6395),v=i(550),j=i(916).CONSTRUCTOR,k=i(3438),E=p("Promise"),O=g&&!j;h({target:"Promise",stat:!0,forced:g||j},{resolve:function(x){return k(O&&this===E?v:this,x)}})},825:(d,y,i)=>{var h=i(6518),p=i(7751),g=i(8745),v=i(566),j=i(5548),k=i(8551),E=i(34),O=i(2360),x=i(9039),S=p("Reflect","construct"),P=Object.prototype,L=[].push,T=x((function(){function N(){}return!(S((function(){}),[],N)instanceof N)})),R=!x((function(){S((function(){}))})),A=T||R;h({target:"Reflect",stat:!0,forced:A,sham:A},{construct:function(N,D){j(N),k(D);var M=arguments.length<3?N:j(arguments[2]);if(R&&!T)return S(N,D,M);if(N===M){switch(D.length){case 0:return new N;case 1:return new N(D[0]);case 2:return new N(D[0],D[1]);case 3:return new N(D[0],D[1],D[2]);case 4:return new N(D[0],D[1],D[2],D[3])}var q=[null];return g(L,q,D),new(g(v,N,q))}var J=M.prototype,G=O(E(J)?J:P),X=g(N,G,D);return E(X)?X:G}})},888:(d,y,i)=>{var h=i(6518),p=i(9565),g=i(34),v=i(8551),j=i(6575),k=i(7347),E=i(2787);h({target:"Reflect",stat:!0},{get:function O(x,S){var P,L,T=arguments.length<3?x:arguments[2];return v(x)===T?x[S]:(P=k.f(x,S))?j(P)?P.value:P.get===void 0?void 0:p(P.get,T):g(L=E(x))?O(L,S,T):void 0}})},4864:(d,y,i)=>{var h=i(3724),p=i(4475),g=i(9504),v=i(2796),j=i(3167),k=i(6699),E=i(2360),O=i(8480).f,x=i(1625),S=i(788),P=i(655),L=i(1034),T=i(8429),R=i(1056),A=i(6840),N=i(9039),D=i(9297),M=i(1181).enforce,q=i(7633),J=i(8227),G=i(3635),X=i(8814),le=J("match"),ue=p.RegExp,he=ue.prototype,ce=p.SyntaxError,me=g(he.exec),ie=g("".charAt),H=g("".replace),ee=g("".indexOf),V=g("".slice),I=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,F=/a/g,te=/a/g,ge=new ue(F)!==F,be=T.MISSED_STICKY,Oe=T.UNSUPPORTED_Y;if(v("RegExp",h&&(!ge||be||G||X||N((function(){return te[le]=!1,ue(F)!==F||ue(te)===te||String(ue(F,"i"))!=="/a/i"}))))){for(var ve=function(re,ae){var fe,Ce,He,We,nt,Ze,et=x(he,this),tt=S(re),Ue=ae===void 0,ot=[],ye=re;if(!et&&tt&&Ue&&re.constructor===ve)return re;if((tt||x(he,re))&&(re=re.source,Ue&&(ae=L(ye))),re=re===void 0?"":P(re),ae=ae===void 0?"":P(ae),ye=re,G&&"dotAll"in F&&(Ce=!!ae&&ee(ae,"s")>-1)&&(ae=H(ae,/s/g,"")),fe=ae,be&&"sticky"in F&&(He=!!ae&&ee(ae,"y")>-1)&&Oe&&(ae=H(ae,/y/g,"")),X&&(We=(function(ke){for(var xe,De=ke.length,Je=0,pt="",jt=[],bt=E(null),ht=!1,Ot=!1,Nt=0,gt="";Je<=De;Je++){if((xe=ie(ke,Je))==="\\")xe+=ie(ke,++Je);else if(xe==="]")ht=!1;else if(!ht)switch(!0){case xe==="[":ht=!0;break;case xe==="(":me(I,V(ke,Je+1))&&(Je+=2,Ot=!0),pt+=xe,Nt++;continue;case(xe===">"&&Ot):if(gt===""||D(bt,gt))throw new ce("Invalid capture group name");bt[gt]=!0,jt[jt.length]=[gt,Nt],Ot=!1,gt="";continue}Ot?gt+=xe:pt+=xe}return[pt,jt]})(re),re=We[0],ot=We[1]),nt=j(ue(re,ae),et?this:he,ve),(Ce||He||ot.length)&&(Ze=M(nt),Ce&&(Ze.dotAll=!0,Ze.raw=ve((function(ke){for(var xe,De=ke.length,Je=0,pt="",jt=!1;Je<=De;Je++)(xe=ie(ke,Je))!=="\\"?jt||xe!=="."?(xe==="["?jt=!0:xe==="]"&&(jt=!1),pt+=xe):pt+="[\\s\\S]":pt+=xe+ie(ke,++Je);return pt})(re),fe)),He&&(Ze.sticky=!0),ot.length&&(Ze.groups=ot)),re!==ye)try{k(nt,"source",ye===""?"(?:)":ye)}catch{}return nt},U=O(ue),Z=0;U.length>Z;)R(ve,ue,U[Z++]);he.constructor=ve,ve.prototype=he,A(p,"RegExp",ve,{constructor:!0})}q("RegExp")},7495:(d,y,i)=>{var h=i(6518),p=i(7323);h({target:"RegExp",proto:!0,forced:/./.exec!==p},{exec:p})},8781:(d,y,i)=>{var h=i(350).PROPER,p=i(6840),g=i(8551),v=i(655),j=i(9039),k=i(1034),E="toString",O=RegExp.prototype,x=O[E],S=j((function(){return x.call({source:"a",flags:"b"})!=="/a/b"})),P=h&&x.name!==E;(S||P)&&p(O,E,(function(){var L=g(this);return"/"+v(L.source)+"/"+v(k(L))}),{unsafe:!0})},1699:(d,y,i)=>{var h=i(6518),p=i(9504),g=i(5749),v=i(7750),j=i(655),k=i(1436),E=p("".indexOf);h({target:"String",proto:!0,forced:!k("includes")},{includes:function(O){return!!~E(j(v(this)),j(g(O)),arguments.length>1?arguments[1]:void 0)}})},7764:(d,y,i)=>{var h=i(8183).charAt,p=i(655),g=i(1181),v=i(1088),j=i(2529),k="String Iterator",E=g.set,O=g.getterFor(k);v(String,"String",(function(x){E(this,{type:k,string:p(x),index:0})}),(function(){var x,S=O(this),P=S.string,L=S.index;return L>=P.length?j(void 0,!0):(x=h(P,L),S.index+=x.length,j(x,!1))}))},1761:(d,y,i)=>{var h=i(9565),p=i(9228),g=i(8551),v=i(4117),j=i(8014),k=i(655),E=i(7750),O=i(5966),x=i(7829),S=i(6682);p("match",(function(P,L,T){return[function(R){var A=E(this),N=v(R)?void 0:O(R,P);return N?h(N,R,A):new RegExp(R)[P](k(A))},function(R){var A=g(this),N=k(R),D=T(L,A,N);if(D.done)return D.value;if(!A.global)return S(A,N);var M=A.unicode;A.lastIndex=0;for(var q,J=[],G=0;(q=S(A,N))!==null;){var X=k(q[0]);J[G]=X,X===""&&(A.lastIndex=x(N,j(A.lastIndex),M)),G++}return G===0?null:J}]}))},5440:(d,y,i)=>{var h=i(8745),p=i(9565),g=i(9504),v=i(9228),j=i(9039),k=i(8551),E=i(4901),O=i(4117),x=i(1291),S=i(8014),P=i(655),L=i(7750),T=i(7829),R=i(5966),A=i(2478),N=i(6682),D=i(8227)("replace"),M=Math.max,q=Math.min,J=g([].concat),G=g([].push),X=g("".indexOf),le=g("".slice),ue="a".replace(/./,"$0")==="$0",he=!!/./[D]&&/./[D]("a","$0")==="";v("replace",(function(ce,me,ie){var H=he?"$":"$0";return[function(ee,V){var I=L(this),F=O(ee)?void 0:R(ee,D);return F?p(F,ee,I,V):p(me,P(I),ee,V)},function(ee,V){var I=k(this),F=P(ee);if(typeof V=="string"&&X(V,H)===-1&&X(V,"$<")===-1){var te=ie(me,I,F,V);if(te.done)return te.value}var ge=E(V);ge||(V=P(V));var be,Oe=I.global;Oe&&(be=I.unicode,I.lastIndex=0);for(var ve,U=[];(ve=N(I,F))!==null&&(G(U,ve),Oe);)P(ve[0])===""&&(I.lastIndex=T(F,S(I.lastIndex),be));for(var Z,re="",ae=0,fe=0;fe<U.length;fe++){for(var Ce,He=P((ve=U[fe])[0]),We=M(q(x(ve.index),F.length),0),nt=[],Ze=1;Ze<ve.length;Ze++)G(nt,(Z=ve[Ze])===void 0?Z:String(Z));var et=ve.groups;if(ge){var tt=J([He],nt,We,F);et!==void 0&&G(tt,et),Ce=P(h(V,void 0,tt))}else Ce=A(He,F,We,nt,et,V);We>=ae&&(re+=le(F,ae,We)+Ce,ae=We+He.length)}return re+le(F,ae)}]}),!!j((function(){var ce=/./;return ce.exec=function(){var me=[];return me.groups={a:"7"},me},"".replace(ce,"$<a>")!=="7"}))||!ue||he)},1392:(d,y,i)=>{var h,p=i(6518),g=i(7476),v=i(7347).f,j=i(8014),k=i(655),E=i(5749),O=i(7750),x=i(1436),S=i(6395),P=g("".slice),L=Math.min,T=x("startsWith");p({target:"String",proto:!0,forced:!(!S&&!T&&(h=v(String.prototype,"startsWith"),h&&!h.writable)||T)},{startsWith:function(R){var A=k(O(this));E(R);var N=j(L(arguments.length>1?arguments[1]:void 0,A.length)),D=k(R);return P(A,N,N+D.length)===D}})},2762:(d,y,i)=>{var h=i(6518),p=i(3802).trim;h({target:"String",proto:!0,forced:i(706)("trim")},{trim:function(){return p(this)}})},6412:(d,y,i)=>{i(511)("asyncIterator")},6761:(d,y,i)=>{var h=i(6518),p=i(4475),g=i(9565),v=i(9504),j=i(6395),k=i(3724),E=i(4495),O=i(9039),x=i(9297),S=i(1625),P=i(8551),L=i(5397),T=i(6969),R=i(655),A=i(6980),N=i(2360),D=i(1072),M=i(8480),q=i(298),J=i(3717),G=i(7347),X=i(4913),le=i(6801),ue=i(8773),he=i(6840),ce=i(2106),me=i(5745),ie=i(6119),H=i(421),ee=i(3392),V=i(8227),I=i(1951),F=i(511),te=i(8242),ge=i(687),be=i(1181),Oe=i(9213).forEach,ve=ie("hidden"),U="Symbol",Z="prototype",re=be.set,ae=be.getterFor(U),fe=Object[Z],Ce=p.Symbol,He=Ce&&Ce[Z],We=p.RangeError,nt=p.TypeError,Ze=p.QObject,et=G.f,tt=X.f,Ue=q.f,ot=ue.f,ye=v([].push),ke=me("symbols"),xe=me("op-symbols"),De=me("wks"),Je=!Ze||!Ze[Z]||!Ze[Z].findChild,pt=function(Le,Be,$e){var Fe=et(fe,Be);Fe&&delete fe[Be],tt(Le,Be,$e),Fe&&Le!==fe&&tt(fe,Be,Fe)},jt=k&&O((function(){return N(tt({},"a",{get:function(){return tt(this,"a",{value:7}).a}})).a!==7}))?pt:tt,bt=function(Le,Be){var $e=ke[Le]=N(He);return re($e,{type:U,tag:Le,description:Be}),k||($e.description=Be),$e},ht=function(Le,Be,$e){Le===fe&&ht(xe,Be,$e),P(Le);var Fe=T(Be);return P($e),x(ke,Fe)?($e.enumerable?(x(Le,ve)&&Le[ve][Fe]&&(Le[ve][Fe]=!1),$e=N($e,{enumerable:A(0,!1)})):(x(Le,ve)||tt(Le,ve,A(1,N(null))),Le[ve][Fe]=!0),jt(Le,Fe,$e)):tt(Le,Fe,$e)},Ot=function(Le,Be){P(Le);var $e=L(Be),Fe=D($e).concat(va($e));return Oe(Fe,(function(ft){k&&!g(Nt,$e,ft)||ht(Le,ft,$e[ft])})),Le},Nt=function(Le){var Be=T(Le),$e=g(ot,this,Be);return!(this===fe&&x(ke,Be)&&!x(xe,Be))&&(!($e||!x(this,Be)||!x(ke,Be)||x(this,ve)&&this[ve][Be])||$e)},gt=function(Le,Be){var $e=L(Le),Fe=T(Be);if($e!==fe||!x(ke,Fe)||x(xe,Fe)){var ft=et($e,Fe);return!ft||!x(ke,Fe)||x($e,ve)&&$e[ve][Fe]||(ft.enumerable=!0),ft}},ya=function(Le){var Be=Ue(L(Le)),$e=[];return Oe(Be,(function(Fe){x(ke,Fe)||x(H,Fe)||ye($e,Fe)})),$e},va=function(Le){var Be=Le===fe,$e=Ue(Be?xe:L(Le)),Fe=[];return Oe($e,(function(ft){!x(ke,ft)||Be&&!x(fe,ft)||ye(Fe,ke[ft])})),Fe};E||(he(He=(Ce=function(){if(S(He,this))throw new nt("Symbol is not a constructor");var Le=arguments.length&&arguments[0]!==void 0?R(arguments[0]):void 0,Be=ee(Le),$e=function(Fe){var ft=this===void 0?p:this;ft===fe&&g($e,xe,Fe),x(ft,ve)&&x(ft[ve],Be)&&(ft[ve][Be]=!1);var ba=A(1,Fe);try{jt(ft,Be,ba)}catch(Wr){if(!(Wr instanceof We))throw Wr;pt(ft,Be,ba)}};return k&&Je&&jt(fe,Be,{configurable:!0,set:$e}),bt(Be,Le)})[Z],"toString",(function(){return ae(this).tag})),he(Ce,"withoutSetter",(function(Le){return bt(ee(Le),Le)})),ue.f=Nt,X.f=ht,le.f=Ot,G.f=gt,M.f=q.f=ya,J.f=va,I.f=function(Le){return bt(V(Le),Le)},k&&(ce(He,"description",{configurable:!0,get:function(){return ae(this).description}}),j||he(fe,"propertyIsEnumerable",Nt,{unsafe:!0}))),h({global:!0,constructor:!0,wrap:!0,forced:!E,sham:!E},{Symbol:Ce}),Oe(D(De),(function(Le){F(Le)})),h({target:U,stat:!0,forced:!E},{useSetter:function(){Je=!0},useSimple:function(){Je=!1}}),h({target:"Object",stat:!0,forced:!E,sham:!k},{create:function(Le,Be){return Be===void 0?N(Le):Ot(N(Le),Be)},defineProperty:ht,defineProperties:Ot,getOwnPropertyDescriptor:gt}),h({target:"Object",stat:!0,forced:!E},{getOwnPropertyNames:ya}),te(),ge(Ce,U),H[ve]=!0},9463:(d,y,i)=>{var h=i(6518),p=i(3724),g=i(4475),v=i(9504),j=i(9297),k=i(4901),E=i(1625),O=i(655),x=i(2106),S=i(7740),P=g.Symbol,L=P&&P.prototype;if(p&&k(P)&&(!("description"in L)||P().description!==void 0)){var T={},R=function(){var G=arguments.length<1||arguments[0]===void 0?void 0:O(arguments[0]),X=E(L,this)?new P(G):G===void 0?P():P(G);return G===""&&(T[X]=!0),X};S(R,P),R.prototype=L,L.constructor=R;var A=String(P("description detection"))==="Symbol(description detection)",N=v(L.valueOf),D=v(L.toString),M=/^Symbol\((.*)\)[^)]+$/,q=v("".replace),J=v("".slice);x(L,"description",{configurable:!0,get:function(){var G=N(this);if(j(T,G))return"";var X=D(G),le=A?J(X,7,-1):q(X,M,"$1");return le===""?void 0:le}}),h({global:!0,constructor:!0,forced:!0},{Symbol:R})}},1510:(d,y,i)=>{var h=i(6518),p=i(7751),g=i(9297),v=i(655),j=i(5745),k=i(1296),E=j("string-to-symbol-registry"),O=j("symbol-to-string-registry");h({target:"Symbol",stat:!0,forced:!k},{for:function(x){var S=v(x);if(g(E,S))return E[S];var P=p("Symbol")(S);return E[S]=P,O[P]=S,P}})},2259:(d,y,i)=>{i(511)("iterator")},2675:(d,y,i)=>{i(6761),i(1510),i(7812),i(3110),i(9773)},7812:(d,y,i)=>{var h=i(6518),p=i(9297),g=i(757),v=i(6823),j=i(5745),k=i(1296),E=j("symbol-to-string-registry");h({target:"Symbol",stat:!0,forced:!k},{keyFor:function(O){if(!g(O))throw new TypeError(v(O)+" is not a symbol");if(p(E,O))return E[O]}})},5700:(d,y,i)=>{var h=i(511),p=i(8242);h("toPrimitive"),p()},8125:(d,y,i)=>{var h=i(7751),p=i(511),g=i(687);p("toStringTag"),g(h("Symbol"),"Symbol")},3500:(d,y,i)=>{var h=i(4475),p=i(7400),g=i(9296),v=i(235),j=i(6699),k=function(O){if(O&&O.forEach!==v)try{j(O,"forEach",v)}catch{O.forEach=v}};for(var E in p)p[E]&&k(h[E]&&h[E].prototype);k(g)},2953:(d,y,i)=>{var h=i(4475),p=i(7400),g=i(9296),v=i(3792),j=i(6699),k=i(687),E=i(8227)("iterator"),O=v.values,x=function(P,L){if(P){if(P[E]!==O)try{j(P,E,O)}catch{P[E]=O}if(k(P,L,!0),p[L]){for(var T in v)if(P[T]!==v[T])try{j(P,T,v[T])}catch{P[T]=v[T]}}}};for(var S in p)x(h[S]&&h[S].prototype,S);x(g,"DOMTokenList")},5575:(d,y,i)=>{var h=i(6518),p=i(4475),g=i(9472)(p.setInterval,!0);h({global:!0,bind:!0,forced:p.setInterval!==g},{setInterval:g})},4599:(d,y,i)=>{var h=i(6518),p=i(4475),g=i(9472)(p.setTimeout,!0);h({global:!0,bind:!0,forced:p.setTimeout!==g},{setTimeout:g})},6031:(d,y,i)=>{i(5575),i(4599)}},m={};function b(d){var y=m[d];if(y!==void 0)return y.exports;var i=m[d]={exports:{}};return f[d].call(i.exports,i,i.exports,b),i.exports}b.d=(d,y)=>{for(var i in y)b.o(y,i)&&!b.o(d,i)&&Object.defineProperty(d,i,{enumerable:!0,get:y[i]})},b.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}})(),b.o=(d,y)=>Object.prototype.hasOwnProperty.call(d,y),b.r=d=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(d,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(d,"__esModule",{value:!0})};var w={};return(()=>{b.r(w),b.d(w,{JSONEditor:()=>tn}),b(2675),b(9463),b(6412),b(2259),b(5700),b(8125),b(8706),b(113),b(1629),b(3418),b(4346),b(3792),b(2712),b(4490),b(4782),b(739),b(9572),b(3288),b(2010),b(4731),b(479),b(2892),b(9085),b(9904),b(4185),b(875),b(9432),b(287),b(6099),b(6034),b(3362),b(7495),b(8781),b(7764),b(3500),b(2953),b(5506),b(4864),b(5440),b(4423);var d=["actionscript","batchfile","c","c++","cpp","coffee","csharp","css","dart","django","ejs","erlang","golang","groovy","handlebars","haskell","haxe","html","ini","jade","java","javascript","json","less","lisp","lua","makefile","matlab","mysql","objectivec","pascal","perl","pgsql","php","python","prql","r","ruby","rust","sass","scala","scss","sh","smarty","sql","sqlserver","stylus","svg","typescript","twig","vbscript","xml","yaml","zig"],y=[function(a){return a.type==="string"&&a.format==="color"&&"colorpicker"},function(a){return a.type==="string"&&["ip","ipv4","ipv6","hostname"].includes(a.format)&&"ip"},function(a){return a.type==="string"&&d.includes(a.format)&&"ace"},function(a){return a.type==="string"&&["xhtml","bbcode"].includes(a.format)&&"sceditor"},function(a){return a.type==="string"&&a.format==="markdown"&&"simplemde"},function(a){return a.type==="string"&&a.format==="jodit"&&"jodit"},function(a){return a.type==="string"&&a.format==="autocomplete"&&"autocomplete"},function(a){return a.type==="string"&&a.format==="uuid"&&"uuid"},function(a){return a.format==="info"&&"info"},function(a){return a.format==="button"&&"button"},function(a){if((a.type==="integer"||a.type==="number")&&a.format==="stepper")return"stepper"},function(a){if(a.links){for(var r=0;r<a.links.length;r++)if(a.links[r].rel&&a.links[r].rel.toLowerCase()==="describedby")return"describedBy"}},function(a){return["string","integer"].includes(a.type)&&["starrating","rating"].includes(a.format)&&"starrating"},function(a){return["string","integer"].includes(a.type)&&["date","time","datetime-local"].includes(a.format)&&"datetime"},function(a){var r,n;return(a.oneOf||a.anyOf)&&((r=(n=a.options)===null||n===void 0?void 0:n.switcher)===null||r===void 0||r)===!0&&"multiple"},function(a){return a.if&&"multiple"},function(a,r){if(a.items&&(a.items=r.expandSchema(a.items)),a.type==="array"&&a.items&&!Array.isArray(a.items)&&["string","number","integer"].includes(a.items.type)){if(a.format==="choices")return"arrayChoices";if(a.uniqueItems){if(a.format==="selectize")return"arraySelectize";if(a.format==="select2")return"arraySelect2";if(a.items.enum)return"multiselect"}}},function(a){if(a.enum){if(a.type==="array"||a.type==="object")return"enum";if(a.type==="number"||a.type==="integer"||a.type==="string")return a.format==="radio"?"radio":a.format==="select2"?"select2":a.format==="selectize"?"selectize":a.format==="choices"?"choices":"select"}},function(a){if(a.enumSource)return a.format==="radio"?"radio":a.format==="select2"?"select2":a.format==="selectize"?"selectize":a.format==="choices"?"choices":"select"},function(a){return a.type==="array"&&a.format==="table"&&"table"},function(a){return a.type==="string"&&a.format==="url"&&window.FileReader&&a.options&&a.options.upload===Object(a.options.upload)&&"upload"},function(a){return a.type==="string"&&a.media&&a.media.binaryEncoding==="base64"&&"base64"},function(a){return a.type==="any"&&"multiple"},function(a){if(a.type==="boolean")return a.format==="checkbox"||a.options&&a.options.checkbox?"checkbox":a.format==="select2"?"select2":a.format==="selectize"?"selectize":a.format==="choices"?"choices":"select"},function(a){return a.type==="string"&&a.format==="signature"&&"signature"},function(a){return typeof a.type=="string"&&["string","number","integer","boolean","null","array","object"].includes(a.type)&&a.type},function(a){return!a.type&&a.properties&&"object"},function(a){return typeof a.type!="string"&&"multiple"},function(a){return typeof a.type=="string"&&"string"}];function i(a,r,n){var l;return l=(function(e,t){if(h(e)!="object"||!e)return e;var o=e[Symbol.toPrimitive];if(o!==void 0){var c=o.call(e,"string");if(h(c)!="object")return c;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)})(r),(r=h(l)=="symbol"?l:l+"")in a?Object.defineProperty(a,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[r]=n,a}function h(a){return h=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},h(a)}function p(a){return!(a===null||h(a)!=="object"||a.nodeType||a===a.window||a.constructor&&!E(a.constructor.prototype,"isPrototypeOf"))}function g(a){return p(a)?v({},a):Array.isArray(a)?a.map(g):a}function v(a){for(var r=arguments.length,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];return n.forEach((function(e){e&&Object.keys(e).forEach((function(t){e[t]&&p(e[t])?(E(a,t)||(a[t]={}),v(a[t],e[t])):Array.isArray(e[t])?a[t]=g(e[t]):a[t]=e[t]}))})),a}function j(a,r){var n=document.createEvent("HTMLEvents");n.initEvent(r,!0,!0),a.dispatchEvent(n)}function k(a){return a&&(a.toString()==="[object ShadowRoot]"?a:k(a.parentNode))}function E(a,r){return a&&Object.prototype.hasOwnProperty.call(a,r)}b(4170),b(3851),b(825),b(888),b(8598),b(1699),b(1761),b(5276),b(5086),b(1392),b(2062),b(8459),b(8940);var O=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,x=/^\s*(-|\+)?(\d+)\s*$/;function S(){var a=new Date().getTime();return typeof performance<"u"&&typeof performance.now=="function"&&(a+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(r){var n=(a+16*Math.random())%16|0;return a=Math.floor(a/16),(r==="x"?n:3&n|8).toString(16)}))}function P(a){return a&&h(a)==="object"&&!Array.isArray(a)}function L(a){for(var r=arguments.length,n=new Array(r>1?r-1:0),l=1;l<r;l++)n[l-1]=arguments[l];if(!n.length)return a;var e=n.shift();if(P(a)&&P(e))for(var t in e)P(e[t])?(a[t]||Object.assign(a,i({},t,{})),L(a[t],e[t])):Object.assign(a,i({},t,e[t]));return L.apply(void 0,[a].concat(n))}function T(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function R(a){return R=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},R(a)}function A(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,N(l.key),l)}}function N(a){var r=(function(n,l){if(R(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(R(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return R(r)=="symbol"?r:r+""}var D=(function(){return a=function n(l,e){var t,o;(function(c,_){if(!(c instanceof _))throw new TypeError("Cannot call a class as a function")})(this,n),this.defaults=e,this.jsoneditor=l.jsoneditor,this.theme=this.jsoneditor.theme,this.template_engine=this.jsoneditor.template,this.iconlib=this.jsoneditor.iconlib,this.translate=this.jsoneditor.translate||this.defaults.translate,this.translateProperty=this.jsoneditor.translateProperty||this.defaults.translateProperty,this.original_schema=l.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.isUiOnly=!1,this.options=v({},this.options||{},this.schema.options||{},l.schema.options||{},l),this.enforceConstEnabled=(t=this.options.enforce_const)!==null&&t!==void 0?t:this.jsoneditor.options.enforce_const,this.formname=this.jsoneditor.options.form_name_root||"root",l.path||this.schema.id||(this.schema.id=this.formname),this.path=l.path||this.formname,this.formname=l.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=l.parent,this.key=this.parent!==void 0?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,this.optInWidget=(o=this.options.opt_in_widget)!==null&&o!==void 0?o:this.jsoneditor.options.opt_in_widget,l.container&&this.setContainer(l.container),this.registerDependencies()},r=[{key:"onChildEditorChange",value:function(n,l){this.onChange(!0,!1,l)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(n){this.parent?this.parent.onChildEditorChange(this,n):this.jsoneditor&&this.jsoneditor.onChange(n)}},{key:"onChange",value:function(n,l,e){this.notify(),l||this.watch_listener&&this.watch_listener(),n&&this.change(e)}},{key:"register",value:function(){if(this.jsoneditor.registerEditor(this),this.input&&!this.label){var n=this.getTitle()||this.formname;this.input.setAttribute("aria-label",n)}this.onChange()}},{key:"unregister",value:function(){this.jsoneditor&&this.jsoneditor.unregisterEditor(this)}},{key:"getNumColumns",value:function(){return 12}},{key:"isActive",value:function(){return this.active}},{key:"activate",value:function(){this.active=!0,this.optInCheckbox.checked=!0,this.enable(),this.change()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.optInCheckbox.checked=!1,this.disable(),this.change())}},{key:"registerDependencies",value:function(){var n=this;this.dependenciesFulfilled=!0;var l=this.options.dependencies;l&&Object.keys(l).forEach((function(e){var t;e.startsWith(n.jsoneditor.root.path)?t=e:((t=n.path.split("."))[t.length-1]=e,t=t.join(".")),n.jsoneditor.watch(t,(function(){n.evaluateDependencies()}))}))}},{key:"evaluateDependencies",value:function(){var n=this,l=this.container||this.control;if(l&&this.jsoneditor!==null){var e=this.options.dependencies;if(e){var t=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(e).forEach((function(c){var _;c.startsWith(n.jsoneditor.root.path)?_=c:((_=n.path.split("."))[_.length-1]=c,_=_.join("."));var C=e[c];n.checkDependency(_,C)})),this.dependenciesFulfilled!==t&&this.notify();var o=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(o="none"),l.tagName==="TD"?Object.keys(l.childNodes).forEach((function(c){return l.childNodes[c].style.display=o})):l.style.display=o}}}},{key:"checkDependency",value:function(n,l){var e=this;if(this.path!==n&&this.jsoneditor!==null){var t=this.jsoneditor.getEditor(n),o=t?t.getValue():void 0;t&&t.dependenciesFulfilled&&o?Array.isArray(l)?this.dependenciesFulfilled=l.some((function(c){if(JSON.stringify(o)===JSON.stringify(c))return!0})):R(l)==="object"?R(o)!=="object"?this.dependenciesFulfilled=l===o:Object.keys(l).some((function(c){return!!E(l,c)&&(E(o,c)&&l[c]===o[c]?void 0:(e.dependenciesFulfilled=!1,!0))})):typeof l=="string"||typeof l=="number"?this.dependenciesFulfilled=this.dependenciesFulfilled&&o===l:typeof l=="boolean"&&(this.dependenciesFulfilled=l?this.dependenciesFulfilled&&(o||o.length>0):this.dependenciesFulfilled&&(!o||o.length===0)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(n){this.container=n,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&typeof this.schema.type=="string"&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(){var n,l=this;n=this.optInWidget==="switch"?this.theme.getOptInSwitch(this.formname):this.theme.getOptInCheckbox(this.formname),this.optInCheckbox=n.checkbox,this.optInContainer=n.container,this.optInCheckbox.addEventListener("click",(function(){l.isActive()?l.deactivate():l.activate()}));var e=this.jsoneditor.options.show_opt_in,t=this.parent.options.show_opt_in!==void 0,o=t&&this.parent.options.show_opt_in===!0,c=t&&this.parent.options.show_opt_in===!1;(o||!c&&e||!t&&e)&&this.parent&&this.parent.schema.type==="object"&&!this.isRequired()&&this.header&&(this.header.insertBefore(this.optInContainer,this.header.firstChild),this.optInAppended=!0)}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.register(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.onWatchedFieldChange(),this.options.titleHidden&&(this.theme.visuallyHidden(this.label),this.theme.visuallyHidden(this.header)),this.enforceConstEnabled&&this.schema.const&&this.disable()}},{key:"setupWatchListeners",value:function(){var n=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){n.refreshWatchedFieldValues()&&n.onWatchedFieldChange()},E(this.schema,"watch")){var l,e,t,o,c,_=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(C){if(l=n.schema.watch[C],Array.isArray(l)){if(l.length<2)return;e=[l[0]].concat(l[1].split("."))}else e=l.split("."),n.theme.closest(n.container,'[data-schemaid="'.concat(e[0],'"]'))||e.unshift("#");if((t=e.shift())==="#"&&(t=n.jsoneditor.schema.id||n.jsoneditor.root.formname),!(o=n.theme.closest(n.container,'[data-schemaid="'.concat(t,'"]'))))throw new Error("Could not find ancestor node with id ".concat(t));c="".concat(o.getAttribute("data-schemapath"),".").concat(e.join(".")),_.startsWith(c)&&(n.watchLoop=!0),n.jsoneditor.watch(c,n.watch_listener),n.watched[C]=c}))}this.schema.headerTemplate&&(this.header_template=this.jsoneditor.compileTemplate(this.schema.headerTemplate,this.template_engine))}},{key:"addLinks",value:function(){if(!this.no_link_holder&&(this.link_holder=this.theme.getLinksHolder(),this.description!==void 0?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var n=0;n<this.schema.links.length;n++)this.addLink(this.getLink(this.schema.links[n]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(n,l,e){var t=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],o="json-editor-btn-".concat(l);l=this.iconlib?this.iconlib.getIcon(l):null,n=this.translate(n,t),e=this.translate(e,t),!l&&e&&(n=e,e=null);var c=this.theme.getButton(n,l,e);return c.classList.add(o),c}},{key:"setButtonText",value:function(n,l,e,t){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:[];return e=this.iconlib?this.iconlib.getIcon(e):null,l=this.translate(l,o),t=this.translate(t,o),!e&&t&&(l=t,t=null),this.theme.setButtonText(n,l,e,t)}},{key:"addLink",value:function(n){this.link_holder&&this.link_holder.appendChild(n)}},{key:"getLink",value:function(n){var l,e,t=(n.mediaType||"application/javascript").split("/")[0],o=this.jsoneditor.compileTemplate(n.href,this.template_engine),c=this.jsoneditor.compileTemplate(n.rel?n.rel:n.href,this.template_engine),_=null;if(n.download&&(_=n.download),_&&_!==!0&&(_=this.jsoneditor.compileTemplate(_,this.template_engine)),t==="image"){l=this.theme.getBlockLinkHolder(),(e=document.createElement("a")).setAttribute("target","_blank");var C=document.createElement("img");this.theme.createImageLink(l,e,C),this.link_watchers.push((function(B){var z=o(B),Y=c(B);e.setAttribute("href",z),e.setAttribute("title",Y||z),C.setAttribute("src",z)}))}else if(["audio","video"].includes(t)){l=this.theme.getBlockLinkHolder(),(e=this.theme.getBlockLink()).setAttribute("target","_blank");var $=document.createElement(t);$.setAttribute("controls","controls"),this.theme.createMediaLink(l,e,$),this.link_watchers.push((function(B){var z=o(B),Y=c(B);e.setAttribute("href",z),e.textContent=Y||z,$.setAttribute("src",z)}))}else e=l=this.theme.getBlockLink(),l.setAttribute("target","_blank"),l.textContent=n.rel,l.style.display="none",this.link_watchers.push((function(B){var z=o(B),Y=c(B);z&&(l.style.display=""),l.setAttribute("href",z),l.textContent=Y||z}));return _&&e&&(_===!0?e.setAttribute("download",""):this.link_watchers.push((function(B){e.setAttribute("download",_(B))}))),n.class&&n.class.split(" ").forEach((function(B){e.classList.add(B)})),l}},{key:"refreshWatchedFieldValues",value:function(){var n=this;if(this.watched_values){var l={},e=!1;return this.watched&&Object.keys(this.watched).forEach((function(t){var o=n.jsoneditor.getEditor(n.watched[t]),c=o?o.getValue():null;n.watched_values[t]!==c&&(e=!0),l[t]=c})),l.self=this.getValue(),this.watched_values.self!==l.self&&(e=!0),this.watched_values=l,e}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var n=this.getHeaderText();if(this.header.children.length){for(var l=0;l<this.header.childNodes.length;l++)if(this.header.childNodes[l].nodeType===3){this.header.childNodes[l].nodeValue=this.cleanText(n);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(n):this.header.textContent=this.cleanText(n)}}},{key:"getHeaderText",value:function(n){return this.header_text?this.header_text:n?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(n){var l=document.createElement("div");return l.innerHTML=n,l.textContent||l.innerText}},{key:"onWatchedFieldChange",value:function(){var n,l=this;if(this.header_template){n=v(this.getWatchedFieldValues(),{key:this.key,i:this.key,i0:1*this.key,i1:1*this.key+1,title:this.getTitle()}),this.editors&&Object.keys(this.editors).length&&(n.properties={},Object.keys(this.editors).forEach((function(o){var c=l.editors[o];if(c.schema&&c.schema.enum&&c.schema.options&&c.schema.options.enum_titles){var _=c.schema.enum.indexOf(c.value),C=c.options.enum_titles[_];n.properties[o]={enumTitle:C}}})));var e=this.header_template(n);e!==this.header_text&&(this.header_text=e,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){n=this.getWatchedFieldValues();for(var t=0;t<this.link_watchers.length;t++)this.link_watchers[t](n)}}},{key:"setValue",value:function(n){n=this.applyConstFilter(n),this.value=n}},{key:"applyConstFilter",value:function(n){return this.enforceConstEnabled&&this.schema.const!==void 0&&(n=this.schema.const),n}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.value}},{key:"refreshValue",value:function(){}},{key:"getChildEditors",value:function(){return!1}},{key:"destroy",value:function(){var n=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach((function(l){return n.jsoneditor.unwatch(l,n.watch_listener)})),this.watched=null,this.watched_values=null,this.watch_listener=null,this.header_text=null,this.header_template=null,this.value=null,this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.jsoneditor=null,this.schema=null,this.path=null,this.key=null,this.parent=null}},{key:"isDefaultRequired",value:function(){return this.isRequired()||!!this.jsoneditor.options.use_default_values}},{key:"getDefault",value:function(){if(this.enforceConstEnabled&&this.schema.const)return this.schema.const;if(this.schema.default!==void 0)return this.schema.default;if(this.schema.enum!==void 0)return this.schema.enum[0];var n=this.schema.type||this.schema.oneOf;if(n&&Array.isArray(n)&&(n=n[0]),n&&R(n)==="object"&&(n=n.type),n&&Array.isArray(n)&&(n=n[0]),typeof n=="string"){if(n==="number")return this.isDefaultRequired()?0:void 0;if(n==="boolean")return!this.isDefaultRequired()&&void 0;if(n==="integer")return this.isDefaultRequired()?0:void 0;if(n==="string")return this.isDefaultRequired()?"":void 0;if(n==="null")return null;if(n==="object")return{};if(n==="array")return[]}}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title||this.key||this.formname)}},{key:"enable",value:function(){this.disabled=!1}},{key:"disable",value:function(){this.disabled=!0}},{key:"isEnabled",value:function(){return!this.disabled}},{key:"isRequired",value:function(){return typeof this.schema.required=="boolean"?this.schema.required:this.parent&&this.parent.schema&&Array.isArray(this.parent.schema.required)?this.parent.schema.required.includes(this.key):!!this.jsoneditor.options.required_by_default}},{key:"getDisplayText",value:function(n){var l=[],e={};n.forEach((function(o){o.title&&(e[o.title]=e[o.title]||0,e[o.title]++),o.description&&(e[o.description]=e[o.description]||0,e[o.description]++),o.format&&(e[o.format]=e[o.format]||0,e[o.format]++),o.type&&(e[o.type]=e[o.type]||0,e[o.type]++)})),n.forEach((function(o){var c;c=typeof o=="string"?o:o.title&&e[o.title]<=1?o.title:o.format&&e[o.format]<=1?o.format:o.type&&e[o.type]<=1?o.type:o.description&&e[o.description]<=1?o.description:o.title?o.title:o.format?o.format:o.type?o.type:o.description?o.description:JSON.stringify(o).length<500?JSON.stringify(o):"type",l.push(c)}));var t={};return l.forEach((function(o,c){t[o]=t[o]||0,t[o]++,e[o]>1&&(l[c]="".concat(o," ").concat(t[o]))})),l}},{key:"getValidId",value:function(n){return(n=n===void 0?"":n.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(n,l){if(this.schema.options&&this.schema.options.inputAttributes){var e=this.schema.options.inputAttributes,t=["name","type"].concat(n),o=l||this.input;Object.keys(e).forEach((function(c){t.includes(c.toLowerCase())||o.setAttribute(c,e[c])}))}}},{key:"setContainerAttributes",value:function(){var n=this;if(this.schema.options&&this.schema.options.containerAttributes){var l=this.schema.options.containerAttributes,e=["data-schemapath","data-schematype","data-schemaid"];Object.keys(l).forEach((function(t){e.includes(t.toLowerCase())||n.container.setAttribute(t,l[t])}))}}},{key:"expandCallbacks",value:function(n,l){var e=this,t=this.defaults.callbacks[n];return Object.entries(l).forEach((function(o){var c,_,C=(_=2,(function(z){if(Array.isArray(z))return z})(c=o)||(function(z,Y){var Q=z==null?null:typeof Symbol<"u"&&z[Symbol.iterator]||z["@@iterator"];if(Q!=null){var se,pe,je,Se,Re=[],Ie=!0,Ve=!1;try{if(je=(Q=Q.call(z)).next,Y===0){if(Object(Q)!==Q)return;Ie=!1}else for(;!(Ie=(se=je.call(Q)).done)&&(Re.push(se.value),Re.length!==Y);Ie=!0);}catch(_e){Ve=!0,pe=_e}finally{try{if(!Ie&&Q.return!=null&&(Se=Q.return(),Object(Se)!==Se))return}finally{if(Ve)throw pe}}return Re}})(c,_)||(function(z,Y){if(z){if(typeof z=="string")return T(z,Y);var Q=Object.prototype.toString.call(z).slice(8,-1);return Q==="Object"&&z.constructor&&(Q=z.constructor.name),Q==="Map"||Q==="Set"?Array.from(z):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?T(z,Y):void 0}})(c,_)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
19
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),$=C[0],B=C[1];B===Object(B)?l[$]=e.expandCallbacks(n,B):typeof B=="string"&&R(t)==="object"&&typeof t[B]=="function"&&(l[$]=t[B].bind(null,e))})),l}},{key:"showValidationErrors",value:function(n){}}],r&&A(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,r})();function M(a){return M=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},M(a)}function q(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,J(l.key),l)}}function J(a){var r=(function(n,l){if(M(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(M(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return M(r)=="symbol"?r:r+""}function G(a,r,n){return r=ue(r),(function(l,e){if(e&&(M(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,X()?Reflect.construct(r,n||[],ue(a).constructor):r.apply(a,n))}function X(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(X=function(){return!!a})()}function le(){return le=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=ue(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},le.apply(this,arguments)}function ue(a){return ue=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ue(a)}function he(a,r){return he=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},he(a,r)}var ce=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),G(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&he(e,t)})(r,a),n=r,(l=[{key:"register",value:function(){le(ue(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){le(ue(r.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(e,t,o){if(e=this.applyConstFilter(e),(!this.template||o)&&(this.shouldBeUnset()||e!=null?M(e)==="object"?e=JSON.stringify(e):this.shouldBeUnset()||typeof e=="string"||(e="".concat(e)):e="",e!==this.serialized)){var c=this.sanitize(e);if(this.input.value!==c){if(this.setValueToInputField(c),this.format==="range"){var _=this.control.querySelector("output");_&&(_.value=c)}var C=o||this.getValue()!==e;return this.refreshValue(),t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),C&&this.onChange(!0,o),{changed:C,value:c}}}}},{key:"setValueToInputField",value:function(e){this.input.value=e===void 0?"":e}},{key:"getNumColumns",value:function(){var e,t=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return e=this.input_type==="textarea"?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(t,e))}},{key:"build",value:function(){var e,t=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.format=this.schema.format,!this.format&&this.schema.media&&this.schema.media.type&&(this.format=this.schema.media.type.replace(/(^(application|text)\/(x-)?(script\.)?)|(-source$)/g,"")),!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.format)if(this.format==="textarea")this.input_type="textarea",this.input=this.theme.getTextareaInput();else if(this.format==="range"){this.input_type="range";var o=this.schema.minimum||0,c=this.schema.maximum||Math.max(100,o+1),_=1;this.schema.multipleOf&&(o%this.schema.multipleOf&&(o=Math.ceil(o/this.schema.multipleOf)*this.schema.multipleOf),c%this.schema.multipleOf&&(c=Math.floor(c/this.schema.multipleOf)*this.schema.multipleOf),_=this.schema.multipleOf),this.input=this.theme.getRangeInput(o,c,_,this.description,this.formname),this.input.setAttribute("id",this.formname)}else this.input_type="text",["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","reset","search","submit","tel","text","time","url","week"].includes(this.format)&&(this.input_type=this.format),this.input=this.theme.getFormInputField(this.input_type);else this.input_type="text",this.input=this.theme.getFormInputField(this.input_type);this.schema.maxLength!==void 0&&this.input.setAttribute("maxlength",this.schema.maxLength),this.schema.pattern!==void 0?this.input.setAttribute("pattern",this.schema.pattern):this.schema.minLength!==void 0&&this.input.setAttribute("pattern",".{".concat(this.schema.minLength,",}")),this.options.compact?this.container.classList.add("compact"):this.options.input_width&&(this.input.style.width=this.options.input_width),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"]),this.input.addEventListener("change",(function(Y){if(Y.preventDefault(),Y.stopPropagation(),t.schema.template)Y.currentTarget.value=t.value;else{var Q=Y.currentTarget.value,se=t.sanitize(Q);Q!==se&&(Y.currentTarget.value=se),t.is_dirty=!0,t.refreshValue(),t.onChange(!0)}})),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(Y){if(Y){var Q,se=Y.offsetHeight;if(Y.offsetHeight<Y.scrollHeight)for(Q=0;Y.offsetHeight<Y.scrollHeight+3&&!(Q>100);)Q++,se++,Y.style.height="".concat(se,"px");else{for(Q=0;Y.offsetHeight>=Y.scrollHeight+3&&!(Q>100);)Q++,se--,Y.style.height="".concat(se,"px");Y.style.height="".concat(se+1,"px")}}},this.input.addEventListener("keyup",(function(Y){t.adjust_height(Y.currentTarget)})),this.input.addEventListener("change",(function(Y){t.adjust_height(Y.currentTarget)})),this.adjust_height());var C=(e=this.options.prompt_paste_max_length_reached)!==null&&e!==void 0?e:this.jsoneditor.options.prompt_paste_max_length_reached,$=this.schema.maxLength!==void 0;C&&$&&this.input.addEventListener("paste",(function(Y){(Y.clipboardData||window.clipboardData).getData("text").length+t.input.value.length>t.schema.maxLength&&alert(t.translate("paste_max_length_reached",[t.schema.maxLength]))})),this.format&&this.input.setAttribute("data-schemaformat",this.format);var B=this.input;if(this.format==="range"&&(B=this.theme.getRangeControl(this.input,this.theme.getRangeOutput(this.input,this.schema.default||Math.max(this.schema.minimum||0,0)))),this.control=this.theme.getFormControl(this.label,B,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input),t.format==="range"&&(t.control.querySelector("output").value=t.input.value)})),this.schema.template){var z=this.expandCallbacks("template",{template:this.schema.template});typeof z.template=="function"?this.template=z.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(e){var t=this.expandCallbacks("cleave",v({},this.defaults.options.cleave||{},this.options.cleave||{}));M(t)==="object"&&Object.keys(t).length>0&&(this.cleave_instance=new window.Cleave(e,t))}},{key:"setupImask",value:function(e){var t=this.expandCallbacks("imask",v({},this.defaults.options.imask||{},this.options.imask||{}));M(t)==="object"&&Object.keys(t).length>0&&(this.imask_instance=window.IMask(e,this.ajustIMaskOptions(t)))}},{key:"ajustIMaskOptions",value:function(e){var t=this;return Object.keys(e).forEach((function(o){if(e[o]===Object(e[o]))e[o]=t.ajustIMaskOptions(e[o]);else if(o==="mask")if(e[o].substr(0,6)==="regex:"){var c=e[o].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(c!==null)try{e[o]=new RegExp(c[1],c[2])}catch{}}else e[o]=t.getGlobalPropertyFromString(e[o])})),e}},{key:"getGlobalPropertyFromString",value:function(e){if(e.includes(".")){var t=e.split("."),o=t[0],c=t[1];if(window[o]!==void 0&&window[o][c]!==void 0)return window[o][c]}else if(window[e]!==void 0)return window[e];return e}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var e=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||e)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:le(ue(r.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,le(ue(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,le(ue(r.prototype),"disable",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input),window.Cleave&&!this.cleave_instance?this.setupCleave(this.input):window.IMask&&!this.imask_instance&&this.setupImask(this.input)}},{key:"refreshValue",value:function(){this.input&&(this.value=this.input.value,typeof this.value=="string"||this.shouldBeUnset()||(this.value=""),this.serialized=this.value)}},{key:"destroy",value:function(){this.cleave_instance&&this.cleave_instance.destroy(),this.imask_instance&&this.imask_instance.destroy(),this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),le(ue(r.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(e){return e}},{key:"onWatchedFieldChange",value:function(){var e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),le(ue(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this;if(this.jsoneditor.options.show_errors!=="always"){if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return}this.previous_error_setting=this.jsoneditor.options.show_errors;var o=e.reduce((function(c,_){return _.path===t.path&&c.push(_.message),c}),[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}])&&q(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function me(a){return me=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},me(a)}function ie(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,H(l.key),l)}}function H(a){var r=(function(n,l){if(me(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(me(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return me(r)=="symbol"?r:r+""}function ee(a,r,n){return r=F(r),(function(l,e){if(e&&(me(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,V()?Reflect.construct(r,n||[],F(a).constructor):r.apply(a,n))}function V(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(V=function(){return!!a})()}function I(){return I=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=F(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},I.apply(this,arguments)}function F(a){return F=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},F(a)}function te(a,r){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},te(a,r)}var ge=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ee(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&te(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t,o){e=this.applyConstFilter(e);var c=I(F(r.prototype),"setValue",this).call(this,e,t,o);c!==void 0&&c.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(c.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",I(F(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;if(window.ace){var o=this.input_type;o!=="cpp"&&o!=="c++"&&o!=="c"||(o="c_cpp"),e=this.expandCallbacks("ace",v({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(o)})),this.ace_container=document.createElement("div"),this.ace_container.style.width="100%",this.ace_container.style.position="relative",this.input.parentNode.insertBefore(this.ace_container,this.input),this.input.style.display="none",this.ace_editor_instance=window.ace.edit(this.ace_container,e),this.ace_editor_instance.setValue(this.getValue()),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize(),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.ace_editor_instance.setReadOnly(!0),this.ace_editor_instance.on("change",(function(){t.input.value=t.ace_editor_instance.getValue(),t.refreshValue(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)}else I(F(r.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!1),I(F(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),I(F(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),I(F(r.prototype),"destroy",this).call(this)}}])&&ie(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function be(a){return be=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},be(a)}function Oe(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,ve(l.key),l)}}function ve(a){var r=(function(n,l){if(be(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(be(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return be(r)=="symbol"?r:r+""}function U(a,r,n){return r=ae(r),(function(l,e){if(e&&(be(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Z()?Reflect.construct(r,n||[],ae(a).constructor):r.apply(a,n))}function Z(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Z=function(){return!!a})()}function re(){return re=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=ae(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},re.apply(this,arguments)}function ae(a){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ae(a)}function fe(a,r){return fe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},fe(a,r)}b(2008),b(4554);var Ce=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),U(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&fe(e,t)})(r,a),n=r,l=[{key:"askConfirmation",value:function(){return this.jsoneditor.options.prompt_before_delete!==!0||window.confirm(this.translate("button_delete_node_warning"))!==!1}},{key:"register",value:function(){re(ae(r.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){re(ae(r.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach((function(e){return e.unregister()}))}},{key:"getNumColumns",value:function(){var e=this.getItemInfo(0);return this.tabs_holder&&this.schema.format!=="tabs-top"?Math.max(Math.min(12,e.width+2),4):e.width}},{key:"enable",value:function(){var e=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach((function(t){t.enable(),e.setAvailability(t,!1)})),re(ae(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){var t=this;e&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach((function(o){o.disable(e),t.setAvailability(o,!0)})),re(ae(r.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(e,t){e.add_row_button&&(e.add_row_button.disabled=t),e.remove_all_rows_button&&(e.remove_all_rows_button.disabled=t),e.delete_last_row_button&&(e.delete_last_row_button.disabled=t),e.copy_button&&(e.copy_button.disabled=t),e.delete_button&&(e.delete_button.disabled=t),e.moveup_button&&(e.moveup_button.disabled=t),e.movedown_button&&(e.movedown_button.disabled=t)}},{key:"preBuild",value:function(){re(ae(r.prototype),"preBuild",this).call(this),this.rows=[],this.row_cache=[],this.hide_delete_buttons=this.options.disable_array_delete||this.jsoneditor.options.disable_array_delete,this.hide_delete_all_rows_buttons=this.hide_delete_buttons||this.options.disable_array_delete_all_rows||this.jsoneditor.options.disable_array_delete_all_rows,this.hide_delete_last_row_buttons=this.hide_delete_buttons||this.options.disable_array_delete_last_row||this.jsoneditor.options.disable_array_delete_last_row,this.hide_move_buttons=this.options.disable_array_reorder||this.jsoneditor.options.disable_array_reorder,this.hide_add_button=this.options.disable_array_add||this.jsoneditor.options.disable_array_add,this.show_copy_button=this.options.enable_array_copy||this.jsoneditor.options.enable_array_copy,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top}},{key:"build",value:function(){this.options.compact?(this.title=this.theme.getHeader("",this.getPathDepth()),this.container.appendChild(this.title),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder)):(this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.schema.format==="tabs-top"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTopTabContentHolder(this.tabs_holder),this.active_tab=null):this.schema.format==="tabs"?(this.controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.controls),this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.getItemTitle())),this.container.appendChild(this.tabs_holder),this.row_holder=this.theme.getTabContentHolder(this.tabs_holder),this.active_tab=null):(this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.row_holder=document.createElement("div"),this.panel.appendChild(this.row_holder),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls))),this.addControls()}},{key:"postBuild",value:function(){re(ae(r.prototype),"postBuild",this).call(this),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),this.refreshTabs(!0),this.is_dirty=!0,re(ae(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var e=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(e.title)||this.translate("default_array_item_title")}else this.item_title=this.translate("default_array_item_title");return this.cleanText(this.item_title)}},{key:"getItemSchema",value:function(e){return Array.isArray(this.schema.items)?e>=this.schema.items.length?this.schema.additionalItems===!0?{}:this.schema.additionalItems?v({},this.schema.additionalItems):void 0:v({},this.schema.items[e]):this.schema.items?v({},this.schema.items):{}}},{key:"getItemInfo",value:function(e){var t=this.getItemSchema(e);this.item_info=this.item_info||{};var o=JSON.stringify(t);return this.item_info[o]!==void 0||(t=this.jsoneditor.expandRefs(t),this.item_info[o]={title:this.translateProperty(t.title)||this.translate("default_array_item_title"),default:t.default,width:12,child_editors:t.properties||t.items}),this.item_info[o]}},{key:"getElementEditor",value:function(e){var t=this.getItemInfo(e),o=this.getItemSchema(e);(o=this.jsoneditor.expandRefs(o)).title="".concat(t.title," ").concat(e+1);var c,_=this.jsoneditor.getEditorClass(o);this.tabs_holder?(c=this.schema.format==="tabs-top"?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(e):c=t.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(c);var C=this.jsoneditor.createEditor(_,{jsoneditor:this.jsoneditor,schema:o,container:c,path:"".concat(this.path,".").concat(e),parent:this,required:!0});return C.preBuild(),C.build(),C.postBuild(),C.title_controls||(C.array_controls=this.theme.getButtonHolder(),c.appendChild(C.array_controls)),C}},{key:"checkParent",value:function(e){return e&&e.parentNode}},{key:"destroy",value:function(){this.empty(!0),this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.controls)&&this.controls.parentNode.removeChild(this.controls),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.row_cache=this.title=this.description=this.row_holder=this.panel=this.controls=null,re(ae(r.prototype),"destroy",this).call(this)}},{key:"empty",value:function(e){var t=this;if(this.rows!==null){if(this.rows.forEach((function(c,_){e&&(t.checkParent(c.tab)&&c.tab.parentNode.removeChild(c.tab),t.destroyRow(c,!0),t.row_cache[_]=null),t.rows[_]=null})),e)for(var o=this.rows.length;o<this.row_cache.length;o++)this.destroyRow(this.row_cache[o],!0),this.row_cache[o]=null;this.rows=[],e&&(this.row_cache=[])}}},{key:"destroyRow",value:function(e,t){var o=e.container;t?(e.destroy(),o.parentNode&&o.parentNode.removeChild(o),this.checkParent(e.tab)&&e.tab.parentNode.removeChild(e.tab)):(e.tab&&(e.tab.style.display="none"),o.style.display="none",e.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&this.schema.additionalItems===!1?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(e){var t=this;this.rows.forEach((function(o){o.tab&&(e?o.tab_text.textContent=o.getHeaderText():o.tab===t.active_tab?t.theme.markTabActive(o):t.theme.markTabInactive(o))}))}},{key:"ensureArraySize",value:function(e){if(Array.isArray(e)||(e=[e]),this.schema.minItems)for(;e.length<this.schema.minItems;)e.push(this.getItemInfo(e.length).default);return this.getMax()&&e.length>this.getMax()&&(e=e.slice(0,this.getMax())),e}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){t.forEach((function($,B){if(e.rows[B])e.rows[B].setValue($,o);else if(e.row_cache[B])e.rows[B]=e.row_cache[B],e.rows[B].setValue($,o),e.rows[B].container.style.display="",e.rows[B].tab&&(e.rows[B].tab.style.display=""),e.rows[B].register(),e.jsoneditor.trigger("addRow",e.rows[B]);else{var z=e.addRow($,o);e.jsoneditor.trigger("addRow",z)}}));for(var c=t.length;c<this.rows.length;c++)this.destroyRow(this.rows[c]),this.rows[c]=null;this.rows=this.rows.slice(0,t.length);var _=this.rows.find((function($){return $.tab===e.active_tab})),C=_!==void 0?_.tab:null;!C&&this.rows.length&&(C=this.rows[0].tab),this.active_tab=C,this.refreshValue(o),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}else o&&this.refreshValue(o)}},{key:"setButtonState",value:function(e,t){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:e.style.display=t?"":"none";break;case 2:e.disabled=!t}}},{key:"setupButtons",value:function(e){var t=[];if(this.value.length)if(this.value.length===1){this.setButtonState(this.remove_all_rows_button,!1);var o=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,o),t.push(o)}else{var c=!(e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,c),t.push(c);var _=!(e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,_),t.push(_)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var C=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,C),t.push(C),t.some((function($){return $}))}},{key:"refreshValue",value:function(e){var t=this,o=this.value?this.value.length:0;if(this.value=this.rows.map((function(_){return _.getValue()})),o!==this.value.length||e){var c=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(_,C){if(_.movedown_button){var $=C!==t.rows.length-1;t.setButtonState(_.movedown_button,$)}_.delete_button&&t.setButtonState(_.delete_button,!c),t.value[C]=_.getValue()})),this.setupButtons(c)&&!this.collapsed?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(e,t){var o=this,c=this.rows.length;this.rows[c]=this.getElementEditor(c),this.row_cache[c]=this.rows[c],this.tabs_holder?(this.rows[c].tab_text=document.createElement("span"),this.rows[c].tab_text.textContent=this.rows[c].getHeaderText(),this.schema.format==="tabs-top"?(this.rows[c].tab=this.theme.getTopTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTopTab(this.tabs_holder,this.rows[c].tab)):(this.rows[c].tab=this.theme.getTab(this.rows[c].tab_text,this.getValidId(this.rows[c].path)),this.theme.addTab(this.tabs_holder,this.rows[c].tab)),this.rows[c].tab.addEventListener("click",(function(C){o.active_tab=o.rows[c].tab,o.refreshTabs(),C.preventDefault(),C.stopPropagation()})),this._supportDragDrop(this.rows[c].tab)):this._supportDragDrop(this.rows[c].container,!0);var _=this.rows[c].title_controls||this.rows[c].array_controls;return this.hide_delete_buttons||(this.rows[c].delete_button=this._createDeleteButton(c,_)),this.show_copy_button&&(this.rows[c].copy_button=this._createCopyButton(c,_)),c&&!this.hide_move_buttons&&(this.rows[c].moveup_button=this._createMoveUpButton(c,_)),this.hide_move_buttons||(this.rows[c].movedown_button=this._createMoveDownButton(c,_)),e!==void 0&&this.rows[c].setValue(e,t),this.refreshTabs(),this.rows[c]}},{key:"_createDeleteButton",value:function(e,t){var o=this,c=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",e),c.addEventListener("click",(function(_){if(_.preventDefault(),_.stopPropagation(),!o.askConfirmation())return!1;var C=1*_.currentTarget.getAttribute("data-i"),$=o.getValue().filter((function(Y,Q){return Q!==C})),B=null,z=o.rows[C].getValue();o.setValue($),o.rows[C]?B=o.rows[C].tab:o.rows[C-1]&&(B=o.rows[C-1].tab),B&&(o.active_tab=B,o.refreshTabs()),o.onChange(!0),o.jsoneditor.trigger("deleteRow",z)})),t&&t.appendChild(c),c}},{key:"_createCopyButton",value:function(e,t){var o=this,c=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),_=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",e),c.addEventListener("click",(function(C){var $=o.getValue();C.preventDefault(),C.stopPropagation();var B=1*C.currentTarget.getAttribute("data-i");$.forEach((function(z,Y){if(Y===B){if(_.items.type==="string"&&_.items.format==="uuid")z=S();else if(_.items.type==="object"&&_.items.properties)for(var Q=0,se=Object.keys(z);Q<se.length;Q++){var pe=se[Q];_.items.properties&&_.items.properties[pe]&&_.items.properties[pe].format==="uuid"&&(z[pe]=S())}$.push(z)}})),o.setValue($),o.refreshValue(!0),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[B-1])})),t.appendChild(c),c}},{key:"_createMoveUpButton",value:function(e,t){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveleft":"moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",e),c.addEventListener("click",(function(_){_.preventDefault(),_.stopPropagation();var C=1*_.currentTarget.getAttribute("data-i");if(!(C<=0)){var $=o.getValue(),B=$[C-1];$[C-1]=$[C],$[C]=B,o.setValue($),o.active_tab=o.rows[C-1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[C-1])}})),t&&t.appendChild(c),c}},{key:"_createMoveDownButton",value:function(e,t){var o=this,c=this.getButton("",this.schema.format==="tabs-top"?"moveright":"movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",e),c.addEventListener("click",(function(_){_.preventDefault(),_.stopPropagation();var C=1*_.currentTarget.getAttribute("data-i"),$=o.getValue();if(!(C>=$.length-1)){var B=$[C+1];$[C+1]=$[C],$[C]=B,o.setValue($),o.active_tab=o.rows[C+1].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[C+1])}})),t&&t.appendChild(c),c}},{key:"_supportDragDrop",value:function(e,t){var o=this;He(e,(function(c,_){var C=o.getValue(),$=C[c];C.splice(c,1),C.splice(_,0,$),o.setValue(C),o.active_tab=o.rows[_].tab,o.refreshTabs(),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[_])}),{useTrigger:t})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none"),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton(),this.tabs&&(this.add_row_button.classList.add("je-array-control-btn"),this.delete_last_row_button.classList.add("je-array-control-btn"),this.remove_all_rows_button.classList.add("je-array-control-btn"))}},{key:"_createToggleButton",value:function(){var e=this,t=this.getButton("","collapse","button_collapse");t.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(t,this.title.childNodes[0]);var o=this.row_holder.style.display,c=this.controls.style.display;return t.addEventListener("click",(function(_){_.preventDefault(),_.stopPropagation(),e.panel&&e.setButtonState(e.panel,e.collapsed),e.tabs_holder&&e.setButtonState(e.tabs_holder,e.collapsed),e.collapsed?(e.collapsed=!1,e.row_holder.style.display=o,e.controls.style.display=c,e.setButtonText(_.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.row_holder.style.display="none",e.controls.style.display="none",e.setButtonText(_.currentTarget,"","expand","button_expand"))})),t}},{key:"_createAddRowButton",value:function(){var e=this,t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",(function(o){o.preventDefault(),o.stopPropagation();var c,_=e.rows.length;e.row_cache[_]?(c=e.rows[_]=e.row_cache[_],e.rows[_].setValue(e.rows[_].getDefault(),!0),typeof e.rows[_].deactivateNonRequiredProperties=="function"&&e.rows[_].deactivateNonRequiredProperties(!0),e.rows[_].container.style.display="",e.rows[_].tab&&(e.rows[_].tab.style.display=""),e.rows[_].register()):c=e.addRow(),e.active_tab=e.rows[_].tab,e.refreshTabs(),e.refreshValue(),e.onChange(!0),e.jsoneditor.trigger("addRow",c)})),this.controls.appendChild(t),t}},{key:"_createDeleteLastRowButton",value:function(){var e=this,t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",(function(o){if(o.preventDefault(),o.stopPropagation(),!e.askConfirmation())return!1;var c=e.getValue(),_=null,C=c.pop();e.setValue(c),e.rows[e.rows.length-1]&&(_=e.rows[e.rows.length-1].tab),_&&(e.active_tab=_,e.refreshTabs()),e.onChange(!0),e.jsoneditor.trigger("deleteRow",C)})),this.controls.appendChild(t),t}},{key:"_createRemoveAllRowsButton",value:function(){var e=this,t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",(function(o){if(o.preventDefault(),o.stopPropagation(),!e.askConfirmation())return!1;var c=e.getValue();e.empty(!0),e.setValue([]),e.onChange(!0),e.jsoneditor.trigger("deleteAllRows",c)})),this.controls.appendChild(t),t}},{key:"showValidationErrors",value:function(e){var t=this,o=[],c=[];e.forEach((function(_){_.path===t.path?o.push(_):c.push(_)})),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach((function(_){t.error_holder.appendChild(t.theme.getErrorMessage(_.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(_){return _.showValidationErrors(c)}))}}],l&&Oe(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function He(a,r){(arguments.length>2&&arguments[2]!==void 0?arguments[2]:{}).useTrigger?a.addEventListener("mousedown",(function(n){if(n.ctrlKey){a.draggable=!0;var l=function e(t){a.draggable=!1,document.removeEventListener("dragend",e),document.removeEventListener("mouseup",e)};document.addEventListener("dragend",l),document.addEventListener("mouseup",l)}})):a.draggable=!0,a.addEventListener("dragstart",(function(n){window.curDrag=a})),a.addEventListener("dragover",(function(n){window.curDrag===null||window.curDrag===a||window.curDrag.parentElement!==a.parentElement?n.dataTransfer.dropEffect="none":n.dataTransfer.dropEffect="move",n.preventDefault()})),a.addEventListener("drop",(function(n){if(n.preventDefault(),n.stopPropagation(),window.curDrag!==null&&window.curDrag!==a&&window.curDrag.parentElement===a.parentElement){var l=function(o){for(var c=0,_=o.parentElement.firstElementChild;_!==o&&_!==null;)_=_.nextSibling,++c;return c},e=l(window.curDrag),t=l(a);r(e,t,window.curDrag,a),window.curDrag=null}}))}function We(a){return We=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},We(a)}function nt(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Ze(l.key),l)}}function Ze(a){var r=(function(n,l){if(We(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(We(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return We(r)=="symbol"?r:r+""}function et(a,r,n){return r=ot(r),(function(l,e){if(e&&(We(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,tt()?Reflect.construct(r,n||[],ot(a).constructor):r.apply(a,n))}function tt(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tt=function(){return!!a})()}function Ue(){return Ue=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=ot(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Ue.apply(this,arguments)}function ot(a){return ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ot(a)}function ye(a,r){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},ye(a,r)}Ce.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var ke=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),et(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ye(e,t)})(r,a),n=r,(l=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){Ue(ot(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Ue(ot(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var e=this,t=this.getTitle().length;return Object.keys(this.select_values).forEach((function(o){return t=Math.max(t,"".concat(e.select_values[o]).length+4)})),Math.min(12,Math.max(t/7,2))}},{key:"preBuild",value:function(){var e;Ue(ot(r.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var t=this.jsoneditor.expandRefs(this.schema.items||{}),o=t.enum||[],c=t.options&&t.options.enum||[],_=t.options&&t.options.enum_titles||[];for(e=0;e<o.length;e++)if(this.sanitize(o[e])===o[e]){var C=c[e]||{};"title"in C||(C.title="".concat(_[e]||o[e])),this.option_keys.push("".concat(o[e])),this.option_enum.push(C),this.select_values["".concat(o[e])]=o[e]}}},{key:"build",value:function(){var e,t=this;if(this.options.compact||(this.header=this.label=this.theme.getLabelLike(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),!this.schema.format&&this.option_keys.length<8||this.schema.format==="checkbox"){for(this.input_type="checkboxes",this.inputs={},this.controls={},e=0;e<this.option_keys.length;e++){var o=this.formname+e.toString();this.inputs[this.option_keys[e]]=this.theme.getCheckbox(),this.inputs[this.option_keys[e]].id=o,this.select_options[this.option_keys[e]]=this.inputs[this.option_keys[e]];var c=this.theme.getCheckboxLabel(this.option_enum[e].title);if(c.htmlFor=o,this.option_enum[e].infoText){var _=this.theme.getInfoButton(this.translateProperty(this.option_enum[e].infoText));c.appendChild(_)}this.controls["_"+this.option_keys[e]]=this.theme.getFormControl(c,this.inputs[this.option_keys[e]])}this.control=this.theme.getMultiCheckboxHolder(this.controls,this.label,this.description,this.infoButton),this.inputs.controlgroup=this.inputs.controls=this.control}else{for(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.input_type="select",this.input=this.theme.getSelectInput(this.option_keys,!0),this.theme.setSelectOptions(this.input,this.option_keys,this.option_enum.map((function(C){return C.title}))),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),e=0;e<this.option_keys.length;e++)this.select_options[this.option_keys[e]]=this.input.children[e];this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton,this.formname)}(this.schema.readOnly||this.schema.readonly)&&this.disable(!0),this.container.appendChild(this.control),this.multiselectChangeHandler=function(C){var $=[];for(e=0;e<t.option_keys.length;e++)t.select_options[t.option_keys[e]]&&(t.select_options[t.option_keys[e]].selected||t.select_options[t.option_keys[e]].checked)&&$.push(t.select_values[t.option_keys[e]]);t.updateValue($),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"postBuild",value:function(){Ue(ot(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(e,t){var o=this;e=(e=this.applyConstFilter(e))||[],Array.isArray(e)||(e=[e]),e=e.map((function(c){return"".concat(c)})),Object.keys(this.select_options).forEach((function(c){o.select_options[c][o.input_type==="select"?"selected":"checked"]=e.includes(c)})),this.updateValue(e),this.onChange(!0)}},{key:"removeValue",value:function(e){e=[].concat(e),this.setValue(this.getValue().filter((function(t){return!e.includes(t)})))}},{key:"addValue",value:function(e){this.setValue(this.getValue().concat(e))}},{key:"updateValue",value:function(e){for(var t=!1,o=[],c=0;c<e.length;c++)if(this.select_options["".concat(e[c])]){var _=this.sanitize(this.select_values[e[c]]);o.push(_),_!==e[c]&&(t=!0)}else t=!0;return this.value=o,t}},{key:"sanitize",value:function(e){return this.schema.items.type==="boolean"?!!e:this.schema.items.type==="number"?1*e||0:this.schema.items.type==="integer"?Math.floor(1*e||0):"".concat(e)}},{key:"enable",value:function(){var e=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach((function(t){return e.inputs[t].disabled=!1})),Ue(ot(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){var t=this;e&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach((function(o){return t.inputs[o].disabled=!0})),Ue(ot(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){Ue(ot(r.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(e){var t=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),o=e.reduce((function(c,_){return _.path.match(t)&&c.push(_.message),c}),[]);o.length?this.theme.addInputError(this.input||this.inputs,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&nt(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function xe(a){return xe=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},xe(a)}function De(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Je(l.key),l)}}function Je(a){var r=(function(n,l){if(xe(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(xe(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return xe(r)=="symbol"?r:r+""}function pt(a,r,n){return r=ht(r),(function(l,e){if(e&&(xe(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,jt()?Reflect.construct(r,n||[],ht(a).constructor):r.apply(a,n))}function jt(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(jt=function(){return!!a})()}function bt(){return bt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=ht(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},bt.apply(this,arguments)}function ht(a){return ht=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ht(a)}function Ot(a,r){return Ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Ot(a,r)}var Nt=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),pt(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ot(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){this.choices_instance?(e=this.applyConstFilter(e),e=[].concat(e).map((function(o){return"".concat(o)})),this.updateValue(e),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):bt(ht(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",v({},{removeItems:!0,removeItemButton:!0},this.defaults.options.choices||{},this.options.choices||{},{addItems:!0,editItems:!1,duplicateItemsAllowed:!1}));this.newEnumAllowed=!1,this.choices_instance=new window.Choices(this.input,t),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){var c=e.choices_instance.getValue(!0);e.updateValue(c),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}bt(ht(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,o=[],c=0;c<e.length;c++)if(!(!this.select_values["".concat(e[c])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[c])))){var _=this.sanitize(this.select_values[e[c]]);o.push(_),_!==e[c]&&(t=!0)}return this.value=o,t}},{key:"addNewOption",value:function(e){return this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.schema.items.enum.push(e),this.choices_instance.setChoices([{value:"".concat(e),label:"".concat(e)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),bt(ht(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),bt(ht(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),bt(ht(r.prototype),"destroy",this).call(this)}}])&&De(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ke);function gt(a){return gt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gt(a)}function ya(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,va(l.key),l)}}function va(a){var r=(function(n,l){if(gt(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(gt(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return gt(r)=="symbol"?r:r+""}function Le(a,r,n){return r=Fe(r),(function(l,e){if(e&&(gt(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Be()?Reflect.construct(r,n||[],Fe(a).constructor):r.apply(a,n))}function Be(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Be=function(){return!!a})()}function $e(){return $e=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Fe(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},$e.apply(this,arguments)}function Fe(a){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Fe(a)}function ft(a,r){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},ft(a,r)}var ba=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Le(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ft(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.select2_instance?(e=[].concat(e).map((function(o){return"".concat(o)})),this.updateValue(e),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):$e(Fe(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e,t=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(e=this.expandCallbacks("select2",v({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=e.tags=!!e.tags&&this.schema.items&&this.schema.items.type==="string",this.select2_instance=window.jQuery(this.input).select2(e),this.select2v4=E(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(o),t.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),$e(Fe(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,o=[],c=0;c<e.length;c++)if(!(!this.select_values["".concat(e[c])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[c])))){var _=this.sanitize(this.select_values[e[c]]);o.push(_),_!==e[c]&&(t=!0)}return this.value=o,t}},{key:"addNewOption",value:function(e){this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.schema.items.enum.push(e);var t=this.input.querySelector('option[value="'.concat(e,'"]'));return t?t.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(e,e,!1,!1)).trigger("change"),!0}},{key:"enable",value:function(){!this.always_disabled&&this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),$e(Fe(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),$e(Fe(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),$e(Fe(r.prototype),"destroy",this).call(this)}}])&&ya(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ke);function Wr(a){return Wr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Wr(a)}function gb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,_b(l.key),l)}}function _b(a){var r=(function(n,l){if(Wr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Wr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Wr(r)=="symbol"?r:r+""}function wb(a,r,n){return r=Pr(r),(function(l,e){if(e&&(Wr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Kh()?Reflect.construct(r,n||[],Pr(a).constructor):r.apply(a,n))}function Kh(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Kh=function(){return!!a})()}function Xn(){return Xn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Pr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Xn.apply(this,arguments)}function Pr(a){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pr(a)}function Cl(a,r){return Cl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Cl(a,r)}var kb=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),wb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cl(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.selectize_instance?(e=[].concat(e).map((function(o){return"".concat(o)})),this.updateValue(e),this.selectize_instance.setValue(this.value),this.onChange(!0)):Xn(Pr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e,t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){e=this.expandCallbacks("selectize",v({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=e.create=!!e.create&&this.schema.items&&this.schema.items.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(e)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(C){var $=t.selectize_instance.getValue();t.updateValue($),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);var o=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),o.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(o,this.input);var c=this.selectize_instance.$control[0];if(c){var _=this.theme.getHiddenLabel(this.formname);_.setAttribute("for",this.formname+"-selectized"),c.appendChild(_)}}Xn(Pr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){e=[].concat(e);for(var t=!1,o=[],c=0;c<e.length;c++)if(!(!this.select_values["".concat(e[c])]&&(t=!0,!this.newEnumAllowed||!this.addNewOption(e[c])))){var _=this.sanitize(this.select_values[e[c]]);o.push(_),_!==e[c]&&(t=!0)}return this.value=o,t}},{key:"addNewOption",value:function(e){return this.option_keys.push("".concat(e)),this.option_titles.push("".concat(e)),this.select_values["".concat(e)]=e,this.selectize_instance.addOption({text:e,value:e}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Xn(Pr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),Xn(Pr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Xn(Pr(r.prototype),"destroy",this).call(this)}}])&&gb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ke);function Ri(a){return Ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ri(a)}function jb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Ob(l.key),l)}}function Ob(a){var r=(function(n,l){if(Ri(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ri(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Ri(r)=="symbol"?r:r+""}function Eb(a,r,n){return r=pn(r),(function(l,e){if(e&&(Ri(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Wh()?Reflect.construct(r,n||[],pn(a).constructor):r.apply(a,n))}function Wh(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Wh=function(){return!!a})()}function No(){return No=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=pn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},No.apply(this,arguments)}function pn(a){return pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},pn(a)}function Pl(a,r){return Pl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Pl(a,r)}var Sb=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Eb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pl(e,t)})(r,a),n=r,(l=[{key:"postBuild",value:function(){window.Autocomplete&&(this.autocomplete_wrapper=document.createElement("div"),this.input.parentNode.insertBefore(this.autocomplete_wrapper,this.input.nextSibling),this.autocomplete_wrapper.appendChild(this.input),this.autocomplete_dropdown=document.createElement("ul"),this.input.parentNode.insertBefore(this.autocomplete_dropdown,this.input.nextSibling)),No(pn(r.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var e,t=this;window.Autocomplete&&!this.autocomplete_instance&&(e=this.expandCallbacks("autocomplete",v({},{search:function(o){return console.log('No "search" callback defined for autocomplete in property "'.concat(o.key,'"')),[]},onSubmit:function(){t.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(e.baseClass),this.autocomplete_dropdown.classList.add("".concat(e.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,e)),No(pn(r.prototype),"afterInputReady",this).call(this)}},{key:"destroy",value:function(){this.autocomplete_instance&&(this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.autocomplete_dropdown&&this.autocomplete_dropdown.parentNode&&this.autocomplete_dropdown.parentNode.removeChild(this.autocomplete_dropdown),this.autocomplete_wrapper&&this.autocomplete_wrapper.parentNode&&this.autocomplete_wrapper.parentNode.removeChild(this.autocomplete_wrapper),this.autocomplete_instance=null),No(pn(r.prototype),"destroy",this).call(this)}}])&&jb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function Li(a){return Li=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Li(a)}function xb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Cb(l.key),l)}}function Cb(a){var r=(function(n,l){if(Li(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Li(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Li(r)=="symbol"?r:r+""}function Pb(a,r,n){return r=mn(r),(function(l,e){if(e&&(Li(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Zh()?Reflect.construct(r,n||[],mn(a).constructor):r.apply(a,n))}function Zh(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Zh=function(){return!!a})()}function Do(){return Do=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=mn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Do.apply(this,arguments)}function mn(a){return mn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mn(a)}function Tl(a,r){return Tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Tl(a,r)}var Tb=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Pb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tl(e,t)})(r,a),n=r,(l=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(e){var t=this;e.addEventListener("load",(function(o){if(t.count===t.current_item_index)t.value[t.count][t.key]=o.target.result;else{var c={};for(var _ in t.parent.schema.properties)c[_]="";c[t.key]=o.target.result,t.value.splice(t.count,0,c)}t.count+=1,t.count===t.total+t.current_item_index&&t.arrayEditor.setValue(t.value)}))}},{key:"build",value:function(){var e=this;if(this.options.compact||(this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(!window.FileReader)throw new Error("FileReader required for base64 editor");this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.schema.options&&this.schema.options.multiple&&this.schema.options.multiple===!0&&this.parent&&this.parent.schema.type==="object"&&this.parent.parent&&this.parent.parent.schema.type==="array"&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",(function(o){if(o.preventDefault(),o.stopPropagation(),o.currentTarget.files&&o.currentTarget.files.length)if(o.currentTarget.files.length>1&&e.schema.options&&e.schema.options.multiple&&e.schema.options.multiple===!0&&e.parent&&e.parent.schema.type==="object"&&e.parent.parent&&e.parent.parent.schema.type==="array"){e.arrayEditor=e.jsoneditor.getEditor(e.parent.parent.path),e.value=e.arrayEditor.getValue(),e.total=o.currentTarget.files.length,e.current_item_index=parseInt(e.parent.key),e.count=e.current_item_index;for(var c=0;c<e.total;c++){var _=new FileReader;e.setFileReaderListener(_),_.readAsDataURL(o.currentTarget.files[c])}}else{var C=new FileReader;C.onload=function($){e.value=$.target.result,e.refreshPreview(),e.onChange(!0),C=null},C.readAsDataURL(o.currentTarget.files[0])}}))}this.preview=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.preview),this.control=this.theme.getFormControl(this.label,this.uploader||this.input,this.preview,this.infoButton),this.container.appendChild(this.control);var t=this.getButton("button_upload","upload","button_upload");t.addEventListener("click",(function(){e.uploader.click()})),this.control.appendChild(t),this.setInputAttributes(["multiple"],t)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var e=this.value.match(/^data:([^;,]+)[;,]/);if(e&&(e=e[1]),e){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(e,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),e.substr(0,5)==="image"){this.preview.innerHTML+="<br>";var t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.src=this.value,this.preview.appendChild(t)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Do(mn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Do(mn(r.prototype),"disable",this).call(this)}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(e)?this.value=this.schema.enum[0]:this.value=e,this.input.value=this.value,this.refreshPreview(),this.onChange())}},{key:"destroy",value:function(){this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.uploader&&this.uploader.parentNode&&this.uploader.parentNode.removeChild(this.uploader),Do(mn(r.prototype),"destroy",this).call(this)}}])&&xb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function Ai(a){return Ai=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ai(a)}function Rb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Lb(l.key),l)}}function Lb(a){var r=(function(n,l){if(Ai(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ai(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Ai(r)=="symbol"?r:r+""}function Ab(a,r,n){return r=yn(r),(function(l,e){if(e&&(Ai(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Yh()?Reflect.construct(r,n||[],yn(a).constructor):r.apply(a,n))}function Yh(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Yh=function(){return!!a})()}function Bo(){return Bo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=yn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Bo.apply(this,arguments)}function yn(a){return yn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yn(a)}function Rl(a,r){return Rl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Rl(a,r)}var Qh=(function(a){function r(e,t){var o;return(function(c,_){if(!(c instanceof _))throw new TypeError("Cannot call a class as a function")})(this,r),(o=Ab(this,r,[e,t])).active=!1,o.isUiOnly=!0,o.parent&&o.parent.schema&&(Array.isArray(o.parent.schema.required)?o.parent.schema.required.includes(o.key)||o.parent.schema.required.push(o.key):o.parent.schema.required=[o.key]),o}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Rl(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){var e=this;this.options.compact=!0;var t=this.expandCallbacks("button",v({},{icon:"",validated:!1,align:"left",action:function(c,_){window.alert('No button action defined for "'.concat(c.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),o=this.translateProperty(t.text||this.schema.title)||this.key;this.input=this.getButton(o,t.icon,o),typeof t.action!="function"?window.alert('No button action defined for "'.concat(this.path,'"')):this.input.addEventListener("click",t.action,!1),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.disable(!0),this.input.setAttribute("readonly","true")),this.setInputAttributes(["readonly"]),this.control=this.theme.getFormButtonHolder(t.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){e.jsoneditor.validate(e.jsoneditor.getValue()).length>0?e.disable():e.enable()},t.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Bo(yn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,Bo(yn(r.prototype),"disable",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"activate",value:function(){this.active=!1,this.enable()}},{key:"deactivate",value:function(){this.isRequired()||(this.active=!1,this.disable())}},{key:"destroy",value:function(){this.jsoneditor.off("change",this.changeHandler),this.changeHandler=null,Bo(yn(r.prototype),"destroy",this).call(this)}}])&&Rb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function $i(a){return $i=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},$i(a)}function $b(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Ib(l.key),l)}}function Ib(a){var r=(function(n,l){if($i(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if($i(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return $i(r)=="symbol"?r:r+""}function Nb(a,r,n){return r=lr(r),(function(l,e){if(e&&($i(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Xh()?Reflect.construct(r,n||[],lr(a).constructor):r.apply(a,n))}function Xh(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xh=function(){return!!a})()}function vn(){return vn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=lr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},vn.apply(this,arguments)}function lr(a){return lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},lr(a)}function Ll(a,r){return Ll=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Ll(a,r)}var Db=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Nb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ll(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){e=!!(e=this.applyConstFilter(e));var o=this.getValue()!==e;this.value=e,this.input.checked=this.value,t||(this.is_dirty=!0),this.onChange(o)}},{key:"register",value:function(){vn(lr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){vn(lr(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){return Math.min(12,Math.max(this.getTitle().length/7,2))}},{key:"setOptInCheckbox",value:function(){vn(lr(r.prototype),"setOptInCheckbox",this).call(this),this.optInAppended&&(this.container.insertBefore(this.optInContainer,this.container.firstChild),this.optInContainer.style.verticalAlign="top",this.control.style.marginTop="0")}},{key:"build",value:function(){var e=this;this.parent.options.table_row||(this.label=this.header=this.theme.getCheckboxLabel(this.getTitle(),this.isRequired()),this.label.htmlFor=this.formname),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&!this.options.compact&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getCheckbox(),this.input.id=this.formname,this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton),this.control.style.display="inline-block",(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.input.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.value=t.currentTarget.checked,e.is_dirty=!0,e.onChange(!0)})),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,vn(lr(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,vn(lr(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),vn(lr(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,o=this.jsoneditor.options.show_errors,c=o==="change"||o==="interaction";if((o!=="never"||this.is_dirty)&&(!c||this.is_dirty)){var _=e.reduce((function(C,$){return $.path===t.path&&C.push($.message),C}),[]);this.input.controlgroup=this.control,_.length?this.theme.addInputError(this.input,"".concat(_.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&$b(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function Ii(a){return Ii=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ii(a)}function Bb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Fb(l.key),l)}}function Fb(a){var r=(function(n,l){if(Ii(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ii(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Ii(r)=="symbol"?r:r+""}function Mb(a,r,n){return r=ur(r),(function(l,e){if(e&&(Ii(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,ef()?Reflect.construct(r,n||[],ur(a).constructor):r.apply(a,n))}function ef(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ef=function(){return!!a})()}function bn(){return bn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=ur(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},bn.apply(this,arguments)}function ur(a){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ur(a)}function Al(a,r){return Al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Al(a,r)}b(6910);var Fo=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Mb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Al(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){e=this.applyConstFilter(e);var o=this.typecast(e),c=this.enum_options.length>0&&this.enum_values.includes(o),_=!!this.jsoneditor.options.use_default_values||this.schema.default!==void 0;if(this.hasPlaceholderOption||c&&(!t||this.isRequired()||_)||(o=this.enum_values[0]),this.value!==o){var C=this.enum_values.indexOf(o);c&&C!==-1?this.input.value=this.enum_options[C]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=o,this.value=o,t||(this.is_dirty=!0),this.onChange(),this.change()}}},{key:"register",value:function(){bn(ur(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){bn(ur(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var e=this.getTitle().length,t=0;t<this.enum_options.length;t++)e=Math.max(e,this.enum_options[t].length+4);return Math.min(12,Math.max(e/7,2))}},{key:"typecast",value:function(e){return this.schema.type==="boolean"?e==="undefined"||e===void 0?void 0:!!e:this.schema.type==="number"?1*e||0:this.schema.type==="integer"?Math.floor(1*e||0):this.schema.enum&&e===void 0?void 0:"".concat(e)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var e,t,o,c,_=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.hasPlaceholderOption=((e=this.schema)===null||e===void 0||(e=e.options)===null||e===void 0?void 0:e.has_placeholder_option)||!1,this.placeholderOptionText=((t=this.schema)===null||t===void 0||(t=t.options)===null||t===void 0?void 0:t.placeholder_option_text)||" ",this.enforceConst&&this.schema.const){var C=this.schema.const;this.enum_options=["".concat(C)],this.enum_display=["".concat(this.translateProperty(C)||C)],this.enum_values=[this.typecast(C)]}else if(this.schema.enum){var $=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(B,z){_.enum_options[z]="".concat(B),_.enum_display[z]="".concat(_.translateProperty($[z])||B),_.enum_values[z]=_.typecast(B)}))}else if(this.schema.type==="boolean")this.enum_display=this.schema.options&&this.schema.options.enum_titles||["true","false"],this.enum_options=["1",""],this.enum_values=[!0,!1],this.isRequired()||(this.enum_display.unshift(" "),this.enum_options.unshift("undefined"),this.enum_values.unshift(void 0));else{if(!this.schema.enumSource)throw new Error("'select' editor requires the enum property to be set.");if(this.enumSource=[],this.enum_display=[],this.enum_options=[],this.enum_values=[],Array.isArray(this.schema.enumSource))for(o=0;o<this.schema.enumSource.length;o++)typeof this.schema.enumSource[o]=="string"?this.enumSource[o]={source:this.schema.enumSource[o]}:Array.isArray(this.schema.enumSource[o])?this.enumSource[o]=this.schema.enumSource[o]:this.enumSource[o]=v({},this.schema.enumSource[o]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(o=0;o<this.enumSource.length;o++)this.enumSource[o].value&&(typeof(c=this.expandCallbacks("template",{template:this.enumSource[o].value})).template=="function"?this.enumSource[o].value=c.template:this.enumSource[o].value=this.jsoneditor.compileTemplate(this.enumSource[o].value,this.template_engine)),this.enumSource[o].title&&(typeof(c=this.expandCallbacks("template",{template:this.enumSource[o].title})).template=="function"?this.enumSource[o].title=c.template:this.enumSource[o].title=this.jsoneditor.compileTemplate(this.enumSource[o].title,this.template_engine)),this.enumSource[o].filter&&this.enumSource[o].value&&(typeof(c=this.expandCallbacks("template",{template:this.enumSource[o].filter})).template=="function"?this.enumSource[o].filter=c.template:this.enumSource[o].filter=this.jsoneditor.compileTemplate(this.enumSource[o].filter,this.template_engine))}}},{key:"build",value:function(){var e=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.input=this.theme.getSelectInput(this.enum_options,!1),this.theme.setSelectOptions(this.input,this.enum_options,this.enum_display,this.hasPlaceholderOption,this.placeholderOptionText),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),this.input.disabled=!0),this.setInputAttributes([]),this.input.addEventListener("change",(function(t){t.preventDefault(),t.stopPropagation(),e.onInputChange()})),this.control=this.theme.getFormControl(this.label,this.input,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),this.value=this.enum_values[0],window.requestAnimationFrame((function(){e.input.parentNode&&e.afterInputReady()}))}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var e,t=this.typecast(this.input.value);(e=this.enum_values.includes(t)?this.enum_values[this.enum_values.indexOf(t)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=e,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var e,t,o=[],c=[];if(this.enumSource){e=this.getWatchedFieldValues();for(var _=0;_<this.enumSource.length;_++)if(Array.isArray(this.enumSource[_]))o=o.concat(this.enumSource[_]),c=c.concat(this.enumSource[_]);else{var C=[];if(C=Array.isArray(this.enumSource[_].source)?this.enumSource[_].source:e[this.enumSource[_].source]){if(this.enumSource[_].slice&&(C=Array.prototype.slice.apply(C,this.enumSource[_].slice)),this.enumSource[_].filter){var $=[];for(t=0;t<C.length;t++)this.enumSource[_].filter({i:t,item:C[t],watched:e})&&$.push(C[t]);C=$}var B=[],z=[];for(t=0;t<C.length;t++){var Y=C[t];this.enumSource[_].value?z[t]=this.typecast(this.enumSource[_].value({i:t,item:Y})):z[t]=C[t],this.enumSource[_].title?B[t]=this.enumSource[_].title({i:t,item:Y}):B[t]=z[t]}this.enumSource[_].sort&&(function(se,pe,je){se.map((function(Se,Re){return{v:Se,t:pe[Re]}})).sort((function(Se,Re){return Se.v<Re.v?-je:Se.v===Re.v?0:je})).forEach((function(Se,Re){se[Re]=Se.v,pe[Re]=Se.t}))}).bind(null,z,B,this.enumSource[_].sort==="desc"?1:-1)(),o=o.concat(z),c=c.concat(B)}}var Q=this.value;this.theme.setSelectOptions(this.input,o,c),this.enum_options=o,this.enum_display=c,this.enum_values=o,o.includes(Q)||this.jsoneditor.options.enum_source_value_auto_select!==!1?(this.input.value=Q,this.value=Q):(this.input.value=o[0],this.value=this.typecast(o[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}bn(ur(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,bn(ur(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.input.disabled=!0,bn(ur(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),bn(ur(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this,o=this.jsoneditor.options.show_errors,c=o==="change"||o==="interaction";if((o!=="never"||this.is_dirty)&&(!c||this.is_dirty)){var _=e.reduce((function(C,$){return $.path===t.path&&C.push($.message),C}),[]);_.length?this.theme.addInputError(this.input,"".concat(_.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&Bb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function Ni(a){return Ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ni(a)}function qb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Vb(l.key),l)}}function Vb(a){var r=(function(n,l){if(Ni(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ni(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Ni(r)=="symbol"?r:r+""}function zb(a,r,n){return r=cr(r),(function(l,e){if(e&&(Ni(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,tf()?Reflect.construct(r,n||[],cr(a).constructor):r.apply(a,n))}function tf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tf=function(){return!!a})()}function gn(){return gn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=cr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},gn.apply(this,arguments)}function cr(a){return cr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},cr(a)}function $l(a,r){return $l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},$l(a,r)}var rf=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),zb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$l(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.choices_instance){var o=this.typecast(e||"");if(this.enum_values.includes(o)||(o=this.enum_values[0]),this.value===o)return;t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(o)],this.choices_instance.setChoiceByValue(this.input.value),this.value=o,this.onChange()}else gn(cr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var e=this.expandCallbacks("choices",v({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,e)}gn(cr(r.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var e=this;if(gn(cr(r.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var t=this.enum_options.map((function(o,c){return{value:o,label:e.enum_display[c]}}));this.choices_instance.setChoices(t,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),gn(cr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.choices_instance&&this.choices_instance.disable(),gn(cr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),gn(cr(r.prototype),"destroy",this).call(this)}}])&&qb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Fo);function ei(a){return ei=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ei(a)}function Hb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Ub(l.key),l)}}function Ub(a){var r=(function(n,l){if(ei(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ei(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ei(r)=="symbol"?r:r+""}function Gb(a,r,n){return r=_n(r),(function(l,e){if(e&&(ei(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,nf()?Reflect.construct(r,n||[],_n(a).constructor):r.apply(a,n))}function nf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(nf=function(){return!!a})()}function Mo(){return Mo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=_n(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Mo.apply(this,arguments)}function _n(a){return _n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_n(a)}function Il(a,r){return Il=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Il(a,r)}rf.rules={".choices > *":"box-sizing:border-box"};var Jb=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Gb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Il(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){if(Mo(_n(r.prototype),"build",this).call(this),this.input&&(this.schema.max&&typeof this.schema.max=="string"&&this.input.setAttribute("max",this.schema.max),this.schema.min&&typeof this.schema.max=="string"&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&ei(this.options.flatpickr)==="object")){this.options.flatpickr.enableTime=this.schema.format!=="date",this.options.flatpickr.noCalendar=this.schema.format==="time",this.schema.type==="integer"&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var e=this.input;if(this.options.flatpickr.wrap===!0){var t=[];if(this.options.flatpickr.showToggleButton!==!1){var o=this.getButton("",this.schema.format==="time"?"time":"calendar","flatpickr_toggle_button");o.setAttribute("data-toggle",""),t.push(o)}if(this.options.flatpickr.showClearButton!==!1){var c=this.getButton("","clear","flatpickr_clear_button");c.setAttribute("data-clear",""),t.push(c)}var _=this.input.parentNode,C=this.input.nextSibling,$=this.theme.getInputGroup(this.input,t);$!==void 0?(this.options.flatpickr.inline=!1,_.insertBefore($,C),e=$):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(e,this.options.flatpickr),this.options.flatpickr.inline===!0&&this.options.flatpickr.inlineHideInput===!0&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if(this.schema.type==="string")return this.value;if(this.value!==""&&this.value!==void 0){var e=this.schema.format==="time"?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(e).getTime()/1e3)}}}},{key:"setValue",value:function(e,t,o){if(e=this.applyConstFilter(e),this.schema.type==="string")Mo(_n(r.prototype),"setValue",this).call(this,e,t,o),this.flatpickr&&this.flatpickr.setDate(e);else if(e>0){var c=new Date(1e3*e),_=c.getFullYear(),C=this.zeroPad(c.getMonth()+1),$=this.zeroPad(c.getDate()),B=this.zeroPad(c.getHours()),z=this.zeroPad(c.getMinutes()),Y=this.zeroPad(c.getSeconds()),Q=[_,C,$].join("-"),se=[B,z,Y].join(":"),pe="".concat(Q,"T").concat(se);this.schema.format==="date"?pe=Q:this.schema.format==="time"&&(pe=se),this.input.value=pe,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(pe)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,Mo(_n(r.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(e){return"0".concat(e).slice(-2)}}])&&Hb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function Di(a){return Di=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Di(a)}function Kb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Wb(l.key),l)}}function Wb(a){var r=(function(n,l){if(Di(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Di(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Di(r)=="symbol"?r:r+""}function Zb(a,r,n){return r=dr(r),(function(l,e){if(e&&(Di(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,of()?Reflect.construct(r,n||[],dr(a).constructor):r.apply(a,n))}function of(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(of=function(){return!!a})()}function wn(){return wn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=dr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},wn.apply(this,arguments)}function dr(a){return dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},dr(a)}function Nl(a,r){return Nl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Nl(a,r)}var Yb=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Zb(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Nl(e,t)})(r,a),n=r,(l=[{key:"register",value:function(){if(this.editors){for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}wn(dr(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(wn(dr(r.prototype),"unregister",this).call(this),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.currentEditor]?Math.max(this.editors[this.currentEditor].getNumColumns(),4):4}},{key:"enable",value:function(){if(this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].enable();wn(dr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].disable();wn(dr(r.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var e=this,t=this.getWatchedFieldValues();if(t){var o=document.location.origin+document.location.pathname+this.template(t);this.editors[this.refs[o]]||this.buildChildEditor(o),this.currentEditor=this.refs[o],this.register(),this.editors.forEach((function(c,_){c&&(e.currentEditor===_?c.container.style.display="":c.container.style.display="none")})),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(e){this.refs[e]=this.editors.length;var t=this.theme.getChildEditorHolder();this.editor_holder.appendChild(t);var o=v({},this.schema,this.jsoneditor.refs[e]),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),_=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:t,path:this.path,parent:this,required:!0});this.editors.push(_),_.preBuild(),_.build(),_.postBuild()}},{key:"preBuild",value:function(){var e;for(this.refs={},this.editors=[],this.currentEditor="",e=0;e<this.schema.links.length;e++)if(this.schema.links[e].rel.toLowerCase()==="describedby"){this.template=this.jsoneditor.compileTemplate(this.schema.links[e].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,e).concat(this.schema.links.slice(e+1)),this.schema.links.length===0&&delete this.schema.links,this.baseSchema=v({},this.schema)}},{key:"build",value:function(){this.editor_holder=document.createElement("div"),this.container.appendChild(this.editor_holder),this.switchEditor()}},{key:"onWatchedFieldChange",value:function(){this.switchEditor()}},{key:"onChildEditorChange",value:function(e,t){this.editors[this.currentEditor]&&this.refreshValue(),wn(dr(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(e,t){e=this.applyConstFilter(e),this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(e,t),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach((function(e){e&&e.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),wn(dr(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){this.editors.forEach((function(t){t&&t.showValidationErrors(e)}))}}])&&Kb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function ti(a){return ti=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ti(a)}function sf(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function Qb(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Xb(l.key),l)}}function Xb(a){var r=(function(n,l){if(ti(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ti(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ti(r)=="symbol"?r:r+""}function eg(a,r,n){return r=kn(r),(function(l,e){if(e&&(ti(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,af()?Reflect.construct(r,n||[],kn(a).constructor):r.apply(a,n))}function af(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(af=function(){return!!a})()}function qo(){return qo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=kn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},qo.apply(this,arguments)}function kn(a){return kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},kn(a)}function Dl(a,r){return Dl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Dl(a,r)}var tg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),eg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Dl(e,t)})(r,a),n=r,(l=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var e=this;this.title=this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired()),this.container.appendChild(this.title),this.options.enum_titles=this.options.enum_titles||[],this.enforceConstEnabled&&this.schema.const?this.enum=[this.schema.const]:this.enum=this.schema.enum,this.selected=0,this.select_options=[],this.html_values=[];for(var t=0;t<this.enum.length;t++)this.select_options[t]=this.options.enum_titles[t]||"Value ".concat(t+1),this.html_values[t]=this.getHTML(this.enum[t]);this.switcher=this.theme.getSwitcher(this.select_options),this.container.appendChild(this.switcher),this.display_area=this.theme.getIndentedPanel(),this.container.appendChild(this.display_area),this.options.hide_display&&(this.display_area.style.display="none"),this.switcher.addEventListener("change",(function(o){e.selected=e.select_options.indexOf(o.currentTarget.value),e.value=e.enum[e.selected],e.refreshValue(),e.onChange(!0)})),this.value=this.enum[0],this.refreshValue(),this.enum.length===1&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var e=this;if(this.enum){this.selected=-1;var t=JSON.stringify(this.value);this.enum.forEach((function(o,c){if(t===JSON.stringify(o))return e.selected=c,!1})),this.selected<0?this.setValue(this.enum[0]):(this.switcher.value=this.select_options[this.selected],this.display_area.innerHTML=this.html_values[this.selected])}}},{key:"enable",value:function(){this.always_disabled||(this.switcher.disabled=!1,qo(kn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.switcher.disabled=!0,qo(kn(r.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(e){var t,o,c=this;if(e===null)return"<em>null</em>";if(ti(e)==="object"){var _="";return t=e,o=function(C,$){var B=c.getHTML($);Array.isArray(e)||(B="<div><em>".concat(C,"</em>: ").concat(B,"</div>")),_+="<li>".concat(B,"</li>")},Array.isArray(t)||typeof t.length=="number"&&t.length>0&&t.length-1 in t?Array.from(t).forEach((function(C,$){return o($,C)})):Object.entries(t).forEach((function(C){var $,B,z=(B=2,(function(se){if(Array.isArray(se))return se})($=C)||(function(se,pe){var je=se==null?null:typeof Symbol<"u"&&se[Symbol.iterator]||se["@@iterator"];if(je!=null){var Se,Re,Ie,Ve,_e=[],Ee=!0,Ge=!1;try{if(Ie=(je=je.call(se)).next,pe===0){if(Object(je)!==je)return;Ee=!1}else for(;!(Ee=(Se=Ie.call(je)).done)&&(_e.push(Se.value),_e.length!==pe);Ee=!0);}catch(st){Ge=!0,Re=st}finally{try{if(!Ee&&je.return!=null&&(Ve=je.return(),Object(Ve)!==Ve))return}finally{if(Ge)throw Re}}return _e}})($,B)||(function(se,pe){if(se){if(typeof se=="string")return sf(se,pe);var je=Object.prototype.toString.call(se).slice(8,-1);return je==="Object"&&se.constructor&&(je=se.constructor.name),je==="Map"||je==="Set"?Array.from(se):je==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(je)?sf(se,pe):void 0}})($,B)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
20
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),Y=z[0],Q=z[1];return o(Y,Q)})),_=Array.isArray(e)?"<ol>".concat(_,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(_,"</ul>")}return typeof e=="boolean"?e?"true":"false":typeof e=="string"?e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):e}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.value=e,this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.display_area&&this.display_area.parentNode&&this.display_area.parentNode.removeChild(this.display_area),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),qo(kn(r.prototype),"destroy",this).call(this)}}])&&Qb(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function ri(a){return ri=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ri(a)}function rg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,ng(l.key),l)}}function ng(a){var r=(function(n,l){if(ri(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ri(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ri(r)=="symbol"?r:r+""}function ig(a,r,n){return r=hr(r),(function(l,e){if(e&&(ri(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,lf()?Reflect.construct(r,n||[],hr(a).constructor):r.apply(a,n))}function lf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(lf=function(){return!!a})()}function jn(){return jn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=hr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},jn.apply(this,arguments)}function hr(a){return hr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},hr(a)}function Bl(a,r){return Bl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Bl(a,r)}var og=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),ig(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Bl(e,t)})(r,a),n=r,(l=[{key:"register",value:function(){jn(hr(r.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){jn(hr(r.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(e,t,o){if(e=this.applyConstFilter(e),(!this.template||o)&&(e==null?e="":ri(e)==="object"?e=JSON.stringify(e):typeof e!="string"&&(e="".concat(e)),e!==this.serialized)){var c=this.sanitize(e);if(this.input.value!==c){this.input.value=c;var _=o||this.getValue()!==e;this.refreshValue(),t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(_)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){jn(hr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(){jn(hr(r.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,typeof this.value!="string"&&(this.value=""),this.serialized=this.value}},{key:"destroy",value:function(){this.template=null,this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),jn(hr(r.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(e){return e}},{key:"onWatchedFieldChange",value:function(){var e;this.template&&(e=this.getWatchedFieldValues(),this.setValue(this.template(e),!1,!0)),jn(hr(r.prototype),"onWatchedFieldChange",this).call(this)}},{key:"build",value:function(){if(this.format=this.schema.format,!this.format&&this.options.default_format&&(this.format=this.options.default_format),this.options.format&&(this.format=this.options.format),this.input_type="hidden",this.input=this.theme.getFormInputField(this.input_type),this.format&&this.input.setAttribute("data-schemaformat",this.format),this.container.appendChild(this.input),this.schema.template){var e=this.expandCallbacks("template",{template:this.schema.template});typeof e.template=="function"?this.template=e.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&rg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function Bi(a){return Bi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Bi(a)}function sg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,ag(l.key),l)}}function ag(a){var r=(function(n,l){if(Bi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Bi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Bi(r)=="symbol"?r:r+""}function lg(a,r,n){return r=ga(r),(function(l,e){if(e&&(Bi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,uf()?Reflect.construct(r,n||[],ga(a).constructor):r.apply(a,n))}function uf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(uf=function(){return!!a})()}function ga(a){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ga(a)}function Fl(a,r){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Fl(a,r)}var ug=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),lg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Fl(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){this.options.compact=!1,this.header=this.label=this.theme.getLabelLike(this.getTitle()),this.description=this.theme.getDescription(this.schema.description||""),this.control=this.theme.getFormControl(this.label,this.description,null),this.container.appendChild(this.control)}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getNumColumns",value:function(){return 12}},{key:"disable",value:function(){return!1}},{key:"enable",value:function(){return!1}}])&&sg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Qh);function Fi(a){return Fi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Fi(a)}function cg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,dg(l.key),l)}}function dg(a){var r=(function(n,l){if(Fi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Fi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Fi(r)=="symbol"?r:r+""}function hg(a,r,n){return r=Mi(r),(function(l,e){if(e&&(Fi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,cf()?Reflect.construct(r,n||[],Mi(a).constructor):r.apply(a,n))}function cf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(cf=function(){return!!a})()}function Ml(){return Ml=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Mi(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Ml.apply(this,arguments)}function Mi(a){return Mi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Mi(a)}function ql(a,r){return ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},ql(a,r)}var df=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),hg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ql(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){if(Ml(Mi(r.prototype),"build",this).call(this),this.schema.minimum!==void 0){var e=this.schema.minimum;this.schema.exclusiveMinimum!==void 0&&(e+=1),this.input.setAttribute("min",e)}if(this.schema.maximum!==void 0){var t=this.schema.maximum;this.schema.exclusiveMaximum!==void 0&&(t-=1),this.input.setAttribute("max",t)}if(this.schema.step!==void 0){var o=this.schema.step||1;this.input.setAttribute("step",o)}this.setInputAttributes(["maxlength","pattern","readonly","min","max","step"])}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?(function(e){if(e==null)return!1;var t=e.match(O),o=parseFloat(e);return t!==null&&!isNaN(o)&&isFinite(o)})(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&cg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function qi(a){return qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},qi(a)}function fg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,pg(l.key),l)}}function pg(a){var r=(function(n,l){if(qi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(qi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return qi(r)=="symbol"?r:r+""}function mg(a,r,n){return r=_a(r),(function(l,e){if(e&&(qi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,hf()?Reflect.construct(r,n||[],_a(a).constructor):r.apply(a,n))}function hf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(hf=function(){return!!a})()}function _a(a){return _a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},_a(a)}function Vl(a,r){return Vl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Vl(a,r)}var ff=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),mg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Vl(e,t)})(r,a),n=r,(l=[{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.default||this.jsoneditor.options.use_default_values||this.value!==""?(function(e){if(e==null)return!1;var t=e.match(x),o=parseInt(e);return t!==null&&!isNaN(o)&&isFinite(o)})(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&fg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(df);function Vi(a){return Vi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Vi(a)}function yg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,vg(l.key),l)}}function vg(a){var r=(function(n,l){if(Vi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Vi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Vi(r)=="symbol"?r:r+""}function bg(a,r,n){return r=zi(r),(function(l,e){if(e&&(Vi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,pf()?Reflect.construct(r,n||[],zi(a).constructor):r.apply(a,n))}function pf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(pf=function(){return!!a})()}function zl(){return zl=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=zi(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},zl.apply(this,arguments)}function zi(a){return zi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},zi(a)}function Hl(a,r){return Hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Hl(a,r)}var gg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),bg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Hl(e,t)})(r,a),n=r,(l=[{key:"preBuild",value:function(){if(zl(zi(r.prototype),"preBuild",this).call(this),this.schema.options||(this.schema.options={}),!this.schema.options.cleave)switch(this.format){case"ipv6":this.schema.options.cleave={delimiters:[":"],blocks:[4,4,4,4,4,4,4,4],uppercase:!0};break;case"ipv4":this.schema.options.cleave={delimiters:["."],blocks:[3,3,3,3],numericOnly:!0}}this.options=v(this.options,this.schema.options||{})}}])&&yg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function Hi(a){return Hi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Hi(a)}function _g(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,wg(l.key),l)}}function wg(a){var r=(function(n,l){if(Hi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Hi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Hi(r)=="symbol"?r:r+""}function kg(a,r,n){return r=fr(r),(function(l,e){if(e&&(Hi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,mf()?Reflect.construct(r,n||[],fr(a).constructor):r.apply(a,n))}function mf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(mf=function(){return!!a})()}function On(){return On=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=fr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},On.apply(this,arguments)}function fr(a){return fr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},fr(a)}function Ul(a,r){return Ul=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Ul(a,r)}var jg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),kg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ul(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t,o){e=this.applyConstFilter(e);var c=On(fr(r.prototype),"setValue",this).call(this,e,t,o);c!==void 0&&c.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(c.value)}},{key:"build",value:function(){this.options.format="textarea",On(fr(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;window.Jodit?(e=this.expandCallbacks("jodit",v({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",(function(){t.value=t.jodit_instance.getEditorValue(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)):On(fr(r.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.jodit_instance&&this.jodit_instance.setReadOnly(!1),On(fr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),On(fr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),On(fr(r.prototype),"destroy",this).call(this)}}])&&_g(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function Og(a,r,n,l){try{switch(a.format){case"ipv4":(function(e){var t=e.split(".");if(t.length!==4)throw new Error("error_ipv4");t.forEach((function(o){if(isNaN(+o)||+o<0||+o>255)throw new Error("error_ipv4")}))})(r);break;case"ipv6":(function(e){if(!e.match("^(?:(?:(?:[a-fA-F0-9]{1,4}:){6}|(?=(?:[a-fA-F0-9]{0,4}:){2,6}(?:[0-9]{1,3}.){3}[0-9]{1,3}$)(([0-9a-fA-F]{1,4}:){1,5}|:)((:[0-9a-fA-F]{1,4}){1,5}:|:)|::(?:[a-fA-F0-9]{1,4}:){5})(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9]).){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9]?[0-9])|(?:[a-fA-F0-9]{1,4}:){7}[a-fA-F0-9]{1,4}|(?=(?:[a-fA-F0-9]{0,4}:){0,7}[a-fA-F0-9]{0,4}$)(([0-9a-fA-F]{1,4}:){1,7}|:)((:[0-9a-fA-F]{1,4}){1,7}|:)|(?:[a-fA-F0-9]{1,4}:){7}:|:(:[a-fA-F0-9]{1,4}){7})$"))throw new Error("error_ipv6")})(r);break;case"hostname":(function(e){if(!e.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")})(r)}return[]}catch(e){return[{path:n,property:"format",message:l(e.message)}]}}function yf(a,r){var n=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);r&&(l=l.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),n.push.apply(n,l)}return n}function Eg(a,r,n){return(r=vf(r))in a?Object.defineProperty(a,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[r]=n,a}function pr(a){return pr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},pr(a)}function Vo(a,r){return(function(n){if(Array.isArray(n))return n})(a)||(function(n,l){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,o,c,_,C=[],$=!0,B=!1;try{if(c=(e=e.call(n)).next,l!==0)for(;!($=(t=c.call(e)).done)&&(C.push(t.value),C.length!==l);$=!0);}catch(z){B=!0,o=z}finally{try{if(!$&&e.return!=null&&(_=e.return(),Object(_)!==_))return}finally{if(B)throw o}}return C}})(a,r)||Gl(a,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
21
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function ut(a){return(function(r){if(Array.isArray(r))return Jl(r)})(a)||(function(r){if(typeof Symbol<"u"&&r[Symbol.iterator]!=null||r["@@iterator"]!=null)return Array.from(r)})(a)||Gl(a)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
22
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function Gl(a,r){if(a){if(typeof a=="string")return Jl(a,r);var n=Object.prototype.toString.call(a).slice(8,-1);return n==="Object"&&a.constructor&&(n=a.constructor.name),n==="Map"||n==="Set"?Array.from(a):n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Jl(a,r):void 0}}function Jl(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function Sg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,vf(l.key),l)}}function vf(a){var r=(function(n,l){if(pr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(pr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return pr(r)=="symbol"?r:r+""}b(8431),b(7945),b(1278);var bf=(function(){return a=function n(l,e,t,o){(function(c,_){if(!(c instanceof _))throw new TypeError("Cannot call a class as a function")})(this,n),this.jsoneditor=l,this.schema=e||this.jsoneditor.schema,this.options=t||{},this.translate=this.jsoneditor.translate||o.translate,this.translateProperty=this.jsoneditor.translateProperty||o.translateProperty,this.defaults=o,this._validateSubSchema={dependentRequired:function(c,_,C){var $=[];if(c.dependentRequired!==void 0){var B=[];Object.keys(c.dependentRequired).forEach((function(z){if(_[z]!==void 0){var Y=c.dependentRequired[z];B=Y.filter((function(Q){return!E(_,Q)}))}})),B.length>0&&$.push({message:"Must have the required properties: "+B.join(", "),path:C})}return $},dependentSchemas:function(c,_,C){var $=this,B=[];return Object.keys(c.dependentSchemas).forEach((function(z){if(_[z]!==void 0){var Y=c.dependentSchemas[z],Q=$._validateSchema(Y,_,C);B=[].concat(ut(B),ut(Q))}})),B},contains:function(c,_,C){var $=this,B=[],z=0;_.forEach((function(Q){$._validateSchema(c.contains,Q,C).length===0&&z++}));var Y=z===0;return c.minContains!==void 0?z<c.minContains&&B.push({message:this.translate("error_minContains",[z,c.minContains],c),path:C}):Y&&B.push({message:this.translate("error_contains",null,c),path:C}),c.maxContains!==void 0&&z>c.maxContains&&B.push({message:this.translate("error_maxContains",[z,c.maxContains],c),path:C}),B},if:function(c,_,C){if(c.then===void 0&&c.else===void 0)return[];var $=this._validateSchema(c.if,_,C),B=[],z=[];return c.then!==void 0&&(B=this._validateSchema(c.then,_,C)),c.else!==void 0&&(z=this._validateSchema(c.else,_,C)),c.if===!0?B:c.if===!1?z:$.length===0?B:$.length>0?z:[]},const:function(c,_,C){return JSON.stringify(c.const)===JSON.stringify(_)?[]:[{path:C,property:"const",message:this.translate("error_const",null,c)}]},enum:function(c,_,C){var $=JSON.stringify(_);return c.enum.some((function(B){return $===JSON.stringify(B)}))?[]:[{path:C,property:"enum",message:this.translate("error_enum",null,c)}]},extends:function(c,_,C){var $=this;return c.extends.reduce((function(B,z){return B.push.apply(B,ut($._validateSchema(z,_,C))),B}),[])},allOf:function(c,_,C){var $=this;return c.allOf.reduce((function(B,z){return B.push.apply(B,ut($._validateSchema(z,_,C))),B}),[])},anyOf:function(c,_,C){var $=this;return c.anyOf.some((function(B){return!$._validateSchema(B,_,C).length}))?[]:[{path:C,property:"anyOf",message:this.translate("error_anyOf",null,c)}]},oneOf:function(c,_,C){var $=this,B=0,z=[];c.oneOf.forEach((function(Q,se){var pe=$._validateSchema(Q,_,C);pe.length||B++,pe.forEach((function(je){je.path="".concat(C,".oneOf[").concat(se,"]").concat(je.path.substr(C.length))})),z.push.apply(z,ut(pe))}));var Y=[];return B!==1&&(Y.push({path:C,property:"oneOf",message:this.translate("error_oneOf",[B],c)}),Y.push.apply(Y,z)),Y},not:function(c,_,C){return this._validateSchema(c.not,_,C).length?[]:[{path:C,property:"not",message:this.translate("error_not",null,c)}]},type:function(c,_,C){var $=this;if(Array.isArray(c.type)){if(!c.type.some((function(B){return $._checkType(B,_)})))return[{path:C,property:"type",message:this.translate("error_type_union",null,c)}]}else if(["date","time","datetime-local"].includes(c.format)&&c.type==="integer"){if(!this._checkType("string","".concat(_)))return[{path:C,property:"type",message:this.translate("error_type",[c.format],c)}]}else if(!this._checkType(c.type,_))return[{path:C,property:"type",message:this.translate("error_type",[c.type],c)}];return[]},disallow:function(c,_,C){var $=this;if(Array.isArray(c.disallow)){if(c.disallow.some((function(B){return $._checkType(B,_)})))return[{path:C,property:"disallow",message:this.translate("error_disallow_union",null,c)}]}else if(this._checkType(c.disallow,_))return[{path:C,property:"disallow",message:this.translate("error_disallow",[c.disallow],c)}];return[]}},this._validateNumberSubSchema={multipleOf:function(c,_,C){return this._validateNumberSubSchemaMultipleDivisible(c,_,C)},divisibleBy:function(c,_,C){return this._validateNumberSubSchemaMultipleDivisible(c,_,C)},maximum:function(c,_,C){var $=c.exclusiveMaximum?_<c.maximum:_<=c.maximum;return window.math?$=window.math[c.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(_),window.math.bignumber(c.maximum)):window.Decimal&&($=new window.Decimal(_)[c.exclusiveMaximum?"lt":"lte"](new window.Decimal(c.maximum))),$?[]:[{path:C,property:"maximum",message:this.translate(c.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[c.maximum],c)}]},minimum:function(c,_,C){var $=c.exclusiveMinimum?_>c.minimum:_>=c.minimum;return window.math?$=window.math[c.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(_),window.math.bignumber(c.minimum)):window.Decimal&&($=new window.Decimal(_)[c.exclusiveMinimum?"gt":"gte"](new window.Decimal(c.minimum))),$?[]:[{path:C,property:"minimum",message:this.translate(c.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[c.minimum],c)}]}},this._validateStringSubSchema={maxLength:function(c,_,C){var $=[];return"".concat(_).length>c.maxLength&&$.push({path:C,property:"maxLength",message:this.translate("error_maxLength",[c.maxLength],c)}),$},minLength:function(c,_,C){return"".concat(_).length<c.minLength?[{path:C,property:"minLength",message:this.translate(c.minLength===1?"error_notempty":"error_minLength",[c.minLength],c)}]:[]},pattern:function(c,_,C){return new RegExp(c.pattern).test(_)?[]:[{path:C,property:"pattern",message:c.options&&c.options.patternmessage?c.options.patternmessage:this.translate("error_pattern",[c.pattern],c)}]}},this._validateArraySubSchema={items:function(c,_,C){var $=this,B=[];if(Array.isArray(c.items))for(var z=0;z<_.length;z++)if(c.items[z])B.push.apply(B,ut(this._validateSchema(c.items[z],_[z],"".concat(C,".").concat(z))));else{if(c.additionalItems===!0)break;if(!c.additionalItems){if(c.additionalItems===!1){B.push({path:C,property:"additionalItems",message:this.translate("error_additionalItems",null,c)});break}break}B.push.apply(B,ut(this._validateSchema(c.additionalItems,_[z],"".concat(C,".").concat(z))))}else _.forEach((function(Y,Q){B.push.apply(B,ut($._validateSchema(c.items,Y,"".concat(C,".").concat(Q))))}));return B},maxItems:function(c,_,C){return _.length>c.maxItems?[{path:C,property:"maxItems",message:this.translate("error_maxItems",[c.maxItems],c)}]:[]},minItems:function(c,_,C){return _.length<c.minItems?[{path:C,property:"minItems",message:this.translate("error_minItems",[c.minItems],c)}]:[]},uniqueItems:function(c,_,C){for(var $={},B=0;B<_.length;B++){var z=JSON.stringify(_[B]);if($[z])return[{path:C,property:"uniqueItems",message:this.translate("error_uniqueItems",null,c)}];$[z]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(c,_,C){return Object.keys(_).length>c.maxProperties?[{path:C,property:"maxProperties",message:this.translate("error_maxProperties",[c.maxProperties],c)}]:[]},minProperties:function(c,_,C){return Object.keys(_).length<c.minProperties?[{path:C,property:"minProperties",message:this.translate("error_minProperties",[c.minProperties],c)}]:[]},required:function(c,_,C){var $=this,B=[];return Array.isArray(c.required)&&c.required.forEach((function(z){if(_[z]===void 0){var Y=$.jsoneditor.getEditor("".concat(C,".").concat(z));Y&&Y.dependenciesFulfilled===!1||Y&&["button","info"].includes(Y.schema.format||Y.schema.type)||B.push({path:C,property:"required",message:$.translate("error_required",[c&&c.properties&&c.properties[z]&&c.properties[z].title?c.properties[z].title:z],c)})}})),B},properties:function(c,_,C,$){var B=this,z=[];return Object.entries(c.properties).forEach((function(Y){var Q=Vo(Y,2),se=Q[0],pe=Q[1];$[se]=!0,z.push.apply(z,ut(B._validateSchema(pe,_[se],"".concat(C,".").concat(se))))})),z},patternProperties:function(c,_,C,$){var B=this,z=[];return Object.entries(c.patternProperties).forEach((function(Y){var Q=Vo(Y,2),se=Q[0],pe=Q[1],je=new RegExp(se);Object.entries(_).forEach((function(Se){var Re=Vo(Se,2),Ie=Re[0],Ve=Re[1];je.test(Ie)&&($[Ie]=!0,z.push.apply(z,ut(B._validateSchema(pe,Ve,"".concat(C,".").concat(Ie)))))}))})),z}},this._validateObjectSubSchema2={propertyNames:function(c,_,C,$){for(var B,z=this,Y=[],Q=Object.keys(_),se=null,pe=function(){var Se="";return se=Q[je],typeof c.propertyNames=="boolean"?c.propertyNames===!0?0:(Y.push({path:C,property:"propertyNames",message:z.translate("error_property_names_false",[se],c)}),1):Object.entries(c.propertyNames).every((function(Re){var Ie=Vo(Re,2),Ve=Ie[0],_e=Ie[1],Ee=!1;switch(Ve){case"maxLength":if(typeof _e!="number"){Se="error_property_names_maxlength";break}if(se.length>_e){Se="error_property_names_exceeds_maxlength";break}return!0;case"const":if(_e!==se){Se="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(_e)){Se="error_property_names_enum";break}if(_e.forEach((function(Ge){Ge===se&&(Ee=!0)})),!Ee){Se="error_property_names_enum_mismatch";break}return!0;case"pattern":if(typeof _e!="string"){Se="error_property_names_pattern";break}if(!new RegExp(_e).test(se)){Se="error_property_names_pattern_mismatch";break}return!0;default:return Y.push({path:C,property:"propertyNames",message:z.translate("error_property_names_unsupported",[Ve],c)}),!1}return Y.push({path:C,property:"propertyNames",message:z.translate(Se,[se],c)}),!1}))?void 0:1},je=0;je<Q.length&&((B=pe())===0||B!==1);je++);return Y},additionalProperties:function(c,_,C,$){for(var B=[],z=Object.keys(_),Y=0;Y<z.length;Y++){var Q=z[Y];if(!$[Q]){if(!c.additionalProperties){B.push({path:C,property:"additionalProperties",message:this.translate("error_additional_properties",[Q],c)});break}if(c.additionalProperties===!0)break;B.push.apply(B,ut(this._validateSchema(c.additionalProperties,_[Q],"".concat(C,".").concat(Q))))}}return B},dependencies:function(c,_,C){var $=this,B=[];return Object.entries(c.dependencies).forEach((function(z){var Y=Vo(z,2),Q=Y[0],se=Y[1];_[Q]!==void 0&&(Array.isArray(se)?se.forEach((function(pe){_[pe]===void 0&&B.push({path:C,property:"dependencies",message:$.translate("error_dependency",[pe],c)})})):B.push.apply(B,ut($._validateSchema(se,_,C))))})),B}}},r=[{key:"fitTest",value:function(n,l){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e7,t={match:0,extra:0};if(pr(n)==="object"&&n!==null){var o=this._getSchema(l);if(o.anyOf){var c,_=(function(se){for(var pe=1;pe<arguments.length;pe++){var je=arguments[pe]!=null?arguments[pe]:{};pe%2?yf(Object(je),!0).forEach((function(Se){Eg(se,Se,je[Se])})):Object.getOwnPropertyDescriptors?Object.defineProperties(se,Object.getOwnPropertyDescriptors(je)):yf(Object(je)).forEach((function(Se){Object.defineProperty(se,Se,Object.getOwnPropertyDescriptor(je,Se))}))}return se})({},t),C=(function(se,pe){var je=typeof Symbol<"u"&&se[Symbol.iterator]||se["@@iterator"];if(!je){if(Array.isArray(se)||(je=Gl(se))){je&&(se=je);var Se=0,Re=function(){};return{s:Re,n:function(){return Se>=se.length?{done:!0}:{done:!1,value:se[Se++]}},e:function(Ee){throw Ee},f:Re}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
23
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Ie,Ve=!0,_e=!1;return{s:function(){je=je.call(se)},n:function(){var Ee=je.next();return Ve=Ee.done,Ee},e:function(Ee){_e=!0,Ie=Ee},f:function(){try{Ve||je.return==null||je.return()}finally{if(_e)throw Ie}}}})(o.anyOf);try{for(C.s();!(c=C.n()).done;){var $=c.value,B=this.fitTest(n,$,e);(B.match>_.match||B.match===_.match&&B.extra<_.extra)&&(_=B)}}catch(se){C.e(se)}finally{C.f()}return _}var z=this._getSchema(l).properties;for(var Y in z)if(E(z,Y)){if(pr(n[Y])==="object"&&pr(z[Y])==="object"&&pr(z[Y].properties)==="object"){var Q=this.fitTest(n[Y],z[Y],e/100);t.match+=Q.match,t.extra+=Q.extra}n[Y]!==void 0&&(t.match+=e)}else t.extra+=e}return t}},{key:"_getSchema",value:function(n){return n===void 0?v({},this.jsoneditor.expandRefs(this.schema)):n}},{key:"validate",value:function(n){return this._validateSchema(this.schema,n)}},{key:"_validateSchema",value:function(n,l,e){var t=this,o=[];return e=e||this.jsoneditor.root.formname,n=v({},this.jsoneditor.expandRefs(n)),l===void 0?this._validateV3Required(n,l,e):(Object.keys(n).forEach((function(c){t._validateSubSchema[c]&&o.push.apply(o,ut(t._validateSubSchema[c].call(t,n,l,e)))})),o.push.apply(o,ut(this._validateByValueType(n,l,e))),n.links&&n.links.forEach((function(c,_){c.rel&&c.rel.toLowerCase()==="describedby"&&(n=t._expandSchemaLink(n,_),o.push.apply(o,ut(t._validateSchema(n,l,e,t.translate))))})),["date","time","datetime-local"].includes(n.format)&&o.push.apply(o,ut(this._validateDateTimeSubSchema(n,l,e))),["uuid"].includes(n.format)&&o.push.apply(o,ut(this._validateUUIDSchema(n,l,e))),o.push.apply(o,ut(this._validateCustomValidator(n,l,e))),this._removeDuplicateErrors(o))}},{key:"_expandSchemaLink",value:function(n,l){var e=n.links[l].href,t=this.jsoneditor.root.getValue(),o=this.jsoneditor.compileTemplate(e,this.jsoneditor.template),c=document.location.origin+document.location.pathname+o(t);return n.links=n.links.slice(0,l).concat(n.links.slice(l+1)),v({},n,this.jsoneditor.refs[c])}},{key:"_validateV3Required",value:function(n,l,e){return(n.required!==void 0&&n.required===!0||n.required===void 0&&this.jsoneditor.options.required_by_default===!0)&&n.type!=="info"?[{path:e,property:"required",message:this.translate("error_notset",null,n)}]:[]}},{key:"_validateByValueType",value:function(n,l,e){var t=this,o=[];if(l===null)return o;if(typeof l=="number")Object.keys(n).forEach((function(_){t._validateNumberSubSchema[_]&&o.push.apply(o,ut(t._validateNumberSubSchema[_].call(t,n,l,e)))}));else if(typeof l=="string")Object.keys(n).forEach((function(_){t._validateStringSubSchema[_]&&o.push.apply(o,ut(t._validateStringSubSchema[_].call(t,n,l,e)))}));else if(Array.isArray(l))Object.keys(n).forEach((function(_){t._validateArraySubSchema[_]&&o.push.apply(o,ut(t._validateArraySubSchema[_].call(t,n,l,e)))}));else if(pr(l)==="object"){var c={};Object.keys(n).forEach((function(_){t._validateObjectSubSchema[_]&&o.push.apply(o,ut(t._validateObjectSubSchema[_].call(t,n,l,e,c)))})),n.additionalProperties!==void 0||!this.jsoneditor.options.no_additional_properties||n.oneOf||n.anyOf||n.allOf||(n.additionalProperties=!1),Object.keys(n).forEach((function(_){t._validateObjectSubSchema2[_]!==void 0&&o.push.apply(o,ut(t._validateObjectSubSchema2[_].call(t,n,l,e,c)))}))}return o}},{key:"_validateUUIDSchema",value:function(n,l,e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(l)?[]:[{path:e,property:"format",message:this.translate("error_pattern",["^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-5][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$"],n)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(n,l,e){var t=n.multipleOf||n.divisibleBy,o=l/t===Math.floor(l/t);return window.math?o=window.math.mod(window.math.bignumber(l),window.math.bignumber(t)).equals(0):window.Decimal&&(o=new window.Decimal(l).mod(new window.Decimal(t)).equals(0)),o?[]:[{path:e,property:n.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[t],n)}]}},{key:"_validateDateTimeSubSchema",value:function(n,l,e){var t=this,o=this.jsoneditor.getEditor(e),c=o&&o.flatpickr?o.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[n.format];if(n.type==="integer")return(function(_,C,$){return 1*C<1?[{path:$,property:"format",message:t.translate("error_invalid_epoch",null,_)}]:C!==Math.abs(parseInt(C))?[{path:$,property:"format",message:t.translate("error_".concat(_.format.replace(/-/g,"_")),[c],_)}]:[]})(n,l,e);if(o&&o.flatpickr){if(o)return(function(_,C,$,B){if(C!==""){var z;if(B.flatpickr.config.mode!=="single"){var Y=B.flatpickr.config.mode==="range"?B.flatpickr.l10n.rangeSeparator:", ";z=B.flatpickr.selectedDates.map((function(se){return B.flatpickr.formatDate(se,B.flatpickr.config.dateFormat)})).join(Y)}try{if(z){if(z!==C)throw new Error("".concat(B.flatpickr.config.mode," mismatch"))}else if(B.flatpickr.formatDate(B.flatpickr.parseDate(C,B.flatpickr.config.dateFormat),B.flatpickr.config.dateFormat)!==C)throw new Error("mismatch")}catch{var Q=B.flatpickr.config.errorDateFormat!==void 0?B.flatpickr.config.errorDateFormat:B.flatpickr.config.dateFormat;return[{path:$,property:"format",message:t.translate("error_".concat(B.format.replace(/-/g,"_")),[Q],_)}]}}return[]})(n,l,e,o)}else if(!{date:/^(\d{4}\D\d{2}\D\d{2})$/,time:/^(\d{2}:\d{2}(?::\d{2})?)$/,"datetime-local":/^(\d{4}\D\d{2}\D\d{2}[ T]\d{2}:\d{2}(?::\d{2})?)$/}[n.format].test(l))return[{path:e,property:"format",message:this.translate("error_".concat(n.format.replace(/-/g,"_")),[c],n)}];return[]}},{key:"_validateCustomValidator",value:function(n,l,e){var t=this,o=[];o.push.apply(o,ut(Og.call(this,n,l,e,this.translate)));var c=function(_){o.push.apply(o,ut(_.call(t,n,l,e)))};return this.defaults.custom_validators.forEach(c),this.options.custom_validators&&this.options.custom_validators.forEach(c),o}},{key:"_removeDuplicateErrors",value:function(n){return n.reduce((function(l,e){var t=!0;return l||(l=[]),l.forEach((function(o){o.message===e.message&&o.path===e.path&&o.property===e.property&&(o.errorcount++,t=!1)})),t&&(e.errorcount=1,l.push(e)),l}),[])}},{key:"_checkType",value:function(n,l){var e={string:function(t){return typeof t=="string"},number:function(t){return typeof t=="number"},integer:function(t){return typeof t=="number"&&t===Math.floor(t)},boolean:function(t){return typeof t=="boolean"},array:function(t){return Array.isArray(t)},object:function(t){return t!==null&&!Array.isArray(t)&&pr(t)==="object"},null:function(t){return t===null}};return typeof n=="string"?!e[n]||e[n](l):!this._validateSchema(n,l).length}}],r&&Sg(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,r})();function ni(a){return ni=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ni(a)}function xg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Cg(l.key),l)}}function Cg(a){var r=(function(n,l){if(ni(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ni(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ni(r)=="symbol"?r:r+""}function Pg(a,r,n){return r=mr(r),(function(l,e){if(e&&(ni(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,gf()?Reflect.construct(r,n||[],mr(a).constructor):r.apply(a,n))}function gf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(gf=function(){return!!a})()}function En(){return En=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=mr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},En.apply(this,arguments)}function mr(a){return mr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mr(a)}function Kl(a,r){return Kl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Kl(a,r)}var Tg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Pg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Kl(e,t)})(r,a),n=r,(l=[{key:"register",value:function(){if(this.editors){for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister();this.editors[this.type]&&this.editors[this.type].register()}En(mr(r.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(En(mr(r.prototype),"unregister",this).call(this),this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].unregister()}},{key:"getNumColumns",value:function(){return this.editors[this.type]?Math.max(this.editors[this.type].getNumColumns(),4):4}},{key:"enable",value:function(){if(!this.always_disabled){if(this.editors)for(var e=0;e<this.editors.length;e++)this.editors[e]&&this.editors[e].enable();this.switcher.disabled=!1,En(mr(r.prototype),"enable",this).call(this)}}},{key:"disable",value:function(e){if(e&&(this.always_disabled=!0),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable(e);this.switcher.disabled=!0,En(mr(r.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(e){var t=this;this.lastType=this.type,this.editors[e]||this.buildChildEditor(e);var o=this.getValue();this.type=e,this.register(),this.editors.forEach((function(c,_){var C,$;c&&(t.type===_?(t.keep_only_existing_values&&(C=c.getValue(),$=o,Object.keys($).forEach((function(B){B in C&&(C[B]=$[B])})),o=C),(t.keep_values||t.if)&&c.setValue(o,!0),c.container.style.display=""):c.container.style.display="none")})),this.onChange(!0,!1,{event:"switch",data:{type:this.lastType,path:this.editors[e].path}}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(e){var t,o,c=this,_=this.types[e],C=this.theme.getChildEditorHolder();this.editor_holder.appendChild(C),typeof _=="string"?(o=v({},this.schema)).type=_:(o=v({},this.schema,_),o=this.jsoneditor.expandRefs(o),_&&_.required&&Array.isArray(_.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(o.required=this.schema.required.concat(_.required))),(t=o)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies&&delete o.options.dependencies;var $=this.jsoneditor.getEditorClass(o);this.editors[e]=this.jsoneditor.createEditor($,{jsoneditor:this.jsoneditor,schema:o,container:C,path:this.path,parent:this,required:!0}),this.editors[e].preBuild(),this.editors[e].build(),this.editors[e].postBuild(),this.editors[e].header&&this.theme.visuallyHidden(this.editors[e].header),this.editors[e].option=this.switcher_options[e],C.addEventListener("change_header_text",(function(){c.refreshHeaderText()})),e!==this.type&&(C.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,this.jsoneditor.options.keep_oneof_values!==void 0&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),this.options.keep_oneof_values!==void 0&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,this.jsoneditor.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),this.options.keep_only_existing_values!==void 0&&(this.keep_only_existing_values=this.options.keep_only_existing_values),this.schema.oneOf)this.oneOf=!0,this.types=this.schema.oneOf,delete this.schema.oneOf;else if(this.schema.anyOf)this.anyOf=!0,this.types=this.schema.anyOf,delete this.schema.anyOf;else if(this.schema.if)this.if=!0,this.ifSchema=JSON.parse(JSON.stringify(this.schema.if)),this.thenSchema={title:"then"},this.elseSchema={title:"else"},this.types=[],this.schema.then&&L(this.thenSchema,this.schema,this.schema.then),this.schema.else&&L(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach((function(o){delete o.if,delete o.then,delete o.else})),delete this.schema.if;else{if(this.schema.type&&this.schema.type!=="any")Array.isArray(this.schema.type)?this.types=this.schema.type:this.types=[this.schema.type];else if(this.types=["string","number","integer","boolean","object","array","null"],this.schema.disallow){var e=this.schema.disallow;ni(e)==="object"&&Array.isArray(e)||(e=[e]);var t=[];this.types.forEach((function(o){e.includes(o)||t.push(o)})),this.types=t}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var e=this,t=this.container;this.header=this.label=this.theme.getLabelLike(this.getTitle(),this.isRequired()),this.switcher=this.theme.getSwitcher(this.display_text),this.switcher.setAttribute("id",this.formname+"switcher"),this.switcherLabel=this.theme.getHiddenLabel(this.formname+" switcher"),this.switcherLabel.setAttribute("for",this.formname+"switcher"),this.if||(this.container.appendChild(this.header),t.appendChild(this.switcherLabel),t.appendChild(this.switcher)),this.switcher.addEventListener("change",(function(c){c.preventDefault(),c.stopPropagation(),e.switchEditor(e.display_text.indexOf(c.currentTarget.value)),e.onChange(!0)})),this.editor_holder=document.createElement("div"),t.appendChild(this.editor_holder);var o={};this.jsoneditor.options.custom_validators&&(o.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((function(c,_){var C;e.editors[_]=!1,typeof c=="string"?(C=v({},e.schema)).type=c:(C=v({},e.schema,c),c.required&&Array.isArray(c.required)&&e.schema.required&&Array.isArray(e.schema.required)&&(C.required=e.schema.required.concat(c.required))),e.validators[_]=new bf(e.jsoneditor,C,o,e.defaults)})),this.jsoneditor.on("change",(function(){e.switchIf()})),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(e,t){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),En(mr(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"refreshHeaderText",value:function(){var e=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach((function(t,o){t.textContent=e[o]}))}},{key:"refreshValue",value:function(){this.editors[this.type]&&(this.value=this.editors[this.type].getValue())}},{key:"switchIf",value:function(){if(this.ifSchema&&this.value){var e=this.getIfType(this.value);this.lastType!==e&&(this.switchEditor(e),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(e){return this.jsoneditor.validator._validateSchema(this.ifSchema,e).length===0?0:1}},{key:"setValue",value:function(e,t){var o=this;e=this.applyConstFilter(e);var c=this.type,_={match:0,extra:0,i:this.type},C={match:0,i:null};this.validators.forEach((function(z,Y){var Q=null;o.anyOf!==void 0&&o.anyOf&&(Q=z.fitTest(e),(_.match<Q.match||_.match===Q.match&&_.extra>Q.extra)&&((_=Q).i=Y)),z.validate(e).length||C.i!==null?_=C:(C.i=Y,Q!==null&&(C.match=Q.match))}));var $=C.i;this.anyOf!==void 0&&this.anyOf&&C.match<_.match&&($=_.i),this.if&&($=this.getIfType(e)),$===null&&($=this.type),this.type=$,this.switcher.value=this.display_text[$];var B=this.type!==c;B&&(this.switchEditor(this.type),this.editors[this.type].setValue(e,t)),e!==void 0&&this.editors[this.type].setValue(e,t),this.refreshValue(),this.onChange(B)}},{key:"destroy",value:function(){this.editors.forEach((function(e){e&&e.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.switcher&&this.switcher.parentNode&&this.switcher.parentNode.removeChild(this.switcher),En(mr(r.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(e){var t=this;if(this.oneOf||this.anyOf){var o=this.oneOf?"oneOf":"anyOf";this.editors.forEach((function(c,_){if(c){var C="".concat(t.path,".").concat(o,"[").concat(_,"]");c.showValidationErrors(e.reduce((function($,B){if(B.path.startsWith(C)||B.path===C.substr(0,B.path.length)){var z=v({},B);B.path.startsWith(C)&&(z.path=t.path+z.path.substr(C.length)),$.push(z)}return $}),[]))}}))}else this.editors.forEach((function(c){c&&c.showValidationErrors(e)}))}},{key:"addLinks",value:function(){}}])&&xg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function Ui(a){return Ui=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ui(a)}function Rg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Lg(l.key),l)}}function Lg(a){var r=(function(n,l){if(Ui(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ui(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Ui(r)=="symbol"?r:r+""}function Ag(a,r,n){return r=wa(r),(function(l,e){if(e&&(Ui(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,_f()?Reflect.construct(r,n||[],wa(a).constructor):r.apply(a,n))}function _f(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(_f=function(){return!!a})()}function wa(a){return wa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},wa(a)}function Wl(a,r){return Wl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Wl(a,r)}var $g=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Ag(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Wl(e,t)})(r,a),n=r,(l=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&Rg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function wf(a,r){var n=Object.keys(a);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);r&&(l=l.filter((function(e){return Object.getOwnPropertyDescriptor(a,e).enumerable}))),n.push.apply(n,l)}return n}function Gi(a){for(var r=1;r<arguments.length;r++){var n=arguments[r]!=null?arguments[r]:{};r%2?wf(Object(n),!0).forEach((function(l){ka(a,l,n[l])})):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(n)):wf(Object(n)).forEach((function(l){Object.defineProperty(a,l,Object.getOwnPropertyDescriptor(n,l))}))}return a}function ka(a,r,n){return(r=jf(r))in a?Object.defineProperty(a,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):a[r]=n,a}function Ji(a,r){return(function(n){if(Array.isArray(n))return n})(a)||(function(n,l){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,o,c,_,C=[],$=!0,B=!1;try{if(c=(e=e.call(n)).next,l!==0)for(;!($=(t=c.call(e)).done)&&(C.push(t.value),C.length!==l);$=!0);}catch(z){B=!0,o=z}finally{try{if(!$&&e.return!=null&&(_=e.return(),Object(_)!==_))return}finally{if(B)throw o}}return C}})(a,r)||(function(n,l){if(n){if(typeof n=="string")return kf(n,l);var e=Object.prototype.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?kf(n,l):void 0}})(a,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
24
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function kf(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function Zr(a){return Zr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Zr(a)}function Ig(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,jf(l.key),l)}}function jf(a){var r=(function(n,l){if(Zr(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Zr(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Zr(r)=="symbol"?r:r+""}function Ng(a,r,n){return r=Zt(r),(function(l,e){if(e&&(Zr(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Of()?Reflect.construct(r,n||[],Zt(a).constructor):r.apply(a,n))}function Of(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Of=function(){return!!a})()}function Tr(){return Tr=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Zt(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Tr.apply(this,arguments)}function Zt(a){return Zt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Zt(a)}function Zl(a,r){return Zl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Zl(a,r)}var Ef=(function(a){function r(e,t,o){var c;return(function(_,C){if(!(_ instanceof C))throw new TypeError("Cannot call a class as a function")})(this,r),(c=Ng(this,r,[e,t])).currentDepth=o,c}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Zl(e,t)})(r,a),n=r,(l=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){Tr(Zt(r.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.register()}))}},{key:"unregister",value:function(){Tr(Zt(r.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){return e.unregister()}))}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.maxwidth),3)}},{key:"enable",value:function(){this.always_disabled||(this.editjson_control&&(this.editjson_control.disabled=!1),this.addproperty_button&&(this.addproperty_button.disabled=!1),Tr(Zt(r.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){(e.isActive()||e.isUiOnly)&&e.enable(),e.optInCheckbox&&(e.optInCheckbox.disabled=!1)})))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),Tr(Zt(r.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){(t.isActive()||t.isUiOnly)&&t.disable(e),t.optInCheckbox.disabled=!0}))}},{key:"layoutEditors",value:function(){var e,t,o=this;if(this.row_container){var c;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(Ve,_e){var Ee=o.editors[Ve].schema.propertyOrder,Ge=o.editors[_e].schema.propertyOrder;return typeof Ee!="number"&&(Ee=1e3),typeof Ge!="number"&&(Ge=1e3),Ee-Ge}));var _,C=this.format==="categories",$=[],B=null,z=null;if(this.format==="grid-strict"){var Y=0;if(_=[],this.property_order.forEach((function(Ve){var _e=o.editors[Ve];if(!_e.property_removed){var Ee=_e.options.hidden?0:_e.options.grid_columns||_e.getNumColumns(),Ge=_e.options.hidden?0:_e.options.grid_offset||0,st=!_e.options.hidden&&(_e.options.grid_break||!1),Dt={key:Ve,width:Ee,offset:Ge,height:_e.options.hidden?0:_e.container.offsetHeight};_.push(Dt),$[Y]=_,st&&(Y++,_=[])}})),this.layout===JSON.stringify($))return!1;for(this.layout=JSON.stringify($),c=document.createElement("div"),e=0;e<$.length;e++)for(_=this.theme.getGridRow(),c.appendChild(_),t=0;t<$[e].length;t++)B=$[e][t].key,(z=this.editors[B]).options.hidden?z.container.style.display="none":this.theme.setGridColumnSize(z.container,$[e][t].width,$[e][t].offset),_.appendChild(z.container)}else if(this.format==="grid"){for(this.property_order.forEach((function(Ve){var _e=o.editors[Ve];if(!_e.property_removed){for(var Ee=!1,Ge=_e.options.hidden?0:_e.options.grid_columns||_e.getNumColumns(),st=_e.options.hidden?0:_e.container.offsetHeight,Dt=0;Dt<$.length;Dt++)$[Dt].width+Ge<=12&&(!st||.5*$[Dt].minh<st&&2*$[Dt].maxh>st)&&(Ee=Dt);Ee===!1&&($.push({width:0,minh:999999,maxh:0,editors:[]}),Ee=$.length-1),$[Ee].editors.push({key:Ve,width:Ge,height:st}),$[Ee].width+=Ge,$[Ee].minh=Math.min($[Ee].minh,st),$[Ee].maxh=Math.max($[Ee].maxh,st)}})),e=0;e<$.length;e++)if($[e].width<12){var Q=!1,se=0;for(t=0;t<$[e].editors.length;t++)(Q===!1||$[e].editors[t].width>$[e].editors[Q].width)&&(Q=t),$[e].editors[t].width*=12/$[e].width,$[e].editors[t].width=Math.floor($[e].editors[t].width),se+=$[e].editors[t].width;se<12&&($[e].editors[Q].width+=12-se),$[e].width=12}if(this.layout===JSON.stringify($))return!1;for(this.layout=JSON.stringify($),c=document.createElement("div"),e=0;e<$.length;e++)for(_=this.theme.getGridRow(),c.appendChild(_),t=0;t<$[e].editors.length;t++)B=$[e].editors[t].key,(z=this.editors[B]).options.hidden?z.container.style.display="none":this.theme.setGridColumnSize(z.container,$[e].editors[t].width),_.appendChild(z.container)}else{if(c=document.createElement("div"),C){var pe=document.createElement("div"),je=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),Se=this.theme.getTopTabContentHolder(je);for(this.property_order.forEach((function(Ve){var _e=o.editors[Ve];if(!_e.property_removed){var Ee=o.theme.getTabContent(),Ge=_e.schema&&(_e.schema.type==="object"||_e.schema.type==="array");Ee.isObjOrArray=Ge;var st=o.theme.getGridRow();_e.tab||(o.basicPane===void 0?o.addRow(_e,je,Ee):o.addRow(_e,je,o.basicPane)),Ee.id=o.getValidId(_e.tab_text.textContent),Ge?(Ee.appendChild(st),Se.appendChild(Ee),o.theme.addTopTab(je,_e.tab)):(pe.appendChild(st),Se.childElementCount>0?Se.firstChild.isObjOrArray&&(Ee.appendChild(pe),Se.insertBefore(Ee,Se.firstChild),o.theme.insertBasicTopTab(_e.tab,je),_e.basicPane=Ee):(Ee.appendChild(pe),Se.appendChild(Ee),o.theme.addTopTab(je,_e.tab),_e.basicPane=Ee)),_e.options.hidden?_e.container.style.display="none":o.theme.setGridColumnSize(_e.container,12),st.appendChild(_e.container),_e.rowPane=Ee}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var Re=this.tabs_holder.parentNode;Re.removeChild(Re.firstChild),Re.appendChild(je),this.tabPanesContainer=Se,this.tabs_holder=je;var Ie=this.theme.getFirstTab(this.tabs_holder);return void(Ie&&j(Ie,"click"))}this.property_order.forEach((function(Ve){var _e=o.editors[Ve];_e.property_removed||(_=o.theme.getGridRow(),c.appendChild(_),_e.options.hidden?_e.container.style.display="none":o.theme.setGridColumnSize(_e.container,12),_.appendChild(_e.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(c)}}},{key:"getPropertySchema",value:function(e){var t=this,o=this.schema.properties[e]||{};o=v({},o);var c=!!this.schema.properties[e];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(_){new RegExp(_).test(e)&&(o.allOf=o.allOf||[],o.allOf.push(t.schema.patternProperties[_]),c=!0)})),!c&&this.schema.additionalProperties&&Zr(this.schema.additionalProperties)==="object"&&(o=v({},this.schema.additionalProperties)),o}},{key:"preBuild",value:function(){var e=this;if(Tr(Zt(r.prototype),"preBuild",this).call(this),this.editors={},this.cached_editors={},this.format=this.options.layout||this.options.object_layout||this.schema.format||this.jsoneditor.options.object_layout||"normal",this.schema.properties=this.schema.properties||{},this.minwidth=0,this.maxwidth=0,this.options.table_row)Object.entries(this.schema.properties).forEach((function(t){var o=Ji(t,2),c=o[0],_=o[1],C=e.jsoneditor.getEditorClass(_);e.editors[c]=e.jsoneditor.createEditor(C,{jsoneditor:e.jsoneditor,schema:_,path:"".concat(e.path,".").concat(c),parent:e,compact:!0,required:!0},e.currentDepth+1),e.editors[c].preBuild();var $=e.editors[c].options.hidden?0:e.editors[c].options.grid_columns||e.editors[c].getNumColumns();e.minwidth+=$,e.maxwidth+=$})),this.no_link_holder=!0;else{if(this.options.table)throw new Error("Not supported yet");this.schema.defaultProperties||(this.jsoneditor.options.display_required_only||this.options.display_required_only?this.schema.defaultProperties=Object.keys(this.schema.properties).filter((function(t){return e.isRequiredObject({key:t,schema:e.schema.properties[t]})})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach((function(t){e.addObjectProperty(t,!0),e.editors[t]&&(e.minwidth=Math.max(e.minwidth,e.editors[t].options.grid_columns||e.editors[t].getNumColumns()),e.maxwidth+=e.editors[t].options.grid_columns||e.editors[t].getNumColumns())}))}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(t,o){var c=e.editors[t].schema.propertyOrder,_=e.editors[o].schema.propertyOrder;return typeof c!="number"&&(c=1e3),typeof _!="number"&&(_=1e3),c-_}))}},{key:"addTab",value:function(e){var t=this,o=this.rows[e].schema&&(this.rows[e].schema.type==="object"||this.rows[e].schema.type==="array");this.tabs_holder&&(this.rows[e].tab_text=document.createElement("span"),this.rows[e].tab_text.textContent=o?this.rows[e].getHeaderText():this.schema.basicCategoryTitle===void 0?"Basic":this.schema.basicCategoryTitle,this.rows[e].tab=this.theme.getTopTab(this.rows[e].tab_text,this.getValidId(this.rows[e].tab_text.textContent)),this.rows[e].tab.addEventListener("click",(function(c){t.active_tab=t.rows[e].tab,t.refreshTabs(),c.preventDefault(),c.stopPropagation()})))}},{key:"addRow",value:function(e,t,o){var c=this.rows.length,_=e.schema.type==="object"||e.schema.type==="array";this.rows[c]=e,this.rows[c].rowPane=o,_?(this.addTab(c),this.theme.addTopTab(t,this.rows[c].tab)):this.basicTab===void 0?(this.addTab(c),this.basicTab=c,this.basicPane=o,this.theme.addTopTab(t,this.rows[c].tab)):(this.rows[c].tab=this.rows[this.basicTab].tab,this.rows[c].tab_text=this.rows[this.basicTab].tab_text,this.rows[c].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(e){var t=this,o=this.basicTab!==void 0,c=!1;this.rows.forEach((function(_){_.tab&&_.rowPane&&_.rowPane.parentNode&&(o&&_.tab===t.rows[t.basicTab].tab&&c||(e?_.tab_text.textContent=_.getHeaderText():(o&&_.tab===t.rows[t.basicTab].tab&&(c=!0),_.tab===t.active_tab?t.theme.markTabActive(_):t.theme.markTabInactive(_))))}))}},{key:"build",value:function(){var e=this,t=this.format==="categories";if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach((function(c){var _=Ji(c,2),C=_[0],$=_[1],B=e.theme.getTableCell();e.editor_holder.appendChild(B),$.setContainer(B),$.build(),$.postBuild(),$.setOptInCheckbox($.header),$.setValue($.getDefault(),!0),e.editors[C].options.hidden&&(B.style.display="none"),e.editors[C].options.input_width&&(B.style.width=e.editors[C].options.input_width)}));else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("span"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.title.classList.add("je-object__title"),this.controls=this.theme.getButtonHolder(),this.controls.classList.add("je-object__controls"),this.container.appendChild(this.title),this.container.appendChild(this.controls),this.container.classList.add("je-object__container"),this.editjson_holder=this.theme.getModal(),this.editjson_textarea_label=this.theme.getHiddenLabel(this.translate("button_edit_json")),this.editjson_textarea_label.setAttribute("for",this.path+"-edit-json-textarea"),this.editjson_textarea=this.theme.getTextareaInput(),this.editjson_textarea.setAttribute("id",this.path+"-edit-json-textarea"),this.editjson_textarea.setAttribute("aria-labelledby",this.path+"-edit-json-textarea"),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("button_save","save","button_save"),this.editjson_save.classList.add("json-editor-btntype-save"),this.editjson_save.addEventListener("click",(function(c){c.preventDefault(),c.stopPropagation(),e.saveJSON()})),this.editjson_copy=this.getButton("button_copy","copy","button_copy"),this.editjson_copy.classList.add("json-editor-btntype-copy"),this.editjson_copy.addEventListener("click",(function(c){c.preventDefault(),c.stopPropagation(),e.copyJSON()})),this.editjson_cancel=this.getButton("button_cancel","cancel","button_cancel"),this.editjson_cancel.classList.add("json-editor-btntype-cancel"),this.editjson_cancel.addEventListener("click",(function(c){c.preventDefault(),c.stopPropagation(),e.hideEditJSON()})),this.editjson_holder.appendChild(this.editjson_textarea_label),this.editjson_holder.appendChild(this.editjson_textarea),this.editjson_holder.appendChild(this.editjson_save),this.editjson_holder.appendChild(this.editjson_copy),this.editjson_holder.appendChild(this.editjson_cancel),this.addproperty_holder=this.theme.getModal(),this.addproperty_list=document.createElement("div"),this.addproperty_list.classList.add("property-selector"),this.addproperty_add=this.getButton("button_add","add","button_add"),this.addproperty_add.classList.add("json-editor-btntype-add"),this.addproperty_input=this.theme.getFormInputField("text"),this.addproperty_input.setAttribute("placeholder","Property name..."),this.addproperty_input_label=this.theme.getHiddenLabel(this.translate("button_properties")),this.addproperty_input_label.setAttribute("for",this.path+"-property-selector"),this.addproperty_input.classList.add("property-selector-input"),this.addproperty_input.setAttribute("id",this.path+"-property-selector"),this.addproperty_input.setAttribute("aria-labelledby",this.path+"-property-selector"),this.addproperty_add.addEventListener("click",(function(c){if(c.preventDefault(),c.stopPropagation(),e.addproperty_input.value){if(e.editors[e.addproperty_input.value])return void window.alert("there is already a property with that name");e.addObjectProperty(e.addproperty_input.value),e.editors[e.addproperty_input.value]&&e.editors[e.addproperty_input.value].disable();var _=e.editors[e.addproperty_input.value].key,C=e.editors[e.addproperty_input.value].type,$=e.editors[e.addproperty_input.value].path;e.onChange(!0,!1,{event:"add",data:{key:_,type:C,path:$}})}})),this.addproperty_input.addEventListener("input",(function(c){c.target.previousSibling.previousSibling.childNodes.forEach((function(_){var C=_.innerText,$=c.target.value;e.options.case_sensitive_property_search||e.jsoneditor.options.case_sensitive_property_search||(C=C.toLowerCase(),$=$.toLowerCase()),C.includes($)?_.style.display="":_.style.display="none"}))})),this.addproperty_holder.appendChild(this.addproperty_list),this.addproperty_holder.appendChild(this.addproperty_input_label),this.addproperty_holder.appendChild(this.addproperty_input),this.addproperty_holder.appendChild(this.addproperty_add);var o=document.createElement("div");o.style.clear="both",this.addproperty_holder.appendChild(o),this.onOutsideModalClickListener=this.onOutsideModalClick.bind(this),document.addEventListener("click",this.onOutsideModalClickListener,!0),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.error_holder=document.createElement("div"),this.container.appendChild(this.error_holder),this.editor_holder=this.theme.getIndentedPanel(),this.container.appendChild(this.editor_holder),this.row_container=this.theme.getGridContainer(),t?(this.tabs_holder=this.theme.getTopTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTopTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.tabs_holder)):(this.tabs_holder=this.theme.getTabHolder(this.getValidId(this.translateProperty(this.schema.title))),this.tabPanesContainer=this.theme.getTabContentHolder(this.tabs_holder),this.editor_holder.appendChild(this.row_container)),Object.values(this.editors).forEach((function(c){var _=e.theme.getTabContent(),C=e.theme.getGridColumn(),$=!(!c.schema||c.schema.type!=="object"&&c.schema.type!=="array");if(_.isObjOrArray=$,t){if($){var B=e.theme.getGridContainer();B.appendChild(C),_.appendChild(B),e.tabPanesContainer.appendChild(_),e.row_container=B}else e.row_container_basic===void 0&&(e.row_container_basic=e.theme.getGridContainer(),_.appendChild(e.row_container_basic),e.tabPanesContainer.childElementCount===0?e.tabPanesContainer.appendChild(_):e.tabPanesContainer.insertBefore(_,e.tabPanesContainer.childNodes[1])),e.row_container_basic.appendChild(C);e.addRow(c,e.tabs_holder,_),_.id=e.getValidId(c.schema.title)}else e.row_container.appendChild(C);c.setContainer(C),c.build(),c.postBuild(),c.setOptInCheckbox(c.header)})),this.rows[0]&&j(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse","button_collapse"),this.collapse_control.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(this.collapse_control,this.title.childNodes[0]),this.collapse_control.addEventListener("click",(function(c){c.preventDefault(),c.stopPropagation(),e.collapsed?(e.editor_holder.style.display="",e.collapsed=!1,e.setButtonText(e.collapse_control,"","collapse","button_collapse")):(e.editor_holder.style.display="none",e.collapsed=!0,e.setButtonText(e.collapse_control,"","expand","button_expand"))})),this.options.collapsed&&j(this.collapse_control,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.collapse_control.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.collapse_control.style.display="none"),this.editjson_control=this.getButton("JSON","edit","button_edit_json"),this.editjson_control.classList.add("json-editor-btntype-editjson"),this.editjson_control.addEventListener("click",(function(c){c.preventDefault(),c.stopPropagation(),e.toggleEditJSON()})),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&this.schema.options.disable_edit_json!==void 0?this.schema.options.disable_edit_json&&(this.editjson_control.style.display="none"):this.jsoneditor.options.disable_edit_json&&(this.editjson_control.style.display="none"),this.addproperty_button=this.getButton("properties","edit_properties","button_object_properties"),this.addproperty_button.classList.add("json-editor-btntype-properties"),this.addproperty_button.addEventListener("click",(function(c){c.preventDefault(),c.stopPropagation(),e.toggleAddProperty()})),this.controls.appendChild(this.addproperty_button),this.controls.insertBefore(this.addproperty_holder,this.controls.childNodes[1]),this.refreshAddProperties(),this.deactivateNonRequiredProperties(!1)}this.options.table_row?(this.editor_holder=this.container,this.property_order.forEach((function(c){e.editor_holder.appendChild(e.editors[c].container)}))):(this.layoutEditors(),this.layoutEditors()),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"deactivateNonRequiredProperties",value:function(e){var t=this,o=this.jsoneditor.options.show_opt_in,c=this.options.show_opt_in!==void 0,_=c&&this.options.show_opt_in===!0,C=c&&this.options.show_opt_in===!1;(_||!C&&o||!c&&o)&&Object.entries(this.editors).forEach((function($){var B=Ji($,2),z=B[0],Y=B[1];t.isRequiredObject(Y)||t.editors[z].deactivate(),e&&typeof t.editors[z].deactivateNonRequiredProperties=="function"&&t.editors[z].deactivateNonRequiredProperties(e)}))}},{key:"showEditJSON",value:function(){this.editjson_holder&&(this.hideAddProperty(),this.editjson_holder.style.left="".concat(this.editjson_control.offsetLeft,"px"),this.editjson_holder.style.top="".concat(this.editjson_control.offsetTop+this.editjson_control.offsetHeight,"px"),this.editjson_textarea.value=JSON.stringify(this.getValue(),null,2),this.disable(),this.editjson_holder.style.display="",this.editjson_control.disabled=!1,this.editing_json=!0)}},{key:"hideEditJSON",value:function(){this.editjson_holder&&this.editing_json&&(this.editjson_holder.style.display="none",this.enable(),this.editing_json=!1)}},{key:"copyJSON",value:function(){this.editjson_holder&&navigator.clipboard.writeText(this.editjson_textarea.value).catch((function(e){return window.alert(e)}))}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var e=JSON.parse(this.editjson_textarea.value);this.setValue(e),this.hideEditJSON(),this.onChange(!0)}catch(t){throw window.alert("invalid JSON"),t}}},{key:"toggleEditJSON",value:function(){this.editing_json?this.hideEditJSON():this.showEditJSON()}},{key:"insertPropertyControlUsingPropertyOrder",value:function(e,t,o){var c;this.schema.properties[e]&&(c=this.schema.properties[e].propertyOrder),typeof c!="number"&&(c=1e3),t.propertyOrder=c;for(var _=0;_<o.childNodes.length;_++){var C=o.childNodes[_];if(t.propertyOrder<C.propertyOrder){this.addproperty_list.insertBefore(t,C),t=null;break}}t&&this.addproperty_list.appendChild(t)}},{key:"addPropertyCheckbox",value:function(e){var t,o=this,c=this.theme.getCheckbox();t=this.schema.properties[e]&&this.schema.properties[e].title?this.schema.properties[e].title:e;var _=this.theme.getCheckboxLabel(t),C=this.theme.getFormControl(_,c,null,null,this.path+"-"+e);return C.style.paddingBottom=C.style.marginBottom=C.style.paddingTop=C.style.marginTop=0,C.style.height="auto",this.insertPropertyControlUsingPropertyOrder(e,C,this.addproperty_list),c.checked=e in this.editors,c.addEventListener("change",(function(){c.checked?o.addObjectProperty(e):o.removeObjectProperty(e),o.onChange(!0)})),this.addproperty_checkboxes[e]=c,c}},{key:"showAddProperty",value:function(){this.addproperty_holder&&(this.hideEditJSON(),this.addproperty_holder.style.left="".concat(this.addproperty_button.offsetLeft,"px"),this.addproperty_holder.style.top="".concat(this.addproperty_button.offsetTop+this.addproperty_button.offsetHeight,"px"),this.disable(),this.adding_property=!0,this.addproperty_button.disabled=!1,this.addproperty_holder.style.display="",this.refreshAddProperties())}},{key:"hideAddProperty",value:function(){this.addproperty_holder&&this.adding_property&&(this.addproperty_holder.style.display="none",this.enable(),this.adding_property=!1)}},{key:"toggleAddProperty",value:function(){this.adding_property?this.hideAddProperty():this.showAddProperty()}},{key:"removeObjectProperty",value:function(e){if(this.editors[e]){var t;if((t=this.editors[e].schema)!==null&&t!==void 0&&(t=t.options)!==null&&t!==void 0&&t.dependencies)return;this.editors[e].unregister(),delete this.editors[e],this.refreshValue(),this.layoutEditors()}}},{key:"getSchemaOnMaxDepth",value:function(e){return Object.keys(e).reduce((function(t,o){switch(o){case"$ref":return t;case"properties":case"items":return Gi(Gi({},t),{},ka({},o,{}));case"additionalProperties":case"propertyNames":return Gi(Gi({},t),{},ka({},o,!0));default:return Gi(Gi({},t),{},ka({},o,e[o]))}}),{})}},{key:"addObjectProperty",value:function(e,t){if(!this.editors[e]){if(this.cached_editors[e]){if(this.editors[e]=this.cached_editors[e],t)return;this.editors[e].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[e]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find((function($){return new RegExp($).test(e)}))))return;var o=this.getPropertySchema(e);typeof o.propertyOrder!="number"&&(o.propertyOrder=Object.keys(this.editors).length+1e3);var c=this.jsoneditor.getEditorClass(o),_=this.jsoneditor.options.max_depth;if(this.editors[e]=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:_&&this.currentDepth>=_?this.getSchemaOnMaxDepth(o):o,path:"".concat(this.path,".").concat(e),parent:this},this.currentDepth+1),this.editors[e].preBuild(),!t){var C=this.theme.getChildEditorHolder();this.editor_holder.appendChild(C),this.editors[e].setContainer(C),this.editors[e].build(),this.editors[e].postBuild(),this.editors[e].setOptInCheckbox(c.header),this.editors[e].activate()}this.cached_editors[e]=this.editors[e]}t||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(e){var t=e.path||e.composedPath&&e.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(t[0])&&this.adding_property&&(e.preventDefault(),e.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),Tr(Zt(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"canHaveAdditionalProperties",value:function(){return typeof this.schema.additionalProperties=="boolean"?this.schema.additionalProperties:Zr(this.schema.additionalProperties)==="object"&&this.schema.additionalProperties!==null||(typeof this.options.no_additional_properties=="boolean"?!this.options.no_additional_properties:typeof this.jsoneditor.options.no_additional_properties!="boolean"||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach((function(e){return e.destroy()})),this.editor_holder&&(this.editor_holder.innerHTML=""),this.title&&this.title.parentNode&&this.title.parentNode.removeChild(this.title),this.error_holder&&this.error_holder.parentNode&&this.error_holder.parentNode.removeChild(this.error_holder),this.editors=null,this.cached_editors=null,this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),this.editor_holder=null,document.removeEventListener("click",this.onOutsideModalClickListener,!0),Tr(Zt(r.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var e=Tr(Zt(r.prototype),"getValue",this).call(this);return e&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(e).forEach((function(t){var o;((o=e[t])===void 0||o===""||o===Object(o)&&Object.keys(o).length===0&&o.constructor===Object)&&delete e[t]})),e&&(this.jsoneditor.options.remove_false_properties||this.options.remove_false_properties)&&Object.keys(e).forEach((function(t){e[t]===!1&&delete e[t]})),e}}},{key:"refreshValue",value:function(){var e=this;this.value={},this.editors&&(Object.keys(this.editors).forEach((function(t){e.editors[t].isActive()&&(e.editors[t].refreshValue(),e.value[t]=e.editors[t].getValue())})),Object.keys(this.editors).forEach((function(t){e.editors[t].isActive()&&e.activateDependentRequired(e.editors[t].key)})),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(e){var t=this;this.getDependentRequired(e).forEach((function(o){var c;Object.entries(t.cached_editors).forEach((function(_){var C=Ji(_,2),$=(C[0],C[1]);$.key===o&&(c=$)})),c&&!c.isActive()&&c.activate()}))}},{key:"getDependentRequired",value:function(e){return this.schema.dependentRequired&&E(this.schema.dependentRequired,e)?this.schema.dependentRequired[e]:[]}},{key:"refreshAddProperties",value:function(){var e=this;if(this.options.disable_properties||this.options.disable_properties!==!1&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var t,o=0,c=!1;Object.keys(this.editors).forEach((function(_){return o++})),t=this.canHaveAdditionalProperties()&&!(this.schema.maxProperties!==void 0&&o>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(_){e.addPropertyCheckbox(_),e.isRequiredObject(e.cached_editors[_])&&_ in e.editors&&(e.addproperty_checkboxes[_].disabled=!0),e.schema.minProperties!==void 0&&o<=e.schema.minProperties?(e.addproperty_checkboxes[_].disabled=e.addproperty_checkboxes[_].checked,e.addproperty_checkboxes[_].checked||(c=!0)):_ in e.editors?c=!0:t||E(e.schema.properties,_)?(e.addproperty_checkboxes[_].disabled=!1,c=!0):e.addproperty_checkboxes[_].disabled=!0})),this.canHaveAdditionalProperties()&&(c=!0),Object.keys(this.schema.properties).forEach((function(_){e.cached_editors[_]||(c=!0,e.addPropertyCheckbox(_))})),c?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!t:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(e){if(e)return typeof e.schema.required=="boolean"?e.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(e.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(e,t){var o=this;(Zr(e=(e=this.applyConstFilter(e))||{})!=="object"||Array.isArray(e))&&(e={}),Object.entries(this.cached_editors).forEach((function(c){var _=Ji(c,2),C=_[0],$=_[1];e[C]!==void 0?(o.addObjectProperty(C),$.setValue(e[C],t),$.activate(),o.disabled&&$.disable()):t||o.isRequiredObject($)?$.setValue($.getDefault(),t):o.jsoneditor.options.show_opt_in||o.options.show_opt_in?$.deactivate():o.removeObjectProperty(C)})),Object.entries(e).forEach((function(c){var _=Ji(c,2),C=_[0],$=_[1];o.cached_editors[C]||(o.addObjectProperty(C),o.editors[C]&&o.editors[C].setValue($,t,!!o.editors[C].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(e){var t=this,o=[],c=[];e.forEach((function(_){_.path===t.path?o.push(_):c.push(_)})),this.error_holder&&(o.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",o.forEach((function(_){_.errorcount&&_.errorcount>1&&(_.message+=" (".concat(_.errorcount," errors)")),t.error_holder.appendChild(t.theme.getErrorMessage(_.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(o.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(_){_.showValidationErrors(c)}))}}])&&Ig(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D);function Ki(a){return Ki=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Ki(a)}function Dg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Bg(l.key),l)}}function Bg(a){var r=(function(n,l){if(Ki(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Ki(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Ki(r)=="symbol"?r:r+""}function Fg(a,r,n){return r=Yr(r),(function(l,e){if(e&&(Ki(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Sf()?Reflect.construct(r,n||[],Yr(a).constructor):r.apply(a,n))}function Sf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Sf=function(){return!!a})()}function Wi(){return Wi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Yr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Wi.apply(this,arguments)}function Yr(a){return Yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Yr(a)}function Yl(a,r){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Yl(a,r)}Ef.rules={".je-object__title":"display:inline-block",".je-object__controls":"margin:0%200%200%2010px",".je-object__container":"position:relative",".je-object__property-checkbox":"margin:0;height:auto",".property-selector":"width:295px;max-height:160px;padding:5px%200;overflow-y:auto;overflow-x:hidden;padding-left:5px",".property-selector-input":"width:220px;margin-bottom:0;display:inline-block",".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-edit-json--textarea":"height:170px;width:300px;display:block"};var Mg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Fg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Yl(e,t)})(r,a),n=r,(l=[{key:"preBuild",value:function(){Wi(Yr(r.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var e=this;this.label="",this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.radioContainer=document.createElement("div"),this.radioGroup=[];for(var t=function(z){e.setValue(z.currentTarget.value),e.onChange(!0),e.radioGroup.forEach((function(Y){Y.checked=Y.value===e.getValue()}))},o=0;o<this.enum_values.length;o++){var c={id:"".concat(this.formname,"[").concat(o,"]"),value:this.enum_values[o]};this.jsoneditor.options.use_name_attributes&&(c.name=this.formname),this.input=this.theme.getFormRadio(c),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",t,!1),this.radioGroup.push(this.input);var _=this.theme.getFormRadioLabel(this.enum_display[o]);_.htmlFor=this.input.id;var C=this.theme.getFormRadioControl(_,this.input,!(this.options.layout!=="horizontal"&&!this.options.compact));this.radioContainer.appendChild(C)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var $=0;$<this.radioGroup.length;$++)this.radioGroup[$].disabled=!0;this.radioContainer.classList.add("readonly")}var B=this.theme.getContainer();B.appendChild(this.radioContainer),B.dataset.containerFor="radio",this.input=B,this.control=this.theme.getFormControl(this.label,B,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.input.parentNode&&e.afterInputReady()}))}},{key:"enable",value:function(){if(!this.always_disabled){for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!1;this.radioContainer.classList.remove("readonly"),Wi(Yr(r.prototype),"enable",this).call(this)}}},{key:"disable",value:function(e){e&&(this.always_disabled=!0);for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!0;this.radioContainer.classList.add("readonly"),Wi(Yr(r.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.radioContainer.parentNode&&this.radioContainer.parentNode.parentNode&&this.radioContainer.parentNode.parentNode.removeChild(this.radioContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Wi(Yr(r.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(e){typeof(e=this.applyConstFilter(e))!="string"&&(e=String(e));for(var t=0;t<this.radioGroup.length;t++){if(this.radioGroup[t].value===e){this.radioGroup[t].checked=!0;break}this.radioGroup[t].checked=!1}this.value=e,this.onChange()}}])&&Dg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Fo);function Zi(a){return Zi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Zi(a)}function qg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Vg(l.key),l)}}function Vg(a){var r=(function(n,l){if(Zi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Zi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Zi(r)=="symbol"?r:r+""}function zg(a,r,n){return r=yr(r),(function(l,e){if(e&&(Zi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,xf()?Reflect.construct(r,n||[],yr(a).constructor):r.apply(a,n))}function xf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(xf=function(){return!!a})()}function Sn(){return Sn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=yr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Sn.apply(this,arguments)}function yr(a){return yr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yr(a)}function Ql(a,r){return Ql=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Ql(a,r)}var Hg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),zg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ql(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t,o){e=this.applyConstFilter(e);var c=Sn(yr(r.prototype),"setValue",this).call(this,e,t,o);c!==void 0&&c.changed&&this.sceditor_instance&&this.sceditor_instance.val(c.value)}},{key:"build",value:function(){this.options.format="textarea",Sn(yr(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e=this;if(window.sceditor){var t=this.expandCallbacks("sceditor",v({},{format:this.input_type,emoticonsEnabled:!1,width:"100%",height:300,readOnly:this.schema.readOnly||this.schema.readonly||this.schema.template},this.defaults.options.sceditor||{},this.options.sceditor||{},{element:this.input})),o=window.sceditor.instance(this.input);o===void 0&&window.sceditor.create(this.input,t),this.sceditor_instance=o||window.sceditor.instance(this.input),this.sceditor_instance.blur((function(){e.value=e.sceditor_instance.val(),e.sceditor_instance.updateOriginal(),e.is_dirty=!0,e.onChange(!0)})),this.theme.afterInputReady(this.input)}else Sn(yr(r.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.sceditor_instance&&this.sceditor_instance.readOnly(!1),Sn(yr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Sn(yr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Sn(yr(r.prototype),"destroy",this).call(this)}}])&&qg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function Yi(a){return Yi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Yi(a)}function Ug(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Gg(l.key),l)}}function Gg(a){var r=(function(n,l){if(Yi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Yi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Yi(r)=="symbol"?r:r+""}function Jg(a,r,n){return r=Rr(r),(function(l,e){if(e&&(Yi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Cf()?Reflect.construct(r,n||[],Rr(a).constructor):r.apply(a,n))}function Cf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Cf=function(){return!!a})()}function ii(){return ii=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Rr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},ii.apply(this,arguments)}function Rr(a){return Rr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rr(a)}function Xl(a,r){return Xl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Xl(a,r)}var Kg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Jg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Xl(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.select2_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(e);this.input.value=o,this.select2v4?this.select2_instance.val(o).trigger("change"):this.select2_instance.select2("val",o),this.onChange(!0)}else ii(Rr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var t=this.expandCallbacks("select2",v({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=t.tags=!!t.tags&&this.schema.type==="string",this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=E(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var o=e.select2v4?e.select2_instance.val():e.select2_instance.select2("val");e.updateValue(o),e.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}ii(Rr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){var t=this.enum_values[0];return e=this.typecast(e||""),this.enum_values.includes(e)?t=e:this.newEnumAllowed&&(t=this.addNewOption(e)?e:t),this.value=t,t}},{key:"addNewOption",value:function(e){var t,o=this.typecast(e),c=!1;return this.enum_values.includes(o)||o===""||(this.enum_options.push("".concat(o)),this.enum_display.push("".concat(o)),this.enum_values.push(o),this.schema.enum.push(o),(t=this.input.querySelector('option[value="'.concat(o,'"]')))?t.removeAttribute("data-select2-tag"):this.select2_instance.append(new Option(o,o,!1,!1)).trigger("change"),c=!0),c}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),ii(Rr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),ii(Rr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),ii(Rr(r.prototype),"destroy",this).call(this)}}])&&Ug(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Fo);function Qi(a){return Qi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Qi(a)}function Wg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,Zg(l.key),l)}}function Zg(a){var r=(function(n,l){if(Qi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Qi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Qi(r)=="symbol"?r:r+""}function Yg(a,r,n){return r=vr(r),(function(l,e){if(e&&(Qi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Pf()?Reflect.construct(r,n||[],vr(a).constructor):r.apply(a,n))}function Pf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Pf=function(){return!!a})()}function xn(){return xn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=vr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},xn.apply(this,arguments)}function vr(a){return vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},vr(a)}function eu(a,r){return eu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},eu(a,r)}var Qg=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),Yg(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&eu(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t){if(e=this.applyConstFilter(e),this.selectize_instance){t?this.is_dirty=!1:this.jsoneditor.options.show_errors==="change"&&(this.is_dirty=!0);var o=this.updateValue(e);this.input.value=o,this.selectize_instance.clear(!0),this.selectize_instance.setValue(o),this.onChange(!0)}else xn(vr(r.prototype),"setValue",this).call(this,e,t)}},{key:"afterInputReady",value:function(){var e=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var t=this.expandCallbacks("selectize",v({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=t.create=!!t.create&&this.schema.type==="string",this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(o){e.updateValue(o),e.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}xn(vr(r.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(e){var t=this.enum_values[0];return e=this.typecast(e||""),this.enum_values.includes(e)?t=e:this.newEnumAllowed&&(t=this.addNewOption(e)?e:t),this.value=t,t}},{key:"addNewOption",value:function(e){var t=this.typecast(e),o=!1;return this.enum_values.includes(t)||t===""||(this.enum_options.push("".concat(t)),this.enum_display.push("".concat(t)),this.enum_values.push(t),this.schema.enum.push(t),this.selectize_instance.addItem(t),this.selectize_instance.refreshOptions(!1),o=!0),o}},{key:"onWatchedFieldChange",value:function(){var e=this;xn(vr(r.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((function(t,o){e.selectize_instance.addOption({value:t,text:e.enum_display[o]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),xn(vr(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.selectize_instance&&this.selectize_instance.lock(),xn(vr(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),xn(vr(r.prototype),"destroy",this).call(this)}}])&&Wg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Fo);function Xi(a){return Xi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Xi(a)}function Xg(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,e_(l.key),l)}}function e_(a){var r=(function(n,l){if(Xi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Xi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Xi(r)=="symbol"?r:r+""}function t_(a,r,n){return r=ja(r),(function(l,e){if(e&&(Xi(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Tf()?Reflect.construct(r,n||[],ja(a).constructor):r.apply(a,n))}function Tf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Tf=function(){return!!a})()}function ja(a){return ja=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},ja(a)}function tu(a,r){return tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},tu(a,r)}var r_=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),t_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&tu(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){var e=this;this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description)));var t=this.formname.replace(/\W/g,"");if(typeof SignaturePad=="function"){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var o=document.createElement("div");o.classList.add("signature-container");var c=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&c.setAttribute("name",t),c.classList.add("signature"),o.appendChild(c),this.signaturePad=new window.SignaturePad(c),this.signaturePad.onEnd=function(){e.signaturePad.isEmpty()?e.input.value="":e.input.value=e.signaturePad.toDataURL(),e.is_dirty=!0,e.refreshValue(),e.watch_listener(),e.jsoneditor.notifyWatchers(e.path),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange()};var _=document.createElement("div"),C=document.createElement("button");C.classList.add("tiny","button"),C.innerHTML="Clear signature",_.appendChild(C),o.appendChild(_),this.options.compact&&this.container.setAttribute("class","".concat(this.container.getAttribute("class")," compact")),(this.schema.readOnly||this.schema.readonly)&&(this.disable(!0),Array.from(this.inputs).forEach((function(B){c.setAttribute("readOnly","readOnly"),B.disabled=!0}))),C.addEventListener("click",(function(B){B.preventDefault(),B.stopPropagation(),e.signaturePad.clear(),e.signaturePad.strokeEnd()})),this.control=this.theme.getFormControl(this.label,o,this.description),this.container.appendChild(this.control),this.refreshValue(),c.width=o.offsetWidth,this.options&&this.options.canvas_height?c.height=this.options.canvas_height:c.height="300"}else{var $=document.createElement("p");$.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild($)}}},{key:"setValue",value:function(e){if(e=this.applyConstFilter(e),typeof SignaturePad=="function"){var t=this.sanitize(e);return this.value===t?void 0:(this.value=t,this.input.value=this.value,this.signaturePad.clear(),e&&e!==""&&this.signaturePad.fromDataURL(e),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1)}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&Xg(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function eo(a){return eo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},eo(a)}function n_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,i_(l.key),l)}}function i_(a){var r=(function(n,l){if(eo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(eo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return eo(r)=="symbol"?r:r+""}function o_(a,r,n){return r=br(r),(function(l,e){if(e&&(eo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Rf()?Reflect.construct(r,n||[],br(a).constructor):r.apply(a,n))}function Rf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Rf=function(){return!!a})()}function Cn(){return Cn=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=br(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Cn.apply(this,arguments)}function br(a){return br=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},br(a)}function ru(a,r){return ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},ru(a,r)}b(6031);var s_=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),o_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ru(e,t)})(r,a),n=r,(l=[{key:"setValue",value:function(e,t,o){e=this.applyConstFilter(e);var c=Cn(br(r.prototype),"setValue",this).call(this,e,t,o);c!==void 0&&c.changed&&this.simplemde_instance&&this.simplemde_instance.value(c.value)}},{key:"build",value:function(){this.options.format="textarea",Cn(br(r.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var e,t=this;window.SimpleMDE?(e=this.expandCallbacks("simplemde",v({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(e),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",(function(){t.value=t.simplemde_instance.value(),t.is_dirty=!0,t.onChange(!0)})),e.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):Cn(br(r.prototype),"afterInputReady",this).call(this)}},{key:"getNumColumns",value:function(){return 6}},{key:"enable",value:function(){!this.always_disabled&&this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!1),Cn(br(r.prototype),"enable",this).call(this)}},{key:"disable",value:function(e){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),Cn(br(r.prototype),"disable",this).call(this,e)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),Cn(br(r.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(e,t){var o=this,c=function _(){e.display.wrapper.offsetHeight?(o.stopListening(e,t),e.display.lastWrapHeight!==e.display.wrapper.clientHeight&&e.refresh()):t.timeout=window.setTimeout(_,t.delay)};t.timeout=window.setTimeout(c,t.delay),t.hurry=function(){window.clearTimeout(t.timeout),t.timeout=window.setTimeout(c,50)},e.on(window,"mouseup",t.hurry),e.on(window,"keyup",t.hurry)}},{key:"stopListening",value:function(e,t){window.clearTimeout(t.timeout),e.off(window,"mouseup",t.hurry),e.off(window,"keyup",t.hurry)}}])&&n_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function to(a){return to=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},to(a)}function a_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l_(l.key),l)}}function l_(a){var r=(function(n,l){if(to(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(to(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return to(r)=="symbol"?r:r+""}function u_(a,r,n){return r=oi(r),(function(l,e){if(e&&(to(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Lf()?Reflect.construct(r,n||[],oi(a).constructor):r.apply(a,n))}function Lf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Lf=function(){return!!a})()}function Oa(){return Oa=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=oi(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Oa.apply(this,arguments)}function oi(a){return oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},oi(a)}function nu(a,r){return nu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},nu(a,r)}var Af=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),u_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&nu(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){var e=this;if(this.options.compact||(this.header=this.label=this.theme.getLabelLike(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.compact&&this.container.classList.add("compact"),this.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),this.schema.enum===void 0){var t=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&t--,this.enum_values=[];for(var o=0;o<t;o++)this.enum_values.push(o+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var c=function(se){se.preventDefault(),se.stopPropagation(),e.setValue(se.currentTarget.value),e.onChange(!0)},_=this.enum_values.length-1;_>-1;_--){var C=this.formname+(_+1),$=this.theme.getFormInputField("radio");$.name="".concat(this.formname,"[starrating]"),$.value=this.enum_values[_],$.id=C,$.addEventListener("change",c,!1),this.radioGroup.push($);var B=document.createElement("label");B.htmlFor=C,B.title=this.enum_values[_],this.options.displayValue&&B.classList.add("starrating-display-enabled");var z=this.theme.getHiddenText("label");z.textContent=_,B.appendChild(z),this.ratingContainer.appendChild($),this.ratingContainer.appendChild(B)}if(this.options.displayValue&&(this.displayRating=document.createElement("div"),this.displayRating.classList.add("starrating-display"),this.displayRating.innerText=this.enum_values[0],this.ratingContainer.appendChild(this.displayRating)),this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var Y=0;Y<this.radioGroup.length;Y++)this.radioGroup[Y].disabled=!0;this.ratingContainer.classList.add("readonly")}var Q=this.theme.getContainer();Q.appendChild(this.ratingContainer),this.input=Q,this.control=this.theme.getFormControl(this.label,Q,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(e){e&&(this.always_disabled=!0);for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!0;this.ratingContainer.classList.add("readonly"),this.disabled=!0}},{key:"destroy",value:function(){this.ratingContainer.parentNode&&this.ratingContainer.parentNode.parentNode&&this.ratingContainer.parentNode.parentNode.removeChild(this.ratingContainer.parentNode),this.label&&this.label.parentNode&&this.label.parentNode.removeChild(this.label),this.description&&this.description.parentNode&&this.description.parentNode.removeChild(this.description),Oa(oi(r.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.schema.type==="integer"?this.value===""?0:parseInt(this.value):this.value}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value=e;for(var t=0;t<this.radioGroup.length;t++)if(this.radioGroup[t].value==="".concat(e)){this.radioGroup[t].checked=!0,this.value=e,this.options.displayValue&&(this.displayRating.innerHTML=this.value);break}Oa(oi(r.prototype),"setValue",this).call(this,this.value)}}])&&a_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce);function ro(a){return ro=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ro(a)}function c_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,d_(l.key),l)}}function d_(a){var r=(function(n,l){if(ro(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ro(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ro(r)=="symbol"?r:r+""}function h_(a,r,n){return r=Pn(r),(function(l,e){if(e&&(ro(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,$f()?Reflect.construct(r,n||[],Pn(a).constructor):r.apply(a,n))}function $f(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return($f=function(){return!!a})()}function zo(){return zo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Pn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},zo.apply(this,arguments)}function Pn(a){return Pn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pn(a)}function iu(a,r){return iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},iu(a,r)}Af.rules={".starrating":"direction:rtl;display:inline-block;white-space:nowrap",".starrating > input":"display:none",".starrating > label:before":"content:'%5C2606';margin:1px;font-size:18px;font-style:normal;font-weight:400;line-height:1;font-family:'Arial';display:inline-block",".starrating > label":"color:%23888;cursor:pointer;margin:8px%200%202px%200",".starrating > label.starrating-display-enabled":"margin:1px%200%200%200",".starrating > input:checked ~ label":"color:%23ffca08",".starrating:not(.readonly) > input:hover ~ label":"color:%23ffca08",".starrating > input:checked ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating:not(.readonly) > input:hover ~ label:before":"content:'%5C2605';text-shadow:0%200%201px%20rgba(0%2C20%2C20%2C1)",".starrating .starrating-display":"position:relative;direction:rtl;text-align:center;font-size:10px;line-height:0px"};var f_=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),h_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&iu(e,t)})(r,a),n=r,(l=[{key:"build",value:function(){zo(Pn(r.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var e=this.theme.getStepperButtons(this.input);this.control.appendChild(e),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){zo(Pn(r.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){zo(Pn(r.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&c_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ff);function no(a){return no=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},no(a)}function p_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,m_(l.key),l)}}function m_(a){var r=(function(n,l){if(no(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(no(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return no(r)=="symbol"?r:r+""}function y_(a,r,n){return r=Lr(r),(function(l,e){if(e&&(no(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,If()?Reflect.construct(r,n||[],Lr(a).constructor):r.apply(a,n))}function If(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(If=function(){return!!a})()}function si(){return si=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Lr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},si.apply(this,arguments)}function Lr(a){return Lr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Lr(a)}function ou(a,r){return ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},ou(a,r)}var v_=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),y_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&ou(e,t)})(r,a),n=r,l=[{key:"register",value:function(){if(si(Lr(r.prototype),"register",this).call(this),this.rows)for(var e=0;e<this.rows.length;e++)this.rows[e].register()}},{key:"unregister",value:function(){if(si(Lr(r.prototype),"unregister",this).call(this),this.rows)for(var e=0;e<this.rows.length;e++)this.rows[e].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var e=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=e.title||"row",this.item_default=e.default||null,this.item_has_child_editors=e.properties||e.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,si(Lr(r.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){this.tableContainer=this.theme.getTableContainer(),this.table=this.theme.getTable(),this.tableContainer.appendChild(this.table),this.container.appendChild(this.tableContainer),this.thead=this.theme.getTableHead(),this.table.appendChild(this.thead),this.header_row=this.theme.getTableRow(),this.thead.appendChild(this.header_row),this.row_holder=this.theme.getTableBody(),this.table.appendChild(this.row_holder);var e=this.getElementEditor(0,!0);if(this.item_default=e.getDefault(),this.width=e.getNumColumns()+2,this.options.compact?(this.panel=document.createElement("div"),this.container.appendChild(this.panel)):(this.header=document.createElement("span"),this.header.textContent=this.getTitle(),this.title=this.theme.getHeader(this.header,this.getPathDepth()),this.container.appendChild(this.title),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText)),this.container.appendChild(this.infoButton)),this.title_controls=this.theme.getHeaderButtonHolder(),this.title.appendChild(this.title_controls),this.schema.description&&(this.description=this.theme.getDescription(this.translateProperty(this.schema.description)),this.container.appendChild(this.description)),this.panel=this.theme.getIndentedPanel(),this.container.appendChild(this.panel),this.error_holder=document.createElement("div"),this.panel.appendChild(this.error_holder)),this.panel.appendChild(this.tableContainer),this.controls=this.theme.getButtonHolder(),this.array_controls_top?this.title.appendChild(this.controls):this.panel.appendChild(this.controls),this.item_has_child_editors)for(var t=e.getChildEditors(),o=e.property_order||Object.keys(t),c=0;c<o.length;c++){var _=this.theme.getTableHeaderCell(t[o[c]].getTitle());t[o[c]].options.hidden&&(_.style.display="none"),this.header_row.appendChild(_)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));e.destroy(),this.row_holder.innerHTML="",this.controls_header_cell=this.theme.getTableHeaderCell(this.translate("table_controls")),this.controls_header_cell.setAttribute("aria-hidden","true"),this.controls_header_cell.style.visibility="hidden",this.header_row.appendChild(this.controls_header_cell),this.addControls()}},{key:"onChildEditorChange",value:function(e,t){this.refreshValue(),si(Lr(r.prototype),"onChildEditorChange",this).call(this,e,t)}},{key:"getItemDefault",value:function(){return v({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(e,t){var o=v({},this.schema.items),c=this.jsoneditor.getEditorClass(o,this.jsoneditor),_=this.row_holder.appendChild(this.theme.getTableRow()),C=_;this.item_has_child_editors||(C=this.theme.getTableCell(),_.appendChild(C));var $=this.jsoneditor.createEditor(c,{jsoneditor:this.jsoneditor,schema:o,container:C,path:"".concat(this.path,".").concat(e),parent:this,compact:!0,table_row:!0});return $.preBuild(),t||($.build(),$.postBuild(),$.controls_cell=_.appendChild(this.theme.getTableCell()),$.row=_,$.table_controls=this.theme.getButtonHolder(),$.controls_cell.appendChild($.table_controls),$.table_controls.style.margin=0,$.table_controls.style.padding=0),$}},{key:"destroy",value:function(){this.innerHTML="",this.checkParent(this.title)&&this.title.parentNode.removeChild(this.title),this.checkParent(this.description)&&this.description.parentNode.removeChild(this.description),this.checkParent(this.row_holder)&&this.row_holder.parentNode.removeChild(this.row_holder),this.checkParent(this.table)&&this.table.parentNode.removeChild(this.table),this.checkParent(this.panel)&&this.panel.parentNode.removeChild(this.panel),this.rows=this.title=this.description=this.row_holder=this.table=this.panel=null,si(Lr(r.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(e){if(Array.isArray(e)||(e=[e]),this.schema.minItems)for(;e.length<this.schema.minItems;)e.push(this.getItemDefault());return this.schema.maxItems&&e.length>this.schema.maxItems&&(e=e.slice(0,this.schema.maxItems)),e}},{key:"setValue",value:function(){var e=this,t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],o=arguments.length>1?arguments[1]:void 0;if(t=this.applyConstFilter(t),t=this.ensureArraySize(t),JSON.stringify(t)!==this.serialized){var c=!1;t.forEach((function($,B){e.rows[B]?e.rows[B].setValue($):(e.addRow($),c=!0)}));for(var _=t.length;_<this.rows.length;_++){var C=this.rows[_].container;this.item_has_child_editors||this.rows[_].row.parentNode.removeChild(this.rows[_].row),this.rows[_].destroy(),C.parentNode&&C.parentNode.removeChild(C),this.rows[_]=null,c=!0}this.rows=this.rows.slice(0,t.length),this.refreshValue(),(c||o)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var e=this,t=this.schema.minItems&&this.schema.minItems>=this.rows.length,o=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,c=[];this.rows.forEach((function(Y,Q){if(Y.delete_button){var se=!t;e.setButtonState(Y.delete_button,se),c.push(se)}if(Y.copy_button){var pe=!o;e.setButtonState(Y.copy_button,pe),c.push(pe)}if(Y.moveup_button){var je=Q!==0;e.setButtonState(Y.moveup_button,je),c.push(je)}if(Y.movedown_button){var Se=Q!==e.rows.length-1;e.setButtonState(Y.movedown_button,Se),c.push(Se)}}));var _=c.some((function(Y){return Y}));this.rows.forEach((function(Y){return e.setButtonState(Y.controls_cell,_)})),this.setButtonState(this.controls_header_cell,_),this.setButtonState(this.table,this.value.length);var C=!(o||this.hide_add_button);this.setButtonState(this.add_row_button,C);var $=!(!this.value.length||t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,$);var B=!(this.value.length<=1||t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,B);var z=C||$||B;this.setButtonState(this.controls,z)}},{key:"refreshValue",value:function(){var e=this;this.value=[],this.rows.forEach((function(t,o){e.value[o]=t.getValue()})),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(e){var t=this.rows.length;this.rows[t]=this.getElementEditor(t);var o=this.rows[t].table_controls;return this.hide_delete_buttons||(this.rows[t].delete_button=this._createDeleteButton(t,o)),this.show_copy_button&&(this.rows[t].copy_button=this._createCopyButton(t,o)),this.hide_move_buttons||(this.rows[t].moveup_button=this._createMoveUpButton(t,o)),this.hide_move_buttons||(this.rows[t].movedown_button=this._createMoveDownButton(t,o)),this._supportDragDrop(this.rows[t].row),e!==void 0&&this.rows[t].setValue(e),this.rows[t]}},{key:"_createDeleteButton",value:function(e,t){var o=this,c=this.getButton("","delete","button_delete_row_title_short");return c.classList.add("delete","json-editor-btntype-delete"),c.setAttribute("data-i",e),c.addEventListener("click",(function(_){if(_.preventDefault(),_.stopPropagation(),!o.askConfirmation())return!1;var C=1*_.currentTarget.getAttribute("data-i"),$=o.getValue(),B=o.getValue()[C];$.splice(C,1),o.setValue($),o.onChange(!0),o.jsoneditor.trigger("deleteRow",B)})),t.appendChild(c),c}},{key:"_createCopyButton",value:function(e,t){var o=this,c=this.getButton("","copy","button_copy_row_title_short"),_=this.schema;return c.classList.add("copy","json-editor-btntype-copy"),c.setAttribute("data-i",e),c.addEventListener("click",(function(C){C.preventDefault(),C.stopPropagation();var $=1*C.currentTarget.getAttribute("data-i"),B=o.getValue(),z=B[$];_.items.type==="string"&&_.items.format==="uuid"?z=S():_.items.type==="object"&&_.items.properties&&B.forEach((function(Y,Q){if($===Q)for(var se=0,pe=Object.keys(Y);se<pe.length;se++){var je=pe[se];_.items.properties&&_.items.properties[je]&&_.items.properties[je].format==="uuid"&&((z=Object.assign({},B[$]))[je]=S())}})),B.splice($+1,0,z),o.setValue(B),o.onChange(!0),o.jsoneditor.trigger("copyRow",o.rows[$+1])})),t.appendChild(c),c}},{key:"_createMoveUpButton",value:function(e,t){var o=this,c=this.getButton("","moveup","button_move_up_title");return c.classList.add("moveup","json-editor-btntype-move"),c.setAttribute("data-i",e),c.addEventListener("click",(function(_){_.preventDefault(),_.stopPropagation();var C=1*_.currentTarget.getAttribute("data-i"),$=o.getValue();$.splice(C-1,0,$.splice(C,1)[0]),o.setValue($),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[C-1])})),t.appendChild(c),c}},{key:"_createMoveDownButton",value:function(e,t){var o=this,c=this.getButton("","movedown","button_move_down_title");return c.classList.add("movedown","json-editor-btntype-move"),c.setAttribute("data-i",e),c.addEventListener("click",(function(_){_.preventDefault(),_.stopPropagation();var C=1*_.currentTarget.getAttribute("data-i"),$=o.getValue();$.splice(C+1,0,$.splice(C,1)[0]),o.setValue($),o.onChange(!0),o.jsoneditor.trigger("moveRow",o.rows[C+1])})),t.appendChild(c),c}},{key:"_supportDragDrop",value:function(e){var t=this;He(e,(function(o,c){var _=t.getValue(),C=_[o];_.splice(o,1),_.splice(c,0,C),t.setValue(_),t.onChange(!0),t.jsoneditor.trigger("moveRow",t.rows[c])}),{useTrigger:!0})}},{key:"addControls",value:function(){var e=this;this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.title_controls&&(this.title.insertBefore(this.toggle_button,this.title.childNodes[0]),this.toggle_button.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation(),e.setButtonState(e.panel,e.collapsed),e.collapsed?(e.collapsed=!1,e.setButtonText(t.currentTarget,"","collapse","button_collapse")):(e.collapsed=!0,e.setButtonText(t.currentTarget,"","expand","button_expand"))})),this.options.collapsed&&j(this.toggle_button,"click"),this.schema.options&&this.schema.options.disable_collapse!==void 0?this.schema.options.disable_collapse&&(this.toggle_button.style.display="none"):this.jsoneditor.options.disable_collapse&&(this.toggle_button.style.display="none")),this.add_row_button=this._createAddRowButton(),this.delete_last_row_button=this._createDeleteLastRowButton(),this.remove_all_rows_button=this._createRemoveAllRowsButton()}},{key:"_createToggleButton",value:function(){var e=this.getButton("","collapse","button_collapse");return e.classList.add("json-editor-btntype-toggle"),e}},{key:"_createAddRowButton",value:function(){var e=this,t=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-add"),t.addEventListener("click",(function(o){o.preventDefault(),o.stopPropagation();var c=e.addRow();e.refreshValue(),e.refreshRowButtons(),e.onChange(!0),e.jsoneditor.trigger("addRow",c)})),this.controls.appendChild(t),t}},{key:"_createDeleteLastRowButton",value:function(){var e=this,t=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return t.classList.add("json-editor-btntype-deletelast"),t.addEventListener("click",(function(o){if(o.preventDefault(),o.stopPropagation(),!e.askConfirmation())return!1;var c=e.getValue(),_=c.pop();e.setValue(c),e.onChange(!0),e.jsoneditor.trigger("deleteRow",_)})),this.controls.appendChild(t),t}},{key:"_createRemoveAllRowsButton",value:function(){var e=this,t=this.getButton("button_delete_all","delete","button_delete_all_title");return t.classList.add("json-editor-btntype-deleteall"),t.addEventListener("click",(function(o){if(o.preventDefault(),o.stopPropagation(),!e.askConfirmation())return!1;var c=e.getValue();e.setValue([]),e.onChange(!0),e.jsoneditor.trigger("deleteAllRows",c)})),this.controls.appendChild(t),t}}],l&&p_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Ce);function io(a){return io=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},io(a)}function b_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,g_(l.key),l)}}function g_(a){var r=(function(n,l){if(io(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(io(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return io(r)=="symbol"?r:r+""}function __(a,r,n){return r=Tn(r),(function(l,e){if(e&&(io(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Nf()?Reflect.construct(r,n||[],Tn(a).constructor):r.apply(a,n))}function Nf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Nf=function(){return!!a})()}function Ho(){return Ho=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Tn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Ho.apply(this,arguments)}function Tn(a){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Tn(a)}function su(a,r){return su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},su(a,r)}function oo(a){return oo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},oo(a)}function w_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,k_(l.key),l)}}function k_(a){var r=(function(n,l){if(oo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(oo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return oo(r)=="symbol"?r:r+""}function j_(a,r,n){return r=Rn(r),(function(l,e){if(e&&(oo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Df()?Reflect.construct(r,n||[],Rn(a).constructor):r.apply(a,n))}function Df(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Df=function(){return!!a})()}function Uo(){return Uo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Rn(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Uo.apply(this,arguments)}function Rn(a){return Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Rn(a)}function au(a,r){return au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},au(a,r)}function so(a){return so=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},so(a)}function O_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,E_(l.key),l)}}function E_(a){var r=(function(n,l){if(so(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(so(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return so(r)=="symbol"?r:r+""}function S_(a,r,n){return r=Ar(r),(function(l,e){if(e&&(so(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Bf()?Reflect.construct(r,n||[],Ar(a).constructor):r.apply(a,n))}function Bf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Bf=function(){return!!a})()}function ai(){return ai=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Ar(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},ai.apply(this,arguments)}function Ar(a){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ar(a)}function lu(a,r){return lu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},lu(a,r)}b(9868);var Ea={ace:ge,array:Ce,arrayChoices:Nt,arraySelect2:ba,arraySelectize:kb,autocomplete:Sb,base64:Tb,button:Qh,checkbox:Db,choices:rf,datetime:Jb,describedBy:Yb,enum:tg,hidden:og,info:ug,integer:ff,ip:gg,jodit:jg,multiple:Tg,multiselect:ke,null:$g,number:df,object:Ef,radio:Mg,sceditor:Hg,select:Fo,select2:Kg,selectize:Qg,signature:r_,simplemde:s_,starrating:Af,stepper:f_,string:ce,table:v_,upload:(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),__(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&su(e,t)})(r,a),n=r,(l=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var e=this;if(this.options.compact||(this.header=this.label=this.theme.getFormInputLabel(this.getTitle(),this.isRequired())),this.schema.description&&(this.description=this.theme.getFormInputDescription(this.translateProperty(this.schema.description))),this.options.infoText&&(this.infoButton=this.theme.getInfoButton(this.translateProperty(this.options.infoText))),this.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",v({},{title:"Browse",icon:"",auto_upload:!1,hide_input:!1,enable_drag_drop:!1,drop_zone_text:"Drag & Drop file here",drop_zone_top:!1,alt_drop_zone:"",mime_type:"",max_upload_size:0,upload_handler:function(c,_,C,$){window.alert('No upload_handler defined for "'.concat(c.path,'". You must create your own handler to enable upload to server'))}},this.defaults.options.upload||{},this.options.upload||{})),this.options.mime_type=this.options.mime_type?[].concat(this.options.mime_type):[],this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),!this.schema.readOnly&&!this.schema.readonly){if(typeof this.options.upload_handler!="function")throw new Error("Upload handler required for upload editor");if(this.uploader=this.theme.getFormInputField("file"),this.uploader.style.display="none",this.options.mime_type.length&&this.uploader.setAttribute("accept",this.options.mime_type),this.options.enable_drag_drop===!0&&this.options.hide_input===!0||(this.clickHandler=function(c){e.uploader.dispatchEvent(new window.MouseEvent("click",{view:window,bubbles:!0,cancelable:!1}))},this.browseButton=this.getButton(this.options.title,this.options.icon,this.options.title),this.browseButton.addEventListener("click",this.clickHandler),this.fileDisplay=this.theme.getFormInputField("input"),this.fileDisplay.setAttribute("readonly",!0),this.fileDisplay.value="No file selected.",this.fileDisplay.addEventListener("dblclick",this.clickHandler),this.fileUploadGroup=this.theme.getInputGroup(this.fileDisplay,[this.browseButton]),this.fileUploadGroup||(this.fileUploadGroup=document.createElement("div"),this.fileUploadGroup.appendChild(this.fileDisplay),this.fileUploadGroup.appendChild(this.browseButton))),this.options.enable_drag_drop===!0){if(this.options.alt_drop_zone!==""){if(this.altDropZone=document.querySelector(this.options.alt_drop_zone),!this.altDropZone)throw new Error('Error: alt_drop_zone selector "'.concat(this.options.alt_drop_zone,'" not found!'));this.dropZone=this.altDropZone}else this.dropZone=this.theme.getDropZone(this.options.drop_zone_text);this.dropZone&&(this.dropZone.classList.add("upload-dropzone"),this.dropZone.addEventListener("dblclick",this.clickHandler))}this.uploadHandler=function(c){c.preventDefault(),c.stopPropagation();var _=c.target.files||c.dataTransfer.files;if(_&&_.length)if(e.options.max_upload_size!==0&&_[0].size>e.options.max_upload_size)e.theme.addInputError(e.uploader,"".concat(e.translate("upload_max_size")," ").concat(e.options.max_upload_size));else if(e.options.mime_type.length===0||e.isValidMimeType(_[0].type,e.options.mime_type)){e.fileDisplay&&(e.fileDisplay.value=_[0].name);var C=new window.FileReader;C.onload=function($){e.preview_value=$.target.result,e.refreshPreview(_),e.onChange(!0),C=null},C.readAsDataURL(_[0])}else e.theme.addInputError(e.uploader,"".concat(e.translate("upload_wrong_file_format")," ").concat(e.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(c){var _=c.dataTransfer.items||c.dataTransfer.files,C=_&&_.length&&(e.options.mime_type.length===0||e.isValidMimeType(_[0].type,e.options.mime_type)),$=c.currentTarget.classList&&c.currentTarget.classList.contains("upload-dropzone")&&C;switch((c.currentTarget===window?"w_":"e_")+c.type){case"w_drop":case"w_dragover":$||(c.dataTransfer.dropEffect="none");break;case"e_dragenter":$?(e.dropZone.classList.add("valid-dropzone"),c.dataTransfer.dropEffect="copy"):e.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":$&&(c.dataTransfer.dropEffect="copy");break;case"e_dragleave":e.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":e.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),$&&e.uploadHandler(c)}$||c.preventDefault()},this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach((function(c){window.addEventListener(c,e.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(c){e.dropZone.addEventListener(c,e.dragHandler,!0)})))}this.preview=document.createElement("div"),this.control=this.input.controlgroup=this.theme.getFormControl(this.label,this.uploader||this.input,this.description,this.infoButton),this.uploader&&(this.uploader.controlgroup=this.control);var t=this.uploader||this.input,o=document.createElement("div");this.dropZone&&!this.altDropZone&&this.options.drop_zone_top===!0&&o.appendChild(this.dropZone),this.fileUploadGroup&&o.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&this.options.drop_zone_top!==!0&&o.appendChild(this.dropZone),o.appendChild(this.preview),t.parentNode.insertBefore(o,t.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.afterInputReady()}))}},{key:"afterInputReady",value:function(){var e=this;if(this.value){var t=document.createElement("img");t.style.maxWidth="100%",t.style.maxHeight="100px",t.onload=function(o){e.preview.appendChild(t)},t.onerror=function(o){console.error("upload error",o,o.currentTarget)},t.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(e){var t=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var o=e[0],c=this.preview_value.match(/^data:([^;,]+)[;,]/);if(o.mimeType=c?c[1]:"unknown",o.size>0){var _=Math.floor(Math.log(o.size)/Math.log(1024));o.formattedSize="".concat(parseFloat((o.size/Math.pow(1024,_)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][_])}else o.formattedSize="0 Bytes";var C=this.getButton("button_upload","upload","button_upload");C.addEventListener("click",(function($){$.preventDefault(),C.setAttribute("disabled","disabled"),t.theme.removeInputError(t.uploader),t.theme.getProgressBar&&(t.progressBar=t.theme.getProgressBar(),t.preview.appendChild(t.progressBar)),t.options.upload_handler(t.path,o,{success:function(B){t.setValue(B),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange(),t.progressBar&&t.preview.removeChild(t.progressBar),C.removeAttribute("disabled")},failure:function(B){t.theme.addInputError(t.uploader,B),t.progressBar&&t.preview.removeChild(t.progressBar),C.removeAttribute("disabled")},updateProgress:function(B){t.progressBar&&(B?t.theme.updateProgressBar(t.progressBar,B):t.theme.updateProgressBarUnknown(t.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(o,C,this.preview_value)),this.options.auto_upload&&(C.dispatchEvent(new window.MouseEvent("click")),C.parentNode.removeChild(C))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Ho(Tn(r.prototype),"enable",this).call(this))}},{key:"disable",value:function(e){e&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Ho(Tn(r.prototype),"disable",this).call(this)}},{key:"setValue",value:function(e){e=this.applyConstFilter(e),this.value!==e&&(this.value=e,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var e=this;this.options.enable_drag_drop===!0&&(["dragover","drop"].forEach((function(t){window.removeEventListener(t,e.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(t){e.dropZone.removeEventListener(t,e.dragHandler,!0)})),this.dropZone.removeEventListener("dblclick",this.clickHandler),this.dropZone&&this.dropZone.parentNode&&this.dropZone.parentNode.removeChild(this.dropZone)),this.uploader&&this.uploader.parentNode&&(this.uploader.removeEventListener("change",this.uploadHandler),this.uploader.parentNode.removeChild(this.uploader)),this.browseButton&&this.browseButton.parentNode&&(this.browseButton.removeEventListener("click",this.clickHandler),this.browseButton.parentNode.removeChild(this.browseButton)),this.fileDisplay&&this.fileDisplay.parentNode&&(this.fileDisplay.removeEventListener("dblclick",this.clickHandler),this.fileDisplay.parentNode.removeChild(this.fileDisplay)),this.fileUploadGroup&&this.fileUploadGroup.parentNode&&this.fileUploadGroup.parentNode.removeChild(this.fileUploadGroup),this.preview&&this.preview.parentNode&&this.preview.parentNode.removeChild(this.preview),this.header&&this.header.parentNode&&this.header.parentNode.removeChild(this.header),this.input&&this.input.parentNode&&this.input.parentNode.removeChild(this.input),Ho(Tn(r.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(e,t){return t.reduce((function(o,c){return o||new RegExp(c.replace(/\*/g,".*"),"gi").test(e)}),!1)}}])&&b_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(D),uuid:(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),j_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&au(e,t)})(r,a),n=r,(l=[{key:"preBuild",value:function(){Uo(Rn(r.prototype),"preBuild",this).call(this),this.schema.default=this.uuid=this.getUuid(),this.schema.options||(this.schema.options={}),this.schema.options.cleave||(this.schema.options.cleave={delimiters:["-"],blocks:[8,4,4,4,12]})}},{key:"build",value:function(){Uo(Rn(r.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(e){return this.testUuid(e)||(e=this.uuid),e}},{key:"setValue",value:function(e,t,o){e=this.applyConstFilter(e),this.testUuid(e)||(e=this.uuid),this.uuid=e,Uo(Rn(r.prototype),"setValue",this).call(this,e,t,o)}},{key:"getUuid",value:function(){return S()}},{key:"testUuid",value:function(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e)}}])&&w_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce),colorpicker:(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),S_(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&lu(e,t)})(r,a),n=r,(l=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(e,t,o){e=this.applyConstFilter(e);var c=ai(Ar(r.prototype),"setValue",this).call(this,e,t,o);return this.picker_instance&&this.picker_instance.domElement&&c&&c.changed&&this.picker_instance.setColor(c.value,!0),c}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){ai(Ar(r.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(ai(Ar(r.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var e=this.picker_instance.domElement.querySelectorAll("button"),t=0;t<e.length;t++)e[t].disabled=!0}}},{key:"enable",value:function(){if(ai(Ar(r.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var e=this.picker_instance.domElement.querySelectorAll("button"),t=0;t<e.length;t++)e[t].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),ai(Ar(r.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(e){var t=this;if(e){if(window.Picker&&!this.picker_instance){var o=this.expandCallbacks("colorpicker",v({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),c=function(_){var C=t.picker_instance.settings.editorFormat,$=t.picker_instance.settings.alpha;t.setValue(C==="hex"?$?_.hex:_.hex.slice(0,7):_["".concat(C+($?"a":""),"String")])};o.popup||typeof o.onChange=="function"?o.popup&&typeof o.onDone!="function"&&(o.onDone=c):o.onChange=c,this.picker_instance=new window.Picker(o),o.popup||(this.input.style.display="none",this.theme.afterInputReady(this.picker_instance.domElement))}}else this.picker_instance&&(this.picker_instance.destroy(),this.picker_instance=null,this.input.style.display="")}}])&&O_(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(ce)};function Ff(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}var Mf={},uu="en",x_=uu;Mf.en={error_notset:"Property must be set",error_notempty:"Value required",error_enum:"Value must be one of the enumerated values",error_const:"Value must be the constant value",error_anyOf:"Value must validate against at least one of the provided schemas",error_oneOf:"Value must validate against exactly one of the provided schemas. It currently validates against {{0}} of the schemas.",error_not:"Value must not validate against the provided schema",error_type_union:"Value must be one of the provided types",error_type:"Value must be of type {{0}}",error_disallow_union:"Value must not be one of the provided disallowed types",error_disallow:"Value must not be of type {{0}}",error_multipleOf:"Value must be a multiple of {{0}}",error_maximum_excl:"Value must be less than {{0}}",error_maximum_incl:"Value must be at most {{0}}",error_minimum_excl:"Value must be greater than {{0}}",error_minimum_incl:"Value must be at least {{0}}",error_maxLength:"Value must be at most {{0}} characters long",error_contains:"No items match contains",error_minContains:"Contains match count {{0}} is less than minimum contains count of {{1}}",error_maxContains:"Contains match count {{0}} exceeds maximum contains count of {{1}}",error_minLength:"Value must be at least {{0}} characters long",error_pattern:"Value must match the pattern {{0}}",error_additionalItems:"No additional items allowed in this array",error_maxItems:"Value must have at most {{0}} items",error_minItems:"Value must have at least {{0}} items",error_uniqueItems:"Array must have unique items",error_maxProperties:"Object must have at most {{0}} properties",error_minProperties:"Object must have at least {{0}} properties",error_required:"Object is missing the required property '{{0}}'",error_additional_properties:"No additional properties allowed, but property {{0}} is set",error_property_names_exceeds_maxlength:"Property name {{0}} exceeds maxLength",error_property_names_enum_mismatch:"Property name {{0}} does not match any enum values",error_property_names_const_mismatch:"Property name {{0}} does not match the const value",error_property_names_pattern_mismatch:"Property name {{0}} does not match pattern",error_property_names_false:"Property name {{0}} fails when propertyName is false",error_property_names_maxlength:"Property name {{0}} cannot match invalid maxLength",error_property_names_enum:"Property name {{0}} cannot match invalid enum",error_property_names_pattern:"Property name {{0}} cannot match invalid pattern",error_property_names_unsupported:"Unsupported propertyName {{0}}",error_dependency:"Must have property {{0}}",error_date:"Date must be in the format {{0}}",error_time:"Time must be in the format {{0}}",error_datetime_local:"Datetime must be in the format {{0}}",error_invalid_epoch:"Date must be greater than 1 January 1970",error_ipv4:"Value must be a valid IPv4 address in the form of 4 numbers between 0 and 255, separated by dots",error_ipv6:"Value must be a valid IPv6 address",error_hostname:"The hostname has the wrong format",upload_max_size:"Filesize too large. Max size is ",upload_wrong_file_format:"Wrong file format. Allowed format(s): ",button_save:"Save",button_copy:"Copy",button_cancel:"Cancel",button_add:"Add",button_delete_all:"All",button_delete_all_title:"Delete All",button_delete_last:"Last {{0}}",button_delete_last_title:"Delete Last {{0}}",button_add_row_title:"Add {{0}}",button_move_down_title:"Move down",button_move_up_title:"Move up",button_properties:"Properties",button_object_properties:"Object Properties",button_copy_row_title:"Copy {{0}}",button_delete_row_title:"Delete {{0}}",button_delete_row_title_short:"Delete",button_copy_row_title_short:"Copy",button_collapse:"Collapse",button_expand:"Expand",button_edit_json:"Edit JSON",button_upload:"Upload",flatpickr_toggle_button:"Toggle",flatpickr_clear_button:"Clear",choices_placeholder_text:"Start typing to add value",default_array_item_title:"item",button_delete_node_warning:"Are you sure you want to remove this item?",table_controls:"Controls",paste_max_length_reached:"Pasted text exceeded maximum length of {{0}} and will be clipped."},Object.entries(Ea).forEach((function(a){var r=(function(e,t){return(function(o){if(Array.isArray(o))return o})(e)||(function(o,c){var _=o==null?null:typeof Symbol<"u"&&o[Symbol.iterator]||o["@@iterator"];if(_!=null){var C,$,B,z,Y=[],Q=!0,se=!1;try{if(B=(_=_.call(o)).next,c!==0)for(;!(Q=(C=B.call(_)).done)&&(Y.push(C.value),Y.length!==c);Q=!0);}catch(pe){se=!0,$=pe}finally{try{if(!Q&&_.return!=null&&(z=_.return(),Object(z)!==z))return}finally{if(se)throw $}}return Y}})(e,t)||(function(o,c){if(o){if(typeof o=="string")return Ff(o,c);var _=Object.prototype.toString.call(o).slice(8,-1);return _==="Object"&&o.constructor&&(_=o.constructor.name),_==="Map"||_==="Set"?Array.from(o):_==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(_)?Ff(o,c):void 0}})(e,t)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
25
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()})(a,2),n=r[0],l=r[1];Ea[n].options=l.options||{}}));var li={options:{upload:function(a,r,n){console.log("Upload handler required for upload editor")},use_name_attributes:!0,prompt_before_delete:!0,use_default_values:!0,max_depth:0,button_state_mode:1,case_sensitive_property_search:!0,show_errors:"interaction",prompt_paste_max_length_reached:!1,remove_false_properties:!1,enforce_const:!1,opt_in_widget:"checkbox"},theme:"html",template:"default",themes:{},callbacks:{},templates:{},iconlibs:{},editors:Ea,languages:Mf,resolvers:y,custom_validators:[],default_language:uu,language:x_,translate:function(a,r,n){var l={};n&&n.options&&n.options.error_messages&&n.options.error_messages[li.language]&&(l=n.options.error_messages[li.language]);var e=li.languages[li.language];if(!e)throw new Error("Unknown language ".concat(li.language));var t=l[a]||e[a]||li.languages[uu][a]||a;if(r)for(var o=0;o<r.length;o++)t=t.replace(new RegExp("\\{\\{".concat(o,"}}"),"g"),r[o]);return t},translateProperty:function(a,r){return a}};function ui(){ui=function(){return r};var a,r={},n=Object.prototype,l=n.hasOwnProperty,e=Object.defineProperty||function(W,K,ne){W[K]=ne.value},t=typeof Symbol=="function"?Symbol:{},o=t.iterator||"@@iterator",c=t.asyncIterator||"@@asyncIterator",_=t.toStringTag||"@@toStringTag";function C(W,K,ne){return Object.defineProperty(W,K,{value:ne,enumerable:!0,configurable:!0,writable:!0}),W[K]}try{C({},"")}catch{C=function(K,ne,we){return K[ne]=we}}function $(W,K,ne,we){var de=K&&K.prototype instanceof je?K:je,Pe=Object.create(de.prototype),Me=new Br(we||[]);return e(Pe,"_invoke",{value:Dt(W,ne,Me)}),Pe}function B(W,K,ne){try{return{type:"normal",arg:W.call(K,ne)}}catch(we){return{type:"throw",arg:we}}}r.wrap=$;var z="suspendedStart",Y="suspendedYield",Q="executing",se="completed",pe={};function je(){}function Se(){}function Re(){}var Ie={};C(Ie,o,(function(){return this}));var Ve=Object.getPrototypeOf,_e=Ve&&Ve(Ve(Bt([])));_e&&_e!==n&&l.call(_e,o)&&(Ie=_e);var Ee=Re.prototype=je.prototype=Object.create(Ie);function Ge(W){["next","throw","return"].forEach((function(K){C(W,K,(function(ne){return this._invoke(K,ne)}))}))}function st(W,K){function ne(de,Pe,Me,at){var lt=B(W[de],W,Pe);if(lt.type!=="throw"){var Yt=lt.arg,gr=Yt.value;return gr&&_t(gr)=="object"&&l.call(gr,"__await")?K.resolve(gr.__await).then((function(Ft){ne("next",Ft,Me,at)}),(function(Ft){ne("throw",Ft,Me,at)})):K.resolve(gr).then((function(Ft){Yt.value=Ft,Me(Yt)}),(function(Ft){return ne("throw",Ft,Me,at)}))}at(lt.arg)}var we;e(this,"_invoke",{value:function(de,Pe){function Me(){return new K((function(at,lt){ne(de,Pe,at,lt)}))}return we=we?we.then(Me,Me):Me()}})}function Dt(W,K,ne){var we=z;return function(de,Pe){if(we===Q)throw Error("Generator is already running");if(we===se){if(de==="throw")throw Pe;return{value:a,done:!0}}for(ne.method=de,ne.arg=Pe;;){var Me=ne.delegate;if(Me){var at=Ln(Me,ne);if(at){if(at===pe)continue;return at}}if(ne.method==="next")ne.sent=ne._sent=ne.arg;else if(ne.method==="throw"){if(we===z)throw we=se,ne.arg;ne.dispatchException(ne.arg)}else ne.method==="return"&&ne.abrupt("return",ne.arg);we=Q;var lt=B(W,K,ne);if(lt.type==="normal"){if(we=ne.done?se:Y,lt.arg===pe)continue;return{value:lt.arg,done:ne.done}}lt.type==="throw"&&(we=se,ne.method="throw",ne.arg=lt.arg)}}}function Ln(W,K){var ne=K.method,we=W.iterator[ne];if(we===a)return K.delegate=null,ne==="throw"&&W.iterator.return&&(K.method="return",K.arg=a,Ln(W,K),K.method==="throw")||ne!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+ne+"' method")),pe;var de=B(we,W.iterator,K.arg);if(de.type==="throw")return K.method="throw",K.arg=de.arg,K.delegate=null,pe;var Pe=de.arg;return Pe?Pe.done?(K[W.resultName]=Pe.value,K.next=W.nextLoc,K.method!=="return"&&(K.method="next",K.arg=a),K.delegate=null,pe):Pe:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,pe)}function vo(W){var K={tryLoc:W[0]};1 in W&&(K.catchLoc=W[1]),2 in W&&(K.finallyLoc=W[2],K.afterLoc=W[3]),this.tryEntries.push(K)}function Te(W){var K=W.completion||{};K.type="normal",delete K.arg,W.completion=K}function Br(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(vo,this),this.reset(!0)}function Bt(W){if(W||W===""){var K=W[o];if(K)return K.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var ne=-1,we=function de(){for(;++ne<W.length;)if(l.call(W,ne))return de.value=W[ne],de.done=!1,de;return de.value=a,de.done=!0,de};return we.next=we}}throw new TypeError(_t(W)+" is not iterable")}return Se.prototype=Re,e(Ee,"constructor",{value:Re,configurable:!0}),e(Re,"constructor",{value:Se,configurable:!0}),Se.displayName=C(Re,_,"GeneratorFunction"),r.isGeneratorFunction=function(W){var K=typeof W=="function"&&W.constructor;return!!K&&(K===Se||(K.displayName||K.name)==="GeneratorFunction")},r.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,Re):(W.__proto__=Re,C(W,_,"GeneratorFunction")),W.prototype=Object.create(Ee),W},r.awrap=function(W){return{__await:W}},Ge(st.prototype),C(st.prototype,c,(function(){return this})),r.AsyncIterator=st,r.async=function(W,K,ne,we,de){de===void 0&&(de=Promise);var Pe=new st($(W,K,ne,we),de);return r.isGeneratorFunction(K)?Pe:Pe.next().then((function(Me){return Me.done?Me.value:Pe.next()}))},Ge(Ee),C(Ee,_,"Generator"),C(Ee,o,(function(){return this})),C(Ee,"toString",(function(){return"[object Generator]"})),r.keys=function(W){var K=Object(W),ne=[];for(var we in K)ne.push(we);return ne.reverse(),function de(){for(;ne.length;){var Pe=ne.pop();if(Pe in K)return de.value=Pe,de.done=!1,de}return de.done=!0,de}},r.values=Bt,Br.prototype={constructor:Br,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(Te),!W)for(var K in this)K.charAt(0)==="t"&&l.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=a)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var K=this;function ne(lt,Yt){return Pe.type="throw",Pe.arg=W,K.next=lt,Yt&&(K.method="next",K.arg=a),!!Yt}for(var we=this.tryEntries.length-1;we>=0;--we){var de=this.tryEntries[we],Pe=de.completion;if(de.tryLoc==="root")return ne("end");if(de.tryLoc<=this.prev){var Me=l.call(de,"catchLoc"),at=l.call(de,"finallyLoc");if(Me&&at){if(this.prev<de.catchLoc)return ne(de.catchLoc,!0);if(this.prev<de.finallyLoc)return ne(de.finallyLoc)}else if(Me){if(this.prev<de.catchLoc)return ne(de.catchLoc,!0)}else{if(!at)throw Error("try statement without catch or finally");if(this.prev<de.finallyLoc)return ne(de.finallyLoc)}}}},abrupt:function(W,K){for(var ne=this.tryEntries.length-1;ne>=0;--ne){var we=this.tryEntries[ne];if(we.tryLoc<=this.prev&&l.call(we,"finallyLoc")&&this.prev<we.finallyLoc){var de=we;break}}de&&(W==="break"||W==="continue")&&de.tryLoc<=K&&K<=de.finallyLoc&&(de=null);var Pe=de?de.completion:{};return Pe.type=W,Pe.arg=K,de?(this.method="next",this.next=de.finallyLoc,pe):this.complete(Pe)},complete:function(W,K){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&K&&(this.next=K),pe},finish:function(W){for(var K=this.tryEntries.length-1;K>=0;--K){var ne=this.tryEntries[K];if(ne.finallyLoc===W)return this.complete(ne.completion,ne.afterLoc),Te(ne),pe}},catch:function(W){for(var K=this.tryEntries.length-1;K>=0;--K){var ne=this.tryEntries[K];if(ne.tryLoc===W){var we=ne.completion;if(we.type==="throw"){var de=we.arg;Te(ne)}return de}}throw Error("illegal catch attempt")},delegateYield:function(W,K,ne){return this.delegate={iterator:Bt(W),resultName:K,nextLoc:ne},this.method==="next"&&(this.arg=a),pe}},r}function qf(a,r,n,l,e,t,o){try{var c=a[t](o),_=c.value}catch(C){return void n(C)}c.done?r(_):Promise.resolve(_).then(l,e)}function Vf(a){return function(){var r=this,n=arguments;return new Promise((function(l,e){var t=a.apply(r,n);function o(_){qf(t,l,e,o,c,"next",_)}function c(_){qf(t,l,e,o,c,"throw",_)}o(void 0)}))}}function ci(a,r){return(function(n){if(Array.isArray(n))return n})(a)||(function(n,l){var e=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(e!=null){var t,o,c,_,C=[],$=!0,B=!1;try{if(c=(e=e.call(n)).next,l!==0)for(;!($=(t=c.call(e)).done)&&(C.push(t.value),C.length!==l);$=!0);}catch(z){B=!0,o=z}finally{try{if(!$&&e.return!=null&&(_=e.return(),Object(_)!==_))return}finally{if(B)throw o}}return C}})(a,r)||(function(n,l){if(n){if(typeof n=="string")return zf(n,l);var e=Object.prototype.toString.call(n).slice(8,-1);return e==="Object"&&n.constructor&&(e=n.constructor.name),e==="Map"||e==="Set"?Array.from(n):e==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?zf(n,l):void 0}})(a,r)||(function(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
26
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()}function zf(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function _t(a){return _t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},_t(a)}function C_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,P_(l.key),l)}}function P_(a){var r=(function(n,l){if(_t(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(_t(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return _t(r)=="symbol"?r:r+""}b(1688);var T_=(function(){return a=function e(t){(function(o,c){if(!(o instanceof c))throw new TypeError("Cannot call a class as a function")})(this,e),this.options=t||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(o){_t(o.type)==="object"&&(o.type=this._expandSubSchema(o.type))},disallow:function(o){_t(o.disallow)==="object"&&(o.disallow=this._expandSubSchema(o.disallow))},anyOf:function(o){var c=this;Object.entries(o.anyOf).forEach((function(_){var C=ci(_,2),$=C[0],B=C[1];o.anyOf[$]=c.expandSchema(B)}))},dependencies:function(o){var c=this;Object.entries(o.dependencies).forEach((function(_){var C=ci(_,2),$=C[0],B=C[1];_t(B)!=="object"||Array.isArray(B)||(o.dependencies[$]=c.expandSchema(B))}))},not:function(o){o.not=this.expandSchema(o.not)}},this._subSchema2={allOf:function(o,c){var _=this,C=v({},c);return Object.entries(o.allOf).forEach((function($){var B=ci($,2),z=B[0],Y=B[1];o.allOf[z]=_.expandRefs(Y,!0),C=_.extendSchemas(C,_.expandSchema(Y))})),delete C.allOf,C},extends:function(o,c){var _,C=this;return delete(_=Array.isArray(o.extends)?o.extends.reduce((function($,B,z){return C.extendSchemas($,C.expandSchema(B))}),c):this.extendSchemas(c,this.expandSchema(o.extends))).extends,_},oneOf:function(o,c){var _=this,C=v({},c);return delete C.oneOf,o.oneOf.reduce((function($,B,z){return $.oneOf[z]=_.extendSchemas(_.expandSchema(B),C),$}),c),c}}},r=[{key:"load",value:(l=Vf(ui().mark((function e(t,o,c){return ui().wrap((function(_){for(;;)switch(_.prev=_.next){case 0:return this.schema=t,_.next=3,this._asyncloadExternalRefs(t,o,this._getFileBase(c),!0);case 3:return _.abrupt("return",this.expandRefs(t));case 4:case"end":return _.stop()}}),e,this)}))),function(e,t,o){return l.apply(this,arguments)})},{key:"expandRefs",value:function(e,t){var o=this,c=v({},e);if(!c.$ref)return c;var _=c.$ref.split("#");if(_.length===2&&!this.refs_with_info[c.$ref]){var C=this.expandRecursivePointer(this.schema,_[1]),$=this.extendSchemas(c,this.expandSchema(C));return delete $.$ref,$}var B=_.length>2?this.refs_with_info["#"+_[1]]:this.refs_with_info[c.$ref];delete c.$ref;var z=B.$ref.startsWith("#")?B.fetchUrl:"",Y=this._getRef(z,B);if(this.refs[Y]){if(t&&E(this.refs[Y],"allOf")){var Q=this.refs[Y].allOf;Object.keys(Q).forEach((function(se){Q[se]=o.expandRefs(Q[se],!0)}))}}else console.warn("reference:'".concat(Y,"' not found!"));return _.length>2?this.extendSchemas(c,this.expandSchema(this.expandRecursivePointer(this.refs[Y],_[2]))):this.extendSchemas(c,this.expandSchema(this.refs[Y]))}},{key:"expandRecursivePointer",value:function(e,t){var o=e;return t.split("/").slice(1).forEach((function(c){o[c]&&(o=o[c])})),o.$refs&&o.$refs.startsWith("#")?this.expandRecursivePointer(e,o.$refs):o}},{key:"expandSchema",value:function(e){var t=this;Object.entries(this._subSchema1).forEach((function(c){var _=ci(c,2),C=_[0],$=_[1];e[C]&&$.call(t,e)}));var o=v({},e);return Object.entries(this._subSchema2).forEach((function(c){var _=ci(c,2),C=_[0],$=_[1];e[C]&&(o=$.call(t,e,o))})),this.expandRefs(o)}},{key:"_getRef",value:function(e,t){var o=e+t;return this.refs[o]?o:e+decodeURIComponent(t.$ref)}},{key:"_expandSubSchema",value:function(e){var t=this;return Array.isArray(e)?e.map((function(o){return _t(o)==="object"?t.expandSchema(o):o})):this.expandSchema(e)}},{key:"_manageRecursivePointer",value:function(e,t){Object.keys(e).forEach((function(o){e[o]!==null&&e[o].$ref&&e[o].$ref.indexOf("#")===0&&(e[o].$ref=t+e[o].$ref)}))}},{key:"_getExternalRefs",value:function(e,t){var o=this,c=arguments.length>2&&arguments[2]!==void 0&&arguments[2];c||this._manageRecursivePointer(e,t);var _={},C=function(Q){return Object.keys(Q).forEach((function(se){_[se]=!0}))};if(e.$ref&&_t(e.$ref)!=="object"&&(e.$ref.indexOf("#")!==0||!c)){var $=e.$ref,B="";$.indexOf("#")>0&&($=$.substr(0,$.indexOf("#"))),$!==e.$ref&&(B=e.$ref.substr(e.$ref.indexOf("#")));var z=this.refs_prefix+this.refs_counter++,Y=z+B;e.$ref.substr(0,1)==="#"||this.refs[e.$ref]||(_[$]=!0),this.refs_with_info[z]={fetchUrl:t,$ref:$},e.$ref=Y}return Object.values(e).forEach((function(Q){Q&&_t(Q)==="object"&&(Array.isArray(Q)?Object.values(Q).forEach((function(se){se&&_t(se)==="object"&&C(o._getExternalRefs(se,t,c))})):Q.$ref&&typeof Q.$ref=="string"&&Q.$ref.startsWith("#")||C(o._getExternalRefs(Q,t,c)))})),e.id&&typeof e.id=="string"&&e.id.substr(0,4)==="urn:"?this.refs[e.id]=e:e.$id&&typeof e.$id=="string"&&e.$id.substr(0,4)==="urn:"&&(this.refs[e.$id]=e),_}},{key:"_getFileBase",value:function(e){if(!e)return"/";var t=this.options.ajaxBase;return t===void 0?this._getFileBaseFromFileLocation(e):t}},{key:"_getFileBaseFromFileLocation",value:function(e){var t=e.split("/");return t.pop(),"".concat(t.join("/"),"/")}},{key:"_joinUrl",value:function(e,t){var o=e;return e.substr(0,7)!=="http://"&&e.substr(0,8)!=="https://"&&e.substr(0,5)!=="blob:"&&e.substr(0,5)!=="data:"&&e.substr(0,1)!=="#"&&e.substr(0,1)!=="/"&&(o=t+e),o.indexOf("#")>0&&(o=o.substr(0,o.indexOf("#"))),o}},{key:"_isUniformResourceName",value:function(e){return e.substr(0,4)==="urn:"}},{key:"_asyncloadExternalRefs",value:(n=Vf(ui().mark((function e(t,o,c){var _,C,$,B,z,Y,Q=this,se=arguments;return ui().wrap((function(pe){for(;;)switch(pe.prev=pe.next){case 0:_=se.length>3&&se[3]!==void 0&&se[3],C=this._getExternalRefs(t,o,_),$=0,B=ui().mark((function je(){var Se,Re,Ie,Ve,_e,Ee,Ge,st,Dt,Ln,vo;return ui().wrap((function(Te){for(;;)switch(Te.prev=Te.next){case 0:if((Se=Y[z])!==void 0){Te.next=3;break}return Te.abrupt("return",0);case 3:if(!Q.refs[Se]){Te.next=5;break}return Te.abrupt("return",0);case 5:if(!Q._isUniformResourceName(Se)){Te.next=40;break}if(Q.refs[Se]="loading",$++,Re=Q.options.urn_resolver,Ie=Se,typeof Re=="function"){Te.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(Ie,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(Ie));case 13:return Ie.indexOf("#")>0&&(Ie=Ie.substr(0,Ie.indexOf("#"))),Te.prev=14,Te.next=17,Re(Ie);case 17:Ve=Te.sent,Te.prev=18,_e=JSON.parse(Ve),Te.next=26;break;case 22:throw Te.prev=22,Te.t0=Te.catch(18),console.log(Te.t0),new Error("Failed to parse external ref ".concat(Ie));case 26:if(!(typeof _e!="boolean"&&_t(_e)!=="object"||_e===null||Array.isArray(_e))){Te.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(Ie));case 28:return Q.refs[Se]=_e,Te.next=31,Q._asyncloadExternalRefs(_e,Se,c);case 31:Te.next=37;break;case 33:throw Te.prev=33,Te.t1=Te.catch(14),console.log(Te.t1),new Error("Failed to parse external ref ".concat(Ie));case 37:if(typeof Ve!="boolean"){Te.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(Ie));case 39:return Te.abrupt("return",0);case 40:if(Q.options.ajax){Te.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(Se));case 42:if($++,Ee=Q._joinUrl(Se,c),Q.options.ajax_cache_responses&&(st=Q.cacheGet(Ee))&&(Ge=st),Ge){Te.next=61;break}return Te.next=48,new Promise((function(Br){var Bt=new XMLHttpRequest;Q.options.ajaxCredentials&&(Bt.withCredentials=Q.options.ajaxCredentials),Bt.overrideMimeType("application/json"),Bt.open("GET",Ee,!0),Bt.onload=function(){Br(Bt)},Bt.onerror=function(W){Br(void 0)},Bt.send()}));case 48:if((Dt=Te.sent)!==void 0){Te.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(Se));case 51:Te.prev=51,Ge=JSON.parse(Dt.responseText),Q.onSchemaLoaded({schema:Ge,schemaUrl:Ee}),Q.options.ajax_cache_responses&&Q.cacheSet(Ee,Ge),Te.next=61;break;case 57:throw Te.prev=57,Te.t2=Te.catch(51),console.log(Te.t2),new Error("Failed to parse external ref ".concat(Ee));case 61:if(!(typeof Ge!="boolean"&&_t(Ge)!=="object"||Ge===null||Array.isArray(Ge))){Te.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(Ee));case 63:return Q.refs[Se]=Ge,Ln=Q._getFileBaseFromFileLocation(Ee),Ee!==Se&&(vo=Ee.split("/"),Ee=(Se.substr(0,1)==="/"?"/":"")+vo.pop()),Te.next=68,Q._asyncloadExternalRefs(Ge,Ee,Ln);case 68:case"end":return Te.stop()}}),je,null,[[14,33],[18,22],[51,57]])})),z=0,Y=Object.keys(C);case 5:if(!(z<Y.length)){pe.next=13;break}return pe.delegateYield(B(),"t0",7);case 7:if(pe.t0!==0){pe.next=10;break}return pe.abrupt("continue",10);case 10:z++,pe.next=5;break;case 13:if($){pe.next=15;break}return pe.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return pe.stop()}}),e,this)}))),function(e,t,o){return n.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(e){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(e,t){var o=this;e=v({},e),t=v({},t);var c={},_=function(C){typeof C=="string"&&(C=[C]),typeof t.type=="string"&&(t.type=[t.type]),t.type&&t.type.length?c.type=C.filter((function($){return t.type.includes($)})):c.type=C,c.type.length===1&&typeof c.type[0]=="string"?c.type=c.type[0]:c.type.length===0&&delete c.type};return Object.entries(e).forEach((function(C){var $=ci(C,2),B=$[0],z=$[1];t[B]!==void 0?(function(Y,Q){(function(se,pe){return(se==="required"||se==="defaultProperties")&&_t(pe)==="object"&&Array.isArray(pe)})(Y,Q)?c[Y]=Q.concat(t[Y]).reduce((function(se,pe){return se.includes(pe)||se.push(pe),se}),[]):Y!=="type"||typeof Q!="string"&&!Array.isArray(Q)?_t(Q)!=="object"||Array.isArray(Q)||Q===null?c[Y]=Q:c[Y]=o.extendSchemas(Q,t[Y]):_(Q)})(B,z):c[B]=z})),Object.entries(t).forEach((function(C){var $=ci(C,2),B=$[0],z=$[1];e[B]===void 0&&(c[B]=z)})),c}},{key:"getCacheKey",value:function(e){return["je-cache",e].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||new Date().toISOString().slice(0,10)}},{key:"cacheSet",value:function(e,t){try{window.localStorage.setItem(this.getCacheKey(e),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:t}))}catch(o){console.error(o)}}},{key:"cacheGet",value:function(e){try{var t=window.localStorage.getItem(this.getCacheKey(e));if(t){var o=JSON.parse(t);if(o.cacheBuster&&o.schema&&o.cacheBuster===this.getCacheBuster())return o.schema;this.cacheDelete(e)}}catch(c){console.error(c)}}},{key:"cacheDelete",value:function(e){window.localStorage.removeItem(this.getCacheKey(e))}}],r&&C_(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,r,n,l})(),R_=(b(2762),{default:function(){return{compile:function(a){var r=a.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),n=r&&r.length;if(!n)return function(){return a};for(var l=[],e=function(o){var c,_,C=r[o].replace(/[{}]+/g,"").trim().split("."),$=C.length;$>1?c=function(B){for(_=B,o=0;o<$&&(_=_[C[o]]);o++);return _}:(C=C[0],c=function(B){return B[C]}),l.push({s:r[o],r:c})},t=0;t<n;t++)e(t);return function(o){for(var c,_="".concat(a),C=0;C<n;C++)c=l[C],_=_.replace(c.s,c.r(o));return _}}}},ejs:function(){return!!window.EJS&&{compile:function(a){var r=new window.EJS({text:a});return function(n){return r.render(n)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(a){var r=window.Hogan.compile(a);return function(n){return r.render(n)}}}},lodash:function(){return!!window._&&{compile:function(a){return function(r){return window._.template(a)(r)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(a){return function(r){return window.Mark.up(a,r)}}}},mustache:function(){return!!window.Mustache&&{compile:function(a){return function(r){return window.Mustache.render(a,r)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(a){return function(r){return window._.template(a)(r)}}}}});function Go(a){return Go=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Go(a)}function cu(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function L_(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,A_(l.key),l)}}function A_(a){var r=(function(n,l){if(Go(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Go(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Go(r)=="symbol"?r:r+""}var $_={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Qr=(function(){return a=function n(){var l=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"",e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:$_;(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,n),this.mapping=e,this.icon_prefix=l},(r=[{key:"getIconClass",value:function(n){return this.mapping[n]?this.icon_prefix+this.mapping[n]:this.icon_prefix+n}},{key:"getIcon",value:function(n){var l,e=this.getIconClass(n);if(!e)return null;var t,o=document.createElement("i");return(l=o.classList).add.apply(l,(function(c){if(Array.isArray(c))return cu(c)})(t=e.split(" "))||(function(c){if(typeof Symbol<"u"&&c[Symbol.iterator]!=null||c["@@iterator"]!=null)return Array.from(c)})(t)||(function(c,_){if(c){if(typeof c=="string")return cu(c,_);var C=Object.prototype.toString.call(c).slice(8,-1);return C==="Object"&&c.constructor&&(C=c.constructor.name),C==="Map"||C==="Set"?Array.from(c):C==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(C)?cu(c,_):void 0}})(t)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
27
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})()),o}}])&&L_(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,r})();function du(a){return du=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},du(a)}function I_(a,r,n){return r=Sa(r),(function(l,e){if(e&&(du(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Hf()?Reflect.construct(r,n||[],Sa(a).constructor):r.apply(a,n))}function Hf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Hf=function(){return!!a})()}function Sa(a){return Sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Sa(a)}function hu(a,r){return hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},hu(a,r)}var N_={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"floppy-remove",save:"floppy-saved",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},D_=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),I_(this,r,["glyphicon glyphicon-",N_])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&hu(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function fu(a){return fu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},fu(a)}function B_(a,r,n){return r=xa(r),(function(l,e){if(e&&(fu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Uf()?Reflect.construct(r,n||[],xa(a).constructor):r.apply(a,n))}function Uf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Uf=function(){return!!a})()}function xa(a){return xa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},xa(a)}function pu(a,r){return pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},pu(a,r)}var F_={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"remove-circle",time:"time",calendar:"calendar",edit_properties:"list"},M_=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),B_(this,r,["icon-",F_])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&pu(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function mu(a){return mu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mu(a)}function q_(a,r,n){return r=Ca(r),(function(l,e){if(e&&(mu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Gf()?Reflect.construct(r,n||[],Ca(a).constructor):r.apply(a,n))}function Gf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Gf=function(){return!!a})()}function Ca(a){return Ca=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ca(a)}function yu(a,r){return yu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},yu(a,r)}var V_={collapse:"caret-square-o-down",expand:"caret-square-o-right",delete:"times",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"files-o",clear:"times-circle-o",time:"clock-o",calendar:"calendar",edit_properties:"list"},z_=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),q_(this,r,["fa fa-",V_])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&yu(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function vu(a){return vu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},vu(a)}function H_(a,r,n){return r=Pa(r),(function(l,e){if(e&&(vu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Jf()?Reflect.construct(r,n||[],Pa(a).constructor):r.apply(a,n))}function Jf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Jf=function(){return!!a})()}function Pa(a){return Pa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Pa(a)}function bu(a,r){return bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},bu(a,r)}var U_={collapse:"caret-down",expand:"caret-right",delete:"trash",edit:"pen",add:"plus",subtract:"minus",cancel:"ban",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"copy",clear:"times-circle",time:"clock",calendar:"calendar",edit_properties:"list"},G_=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),H_(this,r,["fas fa-",U_])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&bu(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function gu(a){return gu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},gu(a)}function J_(a,r,n){return r=Ta(r),(function(l,e){if(e&&(gu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Kf()?Reflect.construct(r,n||[],Ta(a).constructor):r.apply(a,n))}function Kf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Kf=function(){return!!a})()}function Ta(a){return Ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ta(a)}function _u(a,r){return _u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},_u(a,r)}var K_={collapse:"triangle-1-s",expand:"triangle-1-e",delete:"trash",edit:"pencil",add:"plusthick",subtract:"minusthick",cancel:"closethick",save:"disk",moveup:"arrowthick-1-n",moveright:"arrowthick-1-e",movedown:"arrowthick-1-s",moveleft:"arrowthick-1-w",copy:"copy",clear:"circle-close",time:"time",calendar:"calendar",edit_properties:"note"},W_=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),J_(this,r,["ui-icon ui-icon-",K_])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&_u(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function wu(a){return wu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},wu(a)}function Z_(a,r,n){return r=Ra(r),(function(l,e){if(e&&(wu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Wf()?Reflect.construct(r,n||[],Ra(a).constructor):r.apply(a,n))}function Wf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Wf=function(){return!!a})()}function Ra(a){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ra(a)}function ku(a,r){return ku=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},ku(a,r)}var Y_={collapse:"collapse-down",expand:"expand-right",delete:"trash",edit:"pencil",add:"plus",subtract:"minus",cancel:"ban",save:"file",moveup:"arrow-thick-top",moveright:"arrow-thick-right",movedown:"arrow-thick-bottom",moveleft:"arrow-thick-left",copy:"clipboard",clear:"circle-x",time:"clock",calendar:"calendar",edit_properties:"list"},Q_=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),Z_(this,r,["oi oi-",Y_])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&ku(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function ju(a){return ju=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ju(a)}function X_(a,r,n){return r=La(r),(function(l,e){if(e&&(ju(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Zf()?Reflect.construct(r,n||[],La(a).constructor):r.apply(a,n))}function Zf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Zf=function(){return!!a})()}function La(a){return La=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},La(a)}function Ou(a,r){return Ou=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Ou(a,r)}var e0={collapse:"arrow-down",expand:"arrow-right",delete:"delete",edit:"edit",add:"plus",subtract:"minus",cancel:"cross",save:"check",moveup:"upward",moveright:"forward",movedown:"downward",moveleft:"back",copy:"copy",clear:"close",time:"time",calendar:"bookmark",edit_properties:"menu"},t0=(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),X_(this,r,["icon icon-",e0])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&Ou(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr);function Eu(a){return Eu=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Eu(a)}function r0(a,r,n){return r=Aa(r),(function(l,e){if(e&&(Eu(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Yf()?Reflect.construct(r,n||[],Aa(a).constructor):r.apply(a,n))}function Yf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Yf=function(){return!!a})()}function Aa(a){return Aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Aa(a)}function Su(a,r){return Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Su(a,r)}var n0={collapse:"chevron-down",expand:"chevron-right",delete:"trash",edit:"pencil",add:"plus",subtract:"dash",cancel:"x-circle",save:"save",moveup:"arrow-up",moveright:"arrow-right",movedown:"arrow-down",moveleft:"arrow-left",copy:"clipboard",clear:"x-circle",time:"clock",calendar:"calendar",edit_properties:"list-ul"},i0={bootstrap:(function(a){function r(){return(function(l,e){if(!(l instanceof e))throw new TypeError("Cannot call a class as a function")})(this,r),r0(this,r,["bi bi-",n0])}return(function(l,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function");l.prototype=Object.create(e&&e.prototype,{constructor:{value:l,writable:!0,configurable:!0}}),Object.defineProperty(l,"prototype",{writable:!1}),e&&Su(l,e)})(r,a),n=r,Object.defineProperty(n,"prototype",{writable:!1}),n;var n})(Qr),bootstrap3:D_,fontawesome3:M_,fontawesome4:z_,fontawesome5:G_,jqueryui:W_,openiconic:Q_,spectre:t0};function Jo(a){return Jo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},Jo(a)}function o0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,s0(l.key),l)}}function s0(a){var r=(function(n,l){if(Jo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(Jo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return Jo(r)=="symbol"?r:r+""}var Qf=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(a){return a in document.documentElement})),Xr=(function(){return a=function n(l){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{disable_theme_rules:!1};(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,n),this.jsoneditor=l,Object.keys(e).forEach((function(t){l.options[t]!==void 0&&(e[t]=l.options[t])})),this.options=e},r=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getOptInCheckbox",value:function(n){var l=document.createElement("span"),e=this.getHiddenLabel(n+" opt-in");e.setAttribute("for",n+"-opt-in"),e.textContent=n+"-opt-in";var t=document.createElement("input");return t.setAttribute("type","checkbox"),t.setAttribute("style","margin: 0 10px 0 0;"),t.setAttribute("id",n+"-opt-in"),t.classList.add("json-editor-opt-in"),l.appendChild(t),l.appendChild(e),{label:e,checkbox:t,container:l}}},{key:"getOptInSwitch",value:function(n){return this.getOptInCheckbox()}},{key:"getFloatRightLinkHolder",value:function(){var n=document.createElement("div");return n.classList.add("je-float-right-linkholder"),n}},{key:"getModal",value:function(){var n=document.createElement("div");return n.style.display="none",n.classList.add("je-modal"),n}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var n=document.createElement("div");return n.classList.add("row"),n}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(n,l){}},{key:"getLink",value:function(n){var l=document.createElement("a");return l.setAttribute("href","#"),l.appendChild(document.createTextNode(n)),l}},{key:"disableHeader",value:function(n){n.style.color="#ccc"}},{key:"disableLabel",value:function(n){n.style.color="#ccc"}},{key:"enableHeader",value:function(n){n.style.color=""}},{key:"enableLabel",value:function(n){n.style.color=""}},{key:"getInfoButton",value:function(n){var l=document.createElement("span");l.innerText="ⓘ",l.classList.add("je-infobutton-icon");var e=document.createElement("span");return e.classList.add("je-infobutton-tooltip"),e.innerText=n,l.onmouseover=function(){e.style.visibility="visible"},l.onmouseleave=function(){e.style.visibility="hidden"},l.appendChild(e),l}},{key:"getFormInputLabel",value:function(n,l){var e=document.createElement("label");return e.appendChild(document.createTextNode(n)),l&&e.classList.add("required"),e}},{key:"getLabelLike",value:function(n,l){var e=document.createElement("b");return e.appendChild(document.createTextNode(n)),l&&e.classList.add("required"),e}},{key:"getHeader",value:function(n,l){var e=document.createElement("span");return typeof n=="string"?e.textContent=n:e.appendChild(n),e.classList.add("je-header"),e}},{key:"getCheckbox",value:function(){var n=this.getFormInputField("checkbox");return n.classList.add("je-checkbox"),n}},{key:"getCheckboxLabel",value:function(n,l){var e=document.createElement("label");return e.appendChild(document.createTextNode(" ".concat(n))),l&&e.classList.add("required"),e}},{key:"getMultiCheckboxHolder",value:function(n,l,e,t){var o=document.createElement("div");return o.classList.add("control-group"),l&&(l.style.display="block",o.appendChild(l),t&&l.appendChild(t)),Object.values(n).forEach((function(c){c.style.display="inline-block",c.style.marginRight="20px",o.appendChild(c)})),e&&o.appendChild(e),o}},{key:"getFormCheckboxControl",value:function(n,l,e){var t=document.createElement("div");return t.appendChild(n),l.style.width="auto",n.insertBefore(l,n.firstChild),e&&t.classList.add("je-checkbox-control--compact"),t}},{key:"getFormRadio",value:function(n){var l=this.getFormInputField("radio");return Object.keys(n).forEach((function(e){return l.setAttribute(e,n[e])})),l.classList.add("je-radio"),l}},{key:"getFormRadioLabel",value:function(n,l){var e=document.createElement("label");return e.appendChild(document.createTextNode(" ".concat(n))),l&&e.classList.add("required"),e}},{key:"getFormRadioControl",value:function(n,l,e,t){var o=document.createElement("div");return o.appendChild(n),l.style.width="auto",n.insertBefore(l,n.firstChild),e&&o.classList.add("je-radio-control--compact"),l.tagName.toLowerCase()!=="div"&&t&&n&&l&&(l.setAttribute("id",t),l.setAttribute("aria-labelledby",t),n.setAttribute("for",t)),o}},{key:"getSelectInput",value:function(n,l){var e=arguments.length>2&&arguments[2]!==void 0&&arguments[2],t=document.createElement("select");return n&&this.setSelectOptions(t,n,[],e),t}},{key:"getSwitcher",value:function(n){var l=this.getSelectInput(n,!1);return l.classList.add("je-switcher"),l}},{key:"getSwitcherOptions",value:function(n){return n.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(n,l,e){this.setSelectOptions(n,l,e)}},{key:"setSelectOptions",value:function(n,l){var e=arguments.length>2&&arguments[2]!==void 0?arguments[2]:[],t=arguments.length>3&&arguments[3]!==void 0&&arguments[3],o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:" ";if(n.innerHTML="",t){var c=document.createElement("option");c.setAttribute("value","_placeholder_"),c.textContent=o,c.setAttribute("disabled",""),c.setAttribute("hidden",""),n.appendChild(c)}for(var _=0;_<l.length;_++){var C=document.createElement("option");C.setAttribute("value",l[_]),C.textContent=e[_]||l[_],n.appendChild(C)}}},{key:"getTextareaInput",value:function(){var n=document.createElement("textarea");return n.classList.add("je-textarea"),n}},{key:"getHiddenLabel",value:function(n){var l=document.createElement("label");return l.textContent=n,l.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),l}},{key:"visuallyHidden",value:function(n){n&&n.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;")}},{key:"getHiddenText",value:function(n){var l=document.createElement("span");return l.textContent=n,l.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),l}},{key:"getRangeInput",value:function(n,l,e,t,o){var c=this.getFormInputField("range");return c.setAttribute("min",n),c.setAttribute("max",l),c.setAttribute("step",e),t&&(t.setAttribute("id",o+"-description"),c.setAttribute("aria-describedby",o+"-description")),c}},{key:"getStepperButtons",value:function(n){var l=document.createElement("div"),e=document.createElement("button");e.setAttribute("type","button"),e.classList.add("stepper-down");var t=document.createElement("button");t.setAttribute("type","button"),t.classList.add("stepper-up"),n.getAttribute("readonly")&&(e.setAttribute("disabled",!0),t.setAttribute("disabled",!0)),e.textContent="-",t.textContent="+";var o=function(C,$){C.value=Number($||C.value),C.setAttribute("initialized","1")},c=n.getAttribute("min"),_=n.getAttribute("max");return e.addEventListener("click",(function(){n.getAttribute("initialized")?c?Number(n.value)>Number(c)&&n.stepDown():n.stepDown():o(n,c),j(n,"change")})),t.addEventListener("click",(function(){n.getAttribute("initialized")?_?Number(n.value)<Number(_)&&n.stepUp():n.stepUp():o(n,c),j(n,"change")})),l.appendChild(e),l.appendChild(t),l}},{key:"getRangeOutput",value:function(n){var l=document.createElement("output"),e=function(t){l.value=t.currentTarget.value};return n.addEventListener("change",e,!1),n.addEventListener("input",e,!1),l}},{key:"getRangeControl",value:function(n,l){var e=document.createElement("div");return e.classList.add("je-range-control"),l&&e.appendChild(l),e.appendChild(n),e}},{key:"getFormInputField",value:function(n){var l=document.createElement("input");return l.setAttribute("type",n),l}},{key:"afterInputReady",value:function(n){}},{key:"getFormControl",value:function(n,l,e,t,o){var c=document.createElement("div");return c.classList.add("form-control"),n&&(c.appendChild(n),o&&n.setAttribute("for",o)),l.type!=="checkbox"&&l.type!=="radio"||!n?(t&&n&&n.appendChild(t),c.appendChild(l)):(l.style.width="auto",n.insertBefore(l,n.firstChild),t&&n.appendChild(t)),l.tagName.toLowerCase()!=="div"&&l&&n&&o&&(n.setAttribute("for",o),l.setAttribute("id",o)),l.tagName.toLowerCase()!=="div"&&l&&e&&(e.setAttribute("id",o+"-description"),l.setAttribute("aria-describedby",o+"-description")),e&&c.appendChild(e),c}},{key:"getIndentedPanel",value:function(){var n=document.createElement("div");return n.classList.add("je-indented-panel"),n}},{key:"getTopIndentedPanel",value:function(){var n=document.createElement("div");return n.classList.add("je-indented-panel--top"),n}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(n){var l=document.createElement("p");return window.DOMPurify?l.innerHTML=window.DOMPurify.sanitize(n):l.textContent=this.cleanText(n),l}},{key:"getCheckboxDescription",value:function(n){return this.getDescription(n)}},{key:"getFormInputDescription",value:function(n){return this.getDescription(n)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(n){return this.getButtonHolder()}},{key:"getButton",value:function(n,l,e){var t=document.createElement("button");return t.type="button",this.setButtonText(t,n,l,e),t}},{key:"getFormButton",value:function(n,l,e){return this.getButton(n,l,e)}},{key:"setButtonText",value:function(n,l,e,t){for(;n.firstChild;)n.removeChild(n.firstChild);if(e&&(n.appendChild(e),l=" ".concat(l)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!e){var o=document.createElement("span");o.appendChild(document.createTextNode(l)),n.appendChild(o)}t&&n.setAttribute("title",t)}},{key:"getTableContainer",value:function(){return document.createElement("div")}},{key:"getTable",value:function(){return document.createElement("table")}},{key:"getTableRow",value:function(){return document.createElement("tr")}},{key:"getTableHead",value:function(){return document.createElement("thead")}},{key:"getTableBody",value:function(){return document.createElement("tbody")}},{key:"getTableHeaderCell",value:function(n){var l=document.createElement("th");return l.textContent=n,l}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(n){var l=document.createElement("p");return l.style=l.style||{},l.style.color="red",l.appendChild(document.createTextNode(n)),l}},{key:"addInputError",value:function(n,l){n.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(n){}},{key:"addTableRowError",value:function(n){}},{key:"removeTableRowError",value:function(n){}},{key:"getTabHolder",value:function(n){var l=n===void 0?"":n,e=document.createElement("div");return e.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(l,"'></div><div class='je-tabholder--clear'></div>"),e}},{key:"getTopTabHolder",value:function(n){var l=n===void 0?"":n,e=document.createElement("div");return e.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(l,"'></div>"),e}},{key:"applyStyles",value:function(n,l){Object.keys(l).forEach((function(e){return n.style[e]=l[e]}))}},{key:"closest",value:function(n,l){for(;n&&n!==document;){if(!n[Qf])return!1;if(n[Qf](l))return n;n=n.parentNode}return!1}},{key:"insertBasicTopTab",value:function(n,l){l.firstChild.insertBefore(n,l.firstChild.firstChild)}},{key:"getTab",value:function(n,l){var e=document.createElement("div");return e.appendChild(n),e.id=l,e.classList.add("je-tab"),e}},{key:"getTopTab",value:function(n,l){var e=document.createElement("div");return e.appendChild(n),e.id=l,e.classList.add("je-tab--top"),e}},{key:"getTabContentHolder",value:function(n){return n.children[1]}},{key:"getTopTabContentHolder",value:function(n){return n.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(n){this.applyStyles(n.tab,{opacity:1,background:"white"}),n.rowPane!==void 0?n.rowPane.style.display="":n.container.style.display=""}},{key:"markTabInactive",value:function(n){this.applyStyles(n.tab,{opacity:.5,background:""}),n.rowPane!==void 0?n.rowPane.style.display="none":n.container.style.display="none"}},{key:"addTab",value:function(n,l){n.children[0].appendChild(l)}},{key:"addTopTab",value:function(n,l){n.children[0].appendChild(l)}},{key:"getBlockLink",value:function(){var n=document.createElement("a");return n.classList.add("je-block-link"),n}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(n,l,e){n.appendChild(l),e.classList.add("je-media"),n.appendChild(e)}},{key:"createImageLink",value:function(n,l,e){n.appendChild(l),l.appendChild(e)}},{key:"getFirstTab",value:function(n){return n.firstChild.firstChild}},{key:"getInputGroup",value:function(n,l){}},{key:"cleanText",value:function(n){var l=document.createElement("div");return l.innerHTML=n,l.textContent||l.innerText}},{key:"getDropZone",value:function(n){var l=document.createElement("div");return l.setAttribute("data-text",n),l.classList.add("je-dropzone"),l}},{key:"getUploadPreview",value:function(n,l,e){var t=document.createElement("div");if(t.classList.add("je-upload-preview"),n.mimeType.substr(0,5)==="image"){var o=document.createElement("img");o.src=e,t.appendChild(o)}var c=document.createElement("div");c.innerHTML+="<strong>Name:</strong> ".concat(n.name,"<br><strong>Type:</strong> ").concat(n.type,"<br><strong>Size:</strong> ").concat(n.formattedSize),t.appendChild(c),t.appendChild(l);var _=document.createElement("div");return _.style.clear="left",t.appendChild(_),t}},{key:"getProgressBar",value:function(){var n=document.createElement("progress");return n.setAttribute("max",100),n.setAttribute("value",0),n}},{key:"updateProgressBar",value:function(n,l){n&&n.setAttribute("value",l)}},{key:"updateProgressBarUnknown",value:function(n){n&&n.removeAttribute("value")}}],r&&o0(a.prototype,r),Object.defineProperty(a,"prototype",{writable:!1}),a;var a,r})();function ao(a){return ao=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ao(a)}function a0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,l0(l.key),l)}}function l0(a){var r=(function(n,l){if(ao(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ao(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ao(r)=="symbol"?r:r+""}function u0(a,r,n){return r=$r(r),(function(l,e){if(e&&(ao(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,Xf()?Reflect.construct(r,n||[],$r(a).constructor):r.apply(a,n))}function Xf(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(Xf=function(){return!!a})()}function di(){return di=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=$r(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},di.apply(this,arguments)}function $r(a){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$r(a)}function xu(a,r){return xu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},xu(a,r)}var ep=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),u0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&xu(e,t)})(r,a),n=r,(l=[{key:"getFormInputLabel",value:function(e,t){var o=di($r(r.prototype),"getFormInputLabel",this).call(this,e,t);return o.classList.add("je-form-input-label"),o}},{key:"getFormInputDescription",value:function(e){var t=di($r(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-form-input-label"),t}},{key:"getIndentedPanel",value:function(){var e=di($r(r.prototype),"getIndentedPanel",this).call(this);return e.classList.add("je-indented-panel"),e}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var e=di($r(r.prototype),"getChildEditorHolder",this).call(this);return e.classList.add("je-child-editor-holder"),e}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.classList.add("je-header-button-holder"),e}},{key:"getTable",value:function(){var e=di($r(r.prototype),"getTable",this).call(this);return e.classList.add("je-table"),e}},{key:"addInputError",value:function(e,t){var o=this.closest(e,".form-control")||e.controlgroup;e.errmsg?e.errmsg.style.display="block":(e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),e.errmsg.style=e.errmsg.style||{},e.errmsg.style.color="red",o.appendChild(e.errmsg)),e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(t)),e.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}])&&a0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function lo(a){return lo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},lo(a)}function c0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,d0(l.key),l)}}function d0(a){var r=(function(n,l){if(lo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(lo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return lo(r)=="symbol"?r:r+""}function h0(a,r,n){return r=Ir(r),(function(l,e){if(e&&(lo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,tp()?Reflect.construct(r,n||[],Ir(a).constructor):r.apply(a,n))}function tp(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(tp=function(){return!!a})()}function hi(){return hi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Ir(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},hi.apply(this,arguments)}function Ir(a){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Ir(a)}function Cu(a,r){return Cu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Cu(a,r)}ep.rules={".je-form-input-label":"display:block;margin-bottom:3px;font-weight:bold",".je-form-input-description":"display:inline-block;margin:0;font-size:0.8em;font-style:italic",".je-indented-panel":"padding:5px;margin:10px;border-radius:3px;border:1px%20solid%20%23ddd",".je-child-editor-holder":"margin-bottom:8px",".je-header-button-holder":"display:inline-block;margin-left:10px;font-size:0.8em;vertical-align:middle",".je-table":"margin-bottom:5px;border-bottom:1px%20solid%20%23ccc",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var rp=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),h0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Cu(e,t)})(r,a),n=r,(l=[{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var o=document.createElement("label");o.classList.add("switch");var c=document.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("id",e+"-opt-in"),c.classList.add("json-editor-opt-in");var _=document.createElement("span");_.classList.add("switch-slider");var C=document.createElement("span");return C.classList.add("sr-only"),C.textContent=e+"-opt-in",o.appendChild(C),o.appendChild(c),o.appendChild(_),{label:t,checkbox:c,container:o}}},{key:"getSelectInput",value:function(e,t){var o=hi(Ir(r.prototype),"getSelectInput",this).call(this,e);return o.classList.add("form-control"),o}},{key:"setGridColumnSize",value:function(e,t,o){e.classList.add("col-md-".concat(t)),o&&e.classList.add("col-md-offset-".concat(o))}},{key:"afterInputReady",value:function(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-control"),e}},{key:"getRangeInput",value:function(e,t,o,c,_){return hi(Ir(r.prototype),"getRangeInput",this).call(this,e,t,o,c,_)}},{key:"getFormInputField",value:function(e){var t=hi(Ir(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&t.classList.add("form-control"),t}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("sr-only")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getFormControl",value:function(e,t,o,c,_){var C=document.createElement("div");return!e||t.type!=="checkbox"&&t.type!=="radio"?(C.classList.add("form-group"),e&&(e.classList.add("control-label"),C.appendChild(e),c&&e.appendChild(c)),C.appendChild(t)):(C.classList.add(t.type),c&&e.appendChild(c),e.insertBefore(t,e.firstChild),C.appendChild(e)),o&&C.appendChild(o),t.tagName.toLowerCase()!=="div"&&t&&e&&_&&(e.setAttribute("for",_),t.setAttribute("id",_)),t.tagName.toLowerCase()!=="div"&&t&&o&&(o.setAttribute("id",_+"-description"),t.setAttribute("aria-describedby",_+"-description")),C}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("well","well-sm"),e.style.paddingBottom=0,e}},{key:"getInfoButton",value:function(e){var t=document.createElement("span");t.classList.add("glyphicon","glyphicon-info-sign","pull-right"),t.style.padding=".25rem",t.style.position="relative",t.style.display="inline-block";var o=document.createElement("span");return o.style["font-family"]="sans-serif",o.style.visibility="hidden",o.style["background-color"]="rgba(50, 50, 50, .75)",o.style.margin="0 .25rem",o.style.color="#FAFAFA",o.style.padding=".5rem 1rem",o.style["border-radius"]=".25rem",o.style.width="25rem",o.style.position="absolute",o.innerText=e,t.onmouseover=function(){o.style.visibility="visible"},t.onmouseleave=function(){o.style.visibility="hidden"},t.appendChild(o),t}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("p");return t.classList.add("help-block"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeaderContainer",value:function(){return document.createElement("div")}},{key:"getHeader",value:function(e,t){var o=document.createElement("span");return o.classList.add("h3"),typeof e=="string"?o.textContent=e:o.appendChild(e),o}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.style.marginLeft="10px",e}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getButton",value:function(e,t,o){var c=hi(Ir(r.prototype),"getButton",this).call(this,e,t,o);return c.classList.add("btn","btn-default"),c}},{key:"getTableContainer",value:function(){var e=hi(Ir(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-bordered"),e.style.width="auto",e.style.maxWidth="none",e}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("help-block","errormsg"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(t,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(t,"'></div>"),o}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.innerHTML="<ul class='nav nav-tabs' id='".concat(t,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(t,"'></div>"),o}},{key:"getTab",value:function(e,t){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(t)),c.appendChild(e),c.setAttribute("aria-controls",t),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTopTab",value:function(e,t){var o=document.createElement("li");o.setAttribute("role","presentation");var c=document.createElement("a");return c.setAttribute("href","#".concat(t)),c.appendChild(e),c.setAttribute("aria-controls",t),c.setAttribute("role","tab"),c.setAttribute("data-toggle","tab"),o.appendChild(c),o}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var o=e.firstChild,c="".concat(t,"%");o.setAttribute("aria-valuenow",t),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getInputGroup",value:function(e,t){if(e){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(e);var c=document.createElement("div");c.classList.add("input-group-btn"),o.appendChild(c);for(var _=0;_<t.length;_++)c.appendChild(t[_]);return o}}}])&&c0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function uo(a){return uo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},uo(a)}function f0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,p0(l.key),l)}}function p0(a){var r=(function(n,l){if(uo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(uo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return uo(r)=="symbol"?r:r+""}function m0(a,r,n){return r=Nr(r),(function(l,e){if(e&&(uo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,np()?Reflect.construct(r,n||[],Nr(a).constructor):r.apply(a,n))}function np(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(np=function(){return!!a})()}function fi(){return fi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Nr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},fi.apply(this,arguments)}function Nr(a){return Nr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Nr(a)}function Pu(a,r){return Pu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Pu(a,r)}rp.rules={".switch":"position:relative;display:inline-block;width:28px;height:16px;margin-right:10px",".switch input":"opacity:0;width:0;height:0",".switch-slider":"position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:%23ccc;transition:.1s;border-radius:34px",".switch-slider:before":"position:absolute;content:%22%22;height:12px;width:12px;left:1px;top:2px;background-color:white;transition:.1s;border-radius:50%25","input:checked + .switch-slider":"background-color:%232196F3","input:focus + .switch-slider":"box-shadow:0%200%201px%20%232196F3","input:checked + .switch-slider:before":"transform:translateX(12px)","input:disabled + .switch-slider":"opacity:0.5"};var y0={disable_theme_rules:!1,input_size:"normal",custom_forms:!1,object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},ip=(function(a){function r(e){return(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,r),m0(this,r,[e,y0])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Pu(e,t)})(r,a),n=r,(l=[{key:"getSelectInput",value:function(e,t){var o=fi(Nr(r.prototype),"getSelectInput",this).call(this,e);return o.classList.add("form-control"),this.options.custom_forms===!1?(this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg")):(o.classList.remove("form-control"),o.classList.add("custom-select"),this.options.input_size==="small"&&o.classList.add("custom-select-sm"),this.options.input_size==="large"&&o.classList.add("custom-select-lg")),o}},{key:"getContainer",value:function(){var e=document.createElement("div");return this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var o=document.createElement("div");o.classList.add("custom-control","custom-switch","d-inline-block","fs-6");var c=document.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("id",e+"-opt-in"),c.classList.add("custom-control-input","json-editor-opt-in");var _=document.createElement("label");_.setAttribute("for",e+"-opt-in"),_.classList.add("custom-control-label");var C=document.createElement("span");return C.classList.add("sr-only"),C.textContent=e+"-opt-in",_.appendChild(C),o.appendChild(c),o.appendChild(_),{label:t,checkbox:c,container:o}}},{key:"setGridColumnSize",value:function(e,t,o){e.classList.add("col-md-".concat(t)),o&&e.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var o=e.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.htmlFor=t),e.controlgroup=this.closest(e,".form-group")}}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg"),e}},{key:"getRangeInput",value:function(e,t,o,c,_){var C=fi(Nr(r.prototype),"getRangeInput",this).call(this,e,t,o,c,_);return this.options.custom_forms===!0&&(C.classList.remove("form-control"),C.classList.add("custom-range")),C}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),o=document.createElement("div"),c=document.createElement("div"),_=document.createElement("button");_.setAttribute("type","button");var C=document.createElement("button");C.setAttribute("type","button"),t.appendChild(o),t.appendChild(e),t.appendChild(c),o.appendChild(_),c.appendChild(C),t.classList.add("input-group"),o.classList.add("input-group-prepend"),c.classList.add("input-group-append"),_.classList.add("btn"),_.classList.add("btn-secondary"),_.classList.add("stepper-down"),C.classList.add("btn"),C.classList.add("btn-secondary"),C.classList.add("stepper-up"),e.getAttribute("readonly")&&(_.setAttribute("disabled",!0),C.setAttribute("disabled",!0)),_.textContent="-",C.textContent="+";var $=function(Y,Q){Y.value=Number(Q||Y.value),Y.setAttribute("initialized","1")},B=e.getAttribute("min"),z=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),_.addEventListener("click",(function(){e.getAttribute("initialized")?B?Number(e.value)>Number(B)&&e.stepDown():e.stepDown():$(e,B),j(e,"change")})),C.addEventListener("click",(function(){e.getAttribute("initialized")?z?Number(e.value)<Number(z)&&e.stepUp():e.stepUp():$(e,B),j(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=fi(Nr(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&e!=="file"&&(t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg")),e==="file"&&t.classList.add("form-control-file"),t}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("sr-only")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getFormControl",value:function(e,t,o,c,_){var C=document.createElement("div");if(C.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(C.appendChild(e),c&&C.appendChild(c)),C.appendChild(t);else{var $=document.createElement("div");this.options.custom_forms===!1?($.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label")):($.classList.add("custom-control"),t.classList.add("custom-control-input"),e.classList.add("custom-control-label"),t.type==="checkbox"?$.classList.add("custom-checkbox"):$.classList.add("custom-radio")),$.appendChild(t),$.appendChild(e),c&&$.appendChild(c),C.appendChild($)}return o&&C.appendChild(o),t.tagName.toLowerCase()!=="div"&&t&&e&&_&&(e.setAttribute("for",_),t.setAttribute("id",_)),t.tagName.toLowerCase()!=="div"&&t&&o&&(o.setAttribute("id",_+"-description"),t.setAttribute("aria-describedby",_+"-description")),C}},{key:"getInfoButton",value:function(e){var t=document.createElement("button");t.type="button",t.classList.add("ml-3","jsoneditor-twbs4-text-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("data-placement","auto"),t.title=e;var o=document.createTextNode("ⓘ");return t.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(t).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&t.classList.add("je-tooltip"),t}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(e,t,o,c){var _=document.createElement("div");_.classList.add("form-group"),t&&(_.appendChild(t),c&&t.appendChild(c));var C=document.createElement("div");return Object.values(e).forEach((function($){var B=$.firstChild;C.appendChild(B)})),_.appendChild(C),o&&_.appendChild(o),_}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var o in e)t.setAttribute(o,e[o]);return this.options.custom_forms===!1?t.classList.add("form-check-input"):t.classList.add("custom-control-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var o=document.createElement("label");return this.options.custom_forms===!1?o.classList.add("form-check-label"):o.classList.add("custom-control-label"),o.appendChild(document.createTextNode(e)),o}},{key:"getFormRadioControl",value:function(e,t,o){var c=document.createElement("div");return this.options.custom_forms===!1?c.classList.add("form-check"):c.classList.add("custom-control","custom-radio"),c.appendChild(t),c.appendChild(e),o&&(this.options.custom_forms===!1?c.classList.add("form-check-inline"):c.classList.add("custom-control-inline")),c}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("card","card-body","mb-3"),this.options.object_background&&e.classList.add(this.options.object_background),this.options.object_text&&e.classList.add(this.options.object_text),e}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("small");return t.classList.add("form-text"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeader",value:function(e,t){var o=document.createElement("span");return o.classList.add("h3"),o.classList.add("card-title"),o.classList.add("level-"+t),typeof e=="string"?o.textContent=e:o.appendChild(e),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=this.getButtonHolder();return t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"&&t.classList.add("text-right"),t}},{key:"getButton",value:function(e,t,o){var c=fi(Nr(r.prototype),"getButton",this).call(this,e,t,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var e=fi(Nr(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-sm"),this.options.table_border&&e.classList.add("table-bordered"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getErrorMessage",value:function(e){var t=document.createElement("div");return t.classList.add("alert","alert-danger"),t.setAttribute("role","alert"),t.appendChild(document.createTextNode(e)),t}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("is-invalid"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("invalid-feedback"),e.controlgroup.appendChild(e.errmsg),e.errmsg.style.display="block"),e.errmsg.style.display="block",e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),o=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),t.classList.add("row"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(t,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(t,"'></div></div>"),o}},{key:"getTab",value:function(e,t){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(t)),c.setAttribute("data-toggle","tab"),c.appendChild(e),o.appendChild(c),o}},{key:"getTopTab",value:function(e,t){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(t)),c.setAttribute("data-toggle","tab"),c.appendChild(e),o.appendChild(c),o}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(e,t){t.children[0].children[0].insertBefore(e,t.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getFirstTab",value:function(e){return e.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var o=e.firstChild,c="".concat(t,"%");o.setAttribute("aria-valuenow",t),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getBlockLink",value:function(){var e=document.createElement("a");return e.classList.add("mb-3","d-inline-block"),e}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(e,t){if(e){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(e);var c=document.createElement("div");c.classList.add("input-group-append"),o.appendChild(c);for(var _=0;_<t.length;_++)t[_].classList.remove("mr-2","btn-secondary"),t[_].classList.add("btn-outline-secondary"),c.appendChild(t[_]);return o}}}])&&f0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function co(a){return co=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},co(a)}function v0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,b0(l.key),l)}}function b0(a){var r=(function(n,l){if(co(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(co(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return co(r)=="symbol"?r:r+""}function g0(a,r,n){return r=Dr(r),(function(l,e){if(e&&(co(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,op()?Reflect.construct(r,n||[],Dr(a).constructor):r.apply(a,n))}function op(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(op=function(){return!!a})()}function pi(){return pi=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=Dr(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},pi.apply(this,arguments)}function Dr(a){return Dr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},Dr(a)}function Tu(a,r){return Tu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Tu(a,r)}ip.rules={".jsoneditor-twbs4-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var _0={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},sp=(function(a){function r(e){return(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,r),g0(this,r,[e,_0])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tu(e,t)})(r,a),n=r,(l=[{key:"getSelectInput",value:function(e,t){var o=pi(Dr(r.prototype),"getSelectInput",this).call(this,e);return o.classList.add("form-control"),o.classList.add("form-select"),this.options.input_size==="small"&&o.classList.add("form-control-sm"),this.options.input_size==="large"&&o.classList.add("form-control-lg"),o}},{key:"getContainer",value:function(){var e=document.createElement("div");return this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var o=document.createElement("div");o.classList.add("form-check","form-switch","d-inline-block","fs-6");var c=document.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("role","switch"),c.setAttribute("id",e+"-opt-in"),c.classList.add("form-check-input","json-editor-opt-in");var _=document.createElement("label");_.setAttribute("for",e+"-opt-in"),_.classList.add("form-check-label");var C=document.createElement("span");return C.classList.add("visually-hidden"),C.textContent=e+"-opt-in",_.appendChild(C),o.appendChild(c),o.appendChild(_),{label:t,checkbox:c,container:o}}},{key:"setGridColumnSize",value:function(e,t,o){e.classList.add("col-md-".concat(t)),o&&e.classList.add("offset-md-".concat(o))}},{key:"afterInputReady",value:function(e){if(!e.controlgroup){var t=e.name;e.id=t;var o=e.parentNode.parentNode.getElementsByTagName("label")[0];o&&(o.classList.add("form-label"),o.htmlFor=t),e.controlgroup=this.closest(e,".form-group")}}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-control"),this.options.input_size==="small"&&e.classList.add("form-control-sm"),this.options.input_size==="large"&&e.classList.add("form-control-lg"),e}},{key:"getRangeInput",value:function(e,t,o,c,_){var C=pi(Dr(r.prototype),"getRangeInput",this).call(this,e,t,o,c,_);return C.classList.remove("form-control"),C.classList.add("form-range"),C}},{key:"getStepperButtons",value:function(e){var t=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var c=document.createElement("button");c.setAttribute("type","button"),t.appendChild(o),t.appendChild(e),t.appendChild(c),t.classList.add("input-group"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),c.classList.add("btn"),c.classList.add("btn-secondary"),c.classList.add("stepper-up"),e.getAttribute("readonly")&&(o.setAttribute("disabled",!0),c.setAttribute("disabled",!0)),o.textContent="-",c.textContent="+";var _=function(B,z){B.value=Number(z||B.value),B.setAttribute("initialized","1")},C=e.getAttribute("min"),$=e.getAttribute("max");return e.addEventListener("change",(function(){e.getAttribute("initialized")||e.setAttribute("initialized","1")})),o.addEventListener("click",(function(){e.getAttribute("initialized")?C?Number(e.value)>Number(C)&&e.stepDown():e.stepDown():_(e,C),j(e,"change")})),c.addEventListener("click",(function(){e.getAttribute("initialized")?$?Number(e.value)<Number($)&&e.stepUp():e.stepUp():_(e,C),j(e,"change")})),t}},{key:"getFormInputField",value:function(e){var t=pi(Dr(r.prototype),"getFormInputField",this).call(this,e);return e!=="checkbox"&&e!=="radio"&&(t.classList.add("form-control"),this.options.input_size==="small"&&t.classList.add("form-control-sm"),this.options.input_size==="large"&&t.classList.add("form-control-lg")),t}},{key:"getFormControl",value:function(e,t,o,c,_){var C=document.createElement("div");if(C.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio")e&&(e.classList.add("form-label"),C.appendChild(e),c&&C.appendChild(c)),C.appendChild(t);else{var $=document.createElement("div");$.classList.add("form-check"),t.classList.add("form-check-input"),e.classList.add("form-check-label"),t.tagName.toLowerCase()!=="div"&&t&&e&&_&&(e.setAttribute("for",_),t.setAttribute("id",_)),t.tagName.toLowerCase()!=="div"&&t&&o&&(o.setAttribute("id",_+"-description"),t.setAttribute("aria-describedby",_+"-description")),$.appendChild(t),$.appendChild(e),c&&$.appendChild(c),C.appendChild($)}return o&&C.appendChild(o),C}},{key:"getHiddenLabel",value:function(e){var t=document.createElement("label");return t.textContent=e,t.classList.add("visually-hidden"),t}},{key:"visuallyHidden",value:function(e){e&&e.classList.add("visually-hidden")}},{key:"getHiddenText",value:function(e){var t=document.createElement("span");return t.textContent=e,t.classList.add("sr-only"),t}},{key:"getInfoButton",value:function(e){var t=document.createElement("button");t.type="button",t.classList.add("ms-3","jsoneditor-twbs5-text-button"),t.setAttribute("data-toggle","tooltip"),t.setAttribute("data-placement","auto"),t.title=e;var o=document.createTextNode("ⓘ");return t.appendChild(o),this.options.tooltip==="bootstrap"?window.jQuery&&window.jQuery().tooltip?window.jQuery(t).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):this.options.tooltip==="css"&&t.classList.add("je-tooltip"),t}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(e,t,o,c){var _=document.createElement("div");_.classList.add("form-group"),t&&(_.appendChild(t),c&&t.appendChild(c));var C=document.createElement("div");return Object.values(e).forEach((function($){var B=$.firstChild;C.appendChild(B)})),_.appendChild(C),o&&_.appendChild(o),_}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var o in e)t.setAttribute(o,e[o]);return t.classList.add("form-check-input"),t}},{key:"getFormRadioLabel",value:function(e,t){var o=document.createElement("label");return o.classList.add("form-check-label"),o.appendChild(document.createTextNode(e)),o}},{key:"getFormRadioControl",value:function(e,t,o){var c=document.createElement("div");return c.classList.add("form-check"),c.appendChild(t),c.appendChild(e),o&&c.classList.add("form-check-inline"),c}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("card","card-body","my-3"),this.options.object_background&&e.classList.add(this.options.object_background),this.options.object_text&&e.classList.add(this.options.object_text),e}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("small");return t.classList.add("form-text"),t.classList.add("d-block"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getHeader",value:function(e,t){var o=document.createElement("span");return o.classList.add("h3"),o.classList.add("card-title"),o.classList.add("level-"+t),typeof e=="string"?o.textContent=e:o.appendChild(e),o.style.display="inline-block",o}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=document.createElement("span");return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=this.getButtonHolder();return t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"&&t.classList.add("text-end"),t}},{key:"getButton",value:function(e,t,o){var c=pi(Dr(r.prototype),"getButton",this).call(this,e,t,o);return c.classList.add("btn","btn-secondary","btn-sm"),c}},{key:"getTableContainer",value:function(){var e=pi(Dr(r.prototype),"getTableContainer",this).call(this);return e.classList.add("table-responsive"),e}},{key:"getTable",value:function(){var e=document.createElement("table");return e.classList.add("table","table-sm"),this.options.table_border&&e.classList.add("table-bordered"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getErrorMessage",value:function(e){var t=document.createElement("div");return t.classList.add("alert","alert-danger"),t.setAttribute("role","alert"),t.appendChild(document.createTextNode(e)),t}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("is-invalid"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("invalid-feedback"),e.controlgroup.appendChild(e.errmsg),e.errmsg.style.display="block"),e.errmsg.style.display="block",e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),o=e===void 0?"":e;return t.innerHTML="<div class='col-md-2' id='".concat(o,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(o,"'></div></div>"),t.classList.add("row"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.classList.add("card"),o.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(t,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(t,"'></div></div>"),o}},{key:"getTab",value:function(e,t){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(t)),c.setAttribute("data-toggle","tab"),c.appendChild(e),o.appendChild(c),o}},{key:"getTopTab",value:function(e,t){var o=document.createElement("li");o.classList.add("nav-item");var c=document.createElement("a");return c.classList.add("nav-link"),c.setAttribute("href","#".concat(t)),c.setAttribute("data-toggle","tab"),c.appendChild(e),o.appendChild(c),o}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.classList.add("tab-pane"),e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("active"),e.rowPane!==void 0?e.rowPane.classList.add("active"):e.container.classList.add("active")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.remove("active"),e.rowPane!==void 0?e.rowPane.classList.remove("active"):e.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(e,t){t.children[0].children[0].insertBefore(e,t.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabContentHolder",value:function(e){return e.children[1].children[0]}},{key:"getFirstTab",value:function(e){return e.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("progress-bar"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var o=e.firstChild,c="".concat(t,"%");o.setAttribute("aria-valuenow",t),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","progress-striped","active"),t.removeAttribute("aria-valuenow"),t.style.width="100%",t.innerHTML=""}}},{key:"getBlockLink",value:function(){var e=document.createElement("a");return e.classList.add("mb-3","d-inline-block"),e}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(e,t){if(e){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(e);for(var c=0;c<t.length;c++)t[c].classList.remove("me-2","btn-secondary"),t[c].classList.add("btn-outline-secondary"),o.appendChild(t[c]);return o}}}])&&v0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function ho(a){return ho=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},ho(a)}function w0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,k0(l.key),l)}}function k0(a){var r=(function(n,l){if(ho(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(ho(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return ho(r)=="symbol"?r:r+""}function j0(a,r,n){return r=en(r),(function(l,e){if(e&&(ho(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,ap()?Reflect.construct(r,n||[],en(a).constructor):r.apply(a,n))}function ap(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(ap=function(){return!!a})()}function fo(){return fo=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=en(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},fo.apply(this,arguments)}function en(a){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},en(a)}function Ru(a,r){return Ru=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Ru(a,r)}sp.rules={".form-group":"margin-bottom:1rem",".form-text":"display:block",".jsoneditor-twbs5-text-button":"background:none;padding:0;border:0;color:currentColor","td > .form-group":"margin-bottom:0",".json-editor-btn-upload":"margin-top:1rem",".je-noindent .card":"padding:0;border:0",".je-tooltip:hover::before":"display:block;position:absolute;font-size:0.8em;color:%23fff;border-radius:0.2em;content:attr(title);background-color:%23000;margin-top:-2.5em;padding:0.3em",".je-tooltip:hover::after":"display:block;position:absolute;font-size:0.8em;color:%23fff",".select2-container--default .select2-selection--single":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__arrow":"height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".select2-container--default .select2-selection--single .select2-selection__rendered":"line-height:calc(1.5em%20%2B%200.75rem%20%2B%202px)",".selectize-control.form-control":"padding:0",".selectize-dropdown.form-control":"padding:0;height:auto",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var lp=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),j0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Ru(e,t)})(r,a),n=r,(l=[{key:"getTable",value:function(){var e=fo(en(r.prototype),"getTable",this).call(this);return e.setAttribute("cellpadding",5),e.setAttribute("cellspacing",0),e}},{key:"getTableHeaderCell",value:function(e){var t=fo(en(r.prototype),"getTableHeaderCell",this).call(this,e);return t.classList.add("ui-state-active"),t.style.fontWeight="bold",t}},{key:"getTableCell",value:function(){var e=fo(en(r.prototype),"getTableCell",this).call(this);return e.classList.add("ui-widget-content"),e}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.style.marginLeft="10px",e.style.fontSize=".6em",e.style.display="inline-block",e}},{key:"getFormInputDescription",value:function(e){var t=this.getDescription(e);return t.style.marginLeft="10px",t.style.display="inline-block",t}},{key:"getFormControl",value:function(e,t,o,c){var _=fo(en(r.prototype),"getFormControl",this).call(this,e,t,o,c);return t.type==="checkbox"?(_.style.lineHeight="25px",_.style.padding="3px 0"):_.style.padding="4px 0 8px 0",_}},{key:"getDescription",value:function(e){var t=document.createElement("span");return t.style.fontSize=".8em",t.style.fontStyle="italic",window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getButtonHolder",value:function(){var e=document.createElement("div");return e.classList.add("ui-buttonset"),e.style.fontSize=".7em",e}},{key:"getFormInputLabel",value:function(e,t){var o=document.createElement("label");return o.style.fontWeight="bold",o.style.display="block",o.textContent=e,t&&o.classList.add("required"),o}},{key:"getButton",value:function(e,t,o){var c=document.createElement("button");c.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),t&&!e?(c.classList.add("ui-button-icon-only"),t.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(t)):t?(c.classList.add("ui-button-text-icon-primary"),t.classList.add("ui-button-icon-primary","ui-icon-primary"),c.appendChild(t)):c.classList.add("ui-button-text-only");var _=document.createElement("span");return _.classList.add("ui-button-text"),_.textContent=e||o||".",c.appendChild(_),c.setAttribute("title",o),c}},{key:"setButtonText",value:function(e,t,o,c){e.innerHTML="",e.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),o&&!t?(e.classList.add("ui-button-icon-only"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(o)):o?(e.classList.add("ui-button-text-icon-primary"),o.classList.add("ui-button-icon-primary","ui-icon-primary"),e.appendChild(o)):e.classList.add("ui-button-text-only");var _=document.createElement("span");_.classList.add("ui-button-text"),_.textContent=t||c||".",e.appendChild(_),e.setAttribute("title",c)}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("ui-widget-content","ui-corner-all"),e.style.padding="1em 1.4em",e.style.marginBottom="20px",e}},{key:"afterInputReady",value:function(e){if(!e.controls&&(e.controls=this.closest(e,".form-control"),this.queuedInputErrorText)){var t=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(e,t)}}},{key:"addInputError",value:function(e,t){e.controls?(e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("div"),e.errmsg.classList.add("ui-state-error"),e.controls.appendChild(e.errmsg)),e.errmsg.textContent=t):this.queuedInputErrorText=t}},{key:"removeInputError",value:function(e){e.controls||delete this.queuedInputErrorText,e.errmsg&&(e.errmsg.style.display="none")}},{key:"markTabActive",value:function(e){e.tab.classList.remove("ui-widget-header"),e.tab.classList.add("ui-state-active"),e.rowPane!==void 0?e.rowPane.style.display="":e.container.style.display=""}},{key:"markTabInactive",value:function(e){e.tab.classList.add("ui-widget-header"),e.tab.classList.remove("ui-state-active"),e.rowPane!==void 0?e.rowPane.style.display="none":e.container.style.display="none"}}])&&w0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function po(a){return po=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},po(a)}function O0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,E0(l.key),l)}}function E0(a){var r=(function(n,l){if(po(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(po(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return po(r)=="symbol"?r:r+""}function S0(a,r,n){return r=$a(r),(function(l,e){if(e&&(po(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,up()?Reflect.construct(r,n||[],$a(a).constructor):r.apply(a,n))}function up(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(up=function(){return!!a})()}function $a(a){return $a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},$a(a)}function Lu(a,r){return Lu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Lu(a,r)}lp.rules={'div[data-schemaid="root"]:after':'position:relative;color:red;margin:10px 0;font-weight:600;display:block;width:100%;text-align:center;content:"This is an old JSON-Editor 1.x Theme and might not display elements correctly when used with the 2.x version"'};var cp=(function(a){function r(){return(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")})(this,r),S0(this,r,arguments)}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Lu(e,t)})(r,a),n=r,(l=[{key:"addInputError",value:function(e,t){if(e.errmsg)e.errmsg.style.display="block";else{var o=this.closest(e,".form-control");e.errmsg=document.createElement("div"),e.errmsg.setAttribute("class","errmsg"),o.nodeName&&o.appendChild(e.errmsg)}e.errmsg.innerHTML="",e.errmsg.appendChild(document.createTextNode(t)),e.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(e){e.style&&(e.style.borderColor=""),e.errmsg&&(e.errmsg.style.display="none")}}])&&O0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function mo(a){return mo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mo(a)}function x0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,C0(l.key),l)}}function C0(a){var r=(function(n,l){if(mo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(mo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return mo(r)=="symbol"?r:r+""}function P0(a,r,n){return r=mt(r),(function(l,e){if(e&&(mo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,dp()?Reflect.construct(r,n||[],mt(a).constructor):r.apply(a,n))}function dp(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(dp=function(){return!!a})()}function Et(){return Et=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=mt(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Et.apply(this,arguments)}function mt(a){return mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},mt(a)}function Au(a,r){return Au=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},Au(a,r)}cp.rules={".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red"};var T0={disable_theme_rules:!1,label_bold:!0,align_bottom:!1,object_indent:!1,object_border:!1,table_border:!1,table_zebrastyle:!1,input_size:"normal"},hp=(function(a){function r(e){return(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,r),P0(this,r,[e,T0])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Au(e,t)})(r,a),n=r,(l=[{key:"getOptInSwitch",value:function(e){var t=document.createElement("span");t.classList.add("form-group");var o=document.createElement("label");o.classList.add("form-switch","d-inline-block");var c=document.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("id",e+"-opt-in"),c.classList.add("json-editor-opt-in");var _=document.createElement("i");_.classList.add("form-icon");var C=document.createElement("span");return C.classList.add("sr-only"),C.textContent=e+"-opt-in",o.appendChild(C),o.appendChild(c),o.appendChild(_),t.appendChild(o),{label:o,checkbox:c,container:t}}},{key:"setGridColumnSize",value:function(e,t,o){e.classList.add("col-".concat(t)),o&&e.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var e=document.createElement("div");return e.classList.add("container"),this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getGridRow",value:function(){var e=document.createElement("div");return e.classList.add("columns"),e}},{key:"getGridColumn",value:function(){var e=document.createElement("div");return e.classList.add("column"),this.options.align_bottom&&e.classList.add("je-align-bottom"),e}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("je-panel"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getTopIndentedPanel",value:function(){var e=document.createElement("div");return e.classList.add("je-panel-top"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var e=Et(mt(r.prototype),"getButtonHolder",this).call(this);return e.classList.add("btn-group"),e}},{key:"getFormButtonHolder",value:function(e){var t=Et(mt(r.prototype),"getFormButtonHolder",this).call(this);return t.classList.remove("btn-group"),t.classList.add("d-block"),e==="center"?t.classList.add("text-center"):e==="right"?t.classList.add("text-right"):t.classList.add("text-left"),t}},{key:"getFormButton",value:function(e,t,o){var c=Et(mt(r.prototype),"getFormButton",this).call(this,e,t,o);return c.classList.add("btn","btn-primary","mx-2","my-1"),this.options.input_size!=="small"&&c.classList.remove("btn-sm"),this.options.input_size==="large"&&c.classList.add("btn-lg"),c}},{key:"getButton",value:function(e,t,o){var c=Et(mt(r.prototype),"getButton",this).call(this,e,t,o);return c.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),c}},{key:"getHeader",value:function(e,t){var o=document.createElement("span");return typeof e=="string"?o.textContent=e:o.appendChild(e),o.style.display="inline-block",o}},{key:"getFormInputDescription",value:function(e){var t=Et(mt(r.prototype),"getFormInputDescription",this).call(this,e);return t.classList.add("je-desc","hide-sm"),t}},{key:"getFormInputLabel",value:function(e,t){var o=Et(mt(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold&&o.classList.add("je-label"),o}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(e,t){var o=Et(mt(r.prototype),"getCheckboxLabel",this).call(this,e,t),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-checkbox","pr-0"),o.insertBefore(c,o.firstChild),o}},{key:"getFormCheckboxControl",value:function(e,t,o){return e.insertBefore(t,e.firstChild),o&&e.classList.add("form-inline"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,o,c){return Et(mt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,o,c)}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var o in e)t.setAttribute(o,e[o]);return t}},{key:"getFormRadioLabel",value:function(e,t){var o=Et(mt(r.prototype),"getFormRadioLabel",this).call(this,e,t),c=document.createElement("i");return c.classList.add("form-icon"),o.classList.add("form-radio"),o.insertBefore(c,o.firstChild),o}},{key:"getFormRadioControl",value:function(e,t,o){return e.insertBefore(t,e.firstChild),o&&e.classList.add("form-inline"),e}},{key:"getFormInputField",value:function(e){var t=Et(mt(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("form-input"),t}},{key:"getRangeInput",value:function(e,t,o,c,_){var C=Et(mt(r.prototype),"getRangeInput",this).call(this,e,t,o,c,_);return C.classList.add("slider"),C.classList.remove("form-input"),C.setAttribute("oninput",'this.setAttribute("value", this.value)'),C}},{key:"getRangeControl",value:function(e,t){var o=Et(mt(r.prototype),"getRangeControl",this).call(this,e,t);return o.classList.add("text-center"),o}},{key:"getSelectInput",value:function(e,t){var o=Et(mt(r.prototype),"getSelectInput",this).call(this,e);return o.classList.add("form-select"),o}},{key:"getTextareaInput",value:function(){var e=document.createElement("textarea");return e.classList.add("form-input"),e}},{key:"getFormControl",value:function(e,t,o,c,_){var C=document.createElement("div");return C.classList.add("form-group"),!e||t.type!=="checkbox"&&t.type!=="radio"?(e&&(e.classList.add("form-label"),C.appendChild(e),c&&e.appendChild(c)),C.appendChild(t)):(C.classList.add(t.type),c&&e.appendChild(c),e.insertBefore(t,e.firstChild),C.appendChild(e)),this.options.input_size==="small"?t.classList.add("input-sm","select-sm"):this.options.input_size==="large"&&t.classList.add("input-lg","select-lg"),t.type!=="checkbox"&&C.appendChild(t),o&&C.appendChild(o),t.tagName.toLowerCase()!=="div"&&t&&e&&_&&(e.setAttribute("for",_),t.setAttribute("id",_)),t.tagName.toLowerCase()!=="div"&&t&&o&&(o.setAttribute("id",_+"-description"),t.setAttribute("aria-describedby",_+"-description")),C}},{key:"getInputGroup",value:function(e,t){if(e){var o=document.createElement("div");o.classList.add("input-group"),o.appendChild(e);for(var c=0;c<t.length;c++)t[c].classList.add("input-group-btn"),t[c].classList.remove("btn-sm","mr-2","my-1"),o.appendChild(t[c]);return o}}},{key:"getInfoButton",value:function(e){var t=document.createElement("div");t.classList.add("popover","popover-left","float-right");var o=document.createElement("button");o.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),o.setAttribute("tabindex","-1"),t.appendChild(o);var c=document.createTextNode("I");o.appendChild(c);var _=document.createElement("div");_.classList.add("popover-container"),t.appendChild(_);var C=document.createElement("div");C.classList.add("card"),_.appendChild(C);var $=document.createElement("div");return $.classList.add("card-body"),$.innerHTML=e,C.appendChild($),t}},{key:"getTable",value:function(){var e=Et(mt(r.prototype),"getTable",this).call(this);return e.classList.add("table","table-scroll"),this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("table-striped"),e}},{key:"getProgressBar",value:function(){var e=Et(mt(r.prototype),"getProgressBar",this).call(this);return e.classList.add("progress"),e}},{key:"getTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.classList.add("columns"),o.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(t,'"></div>'),o}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(t,'"></div>'),o}},{key:"getTab",value:function(e,t){var o=document.createElement("a");return o.classList.add("btn","btn-secondary","btn-block"),o.setAttribute("href","#".concat(t)),o.appendChild(e),o}},{key:"getTopTab",value:function(e,t){var o=document.createElement("li");o.id=t,o.classList.add("tab-item");var c=document.createElement("a");return c.setAttribute("href","#".concat(t)),c.appendChild(e),o.appendChild(c),o}},{key:"markTabActive",value:function(e){e.tab.classList.add("active"),e.rowPane!==void 0?e.rowPane.style.display="":e.container.style.display=""}},{key:"markTabInactive",value:function(e){e.tab.classList.remove("active"),e.rowPane!==void 0?e.rowPane.style.display="none":e.container.style.display="none"}},{key:"afterInputReady",value:function(e){if(e.localName==="select"){if(e.classList.contains("selectized")){var t=e.nextSibling;t&&(t.classList.remove("form-select"),Array.from(t.querySelectorAll(".form-select")).forEach((function(c){c.classList.remove("form-select")})))}else if(e.classList.contains("select2-hidden-accessible")){var o=e.nextSibling;o&&o.querySelector(".select2-selection--single")&&o.classList.add("form-select")}}e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.errmsg||(e.errmsg=document.createElement("p"),e.errmsg.classList.add("form-input-hint"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.classList.remove("d-hide"),e.errmsg.textContent=t,e.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.classList.add("d-hide"),e.controlgroup.classList.remove("has-error"))}}])&&x0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);function yo(a){return yo=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},yo(a)}function R0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,L0(l.key),l)}}function L0(a){var r=(function(n,l){if(yo(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(yo(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return yo(r)=="symbol"?r:r+""}function A0(a,r,n){return r=yt(r),(function(l,e){if(e&&(yo(e)==="object"||typeof e=="function"))return e;if(e!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(t){if(t===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t})(l)})(a,fp()?Reflect.construct(r,n||[],yt(a).constructor):r.apply(a,n))}function fp(){try{var a=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch{}return(fp=function(){return!!a})()}function Rt(){return Rt=typeof Reflect<"u"&&Reflect.get?Reflect.get.bind():function(a,r,n){var l=(function(t,o){for(;!Object.prototype.hasOwnProperty.call(t,o)&&(t=yt(t))!==null;);return t})(a,r);if(l){var e=Object.getOwnPropertyDescriptor(l,r);return e.get?e.get.call(arguments.length<3?a:n):e.value}},Rt.apply(this,arguments)}function yt(a){return yt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(r){return r.__proto__||Object.getPrototypeOf(r)},yt(a)}function $u(a,r){return $u=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(n,l){return n.__proto__=l,n},$u(a,r)}hp.rules={"*":"--primary-color:%235755d9;--gray-color:%23bcc3ce;--light-color:%23fff",".slider:focus":"box-shadow:none","h4 > label + .btn-group":"margin-left:1rem",".text-right > button":"margin-right:0%20!important",".text-left > button":"margin-left:0%20!important",".property-selector":"font-size:0.7rem;font-weight:normal;max-height:260px%20!important;width:395px%20!important",".property-selector .form-checkbox":"margin:0",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"border-collapse:collapse",".table td":"padding:0.4rem%200.4rem",".mr-5":"margin-right:1rem%20!important","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23eee",".je-table-border td":"border:0.05rem%20solid%20%23dadee4%20!important",".btn-info":"font-size:0.5rem;font-weight:bold;height:0.8rem;padding:0.15rem%200;line-height:0.8;margin:0.3rem%200%200.3rem%200.1rem",".je-label + select":"min-width:5rem",".je-label":"font-weight:600",".btn-action.btn-info":"width:0.8rem",".je-border":"border:0.05rem%20solid%20%23dadee4",".je-panel":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit",".je-align-bottom":"margin-top:auto",".je-desc":"font-size:smaller;margin:0.2rem%200",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem;border:3px%20solid%20white;box-shadow:0px%200px%208px%20rgba(0%2C%200%2C%200%2C%200.3);box-sizing:border-box",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".columns .container.je-noindent":"padding-left:0;padding-right:0",".selectize-control.multi .item":"background:var(--primary-color)%20!important",".select2-container--default .select2-selection--single .select2-selection__arrow":"display:none",".select2-container--default .select2-selection--single":"border:none",".select2-container .select2-selection--single .select2-selection__rendered":"padding:0",".select2-container .select2-search--inline .select2-search__field":"margin-top:0",".select2-container--default.select2-container--focus .select2-selection--multiple":"border:0.05rem%20solid%20var(--gray-color)",".select2-container--default .select2-selection--multiple .select2-selection__choice":"margin:0.4rem%200.2rem%200.2rem%200;padding:2px%205px;background-color:var(--primary-color);color:var(--light-color)",".select2-container--default .select2-search--inline .select2-search__field":"line-height:normal",".choices":"margin-bottom:auto",".choices__list--multiple .choices__item":"border:none;background-color:var(--primary-color);color:var(--light-color)",".choices[data-type*='select-multiple'] .choices__button":"border-left:0.05rem%20solid%20%232826a6",".choices__inner":"font-size:inherit;min-height:20px;padding:4px%207.5px%204px%203.75px",".choices[data-type*='select-one'] .choices__inner":"padding-bottom:4px",".choices__list--dropdown .choices__item":"font-size:inherit"};var $0={disable_theme_rules:!1,label_bold:!1,object_panel_default:!0,object_indent:!0,object_border:!1,table_border:!1,table_hdiv:!1,table_zebrastyle:!1,input_size:"small",enable_compact:!1},pp=(function(a){function r(e){return(function(t,o){if(!(t instanceof o))throw new TypeError("Cannot call a class as a function")})(this,r),A0(this,r,[e,$0])}return(function(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&$u(e,t)})(r,a),n=r,(l=[{key:"getOptInSwitch",value:function(e){var t=this.getHiddenLabel(e+" opt-in");t.setAttribute("for",e+"-opt-in");var o=document.createElement("label");o.classList.add("switch");var c=document.createElement("input");c.setAttribute("type","checkbox"),c.setAttribute("id",e+"-opt-in"),c.classList.add("json-editor-opt-in");var _=document.createElement("span");_.classList.add("switch-slider","round");var C=document.createElement("span");return C.classList.add("sr-only"),C.textContent=e+"-opt-in",o.appendChild(C),o.appendChild(c),o.appendChild(_),{label:t,checkbox:c,container:o}}},{key:"getGridContainer",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-col","w-full"),this.options.object_indent||e.classList.add("je-noindent"),e}},{key:"getGridRow",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-wrap","w-full"),e}},{key:"getGridColumn",value:function(){var e=document.createElement("div");return e.classList.add("flex","flex-col"),e}},{key:"setGridColumnSize",value:function(e,t,o){t>0&&t<12?e.classList.add("w-".concat(t,"/12"),"px-1"):e.classList.add("w-full","px-1"),o&&(e.style.marginLeft="".concat(100/12*o,"%"))}},{key:"getIndentedPanel",value:function(){var e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","p-1"):e.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getTopIndentedPanel",value:function(){var e=document.createElement("div");return this.options.object_panel_default?e.classList.add("w-full","m-2"):e.classList.add("relative","flex","flex-col","rounded","break-words","border","bg-white","border-0","border-blue-400","p-1","shadow-md"),this.options.object_border&&e.classList.add("je-border"),e}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(e,t){var o=Rt(yt(r.prototype),"getSelectInput",this).call(this,e);return t?o.classList.add("form-multiselect","block","py-0","h-auto","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"):o.classList.add("form-select","block","py-0","h-6","w-full","px-1","text-sm","text-black","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&o.classList.add("compact"),o}},{key:"afterInputReady",value:function(e){e.controlgroup||(e.controlgroup=this.closest(e,".form-group"),this.closest(e,".compact")&&(e.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var e=Rt(yt(r.prototype),"getTextareaInput",this).call(this);return e.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e.style.height=0,e}},{key:"getRangeInput",value:function(e,t,o){var c=this.getFormInputField("range");return c.classList.add("slider"),this.options.enable_compact&&c.classList.add("compact"),c.setAttribute("oninput",'this.setAttribute("value", this.value)'),c.setAttribute("min",e),c.setAttribute("max",t),c.setAttribute("step",o),c}},{key:"getRangeControl",value:function(e,t){var o=Rt(yt(r.prototype),"getRangeControl",this).call(this,e,t);return o.classList.add("text-center","text-black"),o}},{key:"getCheckbox",value:function(){var e=this.getFormInputField("checkbox");return e.classList.add("form-checkbox","text-red-600"),e}},{key:"getCheckboxLabel",value:function(e,t){var o=Rt(yt(r.prototype),"getCheckboxLabel",this).call(this,e,t);return o.classList.add("inline-flex","items-center"),o}},{key:"getFormCheckboxControl",value:function(e,t,o){return e.insertBefore(t,e.firstChild),o&&e.classList.add("inline-flex flex-row"),e}},{key:"getMultiCheckboxHolder",value:function(e,t,o,c){var _=Rt(yt(r.prototype),"getMultiCheckboxHolder",this).call(this,e,t,o,c);return _.classList.add("inline-flex","flex-col"),_}},{key:"getFormRadio",value:function(e){var t=this.getFormInputField("radio");for(var o in t.classList.add("form-radio","text-red-600"),e)t.setAttribute(o,e[o]);return t}},{key:"getFormRadioLabel",value:function(e,t){var o=Rt(yt(r.prototype),"getFormRadioLabel",this).call(this,e,t);return o.classList.add("inline-flex","items-center","mr-2"),o}},{key:"getFormRadioControl",value:function(e,t,o){return e.insertBefore(t,e.firstChild),o&&e.classList.add("form-radio"),e}},{key:"getRadioHolder",value:function(e,t,o,c,_){var C=Rt(yt(r.prototype),"getRadioHolder",this).call(this,t,o,c,_);return e.options.layout==="h"?C.classList.add("inline-flex","flex-row"):C.classList.add("inline-flex","flex-col"),C}},{key:"getFormInputLabel",value:function(e,t){var o=Rt(yt(r.prototype),"getFormInputLabel",this).call(this,e,t);return this.options.label_bold?o.classList.add("font-bold"):o.classList.add("required"),o}},{key:"getFormInputField",value:function(e){var t=Rt(yt(r.prototype),"getFormInputField",this).call(this,e);return["checkbox","radio"].includes(e)||t.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t}},{key:"getFormInputDescription",value:function(e){var t=document.createElement("p");return t.classList.add("block","mt-1","text-xs"),window.DOMPurify?t.innerHTML=window.DOMPurify.sanitize(e):t.textContent=this.cleanText(e),t}},{key:"getFormControl",value:function(e,t,o,c){var _=document.createElement("div");return _.classList.add("form-group","mb-1","w-full"),e&&(e.classList.add("text-xs"),t.type==="checkbox"&&(t.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormCheckboxControl(e,t,!1,c)),t.type==="radio"&&(t.classList.add("form-radio","text-red-600","mr-1"),e.classList.add("items-center","flex"),e=this.getFormRadioControl(e,t,!1,c)),_.appendChild(e),!["checkbox","radio"].includes(t.type)&&c&&_.appendChild(c)),["checkbox","radio"].includes(t.type)||(this.options.input_size==="small"?t.classList.add("text-xs"):this.options.input_size==="normal"?t.classList.add("text-base"):this.options.input_size==="large"&&t.classList.add("text-xl"),_.appendChild(t)),o&&_.appendChild(o),_}},{key:"getHeaderButtonHolder",value:function(){var e=this.getButtonHolder();return e.classList.add("text-sm"),e}},{key:"getButtonHolder",value:function(){var e=document.createElement("div");return e.classList.add("flex","relative","inline-flex","align-middle"),e}},{key:"getButton",value:function(e,t,o){var c=Rt(yt(r.prototype),"getButton",this).call(this,e,t,o);return c.classList.add("inline-block","align-middle","text-center","text-sm","bg-blue-700","text-white","py-1","pr-1","m-2","shadow","select-none","whitespace-no-wrap","rounded"),c}},{key:"getInfoButton",value:function(e){var t=document.createElement("a");t.classList.add("tooltips","float-right"),t.innerHTML="ⓘ";var o=document.createElement("span");return o.innerHTML=e,t.appendChild(o),t}},{key:"getTable",value:function(){var e=Rt(yt(r.prototype),"getTable",this).call(this);return this.options.table_border?e.classList.add("je-table-border"):e.classList.add("table","border","p-0"),e}},{key:"getTableRow",value:function(){var e=Rt(yt(r.prototype),"getTableRow",this).call(this);return this.options.table_border&&e.classList.add("je-table-border"),this.options.table_zebrastyle&&e.classList.add("je-table-zebra"),e}},{key:"getTableHeaderCell",value:function(e){var t=Rt(yt(r.prototype),"getTableHeaderCell",this).call(this,e);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("text-xs","border","p-0","m-0"),t}},{key:"getTableCell",value:function(){var e=Rt(yt(r.prototype),"getTableCell",this).call(this);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("border-0","p-0","m-0"),e}},{key:"addInputError",value:function(e,t){e.controlgroup&&(e.controlgroup.classList.add("has-error"),e.controlgroup.classList.add("text-red-600"),e.errmsg?e.errmsg.style.display="":(e.errmsg=document.createElement("p"),e.errmsg.classList.add("block","mt-1","text-xs","text-red"),e.controlgroup.appendChild(e.errmsg)),e.errmsg.textContent=t)}},{key:"removeInputError",value:function(e){e.errmsg&&(e.errmsg.style.display="none",e.controlgroup.classList.remove("text-red-600"),e.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(e){var t=document.createElement("div"),o=e===void 0?"":e;return t.innerHTML="<div class='w-2/12' id='".concat(o,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(o,"'></div>"),t.classList.add("flex"),t}},{key:"addTab",value:function(e,t){e.children[0].children[0].appendChild(t)}},{key:"getTopTabHolder",value:function(e){var t=e===void 0?"":e,o=document.createElement("div");return o.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(t,"'></ul><div class='p-6 block' id='").concat(t,"'></div>"),o}},{key:"getTab",value:function(e,t){var o=document.createElement("li");o.classList.add("nav-item","flex-col","text-center","text-white","bg-blue-500","shadow-md","border","p-2","mb-2","mr-2","hover:bg-blue-400","rounded");var c=document.createElement("a");return c.classList.add("nav-link","text-center"),c.setAttribute("href","#".concat(t)),c.setAttribute("data-toggle","tab"),c.appendChild(e),o.appendChild(c),o}},{key:"getTopTab",value:function(e,t){var o=document.createElement("li");o.classList.add("nav-item","flex","border-l","border-t","border-r");var c=document.createElement("a");return c.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),c.setAttribute("href","#".concat(t)),c.setAttribute("data-toggle","tab"),c.appendChild(e),o.appendChild(c),o}},{key:"getTabContent",value:function(){var e=document.createElement("div");return e.setAttribute("role","tabpanel"),e}},{key:"getTopTabContent",value:function(){var e=document.createElement("div");return e.setAttribute("role","tabpanel"),e}},{key:"markTabActive",value:function(e){e.tab.firstChild.classList.add("block"),e.tab.firstChild.classList.contains("border-b")===!0?(e.tab.firstChild.classList.add("border-b-0"),e.tab.firstChild.classList.remove("border-b")):e.tab.firstChild.classList.add("border-b-0"),e.container.classList.contains("hidden")===!0&&e.container.classList.remove("hidden"),e.container.classList.add("block")}},{key:"markTabInactive",value:function(e){e.tab.firstChild.classList.contains("border-b-0")===!0?(e.tab.firstChild.classList.add("border-b"),e.tab.firstChild.classList.remove("border-b-0")):e.tab.firstChild.classList.add("border-b"),e.container.classList.contains("block")===!0&&(e.container.classList.remove("block"),e.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var e=document.createElement("div");e.classList.add("progress");var t=document.createElement("div");return t.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),t.setAttribute("role","progressbar"),t.setAttribute("aria-valuenow",0),t.setAttribute("aria-valuemin",0),t.setAttribute("aria-valuenax",100),t.innerHTML="".concat(0,"%"),e.appendChild(t),e}},{key:"updateProgressBar",value:function(e,t){if(e){var o=e.firstChild,c="".concat(t,"%");o.setAttribute("aria-valuenow",t),o.style.width=c,o.innerHTML=c}}},{key:"updateProgressBarUnknown",value:function(e){if(e){var t=e.firstChild;e.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),t.removeAttribute("aria-valuenow"),t.classList.add("w-full"),t.innerHTML=""}}},{key:"getInputGroup",value:function(e,t){if(e){var o=document.createElement("div");o.classList.add("relative","items-stretch","w-full"),o.appendChild(e);var c=document.createElement("div");c.classList.add("-mr-1"),o.appendChild(c);for(var _=0;_<t.length;_++)c.appendChild(t[_]);return o}}}])&&R0(n.prototype,l),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,l})(Xr);pp.rules={".slider":"-webkit-appearance:none;-moz-appearance:none;appearance:none;background:transparent;display:block;border:none;height:1.2rem;width:100%25",".slider:focus":"box-shadow:0%200%200%200%20rgba(87%2C%2085%2C%20217%2C%200.2);outline:none",".slider.tooltip:not([data-tooltip])::after":"content:attr(value)",".slider::-webkit-slider-thumb":"-webkit-appearance:none;background:%23f17405;border-radius:100%25;height:0.6rem;margin-top:-0.25rem;transition:transform%200.2s;width:0.6rem",".slider:active::-webkit-slider-thumb":"transform:scale(1.25);outline:none",".slider::-webkit-slider-runnable-track":"background:%23b2b4b6;border-radius:0.1rem;height:0.1rem;width:100%25","a.tooltips":"position:relative;display:inline","a.tooltips span":"position:absolute;white-space:nowrap;width:auto;padding-left:1rem;padding-right:1rem;color:%23ffffff;background:rgba(56%2C%2056%2C%2056%2C%200.85);height:1.5rem;line-height:1.5rem;text-align:center;visibility:hidden;border-radius:3px","a.tooltips span:after":"content:%22%22;position:absolute;top:50%25;left:100%25;margin-top:-5px;width:0;height:0;border-left:5px%20solid%20rgba(56%2C%2056%2C%2056%2C%200.85);border-top:5px%20solid%20transparent;border-bottom:5px%20solid%20transparent","a:hover.tooltips span":"visibility:visible;opacity:0.9;font-size:0.8rem;right:100%25;top:50%25;margin-top:-12px;margin-right:10px;z-index:999",".json-editor-btntype-properties + div":"font-size:0.8rem;font-weight:normal",textarea:"width:100%25;min-height:2rem;resize:vertical",table:"width:100%25;border-collapse:collapse",".table td":"padding:0rem%200rem","div[data-schematype]:not([data-schematype='object'])":"transition:0.5s","div[data-schematype]:not([data-schematype='object']):hover":"background-color:%23e6f4fe","div[data-schemaid='root']":"position:relative;width:inherit;display:inherit;overflow-x:hidden;z-index:10","select[multiple]":"height:auto","select[multiple].from-select":"height:auto",".je-table-zebra:nth-child(even)":"background-color:%23f2f2f2",".je-table-border":"border:0.5px%20solid%20black",".je-table-hdiv":"border-bottom:1px%20solid%20black",".je-border":"border:0.05rem%20solid%20%233182ce",".je-panel":"width:inherit;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-panel-top":"width:100%25;padding:0.2rem;margin:0.2rem;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".required:after":"content:%22%20*%22;color:red;font:inherit;font-weight:bold",".je-desc":"font-size:smaller;margin:0.2rem%200",".container-xl.je-noindent":"padding-left:0;padding-right:0",".json-editor-btntype-add":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%234299e1;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deletelast":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23e53e3e;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-deleteall":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%23000000;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-save":"float:right;color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btn-back":"color:white;margin:0.3rem;padding:0.3rem%200.8rem;background-color:%232b6cb0;box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-webkit-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2);-moz-box-shadow:3px%203px%205px%201px%20rgba(4%2C%204%2C%204%2C%200.2)",".json-editor-btntype-delete":"color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btntype-move":"color:%23000000;background-color:rgba(218%2C%20222%2C%20228%2C%200.1);margin:0.03rem;padding:0.1rem",".json-editor-btn-collapse":"padding:0em%200.8rem;font-size:1.3rem;color:%23e53e3e;background-color:rgba(218%2C%20222%2C%20228%2C%200.1)",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-dropzone":"position:relative;margin:0.5rem%200;border:2px%20dashed%20black;width:100%25;height:60px;background:teal;transition:all%200.5s",".je-dropzone:before":"position:absolute;content:attr(data-text);color:rgba(0%2C%200%2C%200%2C%200.6);left:50%25;top:50%25;transform:translate(-50%25%2C%20-50%25)",".je-dropzone.valid-dropzone":"background:green",".je-dropzone.invalid-dropzone":"background:red",".switch":"position:relative;display:inline-block;width:28px;height:16px;margin-right:10px",".switch input":"opacity:0;width:0;height:0",".switch-slider":"position:absolute;cursor:pointer;top:0;left:0;right:0;bottom:0;background-color:%23ccc;transition:.1s;border-radius:34px",".switch-slider:before":"position:absolute;content:%22%22;height:12px;width:12px;left:1px;top:2px;background-color:white;transition:.1s;border-radius:50%25","input:checked + .switch-slider":"background-color:%232196F3","input:focus + .switch-slider":"box-shadow:0%200%201px%20%232196F3","input:checked + .switch-slider:before":"transform:translateX(12px)","input:disabled + .switch-slider":"opacity:0.5"};var I0={html:ep,bootstrap3:rp,bootstrap4:ip,bootstrap5:sp,jqueryui:lp,barebones:cp,spectre:hp,tailwind:pp};const N0={".table-responsive .autocomplete-result-list":"position:relative%20!important",".je-float-right-linkholder":"float:right;margin-left:10px",".je-modal":"background-color:white;border:1px%20solid%20black;box-shadow:3px%203px%20black;position:absolute;z-index:10",".je-infobutton-icon":"font-size:16px;font-weight:bold;padding:0.25rem;position:relative;display:inline-block",".je-infobutton-tooltip":"font-size:12px;font-weight:normal;font-family:sans-serif;visibility:hidden;background-color:rgba(50%2C%2050%2C%2050%2C%200.75);margin:0%200.25rem;color:%23fafafa;padding:0.5rem%201rem;border-radius:0.25rem;width:20rem;position:absolute",".je-not-loaded":"pointer-events:none",".je-header":"display:inline-block",".je-upload-preview img":"float:left;margin:0%200.5rem%200.5rem%200;max-width:100%25;max-height:5rem",".je-checkbox":"display:inline-block;width:auto",".je-checkbox-control--compact":"display:inline-block;margin-right:1rem",".je-radio":"display:inline-block;width:auto",".je-radio-control--compact":"display:inline-block;margin-right:1rem",".je-switcher":"background-color:transparent;display:inline-block;font-style:italic;font-weight:normal;height:auto;width:auto;margin-bottom:0;margin-left:5px;padding:0%200%200%203px",".je-textarea":"width:100%25;height:300px;box-sizing:border-box",".je-range-control":"text-align:center",".je-indented-panel":"padding-left:10px;margin-left:10px;border-left:1px%20solid%20%23ccc",".je-indented-panel--top":"padding-left:10px;margin-left:10px",".je-tabholder":"float:left;width:130px",".je-tabholder .content":"margin-left:120px",".je-tabholder--top":"margin-left:10px",".je-tabholder--clear":"clear:both",".je-tab":"border:1px%20solid%20%23ccc;border-width:1px%200%201px%201px;text-align:center;line-height:30px;border-radius:5px;border-bottom-right-radius:0;border-top-right-radius:0;font-weight:bold;cursor:pointer",".je-tab--top":"float:left;border:1px%20solid%20%23ccc;border-width:1px%201px%200px%201px;text-align:center;line-height:30px;border-radius:5px;padding-left:5px;padding-right:5px;border-bottom-right-radius:0;border-bottom-left-radius:0;font-weight:bold;cursor:pointer",".je-block-link":"display:block",".je-media":"width:100%25"};function mi(a){return mi=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},mi(a)}function Iu(a,r){(r==null||r>a.length)&&(r=a.length);for(var n=0,l=new Array(r);n<r;n++)l[n]=a[n];return l}function Nu(){Nu=function(){return r};var a,r={},n=Object.prototype,l=n.hasOwnProperty,e=Object.defineProperty||function(W,K,ne){W[K]=ne.value},t=typeof Symbol=="function"?Symbol:{},o=t.iterator||"@@iterator",c=t.asyncIterator||"@@asyncIterator",_=t.toStringTag||"@@toStringTag";function C(W,K,ne){return Object.defineProperty(W,K,{value:ne,enumerable:!0,configurable:!0,writable:!0}),W[K]}try{C({},"")}catch{C=function(K,ne,we){return K[ne]=we}}function $(W,K,ne,we){var de=K&&K.prototype instanceof je?K:je,Pe=Object.create(de.prototype),Me=new Br(we||[]);return e(Pe,"_invoke",{value:Dt(W,ne,Me)}),Pe}function B(W,K,ne){try{return{type:"normal",arg:W.call(K,ne)}}catch(we){return{type:"throw",arg:we}}}r.wrap=$;var z="suspendedStart",Y="suspendedYield",Q="executing",se="completed",pe={};function je(){}function Se(){}function Re(){}var Ie={};C(Ie,o,(function(){return this}));var Ve=Object.getPrototypeOf,_e=Ve&&Ve(Ve(Bt([])));_e&&_e!==n&&l.call(_e,o)&&(Ie=_e);var Ee=Re.prototype=je.prototype=Object.create(Ie);function Ge(W){["next","throw","return"].forEach((function(K){C(W,K,(function(ne){return this._invoke(K,ne)}))}))}function st(W,K){function ne(de,Pe,Me,at){var lt=B(W[de],W,Pe);if(lt.type!=="throw"){var Yt=lt.arg,gr=Yt.value;return gr&&mi(gr)=="object"&&l.call(gr,"__await")?K.resolve(gr.__await).then((function(Ft){ne("next",Ft,Me,at)}),(function(Ft){ne("throw",Ft,Me,at)})):K.resolve(gr).then((function(Ft){Yt.value=Ft,Me(Yt)}),(function(Ft){return ne("throw",Ft,Me,at)}))}at(lt.arg)}var we;e(this,"_invoke",{value:function(de,Pe){function Me(){return new K((function(at,lt){ne(de,Pe,at,lt)}))}return we=we?we.then(Me,Me):Me()}})}function Dt(W,K,ne){var we=z;return function(de,Pe){if(we===Q)throw Error("Generator is already running");if(we===se){if(de==="throw")throw Pe;return{value:a,done:!0}}for(ne.method=de,ne.arg=Pe;;){var Me=ne.delegate;if(Me){var at=Ln(Me,ne);if(at){if(at===pe)continue;return at}}if(ne.method==="next")ne.sent=ne._sent=ne.arg;else if(ne.method==="throw"){if(we===z)throw we=se,ne.arg;ne.dispatchException(ne.arg)}else ne.method==="return"&&ne.abrupt("return",ne.arg);we=Q;var lt=B(W,K,ne);if(lt.type==="normal"){if(we=ne.done?se:Y,lt.arg===pe)continue;return{value:lt.arg,done:ne.done}}lt.type==="throw"&&(we=se,ne.method="throw",ne.arg=lt.arg)}}}function Ln(W,K){var ne=K.method,we=W.iterator[ne];if(we===a)return K.delegate=null,ne==="throw"&&W.iterator.return&&(K.method="return",K.arg=a,Ln(W,K),K.method==="throw")||ne!=="return"&&(K.method="throw",K.arg=new TypeError("The iterator does not provide a '"+ne+"' method")),pe;var de=B(we,W.iterator,K.arg);if(de.type==="throw")return K.method="throw",K.arg=de.arg,K.delegate=null,pe;var Pe=de.arg;return Pe?Pe.done?(K[W.resultName]=Pe.value,K.next=W.nextLoc,K.method!=="return"&&(K.method="next",K.arg=a),K.delegate=null,pe):Pe:(K.method="throw",K.arg=new TypeError("iterator result is not an object"),K.delegate=null,pe)}function vo(W){var K={tryLoc:W[0]};1 in W&&(K.catchLoc=W[1]),2 in W&&(K.finallyLoc=W[2],K.afterLoc=W[3]),this.tryEntries.push(K)}function Te(W){var K=W.completion||{};K.type="normal",delete K.arg,W.completion=K}function Br(W){this.tryEntries=[{tryLoc:"root"}],W.forEach(vo,this),this.reset(!0)}function Bt(W){if(W||W===""){var K=W[o];if(K)return K.call(W);if(typeof W.next=="function")return W;if(!isNaN(W.length)){var ne=-1,we=function de(){for(;++ne<W.length;)if(l.call(W,ne))return de.value=W[ne],de.done=!1,de;return de.value=a,de.done=!0,de};return we.next=we}}throw new TypeError(mi(W)+" is not iterable")}return Se.prototype=Re,e(Ee,"constructor",{value:Re,configurable:!0}),e(Re,"constructor",{value:Se,configurable:!0}),Se.displayName=C(Re,_,"GeneratorFunction"),r.isGeneratorFunction=function(W){var K=typeof W=="function"&&W.constructor;return!!K&&(K===Se||(K.displayName||K.name)==="GeneratorFunction")},r.mark=function(W){return Object.setPrototypeOf?Object.setPrototypeOf(W,Re):(W.__proto__=Re,C(W,_,"GeneratorFunction")),W.prototype=Object.create(Ee),W},r.awrap=function(W){return{__await:W}},Ge(st.prototype),C(st.prototype,c,(function(){return this})),r.AsyncIterator=st,r.async=function(W,K,ne,we,de){de===void 0&&(de=Promise);var Pe=new st($(W,K,ne,we),de);return r.isGeneratorFunction(K)?Pe:Pe.next().then((function(Me){return Me.done?Me.value:Pe.next()}))},Ge(Ee),C(Ee,_,"Generator"),C(Ee,o,(function(){return this})),C(Ee,"toString",(function(){return"[object Generator]"})),r.keys=function(W){var K=Object(W),ne=[];for(var we in K)ne.push(we);return ne.reverse(),function de(){for(;ne.length;){var Pe=ne.pop();if(Pe in K)return de.value=Pe,de.done=!1,de}return de.done=!0,de}},r.values=Bt,Br.prototype={constructor:Br,reset:function(W){if(this.prev=0,this.next=0,this.sent=this._sent=a,this.done=!1,this.delegate=null,this.method="next",this.arg=a,this.tryEntries.forEach(Te),!W)for(var K in this)K.charAt(0)==="t"&&l.call(this,K)&&!isNaN(+K.slice(1))&&(this[K]=a)},stop:function(){this.done=!0;var W=this.tryEntries[0].completion;if(W.type==="throw")throw W.arg;return this.rval},dispatchException:function(W){if(this.done)throw W;var K=this;function ne(lt,Yt){return Pe.type="throw",Pe.arg=W,K.next=lt,Yt&&(K.method="next",K.arg=a),!!Yt}for(var we=this.tryEntries.length-1;we>=0;--we){var de=this.tryEntries[we],Pe=de.completion;if(de.tryLoc==="root")return ne("end");if(de.tryLoc<=this.prev){var Me=l.call(de,"catchLoc"),at=l.call(de,"finallyLoc");if(Me&&at){if(this.prev<de.catchLoc)return ne(de.catchLoc,!0);if(this.prev<de.finallyLoc)return ne(de.finallyLoc)}else if(Me){if(this.prev<de.catchLoc)return ne(de.catchLoc,!0)}else{if(!at)throw Error("try statement without catch or finally");if(this.prev<de.finallyLoc)return ne(de.finallyLoc)}}}},abrupt:function(W,K){for(var ne=this.tryEntries.length-1;ne>=0;--ne){var we=this.tryEntries[ne];if(we.tryLoc<=this.prev&&l.call(we,"finallyLoc")&&this.prev<we.finallyLoc){var de=we;break}}de&&(W==="break"||W==="continue")&&de.tryLoc<=K&&K<=de.finallyLoc&&(de=null);var Pe=de?de.completion:{};return Pe.type=W,Pe.arg=K,de?(this.method="next",this.next=de.finallyLoc,pe):this.complete(Pe)},complete:function(W,K){if(W.type==="throw")throw W.arg;return W.type==="break"||W.type==="continue"?this.next=W.arg:W.type==="return"?(this.rval=this.arg=W.arg,this.method="return",this.next="end"):W.type==="normal"&&K&&(this.next=K),pe},finish:function(W){for(var K=this.tryEntries.length-1;K>=0;--K){var ne=this.tryEntries[K];if(ne.finallyLoc===W)return this.complete(ne.completion,ne.afterLoc),Te(ne),pe}},catch:function(W){for(var K=this.tryEntries.length-1;K>=0;--K){var ne=this.tryEntries[K];if(ne.tryLoc===W){var we=ne.completion;if(we.type==="throw"){var de=we.arg;Te(ne)}return de}}throw Error("illegal catch attempt")},delegateYield:function(W,K,ne){return this.delegate={iterator:Bt(W),resultName:K,nextLoc:ne},this.method==="next"&&(this.arg=a),pe}},r}function mp(a,r,n,l,e,t,o){try{var c=a[t](o),_=c.value}catch(C){return void n(C)}c.done?r(_):Promise.resolve(_).then(l,e)}function D0(a,r){for(var n=0;n<r.length;n++){var l=r[n];l.enumerable=l.enumerable||!1,l.configurable=!0,"value"in l&&(l.writable=!0),Object.defineProperty(a,B0(l.key),l)}}function B0(a){var r=(function(n,l){if(mi(n)!="object"||!n)return n;var e=n[Symbol.toPrimitive];if(e!==void 0){var t=e.call(n,"string");if(mi(t)!="object")return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)})(a);return mi(r)=="symbol"?r:r+""}var tn=(function(){function a(t){var o=this,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if((function(Q,se){if(!(Q instanceof se))throw new TypeError("Cannot call a class as a function")})(this,a),!(t instanceof Element))throw new Error("element should be an instance of Element");this.element=t,this.options=v({},a.defaults.options,c),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||a.defaults.translate,this.translateProperty=this.options.translateProperty||a.defaults.translateProperty,this.uuid=0,this.__data={};var _=this.options.theme||a.defaults.theme,C=a.defaults.themes[_];if(!C)throw new Error("Unknown theme ".concat(_));this.element.setAttribute("data-theme",_),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new C(this);var $=v(N0,this.getEditorsRules()),B=function(Q,se,pe){return pe?o.addNewStyleRulesToShadowRoot(Q,se,pe):o.addNewStyleRules(Q,se)};if(!this.theme.options.disable_theme_rules){var z=k(this.element);B("default",$,z),C.rules!==void 0&&B(_,C.rules,z)}var Y=a.defaults.iconlibs[this.options.iconlib||a.defaults.iconlib];Y&&(this.iconlib=new Y),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}return r=a,n=[{key:"load",value:(l=Nu().mark((function t(){var o,c,_,C,$,B,z=this;return Nu().wrap((function(Y){for(;;)switch(Y.prev=Y.next){case 0:return o=document.location.origin+document.location.pathname.toString(),(c=new T_(this.options)).onSchemaLoaded=function(Q){z.trigger("schemaLoaded",Q)},c.onAllSchemasLoaded=function(){z.trigger("allSchemasLoaded")},this.expandSchema=function(Q){return c.expandSchema(Q)},this.expandRefs=function(Q,se){return c.expandRefs(Q,se)},_=document.location.toString(),Y.next=9,c.load(this.schema,o,_);case 9:C=Y.sent,$=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new bf(this,null,$,a.defaults),B=this.getEditorClass(C),this.root=this.createEditor(B,{jsoneditor:this,schema:C,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),E(this.options,"startval")&&this.root.setValue(this.options.startval),this.validation_results=this.validator.validate(this.root.getValue()),this.root.showValidationErrors(this.validation_results),this.ready=!0,this.element.classList.remove("je-not-loaded"),this.element.classList.add("je-ready"),window.requestAnimationFrame((function(){z.ready&&(z.validation_results=z.validator.validate(z.root.getValue()),z.root.showValidationErrors(z.validation_results),z.trigger("ready"),z.trigger("change"))}));case 24:case"end":return Y.stop()}}),t,this)})),e=function(){var t=this,o=arguments;return new Promise((function(c,_){var C=l.apply(t,o);function $(z){mp(C,c,_,$,B,"next",z)}function B(z){mp(C,c,_,$,B,"throw",z)}$(void 0)}))},function(){return e.apply(this,arguments)})},{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.getValue()}},{key:"setValue",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return this.root.setValue(t),this}},{key:"validate",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Make sure the load method is complete");return arguments.length===1?this.validator.validate(t):this.validation_results}},{key:"destroy",value:function(){this.destroyed||this.ready&&(this.schema=null,this.options=null,this.root.destroy(),this.root=null,this.root_container=null,this.validator=null,this.validation_results=null,this.theme=null,this.iconlib=null,this.template=null,this.__data=null,this.ready=!1,this.element.innerHTML="",this.element.removeAttribute("data-theme"),this.destroyed=!0)}},{key:"on",value:function(t,o){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(o),this}},{key:"off",value:function(t,o){if(t&&o){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var c=[],_=0;_<this.callbacks[t].length;_++)this.callbacks[t][_]!==o&&c.push(this.callbacks[t][_]);this.callbacks[t]=c}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,o){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var c=0;c<this.callbacks[t].length;c++)this.callbacks[t][c].apply(this,[o]);return this}},{key:"setOption",value:function(t,o){if(t!=="show_errors")throw new Error("Option ".concat(t," must be set during instantiation and cannot be changed later"));return this.options.show_errors=o,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(a.defaults.editors).reduce((function(t,o){return o.rules?v(t,o.rules):t}),{})}},{key:"getEditorClass",value:function(t){var o,c=this;if(t=this.expandSchema(t),a.defaults.resolvers.find((function(_){return(o=_(t,c))&&a.defaults.editors[o]})),!o)throw new Error("Unknown editor for schema ".concat(JSON.stringify(t)));if(!a.defaults.editors[o])throw new Error("Unknown editor ".concat(o));return a.defaults.editors[o]}},{key:"createEditor",value:function(t,o){var c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1;return new t(o=v({},t.options||{},o),a.defaults,c)}},{key:"onChange",value:function(t){var o=this;if(this.ready&&(t&&this.trigger(t.event,t.data),!this.firing_change))return this.firing_change=!0,window.requestAnimationFrame((function(){o.firing_change=!1,o.ready&&(o.validation_results=o.validator.validate(o.root.getValue()),o.options.show_errors!=="never"?o.root.showValidationErrors(o.validation_results):o.root.showValidationErrors([]),o.trigger("change"))})),this}},{key:"compileTemplate",value:function(t){var o,c=arguments.length>1&&arguments[1]!==void 0?arguments[1]:a.defaults.template;if(typeof c=="string"){if(!a.defaults.templates[c])throw new Error("Unknown template engine ".concat(c));if(!(o=a.defaults.templates[c]()))throw new Error("Template engine ".concat(c," missing required library."))}else o=c;if(!o)throw new Error("No template engine set");if(!o.compile)throw new Error("Invalid template engine set");return o.compile(t)}},{key:"_data",value:function(t,o,c){if(arguments.length!==3)return t.hasAttribute("data-jsoneditor-".concat(o))?this.__data[t.getAttribute("data-jsoneditor-".concat(o))]:null;var _;t.hasAttribute("data-jsoneditor-".concat(o))?_=t.getAttribute("data-jsoneditor-".concat(o)):(_=this.uuid++,t.setAttribute("data-jsoneditor-".concat(o),_)),this.__data[_]=c}},{key:"registerEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=t,this}},{key:"unregisterEditor",value:function(t){return this.editors=this.editors||{},this.editors[t.path]=null,this}},{key:"getEditor",value:function(t){if(this.editors)return this.editors[t]}},{key:"watch",value:function(t,o){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(o),this}},{key:"unwatch",value:function(t,o){if(!this.watchlist||!this.watchlist[t])return this;if(!o)return this.watchlist[t]=null,this;for(var c=[],_=0;_<this.watchlist[t].length;_++)this.watchlist[t][_]!==o&&c.push(this.watchlist[t][_]);return this.watchlist[t]=c.length?c:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var o=0;o<this.watchlist[t].length;o++)this.watchlist[t][o]()}},{key:"isEnabled",value:function(){return!this.root||this.root.isEnabled()}},{key:"enable",value:function(){this.root.enable()}},{key:"disable",value:function(){this.root.disable()}},{key:"setCopyClipboardContents",value:function(t){this.copyClipboard=t}},{key:"getCopyClipboardContents",value:function(){return this.copyClipboard}},{key:"addNewStyleRules",value:function(t,o){var c=document.querySelector("#theme-".concat(t));c||((c=document.createElement("style")).setAttribute("id","theme-".concat(t)),c.appendChild(document.createTextNode("")),document.head.appendChild(c));for(var _=c.sheet?c.sheet:c.styleSheet,C=this.element.nodeName.toLowerCase();_.cssRules.length>0;)_.deleteRule(0);Object.keys(o).forEach((function($){var B=t==="default"?$:"".concat(C,'[data-theme="').concat(t,'"] ').concat($);_.insertRule?_.insertRule(B+" {"+decodeURIComponent(o[$])+"}",0):_.addRule&&_.addRule(B,decodeURIComponent(o[$]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,o,c){var _=this.element.nodeName.toLowerCase(),C="";Object.keys(o).forEach((function(z){var Y=t==="default"?z:"".concat(_,'[data-theme="').concat(t,'"] ').concat(z);C+=Y+" {"+decodeURIComponent(o[z])+`}
28
+ `}));var $,B=new CSSStyleSheet;B.replaceSync(C),c.adoptedStyleSheets=[].concat((function(z){if(Array.isArray(z))return Iu(z)})($=c.adoptedStyleSheets)||(function(z){if(typeof Symbol<"u"&&z[Symbol.iterator]!=null||z["@@iterator"]!=null)return Array.from(z)})($)||(function(z,Y){if(z){if(typeof z=="string")return Iu(z,Y);var Q=Object.prototype.toString.call(z).slice(8,-1);return Q==="Object"&&z.constructor&&(Q=z.constructor.name),Q==="Map"||Q==="Set"?Array.from(z):Q==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(Q)?Iu(z,Y):void 0}})($)||(function(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
29
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)})(),[B])}},{key:"showValidationErrors",value:function(t){var o=t??this.validate();Object.values(this.editors).forEach((function(c){c&&(c.is_dirty=!0,c.showValidationErrors(o))}))}}],n&&D0(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n,l,e})();tn.defaults=li,tn.AbstractEditor=D,tn.AbstractTheme=Xr,tn.AbstractIconLib=Qr,Object.assign(tn.defaults.themes,I0),Object.assign(tn.defaults.editors,Ea),Object.assign(tn.defaults.templates,R_),Object.assign(tn.defaults.iconlibs,i0)})(),w})()))})(xl)),xl.exports}var lb=ab(),ub=hn("<li> </li>"),cb=hn('<div class="data-error svelte-1jdjhi">Errors : <ul></ul></div>'),db=hn('<div class="editor-json"></div> <!>',1);const hb={hash:"svelte-1jdjhi",code:".data-error.svelte-1jdjhi{color:coral;}"};function Gh(s,u){hl(u,!0),tb(s,hb);let f=Io(u,"schema",7),m=Io(u,"data",15),b=Io(u,"data_valid",15),w=Io(u,"editor_options",23,()=>({})),d=zt(null),y=zt(null),i=zt(null),h={theme:"html",titleHidden:!0,disable_collapse:!0,disable_edit_json:!1,disable_properties:!0,use_default_values:!0,disable_array_delete_last_row:!0,disable_array_reorder:!0,array_controls_top:!1,expand_height:!0};const p=()=>{if(qe(d)){const x={...h,...w(),schema:f()};vt(y,new lb.JSONEditor(qe(d),x),!0),qe(y).on("ready",()=>{m()&&qe(y).setValue(m())}),qe(y).on("change",()=>{const S=qe(y).validate();console.log(S),b(S.length===0),b()?(m(qe(y).getValue()),vt(i,null)):vt(i,S,!0)})}else console.error("Container element still null")};Bh(async()=>{setTimeout(p,100)});var g={get schema(){return f()},set schema(x){f(x),Ci()},get data(){return m()},set data(x){m(x),Ci()},get data_valid(){return b()},set data_valid(x){b(x),Ci()},get editor_options(){return w()},set editor_options(x={}){w(x),Ci()}},v=db(),j=la(v);rb(j,x=>vt(d,x),()=>qe(d));var k=cn(j,2);{var E=x=>{var S=cb(),P=cn(un(S));qh(P,21,()=>qe(i),Fh,(L,T)=>{var R=ub(),A=un(R);Or(R),_l(()=>fa(A,`${qe(T).path??""}:${qe(T).property??""}:${qe(T).message??""}`)),ar(L,R)}),Or(P),Or(S),ar(x,S)},O=x=>{var S=Uv("Data is valid");ar(x,S)};El(k,x=>{b()?x(O,!1):x(E)})}return ar(s,v),fl(g)}Hh(Gh,{schema:{},data:{},data_valid:{},editor_options:{}},[],[],!0);var fb=hn("<button>Save changes</button>"),pb=hn("<!> <hr/> <!>",1),mb=hn("<tr><td> </td><td> </td><td><button>Copy URL</button> <button>Copy Key</button></td></tr>"),yb=hn('<tr><td colspan="3">No databases yet</td></tr>'),vb=hn('<table border="1"><thead><tr><th>Name</th><th>About</th><th>Actions</th></tr></thead><tbody></tbody></table> <button> </button>',1);function Jh(s,u){hl(u,!0);let f=Io(u,"mode",7,"list"),m=zt(Jn([])),b=zt(!1),w=zt(!0);const d="bbdb-db-list",y={$schema:"http://json-schema.org/draft-07/schema#",type:"array",title:"Databases",minItems:1,items:{type:"object",additionalProperties:!1,properties:{name:{type:"string",minLength:1},url:{type:"string",format:"uri",minLength:1},encryption_key:{type:"string",minLength:1},about:{type:"string",minLength:0}},required:["name","url","encryption_key","about"],additionalProperties:!1},uniqueItems:!0};Bh(()=>{const E=localStorage.getItem(d);E&&vt(m,JSON.parse(E),!0)});const i=()=>{localStorage.setItem(d,JSON.stringify(qe(m))),vt(b,!1)};function h(E){navigator.clipboard.writeText(E)}var p={get mode(){return f()},set mode(E="list"){f(E),Ci()}},g=Gv(),v=la(g);{var j=E=>{var O=pb(),x=la(O);Gh(x,{get schema(){return y},editor_options:{},get data(){return qe(m)},set data(L){vt(m,L,!0)},get data_valid(){return qe(w)},set data_valid(L){vt(w,L,!0)}});var S=cn(x,4);{var P=L=>{var T=fb();T.__click=()=>i(),ar(L,T)};El(S,L=>{qe(w)&&L(P)})}ar(E,O)},k=E=>{var O=vb(),x=la(O),S=cn(un(x));qh(S,21,()=>qe(m),Fh,(T,R)=>{var A=mb(),N=un(A),D=un(N,!0);Or(N);var M=cn(N),q=un(M,!0);Or(M);var J=cn(M),G=un(J);G.__click=()=>h(qe(R).url);var X=cn(G,2);X.__click=()=>h(qe(R).encryption_key),Or(J),Or(A),_l(()=>{fa(D,qe(R).name),fa(q,qe(R).about)}),ar(T,A)},T=>{var R=yb();ar(T,R)}),Or(S),Or(x);var P=cn(x,2);P.__click=()=>vt(b,!qe(b));var L=un(P,!0);Or(P),_l(()=>fa(L,qe(b)?"Cancel Editor mode":"Edit List/ Add new")),ar(E,O)};El(v,E=>{qe(b)?E(j):E(k,!1)})}return ar(s,g),fl(p)}zv(["click"]),customElements.define("db-list",Hh(Jh,{mode:{}},[],[],!0));const bb=Fy;An.BBDB=bb,An.DBList=Jh,Object.defineProperty(An,Symbol.toStringTag,{value:"Module"})}));
30
+ //# sourceMappingURL=main.umd.cjs.map