vizor_forms 1.2.9 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,2 +1,2 @@
1
1
  /*! For license information please see vizor_forms.min.js.LICENSE.txt */
2
- var t={692:t=>{var e;self,e=()=>(()=>{var t={9306:(t,e,n)=>{var i=n(4901),o=n(6823),r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not a function")}},5548:(t,e,n)=>{var i=n(3517),o=n(6823),r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not a constructor")}},3506:(t,e,n)=>{var i=n(3925),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r("Can't set "+o(t)+" as a prototype")}},6469:(t,e,n)=>{var i=n(8227),o=n(2360),r=n(4913).f,s=i("unscopables"),a=Array.prototype;void 0===a[s]&&r(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},7829:(t,e,n)=>{var i=n(8183).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},679:(t,e,n)=>{var i=n(1625),o=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new o("Incorrect invocation")}},8551:(t,e,n)=>{var i=n(34),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not an object")}},235:(t,e,n)=>{var i=n(9213).forEach,o=n(4598)("forEach");t.exports=o?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},7916:(t,e,n)=>{var i=n(6080),o=n(9565),r=n(8981),s=n(6319),a=n(4209),l=n(3517),c=n(6198),u=n(4659),h=n(81),d=n(851),p=Array;t.exports=function(t){var e=r(t),n=l(this),f=arguments.length,m=f>1?arguments[1]:void 0,y=void 0!==m;y&&(m=i(m,f>2?arguments[2]:void 0));var v,b,g,_,w,x,k=d(e),O=0;if(!k||this===p&&a(k))for(v=c(e),b=n?new this(v):p(v);v>O;O++)x=y?m(e[O],O):e[O],u(b,O,x);else for(b=n?new this:[],w=(_=h(e,k)).next;!(g=o(w,_)).done;O++)x=y?s(_,m,[g.value,O],!0):g.value,u(b,O,x);return b.length=O,b}},9617:(t,e,n)=>{var i=n(5397),o=n(5610),r=n(6198),s=function(t){return function(e,n,s){var a=i(e),l=r(a);if(0===l)return!t&&-1;var c,u=o(s,l);if(t&&n!=n){for(;l>u;)if((c=a[u++])!=c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9213:(t,e,n)=>{var i=n(6080),o=n(9504),r=n(7055),s=n(8981),a=n(6198),l=n(1469),c=o([].push),u=function(t){var e=1===t,n=2===t,o=3===t,u=4===t,h=6===t,d=7===t,p=5===t||h;return function(f,m,y,v){for(var b,g,_=s(f),w=r(_),x=a(w),k=i(m,y),O=0,j=v||l,C=e?j(f,x):n||d?j(f,0):void 0;x>O;O++)if((p||O in w)&&(g=k(b=w[O],O,_),t))if(e)C[O]=g;else if(g)switch(t){case 3:return!0;case 5:return b;case 6:return O;case 2:c(C,b)}else switch(t){case 4:return!1;case 7:c(C,b)}return h?-1:o||u?u:C}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},597:(t,e,n)=>{var i=n(9039),o=n(8227),r=n(7388),s=o("species");t.exports=function(t){return r>=51||!i((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4598:(t,e,n)=>{var i=n(9039);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},926:(t,e,n)=>{var i=n(9306),o=n(8981),r=n(7055),s=n(6198),a=TypeError,l="Reduce of empty array with no initial value",c=function(t){return function(e,n,c,u){var h=o(e),d=r(h),p=s(h);if(i(n),0===p&&c<2)throw new a(l);var f=t?p-1:0,m=t?-1:1;if(c<2)for(;;){if(f in d){u=d[f],f+=m;break}if(f+=m,t?f<0:p<=f)throw new a(l)}for(;t?f>=0:p>f;f+=m)f in d&&(u=n(u,d[f],f,h));return u}};t.exports={left:c(!1),right:c(!0)}},4527:(t,e,n)=>{var i=n(3724),o=n(4376),r=TypeError,s=Object.getOwnPropertyDescriptor,a=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!s(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},7680:(t,e,n)=>{var i=n(9504);t.exports=i([].slice)},4488:(t,e,n)=>{var i=n(7680),o=Math.floor,r=function(t,e){var n=t.length;if(n<8)for(var s,a,l=1;l<n;){for(a=l,s=t[l];a&&e(t[a-1],s)>0;)t[a]=t[--a];a!==l++&&(t[a]=s)}else for(var c=o(n/2),u=r(i(t,0,c),e),h=r(i(t,c),e),d=u.length,p=h.length,f=0,m=0;f<d||m<p;)t[f+m]=f<d&&m<p?e(u[f],h[m])<=0?u[f++]:h[m++]:f<d?u[f++]:h[m++];return t};t.exports=r},7433:(t,e,n)=>{var i=n(4376),o=n(3517),r=n(34),s=n(8227)("species"),a=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(o(e)&&(e===a||i(e.prototype))||r(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},1469:(t,e,n)=>{var i=n(7433);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},6319:(t,e,n)=>{var i=n(8551),o=n(9539);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},4428:(t,e,n)=>{var i=n(8227)("iterator"),o=!1;try{var r=0,s={next:function(){return{done:!!r++}},return:function(){o=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!o)return!1}catch(t){return!1}var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}},4576:(t,e,n)=>{var i=n(9504),o=i({}.toString),r=i("".slice);t.exports=function(t){return r(o(t),8,-1)}},6955:(t,e,n)=>{var i=n(2140),o=n(4901),r=n(4576),s=n(8227)("toStringTag"),a=Object,l="Arguments"===r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:l?r(e):"Object"===(i=r(e))&&o(e.callee)?"Arguments":i}},7740:(t,e,n)=>{var i=n(9297),o=n(5031),r=n(7347),s=n(4913);t.exports=function(t,e,n){for(var a=o(e),l=s.f,c=r.f,u=0;u<a.length;u++){var h=a[u];i(t,h)||n&&i(n,h)||l(t,h,c(e,h))}}},1436:(t,e,n)=>{var i=n(8227)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},2211:(t,e,n)=>{var i=n(9039);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{t.exports=function(t,e){return{value:t,done:e}}},6699:(t,e,n)=>{var i=n(3724),o=n(4913),r=n(6980);t.exports=i?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},6980:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4659:(t,e,n)=>{var i=n(3724),o=n(4913),r=n(6980);t.exports=function(t,e,n){i?o.f(t,e,r(0,n)):t[e]=n}},380:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(533).start,s=RangeError,a=isFinite,l=Math.abs,c=Date.prototype,u=c.toISOString,h=i(c.getTime),d=i(c.getUTCDate),p=i(c.getUTCFullYear),f=i(c.getUTCHours),m=i(c.getUTCMilliseconds),y=i(c.getUTCMinutes),v=i(c.getUTCMonth),b=i(c.getUTCSeconds);t.exports=o((function(){return"0385-07-25T07:06:39.999Z"!==u.call(new Date(-50000000000001))}))||!o((function(){u.call(new Date(NaN))}))?function(){if(!a(h(this)))throw new s("Invalid time value");var t=this,e=p(t),n=m(t),i=e<0?"-":e>9999?"+":"";return i+r(l(e),i?6:4,0)+"-"+r(v(t)+1,2,0)+"-"+r(d(t),2,0)+"T"+r(f(t),2,0)+":"+r(y(t),2,0)+":"+r(b(t),2,0)+"."+r(n,3,0)+"Z"}:u},3640:(t,e,n)=>{var i=n(8551),o=n(4270),r=TypeError;t.exports=function(t){if(i(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new r("Incorrect hint");return o(this,t)}},2106:(t,e,n)=>{var i=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),o.f(t,e,n)}},6840:(t,e,n)=>{var i=n(4901),o=n(4913),r=n(283),s=n(9433);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(i(n)&&r(n,c,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9433:(t,e,n)=>{var i=n(4475),o=Object.defineProperty;t.exports=function(t,e){try{o(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},4606:(t,e,n)=>{var i=n(6823),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw new o("Cannot delete property "+i(e)+" of "+i(t))}},3724:(t,e,n)=>{var i=n(9039);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,n)=>{var i=n(4475),o=n(34),r=i.document,s=o(r)&&o(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},6837:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},7400:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:(t,e,n)=>{var i=n(4055)("span").classList,o=i&&i.constructor&&i.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8834:(t,e,n)=>{var i=n(9392).match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]},7290:(t,e,n)=>{var i=n(516),o=n(9088);t.exports=!i&&!o&&"object"==typeof window&&"object"==typeof document},6763:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},516:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},3202:(t,e,n)=>{var i=n(9392);t.exports=/MSIE|Trident/.test(i)},28:(t,e,n)=>{var i=n(9392);t.exports=/ipad|iphone|ipod/i.test(i)&&"undefined"!=typeof Pebble},8119:(t,e,n)=>{var i=n(9392);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},9088:(t,e,n)=>{var i=n(4475),o=n(4576);t.exports="process"===o(i.process)},6765:(t,e,n)=>{var i=n(9392);t.exports=/web0s(?!.*chrome)/i.test(i)},9392:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:(t,e,n)=>{var i,o,r=n(4475),s=n(9392),a=r.process,l=r.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(o=(i=u.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(o=+i[1]),t.exports=o},9160:(t,e,n)=>{var i=n(9392).match(/AppleWebKit\/(\d+)\./);t.exports=!!i&&+i[1]},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(t,e,n)=>{var i=n(4475),o=n(7347).f,r=n(6699),s=n(6840),a=n(9433),l=n(7740),c=n(2796);t.exports=function(t,e){var n,u,h,d,p,f=t.target,m=t.global,y=t.stat;if(n=m?i:y?i[f]||a(f,{}):i[f]&&i[f].prototype)for(u in e){if(d=e[u],h=t.dontCallGetSet?(p=o(n,u))&&p.value:n[u],!c(m?u:f+(y?".":"#")+u,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(t.sham||h&&h.sham)&&r(d,"sham",!0),s(n,u,d,t)}}},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},9228:(t,e,n)=>{n(7495);var i=n(9565),o=n(6840),r=n(7323),s=n(9039),a=n(8227),l=n(6699),c=a("species"),u=RegExp.prototype;t.exports=function(t,e,n,h){var d=a(t),p=!s((function(){var e={};return e[d]=function(){return 7},7!==""[t](e)})),f=p&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=!0,null},n[d](""),!e}));if(!p||!f||n){var m=/./[d],y=e(d,""[t],(function(t,e,n,o,s){var a=e.exec;return a===r||a===u.exec?p&&!s?{done:!0,value:i(m,e,n,o)}:{done:!0,value:i(t,n,e,o)}:{done:!1}}));o(String.prototype,t,y[0]),o(u,d,y[1])}h&&l(u[d],"sham",!0)}},8745:(t,e,n)=>{var i=n(616),o=Function.prototype,r=o.apply,s=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(r):function(){return s.apply(r,arguments)})},6080:(t,e,n)=>{var i=n(7476),o=n(9306),r=n(616),s=i(i.bind);t.exports=function(t,e){return o(t),void 0===e?t:r?s(t,e):function(){return t.apply(e,arguments)}}},616:(t,e,n)=>{var i=n(9039);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},566:(t,e,n)=>{var i=n(9504),o=n(9306),r=n(34),s=n(9297),a=n(7680),l=n(616),c=Function,u=i([].concat),h=i([].join),d={};t.exports=l?c.bind:function(t){var e=o(this),n=e.prototype,i=a(arguments,1),l=function(){var n=u(i,a(arguments));return this instanceof l?function(t,e,n){if(!s(d,e)){for(var i=[],o=0;o<e;o++)i[o]="a["+o+"]";d[e]=c("C,a","return new C("+h(i,",")+")")}return d[e](t,n)}(e,n.length,n):e.apply(t,n)};return r(n)&&(l.prototype=n),l}},9565:(t,e,n)=>{var i=n(616),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,e,n)=>{var i=n(3724),o=n(9297),r=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=o(r,"name"),l=a&&"something"===function(){}.name,c=a&&(!i||i&&s(r,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},6706:(t,e,n)=>{var i=n(9504),o=n(9306);t.exports=function(t,e,n){try{return i(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},7476:(t,e,n)=>{var i=n(4576),o=n(9504);t.exports=function(t){if("Function"===i(t))return o(t)}},9504:(t,e,n)=>{var i=n(616),o=Function.prototype,r=o.call,s=i&&o.bind.bind(r,r);t.exports=i?s:function(t){return function(){return r.apply(t,arguments)}}},7751:(t,e,n)=>{var i=n(4475),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=i[t],o(n)?n:void 0):i[t]&&i[t][e];var n}},851:(t,e,n)=>{var i=n(6955),o=n(5966),r=n(4117),s=n(6269),a=n(8227)("iterator");t.exports=function(t){if(!r(t))return o(t,a)||o(t,"@@iterator")||s[i(t)]}},81:(t,e,n)=>{var i=n(9565),o=n(9306),r=n(8551),s=n(6823),a=n(851),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(o(n))return r(i(n,t));throw new l(s(t)+" is not iterable")}},6933:(t,e,n)=>{var i=n(9504),o=n(4376),r=n(4901),s=n(4576),a=n(655),l=i([].push);t.exports=function(t){if(r(t))return t;if(o(t)){for(var e=t.length,n=[],i=0;i<e;i++){var c=t[i];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==s(c)&&"String"!==s(c)||l(n,a(c))}var u=n.length,h=!0;return function(t,e){if(h)return h=!1,e;if(o(this))return e;for(var i=0;i<u;i++)if(n[i]===t)return e}}}},5966:(t,e,n)=>{var i=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:i(n)}},2478:(t,e,n)=>{var i=n(9504),o=n(8981),r=Math.floor,s=i("".charAt),a=i("".replace),l=i("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,i,h,d){var p=n+t.length,f=i.length,m=u;return void 0!==h&&(h=o(h),m=c),a(d,m,(function(o,a){var c;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,n);case"'":return l(e,p);case"<":c=h[l(a,1,-1)];break;default:var u=+a;if(0===u)return o;if(u>f){var d=r(u/10);return 0===d?o:d<=f?void 0===i[d-1]?s(a,1):i[d-1]+s(a,1):o}c=i[u-1]}return void 0===c?"":c}))}},4475:function(t,e,n){var i=function(t){return t&&t.Math===Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,n)=>{var i=n(9504),o=n(8981),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(o(t),e)}},421:t=>{t.exports={}},3138:t=>{t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:(t,e,n)=>{var i=n(7751);t.exports=i("document","documentElement")},5917:(t,e,n)=>{var i=n(3724),o=n(9039),r=n(4055);t.exports=!i&&!o((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},7055:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(4576),s=Object,a=i("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?a(t,""):s(t)}:s},3167:(t,e,n)=>{var i=n(4901),o=n(34),r=n(2967);t.exports=function(t,e,n){var s,a;return r&&i(s=e.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&r(t,a),t}},3706:(t,e,n)=>{var i=n(9504),o=n(4901),r=n(7629),s=i(Function.toString);o(r.inspectSource)||(r.inspectSource=function(t){return s(t)}),t.exports=r.inspectSource},1181:(t,e,n)=>{var i,o,r,s=n(8622),a=n(4475),l=n(34),c=n(6699),u=n(9297),h=n(7629),d=n(6119),p=n(421),f="Object already initialized",m=a.TypeError,y=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new y);v.get=v.get,v.has=v.has,v.set=v.set,i=function(t,e){if(v.has(t))throw new m(f);return e.facade=t,v.set(t,e),e},o=function(t){return v.get(t)||{}},r=function(t){return v.has(t)}}else{var b=d("state");p[b]=!0,i=function(t,e){if(u(t,b))throw new m(f);return e.facade=t,c(t,b,e),e},o=function(t){return u(t,b)?t[b]:{}},r=function(t){return u(t,b)}}t.exports={set:i,get:o,has:r,enforce:function(t){return r(t)?o(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=o(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return n}}}},4209:(t,e,n)=>{var i=n(8227),o=n(6269),r=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[r]===t)}},4376:(t,e,n)=>{var i=n(4576);t.exports=Array.isArray||function(t){return"Array"===i(t)}},4901:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(4901),s=n(6955),a=n(7751),l=n(3706),c=function(){},u=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=i(h.exec),p=!h.test(c),f=function(t){if(!r(t))return!1;try{return u(c,[],t),!0}catch(t){return!1}},m=function(t){if(!r(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,l(t))}catch(t){return!0}};m.sham=!0,t.exports=!u||o((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?m:f},6575:(t,e,n)=>{var i=n(9297);t.exports=function(t){return void 0!==t&&(i(t,"value")||i(t,"writable"))}},2796:(t,e,n)=>{var i=n(9039),o=n(4901),r=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n===u||n!==c&&(o(e)?i(e):!!e)},a=s.normalize=function(t){return String(t).replace(r,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},4117:t=>{t.exports=function(t){return null==t}},34:(t,e,n)=>{var i=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},3925:(t,e,n)=>{var i=n(34);t.exports=function(t){return i(t)||null===t}},6395:t=>{t.exports=!1},788:(t,e,n)=>{var i=n(34),o=n(4576),r=n(8227)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[r])?!!e:"RegExp"===o(t))}},757:(t,e,n)=>{var i=n(7751),o=n(4901),r=n(1625),s=n(7040),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return o(e)&&r(e.prototype,a(t))}},2652:(t,e,n)=>{var i=n(6080),o=n(9565),r=n(8551),s=n(6823),a=n(4209),l=n(6198),c=n(1625),u=n(81),h=n(851),d=n(9539),p=TypeError,f=function(t,e){this.stopped=t,this.result=e},m=f.prototype;t.exports=function(t,e,n){var y,v,b,g,_,w,x,k=n&&n.that,O=!(!n||!n.AS_ENTRIES),j=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),P=i(e,k),L=function(t){return y&&d(y,"normal",t),new f(!0,t)},S=function(t){return O?(r(t),E?P(t[0],t[1],L):P(t[0],t[1])):E?P(t,L):P(t)};if(j)y=t.iterator;else if(C)y=t;else{if(!(v=h(t)))throw new p(s(t)+" is not iterable");if(a(v)){for(b=0,g=l(t);g>b;b++)if((_=S(t[b]))&&c(m,_))return _;return new f(!1)}y=u(t,v)}for(w=j?t.next:y.next;!(x=o(w,y)).done;){try{_=S(x.value)}catch(t){d(y,"throw",t)}if("object"==typeof _&&_&&c(m,_))return _}return new f(!1)}},9539:(t,e,n)=>{var i=n(9565),o=n(8551),r=n(5966);t.exports=function(t,e,n){var s,a;o(t);try{if(!(s=r(t,"return"))){if("throw"===e)throw n;return n}s=i(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return o(s),n}},3994:(t,e,n)=>{var i=n(7657).IteratorPrototype,o=n(2360),r=n(6980),s=n(687),a=n(6269),l=function(){return this};t.exports=function(t,e,n,c){var u=e+" Iterator";return t.prototype=o(i,{next:r(+!c,n)}),s(t,u,!1,!0),a[u]=l,t}},1088:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(6395),s=n(350),a=n(4901),l=n(3994),c=n(2787),u=n(2967),h=n(687),d=n(6699),p=n(6840),f=n(8227),m=n(6269),y=n(7657),v=s.PROPER,b=s.CONFIGURABLE,g=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,w=f("iterator"),x="keys",k="values",O="entries",j=function(){return this};t.exports=function(t,e,n,s,f,y,C){l(n,e,s);var E,P,L,S=function(t){if(t===f&&I)return I;if(!_&&t&&t in R)return R[t];switch(t){case x:case k:case O:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",A=!1,R=t.prototype,B=R[w]||R["@@iterator"]||f&&R[f],I=!_&&B||S(f),z="Array"===e&&R.entries||B;if(z&&(E=c(z.call(new t)))!==Object.prototype&&E.next&&(r||c(E)===g||(u?u(E,g):a(E[w])||p(E,w,j)),h(E,T,!0,!0),r&&(m[T]=j)),v&&f===k&&B&&B.name!==k&&(!r&&b?d(R,"name",k):(A=!0,I=function(){return o(B,this)})),f)if(P={values:S(k),keys:y?I:S(x),entries:S(O)},C)for(L in P)(_||A||!(L in R))&&p(R,L,P[L]);else i({target:e,proto:!0,forced:_||A},P);return r&&!C||R[w]===I||p(R,w,I,{name:f}),m[e]=I,P}},7657:(t,e,n)=>{var i,o,r,s=n(9039),a=n(4901),l=n(34),c=n(2360),u=n(2787),h=n(6840),d=n(8227),p=n(6395),f=d("iterator"),m=!1;[].keys&&("next"in(r=[].keys())?(o=u(u(r)))!==Object.prototype&&(i=o):m=!0),!l(i)||s((function(){var t={};return i[f].call(t)!==t}))?i={}:p&&(i=c(i)),a(i[f])||h(i,f,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},6269:t=>{t.exports={}},6198:(t,e,n)=>{var i=n(8014);t.exports=function(t){return i(t.length)}},283:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(4901),s=n(9297),a=n(3724),l=n(350).CONFIGURABLE,c=n(3706),u=n(1181),h=u.enforce,d=u.get,p=String,f=Object.defineProperty,m=i("".slice),y=i("".replace),v=i([].join),b=a&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),g=String(String).split("String"),_=t.exports=function(t,e,n){"Symbol("===m(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(a?f(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&s(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return s(i,"source")||(i.source=v(g,"string"==typeof e?e:"")),t};Function.prototype.toString=_((function(){return r(this)&&d(this).source||c(this)}),"toString")},741:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},1955:(t,e,n)=>{var i,o,r,s,a,l=n(4475),c=n(3389),u=n(6080),h=n(9225).set,d=n(8265),p=n(8119),f=n(28),m=n(6765),y=n(9088),v=l.MutationObserver||l.WebKitMutationObserver,b=l.document,g=l.process,_=l.Promise,w=c("queueMicrotask");if(!w){var x=new d,k=function(){var t,e;for(y&&(t=g.domain)&&t.exit();e=x.get();)try{e()}catch(t){throw x.head&&i(),t}t&&t.enter()};p||y||m||!v||!b?!f&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,a=u(s.then,s),i=function(){a(k)}):y?i=function(){g.nextTick(k)}:(h=u(h,l),i=function(){h(k)}):(o=!0,r=b.createTextNode(""),new v(k).observe(r,{characterData:!0}),i=function(){r.data=o=!o}),w=function(t){x.head||i(),x.add(t)}}t.exports=w},6043:(t,e,n)=>{var i=n(9306),o=TypeError,r=function(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw new o("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)};t.exports.f=function(t){return new r(t)}},5749:(t,e,n)=>{var i=n(788),o=TypeError;t.exports=function(t){if(i(t))throw new o("The method doesn't accept regular expressions");return t}},3904:(t,e,n)=>{var i=n(4475),o=n(9039),r=n(9504),s=n(655),a=n(3802).trim,l=n(7452),c=r("".charAt),u=i.parseFloat,h=i.Symbol,d=h&&h.iterator,p=1/u(l+"-0")!=-1/0||d&&!o((function(){u(Object(d))}));t.exports=p?function(t){var e=a(s(t)),n=u(e);return 0===n&&"-"===c(e,0)?-0:n}:u},2703:(t,e,n)=>{var i=n(4475),o=n(9039),r=n(9504),s=n(655),a=n(3802).trim,l=n(7452),c=i.parseInt,u=i.Symbol,h=u&&u.iterator,d=/^[+-]?0x/i,p=r(d.exec),f=8!==c(l+"08")||22!==c(l+"0x16")||h&&!o((function(){c(Object(h))}));t.exports=f?function(t,e){var n=a(s(t));return c(n,e>>>0||(p(d,n)?16:10))}:c},4213:(t,e,n)=>{var i=n(3724),o=n(9504),r=n(9565),s=n(9039),a=n(1072),l=n(3717),c=n(8773),u=n(8981),h=n(7055),d=Object.assign,p=Object.defineProperty,f=o([].concat);t.exports=!d||s((function(){if(i&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!==d({},t)[n]||a(d({},e)).join("")!==o}))?function(t,e){for(var n=u(t),o=arguments.length,s=1,d=l.f,p=c.f;o>s;)for(var m,y=h(arguments[s++]),v=d?f(a(y),d(y)):a(y),b=v.length,g=0;b>g;)m=v[g++],i&&!r(p,y,m)||(n[m]=y[m]);return n}:d},2360:(t,e,n)=>{var i,o=n(8551),r=n(6801),s=n(8727),a=n(421),l=n(397),c=n(4055),u=n(6119),h="prototype",d="script",p=u("IE_PROTO"),f=function(){},m=function(t){return"<"+d+">"+t+"</"+d+">"},y=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;v="undefined"!=typeof document?document.domain&&i?y(i):(e=c("iframe"),n="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):y(i);for(var o=s.length;o--;)delete v[h][s[o]];return v()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f[h]=o(t),n=new f,f[h]=null,n[p]=t):n=v(),void 0===e?n:r.f(n,e)}},6801:(t,e,n)=>{var i=n(3724),o=n(8686),r=n(4913),s=n(8551),a=n(5397),l=n(1072);e.f=i&&!o?Object.defineProperties:function(t,e){s(t);for(var n,i=a(e),o=l(e),c=o.length,u=0;c>u;)r.f(t,n=o[u++],i[n]);return t}},4913:(t,e,n)=>{var i=n(3724),o=n(5917),r=n(8686),s=n(8551),a=n(6969),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";e.f=i?r?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var i=u(t,e);i&&i[p]&&(t[e]=n.value,n={configurable:d in n?n[d]:i[d],enumerable:h in n?n[h]:i[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7347:(t,e,n)=>{var i=n(3724),o=n(9565),r=n(8773),s=n(6980),a=n(5397),l=n(6969),c=n(9297),u=n(5917),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return s(!o(r.f,t,e),t[e])}},298:(t,e,n)=>{var i=n(4576),o=n(5397),r=n(8480).f,s=n(7680),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===i(t)?function(t){try{return r(t)}catch(t){return s(a)}}(t):r(o(t))}},8480:(t,e,n)=>{var i=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},3717:(t,e)=>{e.f=Object.getOwnPropertySymbols},2787:(t,e,n)=>{var i=n(9297),o=n(4901),r=n(8981),s=n(6119),a=n(2211),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=r(t);if(i(e,l))return e[l];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},1625:(t,e,n)=>{var i=n(9504);t.exports=i({}.isPrototypeOf)},1828:(t,e,n)=>{var i=n(9504),o=n(9297),r=n(5397),s=n(9617).indexOf,a=n(421),l=i([].push);t.exports=function(t,e){var n,i=r(t),c=0,u=[];for(n in i)!o(a,n)&&o(i,n)&&l(u,n);for(;e.length>c;)o(i,n=e[c++])&&(~s(u,n)||l(u,n));return u}},1072:(t,e,n)=>{var i=n(1828),o=n(8727);t.exports=Object.keys||function(t){return i(t,o)}},8773:(t,e)=>{var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},2967:(t,e,n)=>{var i=n(6706),o=n(34),r=n(7750),s=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),s(i),o(n)?(e?t(n,i):n.__proto__=i,n):n}}():void 0)},2357:(t,e,n)=>{var i=n(3724),o=n(9039),r=n(9504),s=n(2787),a=n(1072),l=n(5397),c=r(n(8773).f),u=r([].push),h=i&&o((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),d=function(t){return function(e){for(var n,o=l(e),r=a(o),d=h&&null===s(o),p=r.length,f=0,m=[];p>f;)n=r[f++],i&&!(d?n in o:c(o,n))||u(m,t?[n,o[n]]:o[n]);return m}};t.exports={entries:d(!0),values:d(!1)}},3179:(t,e,n)=>{var i=n(2140),o=n(6955);t.exports=i?{}.toString:function(){return"[object "+o(this)+"]"}},4270:(t,e,n)=>{var i=n(9565),o=n(4901),r=n(34),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!r(a=i(n,t)))return a;if(o(n=t.valueOf)&&!r(a=i(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!r(a=i(n,t)))return a;throw new s("Can't convert object to primitive value")}},5031:(t,e,n)=>{var i=n(7751),o=n(9504),r=n(8480),s=n(3717),a=n(8551),l=o([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=s.f;return n?l(e,n(t)):e}},9167:(t,e,n)=>{var i=n(4475);t.exports=i},1103:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},916:(t,e,n)=>{var i=n(4475),o=n(550),r=n(4901),s=n(2796),a=n(3706),l=n(8227),c=n(7290),u=n(516),h=n(6395),d=n(7388),p=o&&o.prototype,f=l("species"),m=!1,y=r(i.PromiseRejectionEvent),v=s("Promise",(function(){var t=a(o),e=t!==String(o);if(!e&&66===d)return!0;if(h&&(!p.catch||!p.finally))return!0;if(!d||d<51||!/native code/.test(t)){var n=new o((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((n.constructor={})[f]=i,!(m=n.then((function(){}))instanceof i))return!0}return!e&&(c||u)&&!y}));t.exports={CONSTRUCTOR:v,REJECTION_EVENT:y,SUBCLASSING:m}},550:(t,e,n)=>{var i=n(4475);t.exports=i.Promise},3438:(t,e,n)=>{var i=n(8551),o=n(34),r=n(6043);t.exports=function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=r.f(t);return(0,n.resolve)(e),n.promise}},537:(t,e,n)=>{var i=n(550),o=n(4428),r=n(916).CONSTRUCTOR;t.exports=r||!o((function(t){i.all(t).then(void 0,(function(){}))}))},1056:(t,e,n)=>{var i=n(4913).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},8265:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},6682:(t,e,n)=>{var i=n(9565),o=n(8551),r=n(4901),s=n(4576),a=n(7323),l=TypeError;t.exports=function(t,e){var n=t.exec;if(r(n)){var c=i(n,t,e);return null!==c&&o(c),c}if("RegExp"===s(t))return i(a,t,e);throw new l("RegExp#exec called on incompatible receiver")}},7323:(t,e,n)=>{var i,o,r=n(9565),s=n(9504),a=n(655),l=n(7979),c=n(8429),u=n(5745),h=n(2360),d=n(1181).get,p=n(3635),f=n(8814),m=u("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,v=y,b=s("".charAt),g=s("".indexOf),_=s("".replace),w=s("".slice),x=(o=/b*/g,r(y,i=/a/,"a"),r(y,o,"a"),0!==i.lastIndex||0!==o.lastIndex),k=c.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(x||O||k||p||f)&&(v=function(t){var e,n,i,o,s,c,u,p=this,f=d(p),j=a(t),C=f.raw;if(C)return C.lastIndex=p.lastIndex,e=r(v,C,j),p.lastIndex=C.lastIndex,e;var E=f.groups,P=k&&p.sticky,L=r(l,p),S=p.source,T=0,A=j;if(P&&(L=_(L,"y",""),-1===g(L,"g")&&(L+="g"),A=w(j,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(j,p.lastIndex-1))&&(S="(?: "+S+")",A=" "+A,T++),n=new RegExp("^(?:"+S+")",L)),O&&(n=new RegExp("^"+S+"$(?!\\s)",L)),x&&(i=p.lastIndex),o=r(y,P?n:p,A),P?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:x&&o&&(p.lastIndex=p.global?o.index+o[0].length:i),O&&o&&o.length>1&&r(m,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&E)for(o.groups=c=h(null),s=0;s<E.length;s++)c[(u=E[s])[0]]=o[u[1]];return o}),t.exports=v},7979:(t,e,n)=>{var i=n(8551);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},1034:(t,e,n)=>{var i=n(9565),o=n(9297),r=n(1625),s=n(7979),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||o(t,"flags")||!r(a,t)?e:i(s,t)}},8429:(t,e,n)=>{var i=n(9039),o=n(4475).RegExp,r=i((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),s=r||i((function(){return!o("a","y").sticky})),a=r||i((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:r}},3635:(t,e,n)=>{var i=n(9039),o=n(4475).RegExp;t.exports=i((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},8814:(t,e,n)=>{var i=n(9039),o=n(4475).RegExp;t.exports=i((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},7750:(t,e,n)=>{var i=n(4117),o=TypeError;t.exports=function(t){if(i(t))throw new o("Can't call method on "+t);return t}},3389:(t,e,n)=>{var i=n(4475),o=n(3724),r=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!o)return i[t];var e=r(i,t);return e&&e.value}},9472:(t,e,n)=>{var i,o=n(4475),r=n(8745),s=n(4901),a=n(6763),l=n(9392),c=n(7680),u=n(2812),h=o.Function,d=/MSIE .\./.test(l)||a&&((i=o.Bun.version.split(".")).length<3||"0"===i[0]&&(i[1]<3||"3"===i[1]&&"0"===i[2]));t.exports=function(t,e){var n=e?2:1;return d?function(i,o){var a=u(arguments.length,1)>n,l=s(i)?i:h(i),d=a?c(arguments,n):[],p=a?function(){r(l,this,d)}:l;return e?t(p,o):t(p)}:t}},7633:(t,e,n)=>{var i=n(7751),o=n(2106),r=n(8227),s=n(3724),a=r("species");t.exports=function(t){var e=i(t);s&&e&&!e[a]&&o(e,a,{configurable:!0,get:function(){return this}})}},687:(t,e,n)=>{var i=n(4913).f,o=n(9297),r=n(8227)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,r)&&i(t,r,{configurable:!0,value:e})}},6119:(t,e,n)=>{var i=n(5745),o=n(3392),r=i("keys");t.exports=function(t){return r[t]||(r[t]=o(t))}},7629:(t,e,n)=>{var i=n(6395),o=n(4475),r=n(9433),s="__core-js_shared__",a=t.exports=o[s]||r(s,{});(a.versions||(a.versions=[])).push({version:"3.36.1",mode:i?"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:(t,e,n)=>{var i=n(7629);t.exports=function(t,e){return i[t]||(i[t]=e||{})}},2293:(t,e,n)=>{var i=n(8551),o=n(5548),r=n(4117),s=n(8227)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||r(n=i(a)[s])?e:o(n)}},8183:(t,e,n)=>{var i=n(9504),o=n(1291),r=n(655),s=n(7750),a=i("".charAt),l=i("".charCodeAt),c=i("".slice),u=function(t){return function(e,n){var i,u,h=r(s(e)),d=o(n),p=h.length;return d<0||d>=p?t?"":void 0:(i=l(h,d))<55296||i>56319||d+1===p||(u=l(h,d+1))<56320||u>57343?t?a(h,d):i:t?c(h,d,d+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},533:(t,e,n)=>{var i=n(9504),o=n(8014),r=n(655),s=n(2333),a=n(7750),l=i(s),c=i("".slice),u=Math.ceil,h=function(t){return function(e,n,i){var s,h,d=r(a(e)),p=o(n),f=d.length,m=void 0===i?" ":r(i);return p<=f||""===m?d:((h=l(m,u((s=p-f)/m.length))).length>s&&(h=c(h,0,s)),t?d+h:h+d)}};t.exports={start:h(!1),end:h(!0)}},2333:(t,e,n)=>{var i=n(1291),o=n(655),r=n(7750),s=RangeError;t.exports=function(t){var e=o(r(this)),n="",a=i(t);if(a<0||a===1/0)throw new s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},706:(t,e,n)=>{var i=n(350).PROPER,o=n(9039),r=n(7452);t.exports=function(t){return o((function(){return!!r[t]()||"​…᠎"!=="​…᠎"[t]()||i&&r[t].name!==t}))}},3802:(t,e,n)=>{var i=n(9504),o=n(7750),r=n(655),s=n(7452),a=i("".replace),l=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),u=function(t){return function(e){var n=r(o(e));return 1&t&&(n=a(n,l,"")),2&t&&(n=a(n,c,"$1")),n}};t.exports={start:u(1),end:u(2),trim:u(3)}},4495:(t,e,n)=>{var i=n(7388),o=n(9039),r=n(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8242:(t,e,n)=>{var i=n(9565),o=n(7751),r=n(8227),s=n(6840);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,a=r("toPrimitive");e&&!e[a]&&s(e,a,(function(t){return i(n,this)}),{arity:1})}},1296:(t,e,n)=>{var i=n(4495);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},9225:(t,e,n)=>{var i,o,r,s,a=n(4475),l=n(8745),c=n(6080),u=n(4901),h=n(9297),d=n(9039),p=n(397),f=n(7680),m=n(4055),y=n(2812),v=n(8119),b=n(9088),g=a.setImmediate,_=a.clearImmediate,w=a.process,x=a.Dispatch,k=a.Function,O=a.MessageChannel,j=a.String,C=0,E={},P="onreadystatechange";d((function(){i=a.location}));var L=function(t){if(h(E,t)){var e=E[t];delete E[t],e()}},S=function(t){return function(){L(t)}},T=function(t){L(t.data)},A=function(t){a.postMessage(j(t),i.protocol+"//"+i.host)};g&&_||(g=function(t){y(arguments.length,1);var e=u(t)?t:k(t),n=f(arguments,1);return E[++C]=function(){l(e,void 0,n)},o(C),C},_=function(t){delete E[t]},b?o=function(t){w.nextTick(S(t))}:x&&x.now?o=function(t){x.now(S(t))}:O&&!v?(s=(r=new O).port2,r.port1.onmessage=T,o=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!d(A)?(o=A,a.addEventListener("message",T,!1)):o=P in m("script")?function(t){p.appendChild(m("script"))[P]=function(){p.removeChild(this),L(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:g,clear:_}},1240:(t,e,n)=>{var i=n(9504);t.exports=i(1..valueOf)},5610:(t,e,n)=>{var i=n(1291),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},5397:(t,e,n)=>{var i=n(7055),o=n(7750);t.exports=function(t){return i(o(t))}},1291:(t,e,n)=>{var i=n(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},8014:(t,e,n)=>{var i=n(1291),o=Math.min;t.exports=function(t){var e=i(t);return e>0?o(e,9007199254740991):0}},8981:(t,e,n)=>{var i=n(7750),o=Object;t.exports=function(t){return o(i(t))}},2777:(t,e,n)=>{var i=n(9565),o=n(34),r=n(757),s=n(5966),a=n(4270),l=n(8227),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!o(t)||r(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=i(l,t,e),!o(n)||r(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},6969:(t,e,n)=>{var i=n(2777),o=n(757);t.exports=function(t){var e=i(t,"string");return o(e)?e:e+""}},2140:(t,e,n)=>{var i={};i[n(8227)("toStringTag")]="z",t.exports="[object z]"===String(i)},655:(t,e,n)=>{var i=n(6955),o=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,n)=>{var i=n(9504),o=0,r=Math.random(),s=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+r,36)}},7040:(t,e,n)=>{var i=n(4495);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,n)=>{var i=n(3724),o=n(9039);t.exports=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},8622:(t,e,n)=>{var i=n(4475),o=n(4901),r=i.WeakMap;t.exports=o(r)&&/native code/.test(String(r))},511:(t,e,n)=>{var i=n(9167),o=n(9297),r=n(1951),s=n(4913).f;t.exports=function(t){var e=i.Symbol||(i.Symbol={});o(e,t)||s(e,t,{value:r.f(t)})}},1951:(t,e,n)=>{var i=n(8227);e.f=i},8227:(t,e,n)=>{var i=n(4475),o=n(5745),r=n(9297),s=n(3392),a=n(4495),l=n(7040),c=i.Symbol,u=o("wks"),h=l?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return r(u,t)||(u[t]=a&&r(c,t)?c[t]:h("Symbol."+t)),u[t]}},7452:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},8706:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(4376),s=n(34),a=n(8981),l=n(6198),c=n(6837),u=n(4659),h=n(1469),d=n(597),p=n(8227),f=n(7388),m=p("isConcatSpreadable"),y=f>=51||!o((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),v=function(t){if(!s(t))return!1;var e=t[m];return void 0!==e?!!e:r(t)};i({target:"Array",proto:!0,arity:1,forced:!y||!d("concat")},{concat:function(t){var e,n,i,o,r,s=a(this),d=h(s,0),p=0;for(e=-1,i=arguments.length;e<i;e++)if(v(r=-1===e?s:arguments[e]))for(o=l(r),c(p+o),n=0;n<o;n++,p++)n in r&&u(d,p,r[n]);else c(p+1),u(d,p++,r);return d.length=p,d}})},8431:(t,e,n)=>{var i=n(6518),o=n(9213).every;i({target:"Array",proto:!0,forced:!n(4598)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},2008:(t,e,n)=>{var i=n(6518),o=n(9213).filter;i({target:"Array",proto:!0,forced:!n(597)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},113:(t,e,n)=>{var i=n(6518),o=n(9213).find,r=n(6469),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(s)},1629:(t,e,n)=>{var i=n(6518),o=n(235);i({target:"Array",proto:!0,forced:[].forEach!==o},{forEach:o})},3418:(t,e,n)=>{var i=n(6518),o=n(7916);i({target:"Array",stat:!0,forced:!n(4428)((function(t){Array.from(t)}))},{from:o})},4423:(t,e,n)=>{var i=n(6518),o=n(9617).includes,r=n(9039),s=n(6469);i({target:"Array",proto:!0,forced:r((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},5276:(t,e,n)=>{var i=n(6518),o=n(7476),r=n(9617).indexOf,s=n(4598),a=o([].indexOf),l=!!a&&1/a([1],1,-0)<0;i({target:"Array",proto:!0,forced:l||!s("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return l?a(this,t,e)||0:r(this,t,e)}})},4346:(t,e,n)=>{n(6518)({target:"Array",stat:!0},{isArray:n(4376)})},3792:(t,e,n)=>{var i=n(5397),o=n(6469),r=n(6269),s=n(1181),a=n(4913).f,l=n(1088),c=n(2529),u=n(6395),h=n(3724),d="Array Iterator",p=s.set,f=s.getterFor(d);t.exports=l(Array,"Array",(function(t,e){p(this,{type:d,target:i(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(n,!1);case"values":return c(e[n],!1)}return c([n,e[n]],!1)}),"values");var m=r.Arguments=r.Array;if(o("keys"),o("values"),o("entries"),!u&&h&&"values"!==m.name)try{a(m,"name",{value:"values"})}catch(t){}},8598:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(7055),s=n(5397),a=n(4598),l=o([].join);i({target:"Array",proto:!0,forced:r!==Object||!a("join",",")},{join:function(t){return l(s(this),void 0===t?",":t)}})},2062:(t,e,n)=>{var i=n(6518),o=n(9213).map;i({target:"Array",proto:!0,forced:!n(597)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},2712:(t,e,n)=>{var i=n(6518),o=n(926).left,r=n(4598),s=n(7388);i({target:"Array",proto:!0,forced:!n(9088)&&s>79&&s<83||!r("reduce")},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},4490:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(4376),s=o([].reverse),a=[1,2];i({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),s(this)}})},4782:(t,e,n)=>{var i=n(6518),o=n(4376),r=n(3517),s=n(34),a=n(5610),l=n(6198),c=n(5397),u=n(4659),h=n(8227),d=n(597),p=n(7680),f=d("slice"),m=h("species"),y=Array,v=Math.max;i({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var n,i,h,d=c(this),f=l(d),b=a(t,f),g=a(void 0===e?f:e,f);if(o(d)&&(n=d.constructor,(r(n)&&(n===y||o(n.prototype))||s(n)&&null===(n=n[m]))&&(n=void 0),n===y||void 0===n))return p(d,b,g);for(i=new(void 0===n?y:n)(v(g-b,0)),h=0;b<g;b++,h++)b in d&&u(i,h,d[b]);return i.length=h,i}})},5086:(t,e,n)=>{var i=n(6518),o=n(9213).some;i({target:"Array",proto:!0,forced:!n(4598)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},6910:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(9306),s=n(8981),a=n(6198),l=n(4606),c=n(655),u=n(9039),h=n(4488),d=n(4598),p=n(8834),f=n(3202),m=n(7388),y=n(9160),v=[],b=o(v.sort),g=o(v.push),_=u((function(){v.sort(void 0)})),w=u((function(){v.sort(null)})),x=d("sort"),k=!u((function(){if(m)return m<70;if(!(p&&p>3)){if(f)return!0;if(y)return y<603;var t,e,n,i,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)v.push({k:e+i,v:n})}for(v.sort((function(t,e){return e.v-t.v})),i=0;i<v.length;i++)e=v[i].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));i({target:"Array",proto:!0,forced:_||!w||!x||!k},{sort:function(t){void 0!==t&&r(t);var e=s(this);if(k)return void 0===t?b(e):b(e,t);var n,i,o=[],u=a(e);for(i=0;i<u;i++)i in e&&g(o,e[i]);for(h(o,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=a(o),i=0;i<n;)e[i]=o[i++];for(;i<u;)l(e,i++);return e}})},4554:(t,e,n)=>{var i=n(6518),o=n(8981),r=n(5610),s=n(1291),a=n(6198),l=n(4527),c=n(6837),u=n(1469),h=n(4659),d=n(4606),p=n(597)("splice"),f=Math.max,m=Math.min;i({target:"Array",proto:!0,forced:!p},{splice:function(t,e){var n,i,p,y,v,b,g=o(this),_=a(g),w=r(t,_),x=arguments.length;for(0===x?n=i=0:1===x?(n=0,i=_-w):(n=x-2,i=m(f(s(e),0),_-w)),c(_+n-i),p=u(g,i),y=0;y<i;y++)(v=w+y)in g&&h(p,y,g[v]);if(p.length=i,n<i){for(y=w;y<_-i;y++)b=y+n,(v=y+i)in g?g[b]=g[v]:d(g,b);for(y=_;y>_-i+n;y--)d(g,y-1)}else if(n>i)for(y=_-i;y>w;y--)b=y+n-1,(v=y+i-1)in g?g[b]=g[v]:d(g,b);for(y=0;y<n;y++)g[y+w]=arguments[y+2];return l(g,_-i+n),p}})},1688:(t,e,n)=>{var i=n(6518),o=n(380);i({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},739:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(8981),s=n(2777);i({target:"Date",proto:!0,arity:1,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=r(this),n=s(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},9572:(t,e,n)=>{var i=n(9297),o=n(6840),r=n(3640),s=n(8227)("toPrimitive"),a=Date.prototype;i(a,s)||o(a,s,r)},3288:(t,e,n)=>{var i=n(9504),o=n(6840),r=Date.prototype,s="Invalid Date",a="toString",l=i(r[a]),c=i(r.getTime);String(new Date(NaN))!==s&&o(r,a,(function(){var t=c(this);return t==t?l(this):s}))},4170:(t,e,n)=>{var i=n(6518),o=n(566);i({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},2010:(t,e,n)=>{var i=n(3724),o=n(350).EXISTS,r=n(9504),s=n(2106),a=Function.prototype,l=r(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(c.exec);i&&!o&&s(a,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},3110:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(8745),s=n(9565),a=n(9504),l=n(9039),c=n(4901),u=n(757),h=n(7680),d=n(6933),p=n(4495),f=String,m=o("JSON","stringify"),y=a(/./.exec),v=a("".charAt),b=a("".charCodeAt),g=a("".replace),_=a(1..toString),w=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,O=!p||l((function(){var t=o("Symbol")("stringify detection");return"[null]"!==m([t])||"{}"!==m({a:t})||"{}"!==m(Object(t))})),j=l((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),C=function(t,e){var n=h(arguments),i=d(e);if(c(i)||void 0!==t&&!u(t))return n[1]=function(t,e){if(c(i)&&(e=s(i,this,f(t),e)),!u(e))return e},r(m,null,n)},E=function(t,e,n){var i=v(n,e-1),o=v(n,e+1);return y(x,t)&&!y(k,o)||y(k,t)&&!y(x,i)?"\\u"+_(b(t,0),16):t};m&&i({target:"JSON",stat:!0,arity:3,forced:O||j},{stringify:function(t,e,n){var i=h(arguments),o=r(O?C:m,null,i);return j&&"string"==typeof o?g(o,w,E):o}})},4731:(t,e,n)=>{var i=n(4475);n(687)(i.JSON,"JSON",!0)},479:(t,e,n)=>{n(687)(Math,"Math",!0)},2892:(t,e,n)=>{var i=n(6518),o=n(6395),r=n(3724),s=n(4475),a=n(9167),l=n(9504),c=n(2796),u=n(9297),h=n(3167),d=n(1625),p=n(757),f=n(2777),m=n(9039),y=n(8480).f,v=n(7347).f,b=n(4913).f,g=n(1240),_=n(3802).trim,w="Number",x=s[w],k=a[w],O=x.prototype,j=s.TypeError,C=l("".slice),E=l("".charCodeAt),P=c(w,!x(" 0o1")||!x("0b1")||x("+0x1")),L=function(t){var e,n=arguments.length<1?0:x(function(t){var e=f(t,"number");return"bigint"==typeof e?e:function(t){var e,n,i,o,r,s,a,l,c=f(t,"number");if(p(c))throw new j("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=_(c),43===(e=E(c,0))||45===e){if(88===(n=E(c,2))||120===n)return NaN}else if(48===e){switch(E(c,1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+c}for(s=(r=C(c,2)).length,a=0;a<s;a++)if((l=E(r,a))<48||l>o)return NaN;return parseInt(r,i)}return+c}(e)}(t));return d(O,e=this)&&m((function(){g(e)}))?h(Object(n),this,L):n};L.prototype=O,P&&!o&&(O.constructor=L),i({global:!0,constructor:!0,wrap:!0,forced:P},{Number:L});var S=function(t,e){for(var n,i=r?y(e):"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(","),o=0;i.length>o;o++)u(e,n=i[o])&&!u(t,n)&&b(t,n,v(e,n))};o&&k&&S(a[w],k),(P||o)&&S(a[w],x)},9868:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(1291),s=n(1240),a=n(2333),l=n(9039),c=RangeError,u=String,h=Math.floor,d=o(a),p=o("".slice),f=o(1..toFixed),m=function(t,e,n){return 0===e?n:e%2==1?m(t,e-1,n*t):m(t*t,e/2,n)},y=function(t,e,n){for(var i=-1,o=n;++i<6;)o+=e*t[i],t[i]=o%1e7,o=h(o/1e7)},v=function(t,e){for(var n=6,i=0;--n>=0;)i+=t[n],t[n]=h(i/e),i=i%e*1e7},b=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var i=u(t[e]);n=""===n?i:n+d("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:l((function(){return"0.000"!==f(8e-5,3)||"1"!==f(.9,0)||"1.25"!==f(1.255,2)||"1000000000000000128"!==f(0xde0b6b3a7640080,0)}))||!l((function(){f({})}))},{toFixed:function(t){var e,n,i,o,a=s(this),l=r(t),h=[0,0,0,0,0,0],f="",g="0";if(l<0||l>20)throw new c("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return u(a);if(a<0&&(f="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*m(2,69,1))-69)<0?a*m(2,-e,1):a/m(2,e,1),n*=4503599627370496,(e=52-e)>0){for(y(h,0,n),i=l;i>=7;)y(h,1e7,0),i-=7;for(y(h,m(10,i,1),0),i=e-1;i>=23;)v(h,1<<23),i-=23;v(h,1<<i),y(h,1,1),v(h,2),g=b(h)}else y(h,0,n),y(h,1<<-e,0),g=b(h)+d("0",l);return l>0?f+((o=g.length)<=l?"0."+d("0",l-o)+g:p(g,0,o-l)+"."+p(g,o-l)):f+g}})},9085:(t,e,n)=>{var i=n(6518),o=n(4213);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},9904:(t,e,n)=>{n(6518)({target:"Object",stat:!0,sham:!n(3724)},{create:n(2360)})},7945:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(6801).f;i({target:"Object",stat:!0,forced:Object.defineProperties!==r,sham:!o},{defineProperties:r})},4185:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(4913).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==r,sham:!o},{defineProperty:r})},5506:(t,e,n)=>{var i=n(6518),o=n(2357).entries;i({target:"Object",stat:!0},{entries:function(t){return o(t)}})},3851:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(5397),s=n(7347).f,a=n(3724);i({target:"Object",stat:!0,forced:!a||o((function(){s(1)})),sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(r(t),e)}})},1278:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(5031),s=n(5397),a=n(7347),l=n(4659);i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,i=s(t),o=a.f,c=r(i),u={},h=0;c.length>h;)void 0!==(n=o(i,e=c[h++]))&&l(u,e,n);return u}})},9773:(t,e,n)=>{var i=n(6518),o=n(4495),r=n(9039),s=n(3717),a=n(8981);i({target:"Object",stat:!0,forced:!o||r((function(){s.f(1)}))},{getOwnPropertySymbols:function(t){var e=s.f;return e?e(a(t)):[]}})},875:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(8981),s=n(2787),a=n(2211);i({target:"Object",stat:!0,forced:o((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(r(t))}})},9432:(t,e,n)=>{var i=n(6518),o=n(8981),r=n(1072);i({target:"Object",stat:!0,forced:n(9039)((function(){r(1)}))},{keys:function(t){return r(o(t))}})},287:(t,e,n)=>{n(6518)({target:"Object",stat:!0},{setPrototypeOf:n(2967)})},6099:(t,e,n)=>{var i=n(2140),o=n(6840),r=n(3179);i||o(Object.prototype,"toString",r,{unsafe:!0})},6034:(t,e,n)=>{var i=n(6518),o=n(2357).values;i({target:"Object",stat:!0},{values:function(t){return o(t)}})},8459:(t,e,n)=>{var i=n(6518),o=n(3904);i({global:!0,forced:parseFloat!==o},{parseFloat:o})},8940:(t,e,n)=>{var i=n(6518),o=n(2703);i({global:!0,forced:parseInt!==o},{parseInt:o})},6499:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(9306),s=n(6043),a=n(1103),l=n(2652);i({target:"Promise",stat:!0,forced:n(537)},{all:function(t){var e=this,n=s.f(e),i=n.resolve,c=n.reject,u=a((function(){var n=r(e.resolve),s=[],a=0,u=1;l(t,(function(t){var r=a++,l=!1;u++,o(n,e,t).then((function(t){l||(l=!0,s[r]=t,--u||i(s))}),c)})),--u||i(s)}));return u.error&&c(u.value),n.promise}})},2003:(t,e,n)=>{var i=n(6518),o=n(6395),r=n(916).CONSTRUCTOR,s=n(550),a=n(7751),l=n(4901),c=n(6840),u=s&&s.prototype;if(i({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&l(s)){var h=a("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},436:(t,e,n)=>{var i,o,r,s=n(6518),a=n(6395),l=n(9088),c=n(4475),u=n(9565),h=n(6840),d=n(2967),p=n(687),f=n(7633),m=n(9306),y=n(4901),v=n(34),b=n(679),g=n(2293),_=n(9225).set,w=n(1955),x=n(3138),k=n(1103),O=n(8265),j=n(1181),C=n(550),E=n(916),P=n(6043),L="Promise",S=E.CONSTRUCTOR,T=E.REJECTION_EVENT,A=E.SUBCLASSING,R=j.getterFor(L),B=j.set,I=C&&C.prototype,z=C,M=I,N=c.TypeError,D=c.document,F=c.process,H=P.f,V=H,Z=!!(D&&D.createEvent&&c.dispatchEvent),q="unhandledrejection",U=function(t){var e;return!(!v(t)||!y(e=t.then))&&e},W=function(t,e){var n,i,o,r=e.value,s=1===e.state,a=s?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&K(e),e.rejection=1),!0===a?n=r:(h&&h.enter(),n=a(r),h&&(h.exit(),o=!0)),n===t.promise?c(new N("Promise-chain cycle")):(i=U(n))?u(i,n,l,c):l(n)):c(r)}catch(t){h&&!o&&h.exit(),c(t)}},G=function(t,e){t.notified||(t.notified=!0,w((function(){for(var n,i=t.reactions;n=i.get();)W(n,t);t.notified=!1,e&&!t.rejection&&$(t)})))},J=function(t,e,n){var i,o;Z?((i=D.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),c.dispatchEvent(i)):i={promise:e,reason:n},!T&&(o=c["on"+t])?o(i):t===q&&x("Unhandled promise rejection",n)},$=function(t){u(_,c,(function(){var e,n=t.facade,i=t.value;if(Y(t)&&(e=k((function(){l?F.emit("unhandledRejection",i,n):J(q,n,i)})),t.rejection=l||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},K=function(t){u(_,c,(function(){var e=t.facade;l?F.emit("rejectionHandled",e):J("rejectionhandled",e,t.value)}))},X=function(t,e,n){return function(i){t(e,i,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,G(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new N("Promise can't be resolved itself");var i=U(e);i?w((function(){var n={done:!1};try{u(i,e,X(tt,n,t),X(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,G(t,!1))}catch(e){Q({done:!1},e,t)}}};if(S&&(M=(z=function(t){b(this,M),m(t),u(i,this);var e=R(this);try{t(X(tt,e),X(Q,e))}catch(t){Q(e,t)}}).prototype,(i=function(t){B(this,{type:L,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:void 0})}).prototype=h(M,"then",(function(t,e){var n=R(this),i=H(g(this,z));return n.parent=!0,i.ok=!y(t)||t,i.fail=y(e)&&e,i.domain=l?F.domain:void 0,0===n.state?n.reactions.add(i):w((function(){W(i,n)})),i.promise})),o=function(){var t=new i,e=R(t);this.promise=t,this.resolve=X(tt,e),this.reject=X(Q,e)},P.f=H=function(t){return t===z||void 0===t?new o(t):V(t)},!a&&y(C)&&I!==Object.prototype)){r=I.then,A||h(I,"then",(function(t,e){var n=this;return new z((function(t,e){u(r,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete I.constructor}catch(t){}d&&d(I,M)}s({global:!0,constructor:!0,wrap:!0,forced:S},{Promise:z}),p(z,L,!1,!0),f(L)},3362:(t,e,n)=>{n(436),n(6499),n(2003),n(7743),n(1481),n(280)},7743:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(9306),s=n(6043),a=n(1103),l=n(2652);i({target:"Promise",stat:!0,forced:n(537)},{race:function(t){var e=this,n=s.f(e),i=n.reject,c=a((function(){var s=r(e.resolve);l(t,(function(t){o(s,e,t).then(n.resolve,i)}))}));return c.error&&i(c.value),n.promise}})},1481:(t,e,n)=>{var i=n(6518),o=n(6043);i({target:"Promise",stat:!0,forced:n(916).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return(0,e.reject)(t),e.promise}})},280:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(6395),s=n(550),a=n(916).CONSTRUCTOR,l=n(3438),c=o("Promise"),u=r&&!a;i({target:"Promise",stat:!0,forced:r||a},{resolve:function(t){return l(u&&this===c?s:this,t)}})},825:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(8745),s=n(566),a=n(5548),l=n(8551),c=n(34),u=n(2360),h=n(9039),d=o("Reflect","construct"),p=Object.prototype,f=[].push,m=h((function(){function t(){}return!(d((function(){}),[],t)instanceof t)})),y=!h((function(){d((function(){}))})),v=m||y;i({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(t,e){a(t),l(e);var n=arguments.length<3?t:a(arguments[2]);if(y&&!m)return d(t,e,n);if(t===n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var i=[null];return r(f,i,e),new(r(s,t,i))}var o=n.prototype,h=u(c(o)?o:p),v=r(t,h,e);return c(v)?v:h}})},888:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(34),s=n(8551),a=n(6575),l=n(7347),c=n(2787);i({target:"Reflect",stat:!0},{get:function t(e,n){var i,u,h=arguments.length<3?e:arguments[2];return s(e)===h?e[n]:(i=l.f(e,n))?a(i)?i.value:void 0===i.get?void 0:o(i.get,h):r(u=c(e))?t(u,n,h):void 0}})},4864:(t,e,n)=>{var i=n(3724),o=n(4475),r=n(9504),s=n(2796),a=n(3167),l=n(6699),c=n(2360),u=n(8480).f,h=n(1625),d=n(788),p=n(655),f=n(1034),m=n(8429),y=n(1056),v=n(6840),b=n(9039),g=n(9297),_=n(1181).enforce,w=n(7633),x=n(8227),k=n(3635),O=n(8814),j=x("match"),C=o.RegExp,E=C.prototype,P=o.SyntaxError,L=r(E.exec),S=r("".charAt),T=r("".replace),A=r("".indexOf),R=r("".slice),B=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,z=/a/g,M=new C(I)!==I,N=m.MISSED_STICKY,D=m.UNSUPPORTED_Y;if(s("RegExp",i&&(!M||N||k||O||b((function(){return z[j]=!1,C(I)!==I||C(z)===z||"/a/i"!==String(C(I,"i"))}))))){for(var F=function(t,e){var n,i,o,r,s,u,m=h(E,this),y=d(t),v=void 0===e,b=[],w=t;if(!m&&y&&v&&t.constructor===F)return t;if((y||h(E,t))&&(t=t.source,v&&(e=f(w))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),w=t,k&&"dotAll"in I&&(i=!!e&&A(e,"s")>-1)&&(e=T(e,/s/g,"")),n=e,N&&"sticky"in I&&(o=!!e&&A(e,"y")>-1)&&D&&(e=T(e,/y/g,"")),O&&(r=function(t){for(var e,n=t.length,i=0,o="",r=[],s=c(null),a=!1,l=!1,u=0,h="";i<=n;i++){if("\\"===(e=S(t,i)))e+=S(t,++i);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:L(B,R(t,i+1))&&(i+=2,l=!0),o+=e,u++;continue;case">"===e&&l:if(""===h||g(s,h))throw new P("Invalid capture group name");s[h]=!0,r[r.length]=[h,u],l=!1,h="";continue}l?h+=e:o+=e}return[o,r]}(t),t=r[0],b=r[1]),s=a(C(t,e),m?this:E,F),(i||o||b.length)&&(u=_(s),i&&(u.dotAll=!0,u.raw=F(function(t){for(var e,n=t.length,i=0,o="",r=!1;i<=n;i++)"\\"!==(e=S(t,i))?r||"."!==e?("["===e?r=!0:"]"===e&&(r=!1),o+=e):o+="[\\s\\S]":o+=e+S(t,++i);return o}(t),n)),o&&(u.sticky=!0),b.length&&(u.groups=b)),t!==w)try{l(s,"source",""===w?"(?:)":w)}catch(t){}return s},H=u(C),V=0;H.length>V;)y(F,C,H[V++]);E.constructor=F,F.prototype=E,v(o,"RegExp",F,{constructor:!0})}w("RegExp")},7495:(t,e,n)=>{var i=n(6518),o=n(7323);i({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},8781:(t,e,n)=>{var i=n(350).PROPER,o=n(6840),r=n(8551),s=n(655),a=n(9039),l=n(1034),c="toString",u=RegExp.prototype,h=u[c],d=a((function(){return"/a/b"!==h.call({source:"a",flags:"b"})})),p=i&&h.name!==c;(d||p)&&o(u,c,(function(){var t=r(this);return"/"+s(t.source)+"/"+s(l(t))}),{unsafe:!0})},1699:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(5749),s=n(7750),a=n(655),l=n(1436),c=o("".indexOf);i({target:"String",proto:!0,forced:!l("includes")},{includes:function(t){return!!~c(a(s(this)),a(r(t)),arguments.length>1?arguments[1]:void 0)}})},7764:(t,e,n)=>{var i=n(8183).charAt,o=n(655),r=n(1181),s=n(1088),a=n(2529),l="String Iterator",c=r.set,u=r.getterFor(l);s(String,"String",(function(t){c(this,{type:l,string:o(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?a(void 0,!0):(t=i(n,o),e.index+=t.length,a(t,!1))}))},1761:(t,e,n)=>{var i=n(9565),o=n(9228),r=n(8551),s=n(4117),a=n(8014),l=n(655),c=n(7750),u=n(5966),h=n(7829),d=n(6682);o("match",(function(t,e,n){return[function(e){var n=c(this),o=s(e)?void 0:u(e,t);return o?i(o,e,n):new RegExp(e)[t](l(n))},function(t){var i=r(this),o=l(t),s=n(e,i,o);if(s.done)return s.value;if(!i.global)return d(i,o);var c=i.unicode;i.lastIndex=0;for(var u,p=[],f=0;null!==(u=d(i,o));){var m=l(u[0]);p[f]=m,""===m&&(i.lastIndex=h(o,a(i.lastIndex),c)),f++}return 0===f?null:p}]}))},5440:(t,e,n)=>{var i=n(8745),o=n(9565),r=n(9504),s=n(9228),a=n(9039),l=n(8551),c=n(4901),u=n(4117),h=n(1291),d=n(8014),p=n(655),f=n(7750),m=n(7829),y=n(5966),v=n(2478),b=n(6682),g=n(8227)("replace"),_=Math.max,w=Math.min,x=r([].concat),k=r([].push),O=r("".indexOf),j=r("".slice),C="$0"==="a".replace(/./,"$0"),E=!!/./[g]&&""===/./[g]("a","$0");s("replace",(function(t,e,n){var r=E?"$":"$0";return[function(t,n){var i=f(this),r=u(t)?void 0:y(t,g);return r?o(r,t,i,n):o(e,p(i),t,n)},function(t,o){var s=l(this),a=p(t);if("string"==typeof o&&-1===O(o,r)&&-1===O(o,"$<")){var u=n(e,s,a,o);if(u.done)return u.value}var f=c(o);f||(o=p(o));var y,g=s.global;g&&(y=s.unicode,s.lastIndex=0);for(var C,E=[];null!==(C=b(s,a))&&(k(E,C),g);)""===p(C[0])&&(s.lastIndex=m(a,d(s.lastIndex),y));for(var P,L="",S=0,T=0;T<E.length;T++){for(var A,R=p((C=E[T])[0]),B=_(w(h(C.index),a.length),0),I=[],z=1;z<C.length;z++)k(I,void 0===(P=C[z])?P:String(P));var M=C.groups;if(f){var N=x([R],I,B,a);void 0!==M&&k(N,M),A=p(i(o,void 0,N))}else A=v(R,a,B,I,M,o);B>=S&&(L+=j(a,S,B)+A,S=B+R.length)}return L+j(a,S)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!C||E)},1392:(t,e,n)=>{var i,o=n(6518),r=n(7476),s=n(7347).f,a=n(8014),l=n(655),c=n(5749),u=n(7750),h=n(1436),d=n(6395),p=r("".slice),f=Math.min,m=h("startsWith");o({target:"String",proto:!0,forced:!(!d&&!m&&(i=s(String.prototype,"startsWith"),i&&!i.writable)||m)},{startsWith:function(t){var e=l(u(this));c(t);var n=a(f(arguments.length>1?arguments[1]:void 0,e.length)),i=l(t);return p(e,n,n+i.length)===i}})},2762:(t,e,n)=>{var i=n(6518),o=n(3802).trim;i({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return o(this)}})},6412:(t,e,n)=>{n(511)("asyncIterator")},6761:(t,e,n)=>{var i=n(6518),o=n(4475),r=n(9565),s=n(9504),a=n(6395),l=n(3724),c=n(4495),u=n(9039),h=n(9297),d=n(1625),p=n(8551),f=n(5397),m=n(6969),y=n(655),v=n(6980),b=n(2360),g=n(1072),_=n(8480),w=n(298),x=n(3717),k=n(7347),O=n(4913),j=n(6801),C=n(8773),E=n(6840),P=n(2106),L=n(5745),S=n(6119),T=n(421),A=n(3392),R=n(8227),B=n(1951),I=n(511),z=n(8242),M=n(687),N=n(1181),D=n(9213).forEach,F=S("hidden"),H="Symbol",V="prototype",Z=N.set,q=N.getterFor(H),U=Object[V],W=o.Symbol,G=W&&W[V],J=o.RangeError,$=o.TypeError,Y=o.QObject,K=k.f,X=O.f,Q=w.f,tt=C.f,et=s([].push),nt=L("symbols"),it=L("op-symbols"),ot=L("wks"),rt=!Y||!Y[V]||!Y[V].findChild,st=function(t,e,n){var i=K(U,e);i&&delete U[e],X(t,e,n),i&&t!==U&&X(U,e,i)},at=l&&u((function(){return 7!==b(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?st:X,lt=function(t,e){var n=nt[t]=b(G);return Z(n,{type:H,tag:t,description:e}),l||(n.description=e),n},ct=function(t,e,n){t===U&&ct(it,e,n),p(t);var i=m(e);return p(n),h(nt,i)?(n.enumerable?(h(t,F)&&t[F][i]&&(t[F][i]=!1),n=b(n,{enumerable:v(0,!1)})):(h(t,F)||X(t,F,v(1,b(null))),t[F][i]=!0),at(t,i,n)):X(t,i,n)},ut=function(t,e){p(t);var n=f(e),i=g(n).concat(ft(n));return D(i,(function(e){l&&!r(ht,n,e)||ct(t,e,n[e])})),t},ht=function(t){var e=m(t),n=r(tt,this,e);return!(this===U&&h(nt,e)&&!h(it,e))&&(!(n||!h(this,e)||!h(nt,e)||h(this,F)&&this[F][e])||n)},dt=function(t,e){var n=f(t),i=m(e);if(n!==U||!h(nt,i)||h(it,i)){var o=K(n,i);return!o||!h(nt,i)||h(n,F)&&n[F][i]||(o.enumerable=!0),o}},pt=function(t){var e=Q(f(t)),n=[];return D(e,(function(t){h(nt,t)||h(T,t)||et(n,t)})),n},ft=function(t){var e=t===U,n=Q(e?it:f(t)),i=[];return D(n,(function(t){!h(nt,t)||e&&!h(U,t)||et(i,nt[t])})),i};c||(E(G=(W=function(){if(d(G,this))throw new $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=A(t),n=function(t){var i=void 0===this?o:this;i===U&&r(n,it,t),h(i,F)&&h(i[F],e)&&(i[F][e]=!1);var s=v(1,t);try{at(i,e,s)}catch(t){if(!(t instanceof J))throw t;st(i,e,s)}};return l&&rt&&at(U,e,{configurable:!0,set:n}),lt(e,t)})[V],"toString",(function(){return q(this).tag})),E(W,"withoutSetter",(function(t){return lt(A(t),t)})),C.f=ht,O.f=ct,j.f=ut,k.f=dt,_.f=w.f=pt,x.f=ft,B.f=function(t){return lt(R(t),t)},l&&(P(G,"description",{configurable:!0,get:function(){return q(this).description}}),a||E(U,"propertyIsEnumerable",ht,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),D(g(ot),(function(t){I(t)})),i({target:H,stat:!0,forced:!c},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?b(t):ut(b(t),e)},defineProperty:ct,defineProperties:ut,getOwnPropertyDescriptor:dt}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pt}),z(),M(W,H),T[F]=!0},9463:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(4475),s=n(9504),a=n(9297),l=n(4901),c=n(1625),u=n(655),h=n(2106),d=n(7740),p=r.Symbol,f=p&&p.prototype;if(o&&l(p)&&(!("description"in f)||void 0!==p().description)){var m={},y=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(f,this)?new p(t):void 0===t?p():p(t);return""===t&&(m[e]=!0),e};d(y,p),y.prototype=f,f.constructor=y;var v="Symbol(description detection)"===String(p("description detection")),b=s(f.valueOf),g=s(f.toString),_=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),x=s("".slice);h(f,"description",{configurable:!0,get:function(){var t=b(this);if(a(m,t))return"";var e=g(t),n=v?x(e,7,-1):w(e,_,"$1");return""===n?void 0:n}}),i({global:!0,constructor:!0,forced:!0},{Symbol:y})}},1510:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(9297),s=n(655),a=n(5745),l=n(1296),c=a("string-to-symbol-registry"),u=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=s(t);if(r(c,e))return c[e];var n=o("Symbol")(e);return c[e]=n,u[n]=e,n}})},2259:(t,e,n)=>{n(511)("iterator")},2675:(t,e,n)=>{n(6761),n(1510),n(7812),n(3110),n(9773)},7812:(t,e,n)=>{var i=n(6518),o=n(9297),r=n(757),s=n(6823),a=n(5745),l=n(1296),c=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!r(t))throw new TypeError(s(t)+" is not a symbol");if(o(c,t))return c[t]}})},5700:(t,e,n)=>{var i=n(511),o=n(8242);i("toPrimitive"),o()},8125:(t,e,n)=>{var i=n(7751),o=n(511),r=n(687);o("toStringTag"),r(i("Symbol"),"Symbol")},3500:(t,e,n)=>{var i=n(4475),o=n(7400),r=n(9296),s=n(235),a=n(6699),l=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in o)o[c]&&l(i[c]&&i[c].prototype);l(r)},2953:(t,e,n)=>{var i=n(4475),o=n(7400),r=n(9296),s=n(3792),a=n(6699),l=n(687),c=n(8227)("iterator"),u=s.values,h=function(t,e){if(t){if(t[c]!==u)try{a(t,c,u)}catch(e){t[c]=u}if(l(t,e,!0),o[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var d in o)h(i[d]&&i[d].prototype,d);h(r,"DOMTokenList")},5575:(t,e,n)=>{var i=n(6518),o=n(4475),r=n(9472)(o.setInterval,!0);i({global:!0,bind:!0,forced:o.setInterval!==r},{setInterval:r})},4599:(t,e,n)=>{var i=n(6518),o=n(4475),r=n(9472)(o.setTimeout,!0);i({global:!0,bind:!0,forced:o.setTimeout!==r},{setTimeout:r})},6031:(t,e,n)=>{n(5575),n(4599)}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{JSONEditor:()=>Ka}),n(2675),n(9463),n(6412),n(2259),n(5700),n(8125),n(8706),n(113),n(1629),n(3418),n(4346),n(3792),n(2712),n(4490),n(4782),n(739),n(9572),n(3288),n(2010),n(4731),n(479),n(2892),n(9085),n(9904),n(4185),n(875),n(9432),n(287),n(6099),n(6034),n(3362),n(7495),n(8781),n(7764),n(3500),n(2953),n(5506),n(4864),n(5440),n(4423);var t=["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"],e=[function(t){return"string"===t.type&&"color"===t.format&&"colorpicker"},function(t){return"string"===t.type&&["ip","ipv4","ipv6","hostname"].includes(t.format)&&"ip"},function(e){return"string"===e.type&&t.includes(e.format)&&"ace"},function(t){return"string"===t.type&&["xhtml","bbcode"].includes(t.format)&&"sceditor"},function(t){return"string"===t.type&&"markdown"===t.format&&"simplemde"},function(t){return"string"===t.type&&"jodit"===t.format&&"jodit"},function(t){return"string"===t.type&&"autocomplete"===t.format&&"autocomplete"},function(t){return"string"===t.type&&"uuid"===t.format&&"uuid"},function(t){return"info"===t.format&&"info"},function(t){return"button"===t.format&&"button"},function(t){if(("integer"===t.type||"number"===t.type)&&"stepper"===t.format)return"stepper"},function(t){if(t.links)for(var e=0;e<t.links.length;e++)if(t.links[e].rel&&"describedby"===t.links[e].rel.toLowerCase())return"describedBy"},function(t){return["string","integer"].includes(t.type)&&["starrating","rating"].includes(t.format)&&"starrating"},function(t){return["string","integer"].includes(t.type)&&["date","time","datetime-local"].includes(t.format)&&"datetime"},function(t){var e,n;return(t.oneOf||t.anyOf)&&!0===(null===(e=null===(n=t.options)||void 0===n?void 0:n.switcher)||void 0===e||e)&&"multiple"},function(t){return t.if&&"multiple"},function(t,e){if(t.items&&(t.items=e.expandSchema(t.items)),"array"===t.type&&t.items&&!Array.isArray(t.items)&&["string","number","integer"].includes(t.items.type)){if("choices"===t.format)return"arrayChoices";if(t.uniqueItems){if("selectize"===t.format)return"arraySelectize";if("select2"===t.format)return"arraySelect2";if(t.items.enum)return"multiselect"}}},function(t){if(t.enum){if("array"===t.type||"object"===t.type)return"enum";if("number"===t.type||"integer"===t.type||"string"===t.type)return"radio"===t.format?"radio":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"}},function(t){if(t.enumSource)return"radio"===t.format?"radio":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"},function(t){return"array"===t.type&&"table"===t.format&&"table"},function(t){return"string"===t.type&&"url"===t.format&&window.FileReader&&t.options&&t.options.upload===Object(t.options.upload)&&"upload"},function(t){return"string"===t.type&&t.media&&"base64"===t.media.binaryEncoding&&"base64"},function(t){return"any"===t.type&&"multiple"},function(t){if("boolean"===t.type)return"checkbox"===t.format||t.options&&t.options.checkbox?"checkbox":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"},function(t){return"string"===t.type&&"signature"===t.format&&"signature"},function(t){return"string"==typeof t.type&&["string","number","integer","boolean","null","array","object"].includes(t.type)&&t.type},function(t){return!t.type&&t.properties&&"object"},function(t){return"string"!=typeof t.type&&"multiple"},function(t){return"string"==typeof t.type&&"string"}];function o(t,e,n){var i;return i=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==r(i)?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t){return!(null===t||"object"!==r(t)||t.nodeType||t===t.window||t.constructor&&!h(t.constructor.prototype,"isPrototypeOf"))}function a(t){return s(t)?l({},t):Array.isArray(t)?t.map(a):t}function l(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.forEach((function(e){e&&Object.keys(e).forEach((function(n){e[n]&&s(e[n])?(h(t,n)||(t[n]={}),l(t[n],e[n])):Array.isArray(e[n])?t[n]=a(e[n]):t[n]=e[n]}))})),t}function c(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function u(t){return t&&("[object ShadowRoot]"===t.toString()?t:u(t.parentNode))}function h(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}n(4170),n(3851),n(825),n(888),n(8598),n(1699),n(1761),n(5276),n(5086),n(1392),n(2062),n(8459),n(8940);var d=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,p=/^\s*(-|\+)?(\d+)\s*$/;function f(){var t=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))}function m(t){return t&&"object"===r(t)&&!Array.isArray(t)}function y(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];if(!n.length)return t;var r=n.shift();if(m(t)&&m(r))for(var s in r)m(r[s])?(t[s]||Object.assign(t,o({},s,{})),y(t[s],r[s])):Object.assign(t,o({},s,r[s]));return y.apply(void 0,[t].concat(n))}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}var _=function(){return t=function t(e,n){var i,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaults=n,this.jsoneditor=e.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=e.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.isUiOnly=!1,this.options=l({},this.options||{},this.schema.options||{},e.schema.options||{},e),this.enforceConstEnabled=null!==(i=this.options.enforce_const)&&void 0!==i?i:this.jsoneditor.options.enforce_const,this.formname=this.jsoneditor.options.form_name_root||"root",e.path||this.schema.id||(this.schema.id=this.formname),this.path=e.path||this.formname,this.formname=e.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=e.parent,this.key=void 0!==this.parent?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,this.optInWidget=null!==(o=this.options.opt_in_widget)&&void 0!==o?o:this.jsoneditor.options.opt_in_widget,e.container&&this.setContainer(e.container),this.registerDependencies()},e=[{key:"onChildEditorChange",value:function(t,e){this.onChange(!0,!1,e)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(t){this.parent?this.parent.onChildEditorChange(this,t):this.jsoneditor&&this.jsoneditor.onChange(t)}},{key:"onChange",value:function(t,e,n){this.notify(),e||this.watch_listener&&this.watch_listener(),t&&this.change(n)}},{key:"register",value:function(){if(this.jsoneditor.registerEditor(this),this.input&&!this.label){var t=this.getTitle()||this.formname;this.input.setAttribute("aria-label",t)}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 t=this;this.dependenciesFulfilled=!0;var e=this.options.dependencies;e&&Object.keys(e).forEach((function(e){var n;e.startsWith(t.jsoneditor.root.path)?n=e:((n=t.path.split("."))[n.length-1]=e,n=n.join(".")),t.jsoneditor.watch(n,(function(){t.evaluateDependencies()}))}))}},{key:"evaluateDependencies",value:function(){var t=this,e=this.container||this.control;if(e&&null!==this.jsoneditor){var n=this.options.dependencies;if(n){var i=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(n).forEach((function(e){var i;e.startsWith(t.jsoneditor.root.path)?i=e:((i=t.path.split("."))[i.length-1]=e,i=i.join("."));var o=n[e];t.checkDependency(i,o)})),this.dependenciesFulfilled!==i&&this.notify();var o=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(o="none"),"TD"===e.tagName?Object.keys(e.childNodes).forEach((function(t){return e.childNodes[t].style.display=o})):e.style.display=o}}}},{key:"checkDependency",value:function(t,e){var n=this;if(this.path!==t&&null!==this.jsoneditor){var i=this.jsoneditor.getEditor(t),o=i?i.getValue():void 0;i&&i.dependenciesFulfilled&&o?Array.isArray(e)?this.dependenciesFulfilled=e.some((function(t){if(JSON.stringify(o)===JSON.stringify(t))return!0})):"object"===b(e)?"object"!==b(o)?this.dependenciesFulfilled=e===o:Object.keys(e).some((function(t){return!!h(e,t)&&(h(o,t)&&e[t]===o[t]?void 0:(n.dependenciesFulfilled=!1,!0))})):"string"==typeof e||"number"==typeof e?this.dependenciesFulfilled=this.dependenciesFulfilled&&o===e:"boolean"==typeof e&&(this.dependenciesFulfilled=e?this.dependenciesFulfilled&&(o||o.length>0):this.dependenciesFulfilled&&(!o||0===o.length)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(t){this.container=t,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&"string"==typeof this.schema.type&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(){var t,e=this;t="switch"===this.optInWidget?this.theme.getOptInSwitch(this.formname):this.theme.getOptInCheckbox(this.formname),this.optInCheckbox=t.checkbox,this.optInContainer=t.container,this.optInCheckbox.addEventListener("click",(function(){e.isActive()?e.deactivate():e.activate()}));var n=this.jsoneditor.options.show_opt_in,i=void 0!==this.parent.options.show_opt_in,o=i&&!0===this.parent.options.show_opt_in,r=i&&!1===this.parent.options.show_opt_in;(o||!r&&n||!i&&n)&&this.parent&&"object"===this.parent.schema.type&&!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 t=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){t.refreshWatchedFieldValues()&&t.onWatchedFieldChange()},h(this.schema,"watch")){var e,n,i,o,r,s=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(a){if(e=t.schema.watch[a],Array.isArray(e)){if(e.length<2)return;n=[e[0]].concat(e[1].split("."))}else n=e.split("."),t.theme.closest(t.container,'[data-schemaid="'.concat(n[0],'"]'))||n.unshift("#");if("#"===(i=n.shift())&&(i=t.jsoneditor.schema.id||t.jsoneditor.root.formname),!(o=t.theme.closest(t.container,'[data-schemaid="'.concat(i,'"]'))))throw new Error("Could not find ancestor node with id ".concat(i));r="".concat(o.getAttribute("data-schemapath"),".").concat(n.join(".")),s.startsWith(r)&&(t.watchLoop=!0),t.jsoneditor.watch(r,t.watch_listener),t.watched[a]=r}))}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(),void 0!==this.description?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var t=0;t<this.schema.links.length;t++)this.addLink(this.getLink(this.schema.links[t]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o="json-editor-btn-".concat(e);e=this.iconlib?this.iconlib.getIcon(e):null,t=this.translate(t,i),n=this.translate(n,i),!e&&n&&(t=n,n=null);var r=this.theme.getButton(t,e,n);return r.classList.add(o),r}},{key:"setButtonText",value:function(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return n=this.iconlib?this.iconlib.getIcon(n):null,e=this.translate(e,o),i=this.translate(i,o),!n&&i&&(e=i,i=null),this.theme.setButtonText(t,e,n,i)}},{key:"addLink",value:function(t){this.link_holder&&this.link_holder.appendChild(t)}},{key:"getLink",value:function(t){var e,n,i=(t.mediaType||"application/javascript").split("/")[0],o=this.jsoneditor.compileTemplate(t.href,this.template_engine),r=this.jsoneditor.compileTemplate(t.rel?t.rel:t.href,this.template_engine),s=null;if(t.download&&(s=t.download),s&&!0!==s&&(s=this.jsoneditor.compileTemplate(s,this.template_engine)),"image"===i){e=this.theme.getBlockLinkHolder(),(n=document.createElement("a")).setAttribute("target","_blank");var a=document.createElement("img");this.theme.createImageLink(e,n,a),this.link_watchers.push((function(t){var e=o(t),i=r(t);n.setAttribute("href",e),n.setAttribute("title",i||e),a.setAttribute("src",e)}))}else if(["audio","video"].includes(i)){e=this.theme.getBlockLinkHolder(),(n=this.theme.getBlockLink()).setAttribute("target","_blank");var l=document.createElement(i);l.setAttribute("controls","controls"),this.theme.createMediaLink(e,n,l),this.link_watchers.push((function(t){var e=o(t),i=r(t);n.setAttribute("href",e),n.textContent=i||e,l.setAttribute("src",e)}))}else n=e=this.theme.getBlockLink(),e.setAttribute("target","_blank"),e.textContent=t.rel,e.style.display="none",this.link_watchers.push((function(t){var n=o(t),i=r(t);n&&(e.style.display=""),e.setAttribute("href",n),e.textContent=i||n}));return s&&n&&(!0===s?n.setAttribute("download",""):this.link_watchers.push((function(t){n.setAttribute("download",s(t))}))),t.class&&t.class.split(" ").forEach((function(t){n.classList.add(t)})),e}},{key:"refreshWatchedFieldValues",value:function(){var t=this;if(this.watched_values){var e={},n=!1;return this.watched&&Object.keys(this.watched).forEach((function(i){var o=t.jsoneditor.getEditor(t.watched[i]),r=o?o.getValue():null;t.watched_values[i]!==r&&(n=!0),e[i]=r})),e.self=this.getValue(),this.watched_values.self!==e.self&&(n=!0),this.watched_values=e,n}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var t=this.getHeaderText();if(this.header.children.length){for(var e=0;e<this.header.childNodes.length;e++)if(3===this.header.childNodes[e].nodeType){this.header.childNodes[e].nodeValue=this.cleanText(t);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(t):this.header.textContent=this.cleanText(t)}}},{key:"getHeaderText",value:function(t){return this.header_text?this.header_text:t?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"onWatchedFieldChange",value:function(){var t,e=this;if(this.header_template){t=l(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&&(t.properties={},Object.keys(this.editors).forEach((function(n){var i=e.editors[n];if(i.schema&&i.schema.enum&&i.schema.options&&i.schema.options.enum_titles){var o=i.schema.enum.indexOf(i.value),r=i.options.enum_titles[o];t.properties[n]={enumTitle:r}}})));var n=this.header_template(t);n!==this.header_text&&(this.header_text=n,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){t=this.getWatchedFieldValues();for(var i=0;i<this.link_watchers.length;i++)this.link_watchers[i](t)}}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value=t}},{key:"applyConstFilter",value:function(t){return this.enforceConstEnabled&&void 0!==this.schema.const&&(t=this.schema.const),t}},{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 t=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach((function(e){return t.jsoneditor.unwatch(e,t.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(void 0!==this.schema.default)return this.schema.default;if(void 0!==this.schema.enum)return this.schema.enum[0];var t=this.schema.type||this.schema.oneOf;if(t&&Array.isArray(t)&&(t=t[0]),t&&"object"===b(t)&&(t=t.type),t&&Array.isArray(t)&&(t=t[0]),"string"==typeof t){if("number"===t)return this.isDefaultRequired()?0:void 0;if("boolean"===t)return!this.isDefaultRequired()&&void 0;if("integer"===t)return this.isDefaultRequired()?0:void 0;if("string"===t)return this.isDefaultRequired()?"":void 0;if("null"===t)return null;if("object"===t)return{};if("array"===t)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"boolean"==typeof this.schema.required?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(t){var e=[],n={};t.forEach((function(t){t.title&&(n[t.title]=n[t.title]||0,n[t.title]++),t.description&&(n[t.description]=n[t.description]||0,n[t.description]++),t.format&&(n[t.format]=n[t.format]||0,n[t.format]++),t.type&&(n[t.type]=n[t.type]||0,n[t.type]++)})),t.forEach((function(t){var i;i="string"==typeof t?t:t.title&&n[t.title]<=1?t.title:t.format&&n[t.format]<=1?t.format:t.type&&n[t.type]<=1?t.type:t.description&&n[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",e.push(i)}));var i={};return e.forEach((function(t,o){i[t]=i[t]||0,i[t]++,n[t]>1&&(e[o]="".concat(t," ").concat(i[t]))})),e}},{key:"getValidId",value:function(t){return(t=void 0===t?"":t.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(t,e){if(this.schema.options&&this.schema.options.inputAttributes){var n=this.schema.options.inputAttributes,i=["name","type"].concat(t),o=e||this.input;Object.keys(n).forEach((function(t){i.includes(t.toLowerCase())||o.setAttribute(t,n[t])}))}}},{key:"setContainerAttributes",value:function(){var t=this;if(this.schema.options&&this.schema.options.containerAttributes){var e=this.schema.options.containerAttributes,n=["data-schemapath","data-schematype","data-schemaid"];Object.keys(e).forEach((function(i){n.includes(i.toLowerCase())||t.container.setAttribute(i,e[i])}))}}},{key:"expandCallbacks",value:function(t,e){var n=this,i=this.defaults.callbacks[t];return Object.entries(e).forEach((function(o){var r,s=function(t){if(Array.isArray(t))return t}(r=o)||function(t){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,o,r,s=[],a=!0,l=!1;try{for(o=(e=e.call(t)).next;!(a=(n=o.call(e)).done)&&(s.push(n.value),2!==s.length);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(l)throw i}}return s}}(r)||function(t){if(t){if("string"==typeof t)return v(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?v(t,2):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=s[0],l=s[1];l===Object(l)?e[a]=n.expandCallbacks(t,l):"string"==typeof l&&"object"===b(i)&&"function"==typeof i[l]&&(e[a]=i[l].bind(null,n))})),e}},{key:"showValidationErrors",value:function(t){}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,g(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function x(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function k(t,e,n){return e=C(e),function(t,e){if(e&&("object"===w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],C(t).constructor):e.apply(t,n))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},j.apply(this,arguments)}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}var P=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),k(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){j(C(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){j(C(e.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,n){if(t=this.applyConstFilter(t),(!this.template||n)&&(this.shouldBeUnset()||null!=t?"object"===w(t)?t=JSON.stringify(t):this.shouldBeUnset()||"string"==typeof t||(t="".concat(t)):t="",t!==this.serialized)){var i=this.sanitize(t);if(this.input.value!==i){if(this.setValueToInputField(i),"range"===this.format){var o=this.control.querySelector("output");o&&(o.value=i)}var r=n||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),r&&this.onChange(!0,n),{changed:r,value:i}}}}},{key:"setValueToInputField",value:function(t){this.input.value=void 0===t?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t="textarea"===this.input_type?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t,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.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("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var n=this.schema.minimum||0,i=this.schema.maximum||Math.max(100,n+1),o=1;this.schema.multipleOf&&(n%this.schema.multipleOf&&(n=Math.ceil(n/this.schema.multipleOf)*this.schema.multipleOf),i%this.schema.multipleOf&&(i=Math.floor(i/this.schema.multipleOf)*this.schema.multipleOf),o=this.schema.multipleOf),this.input=this.theme.getRangeInput(n,i,o,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);void 0!==this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),void 0!==this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):void 0!==this.schema.minLength&&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(t){if(t.preventDefault(),t.stopPropagation(),e.schema.template)t.currentTarget.value=e.value;else{var n=t.currentTarget.value,i=e.sanitize(n);n!==i&&(t.currentTarget.value=i),e.is_dirty=!0,e.refreshValue(),e.onChange(!0)}})),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(t){if(t){var e,n=t.offsetHeight;if(t.offsetHeight<t.scrollHeight)for(e=0;t.offsetHeight<t.scrollHeight+3&&!(e>100);)e++,n++,t.style.height="".concat(n,"px");else{for(e=0;t.offsetHeight>=t.scrollHeight+3&&!(e>100);)e++,n--,t.style.height="".concat(n,"px");t.style.height="".concat(n+1,"px")}}},this.input.addEventListener("keyup",(function(t){e.adjust_height(t.currentTarget)})),this.input.addEventListener("change",(function(t){e.adjust_height(t.currentTarget)})),this.adjust_height());var r=null!==(t=this.options.prompt_paste_max_length_reached)&&void 0!==t?t:this.jsoneditor.options.prompt_paste_max_length_reached,s=void 0!==this.schema.maxLength;r&&s&&this.input.addEventListener("paste",(function(t){(t.clipboardData||window.clipboardData).getData("text").length+e.input.value.length>e.schema.maxLength&&alert(e.translate("paste_max_length_reached",[e.schema.maxLength]))})),this.format&&this.input.setAttribute("data-schemaformat",this.format);var a=this.input;if("range"===this.format&&(a=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,a,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.input.parentNode&&e.afterInputReady(),e.adjust_height&&e.adjust_height(e.input),"range"===e.format&&(e.control.querySelector("output").value=e.input.value)})),this.schema.template){var l=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof l.template?this.template=l.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",l({},this.defaults.options.cleave||{},this.options.cleave||{}));"object"===w(e)&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",l({},this.defaults.options.imask||{},this.options.imask||{}));"object"===w(e)&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach((function(n){if(t[n]===Object(t[n]))t[n]=e.ajustIMaskOptions(t[n]);else if("mask"===n)if("regex:"===t[n].substr(0,6)){var i=t[n].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(null!==i)try{t[n]=new RegExp(i[1],i[2])}catch(t){}}else t[n]=e.getGlobalPropertyFromString(t[n])})),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),n=e[0],i=e[1];if(void 0!==window[n]&&void 0!==window[n][i])return window[n][i]}else if(void 0!==window[t])return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:j(C(e.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,j(C(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,j(C(e.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,"string"==typeof this.value||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),j(C(e.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),j(C(e.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var n=t.reduce((function(t,n){return n.path===e.path&&t.push(n.message),t}),[]);n.length?this.theme.addInputError(this.input,"".concat(n.join(". "),".")):this.theme.removeInputError(this.input)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,x(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function S(t){var e=function(t){if("object"!=L(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==L(e)?e:e+""}function T(t,e,n){return e=B(e),function(t,e){if(e&&("object"===L(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,A()?Reflect.construct(e,n||[],B(t).constructor):e.apply(t,n))}function A(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(A=function(){return!!t})()}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=B(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},R.apply(this,arguments)}function B(t){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},B(t)}function I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}var z=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),T(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=R(B(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(o.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",R(B(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,n=this;if(window.ace){var i=this.input_type;"cpp"!==i&&"c++"!==i&&"c"!==i||(i="c_cpp"),t=this.expandCallbacks("ace",l({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(i)})),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,t),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(){n.input.value=n.ace_editor_instance.getValue(),n.refreshValue(),n.is_dirty=!0,n.onChange(!0)})),this.theme.afterInputReady(this.input)}else R(B(e.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),R(B(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),R(B(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),R(B(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,S(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function N(t){var e=function(t){if("object"!=M(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==M(e)?e:e+""}function D(t,e,n){return e=V(e),function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,F()?Reflect.construct(e,n||[],V(t).constructor):e.apply(t,n))}function F(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(F=function(){return!!t})()}function H(){return H="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=V(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},H.apply(this,arguments)}function V(t){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},V(t)}function Z(t,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Z(t,e)}n(2008),n(4554);var q=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),D(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Z(t,e)}(e,t),n=e,i=[{key:"askConfirmation",value:function(){return!0!==this.jsoneditor.options.prompt_before_delete||!1!==window.confirm(this.translate("button_delete_node_warning"))}},{key:"register",value:function(){H(V(e.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(t){return t.register()}))}},{key:"unregister",value:function(){H(V(e.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach((function(t){return t.unregister()}))}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&"tabs-top"!==this.schema.format?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach((function(e){e.enable(),t.setAvailability(e,!1)})),H(V(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var n=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach((function(e){e.disable(t),n.setAvailability(e,!0)})),H(V(e.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){H(V(e.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),"tabs-top"===this.schema.format?(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):"tabs"===this.schema.format?(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(){H(V(e.prototype),"postBuild",this).call(this),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"onChildEditorChange",value:function(t,n){this.refreshValue(),this.refreshTabs(!0),this.is_dirty=!0,H(V(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.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(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?!0===this.schema.additionalItems?{}:this.schema.additionalItems?l({},this.schema.additionalItems):void 0:l({},this.schema.items[t]):this.schema.items?l({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var n=JSON.stringify(e);return void 0!==this.item_info[n]||(e=this.jsoneditor.expandRefs(e),this.item_info[n]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[n]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),n=this.getItemSchema(t);(n=this.jsoneditor.expandRefs(n)).title="".concat(e.title," ").concat(t+1);var i,o=this.jsoneditor.getEditorClass(n);this.tabs_holder?(i="tabs-top"===this.schema.format?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):i=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(i);var r=this.jsoneditor.createEditor(o,{jsoneditor:this.jsoneditor,schema:n,container:i,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return r.preBuild(),r.build(),r.postBuild(),r.title_controls||(r.array_controls=this.theme.getButtonHolder(),i.appendChild(r.array_controls)),r}},{key:"checkParent",value:function(t){return t&&t.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,H(V(e.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;if(null!==this.rows){if(this.rows.forEach((function(n,i){t&&(e.checkParent(n.tab)&&n.tab.parentNode.removeChild(n.tab),e.destroyRow(n,!0),e.row_cache[i]=null),e.rows[i]=null})),t)for(var n=this.rows.length;n<this.row_cache.length;n++)this.destroyRow(this.row_cache[n],!0),this.row_cache[n]=null;this.rows=[],t&&(this.row_cache=[])}}},{key:"destroyRow",value:function(t,e){var n=t.container;e?(t.destroy(),n.parentNode&&n.parentNode.removeChild(n),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),n.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&!1===this.schema.additionalItems?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach((function(n){n.tab&&(t?n.tab_text.textContent=n.getHeaderText():n.tab===e.active_tab?e.theme.markTabActive(n):e.theme.markTabInactive(n))}))}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(e=this.applyConstFilter(e),e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach((function(e,i){if(t.rows[i])t.rows[i].setValue(e,n);else if(t.row_cache[i])t.rows[i]=t.row_cache[i],t.rows[i].setValue(e,n),t.rows[i].container.style.display="",t.rows[i].tab&&(t.rows[i].tab.style.display=""),t.rows[i].register(),t.jsoneditor.trigger("addRow",t.rows[i]);else{var o=t.addRow(e,n);t.jsoneditor.trigger("addRow",o)}}));for(var i=e.length;i<this.rows.length;i++)this.destroyRow(this.rows[i]),this.rows[i]=null;this.rows=this.rows.slice(0,e.length);var o=this.rows.find((function(e){return e.tab===t.active_tab})),r=void 0!==o?o.tab:null;!r&&this.rows.length&&(r=this.rows[0].tab),this.active_tab=r,this.refreshValue(n),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}else n&&this.refreshValue(n)}},{key:"setButtonState",value:function(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:t.style.display=e?"":"none";break;case 2:t.disabled=!e}}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(1===this.value.length){this.setButtonState(this.remove_all_rows_button,!1);var n=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,n),e.push(n)}else{var i=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,i),e.push(i);var o=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,o),e.push(o)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var r=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,r),e.push(r),e.some((function(t){return t}))}},{key:"refreshValue",value:function(t){var e=this,n=this.value?this.value.length:0;if(this.value=this.rows.map((function(t){return t.getValue()})),n!==this.value.length||t){var i=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(t,n){if(t.movedown_button){var o=n!==e.rows.length-1;e.setButtonState(t.movedown_button,o)}t.delete_button&&e.setButtonState(t.delete_button,!i),e.value[n]=t.getValue()})),this.setupButtons(i)&&!this.collapsed?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var n=this,i=this.rows.length;this.rows[i]=this.getElementEditor(i),this.row_cache[i]=this.rows[i],this.tabs_holder?(this.rows[i].tab_text=document.createElement("span"),this.rows[i].tab_text.textContent=this.rows[i].getHeaderText(),"tabs-top"===this.schema.format?(this.rows[i].tab=this.theme.getTopTab(this.rows[i].tab_text,this.getValidId(this.rows[i].path)),this.theme.addTopTab(this.tabs_holder,this.rows[i].tab)):(this.rows[i].tab=this.theme.getTab(this.rows[i].tab_text,this.getValidId(this.rows[i].path)),this.theme.addTab(this.tabs_holder,this.rows[i].tab)),this.rows[i].tab.addEventListener("click",(function(t){n.active_tab=n.rows[i].tab,n.refreshTabs(),t.preventDefault(),t.stopPropagation()})),this._supportDragDrop(this.rows[i].tab)):this._supportDragDrop(this.rows[i].container,!0);var o=this.rows[i].title_controls||this.rows[i].array_controls;return this.hide_delete_buttons||(this.rows[i].delete_button=this._createDeleteButton(i,o)),this.show_copy_button&&(this.rows[i].copy_button=this._createCopyButton(i,o)),i&&!this.hide_move_buttons&&(this.rows[i].moveup_button=this._createMoveUpButton(i,o)),this.hide_move_buttons||(this.rows[i].movedown_button=this._createMoveDownButton(i,o)),void 0!==t&&this.rows[i].setValue(t,e),this.refreshTabs(),this.rows[i]}},{key:"_createDeleteButton",value:function(t,e){var n=this,i=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return i.classList.add("delete","json-editor-btntype-delete"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue().filter((function(t,n){return n!==e})),o=null,r=n.rows[e].getValue();n.setValue(i),n.rows[e]?o=n.rows[e].tab:n.rows[e-1]&&(o=n.rows[e-1].tab),o&&(n.active_tab=o,n.refreshTabs()),n.onChange(!0),n.jsoneditor.trigger("deleteRow",r)})),e&&e.appendChild(i),i}},{key:"_createCopyButton",value:function(t,e){var n=this,i=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),o=this.schema;return i.classList.add("copy","json-editor-btntype-copy"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){var e=n.getValue();t.preventDefault(),t.stopPropagation();var i=1*t.currentTarget.getAttribute("data-i");e.forEach((function(t,n){if(n===i){if("string"===o.items.type&&"uuid"===o.items.format)t=f();else if("object"===o.items.type&&o.items.properties)for(var r=0,s=Object.keys(t);r<s.length;r++){var a=s[r];o.items.properties&&o.items.properties[a]&&"uuid"===o.items.properties[a].format&&(t[a]=f())}e.push(t)}})),n.setValue(e),n.refreshValue(!0),n.onChange(!0),n.jsoneditor.trigger("copyRow",n.rows[i-1])})),e.appendChild(i),i}},{key:"_createMoveUpButton",value:function(t,e){var n=this,i=this.getButton("","tabs-top"===this.schema.format?"moveleft":"moveup","button_move_up_title");return i.classList.add("moveup","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i");if(!(e<=0)){var i=n.getValue(),o=i[e-1];i[e-1]=i[e],i[e]=o,n.setValue(i),n.active_tab=n.rows[e-1].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])}})),e&&e.appendChild(i),i}},{key:"_createMoveDownButton",value:function(t,e){var n=this,i=this.getButton("","tabs-top"===this.schema.format?"moveright":"movedown","button_move_down_title");return i.classList.add("movedown","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue();if(!(e>=i.length-1)){var o=i[e+1];i[e+1]=i[e],i[e]=o,n.setValue(i),n.active_tab=n.rows[e+1].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])}})),e&&e.appendChild(i),i}},{key:"_supportDragDrop",value:function(t,e){var n=this;U(t,(function(t,e){var i=n.getValue(),o=i[t];i.splice(t,1),i.splice(e,0,o),n.setValue(i),n.active_tab=n.rows[e].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e])}),{useTrigger:e})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&c(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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 t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var n=this.row_holder.style.display,i=this.controls.style.display;return e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=n,t.controls.style.display=i,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(e.currentTarget,"","expand","button_expand"))})),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var n,i=t.rows.length;t.row_cache[i]?(n=t.rows[i]=t.row_cache[i],t.rows[i].setValue(t.rows[i].getDefault(),!0),"function"==typeof t.rows[i].deactivateNonRequiredProperties&&t.rows[i].deactivateNonRequiredProperties(!0),t.rows[i].container.style.display="",t.rows[i].tab&&(t.rows[i].tab.style.display=""),t.rows[i].register()):n=t.addRow(),t.active_tab=t.rows[i].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",n)})),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue(),i=null,o=n.pop();t.setValue(n),t.rows[t.rows.length-1]&&(i=t.rows[t.rows.length-1].tab),i&&(t.active_tab=i,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",o)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",n)})),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,n=[],i=[];t.forEach((function(t){t.path===e.path?n.push(t):i.push(t)})),this.error_holder&&(n.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",n.forEach((function(t){e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(t){return t.showValidationErrors(i)}))}}],i&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,N(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function U(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useTrigger?t.addEventListener("mousedown",(function(e){if(e.ctrlKey){t.draggable=!0;var n=function e(n){t.draggable=!1,document.removeEventListener("dragend",e),document.removeEventListener("mouseup",e)};document.addEventListener("dragend",n),document.addEventListener("mouseup",n)}})):t.draggable=!0,t.addEventListener("dragstart",(function(e){window.curDrag=t})),t.addEventListener("dragover",(function(e){null===window.curDrag||window.curDrag===t||window.curDrag.parentElement!==t.parentElement?e.dataTransfer.dropEffect="none":e.dataTransfer.dropEffect="move",e.preventDefault()})),t.addEventListener("drop",(function(n){if(n.preventDefault(),n.stopPropagation(),null!==window.curDrag&&window.curDrag!==t&&window.curDrag.parentElement===t.parentElement){var i=function(t){for(var e=0,n=t.parentElement.firstElementChild;n!==t&&null!==n;)n=n.nextSibling,++e;return e},o=i(window.curDrag),r=i(t);e(o,r,window.curDrag,t),window.curDrag=null}}))}function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function G(t){var e=function(t){if("object"!=W(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==W(e)?e:e+""}function J(t,e,n){return e=K(e),function(t,e){if(e&&("object"===W(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$()?Reflect.construct(e,n||[],K(t).constructor):e.apply(t,n))}function $(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($=function(){return!!t})()}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=K(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Y.apply(this,arguments)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}function X(t,e){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},X(t,e)}q.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var Q=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),J(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}(e,t),n=e,(i=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){Y(K(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Y(K(e.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach((function(n){return e=Math.max(e,"".concat(t.select_values[n]).length+4)})),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;Y(K(e.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var n=this.jsoneditor.expandRefs(this.schema.items||{}),i=n.enum||[],o=n.options&&n.options.enum||[],r=n.options&&n.options.enum_titles||[];for(t=0;t<i.length;t++)if(this.sanitize(i[t])===i[t]){var s=o[t]||{};"title"in s||(s.title="".concat(r[t]||i[t])),this.option_keys.push("".concat(i[t])),this.option_enum.push(s),this.select_values["".concat(i[t])]=i[t]}}},{key:"build",value:function(){var t,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.schema.format&&this.option_keys.length<8||"checkbox"===this.schema.format){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var n=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=n,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var i=this.theme.getCheckboxLabel(this.option_enum[t].title);if(i.htmlFor=n,this.option_enum[t].infoText){var o=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));i.appendChild(o)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(i,this.inputs[this.option_keys[t]])}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(t){return t.title}))),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];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(n){var i=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&i.push(e.select_values[e.option_keys[t]]);e.updateValue(i),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){e.afterInputReady()}))}},{key:"postBuild",value:function(){Y(K(e.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var n=this;t=(t=this.applyConstFilter(t))||[],Array.isArray(t)||(t=[t]),t=t.map((function(t){return"".concat(t)})),Object.keys(this.select_options).forEach((function(e){n.select_options[e]["select"===n.input_type?"selected":"checked"]=t.includes(e)})),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter((function(e){return!t.includes(e)})))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,n=[],i=0;i<t.length;i++)if(this.select_options["".concat(t[i])]){var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}else e=!0;return this.value=n,e}},{key:"sanitize",value:function(t){return"boolean"===this.schema.items.type?!!t:"number"===this.schema.items.type?1*t||0:"integer"===this.schema.items.type?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach((function(e){return t.inputs[e].disabled=!1})),Y(K(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var n=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach((function(t){return n.inputs[t].disabled=!0})),Y(K(e.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){Y(K(e.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),n=t.reduce((function(t,n){return n.path.match(e)&&t.push(n.message),t}),[]);n.length?this.theme.addInputError(this.input||this.inputs,"".concat(n.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,G(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}function nt(t,e,n){return e=rt(e),function(t,e){if(e&&("object"===tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,it()?Reflect.construct(e,n||[],rt(t).constructor):e.apply(t,n))}function it(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(it=function(){return!!t})()}function ot(){return ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ot.apply(this,arguments)}function rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rt(t)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}var at=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),nt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){this.choices_instance?(t=this.applyConstFilter(t),t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):ot(rt(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var n=this.expandCallbacks("choices",l({},{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,n),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(e){var n=t.choices_instance.getValue(!0);t.updateValue(n),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}ot(rt(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,n=[],i=0;i<t.length;i++){if(!this.select_values["".concat(t[i])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[i]))continue}var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}return this.value=n,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),ot(rt(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),ot(rt(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),ot(rt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,et(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Q);function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ct(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}function ut(t,e,n){return e=pt(e),function(t,e){if(e&&("object"===lt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ht()?Reflect.construct(e,n||[],pt(t).constructor):e.apply(t,n))}function ht(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ht=function(){return!!t})()}function dt(){return dt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},dt.apply(this,arguments)}function pt(t){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pt(t)}function ft(t,e){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ft(t,e)}var mt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ut(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ft(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){t=this.applyConstFilter(t),this.select2_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):dt(pt(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t,n=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",l({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&"string"===this.schema.items.type,this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=h(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var t=n.select2v4?n.select2_instance.val():n.select2_instance.select2("val");n.updateValue(t),n.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),dt(pt(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,n=[],i=0;i<t.length;i++){if(!this.select_values["".concat(t[i])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[i]))continue}var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}return this.value=n,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!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)),dt(pt(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),dt(pt(e.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),dt(pt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ct(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Q);function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function vt(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}function bt(t,e,n){return e=wt(e),function(t,e){if(e&&("object"===yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,n||[],wt(t).constructor):e.apply(t,n))}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}function _t(){return _t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_t.apply(this,arguments)}function wt(t){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wt(t)}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xt(t,e)}var kt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),bt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){t=this.applyConstFilter(t),this.selectize_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):_t(wt(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t,n=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){t=this.expandCallbacks("selectize",l({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&"string"===this.schema.items.type,this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(t){var e=n.selectize_instance.getValue();n.updateValue(e),n.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);var i=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),i.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(i,this.input);var o=this.selectize_instance.$control[0];if(o){var r=this.theme.getHiddenLabel(this.formname);r.setAttribute("for",this.formname+"-selectized"),o.appendChild(r)}}_t(wt(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,n=[],i=0;i<t.length;i++){if(!this.select_values["".concat(t[i])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[i]))continue}var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}return this.value=n,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),_t(wt(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),_t(wt(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),_t(wt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vt(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Q);function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(t){var e=function(t){if("object"!=Ot(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ot(e)?e:e+""}function Ct(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"===Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Et()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}function Et(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Et=function(){return!!t})()}function Pt(){return Pt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Pt.apply(this,arguments)}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function St(t,e){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},St(t,e)}var Tt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ct(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&St(t,e)}(e,t),n=e,(i=[{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)),Pt(Lt(e.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,n=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",l({},{search:function(t){return console.log('No "search" callback defined for autocomplete in property "'.concat(t.key,'"')),[]},onSubmit:function(){n.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),Pt(Lt(e.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),Pt(Lt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,jt(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Rt(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=At(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}function Bt(t,e,n){return e=Mt(e),function(t,e){if(e&&("object"===At(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,It()?Reflect.construct(e,n||[],Mt(t).constructor):e.apply(t,n))}function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(It=function(){return!!t})()}function zt(){return zt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},zt.apply(this,arguments)}function Mt(t){return Mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mt(t)}function Nt(t,e){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nt(t,e)}var Dt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Bt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nt(t,e)}(e,t),n=e,(i=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",(function(t){if(e.count===e.current_item_index)e.value[e.count][e.key]=t.target.result;else{var n={};for(var i in e.parent.schema.properties)n[i]="";n[e.key]=t.target.result,e.value.splice(e.count,0,n)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)}))}},{key:"build",value:function(){var t=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&&!0===this.schema.options.multiple&&this.parent&&"object"===this.parent.schema.type&&this.parent.parent&&"array"===this.parent.parent.schema.type&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",(function(e){if(e.preventDefault(),e.stopPropagation(),e.currentTarget.files&&e.currentTarget.files.length)if(e.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&!0===t.schema.options.multiple&&t.parent&&"object"===t.parent.schema.type&&t.parent.parent&&"array"===t.parent.parent.schema.type){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=e.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var n=0;n<t.total;n++){var i=new FileReader;t.setFileReaderListener(i),i.readAsDataURL(e.currentTarget.files[n])}}else{var o=new FileReader;o.onload=function(e){t.value=e.target.result,t.refreshPreview(),t.onChange(!0),o=null},o.readAsDataURL(e.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 e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",(function(){t.uploader.click()})),this.control.appendChild(e),this.setInputAttributes(["multiple"],e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),"image"===t.substr(0,5)){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),zt(Mt(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),zt(Mt(e.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,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),zt(Mt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Rt(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Ht(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}function Vt(t,e,n){return e=Ut(e),function(t,e){if(e&&("object"===Ft(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zt()?Reflect.construct(e,n||[],Ut(t).constructor):e.apply(t,n))}function Zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zt=function(){return!!t})()}function qt(){return qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ut(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qt.apply(this,arguments)}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(t)}function Wt(t,e){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wt(t,e)}var Gt=function(t){function e(t,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=Vt(this,e,[t,n])).active=!1,i.isUiOnly=!0,i.parent&&i.parent.schema&&(Array.isArray(i.parent.schema.required)?i.parent.schema.required.includes(i.key)||i.parent.schema.required.push(i.key):i.parent.schema.required=[i.key]),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wt(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.expandCallbacks("button",l({},{icon:"",validated:!1,align:"left",action:function(t,e){window.alert('No button action defined for "'.concat(t.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),n=this.translateProperty(e.text||this.schema.title)||this.key;this.input=this.getButton(n,e.icon,n),"function"!=typeof e.action?window.alert('No button action defined for "'.concat(this.path,'"')):this.input.addEventListener("click",e.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(e.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},e.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,qt(Ut(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,qt(Ut(e.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,qt(Ut(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ht(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Jt(t){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(t)}function $t(t){var e=function(t){if("object"!=Jt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jt(e)?e:e+""}function Yt(t,e,n){return e=Qt(e),function(t,e){if(e&&("object"===Jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,n||[],Qt(t).constructor):e.apply(t,n))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Xt.apply(this,arguments)}function Qt(t){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}var ee=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Yt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,e){t=!!(t=this.applyConstFilter(t));var n=this.getValue()!==t;this.value=t,this.input.checked=this.value,e||(this.is_dirty=!0),this.onChange(n)}},{key:"register",value:function(){Xt(Qt(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Xt(Qt(e.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(){Xt(Qt(e.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 t=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(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.is_dirty=!0,t.onChange(!0)})),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Xt(Qt(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Xt(Qt(e.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),Xt(Qt(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this,n=this.jsoneditor.options.show_errors,i="change"===n||"interaction"===n;if(("never"!==n||this.is_dirty)&&(!i||this.is_dirty)){var o=t.reduce((function(t,n){return n.path===e.path&&t.push(n.message),t}),[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,$t(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function ie(t){var e=function(t){if("object"!=ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ne(e)?e:e+""}function oe(t,e,n){return e=ae(e),function(t,e){if(e&&("object"===ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,re()?Reflect.construct(e,n||[],ae(t).constructor):e.apply(t,n))}function re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(re=function(){return!!t})()}function se(){return se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ae(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},se.apply(this,arguments)}function ae(t){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ae(t)}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}n(6910);var ce=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),oe(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,e){t=this.applyConstFilter(t);var n=this.typecast(t),i=this.enum_options.length>0&&this.enum_values.includes(n),o=!!this.jsoneditor.options.use_default_values||void 0!==this.schema.default;if(this.hasPlaceholderOption||i&&(!e||this.isRequired()||o)||(n=this.enum_values[0]),this.value!==n){var r=this.enum_values.indexOf(n);i&&-1!==r?this.input.value=this.enum_options[r]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=n,this.value=n,e||(this.is_dirty=!0),this.onChange(),this.change()}}},{key:"register",value:function(){se(ae(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){se(ae(e.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return"boolean"===this.schema.type?"undefined"===t||void 0===t?void 0:!!t:"number"===this.schema.type?1*t||0:"integer"===this.schema.type?Math.floor(1*t||0):this.schema.enum&&void 0===t?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,n,i,o=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.hasPlaceholderOption=(null===(t=this.schema)||void 0===t||null===(t=t.options)||void 0===t?void 0:t.has_placeholder_option)||!1,this.placeholderOptionText=(null===(e=this.schema)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.placeholder_option_text)||" ",this.enforceConst&&this.schema.const){var r=this.schema.const;this.enum_options=["".concat(r)],this.enum_display=["".concat(this.translateProperty(r)||r)],this.enum_values=[this.typecast(r)]}else if(this.schema.enum){var s=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(t,e){o.enum_options[e]="".concat(t),o.enum_display[e]="".concat(o.translateProperty(s[e])||t),o.enum_values[e]=o.typecast(t)}))}else if("boolean"===this.schema.type)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(n=0;n<this.schema.enumSource.length;n++)"string"==typeof this.schema.enumSource[n]?this.enumSource[n]={source:this.schema.enumSource[n]}:Array.isArray(this.schema.enumSource[n])?this.enumSource[n]=this.schema.enumSource[n]:this.enumSource[n]=l({},this.schema.enumSource[n]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(n=0;n<this.enumSource.length;n++)this.enumSource[n].value&&("function"==typeof(i=this.expandCallbacks("template",{template:this.enumSource[n].value})).template?this.enumSource[n].value=i.template:this.enumSource[n].value=this.jsoneditor.compileTemplate(this.enumSource[n].value,this.template_engine)),this.enumSource[n].title&&("function"==typeof(i=this.expandCallbacks("template",{template:this.enumSource[n].title})).template?this.enumSource[n].title=i.template:this.enumSource[n].title=this.jsoneditor.compileTemplate(this.enumSource[n].title,this.template_engine)),this.enumSource[n].filter&&this.enumSource[n].value&&("function"==typeof(i=this.expandCallbacks("template",{template:this.enumSource[n].filter})).template?this.enumSource[n].filter=i.template:this.enumSource[n].filter=this.jsoneditor.compileTemplate(this.enumSource[n].filter,this.template_engine))}}},{key:"build",value:function(){var t=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(e){e.preventDefault(),e.stopPropagation(),t.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(){t.input.parentNode&&t.afterInputReady()}))}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,n,i=[],o=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var r=0;r<this.enumSource.length;r++)if(Array.isArray(this.enumSource[r]))i=i.concat(this.enumSource[r]),o=o.concat(this.enumSource[r]);else{var s=[];if(s=Array.isArray(this.enumSource[r].source)?this.enumSource[r].source:t[this.enumSource[r].source]){if(this.enumSource[r].slice&&(s=Array.prototype.slice.apply(s,this.enumSource[r].slice)),this.enumSource[r].filter){var a=[];for(n=0;n<s.length;n++)this.enumSource[r].filter({i:n,item:s[n],watched:t})&&a.push(s[n]);s=a}var l=[],c=[];for(n=0;n<s.length;n++){var u=s[n];this.enumSource[r].value?c[n]=this.typecast(this.enumSource[r].value({i:n,item:u})):c[n]=s[n],this.enumSource[r].title?l[n]=this.enumSource[r].title({i:n,item:u}):l[n]=c[n]}this.enumSource[r].sort&&function(t,e,n){t.map((function(t,n){return{v:t,t:e[n]}})).sort((function(t,e){return t.v<e.v?-n:t.v===e.v?0:n})).forEach((function(n,i){t[i]=n.v,e[i]=n.t}))}.bind(null,c,l,"desc"===this.enumSource[r].sort?1:-1)(),i=i.concat(c),o=o.concat(l)}}var h=this.value;this.theme.setSelectOptions(this.input,i,o),this.enum_options=i,this.enum_display=o,this.enum_values=i,i.includes(h)||!1!==this.jsoneditor.options.enum_source_value_auto_select?(this.input.value=h,this.value=h):(this.input.value=i[0],this.value=this.typecast(i[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}se(ae(e.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,se(ae(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,se(ae(e.prototype),"disable",this).call(this,t)}},{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),se(ae(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this,n=this.jsoneditor.options.show_errors,i="change"===n||"interaction"===n;if(("never"!==n||this.is_dirty)&&(!i||this.is_dirty)){var o=t.reduce((function(t,n){return n.path===e.path&&t.push(n.message),t}),[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ie(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function he(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}function de(t,e,n){return e=me(e),function(t,e){if(e&&("object"===ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pe()?Reflect.construct(e,n||[],me(t).constructor):e.apply(t,n))}function pe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pe=function(){return!!t})()}function fe(){return fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=me(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},fe.apply(this,arguments)}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ye(t,e)}var ve=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),de(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){if(t=this.applyConstFilter(t),this.choices_instance){var i=this.typecast(t||"");if(this.enum_values.includes(i)||(i=this.enum_values[0]),this.value===i)return;n?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(i)],this.choices_instance.setChoiceByValue(this.input.value),this.value=i,this.onChange()}else fe(me(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",l({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}fe(me(e.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(fe(me(e.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var n=this.enum_options.map((function(e,n){return{value:e,label:t.enum_display[n]}}));this.choices_instance.setChoices(n,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),fe(me(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),fe(me(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),fe(me(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,he(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}function ge(t){var e=function(t){if("object"!=be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==be(e)?e:e+""}function _e(t,e,n){return e=ke(e),function(t,e){if(e&&("object"===be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,we()?Reflect.construct(e,n||[],ke(t).constructor):e.apply(t,n))}function we(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(we=function(){return!!t})()}function xe(){return xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ke(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xe.apply(this,arguments)}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke(t)}function Oe(t,e){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oe(t,e)}ve.rules={".choices > *":"box-sizing:border-box"};var je=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),_e(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){if(xe(ke(e.prototype),"build",this).call(this),this.input&&(this.schema.max&&"string"==typeof this.schema.max&&this.input.setAttribute("max",this.schema.max),this.schema.min&&"string"==typeof this.schema.max&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&"object"===be(this.options.flatpickr))){this.options.flatpickr.enableTime="date"!==this.schema.format,this.options.flatpickr.noCalendar="time"===this.schema.format,"integer"===this.schema.type&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(!0===this.options.flatpickr.wrap){var n=[];if(!1!==this.options.flatpickr.showToggleButton){var i=this.getButton("","time"===this.schema.format?"time":"calendar","flatpickr_toggle_button");i.setAttribute("data-toggle",""),n.push(i)}if(!1!==this.options.flatpickr.showClearButton){var o=this.getButton("","clear","flatpickr_clear_button");o.setAttribute("data-clear",""),n.push(o)}var r=this.input.parentNode,s=this.input.nextSibling,a=this.theme.getInputGroup(this.input,n);void 0!==a?(this.options.flatpickr.inline=!1,r.insertBefore(a,s),t=a):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),!0===this.options.flatpickr.inline&&!0===this.options.flatpickr.inlineHideInput&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if("string"===this.schema.type)return this.value;if(""!==this.value&&void 0!==this.value){var t="time"===this.schema.format?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,n,i){if(t=this.applyConstFilter(t),"string"===this.schema.type)xe(ke(e.prototype),"setValue",this).call(this,t,n,i),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var o=new Date(1e3*t),r=o.getFullYear(),s=this.zeroPad(o.getMonth()+1),a=this.zeroPad(o.getDate()),l=this.zeroPad(o.getHours()),c=this.zeroPad(o.getMinutes()),u=this.zeroPad(o.getSeconds()),h=[r,s,a].join("-"),d=[l,c,u].join(":"),p="".concat(h,"T").concat(d);"date"===this.schema.format?p=h:"time"===this.schema.format&&(p=d),this.input.value=p,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(p)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,xe(ke(e.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ge(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function Ce(t){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce(t)}function Ee(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(e)?e:e+""}function Pe(t,e,n){return e=Te(e),function(t,e){if(e&&("object"===Ce(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Le()?Reflect.construct(e,n||[],Te(t).constructor):e.apply(t,n))}function Le(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Le=function(){return!!t})()}function Se(){return Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Te(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Se.apply(this,arguments)}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Te(t)}function Ae(t,e){return Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ae(t,e)}var Re=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Pe(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ae(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Se(Te(e.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Se(Te(e.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].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 t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Se(Te(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Se(Te(e.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var n=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[n]]||this.buildChildEditor(n),this.currentEditor=this.refs[n],this.register(),this.editors.forEach((function(e,n){e&&(t.currentEditor===n?e.container.style.display="":e.container.style.display="none")})),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var n=l({},this.schema,this.jsoneditor.refs[t]),i=this.jsoneditor.getEditorClass(n,this.jsoneditor),o=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:n,container:e,path:this.path,parent:this,required:!0});this.editors.push(o),o.preBuild(),o.build(),o.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if("describedby"===this.schema.links[t].rel.toLowerCase()){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),0===this.schema.links.length&&delete this.schema.links,this.baseSchema=l({},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(t,n){this.editors[this.currentEditor]&&this.refreshValue(),Se(Te(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){t=this.applyConstFilter(t),this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach((function(t){t&&t.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Se(Te(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach((function(e){e&&e.showValidationErrors(t)}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ee(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function ze(t){var e=function(t){if("object"!=Be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Be(e)?e:e+""}function Me(t,e,n){return e=Fe(e),function(t,e){if(e&&("object"===Be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ne()?Reflect.construct(e,n||[],Fe(t).constructor):e.apply(t,n))}function Ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ne=function(){return!!t})()}function De(){return De="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fe(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},De.apply(this,arguments)}function Fe(t){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fe(t)}function He(t,e){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},He(t,e)}var Ve=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Me(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&He(t,e)}(e,t),n=e,(i=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=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 e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);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(e){t.selected=t.select_options.indexOf(e.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)})),this.value=this.enum[0],this.refreshValue(),1===this.enum.length&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;if(this.enum){this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach((function(n,i){if(e===JSON.stringify(n))return t.selected=i,!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,De(Fe(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,De(Fe(e.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,n,i=this;if(null===t)return"<em>null</em>";if("object"===Be(t)){var o="";return e=t,n=function(e,n){var r=i.getHTML(n);Array.isArray(t)||(r="<div><em>".concat(e,"</em>: ").concat(r,"</div>")),o+="<li>".concat(r,"</li>")},Array.isArray(e)||"number"==typeof e.length&&e.length>0&&e.length-1 in e?Array.from(e).forEach((function(t,e){return n(e,t)})):Object.entries(e).forEach((function(t){var e,i=function(t){if(Array.isArray(t))return t}(e=t)||function(t){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,o,r,s=[],a=!0,l=!1;try{for(o=(e=e.call(t)).next;!(a=(n=o.call(e)).done)&&(s.push(n.value),2!==s.length);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(l)throw i}}return s}}(e)||function(t){if(t){if("string"==typeof t)return Ie(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ie(t,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],r=i[1];return n(o,r)})),o=Array.isArray(t)?"<ol>".concat(o,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(o,"</ul>")}return"boolean"==typeof t?t?"true":"false":"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value!==t&&(this.value=t,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),De(Fe(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ze(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function qe(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}function Ue(t,e,n){return e=Je(e),function(t,e){if(e&&("object"===Ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,We()?Reflect.construct(e,n||[],Je(t).constructor):e.apply(t,n))}function We(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(We=function(){return!!t})()}function Ge(){return Ge="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Je(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ge.apply(this,arguments)}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(t)}function $e(t,e){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$e(t,e)}var Ye=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ue(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$e(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){Ge(Je(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Ge(Je(e.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,n){if(t=this.applyConstFilter(t),(!this.template||n)&&(null==t?t="":"object"===Ze(t)?t=JSON.stringify(t):"string"!=typeof t&&(t="".concat(t)),t!==this.serialized)){var i=this.sanitize(t);if(this.input.value!==i){this.input.value=i;var o=n||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(o)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Ge(Je(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Ge(Je(e.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,"string"!=typeof this.value&&(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),Ge(Je(e.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),Ge(Je(e.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 t=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof t.template?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qe(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Ke(t){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(t)}function Xe(t){var e=function(t){if("object"!=Ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ke(e)?e:e+""}function Qe(t,e,n){return e=en(e),function(t,e){if(e&&("object"===Ke(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,tn()?Reflect.construct(e,n||[],en(t).constructor):e.apply(t,n))}function tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(tn=function(){return!!t})()}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},en(t)}function nn(t,e){return nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nn(t,e)}var on=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Qe(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nn(t,e)}(e,t),n=e,(i=[{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}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Xe(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Gt);function rn(t){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(t)}function sn(t){var e=function(t){if("object"!=rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rn(e)?e:e+""}function an(t,e,n){return e=un(e),function(t,e){if(e&&("object"===rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ln()?Reflect.construct(e,n||[],un(t).constructor):e.apply(t,n))}function ln(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ln=function(){return!!t})()}function cn(){return cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=un(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},cn.apply(this,arguments)}function un(t){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},un(t)}function hn(t,e){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hn(t,e)}var dn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),an(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hn(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){if(cn(un(e.prototype),"build",this).call(this),void 0!==this.schema.minimum){var t=this.schema.minimum;void 0!==this.schema.exclusiveMinimum&&(t+=1),this.input.setAttribute("min",t)}if(void 0!==this.schema.maximum){var n=this.schema.maximum;void 0!==this.schema.exclusiveMaximum&&(n-=1),this.input.setAttribute("max",n)}if(void 0!==this.schema.step){var i=this.schema.step||1;this.input.setAttribute("step",i)}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(t){if(null==t)return!1;var e=t.match(d),n=parseFloat(t);return null!==e&&!isNaN(n)&&isFinite(n)}(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,sn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function fn(t){var e=function(t){if("object"!=pn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pn(e)?e:e+""}function mn(t,e,n){return e=vn(e),function(t,e){if(e&&("object"===pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yn()?Reflect.construct(e,n||[],vn(t).constructor):e.apply(t,n))}function yn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yn=function(){return!!t})()}function vn(t){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vn(t)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}var gn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),mn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}(e,t),n=e,(i=[{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(t){if(null==t)return!1;var e=t.match(p),n=parseInt(t);return null!==e&&!isNaN(n)&&isFinite(n)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,fn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(dn);function _n(t){return _n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_n(t)}function wn(t){var e=function(t){if("object"!=_n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_n(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_n(e)?e:e+""}function xn(t,e,n){return e=jn(e),function(t,e){if(e&&("object"===_n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,kn()?Reflect.construct(e,n||[],jn(t).constructor):e.apply(t,n))}function kn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kn=function(){return!!t})()}function On(){return On="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jn(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},On.apply(this,arguments)}function jn(t){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jn(t)}function Cn(t,e){return Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cn(t,e)}var En=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),xn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cn(t,e)}(e,t),n=e,(i=[{key:"preBuild",value:function(){if(On(jn(e.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=l(this.options,this.schema.options||{})}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,wn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function Pn(t){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pn(t)}function Ln(t){var e=function(t){if("object"!=Pn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pn(e)?e:e+""}function Sn(t,e,n){return e=Rn(e),function(t,e){if(e&&("object"===Pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tn()?Reflect.construct(e,n||[],Rn(t).constructor):e.apply(t,n))}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function An(){return An="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rn(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},An.apply(this,arguments)}function Rn(t){return Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rn(t)}function Bn(t,e){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bn(t,e)}var In=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Sn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bn(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=An(Rn(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(o.value)}},{key:"build",value:function(){this.options.format="textarea",An(Rn(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,n=this;window.Jodit?(t=this.expandCallbacks("jodit",l({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",(function(){n.value=n.jodit_instance.getEditorValue(),n.is_dirty=!0,n.onChange(!0)})),this.theme.afterInputReady(this.input)):An(Rn(e.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),An(Rn(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),An(Rn(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),An(Rn(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ln(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function zn(t,e,n,i){try{switch(t.format){case"ipv4":!function(t){var e=t.split(".");if(4!==e.length)throw new Error("error_ipv4");e.forEach((function(t){if(isNaN(+t)||+t<0||+t>255)throw new Error("error_ipv4")}))}(e);break;case"ipv6":!function(t){if(!t.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")}(e);break;case"hostname":!function(t){if(!t.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")}(e)}return[]}catch(t){return[{path:n,property:"format",message:i(t.message)}]}}function Mn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Nn(t,e,n){return(e=qn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dn(t){return Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(t)}function Fn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||Vn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hn(t){return function(t){if(Array.isArray(t))return Zn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Vn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vn(t,e){if(t){if("string"==typeof t)return Zn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(t,e):void 0}}function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function qn(t){var e=function(t){if("object"!=Dn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dn(e)?e:e+""}n(8431),n(7945),n(1278);var Un=function(){return t=function t(e,n,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.jsoneditor=e,this.schema=n||this.jsoneditor.schema,this.options=i||{},this.translate=this.jsoneditor.translate||o.translate,this.translateProperty=this.jsoneditor.translateProperty||o.translateProperty,this.defaults=o,this._validateSubSchema={dependentRequired:function(t,e,n){var i=[];if(void 0!==t.dependentRequired){var o=[];Object.keys(t.dependentRequired).forEach((function(n){if(void 0!==e[n]){var i=t.dependentRequired[n];o=i.filter((function(t){return!h(e,t)}))}})),o.length>0&&i.push({message:"Must have the required properties: "+o.join(", "),path:n})}return i},dependentSchemas:function(t,e,n){var i=this,o=[];return Object.keys(t.dependentSchemas).forEach((function(r){if(void 0!==e[r]){var s=t.dependentSchemas[r],a=i._validateSchema(s,e,n);o=[].concat(Hn(o),Hn(a))}})),o},contains:function(t,e,n){var i=this,o=[],r=0;e.forEach((function(e){0===i._validateSchema(t.contains,e,n).length&&r++}));var s=0===r;return void 0!==t.minContains?r<t.minContains&&o.push({message:this.translate("error_minContains",[r,t.minContains],t),path:n}):s&&o.push({message:this.translate("error_contains",null,t),path:n}),void 0!==t.maxContains&&r>t.maxContains&&o.push({message:this.translate("error_maxContains",[r,t.maxContains],t),path:n}),o},if:function(t,e,n){if(void 0===t.then&&void 0===t.else)return[];var i=this._validateSchema(t.if,e,n),o=[],r=[];return void 0!==t.then&&(o=this._validateSchema(t.then,e,n)),void 0!==t.else&&(r=this._validateSchema(t.else,e,n)),!0===t.if?o:!1===t.if?r:0===i.length?o:i.length>0?r:[]},const:function(t,e,n){return JSON.stringify(t.const)===JSON.stringify(e)?[]:[{path:n,property:"const",message:this.translate("error_const",null,t)}]},enum:function(t,e,n){var i=JSON.stringify(e);return t.enum.some((function(t){return i===JSON.stringify(t)}))?[]:[{path:n,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,n){var i=this;return t.extends.reduce((function(t,o){return t.push.apply(t,Hn(i._validateSchema(o,e,n))),t}),[])},allOf:function(t,e,n){var i=this;return t.allOf.reduce((function(t,o){return t.push.apply(t,Hn(i._validateSchema(o,e,n))),t}),[])},anyOf:function(t,e,n){var i=this;return t.anyOf.some((function(t){return!i._validateSchema(t,e,n).length}))?[]:[{path:n,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,n){var i=this,o=0,r=[];t.oneOf.forEach((function(t,s){var a=i._validateSchema(t,e,n);a.length||o++,a.forEach((function(t){t.path="".concat(n,".oneOf[").concat(s,"]").concat(t.path.substr(n.length))})),r.push.apply(r,Hn(a))}));var s=[];return 1!==o&&(s.push({path:n,property:"oneOf",message:this.translate("error_oneOf",[o],t)}),s.push.apply(s,r)),s},not:function(t,e,n){return this._validateSchema(t.not,e,n).length?[]:[{path:n,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,n){var i=this;if(Array.isArray(t.type)){if(!t.type.some((function(t){return i._checkType(t,e)})))return[{path:n,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&"integer"===t.type){if(!this._checkType("string","".concat(e)))return[{path:n,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:n,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,n){var i=this;if(Array.isArray(t.disallow)){if(t.disallow.some((function(t){return i._checkType(t,e)})))return[{path:n,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:n,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,n){return this._validateNumberSubSchemaMultipleDivisible(t,e,n)},divisibleBy:function(t,e,n){return this._validateNumberSubSchemaMultipleDivisible(t,e,n)},maximum:function(t,e,n){var i=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?i=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(i=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),i?[]:[{path:n,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,n){var i=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?i=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(i=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),i?[]:[{path:n,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,n){var i=[];return"".concat(e).length>t.maxLength&&i.push({path:n,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),i},minLength:function(t,e,n){return"".concat(e).length<t.minLength?[{path:n,property:"minLength",message:this.translate(1===t.minLength?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,n){return new RegExp(t.pattern).test(e)?[]:[{path:n,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,n){var i=this,o=[];if(Array.isArray(t.items))for(var r=0;r<e.length;r++)if(t.items[r])o.push.apply(o,Hn(this._validateSchema(t.items[r],e[r],"".concat(n,".").concat(r))));else{if(!0===t.additionalItems)break;if(!t.additionalItems){if(!1===t.additionalItems){o.push({path:n,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}o.push.apply(o,Hn(this._validateSchema(t.additionalItems,e[r],"".concat(n,".").concat(r))))}else e.forEach((function(e,r){o.push.apply(o,Hn(i._validateSchema(t.items,e,"".concat(n,".").concat(r))))}));return o},maxItems:function(t,e,n){return e.length>t.maxItems?[{path:n,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,n){return e.length<t.minItems?[{path:n,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,n){for(var i={},o=0;o<e.length;o++){var r=JSON.stringify(e[o]);if(i[r])return[{path:n,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];i[r]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,n){return Object.keys(e).length>t.maxProperties?[{path:n,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,n){return Object.keys(e).length<t.minProperties?[{path:n,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,n){var i=this,o=[];return Array.isArray(t.required)&&t.required.forEach((function(r){if(void 0===e[r]){var s=i.jsoneditor.getEditor("".concat(n,".").concat(r));s&&!1===s.dependenciesFulfilled||s&&["button","info"].includes(s.schema.format||s.schema.type)||o.push({path:n,property:"required",message:i.translate("error_required",[t&&t.properties&&t.properties[r]&&t.properties[r].title?t.properties[r].title:r],t)})}})),o},properties:function(t,e,n,i){var o=this,r=[];return Object.entries(t.properties).forEach((function(t){var s=Fn(t,2),a=s[0],l=s[1];i[a]=!0,r.push.apply(r,Hn(o._validateSchema(l,e[a],"".concat(n,".").concat(a))))})),r},patternProperties:function(t,e,n,i){var o=this,r=[];return Object.entries(t.patternProperties).forEach((function(t){var s=Fn(t,2),a=s[0],l=s[1],c=new RegExp(a);Object.entries(e).forEach((function(t){var e=Fn(t,2),s=e[0],a=e[1];c.test(s)&&(i[s]=!0,r.push.apply(r,Hn(o._validateSchema(l,a,"".concat(n,".").concat(s)))))}))})),r}},this._validateObjectSubSchema2={propertyNames:function(t,e,n,i){for(var o,r=this,s=[],a=Object.keys(e),l=null,c=function(){var e="";return l=a[u],"boolean"==typeof t.propertyNames?!0===t.propertyNames?0:(s.push({path:n,property:"propertyNames",message:r.translate("error_property_names_false",[l],t)}),1):Object.entries(t.propertyNames).every((function(i){var o=Fn(i,2),a=o[0],c=o[1],u=!1;switch(a){case"maxLength":if("number"!=typeof c){e="error_property_names_maxlength";break}if(l.length>c){e="error_property_names_exceeds_maxlength";break}return!0;case"const":if(c!==l){e="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(c)){e="error_property_names_enum";break}if(c.forEach((function(t){t===l&&(u=!0)})),!u){e="error_property_names_enum_mismatch";break}return!0;case"pattern":if("string"!=typeof c){e="error_property_names_pattern";break}if(!new RegExp(c).test(l)){e="error_property_names_pattern_mismatch";break}return!0;default:return s.push({path:n,property:"propertyNames",message:r.translate("error_property_names_unsupported",[a],t)}),!1}return s.push({path:n,property:"propertyNames",message:r.translate(e,[l],t)}),!1}))?void 0:1},u=0;u<a.length&&(0===(o=c())||1!==o);u++);return s},additionalProperties:function(t,e,n,i){for(var o=[],r=Object.keys(e),s=0;s<r.length;s++){var a=r[s];if(!i[a]){if(!t.additionalProperties){o.push({path:n,property:"additionalProperties",message:this.translate("error_additional_properties",[a],t)});break}if(!0===t.additionalProperties)break;o.push.apply(o,Hn(this._validateSchema(t.additionalProperties,e[a],"".concat(n,".").concat(a))))}}return o},dependencies:function(t,e,n){var i=this,o=[];return Object.entries(t.dependencies).forEach((function(r){var s=Fn(r,2),a=s[0],l=s[1];void 0!==e[a]&&(Array.isArray(l)?l.forEach((function(r){void 0===e[r]&&o.push({path:n,property:"dependencies",message:i.translate("error_dependency",[r],t)})})):o.push.apply(o,Hn(i._validateSchema(l,e,n))))})),o}}},e=[{key:"fitTest",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e7,i={match:0,extra:0};if("object"===Dn(t)&&null!==t){var o=this._getSchema(e);if(o.anyOf){var r,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mn(Object(n),!0).forEach((function(e){Nn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},i),a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Vn(t))){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return r=t.done,t},e:function(t){s=!0,o=t},f:function(){try{r||null==e.return||e.return()}finally{if(s)throw o}}}}(o.anyOf);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=this.fitTest(t,l,n);(c.match>s.match||c.match===s.match&&c.extra<s.extra)&&(s=c)}}catch(t){a.e(t)}finally{a.f()}return s}var u=this._getSchema(e).properties;for(var d in u)if(h(u,d)){if("object"===Dn(t[d])&&"object"===Dn(u[d])&&"object"===Dn(u[d].properties)){var p=this.fitTest(t[d],u[d],n/100);i.match+=p.match,i.extra+=p.extra}void 0!==t[d]&&(i.match+=n)}else i.extra+=n}return i}},{key:"_getSchema",value:function(t){return void 0===t?l({},this.jsoneditor.expandRefs(this.schema)):t}},{key:"validate",value:function(t){return this._validateSchema(this.schema,t)}},{key:"_validateSchema",value:function(t,e,n){var i=this,o=[];return n=n||this.jsoneditor.root.formname,t=l({},this.jsoneditor.expandRefs(t)),void 0===e?this._validateV3Required(t,e,n):(Object.keys(t).forEach((function(r){i._validateSubSchema[r]&&o.push.apply(o,Hn(i._validateSubSchema[r].call(i,t,e,n)))})),o.push.apply(o,Hn(this._validateByValueType(t,e,n))),t.links&&t.links.forEach((function(r,s){r.rel&&"describedby"===r.rel.toLowerCase()&&(t=i._expandSchemaLink(t,s),o.push.apply(o,Hn(i._validateSchema(t,e,n,i.translate))))})),["date","time","datetime-local"].includes(t.format)&&o.push.apply(o,Hn(this._validateDateTimeSubSchema(t,e,n))),["uuid"].includes(t.format)&&o.push.apply(o,Hn(this._validateUUIDSchema(t,e,n))),o.push.apply(o,Hn(this._validateCustomValidator(t,e,n))),this._removeDuplicateErrors(o))}},{key:"_expandSchemaLink",value:function(t,e){var n=t.links[e].href,i=this.jsoneditor.root.getValue(),o=this.jsoneditor.compileTemplate(n,this.jsoneditor.template),r=document.location.origin+document.location.pathname+o(i);return t.links=t.links.slice(0,e).concat(t.links.slice(e+1)),l({},t,this.jsoneditor.refs[r])}},{key:"_validateV3Required",value:function(t,e,n){return(void 0!==t.required&&!0===t.required||void 0===t.required&&!0===this.jsoneditor.options.required_by_default)&&"info"!==t.type?[{path:n,property:"required",message:this.translate("error_notset",null,t)}]:[]}},{key:"_validateByValueType",value:function(t,e,n){var i=this,o=[];if(null===e)return o;if("number"==typeof e)Object.keys(t).forEach((function(r){i._validateNumberSubSchema[r]&&o.push.apply(o,Hn(i._validateNumberSubSchema[r].call(i,t,e,n)))}));else if("string"==typeof e)Object.keys(t).forEach((function(r){i._validateStringSubSchema[r]&&o.push.apply(o,Hn(i._validateStringSubSchema[r].call(i,t,e,n)))}));else if(Array.isArray(e))Object.keys(t).forEach((function(r){i._validateArraySubSchema[r]&&o.push.apply(o,Hn(i._validateArraySubSchema[r].call(i,t,e,n)))}));else if("object"===Dn(e)){var r={};Object.keys(t).forEach((function(s){i._validateObjectSubSchema[s]&&o.push.apply(o,Hn(i._validateObjectSubSchema[s].call(i,t,e,n,r)))})),void 0!==t.additionalProperties||!this.jsoneditor.options.no_additional_properties||t.oneOf||t.anyOf||t.allOf||(t.additionalProperties=!1),Object.keys(t).forEach((function(s){void 0!==i._validateObjectSubSchema2[s]&&o.push.apply(o,Hn(i._validateObjectSubSchema2[s].call(i,t,e,n,r)))}))}return o}},{key:"_validateUUIDSchema",value:function(t,e,n){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)?[]:[{path:n,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}$"],t)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(t,e,n){var i=t.multipleOf||t.divisibleBy,o=e/i===Math.floor(e/i);return window.math?o=window.math.mod(window.math.bignumber(e),window.math.bignumber(i)).equals(0):window.Decimal&&(o=new window.Decimal(e).mod(new window.Decimal(i)).equals(0)),o?[]:[{path:n,property:t.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[i],t)}]}},{key:"_validateDateTimeSubSchema",value:function(t,e,n){var i=this,o=this.jsoneditor.getEditor(n),r=o&&o.flatpickr?o.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[t.format];if("integer"===t.type)return function(t,e,n){return 1*e<1?[{path:n,property:"format",message:i.translate("error_invalid_epoch",null,t)}]:e!==Math.abs(parseInt(e))?[{path:n,property:"format",message:i.translate("error_".concat(t.format.replace(/-/g,"_")),[r],t)}]:[]}(t,e,n);if(o&&o.flatpickr){if(o)return function(t,e,n,o){if(""!==e){var r;if("single"!==o.flatpickr.config.mode){var s="range"===o.flatpickr.config.mode?o.flatpickr.l10n.rangeSeparator:", ";r=o.flatpickr.selectedDates.map((function(t){return o.flatpickr.formatDate(t,o.flatpickr.config.dateFormat)})).join(s)}try{if(r){if(r!==e)throw new Error("".concat(o.flatpickr.config.mode," mismatch"))}else if(o.flatpickr.formatDate(o.flatpickr.parseDate(e,o.flatpickr.config.dateFormat),o.flatpickr.config.dateFormat)!==e)throw new Error("mismatch")}catch(e){var a=void 0!==o.flatpickr.config.errorDateFormat?o.flatpickr.config.errorDateFormat:o.flatpickr.config.dateFormat;return[{path:n,property:"format",message:i.translate("error_".concat(o.format.replace(/-/g,"_")),[a],t)}]}}return[]}(t,e,n,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})?)$/}[t.format].test(e))return[{path:n,property:"format",message:this.translate("error_".concat(t.format.replace(/-/g,"_")),[r],t)}];return[]}},{key:"_validateCustomValidator",value:function(t,e,n){var i=this,o=[];o.push.apply(o,Hn(zn.call(this,t,e,n,this.translate)));var r=function(r){o.push.apply(o,Hn(r.call(i,t,e,n)))};return this.defaults.custom_validators.forEach(r),this.options.custom_validators&&this.options.custom_validators.forEach(r),o}},{key:"_removeDuplicateErrors",value:function(t){return t.reduce((function(t,e){var n=!0;return t||(t=[]),t.forEach((function(t){t.message===e.message&&t.path===e.path&&t.property===e.property&&(t.errorcount++,n=!1)})),n&&(e.errorcount=1,t.push(e)),t}),[])}},{key:"_checkType",value:function(t,e){var n={string:function(t){return"string"==typeof t},number:function(t){return"number"==typeof t},integer:function(t){return"number"==typeof t&&t===Math.floor(t)},boolean:function(t){return"boolean"==typeof t},array:function(t){return Array.isArray(t)},object:function(t){return null!==t&&!Array.isArray(t)&&"object"===Dn(t)},null:function(t){return null===t}};return"string"==typeof t?!n[t]||n[t](e):!this._validateSchema(t,e).length}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qn(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Wn(t){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(t)}function Gn(t){var e=function(t){if("object"!=Wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wn(e)?e:e+""}function Jn(t,e,n){return e=Kn(e),function(t,e){if(e&&("object"===Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$n()?Reflect.construct(e,n||[],Kn(t).constructor):e.apply(t,n))}function $n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($n=function(){return!!t})()}function Yn(){return Yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Yn.apply(this,arguments)}function Kn(t){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kn(t)}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xn(t,e)}var Qn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Jn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}Yn(Kn(e.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Yn(Kn(e.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].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 t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,Yn(Kn(e.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var n=0;n<this.editors.length;n++)this.editors[n]&&this.editors[n].disable(t);this.switcher.disabled=!0,Yn(Kn(e.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);var n=this.getValue();this.type=t,this.register(),this.editors.forEach((function(t,i){var o,r;t&&(e.type===i?(e.keep_only_existing_values&&(o=t.getValue(),r=n,Object.keys(r).forEach((function(t){t in o&&(o[t]=r[t])})),n=o),(e.keep_values||e.if)&&t.setValue(n,!0),t.container.style.display=""):t.container.style.display="none")})),this.onChange(!0,!1,{event:"switch",data:{type:this.lastType,path:this.editors[t].path}}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,n,i=this,o=this.types[t],r=this.theme.getChildEditorHolder();this.editor_holder.appendChild(r),"string"==typeof o?(n=l({},this.schema)).type=o:(n=l({},this.schema,o),n=this.jsoneditor.expandRefs(n),o&&o.required&&Array.isArray(o.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(n.required=this.schema.required.concat(o.required))),null!==(e=n)&&void 0!==e&&null!==(e=e.options)&&void 0!==e&&e.dependencies&&delete n.options.dependencies;var s=this.jsoneditor.getEditorClass(n);this.editors[t]=this.jsoneditor.createEditor(s,{jsoneditor:this.jsoneditor,schema:n,container:r,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&this.theme.visuallyHidden(this.editors[t].header),this.editors[t].option=this.switcher_options[t],r.addEventListener("change_header_text",(function(){i.refreshHeaderText()})),t!==this.type&&(r.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,void 0!==this.jsoneditor.options.keep_oneof_values&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),void 0!==this.options.keep_oneof_values&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,void 0!==this.jsoneditor.options.keep_only_existing_values&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),void 0!==this.options.keep_only_existing_values&&(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&&y(this.thenSchema,this.schema,this.schema.then),this.schema.else&&y(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach((function(t){delete t.if,delete t.then,delete t.else})),delete this.schema.if;else{if(this.schema.type&&"any"!==this.schema.type)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 t=this.schema.disallow;"object"===Wn(t)&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach((function(n){t.includes(n)||e.push(n)})),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=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),e.appendChild(this.switcherLabel),e.appendChild(this.switcher)),this.switcher.addEventListener("change",(function(e){e.preventDefault(),e.stopPropagation(),t.switchEditor(t.display_text.indexOf(e.currentTarget.value)),t.onChange(!0)})),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var n={};this.jsoneditor.options.custom_validators&&(n.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((function(e,i){var o;t.editors[i]=!1,"string"==typeof e?(o=l({},t.schema)).type=e:(o=l({},t.schema,e),e.required&&Array.isArray(e.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(o.required=t.schema.required.concat(e.required))),t.validators[i]=new Un(t.jsoneditor,o,n,t.defaults)})),this.jsoneditor.on("change",(function(){t.switchIf()})),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t,n){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),Yn(Kn(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach((function(e,n){e.textContent=t[n]}))}},{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 t=this.getIfType(this.value);this.lastType!==t&&(this.switchEditor(t),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(t){return 0===this.jsoneditor.validator._validateSchema(this.ifSchema,t).length?0:1}},{key:"setValue",value:function(t,e){var n=this;t=this.applyConstFilter(t);var i=this.type,o={match:0,extra:0,i:this.type},r={match:0,i:null};this.validators.forEach((function(e,i){var s=null;void 0!==n.anyOf&&n.anyOf&&(s=e.fitTest(t),(o.match<s.match||o.match===s.match&&o.extra>s.extra)&&((o=s).i=i)),e.validate(t).length||null!==r.i?o=r:(r.i=i,null!==s&&(r.match=s.match))}));var s=r.i;void 0!==this.anyOf&&this.anyOf&&r.match<o.match&&(s=o.i),this.if&&(s=this.getIfType(t)),null===s&&(s=this.type),this.type=s,this.switcher.value=this.display_text[s];var a=this.type!==i;a&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),void 0!==t&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(a)}},{key:"destroy",value:function(){this.editors.forEach((function(t){t&&t.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),Yn(Kn(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var n=this.oneOf?"oneOf":"anyOf";this.editors.forEach((function(i,o){if(i){var r="".concat(e.path,".").concat(n,"[").concat(o,"]");i.showValidationErrors(t.reduce((function(t,n){if(n.path.startsWith(r)||n.path===r.substr(0,n.path.length)){var i=l({},n);n.path.startsWith(r)&&(i.path=e.path+i.path.substr(r.length)),t.push(i)}return t}),[]))}}))}else this.editors.forEach((function(e){e&&e.showValidationErrors(t)}))}},{key:"addLinks",value:function(){}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t){var e=function(t){if("object"!=ti(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ti(e)?e:e+""}function ni(t,e,n){return e=oi(e),function(t,e){if(e&&("object"===ti(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ii()?Reflect.construct(e,n||[],oi(t).constructor):e.apply(t,n))}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function oi(t){return oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oi(t)}function ri(t,e){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ri(t,e)}var si=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ni(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(e,t),n=e,(i=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ei(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ai(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function li(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ai(Object(n),!0).forEach((function(e){ci(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ci(t,e,n){return(e=pi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ui(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return hi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hi(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function di(t){return di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(t)}function pi(t){var e=function(t){if("object"!=di(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==di(e)?e:e+""}function fi(t,e,n){return e=vi(e),function(t,e){if(e&&("object"===di(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mi()?Reflect.construct(e,n||[],vi(t).constructor):e.apply(t,n))}function mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mi=function(){return!!t})()}function yi(){return yi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vi(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},yi.apply(this,arguments)}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vi(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}var gi=function(t){function e(t,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=fi(this,e,[t,n])).currentDepth=i,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bi(t,e)}(e,t),n=e,(i=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){yi(vi(e.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){return t.register()}))}},{key:"unregister",value:function(){yi(vi(e.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){return t.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),yi(vi(e.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){(t.isActive()||t.isUiOnly)&&t.enable(),t.optInCheckbox&&(t.optInCheckbox.disabled=!1)})))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),yi(vi(e.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){(e.isActive()||e.isUiOnly)&&e.disable(t),e.optInCheckbox.disabled=!0}))}},{key:"layoutEditors",value:function(){var t,e,n=this;if(this.row_container){var i;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(t,e){var i=n.editors[t].schema.propertyOrder,o=n.editors[e].schema.propertyOrder;return"number"!=typeof i&&(i=1e3),"number"!=typeof o&&(o=1e3),i-o}));var o,r="categories"===this.format,s=[],a=null,l=null;if("grid-strict"===this.format){var u=0;if(o=[],this.property_order.forEach((function(t){var e=n.editors[t];if(!e.property_removed){var i=e.options.hidden?0:e.options.grid_columns||e.getNumColumns(),r=e.options.hidden?0:e.options.grid_offset||0,a=!e.options.hidden&&(e.options.grid_break||!1),l={key:t,width:i,offset:r,height:e.options.hidden?0:e.container.offsetHeight};o.push(l),s[u]=o,a&&(u++,o=[])}})),this.layout===JSON.stringify(s))return!1;for(this.layout=JSON.stringify(s),i=document.createElement("div"),t=0;t<s.length;t++)for(o=this.theme.getGridRow(),i.appendChild(o),e=0;e<s[t].length;e++)a=s[t][e].key,(l=this.editors[a]).options.hidden?l.container.style.display="none":this.theme.setGridColumnSize(l.container,s[t][e].width,s[t][e].offset),o.appendChild(l.container)}else if("grid"===this.format){for(this.property_order.forEach((function(t){var e=n.editors[t];if(!e.property_removed){for(var i=!1,o=e.options.hidden?0:e.options.grid_columns||e.getNumColumns(),r=e.options.hidden?0:e.container.offsetHeight,a=0;a<s.length;a++)s[a].width+o<=12&&(!r||.5*s[a].minh<r&&2*s[a].maxh>r)&&(i=a);!1===i&&(s.push({width:0,minh:999999,maxh:0,editors:[]}),i=s.length-1),s[i].editors.push({key:t,width:o,height:r}),s[i].width+=o,s[i].minh=Math.min(s[i].minh,r),s[i].maxh=Math.max(s[i].maxh,r)}})),t=0;t<s.length;t++)if(s[t].width<12){var h=!1,d=0;for(e=0;e<s[t].editors.length;e++)(!1===h||s[t].editors[e].width>s[t].editors[h].width)&&(h=e),s[t].editors[e].width*=12/s[t].width,s[t].editors[e].width=Math.floor(s[t].editors[e].width),d+=s[t].editors[e].width;d<12&&(s[t].editors[h].width+=12-d),s[t].width=12}if(this.layout===JSON.stringify(s))return!1;for(this.layout=JSON.stringify(s),i=document.createElement("div"),t=0;t<s.length;t++)for(o=this.theme.getGridRow(),i.appendChild(o),e=0;e<s[t].editors.length;e++)a=s[t].editors[e].key,(l=this.editors[a]).options.hidden?l.container.style.display="none":this.theme.setGridColumnSize(l.container,s[t].editors[e].width),o.appendChild(l.container)}else{if(i=document.createElement("div"),r){var p=document.createElement("div"),f=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),m=this.theme.getTopTabContentHolder(f);for(this.property_order.forEach((function(t){var e=n.editors[t];if(!e.property_removed){var i=n.theme.getTabContent(),o=e.schema&&("object"===e.schema.type||"array"===e.schema.type);i.isObjOrArray=o;var r=n.theme.getGridRow();e.tab||(void 0===n.basicPane?n.addRow(e,f,i):n.addRow(e,f,n.basicPane)),i.id=n.getValidId(e.tab_text.textContent),o?(i.appendChild(r),m.appendChild(i),n.theme.addTopTab(f,e.tab)):(p.appendChild(r),m.childElementCount>0?m.firstChild.isObjOrArray&&(i.appendChild(p),m.insertBefore(i,m.firstChild),n.theme.insertBasicTopTab(e.tab,f),e.basicPane=i):(i.appendChild(p),m.appendChild(i),n.theme.addTopTab(f,e.tab),e.basicPane=i)),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),r.appendChild(e.container),e.rowPane=i}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var y=this.tabs_holder.parentNode;y.removeChild(y.firstChild),y.appendChild(f),this.tabPanesContainer=m,this.tabs_holder=f;var v=this.theme.getFirstTab(this.tabs_holder);return void(v&&c(v,"click"))}this.property_order.forEach((function(t){var e=n.editors[t];e.property_removed||(o=n.theme.getGridRow(),i.appendChild(o),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),o.appendChild(e.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(i)}}},{key:"getPropertySchema",value:function(t){var e=this,n=this.schema.properties[t]||{};n=l({},n);var i=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(o){new RegExp(o).test(t)&&(n.allOf=n.allOf||[],n.allOf.push(e.schema.patternProperties[o]),i=!0)})),!i&&this.schema.additionalProperties&&"object"===di(this.schema.additionalProperties)&&(n=l({},this.schema.additionalProperties)),n}},{key:"preBuild",value:function(){var t=this;if(yi(vi(e.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(e){var n=ui(e,2),i=n[0],o=n[1],r=t.jsoneditor.getEditorClass(o);t.editors[i]=t.jsoneditor.createEditor(r,{jsoneditor:t.jsoneditor,schema:o,path:"".concat(t.path,".").concat(i),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[i].preBuild();var s=t.editors[i].options.hidden?0:t.editors[i].options.grid_columns||t.editors[i].getNumColumns();t.minwidth+=s,t.maxwidth+=s})),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(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach((function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())}))}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(e,n){var i=t.editors[e].schema.propertyOrder,o=t.editors[n].schema.propertyOrder;return"number"!=typeof i&&(i=1e3),"number"!=typeof o&&(o=1e3),i-o}))}},{key:"addTab",value:function(t){var e=this,n=this.rows[t].schema&&("object"===this.rows[t].schema.type||"array"===this.rows[t].schema.type);this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=n?this.rows[t].getHeaderText():void 0===this.schema.basicCategoryTitle?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",(function(n){e.active_tab=e.rows[t].tab,e.refreshTabs(),n.preventDefault(),n.stopPropagation()})))}},{key:"addRow",value:function(t,e,n){var i=this.rows.length,o="object"===t.schema.type||"array"===t.schema.type;this.rows[i]=t,this.rows[i].rowPane=n,o?(this.addTab(i),this.theme.addTopTab(e,this.rows[i].tab)):void 0===this.basicTab?(this.addTab(i),this.basicTab=i,this.basicPane=n,this.theme.addTopTab(e,this.rows[i].tab)):(this.rows[i].tab=this.rows[this.basicTab].tab,this.rows[i].tab_text=this.rows[this.basicTab].tab_text,this.rows[i].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,n=void 0!==this.basicTab,i=!1;this.rows.forEach((function(o){o.tab&&o.rowPane&&o.rowPane.parentNode&&(n&&o.tab===e.rows[e.basicTab].tab&&i||(t?o.tab_text.textContent=o.getHeaderText():(n&&o.tab===e.rows[e.basicTab].tab&&(i=!0),o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))))}))}},{key:"build",value:function(){var t=this,e="categories"===this.format;if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach((function(e){var n=ui(e,2),i=n[0],o=n[1],r=t.theme.getTableCell();t.editor_holder.appendChild(r),o.setContainer(r),o.build(),o.postBuild(),o.setOptInCheckbox(o.header),o.setValue(o.getDefault(),!0),t.editors[i].options.hidden&&(r.style.display="none"),t.editors[i].options.input_width&&(r.style.width=t.editors[i].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(e){e.preventDefault(),e.stopPropagation(),t.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(e){e.preventDefault(),e.stopPropagation(),t.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(e){e.preventDefault(),e.stopPropagation(),t.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(e){if(e.preventDefault(),e.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable();var n=t.editors[t.addproperty_input.value].key,i=t.editors[t.addproperty_input.value].type,o=t.editors[t.addproperty_input.value].path;t.onChange(!0,!1,{event:"add",data:{key:n,type:i,path:o}})}})),this.addproperty_input.addEventListener("input",(function(e){e.target.previousSibling.previousSibling.childNodes.forEach((function(n){var i=n.innerText,o=e.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(i=i.toLowerCase(),o=o.toLowerCase()),i.includes(o)?n.style.display="":n.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 n=document.createElement("div");n.style.clear="both",this.addproperty_holder.appendChild(n),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(),e?(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(n){var i=t.theme.getTabContent(),o=t.theme.getGridColumn(),r=!(!n.schema||"object"!==n.schema.type&&"array"!==n.schema.type);if(i.isObjOrArray=r,e){if(r){var s=t.theme.getGridContainer();s.appendChild(o),i.appendChild(s),t.tabPanesContainer.appendChild(i),t.row_container=s}else void 0===t.row_container_basic&&(t.row_container_basic=t.theme.getGridContainer(),i.appendChild(t.row_container_basic),0===t.tabPanesContainer.childElementCount?t.tabPanesContainer.appendChild(i):t.tabPanesContainer.insertBefore(i,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(o);t.addRow(n,t.tabs_holder,i),i.id=t.getValidId(n.schema.title)}else t.row_container.appendChild(o);n.setContainer(o),n.build(),n.postBuild(),n.setOptInCheckbox(n.header)})),this.rows[0]&&c(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(e){e.preventDefault(),e.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))})),this.options.collapsed&&c(this.collapse_control,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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(e){e.preventDefault(),e.stopPropagation(),t.toggleEditJSON()})),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&void 0!==this.schema.options.disable_edit_json?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(e){e.preventDefault(),e.stopPropagation(),t.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(e){t.editor_holder.appendChild(t.editors[e].container)}))):(this.layoutEditors(),this.layoutEditors()),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"deactivateNonRequiredProperties",value:function(t){var e=this,n=this.jsoneditor.options.show_opt_in,i=void 0!==this.options.show_opt_in,o=i&&!0===this.options.show_opt_in,r=i&&!1===this.options.show_opt_in;(o||!r&&n||!i&&n)&&Object.entries(this.editors).forEach((function(n){var i=ui(n,2),o=i[0],r=i[1];e.isRequiredObject(r)||e.editors[o].deactivate(),t&&"function"==typeof e.editors[o].deactivateNonRequiredProperties&&e.editors[o].deactivateNonRequiredProperties(t)}))}},{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(t){return window.alert(t)}))}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),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(t,e,n){var i;this.schema.properties[t]&&(i=this.schema.properties[t].propertyOrder),"number"!=typeof i&&(i=1e3),e.propertyOrder=i;for(var o=0;o<n.childNodes.length;o++){var r=n.childNodes[o];if(e.propertyOrder<r.propertyOrder){this.addproperty_list.insertBefore(e,r),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,n=this,i=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var o=this.theme.getCheckboxLabel(e),r=this.theme.getFormControl(o,i,null,null,this.path+"-"+t);return r.style.paddingBottom=r.style.marginBottom=r.style.paddingTop=r.style.marginTop=0,r.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,r,this.addproperty_list),i.checked=t in this.editors,i.addEventListener("change",(function(){i.checked?n.addObjectProperty(t):n.removeObjectProperty(t),n.onChange(!0)})),this.addproperty_checkboxes[t]=i,i}},{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(t){if(this.editors[t]){var e;if(null!==(e=this.editors[t].schema)&&void 0!==e&&null!==(e=e.options)&&void 0!==e&&e.dependencies)return;this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors()}}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce((function(e,n){switch(n){case"$ref":return e;case"properties":case"items":return li(li({},e),{},ci({},n,{}));case"additionalProperties":case"propertyNames":return li(li({},e),{},ci({},n,!0));default:return li(li({},e),{},ci({},n,t[n]))}}),{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find((function(e){return new RegExp(e).test(t)}))))return;var n=this.getPropertySchema(t);"number"!=typeof n.propertyOrder&&(n.propertyOrder=Object.keys(this.editors).length+1e3);var i=this.jsoneditor.getEditorClass(n),o=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:o&&this.currentDepth>=o?this.getSchemaOnMaxDepth(n):n,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var r=this.theme.getChildEditorHolder();this.editor_holder.appendChild(r),this.editors[t].setContainer(r),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(i.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t,n){this.refreshValue(),yi(vi(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"canHaveAdditionalProperties",value:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:"object"===di(this.schema.additionalProperties)&&null!==this.schema.additionalProperties||("boolean"==typeof this.options.no_additional_properties?!this.options.no_additional_properties:"boolean"!=typeof this.jsoneditor.options.no_additional_properties||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach((function(t){return t.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),yi(vi(e.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=yi(vi(e.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach((function(e){var n;(void 0===(n=t[e])||""===n||n===Object(n)&&0===Object.keys(n).length&&n.constructor===Object)&&delete t[e]})),t&&(this.jsoneditor.options.remove_false_properties||this.options.remove_false_properties)&&Object.keys(t).forEach((function(e){!1===t[e]&&delete t[e]})),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach((function(e){t.editors[e].isActive()&&(t.editors[e].refreshValue(),t.value[e]=t.editors[e].getValue())})),Object.keys(this.editors).forEach((function(e){t.editors[e].isActive()&&t.activateDependentRequired(t.editors[e].key)})),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(t){var e=this;this.getDependentRequired(t).forEach((function(t){var n;Object.entries(e.cached_editors).forEach((function(e){var i=ui(e,2),o=(i[0],i[1]);o.key===t&&(n=o)})),n&&!n.isActive()&&n.activate()}))}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&h(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||!1!==this.options.disable_properties&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,n=0,i=!1;Object.keys(this.editors).forEach((function(t){return n++})),e=this.canHaveAdditionalProperties()&&!(void 0!==this.schema.maxProperties&&n>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(o){t.addPropertyCheckbox(o),t.isRequiredObject(t.cached_editors[o])&&o in t.editors&&(t.addproperty_checkboxes[o].disabled=!0),void 0!==t.schema.minProperties&&n<=t.schema.minProperties?(t.addproperty_checkboxes[o].disabled=t.addproperty_checkboxes[o].checked,t.addproperty_checkboxes[o].checked||(i=!0)):o in t.editors?i=!0:e||h(t.schema.properties,o)?(t.addproperty_checkboxes[o].disabled=!1,i=!0):t.addproperty_checkboxes[o].disabled=!0})),this.canHaveAdditionalProperties()&&(i=!0),Object.keys(this.schema.properties).forEach((function(e){t.cached_editors[e]||(i=!0,t.addPropertyCheckbox(e))})),i?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return"boolean"==typeof t.schema.required?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var n=this;("object"!==di(t=(t=this.applyConstFilter(t))||{})||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach((function(i){var o=ui(i,2),r=o[0],s=o[1];void 0!==t[r]?(n.addObjectProperty(r),s.setValue(t[r],e),s.activate(),n.disabled&&s.disable()):e||n.isRequiredObject(s)?s.setValue(s.getDefault(),e):n.jsoneditor.options.show_opt_in||n.options.show_opt_in?s.deactivate():n.removeObjectProperty(r)})),Object.entries(t).forEach((function(t){var i=ui(t,2),o=i[0],r=i[1];n.cached_editors[o]||(n.addObjectProperty(o),n.editors[o]&&n.editors[o].setValue(r,e,!!n.editors[o].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,n=[],i=[];t.forEach((function(t){t.path===e.path?n.push(t):i.push(t)})),this.error_holder&&(n.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",n.forEach((function(t){t.errorcount&&t.errorcount>1&&(t.message+=" (".concat(t.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(n.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(t){t.showValidationErrors(i)}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function _i(t){return _i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(t)}function wi(t){var e=function(t){if("object"!=_i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_i(e)?e:e+""}function xi(t,e,n){return e=ji(e),function(t,e){if(e&&("object"===_i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ki()?Reflect.construct(e,n||[],ji(t).constructor):e.apply(t,n))}function ki(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ki=function(){return!!t})()}function Oi(){return Oi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ji(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Oi.apply(this,arguments)}function ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}gi.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 Ei=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),xi(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ci(t,e)}(e,t),n=e,(i=[{key:"preBuild",value:function(){Oi(ji(e.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=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 e=function(e){t.setValue(e.currentTarget.value),t.onChange(!0),t.radioGroup.forEach((function(e){e.checked=e.value===t.getValue()}))},n=0;n<this.enum_values.length;n++){var i={id:"".concat(this.formname,"[").concat(n,"]"),value:this.enum_values[n]};this.jsoneditor.options.use_name_attributes&&(i.name=this.formname),this.input=this.theme.getFormRadio(i),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var o=this.theme.getFormRadioLabel(this.enum_display[n]);o.htmlFor=this.input.id;var r=this.theme.getFormRadioControl(o,this.input,!("horizontal"!==this.options.layout&&!this.options.compact));this.radioContainer.appendChild(r)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var s=0;s<this.radioGroup.length;s++)this.radioGroup[s].disabled=!0;this.radioContainer.classList.add("readonly")}var a=this.theme.getContainer();a.appendChild(this.radioContainer),a.dataset.containerFor="radio",this.input=a,this.control=this.theme.getFormControl(this.label,a,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady()}))}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Oi(ji(e.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var n=0;n<this.radioGroup.length;n++)this.radioGroup[n].disabled=!0;this.radioContainer.classList.add("readonly"),Oi(ji(e.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),Oi(ji(e.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){"string"!=typeof(t=this.applyConstFilter(t))&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++){if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0;break}this.radioGroup[e].checked=!1}this.value=t,this.onChange()}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,wi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function Pi(t){return Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pi(t)}function Li(t){var e=function(t){if("object"!=Pi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pi(e)?e:e+""}function Si(t,e,n){return e=Ri(e),function(t,e){if(e&&("object"===Pi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ti()?Reflect.construct(e,n||[],Ri(t).constructor):e.apply(t,n))}function Ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ti=function(){return!!t})()}function Ai(){return Ai="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ri(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ai.apply(this,arguments)}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(t)}function Bi(t,e){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bi(t,e)}var Ii=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Si(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bi(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=Ai(Ri(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.sceditor_instance&&this.sceditor_instance.val(o.value)}},{key:"build",value:function(){this.options.format="textarea",Ai(Ri(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var n=this.expandCallbacks("sceditor",l({},{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})),i=window.sceditor.instance(this.input);void 0===i&&window.sceditor.create(this.input,n),this.sceditor_instance=i||window.sceditor.instance(this.input),this.sceditor_instance.blur((function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)}else Ai(Ri(e.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),Ai(Ri(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Ai(Ri(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Ai(Ri(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Li(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Mi(t){var e=function(t){if("object"!=zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zi(e)?e:e+""}function Ni(t,e,n){return e=Hi(e),function(t,e){if(e&&("object"===zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Di()?Reflect.construct(e,n||[],Hi(t).constructor):e.apply(t,n))}function Di(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Di=function(){return!!t})()}function Fi(){return Fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hi(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Fi.apply(this,arguments)}function Hi(t){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hi(t)}function Vi(t,e){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vi(t,e)}var Zi=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ni(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vi(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){if(t=this.applyConstFilter(t),this.select2_instance){n?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0);var i=this.updateValue(t);this.input.value=i,this.select2v4?this.select2_instance.val(i).trigger("change"):this.select2_instance.select2("val",i),this.onChange(!0)}else Fi(Hi(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var n=this.expandCallbacks("select2",l({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=n.tags=!!n.tags&&"string"===this.schema.type,this.select2_instance=window.jQuery(this.input).select2(n),this.select2v4=h(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var e=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(e),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}Fi(Hi(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,n=this.typecast(t),i=!1;return this.enum_values.includes(n)||""===n||(this.enum_options.push("".concat(n)),this.enum_display.push("".concat(n)),this.enum_values.push(n),this.schema.enum.push(n),(e=this.input.querySelector('option[value="'.concat(n,'"]')))?e.removeAttribute("data-select2-tag"):this.select2_instance.append(new Option(n,n,!1,!1)).trigger("change"),i=!0),i}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Fi(Hi(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Fi(Hi(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Fi(Hi(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Mi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function qi(t){return qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(t)}function Ui(t){var e=function(t){if("object"!=qi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qi(e)?e:e+""}function Wi(t,e,n){return e=$i(e),function(t,e){if(e&&("object"===qi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gi()?Reflect.construct(e,n||[],$i(t).constructor):e.apply(t,n))}function Gi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gi=function(){return!!t})()}function Ji(){return Ji="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$i(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ji.apply(this,arguments)}function $i(t){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$i(t)}function Yi(t,e){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yi(t,e)}var Ki=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Wi(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yi(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){if(t=this.applyConstFilter(t),this.selectize_instance){n?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0);var i=this.updateValue(t);this.input.value=i,this.selectize_instance.clear(!0),this.selectize_instance.setValue(i),this.onChange(!0)}else Ji($i(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var n=this.expandCallbacks("selectize",l({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=n.create=!!n.create&&"string"===this.schema.type,this.selectize_instance=window.jQuery(this.input).selectize(n)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(e){t.updateValue(e),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Ji($i(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),n=!1;return this.enum_values.includes(e)||""===e||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),n=!0),n}},{key:"onWatchedFieldChange",value:function(){var t=this;Ji($i(e.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((function(e,n){t.selectize_instance.addOption({value:e,text:t.enum_display[n]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Ji($i(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Ji($i(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Ji($i(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ui(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function Xi(t){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xi(t)}function Qi(t){var e=function(t){if("object"!=Xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xi(e)?e:e+""}function to(t,e,n){return e=no(e),function(t,e){if(e&&("object"===Xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eo()?Reflect.construct(e,n||[],no(t).constructor):e.apply(t,n))}function eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eo=function(){return!!t})()}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},no(t)}function io(t,e){return io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},io(t,e)}var oo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),to(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&io(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){var t=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 e=this.formname.replace(/\W/g,"");if("function"==typeof SignaturePad){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var n=document.createElement("div");n.classList.add("signature-container");var i=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&i.setAttribute("name",e),i.classList.add("signature"),n.appendChild(i),this.signaturePad=new window.SignaturePad(i),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var o=document.createElement("div"),r=document.createElement("button");r.classList.add("tiny","button"),r.innerHTML="Clear signature",o.appendChild(r),n.appendChild(o),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(t){i.setAttribute("readOnly","readOnly"),t.disabled=!0}))),r.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()})),this.control=this.theme.getFormControl(this.label,n,this.description),this.container.appendChild(this.control),this.refreshValue(),i.width=n.offsetWidth,this.options&&this.options.canvas_height?i.height=this.options.canvas_height:i.height="300"}else{var s=document.createElement("p");s.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(s)}}},{key:"setValue",value:function(t){if(t=this.applyConstFilter(t),"function"==typeof SignaturePad){var e=this.sanitize(t);if(this.value===e)return;return this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&""!==t&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function ro(t){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(t)}function so(t){var e=function(t){if("object"!=ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ro(e)?e:e+""}function ao(t,e,n){return e=uo(e),function(t,e){if(e&&("object"===ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lo()?Reflect.construct(e,n||[],uo(t).constructor):e.apply(t,n))}function lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lo=function(){return!!t})()}function co(){return co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=uo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},co.apply(this,arguments)}function uo(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}n(6031);var po=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ao(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ho(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=co(uo(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.simplemde_instance&&this.simplemde_instance.value(o.value)}},{key:"build",value:function(){this.options.format="textarea",co(uo(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,n=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",l({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",(function(){n.value=n.simplemde_instance.value(),n.is_dirty=!0,n.onChange(!0)})),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):co(uo(e.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),co(uo(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),co(uo(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),co(uo(e.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){var n=this,i=function i(){t.display.wrapper.offsetHeight?(n.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(i,e.delay)};e.timeout=window.setTimeout(i,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(i,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,so(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function fo(t){return fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fo(t)}function mo(t){var e=function(t){if("object"!=fo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fo(e)?e:e+""}function yo(t,e,n){return e=go(e),function(t,e){if(e&&("object"===fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vo()?Reflect.construct(e,n||[],go(t).constructor):e.apply(t,n))}function vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vo=function(){return!!t})()}function bo(){return bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=go(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},bo.apply(this,arguments)}function go(t){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},go(t)}function _o(t,e){return _o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_o(t,e)}var wo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),yo(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_o(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){var 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.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),void 0===this.schema.enum){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var n=0;n<e;n++)this.enum_values.push(n+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var i=function(e){e.preventDefault(),e.stopPropagation(),t.setValue(e.currentTarget.value),t.onChange(!0)},o=this.enum_values.length-1;o>-1;o--){var r=this.formname+(o+1),s=this.theme.getFormInputField("radio");s.name="".concat(this.formname,"[starrating]"),s.value=this.enum_values[o],s.id=r,s.addEventListener("change",i,!1),this.radioGroup.push(s);var a=document.createElement("label");a.htmlFor=r,a.title=this.enum_values[o],this.options.displayValue&&a.classList.add("starrating-display-enabled");var l=this.theme.getHiddenText("label");l.textContent=o,a.appendChild(l),this.ratingContainer.appendChild(s),this.ratingContainer.appendChild(a)}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 c=0;c<this.radioGroup.length;c++)this.radioGroup[c].disabled=!0;this.ratingContainer.classList.add("readonly")}var u=this.theme.getContainer();u.appendChild(this.ratingContainer),this.input=u,this.control=this.theme.getFormControl(this.label,u,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].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),bo(go(e.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return"integer"===this.schema.type?""===this.value?0:parseInt(this.value):this.value}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value=t;for(var n=0;n<this.radioGroup.length;n++)if(this.radioGroup[n].value==="".concat(t)){this.radioGroup[n].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value);break}bo(go(e.prototype),"setValue",this).call(this,this.value)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,mo(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function xo(t){return xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(t)}function ko(t){var e=function(t){if("object"!=xo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xo(e)?e:e+""}function Oo(t,e,n){return e=Eo(e),function(t,e){if(e&&("object"===xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,jo()?Reflect.construct(e,n||[],Eo(t).constructor):e.apply(t,n))}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function Co(){return Co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Co.apply(this,arguments)}function Eo(t){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}wo.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 Lo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Oo(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){Co(Eo(e.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){Co(Eo(e.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){Co(Eo(e.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ko(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(gn);function So(t){return So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(t)}function To(t){var e=function(t){if("object"!=So(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=So(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==So(e)?e:e+""}function Ao(t,e,n){return e=Io(e),function(t,e){if(e&&("object"===So(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ro()?Reflect.construct(e,n||[],Io(t).constructor):e.apply(t,n))}function Ro(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ro=function(){return!!t})()}function Bo(){return Bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Io(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Bo.apply(this,arguments)}function Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function zo(t,e){return zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zo(t,e)}var Mo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ao(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zo(t,e)}(e,t),n=e,i=[{key:"register",value:function(){if(Bo(Io(e.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(Bo(Io(e.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,Bo(Io(e.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 t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.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 e=t.getChildEditors(),n=t.property_order||Object.keys(e),i=0;i<n.length;i++){var o=this.theme.getTableHeaderCell(e[n[i]].getTitle());e[n[i]].options.hidden&&(o.style.display="none"),this.header_row.appendChild(o)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.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(t,n){this.refreshValue(),Bo(Io(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"getItemDefault",value:function(){return l({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var n=l({},this.schema.items),i=this.jsoneditor.getEditorClass(n,this.jsoneditor),o=this.row_holder.appendChild(this.theme.getTableRow()),r=o;this.item_has_child_editors||(r=this.theme.getTableCell(),o.appendChild(r));var s=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:n,container:r,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return s.preBuild(),e||(s.build(),s.postBuild(),s.controls_cell=o.appendChild(this.theme.getTableCell()),s.row=o,s.table_controls=this.theme.getButtonHolder(),s.controls_cell.appendChild(s.table_controls),s.table_controls.style.margin=0,s.table_controls.style.padding=0),s}},{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,Bo(Io(e.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(e=this.applyConstFilter(e),e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var i=!1;e.forEach((function(e,n){t.rows[n]?t.rows[n].setValue(e):(t.addRow(e),i=!0)}));for(var o=e.length;o<this.rows.length;o++){var r=this.rows[o].container;this.item_has_child_editors||this.rows[o].row.parentNode.removeChild(this.rows[o].row),this.rows[o].destroy(),r.parentNode&&r.parentNode.removeChild(r),this.rows[o]=null,i=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(i||n)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,n=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,i=[];this.rows.forEach((function(o,r){if(o.delete_button){var s=!e;t.setButtonState(o.delete_button,s),i.push(s)}if(o.copy_button){var a=!n;t.setButtonState(o.copy_button,a),i.push(a)}if(o.moveup_button){var l=0!==r;t.setButtonState(o.moveup_button,l),i.push(l)}if(o.movedown_button){var c=r!==t.rows.length-1;t.setButtonState(o.movedown_button,c),i.push(c)}}));var o=i.some((function(t){return t}));this.rows.forEach((function(e){return t.setButtonState(e.controls_cell,o)})),this.setButtonState(this.controls_header_cell,o),this.setButtonState(this.table,this.value.length);var r=!(n||this.hide_add_button);this.setButtonState(this.add_row_button,r);var s=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,s);var a=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,a);var l=r||s||a;this.setButtonState(this.controls,l)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach((function(e,n){t.value[n]=e.getValue()})),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var n=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,n)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,n)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,n)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,n)),this._supportDragDrop(this.rows[e].row),void 0!==t&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var n=this,i=this.getButton("","delete","button_delete_row_title_short");return i.classList.add("delete","json-editor-btntype-delete"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue(),o=n.getValue()[e];i.splice(e,1),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("deleteRow",o)})),e.appendChild(i),i}},{key:"_createCopyButton",value:function(t,e){var n=this,i=this.getButton("","copy","button_copy_row_title_short"),o=this.schema;return i.classList.add("copy","json-editor-btntype-copy"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue(),r=i[e];"string"===o.items.type&&"uuid"===o.items.format?r=f():"object"===o.items.type&&o.items.properties&&i.forEach((function(t,n){if(e===n)for(var s=0,a=Object.keys(t);s<a.length;s++){var l=a[s];o.items.properties&&o.items.properties[l]&&"uuid"===o.items.properties[l].format&&((r=Object.assign({},i[e]))[l]=f())}})),i.splice(e+1,0,r),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("copyRow",n.rows[e+1])})),e.appendChild(i),i}},{key:"_createMoveUpButton",value:function(t,e){var n=this,i=this.getButton("","moveup","button_move_up_title");return i.classList.add("moveup","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue();i.splice(e-1,0,i.splice(e,1)[0]),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])})),e.appendChild(i),i}},{key:"_createMoveDownButton",value:function(t,e){var n=this,i=this.getButton("","movedown","button_move_down_title");return i.classList.add("movedown","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue();i.splice(e+1,0,i.splice(e,1)[0]),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])})),e.appendChild(i),i}},{key:"_supportDragDrop",value:function(t){var e=this;U(t,(function(t,n){var i=e.getValue(),o=i[t];i.splice(t,1),i.splice(n,0,o),e.setValue(i),e.onChange(!0),e.jsoneditor.trigger("moveRow",e.rows[n])}),{useTrigger:!0})}},{key:"addControls",value:function(){var t=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(e){e.preventDefault(),e.stopPropagation(),t.setButtonState(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))})),this.options.collapsed&&c(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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 t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var n=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",n)})),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue(),i=n.pop();t.setValue(n),t.onChange(!0),t.jsoneditor.trigger("deleteRow",i)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",n)})),this.controls.appendChild(e),e}}],i&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,To(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(q);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Do(t){var e=function(t){if("object"!=No(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=No(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==No(e)?e:e+""}function Fo(t,e,n){return e=Zo(e),function(t,e){if(e&&("object"===No(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ho()?Reflect.construct(e,n||[],Zo(t).constructor):e.apply(t,n))}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Vo(){return Vo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Zo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Vo.apply(this,arguments)}function Zo(t){return Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zo(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}function Uo(t){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uo(t)}function Wo(t){var e=function(t){if("object"!=Uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uo(e)?e:e+""}function Go(t,e,n){return e=Yo(e),function(t,e){if(e&&("object"===Uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jo()?Reflect.construct(e,n||[],Yo(t).constructor):e.apply(t,n))}function Jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jo=function(){return!!t})()}function $o(){return $o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},$o.apply(this,arguments)}function Yo(t){return Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yo(t)}function Ko(t,e){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ko(t,e)}function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Qo(t){var e=function(t){if("object"!=Xo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xo(e)?e:e+""}function tr(t,e,n){return e=ir(e),function(t,e){if(e&&("object"===Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,er()?Reflect.construct(e,n||[],ir(t).constructor):e.apply(t,n))}function er(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(er=function(){return!!t})()}function nr(){return nr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ir(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},nr.apply(this,arguments)}function ir(t){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ir(t)}function or(t,e){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},or(t,e)}n(9868);var rr={ace:z,array:q,arrayChoices:at,arraySelect2:mt,arraySelectize:kt,autocomplete:Tt,base64:Dt,button:Gt,checkbox:ee,choices:ve,datetime:je,describedBy:Re,enum:Ve,hidden:Ye,info:on,integer:gn,ip:En,jodit:In,multiple:Qn,multiselect:Q,null:si,number:dn,object:gi,radio:Ei,sceditor:Ii,select:ce,select2:Zi,selectize:Ki,signature:oo,simplemde:po,starrating:wo,stepper:Lo,string:P,table:Mo,upload:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Fo(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(e,t),n=e,(i=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var 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.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",l({},{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(t,e,n,i){window.alert('No upload_handler defined for "'.concat(t.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("function"!=typeof this.options.upload_handler)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),!0===this.options.enable_drag_drop&&!0===this.options.hide_input||(this.clickHandler=function(e){t.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))),!0===this.options.enable_drag_drop){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(e){e.preventDefault(),e.stopPropagation();var n=e.target.files||e.dataTransfer.files;if(n&&n.length)if(0!==t.options.max_upload_size&&n[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=n[0].name);var i=new window.FileReader;i.onload=function(e){t.preview_value=e.target.result,t.refreshPreview(n),t.onChange(!0),i=null},i.readAsDataURL(n[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(e){var n=e.dataTransfer.items||e.dataTransfer.files,i=n&&n.length&&(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)),o=e.currentTarget.classList&&e.currentTarget.classList.contains("upload-dropzone")&&i;switch((e.currentTarget===window?"w_":"e_")+e.type){case"w_drop":case"w_dragover":o||(e.dataTransfer.dropEffect="none");break;case"e_dragenter":o?(t.dropZone.classList.add("valid-dropzone"),e.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":o&&(e.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),o&&t.uploadHandler(e)}o||e.preventDefault()},!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.addEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.addEventListener(e,t.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 e=this.uploader||this.input,n=document.createElement("div");this.dropZone&&!this.altDropZone&&!0===this.options.drop_zone_top&&n.appendChild(this.dropZone),this.fileUploadGroup&&n.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&!0!==this.options.drop_zone_top&&n.appendChild(this.dropZone),n.appendChild(this.preview),e.parentNode.insertBefore(n,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(n){t.preview.appendChild(e)},e.onerror=function(t){console.error("upload error",t,t.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var n=t[0],i=this.preview_value.match(/^data:([^;,]+)[;,]/);if(n.mimeType=i?i[1]:"unknown",n.size>0){var o=Math.floor(Math.log(n.size)/Math.log(1024));n.formattedSize="".concat(parseFloat((n.size/Math.pow(1024,o)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][o])}else n.formattedSize="0 Bytes";var r=this.getButton("button_upload","upload","button_upload");r.addEventListener("click",(function(t){t.preventDefault(),r.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,n,{success:function(t){e.setValue(t),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),r.removeAttribute("disabled")},failure:function(t){e.theme.addInputError(e.uploader,t),e.progressBar&&e.preview.removeChild(e.progressBar),r.removeAttribute("disabled")},updateProgress:function(t){e.progressBar&&(t?e.theme.updateProgressBar(e.progressBar,t):e.theme.updateProgressBarUnknown(e.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(n,r,this.preview_value)),this.options.auto_upload&&(r.dispatchEvent(new window.MouseEvent("click")),r.parentNode.removeChild(r))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Vo(Zo(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Vo(Zo(e.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.removeEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.removeEventListener(e,t.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),Vo(Zo(e.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce((function(e,n){return e||new RegExp(n.replace(/\*/g,".*"),"gi").test(t)}),!1)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Do(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_),uuid:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Go(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ko(t,e)}(e,t),n=e,(i=[{key:"preBuild",value:function(){$o(Yo(e.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(){$o(Yo(e.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t),this.testUuid(t)||(t=this.uuid),this.uuid=t,$o(Yo(e.prototype),"setValue",this).call(this,t,n,i)}},{key:"getUuid",value:function(){return f()}},{key:"testUuid",value:function(t){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(t)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wo(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P),colorpicker:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),tr(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&or(t,e)}(e,t),n=e,(i=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=nr(ir(e.prototype),"setValue",this).call(this,t,n,i);return this.picker_instance&&this.picker_instance.domElement&&o&&o.changed&&this.picker_instance.setColor(o.value,!0),o}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){nr(ir(e.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(nr(ir(e.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),n=0;n<t.length;n++)t[n].disabled=!0}}},{key:"enable",value:function(){if(nr(ir(e.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),n=0;n<t.length;n++)t[n].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),nr(ir(e.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var n=this.expandCallbacks("colorpicker",l({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),i=function(t){var n=e.picker_instance.settings.editorFormat,i=e.picker_instance.settings.alpha;e.setValue("hex"===n?i?t.hex:t.hex.slice(0,7):t["".concat(n+(i?"a":""),"String")])};n.popup||"function"==typeof n.onChange?n.popup&&"function"!=typeof n.onDone&&(n.onDone=i):n.onChange=i,this.picker_instance=new window.Picker(n),n.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="")}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qo(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P)};function sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var ar={},lr="en",cr=lr;ar.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(rr).forEach((function(t){var e=function(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,o,r,s=[],a=!0,l=!1;try{for(o=(e=e.call(t)).next;!(a=(n=o.call(e)).done)&&(s.push(n.value),2!==s.length);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(l)throw i}}return s}}(t)||function(t){if(t){if("string"==typeof t)return sr(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?sr(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),n=e[0],i=e[1];rr[n].options=i.options||{}}));var ur={options:{upload:function(t,e,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:rr,languages:ar,resolvers:e,custom_validators:[],default_language:lr,language:cr,translate:function(t,e,n){var i={};n&&n.options&&n.options.error_messages&&n.options.error_messages[ur.language]&&(i=n.options.error_messages[ur.language]);var o=ur.languages[ur.language];if(!o)throw new Error("Unknown language ".concat(ur.language));var r=i[t]||o[t]||ur.languages[lr][t]||t;if(e)for(var s=0;s<e.length;s++)r=r.replace(new RegExp("\\{\\{".concat(s,"}}"),"g"),e[s]);return r},translateProperty:function(t,e){return t}};function hr(){hr=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,s=Object.create(r.prototype),a=new S(i||[]);return o(s,"_invoke",{value:C(t,n,a)}),s}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",y={};function v(){}function b(){}function g(){}var _={};c(_,s,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&i.call(x,s)&&(_=x);var k=g.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,r,s,a){var l=h(t[o],t,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==yr(u)&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(u).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function C(e,n,i){var o=d;return function(r,s){if(o===f)throw Error("Generator is already running");if(o===m){if("throw"===r)throw s;return{value:t,done:!0}}for(i.method=r,i.arg=s;;){var a=i.delegate;if(a){var l=E(a,i);if(l){if(l===y)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===d)throw o=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=f;var c=h(e,n,i);if("normal"===c.type){if(o=i.done?m:p,c.arg===y)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(o=m,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),y;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var s=r.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(yr(e)+" is not iterable")}return b.prototype=g,o(k,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(j.prototype),c(j.prototype,a,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var s=new j(u(t,n,i,o),r);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(k),c(k,l,"Generator"),c(k,s,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return a.type="throw",a.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:T(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}function dr(t,e,n,i,o,r,s){try{var a=t[r](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,o)}function pr(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function s(t){dr(r,i,o,s,a,"next",t)}function a(t){dr(r,i,o,s,a,"throw",t)}s(void 0)}))}}function fr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return mr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function yr(t){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yr(t)}function vr(t){var e=function(t){if("object"!=yr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yr(e)?e:e+""}n(1688);var br=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(t){"object"===yr(t.type)&&(t.type=this._expandSubSchema(t.type))},disallow:function(t){"object"===yr(t.disallow)&&(t.disallow=this._expandSubSchema(t.disallow))},anyOf:function(t){var e=this;Object.entries(t.anyOf).forEach((function(n){var i=fr(n,2),o=i[0],r=i[1];t.anyOf[o]=e.expandSchema(r)}))},dependencies:function(t){var e=this;Object.entries(t.dependencies).forEach((function(n){var i=fr(n,2),o=i[0],r=i[1];"object"!==yr(r)||Array.isArray(r)||(t.dependencies[o]=e.expandSchema(r))}))},not:function(t){t.not=this.expandSchema(t.not)}},this._subSchema2={allOf:function(t,e){var n=this,i=l({},e);return Object.entries(t.allOf).forEach((function(e){var o=fr(e,2),r=o[0],s=o[1];t.allOf[r]=n.expandRefs(s,!0),i=n.extendSchemas(i,n.expandSchema(s))})),delete i.allOf,i},extends:function(t,e){var n,i=this;return delete(n=Array.isArray(t.extends)?t.extends.reduce((function(t,e,n){return i.extendSchemas(t,i.expandSchema(e))}),e):this.extendSchemas(e,this.expandSchema(t.extends))).extends,n},oneOf:function(t,e){var n=this,i=l({},e);return delete i.oneOf,t.oneOf.reduce((function(t,e,o){return t.oneOf[o]=n.extendSchemas(n.expandSchema(e),i),t}),e),e}}},e=[{key:"load",value:(i=pr(hr().mark((function t(e,n,i){return hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.schema=e,t.next=3,this._asyncloadExternalRefs(e,n,this._getFileBase(i),!0);case 3:return t.abrupt("return",this.expandRefs(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"expandRefs",value:function(t,e){var n=this,i=l({},t);if(!i.$ref)return i;var o=i.$ref.split("#");if(2===o.length&&!this.refs_with_info[i.$ref]){var r=this.expandRecursivePointer(this.schema,o[1]),s=this.extendSchemas(i,this.expandSchema(r));return delete s.$ref,s}var a=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[i.$ref];delete i.$ref;var c=a.$ref.startsWith("#")?a.fetchUrl:"",u=this._getRef(c,a);if(this.refs[u]){if(e&&h(this.refs[u],"allOf")){var d=this.refs[u].allOf;Object.keys(d).forEach((function(t){d[t]=n.expandRefs(d[t],!0)}))}}else console.warn("reference:'".concat(u,"' not found!"));return o.length>2?this.extendSchemas(i,this.expandSchema(this.expandRecursivePointer(this.refs[u],o[2]))):this.extendSchemas(i,this.expandSchema(this.refs[u]))}},{key:"expandRecursivePointer",value:function(t,e){var n=t;return e.split("/").slice(1).forEach((function(t){n[t]&&(n=n[t])})),n.$refs&&n.$refs.startsWith("#")?this.expandRecursivePointer(t,n.$refs):n}},{key:"expandSchema",value:function(t){var e=this;Object.entries(this._subSchema1).forEach((function(n){var i=fr(n,2),o=i[0],r=i[1];t[o]&&r.call(e,t)}));var n=l({},t);return Object.entries(this._subSchema2).forEach((function(i){var o=fr(i,2),r=o[0],s=o[1];t[r]&&(n=s.call(e,t,n))})),this.expandRefs(n)}},{key:"_getRef",value:function(t,e){var n=t+e;return this.refs[n]?n:t+decodeURIComponent(e.$ref)}},{key:"_expandSubSchema",value:function(t){var e=this;return Array.isArray(t)?t.map((function(t){return"object"===yr(t)?e.expandSchema(t):t})):this.expandSchema(t)}},{key:"_manageRecursivePointer",value:function(t,e){Object.keys(t).forEach((function(n){null!==t[n]&&t[n].$ref&&0===t[n].$ref.indexOf("#")&&(t[n].$ref=e+t[n].$ref)}))}},{key:"_getExternalRefs",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i||this._manageRecursivePointer(t,e);var o={},r=function(t){return Object.keys(t).forEach((function(t){o[t]=!0}))};if(t.$ref&&"object"!==yr(t.$ref)&&(0!==t.$ref.indexOf("#")||!i)){var s=t.$ref,a="";s.indexOf("#")>0&&(s=s.substr(0,s.indexOf("#"))),s!==t.$ref&&(a=t.$ref.substr(t.$ref.indexOf("#")));var l=this.refs_prefix+this.refs_counter++,c=l+a;"#"===t.$ref.substr(0,1)||this.refs[t.$ref]||(o[s]=!0),this.refs_with_info[l]={fetchUrl:e,$ref:s},t.$ref=c}return Object.values(t).forEach((function(t){t&&"object"===yr(t)&&(Array.isArray(t)?Object.values(t).forEach((function(t){t&&"object"===yr(t)&&r(n._getExternalRefs(t,e,i))})):t.$ref&&"string"==typeof t.$ref&&t.$ref.startsWith("#")||r(n._getExternalRefs(t,e,i)))})),t.id&&"string"==typeof t.id&&"urn:"===t.id.substr(0,4)?this.refs[t.id]=t:t.$id&&"string"==typeof t.$id&&"urn:"===t.$id.substr(0,4)&&(this.refs[t.$id]=t),o}},{key:"_getFileBase",value:function(t){if(!t)return"/";var e=this.options.ajaxBase;return void 0===e?this._getFileBaseFromFileLocation(t):e}},{key:"_getFileBaseFromFileLocation",value:function(t){var e=t.split("/");return e.pop(),"".concat(e.join("/"),"/")}},{key:"_joinUrl",value:function(t,e){var n=t;return"http://"!==t.substr(0,7)&&"https://"!==t.substr(0,8)&&"blob:"!==t.substr(0,5)&&"data:"!==t.substr(0,5)&&"#"!==t.substr(0,1)&&"/"!==t.substr(0,1)&&(n=e+t),n.indexOf("#")>0&&(n=n.substr(0,n.indexOf("#"))),n}},{key:"_isUniformResourceName",value:function(t){return"urn:"===t.substr(0,4)}},{key:"_asyncloadExternalRefs",value:(n=pr(hr().mark((function t(e,n,i){var o,r,s,a,l,c,u=this,h=arguments;return hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=h.length>3&&void 0!==h[3]&&h[3],r=this._getExternalRefs(e,n,o),s=0,a=hr().mark((function t(){var e,n,o,r,a,h,d,p,f,m,y;return hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==(e=c[l])){t.next=3;break}return t.abrupt("return",0);case 3:if(!u.refs[e]){t.next=5;break}return t.abrupt("return",0);case 5:if(!u._isUniformResourceName(e)){t.next=40;break}if(u.refs[e]="loading",s++,n=u.options.urn_resolver,o=e,"function"==typeof n){t.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(o,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(o));case 13:return o.indexOf("#")>0&&(o=o.substr(0,o.indexOf("#"))),t.prev=14,t.next=17,n(o);case 17:r=t.sent,t.prev=18,a=JSON.parse(r),t.next=26;break;case 22:throw t.prev=22,t.t0=t.catch(18),console.log(t.t0),new Error("Failed to parse external ref ".concat(o));case 26:if(!("boolean"!=typeof a&&"object"!==yr(a)||null===a||Array.isArray(a))){t.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(o));case 28:return u.refs[e]=a,t.next=31,u._asyncloadExternalRefs(a,e,i);case 31:t.next=37;break;case 33:throw t.prev=33,t.t1=t.catch(14),console.log(t.t1),new Error("Failed to parse external ref ".concat(o));case 37:if("boolean"!=typeof r){t.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(o));case 39:return t.abrupt("return",0);case 40:if(u.options.ajax){t.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(e));case 42:if(s++,h=u._joinUrl(e,i),u.options.ajax_cache_responses&&(p=u.cacheGet(h))&&(d=p),d){t.next=61;break}return t.next=48,new Promise((function(t){var e=new XMLHttpRequest;u.options.ajaxCredentials&&(e.withCredentials=u.options.ajaxCredentials),e.overrideMimeType("application/json"),e.open("GET",h,!0),e.onload=function(){t(e)},e.onerror=function(e){t(void 0)},e.send()}));case 48:if(void 0!==(f=t.sent)){t.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(e));case 51:t.prev=51,d=JSON.parse(f.responseText),u.onSchemaLoaded({schema:d,schemaUrl:h}),u.options.ajax_cache_responses&&u.cacheSet(h,d),t.next=61;break;case 57:throw t.prev=57,t.t2=t.catch(51),console.log(t.t2),new Error("Failed to parse external ref ".concat(h));case 61:if(!("boolean"!=typeof d&&"object"!==yr(d)||null===d||Array.isArray(d))){t.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(h));case 63:return u.refs[e]=d,m=u._getFileBaseFromFileLocation(h),h!==e&&(y=h.split("/"),h=("/"===e.substr(0,1)?"/":"")+y.pop()),t.next=68,u._asyncloadExternalRefs(d,h,m);case 68:case"end":return t.stop()}}),t,null,[[14,33],[18,22],[51,57]])})),l=0,c=Object.keys(r);case 5:if(!(l<c.length)){t.next=13;break}return t.delegateYield(a(),"t0",7);case 7:if(0!==t.t0){t.next=10;break}return t.abrupt("continue",10);case 10:l++,t.next=5;break;case 13:if(s){t.next=15;break}return t.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return t.stop()}}),t,this)}))),function(t,e,i){return n.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(t){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(t,e){var n=this;t=l({},t),e=l({},e);var i={};return Object.entries(t).forEach((function(t){var o=fr(t,2),r=o[0],s=o[1];void 0!==e[r]?function(t,o){!function(t,e){return("required"===t||"defaultProperties"===t)&&"object"===yr(e)&&Array.isArray(e)}(t,o)?"type"!==t||"string"!=typeof o&&!Array.isArray(o)?"object"!==yr(o)||Array.isArray(o)||null===o?i[t]=o:i[t]=n.extendSchemas(o,e[t]):function(t){"string"==typeof t&&(t=[t]),"string"==typeof e.type&&(e.type=[e.type]),e.type&&e.type.length?i.type=t.filter((function(t){return e.type.includes(t)})):i.type=t,1===i.type.length&&"string"==typeof i.type[0]?i.type=i.type[0]:0===i.type.length&&delete i.type}(o):i[t]=o.concat(e[t]).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[])}(r,s):i[r]=s})),Object.entries(e).forEach((function(e){var n=fr(e,2),o=n[0],r=n[1];void 0===t[o]&&(i[o]=r)})),i}},{key:"getCacheKey",value:function(t){return["je-cache",t].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||(new Date).toISOString().slice(0,10)}},{key:"cacheSet",value:function(t,e){try{window.localStorage.setItem(this.getCacheKey(t),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:e}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(t){try{var e=window.localStorage.getItem(this.getCacheKey(t));if(e){var n=JSON.parse(e);if(n.cacheBuster&&n.schema&&n.cacheBuster===this.getCacheBuster())return n.schema;this.cacheDelete(t)}}catch(t){console.error(t)}}},{key:"cacheDelete",value:function(t){window.localStorage.removeItem(this.getCacheKey(t))}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vr(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,i}(),gr=(n(2762),{default:function(){return{compile:function(t){var e=t.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),n=e&&e.length;if(!n)return function(){return t};for(var i=[],o=function(t){var n,o,r=e[t].replace(/[{}]+/g,"").trim().split("."),s=r.length;s>1?n=function(e){for(o=e,t=0;t<s&&(o=o[r[t]]);t++);return o}:(r=r[0],n=function(t){return t[r]}),i.push({s:e[t],r:n})},r=0;r<n;r++)o(r);return function(e){for(var o,r="".concat(t),s=0;s<n;s++)o=i[s],r=r.replace(o.s,o.r(e));return r}}}},ejs:function(){return!!window.EJS&&{compile:function(t){var e=new window.EJS({text:t});return function(t){return e.render(t)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(t){var e=window.Hogan.compile(t);return function(t){return e.render(t)}}}},lodash:function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t)(e)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(t){return function(e){return window.Mark.up(t,e)}}}},mustache:function(){return!!window.Mustache&&{compile:function(t){return function(e){return window.Mustache.render(t,e)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t)(e)}}}}});function _r(t){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_r(t)}function wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function xr(t){var e=function(t){if("object"!=_r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_r(e)?e:e+""}var kr={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Or=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kr;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapping=n,this.icon_prefix=e},(e=[{key:"getIconClass",value:function(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:this.icon_prefix+t}},{key:"getIcon",value:function(t){var e,n=this.getIconClass(t);if(!n)return null;var i,o=document.createElement("i");return(e=o.classList).add.apply(e,function(t){if(Array.isArray(t))return wr(t)}(i=n.split(" "))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return wr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,xr(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function jr(t){return jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jr(t)}function Cr(t,e,n){return e=Pr(e),function(t,e){if(e&&("object"===jr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Er()?Reflect.construct(e,n||[],Pr(t).constructor):e.apply(t,n))}function Er(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Er=function(){return!!t})()}function Pr(t){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pr(t)}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lr(t,e)}var Sr={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"},Tr=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Cr(this,e,["glyphicon glyphicon-",Sr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Ar(t){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ar(t)}function Rr(t,e,n){return e=Ir(e),function(t,e){if(e&&("object"===Ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Br()?Reflect.construct(e,n||[],Ir(t).constructor):e.apply(t,n))}function Br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Br=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}function zr(t,e){return zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zr(t,e)}var Mr={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"},Nr=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Rr(this,e,["icon-",Mr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Dr(t){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(t)}function Fr(t,e,n){return e=Vr(e),function(t,e){if(e&&("object"===Dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Hr()?Reflect.construct(e,n||[],Vr(t).constructor):e.apply(t,n))}function Hr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Hr=function(){return!!t})()}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}function Zr(t,e){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zr(t,e)}var qr={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"},Ur=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Fr(this,e,["fa fa-",qr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Wr(t){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(t)}function Gr(t,e,n){return e=$r(e),function(t,e){if(e&&("object"===Wr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jr()?Reflect.construct(e,n||[],$r(t).constructor):e.apply(t,n))}function Jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jr=function(){return!!t})()}function $r(t){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$r(t)}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}var Kr={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"},Xr=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Gr(this,e,["fas fa-",Kr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ts(t,e,n){return e=ns(e),function(t,e){if(e&&("object"===Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,es()?Reflect.construct(e,n||[],ns(t).constructor):e.apply(t,n))}function es(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(es=function(){return!!t})()}function ns(t){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(t)}function is(t,e){return is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},is(t,e)}var os={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"},rs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ts(this,e,["ui-icon ui-icon-",os])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&is(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function ss(t){return ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(t)}function as(t,e,n){return e=cs(e),function(t,e){if(e&&("object"===ss(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ls()?Reflect.construct(e,n||[],cs(t).constructor):e.apply(t,n))}function ls(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ls=function(){return!!t})()}function cs(t){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cs(t)}function us(t,e){return us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},us(t,e)}var hs={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"},ds=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),as(this,e,["oi oi-",hs])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&us(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function fs(t,e,n){return e=ys(e),function(t,e){if(e&&("object"===ps(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ms()?Reflect.construct(e,n||[],ys(t).constructor):e.apply(t,n))}function ms(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ms=function(){return!!t})()}function ys(t){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ys(t)}function vs(t,e){return vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vs(t,e)}var bs={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"},gs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),fs(this,e,["icon icon-",bs])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vs(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function _s(t){return _s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(t)}function ws(t,e,n){return e=ks(e),function(t,e){if(e&&("object"===_s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,n||[],ks(t).constructor):e.apply(t,n))}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xs=function(){return!!t})()}function ks(t){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ks(t)}function Os(t,e){return Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Os(t,e)}var js={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"},Cs={bootstrap:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ws(this,e,["bi bi-",js])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or),bootstrap3:Tr,fontawesome3:Nr,fontawesome4:Ur,fontawesome5:Xr,jqueryui:rs,openiconic:ds,spectre:gs};function Es(t){return Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(t)}function Ps(t){var e=function(t){if("object"!=Es(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Es(e)?e:e+""}var Ls=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(t){return t in document.documentElement})),Ss=function(){return t=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{disable_theme_rules:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.jsoneditor=e,Object.keys(n).forEach((function(t){void 0!==e.options[t]&&(n[t]=e.options[t])})),this.options=n},e=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getOptInCheckbox",value:function(t){var e=document.createElement("span"),n=this.getHiddenLabel(t+" opt-in");n.setAttribute("for",t+"-opt-in"),n.textContent=t+"-opt-in";var i=document.createElement("input");return i.setAttribute("type","checkbox"),i.setAttribute("style","margin: 0 10px 0 0;"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in"),e.appendChild(i),e.appendChild(n),{label:n,checkbox:i,container:e}}},{key:"getOptInSwitch",value:function(t){return this.getOptInCheckbox()}},{key:"getFloatRightLinkHolder",value:function(){var t=document.createElement("div");return t.classList.add("je-float-right-linkholder"),t}},{key:"getModal",value:function(){var t=document.createElement("div");return t.style.display="none",t.classList.add("je-modal"),t}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("row"),t}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(t,e){}},{key:"getLink",value:function(t){var e=document.createElement("a");return e.setAttribute("href","#"),e.appendChild(document.createTextNode(t)),e}},{key:"disableHeader",value:function(t){t.style.color="#ccc"}},{key:"disableLabel",value:function(t){t.style.color="#ccc"}},{key:"enableHeader",value:function(t){t.style.color=""}},{key:"enableLabel",value:function(t){t.style.color=""}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.innerText="ⓘ",e.classList.add("je-infobutton-icon");var n=document.createElement("span");return n.classList.add("je-infobutton-tooltip"),n.innerText=t,e.onmouseover=function(){n.style.visibility="visible"},e.onmouseleave=function(){n.style.visibility="hidden"},e.appendChild(n),e}},{key:"getFormInputLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(t)),e&&n.classList.add("required"),n}},{key:"getLabelLike",value:function(t,e){var n=document.createElement("b");return n.appendChild(document.createTextNode(t)),e&&n.classList.add("required"),n}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return"string"==typeof t?n.textContent=t:n.appendChild(t),n.classList.add("je-header"),n}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("je-checkbox"),t}},{key:"getCheckboxLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(" ".concat(t))),e&&n.classList.add("required"),n}},{key:"getMultiCheckboxHolder",value:function(t,e,n,i){var o=document.createElement("div");return o.classList.add("control-group"),e&&(e.style.display="block",o.appendChild(e),i&&e.appendChild(i)),Object.values(t).forEach((function(t){t.style.display="inline-block",t.style.marginRight="20px",o.appendChild(t)})),n&&o.appendChild(n),o}},{key:"getFormCheckboxControl",value:function(t,e,n){var i=document.createElement("div");return i.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&i.classList.add("je-checkbox-control--compact"),i}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])})),e.classList.add("je-radio"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(" ".concat(t))),e&&n.classList.add("required"),n}},{key:"getFormRadioControl",value:function(t,e,n,i){var o=document.createElement("div");return o.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&o.classList.add("je-radio-control--compact"),"div"!==e.tagName.toLowerCase()&&i&&t&&e&&(e.setAttribute("id",i),e.setAttribute("aria-labelledby",i),t.setAttribute("for",i)),o}},{key:"getSelectInput",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=document.createElement("select");return t&&this.setSelectOptions(i,t,[],n),i}},{key:"getSwitcher",value:function(t){var e=this.getSelectInput(t,!1);return e.classList.add("je-switcher"),e}},{key:"getSwitcherOptions",value:function(t){return t.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(t,e,n){this.setSelectOptions(t,e,n)}},{key:"setSelectOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:" ";if(t.innerHTML="",i){var r=document.createElement("option");r.setAttribute("value","_placeholder_"),r.textContent=o,r.setAttribute("disabled",""),r.setAttribute("hidden",""),t.appendChild(r)}for(var s=0;s<e.length;s++){var a=document.createElement("option");a.setAttribute("value",e[s]),a.textContent=n[s]||e[s],t.appendChild(a)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("je-textarea"),t}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),e}},{key:"visuallyHidden",value:function(t){t&&t.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(t){var e=document.createElement("span");return e.textContent=t,e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),e}},{key:"getRangeInput",value:function(t,e,n,i,o){var r=this.getFormInputField("range");return r.setAttribute("min",t),r.setAttribute("max",e),r.setAttribute("step",n),i&&(i.setAttribute("id",o+"-description"),r.setAttribute("aria-describedby",o+"-description")),r}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("stepper-down");var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("stepper-up"),t.getAttribute("readonly")&&(n.setAttribute("disabled",!0),i.setAttribute("disabled",!0)),n.textContent="-",i.textContent="+";var o=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},r=t.getAttribute("min"),s=t.getAttribute("max");return n.addEventListener("click",(function(){t.getAttribute("initialized")?r?Number(t.value)>Number(r)&&t.stepDown():t.stepDown():o(t,r),c(t,"change")})),i.addEventListener("click",(function(){t.getAttribute("initialized")?s?Number(t.value)<Number(s)&&t.stepUp():t.stepUp():o(t,r),c(t,"change")})),e.appendChild(n),e.appendChild(i),e}},{key:"getRangeOutput",value:function(t){var e=document.createElement("output"),n=function(t){e.value=t.currentTarget.value};return t.addEventListener("change",n,!1),t.addEventListener("input",n,!1),e}},{key:"getRangeControl",value:function(t,e){var n=document.createElement("div");return n.classList.add("je-range-control"),e&&n.appendChild(e),n.appendChild(t),n}},{key:"getFormInputField",value:function(t){var e=document.createElement("input");return e.setAttribute("type",t),e}},{key:"afterInputReady",value:function(t){}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");return r.classList.add("form-control"),t&&(r.appendChild(t),o&&t.setAttribute("for",o)),"checkbox"!==e.type&&"radio"!==e.type||!t?(i&&t&&t.appendChild(i),r.appendChild(e)):(e.style.width="auto",t.insertBefore(e,t.firstChild),i&&t.appendChild(i)),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),n&&r.appendChild(n),r}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-indented-panel--top"),t}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(t){var e=document.createElement("p");return window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getCheckboxDescription",value:function(t){return this.getDescription(t)}},{key:"getFormInputDescription",value:function(t){return this.getDescription(t)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(t){return this.getButtonHolder()}},{key:"getButton",value:function(t,e,n){var i=document.createElement("button");return i.type="button",this.setButtonText(i,t,e,n),i}},{key:"getFormButton",value:function(t,e,n){return this.getButton(t,e,n)}},{key:"setButtonText",value:function(t,e,n,i){for(;t.firstChild;)t.removeChild(t.firstChild);if(n&&(t.appendChild(n),e=" ".concat(e)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!n){var o=document.createElement("span");o.appendChild(document.createTextNode(e)),t.appendChild(o)}i&&t.setAttribute("title",i)}},{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(t){var e=document.createElement("th");return e.textContent=t,e}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(t){var e=document.createElement("p");return e.style=e.style||{},e.style.color="red",e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(t){}},{key:"addTableRowError",value:function(t){}},{key:"removeTableRowError",value:function(t){}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(e,"'></div><div class='je-tabholder--clear'></div>"),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(e,"'></div>"),n}},{key:"applyStyles",value:function(t,e){Object.keys(e).forEach((function(n){return t.style[n]=e[n]}))}},{key:"closest",value:function(t,e){for(;t&&t!==document;){if(!t[Ls])return!1;if(t[Ls](e))return t;t=t.parentNode}return!1}},{key:"insertBasicTopTab",value:function(t,e){e.firstChild.insertBefore(t,e.firstChild.firstChild)}},{key:"getTab",value:function(t,e){var n=document.createElement("div");return n.appendChild(t),n.id=e,n.classList.add("je-tab"),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("div");return n.appendChild(t),n.id=e,n.classList.add("je-tab--top"),n}},{key:"getTabContentHolder",value:function(t){return t.children[1]}},{key:"getTopTabContentHolder",value:function(t){return t.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(t){this.applyStyles(t.tab,{opacity:1,background:"white"}),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){this.applyStyles(t.tab,{opacity:.5,background:""}),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"addTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"addTopTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("je-block-link"),t}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(t,e,n){t.appendChild(e),n.classList.add("je-media"),t.appendChild(n)}},{key:"createImageLink",value:function(t,e,n){t.appendChild(e),e.appendChild(n)}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild}},{key:"getInputGroup",value:function(t,e){}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"getDropZone",value:function(t){var e=document.createElement("div");return e.setAttribute("data-text",t),e.classList.add("je-dropzone"),e}},{key:"getUploadPreview",value:function(t,e,n){var i=document.createElement("div");if(i.classList.add("je-upload-preview"),"image"===t.mimeType.substr(0,5)){var o=document.createElement("img");o.src=n,i.appendChild(o)}var r=document.createElement("div");r.innerHTML+="<strong>Name:</strong> ".concat(t.name,"<br><strong>Type:</strong> ").concat(t.type,"<br><strong>Size:</strong> ").concat(t.formattedSize),i.appendChild(r),i.appendChild(e);var s=document.createElement("div");return s.style.clear="left",i.appendChild(s),i}},{key:"getProgressBar",value:function(){var t=document.createElement("progress");return t.setAttribute("max",100),t.setAttribute("value",0),t}},{key:"updateProgressBar",value:function(t,e){t&&t.setAttribute("value",e)}},{key:"updateProgressBarUnknown",value:function(t){t&&t.removeAttribute("value")}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ps(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ts(t){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(t)}function As(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}function Rs(t,e,n){return e=zs(e),function(t,e){if(e&&("object"===Ts(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bs()?Reflect.construct(e,n||[],zs(t).constructor):e.apply(t,n))}function Bs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bs=function(){return!!t})()}function Is(){return Is="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zs(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Is.apply(this,arguments)}function zs(t){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zs(t)}function Ms(t,e){return Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ms(t,e)}var Ns=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Rs(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ms(t,e)}(e,t),n=e,(i=[{key:"getFormInputLabel",value:function(t,n){var i=Is(zs(e.prototype),"getFormInputLabel",this).call(this,t,n);return i.classList.add("je-form-input-label"),i}},{key:"getFormInputDescription",value:function(t){var n=Is(zs(e.prototype),"getFormInputDescription",this).call(this,t);return n.classList.add("je-form-input-label"),n}},{key:"getIndentedPanel",value:function(){var t=Is(zs(e.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=Is(zs(e.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=Is(zs(e.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var n=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",n.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e)),t.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,As(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Ds(t){return Ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(t)}function Fs(t){var e=function(t){if("object"!=Ds(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ds(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ds(e)?e:e+""}function Hs(t,e,n){return e=qs(e),function(t,e){if(e&&("object"===Ds(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vs()?Reflect.construct(e,n||[],qs(t).constructor):e.apply(t,n))}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vs=function(){return!!t})()}function Zs(){return Zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qs(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Zs.apply(this,arguments)}function qs(t){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}Ns.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 Ws=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Hs(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(e,t),n=e,(i=[{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("label");n.classList.add("switch");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in");var o=document.createElement("span");o.classList.add("switch-slider");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",n.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"getSelectInput",value:function(t,n){var i=Zs(qs(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-control"),i}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-md-".concat(e)),n&&t.classList.add("col-md-offset-".concat(n))}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,n,i,o,r){return Zs(qs(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r)}},{key:"getFormInputField",value:function(t){var n=Zs(qs(e.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&n.classList.add("form-control"),n}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"visuallyHidden",value:function(t){t&&t.classList.add("sr-only")}},{key:"getHiddenText",value:function(t){var e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");return!t||"checkbox"!==e.type&&"radio"!==e.type?(r.classList.add("form-group"),t&&(t.classList.add("control-label"),r.appendChild(t),i&&t.appendChild(i)),r.appendChild(e)):(r.classList.add(e.type),i&&t.appendChild(i),t.insertBefore(e,t.firstChild),r.appendChild(t)),n&&r.appendChild(n),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),r}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var n=document.createElement("span");return n.style["font-family"]="sans-serif",n.style.visibility="hidden",n.style["background-color"]="rgba(50, 50, 50, .75)",n.style.margin="0 .25rem",n.style.color="#FAFAFA",n.style.padding=".5rem 1rem",n.style["border-radius"]=".25rem",n.style.width="25rem",n.style.position="absolute",n.innerText=t,e.onmouseover=function(){n.style.visibility="visible"},e.onmouseleave=function(){n.style.visibility="hidden"},e.appendChild(n),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderContainer",value:function(){return document.createElement("div")}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return n.classList.add("h3"),"string"==typeof t?n.textContent=t:n.appendChild(t),n}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,n,i){var o=Zs(qs(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-default"),o}},{key:"getTableContainer",value:function(){var t=Zs(qs(e.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(e,"'></div>"),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(e,"'></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var i=document.createElement("a");return i.setAttribute("href","#".concat(e)),i.appendChild(t),i.setAttribute("aria-controls",e),i.setAttribute("role","tab"),i.setAttribute("data-toggle","tab"),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var i=document.createElement("a");return i.setAttribute("href","#".concat(e)),i.appendChild(t),i.setAttribute("aria-controls",e),i.setAttribute("role","tab"),i.setAttribute("data-toggle","tab"),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);var i=document.createElement("div");i.classList.add("input-group-btn"),n.appendChild(i);for(var o=0;o<e.length;o++)i.appendChild(e[o]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fs(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Gs(t){return Gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(t)}function Js(t){var e=function(t){if("object"!=Gs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gs(e)?e:e+""}function $s(t,e,n){return e=Xs(e),function(t,e){if(e&&("object"===Gs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ys()?Reflect.construct(e,n||[],Xs(t).constructor):e.apply(t,n))}function Ys(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ys=function(){return!!t})()}function Ks(){return Ks="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xs(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ks.apply(this,arguments)}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Qs(t,e){return Qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qs(t,e)}Ws.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 ta={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"},ea=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),$s(this,e,[t,ta])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qs(t,e)}(e,t),n=e,(i=[{key:"getSelectInput",value:function(t,n){var i=Ks(Xs(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-control"),!1===this.options.custom_forms?("small"===this.options.input_size&&i.classList.add("form-control-sm"),"large"===this.options.input_size&&i.classList.add("form-control-lg")):(i.classList.remove("form-control"),i.classList.add("custom-select"),"small"===this.options.input_size&&i.classList.add("custom-select-sm"),"large"===this.options.input_size&&i.classList.add("custom-select-lg")),i}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("div");n.classList.add("custom-control","custom-switch","d-inline-block","fs-6");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("custom-control-input","json-editor-opt-in");var o=document.createElement("label");o.setAttribute("for",t+"-opt-in"),o.classList.add("custom-control-label");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",o.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-md-".concat(e)),n&&t.classList.add("offset-md-".concat(n))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var n=t.parentNode.parentNode.getElementsByTagName("label")[0];n&&(n.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),"small"===this.options.input_size&&t.classList.add("form-control-sm"),"large"===this.options.input_size&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,n,i,o,r){var s=Ks(Xs(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r);return!0===this.options.custom_forms&&(s.classList.remove("form-control"),s.classList.add("custom-range")),s}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var r=document.createElement("button");r.setAttribute("type","button"),e.appendChild(n),e.appendChild(t),e.appendChild(i),n.appendChild(o),i.appendChild(r),e.classList.add("input-group"),n.classList.add("input-group-prepend"),i.classList.add("input-group-append"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),r.classList.add("btn"),r.classList.add("btn-secondary"),r.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),r.setAttribute("disabled",!0)),o.textContent="-",r.textContent="+";var s=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},a=t.getAttribute("min"),l=t.getAttribute("max");return t.addEventListener("change",(function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")})),o.addEventListener("click",(function(){t.getAttribute("initialized")?a?Number(t.value)>Number(a)&&t.stepDown():t.stepDown():s(t,a),c(t,"change")})),r.addEventListener("click",(function(){t.getAttribute("initialized")?l?Number(t.value)<Number(l)&&t.stepUp():t.stepUp():s(t,a),c(t,"change")})),e}},{key:"getFormInputField",value:function(t){var n=Ks(Xs(e.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&"file"!==t&&(n.classList.add("form-control"),"small"===this.options.input_size&&n.classList.add("form-control-sm"),"large"===this.options.input_size&&n.classList.add("form-control-lg")),"file"===t&&n.classList.add("form-control-file"),n}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"visuallyHidden",value:function(t){t&&t.classList.add("sr-only")}},{key:"getHiddenText",value:function(t){var e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");if(r.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type)t&&(r.appendChild(t),i&&r.appendChild(i)),r.appendChild(e);else{var s=document.createElement("div");!1===this.options.custom_forms?(s.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(s.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),"checkbox"===e.type?s.classList.add("custom-checkbox"):s.classList.add("custom-radio")),s.appendChild(e),s.appendChild(t),i&&s.appendChild(i),r.appendChild(s)}return n&&r.appendChild(n),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),r}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var n=document.createTextNode("ⓘ");return e.appendChild(n),"bootstrap"===this.options.tooltip?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):"css"===this.options.tooltip&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,n,i){var o=document.createElement("div");o.classList.add("form-group"),e&&(o.appendChild(e),i&&e.appendChild(i));var r=document.createElement("div");return Object.values(t).forEach((function(t){var e=t.firstChild;r.appendChild(e)})),o.appendChild(r),n&&o.appendChild(n),o}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in t)e.setAttribute(n,t[n]);return!1===this.options.custom_forms?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return!1===this.options.custom_forms?n.classList.add("form-check-label"):n.classList.add("custom-control-label"),n.appendChild(document.createTextNode(t)),n}},{key:"getFormRadioControl",value:function(t,e,n){var i=document.createElement("div");return!1===this.options.custom_forms?i.classList.add("form-check"):i.classList.add("custom-control","custom-radio"),i.appendChild(e),i.appendChild(t),n&&(!1===this.options.custom_forms?i.classList.add("form-check-inline"):i.classList.add("custom-control-inline")),i}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return n.classList.add("h3"),n.classList.add("card-title"),n.classList.add("level-"+e),"string"==typeof t?n.textContent=t:n.appendChild(t),n.style.display="inline-block",n}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,n,i){var o=Ks(Xs(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-secondary","btn-sm"),o}},{key:"getTableContainer",value:function(){var t=Ks(Xs(e.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(n,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(n,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.classList.add("card"),n.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);var i=document.createElement("div");i.classList.add("input-group-append"),n.appendChild(i);for(var o=0;o<e.length;o++)e[o].classList.remove("mr-2","btn-secondary"),e[o].classList.add("btn-outline-secondary"),i.appendChild(e[o]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Js(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function na(t){return na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(t)}function ia(t){var e=function(t){if("object"!=na(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=na(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==na(e)?e:e+""}function oa(t,e,n){return e=aa(e),function(t,e){if(e&&("object"===na(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ra()?Reflect.construct(e,n||[],aa(t).constructor):e.apply(t,n))}function ra(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ra=function(){return!!t})()}function sa(){return sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=aa(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},sa.apply(this,arguments)}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},aa(t)}function la(t,e){return la=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},la(t,e)}ea.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 ca={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},ua=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),oa(this,e,[t,ca])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&la(t,e)}(e,t),n=e,(i=[{key:"getSelectInput",value:function(t,n){var i=sa(aa(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-control"),i.classList.add("form-select"),"small"===this.options.input_size&&i.classList.add("form-control-sm"),"large"===this.options.input_size&&i.classList.add("form-control-lg"),i}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("div");n.classList.add("form-check","form-switch","d-inline-block","fs-6");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("role","switch"),i.setAttribute("id",t+"-opt-in"),i.classList.add("form-check-input","json-editor-opt-in");var o=document.createElement("label");o.setAttribute("for",t+"-opt-in"),o.classList.add("form-check-label");var r=document.createElement("span");return r.classList.add("visually-hidden"),r.textContent=t+"-opt-in",o.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-md-".concat(e)),n&&t.classList.add("offset-md-".concat(n))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var n=t.parentNode.parentNode.getElementsByTagName("label")[0];n&&(n.classList.add("form-label"),n.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),"small"===this.options.input_size&&t.classList.add("form-control-sm"),"large"===this.options.input_size&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,n,i,o,r){var s=sa(aa(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r);return s.classList.remove("form-control"),s.classList.add("form-range"),s}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),n=document.createElement("button");n.setAttribute("type","button");var i=document.createElement("button");i.setAttribute("type","button"),e.appendChild(n),e.appendChild(t),e.appendChild(i),e.classList.add("input-group"),n.classList.add("btn"),n.classList.add("btn-secondary"),n.classList.add("stepper-down"),i.classList.add("btn"),i.classList.add("btn-secondary"),i.classList.add("stepper-up"),t.getAttribute("readonly")&&(n.setAttribute("disabled",!0),i.setAttribute("disabled",!0)),n.textContent="-",i.textContent="+";var o=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},r=t.getAttribute("min"),s=t.getAttribute("max");return t.addEventListener("change",(function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")})),n.addEventListener("click",(function(){t.getAttribute("initialized")?r?Number(t.value)>Number(r)&&t.stepDown():t.stepDown():o(t,r),c(t,"change")})),i.addEventListener("click",(function(){t.getAttribute("initialized")?s?Number(t.value)<Number(s)&&t.stepUp():t.stepUp():o(t,r),c(t,"change")})),e}},{key:"getFormInputField",value:function(t){var n=sa(aa(e.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&(n.classList.add("form-control"),"small"===this.options.input_size&&n.classList.add("form-control-sm"),"large"===this.options.input_size&&n.classList.add("form-control-lg")),n}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");if(r.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type)t&&(t.classList.add("form-label"),r.appendChild(t),i&&r.appendChild(i)),r.appendChild(e);else{var s=document.createElement("div");s.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label"),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),s.appendChild(e),s.appendChild(t),i&&s.appendChild(i),r.appendChild(s)}return n&&r.appendChild(n),r}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.classList.add("visually-hidden"),e}},{key:"visuallyHidden",value:function(t){t&&t.classList.add("visually-hidden")}},{key:"getHiddenText",value:function(t){var e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var n=document.createTextNode("ⓘ");return e.appendChild(n),"bootstrap"===this.options.tooltip?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):"css"===this.options.tooltip&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,n,i){var o=document.createElement("div");o.classList.add("form-group"),e&&(o.appendChild(e),i&&e.appendChild(i));var r=document.createElement("div");return Object.values(t).forEach((function(t){var e=t.firstChild;r.appendChild(e)})),o.appendChild(r),n&&o.appendChild(n),o}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in t)e.setAttribute(n,t[n]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return n.classList.add("form-check-label"),n.appendChild(document.createTextNode(t)),n}},{key:"getFormRadioControl",value:function(t,e,n){var i=document.createElement("div");return i.classList.add("form-check"),i.appendChild(e),i.appendChild(t),n&&i.classList.add("form-check-inline"),i}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return n.classList.add("h3"),n.classList.add("card-title"),n.classList.add("level-"+e),"string"==typeof t?n.textContent=t:n.appendChild(t),n.style.display="inline-block",n}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,n,i){var o=sa(aa(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-secondary","btn-sm"),o}},{key:"getTableContainer",value:function(){var t=sa(aa(e.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(n,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(n,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.classList.add("card"),n.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);for(var i=0;i<e.length;i++)e[i].classList.remove("me-2","btn-secondary"),e[i].classList.add("btn-outline-secondary"),n.appendChild(e[i]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ia(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function ha(t){return ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(t)}function da(t){var e=function(t){if("object"!=ha(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ha(e)?e:e+""}function pa(t,e,n){return e=ya(e),function(t,e){if(e&&("object"===ha(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fa()?Reflect.construct(e,n||[],ya(t).constructor):e.apply(t,n))}function fa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fa=function(){return!!t})()}function ma(){return ma="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ya(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ma.apply(this,arguments)}function ya(t){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ya(t)}function va(t,e){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},va(t,e)}ua.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 ba=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),pa(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&va(t,e)}(e,t),n=e,(i=[{key:"getTable",value:function(){var t=ma(ya(e.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var n=ma(ya(e.prototype),"getTableHeaderCell",this).call(this,t);return n.classList.add("ui-state-active"),n.style.fontWeight="bold",n}},{key:"getTableCell",value:function(){var t=ma(ya(e.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,n,i,o){var r=ma(ya(e.prototype),"getFormControl",this).call(this,t,n,i,o);return"checkbox"===n.type?(r.style.lineHeight="25px",r.style.padding="3px 0"):r.style.padding="4px 0 8px 0",r}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var n=document.createElement("label");return n.style.fontWeight="bold",n.style.display="block",n.textContent=t,e&&n.classList.add("required"),n}},{key:"getButton",value:function(t,e,n){var i=document.createElement("button");i.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(i.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),i.appendChild(e)):e?(i.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),i.appendChild(e)):i.classList.add("ui-button-text-only");var o=document.createElement("span");return o.classList.add("ui-button-text"),o.textContent=t||n||".",i.appendChild(o),i.setAttribute("title",n),i}},{key:"setButtonText",value:function(t,e,n,i){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),n&&!e?(t.classList.add("ui-button-icon-only"),n.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(n)):n?(t.classList.add("ui-button-text-icon-primary"),n.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(n)):t.classList.add("ui-button-text-only");var o=document.createElement("span");o.classList.add("ui-button-text"),o.textContent=e||i||".",t.appendChild(o),t.setAttribute("title",i)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,da(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function ga(t){return ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(t)}function _a(t){var e=function(t){if("object"!=ga(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ga(e)?e:e+""}function wa(t,e,n){return e=ka(e),function(t,e){if(e&&("object"===ga(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xa()?Reflect.construct(e,n||[],ka(t).constructor):e.apply(t,n))}function xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xa=function(){return!!t})()}function ka(t){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(t)}function Oa(t,e){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oa(t,e)}ba.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 ja=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),wa(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oa(t,e)}(e,t),n=e,(i=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var n=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),n.nodeName&&n.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e)),t.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_a(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Ca(t){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ca(t)}function Ea(t){var e=function(t){if("object"!=Ca(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ca(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ca(e)?e:e+""}function Pa(t,e,n){return e=Ta(e),function(t,e){if(e&&("object"===Ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,La()?Reflect.construct(e,n||[],Ta(t).constructor):e.apply(t,n))}function La(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(La=function(){return!!t})()}function Sa(){return Sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ta(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Sa.apply(this,arguments)}function Ta(t){return Ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(t)}function Aa(t,e){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Aa(t,e)}ja.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 Ra={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"},Ba=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Pa(this,e,[t,Ra])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(e,t),n=e,(i=[{key:"getOptInSwitch",value:function(t){var e=document.createElement("span");e.classList.add("form-group");var n=document.createElement("label");n.classList.add("form-switch","d-inline-block");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in");var o=document.createElement("i");o.classList.add("form-icon");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",n.appendChild(r),n.appendChild(i),n.appendChild(o),e.appendChild(n),{label:n,checkbox:i,container:e}}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-".concat(e)),n&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=Sa(Ta(e.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var n=Sa(Ta(e.prototype),"getFormButtonHolder",this).call(this);return n.classList.remove("btn-group"),n.classList.add("d-block"),"center"===t?n.classList.add("text-center"):"right"===t?n.classList.add("text-right"):n.classList.add("text-left"),n}},{key:"getFormButton",value:function(t,n,i){var o=Sa(Ta(e.prototype),"getFormButton",this).call(this,t,n,i);return o.classList.add("btn","btn-primary","mx-2","my-1"),"small"!==this.options.input_size&&o.classList.remove("btn-sm"),"large"===this.options.input_size&&o.classList.add("btn-lg"),o}},{key:"getButton",value:function(t,n,i){var o=Sa(Ta(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),o}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return"string"==typeof t?n.textContent=t:n.appendChild(t),n.style.display="inline-block",n}},{key:"getFormInputDescription",value:function(t){var n=Sa(Ta(e.prototype),"getFormInputDescription",this).call(this,t);return n.classList.add("je-desc","hide-sm"),n}},{key:"getFormInputLabel",value:function(t,n){var i=Sa(Ta(e.prototype),"getFormInputLabel",this).call(this,t,n);return this.options.label_bold&&i.classList.add("je-label"),i}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,n){var i=Sa(Ta(e.prototype),"getCheckboxLabel",this).call(this,t,n),o=document.createElement("i");return o.classList.add("form-icon"),i.classList.add("form-checkbox","pr-0"),i.insertBefore(o,i.firstChild),i}},{key:"getFormCheckboxControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,n,i,o){return Sa(Ta(e.prototype),"getMultiCheckboxHolder",this).call(this,t,n,i,o)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in t)e.setAttribute(n,t[n]);return e}},{key:"getFormRadioLabel",value:function(t,n){var i=Sa(Ta(e.prototype),"getFormRadioLabel",this).call(this,t,n),o=document.createElement("i");return o.classList.add("form-icon"),i.classList.add("form-radio"),i.insertBefore(o,i.firstChild),i}},{key:"getFormRadioControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var n=Sa(Ta(e.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||n.classList.add("form-input"),n}},{key:"getRangeInput",value:function(t,n,i,o,r){var s=Sa(Ta(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r);return s.classList.add("slider"),s.classList.remove("form-input"),s.setAttribute("oninput",'this.setAttribute("value", this.value)'),s}},{key:"getRangeControl",value:function(t,n){var i=Sa(Ta(e.prototype),"getRangeControl",this).call(this,t,n);return i.classList.add("text-center"),i}},{key:"getSelectInput",value:function(t,n){var i=Sa(Ta(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-select"),i}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");return r.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type?(t&&(t.classList.add("form-label"),r.appendChild(t),i&&t.appendChild(i)),r.appendChild(e)):(r.classList.add(e.type),i&&t.appendChild(i),t.insertBefore(e,t.firstChild),r.appendChild(t)),"small"===this.options.input_size?e.classList.add("input-sm","select-sm"):"large"===this.options.input_size&&e.classList.add("input-lg","select-lg"),"checkbox"!==e.type&&r.appendChild(e),n&&r.appendChild(n),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),r}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);for(var i=0;i<e.length;i++)e[i].classList.add("input-group-btn"),e[i].classList.remove("btn-sm","mr-2","my-1"),n.appendChild(e[i]);return n}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var n=document.createElement("button");n.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),n.setAttribute("tabindex","-1"),e.appendChild(n);var i=document.createTextNode("I");n.appendChild(i);var o=document.createElement("div");o.classList.add("popover-container"),e.appendChild(o);var r=document.createElement("div");r.classList.add("card"),o.appendChild(r);var s=document.createElement("div");return s.classList.add("card-body"),s.innerHTML=t,r.appendChild(s),e}},{key:"getTable",value:function(){var t=Sa(Ta(e.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=Sa(Ta(e.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.classList.add("columns"),n.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),n}},{key:"getTab",value:function(t,e){var n=document.createElement("a");return n.classList.add("btn","btn-secondary","btn-block"),n.setAttribute("href","#".concat(e)),n.appendChild(t),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.id=e,n.classList.add("tab-item");var i=document.createElement("a");return i.setAttribute("href","#".concat(e)),i.appendChild(t),n.appendChild(i),n}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if("select"===t.localName)if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach((function(t){t.classList.remove("form-select")})))}else if(t.classList.contains("select2-hidden-accessible")){var n=t.nextSibling;n&&n.querySelector(".select2-selection--single")&&n.classList.add("form-select")}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ea(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Ia(t){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(t)}function za(t){var e=function(t){if("object"!=Ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ia(e)?e:e+""}function Ma(t,e,n){return e=Fa(e),function(t,e){if(e&&("object"===Ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Na()?Reflect.construct(e,n||[],Fa(t).constructor):e.apply(t,n))}function Na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Na=function(){return!!t})()}function Da(){return Da="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fa(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Da.apply(this,arguments)}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function Ha(t,e){return Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ha(t,e)}Ba.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 Va={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},Za=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ma(this,e,[t,Va])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ha(t,e)}(e,t),n=e,(i=[{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("label");n.classList.add("switch");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in");var o=document.createElement("span");o.classList.add("switch-slider","round");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",n.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,n){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),n&&(t.style.marginLeft="".concat(100/12*n,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.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&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.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&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,n){var i=Da(Fa(e.prototype),"getSelectInput",this).call(this,t);return n?i.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"):i.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&&i.classList.add("compact"),i}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=Da(Fa(e.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,n){var i=this.getFormInputField("range");return i.classList.add("slider"),this.options.enable_compact&&i.classList.add("compact"),i.setAttribute("oninput",'this.setAttribute("value", this.value)'),i.setAttribute("min",t),i.setAttribute("max",e),i.setAttribute("step",n),i}},{key:"getRangeControl",value:function(t,n){var i=Da(Fa(e.prototype),"getRangeControl",this).call(this,t,n);return i.classList.add("text-center","text-black"),i}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,n){var i=Da(Fa(e.prototype),"getCheckboxLabel",this).call(this,t,n);return i.classList.add("inline-flex","items-center"),i}},{key:"getFormCheckboxControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,n,i,o){var r=Da(Fa(e.prototype),"getMultiCheckboxHolder",this).call(this,t,n,i,o);return r.classList.add("inline-flex","flex-col"),r}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(n,t[n]);return e}},{key:"getFormRadioLabel",value:function(t,n){var i=Da(Fa(e.prototype),"getFormRadioLabel",this).call(this,t,n);return i.classList.add("inline-flex","items-center","mr-2"),i}},{key:"getFormRadioControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,n,i,o,r){var s=Da(Fa(e.prototype),"getRadioHolder",this).call(this,n,i,o,r);return"h"===t.options.layout?s.classList.add("inline-flex","flex-row"):s.classList.add("inline-flex","flex-col"),s}},{key:"getFormInputLabel",value:function(t,n){var i=Da(Fa(e.prototype),"getFormInputLabel",this).call(this,t,n);return this.options.label_bold?i.classList.add("font-bold"):i.classList.add("required"),i}},{key:"getFormInputField",value:function(t){var n=Da(Fa(e.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||n.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&n.classList.add("compact"),n}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,n,i){var o=document.createElement("div");return o.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),"checkbox"===e.type&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,i)),"radio"===e.type&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,i)),o.appendChild(t),!["checkbox","radio"].includes(e.type)&&i&&o.appendChild(i)),["checkbox","radio"].includes(e.type)||("small"===this.options.input_size?e.classList.add("text-xs"):"normal"===this.options.input_size?e.classList.add("text-base"):"large"===this.options.input_size&&e.classList.add("text-xl"),o.appendChild(e)),n&&o.appendChild(n),o}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,n,i){var o=Da(Fa(e.prototype),"getButton",this).call(this,t,n,i);return o.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"),o}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var n=document.createElement("span");return n.innerHTML=t,e.appendChild(n),e}},{key:"getTable",value:function(){var t=Da(Fa(e.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=Da(Fa(e.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var n=Da(Fa(e.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?n.classList.add("je-table-border"):this.options.table_hdiv?n.classList.add("je-table-hdiv"):n.classList.add("text-xs","border","p-0","m-0"),n}},{key:"getTableCell",value:function(){var t=Da(Fa(e.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(n,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(n,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.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 i=document.createElement("a");return i.classList.add("nav-link","text-center"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item","flex","border-l","border-t","border-r");var i=document.createElement("a");return i.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),!0===t.tab.firstChild.classList.contains("border-b")?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),!0===t.container.classList.contains("hidden")?(t.container.classList.remove("hidden"),t.container.classList.add("block")):t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){!0===t.tab.firstChild.classList.contains("border-b-0")?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),!0===t.container.classList.contains("block")&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("relative","items-stretch","w-full"),n.appendChild(t);var i=document.createElement("div");i.classList.add("-mr-1"),n.appendChild(i);for(var o=0;o<e.length;o++)i.appendChild(e[o]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,za(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);Za.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 qa={html:Ns,bootstrap3:Ws,bootstrap4:ea,bootstrap5:ua,jqueryui:ba,barebones:ja,spectre:Ba,tailwind:Za};const Ua={".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 Wa(t){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(t)}function Ga(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Ja(){Ja=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,s=Object.create(r.prototype),a=new S(i||[]);return o(s,"_invoke",{value:C(t,n,a)}),s}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",y={};function v(){}function b(){}function g(){}var _={};c(_,s,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&i.call(x,s)&&(_=x);var k=g.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,r,s,a){var l=h(t[o],t,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Wa(u)&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(u).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function C(e,n,i){var o=d;return function(r,s){if(o===f)throw Error("Generator is already running");if(o===m){if("throw"===r)throw s;return{value:t,done:!0}}for(i.method=r,i.arg=s;;){var a=i.delegate;if(a){var l=E(a,i);if(l){if(l===y)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===d)throw o=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=f;var c=h(e,n,i);if("normal"===c.type){if(o=i.done?m:p,c.arg===y)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(o=m,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),y;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var s=r.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(Wa(e)+" is not iterable")}return b.prototype=g,o(k,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(j.prototype),c(j.prototype,a,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var s=new j(u(t,n,i,o),r);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(k),c(k,l,"Generator"),c(k,s,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return a.type="throw",a.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:T(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}function $a(t,e,n,i,o,r,s){try{var a=t[r](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,o)}function Ya(t){var e=function(t){if("object"!=Wa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wa(e)?e:e+""}var Ka=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e instanceof Element))throw new Error("element should be an instance of Element");this.element=e,this.options=l({},t.defaults.options,i),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||t.defaults.translate,this.translateProperty=this.options.translateProperty||t.defaults.translateProperty,this.uuid=0,this.__data={};var o=this.options.theme||t.defaults.theme,r=t.defaults.themes[o];if(!r)throw new Error("Unknown theme ".concat(o));this.element.setAttribute("data-theme",o),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new r(this);var s=l(Ua,this.getEditorsRules()),a=function(t,e,i){return i?n.addNewStyleRulesToShadowRoot(t,e,i):n.addNewStyleRules(t,e)};if(!this.theme.options.disable_theme_rules){var c=u(this.element);a("default",s,c),void 0!==r.rules&&a(o,r.rules,c)}var h=t.defaults.iconlibs[this.options.iconlib||t.defaults.iconlib];h&&(this.iconlib=new h),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}return e=t,n=[{key:"load",value:(i=Ja().mark((function e(){var n,i,o,r,s,a,l=this;return Ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=document.location.origin+document.location.pathname.toString(),(i=new br(this.options)).onSchemaLoaded=function(t){l.trigger("schemaLoaded",t)},i.onAllSchemasLoaded=function(){l.trigger("allSchemasLoaded")},this.expandSchema=function(t){return i.expandSchema(t)},this.expandRefs=function(t,e){return i.expandRefs(t,e)},o=document.location.toString(),e.next=9,i.load(this.schema,n,o);case 9:r=e.sent,s=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Un(this,null,s,t.defaults),a=this.getEditorClass(r),this.root=this.createEditor(a,{jsoneditor:this,schema:r,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),h(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(){l.ready&&(l.validation_results=l.validator.validate(l.root.getValue()),l.root.showValidationErrors(l.validation_results),l.trigger("ready"),l.trigger("change"))}));case 24:case"end":return e.stop()}}),e,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var r=i.apply(t,e);function s(t){$a(r,n,o,s,a,"next",t)}function a(t){$a(r,n,o,s,a,"throw",t)}s(void 0)}))},function(){return o.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 1===arguments.length?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,e){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(e),this}},{key:"off",value:function(t,e){if(t&&e){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var n=[],i=0;i<this.callbacks[t].length;i++)this.callbacks[t][i]!==e&&n.push(this.callbacks[t][i]);this.callbacks[t]=n}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,e){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var n=0;n<this.callbacks[t].length;n++)this.callbacks[t][n].apply(this,[e]);return this}},{key:"setOption",value:function(t,e){if("show_errors"!==t)throw new Error("Option ".concat(t," must be set during instantiation and cannot be changed later"));return this.options.show_errors=e,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(t.defaults.editors).reduce((function(t,e){return e.rules?l(t,e.rules):t}),{})}},{key:"getEditorClass",value:function(e){var n,i=this;if(e=this.expandSchema(e),t.defaults.resolvers.find((function(o){return(n=o(e,i))&&t.defaults.editors[n]})),!n)throw new Error("Unknown editor for schema ".concat(JSON.stringify(e)));if(!t.defaults.editors[n])throw new Error("Unknown editor ".concat(n));return t.defaults.editors[n]}},{key:"createEditor",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new e(n=l({},e.options||{},n),t.defaults,i)}},{key:"onChange",value:function(t){var e=this;if(this.ready&&(t&&this.trigger(t.event,t.data),!this.firing_change))return this.firing_change=!0,window.requestAnimationFrame((function(){e.firing_change=!1,e.ready&&(e.validation_results=e.validator.validate(e.root.getValue()),"never"!==e.options.show_errors?e.root.showValidationErrors(e.validation_results):e.root.showValidationErrors([]),e.trigger("change"))})),this}},{key:"compileTemplate",value:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaults.template;if("string"==typeof i){if(!t.defaults.templates[i])throw new Error("Unknown template engine ".concat(i));if(!(n=t.defaults.templates[i]()))throw new Error("Template engine ".concat(i," missing required library."))}else n=i;if(!n)throw new Error("No template engine set");if(!n.compile)throw new Error("Invalid template engine set");return n.compile(e)}},{key:"_data",value:function(t,e,n){if(3!==arguments.length)return t.hasAttribute("data-jsoneditor-".concat(e))?this.__data[t.getAttribute("data-jsoneditor-".concat(e))]:null;var i;t.hasAttribute("data-jsoneditor-".concat(e))?i=t.getAttribute("data-jsoneditor-".concat(e)):(i=this.uuid++,t.setAttribute("data-jsoneditor-".concat(e),i)),this.__data[i]=n}},{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,e){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(e),this}},{key:"unwatch",value:function(t,e){if(!this.watchlist||!this.watchlist[t])return this;if(!e)return this.watchlist[t]=null,this;for(var n=[],i=0;i<this.watchlist[t].length;i++)this.watchlist[t][i]!==e&&n.push(this.watchlist[t][i]);return this.watchlist[t]=n.length?n:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var e=0;e<this.watchlist[t].length;e++)this.watchlist[t][e]()}},{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,e){var n=document.querySelector("#theme-".concat(t));n||((n=document.createElement("style")).setAttribute("id","theme-".concat(t)),n.appendChild(document.createTextNode("")),document.head.appendChild(n));for(var i=n.sheet?n.sheet:n.styleSheet,o=this.element.nodeName.toLowerCase();i.cssRules.length>0;)i.deleteRule(0);Object.keys(e).forEach((function(n){var r="default"===t?n:"".concat(o,'[data-theme="').concat(t,'"] ').concat(n);i.insertRule?i.insertRule(r+" {"+decodeURIComponent(e[n])+"}",0):i.addRule&&i.addRule(r,decodeURIComponent(e[n]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,e,n){var i=this.element.nodeName.toLowerCase(),o="";Object.keys(e).forEach((function(n){var r="default"===t?n:"".concat(i,'[data-theme="').concat(t,'"] ').concat(n);o+=r+" {"+decodeURIComponent(e[n])+"}\n"}));var r,s=new CSSStyleSheet;s.replaceSync(o),n.adoptedStyleSheets=[].concat(function(t){if(Array.isArray(t))return Ga(t)}(r=n.adoptedStyleSheets)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return Ga(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ga(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[s])}},{key:"showValidationErrors",value:function(t){var e=null!=t?t:this.validate();Object.values(this.editors).forEach((function(t){t&&(t.is_dirty=!0,t.showValidationErrors(e))}))}}],n&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ya(i.key),i)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i,o}();Ka.defaults=ur,Ka.AbstractEditor=_,Ka.AbstractTheme=Ss,Ka.AbstractIconLib=Or,Object.assign(Ka.defaults.themes,qa),Object.assign(Ka.defaults.editors,rr),Object.assign(Ka.defaults.templates,gr),Object.assign(Ka.defaults.iconlibs,Cs)})(),i})(),t.exports=e()},861:(t,e,n)=>{n.d(e,{A:()=>a});var i=n(601),o=n.n(i),r=n(314),s=n.n(r)()(o());s.push([t.id,".drawflow,.drawflow .parent-node{position:relative}.parent-drawflow{display:flex;overflow:hidden;touch-action:none;outline:0}.drawflow{width:100%;height:100%;user-select:none;perspective:0}.drawflow .drawflow-node{display:flex;align-items:center;position:absolute;background:#0ff;width:160px;min-height:40px;border-radius:4px;border:2px solid #000;color:#000;z-index:2;padding:15px}.drawflow .drawflow-node.selected{background:red}.drawflow .drawflow-node:hover{cursor:move}.drawflow .drawflow-node .inputs,.drawflow .drawflow-node .outputs{width:0}.drawflow .drawflow-node .drawflow_content_node{width:100%;display:block}.drawflow .drawflow-node .input,.drawflow .drawflow-node .output{position:relative;width:20px;height:20px;background:#fff;border-radius:50%;border:2px solid #000;cursor:crosshair;z-index:1;margin-bottom:5px}.drawflow .drawflow-node .input{left:-27px;top:2px;background:#ff0}.drawflow .drawflow-node .output{right:-3px;top:2px}.drawflow svg{z-index:0;position:absolute;overflow:visible!important}.drawflow .connection{position:absolute;pointer-events:none;aspect-ratio:1/1}.drawflow .connection .main-path{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:all}.drawflow .connection .main-path:hover{stroke:#1266ab;cursor:pointer}.drawflow .connection .main-path.selected{stroke:#43b993}.drawflow .connection .point{cursor:move;stroke:#000;stroke-width:2;fill:#fff;pointer-events:all}.drawflow .connection .point.selected,.drawflow .connection .point:hover{fill:#1266ab}.drawflow .main-path{fill:none;stroke-width:5px;stroke:#4682b4}.drawflow-delete{position:absolute;display:block;width:30px;height:30px;background:#000;color:#fff;z-index:4;border:2px solid #fff;line-height:30px;font-weight:700;text-align:center;border-radius:50%;font-family:monospace;cursor:pointer}.drawflow>.drawflow-delete{margin-left:-15px;margin-top:15px}.parent-node .drawflow-delete{right:-15px;top:-15px}",""]);const a=s},81:(t,e,n)=>{n.d(e,{A:()=>y});var i=n(601),o=n.n(i),r=n(314),s=n.n(r),a=n(417),l=n.n(a),c=new URL(n(982),n.b),u=new URL(n(426),n.b),h=new URL(n(927),n.b),d=s()(o()),p=l()(c),f=l()(u),m=l()(h);d.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n\t -webkit-user-drag: none;\n\t}\n/* Prevents IE11 from highlighting tiles in blue */\n.leaflet-tile::selection {\n\tbackground: transparent;\n}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n}\n\n.leaflet-container.leaflet-touch-zoom {\n\t-ms-touch-action: pan-x pan-y;\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t-ms-touch-action: pinch-zoom;\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tfilter: inherit;\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tz-index: 800;\n\t}\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\n.leaflet-overlay-pane svg {\n\t-moz-user-select: none;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n.leaflet-vml-shape {\n\twidth: 1px;\n\theight: 1px;\n\t}\n.lvml {\n\tbehavior: url(#default#VML);\n\tdisplay: inline-block;\n\tposition: absolute;\n\t}\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\t-webkit-transition: opacity 0.2s linear;\n\t -moz-transition: opacity 0.2s linear;\n\t transition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\t-webkit-transform-origin: 0 0;\n\t -ms-transform-origin: 0 0;\n\t transform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\t-webkit-transition: none;\n\t -moz-transition: none;\n\t transition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: -webkit-grab;\n\tcursor: -moz-grab;\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: move;\n\tcursor: -webkit-grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${p});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-retina .leaflet-control-layers-toggle {\n\tbackground-image: url(${f});\n\tbackground-size: 26px 26px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${m});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\t-webkit-transform: rotate(45deg);\n\t -moz-transform: rotate(45deg);\n\t -ms-transform: rotate(45deg);\n\t transform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n.leaflet-oldie .leaflet-popup-content-wrapper {\n\t-ms-zoom: 1;\n\t}\n.leaflet-oldie .leaflet-popup-tip {\n\twidth: 24px;\n\tmargin: 0 auto;\n\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\n\t}\n\n.leaflet-oldie .leaflet-control-zoom,\n.leaflet-oldie .leaflet-control-layers,\n.leaflet-oldie .leaflet-popup-content-wrapper,\n.leaflet-oldie .leaflet-popup-tip {\n\tborder: 1px solid #999;\n\t}\n\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\t}\n\t}\n`,""]);const y=d},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},417:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601:t=>{t.exports=function(t){return t[1]}},782:function(t){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){n.r(e),n.d(e,"default",(function(){return i}));class i{constructor(t,e=null,n=null){this.events={},this.container=t,this.precanvas=null,this.nodeId=1,this.ele_selected=null,this.node_selected=null,this.drag=!1,this.reroute=!1,this.reroute_fix_curvature=!1,this.curvature=.5,this.reroute_curvature_start_end=.5,this.reroute_curvature=.5,this.reroute_width=6,this.drag_point=!1,this.editor_selected=!1,this.connection=!1,this.connection_ele=null,this.connection_selected=null,this.canvas_x=0,this.canvas_y=0,this.pos_x=0,this.pos_x_start=0,this.pos_y=0,this.pos_y_start=0,this.mouse_x=0,this.mouse_y=0,this.line_path=5,this.first_click=null,this.force_first_input=!1,this.draggable_inputs=!0,this.useuuid=!1,this.parent=n,this.noderegister={},this.render=e,this.drawflow={drawflow:{Home:{data:{}}}},this.module="Home",this.editor_mode="edit",this.zoom=1,this.zoom_max=1.6,this.zoom_min=.5,this.zoom_value=.1,this.zoom_last_value=1,this.evCache=new Array,this.prevDiff=-1}start(){this.container.classList.add("parent-drawflow"),this.container.tabIndex=0,this.precanvas=document.createElement("div"),this.precanvas.classList.add("drawflow"),this.container.appendChild(this.precanvas),this.container.addEventListener("mouseup",this.dragEnd.bind(this)),this.container.addEventListener("mousemove",this.position.bind(this)),this.container.addEventListener("mousedown",this.click.bind(this)),this.container.addEventListener("touchend",this.dragEnd.bind(this)),this.container.addEventListener("touchmove",this.position.bind(this)),this.container.addEventListener("touchstart",this.click.bind(this)),this.container.addEventListener("contextmenu",this.contextmenu.bind(this)),this.container.addEventListener("keydown",this.key.bind(this)),this.container.addEventListener("wheel",this.zoom_enter.bind(this)),this.container.addEventListener("input",this.updateNodeValue.bind(this)),this.container.addEventListener("dblclick",this.dblclick.bind(this)),this.container.onpointerdown=this.pointerdown_handler.bind(this),this.container.onpointermove=this.pointermove_handler.bind(this),this.container.onpointerup=this.pointerup_handler.bind(this),this.container.onpointercancel=this.pointerup_handler.bind(this),this.container.onpointerout=this.pointerup_handler.bind(this),this.container.onpointerleave=this.pointerup_handler.bind(this),this.load()}pointerdown_handler(t){this.evCache.push(t)}pointermove_handler(t){for(var e=0;e<this.evCache.length;e++)if(t.pointerId==this.evCache[e].pointerId){this.evCache[e]=t;break}if(2==this.evCache.length){var n=Math.abs(this.evCache[0].clientX-this.evCache[1].clientX);this.prevDiff>100&&(n>this.prevDiff&&this.zoom_in(),n<this.prevDiff&&this.zoom_out()),this.prevDiff=n}}pointerup_handler(t){this.remove_event(t),this.evCache.length<2&&(this.prevDiff=-1)}remove_event(t){for(var e=0;e<this.evCache.length;e++)if(this.evCache[e].pointerId==t.pointerId){this.evCache.splice(e,1);break}}load(){for(var t in this.drawflow.drawflow[this.module].data)this.addNodeImport(this.drawflow.drawflow[this.module].data[t],this.precanvas);if(this.reroute)for(var t in this.drawflow.drawflow[this.module].data)this.addRerouteImport(this.drawflow.drawflow[this.module].data[t]);for(var t in this.drawflow.drawflow[this.module].data)this.updateConnectionNodes("node-"+t);const e=this.drawflow.drawflow;let n=1;Object.keys(e).map((function(t,i){Object.keys(e[t].data).map((function(t,e){parseInt(t)>=n&&(n=parseInt(t)+1)}))})),this.nodeId=n}removeReouteConnectionSelected(){this.dispatch("connectionUnselected",!0),this.reroute_fix_curvature&&this.connection_selected.parentElement.querySelectorAll(".main-path").forEach(((t,e)=>{t.classList.remove("selected")}))}click(t){if(this.dispatch("click",t),"fixed"===this.editor_mode){if("parent-drawflow"!==t.target.classList[0]&&"drawflow"!==t.target.classList[0])return!1;this.ele_selected=t.target.closest(".parent-drawflow"),t.preventDefault()}else"view"===this.editor_mode?(null!=t.target.closest(".drawflow")||t.target.matches(".parent-drawflow"))&&(this.ele_selected=t.target.closest(".parent-drawflow"),t.preventDefault()):(this.first_click=t.target,this.ele_selected=t.target,0===t.button&&this.contextmenuDel(),null!=t.target.closest(".drawflow_content_node")&&(this.ele_selected=t.target.closest(".drawflow_content_node").parentElement));switch(this.ele_selected.classList[0]){case"drawflow-node":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected!=this.ele_selected&&this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.node_selected!=this.ele_selected&&this.dispatch("nodeSelected",this.ele_selected.id.slice(5)),this.node_selected=this.ele_selected,this.node_selected.classList.add("selected"),this.draggable_inputs?"SELECT"!==t.target.tagName&&(this.drag=!0):"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&"SELECT"!==t.target.tagName&&!0!==t.target.hasAttribute("contenteditable")&&(this.drag=!0);break;case"output":this.connection=!0,null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.drawConnection(t.target);break;case"parent-drawflow":case"drawflow":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.editor_selected=!0;break;case"main-path":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.connection_selected=this.ele_selected,this.connection_selected.classList.add("selected");const e=this.connection_selected.parentElement.classList;e.length>1&&(this.dispatch("connectionSelected",{output_id:e[2].slice(14),input_id:e[1].slice(13),output_class:e[3],input_class:e[4]}),this.reroute_fix_curvature&&this.connection_selected.parentElement.querySelectorAll(".main-path").forEach(((t,e)=>{t.classList.add("selected")})));break;case"point":this.drag_point=!0,this.ele_selected.classList.add("selected");break;case"drawflow-delete":this.node_selected&&this.removeNodeId(this.node_selected.id),this.connection_selected&&this.removeConnection(),null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null)}"touchstart"===t.type?(this.pos_x=t.touches[0].clientX,this.pos_x_start=t.touches[0].clientX,this.pos_y=t.touches[0].clientY,this.pos_y_start=t.touches[0].clientY,this.mouse_x=t.touches[0].clientX,this.mouse_y=t.touches[0].clientY):(this.pos_x=t.clientX,this.pos_x_start=t.clientX,this.pos_y=t.clientY,this.pos_y_start=t.clientY),["input","output","main-path"].includes(this.ele_selected.classList[0])&&t.preventDefault(),this.dispatch("clickEnd",t)}position(t){if("touchmove"===t.type)var e=t.touches[0].clientX,n=t.touches[0].clientY;else e=t.clientX,n=t.clientY;if(this.connection&&this.updateConnection(e,n),this.editor_selected&&(i=this.canvas_x+-(this.pos_x-e),o=this.canvas_y+-(this.pos_y-n),this.dispatch("translate",{x:i,y:o}),this.precanvas.style.transform="translate("+i+"px, "+o+"px) scale("+this.zoom+")"),this.drag){t.preventDefault();var i=(this.pos_x-e)*this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom),o=(this.pos_y-n)*this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom);this.pos_x=e,this.pos_y=n,this.ele_selected.style.top=this.ele_selected.offsetTop-o+"px",this.ele_selected.style.left=this.ele_selected.offsetLeft-i+"px",this.drawflow.drawflow[this.module].data[this.ele_selected.id.slice(5)].pos_x=this.ele_selected.offsetLeft-i,this.drawflow.drawflow[this.module].data[this.ele_selected.id.slice(5)].pos_y=this.ele_selected.offsetTop-o,this.updateConnectionNodes(this.ele_selected.id)}if(this.drag_point){i=(this.pos_x-e)*this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom),o=(this.pos_y-n)*this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom),this.pos_x=e,this.pos_y=n;var r=this.pos_x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),s=this.pos_y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom));this.ele_selected.setAttributeNS(null,"cx",r),this.ele_selected.setAttributeNS(null,"cy",s);const t=this.ele_selected.parentElement.classList[2].slice(9),a=this.ele_selected.parentElement.classList[1].slice(13),l=this.ele_selected.parentElement.classList[3],c=this.ele_selected.parentElement.classList[4];let u=Array.from(this.ele_selected.parentElement.children).indexOf(this.ele_selected)-1;this.reroute_fix_curvature&&(u-=this.ele_selected.parentElement.querySelectorAll(".main-path").length-1,u<0&&(u=0));const h=t.slice(5),d=this.drawflow.drawflow[this.module].data[h].outputs[l].connections.findIndex((function(t,e){return t.node===a&&t.output===c}));this.drawflow.drawflow[this.module].data[h].outputs[l].connections[d].points[u]={pos_x:r,pos_y:s};const p=this.ele_selected.parentElement.classList[2].slice(9);this.updateConnectionNodes(p)}"touchmove"===t.type&&(this.mouse_x=e,this.mouse_y=n),this.dispatch("mouseMove",{x:e,y:n})}dragEnd(t){if("touchend"===t.type)var e=this.mouse_x,n=this.mouse_y,i=document.elementFromPoint(e,n);else e=t.clientX,n=t.clientY,i=t.target;if(this.drag&&(this.pos_x_start==e&&this.pos_y_start==n||this.dispatch("nodeMoved",this.ele_selected.id.slice(5))),this.drag_point&&(this.ele_selected.classList.remove("selected"),this.pos_x_start==e&&this.pos_y_start==n||this.dispatch("rerouteMoved",this.ele_selected.parentElement.classList[2].slice(14))),this.editor_selected&&(this.canvas_x=this.canvas_x+-(this.pos_x-e),this.canvas_y=this.canvas_y+-(this.pos_y-n),this.editor_selected=!1),!0===this.connection)if("input"===i.classList[0]||this.force_first_input&&(null!=i.closest(".drawflow_content_node")||"drawflow-node"===i.classList[0])){if(!this.force_first_input||null==i.closest(".drawflow_content_node")&&"drawflow-node"!==i.classList[0])o=i.parentElement.parentElement.id,r=i.classList[1];else{if(null!=i.closest(".drawflow_content_node"))var o=i.closest(".drawflow_content_node").parentElement.id;else o=i.id;if(0===Object.keys(this.getNodeFromId(o.slice(5)).inputs).length)var r=!1;else r="input_1"}var s=this.ele_selected.parentElement.parentElement.id,a=this.ele_selected.classList[1];if(s!==o&&!1!==r){if(0===this.container.querySelectorAll(".connection.node_in_"+o+".node_out_"+s+"."+a+"."+r).length){this.connection_ele.classList.add("node_in_"+o),this.connection_ele.classList.add("node_out_"+s),this.connection_ele.classList.add(a),this.connection_ele.classList.add(r);var l=o.slice(5),c=s.slice(5);this.drawflow.drawflow[this.module].data[c].outputs[a].connections.push({node:l,output:r}),this.drawflow.drawflow[this.module].data[l].inputs[r].connections.push({node:c,input:a}),this.updateConnectionNodes("node-"+c),this.updateConnectionNodes("node-"+l),this.dispatch("connectionCreated",{output_id:c,input_id:l,output_class:a,input_class:r})}else this.dispatch("connectionCancel",!0),this.connection_ele.remove();this.connection_ele=null}else this.dispatch("connectionCancel",!0),this.connection_ele.remove(),this.connection_ele=null}else this.dispatch("connectionCancel",!0),this.connection_ele.remove(),this.connection_ele=null;this.drag=!1,this.drag_point=!1,this.connection=!1,this.ele_selected=null,this.editor_selected=!1,this.dispatch("mouseUp",t)}contextmenu(t){if(this.dispatch("contextmenu",t),t.preventDefault(),"fixed"===this.editor_mode||"view"===this.editor_mode)return!1;if(this.precanvas.getElementsByClassName("drawflow-delete").length&&this.precanvas.getElementsByClassName("drawflow-delete")[0].remove(),this.node_selected||this.connection_selected){var e=document.createElement("div");e.classList.add("drawflow-delete"),e.innerHTML="x",this.node_selected&&this.node_selected.appendChild(e),this.connection_selected&&this.connection_selected.parentElement.classList.length>1&&(e.style.top=t.clientY*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))+"px",e.style.left=t.clientX*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))+"px",this.precanvas.appendChild(e))}}contextmenuDel(){this.precanvas.getElementsByClassName("drawflow-delete").length&&this.precanvas.getElementsByClassName("drawflow-delete")[0].remove()}key(t){if(this.dispatch("keydown",t),"fixed"===this.editor_mode||"view"===this.editor_mode)return!1;("Delete"===t.key||"Backspace"===t.key&&t.metaKey)&&(null!=this.node_selected&&"INPUT"!==this.first_click.tagName&&"TEXTAREA"!==this.first_click.tagName&&!0!==this.first_click.hasAttribute("contenteditable")&&this.removeNodeId(this.node_selected.id),null!=this.connection_selected&&this.removeConnection())}zoom_enter(t,e){t.ctrlKey&&(t.preventDefault(),t.deltaY>0?this.zoom_out():this.zoom_in())}zoom_refresh(){this.dispatch("zoom",this.zoom),this.canvas_x=this.canvas_x/this.zoom_last_value*this.zoom,this.canvas_y=this.canvas_y/this.zoom_last_value*this.zoom,this.zoom_last_value=this.zoom,this.precanvas.style.transform="translate("+this.canvas_x+"px, "+this.canvas_y+"px) scale("+this.zoom+")"}zoom_in(){this.zoom<this.zoom_max&&(this.zoom+=this.zoom_value,this.zoom_refresh())}zoom_out(){this.zoom>this.zoom_min&&(this.zoom-=this.zoom_value,this.zoom_refresh())}zoom_reset(){1!=this.zoom&&(this.zoom=1,this.zoom_refresh())}createCurvature(t,e,n,i,o,r){var s=t,a=e,l=n,c=i,u=o;switch(r){case"open":if(t>=n)var h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*(-1*u);else h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*u;return" M "+s+" "+a+" C "+h+" "+a+" "+d+" "+c+" "+l+" "+c;case"close":return t>=n?(h=s+Math.abs(l-s)*(-1*u),d=l-Math.abs(l-s)*u):(h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*u)," M "+s+" "+a+" C "+h+" "+a+" "+d+" "+c+" "+l+" "+c;case"other":return t>=n?(h=s+Math.abs(l-s)*(-1*u),d=l-Math.abs(l-s)*(-1*u)):(h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*u)," M "+s+" "+a+" C "+h+" "+a+" "+d+" "+c+" "+l+" "+c;default:return" M "+s+" "+a+" C "+(h=s+Math.abs(l-s)*u)+" "+a+" "+(d=l-Math.abs(l-s)*u)+" "+c+" "+l+" "+c}}drawConnection(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this.connection_ele=e;var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.classList.add("main-path"),n.setAttributeNS(null,"d",""),e.classList.add("connection"),e.appendChild(n),this.precanvas.appendChild(e);var i=t.parentElement.parentElement.id.slice(5),o=t.classList[1];this.dispatch("connectionStart",{output_id:i,output_class:o})}updateConnection(t,e){const n=this.precanvas,i=this.zoom;let o=n.clientWidth/(n.clientWidth*i);o=o||0;let r=n.clientHeight/(n.clientHeight*i);r=r||0;var s=this.connection_ele.children[0],a=this.ele_selected.offsetWidth/2+(this.ele_selected.getBoundingClientRect().x-n.getBoundingClientRect().x)*o,l=this.ele_selected.offsetHeight/2+(this.ele_selected.getBoundingClientRect().y-n.getBoundingClientRect().y)*r,c=t*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),u=e*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom)),h=this.curvature,d=this.createCurvature(a,l,c,u,h,"openclose");s.setAttributeNS(null,"d",d)}addConnection(t,e,n,i){var o=this.getModuleFromNodeId(t);if(o===this.getModuleFromNodeId(e)){var r=this.getNodeFromId(t),s=!1;for(var a in r.outputs[n].connections){var l=r.outputs[n].connections[a];l.node==e&&l.output==i&&(s=!0)}if(!1===s){if(this.drawflow.drawflow[o].data[t].outputs[n].connections.push({node:e.toString(),output:i}),this.drawflow.drawflow[o].data[e].inputs[i].connections.push({node:t.toString(),input:n}),this.module===o){var c=document.createElementNS("http://www.w3.org/2000/svg","svg"),u=document.createElementNS("http://www.w3.org/2000/svg","path");u.classList.add("main-path"),u.setAttributeNS(null,"d",""),c.classList.add("connection"),c.classList.add("node_in_node-"+e),c.classList.add("node_out_node-"+t),c.classList.add(n),c.classList.add(i),c.appendChild(u),this.precanvas.appendChild(c),this.updateConnectionNodes("node-"+t),this.updateConnectionNodes("node-"+e)}this.dispatch("connectionCreated",{output_id:t,input_id:e,output_class:n,input_class:i})}}}updateConnectionNodes(t){const e="node_in_"+t,n="node_out_"+t;this.line_path;const i=this.container,o=this.precanvas,r=this.curvature,s=this.createCurvature,a=this.reroute_curvature,l=this.reroute_curvature_start_end,c=this.reroute_fix_curvature,u=this.reroute_width,h=this.zoom;let d=o.clientWidth/(o.clientWidth*h);d=d||0;let p=o.clientHeight/(o.clientHeight*h);p=p||0;const f=i.querySelectorAll("."+n);Object.keys(f).map((function(e,n){if(null===f[e].querySelector(".point")){var m=i.querySelector("#"+t),y=f[e].classList[1].replace("node_in_",""),v=i.querySelector("#"+y).querySelectorAll("."+f[e].classList[4])[0],b=v.offsetWidth/2+(v.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,g=v.offsetHeight/2+(v.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,_=m.querySelectorAll("."+f[e].classList[3])[0],w=_.offsetWidth/2+(_.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,x=_.offsetHeight/2+(_.getBoundingClientRect().y-o.getBoundingClientRect().y)*p;const n=s(w,x,b,g,r,"openclose");f[e].children[0].setAttributeNS(null,"d",n)}else{const n=f[e].querySelectorAll(".point");let r="";const m=[];n.forEach(((e,c)=>{if(0===c&&n.length-1==0){var f=i.querySelector("#"+t),y=((x=e).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,b=(k=f.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(k.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,g=k.offsetHeight/2+(k.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,_=s(b,g,y,v,l,"open");r+=_,m.push(_),f=e;var w=e.parentElement.classList[1].replace("node_in_",""),x=(O=i.querySelector("#"+w)).querySelectorAll("."+e.parentElement.classList[4])[0];y=(j=O.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(j.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,v=j.offsetHeight/2+(j.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,_=s(b,g,y,v,l,"close"),r+=_,m.push(_)}else if(0===c){var k;f=i.querySelector("#"+t),y=((x=e).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,b=(k=f.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(k.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,g=k.offsetHeight/2+(k.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,_=s(b,g,y,v,l,"open"),r+=_,m.push(_),f=e,y=((x=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,_=s(b,g,y,v,a,"other"),r+=_,m.push(_)}else if(c===n.length-1){var O,j;f=e,w=e.parentElement.classList[1].replace("node_in_",""),x=(O=i.querySelector("#"+w)).querySelectorAll("."+e.parentElement.classList[4])[0],y=(j=O.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(j.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,v=j.offsetHeight/2+(j.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+u,_=s(b,g,y,v,l,"close"),r+=_,m.push(_)}else f=e,y=((x=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+u,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+u,_=s(b,g,y,v,a,"other"),r+=_,m.push(_)})),c?m.forEach(((t,n)=>{f[e].children[n].setAttributeNS(null,"d",t)})):f[e].children[0].setAttributeNS(null,"d",r)}}));const m=i.querySelectorAll("."+e);Object.keys(m).map((function(e,n){if(null===m[e].querySelector(".point")){var h=i.querySelector("#"+t),f=m[e].classList[2].replace("node_out_",""),y=i.querySelector("#"+f).querySelectorAll("."+m[e].classList[3])[0],v=y.offsetWidth/2+(y.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,b=y.offsetHeight/2+(y.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,g=(h=h.querySelectorAll("."+m[e].classList[4])[0]).offsetWidth/2+(h.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,_=h.offsetHeight/2+(h.getBoundingClientRect().y-o.getBoundingClientRect().y)*p;const n=s(v,b,g,_,r,"openclose");m[e].children[0].setAttributeNS(null,"d",n)}else{const n=m[e].querySelectorAll(".point");let r="";const h=[];n.forEach(((e,c)=>{if(0===c&&n.length-1==0){var f=i.querySelector("#"+t),m=((w=e).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,v=(O=f.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(O.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,b=O.offsetHeight/2+(O.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,g=s(m,y,v,b,l,"close");r+=g,h.push(g),f=e;var _=e.parentElement.classList[2].replace("node_out_",""),w=(k=i.querySelector("#"+_)).querySelectorAll("."+e.parentElement.classList[3])[0];m=(x=k.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(x.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,y=x.offsetHeight/2+(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,v=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,l,"open"),r+=g,h.push(g)}else if(0===c){var x;f=e,_=e.parentElement.classList[2].replace("node_out_",""),w=(k=i.querySelector("#"+_)).querySelectorAll("."+e.parentElement.classList[3])[0],m=(x=k.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(x.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,y=x.offsetHeight/2+(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,v=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,l,"open"),r+=g,h.push(g),f=e,v=((w=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,m=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,a,"other"),r+=g,h.push(g)}else if(c===n.length-1){var k,O;f=e,_=e.parentElement.classList[1].replace("node_in_",""),w=(k=i.querySelector("#"+_)).querySelectorAll("."+e.parentElement.classList[4])[0],v=(O=k.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(O.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,b=O.offsetHeight/2+(O.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,m=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,l,"close"),r+=g,h.push(g)}else f=e,v=((w=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,m=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,a,"other"),r+=g,h.push(g)})),c?h.forEach(((t,n)=>{m[e].children[n].setAttributeNS(null,"d",t)})):m[e].children[0].setAttributeNS(null,"d",r)}}))}dblclick(t){null!=this.connection_selected&&this.reroute&&this.createReroutePoint(this.connection_selected),"point"===t.target.classList[0]&&this.removeReroutePoint(t.target)}createReroutePoint(t){this.connection_selected.classList.remove("selected");const e=this.connection_selected.parentElement.classList[2].slice(9),n=this.connection_selected.parentElement.classList[1].slice(13),i=this.connection_selected.parentElement.classList[3],o=this.connection_selected.parentElement.classList[4];this.connection_selected=null;const r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.classList.add("point");var s=this.pos_x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),a=this.pos_y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom));r.setAttributeNS(null,"cx",s),r.setAttributeNS(null,"cy",a),r.setAttributeNS(null,"r",this.reroute_width);let l=0;if(this.reroute_fix_curvature){const e=t.parentElement.querySelectorAll(".main-path").length;var c=document.createElementNS("http://www.w3.org/2000/svg","path");if(c.classList.add("main-path"),c.setAttributeNS(null,"d",""),t.parentElement.insertBefore(c,t.parentElement.children[e]),1===e)t.parentElement.appendChild(r);else{const n=Array.from(t.parentElement.children).indexOf(t);l=n,t.parentElement.insertBefore(r,t.parentElement.children[n+e+1])}}else t.parentElement.appendChild(r);const u=e.slice(5),h=this.drawflow.drawflow[this.module].data[u].outputs[i].connections.findIndex((function(t,e){return t.node===n&&t.output===o}));void 0===this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points&&(this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points=[]),this.reroute_fix_curvature?(l>0||this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points!==[]?this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points.splice(l,0,{pos_x:s,pos_y:a}):this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points.push({pos_x:s,pos_y:a}),t.parentElement.querySelectorAll(".main-path").forEach(((t,e)=>{t.classList.remove("selected")}))):this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points.push({pos_x:s,pos_y:a}),this.dispatch("addReroute",u),this.updateConnectionNodes(e)}removeReroutePoint(t){const e=t.parentElement.classList[2].slice(9),n=t.parentElement.classList[1].slice(13),i=t.parentElement.classList[3],o=t.parentElement.classList[4];let r=Array.from(t.parentElement.children).indexOf(t);const s=e.slice(5),a=this.drawflow.drawflow[this.module].data[s].outputs[i].connections.findIndex((function(t,e){return t.node===n&&t.output===o}));if(this.reroute_fix_curvature){const e=t.parentElement.querySelectorAll(".main-path").length;t.parentElement.children[e-1].remove(),r-=e,r<0&&(r=0)}else r--;this.drawflow.drawflow[this.module].data[s].outputs[i].connections[a].points.splice(r,1),t.remove(),this.dispatch("removeReroute",s),this.updateConnectionNodes(e)}registerNode(t,e,n=null,i=null){this.noderegister[t]={html:e,props:n,options:i}}getNodeFromId(t){var e=this.getModuleFromNodeId(t);return JSON.parse(JSON.stringify(this.drawflow.drawflow[e].data[t]))}getNodesFromName(t){var e=[];const n=this.drawflow.drawflow;return Object.keys(n).map((function(i,o){for(var r in n[i].data)n[i].data[r].name==t&&e.push(n[i].data[r].id)})),e}addNode(t,e,n,i,o,r,s,a,l=!1){if(this.useuuid)var c=this.getUuid();else c=this.nodeId;const u=document.createElement("div");u.classList.add("parent-node");const h=document.createElement("div");h.innerHTML="",h.setAttribute("id","node-"+c),h.classList.add("drawflow-node"),""!=r&&h.classList.add(...r.split(" "));const d=document.createElement("div");d.classList.add("inputs");const p=document.createElement("div");p.classList.add("outputs");const f={};for(var m=0;m<e;m++){const t=document.createElement("div");t.classList.add("input"),t.classList.add("input_"+(m+1)),f["input_"+(m+1)]={connections:[]},d.appendChild(t)}const y={};for(m=0;m<n;m++){const t=document.createElement("div");t.classList.add("output"),t.classList.add("output_"+(m+1)),y["output_"+(m+1)]={connections:[]},p.appendChild(t)}const v=document.createElement("div");if(v.classList.add("drawflow_content_node"),!1===l)v.innerHTML=a;else if(!0===l)v.appendChild(this.noderegister[a].html.cloneNode(!0));else if(3===parseInt(this.render.version)){let t=this.render.h(this.noderegister[a].html,this.noderegister[a].props,this.noderegister[a].options);t.appContext=this.parent,this.render.render(t,v)}else{let t=new this.render({parent:this.parent,render:t=>t(this.noderegister[a].html,{props:this.noderegister[a].props}),...this.noderegister[a].options}).$mount();v.appendChild(t.$el)}Object.entries(s).forEach((function(t,e){if("object"==typeof t[1])!function t(e,n,i){null!==(e=null===e?s[n]:e[n])&&Object.entries(e).forEach((function(n,o){if("object"==typeof n[1])t(e,n[0],i+"-"+n[0]);else for(var r=v.querySelectorAll("[df-"+i+"-"+n[0]+"]"),s=0;s<r.length;s++)r[s].value=n[1],r[s].isContentEditable&&(r[s].innerText=n[1])}))}(null,t[0],t[0]);else for(var n=v.querySelectorAll("[df-"+t[0]+"]"),i=0;i<n.length;i++)n[i].value=t[1],n[i].isContentEditable&&(n[i].innerText=t[1])})),h.appendChild(d),h.appendChild(v),h.appendChild(p),h.style.top=o+"px",h.style.left=i+"px",u.appendChild(h),this.precanvas.appendChild(u);var b={id:c,name:t,data:s,class:r,html:a,typenode:l,inputs:f,outputs:y,pos_x:i,pos_y:o};return this.drawflow.drawflow[this.module].data[c]=b,this.dispatch("nodeCreated",c),this.useuuid||this.nodeId++,c}addNodeImport(t,e){const n=document.createElement("div");n.classList.add("parent-node");const i=document.createElement("div");i.innerHTML="",i.setAttribute("id","node-"+t.id),i.classList.add("drawflow-node"),""!=t.class&&i.classList.add(...t.class.split(" "));const o=document.createElement("div");o.classList.add("inputs");const r=document.createElement("div");r.classList.add("outputs"),Object.keys(t.inputs).map((function(n,i){const r=document.createElement("div");r.classList.add("input"),r.classList.add(n),o.appendChild(r),Object.keys(t.inputs[n].connections).map((function(i,o){var r=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");s.classList.add("main-path"),s.setAttributeNS(null,"d",""),r.classList.add("connection"),r.classList.add("node_in_node-"+t.id),r.classList.add("node_out_node-"+t.inputs[n].connections[i].node),r.classList.add(t.inputs[n].connections[i].input),r.classList.add(n),r.appendChild(s),e.appendChild(r)}))}));for(var s=0;s<Object.keys(t.outputs).length;s++){const t=document.createElement("div");t.classList.add("output"),t.classList.add("output_"+(s+1)),r.appendChild(t)}const a=document.createElement("div");if(a.classList.add("drawflow_content_node"),!1===t.typenode)a.innerHTML=t.html;else if(!0===t.typenode)a.appendChild(this.noderegister[t.html].html.cloneNode(!0));else if(3===parseInt(this.render.version)){let e=this.render.h(this.noderegister[t.html].html,this.noderegister[t.html].props,this.noderegister[t.html].options);e.appContext=this.parent,this.render.render(e,a)}else{let e=new this.render({parent:this.parent,render:e=>e(this.noderegister[t.html].html,{props:this.noderegister[t.html].props}),...this.noderegister[t.html].options}).$mount();a.appendChild(e.$el)}Object.entries(t.data).forEach((function(e,n){if("object"==typeof e[1])!function e(n,i,o){null!==(n=null===n?t.data[i]:n[i])&&Object.entries(n).forEach((function(t,i){if("object"==typeof t[1])e(n,t[0],o+"-"+t[0]);else for(var r=a.querySelectorAll("[df-"+o+"-"+t[0]+"]"),s=0;s<r.length;s++)r[s].value=t[1],r[s].isContentEditable&&(r[s].innerText=t[1])}))}(null,e[0],e[0]);else for(var i=a.querySelectorAll("[df-"+e[0]+"]"),o=0;o<i.length;o++)i[o].value=e[1],i[o].isContentEditable&&(i[o].innerText=e[1])})),i.appendChild(o),i.appendChild(a),i.appendChild(r),i.style.top=t.pos_y+"px",i.style.left=t.pos_x+"px",n.appendChild(i),this.precanvas.appendChild(n)}addRerouteImport(t){const e=this.reroute_width,n=this.reroute_fix_curvature,i=this.container;Object.keys(t.outputs).map((function(o,r){Object.keys(t.outputs[o].connections).map((function(r,s){const a=t.outputs[o].connections[r].points;void 0!==a&&a.forEach(((s,l)=>{const c=t.outputs[o].connections[r].node,u=t.outputs[o].connections[r].output,h=i.querySelector(".connection.node_in_node-"+c+".node_out_node-"+t.id+"."+o+"."+u);if(n&&0===l)for(var d=0;d<a.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","path");p.classList.add("main-path"),p.setAttributeNS(null,"d",""),h.appendChild(p)}const f=document.createElementNS("http://www.w3.org/2000/svg","circle");f.classList.add("point");var m=s.pos_x,y=s.pos_y;f.setAttributeNS(null,"cx",m),f.setAttributeNS(null,"cy",y),f.setAttributeNS(null,"r",e),h.appendChild(f)}))}))}))}updateNodeValue(t){for(var e=t.target.attributes,n=0;n<e.length;n++)if(e[n].nodeName.startsWith("df-")){for(var i=e[n].nodeName.slice(3).split("-"),o=this.drawflow.drawflow[this.module].data[t.target.closest(".drawflow_content_node").parentElement.id.slice(5)].data,r=0;r<i.length-1;r+=1)null==o[i[r]]&&(o[i[r]]={}),o=o[i[r]];o[i[i.length-1]]=t.target.value,t.target.isContentEditable&&(o[i[i.length-1]]=t.target.innerText),this.dispatch("nodeDataChanged",t.target.closest(".drawflow_content_node").parentElement.id.slice(5))}}updateNodeDataFromId(t,e){var n=this.getModuleFromNodeId(t);if(this.drawflow.drawflow[n].data[t].data=e,this.module===n){const n=this.container.querySelector("#node-"+t);Object.entries(e).forEach((function(t,i){if("object"==typeof t[1])!function t(i,o,r){null!==(i=null===i?e[o]:i[o])&&Object.entries(i).forEach((function(e,o){if("object"==typeof e[1])t(i,e[0],r+"-"+e[0]);else for(var s=n.querySelectorAll("[df-"+r+"-"+e[0]+"]"),a=0;a<s.length;a++)s[a].value=e[1],s[a].isContentEditable&&(s[a].innerText=e[1])}))}(null,t[0],t[0]);else for(var o=n.querySelectorAll("[df-"+t[0]+"]"),r=0;r<o.length;r++)o[r].value=t[1],o[r].isContentEditable&&(o[r].innerText=t[1])}))}}addNodeInput(t){var e=this.getModuleFromNodeId(t);const n=this.getNodeFromId(t),i=Object.keys(n.inputs).length;if(this.module===e){const e=document.createElement("div");e.classList.add("input"),e.classList.add("input_"+(i+1)),this.container.querySelector("#node-"+t+" .inputs").appendChild(e),this.updateConnectionNodes("node-"+t)}this.drawflow.drawflow[e].data[t].inputs["input_"+(i+1)]={connections:[]}}addNodeOutput(t){var e=this.getModuleFromNodeId(t);const n=this.getNodeFromId(t),i=Object.keys(n.outputs).length;if(this.module===e){const e=document.createElement("div");e.classList.add("output"),e.classList.add("output_"+(i+1)),this.container.querySelector("#node-"+t+" .outputs").appendChild(e),this.updateConnectionNodes("node-"+t)}this.drawflow.drawflow[e].data[t].outputs["output_"+(i+1)]={connections:[]}}removeNodeInput(t,e){var n=this.getModuleFromNodeId(t);const i=this.getNodeFromId(t);this.module===n&&this.container.querySelector("#node-"+t+" .inputs .input."+e).remove();const o=[];Object.keys(i.inputs[e].connections).map((function(n,r){const s=i.inputs[e].connections[r].node,a=i.inputs[e].connections[r].input;o.push({id_output:s,id:t,output_class:a,input_class:e})})),o.forEach(((t,e)=>{this.removeSingleConnection(t.id_output,t.id,t.output_class,t.input_class)})),delete this.drawflow.drawflow[n].data[t].inputs[e];const r=[],s=this.drawflow.drawflow[n].data[t].inputs;Object.keys(s).map((function(t,e){r.push(s[t])})),this.drawflow.drawflow[n].data[t].inputs={};const a=e.slice(6);let l=[];r.forEach(((e,i)=>{e.connections.forEach(((t,e)=>{l.push(t)})),this.drawflow.drawflow[n].data[t].inputs["input_"+(i+1)]=e})),l=new Set(l.map((t=>JSON.stringify(t)))),l=Array.from(l).map((t=>JSON.parse(t))),this.module===n&&this.container.querySelectorAll("#node-"+t+" .inputs .input").forEach(((t,e)=>{const n=t.classList[1].slice(6);parseInt(a)<parseInt(n)&&(t.classList.remove("input_"+n),t.classList.add("input_"+(n-1)))})),l.forEach(((e,i)=>{this.drawflow.drawflow[n].data[e.node].outputs[e.input].connections.forEach(((i,o)=>{if(i.node==t){const r=i.output.slice(6);if(parseInt(a)<parseInt(r)){if(this.module===n){const n=this.container.querySelector(".connection.node_in_node-"+t+".node_out_node-"+e.node+"."+e.input+".input_"+r);n.classList.remove("input_"+r),n.classList.add("input_"+(r-1))}i.points?this.drawflow.drawflow[n].data[e.node].outputs[e.input].connections[o]={node:i.node,output:"input_"+(r-1),points:i.points}:this.drawflow.drawflow[n].data[e.node].outputs[e.input].connections[o]={node:i.node,output:"input_"+(r-1)}}}}))})),this.updateConnectionNodes("node-"+t)}removeNodeOutput(t,e){var n=this.getModuleFromNodeId(t);const i=this.getNodeFromId(t);this.module===n&&this.container.querySelector("#node-"+t+" .outputs .output."+e).remove();const o=[];Object.keys(i.outputs[e].connections).map((function(n,r){const s=i.outputs[e].connections[r].node,a=i.outputs[e].connections[r].output;o.push({id:t,id_input:s,output_class:e,input_class:a})})),o.forEach(((t,e)=>{this.removeSingleConnection(t.id,t.id_input,t.output_class,t.input_class)})),delete this.drawflow.drawflow[n].data[t].outputs[e];const r=[],s=this.drawflow.drawflow[n].data[t].outputs;Object.keys(s).map((function(t,e){r.push(s[t])})),this.drawflow.drawflow[n].data[t].outputs={};const a=e.slice(7);let l=[];r.forEach(((e,i)=>{e.connections.forEach(((t,e)=>{l.push({node:t.node,output:t.output})})),this.drawflow.drawflow[n].data[t].outputs["output_"+(i+1)]=e})),l=new Set(l.map((t=>JSON.stringify(t)))),l=Array.from(l).map((t=>JSON.parse(t))),this.module===n&&this.container.querySelectorAll("#node-"+t+" .outputs .output").forEach(((t,e)=>{const n=t.classList[1].slice(7);parseInt(a)<parseInt(n)&&(t.classList.remove("output_"+n),t.classList.add("output_"+(n-1)))})),l.forEach(((e,i)=>{this.drawflow.drawflow[n].data[e.node].inputs[e.output].connections.forEach(((i,o)=>{if(i.node==t){const r=i.input.slice(7);if(parseInt(a)<parseInt(r)){if(this.module===n){const n=this.container.querySelector(".connection.node_in_node-"+e.node+".node_out_node-"+t+".output_"+r+"."+e.output);n.classList.remove("output_"+r),n.classList.remove(e.output),n.classList.add("output_"+(r-1)),n.classList.add(e.output)}i.points?this.drawflow.drawflow[n].data[e.node].inputs[e.output].connections[o]={node:i.node,input:"output_"+(r-1),points:i.points}:this.drawflow.drawflow[n].data[e.node].inputs[e.output].connections[o]={node:i.node,input:"output_"+(r-1)}}}}))})),this.updateConnectionNodes("node-"+t)}removeNodeId(t){this.removeConnectionNodeId(t);var e=this.getModuleFromNodeId(t.slice(5));this.module===e&&this.container.querySelector("#"+t).remove(),delete this.drawflow.drawflow[e].data[t.slice(5)],this.dispatch("nodeRemoved",t.slice(5))}removeConnection(){if(null!=this.connection_selected){var t=this.connection_selected.parentElement.classList;this.connection_selected.parentElement.remove();var e=this.drawflow.drawflow[this.module].data[t[2].slice(14)].outputs[t[3]].connections.findIndex((function(e,n){return e.node===t[1].slice(13)&&e.output===t[4]}));this.drawflow.drawflow[this.module].data[t[2].slice(14)].outputs[t[3]].connections.splice(e,1);var n=this.drawflow.drawflow[this.module].data[t[1].slice(13)].inputs[t[4]].connections.findIndex((function(e,n){return e.node===t[2].slice(14)&&e.input===t[3]}));this.drawflow.drawflow[this.module].data[t[1].slice(13)].inputs[t[4]].connections.splice(n,1),this.dispatch("connectionRemoved",{output_id:t[2].slice(14),input_id:t[1].slice(13),output_class:t[3],input_class:t[4]}),this.connection_selected=null}}removeSingleConnection(t,e,n,i){var o=this.getModuleFromNodeId(t);if(o===this.getModuleFromNodeId(e)){if(this.drawflow.drawflow[o].data[t].outputs[n].connections.findIndex((function(t,n){return t.node==e&&t.output===i}))>-1){this.module===o&&this.container.querySelector(".connection.node_in_node-"+e+".node_out_node-"+t+"."+n+"."+i).remove();var r=this.drawflow.drawflow[o].data[t].outputs[n].connections.findIndex((function(t,n){return t.node==e&&t.output===i}));this.drawflow.drawflow[o].data[t].outputs[n].connections.splice(r,1);var s=this.drawflow.drawflow[o].data[e].inputs[i].connections.findIndex((function(e,i){return e.node==t&&e.input===n}));return this.drawflow.drawflow[o].data[e].inputs[i].connections.splice(s,1),this.dispatch("connectionRemoved",{output_id:t,input_id:e,output_class:n,input_class:i}),!0}return!1}return!1}removeConnectionNodeId(t){const e="node_in_"+t,n="node_out_"+t,i=this.container.querySelectorAll("."+n);for(var o=i.length-1;o>=0;o--){var r=i[o].classList,s=this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.findIndex((function(t,e){return t.node===r[2].slice(14)&&t.input===r[3]}));this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.splice(s,1);var a=this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.findIndex((function(t,e){return t.node===r[1].slice(13)&&t.output===r[4]}));this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.splice(a,1),i[o].remove(),this.dispatch("connectionRemoved",{output_id:r[2].slice(14),input_id:r[1].slice(13),output_class:r[3],input_class:r[4]})}const l=this.container.querySelectorAll("."+e);for(o=l.length-1;o>=0;o--)r=l[o].classList,a=this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.findIndex((function(t,e){return t.node===r[1].slice(13)&&t.output===r[4]})),this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.splice(a,1),s=this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.findIndex((function(t,e){return t.node===r[2].slice(14)&&t.input===r[3]})),this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.splice(s,1),l[o].remove(),this.dispatch("connectionRemoved",{output_id:r[2].slice(14),input_id:r[1].slice(13),output_class:r[3],input_class:r[4]})}getModuleFromNodeId(t){var e;const n=this.drawflow.drawflow;return Object.keys(n).map((function(i,o){Object.keys(n[i].data).map((function(n,o){n==t&&(e=i)}))})),e}addModule(t){this.drawflow.drawflow[t]={data:{}},this.dispatch("moduleCreated",t)}changeModule(t){this.dispatch("moduleChanged",t),this.module=t,this.precanvas.innerHTML="",this.canvas_x=0,this.canvas_y=0,this.pos_x=0,this.pos_y=0,this.mouse_x=0,this.mouse_y=0,this.zoom=1,this.zoom_last_value=1,this.precanvas.style.transform="",this.import(this.drawflow,!1)}removeModule(t){this.module===t&&this.changeModule("Home"),delete this.drawflow.drawflow[t],this.dispatch("moduleRemoved",t)}clearModuleSelected(){this.precanvas.innerHTML="",this.drawflow.drawflow[this.module]={data:{}}}clear(){this.precanvas.innerHTML="",this.drawflow={drawflow:{Home:{data:{}}}}}export(){const t=JSON.parse(JSON.stringify(this.drawflow));return this.dispatch("export",t),t}import(t,e=!0){this.clear(),this.drawflow=JSON.parse(JSON.stringify(t)),this.load(),e&&this.dispatch("import","import")}on(t,e){return"function"!=typeof e?(console.error("The listener callback must be a function, the given type is "+typeof e),!1):"string"!=typeof t?(console.error("The event name must be a string, the given type is "+typeof t),!1):(void 0===this.events[t]&&(this.events[t]={listeners:[]}),void this.events[t].listeners.push(e))}removeListener(t,e){if(!this.events[t])return!1;const n=this.events[t].listeners,i=n.indexOf(e);i>-1&&n.splice(i,1)}dispatch(t,e){if(void 0===this.events[t])return!1;this.events[t].listeners.forEach((t=>{t(e)}))}getUuid(){for(var t=[],e=0;e<36;e++)t[e]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]="0123456789abcdef".substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}}}]).default},481:function(t,e){!function(t){var e="1.9.4";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function s(t){return"_leaflet_id"in t||(t._leaflet_id=++r),t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)},r}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function c(){return!1}function u(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function y(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function b(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var g="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function _(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var k=window.requestAnimationFrame||_("RequestAnimationFrame")||x,O=window.cancelAnimationFrame||_("CancelAnimationFrame")||_("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function j(t,e,n){if(!n||k!==x)return k.call(window,o(t,e));t.call(e)}function C(t){t&&O.call(window,t)}var E={__proto__:null,extend:n,create:i,bind:o,get lastId(){return r},stamp:s,throttle:a,wrapNum:l,falseFn:c,formatNum:u,trim:h,splitWords:d,setOptions:p,getParamString:f,template:y,isArray:v,indexOf:b,emptyImageUrl:g,requestFn:k,cancelFn:O,requestAnimFrame:j,cancelAnimFrame:C};function P(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}P.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&n(e,t.statics),t.includes&&(S(t.includes),n.apply(null,[r].concat(t.includes))),n(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?i(o.options):{},n(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},P.include=function(t){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},P.mergeOptions=function(t){return n(this.prototype.options,t),this},P.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var T={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=d(t);for(var o=1===arguments.length,r=0,s=t.length;r<s;r++)o?this._off(t[r]):this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var s=this._listens(t,e,n);if(!1!==s){var a=i[s];this._firingCount&&(a.fn=c,this._events[t]=i=i.slice()),i.splice(s,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,r=i.length;o<r;o++)i[o].fn=c;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s],c=l.fn;l.once&&this.off(t,c,l.ctx),c.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var r=this._events&&this._events[t];if(r&&r.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var s in this._eventParents)if(this._eventParents[s].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,r=i.length;o<r;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens;var A=P.extend(T);function R(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var B=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof R?t:v(t)?new R(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new R(t.x,t.y):new R(t,e,n)}function z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function M(t,e){return!t||t instanceof z?t:new z(t,e)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function D(t,e){return t instanceof N?t:new N(t,e)}function F(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function H(t,e,n){return t instanceof F?t:v(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new F(t,e,n)}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new R(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new R(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},z.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof R||"number"==typeof t[0]||"x"in t)e=n=I(t);else if(e=(t=M(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof R?I(t):M(t))instanceof z?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=M(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=M(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return M(I(e.x-i,e.y-o),I(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=M(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},N.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof F)e=t,n=t;else{if(!(t instanceof N))return t?this.extend(H(t)||D(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new F(e.lat,e.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new N(new F(e.lat-i,e.lng-o),new F(n.lat+i,n.lng+o))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof F||"lat"in t?H(t):D(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=D(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=D(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=D(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(t,e){return!!t&&(t=H(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return q.distance(this,H(t))},wrap:function(){return q.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return D([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var V,Z={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new z(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new F(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new N(new F(r.lat-i,r.lng-o),new F(s.lat-i,s.lng-o))}},q=n({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),U=6378137,W={R:U,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new R(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(V=U*Math.PI,new z([-V,-V],[V,V]))};function G(t,e,n,i){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function J(t,e,n,i){return new G(t,e,n,i)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new R((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var $=n({},q,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return J(t,.5,-t,.5)}()}),Y=n({},$,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var n,i,o,r,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?Nt.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=Mt("webkit"),rt=Mt("android"),st=Mt("android 2")||Mt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=rt&&Mt("Google")&&at<537&&!("AudioNode"in window),ct=!!window.opera,ut=!it&&Mt("chrome"),ht=Mt("gecko")&&!ot&&!ct&&!et,dt=!ut&&Mt("safari"),pt=Mt("phantom"),ft="OTransition"in tt,mt=0===navigator.platform.indexOf("Win"),yt=et&&"transition"in tt,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,bt="MozPerspective"in tt,gt=!window.L_DISABLE_3D&&(yt||vt||bt)&&!ft&&!pt,_t="undefined"!=typeof orientation||Mt("mobile"),wt=_t&&ot,xt=_t&&vt,kt=!window.PointerEvent&&window.MSPointerEvent,Ot=!(!window.PointerEvent&&!kt),jt="ontouchstart"in window||!!window.TouchEvent,Ct=!window.L_NO_TOUCH&&(jt||Ot),Et=_t&&ct,Pt=_t&&ht,Lt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,St=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),Tt=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!K("svg").createSVGRect),Rt=!!At&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Bt=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),It=0===navigator.platform.indexOf("Mac"),zt=0===navigator.platform.indexOf("Linux");function Mt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:et,ielt9:nt,edge:it,webkit:ot,android:rt,android23:st,androidStock:lt,opera:ct,chrome:ut,gecko:ht,safari:dt,phantom:pt,opera12:ft,win:mt,ie3d:yt,webkit3d:vt,gecko3d:bt,any3d:gt,mobile:_t,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:kt,pointer:Ot,touch:Ct,touchNative:jt,mobileOpera:Et,mobileGecko:Pt,retina:Lt,passiveEvents:St,canvas:Tt,svg:At,vml:Bt,inlineSvg:Rt,mac:It,linux:zt},Dt=Nt.msPointer?"MSPointerDown":"pointerdown",Ft=Nt.msPointer?"MSPointerMove":"pointermove",Ht=Nt.msPointer?"MSPointerUp":"pointerup",Vt=Nt.msPointer?"MSPointerCancel":"pointercancel",Zt={touchstart:Dt,touchmove:Ft,touchend:Ht,touchcancel:Vt},qt={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},Ut={},Wt=!1;function Gt(t,e,n){return"touchstart"===e&&Xt(),qt[e]?(n=qt[e].bind(this,n),t.addEventListener(Zt[e],n,!1),n):(console.warn("wrong event specified:",e),c)}function Jt(t,e,n){Zt[e]?t.removeEventListener(Zt[e],n,!1):console.warn("wrong event specified:",e)}function $t(t){Ut[t.pointerId]=t}function Yt(t){Ut[t.pointerId]&&(Ut[t.pointerId]=t)}function Kt(t){delete Ut[t.pointerId]}function Xt(){Wt||(document.addEventListener(Dt,$t,!0),document.addEventListener(Ft,Yt,!0),document.addEventListener(Ht,Kt,!0),document.addEventListener(Vt,Kt,!0),Wt=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Ut)e.touches.push(Ut[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&$e(e),Qt(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Ke(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var r=Date.now();r-i<=ne?2==++n&&e(ee(t)):n=1,i=r}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var re,se,ae,le,ce,ue=Ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),he=Ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===he||"OTransition"===he?he+"End":"transitionend";function pe(t){return"string"==typeof t?document.getElementById(t):t}function fe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function me(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ye(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function be(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function _e(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Oe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function we(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!_e(t,e)){var r=Oe(t);ke(t,(r?r+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):ke(t,h((" "+Oe(t)+" ").replace(" "+e+" "," ")))}function ke(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Oe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function je(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Ce(t,e)}function Ce(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function Ee(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Pe(t,e,n){var i=e||new R(0,0);t.style[ue]=(Nt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Le(t,e){t._leaflet_pos=e,Nt.any3d?Pe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Se(t){return t._leaflet_pos||new R(0,0)}if("onselectstart"in document)re=function(){De(window,"selectstart",$e)},se=function(){He(window,"selectstart",$e)};else{var Te=Ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);re=function(){if(Te){var t=document.documentElement.style;ae=t[Te],t[Te]="none"}},se=function(){Te&&(document.documentElement.style[Te]=ae,ae=void 0)}}function Ae(){De(window,"dragstart",$e)}function Re(){He(window,"dragstart",$e)}function Be(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),le=t,ce=t.style.outlineStyle,t.style.outlineStyle="none",De(window,"keydown",Ie))}function Ie(){le&&(le.style.outlineStyle=ce,le=void 0,ce=void 0,He(window,"keydown",Ie))}function ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Me(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={__proto__:null,TRANSFORM:ue,TRANSITION:he,TRANSITION_END:de,get:pe,getStyle:fe,create:me,remove:ye,empty:ve,toFront:be,toBack:ge,hasClass:_e,addClass:we,removeClass:xe,setClass:ke,getClass:Oe,setOpacity:je,testProp:Ee,setTransform:Pe,setPosition:Le,getPosition:Se,get disableTextSelection(){return re},get enableTextSelection(){return se},disableImageDrag:Ae,enableImageDrag:Re,preventOutline:Be,restoreOutline:Ie,getSizedParentNode:ze,getScale:Me};function De(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)qe(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)qe(t,e[r],n,i);return this}var Fe="_leaflet_events";function He(t,e,n,i){if(1===arguments.length)Ve(t),delete t[Fe];else if(e&&"object"==typeof e)for(var o in e)Ue(t,o,e[o],n);else if(e=d(e),2===arguments.length)Ve(t,(function(t){return-1!==b(e,t)}));else for(var r=0,s=e.length;r<s;r++)Ue(t,e[r],n,i);return this}function Ve(t,e){for(var n in t[Fe]){var i=n.split(/\d/)[0];e&&!e(i)||Ue(t,i,null,null,n)}}var Ze={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function qe(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[Fe]&&t[Fe][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?r=Gt(t,e,r):Nt.touch&&"dblclick"===e?r=ie(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ze[e]||e,r,!!Nt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,en(t,e)&&a(e)},t.addEventListener(Ze[e],r,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,r),t[Fe]=t[Fe]||{},t[Fe][o]=r}function Ue(t,e,n,i,o){o=o||e+s(n)+(i?"_"+s(i):"");var r=t[Fe]&&t[Fe][o];if(!r)return this;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?Jt(t,e,r):Nt.touch&&"dblclick"===e?oe(t,r):"removeEventListener"in t?t.removeEventListener(Ze[e]||e,r,!1):t.detachEvent("on"+e,r),t[Fe][o]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ge(t){return qe(t,"wheel",We),this}function Je(t){return De(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function $e(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return $e(t),We(t),this}function Ke(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Xe(t,e){if(!e)return new R(t.clientX,t.clientY);var n=Me(e),i=n.boundingClientRect;return new R((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Qe=Nt.linux&&Nt.chrome?window.devicePixelRatio:Nt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Nt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:De,off:He,stopPropagation:We,disableScrollPropagation:Ge,disableClickPropagation:Je,preventDefault:$e,stop:Ye,getPropagationPath:Ke,getMousePosition:Xe,getWheelDelta:tn,isExternalTarget:en,addListener:De,removeListener:He},on=A.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Se(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=j(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Le(this._el,n),this.fire("step")},_complete:function(){C(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),rn=A.extend({options:{crs:$,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(H(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=he&&Nt.any3d&&!Nt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),De(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(H(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof R?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():D(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=D(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new on,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){we(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Nt.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=H(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),c=o.distanceTo(i)||1,u=1.42,h=u*u;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*c*c)/(2*(t?l:a)*h*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return p(t)/f(t)}var y=d(0);function v(t){return a*(f(y)/f(y+u*t))}function b(t){return a*(f(y)*m(y+u*t)-p(y))/h}function g(t){return 1-Math.pow(1-t,1.5)}var _=Date.now(),w=(d(1)-y)/u,x=n.duration?1e3*n.duration:1e3*w*.8;function k(){var n=(Date.now()-_)/x,r=g(n)*w;n<=1?(this._flyToFrame=j(k,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(b(r)/c)),s),this.getScaleZoom(a/v(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),k.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=D(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,D(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),s=this.getPixelBounds(),a=M([s.min.add(n),s.max.subtract(i)]),l=a.getSize();if(!a.contains(r)){this._enforcingBounds=!0;var c=r.subtract(a.getCenter()),u=a.extend(r).getSize().subtract(l);o.x+=c.x<0?-u.x:u.x,o.y+=c.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new F(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ye(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ye(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=me("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=D(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=M(this.project(a,i),this.project(s,i)).getSize(),u=Nt.any3d?this.options.zoomSnap:1,h=l.x/c.x,d=l.y/c.y,p=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(p,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(H(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(H(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(D(t))},distance:function(t,e){return this.options.crs.distance(H(t),H(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(t)))},mouseEventToContainerPoint:function(t){return Xe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=pe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");De(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Nt.any3d,we(t,"leaflet-container"+(Nt.touch?" leaflet-touch":"")+(Nt.retina?" leaflet-retina":"")+(Nt.ielt9?" leaflet-oldie":"")+(Nt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Le(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Le(this._mapPane,new R(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Le(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?He:De;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Nt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=j((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!en(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Be(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var r=this._findEventTargets(t,e);if(i){for(var s=[],a=0;a<i.length;a++)i[a].listens(e,!0)&&s.push(i[a]);r=s.concat(r)}if(r.length){"contextmenu"===e&&$e(t);var l=r[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=u?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(a=0;a<r.length;a++)if(r[a].fire(e,c,!0),c.originalEvent._stopped||!1===r[a].options.bubblingMouseEvents&&-1!==b(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Se(this._mapPane)||new R(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return M([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new z(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new z(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=M(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new R(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Nt.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=me("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ue,n=this._proxy.style[e];Pe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ye(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Pe(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(j((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function sn(t,e){return new rn(t,e)}var an=P.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return we(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ye(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ln=function(t){return new an(t)};rn.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=me("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=me("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ye(this._controlCorners[t]);ye(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var cn=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return an.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){we(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=me("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Je(e),Ge(e);var i=this._section=me("section",t+"-list");n&&(this._map.on("click",this.collapse,this),De(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=me("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),De(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){$e(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=me("div",t+"-base",i),this._separator=me("div",t+"-separator",i),this._overlaysList=me("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ve(this._baseLayersList),ve(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),De(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,De(t,"click",$e),this.expand();var e=this;setTimeout((function(){He(t,"click",$e),e._preventClick=!1}))}}),un=function(t,e,n){return new cn(t,e,n)},hn=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=me("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=me("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Je(r),De(r,"click",Ye),De(r,"click",o,this),De(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});rn.mergeOptions({zoomControl:!0}),rn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))}));var dn=function(t){return new hn(t)},pn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=me("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=me("div",e,n)),t.imperial&&(this._iScale=me("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),fn=function(t){return new pn(t)},mn='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',yn=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Nt.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=me("div","leaflet-control-attribution"),Je(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});rn.mergeOptions({attributionControl:!0}),rn.addInitHook((function(){this.options.attributionControl&&(new yn).addTo(this)}));var vn=function(t){return new yn(t)};an.Layers=cn,an.Zoom=hn,an.Scale=pn,an.Attribution=yn,ln.layers=un,ln.zoom=dn,ln.scale=fn,ln.attribution=vn;var bn=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});bn.addTo=function(t,e){return t.addHandler(e,this),this};var gn={Events:T},_n=Nt.touch?"touchstart mousedown":"mousedown",wn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(De(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wn._dragging===this&&this.finishDrag(!0),He(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!_e(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)wn._dragging===this&&this.finishDrag();else if(!(wn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(wn._dragging=this,this._preventOutline&&Be(this._element),Ae(),re(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=ze(this._element);this._startPoint=new R(e.clientX,e.clientY),this._startPos=Se(this._element),this._parentScale=Me(n);var i="mousedown"===t.type;De(document,i?"mousemove":"touchmove",this._onMove,this),De(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new R(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,$e(t),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Le(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),He(document,"mousemove touchmove",this._onMove,this),He(document,"mouseup touchend touchcancel",this._onUp,this),Re(),se();var e=this._moved&&this._moving;this._moving=!1,wn._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function xn(t,e,n){var i,o,r,s,a,l,c,u,h,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=In(t[o],e);for(s=0;s<4;s++){for(u=d[s],i=[],o=0,r=(c=t.length)-1;o<c;r=o++)a=t[o],l=t[r],a._code&u?l._code&u||((h=Bn(l,a,u,e,n))._code=In(h,e),i.push(h)):(l._code&u&&((h=Bn(l,a,u,e,n))._code=In(h,e),i.push(h)),i.push(a));t=i}return t}function kn(t,e){var n,i,o,r,s,a,l,c,u;if(!t||0===t.length)throw new Error("latlngs not passed");Nn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=H([0,0]),d=D(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=On(t));var p=t.length,f=[];for(n=0;n<p;n++){var m=H(t[n]);f.push(e.project(H([m.lat-h.lat,m.lng-h.lng])))}for(a=l=c=0,n=0,i=p-1;n<p;i=n++)o=f[n],r=f[i],s=o.y*r.x-r.y*o.x,l+=(o.x+r.x)*s,c+=(o.y+r.y)*s,a+=3*s;u=0===a?f[0]:[l/a,c/a];var y=e.unproject(I(u));return H([y.lat+h.lat,y.lng+h.lng])}function On(t){for(var e=0,n=0,i=0,o=0;o<t.length;o++){var r=H(t[o]);e+=r.lat,n+=r.lng,i++}return H([e/i,n/i])}var jn,Cn={__proto__:null,clipPolygon:xn,polygonCenter:kn,centroid:On};function En(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Sn(t=An(t,n),n)}function Pn(t,e,n){return Math.sqrt(Mn(t,e,n,!0))}function Ln(t,e,n){return Mn(t,e,n)}function Sn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Tn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Tn(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=Mn(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,Tn(t,e,n,i,r),Tn(t,e,n,r,o))}function An(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)zn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function Rn(t,e,n,i,o){var r,s,a,l=i?jn:In(t,n),c=In(e,n);for(jn=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=In(s=Bn(t,e,r=l||c,n,o),n),r===l?(t=s,l=a):(e=s,c=a)}}function Bn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,c=i.min,u=i.max;return 8&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):4&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):2&n?(r=u.x,s=t.y+l*(u.x-t.x)/a):1&n&&(r=c.x,s=t.y+l*(c.x-t.x)/a),new R(r,s,o)}function In(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function zn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Mn(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,c=a*a+l*l;return c>0&&((o=((t.x-r)*a+(t.y-s)*l)/c)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new R(r,s)}function Nn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Nn(t)}function Fn(t,e){var n,i,o,r,s,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");Nn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=H([0,0]),h=D(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(u=On(t));var d=t.length,p=[];for(n=0;n<d;n++){var f=H(t[n]);p.push(e.project(H([f.lat-u.lat,f.lng-u.lng])))}for(n=0,i=0;n<d-1;n++)i+=p[n].distanceTo(p[n+1])/2;if(0===i)c=p[0];else for(n=0,r=0;n<d-1;n++)if(s=p[n],a=p[n+1],(r+=o=s.distanceTo(a))>i){l=(r-i)/o,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var m=e.unproject(I(c));return H([m.lat+u.lat,m.lng+u.lng])}var Hn={__proto__:null,simplify:En,pointToSegmentDistance:Pn,closestPointOnSegment:Ln,clipSegment:Rn,_getEdgeIntersection:Bn,_getBitCode:In,_sqClosestPointOnSegment:Mn,isFlat:Nn,_flat:Dn,polylineCenter:Fn},Vn={project:function(t){return new R(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new z([-180,-90],[180,90])},Zn={R:6378137,R_MINOR:6356752.314245179,bounds:new z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new R(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=c=Math.PI/2-2*Math.atan(s*e)-a;return new F(a*n,t.x*n/i)}},qn={__proto__:null,LonLat:Vn,Mercator:Zn,SphericalMercator:W},Un=n({},q,{code:"EPSG:3395",projection:Zn,transformation:function(){var t=.5/(Math.PI*Zn.R);return J(t,.5,-t,.5)}()}),Wn=n({},q,{code:"EPSG:4326",projection:Vn,transformation:J(1/180,1,-1/180,.5)}),Gn=n({},Z,{projection:Vn,transformation:J(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});Z.Earth=q,Z.EPSG3395=Un,Z.EPSG3857=$,Z.EPSG900913=Y,Z.EPSG4326=Wn,Z.Simple=Gn;var Jn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});rn.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var $n=Jn.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),Yn=function(t,e){return new $n(t,e)},Kn=$n.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),$n.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),$n.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Xn=function(t,e){return new Kn(t,e)},Qn=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=I(i),r=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Nt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ti(t){return new Qn(t)}var ei=Qn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ei.imagePath&&(ei.imagePath=this._detectIconPath()),(this.options.imagePath||ei.imagePath)+Qn.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=me("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=bn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new wn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Se(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=M(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var c=I((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),Le(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=j(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(C(this._panRequest),this._panRequest=j(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Se(e._icon),o=e._map.layerPointToLatLng(i);n&&Le(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){C(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ii=Jn.extend({options:{icon:new ei,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=H(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=H(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),we(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&De(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(we(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&He(this._icon,"focus",this._panOnFocus,this),ye(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ye(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Le(this._icon,t),this._shadow&&Le(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&je(this._icon,t),this._shadow&&je(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?I(e.iconSize):I(0,0),i=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function oi(t,e){return new ii(t,e)}var ri=Jn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),si=ri.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=H(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ri.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new z(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ai(t,e){return new si(t,e)}var li=si.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=H(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ri.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===q.distance){var o=Math.PI/180,r=this._mRadius/q.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),c=n.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([c,t-u]).x,this._radiusY=l.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function ci(t,e,n){return new li(t,e,n)}var ui=ri.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=Mn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],c=1,u=l.length;c<u;c++){var h=r(t,e=l[c-1],n=l[c],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Fn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=H(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Nn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Nn(t),i=0,o=t.length;i<o;i++)n?(e[i]=H(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new R(t,t);this._rawPxBounds&&(this._pxBounds=new z([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof F,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=Rn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=En(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&Pn(t,a[o],a[i])<=l)return!0;return!1}});function hi(t,e){return new ui(t,e)}ui._flat=Dn;var di=ui.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return kn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ui.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof F&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ui.prototype._setLatLngs.call(this,t),Nn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Nn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new R(e,e);if(t=new z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=xn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||ui.prototype._containsPoint.call(this,t,!0)}});function pi(t,e){return new di(t,e)}var fi=Kn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=v(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=mi(t,r);return s?(s.feature=xi(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function mi(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],c=e&&e.pointToLayer,u=e&&e.coordsToLatLng||vi;if(!a&&!s)return null;switch(s.type){case"Point":return yi(c,t,n=u(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=u(a[o]),l.push(yi(c,t,n,e));return new Kn(l);case"LineString":case"MultiLineString":return i=bi(a,"LineString"===s.type?0:1,u),new ui(i,e);case"Polygon":case"MultiPolygon":return i=bi(a,"Polygon"===s.type?1:2,u),new di(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=mi({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Kn(l);case"FeatureCollection":for(o=0,r=s.features.length;o<r;o++){var d=mi(s.features[o],e);d&&l.push(d)}return new Kn(l);default:throw new Error("Invalid GeoJSON object.")}}function yi(t,e,n,i){return t?t(e,n):new ii(n,i&&i.markersInheritOptions&&i)}function vi(t){return new F(t[1],t[0],t[2])}function bi(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?bi(t[r],e-1,n):(n||vi)(t[r]),o.push(i);return o}function gi(t,e){return void 0!==(t=H(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function _i(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?_i(t[r],Nn(t[r])?0:e-1,n,i):gi(t[r],i));return!e&&n&&o.length>0&&o.push(o[0].slice()),o}function wi(t,e){return t.feature?n({},t.feature,{geometry:e}):xi(e)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ki={toGeoJSON:function(t){return wi(this,{type:"Point",coordinates:gi(this.getLatLng(),t)})}};function Oi(t,e){return new fi(t,e)}ii.include(ki),li.include(ki),si.include(ki),ui.include({toGeoJSON:function(t){var e=!Nn(this._latlngs);return wi(this,{type:(e?"Multi":"")+"LineString",coordinates:_i(this._latlngs,e?1:0,!1,t)})}}),di.include({toGeoJSON:function(t){var e=!Nn(this._latlngs),n=e&&!Nn(this._latlngs[0]),i=_i(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),wi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),$n.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),wi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=xi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?wi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var ji=Oi,Ci=Jn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=D(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ye(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&be(this._image),this},bringToBack:function(){return this._map&&ge(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=D(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:me("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Pe(this._image,n,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Le(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){je(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ei=function(t,e,n){return new Ci(t,e,n)},Pi=Ci.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:me("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var a=me("source");a.src=this._url[s],e.appendChild(a)}}}});function Li(t,e,n){return new Pi(t,e,n)}var Si=Ci.extend({_initImage:function(){var t=this._image=this._url;we(t,"leaflet-image-layer"),this._zoomAnimated&&we(t,"leaflet-zoom-animated"),this.options.className&&we(t,this.options.className),t.onselectstart=c,t.onmousemove=c}});function Ti(t,e,n){return new Si(t,e,n)}var Ai=Jn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof F||v(t))?(this._latlng=H(t),p(this,e)):(p(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&je(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&je(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(je(this._container,0),this._removeTimeout=setTimeout(o(ye,void 0,this._container),200)):ye(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&be(this._container),this},bringToBack:function(){return this._map&&ge(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Kn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?Le(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});rn.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),Jn.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(p(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var Ri=Ai.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ai.prototype.openOn.call(this,t)},onAdd:function(t){Ai.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ri||this._source.on("preclick",We))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ri||this._source.off("preclick",We))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=me("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=me("div",t+"-content-wrapper",e);if(this._contentNode=me("div",t+"-content",n),Je(e),Ge(this._contentNode),De(e,"contextmenu",We),this._tipContainer=me("div",t+"-tip-container",e),this._tip=me("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=me("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',De(i,"click",(function(t){$e(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",we(t,r)):xe(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Le(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(fe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new R(this._containerLeft,-n-this._containerBottom);o._add(Se(this._container));var r=t.layerPointToContainerPoint(o),s=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||s),l=I(this.options.autoPanPaddingBottomRight||s),c=t.getSize(),u=0,h=0;r.x+i+l.x>c.x&&(u=r.x+i-c.x+l.x),r.x-u-a.x<0&&(u=r.x-a.x),r.y+n+l.y>c.y&&(h=r.y+n-c.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(u||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,h]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Bi=function(t,e){return new Ri(t,e)};rn.mergeOptions({closePopupOnClick:!0}),rn.include({openPopup:function(t,e,n){return this._initOverlay(Ri,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Jn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ri,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Kn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof ri?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ii=Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=me("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,u=I(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):s.x<r.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(u.x+h.x),n=c/2),t=t.subtract(I(e,n,!0)).add(u).add(h),xe(o,"leaflet-tooltip-right"),xe(o,"leaflet-tooltip-left"),xe(o,"leaflet-tooltip-top"),xe(o,"leaflet-tooltip-bottom"),we(o,"leaflet-tooltip-"+a),Le(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&je(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zi=function(t,e){return new Ii(t,e)};rn.include({openTooltip:function(t,e,n){return this._initOverlay(Ii,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Jn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ii,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Kn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(De(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),De(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Mi=Qn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(ve(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Ni(t){return new Mi(t)}Qn.Default=ei;var Di=Jn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Nt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ye(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(be(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ge(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof R?t:new R(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Nt.ielt9){je(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);je(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(C(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=me("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ye(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=me("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),c(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ye(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new R(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new R(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Nt.any3d?Pe(t.el,o,i):Le(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new z(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,l=new z(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var u=this._tiles[c].coords;u.z===this._tileZoom&&l.contains(new R(u.x,u.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var p=new R(d,h);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return D(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new N(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new R(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ye(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,Nt.ielt9&&this.options.opacity<1&&je(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&j(o(this._tileReady,this,t,null,r)),Le(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(je(n.el,0),C(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(we(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Nt.ielt9||!this._map._fadeAnimated?j(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new R(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Fi(t){return new Di(t)}var Hi=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Nt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return De(n,"load",o(this._tileOnLoad,this,e,n)),De(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Nt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return y(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Nt.ielt9?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,!e.complete)){e.src=g;var n=this._tiles[t].coords;ye(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",g),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==g))return Di.prototype._tileReady.call(this,t,e,n)}});function Vi(t,e){return new Hi(t,e)}var Zi=Hi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=p(this,e)).detectRetina&&Nt.retina?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Hi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=M(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===Wn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Hi.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function qi(t,e){return new Zi(t,e)}Hi.WMS=Zi,Vi.wms=qi;var Ui=Jn.extend({options:{padding:.1},initialize:function(t){p(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Nt.any3d?Pe(this._container,r,n):Le(this._container,r)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wi=Ui.extend({options:{tolerance:0},getEvents:function(){var t=Ui.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ui.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");De(t,"mousemove",this._onMouseMove,this),De(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),De(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){C(this._redrawRequest),delete this._ctx,ye(this._container),He(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ui.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Nt.retina?2:1;Le(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Nt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ui.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||j(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new z,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(we(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Gi(t){return Nt.canvas?new Wi(t):null}var Ji=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$i={_initContainer:function(){this._container=me("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ui.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Ji("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Ji("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ye(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Ji("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Ji("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){be(t._container)},_bringToBack:function(t){ge(t._container)}},Yi=Nt.vml?Ji:K,Ki=Ui.extend({_initContainer:function(){this._container=Yi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ye(this._container),He(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ui.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Le(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Yi("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ye(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){be(t._path)},_bringToBack:function(t){ge(t._path)}});function Xi(t){return Nt.svg||Nt.vml?new Ki(t):null}Nt.vml&&Ki.include($i),rn.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Gi(t)||Xi(t)}});var Qi=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=D(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function to(t,e){return new Qi(t,e)}Ki.create=Yi,Ki.pointsToPath=X,fi.geometryToLayer=mi,fi.coordsToLatLng=vi,fi.coordsToLatLngs=bi,fi.latLngToCoords=gi,fi.latLngsToCoords=_i,fi.getFeature=wi,fi.asFeature=xi,rn.mergeOptions({boxZoom:!0});var eo=bn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){De(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){He(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ye(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Ae(),this._startPoint=this._map.mouseEventToContainerPoint(t),De(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=me("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),n=e.getSize();Le(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ye(this._box),xe(this._container,"leaflet-crosshair")),se(),Re(),He(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});rn.addInitHook("addHandler","boxZoom",eo),rn.mergeOptions({doubleClickZoom:!0});var no=bn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});rn.addInitHook("addHandler","doubleClickZoom",no),rn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var io=bn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new wn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=D(this._map.options.maxBounds);this._offsetLimit=M(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),u=a.multiplyBy(c/l),h=c/(n.inertiaDeceleration*s),d=u.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),j((function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});rn.addInitHook("addHandler","dragging",io),rn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=bn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),De(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),He(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){De(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){He(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(I(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ye(t)}}});rn.addInitHook("addHandler","keyboard",oo),rn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ro=bn.extend({addHooks:function(){De(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){He(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});rn.addInitHook("addHandler","scrollWheelZoom",ro);var so=600;rn.mergeOptions({tapHold:Nt.touchNative&&Nt.safari&&Nt.mobile,tapTolerance:15});var ao=bn.extend({addHooks:function(){De(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){He(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new R(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(De(document,"touchend",$e),De(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),so),De(document,"touchend touchcancel contextmenu",this._cancel,this),De(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){He(document,"touchend",$e),He(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),He(document,"touchend touchcancel contextmenu",this._cancel,this),He(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new R(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});rn.addInitHook("addHandler","tapHold",ao),rn.mergeOptions({touchZoom:Nt.touch,bounceAtZoomLimits:!0});var lo=bn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),De(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),He(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),De(document,"touchmove",this._onTouchMove,this),De(document,"touchend touchcancel",this._onTouchEnd,this),$e(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),C(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=j(a,this,!0),$e(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,C(this._animRequest),He(document,"touchmove",this._onTouchMove,this),He(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});rn.addInitHook("addHandler","touchZoom",lo),rn.BoxZoom=eo,rn.DoubleClickZoom=no,rn.Drag=io,rn.Keyboard=oo,rn.ScrollWheelZoom=ro,rn.TapHold=ao,rn.TouchZoom=lo,t.Bounds=z,t.Browser=Nt,t.CRS=Z,t.Canvas=Wi,t.Circle=li,t.CircleMarker=si,t.Class=P,t.Control=an,t.DivIcon=Mi,t.DivOverlay=Ai,t.DomEvent=nn,t.DomUtil=Ne,t.Draggable=wn,t.Evented=A,t.FeatureGroup=Kn,t.GeoJSON=fi,t.GridLayer=Di,t.Handler=bn,t.Icon=Qn,t.ImageOverlay=Ci,t.LatLng=F,t.LatLngBounds=N,t.Layer=Jn,t.LayerGroup=$n,t.LineUtil=Hn,t.Map=rn,t.Marker=ii,t.Mixin=gn,t.Path=ri,t.Point=R,t.PolyUtil=Cn,t.Polygon=di,t.Polyline=ui,t.Popup=Ri,t.PosAnimation=on,t.Projection=qn,t.Rectangle=Qi,t.Renderer=Ui,t.SVG=Ki,t.SVGOverlay=Si,t.TileLayer=Hi,t.Tooltip=Ii,t.Transformation=G,t.Util=E,t.VideoOverlay=Pi,t.bind=o,t.bounds=M,t.canvas=Gi,t.circle=ci,t.circleMarker=ai,t.control=ln,t.divIcon=Ni,t.extend=n,t.featureGroup=Xn,t.geoJSON=Oi,t.geoJson=ji,t.gridLayer=Fi,t.icon=ti,t.imageOverlay=Ei,t.latLng=H,t.latLngBounds=D,t.layerGroup=Yn,t.map=sn,t.marker=oi,t.point=I,t.polygon=pi,t.polyline=hi,t.popup=Bi,t.rectangle=to,t.setOptions=p,t.stamp=s,t.svg=Xi,t.svgOverlay=Ti,t.tileLayer=Vi,t.tooltip=zi,t.transformation=J,t.version=e,t.videoOverlay=Li;var co=window.L;t.noConflict=function(){return window.L=co,this},window.L=t}(e)},72:t=>{var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var r={},s=[],a=0;a<t.length;a++){var l=t[a],c=i.base?l[0]+i.base:l[0],u=r[c]||0,h="".concat(c," ").concat(u);r[c]=u+1;var d=n(h),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=o(p,i);i.byIndex=a,e.splice(a,0,{identifier:h,updater:f,references:1})}s.push(h)}return s}function o(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var r=i(t=t||[],o=o||{});return function(t){t=t||[];for(var s=0;s<r.length;s++){var a=n(r[s]);e[a].references--}for(var l=i(t,o),c=0;c<r.length;c++){var u=n(r[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=l}}},659:t=>{var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},426:(t,e,n)=>{t.exports=n.p+"images/layers-2x.png"},982:(t,e,n)=>{t.exports=n.p+"images/layers.png"},272:(t,e,n)=>{t.exports=n.p+"images/marker-icon-2x.png"},927:(t,e,n)=>{t.exports=n.p+"images/marker-icon.png"},980:(t,e,n)=>{t.exports=n.p+"images/marker-shadow.png"}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;if("string"==typeof import.meta.url&&(t=import.meta.url),!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href,n.nc=void 0;var i={};n.d(i,{AU:()=>tt,Zx:()=>z,J3:()=>W});var o=n(692),r=n(481),s=n.n(r),a=n(72),l=n.n(a),c=n(825),u=n.n(c),h=n(659),d=n.n(h),p=n(56),f=n.n(p),m=n(540),y=n.n(m),v=n(113),b=n.n(v),g=n(81),_={};_.styleTagTransform=b(),_.setAttributes=f(),_.insert=d().bind(null,"head"),_.domAPI=u(),_.insertStyleElement=y();l()(g.A,_);g.A&&g.A.locals&&g.A.locals;function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function x(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function O(t,e,n){return e=C(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,j()?Reflect.construct(e,n||[],C(t).constructor):e.apply(t,n))}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function T(t,e,n){return(e=I(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,I(i.key),i)}}function B(t,e,n){return e&&R(t.prototype,e),n&&R(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function I(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=w(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}delete s().Icon.Default.prototype._getIconUrl,s().Icon.Default.mergeOptions({iconRetinaUrl:new URL(n(272),n.b).href,iconUrl:new URL(n(927),n.b).href,shadowUrl:new URL(n(980),n.b).href});var z=function(){return B((function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};A(this,t),this.container=e.contentContainer||e,this.schema=n,this.data=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){T(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},r),delete this.data._flags,this.callback=s,this.options=i,this.container.innerHTML="",Object.assign(this.container.style,{display:"flex",flexDirection:"column",padding:"20px",background:"#fdfdfd",borderRadius:"8px",border:"1px solid #ccc",minHeight:"400px",width:"100%",overflowX:"hidden",overflowY:"auto",gap:"10px"}),this.registerLeafletEditor(),this.registerEnumEditor(),o.JSONEditor.defaults.resolvers.unshift((function(t){if("leaflet-map"===t.format)return"leaflet-map"})),o.JSONEditor.defaults.resolvers.unshift((function(t){if("dynamicEnum"===t.format)return"dynamicEnum"})),this.createEditor()}),[{key:"registerEnumEditor",value:function(){o.JSONEditor.defaults.editors.dynamicEnum=function(){function t(){return A(this,t),O(this,t,arguments)}return E(t,o.JSONEditor.AbstractEditor),B(t,[{key:"build",value:function(){var t=this;if(this.schema.title){var e=document.createElement("label");e.textContent=this.schema.title,e.style.display="block",e.style.marginBottom="4px",this.container.appendChild(e)}this.select=document.createElement("select"),this.select.classList.add("form-control"),this.input=this.select,this.container.appendChild(this.select),this.setOptions(this.schema.options||[]),this.select.addEventListener("change",(function(){t.value=t.select.value,t.onChange(!0)})),this.register()}},{key:"setOptions",value:function(t){this.options=t,this.select.innerHTML="";var e,n=x(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,o=document.createElement("option");o.value=i.option_id,o.textContent=i.option_desc,this.select.appendChild(o)}}catch(t){n.e(t)}finally{n.f()}}},{key:"setValue",value:function(t){this.value=t,this.select.value=t,this.onChange(!0)}},{key:"refresh",value:function(){this.setOptions(this.options),this.select.value=this.value}},{key:"getValue",value:function(){return this.select.value}}])}()}},{key:"registerLeafletEditor",value:function(){o.JSONEditor.defaults.editors["leaflet-map"]=function(){function t(){return A(this,t),O(this,t,arguments)}return E(t,o.JSONEditor.AbstractEditor),B(t,[{key:"build",value:function(){var t,e=this;if(this.schema.title){var n=document.createElement("label");n.textContent=this.schema.title,n.style.display="block",n.style.marginBottom="4px",this.container.appendChild(n)}this.inputsDiv=document.createElement("div"),Object.assign(this.inputsDiv.style,{display:"flex",gap:"10px"}),this.latInput=document.createElement("input"),this.latInput.type="number",this.latInput.placeholder="Latitude",this.latInput.step="any",this.latInput.style.flex="1",this.inputsDiv.appendChild(this.latInput),this.lngInput=document.createElement("input"),this.lngInput.type="number",this.lngInput.placeholder="Longitude",this.lngInput.step="any",this.lngInput.style.flex="1",this.inputsDiv.appendChild(this.lngInput),this.container.appendChild(this.inputsDiv),this.mapDiv=document.createElement("div"),Object.assign(this.mapDiv.style,{flex:"1",width:"100%",minHeight:"300px",background:"#eee",border:"1px solid #ccc",borderRadius:"4px"}),this.container.appendChild(this.mapDiv),this.value=(null===(t=this.data)||void 0===t?void 0:t.location)||{lat:0,lng:0},this.latInput.addEventListener("input",(function(){return e.updateFromInputs()})),this.lngInput.addEventListener("input",(function(){return e.updateFromInputs()})),requestAnimationFrame((function(){return e.initMap()}))}},{key:"initMap",value:function(){var t=this;this.map||(this.map=s().map(this.mapDiv).setView([this.value.lat,this.value.lng],8),s().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors"}).addTo(this.map),this.marker=s().marker([this.value.lat,this.value.lng],{draggable:!0}).addTo(this.map),this.marker.on("dragend",(function(e){var n=e.target.getLatLng();t.setValue({lat:n.lat,lng:n.lng}),t.onChange(!0)})),setTimeout((function(){return t.map.invalidateSize()}),200),requestAnimationFrame((function(){return t.map.invalidateSize()})),this.ro=new ResizeObserver((function(){t.map&&t.map.invalidateSize()})),this.ro.observe(this.container))}},{key:"updateFromInputs",value:function(){var t=parseFloat(this.latInput.value)||0,e=parseFloat(this.lngInput.value)||0;this.setValue({lat:t,lng:e}),this.onChange(!0)}},{key:"setValue",value:function(t){t||(t={});var e="number"==typeof t.lat?t.lat:0,n="number"==typeof t.lng?t.lng:0;this.value={lat:e,lng:n},this.marker&&this.marker.setLatLng([e,n]),this.map&&this.map.panTo([e,n]),this.latInput&&(this.latInput.value=e.toFixed(6)),this.lngInput&&(this.lngInput.value=n.toFixed(6))}},{key:"getValue",value:function(){return this.value}}])}()}},{key:"createEditor",value:function(){var t,e=this;this.editor=new o.JSONEditor(this.container,{schema:this.schema,startval:this.cleanFlags(this.data),show_errors:"always",theme:"bootstrap4",disable_edit_json:!0,disable_collapse:!0,disable_properties:!0,prompt_before_delete:!1,object_layout:(null===(t=this.options)||void 0===t?void 0:t.object_layout)||"grid"});var n=document.createElement("button");n.type="button",n.textContent="Submit",Object.assign(n.style,{marginTop:"15px",backgroundColor:"#28a745",color:"#fff",borderRadius:"5px",padding:"10px 15px",border:"none",cursor:"pointer",fontWeight:"600"}),n.onclick=function(){var t=e.editor.getValue();e.callback(t),console.log("Form submitted:",t)},this.container.appendChild(n)}},{key:"setValue",value:function(t){var e=this.cleanFlags(t);this.data=e,this.editor.setValue(e)}},{key:"cleanFlags",value:function(t){if(!t||"object"!==w(t))return t;var e=Array.isArray(t)?[]:{};for(var n in t)"_flags"!==n&&(e[n]=this.cleanFlags(t[n]));return e}}])}(),M=n(782),N=n.n(M),D=n(861),F={};F.styleTagTransform=b(),F.setAttributes=f(),F.insert=d().bind(null,"head"),F.domAPI=u(),F.insertStyleElement=y();l()(D.A,F);D.A&&D.A.locals&&D.A.locals;function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function V(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Z(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function q(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,U(i.key),i)}}function U(t){var e=function(t,e){if("object"!=H(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=H(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==H(e)?e:e+""}var W=function(){return t=function t(e,n){var i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.contentContainer||e;var r=this.getLayout(this.w),s=(r.container,r.menu),a=r.workarea;this.menu=s,this.workarea=a,this.callback=o,this.id=null,this.enableDropEvents(),this.editor=new(N())(this.workarea),this.editor.start(),n&&this.loadSchema(n),this.addExportButton(),i&&Object.keys(i).length>0&&this.editor.import(i)},e=[{key:"loadSchema",value:function(t){var e,n=V(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.addOption(i.label,i.icon,i.type,i.inputs,i.outputs,i.html,i.data)}}catch(t){n.e(t)}finally{n.f()}}},{key:"setValue",value:function(t){if(t&&(this.id=t.id,this.editor.module,this.editor.clear(),t.object))try{this.editor.import(t.object)}catch(t){console.error("Error importing data into Drawflow:",t)}}},{key:"add",value:function(){this.editor.addNode("github",0,1,150,300,"github",{name:""},'<div><input type="text" df-name></div>')}},{key:"getLayout",value:function(t){var e=document.createElement("div");e.style.display="flex",e.style.width="100%",e.style.height="100%";var n=document.createElement("div");n.style.width="200px",n.style.height="100%",n.style.background="#eee",n.style.overflowY="auto";var i=document.createElement("div");return i.style.flex="1",i.style.height="100%",i.style.position="relative",i.style.overflow="auto",i.style.background="#f9f9f9",e.appendChild(n),e.appendChild(i),t.appendChild(e),{container:e,menu:n,workarea:i}}},{key:"addExportButton",value:function(){var t=this,e=document.createElement("button");e.textContent="SAVE",e.style.width="100%",e.style.padding="8px",e.style.cursor="pointer",e.style.border="none",e.style.background="#444",e.style.color="white",e.style.fontWeight="bold",e.onclick=function(){var e=t.editor.export();t.callback&&t.callback(e)},this.menu.appendChild(e)}},{key:"addOption",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.addMenuOption(this.menu,t,e,n,i,o,r,s)}},{key:"drag",value:function(t){var e=t.target;t.dataTransfer.setData("node",e.getAttribute("data-node")),t.dataTransfer.setData("inputs",e.getAttribute("data-inputs")),t.dataTransfer.setData("outputs",e.getAttribute("data-outputs")),t.dataTransfer.setData("html",e.getAttribute("data-html")),t.dataTransfer.setData("data",e.getAttribute("data-data"))}},{key:"dragOver",value:function(t){t.preventDefault()}},{key:"drop",value:function(t){t.preventDefault();var e=t.dataTransfer.getData("node"),n=parseInt(t.dataTransfer.getData("inputs")),i=parseInt(t.dataTransfer.getData("outputs")),o=t.dataTransfer.getData("html")||"<div>".concat(e,"</div>"),r=JSON.parse(t.dataTransfer.getData("data")||"{}"),s=t.clientX-this.workarea.getBoundingClientRect().left,a=t.clientY-this.workarea.getBoundingClientRect().top;this.editor.addNode(e,n,i,s,a,e,r,o)}},{key:"enableDropEvents",value:function(){var t=this;this.workarea.addEventListener("dragover",(function(e){return t.dragOver(e)})),this.workarea.addEventListener("drop",(function(e){return t.drop(e)}))}},{key:"addMenuOption",value:function(t,e,n,i,o,r,s,a){var l=this,c=document.createElement("div");if(c.className="drag-drawflow",c.setAttribute("draggable","true"),c.setAttribute("data-node",i),c.setAttribute("data-inputs",o),c.setAttribute("data-outputs",r),c.setAttribute("data-html",s),c.setAttribute("data-data",JSON.stringify(a)),c.ondragstart=function(t){return l.drag(t)},n){var u=document.createElement("i");u.className=n,c.appendChild(u)}var h=document.createElement("span");return h.textContent=" "+e,c.appendChild(h),c.style.cursor="grab",c.style.padding="8px",c.style.borderBottom="1px solid #ccc",t.appendChild(c),c}}],e&&q(t.prototype,e),n&&q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function $(t,e,n){return(e=Q(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return K(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function X(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Q(i.key),i)}}function Q(t){var e=function(t,e){if("object"!=G(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=G(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==G(e)?e:e+""}var tt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.raw=e,this.nodes=this.extractNodes(e)},e=[{key:"extractNodes",value:function(t){var e;return(null==t||null===(e=t.drawflow)||void 0===e||null===(e=e.Home)||void 0===e?void 0:e.data)||{}}},{key:"getNodesByLevel",value:function(t){return Object.values(this.nodes).filter((function(e){return e.data.level===t}))}},{key:"getChildren",value:function(t){var e,n=this;return((null===(e=t.outputs)||void 0===e||null===(e=e.output_1)||void 0===e?void 0:e.connections)||[]).map((function(t){return n.nodes[t.node]})).filter(Boolean)}},{key:"getLevel",value:function(t){var e=this;if(t<1)return[];if(1===t)return this.getNodesByLevel(1).map((function(t){return t.data.name}));var n,i=this.getNodesByLevel(t-1),o=this.getNodesByLevel(t),r=[],s=Y(i);try{var a=function(){var t=n.value,i=e.getFullPath(t).map((function(t){return t.data.name})).join(":"),s=o.filter((function(n){return e.getFullPath(n).includes(t)})).map((function(t){return t.data.name}));r.push($({},i,s))};for(s.s();!(n=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}return r}},{key:"getFullPath",value:function(t){for(var e=[t],n=t;;){var i=this.findParent(n);if(!i)break;e.unshift(i),n=i}return e}},{key:"findParent",value:function(t){var e=this;return Object.values(this.nodes).find((function(n){return e.getChildren(n).includes(t)}))}},{key:"getProducts",value:function(){var t=this;return Object.values(this.nodes).filter((function(t){var e;return"product"===(null===(e=t.data)||void 0===e?void 0:e.type)})).map((function(e){var n=t.getFullPath(e),i={id:e.id,name:e.data.name,sku:e.data.sku};return n.forEach((function(t){1===t.data.level&&(i.category=t.data.name),2===t.data.level&&(i.subcategory=t.data.name),3===t.data.level&&t!==e&&(i.subsubcategory=t.data.name)})),i}))}},{key:"getLevelByName",value:function(t){var e=this;return Object.values(this.nodes).filter((function(e){var n;return(null===(n=e.data)||void 0===n?void 0:n.type)===t})).map((function(t){var n,i=e.getFullPath(t),o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){$(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({id:t.id,name:t.data.name,type:t.data.type},t.data),r=Y(i);try{for(r.s();!(n=r.n()).done;){var s=n.value,a=s.data.level;1===a?o.category=s.data.name:2===a?o.subcategory=s.data.name:3===a&&s!==t&&(o.subsubcategory=s.data.name)}}catch(t){r.e(t)}finally{r.f()}return o}))}}],e&&X(t.prototype,e),n&&X(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),et=i.AU,nt=i.Zx,it=i.J3;export{et as TreeParser,nt as vi_Form,it as vi_TreeForm};
2
+ var t={692:t=>{var e;self,e=()=>(()=>{var t={9306:(t,e,n)=>{var i=n(4901),o=n(6823),r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not a function")}},5548:(t,e,n)=>{var i=n(3517),o=n(6823),r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not a constructor")}},3506:(t,e,n)=>{var i=n(3925),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r("Can't set "+o(t)+" as a prototype")}},6469:(t,e,n)=>{var i=n(8227),o=n(2360),r=n(4913).f,s=i("unscopables"),a=Array.prototype;void 0===a[s]&&r(a,s,{configurable:!0,value:o(null)}),t.exports=function(t){a[s][t]=!0}},7829:(t,e,n)=>{var i=n(8183).charAt;t.exports=function(t,e,n){return e+(n?i(t,e).length:1)}},679:(t,e,n)=>{var i=n(1625),o=TypeError;t.exports=function(t,e){if(i(e,t))return t;throw new o("Incorrect invocation")}},8551:(t,e,n)=>{var i=n(34),o=String,r=TypeError;t.exports=function(t){if(i(t))return t;throw new r(o(t)+" is not an object")}},235:(t,e,n)=>{var i=n(9213).forEach,o=n(4598)("forEach");t.exports=o?[].forEach:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}},7916:(t,e,n)=>{var i=n(6080),o=n(9565),r=n(8981),s=n(6319),a=n(4209),l=n(3517),c=n(6198),u=n(4659),h=n(81),d=n(851),p=Array;t.exports=function(t){var e=r(t),n=l(this),f=arguments.length,m=f>1?arguments[1]:void 0,y=void 0!==m;y&&(m=i(m,f>2?arguments[2]:void 0));var v,b,g,_,w,x,k=d(e),O=0;if(!k||this===p&&a(k))for(v=c(e),b=n?new this(v):p(v);v>O;O++)x=y?m(e[O],O):e[O],u(b,O,x);else for(b=n?new this:[],w=(_=h(e,k)).next;!(g=o(w,_)).done;O++)x=y?s(_,m,[g.value,O],!0):g.value,u(b,O,x);return b.length=O,b}},9617:(t,e,n)=>{var i=n(5397),o=n(5610),r=n(6198),s=function(t){return function(e,n,s){var a=i(e),l=r(a);if(0===l)return!t&&-1;var c,u=o(s,l);if(t&&n!=n){for(;l>u;)if((c=a[u++])!=c)return!0}else for(;l>u;u++)if((t||u in a)&&a[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:s(!0),indexOf:s(!1)}},9213:(t,e,n)=>{var i=n(6080),o=n(9504),r=n(7055),s=n(8981),a=n(6198),l=n(1469),c=o([].push),u=function(t){var e=1===t,n=2===t,o=3===t,u=4===t,h=6===t,d=7===t,p=5===t||h;return function(f,m,y,v){for(var b,g,_=s(f),w=r(_),x=a(w),k=i(m,y),O=0,j=v||l,C=e?j(f,x):n||d?j(f,0):void 0;x>O;O++)if((p||O in w)&&(g=k(b=w[O],O,_),t))if(e)C[O]=g;else if(g)switch(t){case 3:return!0;case 5:return b;case 6:return O;case 2:c(C,b)}else switch(t){case 4:return!1;case 7:c(C,b)}return h?-1:o||u?u:C}};t.exports={forEach:u(0),map:u(1),filter:u(2),some:u(3),every:u(4),find:u(5),findIndex:u(6),filterReject:u(7)}},597:(t,e,n)=>{var i=n(9039),o=n(8227),r=n(7388),s=o("species");t.exports=function(t){return r>=51||!i((function(){var e=[];return(e.constructor={})[s]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},4598:(t,e,n)=>{var i=n(9039);t.exports=function(t,e){var n=[][t];return!!n&&i((function(){n.call(null,e||function(){return 1},1)}))}},926:(t,e,n)=>{var i=n(9306),o=n(8981),r=n(7055),s=n(6198),a=TypeError,l="Reduce of empty array with no initial value",c=function(t){return function(e,n,c,u){var h=o(e),d=r(h),p=s(h);if(i(n),0===p&&c<2)throw new a(l);var f=t?p-1:0,m=t?-1:1;if(c<2)for(;;){if(f in d){u=d[f],f+=m;break}if(f+=m,t?f<0:p<=f)throw new a(l)}for(;t?f>=0:p>f;f+=m)f in d&&(u=n(u,d[f],f,h));return u}};t.exports={left:c(!1),right:c(!0)}},4527:(t,e,n)=>{var i=n(3724),o=n(4376),r=TypeError,s=Object.getOwnPropertyDescriptor,a=i&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(t){return t instanceof TypeError}}();t.exports=a?function(t,e){if(o(t)&&!s(t,"length").writable)throw new r("Cannot set read only .length");return t.length=e}:function(t,e){return t.length=e}},7680:(t,e,n)=>{var i=n(9504);t.exports=i([].slice)},4488:(t,e,n)=>{var i=n(7680),o=Math.floor,r=function(t,e){var n=t.length;if(n<8)for(var s,a,l=1;l<n;){for(a=l,s=t[l];a&&e(t[a-1],s)>0;)t[a]=t[--a];a!==l++&&(t[a]=s)}else for(var c=o(n/2),u=r(i(t,0,c),e),h=r(i(t,c),e),d=u.length,p=h.length,f=0,m=0;f<d||m<p;)t[f+m]=f<d&&m<p?e(u[f],h[m])<=0?u[f++]:h[m++]:f<d?u[f++]:h[m++];return t};t.exports=r},7433:(t,e,n)=>{var i=n(4376),o=n(3517),r=n(34),s=n(8227)("species"),a=Array;t.exports=function(t){var e;return i(t)&&(e=t.constructor,(o(e)&&(e===a||i(e.prototype))||r(e)&&null===(e=e[s]))&&(e=void 0)),void 0===e?a:e}},1469:(t,e,n)=>{var i=n(7433);t.exports=function(t,e){return new(i(t))(0===e?0:e)}},6319:(t,e,n)=>{var i=n(8551),o=n(9539);t.exports=function(t,e,n,r){try{return r?e(i(n)[0],n[1]):e(n)}catch(e){o(t,"throw",e)}}},4428:(t,e,n)=>{var i=n(8227)("iterator"),o=!1;try{var r=0,s={next:function(){return{done:!!r++}},return:function(){o=!0}};s[i]=function(){return this},Array.from(s,(function(){throw 2}))}catch(t){}t.exports=function(t,e){try{if(!e&&!o)return!1}catch(t){return!1}var n=!1;try{var r={};r[i]=function(){return{next:function(){return{done:n=!0}}}},t(r)}catch(t){}return n}},4576:(t,e,n)=>{var i=n(9504),o=i({}.toString),r=i("".slice);t.exports=function(t){return r(o(t),8,-1)}},6955:(t,e,n)=>{var i=n(2140),o=n(4901),r=n(4576),s=n(8227)("toStringTag"),a=Object,l="Arguments"===r(function(){return arguments}());t.exports=i?r:function(t){var e,n,i;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=a(t),s))?n:l?r(e):"Object"===(i=r(e))&&o(e.callee)?"Arguments":i}},7740:(t,e,n)=>{var i=n(9297),o=n(5031),r=n(7347),s=n(4913);t.exports=function(t,e,n){for(var a=o(e),l=s.f,c=r.f,u=0;u<a.length;u++){var h=a[u];i(t,h)||n&&i(n,h)||l(t,h,c(e,h))}}},1436:(t,e,n)=>{var i=n(8227)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[i]=!1,"/./"[t](e)}catch(t){}}return!1}},2211:(t,e,n)=>{var i=n(9039);t.exports=!i((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},2529:t=>{t.exports=function(t,e){return{value:t,done:e}}},6699:(t,e,n)=>{var i=n(3724),o=n(4913),r=n(6980);t.exports=i?function(t,e,n){return o.f(t,e,r(1,n))}:function(t,e,n){return t[e]=n,t}},6980:t=>{t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},4659:(t,e,n)=>{var i=n(3724),o=n(4913),r=n(6980);t.exports=function(t,e,n){i?o.f(t,e,r(0,n)):t[e]=n}},380:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(533).start,s=RangeError,a=isFinite,l=Math.abs,c=Date.prototype,u=c.toISOString,h=i(c.getTime),d=i(c.getUTCDate),p=i(c.getUTCFullYear),f=i(c.getUTCHours),m=i(c.getUTCMilliseconds),y=i(c.getUTCMinutes),v=i(c.getUTCMonth),b=i(c.getUTCSeconds);t.exports=o((function(){return"0385-07-25T07:06:39.999Z"!==u.call(new Date(-50000000000001))}))||!o((function(){u.call(new Date(NaN))}))?function(){if(!a(h(this)))throw new s("Invalid time value");var t=this,e=p(t),n=m(t),i=e<0?"-":e>9999?"+":"";return i+r(l(e),i?6:4,0)+"-"+r(v(t)+1,2,0)+"-"+r(d(t),2,0)+"T"+r(f(t),2,0)+":"+r(y(t),2,0)+":"+r(b(t),2,0)+"."+r(n,3,0)+"Z"}:u},3640:(t,e,n)=>{var i=n(8551),o=n(4270),r=TypeError;t.exports=function(t){if(i(this),"string"===t||"default"===t)t="string";else if("number"!==t)throw new r("Incorrect hint");return o(this,t)}},2106:(t,e,n)=>{var i=n(283),o=n(4913);t.exports=function(t,e,n){return n.get&&i(n.get,e,{getter:!0}),n.set&&i(n.set,e,{setter:!0}),o.f(t,e,n)}},6840:(t,e,n)=>{var i=n(4901),o=n(4913),r=n(283),s=n(9433);t.exports=function(t,e,n,a){a||(a={});var l=a.enumerable,c=void 0!==a.name?a.name:e;if(i(n)&&r(n,c,a),a.global)l?t[e]=n:s(e,n);else{try{a.unsafe?t[e]&&(l=!0):delete t[e]}catch(t){}l?t[e]=n:o.f(t,e,{value:n,enumerable:!1,configurable:!a.nonConfigurable,writable:!a.nonWritable})}return t}},9433:(t,e,n)=>{var i=n(4475),o=Object.defineProperty;t.exports=function(t,e){try{o(i,t,{value:e,configurable:!0,writable:!0})}catch(n){i[t]=e}return e}},4606:(t,e,n)=>{var i=n(6823),o=TypeError;t.exports=function(t,e){if(!delete t[e])throw new o("Cannot delete property "+i(e)+" of "+i(t))}},3724:(t,e,n)=>{var i=n(9039);t.exports=!i((function(){return 7!==Object.defineProperty({},1,{get:function(){return 7}})[1]}))},4055:(t,e,n)=>{var i=n(4475),o=n(34),r=i.document,s=o(r)&&o(r.createElement);t.exports=function(t){return s?r.createElement(t):{}}},6837:t=>{var e=TypeError;t.exports=function(t){if(t>9007199254740991)throw e("Maximum allowed index exceeded");return t}},7400:t=>{t.exports={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0}},9296:(t,e,n)=>{var i=n(4055)("span").classList,o=i&&i.constructor&&i.constructor.prototype;t.exports=o===Object.prototype?void 0:o},8834:(t,e,n)=>{var i=n(9392).match(/firefox\/(\d+)/i);t.exports=!!i&&+i[1]},7290:(t,e,n)=>{var i=n(516),o=n(9088);t.exports=!i&&!o&&"object"==typeof window&&"object"==typeof document},6763:t=>{t.exports="function"==typeof Bun&&Bun&&"string"==typeof Bun.version},516:t=>{t.exports="object"==typeof Deno&&Deno&&"object"==typeof Deno.version},3202:(t,e,n)=>{var i=n(9392);t.exports=/MSIE|Trident/.test(i)},28:(t,e,n)=>{var i=n(9392);t.exports=/ipad|iphone|ipod/i.test(i)&&"undefined"!=typeof Pebble},8119:(t,e,n)=>{var i=n(9392);t.exports=/(?:ipad|iphone|ipod).*applewebkit/i.test(i)},9088:(t,e,n)=>{var i=n(4475),o=n(4576);t.exports="process"===o(i.process)},6765:(t,e,n)=>{var i=n(9392);t.exports=/web0s(?!.*chrome)/i.test(i)},9392:t=>{t.exports="undefined"!=typeof navigator&&String(navigator.userAgent)||""},7388:(t,e,n)=>{var i,o,r=n(4475),s=n(9392),a=r.process,l=r.Deno,c=a&&a.versions||l&&l.version,u=c&&c.v8;u&&(o=(i=u.split("."))[0]>0&&i[0]<4?1:+(i[0]+i[1])),!o&&s&&(!(i=s.match(/Edge\/(\d+)/))||i[1]>=74)&&(i=s.match(/Chrome\/(\d+)/))&&(o=+i[1]),t.exports=o},9160:(t,e,n)=>{var i=n(9392).match(/AppleWebKit\/(\d+)\./);t.exports=!!i&&+i[1]},8727:t=>{t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6518:(t,e,n)=>{var i=n(4475),o=n(7347).f,r=n(6699),s=n(6840),a=n(9433),l=n(7740),c=n(2796);t.exports=function(t,e){var n,u,h,d,p,f=t.target,m=t.global,y=t.stat;if(n=m?i:y?i[f]||a(f,{}):i[f]&&i[f].prototype)for(u in e){if(d=e[u],h=t.dontCallGetSet?(p=o(n,u))&&p.value:n[u],!c(m?u:f+(y?".":"#")+u,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(t.sham||h&&h.sham)&&r(d,"sham",!0),s(n,u,d,t)}}},9039:t=>{t.exports=function(t){try{return!!t()}catch(t){return!0}}},9228:(t,e,n)=>{n(7495);var i=n(9565),o=n(6840),r=n(7323),s=n(9039),a=n(8227),l=n(6699),c=a("species"),u=RegExp.prototype;t.exports=function(t,e,n,h){var d=a(t),p=!s((function(){var e={};return e[d]=function(){return 7},7!==""[t](e)})),f=p&&!s((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[c]=function(){return n},n.flags="",n[d]=/./[d]),n.exec=function(){return e=!0,null},n[d](""),!e}));if(!p||!f||n){var m=/./[d],y=e(d,""[t],(function(t,e,n,o,s){var a=e.exec;return a===r||a===u.exec?p&&!s?{done:!0,value:i(m,e,n,o)}:{done:!0,value:i(t,n,e,o)}:{done:!1}}));o(String.prototype,t,y[0]),o(u,d,y[1])}h&&l(u[d],"sham",!0)}},8745:(t,e,n)=>{var i=n(616),o=Function.prototype,r=o.apply,s=o.call;t.exports="object"==typeof Reflect&&Reflect.apply||(i?s.bind(r):function(){return s.apply(r,arguments)})},6080:(t,e,n)=>{var i=n(7476),o=n(9306),r=n(616),s=i(i.bind);t.exports=function(t,e){return o(t),void 0===e?t:r?s(t,e):function(){return t.apply(e,arguments)}}},616:(t,e,n)=>{var i=n(9039);t.exports=!i((function(){var t=function(){}.bind();return"function"!=typeof t||t.hasOwnProperty("prototype")}))},566:(t,e,n)=>{var i=n(9504),o=n(9306),r=n(34),s=n(9297),a=n(7680),l=n(616),c=Function,u=i([].concat),h=i([].join),d={};t.exports=l?c.bind:function(t){var e=o(this),n=e.prototype,i=a(arguments,1),l=function(){var n=u(i,a(arguments));return this instanceof l?function(t,e,n){if(!s(d,e)){for(var i=[],o=0;o<e;o++)i[o]="a["+o+"]";d[e]=c("C,a","return new C("+h(i,",")+")")}return d[e](t,n)}(e,n.length,n):e.apply(t,n)};return r(n)&&(l.prototype=n),l}},9565:(t,e,n)=>{var i=n(616),o=Function.prototype.call;t.exports=i?o.bind(o):function(){return o.apply(o,arguments)}},350:(t,e,n)=>{var i=n(3724),o=n(9297),r=Function.prototype,s=i&&Object.getOwnPropertyDescriptor,a=o(r,"name"),l=a&&"something"===function(){}.name,c=a&&(!i||i&&s(r,"name").configurable);t.exports={EXISTS:a,PROPER:l,CONFIGURABLE:c}},6706:(t,e,n)=>{var i=n(9504),o=n(9306);t.exports=function(t,e,n){try{return i(o(Object.getOwnPropertyDescriptor(t,e)[n]))}catch(t){}}},7476:(t,e,n)=>{var i=n(4576),o=n(9504);t.exports=function(t){if("Function"===i(t))return o(t)}},9504:(t,e,n)=>{var i=n(616),o=Function.prototype,r=o.call,s=i&&o.bind.bind(r,r);t.exports=i?s:function(t){return function(){return r.apply(t,arguments)}}},7751:(t,e,n)=>{var i=n(4475),o=n(4901);t.exports=function(t,e){return arguments.length<2?(n=i[t],o(n)?n:void 0):i[t]&&i[t][e];var n}},851:(t,e,n)=>{var i=n(6955),o=n(5966),r=n(4117),s=n(6269),a=n(8227)("iterator");t.exports=function(t){if(!r(t))return o(t,a)||o(t,"@@iterator")||s[i(t)]}},81:(t,e,n)=>{var i=n(9565),o=n(9306),r=n(8551),s=n(6823),a=n(851),l=TypeError;t.exports=function(t,e){var n=arguments.length<2?a(t):e;if(o(n))return r(i(n,t));throw new l(s(t)+" is not iterable")}},6933:(t,e,n)=>{var i=n(9504),o=n(4376),r=n(4901),s=n(4576),a=n(655),l=i([].push);t.exports=function(t){if(r(t))return t;if(o(t)){for(var e=t.length,n=[],i=0;i<e;i++){var c=t[i];"string"==typeof c?l(n,c):"number"!=typeof c&&"Number"!==s(c)&&"String"!==s(c)||l(n,a(c))}var u=n.length,h=!0;return function(t,e){if(h)return h=!1,e;if(o(this))return e;for(var i=0;i<u;i++)if(n[i]===t)return e}}}},5966:(t,e,n)=>{var i=n(9306),o=n(4117);t.exports=function(t,e){var n=t[e];return o(n)?void 0:i(n)}},2478:(t,e,n)=>{var i=n(9504),o=n(8981),r=Math.floor,s=i("".charAt),a=i("".replace),l=i("".slice),c=/\$([$&'`]|\d{1,2}|<[^>]*>)/g,u=/\$([$&'`]|\d{1,2})/g;t.exports=function(t,e,n,i,h,d){var p=n+t.length,f=i.length,m=u;return void 0!==h&&(h=o(h),m=c),a(d,m,(function(o,a){var c;switch(s(a,0)){case"$":return"$";case"&":return t;case"`":return l(e,0,n);case"'":return l(e,p);case"<":c=h[l(a,1,-1)];break;default:var u=+a;if(0===u)return o;if(u>f){var d=r(u/10);return 0===d?o:d<=f?void 0===i[d-1]?s(a,1):i[d-1]+s(a,1):o}c=i[u-1]}return void 0===c?"":c}))}},4475:function(t,e,n){var i=function(t){return t&&t.Math===Math&&t};t.exports=i("object"==typeof globalThis&&globalThis)||i("object"==typeof window&&window)||i("object"==typeof self&&self)||i("object"==typeof n.g&&n.g)||i("object"==typeof this&&this)||function(){return this}()||Function("return this")()},9297:(t,e,n)=>{var i=n(9504),o=n(8981),r=i({}.hasOwnProperty);t.exports=Object.hasOwn||function(t,e){return r(o(t),e)}},421:t=>{t.exports={}},3138:t=>{t.exports=function(t,e){try{1===arguments.length?console.error(t):console.error(t,e)}catch(t){}}},397:(t,e,n)=>{var i=n(7751);t.exports=i("document","documentElement")},5917:(t,e,n)=>{var i=n(3724),o=n(9039),r=n(4055);t.exports=!i&&!o((function(){return 7!==Object.defineProperty(r("div"),"a",{get:function(){return 7}}).a}))},7055:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(4576),s=Object,a=i("".split);t.exports=o((function(){return!s("z").propertyIsEnumerable(0)}))?function(t){return"String"===r(t)?a(t,""):s(t)}:s},3167:(t,e,n)=>{var i=n(4901),o=n(34),r=n(2967);t.exports=function(t,e,n){var s,a;return r&&i(s=e.constructor)&&s!==n&&o(a=s.prototype)&&a!==n.prototype&&r(t,a),t}},3706:(t,e,n)=>{var i=n(9504),o=n(4901),r=n(7629),s=i(Function.toString);o(r.inspectSource)||(r.inspectSource=function(t){return s(t)}),t.exports=r.inspectSource},1181:(t,e,n)=>{var i,o,r,s=n(8622),a=n(4475),l=n(34),c=n(6699),u=n(9297),h=n(7629),d=n(6119),p=n(421),f="Object already initialized",m=a.TypeError,y=a.WeakMap;if(s||h.state){var v=h.state||(h.state=new y);v.get=v.get,v.has=v.has,v.set=v.set,i=function(t,e){if(v.has(t))throw new m(f);return e.facade=t,v.set(t,e),e},o=function(t){return v.get(t)||{}},r=function(t){return v.has(t)}}else{var b=d("state");p[b]=!0,i=function(t,e){if(u(t,b))throw new m(f);return e.facade=t,c(t,b,e),e},o=function(t){return u(t,b)?t[b]:{}},r=function(t){return u(t,b)}}t.exports={set:i,get:o,has:r,enforce:function(t){return r(t)?o(t):i(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=o(e)).type!==t)throw new m("Incompatible receiver, "+t+" required");return n}}}},4209:(t,e,n)=>{var i=n(8227),o=n(6269),r=i("iterator"),s=Array.prototype;t.exports=function(t){return void 0!==t&&(o.Array===t||s[r]===t)}},4376:(t,e,n)=>{var i=n(4576);t.exports=Array.isArray||function(t){return"Array"===i(t)}},4901:t=>{var e="object"==typeof document&&document.all;t.exports=void 0===e&&void 0!==e?function(t){return"function"==typeof t||t===e}:function(t){return"function"==typeof t}},3517:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(4901),s=n(6955),a=n(7751),l=n(3706),c=function(){},u=a("Reflect","construct"),h=/^\s*(?:class|function)\b/,d=i(h.exec),p=!h.test(c),f=function(t){if(!r(t))return!1;try{return u(c,[],t),!0}catch(t){return!1}},m=function(t){if(!r(t))return!1;switch(s(t)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return p||!!d(h,l(t))}catch(t){return!0}};m.sham=!0,t.exports=!u||o((function(){var t;return f(f.call)||!f(Object)||!f((function(){t=!0}))||t}))?m:f},6575:(t,e,n)=>{var i=n(9297);t.exports=function(t){return void 0!==t&&(i(t,"value")||i(t,"writable"))}},2796:(t,e,n)=>{var i=n(9039),o=n(4901),r=/#|\.prototype\./,s=function(t,e){var n=l[a(t)];return n===u||n!==c&&(o(e)?i(e):!!e)},a=s.normalize=function(t){return String(t).replace(r,".").toLowerCase()},l=s.data={},c=s.NATIVE="N",u=s.POLYFILL="P";t.exports=s},4117:t=>{t.exports=function(t){return null==t}},34:(t,e,n)=>{var i=n(4901);t.exports=function(t){return"object"==typeof t?null!==t:i(t)}},3925:(t,e,n)=>{var i=n(34);t.exports=function(t){return i(t)||null===t}},6395:t=>{t.exports=!1},788:(t,e,n)=>{var i=n(34),o=n(4576),r=n(8227)("match");t.exports=function(t){var e;return i(t)&&(void 0!==(e=t[r])?!!e:"RegExp"===o(t))}},757:(t,e,n)=>{var i=n(7751),o=n(4901),r=n(1625),s=n(7040),a=Object;t.exports=s?function(t){return"symbol"==typeof t}:function(t){var e=i("Symbol");return o(e)&&r(e.prototype,a(t))}},2652:(t,e,n)=>{var i=n(6080),o=n(9565),r=n(8551),s=n(6823),a=n(4209),l=n(6198),c=n(1625),u=n(81),h=n(851),d=n(9539),p=TypeError,f=function(t,e){this.stopped=t,this.result=e},m=f.prototype;t.exports=function(t,e,n){var y,v,b,g,_,w,x,k=n&&n.that,O=!(!n||!n.AS_ENTRIES),j=!(!n||!n.IS_RECORD),C=!(!n||!n.IS_ITERATOR),E=!(!n||!n.INTERRUPTED),P=i(e,k),L=function(t){return y&&d(y,"normal",t),new f(!0,t)},S=function(t){return O?(r(t),E?P(t[0],t[1],L):P(t[0],t[1])):E?P(t,L):P(t)};if(j)y=t.iterator;else if(C)y=t;else{if(!(v=h(t)))throw new p(s(t)+" is not iterable");if(a(v)){for(b=0,g=l(t);g>b;b++)if((_=S(t[b]))&&c(m,_))return _;return new f(!1)}y=u(t,v)}for(w=j?t.next:y.next;!(x=o(w,y)).done;){try{_=S(x.value)}catch(t){d(y,"throw",t)}if("object"==typeof _&&_&&c(m,_))return _}return new f(!1)}},9539:(t,e,n)=>{var i=n(9565),o=n(8551),r=n(5966);t.exports=function(t,e,n){var s,a;o(t);try{if(!(s=r(t,"return"))){if("throw"===e)throw n;return n}s=i(s,t)}catch(t){a=!0,s=t}if("throw"===e)throw n;if(a)throw s;return o(s),n}},3994:(t,e,n)=>{var i=n(7657).IteratorPrototype,o=n(2360),r=n(6980),s=n(687),a=n(6269),l=function(){return this};t.exports=function(t,e,n,c){var u=e+" Iterator";return t.prototype=o(i,{next:r(+!c,n)}),s(t,u,!1,!0),a[u]=l,t}},1088:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(6395),s=n(350),a=n(4901),l=n(3994),c=n(2787),u=n(2967),h=n(687),d=n(6699),p=n(6840),f=n(8227),m=n(6269),y=n(7657),v=s.PROPER,b=s.CONFIGURABLE,g=y.IteratorPrototype,_=y.BUGGY_SAFARI_ITERATORS,w=f("iterator"),x="keys",k="values",O="entries",j=function(){return this};t.exports=function(t,e,n,s,f,y,C){l(n,e,s);var E,P,L,S=function(t){if(t===f&&I)return I;if(!_&&t&&t in R)return R[t];switch(t){case x:case k:case O:return function(){return new n(this,t)}}return function(){return new n(this)}},T=e+" Iterator",A=!1,R=t.prototype,B=R[w]||R["@@iterator"]||f&&R[f],I=!_&&B||S(f),z="Array"===e&&R.entries||B;if(z&&(E=c(z.call(new t)))!==Object.prototype&&E.next&&(r||c(E)===g||(u?u(E,g):a(E[w])||p(E,w,j)),h(E,T,!0,!0),r&&(m[T]=j)),v&&f===k&&B&&B.name!==k&&(!r&&b?d(R,"name",k):(A=!0,I=function(){return o(B,this)})),f)if(P={values:S(k),keys:y?I:S(x),entries:S(O)},C)for(L in P)(_||A||!(L in R))&&p(R,L,P[L]);else i({target:e,proto:!0,forced:_||A},P);return r&&!C||R[w]===I||p(R,w,I,{name:f}),m[e]=I,P}},7657:(t,e,n)=>{var i,o,r,s=n(9039),a=n(4901),l=n(34),c=n(2360),u=n(2787),h=n(6840),d=n(8227),p=n(6395),f=d("iterator"),m=!1;[].keys&&("next"in(r=[].keys())?(o=u(u(r)))!==Object.prototype&&(i=o):m=!0),!l(i)||s((function(){var t={};return i[f].call(t)!==t}))?i={}:p&&(i=c(i)),a(i[f])||h(i,f,(function(){return this})),t.exports={IteratorPrototype:i,BUGGY_SAFARI_ITERATORS:m}},6269:t=>{t.exports={}},6198:(t,e,n)=>{var i=n(8014);t.exports=function(t){return i(t.length)}},283:(t,e,n)=>{var i=n(9504),o=n(9039),r=n(4901),s=n(9297),a=n(3724),l=n(350).CONFIGURABLE,c=n(3706),u=n(1181),h=u.enforce,d=u.get,p=String,f=Object.defineProperty,m=i("".slice),y=i("".replace),v=i([].join),b=a&&!o((function(){return 8!==f((function(){}),"length",{value:8}).length})),g=String(String).split("String"),_=t.exports=function(t,e,n){"Symbol("===m(p(e),0,7)&&(e="["+y(p(e),/^Symbol\(([^)]*)\).*$/,"$1")+"]"),n&&n.getter&&(e="get "+e),n&&n.setter&&(e="set "+e),(!s(t,"name")||l&&t.name!==e)&&(a?f(t,"name",{value:e,configurable:!0}):t.name=e),b&&n&&s(n,"arity")&&t.length!==n.arity&&f(t,"length",{value:n.arity});try{n&&s(n,"constructor")&&n.constructor?a&&f(t,"prototype",{writable:!1}):t.prototype&&(t.prototype=void 0)}catch(t){}var i=h(t);return s(i,"source")||(i.source=v(g,"string"==typeof e?e:"")),t};Function.prototype.toString=_((function(){return r(this)&&d(this).source||c(this)}),"toString")},741:t=>{var e=Math.ceil,n=Math.floor;t.exports=Math.trunc||function(t){var i=+t;return(i>0?n:e)(i)}},1955:(t,e,n)=>{var i,o,r,s,a,l=n(4475),c=n(3389),u=n(6080),h=n(9225).set,d=n(8265),p=n(8119),f=n(28),m=n(6765),y=n(9088),v=l.MutationObserver||l.WebKitMutationObserver,b=l.document,g=l.process,_=l.Promise,w=c("queueMicrotask");if(!w){var x=new d,k=function(){var t,e;for(y&&(t=g.domain)&&t.exit();e=x.get();)try{e()}catch(t){throw x.head&&i(),t}t&&t.enter()};p||y||m||!v||!b?!f&&_&&_.resolve?((s=_.resolve(void 0)).constructor=_,a=u(s.then,s),i=function(){a(k)}):y?i=function(){g.nextTick(k)}:(h=u(h,l),i=function(){h(k)}):(o=!0,r=b.createTextNode(""),new v(k).observe(r,{characterData:!0}),i=function(){r.data=o=!o}),w=function(t){x.head||i(),x.add(t)}}t.exports=w},6043:(t,e,n)=>{var i=n(9306),o=TypeError,r=function(t){var e,n;this.promise=new t((function(t,i){if(void 0!==e||void 0!==n)throw new o("Bad Promise constructor");e=t,n=i})),this.resolve=i(e),this.reject=i(n)};t.exports.f=function(t){return new r(t)}},5749:(t,e,n)=>{var i=n(788),o=TypeError;t.exports=function(t){if(i(t))throw new o("The method doesn't accept regular expressions");return t}},3904:(t,e,n)=>{var i=n(4475),o=n(9039),r=n(9504),s=n(655),a=n(3802).trim,l=n(7452),c=r("".charAt),u=i.parseFloat,h=i.Symbol,d=h&&h.iterator,p=1/u(l+"-0")!=-1/0||d&&!o((function(){u(Object(d))}));t.exports=p?function(t){var e=a(s(t)),n=u(e);return 0===n&&"-"===c(e,0)?-0:n}:u},2703:(t,e,n)=>{var i=n(4475),o=n(9039),r=n(9504),s=n(655),a=n(3802).trim,l=n(7452),c=i.parseInt,u=i.Symbol,h=u&&u.iterator,d=/^[+-]?0x/i,p=r(d.exec),f=8!==c(l+"08")||22!==c(l+"0x16")||h&&!o((function(){c(Object(h))}));t.exports=f?function(t,e){var n=a(s(t));return c(n,e>>>0||(p(d,n)?16:10))}:c},4213:(t,e,n)=>{var i=n(3724),o=n(9504),r=n(9565),s=n(9039),a=n(1072),l=n(3717),c=n(8773),u=n(8981),h=n(7055),d=Object.assign,p=Object.defineProperty,f=o([].concat);t.exports=!d||s((function(){if(i&&1!==d({b:1},d(p({},"a",{enumerable:!0,get:function(){p(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol("assign detection"),o="abcdefghijklmnopqrst";return t[n]=7,o.split("").forEach((function(t){e[t]=t})),7!==d({},t)[n]||a(d({},e)).join("")!==o}))?function(t,e){for(var n=u(t),o=arguments.length,s=1,d=l.f,p=c.f;o>s;)for(var m,y=h(arguments[s++]),v=d?f(a(y),d(y)):a(y),b=v.length,g=0;b>g;)m=v[g++],i&&!r(p,y,m)||(n[m]=y[m]);return n}:d},2360:(t,e,n)=>{var i,o=n(8551),r=n(6801),s=n(8727),a=n(421),l=n(397),c=n(4055),u=n(6119),h="prototype",d="script",p=u("IE_PROTO"),f=function(){},m=function(t){return"<"+d+">"+t+"</"+d+">"},y=function(t){t.write(m("")),t.close();var e=t.parentWindow.Object;return t=null,e},v=function(){try{i=new ActiveXObject("htmlfile")}catch(t){}var t,e,n;v="undefined"!=typeof document?document.domain&&i?y(i):(e=c("iframe"),n="java"+d+":",e.style.display="none",l.appendChild(e),e.src=String(n),(t=e.contentWindow.document).open(),t.write(m("document.F=Object")),t.close(),t.F):y(i);for(var o=s.length;o--;)delete v[h][s[o]];return v()};a[p]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(f[h]=o(t),n=new f,f[h]=null,n[p]=t):n=v(),void 0===e?n:r.f(n,e)}},6801:(t,e,n)=>{var i=n(3724),o=n(8686),r=n(4913),s=n(8551),a=n(5397),l=n(1072);e.f=i&&!o?Object.defineProperties:function(t,e){s(t);for(var n,i=a(e),o=l(e),c=o.length,u=0;c>u;)r.f(t,n=o[u++],i[n]);return t}},4913:(t,e,n)=>{var i=n(3724),o=n(5917),r=n(8686),s=n(8551),a=n(6969),l=TypeError,c=Object.defineProperty,u=Object.getOwnPropertyDescriptor,h="enumerable",d="configurable",p="writable";e.f=i?r?function(t,e,n){if(s(t),e=a(e),s(n),"function"==typeof t&&"prototype"===e&&"value"in n&&p in n&&!n[p]){var i=u(t,e);i&&i[p]&&(t[e]=n.value,n={configurable:d in n?n[d]:i[d],enumerable:h in n?n[h]:i[h],writable:!1})}return c(t,e,n)}:c:function(t,e,n){if(s(t),e=a(e),s(n),o)try{return c(t,e,n)}catch(t){}if("get"in n||"set"in n)throw new l("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},7347:(t,e,n)=>{var i=n(3724),o=n(9565),r=n(8773),s=n(6980),a=n(5397),l=n(6969),c=n(9297),u=n(5917),h=Object.getOwnPropertyDescriptor;e.f=i?h:function(t,e){if(t=a(t),e=l(e),u)try{return h(t,e)}catch(t){}if(c(t,e))return s(!o(r.f,t,e),t[e])}},298:(t,e,n)=>{var i=n(4576),o=n(5397),r=n(8480).f,s=n(7680),a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"Window"===i(t)?function(t){try{return r(t)}catch(t){return s(a)}}(t):r(o(t))}},8480:(t,e,n)=>{var i=n(1828),o=n(8727).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return i(t,o)}},3717:(t,e)=>{e.f=Object.getOwnPropertySymbols},2787:(t,e,n)=>{var i=n(9297),o=n(4901),r=n(8981),s=n(6119),a=n(2211),l=s("IE_PROTO"),c=Object,u=c.prototype;t.exports=a?c.getPrototypeOf:function(t){var e=r(t);if(i(e,l))return e[l];var n=e.constructor;return o(n)&&e instanceof n?n.prototype:e instanceof c?u:null}},1625:(t,e,n)=>{var i=n(9504);t.exports=i({}.isPrototypeOf)},1828:(t,e,n)=>{var i=n(9504),o=n(9297),r=n(5397),s=n(9617).indexOf,a=n(421),l=i([].push);t.exports=function(t,e){var n,i=r(t),c=0,u=[];for(n in i)!o(a,n)&&o(i,n)&&l(u,n);for(;e.length>c;)o(i,n=e[c++])&&(~s(u,n)||l(u,n));return u}},1072:(t,e,n)=>{var i=n(1828),o=n(8727);t.exports=Object.keys||function(t){return i(t,o)}},8773:(t,e)=>{var n={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!n.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:n},2967:(t,e,n)=>{var i=n(6706),o=n(34),r=n(7750),s=n(3506);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=i(Object.prototype,"__proto__","set"))(n,[]),e=n instanceof Array}catch(t){}return function(n,i){return r(n),s(i),o(n)?(e?t(n,i):n.__proto__=i,n):n}}():void 0)},2357:(t,e,n)=>{var i=n(3724),o=n(9039),r=n(9504),s=n(2787),a=n(1072),l=n(5397),c=r(n(8773).f),u=r([].push),h=i&&o((function(){var t=Object.create(null);return t[2]=2,!c(t,2)})),d=function(t){return function(e){for(var n,o=l(e),r=a(o),d=h&&null===s(o),p=r.length,f=0,m=[];p>f;)n=r[f++],i&&!(d?n in o:c(o,n))||u(m,t?[n,o[n]]:o[n]);return m}};t.exports={entries:d(!0),values:d(!1)}},3179:(t,e,n)=>{var i=n(2140),o=n(6955);t.exports=i?{}.toString:function(){return"[object "+o(this)+"]"}},4270:(t,e,n)=>{var i=n(9565),o=n(4901),r=n(34),s=TypeError;t.exports=function(t,e){var n,a;if("string"===e&&o(n=t.toString)&&!r(a=i(n,t)))return a;if(o(n=t.valueOf)&&!r(a=i(n,t)))return a;if("string"!==e&&o(n=t.toString)&&!r(a=i(n,t)))return a;throw new s("Can't convert object to primitive value")}},5031:(t,e,n)=>{var i=n(7751),o=n(9504),r=n(8480),s=n(3717),a=n(8551),l=o([].concat);t.exports=i("Reflect","ownKeys")||function(t){var e=r.f(a(t)),n=s.f;return n?l(e,n(t)):e}},9167:(t,e,n)=>{var i=n(4475);t.exports=i},1103:t=>{t.exports=function(t){try{return{error:!1,value:t()}}catch(t){return{error:!0,value:t}}}},916:(t,e,n)=>{var i=n(4475),o=n(550),r=n(4901),s=n(2796),a=n(3706),l=n(8227),c=n(7290),u=n(516),h=n(6395),d=n(7388),p=o&&o.prototype,f=l("species"),m=!1,y=r(i.PromiseRejectionEvent),v=s("Promise",(function(){var t=a(o),e=t!==String(o);if(!e&&66===d)return!0;if(h&&(!p.catch||!p.finally))return!0;if(!d||d<51||!/native code/.test(t)){var n=new o((function(t){t(1)})),i=function(t){t((function(){}),(function(){}))};if((n.constructor={})[f]=i,!(m=n.then((function(){}))instanceof i))return!0}return!e&&(c||u)&&!y}));t.exports={CONSTRUCTOR:v,REJECTION_EVENT:y,SUBCLASSING:m}},550:(t,e,n)=>{var i=n(4475);t.exports=i.Promise},3438:(t,e,n)=>{var i=n(8551),o=n(34),r=n(6043);t.exports=function(t,e){if(i(t),o(e)&&e.constructor===t)return e;var n=r.f(t);return(0,n.resolve)(e),n.promise}},537:(t,e,n)=>{var i=n(550),o=n(4428),r=n(916).CONSTRUCTOR;t.exports=r||!o((function(t){i.all(t).then(void 0,(function(){}))}))},1056:(t,e,n)=>{var i=n(4913).f;t.exports=function(t,e,n){n in t||i(t,n,{configurable:!0,get:function(){return e[n]},set:function(t){e[n]=t}})}},8265:t=>{var e=function(){this.head=null,this.tail=null};e.prototype={add:function(t){var e={item:t,next:null},n=this.tail;n?n.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t)return null===(this.head=t.next)&&(this.tail=null),t.item}},t.exports=e},6682:(t,e,n)=>{var i=n(9565),o=n(8551),r=n(4901),s=n(4576),a=n(7323),l=TypeError;t.exports=function(t,e){var n=t.exec;if(r(n)){var c=i(n,t,e);return null!==c&&o(c),c}if("RegExp"===s(t))return i(a,t,e);throw new l("RegExp#exec called on incompatible receiver")}},7323:(t,e,n)=>{var i,o,r=n(9565),s=n(9504),a=n(655),l=n(7979),c=n(8429),u=n(5745),h=n(2360),d=n(1181).get,p=n(3635),f=n(8814),m=u("native-string-replace",String.prototype.replace),y=RegExp.prototype.exec,v=y,b=s("".charAt),g=s("".indexOf),_=s("".replace),w=s("".slice),x=(o=/b*/g,r(y,i=/a/,"a"),r(y,o,"a"),0!==i.lastIndex||0!==o.lastIndex),k=c.BROKEN_CARET,O=void 0!==/()??/.exec("")[1];(x||O||k||p||f)&&(v=function(t){var e,n,i,o,s,c,u,p=this,f=d(p),j=a(t),C=f.raw;if(C)return C.lastIndex=p.lastIndex,e=r(v,C,j),p.lastIndex=C.lastIndex,e;var E=f.groups,P=k&&p.sticky,L=r(l,p),S=p.source,T=0,A=j;if(P&&(L=_(L,"y",""),-1===g(L,"g")&&(L+="g"),A=w(j,p.lastIndex),p.lastIndex>0&&(!p.multiline||p.multiline&&"\n"!==b(j,p.lastIndex-1))&&(S="(?: "+S+")",A=" "+A,T++),n=new RegExp("^(?:"+S+")",L)),O&&(n=new RegExp("^"+S+"$(?!\\s)",L)),x&&(i=p.lastIndex),o=r(y,P?n:p,A),P?o?(o.input=w(o.input,T),o[0]=w(o[0],T),o.index=p.lastIndex,p.lastIndex+=o[0].length):p.lastIndex=0:x&&o&&(p.lastIndex=p.global?o.index+o[0].length:i),O&&o&&o.length>1&&r(m,o[0],n,(function(){for(s=1;s<arguments.length-2;s++)void 0===arguments[s]&&(o[s]=void 0)})),o&&E)for(o.groups=c=h(null),s=0;s<E.length;s++)c[(u=E[s])[0]]=o[u[1]];return o}),t.exports=v},7979:(t,e,n)=>{var i=n(8551);t.exports=function(){var t=i(this),e="";return t.hasIndices&&(e+="d"),t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.unicodeSets&&(e+="v"),t.sticky&&(e+="y"),e}},1034:(t,e,n)=>{var i=n(9565),o=n(9297),r=n(1625),s=n(7979),a=RegExp.prototype;t.exports=function(t){var e=t.flags;return void 0!==e||"flags"in a||o(t,"flags")||!r(a,t)?e:i(s,t)}},8429:(t,e,n)=>{var i=n(9039),o=n(4475).RegExp,r=i((function(){var t=o("a","y");return t.lastIndex=2,null!==t.exec("abcd")})),s=r||i((function(){return!o("a","y").sticky})),a=r||i((function(){var t=o("^r","gy");return t.lastIndex=2,null!==t.exec("str")}));t.exports={BROKEN_CARET:a,MISSED_STICKY:s,UNSUPPORTED_Y:r}},3635:(t,e,n)=>{var i=n(9039),o=n(4475).RegExp;t.exports=i((function(){var t=o(".","s");return!(t.dotAll&&t.test("\n")&&"s"===t.flags)}))},8814:(t,e,n)=>{var i=n(9039),o=n(4475).RegExp;t.exports=i((function(){var t=o("(?<a>b)","g");return"b"!==t.exec("b").groups.a||"bc"!=="b".replace(t,"$<a>c")}))},7750:(t,e,n)=>{var i=n(4117),o=TypeError;t.exports=function(t){if(i(t))throw new o("Can't call method on "+t);return t}},3389:(t,e,n)=>{var i=n(4475),o=n(3724),r=Object.getOwnPropertyDescriptor;t.exports=function(t){if(!o)return i[t];var e=r(i,t);return e&&e.value}},9472:(t,e,n)=>{var i,o=n(4475),r=n(8745),s=n(4901),a=n(6763),l=n(9392),c=n(7680),u=n(2812),h=o.Function,d=/MSIE .\./.test(l)||a&&((i=o.Bun.version.split(".")).length<3||"0"===i[0]&&(i[1]<3||"3"===i[1]&&"0"===i[2]));t.exports=function(t,e){var n=e?2:1;return d?function(i,o){var a=u(arguments.length,1)>n,l=s(i)?i:h(i),d=a?c(arguments,n):[],p=a?function(){r(l,this,d)}:l;return e?t(p,o):t(p)}:t}},7633:(t,e,n)=>{var i=n(7751),o=n(2106),r=n(8227),s=n(3724),a=r("species");t.exports=function(t){var e=i(t);s&&e&&!e[a]&&o(e,a,{configurable:!0,get:function(){return this}})}},687:(t,e,n)=>{var i=n(4913).f,o=n(9297),r=n(8227)("toStringTag");t.exports=function(t,e,n){t&&!n&&(t=t.prototype),t&&!o(t,r)&&i(t,r,{configurable:!0,value:e})}},6119:(t,e,n)=>{var i=n(5745),o=n(3392),r=i("keys");t.exports=function(t){return r[t]||(r[t]=o(t))}},7629:(t,e,n)=>{var i=n(6395),o=n(4475),r=n(9433),s="__core-js_shared__",a=t.exports=o[s]||r(s,{});(a.versions||(a.versions=[])).push({version:"3.36.1",mode:i?"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:(t,e,n)=>{var i=n(7629);t.exports=function(t,e){return i[t]||(i[t]=e||{})}},2293:(t,e,n)=>{var i=n(8551),o=n(5548),r=n(4117),s=n(8227)("species");t.exports=function(t,e){var n,a=i(t).constructor;return void 0===a||r(n=i(a)[s])?e:o(n)}},8183:(t,e,n)=>{var i=n(9504),o=n(1291),r=n(655),s=n(7750),a=i("".charAt),l=i("".charCodeAt),c=i("".slice),u=function(t){return function(e,n){var i,u,h=r(s(e)),d=o(n),p=h.length;return d<0||d>=p?t?"":void 0:(i=l(h,d))<55296||i>56319||d+1===p||(u=l(h,d+1))<56320||u>57343?t?a(h,d):i:t?c(h,d,d+2):u-56320+(i-55296<<10)+65536}};t.exports={codeAt:u(!1),charAt:u(!0)}},533:(t,e,n)=>{var i=n(9504),o=n(8014),r=n(655),s=n(2333),a=n(7750),l=i(s),c=i("".slice),u=Math.ceil,h=function(t){return function(e,n,i){var s,h,d=r(a(e)),p=o(n),f=d.length,m=void 0===i?" ":r(i);return p<=f||""===m?d:((h=l(m,u((s=p-f)/m.length))).length>s&&(h=c(h,0,s)),t?d+h:h+d)}};t.exports={start:h(!1),end:h(!0)}},2333:(t,e,n)=>{var i=n(1291),o=n(655),r=n(7750),s=RangeError;t.exports=function(t){var e=o(r(this)),n="",a=i(t);if(a<0||a===1/0)throw new s("Wrong number of repetitions");for(;a>0;(a>>>=1)&&(e+=e))1&a&&(n+=e);return n}},706:(t,e,n)=>{var i=n(350).PROPER,o=n(9039),r=n(7452);t.exports=function(t){return o((function(){return!!r[t]()||"​…᠎"!=="​…᠎"[t]()||i&&r[t].name!==t}))}},3802:(t,e,n)=>{var i=n(9504),o=n(7750),r=n(655),s=n(7452),a=i("".replace),l=RegExp("^["+s+"]+"),c=RegExp("(^|[^"+s+"])["+s+"]+$"),u=function(t){return function(e){var n=r(o(e));return 1&t&&(n=a(n,l,"")),2&t&&(n=a(n,c,"$1")),n}};t.exports={start:u(1),end:u(2),trim:u(3)}},4495:(t,e,n)=>{var i=n(7388),o=n(9039),r=n(4475).String;t.exports=!!Object.getOwnPropertySymbols&&!o((function(){var t=Symbol("symbol detection");return!r(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&i&&i<41}))},8242:(t,e,n)=>{var i=n(9565),o=n(7751),r=n(8227),s=n(6840);t.exports=function(){var t=o("Symbol"),e=t&&t.prototype,n=e&&e.valueOf,a=r("toPrimitive");e&&!e[a]&&s(e,a,(function(t){return i(n,this)}),{arity:1})}},1296:(t,e,n)=>{var i=n(4495);t.exports=i&&!!Symbol.for&&!!Symbol.keyFor},9225:(t,e,n)=>{var i,o,r,s,a=n(4475),l=n(8745),c=n(6080),u=n(4901),h=n(9297),d=n(9039),p=n(397),f=n(7680),m=n(4055),y=n(2812),v=n(8119),b=n(9088),g=a.setImmediate,_=a.clearImmediate,w=a.process,x=a.Dispatch,k=a.Function,O=a.MessageChannel,j=a.String,C=0,E={},P="onreadystatechange";d((function(){i=a.location}));var L=function(t){if(h(E,t)){var e=E[t];delete E[t],e()}},S=function(t){return function(){L(t)}},T=function(t){L(t.data)},A=function(t){a.postMessage(j(t),i.protocol+"//"+i.host)};g&&_||(g=function(t){y(arguments.length,1);var e=u(t)?t:k(t),n=f(arguments,1);return E[++C]=function(){l(e,void 0,n)},o(C),C},_=function(t){delete E[t]},b?o=function(t){w.nextTick(S(t))}:x&&x.now?o=function(t){x.now(S(t))}:O&&!v?(s=(r=new O).port2,r.port1.onmessage=T,o=c(s.postMessage,s)):a.addEventListener&&u(a.postMessage)&&!a.importScripts&&i&&"file:"!==i.protocol&&!d(A)?(o=A,a.addEventListener("message",T,!1)):o=P in m("script")?function(t){p.appendChild(m("script"))[P]=function(){p.removeChild(this),L(t)}}:function(t){setTimeout(S(t),0)}),t.exports={set:g,clear:_}},1240:(t,e,n)=>{var i=n(9504);t.exports=i(1..valueOf)},5610:(t,e,n)=>{var i=n(1291),o=Math.max,r=Math.min;t.exports=function(t,e){var n=i(t);return n<0?o(n+e,0):r(n,e)}},5397:(t,e,n)=>{var i=n(7055),o=n(7750);t.exports=function(t){return i(o(t))}},1291:(t,e,n)=>{var i=n(741);t.exports=function(t){var e=+t;return e!=e||0===e?0:i(e)}},8014:(t,e,n)=>{var i=n(1291),o=Math.min;t.exports=function(t){var e=i(t);return e>0?o(e,9007199254740991):0}},8981:(t,e,n)=>{var i=n(7750),o=Object;t.exports=function(t){return o(i(t))}},2777:(t,e,n)=>{var i=n(9565),o=n(34),r=n(757),s=n(5966),a=n(4270),l=n(8227),c=TypeError,u=l("toPrimitive");t.exports=function(t,e){if(!o(t)||r(t))return t;var n,l=s(t,u);if(l){if(void 0===e&&(e="default"),n=i(l,t,e),!o(n)||r(n))return n;throw new c("Can't convert object to primitive value")}return void 0===e&&(e="number"),a(t,e)}},6969:(t,e,n)=>{var i=n(2777),o=n(757);t.exports=function(t){var e=i(t,"string");return o(e)?e:e+""}},2140:(t,e,n)=>{var i={};i[n(8227)("toStringTag")]="z",t.exports="[object z]"===String(i)},655:(t,e,n)=>{var i=n(6955),o=String;t.exports=function(t){if("Symbol"===i(t))throw new TypeError("Cannot convert a Symbol value to a string");return o(t)}},6823:t=>{var e=String;t.exports=function(t){try{return e(t)}catch(t){return"Object"}}},3392:(t,e,n)=>{var i=n(9504),o=0,r=Math.random(),s=i(1..toString);t.exports=function(t){return"Symbol("+(void 0===t?"":t)+")_"+s(++o+r,36)}},7040:(t,e,n)=>{var i=n(4495);t.exports=i&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},8686:(t,e,n)=>{var i=n(3724),o=n(9039);t.exports=i&&o((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},2812:t=>{var e=TypeError;t.exports=function(t,n){if(t<n)throw new e("Not enough arguments");return t}},8622:(t,e,n)=>{var i=n(4475),o=n(4901),r=i.WeakMap;t.exports=o(r)&&/native code/.test(String(r))},511:(t,e,n)=>{var i=n(9167),o=n(9297),r=n(1951),s=n(4913).f;t.exports=function(t){var e=i.Symbol||(i.Symbol={});o(e,t)||s(e,t,{value:r.f(t)})}},1951:(t,e,n)=>{var i=n(8227);e.f=i},8227:(t,e,n)=>{var i=n(4475),o=n(5745),r=n(9297),s=n(3392),a=n(4495),l=n(7040),c=i.Symbol,u=o("wks"),h=l?c.for||c:c&&c.withoutSetter||s;t.exports=function(t){return r(u,t)||(u[t]=a&&r(c,t)?c[t]:h("Symbol."+t)),u[t]}},7452:t=>{t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},8706:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(4376),s=n(34),a=n(8981),l=n(6198),c=n(6837),u=n(4659),h=n(1469),d=n(597),p=n(8227),f=n(7388),m=p("isConcatSpreadable"),y=f>=51||!o((function(){var t=[];return t[m]=!1,t.concat()[0]!==t})),v=function(t){if(!s(t))return!1;var e=t[m];return void 0!==e?!!e:r(t)};i({target:"Array",proto:!0,arity:1,forced:!y||!d("concat")},{concat:function(t){var e,n,i,o,r,s=a(this),d=h(s,0),p=0;for(e=-1,i=arguments.length;e<i;e++)if(v(r=-1===e?s:arguments[e]))for(o=l(r),c(p+o),n=0;n<o;n++,p++)n in r&&u(d,p,r[n]);else c(p+1),u(d,p++,r);return d.length=p,d}})},8431:(t,e,n)=>{var i=n(6518),o=n(9213).every;i({target:"Array",proto:!0,forced:!n(4598)("every")},{every:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},2008:(t,e,n)=>{var i=n(6518),o=n(9213).filter;i({target:"Array",proto:!0,forced:!n(597)("filter")},{filter:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},113:(t,e,n)=>{var i=n(6518),o=n(9213).find,r=n(6469),s="find",a=!0;s in[]&&Array(1)[s]((function(){a=!1})),i({target:"Array",proto:!0,forced:a},{find:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),r(s)},1629:(t,e,n)=>{var i=n(6518),o=n(235);i({target:"Array",proto:!0,forced:[].forEach!==o},{forEach:o})},3418:(t,e,n)=>{var i=n(6518),o=n(7916);i({target:"Array",stat:!0,forced:!n(4428)((function(t){Array.from(t)}))},{from:o})},4423:(t,e,n)=>{var i=n(6518),o=n(9617).includes,r=n(9039),s=n(6469);i({target:"Array",proto:!0,forced:r((function(){return!Array(1).includes()}))},{includes:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),s("includes")},5276:(t,e,n)=>{var i=n(6518),o=n(7476),r=n(9617).indexOf,s=n(4598),a=o([].indexOf),l=!!a&&1/a([1],1,-0)<0;i({target:"Array",proto:!0,forced:l||!s("indexOf")},{indexOf:function(t){var e=arguments.length>1?arguments[1]:void 0;return l?a(this,t,e)||0:r(this,t,e)}})},4346:(t,e,n)=>{n(6518)({target:"Array",stat:!0},{isArray:n(4376)})},3792:(t,e,n)=>{var i=n(5397),o=n(6469),r=n(6269),s=n(1181),a=n(4913).f,l=n(1088),c=n(2529),u=n(6395),h=n(3724),d="Array Iterator",p=s.set,f=s.getterFor(d);t.exports=l(Array,"Array",(function(t,e){p(this,{type:d,target:i(t),index:0,kind:e})}),(function(){var t=f(this),e=t.target,n=t.index++;if(!e||n>=e.length)return t.target=void 0,c(void 0,!0);switch(t.kind){case"keys":return c(n,!1);case"values":return c(e[n],!1)}return c([n,e[n]],!1)}),"values");var m=r.Arguments=r.Array;if(o("keys"),o("values"),o("entries"),!u&&h&&"values"!==m.name)try{a(m,"name",{value:"values"})}catch(t){}},8598:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(7055),s=n(5397),a=n(4598),l=o([].join);i({target:"Array",proto:!0,forced:r!==Object||!a("join",",")},{join:function(t){return l(s(this),void 0===t?",":t)}})},2062:(t,e,n)=>{var i=n(6518),o=n(9213).map;i({target:"Array",proto:!0,forced:!n(597)("map")},{map:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},2712:(t,e,n)=>{var i=n(6518),o=n(926).left,r=n(4598),s=n(7388);i({target:"Array",proto:!0,forced:!n(9088)&&s>79&&s<83||!r("reduce")},{reduce:function(t){var e=arguments.length;return o(this,t,e,e>1?arguments[1]:void 0)}})},4490:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(4376),s=o([].reverse),a=[1,2];i({target:"Array",proto:!0,forced:String(a)===String(a.reverse())},{reverse:function(){return r(this)&&(this.length=this.length),s(this)}})},4782:(t,e,n)=>{var i=n(6518),o=n(4376),r=n(3517),s=n(34),a=n(5610),l=n(6198),c=n(5397),u=n(4659),h=n(8227),d=n(597),p=n(7680),f=d("slice"),m=h("species"),y=Array,v=Math.max;i({target:"Array",proto:!0,forced:!f},{slice:function(t,e){var n,i,h,d=c(this),f=l(d),b=a(t,f),g=a(void 0===e?f:e,f);if(o(d)&&(n=d.constructor,(r(n)&&(n===y||o(n.prototype))||s(n)&&null===(n=n[m]))&&(n=void 0),n===y||void 0===n))return p(d,b,g);for(i=new(void 0===n?y:n)(v(g-b,0)),h=0;b<g;b++,h++)b in d&&u(i,h,d[b]);return i.length=h,i}})},5086:(t,e,n)=>{var i=n(6518),o=n(9213).some;i({target:"Array",proto:!0,forced:!n(4598)("some")},{some:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}})},6910:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(9306),s=n(8981),a=n(6198),l=n(4606),c=n(655),u=n(9039),h=n(4488),d=n(4598),p=n(8834),f=n(3202),m=n(7388),y=n(9160),v=[],b=o(v.sort),g=o(v.push),_=u((function(){v.sort(void 0)})),w=u((function(){v.sort(null)})),x=d("sort"),k=!u((function(){if(m)return m<70;if(!(p&&p>3)){if(f)return!0;if(y)return y<603;var t,e,n,i,o="";for(t=65;t<76;t++){switch(e=String.fromCharCode(t),t){case 66:case 69:case 70:case 72:n=3;break;case 68:case 71:n=4;break;default:n=2}for(i=0;i<47;i++)v.push({k:e+i,v:n})}for(v.sort((function(t,e){return e.v-t.v})),i=0;i<v.length;i++)e=v[i].k.charAt(0),o.charAt(o.length-1)!==e&&(o+=e);return"DGBEFHACIJK"!==o}}));i({target:"Array",proto:!0,forced:_||!w||!x||!k},{sort:function(t){void 0!==t&&r(t);var e=s(this);if(k)return void 0===t?b(e):b(e,t);var n,i,o=[],u=a(e);for(i=0;i<u;i++)i in e&&g(o,e[i]);for(h(o,function(t){return function(e,n){return void 0===n?-1:void 0===e?1:void 0!==t?+t(e,n)||0:c(e)>c(n)?1:-1}}(t)),n=a(o),i=0;i<n;)e[i]=o[i++];for(;i<u;)l(e,i++);return e}})},4554:(t,e,n)=>{var i=n(6518),o=n(8981),r=n(5610),s=n(1291),a=n(6198),l=n(4527),c=n(6837),u=n(1469),h=n(4659),d=n(4606),p=n(597)("splice"),f=Math.max,m=Math.min;i({target:"Array",proto:!0,forced:!p},{splice:function(t,e){var n,i,p,y,v,b,g=o(this),_=a(g),w=r(t,_),x=arguments.length;for(0===x?n=i=0:1===x?(n=0,i=_-w):(n=x-2,i=m(f(s(e),0),_-w)),c(_+n-i),p=u(g,i),y=0;y<i;y++)(v=w+y)in g&&h(p,y,g[v]);if(p.length=i,n<i){for(y=w;y<_-i;y++)b=y+n,(v=y+i)in g?g[b]=g[v]:d(g,b);for(y=_;y>_-i+n;y--)d(g,y-1)}else if(n>i)for(y=_-i;y>w;y--)b=y+n-1,(v=y+i-1)in g?g[b]=g[v]:d(g,b);for(y=0;y<n;y++)g[y+w]=arguments[y+2];return l(g,_-i+n),p}})},1688:(t,e,n)=>{var i=n(6518),o=n(380);i({target:"Date",proto:!0,forced:Date.prototype.toISOString!==o},{toISOString:o})},739:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(8981),s=n(2777);i({target:"Date",proto:!0,arity:1,forced:o((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}))},{toJSON:function(t){var e=r(this),n=s(e,"number");return"number"!=typeof n||isFinite(n)?e.toISOString():null}})},9572:(t,e,n)=>{var i=n(9297),o=n(6840),r=n(3640),s=n(8227)("toPrimitive"),a=Date.prototype;i(a,s)||o(a,s,r)},3288:(t,e,n)=>{var i=n(9504),o=n(6840),r=Date.prototype,s="Invalid Date",a="toString",l=i(r[a]),c=i(r.getTime);String(new Date(NaN))!==s&&o(r,a,(function(){var t=c(this);return t==t?l(this):s}))},4170:(t,e,n)=>{var i=n(6518),o=n(566);i({target:"Function",proto:!0,forced:Function.bind!==o},{bind:o})},2010:(t,e,n)=>{var i=n(3724),o=n(350).EXISTS,r=n(9504),s=n(2106),a=Function.prototype,l=r(a.toString),c=/function\b(?:\s|\/\*[\S\s]*?\*\/|\/\/[^\n\r]*[\n\r]+)*([^\s(/]*)/,u=r(c.exec);i&&!o&&s(a,"name",{configurable:!0,get:function(){try{return u(c,l(this))[1]}catch(t){return""}}})},3110:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(8745),s=n(9565),a=n(9504),l=n(9039),c=n(4901),u=n(757),h=n(7680),d=n(6933),p=n(4495),f=String,m=o("JSON","stringify"),y=a(/./.exec),v=a("".charAt),b=a("".charCodeAt),g=a("".replace),_=a(1..toString),w=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,k=/^[\uDC00-\uDFFF]$/,O=!p||l((function(){var t=o("Symbol")("stringify detection");return"[null]"!==m([t])||"{}"!==m({a:t})||"{}"!==m(Object(t))})),j=l((function(){return'"\\udf06\\ud834"'!==m("\udf06\ud834")||'"\\udead"'!==m("\udead")})),C=function(t,e){var n=h(arguments),i=d(e);if(c(i)||void 0!==t&&!u(t))return n[1]=function(t,e){if(c(i)&&(e=s(i,this,f(t),e)),!u(e))return e},r(m,null,n)},E=function(t,e,n){var i=v(n,e-1),o=v(n,e+1);return y(x,t)&&!y(k,o)||y(k,t)&&!y(x,i)?"\\u"+_(b(t,0),16):t};m&&i({target:"JSON",stat:!0,arity:3,forced:O||j},{stringify:function(t,e,n){var i=h(arguments),o=r(O?C:m,null,i);return j&&"string"==typeof o?g(o,w,E):o}})},4731:(t,e,n)=>{var i=n(4475);n(687)(i.JSON,"JSON",!0)},479:(t,e,n)=>{n(687)(Math,"Math",!0)},2892:(t,e,n)=>{var i=n(6518),o=n(6395),r=n(3724),s=n(4475),a=n(9167),l=n(9504),c=n(2796),u=n(9297),h=n(3167),d=n(1625),p=n(757),f=n(2777),m=n(9039),y=n(8480).f,v=n(7347).f,b=n(4913).f,g=n(1240),_=n(3802).trim,w="Number",x=s[w],k=a[w],O=x.prototype,j=s.TypeError,C=l("".slice),E=l("".charCodeAt),P=c(w,!x(" 0o1")||!x("0b1")||x("+0x1")),L=function(t){var e,n=arguments.length<1?0:x(function(t){var e=f(t,"number");return"bigint"==typeof e?e:function(t){var e,n,i,o,r,s,a,l,c=f(t,"number");if(p(c))throw new j("Cannot convert a Symbol value to a number");if("string"==typeof c&&c.length>2)if(c=_(c),43===(e=E(c,0))||45===e){if(88===(n=E(c,2))||120===n)return NaN}else if(48===e){switch(E(c,1)){case 66:case 98:i=2,o=49;break;case 79:case 111:i=8,o=55;break;default:return+c}for(s=(r=C(c,2)).length,a=0;a<s;a++)if((l=E(r,a))<48||l>o)return NaN;return parseInt(r,i)}return+c}(e)}(t));return d(O,e=this)&&m((function(){g(e)}))?h(Object(n),this,L):n};L.prototype=O,P&&!o&&(O.constructor=L),i({global:!0,constructor:!0,wrap:!0,forced:P},{Number:L});var S=function(t,e){for(var n,i=r?y(e):"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(","),o=0;i.length>o;o++)u(e,n=i[o])&&!u(t,n)&&b(t,n,v(e,n))};o&&k&&S(a[w],k),(P||o)&&S(a[w],x)},9868:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(1291),s=n(1240),a=n(2333),l=n(9039),c=RangeError,u=String,h=Math.floor,d=o(a),p=o("".slice),f=o(1..toFixed),m=function(t,e,n){return 0===e?n:e%2==1?m(t,e-1,n*t):m(t*t,e/2,n)},y=function(t,e,n){for(var i=-1,o=n;++i<6;)o+=e*t[i],t[i]=o%1e7,o=h(o/1e7)},v=function(t,e){for(var n=6,i=0;--n>=0;)i+=t[n],t[n]=h(i/e),i=i%e*1e7},b=function(t){for(var e=6,n="";--e>=0;)if(""!==n||0===e||0!==t[e]){var i=u(t[e]);n=""===n?i:n+d("0",7-i.length)+i}return n};i({target:"Number",proto:!0,forced:l((function(){return"0.000"!==f(8e-5,3)||"1"!==f(.9,0)||"1.25"!==f(1.255,2)||"1000000000000000128"!==f(0xde0b6b3a7640080,0)}))||!l((function(){f({})}))},{toFixed:function(t){var e,n,i,o,a=s(this),l=r(t),h=[0,0,0,0,0,0],f="",g="0";if(l<0||l>20)throw new c("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return u(a);if(a<0&&(f="-",a=-a),a>1e-21)if(n=(e=function(t){for(var e=0,n=t;n>=4096;)e+=12,n/=4096;for(;n>=2;)e+=1,n/=2;return e}(a*m(2,69,1))-69)<0?a*m(2,-e,1):a/m(2,e,1),n*=4503599627370496,(e=52-e)>0){for(y(h,0,n),i=l;i>=7;)y(h,1e7,0),i-=7;for(y(h,m(10,i,1),0),i=e-1;i>=23;)v(h,1<<23),i-=23;v(h,1<<i),y(h,1,1),v(h,2),g=b(h)}else y(h,0,n),y(h,1<<-e,0),g=b(h)+d("0",l);return l>0?f+((o=g.length)<=l?"0."+d("0",l-o)+g:p(g,0,o-l)+"."+p(g,o-l)):f+g}})},9085:(t,e,n)=>{var i=n(6518),o=n(4213);i({target:"Object",stat:!0,arity:2,forced:Object.assign!==o},{assign:o})},9904:(t,e,n)=>{n(6518)({target:"Object",stat:!0,sham:!n(3724)},{create:n(2360)})},7945:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(6801).f;i({target:"Object",stat:!0,forced:Object.defineProperties!==r,sham:!o},{defineProperties:r})},4185:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(4913).f;i({target:"Object",stat:!0,forced:Object.defineProperty!==r,sham:!o},{defineProperty:r})},5506:(t,e,n)=>{var i=n(6518),o=n(2357).entries;i({target:"Object",stat:!0},{entries:function(t){return o(t)}})},3851:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(5397),s=n(7347).f,a=n(3724);i({target:"Object",stat:!0,forced:!a||o((function(){s(1)})),sham:!a},{getOwnPropertyDescriptor:function(t,e){return s(r(t),e)}})},1278:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(5031),s=n(5397),a=n(7347),l=n(4659);i({target:"Object",stat:!0,sham:!o},{getOwnPropertyDescriptors:function(t){for(var e,n,i=s(t),o=a.f,c=r(i),u={},h=0;c.length>h;)void 0!==(n=o(i,e=c[h++]))&&l(u,e,n);return u}})},9773:(t,e,n)=>{var i=n(6518),o=n(4495),r=n(9039),s=n(3717),a=n(8981);i({target:"Object",stat:!0,forced:!o||r((function(){s.f(1)}))},{getOwnPropertySymbols:function(t){var e=s.f;return e?e(a(t)):[]}})},875:(t,e,n)=>{var i=n(6518),o=n(9039),r=n(8981),s=n(2787),a=n(2211);i({target:"Object",stat:!0,forced:o((function(){s(1)})),sham:!a},{getPrototypeOf:function(t){return s(r(t))}})},9432:(t,e,n)=>{var i=n(6518),o=n(8981),r=n(1072);i({target:"Object",stat:!0,forced:n(9039)((function(){r(1)}))},{keys:function(t){return r(o(t))}})},287:(t,e,n)=>{n(6518)({target:"Object",stat:!0},{setPrototypeOf:n(2967)})},6099:(t,e,n)=>{var i=n(2140),o=n(6840),r=n(3179);i||o(Object.prototype,"toString",r,{unsafe:!0})},6034:(t,e,n)=>{var i=n(6518),o=n(2357).values;i({target:"Object",stat:!0},{values:function(t){return o(t)}})},8459:(t,e,n)=>{var i=n(6518),o=n(3904);i({global:!0,forced:parseFloat!==o},{parseFloat:o})},8940:(t,e,n)=>{var i=n(6518),o=n(2703);i({global:!0,forced:parseInt!==o},{parseInt:o})},6499:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(9306),s=n(6043),a=n(1103),l=n(2652);i({target:"Promise",stat:!0,forced:n(537)},{all:function(t){var e=this,n=s.f(e),i=n.resolve,c=n.reject,u=a((function(){var n=r(e.resolve),s=[],a=0,u=1;l(t,(function(t){var r=a++,l=!1;u++,o(n,e,t).then((function(t){l||(l=!0,s[r]=t,--u||i(s))}),c)})),--u||i(s)}));return u.error&&c(u.value),n.promise}})},2003:(t,e,n)=>{var i=n(6518),o=n(6395),r=n(916).CONSTRUCTOR,s=n(550),a=n(7751),l=n(4901),c=n(6840),u=s&&s.prototype;if(i({target:"Promise",proto:!0,forced:r,real:!0},{catch:function(t){return this.then(void 0,t)}}),!o&&l(s)){var h=a("Promise").prototype.catch;u.catch!==h&&c(u,"catch",h,{unsafe:!0})}},436:(t,e,n)=>{var i,o,r,s=n(6518),a=n(6395),l=n(9088),c=n(4475),u=n(9565),h=n(6840),d=n(2967),p=n(687),f=n(7633),m=n(9306),y=n(4901),v=n(34),b=n(679),g=n(2293),_=n(9225).set,w=n(1955),x=n(3138),k=n(1103),O=n(8265),j=n(1181),C=n(550),E=n(916),P=n(6043),L="Promise",S=E.CONSTRUCTOR,T=E.REJECTION_EVENT,A=E.SUBCLASSING,R=j.getterFor(L),B=j.set,I=C&&C.prototype,z=C,M=I,N=c.TypeError,D=c.document,F=c.process,H=P.f,V=H,Z=!!(D&&D.createEvent&&c.dispatchEvent),q="unhandledrejection",U=function(t){var e;return!(!v(t)||!y(e=t.then))&&e},W=function(t,e){var n,i,o,r=e.value,s=1===e.state,a=s?t.ok:t.fail,l=t.resolve,c=t.reject,h=t.domain;try{a?(s||(2===e.rejection&&K(e),e.rejection=1),!0===a?n=r:(h&&h.enter(),n=a(r),h&&(h.exit(),o=!0)),n===t.promise?c(new N("Promise-chain cycle")):(i=U(n))?u(i,n,l,c):l(n)):c(r)}catch(t){h&&!o&&h.exit(),c(t)}},G=function(t,e){t.notified||(t.notified=!0,w((function(){for(var n,i=t.reactions;n=i.get();)W(n,t);t.notified=!1,e&&!t.rejection&&$(t)})))},J=function(t,e,n){var i,o;Z?((i=D.createEvent("Event")).promise=e,i.reason=n,i.initEvent(t,!1,!0),c.dispatchEvent(i)):i={promise:e,reason:n},!T&&(o=c["on"+t])?o(i):t===q&&x("Unhandled promise rejection",n)},$=function(t){u(_,c,(function(){var e,n=t.facade,i=t.value;if(Y(t)&&(e=k((function(){l?F.emit("unhandledRejection",i,n):J(q,n,i)})),t.rejection=l||Y(t)?2:1,e.error))throw e.value}))},Y=function(t){return 1!==t.rejection&&!t.parent},K=function(t){u(_,c,(function(){var e=t.facade;l?F.emit("rejectionHandled",e):J("rejectionhandled",e,t.value)}))},X=function(t,e,n){return function(i){t(e,i,n)}},Q=function(t,e,n){t.done||(t.done=!0,n&&(t=n),t.value=e,t.state=2,G(t,!0))},tt=function(t,e,n){if(!t.done){t.done=!0,n&&(t=n);try{if(t.facade===e)throw new N("Promise can't be resolved itself");var i=U(e);i?w((function(){var n={done:!1};try{u(i,e,X(tt,n,t),X(Q,n,t))}catch(e){Q(n,e,t)}})):(t.value=e,t.state=1,G(t,!1))}catch(e){Q({done:!1},e,t)}}};if(S&&(M=(z=function(t){b(this,M),m(t),u(i,this);var e=R(this);try{t(X(tt,e),X(Q,e))}catch(t){Q(e,t)}}).prototype,(i=function(t){B(this,{type:L,done:!1,notified:!1,parent:!1,reactions:new O,rejection:!1,state:0,value:void 0})}).prototype=h(M,"then",(function(t,e){var n=R(this),i=H(g(this,z));return n.parent=!0,i.ok=!y(t)||t,i.fail=y(e)&&e,i.domain=l?F.domain:void 0,0===n.state?n.reactions.add(i):w((function(){W(i,n)})),i.promise})),o=function(){var t=new i,e=R(t);this.promise=t,this.resolve=X(tt,e),this.reject=X(Q,e)},P.f=H=function(t){return t===z||void 0===t?new o(t):V(t)},!a&&y(C)&&I!==Object.prototype)){r=I.then,A||h(I,"then",(function(t,e){var n=this;return new z((function(t,e){u(r,n,t,e)})).then(t,e)}),{unsafe:!0});try{delete I.constructor}catch(t){}d&&d(I,M)}s({global:!0,constructor:!0,wrap:!0,forced:S},{Promise:z}),p(z,L,!1,!0),f(L)},3362:(t,e,n)=>{n(436),n(6499),n(2003),n(7743),n(1481),n(280)},7743:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(9306),s=n(6043),a=n(1103),l=n(2652);i({target:"Promise",stat:!0,forced:n(537)},{race:function(t){var e=this,n=s.f(e),i=n.reject,c=a((function(){var s=r(e.resolve);l(t,(function(t){o(s,e,t).then(n.resolve,i)}))}));return c.error&&i(c.value),n.promise}})},1481:(t,e,n)=>{var i=n(6518),o=n(6043);i({target:"Promise",stat:!0,forced:n(916).CONSTRUCTOR},{reject:function(t){var e=o.f(this);return(0,e.reject)(t),e.promise}})},280:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(6395),s=n(550),a=n(916).CONSTRUCTOR,l=n(3438),c=o("Promise"),u=r&&!a;i({target:"Promise",stat:!0,forced:r||a},{resolve:function(t){return l(u&&this===c?s:this,t)}})},825:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(8745),s=n(566),a=n(5548),l=n(8551),c=n(34),u=n(2360),h=n(9039),d=o("Reflect","construct"),p=Object.prototype,f=[].push,m=h((function(){function t(){}return!(d((function(){}),[],t)instanceof t)})),y=!h((function(){d((function(){}))})),v=m||y;i({target:"Reflect",stat:!0,forced:v,sham:v},{construct:function(t,e){a(t),l(e);var n=arguments.length<3?t:a(arguments[2]);if(y&&!m)return d(t,e,n);if(t===n){switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3])}var i=[null];return r(f,i,e),new(r(s,t,i))}var o=n.prototype,h=u(c(o)?o:p),v=r(t,h,e);return c(v)?v:h}})},888:(t,e,n)=>{var i=n(6518),o=n(9565),r=n(34),s=n(8551),a=n(6575),l=n(7347),c=n(2787);i({target:"Reflect",stat:!0},{get:function t(e,n){var i,u,h=arguments.length<3?e:arguments[2];return s(e)===h?e[n]:(i=l.f(e,n))?a(i)?i.value:void 0===i.get?void 0:o(i.get,h):r(u=c(e))?t(u,n,h):void 0}})},4864:(t,e,n)=>{var i=n(3724),o=n(4475),r=n(9504),s=n(2796),a=n(3167),l=n(6699),c=n(2360),u=n(8480).f,h=n(1625),d=n(788),p=n(655),f=n(1034),m=n(8429),y=n(1056),v=n(6840),b=n(9039),g=n(9297),_=n(1181).enforce,w=n(7633),x=n(8227),k=n(3635),O=n(8814),j=x("match"),C=o.RegExp,E=C.prototype,P=o.SyntaxError,L=r(E.exec),S=r("".charAt),T=r("".replace),A=r("".indexOf),R=r("".slice),B=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,I=/a/g,z=/a/g,M=new C(I)!==I,N=m.MISSED_STICKY,D=m.UNSUPPORTED_Y;if(s("RegExp",i&&(!M||N||k||O||b((function(){return z[j]=!1,C(I)!==I||C(z)===z||"/a/i"!==String(C(I,"i"))}))))){for(var F=function(t,e){var n,i,o,r,s,u,m=h(E,this),y=d(t),v=void 0===e,b=[],w=t;if(!m&&y&&v&&t.constructor===F)return t;if((y||h(E,t))&&(t=t.source,v&&(e=f(w))),t=void 0===t?"":p(t),e=void 0===e?"":p(e),w=t,k&&"dotAll"in I&&(i=!!e&&A(e,"s")>-1)&&(e=T(e,/s/g,"")),n=e,N&&"sticky"in I&&(o=!!e&&A(e,"y")>-1)&&D&&(e=T(e,/y/g,"")),O&&(r=function(t){for(var e,n=t.length,i=0,o="",r=[],s=c(null),a=!1,l=!1,u=0,h="";i<=n;i++){if("\\"===(e=S(t,i)))e+=S(t,++i);else if("]"===e)a=!1;else if(!a)switch(!0){case"["===e:a=!0;break;case"("===e:L(B,R(t,i+1))&&(i+=2,l=!0),o+=e,u++;continue;case">"===e&&l:if(""===h||g(s,h))throw new P("Invalid capture group name");s[h]=!0,r[r.length]=[h,u],l=!1,h="";continue}l?h+=e:o+=e}return[o,r]}(t),t=r[0],b=r[1]),s=a(C(t,e),m?this:E,F),(i||o||b.length)&&(u=_(s),i&&(u.dotAll=!0,u.raw=F(function(t){for(var e,n=t.length,i=0,o="",r=!1;i<=n;i++)"\\"!==(e=S(t,i))?r||"."!==e?("["===e?r=!0:"]"===e&&(r=!1),o+=e):o+="[\\s\\S]":o+=e+S(t,++i);return o}(t),n)),o&&(u.sticky=!0),b.length&&(u.groups=b)),t!==w)try{l(s,"source",""===w?"(?:)":w)}catch(t){}return s},H=u(C),V=0;H.length>V;)y(F,C,H[V++]);E.constructor=F,F.prototype=E,v(o,"RegExp",F,{constructor:!0})}w("RegExp")},7495:(t,e,n)=>{var i=n(6518),o=n(7323);i({target:"RegExp",proto:!0,forced:/./.exec!==o},{exec:o})},8781:(t,e,n)=>{var i=n(350).PROPER,o=n(6840),r=n(8551),s=n(655),a=n(9039),l=n(1034),c="toString",u=RegExp.prototype,h=u[c],d=a((function(){return"/a/b"!==h.call({source:"a",flags:"b"})})),p=i&&h.name!==c;(d||p)&&o(u,c,(function(){var t=r(this);return"/"+s(t.source)+"/"+s(l(t))}),{unsafe:!0})},1699:(t,e,n)=>{var i=n(6518),o=n(9504),r=n(5749),s=n(7750),a=n(655),l=n(1436),c=o("".indexOf);i({target:"String",proto:!0,forced:!l("includes")},{includes:function(t){return!!~c(a(s(this)),a(r(t)),arguments.length>1?arguments[1]:void 0)}})},7764:(t,e,n)=>{var i=n(8183).charAt,o=n(655),r=n(1181),s=n(1088),a=n(2529),l="String Iterator",c=r.set,u=r.getterFor(l);s(String,"String",(function(t){c(this,{type:l,string:o(t),index:0})}),(function(){var t,e=u(this),n=e.string,o=e.index;return o>=n.length?a(void 0,!0):(t=i(n,o),e.index+=t.length,a(t,!1))}))},1761:(t,e,n)=>{var i=n(9565),o=n(9228),r=n(8551),s=n(4117),a=n(8014),l=n(655),c=n(7750),u=n(5966),h=n(7829),d=n(6682);o("match",(function(t,e,n){return[function(e){var n=c(this),o=s(e)?void 0:u(e,t);return o?i(o,e,n):new RegExp(e)[t](l(n))},function(t){var i=r(this),o=l(t),s=n(e,i,o);if(s.done)return s.value;if(!i.global)return d(i,o);var c=i.unicode;i.lastIndex=0;for(var u,p=[],f=0;null!==(u=d(i,o));){var m=l(u[0]);p[f]=m,""===m&&(i.lastIndex=h(o,a(i.lastIndex),c)),f++}return 0===f?null:p}]}))},5440:(t,e,n)=>{var i=n(8745),o=n(9565),r=n(9504),s=n(9228),a=n(9039),l=n(8551),c=n(4901),u=n(4117),h=n(1291),d=n(8014),p=n(655),f=n(7750),m=n(7829),y=n(5966),v=n(2478),b=n(6682),g=n(8227)("replace"),_=Math.max,w=Math.min,x=r([].concat),k=r([].push),O=r("".indexOf),j=r("".slice),C="$0"==="a".replace(/./,"$0"),E=!!/./[g]&&""===/./[g]("a","$0");s("replace",(function(t,e,n){var r=E?"$":"$0";return[function(t,n){var i=f(this),r=u(t)?void 0:y(t,g);return r?o(r,t,i,n):o(e,p(i),t,n)},function(t,o){var s=l(this),a=p(t);if("string"==typeof o&&-1===O(o,r)&&-1===O(o,"$<")){var u=n(e,s,a,o);if(u.done)return u.value}var f=c(o);f||(o=p(o));var y,g=s.global;g&&(y=s.unicode,s.lastIndex=0);for(var C,E=[];null!==(C=b(s,a))&&(k(E,C),g);)""===p(C[0])&&(s.lastIndex=m(a,d(s.lastIndex),y));for(var P,L="",S=0,T=0;T<E.length;T++){for(var A,R=p((C=E[T])[0]),B=_(w(h(C.index),a.length),0),I=[],z=1;z<C.length;z++)k(I,void 0===(P=C[z])?P:String(P));var M=C.groups;if(f){var N=x([R],I,B,a);void 0!==M&&k(N,M),A=p(i(o,void 0,N))}else A=v(R,a,B,I,M,o);B>=S&&(L+=j(a,S,B)+A,S=B+R.length)}return L+j(a,S)}]}),!!a((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$<a>")}))||!C||E)},1392:(t,e,n)=>{var i,o=n(6518),r=n(7476),s=n(7347).f,a=n(8014),l=n(655),c=n(5749),u=n(7750),h=n(1436),d=n(6395),p=r("".slice),f=Math.min,m=h("startsWith");o({target:"String",proto:!0,forced:!(!d&&!m&&(i=s(String.prototype,"startsWith"),i&&!i.writable)||m)},{startsWith:function(t){var e=l(u(this));c(t);var n=a(f(arguments.length>1?arguments[1]:void 0,e.length)),i=l(t);return p(e,n,n+i.length)===i}})},2762:(t,e,n)=>{var i=n(6518),o=n(3802).trim;i({target:"String",proto:!0,forced:n(706)("trim")},{trim:function(){return o(this)}})},6412:(t,e,n)=>{n(511)("asyncIterator")},6761:(t,e,n)=>{var i=n(6518),o=n(4475),r=n(9565),s=n(9504),a=n(6395),l=n(3724),c=n(4495),u=n(9039),h=n(9297),d=n(1625),p=n(8551),f=n(5397),m=n(6969),y=n(655),v=n(6980),b=n(2360),g=n(1072),_=n(8480),w=n(298),x=n(3717),k=n(7347),O=n(4913),j=n(6801),C=n(8773),E=n(6840),P=n(2106),L=n(5745),S=n(6119),T=n(421),A=n(3392),R=n(8227),B=n(1951),I=n(511),z=n(8242),M=n(687),N=n(1181),D=n(9213).forEach,F=S("hidden"),H="Symbol",V="prototype",Z=N.set,q=N.getterFor(H),U=Object[V],W=o.Symbol,G=W&&W[V],J=o.RangeError,$=o.TypeError,Y=o.QObject,K=k.f,X=O.f,Q=w.f,tt=C.f,et=s([].push),nt=L("symbols"),it=L("op-symbols"),ot=L("wks"),rt=!Y||!Y[V]||!Y[V].findChild,st=function(t,e,n){var i=K(U,e);i&&delete U[e],X(t,e,n),i&&t!==U&&X(U,e,i)},at=l&&u((function(){return 7!==b(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?st:X,lt=function(t,e){var n=nt[t]=b(G);return Z(n,{type:H,tag:t,description:e}),l||(n.description=e),n},ct=function(t,e,n){t===U&&ct(it,e,n),p(t);var i=m(e);return p(n),h(nt,i)?(n.enumerable?(h(t,F)&&t[F][i]&&(t[F][i]=!1),n=b(n,{enumerable:v(0,!1)})):(h(t,F)||X(t,F,v(1,b(null))),t[F][i]=!0),at(t,i,n)):X(t,i,n)},ut=function(t,e){p(t);var n=f(e),i=g(n).concat(ft(n));return D(i,(function(e){l&&!r(ht,n,e)||ct(t,e,n[e])})),t},ht=function(t){var e=m(t),n=r(tt,this,e);return!(this===U&&h(nt,e)&&!h(it,e))&&(!(n||!h(this,e)||!h(nt,e)||h(this,F)&&this[F][e])||n)},dt=function(t,e){var n=f(t),i=m(e);if(n!==U||!h(nt,i)||h(it,i)){var o=K(n,i);return!o||!h(nt,i)||h(n,F)&&n[F][i]||(o.enumerable=!0),o}},pt=function(t){var e=Q(f(t)),n=[];return D(e,(function(t){h(nt,t)||h(T,t)||et(n,t)})),n},ft=function(t){var e=t===U,n=Q(e?it:f(t)),i=[];return D(n,(function(t){!h(nt,t)||e&&!h(U,t)||et(i,nt[t])})),i};c||(E(G=(W=function(){if(d(G,this))throw new $("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,e=A(t),n=function(t){var i=void 0===this?o:this;i===U&&r(n,it,t),h(i,F)&&h(i[F],e)&&(i[F][e]=!1);var s=v(1,t);try{at(i,e,s)}catch(t){if(!(t instanceof J))throw t;st(i,e,s)}};return l&&rt&&at(U,e,{configurable:!0,set:n}),lt(e,t)})[V],"toString",(function(){return q(this).tag})),E(W,"withoutSetter",(function(t){return lt(A(t),t)})),C.f=ht,O.f=ct,j.f=ut,k.f=dt,_.f=w.f=pt,x.f=ft,B.f=function(t){return lt(R(t),t)},l&&(P(G,"description",{configurable:!0,get:function(){return q(this).description}}),a||E(U,"propertyIsEnumerable",ht,{unsafe:!0}))),i({global:!0,constructor:!0,wrap:!0,forced:!c,sham:!c},{Symbol:W}),D(g(ot),(function(t){I(t)})),i({target:H,stat:!0,forced:!c},{useSetter:function(){rt=!0},useSimple:function(){rt=!1}}),i({target:"Object",stat:!0,forced:!c,sham:!l},{create:function(t,e){return void 0===e?b(t):ut(b(t),e)},defineProperty:ct,defineProperties:ut,getOwnPropertyDescriptor:dt}),i({target:"Object",stat:!0,forced:!c},{getOwnPropertyNames:pt}),z(),M(W,H),T[F]=!0},9463:(t,e,n)=>{var i=n(6518),o=n(3724),r=n(4475),s=n(9504),a=n(9297),l=n(4901),c=n(1625),u=n(655),h=n(2106),d=n(7740),p=r.Symbol,f=p&&p.prototype;if(o&&l(p)&&(!("description"in f)||void 0!==p().description)){var m={},y=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:u(arguments[0]),e=c(f,this)?new p(t):void 0===t?p():p(t);return""===t&&(m[e]=!0),e};d(y,p),y.prototype=f,f.constructor=y;var v="Symbol(description detection)"===String(p("description detection")),b=s(f.valueOf),g=s(f.toString),_=/^Symbol\((.*)\)[^)]+$/,w=s("".replace),x=s("".slice);h(f,"description",{configurable:!0,get:function(){var t=b(this);if(a(m,t))return"";var e=g(t),n=v?x(e,7,-1):w(e,_,"$1");return""===n?void 0:n}}),i({global:!0,constructor:!0,forced:!0},{Symbol:y})}},1510:(t,e,n)=>{var i=n(6518),o=n(7751),r=n(9297),s=n(655),a=n(5745),l=n(1296),c=a("string-to-symbol-registry"),u=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=s(t);if(r(c,e))return c[e];var n=o("Symbol")(e);return c[e]=n,u[n]=e,n}})},2259:(t,e,n)=>{n(511)("iterator")},2675:(t,e,n)=>{n(6761),n(1510),n(7812),n(3110),n(9773)},7812:(t,e,n)=>{var i=n(6518),o=n(9297),r=n(757),s=n(6823),a=n(5745),l=n(1296),c=a("symbol-to-string-registry");i({target:"Symbol",stat:!0,forced:!l},{keyFor:function(t){if(!r(t))throw new TypeError(s(t)+" is not a symbol");if(o(c,t))return c[t]}})},5700:(t,e,n)=>{var i=n(511),o=n(8242);i("toPrimitive"),o()},8125:(t,e,n)=>{var i=n(7751),o=n(511),r=n(687);o("toStringTag"),r(i("Symbol"),"Symbol")},3500:(t,e,n)=>{var i=n(4475),o=n(7400),r=n(9296),s=n(235),a=n(6699),l=function(t){if(t&&t.forEach!==s)try{a(t,"forEach",s)}catch(e){t.forEach=s}};for(var c in o)o[c]&&l(i[c]&&i[c].prototype);l(r)},2953:(t,e,n)=>{var i=n(4475),o=n(7400),r=n(9296),s=n(3792),a=n(6699),l=n(687),c=n(8227)("iterator"),u=s.values,h=function(t,e){if(t){if(t[c]!==u)try{a(t,c,u)}catch(e){t[c]=u}if(l(t,e,!0),o[e])for(var n in s)if(t[n]!==s[n])try{a(t,n,s[n])}catch(e){t[n]=s[n]}}};for(var d in o)h(i[d]&&i[d].prototype,d);h(r,"DOMTokenList")},5575:(t,e,n)=>{var i=n(6518),o=n(4475),r=n(9472)(o.setInterval,!0);i({global:!0,bind:!0,forced:o.setInterval!==r},{setInterval:r})},4599:(t,e,n)=>{var i=n(6518),o=n(4475),r=n(9472)(o.setTimeout,!0);i({global:!0,bind:!0,forced:o.setTimeout!==r},{setTimeout:r})},6031:(t,e,n)=>{n(5575),n(4599)}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var i={};return(()=>{n.r(i),n.d(i,{JSONEditor:()=>Ka}),n(2675),n(9463),n(6412),n(2259),n(5700),n(8125),n(8706),n(113),n(1629),n(3418),n(4346),n(3792),n(2712),n(4490),n(4782),n(739),n(9572),n(3288),n(2010),n(4731),n(479),n(2892),n(9085),n(9904),n(4185),n(875),n(9432),n(287),n(6099),n(6034),n(3362),n(7495),n(8781),n(7764),n(3500),n(2953),n(5506),n(4864),n(5440),n(4423);var t=["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"],e=[function(t){return"string"===t.type&&"color"===t.format&&"colorpicker"},function(t){return"string"===t.type&&["ip","ipv4","ipv6","hostname"].includes(t.format)&&"ip"},function(e){return"string"===e.type&&t.includes(e.format)&&"ace"},function(t){return"string"===t.type&&["xhtml","bbcode"].includes(t.format)&&"sceditor"},function(t){return"string"===t.type&&"markdown"===t.format&&"simplemde"},function(t){return"string"===t.type&&"jodit"===t.format&&"jodit"},function(t){return"string"===t.type&&"autocomplete"===t.format&&"autocomplete"},function(t){return"string"===t.type&&"uuid"===t.format&&"uuid"},function(t){return"info"===t.format&&"info"},function(t){return"button"===t.format&&"button"},function(t){if(("integer"===t.type||"number"===t.type)&&"stepper"===t.format)return"stepper"},function(t){if(t.links)for(var e=0;e<t.links.length;e++)if(t.links[e].rel&&"describedby"===t.links[e].rel.toLowerCase())return"describedBy"},function(t){return["string","integer"].includes(t.type)&&["starrating","rating"].includes(t.format)&&"starrating"},function(t){return["string","integer"].includes(t.type)&&["date","time","datetime-local"].includes(t.format)&&"datetime"},function(t){var e,n;return(t.oneOf||t.anyOf)&&!0===(null===(e=null===(n=t.options)||void 0===n?void 0:n.switcher)||void 0===e||e)&&"multiple"},function(t){return t.if&&"multiple"},function(t,e){if(t.items&&(t.items=e.expandSchema(t.items)),"array"===t.type&&t.items&&!Array.isArray(t.items)&&["string","number","integer"].includes(t.items.type)){if("choices"===t.format)return"arrayChoices";if(t.uniqueItems){if("selectize"===t.format)return"arraySelectize";if("select2"===t.format)return"arraySelect2";if(t.items.enum)return"multiselect"}}},function(t){if(t.enum){if("array"===t.type||"object"===t.type)return"enum";if("number"===t.type||"integer"===t.type||"string"===t.type)return"radio"===t.format?"radio":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"}},function(t){if(t.enumSource)return"radio"===t.format?"radio":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"},function(t){return"array"===t.type&&"table"===t.format&&"table"},function(t){return"string"===t.type&&"url"===t.format&&window.FileReader&&t.options&&t.options.upload===Object(t.options.upload)&&"upload"},function(t){return"string"===t.type&&t.media&&"base64"===t.media.binaryEncoding&&"base64"},function(t){return"any"===t.type&&"multiple"},function(t){if("boolean"===t.type)return"checkbox"===t.format||t.options&&t.options.checkbox?"checkbox":"select2"===t.format?"select2":"selectize"===t.format?"selectize":"choices"===t.format?"choices":"select"},function(t){return"string"===t.type&&"signature"===t.format&&"signature"},function(t){return"string"==typeof t.type&&["string","number","integer","boolean","null","array","object"].includes(t.type)&&t.type},function(t){return!t.type&&t.properties&&"object"},function(t){return"string"!=typeof t.type&&"multiple"},function(t){return"string"==typeof t.type&&"string"}];function o(t,e,n){var i;return i=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(e),(e="symbol"==r(i)?i:i+"")in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t){return!(null===t||"object"!==r(t)||t.nodeType||t===t.window||t.constructor&&!h(t.constructor.prototype,"isPrototypeOf"))}function a(t){return s(t)?l({},t):Array.isArray(t)?t.map(a):t}function l(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return n.forEach((function(e){e&&Object.keys(e).forEach((function(n){e[n]&&s(e[n])?(h(t,n)||(t[n]={}),l(t[n],e[n])):Array.isArray(e[n])?t[n]=a(e[n]):t[n]=e[n]}))})),t}function c(t,e){var n=document.createEvent("HTMLEvents");n.initEvent(e,!0,!0),t.dispatchEvent(n)}function u(t){return t&&("[object ShadowRoot]"===t.toString()?t:u(t.parentNode))}function h(t,e){return t&&Object.prototype.hasOwnProperty.call(t,e)}n(4170),n(3851),n(825),n(888),n(8598),n(1699),n(1761),n(5276),n(5086),n(1392),n(2062),n(8459),n(8940);var d=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,p=/^\s*(-|\+)?(\d+)\s*$/;function f(){var t=(new Date).getTime();return"undefined"!=typeof performance&&"function"==typeof performance.now&&(t+=performance.now()),"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var n=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===e?n:3&n|8).toString(16)}))}function m(t){return t&&"object"===r(t)&&!Array.isArray(t)}function y(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];if(!n.length)return t;var r=n.shift();if(m(t)&&m(r))for(var s in r)m(r[s])?(t[s]||Object.assign(t,o({},s,{})),y(t[s],r[s])):Object.assign(t,o({},s,r[s]));return y.apply(void 0,[t].concat(n))}function v(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function b(t){return b="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},b(t)}function g(t){var e=function(t){if("object"!=b(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=b(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==b(e)?e:e+""}var _=function(){return t=function t(e,n){var i,o;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.defaults=n,this.jsoneditor=e.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=e.schema,this.schema=this.jsoneditor.expandSchema(this.original_schema),this.active=!0,this.isUiOnly=!1,this.options=l({},this.options||{},this.schema.options||{},e.schema.options||{},e),this.enforceConstEnabled=null!==(i=this.options.enforce_const)&&void 0!==i?i:this.jsoneditor.options.enforce_const,this.formname=this.jsoneditor.options.form_name_root||"root",e.path||this.schema.id||(this.schema.id=this.formname),this.path=e.path||this.formname,this.formname=e.formname||this.path.replace(/\.([^.]+)/g,"[$1]"),this.parent=e.parent,this.key=void 0!==this.parent?this.path.split(".").slice(this.parent.path.split(".").length).join("."):this.path,this.link_watchers=[],this.watchLoop=!1,this.optInWidget=null!==(o=this.options.opt_in_widget)&&void 0!==o?o:this.jsoneditor.options.opt_in_widget,e.container&&this.setContainer(e.container),this.registerDependencies()},e=[{key:"onChildEditorChange",value:function(t,e){this.onChange(!0,!1,e)}},{key:"notify",value:function(){this.path&&this.jsoneditor.notifyWatchers(this.path)}},{key:"change",value:function(t){this.parent?this.parent.onChildEditorChange(this,t):this.jsoneditor&&this.jsoneditor.onChange(t)}},{key:"onChange",value:function(t,e,n){this.notify(),e||this.watch_listener&&this.watch_listener(),t&&this.change(n)}},{key:"register",value:function(){if(this.jsoneditor.registerEditor(this),this.input&&!this.label){var t=this.getTitle()||this.formname;this.input.setAttribute("aria-label",t)}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 t=this;this.dependenciesFulfilled=!0;var e=this.options.dependencies;e&&Object.keys(e).forEach((function(e){var n;e.startsWith(t.jsoneditor.root.path)?n=e:((n=t.path.split("."))[n.length-1]=e,n=n.join(".")),t.jsoneditor.watch(n,(function(){t.evaluateDependencies()}))}))}},{key:"evaluateDependencies",value:function(){var t=this,e=this.container||this.control;if(e&&null!==this.jsoneditor){var n=this.options.dependencies;if(n){var i=this.dependenciesFulfilled;this.dependenciesFulfilled=!0,Object.keys(n).forEach((function(e){var i;e.startsWith(t.jsoneditor.root.path)?i=e:((i=t.path.split("."))[i.length-1]=e,i=i.join("."));var o=n[e];t.checkDependency(i,o)})),this.dependenciesFulfilled!==i&&this.notify();var o=this.dependenciesFulfilled?"block":"none";this.options.hidden&&(o="none"),"TD"===e.tagName?Object.keys(e.childNodes).forEach((function(t){return e.childNodes[t].style.display=o})):e.style.display=o}}}},{key:"checkDependency",value:function(t,e){var n=this;if(this.path!==t&&null!==this.jsoneditor){var i=this.jsoneditor.getEditor(t),o=i?i.getValue():void 0;i&&i.dependenciesFulfilled&&o?Array.isArray(e)?this.dependenciesFulfilled=e.some((function(t){if(JSON.stringify(o)===JSON.stringify(t))return!0})):"object"===b(e)?"object"!==b(o)?this.dependenciesFulfilled=e===o:Object.keys(e).some((function(t){return!!h(e,t)&&(h(o,t)&&e[t]===o[t]?void 0:(n.dependenciesFulfilled=!1,!0))})):"string"==typeof e||"number"==typeof e?this.dependenciesFulfilled=this.dependenciesFulfilled&&o===e:"boolean"==typeof e&&(this.dependenciesFulfilled=e?this.dependenciesFulfilled&&(o||o.length>0):this.dependenciesFulfilled&&(!o||0===o.length)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(t){this.container=t,this.setContainerAttributes(),this.schema.id&&this.container.setAttribute("data-schemaid",this.schema.id),this.schema.type&&"string"==typeof this.schema.type&&this.container.setAttribute("data-schematype",this.schema.type),this.container.setAttribute("data-schemapath",this.path)}},{key:"setOptInCheckbox",value:function(){var t,e=this;t="switch"===this.optInWidget?this.theme.getOptInSwitch(this.formname):this.theme.getOptInCheckbox(this.formname),this.optInCheckbox=t.checkbox,this.optInContainer=t.container,this.optInCheckbox.addEventListener("click",(function(){e.isActive()?e.deactivate():e.activate()}));var n=this.jsoneditor.options.show_opt_in,i=void 0!==this.parent.options.show_opt_in,o=i&&!0===this.parent.options.show_opt_in,r=i&&!1===this.parent.options.show_opt_in;(o||!r&&n||!i&&n)&&this.parent&&"object"===this.parent.schema.type&&!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 t=this;if(this.watched={},this.schema.vars&&(this.schema.watch=this.schema.vars),this.watched_values={},this.watch_listener=function(){t.refreshWatchedFieldValues()&&t.onWatchedFieldChange()},h(this.schema,"watch")){var e,n,i,o,r,s=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(a){if(e=t.schema.watch[a],Array.isArray(e)){if(e.length<2)return;n=[e[0]].concat(e[1].split("."))}else n=e.split("."),t.theme.closest(t.container,'[data-schemaid="'.concat(n[0],'"]'))||n.unshift("#");if("#"===(i=n.shift())&&(i=t.jsoneditor.schema.id||t.jsoneditor.root.formname),!(o=t.theme.closest(t.container,'[data-schemaid="'.concat(i,'"]'))))throw new Error("Could not find ancestor node with id ".concat(i));r="".concat(o.getAttribute("data-schemapath"),".").concat(n.join(".")),s.startsWith(r)&&(t.watchLoop=!0),t.jsoneditor.watch(r,t.watch_listener),t.watched[a]=r}))}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(),void 0!==this.description?this.description.parentNode.insertBefore(this.link_holder,this.description):this.container.appendChild(this.link_holder),this.schema.links))for(var t=0;t<this.schema.links.length;t++)this.addLink(this.getLink(this.schema.links[t]))}},{key:"onMove",value:function(){}},{key:"getButton",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:[],o="json-editor-btn-".concat(e);e=this.iconlib?this.iconlib.getIcon(e):null,t=this.translate(t,i),n=this.translate(n,i),!e&&n&&(t=n,n=null);var r=this.theme.getButton(t,e,n);return r.classList.add(o),r}},{key:"setButtonText",value:function(t,e,n,i){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:[];return n=this.iconlib?this.iconlib.getIcon(n):null,e=this.translate(e,o),i=this.translate(i,o),!n&&i&&(e=i,i=null),this.theme.setButtonText(t,e,n,i)}},{key:"addLink",value:function(t){this.link_holder&&this.link_holder.appendChild(t)}},{key:"getLink",value:function(t){var e,n,i=(t.mediaType||"application/javascript").split("/")[0],o=this.jsoneditor.compileTemplate(t.href,this.template_engine),r=this.jsoneditor.compileTemplate(t.rel?t.rel:t.href,this.template_engine),s=null;if(t.download&&(s=t.download),s&&!0!==s&&(s=this.jsoneditor.compileTemplate(s,this.template_engine)),"image"===i){e=this.theme.getBlockLinkHolder(),(n=document.createElement("a")).setAttribute("target","_blank");var a=document.createElement("img");this.theme.createImageLink(e,n,a),this.link_watchers.push((function(t){var e=o(t),i=r(t);n.setAttribute("href",e),n.setAttribute("title",i||e),a.setAttribute("src",e)}))}else if(["audio","video"].includes(i)){e=this.theme.getBlockLinkHolder(),(n=this.theme.getBlockLink()).setAttribute("target","_blank");var l=document.createElement(i);l.setAttribute("controls","controls"),this.theme.createMediaLink(e,n,l),this.link_watchers.push((function(t){var e=o(t),i=r(t);n.setAttribute("href",e),n.textContent=i||e,l.setAttribute("src",e)}))}else n=e=this.theme.getBlockLink(),e.setAttribute("target","_blank"),e.textContent=t.rel,e.style.display="none",this.link_watchers.push((function(t){var n=o(t),i=r(t);n&&(e.style.display=""),e.setAttribute("href",n),e.textContent=i||n}));return s&&n&&(!0===s?n.setAttribute("download",""):this.link_watchers.push((function(t){n.setAttribute("download",s(t))}))),t.class&&t.class.split(" ").forEach((function(t){n.classList.add(t)})),e}},{key:"refreshWatchedFieldValues",value:function(){var t=this;if(this.watched_values){var e={},n=!1;return this.watched&&Object.keys(this.watched).forEach((function(i){var o=t.jsoneditor.getEditor(t.watched[i]),r=o?o.getValue():null;t.watched_values[i]!==r&&(n=!0),e[i]=r})),e.self=this.getValue(),this.watched_values.self!==e.self&&(n=!0),this.watched_values=e,n}}},{key:"getWatchedFieldValues",value:function(){return this.watched_values}},{key:"updateHeaderText",value:function(){if(this.header){var t=this.getHeaderText();if(this.header.children.length){for(var e=0;e<this.header.childNodes.length;e++)if(3===this.header.childNodes[e].nodeType){this.header.childNodes[e].nodeValue=this.cleanText(t);break}}else window.DOMPurify?this.header.innerHTML=window.DOMPurify.sanitize(t):this.header.textContent=this.cleanText(t)}}},{key:"getHeaderText",value:function(t){return this.header_text?this.header_text:t?this.translateProperty(this.schema.title):this.getTitle()}},{key:"getPathDepth",value:function(){return this.path.split(".").length}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"onWatchedFieldChange",value:function(){var t,e=this;if(this.header_template){t=l(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&&(t.properties={},Object.keys(this.editors).forEach((function(n){var i=e.editors[n];if(i.schema&&i.schema.enum&&i.schema.options&&i.schema.options.enum_titles){var o=i.schema.enum.indexOf(i.value),r=i.options.enum_titles[o];t.properties[n]={enumTitle:r}}})));var n=this.header_template(t);n!==this.header_text&&(this.header_text=n,this.updateHeaderText(),this.notify())}if(this.link_watchers.length){t=this.getWatchedFieldValues();for(var i=0;i<this.link_watchers.length;i++)this.link_watchers[i](t)}}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value=t}},{key:"applyConstFilter",value:function(t){return this.enforceConstEnabled&&void 0!==this.schema.const&&(t=this.schema.const),t}},{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 t=this;this.unregister(this),this.watched&&Object.values(this.watched).forEach((function(e){return t.jsoneditor.unwatch(e,t.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(void 0!==this.schema.default)return this.schema.default;if(void 0!==this.schema.enum)return this.schema.enum[0];var t=this.schema.type||this.schema.oneOf;if(t&&Array.isArray(t)&&(t=t[0]),t&&"object"===b(t)&&(t=t.type),t&&Array.isArray(t)&&(t=t[0]),"string"==typeof t){if("number"===t)return this.isDefaultRequired()?0:void 0;if("boolean"===t)return!this.isDefaultRequired()&&void 0;if("integer"===t)return this.isDefaultRequired()?0:void 0;if("string"===t)return this.isDefaultRequired()?"":void 0;if("null"===t)return null;if("object"===t)return{};if("array"===t)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"boolean"==typeof this.schema.required?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(t){var e=[],n={};t.forEach((function(t){t.title&&(n[t.title]=n[t.title]||0,n[t.title]++),t.description&&(n[t.description]=n[t.description]||0,n[t.description]++),t.format&&(n[t.format]=n[t.format]||0,n[t.format]++),t.type&&(n[t.type]=n[t.type]||0,n[t.type]++)})),t.forEach((function(t){var i;i="string"==typeof t?t:t.title&&n[t.title]<=1?t.title:t.format&&n[t.format]<=1?t.format:t.type&&n[t.type]<=1?t.type:t.description&&n[t.description]<=1?t.description:t.title?t.title:t.format?t.format:t.type?t.type:t.description?t.description:JSON.stringify(t).length<500?JSON.stringify(t):"type",e.push(i)}));var i={};return e.forEach((function(t,o){i[t]=i[t]||0,i[t]++,n[t]>1&&(e[o]="".concat(t," ").concat(i[t]))})),e}},{key:"getValidId",value:function(t){return(t=void 0===t?"":t.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(t,e){if(this.schema.options&&this.schema.options.inputAttributes){var n=this.schema.options.inputAttributes,i=["name","type"].concat(t),o=e||this.input;Object.keys(n).forEach((function(t){i.includes(t.toLowerCase())||o.setAttribute(t,n[t])}))}}},{key:"setContainerAttributes",value:function(){var t=this;if(this.schema.options&&this.schema.options.containerAttributes){var e=this.schema.options.containerAttributes,n=["data-schemapath","data-schematype","data-schemaid"];Object.keys(e).forEach((function(i){n.includes(i.toLowerCase())||t.container.setAttribute(i,e[i])}))}}},{key:"expandCallbacks",value:function(t,e){var n=this,i=this.defaults.callbacks[t];return Object.entries(e).forEach((function(o){var r,s=function(t){if(Array.isArray(t))return t}(r=o)||function(t){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,o,r,s=[],a=!0,l=!1;try{for(o=(e=e.call(t)).next;!(a=(n=o.call(e)).done)&&(s.push(n.value),2!==s.length);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(l)throw i}}return s}}(r)||function(t){if(t){if("string"==typeof t)return v(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?v(t,2):void 0}}(r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),a=s[0],l=s[1];l===Object(l)?e[a]=n.expandCallbacks(t,l):"string"==typeof l&&"object"===b(i)&&"function"==typeof i[l]&&(e[a]=i[l].bind(null,n))})),e}},{key:"showValidationErrors",value:function(t){}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,g(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function x(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=w(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function k(t,e,n){return e=C(e),function(t,e){if(e&&("object"===w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,n||[],C(t).constructor):e.apply(t,n))}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}function j(){return j="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},j.apply(this,arguments)}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function E(t,e){return E=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},E(t,e)}var P=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),k(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&E(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){j(C(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){j(C(e.prototype),"unregister",this).call(this),this.input&&(this.input.removeAttribute("name"),this.input.removeAttribute("aria-label"))}},{key:"setValue",value:function(t,e,n){if(t=this.applyConstFilter(t),(!this.template||n)&&(this.shouldBeUnset()||null!=t?"object"===w(t)?t=JSON.stringify(t):this.shouldBeUnset()||"string"==typeof t||(t="".concat(t)):t="",t!==this.serialized)){var i=this.sanitize(t);if(this.input.value!==i){if(this.setValueToInputField(i),"range"===this.format){var o=this.control.querySelector("output");o&&(o.value=i)}var r=n||this.getValue()!==t;return this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),r&&this.onChange(!0,n),{changed:r,value:i}}}}},{key:"setValueToInputField",value:function(t){this.input.value=void 0===t?"":t}},{key:"getNumColumns",value:function(){var t,e=Math.ceil(Math.max(this.getTitle().length,this.schema.maxLength||0,this.schema.minLength||0)/5);return t="textarea"===this.input_type?6:["text","email"].includes(this.input_type)?4:2,Math.min(12,Math.max(e,t))}},{key:"build",value:function(){var t,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.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("textarea"===this.format)this.input_type="textarea",this.input=this.theme.getTextareaInput();else if("range"===this.format){this.input_type="range";var n=this.schema.minimum||0,i=this.schema.maximum||Math.max(100,n+1),o=1;this.schema.multipleOf&&(n%this.schema.multipleOf&&(n=Math.ceil(n/this.schema.multipleOf)*this.schema.multipleOf),i%this.schema.multipleOf&&(i=Math.floor(i/this.schema.multipleOf)*this.schema.multipleOf),o=this.schema.multipleOf),this.input=this.theme.getRangeInput(n,i,o,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);void 0!==this.schema.maxLength&&this.input.setAttribute("maxlength",this.schema.maxLength),void 0!==this.schema.pattern?this.input.setAttribute("pattern",this.schema.pattern):void 0!==this.schema.minLength&&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(t){if(t.preventDefault(),t.stopPropagation(),e.schema.template)t.currentTarget.value=e.value;else{var n=t.currentTarget.value,i=e.sanitize(n);n!==i&&(t.currentTarget.value=i),e.is_dirty=!0,e.refreshValue(),e.onChange(!0)}})),this.options.input_height&&(this.input.style.height=this.options.input_height),this.options.expand_height&&(this.adjust_height=function(t){if(t){var e,n=t.offsetHeight;if(t.offsetHeight<t.scrollHeight)for(e=0;t.offsetHeight<t.scrollHeight+3&&!(e>100);)e++,n++,t.style.height="".concat(n,"px");else{for(e=0;t.offsetHeight>=t.scrollHeight+3&&!(e>100);)e++,n--,t.style.height="".concat(n,"px");t.style.height="".concat(n+1,"px")}}},this.input.addEventListener("keyup",(function(t){e.adjust_height(t.currentTarget)})),this.input.addEventListener("change",(function(t){e.adjust_height(t.currentTarget)})),this.adjust_height());var r=null!==(t=this.options.prompt_paste_max_length_reached)&&void 0!==t?t:this.jsoneditor.options.prompt_paste_max_length_reached,s=void 0!==this.schema.maxLength;r&&s&&this.input.addEventListener("paste",(function(t){(t.clipboardData||window.clipboardData).getData("text").length+e.input.value.length>e.schema.maxLength&&alert(e.translate("paste_max_length_reached",[e.schema.maxLength]))})),this.format&&this.input.setAttribute("data-schemaformat",this.format);var a=this.input;if("range"===this.format&&(a=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,a,this.description,this.infoButton,this.formname),this.container.appendChild(this.control),window.requestAnimationFrame((function(){e.input.parentNode&&e.afterInputReady(),e.adjust_height&&e.adjust_height(e.input),"range"===e.format&&(e.control.querySelector("output").value=e.input.value)})),this.schema.template){var l=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof l.template?this.template=l.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}},{key:"setupCleave",value:function(t){var e=this.expandCallbacks("cleave",l({},this.defaults.options.cleave||{},this.options.cleave||{}));"object"===w(e)&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",l({},this.defaults.options.imask||{},this.options.imask||{}));"object"===w(e)&&Object.keys(e).length>0&&(this.imask_instance=window.IMask(t,this.ajustIMaskOptions(e)))}},{key:"ajustIMaskOptions",value:function(t){var e=this;return Object.keys(t).forEach((function(n){if(t[n]===Object(t[n]))t[n]=e.ajustIMaskOptions(t[n]);else if("mask"===n)if("regex:"===t[n].substr(0,6)){var i=t[n].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(null!==i)try{t[n]=new RegExp(i[1],i[2])}catch(t){}}else t[n]=e.getGlobalPropertyFromString(t[n])})),t}},{key:"getGlobalPropertyFromString",value:function(t){if(t.includes(".")){var e=t.split("."),n=e[0],i=e[1];if(void 0!==window[n]&&void 0!==window[n][i])return window[n][i]}else if(void 0!==window[t])return window[t];return t}},{key:"shouldBeUnset",value:function(){return!this.jsoneditor.options.use_default_values&&!this.is_dirty}},{key:"getValue",value:function(){var t=!(!this.input||!this.input.value);if(!this.shouldBeUnset()||t)return this.imask_instance&&this.dependenciesFulfilled&&this.options.imask.returnUnmasked?this.imask_instance.unmaskedValue:j(C(e.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,j(C(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,j(C(e.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,"string"==typeof this.value||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),j(C(e.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),j(C(e.prototype),"onWatchedFieldChange",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if("always"===this.jsoneditor.options.show_errors);else if(!this.is_dirty&&this.previous_error_setting===this.jsoneditor.options.show_errors)return;this.previous_error_setting=this.jsoneditor.options.show_errors;var n=t.reduce((function(t,n){return n.path===e.path&&t.push(n.message),t}),[]);n.length?this.theme.addInputError(this.input,"".concat(n.join(". "),".")):this.theme.removeInputError(this.input)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,x(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function L(t){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},L(t)}function S(t){var e=function(t){if("object"!=L(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=L(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==L(e)?e:e+""}function T(t,e,n){return e=B(e),function(t,e){if(e&&("object"===L(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,A()?Reflect.construct(e,n||[],B(t).constructor):e.apply(t,n))}function A(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(A=function(){return!!t})()}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=B(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},R.apply(this,arguments)}function B(t){return B=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},B(t)}function I(t,e){return I=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},I(t,e)}var z=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),T(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&I(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=R(B(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.ace_editor_instance&&(this.ace_editor_instance.setValue(o.value),this.ace_editor_instance.session.getSelection().clearSelection(),this.ace_editor_instance.resize())}},{key:"build",value:function(){this.options.format="textarea",R(B(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,n=this;if(window.ace){var i=this.input_type;"cpp"!==i&&"c++"!==i&&"c"!==i||(i="c_cpp"),t=this.expandCallbacks("ace",l({},{selectionStyle:"text",minLines:30,maxLines:30},this.defaults.options.ace||{},this.options.ace||{},{mode:"ace/mode/".concat(i)})),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,t),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(){n.input.value=n.ace_editor_instance.getValue(),n.refreshValue(),n.is_dirty=!0,n.onChange(!0)})),this.theme.afterInputReady(this.input)}else R(B(e.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),R(B(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.ace_editor_instance&&this.ace_editor_instance.setReadOnly(!0),R(B(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.ace_editor_instance&&(this.ace_editor_instance.destroy(),this.ace_editor_instance=null),R(B(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,S(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function M(t){return M="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},M(t)}function N(t){var e=function(t){if("object"!=M(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=M(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==M(e)?e:e+""}function D(t,e,n){return e=V(e),function(t,e){if(e&&("object"===M(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,F()?Reflect.construct(e,n||[],V(t).constructor):e.apply(t,n))}function F(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(F=function(){return!!t})()}function H(){return H="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=V(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},H.apply(this,arguments)}function V(t){return V=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},V(t)}function Z(t,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Z(t,e)}n(2008),n(4554);var q=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),D(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Z(t,e)}(e,t),n=e,i=[{key:"askConfirmation",value:function(){return!0!==this.jsoneditor.options.prompt_before_delete||!1!==window.confirm(this.translate("button_delete_node_warning"))}},{key:"register",value:function(){H(V(e.prototype),"register",this).call(this),this.rows&&this.rows.forEach((function(t){return t.register()}))}},{key:"unregister",value:function(){H(V(e.prototype),"unregister",this).call(this),this.rows&&this.rows.forEach((function(t){return t.unregister()}))}},{key:"getNumColumns",value:function(){var t=this.getItemInfo(0);return this.tabs_holder&&"tabs-top"!==this.schema.format?Math.max(Math.min(12,t.width+2),4):t.width}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.setAvailability(this,!1),this.rows&&this.rows.forEach((function(e){e.enable(),t.setAvailability(e,!1)})),H(V(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var n=this;t&&(this.always_disabled=!0),this.setAvailability(this,!0),this.rows&&this.rows.forEach((function(e){e.disable(t),n.setAvailability(e,!0)})),H(V(e.prototype),"disable",this).call(this)}},{key:"setAvailability",value:function(t,e){t.add_row_button&&(t.add_row_button.disabled=e),t.remove_all_rows_button&&(t.remove_all_rows_button.disabled=e),t.delete_last_row_button&&(t.delete_last_row_button.disabled=e),t.copy_button&&(t.copy_button.disabled=e),t.delete_button&&(t.delete_button.disabled=e),t.moveup_button&&(t.moveup_button.disabled=e),t.movedown_button&&(t.movedown_button.disabled=e)}},{key:"preBuild",value:function(){H(V(e.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),"tabs-top"===this.schema.format?(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):"tabs"===this.schema.format?(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(){H(V(e.prototype),"postBuild",this).call(this),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"onChildEditorChange",value:function(t,n){this.refreshValue(),this.refreshTabs(!0),this.is_dirty=!0,H(V(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"getItemTitle",value:function(){if(!this.item_title)if(this.schema.items&&!Array.isArray(this.schema.items)){var t=this.jsoneditor.expandRefs(this.schema.items);this.item_title=this.translateProperty(t.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(t){return Array.isArray(this.schema.items)?t>=this.schema.items.length?!0===this.schema.additionalItems?{}:this.schema.additionalItems?l({},this.schema.additionalItems):void 0:l({},this.schema.items[t]):this.schema.items?l({},this.schema.items):{}}},{key:"getItemInfo",value:function(t){var e=this.getItemSchema(t);this.item_info=this.item_info||{};var n=JSON.stringify(e);return void 0!==this.item_info[n]||(e=this.jsoneditor.expandRefs(e),this.item_info[n]={title:this.translateProperty(e.title)||this.translate("default_array_item_title"),default:e.default,width:12,child_editors:e.properties||e.items}),this.item_info[n]}},{key:"getElementEditor",value:function(t){var e=this.getItemInfo(t),n=this.getItemSchema(t);(n=this.jsoneditor.expandRefs(n)).title="".concat(e.title," ").concat(t+1);var i,o=this.jsoneditor.getEditorClass(n);this.tabs_holder?(i="tabs-top"===this.schema.format?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):i=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(i);var r=this.jsoneditor.createEditor(o,{jsoneditor:this.jsoneditor,schema:n,container:i,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return r.preBuild(),r.build(),r.postBuild(),r.title_controls||(r.array_controls=this.theme.getButtonHolder(),i.appendChild(r.array_controls)),r}},{key:"checkParent",value:function(t){return t&&t.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,H(V(e.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;if(null!==this.rows){if(this.rows.forEach((function(n,i){t&&(e.checkParent(n.tab)&&n.tab.parentNode.removeChild(n.tab),e.destroyRow(n,!0),e.row_cache[i]=null),e.rows[i]=null})),t)for(var n=this.rows.length;n<this.row_cache.length;n++)this.destroyRow(this.row_cache[n],!0),this.row_cache[n]=null;this.rows=[],t&&(this.row_cache=[])}}},{key:"destroyRow",value:function(t,e){var n=t.container;e?(t.destroy(),n.parentNode&&n.parentNode.removeChild(n),this.checkParent(t.tab)&&t.tab.parentNode.removeChild(t.tab)):(t.tab&&(t.tab.style.display="none"),n.style.display="none",t.unregister())}},{key:"getMax",value:function(){return Array.isArray(this.schema.items)&&!1===this.schema.additionalItems?Math.min(this.schema.items.length,this.schema.maxItems||1/0):this.schema.maxItems||1/0}},{key:"refreshTabs",value:function(t){var e=this;this.rows.forEach((function(n){n.tab&&(t?n.tab_text.textContent=n.getHeaderText():n.tab===e.active_tab?e.theme.markTabActive(n):e.theme.markTabInactive(n))}))}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemInfo(t.length).default);return this.getMax()&&t.length>this.getMax()&&(t=t.slice(0,this.getMax())),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(e=this.applyConstFilter(e),e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){e.forEach((function(e,i){if(t.rows[i])t.rows[i].setValue(e,n);else if(t.row_cache[i])t.rows[i]=t.row_cache[i],t.rows[i].setValue(e,n),t.rows[i].container.style.display="",t.rows[i].tab&&(t.rows[i].tab.style.display=""),t.rows[i].register(),t.jsoneditor.trigger("addRow",t.rows[i]);else{var o=t.addRow(e,n);t.jsoneditor.trigger("addRow",o)}}));for(var i=e.length;i<this.rows.length;i++)this.destroyRow(this.rows[i]),this.rows[i]=null;this.rows=this.rows.slice(0,e.length);var o=this.rows.find((function(e){return e.tab===t.active_tab})),r=void 0!==o?o.tab:null;!r&&this.rows.length&&(r=this.rows[0].tab),this.active_tab=r,this.refreshValue(n),this.refreshTabs(!0),this.refreshTabs(),this.onChange()}else n&&this.refreshValue(n)}},{key:"setButtonState",value:function(t,e){switch(this.options.button_state_mode||this.jsoneditor.options.button_state_mode){case 1:default:t.style.display=e?"":"none";break;case 2:t.disabled=!e}}},{key:"setupButtons",value:function(t){var e=[];if(this.value.length)if(1===this.value.length){this.setButtonState(this.remove_all_rows_button,!1);var n=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,n),e.push(n)}else{var i=!(t||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,i),e.push(i);var o=!(t||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,o),e.push(o)}else this.setButtonState(this.delete_last_row_button,!1),this.setButtonState(this.remove_all_rows_button,!1);var r=!(this.getMax()&&this.getMax()<=this.rows.length||this.hide_add_button);return this.setButtonState(this.add_row_button,r),e.push(r),e.some((function(t){return t}))}},{key:"refreshValue",value:function(t){var e=this,n=this.value?this.value.length:0;if(this.value=this.rows.map((function(t){return t.getValue()})),n!==this.value.length||t){var i=this.schema.minItems&&this.schema.minItems>=this.rows.length;this.rows.forEach((function(t,n){if(t.movedown_button){var o=n!==e.rows.length-1;e.setButtonState(t.movedown_button,o)}t.delete_button&&e.setButtonState(t.delete_button,!i),e.value[n]=t.getValue()})),this.setupButtons(i)&&!this.collapsed?this.controls.style.display="inline-block":this.controls.style.display="none"}this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t,e){var n=this,i=this.rows.length;this.rows[i]=this.getElementEditor(i),this.row_cache[i]=this.rows[i],this.tabs_holder?(this.rows[i].tab_text=document.createElement("span"),this.rows[i].tab_text.textContent=this.rows[i].getHeaderText(),"tabs-top"===this.schema.format?(this.rows[i].tab=this.theme.getTopTab(this.rows[i].tab_text,this.getValidId(this.rows[i].path)),this.theme.addTopTab(this.tabs_holder,this.rows[i].tab)):(this.rows[i].tab=this.theme.getTab(this.rows[i].tab_text,this.getValidId(this.rows[i].path)),this.theme.addTab(this.tabs_holder,this.rows[i].tab)),this.rows[i].tab.addEventListener("click",(function(t){n.active_tab=n.rows[i].tab,n.refreshTabs(),t.preventDefault(),t.stopPropagation()})),this._supportDragDrop(this.rows[i].tab)):this._supportDragDrop(this.rows[i].container,!0);var o=this.rows[i].title_controls||this.rows[i].array_controls;return this.hide_delete_buttons||(this.rows[i].delete_button=this._createDeleteButton(i,o)),this.show_copy_button&&(this.rows[i].copy_button=this._createCopyButton(i,o)),i&&!this.hide_move_buttons&&(this.rows[i].moveup_button=this._createMoveUpButton(i,o)),this.hide_move_buttons||(this.rows[i].movedown_button=this._createMoveDownButton(i,o)),void 0!==t&&this.rows[i].setValue(t,e),this.refreshTabs(),this.rows[i]}},{key:"_createDeleteButton",value:function(t,e){var n=this,i=this.getButton(this.getItemTitle(),"delete","button_delete_row_title",[this.getItemTitle()]);return i.classList.add("delete","json-editor-btntype-delete"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue().filter((function(t,n){return n!==e})),o=null,r=n.rows[e].getValue();n.setValue(i),n.rows[e]?o=n.rows[e].tab:n.rows[e-1]&&(o=n.rows[e-1].tab),o&&(n.active_tab=o,n.refreshTabs()),n.onChange(!0),n.jsoneditor.trigger("deleteRow",r)})),e&&e.appendChild(i),i}},{key:"_createCopyButton",value:function(t,e){var n=this,i=this.getButton(this.getItemTitle(),"copy","button_copy_row_title",[this.getItemTitle()]),o=this.schema;return i.classList.add("copy","json-editor-btntype-copy"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){var e=n.getValue();t.preventDefault(),t.stopPropagation();var i=1*t.currentTarget.getAttribute("data-i");e.forEach((function(t,n){if(n===i){if("string"===o.items.type&&"uuid"===o.items.format)t=f();else if("object"===o.items.type&&o.items.properties)for(var r=0,s=Object.keys(t);r<s.length;r++){var a=s[r];o.items.properties&&o.items.properties[a]&&"uuid"===o.items.properties[a].format&&(t[a]=f())}e.push(t)}})),n.setValue(e),n.refreshValue(!0),n.onChange(!0),n.jsoneditor.trigger("copyRow",n.rows[i-1])})),e.appendChild(i),i}},{key:"_createMoveUpButton",value:function(t,e){var n=this,i=this.getButton("","tabs-top"===this.schema.format?"moveleft":"moveup","button_move_up_title");return i.classList.add("moveup","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i");if(!(e<=0)){var i=n.getValue(),o=i[e-1];i[e-1]=i[e],i[e]=o,n.setValue(i),n.active_tab=n.rows[e-1].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])}})),e&&e.appendChild(i),i}},{key:"_createMoveDownButton",value:function(t,e){var n=this,i=this.getButton("","tabs-top"===this.schema.format?"moveright":"movedown","button_move_down_title");return i.classList.add("movedown","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue();if(!(e>=i.length-1)){var o=i[e+1];i[e+1]=i[e],i[e]=o,n.setValue(i),n.active_tab=n.rows[e+1].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])}})),e&&e.appendChild(i),i}},{key:"_supportDragDrop",value:function(t,e){var n=this;U(t,(function(t,e){var i=n.getValue(),o=i[t];i.splice(t,1),i.splice(e,0,o),n.setValue(i),n.active_tab=n.rows[e].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e])}),{useTrigger:e})}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&c(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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 t=this,e=this.getButton("","collapse","button_collapse");e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var n=this.row_holder.style.display,i=this.controls.style.display;return e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.panel&&t.setButtonState(t.panel,t.collapsed),t.tabs_holder&&t.setButtonState(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=n,t.controls.style.display=i,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(e.currentTarget,"","expand","button_expand"))})),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var n,i=t.rows.length;t.row_cache[i]?(n=t.rows[i]=t.row_cache[i],t.rows[i].setValue(t.rows[i].getDefault(),!0),"function"==typeof t.rows[i].deactivateNonRequiredProperties&&t.rows[i].deactivateNonRequiredProperties(!0),t.rows[i].container.style.display="",t.rows[i].tab&&(t.rows[i].tab.style.display=""),t.rows[i].register()):n=t.addRow(),t.active_tab=t.rows[i].tab,t.refreshTabs(),t.refreshValue(),t.onChange(!0),t.jsoneditor.trigger("addRow",n)})),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue(),i=null,o=n.pop();t.setValue(n),t.rows[t.rows.length-1]&&(i=t.rows[t.rows.length-1].tab),i&&(t.active_tab=i,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",o)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue();t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",n)})),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,n=[],i=[];t.forEach((function(t){t.path===e.path?n.push(t):i.push(t)})),this.error_holder&&(n.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",n.forEach((function(t){e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.rows.forEach((function(t){return t.showValidationErrors(i)}))}}],i&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,N(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function U(t,e){(arguments.length>2&&void 0!==arguments[2]?arguments[2]:{}).useTrigger?t.addEventListener("mousedown",(function(e){if(e.ctrlKey){t.draggable=!0;var n=function e(n){t.draggable=!1,document.removeEventListener("dragend",e),document.removeEventListener("mouseup",e)};document.addEventListener("dragend",n),document.addEventListener("mouseup",n)}})):t.draggable=!0,t.addEventListener("dragstart",(function(e){window.curDrag=t})),t.addEventListener("dragover",(function(e){null===window.curDrag||window.curDrag===t||window.curDrag.parentElement!==t.parentElement?e.dataTransfer.dropEffect="none":e.dataTransfer.dropEffect="move",e.preventDefault()})),t.addEventListener("drop",(function(n){if(n.preventDefault(),n.stopPropagation(),null!==window.curDrag&&window.curDrag!==t&&window.curDrag.parentElement===t.parentElement){var i=function(t){for(var e=0,n=t.parentElement.firstElementChild;n!==t&&null!==n;)n=n.nextSibling,++e;return e},o=i(window.curDrag),r=i(t);e(o,r,window.curDrag,t),window.curDrag=null}}))}function W(t){return W="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},W(t)}function G(t){var e=function(t){if("object"!=W(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=W(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==W(e)?e:e+""}function J(t,e,n){return e=K(e),function(t,e){if(e&&("object"===W(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$()?Reflect.construct(e,n||[],K(t).constructor):e.apply(t,n))}function $(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($=function(){return!!t})()}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=K(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Y.apply(this,arguments)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}function X(t,e){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},X(t,e)}q.rules={".json-editor-btntype-toggle":"margin:0%2010px%200%200",".je-array-control-btn":"width:100%25;text-align:left;margin-bottom:3px"};var Q=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),J(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}(e,t),n=e,(i=[{key:"onInputChange",value:function(){this.value=this.input.value,this.onChange(!0)}},{key:"register",value:function(){Y(K(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Y(K(e.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){var t=this,e=this.getTitle().length;return Object.keys(this.select_values).forEach((function(n){return e=Math.max(e,"".concat(t.select_values[n]).length+4)})),Math.min(12,Math.max(e/7,2))}},{key:"preBuild",value:function(){var t;Y(K(e.prototype),"preBuild",this).call(this),this.select_options={},this.select_values={},this.option_titles=[],this.option_keys=[],this.option_enum=[];var n=this.jsoneditor.expandRefs(this.schema.items||{}),i=n.enum||[],o=n.options&&n.options.enum||[],r=n.options&&n.options.enum_titles||[];for(t=0;t<i.length;t++)if(this.sanitize(i[t])===i[t]){var s=o[t]||{};"title"in s||(s.title="".concat(r[t]||i[t])),this.option_keys.push("".concat(i[t])),this.option_enum.push(s),this.select_values["".concat(i[t])]=i[t]}}},{key:"build",value:function(){var t,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.schema.format&&this.option_keys.length<8||"checkbox"===this.schema.format){for(this.input_type="checkboxes",this.inputs={},this.controls={},t=0;t<this.option_keys.length;t++){var n=this.formname+t.toString();this.inputs[this.option_keys[t]]=this.theme.getCheckbox(),this.inputs[this.option_keys[t]].id=n,this.select_options[this.option_keys[t]]=this.inputs[this.option_keys[t]];var i=this.theme.getCheckboxLabel(this.option_enum[t].title);if(i.htmlFor=n,this.option_enum[t].infoText){var o=this.theme.getInfoButton(this.translateProperty(this.option_enum[t].infoText));i.appendChild(o)}this.controls["_"+this.option_keys[t]]=this.theme.getFormControl(i,this.inputs[this.option_keys[t]])}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(t){return t.title}))),this.input.setAttribute("multiple","multiple"),this.input.size=Math.min(10,this.option_keys.length),t=0;t<this.option_keys.length;t++)this.select_options[this.option_keys[t]]=this.input.children[t];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(n){var i=[];for(t=0;t<e.option_keys.length;t++)e.select_options[e.option_keys[t]]&&(e.select_options[e.option_keys[t]].selected||e.select_options[e.option_keys[t]].checked)&&i.push(e.select_values[e.option_keys[t]]);e.updateValue(i),e.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1),window.requestAnimationFrame((function(){e.afterInputReady()}))}},{key:"postBuild",value:function(){Y(K(e.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input||this.inputs)}},{key:"setValue",value:function(t,e){var n=this;t=(t=this.applyConstFilter(t))||[],Array.isArray(t)||(t=[t]),t=t.map((function(t){return"".concat(t)})),Object.keys(this.select_options).forEach((function(e){n.select_options[e]["select"===n.input_type?"selected":"checked"]=t.includes(e)})),this.updateValue(t),this.onChange(!0)}},{key:"removeValue",value:function(t){t=[].concat(t),this.setValue(this.getValue().filter((function(e){return!t.includes(e)})))}},{key:"addValue",value:function(t){this.setValue(this.getValue().concat(t))}},{key:"updateValue",value:function(t){for(var e=!1,n=[],i=0;i<t.length;i++)if(this.select_options["".concat(t[i])]){var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}else e=!0;return this.value=n,e}},{key:"sanitize",value:function(t){return"boolean"===this.schema.items.type?!!t:"number"===this.schema.items.type?1*t||0:"integer"===this.schema.items.type?Math.floor(1*t||0):"".concat(t)}},{key:"enable",value:function(){var t=this;this.always_disabled||(this.input?this.input.disabled=!1:this.inputs&&Object.keys(this.inputs).forEach((function(e){return t.inputs[e].disabled=!1})),Y(K(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){var n=this;t&&(this.always_disabled=!0),this.input?this.input.disabled=!0:this.inputs&&Object.keys(this.inputs).forEach((function(t){return n.inputs[t].disabled=!0})),Y(K(e.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){Y(K(e.prototype),"destroy",this).call(this)}},{key:"escapeRegExp",value:function(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}},{key:"showValidationErrors",value:function(t){var e=new RegExp("^".concat(this.escapeRegExp(this.path),"(\\.\\d+)?$")),n=t.reduce((function(t,n){return n.path.match(e)&&t.push(n.message),t}),[]);n.length?this.theme.addInputError(this.input||this.inputs,"".concat(n.join(". "),".")):this.theme.removeInputError(this.input||this.inputs)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,G(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=tt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}function nt(t,e,n){return e=rt(e),function(t,e){if(e&&("object"===tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,it()?Reflect.construct(e,n||[],rt(t).constructor):e.apply(t,n))}function it(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(it=function(){return!!t})()}function ot(){return ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=rt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ot.apply(this,arguments)}function rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rt(t)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}var at=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),nt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){this.choices_instance?(t=this.applyConstFilter(t),t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.choices_instance.removeActiveItems(),this.choices_instance.setChoiceByValue(this.value),this.onChange(!0)):ot(rt(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t=this;if(window.Choices&&!this.choices_instance){var n=this.expandCallbacks("choices",l({},{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,n),this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(e){var n=t.choices_instance.getValue(!0);t.updateValue(n),t.onChange(!0)},this.control.addEventListener("change",this.multiselectChangeHandler,!1)}ot(rt(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,n=[],i=0;i<t.length;i++){if(!this.select_values["".concat(t[i])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[i]))continue}var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}return this.value=n,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t),this.choices_instance.setChoices([{value:"".concat(t),label:"".concat(t)}],"value","label",!1),!0}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),ot(rt(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),ot(rt(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),ot(rt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,et(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Q);function lt(t){return lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lt(t)}function ct(t){var e=function(t){if("object"!=lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=lt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lt(e)?e:e+""}function ut(t,e,n){return e=pt(e),function(t,e){if(e&&("object"===lt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ht()?Reflect.construct(e,n||[],pt(t).constructor):e.apply(t,n))}function ht(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ht=function(){return!!t})()}function dt(){return dt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=pt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},dt.apply(this,arguments)}function pt(t){return pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pt(t)}function ft(t,e){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ft(t,e)}var mt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ut(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ft(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){t=this.applyConstFilter(t),this.select2_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.select2v4?this.select2_instance.val(this.value).change():this.select2_instance.select2("val",this.value),this.onChange(!0)):dt(pt(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t,n=this;window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance&&(t=this.expandCallbacks("select2",l({},{tags:!0,width:"100%"},this.defaults.options.select2||{},this.options.select2||{})),this.newEnumAllowed=t.tags=!!t.tags&&this.schema.items&&"string"===this.schema.items.type,this.select2_instance=window.jQuery(this.input).select2(t),this.select2v4=h(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var t=n.select2v4?n.select2_instance.val():n.select2_instance.select2("val");n.updateValue(t),n.onChange(!0)},this.select2_instance.on("select2-blur",this.selectChangeHandler),this.select2_instance.on("change",this.selectChangeHandler)),dt(pt(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,n=[],i=0;i<t.length;i++){if(!this.select_values["".concat(t[i])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[i]))continue}var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}return this.value=n,e}},{key:"addNewOption",value:function(t){this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.schema.items.enum.push(t);var e=this.input.querySelector('option[value="'.concat(t,'"]'));return e?e.removeAttribute("data-select2-tag"):this.input.appendChild(new Option(t,t,!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)),dt(pt(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),dt(pt(e.prototype),"disable",this).call(this)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),dt(pt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ct(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Q);function yt(t){return yt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yt(t)}function vt(t){var e=function(t){if("object"!=yt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yt(e)?e:e+""}function bt(t,e,n){return e=wt(e),function(t,e){if(e&&("object"===yt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,n||[],wt(t).constructor):e.apply(t,n))}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}function _t(){return _t="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=wt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},_t.apply(this,arguments)}function wt(t){return wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wt(t)}function xt(t,e){return xt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xt(t,e)}var kt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),bt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xt(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){t=this.applyConstFilter(t),this.selectize_instance?(t=[].concat(t).map((function(t){return"".concat(t)})),this.updateValue(t),this.selectize_instance.setValue(this.value),this.onChange(!0)):_t(wt(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t,n=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){t=this.expandCallbacks("selectize",l({},{plugins:["remove_button"],delimiter:!1,createOnBlur:!0,create:!0},this.defaults.options.selectize||{},this.options.selectize||{})),this.newEnumAllowed=t.create=!!t.create&&this.schema.items&&"string"===this.schema.items.type,this.selectize_instance=window.jQuery(this.input).selectize(t)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(t){var e=n.selectize_instance.getValue();n.updateValue(e),n.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler);var i=this.theme.getHiddenLabel(this.formname);this.input.setAttribute("id",this.formname+"-hidden-input"),i.setAttribute("for",this.formname+"-hidden-input"),this.input.parentNode.insertBefore(i,this.input);var o=this.selectize_instance.$control[0];if(o){var r=this.theme.getHiddenLabel(this.formname);r.setAttribute("for",this.formname+"-selectized"),o.appendChild(r)}}_t(wt(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){t=[].concat(t);for(var e=!1,n=[],i=0;i<t.length;i++){if(!this.select_values["".concat(t[i])]){if(e=!0,!this.newEnumAllowed)continue;if(!this.addNewOption(t[i]))continue}var o=this.sanitize(this.select_values[t[i]]);n.push(o),o!==t[i]&&(e=!0)}return this.value=n,e}},{key:"addNewOption",value:function(t){return this.option_keys.push("".concat(t)),this.option_titles.push("".concat(t)),this.select_values["".concat(t)]=t,this.selectize_instance.addOption({text:t,value:t}),!0}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),_t(wt(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),_t(wt(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),_t(wt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vt(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Q);function Ot(t){return Ot="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ot(t)}function jt(t){var e=function(t){if("object"!=Ot(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ot(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ot(e)?e:e+""}function Ct(t,e,n){return e=Lt(e),function(t,e){if(e&&("object"===Ot(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Et()?Reflect.construct(e,n||[],Lt(t).constructor):e.apply(t,n))}function Et(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Et=function(){return!!t})()}function Pt(){return Pt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Lt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Pt.apply(this,arguments)}function Lt(t){return Lt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lt(t)}function St(t,e){return St=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},St(t,e)}var Tt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ct(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&St(t,e)}(e,t),n=e,(i=[{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)),Pt(Lt(e.prototype),"postBuild",this).call(this)}},{key:"afterInputReady",value:function(){var t,n=this;window.Autocomplete&&!this.autocomplete_instance&&(t=this.expandCallbacks("autocomplete",l({},{search:function(t){return console.log('No "search" callback defined for autocomplete in property "'.concat(t.key,'"')),[]},onSubmit:function(){n.input.blur()},baseClass:"autocomplete"},this.defaults.options.autocomplete||{},this.options.autocomplete||{})),this.autocomplete_wrapper.classList.add(t.baseClass),this.autocomplete_dropdown.classList.add("".concat(t.baseClass,"-result-list")),this.autocomplete_instance=new window.Autocomplete(this.autocomplete_wrapper,t)),Pt(Lt(e.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),Pt(Lt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,jt(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function At(t){return At="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},At(t)}function Rt(t){var e=function(t){if("object"!=At(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=At(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==At(e)?e:e+""}function Bt(t,e,n){return e=Mt(e),function(t,e){if(e&&("object"===At(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,It()?Reflect.construct(e,n||[],Mt(t).constructor):e.apply(t,n))}function It(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(It=function(){return!!t})()}function zt(){return zt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Mt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},zt.apply(this,arguments)}function Mt(t){return Mt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mt(t)}function Nt(t,e){return Nt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Nt(t,e)}var Dt=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Bt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Nt(t,e)}(e,t),n=e,(i=[{key:"getNumColumns",value:function(){return 4}},{key:"setFileReaderListener",value:function(t){var e=this;t.addEventListener("load",(function(t){if(e.count===e.current_item_index)e.value[e.count][e.key]=t.target.result;else{var n={};for(var i in e.parent.schema.properties)n[i]="";n[e.key]=t.target.result,e.value.splice(e.count,0,n)}e.count+=1,e.count===e.total+e.current_item_index&&e.arrayEditor.setValue(e.value)}))}},{key:"build",value:function(){var t=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&&!0===this.schema.options.multiple&&this.parent&&"object"===this.parent.schema.type&&this.parent.parent&&"array"===this.parent.parent.schema.type&&this.uploader.setAttribute("multiple",""),this.uploader.addEventListener("change",(function(e){if(e.preventDefault(),e.stopPropagation(),e.currentTarget.files&&e.currentTarget.files.length)if(e.currentTarget.files.length>1&&t.schema.options&&t.schema.options.multiple&&!0===t.schema.options.multiple&&t.parent&&"object"===t.parent.schema.type&&t.parent.parent&&"array"===t.parent.parent.schema.type){t.arrayEditor=t.jsoneditor.getEditor(t.parent.parent.path),t.value=t.arrayEditor.getValue(),t.total=e.currentTarget.files.length,t.current_item_index=parseInt(t.parent.key),t.count=t.current_item_index;for(var n=0;n<t.total;n++){var i=new FileReader;t.setFileReaderListener(i),i.readAsDataURL(e.currentTarget.files[n])}}else{var o=new FileReader;o.onload=function(e){t.value=e.target.result,t.refreshPreview(),t.onChange(!0),o=null},o.readAsDataURL(e.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 e=this.getButton("button_upload","upload","button_upload");e.addEventListener("click",(function(){t.uploader.click()})),this.control.appendChild(e),this.setInputAttributes(["multiple"],e)}},{key:"refreshPreview",value:function(){if(this.last_preview!==this.value&&(this.last_preview=this.value,this.preview.innerHTML="",this.value)){var t=this.value.match(/^data:([^;,]+)[;,]/);if(t&&(t=t[1]),t){if(this.preview.innerHTML="<strong>Type:</strong> ".concat(t,", <strong>Size:</strong> ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),"image"===t.substr(0,5)){this.preview.innerHTML+="<br>";var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.src=this.value,this.preview.appendChild(e)}}else this.preview.innerHTML="<em>Invalid data URI</em>"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),zt(Mt(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),zt(Mt(e.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value!==t&&(this.schema.readOnly&&this.schema.enum&&!this.schema.enum.includes(t)?this.value=this.schema.enum[0]:this.value=t,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),zt(Mt(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Rt(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Ht(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ft(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}function Vt(t,e,n){return e=Ut(e),function(t,e){if(e&&("object"===Ft(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zt()?Reflect.construct(e,n||[],Ut(t).constructor):e.apply(t,n))}function Zt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zt=function(){return!!t})()}function qt(){return qt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ut(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},qt.apply(this,arguments)}function Ut(t){return Ut=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ut(t)}function Wt(t,e){return Wt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Wt(t,e)}var Gt=function(t){function e(t,n){var i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(i=Vt(this,e,[t,n])).active=!1,i.isUiOnly=!0,i.parent&&i.parent.schema&&(Array.isArray(i.parent.schema.required)?i.parent.schema.required.includes(i.key)||i.parent.schema.required.push(i.key):i.parent.schema.required=[i.key]),i}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Wt(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){var t=this;this.options.compact=!0;var e=this.expandCallbacks("button",l({},{icon:"",validated:!1,align:"left",action:function(t,e){window.alert('No button action defined for "'.concat(t.path,'"'))}},this.defaults.options.button||{},this.options.button||{})),n=this.translateProperty(e.text||this.schema.title)||this.key;this.input=this.getButton(n,e.icon,n),"function"!=typeof e.action?window.alert('No button action defined for "'.concat(this.path,'"')):this.input.addEventListener("click",e.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(e.align),this.control.appendChild(this.input),this.container.appendChild(this.control),this.changeHandler=function(){t.jsoneditor.validate(t.jsoneditor.getValue()).length>0?t.disable():t.enable()},e.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,qt(Ut(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,qt(Ut(e.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,qt(Ut(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ht(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Jt(t){return Jt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jt(t)}function $t(t){var e=function(t){if("object"!=Jt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Jt(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jt(e)?e:e+""}function Yt(t,e,n){return e=Qt(e),function(t,e){if(e&&("object"===Jt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kt()?Reflect.construct(e,n||[],Qt(t).constructor):e.apply(t,n))}function Kt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kt=function(){return!!t})()}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Qt(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Xt.apply(this,arguments)}function Qt(t){return Qt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Qt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}var ee=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Yt(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,e){t=!!(t=this.applyConstFilter(t));var n=this.getValue()!==t;this.value=t,this.input.checked=this.value,e||(this.is_dirty=!0),this.onChange(n)}},{key:"register",value:function(){Xt(Qt(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Xt(Qt(e.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(){Xt(Qt(e.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 t=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(e){e.preventDefault(),e.stopPropagation(),t.value=e.currentTarget.checked,t.is_dirty=!0,t.onChange(!0)})),this.container.appendChild(this.control)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,Xt(Qt(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,Xt(Qt(e.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),Xt(Qt(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this,n=this.jsoneditor.options.show_errors,i="change"===n||"interaction"===n;if(("never"!==n||this.is_dirty)&&(!i||this.is_dirty)){var o=t.reduce((function(t,n){return n.path===e.path&&t.push(n.message),t}),[]);this.input.controlgroup=this.control,o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,$t(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function ie(t){var e=function(t){if("object"!=ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ne(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ne(e)?e:e+""}function oe(t,e,n){return e=ae(e),function(t,e){if(e&&("object"===ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,re()?Reflect.construct(e,n||[],ae(t).constructor):e.apply(t,n))}function re(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(re=function(){return!!t})()}function se(){return se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ae(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},se.apply(this,arguments)}function ae(t){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ae(t)}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}n(6910);var ce=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),oe(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,e){t=this.applyConstFilter(t);var n=this.typecast(t),i=this.enum_options.length>0&&this.enum_values.includes(n),o=!!this.jsoneditor.options.use_default_values||void 0!==this.schema.default;if(this.hasPlaceholderOption||i&&(!e||this.isRequired()||o)||(n=this.enum_values[0]),this.value!==n){var r=this.enum_values.indexOf(n);i&&-1!==r?this.input.value=this.enum_options[r]:this.hasPlaceholderOption?this.input.value="_placeholder_":this.input.value=n,this.value=n,e||(this.is_dirty=!0),this.onChange(),this.change()}}},{key:"register",value:function(){se(ae(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){se(ae(e.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"getNumColumns",value:function(){if(!this.enum_options)return 3;for(var t=this.getTitle().length,e=0;e<this.enum_options.length;e++)t=Math.max(t,this.enum_options[e].length+4);return Math.min(12,Math.max(t/7,2))}},{key:"typecast",value:function(t){return"boolean"===this.schema.type?"undefined"===t||void 0===t?void 0:!!t:"number"===this.schema.type?1*t||0:"integer"===this.schema.type?Math.floor(1*t||0):this.schema.enum&&void 0===t?void 0:"".concat(t)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return this.typecast(this.value)}},{key:"preBuild",value:function(){var t,e,n,i,o=this;if(this.input_type="select",this.enum_options=[],this.enum_values=[],this.enum_display=[],this.hasPlaceholderOption=(null===(t=this.schema)||void 0===t||null===(t=t.options)||void 0===t?void 0:t.has_placeholder_option)||!1,this.placeholderOptionText=(null===(e=this.schema)||void 0===e||null===(e=e.options)||void 0===e?void 0:e.placeholder_option_text)||" ",this.enforceConst&&this.schema.const){var r=this.schema.const;this.enum_options=["".concat(r)],this.enum_display=["".concat(this.translateProperty(r)||r)],this.enum_values=[this.typecast(r)]}else if(this.schema.enum){var s=this.schema.options&&this.schema.options.enum_titles||[];this.schema.enum.forEach((function(t,e){o.enum_options[e]="".concat(t),o.enum_display[e]="".concat(o.translateProperty(s[e])||t),o.enum_values[e]=o.typecast(t)}))}else if("boolean"===this.schema.type)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(n=0;n<this.schema.enumSource.length;n++)"string"==typeof this.schema.enumSource[n]?this.enumSource[n]={source:this.schema.enumSource[n]}:Array.isArray(this.schema.enumSource[n])?this.enumSource[n]=this.schema.enumSource[n]:this.enumSource[n]=l({},this.schema.enumSource[n]);else this.schema.enumValue?this.enumSource=[{source:this.schema.enumSource,value:this.schema.enumValue}]:this.enumSource=[{source:this.schema.enumSource}];for(n=0;n<this.enumSource.length;n++)this.enumSource[n].value&&("function"==typeof(i=this.expandCallbacks("template",{template:this.enumSource[n].value})).template?this.enumSource[n].value=i.template:this.enumSource[n].value=this.jsoneditor.compileTemplate(this.enumSource[n].value,this.template_engine)),this.enumSource[n].title&&("function"==typeof(i=this.expandCallbacks("template",{template:this.enumSource[n].title})).template?this.enumSource[n].title=i.template:this.enumSource[n].title=this.jsoneditor.compileTemplate(this.enumSource[n].title,this.template_engine)),this.enumSource[n].filter&&this.enumSource[n].value&&("function"==typeof(i=this.expandCallbacks("template",{template:this.enumSource[n].filter})).template?this.enumSource[n].filter=i.template:this.enumSource[n].filter=this.jsoneditor.compileTemplate(this.enumSource[n].filter,this.template_engine))}}},{key:"build",value:function(){var t=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(e){e.preventDefault(),e.stopPropagation(),t.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(){t.input.parentNode&&t.afterInputReady()}))}},{key:"afterInputReady",value:function(){this.theme.afterInputReady(this.input)}},{key:"onInputChange",value:function(){var t,e=this.typecast(this.input.value);(t=this.enum_values.includes(e)?this.enum_values[this.enum_values.indexOf(e)]:this.enum_values[0])!==this.value&&(this.is_dirty=!0,this.value=t,this.onChange(!0))}},{key:"onWatchedFieldChange",value:function(){var t,n,i=[],o=[];if(this.enumSource){t=this.getWatchedFieldValues();for(var r=0;r<this.enumSource.length;r++)if(Array.isArray(this.enumSource[r]))i=i.concat(this.enumSource[r]),o=o.concat(this.enumSource[r]);else{var s=[];if(s=Array.isArray(this.enumSource[r].source)?this.enumSource[r].source:t[this.enumSource[r].source]){if(this.enumSource[r].slice&&(s=Array.prototype.slice.apply(s,this.enumSource[r].slice)),this.enumSource[r].filter){var a=[];for(n=0;n<s.length;n++)this.enumSource[r].filter({i:n,item:s[n],watched:t})&&a.push(s[n]);s=a}var l=[],c=[];for(n=0;n<s.length;n++){var u=s[n];this.enumSource[r].value?c[n]=this.typecast(this.enumSource[r].value({i:n,item:u})):c[n]=s[n],this.enumSource[r].title?l[n]=this.enumSource[r].title({i:n,item:u}):l[n]=c[n]}this.enumSource[r].sort&&function(t,e,n){t.map((function(t,n){return{v:t,t:e[n]}})).sort((function(t,e){return t.v<e.v?-n:t.v===e.v?0:n})).forEach((function(n,i){t[i]=n.v,e[i]=n.t}))}.bind(null,c,l,"desc"===this.enumSource[r].sort?1:-1)(),i=i.concat(c),o=o.concat(l)}}var h=this.value;this.theme.setSelectOptions(this.input,i,o),this.enum_options=i,this.enum_display=o,this.enum_values=i,i.includes(h)||!1!==this.jsoneditor.options.enum_source_value_auto_select?(this.input.value=h,this.value=h):(this.input.value=i[0],this.value=this.typecast(i[0]||""),this.parent&&!this.watchLoop?this.parent.onChildEditorChange(this):this.jsoneditor.onChange(),this.jsoneditor.notifyWatchers(this.path))}se(ae(e.prototype),"onWatchedFieldChange",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,se(ae(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,se(ae(e.prototype),"disable",this).call(this,t)}},{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),se(ae(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this,n=this.jsoneditor.options.show_errors,i="change"===n||"interaction"===n;if(("never"!==n||this.is_dirty)&&(!i||this.is_dirty)){var o=t.reduce((function(t,n){return n.path===e.path&&t.push(n.message),t}),[]);o.length?this.theme.addInputError(this.input,"".concat(o.join(". "),".")):this.theme.removeInputError(this.input)}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ie(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function he(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ue(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}function de(t,e,n){return e=me(e),function(t,e){if(e&&("object"===ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pe()?Reflect.construct(e,n||[],me(t).constructor):e.apply(t,n))}function pe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pe=function(){return!!t})()}function fe(){return fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=me(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},fe.apply(this,arguments)}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ye(t,e)}var ve=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),de(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){if(t=this.applyConstFilter(t),this.choices_instance){var i=this.typecast(t||"");if(this.enum_values.includes(i)||(i=this.enum_values[0]),this.value===i)return;n?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.input.value=this.enum_options[this.enum_values.indexOf(i)],this.choices_instance.setChoiceByValue(this.input.value),this.value=i,this.onChange()}else fe(me(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){if(window.Choices&&!this.choices_instance){var t=this.expandCallbacks("choices",l({},this.defaults.options.choices||{},this.options.choices||{}));this.choices_instance=new window.Choices(this.input,t)}fe(me(e.prototype),"afterInputReady",this).call(this)}},{key:"onWatchedFieldChange",value:function(){var t=this;if(fe(me(e.prototype),"onWatchedFieldChange",this).call(this),this.choices_instance){var n=this.enum_options.map((function(e,n){return{value:e,label:t.enum_display[n]}}));this.choices_instance.setChoices(n,"value","label",!0),this.choices_instance.setChoiceByValue("".concat(this.value))}}},{key:"enable",value:function(){!this.always_disabled&&this.choices_instance&&this.choices_instance.enable(),fe(me(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.choices_instance&&this.choices_instance.disable(),fe(me(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.choices_instance&&(this.choices_instance.destroy(),this.choices_instance=null),fe(me(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,he(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function be(t){return be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},be(t)}function ge(t){var e=function(t){if("object"!=be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==be(e)?e:e+""}function _e(t,e,n){return e=ke(e),function(t,e){if(e&&("object"===be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,we()?Reflect.construct(e,n||[],ke(t).constructor):e.apply(t,n))}function we(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(we=function(){return!!t})()}function xe(){return xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ke(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},xe.apply(this,arguments)}function ke(t){return ke=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ke(t)}function Oe(t,e){return Oe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oe(t,e)}ve.rules={".choices > *":"box-sizing:border-box"};var je=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),_e(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oe(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){if(xe(ke(e.prototype),"build",this).call(this),this.input&&(this.schema.max&&"string"==typeof this.schema.max&&this.input.setAttribute("max",this.schema.max),this.schema.min&&"string"==typeof this.schema.max&&this.input.setAttribute("min",this.schema.min),window.flatpickr&&"object"===be(this.options.flatpickr))){this.options.flatpickr.enableTime="date"!==this.schema.format,this.options.flatpickr.noCalendar="time"===this.schema.format,"integer"===this.schema.type&&(this.options.flatpickr.mode="single"),this.input.setAttribute("data-input","");var t=this.input;if(!0===this.options.flatpickr.wrap){var n=[];if(!1!==this.options.flatpickr.showToggleButton){var i=this.getButton("","time"===this.schema.format?"time":"calendar","flatpickr_toggle_button");i.setAttribute("data-toggle",""),n.push(i)}if(!1!==this.options.flatpickr.showClearButton){var o=this.getButton("","clear","flatpickr_clear_button");o.setAttribute("data-clear",""),n.push(o)}var r=this.input.parentNode,s=this.input.nextSibling,a=this.theme.getInputGroup(this.input,n);void 0!==a?(this.options.flatpickr.inline=!1,r.insertBefore(a,s),t=a):this.options.flatpickr.wrap=!1}this.flatpickr=window.flatpickr(t,this.options.flatpickr),!0===this.options.flatpickr.inline&&!0===this.options.flatpickr.inlineHideInput&&this.input.setAttribute("type","hidden")}}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){if("string"===this.schema.type)return this.value;if(""!==this.value&&void 0!==this.value){var t="time"===this.schema.format?"1970-01-01 ".concat(this.value):this.value;return parseInt(new Date(t).getTime()/1e3)}}}},{key:"setValue",value:function(t,n,i){if(t=this.applyConstFilter(t),"string"===this.schema.type)xe(ke(e.prototype),"setValue",this).call(this,t,n,i),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var o=new Date(1e3*t),r=o.getFullYear(),s=this.zeroPad(o.getMonth()+1),a=this.zeroPad(o.getDate()),l=this.zeroPad(o.getHours()),c=this.zeroPad(o.getMinutes()),u=this.zeroPad(o.getSeconds()),h=[r,s,a].join("-"),d=[l,c,u].join(":"),p="".concat(h,"T").concat(d);"date"===this.schema.format?p=h:"time"===this.schema.format&&(p=d),this.input.value=p,this.refreshValue(),this.flatpickr&&this.flatpickr.setDate(p)}}},{key:"destroy",value:function(){this.flatpickr&&this.flatpickr.destroy(),this.flatpickr=null,xe(ke(e.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ge(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function Ce(t){return Ce="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ce(t)}function Ee(t){var e=function(t){if("object"!=Ce(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ce(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ce(e)?e:e+""}function Pe(t,e,n){return e=Te(e),function(t,e){if(e&&("object"===Ce(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Le()?Reflect.construct(e,n||[],Te(t).constructor):e.apply(t,n))}function Le(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Le=function(){return!!t})()}function Se(){return Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Te(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Se.apply(this,arguments)}function Te(t){return Te=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Te(t)}function Ae(t,e){return Ae=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ae(t,e)}var Re=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Pe(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ae(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.currentEditor]&&this.editors[this.currentEditor].register()}Se(Te(e.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Se(Te(e.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].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 t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();Se(Te(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(){if(this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].disable();Se(Te(e.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(){var t=this,e=this.getWatchedFieldValues();if(e){var n=document.location.origin+document.location.pathname+this.template(e);this.editors[this.refs[n]]||this.buildChildEditor(n),this.currentEditor=this.refs[n],this.register(),this.editors.forEach((function(e,n){e&&(t.currentEditor===n?e.container.style.display="":e.container.style.display="none")})),this.refreshValue(),this.onChange(!0)}}},{key:"buildChildEditor",value:function(t){this.refs[t]=this.editors.length;var e=this.theme.getChildEditorHolder();this.editor_holder.appendChild(e);var n=l({},this.schema,this.jsoneditor.refs[t]),i=this.jsoneditor.getEditorClass(n,this.jsoneditor),o=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:n,container:e,path:this.path,parent:this,required:!0});this.editors.push(o),o.preBuild(),o.build(),o.postBuild()}},{key:"preBuild",value:function(){var t;for(this.refs={},this.editors=[],this.currentEditor="",t=0;t<this.schema.links.length;t++)if("describedby"===this.schema.links[t].rel.toLowerCase()){this.template=this.jsoneditor.compileTemplate(this.schema.links[t].href,this.template_engine);break}this.schema.links=this.schema.links.slice(0,t).concat(this.schema.links.slice(t+1)),0===this.schema.links.length&&delete this.schema.links,this.baseSchema=l({},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(t,n){this.editors[this.currentEditor]&&this.refreshValue(),Se(Te(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"refreshValue",value:function(){this.editors[this.currentEditor]&&(this.value=this.editors[this.currentEditor].getValue())}},{key:"setValue",value:function(t,e){t=this.applyConstFilter(t),this.editors[this.currentEditor]&&(this.editors[this.currentEditor].setValue(t,e),this.refreshValue(),this.onChange())}},{key:"destroy",value:function(){this.editors.forEach((function(t){t&&t.destroy()})),this.editor_holder&&this.editor_holder.parentNode&&this.editor_holder.parentNode.removeChild(this.editor_holder),Se(Te(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){this.editors.forEach((function(e){e&&e.showValidationErrors(t)}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ee(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Ie(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function ze(t){var e=function(t){if("object"!=Be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Be(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Be(e)?e:e+""}function Me(t,e,n){return e=Fe(e),function(t,e){if(e&&("object"===Be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ne()?Reflect.construct(e,n||[],Fe(t).constructor):e.apply(t,n))}function Ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ne=function(){return!!t})()}function De(){return De="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fe(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},De.apply(this,arguments)}function Fe(t){return Fe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fe(t)}function He(t,e){return He=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},He(t,e)}var Ve=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Me(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&He(t,e)}(e,t),n=e,(i=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var t=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 e=0;e<this.enum.length;e++)this.select_options[e]=this.options.enum_titles[e]||"Value ".concat(e+1),this.html_values[e]=this.getHTML(this.enum[e]);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(e){t.selected=t.select_options.indexOf(e.currentTarget.value),t.value=t.enum[t.selected],t.refreshValue(),t.onChange(!0)})),this.value=this.enum[0],this.refreshValue(),1===this.enum.length&&(this.switcher.style.display="none")}},{key:"refreshValue",value:function(){var t=this;if(this.enum){this.selected=-1;var e=JSON.stringify(this.value);this.enum.forEach((function(n,i){if(e===JSON.stringify(n))return t.selected=i,!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,De(Fe(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.switcher.disabled=!0,De(Fe(e.prototype),"disable",this).call(this)}},{key:"getHTML",value:function(t){var e,n,i=this;if(null===t)return"<em>null</em>";if("object"===Be(t)){var o="";return e=t,n=function(e,n){var r=i.getHTML(n);Array.isArray(t)||(r="<div><em>".concat(e,"</em>: ").concat(r,"</div>")),o+="<li>".concat(r,"</li>")},Array.isArray(e)||"number"==typeof e.length&&e.length>0&&e.length-1 in e?Array.from(e).forEach((function(t,e){return n(e,t)})):Object.entries(e).forEach((function(t){var e,i=function(t){if(Array.isArray(t))return t}(e=t)||function(t){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,o,r,s=[],a=!0,l=!1;try{for(o=(e=e.call(t)).next;!(a=(n=o.call(e)).done)&&(s.push(n.value),2!==s.length);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(l)throw i}}return s}}(e)||function(t){if(t){if("string"==typeof t)return Ie(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?Ie(t,2):void 0}}(e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),o=i[0],r=i[1];return n(o,r)})),o=Array.isArray(t)?"<ol>".concat(o,"</ol>"):"<ul style='margin-top:0;margin-bottom:0;padding-top:0;padding-bottom:0;'>".concat(o,"</ul>")}return"boolean"==typeof t?t?"true":"false":"string"==typeof t?t.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"):t}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value!==t&&(this.value=t,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),De(Fe(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ze(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function qe(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ze(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}function Ue(t,e,n){return e=Je(e),function(t,e){if(e&&("object"===Ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,We()?Reflect.construct(e,n||[],Je(t).constructor):e.apply(t,n))}function We(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(We=function(){return!!t})()}function Ge(){return Ge="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Je(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ge.apply(this,arguments)}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(t)}function $e(t,e){return $e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$e(t,e)}var Ye=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ue(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$e(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){Ge(Je(e.prototype),"register",this).call(this),this.input&&this.jsoneditor.options.use_name_attributes&&this.input.setAttribute("name",this.formname)}},{key:"unregister",value:function(){Ge(Je(e.prototype),"unregister",this).call(this),this.input&&this.input.removeAttribute("name")}},{key:"setValue",value:function(t,e,n){if(t=this.applyConstFilter(t),(!this.template||n)&&(null==t?t="":"object"===Ze(t)?t=JSON.stringify(t):"string"!=typeof t&&(t="".concat(t)),t!==this.serialized)){var i=this.sanitize(t);if(this.input.value!==i){this.input.value=i;var o=n||this.getValue()!==t;this.refreshValue(),e?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0),this.adjust_height&&this.adjust_height(this.input),this.onChange(o)}}}},{key:"getNumColumns",value:function(){return 2}},{key:"enable",value:function(){Ge(Je(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(){Ge(Je(e.prototype),"disable",this).call(this)}},{key:"refreshValue",value:function(){this.value=this.input.value,"string"!=typeof this.value&&(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),Ge(Je(e.prototype),"destroy",this).call(this)}},{key:"sanitize",value:function(t){return t}},{key:"onWatchedFieldChange",value:function(){var t;this.template&&(t=this.getWatchedFieldValues(),this.setValue(this.template(t),!1,!0)),Ge(Je(e.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 t=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof t.template?this.template=t.template:this.template=this.jsoneditor.compileTemplate(this.schema.template,this.template_engine),this.refreshValue()}else this.refreshValue()}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qe(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function Ke(t){return Ke="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ke(t)}function Xe(t){var e=function(t){if("object"!=Ke(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ke(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ke(e)?e:e+""}function Qe(t,e,n){return e=en(e),function(t,e){if(e&&("object"===Ke(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,tn()?Reflect.construct(e,n||[],en(t).constructor):e.apply(t,n))}function tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(tn=function(){return!!t})()}function en(t){return en=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},en(t)}function nn(t,e){return nn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},nn(t,e)}var on=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Qe(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&nn(t,e)}(e,t),n=e,(i=[{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}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Xe(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Gt);function rn(t){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(t)}function sn(t){var e=function(t){if("object"!=rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=rn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rn(e)?e:e+""}function an(t,e,n){return e=un(e),function(t,e){if(e&&("object"===rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ln()?Reflect.construct(e,n||[],un(t).constructor):e.apply(t,n))}function ln(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ln=function(){return!!t})()}function cn(){return cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=un(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},cn.apply(this,arguments)}function un(t){return un=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},un(t)}function hn(t,e){return hn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hn(t,e)}var dn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),an(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hn(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){if(cn(un(e.prototype),"build",this).call(this),void 0!==this.schema.minimum){var t=this.schema.minimum;void 0!==this.schema.exclusiveMinimum&&(t+=1),this.input.setAttribute("min",t)}if(void 0!==this.schema.maximum){var n=this.schema.maximum;void 0!==this.schema.exclusiveMaximum&&(n-=1),this.input.setAttribute("max",n)}if(void 0!==this.schema.step){var i=this.schema.step||1;this.input.setAttribute("step",i)}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(t){if(null==t)return!1;var e=t.match(d),n=parseFloat(t);return null!==e&&!isNaN(n)&&isFinite(n)}(this.value)?parseFloat(this.value):this.value:void(this.shouldBeUnset()&&(this.input.value=""))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,sn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function pn(t){return pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},pn(t)}function fn(t){var e=function(t){if("object"!=pn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==pn(e)?e:e+""}function mn(t,e,n){return e=vn(e),function(t,e){if(e&&("object"===pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,yn()?Reflect.construct(e,n||[],vn(t).constructor):e.apply(t,n))}function yn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(yn=function(){return!!t})()}function vn(t){return vn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vn(t)}function bn(t,e){return bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bn(t,e)}var gn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),mn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bn(t,e)}(e,t),n=e,(i=[{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(t){if(null==t)return!1;var e=t.match(p),n=parseInt(t);return null!==e&&!isNaN(n)&&isFinite(n)}(this.value)?parseInt(this.value):this.value:void this.shouldBeUnset()}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,fn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(dn);function _n(t){return _n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_n(t)}function wn(t){var e=function(t){if("object"!=_n(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_n(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_n(e)?e:e+""}function xn(t,e,n){return e=jn(e),function(t,e){if(e&&("object"===_n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,kn()?Reflect.construct(e,n||[],jn(t).constructor):e.apply(t,n))}function kn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kn=function(){return!!t})()}function On(){return On="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=jn(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},On.apply(this,arguments)}function jn(t){return jn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jn(t)}function Cn(t,e){return Cn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Cn(t,e)}var En=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),xn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Cn(t,e)}(e,t),n=e,(i=[{key:"preBuild",value:function(){if(On(jn(e.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=l(this.options,this.schema.options||{})}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,wn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function Pn(t){return Pn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pn(t)}function Ln(t){var e=function(t){if("object"!=Pn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pn(e)?e:e+""}function Sn(t,e,n){return e=Rn(e),function(t,e){if(e&&("object"===Pn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tn()?Reflect.construct(e,n||[],Rn(t).constructor):e.apply(t,n))}function Tn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tn=function(){return!!t})()}function An(){return An="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Rn(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},An.apply(this,arguments)}function Rn(t){return Rn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Rn(t)}function Bn(t,e){return Bn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bn(t,e)}var In=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Sn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bn(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=An(Rn(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.jodit_instance&&this.jodit_instance.setEditorValue(o.value)}},{key:"build",value:function(){this.options.format="textarea",An(Rn(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,n=this;window.Jodit?(t=this.expandCallbacks("jodit",l({},{height:300},this.defaults.options.jodit||{},this.options.jodit||{})),this.jodit_instance=new window.Jodit(this.input,t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&this.jodit_instance.setReadOnly(!0),this.jodit_instance.events.on("change",(function(){n.value=n.jodit_instance.getEditorValue(),n.is_dirty=!0,n.onChange(!0)})),this.theme.afterInputReady(this.input)):An(Rn(e.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),An(Rn(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.jodit_instance&&this.jodit_instance.setReadOnly(!0),An(Rn(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.jodit_instance&&(this.jodit_instance.destruct(),this.jodit_instance=null),An(Rn(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ln(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function zn(t,e,n,i){try{switch(t.format){case"ipv4":!function(t){var e=t.split(".");if(4!==e.length)throw new Error("error_ipv4");e.forEach((function(t){if(isNaN(+t)||+t<0||+t>255)throw new Error("error_ipv4")}))}(e);break;case"ipv6":!function(t){if(!t.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")}(e);break;case"hostname":!function(t){if(!t.match("(?=^.{4,253}$)(^((?!-)[a-zA-Z0-9-]{0,62}[a-zA-Z0-9].)+[a-zA-Z]{2,63}$)"))throw new Error("error_hostname")}(e)}return[]}catch(t){return[{path:n,property:"format",message:i(t.message)}]}}function Mn(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function Nn(t,e,n){return(e=qn(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Dn(t){return Dn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dn(t)}function Fn(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||Vn(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Hn(t){return function(t){if(Array.isArray(t))return Zn(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||Vn(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vn(t,e){if(t){if("string"==typeof t)return Zn(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Zn(t,e):void 0}}function Zn(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function qn(t){var e=function(t){if("object"!=Dn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Dn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dn(e)?e:e+""}n(8431),n(7945),n(1278);var Un=function(){return t=function t(e,n,i,o){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.jsoneditor=e,this.schema=n||this.jsoneditor.schema,this.options=i||{},this.translate=this.jsoneditor.translate||o.translate,this.translateProperty=this.jsoneditor.translateProperty||o.translateProperty,this.defaults=o,this._validateSubSchema={dependentRequired:function(t,e,n){var i=[];if(void 0!==t.dependentRequired){var o=[];Object.keys(t.dependentRequired).forEach((function(n){if(void 0!==e[n]){var i=t.dependentRequired[n];o=i.filter((function(t){return!h(e,t)}))}})),o.length>0&&i.push({message:"Must have the required properties: "+o.join(", "),path:n})}return i},dependentSchemas:function(t,e,n){var i=this,o=[];return Object.keys(t.dependentSchemas).forEach((function(r){if(void 0!==e[r]){var s=t.dependentSchemas[r],a=i._validateSchema(s,e,n);o=[].concat(Hn(o),Hn(a))}})),o},contains:function(t,e,n){var i=this,o=[],r=0;e.forEach((function(e){0===i._validateSchema(t.contains,e,n).length&&r++}));var s=0===r;return void 0!==t.minContains?r<t.minContains&&o.push({message:this.translate("error_minContains",[r,t.minContains],t),path:n}):s&&o.push({message:this.translate("error_contains",null,t),path:n}),void 0!==t.maxContains&&r>t.maxContains&&o.push({message:this.translate("error_maxContains",[r,t.maxContains],t),path:n}),o},if:function(t,e,n){if(void 0===t.then&&void 0===t.else)return[];var i=this._validateSchema(t.if,e,n),o=[],r=[];return void 0!==t.then&&(o=this._validateSchema(t.then,e,n)),void 0!==t.else&&(r=this._validateSchema(t.else,e,n)),!0===t.if?o:!1===t.if?r:0===i.length?o:i.length>0?r:[]},const:function(t,e,n){return JSON.stringify(t.const)===JSON.stringify(e)?[]:[{path:n,property:"const",message:this.translate("error_const",null,t)}]},enum:function(t,e,n){var i=JSON.stringify(e);return t.enum.some((function(t){return i===JSON.stringify(t)}))?[]:[{path:n,property:"enum",message:this.translate("error_enum",null,t)}]},extends:function(t,e,n){var i=this;return t.extends.reduce((function(t,o){return t.push.apply(t,Hn(i._validateSchema(o,e,n))),t}),[])},allOf:function(t,e,n){var i=this;return t.allOf.reduce((function(t,o){return t.push.apply(t,Hn(i._validateSchema(o,e,n))),t}),[])},anyOf:function(t,e,n){var i=this;return t.anyOf.some((function(t){return!i._validateSchema(t,e,n).length}))?[]:[{path:n,property:"anyOf",message:this.translate("error_anyOf",null,t)}]},oneOf:function(t,e,n){var i=this,o=0,r=[];t.oneOf.forEach((function(t,s){var a=i._validateSchema(t,e,n);a.length||o++,a.forEach((function(t){t.path="".concat(n,".oneOf[").concat(s,"]").concat(t.path.substr(n.length))})),r.push.apply(r,Hn(a))}));var s=[];return 1!==o&&(s.push({path:n,property:"oneOf",message:this.translate("error_oneOf",[o],t)}),s.push.apply(s,r)),s},not:function(t,e,n){return this._validateSchema(t.not,e,n).length?[]:[{path:n,property:"not",message:this.translate("error_not",null,t)}]},type:function(t,e,n){var i=this;if(Array.isArray(t.type)){if(!t.type.some((function(t){return i._checkType(t,e)})))return[{path:n,property:"type",message:this.translate("error_type_union",null,t)}]}else if(["date","time","datetime-local"].includes(t.format)&&"integer"===t.type){if(!this._checkType("string","".concat(e)))return[{path:n,property:"type",message:this.translate("error_type",[t.format],t)}]}else if(!this._checkType(t.type,e))return[{path:n,property:"type",message:this.translate("error_type",[t.type],t)}];return[]},disallow:function(t,e,n){var i=this;if(Array.isArray(t.disallow)){if(t.disallow.some((function(t){return i._checkType(t,e)})))return[{path:n,property:"disallow",message:this.translate("error_disallow_union",null,t)}]}else if(this._checkType(t.disallow,e))return[{path:n,property:"disallow",message:this.translate("error_disallow",[t.disallow],t)}];return[]}},this._validateNumberSubSchema={multipleOf:function(t,e,n){return this._validateNumberSubSchemaMultipleDivisible(t,e,n)},divisibleBy:function(t,e,n){return this._validateNumberSubSchemaMultipleDivisible(t,e,n)},maximum:function(t,e,n){var i=t.exclusiveMaximum?e<t.maximum:e<=t.maximum;return window.math?i=window.math[t.exclusiveMaximum?"smaller":"smallerEq"](window.math.bignumber(e),window.math.bignumber(t.maximum)):window.Decimal&&(i=new window.Decimal(e)[t.exclusiveMaximum?"lt":"lte"](new window.Decimal(t.maximum))),i?[]:[{path:n,property:"maximum",message:this.translate(t.exclusiveMaximum?"error_maximum_excl":"error_maximum_incl",[t.maximum],t)}]},minimum:function(t,e,n){var i=t.exclusiveMinimum?e>t.minimum:e>=t.minimum;return window.math?i=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(i=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),i?[]:[{path:n,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum],t)}]}},this._validateStringSubSchema={maxLength:function(t,e,n){var i=[];return"".concat(e).length>t.maxLength&&i.push({path:n,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength],t)}),i},minLength:function(t,e,n){return"".concat(e).length<t.minLength?[{path:n,property:"minLength",message:this.translate(1===t.minLength?"error_notempty":"error_minLength",[t.minLength],t)}]:[]},pattern:function(t,e,n){return new RegExp(t.pattern).test(e)?[]:[{path:n,property:"pattern",message:t.options&&t.options.patternmessage?t.options.patternmessage:this.translate("error_pattern",[t.pattern],t)}]}},this._validateArraySubSchema={items:function(t,e,n){var i=this,o=[];if(Array.isArray(t.items))for(var r=0;r<e.length;r++)if(t.items[r])o.push.apply(o,Hn(this._validateSchema(t.items[r],e[r],"".concat(n,".").concat(r))));else{if(!0===t.additionalItems)break;if(!t.additionalItems){if(!1===t.additionalItems){o.push({path:n,property:"additionalItems",message:this.translate("error_additionalItems",null,t)});break}break}o.push.apply(o,Hn(this._validateSchema(t.additionalItems,e[r],"".concat(n,".").concat(r))))}else e.forEach((function(e,r){o.push.apply(o,Hn(i._validateSchema(t.items,e,"".concat(n,".").concat(r))))}));return o},maxItems:function(t,e,n){return e.length>t.maxItems?[{path:n,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems],t)}]:[]},minItems:function(t,e,n){return e.length<t.minItems?[{path:n,property:"minItems",message:this.translate("error_minItems",[t.minItems],t)}]:[]},uniqueItems:function(t,e,n){for(var i={},o=0;o<e.length;o++){var r=JSON.stringify(e[o]);if(i[r])return[{path:n,property:"uniqueItems",message:this.translate("error_uniqueItems",null,t)}];i[r]=!0}return[]}},this._validateObjectSubSchema={maxProperties:function(t,e,n){return Object.keys(e).length>t.maxProperties?[{path:n,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties],t)}]:[]},minProperties:function(t,e,n){return Object.keys(e).length<t.minProperties?[{path:n,property:"minProperties",message:this.translate("error_minProperties",[t.minProperties],t)}]:[]},required:function(t,e,n){var i=this,o=[];return Array.isArray(t.required)&&t.required.forEach((function(r){if(void 0===e[r]){var s=i.jsoneditor.getEditor("".concat(n,".").concat(r));s&&!1===s.dependenciesFulfilled||s&&["button","info"].includes(s.schema.format||s.schema.type)||o.push({path:n,property:"required",message:i.translate("error_required",[t&&t.properties&&t.properties[r]&&t.properties[r].title?t.properties[r].title:r],t)})}})),o},properties:function(t,e,n,i){var o=this,r=[];return Object.entries(t.properties).forEach((function(t){var s=Fn(t,2),a=s[0],l=s[1];i[a]=!0,r.push.apply(r,Hn(o._validateSchema(l,e[a],"".concat(n,".").concat(a))))})),r},patternProperties:function(t,e,n,i){var o=this,r=[];return Object.entries(t.patternProperties).forEach((function(t){var s=Fn(t,2),a=s[0],l=s[1],c=new RegExp(a);Object.entries(e).forEach((function(t){var e=Fn(t,2),s=e[0],a=e[1];c.test(s)&&(i[s]=!0,r.push.apply(r,Hn(o._validateSchema(l,a,"".concat(n,".").concat(s)))))}))})),r}},this._validateObjectSubSchema2={propertyNames:function(t,e,n,i){for(var o,r=this,s=[],a=Object.keys(e),l=null,c=function(){var e="";return l=a[u],"boolean"==typeof t.propertyNames?!0===t.propertyNames?0:(s.push({path:n,property:"propertyNames",message:r.translate("error_property_names_false",[l],t)}),1):Object.entries(t.propertyNames).every((function(i){var o=Fn(i,2),a=o[0],c=o[1],u=!1;switch(a){case"maxLength":if("number"!=typeof c){e="error_property_names_maxlength";break}if(l.length>c){e="error_property_names_exceeds_maxlength";break}return!0;case"const":if(c!==l){e="error_property_names_const_mismatch";break}return!0;case"enum":if(!Array.isArray(c)){e="error_property_names_enum";break}if(c.forEach((function(t){t===l&&(u=!0)})),!u){e="error_property_names_enum_mismatch";break}return!0;case"pattern":if("string"!=typeof c){e="error_property_names_pattern";break}if(!new RegExp(c).test(l)){e="error_property_names_pattern_mismatch";break}return!0;default:return s.push({path:n,property:"propertyNames",message:r.translate("error_property_names_unsupported",[a],t)}),!1}return s.push({path:n,property:"propertyNames",message:r.translate(e,[l],t)}),!1}))?void 0:1},u=0;u<a.length&&(0===(o=c())||1!==o);u++);return s},additionalProperties:function(t,e,n,i){for(var o=[],r=Object.keys(e),s=0;s<r.length;s++){var a=r[s];if(!i[a]){if(!t.additionalProperties){o.push({path:n,property:"additionalProperties",message:this.translate("error_additional_properties",[a],t)});break}if(!0===t.additionalProperties)break;o.push.apply(o,Hn(this._validateSchema(t.additionalProperties,e[a],"".concat(n,".").concat(a))))}}return o},dependencies:function(t,e,n){var i=this,o=[];return Object.entries(t.dependencies).forEach((function(r){var s=Fn(r,2),a=s[0],l=s[1];void 0!==e[a]&&(Array.isArray(l)?l.forEach((function(r){void 0===e[r]&&o.push({path:n,property:"dependencies",message:i.translate("error_dependency",[r],t)})})):o.push.apply(o,Hn(i._validateSchema(l,e,n))))})),o}}},e=[{key:"fitTest",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e7,i={match:0,extra:0};if("object"===Dn(t)&&null!==t){var o=this._getSchema(e);if(o.anyOf){var r,s=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?Mn(Object(n),!0).forEach((function(e){Nn(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Mn(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},i),a=function(t){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!e){if(Array.isArray(t)||(e=Vn(t))){e&&(t=e);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,r=!0,s=!1;return{s:function(){e=e.call(t)},n:function(){var t=e.next();return r=t.done,t},e:function(t){s=!0,o=t},f:function(){try{r||null==e.return||e.return()}finally{if(s)throw o}}}}(o.anyOf);try{for(a.s();!(r=a.n()).done;){var l=r.value,c=this.fitTest(t,l,n);(c.match>s.match||c.match===s.match&&c.extra<s.extra)&&(s=c)}}catch(t){a.e(t)}finally{a.f()}return s}var u=this._getSchema(e).properties;for(var d in u)if(h(u,d)){if("object"===Dn(t[d])&&"object"===Dn(u[d])&&"object"===Dn(u[d].properties)){var p=this.fitTest(t[d],u[d],n/100);i.match+=p.match,i.extra+=p.extra}void 0!==t[d]&&(i.match+=n)}else i.extra+=n}return i}},{key:"_getSchema",value:function(t){return void 0===t?l({},this.jsoneditor.expandRefs(this.schema)):t}},{key:"validate",value:function(t){return this._validateSchema(this.schema,t)}},{key:"_validateSchema",value:function(t,e,n){var i=this,o=[];return n=n||this.jsoneditor.root.formname,t=l({},this.jsoneditor.expandRefs(t)),void 0===e?this._validateV3Required(t,e,n):(Object.keys(t).forEach((function(r){i._validateSubSchema[r]&&o.push.apply(o,Hn(i._validateSubSchema[r].call(i,t,e,n)))})),o.push.apply(o,Hn(this._validateByValueType(t,e,n))),t.links&&t.links.forEach((function(r,s){r.rel&&"describedby"===r.rel.toLowerCase()&&(t=i._expandSchemaLink(t,s),o.push.apply(o,Hn(i._validateSchema(t,e,n,i.translate))))})),["date","time","datetime-local"].includes(t.format)&&o.push.apply(o,Hn(this._validateDateTimeSubSchema(t,e,n))),["uuid"].includes(t.format)&&o.push.apply(o,Hn(this._validateUUIDSchema(t,e,n))),o.push.apply(o,Hn(this._validateCustomValidator(t,e,n))),this._removeDuplicateErrors(o))}},{key:"_expandSchemaLink",value:function(t,e){var n=t.links[e].href,i=this.jsoneditor.root.getValue(),o=this.jsoneditor.compileTemplate(n,this.jsoneditor.template),r=document.location.origin+document.location.pathname+o(i);return t.links=t.links.slice(0,e).concat(t.links.slice(e+1)),l({},t,this.jsoneditor.refs[r])}},{key:"_validateV3Required",value:function(t,e,n){return(void 0!==t.required&&!0===t.required||void 0===t.required&&!0===this.jsoneditor.options.required_by_default)&&"info"!==t.type?[{path:n,property:"required",message:this.translate("error_notset",null,t)}]:[]}},{key:"_validateByValueType",value:function(t,e,n){var i=this,o=[];if(null===e)return o;if("number"==typeof e)Object.keys(t).forEach((function(r){i._validateNumberSubSchema[r]&&o.push.apply(o,Hn(i._validateNumberSubSchema[r].call(i,t,e,n)))}));else if("string"==typeof e)Object.keys(t).forEach((function(r){i._validateStringSubSchema[r]&&o.push.apply(o,Hn(i._validateStringSubSchema[r].call(i,t,e,n)))}));else if(Array.isArray(e))Object.keys(t).forEach((function(r){i._validateArraySubSchema[r]&&o.push.apply(o,Hn(i._validateArraySubSchema[r].call(i,t,e,n)))}));else if("object"===Dn(e)){var r={};Object.keys(t).forEach((function(s){i._validateObjectSubSchema[s]&&o.push.apply(o,Hn(i._validateObjectSubSchema[s].call(i,t,e,n,r)))})),void 0!==t.additionalProperties||!this.jsoneditor.options.no_additional_properties||t.oneOf||t.anyOf||t.allOf||(t.additionalProperties=!1),Object.keys(t).forEach((function(s){void 0!==i._validateObjectSubSchema2[s]&&o.push.apply(o,Hn(i._validateObjectSubSchema2[s].call(i,t,e,n,r)))}))}return o}},{key:"_validateUUIDSchema",value:function(t,e,n){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)?[]:[{path:n,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}$"],t)}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(t,e,n){var i=t.multipleOf||t.divisibleBy,o=e/i===Math.floor(e/i);return window.math?o=window.math.mod(window.math.bignumber(e),window.math.bignumber(i)).equals(0):window.Decimal&&(o=new window.Decimal(e).mod(new window.Decimal(i)).equals(0)),o?[]:[{path:n,property:t.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[i],t)}]}},{key:"_validateDateTimeSubSchema",value:function(t,e,n){var i=this,o=this.jsoneditor.getEditor(n),r=o&&o.flatpickr?o.flatpickr.config.dateFormat:{date:'"YYYY-MM-DD"',time:'"HH:MM"',"datetime-local":'"YYYY-MM-DD HH:MM"'}[t.format];if("integer"===t.type)return function(t,e,n){return 1*e<1?[{path:n,property:"format",message:i.translate("error_invalid_epoch",null,t)}]:e!==Math.abs(parseInt(e))?[{path:n,property:"format",message:i.translate("error_".concat(t.format.replace(/-/g,"_")),[r],t)}]:[]}(t,e,n);if(o&&o.flatpickr){if(o)return function(t,e,n,o){if(""!==e){var r;if("single"!==o.flatpickr.config.mode){var s="range"===o.flatpickr.config.mode?o.flatpickr.l10n.rangeSeparator:", ";r=o.flatpickr.selectedDates.map((function(t){return o.flatpickr.formatDate(t,o.flatpickr.config.dateFormat)})).join(s)}try{if(r){if(r!==e)throw new Error("".concat(o.flatpickr.config.mode," mismatch"))}else if(o.flatpickr.formatDate(o.flatpickr.parseDate(e,o.flatpickr.config.dateFormat),o.flatpickr.config.dateFormat)!==e)throw new Error("mismatch")}catch(e){var a=void 0!==o.flatpickr.config.errorDateFormat?o.flatpickr.config.errorDateFormat:o.flatpickr.config.dateFormat;return[{path:n,property:"format",message:i.translate("error_".concat(o.format.replace(/-/g,"_")),[a],t)}]}}return[]}(t,e,n,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})?)$/}[t.format].test(e))return[{path:n,property:"format",message:this.translate("error_".concat(t.format.replace(/-/g,"_")),[r],t)}];return[]}},{key:"_validateCustomValidator",value:function(t,e,n){var i=this,o=[];o.push.apply(o,Hn(zn.call(this,t,e,n,this.translate)));var r=function(r){o.push.apply(o,Hn(r.call(i,t,e,n)))};return this.defaults.custom_validators.forEach(r),this.options.custom_validators&&this.options.custom_validators.forEach(r),o}},{key:"_removeDuplicateErrors",value:function(t){return t.reduce((function(t,e){var n=!0;return t||(t=[]),t.forEach((function(t){t.message===e.message&&t.path===e.path&&t.property===e.property&&(t.errorcount++,n=!1)})),n&&(e.errorcount=1,t.push(e)),t}),[])}},{key:"_checkType",value:function(t,e){var n={string:function(t){return"string"==typeof t},number:function(t){return"number"==typeof t},integer:function(t){return"number"==typeof t&&t===Math.floor(t)},boolean:function(t){return"boolean"==typeof t},array:function(t){return Array.isArray(t)},object:function(t){return null!==t&&!Array.isArray(t)&&"object"===Dn(t)},null:function(t){return null===t}};return"string"==typeof t?!n[t]||n[t](e):!this._validateSchema(t,e).length}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,qn(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Wn(t){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(t)}function Gn(t){var e=function(t){if("object"!=Wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wn(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wn(e)?e:e+""}function Jn(t,e,n){return e=Kn(e),function(t,e){if(e&&("object"===Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$n()?Reflect.construct(e,n||[],Kn(t).constructor):e.apply(t,n))}function $n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($n=function(){return!!t})()}function Yn(){return Yn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Kn(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Yn.apply(this,arguments)}function Kn(t){return Kn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Kn(t)}function Xn(t,e){return Xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xn(t,e)}var Qn=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Jn(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xn(t,e)}(e,t),n=e,(i=[{key:"register",value:function(){if(this.editors){for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].unregister();this.editors[this.type]&&this.editors[this.type].register()}Yn(Kn(e.prototype),"register",this).call(this)}},{key:"unregister",value:function(){if(Yn(Kn(e.prototype),"unregister",this).call(this),this.editors)for(var t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].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 t=0;t<this.editors.length;t++)this.editors[t]&&this.editors[t].enable();this.switcher.disabled=!1,Yn(Kn(e.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){if(t&&(this.always_disabled=!0),this.editors)for(var n=0;n<this.editors.length;n++)this.editors[n]&&this.editors[n].disable(t);this.switcher.disabled=!0,Yn(Kn(e.prototype),"disable",this).call(this)}},{key:"switchEditor",value:function(t){var e=this;this.lastType=this.type,this.editors[t]||this.buildChildEditor(t);var n=this.getValue();this.type=t,this.register(),this.editors.forEach((function(t,i){var o,r;t&&(e.type===i?(e.keep_only_existing_values&&(o=t.getValue(),r=n,Object.keys(r).forEach((function(t){t in o&&(o[t]=r[t])})),n=o),(e.keep_values||e.if)&&t.setValue(n,!0),t.container.style.display=""):t.container.style.display="none")})),this.onChange(!0,!1,{event:"switch",data:{type:this.lastType,path:this.editors[t].path}}),this.refreshValue(),this.refreshHeaderText()}},{key:"buildChildEditor",value:function(t){var e,n,i=this,o=this.types[t],r=this.theme.getChildEditorHolder();this.editor_holder.appendChild(r),"string"==typeof o?(n=l({},this.schema)).type=o:(n=l({},this.schema,o),n=this.jsoneditor.expandRefs(n),o&&o.required&&Array.isArray(o.required)&&this.schema.required&&Array.isArray(this.schema.required)&&(n.required=this.schema.required.concat(o.required))),null!==(e=n)&&void 0!==e&&null!==(e=e.options)&&void 0!==e&&e.dependencies&&delete n.options.dependencies;var s=this.jsoneditor.getEditorClass(n);this.editors[t]=this.jsoneditor.createEditor(s,{jsoneditor:this.jsoneditor,schema:n,container:r,path:this.path,parent:this,required:!0}),this.editors[t].preBuild(),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].header&&this.theme.visuallyHidden(this.editors[t].header),this.editors[t].option=this.switcher_options[t],r.addEventListener("change_header_text",(function(){i.refreshHeaderText()})),t!==this.type&&(r.style.display="none")}},{key:"preBuild",value:function(){if(this.types=[],this.type=0,this.editors=[],this.validators=[],this.keep_values=!0,void 0!==this.jsoneditor.options.keep_oneof_values&&(this.keep_values=this.jsoneditor.options.keep_oneof_values),void 0!==this.options.keep_oneof_values&&(this.keep_values=this.options.keep_oneof_values),this.keep_only_existing_values=!1,void 0!==this.jsoneditor.options.keep_only_existing_values&&(this.keep_only_existing_values=this.jsoneditor.options.keep_only_existing_values),void 0!==this.options.keep_only_existing_values&&(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&&y(this.thenSchema,this.schema,this.schema.then),this.schema.else&&y(this.elseSchema,this.schema,this.schema.else),this.types.push(this.thenSchema),this.types.push(this.elseSchema),this.types.forEach((function(t){delete t.if,delete t.then,delete t.else})),delete this.schema.if;else{if(this.schema.type&&"any"!==this.schema.type)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 t=this.schema.disallow;"object"===Wn(t)&&Array.isArray(t)||(t=[t]);var e=[];this.types.forEach((function(n){t.includes(n)||e.push(n)})),this.types=e}delete this.schema.type}this.display_text=this.getDisplayText(this.types)}},{key:"build",value:function(){var t=this,e=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),e.appendChild(this.switcherLabel),e.appendChild(this.switcher)),this.switcher.addEventListener("change",(function(e){e.preventDefault(),e.stopPropagation(),t.switchEditor(t.display_text.indexOf(e.currentTarget.value)),t.onChange(!0)})),this.editor_holder=document.createElement("div"),e.appendChild(this.editor_holder);var n={};this.jsoneditor.options.custom_validators&&(n.custom_validators=this.jsoneditor.options.custom_validators),this.switcher_options=this.theme.getSwitcherOptions(this.switcher),this.types.forEach((function(e,i){var o;t.editors[i]=!1,"string"==typeof e?(o=l({},t.schema)).type=e:(o=l({},t.schema,e),e.required&&Array.isArray(e.required)&&t.schema.required&&Array.isArray(t.schema.required)&&(o.required=t.schema.required.concat(e.required))),t.validators[i]=new Un(t.jsoneditor,o,n,t.defaults)})),this.jsoneditor.on("change",(function(){t.switchIf()})),this.switchEditor(0)}},{key:"onChildEditorChange",value:function(t,n){this.editors[this.type]&&(this.refreshValue(),this.refreshHeaderText()),Yn(Kn(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"refreshHeaderText",value:function(){var t=this.getDisplayText(this.types);Array.from(this.switcher_options).forEach((function(e,n){e.textContent=t[n]}))}},{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 t=this.getIfType(this.value);this.lastType!==t&&(this.switchEditor(t),this.editors[this.type].setValue(this.value,!0)),this.switcher.value=this.display_text[this.type]}}},{key:"getIfType",value:function(t){return 0===this.jsoneditor.validator._validateSchema(this.ifSchema,t).length?0:1}},{key:"setValue",value:function(t,e){var n=this;t=this.applyConstFilter(t);var i=this.type,o={match:0,extra:0,i:this.type},r={match:0,i:null};this.validators.forEach((function(e,i){var s=null;void 0!==n.anyOf&&n.anyOf&&(s=e.fitTest(t),(o.match<s.match||o.match===s.match&&o.extra>s.extra)&&((o=s).i=i)),e.validate(t).length||null!==r.i?o=r:(r.i=i,null!==s&&(r.match=s.match))}));var s=r.i;void 0!==this.anyOf&&this.anyOf&&r.match<o.match&&(s=o.i),this.if&&(s=this.getIfType(t)),null===s&&(s=this.type),this.type=s,this.switcher.value=this.display_text[s];var a=this.type!==i;a&&(this.switchEditor(this.type),this.editors[this.type].setValue(t,e)),void 0!==t&&this.editors[this.type].setValue(t,e),this.refreshValue(),this.onChange(a)}},{key:"destroy",value:function(){this.editors.forEach((function(t){t&&t.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),Yn(Kn(e.prototype),"destroy",this).call(this)}},{key:"showValidationErrors",value:function(t){var e=this;if(this.oneOf||this.anyOf){var n=this.oneOf?"oneOf":"anyOf";this.editors.forEach((function(i,o){if(i){var r="".concat(e.path,".").concat(n,"[").concat(o,"]");i.showValidationErrors(t.reduce((function(t,n){if(n.path.startsWith(r)||n.path===r.substr(0,n.path.length)){var i=l({},n);n.path.startsWith(r)&&(i.path=e.path+i.path.substr(r.length)),t.push(i)}return t}),[]))}}))}else this.editors.forEach((function(e){e&&e.showValidationErrors(t)}))}},{key:"addLinks",value:function(){}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Gn(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ti(t){return ti="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ti(t)}function ei(t){var e=function(t){if("object"!=ti(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ti(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ti(e)?e:e+""}function ni(t,e,n){return e=oi(e),function(t,e){if(e&&("object"===ti(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ii()?Reflect.construct(e,n||[],oi(t).constructor):e.apply(t,n))}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function oi(t){return oi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},oi(t)}function ri(t,e){return ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ri(t,e)}var si=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ni(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ri(t,e)}(e,t),n=e,(i=[{key:"getValue",value:function(){if(this.dependenciesFulfilled)return null}},{key:"setValue",value:function(){this.onChange()}},{key:"getNumColumns",value:function(){return 2}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ei(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function ai(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function li(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ai(Object(n),!0).forEach((function(e){ci(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ai(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function ci(t,e,n){return(e=pi(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ui(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return hi(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?hi(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function hi(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function di(t){return di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},di(t)}function pi(t){var e=function(t){if("object"!=di(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=di(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==di(e)?e:e+""}function fi(t,e,n){return e=vi(e),function(t,e){if(e&&("object"===di(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mi()?Reflect.construct(e,n||[],vi(t).constructor):e.apply(t,n))}function mi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mi=function(){return!!t})()}function yi(){return yi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=vi(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},yi.apply(this,arguments)}function vi(t){return vi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vi(t)}function bi(t,e){return bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},bi(t,e)}var gi=function(t){function e(t,n,i){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=fi(this,e,[t,n])).currentDepth=i,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&bi(t,e)}(e,t),n=e,(i=[{key:"getChildEditors",value:function(){return this.editors}},{key:"register",value:function(){yi(vi(e.prototype),"register",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){return t.register()}))}},{key:"unregister",value:function(){yi(vi(e.prototype),"unregister",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){return t.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),yi(vi(e.prototype),"enable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(t){(t.isActive()||t.isUiOnly)&&t.enable(),t.optInCheckbox&&(t.optInCheckbox.disabled=!1)})))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.editjson_control&&(this.editjson_control.disabled=!0),this.addproperty_button&&(this.addproperty_button.disabled=!0),this.hideEditJSON(),yi(vi(e.prototype),"disable",this).call(this),this.editors&&Object.values(this.editors).forEach((function(e){(e.isActive()||e.isUiOnly)&&e.disable(t),e.optInCheckbox.disabled=!0}))}},{key:"layoutEditors",value:function(){var t,e,n=this;if(this.row_container){var i;this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(t,e){var i=n.editors[t].schema.propertyOrder,o=n.editors[e].schema.propertyOrder;return"number"!=typeof i&&(i=1e3),"number"!=typeof o&&(o=1e3),i-o}));var o,r="categories"===this.format,s=[],a=null,l=null;if("grid-strict"===this.format){var u=0;if(o=[],this.property_order.forEach((function(t){var e=n.editors[t];if(!e.property_removed){var i=e.options.hidden?0:e.options.grid_columns||e.getNumColumns(),r=e.options.hidden?0:e.options.grid_offset||0,a=!e.options.hidden&&(e.options.grid_break||!1),l={key:t,width:i,offset:r,height:e.options.hidden?0:e.container.offsetHeight};o.push(l),s[u]=o,a&&(u++,o=[])}})),this.layout===JSON.stringify(s))return!1;for(this.layout=JSON.stringify(s),i=document.createElement("div"),t=0;t<s.length;t++)for(o=this.theme.getGridRow(),i.appendChild(o),e=0;e<s[t].length;e++)a=s[t][e].key,(l=this.editors[a]).options.hidden?l.container.style.display="none":this.theme.setGridColumnSize(l.container,s[t][e].width,s[t][e].offset),o.appendChild(l.container)}else if("grid"===this.format){for(this.property_order.forEach((function(t){var e=n.editors[t];if(!e.property_removed){for(var i=!1,o=e.options.hidden?0:e.options.grid_columns||e.getNumColumns(),r=e.options.hidden?0:e.container.offsetHeight,a=0;a<s.length;a++)s[a].width+o<=12&&(!r||.5*s[a].minh<r&&2*s[a].maxh>r)&&(i=a);!1===i&&(s.push({width:0,minh:999999,maxh:0,editors:[]}),i=s.length-1),s[i].editors.push({key:t,width:o,height:r}),s[i].width+=o,s[i].minh=Math.min(s[i].minh,r),s[i].maxh=Math.max(s[i].maxh,r)}})),t=0;t<s.length;t++)if(s[t].width<12){var h=!1,d=0;for(e=0;e<s[t].editors.length;e++)(!1===h||s[t].editors[e].width>s[t].editors[h].width)&&(h=e),s[t].editors[e].width*=12/s[t].width,s[t].editors[e].width=Math.floor(s[t].editors[e].width),d+=s[t].editors[e].width;d<12&&(s[t].editors[h].width+=12-d),s[t].width=12}if(this.layout===JSON.stringify(s))return!1;for(this.layout=JSON.stringify(s),i=document.createElement("div"),t=0;t<s.length;t++)for(o=this.theme.getGridRow(),i.appendChild(o),e=0;e<s[t].editors.length;e++)a=s[t].editors[e].key,(l=this.editors[a]).options.hidden?l.container.style.display="none":this.theme.setGridColumnSize(l.container,s[t].editors[e].width),o.appendChild(l.container)}else{if(i=document.createElement("div"),r){var p=document.createElement("div"),f=this.theme.getTopTabHolder(this.translateProperty(this.schema.title)),m=this.theme.getTopTabContentHolder(f);for(this.property_order.forEach((function(t){var e=n.editors[t];if(!e.property_removed){var i=n.theme.getTabContent(),o=e.schema&&("object"===e.schema.type||"array"===e.schema.type);i.isObjOrArray=o;var r=n.theme.getGridRow();e.tab||(void 0===n.basicPane?n.addRow(e,f,i):n.addRow(e,f,n.basicPane)),i.id=n.getValidId(e.tab_text.textContent),o?(i.appendChild(r),m.appendChild(i),n.theme.addTopTab(f,e.tab)):(p.appendChild(r),m.childElementCount>0?m.firstChild.isObjOrArray&&(i.appendChild(p),m.insertBefore(i,m.firstChild),n.theme.insertBasicTopTab(e.tab,f),e.basicPane=i):(i.appendChild(p),m.appendChild(i),n.theme.addTopTab(f,e.tab),e.basicPane=i)),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),r.appendChild(e.container),e.rowPane=i}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var y=this.tabs_holder.parentNode;y.removeChild(y.firstChild),y.appendChild(f),this.tabPanesContainer=m,this.tabs_holder=f;var v=this.theme.getFirstTab(this.tabs_holder);return void(v&&c(v,"click"))}this.property_order.forEach((function(t){var e=n.editors[t];e.property_removed||(o=n.theme.getGridRow(),i.appendChild(o),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),o.appendChild(e.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(i)}}},{key:"getPropertySchema",value:function(t){var e=this,n=this.schema.properties[t]||{};n=l({},n);var i=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(o){new RegExp(o).test(t)&&(n.allOf=n.allOf||[],n.allOf.push(e.schema.patternProperties[o]),i=!0)})),!i&&this.schema.additionalProperties&&"object"===di(this.schema.additionalProperties)&&(n=l({},this.schema.additionalProperties)),n}},{key:"preBuild",value:function(){var t=this;if(yi(vi(e.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(e){var n=ui(e,2),i=n[0],o=n[1],r=t.jsoneditor.getEditorClass(o);t.editors[i]=t.jsoneditor.createEditor(r,{jsoneditor:t.jsoneditor,schema:o,path:"".concat(t.path,".").concat(i),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[i].preBuild();var s=t.editors[i].options.hidden?0:t.editors[i].options.grid_columns||t.editors[i].getNumColumns();t.minwidth+=s,t.maxwidth+=s})),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(e){return t.isRequiredObject({key:e,schema:t.schema.properties[e]})})):this.schema.defaultProperties=Object.keys(this.schema.properties)),this.maxwidth+=1,Array.isArray(this.schema.defaultProperties)&&this.schema.defaultProperties.forEach((function(e){t.addObjectProperty(e,!0),t.editors[e]&&(t.minwidth=Math.max(t.minwidth,t.editors[e].options.grid_columns||t.editors[e].getNumColumns()),t.maxwidth+=t.editors[e].options.grid_columns||t.editors[e].getNumColumns())}))}this.property_order=Object.keys(this.editors),this.property_order=this.property_order.sort((function(e,n){var i=t.editors[e].schema.propertyOrder,o=t.editors[n].schema.propertyOrder;return"number"!=typeof i&&(i=1e3),"number"!=typeof o&&(o=1e3),i-o}))}},{key:"addTab",value:function(t){var e=this,n=this.rows[t].schema&&("object"===this.rows[t].schema.type||"array"===this.rows[t].schema.type);this.tabs_holder&&(this.rows[t].tab_text=document.createElement("span"),this.rows[t].tab_text.textContent=n?this.rows[t].getHeaderText():void 0===this.schema.basicCategoryTitle?"Basic":this.schema.basicCategoryTitle,this.rows[t].tab=this.theme.getTopTab(this.rows[t].tab_text,this.getValidId(this.rows[t].tab_text.textContent)),this.rows[t].tab.addEventListener("click",(function(n){e.active_tab=e.rows[t].tab,e.refreshTabs(),n.preventDefault(),n.stopPropagation()})))}},{key:"addRow",value:function(t,e,n){var i=this.rows.length,o="object"===t.schema.type||"array"===t.schema.type;this.rows[i]=t,this.rows[i].rowPane=n,o?(this.addTab(i),this.theme.addTopTab(e,this.rows[i].tab)):void 0===this.basicTab?(this.addTab(i),this.basicTab=i,this.basicPane=n,this.theme.addTopTab(e,this.rows[i].tab)):(this.rows[i].tab=this.rows[this.basicTab].tab,this.rows[i].tab_text=this.rows[this.basicTab].tab_text,this.rows[i].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,n=void 0!==this.basicTab,i=!1;this.rows.forEach((function(o){o.tab&&o.rowPane&&o.rowPane.parentNode&&(n&&o.tab===e.rows[e.basicTab].tab&&i||(t?o.tab_text.textContent=o.getHeaderText():(n&&o.tab===e.rows[e.basicTab].tab&&(i=!0),o.tab===e.active_tab?e.theme.markTabActive(o):e.theme.markTabInactive(o))))}))}},{key:"build",value:function(){var t=this,e="categories"===this.format;if(this.rows=[],this.active_tab=null,this.options.table_row)this.editor_holder=this.container,Object.entries(this.editors).forEach((function(e){var n=ui(e,2),i=n[0],o=n[1],r=t.theme.getTableCell();t.editor_holder.appendChild(r),o.setContainer(r),o.build(),o.postBuild(),o.setOptInCheckbox(o.header),o.setValue(o.getDefault(),!0),t.editors[i].options.hidden&&(r.style.display="none"),t.editors[i].options.input_width&&(r.style.width=t.editors[i].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(e){e.preventDefault(),e.stopPropagation(),t.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(e){e.preventDefault(),e.stopPropagation(),t.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(e){e.preventDefault(),e.stopPropagation(),t.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(e){if(e.preventDefault(),e.stopPropagation(),t.addproperty_input.value){if(t.editors[t.addproperty_input.value])return void window.alert("there is already a property with that name");t.addObjectProperty(t.addproperty_input.value),t.editors[t.addproperty_input.value]&&t.editors[t.addproperty_input.value].disable();var n=t.editors[t.addproperty_input.value].key,i=t.editors[t.addproperty_input.value].type,o=t.editors[t.addproperty_input.value].path;t.onChange(!0,!1,{event:"add",data:{key:n,type:i,path:o}})}})),this.addproperty_input.addEventListener("input",(function(e){e.target.previousSibling.previousSibling.childNodes.forEach((function(n){var i=n.innerText,o=e.target.value;t.options.case_sensitive_property_search||t.jsoneditor.options.case_sensitive_property_search||(i=i.toLowerCase(),o=o.toLowerCase()),i.includes(o)?n.style.display="":n.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 n=document.createElement("div");n.style.clear="both",this.addproperty_holder.appendChild(n),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(),e?(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(n){var i=t.theme.getTabContent(),o=t.theme.getGridColumn(),r=!(!n.schema||"object"!==n.schema.type&&"array"!==n.schema.type);if(i.isObjOrArray=r,e){if(r){var s=t.theme.getGridContainer();s.appendChild(o),i.appendChild(s),t.tabPanesContainer.appendChild(i),t.row_container=s}else void 0===t.row_container_basic&&(t.row_container_basic=t.theme.getGridContainer(),i.appendChild(t.row_container_basic),0===t.tabPanesContainer.childElementCount?t.tabPanesContainer.appendChild(i):t.tabPanesContainer.insertBefore(i,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(o);t.addRow(n,t.tabs_holder,i),i.id=t.getValidId(n.schema.title)}else t.row_container.appendChild(o);n.setContainer(o),n.build(),n.postBuild(),n.setOptInCheckbox(n.header)})),this.rows[0]&&c(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(e){e.preventDefault(),e.stopPropagation(),t.collapsed?(t.editor_holder.style.display="",t.collapsed=!1,t.setButtonText(t.collapse_control,"","collapse","button_collapse")):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand","button_expand"))})),this.options.collapsed&&c(this.collapse_control,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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(e){e.preventDefault(),e.stopPropagation(),t.toggleEditJSON()})),this.controls.appendChild(this.editjson_control),this.controls.insertBefore(this.editjson_holder,this.controls.childNodes[0]),this.schema.options&&void 0!==this.schema.options.disable_edit_json?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(e){e.preventDefault(),e.stopPropagation(),t.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(e){t.editor_holder.appendChild(t.editors[e].container)}))):(this.layoutEditors(),this.layoutEditors()),(this.schema.readOnly||this.schema.readonly)&&this.disable()}},{key:"deactivateNonRequiredProperties",value:function(t){var e=this,n=this.jsoneditor.options.show_opt_in,i=void 0!==this.options.show_opt_in,o=i&&!0===this.options.show_opt_in,r=i&&!1===this.options.show_opt_in;(o||!r&&n||!i&&n)&&Object.entries(this.editors).forEach((function(n){var i=ui(n,2),o=i[0],r=i[1];e.isRequiredObject(r)||e.editors[o].deactivate(),t&&"function"==typeof e.editors[o].deactivateNonRequiredProperties&&e.editors[o].deactivateNonRequiredProperties(t)}))}},{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(t){return window.alert(t)}))}},{key:"saveJSON",value:function(){if(this.editjson_holder)try{var t=JSON.parse(this.editjson_textarea.value);this.setValue(t),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(t,e,n){var i;this.schema.properties[t]&&(i=this.schema.properties[t].propertyOrder),"number"!=typeof i&&(i=1e3),e.propertyOrder=i;for(var o=0;o<n.childNodes.length;o++){var r=n.childNodes[o];if(e.propertyOrder<r.propertyOrder){this.addproperty_list.insertBefore(e,r),e=null;break}}e&&this.addproperty_list.appendChild(e)}},{key:"addPropertyCheckbox",value:function(t){var e,n=this,i=this.theme.getCheckbox();e=this.schema.properties[t]&&this.schema.properties[t].title?this.schema.properties[t].title:t;var o=this.theme.getCheckboxLabel(e),r=this.theme.getFormControl(o,i,null,null,this.path+"-"+t);return r.style.paddingBottom=r.style.marginBottom=r.style.paddingTop=r.style.marginTop=0,r.style.height="auto",this.insertPropertyControlUsingPropertyOrder(t,r,this.addproperty_list),i.checked=t in this.editors,i.addEventListener("change",(function(){i.checked?n.addObjectProperty(t):n.removeObjectProperty(t),n.onChange(!0)})),this.addproperty_checkboxes[t]=i,i}},{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(t){if(this.editors[t]){var e;if(null!==(e=this.editors[t].schema)&&void 0!==e&&null!==(e=e.options)&&void 0!==e&&e.dependencies)return;this.editors[t].unregister(),delete this.editors[t],this.refreshValue(),this.layoutEditors()}}},{key:"getSchemaOnMaxDepth",value:function(t){return Object.keys(t).reduce((function(e,n){switch(n){case"$ref":return e;case"properties":case"items":return li(li({},e),{},ci({},n,{}));case"additionalProperties":case"propertyNames":return li(li({},e),{},ci({},n,!0));default:return li(li({},e),{},ci({},n,t[n]))}}),{})}},{key:"addObjectProperty",value:function(t,e){if(!this.editors[t]){if(this.cached_editors[t]){if(this.editors[t]=this.cached_editors[t],e)return;this.editors[t].register()}else{if(!(this.canHaveAdditionalProperties()||this.schema.properties&&this.schema.properties[t]||this.schema.patternProperties&&Object.keys(this.schema.patternProperties).find((function(e){return new RegExp(e).test(t)}))))return;var n=this.getPropertySchema(t);"number"!=typeof n.propertyOrder&&(n.propertyOrder=Object.keys(this.editors).length+1e3);var i=this.jsoneditor.getEditorClass(n),o=this.jsoneditor.options.max_depth;if(this.editors[t]=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:o&&this.currentDepth>=o?this.getSchemaOnMaxDepth(n):n,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var r=this.theme.getChildEditorHolder();this.editor_holder.appendChild(r),this.editors[t].setContainer(r),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(i.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){var e=t.path||t.composedPath&&t.composedPath();this.addproperty_holder&&!this.addproperty_holder.contains(e[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t,n){this.refreshValue(),yi(vi(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"canHaveAdditionalProperties",value:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:"object"===di(this.schema.additionalProperties)&&null!==this.schema.additionalProperties||("boolean"==typeof this.options.no_additional_properties?!this.options.no_additional_properties:"boolean"!=typeof this.jsoneditor.options.no_additional_properties||!this.jsoneditor.options.no_additional_properties)}},{key:"destroy",value:function(){Object.values(this.cached_editors).forEach((function(t){return t.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),yi(vi(e.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=yi(vi(e.prototype),"getValue",this).call(this);return t&&(this.jsoneditor.options.remove_empty_properties||this.options.remove_empty_properties)&&Object.keys(t).forEach((function(e){var n;(void 0===(n=t[e])||""===n||n===Object(n)&&0===Object.keys(n).length&&n.constructor===Object)&&delete t[e]})),t&&(this.jsoneditor.options.remove_false_properties||this.options.remove_false_properties)&&Object.keys(t).forEach((function(e){!1===t[e]&&delete t[e]})),t}}},{key:"refreshValue",value:function(){var t=this;this.value={},this.editors&&(Object.keys(this.editors).forEach((function(e){t.editors[e].isActive()&&(t.editors[e].refreshValue(),t.value[e]=t.editors[e].getValue())})),Object.keys(this.editors).forEach((function(e){t.editors[e].isActive()&&t.activateDependentRequired(t.editors[e].key)})),this.adding_property&&this.refreshAddProperties())}},{key:"activateDependentRequired",value:function(t){var e=this;this.getDependentRequired(t).forEach((function(t){var n;Object.entries(e.cached_editors).forEach((function(e){var i=ui(e,2),o=(i[0],i[1]);o.key===t&&(n=o)})),n&&!n.isActive()&&n.activate()}))}},{key:"getDependentRequired",value:function(t){return this.schema.dependentRequired&&h(this.schema.dependentRequired,t)?this.schema.dependentRequired[t]:[]}},{key:"refreshAddProperties",value:function(){var t=this;if(this.options.disable_properties||!1!==this.options.disable_properties&&this.jsoneditor.options.disable_properties)this.addproperty_button.style.display="none";else{var e,n=0,i=!1;Object.keys(this.editors).forEach((function(t){return n++})),e=this.canHaveAdditionalProperties()&&!(void 0!==this.schema.maxProperties&&n>=this.schema.maxProperties),this.addproperty_checkboxes&&(this.addproperty_list.innerHTML=""),this.addproperty_checkboxes={},Object.keys(this.cached_editors).forEach((function(o){t.addPropertyCheckbox(o),t.isRequiredObject(t.cached_editors[o])&&o in t.editors&&(t.addproperty_checkboxes[o].disabled=!0),void 0!==t.schema.minProperties&&n<=t.schema.minProperties?(t.addproperty_checkboxes[o].disabled=t.addproperty_checkboxes[o].checked,t.addproperty_checkboxes[o].checked||(i=!0)):o in t.editors?i=!0:e||h(t.schema.properties,o)?(t.addproperty_checkboxes[o].disabled=!1,i=!0):t.addproperty_checkboxes[o].disabled=!0})),this.canHaveAdditionalProperties()&&(i=!0),Object.keys(this.schema.properties).forEach((function(e){t.cached_editors[e]||(i=!0,t.addPropertyCheckbox(e))})),i?this.canHaveAdditionalProperties()?this.addproperty_add.disabled=!e:(this.addproperty_add.style.display="none",this.addproperty_input.style.display="none"):(this.hideAddProperty(),this.addproperty_button.style.display="none")}}},{key:"isRequiredObject",value:function(t){if(t)return"boolean"==typeof t.schema.required?t.schema.required:Array.isArray(this.schema.required)?this.schema.required.includes(t.key):!!this.jsoneditor.options.required_by_default}},{key:"setValue",value:function(t,e){var n=this;("object"!==di(t=(t=this.applyConstFilter(t))||{})||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach((function(i){var o=ui(i,2),r=o[0],s=o[1];void 0!==t[r]?(n.addObjectProperty(r),s.setValue(t[r],e),s.activate(),n.disabled&&s.disable()):e||n.isRequiredObject(s)?s.setValue(s.getDefault(),e):n.jsoneditor.options.show_opt_in||n.options.show_opt_in?s.deactivate():n.removeObjectProperty(r)})),Object.entries(t).forEach((function(t){var i=ui(t,2),o=i[0],r=i[1];n.cached_editors[o]||(n.addObjectProperty(o),n.editors[o]&&n.editors[o].setValue(r,e,!!n.editors[o].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,n=[],i=[];t.forEach((function(t){t.path===e.path?n.push(t):i.push(t)})),this.error_holder&&(n.length?(this.error_holder.innerHTML="",this.error_holder.style.display="",n.forEach((function(t){t.errorcount&&t.errorcount>1&&(t.message+=" (".concat(t.errorcount," errors)")),e.error_holder.appendChild(e.theme.getErrorMessage(t.message))}))):this.error_holder.style.display="none"),this.options.table_row&&(n.length?this.theme.addTableRowError(this.container):this.theme.removeTableRowError(this.container)),Object.values(this.editors).forEach((function(t){t.showValidationErrors(i)}))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,pi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_);function _i(t){return _i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_i(t)}function wi(t){var e=function(t){if("object"!=_i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_i(e)?e:e+""}function xi(t,e,n){return e=ji(e),function(t,e){if(e&&("object"===_i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ki()?Reflect.construct(e,n||[],ji(t).constructor):e.apply(t,n))}function ki(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ki=function(){return!!t})()}function Oi(){return Oi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ji(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Oi.apply(this,arguments)}function ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}function Ci(t,e){return Ci=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ci(t,e)}gi.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 Ei=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),xi(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ci(t,e)}(e,t),n=e,(i=[{key:"preBuild",value:function(){Oi(ji(e.prototype),"preBuild",this).call(this)}},{key:"build",value:function(){var t=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 e=function(e){t.setValue(e.currentTarget.value),t.onChange(!0),t.radioGroup.forEach((function(e){e.checked=e.value===t.getValue()}))},n=0;n<this.enum_values.length;n++){var i={id:"".concat(this.formname,"[").concat(n,"]"),value:this.enum_values[n]};this.jsoneditor.options.use_name_attributes&&(i.name=this.formname),this.input=this.theme.getFormRadio(i),this.setInputAttributes(["id","value","name"]),this.input.addEventListener("change",e,!1),this.radioGroup.push(this.input);var o=this.theme.getFormRadioLabel(this.enum_display[n]);o.htmlFor=this.input.id;var r=this.theme.getFormRadioControl(o,this.input,!("horizontal"!==this.options.layout&&!this.options.compact));this.radioContainer.appendChild(r)}if(this.schema.readOnly||this.schema.readonly){this.disable(!0);for(var s=0;s<this.radioGroup.length;s++)this.radioGroup[s].disabled=!0;this.radioContainer.classList.add("readonly")}var a=this.theme.getContainer();a.appendChild(this.radioContainer),a.dataset.containerFor="radio",this.input=a,this.control=this.theme.getFormControl(this.label,a,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady()}))}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.radioContainer.classList.remove("readonly"),Oi(ji(e.prototype),"enable",this).call(this)}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var n=0;n<this.radioGroup.length;n++)this.radioGroup[n].disabled=!0;this.radioContainer.classList.add("readonly"),Oi(ji(e.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),Oi(ji(e.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"setValue",value:function(t){"string"!=typeof(t=this.applyConstFilter(t))&&(t=String(t));for(var e=0;e<this.radioGroup.length;e++){if(this.radioGroup[e].value===t){this.radioGroup[e].checked=!0;break}this.radioGroup[e].checked=!1}this.value=t,this.onChange()}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,wi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function Pi(t){return Pi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pi(t)}function Li(t){var e=function(t){if("object"!=Pi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Pi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pi(e)?e:e+""}function Si(t,e,n){return e=Ri(e),function(t,e){if(e&&("object"===Pi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ti()?Reflect.construct(e,n||[],Ri(t).constructor):e.apply(t,n))}function Ti(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ti=function(){return!!t})()}function Ai(){return Ai="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ri(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ai.apply(this,arguments)}function Ri(t){return Ri=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ri(t)}function Bi(t,e){return Bi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bi(t,e)}var Ii=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Si(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bi(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=Ai(Ri(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.sceditor_instance&&this.sceditor_instance.val(o.value)}},{key:"build",value:function(){this.options.format="textarea",Ai(Ri(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t=this;if(window.sceditor){var n=this.expandCallbacks("sceditor",l({},{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})),i=window.sceditor.instance(this.input);void 0===i&&window.sceditor.create(this.input,n),this.sceditor_instance=i||window.sceditor.instance(this.input),this.sceditor_instance.blur((function(){t.value=t.sceditor_instance.val(),t.sceditor_instance.updateOriginal(),t.is_dirty=!0,t.onChange(!0)})),this.theme.afterInputReady(this.input)}else Ai(Ri(e.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),Ai(Ri(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.sceditor_instance&&this.sceditor_instance.readOnly(!0),Ai(Ri(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.sceditor_instance&&(this.sceditor_instance.destroy(),this.sceditor_instance=null),Ai(Ri(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Li(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function zi(t){return zi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zi(t)}function Mi(t){var e=function(t){if("object"!=zi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=zi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zi(e)?e:e+""}function Ni(t,e,n){return e=Hi(e),function(t,e){if(e&&("object"===zi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Di()?Reflect.construct(e,n||[],Hi(t).constructor):e.apply(t,n))}function Di(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Di=function(){return!!t})()}function Fi(){return Fi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Hi(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Fi.apply(this,arguments)}function Hi(t){return Hi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Hi(t)}function Vi(t,e){return Vi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vi(t,e)}var Zi=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ni(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vi(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){if(t=this.applyConstFilter(t),this.select2_instance){n?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0);var i=this.updateValue(t);this.input.value=i,this.select2v4?this.select2_instance.val(i).trigger("change"):this.select2_instance.select2("val",i),this.onChange(!0)}else Fi(Hi(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.select2&&!this.select2_instance){var n=this.expandCallbacks("select2",l({},this.defaults.options.select2||{},this.options.select2||{}));this.newEnumAllowed=n.tags=!!n.tags&&"string"===this.schema.type,this.select2_instance=window.jQuery(this.input).select2(n),this.select2v4=h(this.select2_instance.select2,"amd"),this.selectChangeHandler=function(){var e=t.select2v4?t.select2_instance.val():t.select2_instance.select2("val");t.updateValue(e),t.onChange(!0)},this.select2_instance.on("change",this.selectChangeHandler),this.select2_instance.on("select2-blur",this.selectChangeHandler)}Fi(Hi(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e,n=this.typecast(t),i=!1;return this.enum_values.includes(n)||""===n||(this.enum_options.push("".concat(n)),this.enum_display.push("".concat(n)),this.enum_values.push(n),this.schema.enum.push(n),(e=this.input.querySelector('option[value="'.concat(n,'"]')))?e.removeAttribute("data-select2-tag"):this.select2_instance.append(new Option(n,n,!1,!1)).trigger("change"),i=!0),i}},{key:"enable",value:function(){this.always_disabled||this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!1):this.select2_instance.select2("enable",!0)),Fi(Hi(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.select2_instance&&(this.select2v4?this.select2_instance.prop("disabled",!0):this.select2_instance.select2("enable",!1)),Fi(Hi(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.select2_instance&&(this.select2_instance.select2("destroy"),this.select2_instance=null),Fi(Hi(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Mi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function qi(t){return qi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qi(t)}function Ui(t){var e=function(t){if("object"!=qi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=qi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qi(e)?e:e+""}function Wi(t,e,n){return e=$i(e),function(t,e){if(e&&("object"===qi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gi()?Reflect.construct(e,n||[],$i(t).constructor):e.apply(t,n))}function Gi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gi=function(){return!!t})()}function Ji(){return Ji="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=$i(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ji.apply(this,arguments)}function $i(t){return $i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$i(t)}function Yi(t,e){return Yi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yi(t,e)}var Ki=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Wi(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yi(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n){if(t=this.applyConstFilter(t),this.selectize_instance){n?this.is_dirty=!1:"change"===this.jsoneditor.options.show_errors&&(this.is_dirty=!0);var i=this.updateValue(t);this.input.value=i,this.selectize_instance.clear(!0),this.selectize_instance.setValue(i),this.onChange(!0)}else Ji($i(e.prototype),"setValue",this).call(this,t,n)}},{key:"afterInputReady",value:function(){var t=this;if(window.jQuery&&window.jQuery.fn&&window.jQuery.fn.selectize&&!this.selectize_instance){var n=this.expandCallbacks("selectize",l({},this.defaults.options.selectize||{},this.options.selectize||{}));this.newEnumAllowed=n.create=!!n.create&&"string"===this.schema.type,this.selectize_instance=window.jQuery(this.input).selectize(n)[0].selectize,this.control.removeEventListener("change",this.multiselectChangeHandler),this.multiselectChangeHandler=function(e){t.updateValue(e),t.onChange(!0)},this.selectize_instance.on("change",this.multiselectChangeHandler)}Ji($i(e.prototype),"afterInputReady",this).call(this)}},{key:"updateValue",value:function(t){var e=this.enum_values[0];return t=this.typecast(t||""),this.enum_values.includes(t)?e=t:this.newEnumAllowed&&(e=this.addNewOption(t)?t:e),this.value=e,e}},{key:"addNewOption",value:function(t){var e=this.typecast(t),n=!1;return this.enum_values.includes(e)||""===e||(this.enum_options.push("".concat(e)),this.enum_display.push("".concat(e)),this.enum_values.push(e),this.schema.enum.push(e),this.selectize_instance.addItem(e),this.selectize_instance.refreshOptions(!1),n=!0),n}},{key:"onWatchedFieldChange",value:function(){var t=this;Ji($i(e.prototype),"onWatchedFieldChange",this).call(this),this.selectize_instance&&(this.selectize_instance.clear(!0),this.selectize_instance.clearOptions(!0),this.enum_options.forEach((function(e,n){t.selectize_instance.addOption({value:e,text:t.enum_display[n]})})),this.selectize_instance.addItem("".concat(this.value),!0))}},{key:"enable",value:function(){!this.always_disabled&&this.selectize_instance&&this.selectize_instance.unlock(),Ji($i(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.selectize_instance&&this.selectize_instance.lock(),Ji($i(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.selectize_instance&&(this.selectize_instance.destroy(),this.selectize_instance=null),Ji($i(e.prototype),"destroy",this).call(this)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ui(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(ce);function Xi(t){return Xi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xi(t)}function Qi(t){var e=function(t){if("object"!=Xi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xi(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xi(e)?e:e+""}function to(t,e,n){return e=no(e),function(t,e){if(e&&("object"===Xi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eo()?Reflect.construct(e,n||[],no(t).constructor):e.apply(t,n))}function eo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eo=function(){return!!t})()}function no(t){return no=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},no(t)}function io(t,e){return io=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},io(t,e)}var oo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),to(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&io(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){var t=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 e=this.formname.replace(/\W/g,"");if("function"==typeof SignaturePad){this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input);var n=document.createElement("div");n.classList.add("signature-container");var i=document.createElement("canvas");this.jsoneditor.options.use_name_attributes&&i.setAttribute("name",e),i.classList.add("signature"),n.appendChild(i),this.signaturePad=new window.SignaturePad(i),this.signaturePad.onEnd=function(){t.signaturePad.isEmpty()?t.input.value="":t.input.value=t.signaturePad.toDataURL(),t.is_dirty=!0,t.refreshValue(),t.watch_listener(),t.jsoneditor.notifyWatchers(t.path),t.parent?t.parent.onChildEditorChange(t):t.jsoneditor.onChange()};var o=document.createElement("div"),r=document.createElement("button");r.classList.add("tiny","button"),r.innerHTML="Clear signature",o.appendChild(r),n.appendChild(o),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(t){i.setAttribute("readOnly","readOnly"),t.disabled=!0}))),r.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.signaturePad.clear(),t.signaturePad.strokeEnd()})),this.control=this.theme.getFormControl(this.label,n,this.description),this.container.appendChild(this.control),this.refreshValue(),i.width=n.offsetWidth,this.options&&this.options.canvas_height?i.height=this.options.canvas_height:i.height="300"}else{var s=document.createElement("p");s.innerHTML="Signature pad is not available, please include SignaturePad from https://github.com/szimek/signature_pad",this.container.appendChild(s)}}},{key:"setValue",value:function(t){if(t=this.applyConstFilter(t),"function"==typeof SignaturePad){var e=this.sanitize(t);if(this.value===e)return;return this.value=e,this.input.value=this.value,this.signaturePad.clear(),t&&""!==t&&this.signaturePad.fromDataURL(t),this.watch_listener(),this.jsoneditor.notifyWatchers(this.path),!1}}},{key:"destroy",value:function(){this.signaturePad.off(),delete this.signaturePad}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qi(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function ro(t){return ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ro(t)}function so(t){var e=function(t){if("object"!=ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ro(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ro(e)?e:e+""}function ao(t,e,n){return e=uo(e),function(t,e){if(e&&("object"===ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lo()?Reflect.construct(e,n||[],uo(t).constructor):e.apply(t,n))}function lo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lo=function(){return!!t})()}function co(){return co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=uo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},co.apply(this,arguments)}function uo(t){return uo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},uo(t)}function ho(t,e){return ho=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ho(t,e)}n(6031);var po=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ao(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ho(t,e)}(e,t),n=e,(i=[{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=co(uo(e.prototype),"setValue",this).call(this,t,n,i);void 0!==o&&o.changed&&this.simplemde_instance&&this.simplemde_instance.value(o.value)}},{key:"build",value:function(){this.options.format="textarea",co(uo(e.prototype),"build",this).call(this),this.input_type=this.schema.format,this.input.setAttribute("data-schemaformat",this.input_type)}},{key:"afterInputReady",value:function(){var t,n=this;window.SimpleMDE?(t=this.expandCallbacks("simplemde",l({},{height:300},this.defaults.options.simplemde||{},this.options.simplemde||{},{element:this.input,forceSync:!0})),this.simplemde_instance=new window.SimpleMDE(t),(this.schema.readOnly||this.schema.readonly||this.schema.template)&&(this.simplemde_instance.codemirror.options.readOnly=!0),this.simplemde_instance.codemirror.on("change",(function(){n.value=n.simplemde_instance.value(),n.is_dirty=!0,n.onChange(!0)})),t.autorefresh&&this.startListening(this.simplemde_instance.codemirror,this.simplemde_instance.codemirror.state.autoRefresh={delay:250}),this.theme.afterInputReady(this.input)):co(uo(e.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),co(uo(e.prototype),"enable",this).call(this)}},{key:"disable",value:function(t){this.simplemde_instance&&(this.simplemde_instance.codemirror.options.readOnly=!0),co(uo(e.prototype),"disable",this).call(this,t)}},{key:"destroy",value:function(){this.simplemde_instance&&(this.simplemde_instance.toTextArea(),this.simplemde_instance=null),co(uo(e.prototype),"destroy",this).call(this)}},{key:"startListening",value:function(t,e){var n=this,i=function i(){t.display.wrapper.offsetHeight?(n.stopListening(t,e),t.display.lastWrapHeight!==t.display.wrapper.clientHeight&&t.refresh()):e.timeout=window.setTimeout(i,e.delay)};e.timeout=window.setTimeout(i,e.delay),e.hurry=function(){window.clearTimeout(e.timeout),e.timeout=window.setTimeout(i,50)},t.on(window,"mouseup",e.hurry),t.on(window,"keyup",e.hurry)}},{key:"stopListening",value:function(t,e){window.clearTimeout(e.timeout),t.off(window,"mouseup",e.hurry),t.off(window,"keyup",e.hurry)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,so(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function fo(t){return fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fo(t)}function mo(t){var e=function(t){if("object"!=fo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=fo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fo(e)?e:e+""}function yo(t,e,n){return e=go(e),function(t,e){if(e&&("object"===fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,vo()?Reflect.construct(e,n||[],go(t).constructor):e.apply(t,n))}function vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(vo=function(){return!!t})()}function bo(){return bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=go(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},bo.apply(this,arguments)}function go(t){return go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},go(t)}function _o(t,e){return _o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_o(t,e)}var wo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),yo(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_o(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){var 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.ratingContainer=document.createElement("div"),this.ratingContainer.classList.add("starrating"),void 0===this.schema.enum){var e=this.schema.maximum?this.schema.maximum:5;this.schema.exclusiveMaximum&&e--,this.enum_values=[];for(var n=0;n<e;n++)this.enum_values.push(n+1)}else this.enum_values=this.schema.enum;this.radioGroup=[];for(var i=function(e){e.preventDefault(),e.stopPropagation(),t.setValue(e.currentTarget.value),t.onChange(!0)},o=this.enum_values.length-1;o>-1;o--){var r=this.formname+(o+1),s=this.theme.getFormInputField("radio");s.name="".concat(this.formname,"[starrating]"),s.value=this.enum_values[o],s.id=r,s.addEventListener("change",i,!1),this.radioGroup.push(s);var a=document.createElement("label");a.htmlFor=r,a.title=this.enum_values[o],this.options.displayValue&&a.classList.add("starrating-display-enabled");var l=this.theme.getHiddenText("label");l.textContent=o,a.appendChild(l),this.ratingContainer.appendChild(s),this.ratingContainer.appendChild(a)}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 c=0;c<this.radioGroup.length;c++)this.radioGroup[c].disabled=!0;this.ratingContainer.classList.add("readonly")}var u=this.theme.getContainer();u.appendChild(this.ratingContainer),this.input=u,this.control=this.theme.getFormControl(this.label,u,this.description,this.infoButton),this.container.appendChild(this.control),this.refreshValue()}},{key:"enable",value:function(){if(!this.always_disabled){for(var t=0;t<this.radioGroup.length;t++)this.radioGroup[t].disabled=!1;this.ratingContainer.classList.remove("readonly"),this.disabled=!1}}},{key:"disable",value:function(t){t&&(this.always_disabled=!0);for(var e=0;e<this.radioGroup.length;e++)this.radioGroup[e].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),bo(go(e.prototype),"destroy",this).call(this)}},{key:"getNumColumns",value:function(){return 2}},{key:"getValue",value:function(){if(this.dependenciesFulfilled)return"integer"===this.schema.type?""===this.value?0:parseInt(this.value):this.value}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value=t;for(var n=0;n<this.radioGroup.length;n++)if(this.radioGroup[n].value==="".concat(t)){this.radioGroup[n].checked=!0,this.value=t,this.options.displayValue&&(this.displayRating.innerHTML=this.value);break}bo(go(e.prototype),"setValue",this).call(this,this.value)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,mo(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P);function xo(t){return xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},xo(t)}function ko(t){var e=function(t){if("object"!=xo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==xo(e)?e:e+""}function Oo(t,e,n){return e=Eo(e),function(t,e){if(e&&("object"===xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,jo()?Reflect.construct(e,n||[],Eo(t).constructor):e.apply(t,n))}function jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(jo=function(){return!!t})()}function Co(){return Co="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Eo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Co.apply(this,arguments)}function Eo(t){return Eo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Eo(t)}function Po(t,e){return Po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Po(t,e)}wo.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 Lo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Oo(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Po(t,e)}(e,t),n=e,(i=[{key:"build",value:function(){Co(Eo(e.prototype),"build",this).call(this),this.input.setAttribute("type","number"),this.input.getAttribute("step")||this.input.setAttribute("step","1");var t=this.theme.getStepperButtons(this.input);this.control.appendChild(t),this.stepperDown=this.control.querySelector(".stepper-down"),this.stepperUp=this.control.querySelector(".stepper-up")}},{key:"enable",value:function(){Co(Eo(e.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){Co(Eo(e.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ko(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(gn);function So(t){return So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},So(t)}function To(t){var e=function(t){if("object"!=So(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=So(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==So(e)?e:e+""}function Ao(t,e,n){return e=Io(e),function(t,e){if(e&&("object"===So(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ro()?Reflect.construct(e,n||[],Io(t).constructor):e.apply(t,n))}function Ro(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ro=function(){return!!t})()}function Bo(){return Bo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Io(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Bo.apply(this,arguments)}function Io(t){return Io=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Io(t)}function zo(t,e){return zo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zo(t,e)}var Mo=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ao(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zo(t,e)}(e,t),n=e,i=[{key:"register",value:function(){if(Bo(Io(e.prototype),"register",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].register()}},{key:"unregister",value:function(){if(Bo(Io(e.prototype),"unregister",this).call(this),this.rows)for(var t=0;t<this.rows.length;t++)this.rows[t].unregister()}},{key:"getNumColumns",value:function(){return Math.max(Math.min(12,this.width),3)}},{key:"preBuild",value:function(){var t=this.jsoneditor.expandRefs(this.schema.items||{});this.item_title=t.title||"row",this.item_default=t.default||null,this.item_has_child_editors=t.properties||t.items,this.width=12,this.array_controls_top=this.options.array_controls_top||this.jsoneditor.options.array_controls_top,Bo(Io(e.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 t=this.getElementEditor(0,!0);if(this.item_default=t.getDefault(),this.width=t.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 e=t.getChildEditors(),n=t.property_order||Object.keys(e),i=0;i<n.length;i++){var o=this.theme.getTableHeaderCell(e[n[i]].getTitle());e[n[i]].options.hidden&&(o.style.display="none"),this.header_row.appendChild(o)}else this.header_row.appendChild(this.theme.getTableHeaderCell(this.item_title));t.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(t,n){this.refreshValue(),Bo(Io(e.prototype),"onChildEditorChange",this).call(this,t,n)}},{key:"getItemDefault",value:function(){return l({},{default:this.item_default}).default}},{key:"getItemTitle",value:function(){return this.item_title}},{key:"getElementEditor",value:function(t,e){var n=l({},this.schema.items),i=this.jsoneditor.getEditorClass(n,this.jsoneditor),o=this.row_holder.appendChild(this.theme.getTableRow()),r=o;this.item_has_child_editors||(r=this.theme.getTableCell(),o.appendChild(r));var s=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:n,container:r,path:"".concat(this.path,".").concat(t),parent:this,compact:!0,table_row:!0});return s.preBuild(),e||(s.build(),s.postBuild(),s.controls_cell=o.appendChild(this.theme.getTableCell()),s.row=o,s.table_controls=this.theme.getButtonHolder(),s.controls_cell.appendChild(s.table_controls),s.table_controls.style.margin=0,s.table_controls.style.padding=0),s}},{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,Bo(Io(e.prototype),"destroy",this).call(this)}},{key:"ensureArraySize",value:function(t){if(Array.isArray(t)||(t=[t]),this.schema.minItems)for(;t.length<this.schema.minItems;)t.push(this.getItemDefault());return this.schema.maxItems&&t.length>this.schema.maxItems&&(t=t.slice(0,this.schema.maxItems)),t}},{key:"setValue",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=arguments.length>1?arguments[1]:void 0;if(e=this.applyConstFilter(e),e=this.ensureArraySize(e),JSON.stringify(e)!==this.serialized){var i=!1;e.forEach((function(e,n){t.rows[n]?t.rows[n].setValue(e):(t.addRow(e),i=!0)}));for(var o=e.length;o<this.rows.length;o++){var r=this.rows[o].container;this.item_has_child_editors||this.rows[o].row.parentNode.removeChild(this.rows[o].row),this.rows[o].destroy(),r.parentNode&&r.parentNode.removeChild(r),this.rows[o]=null,i=!0}this.rows=this.rows.slice(0,e.length),this.refreshValue(),(i||n)&&this.refreshRowButtons(),this.onChange()}}},{key:"refreshRowButtons",value:function(){var t=this,e=this.schema.minItems&&this.schema.minItems>=this.rows.length,n=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,i=[];this.rows.forEach((function(o,r){if(o.delete_button){var s=!e;t.setButtonState(o.delete_button,s),i.push(s)}if(o.copy_button){var a=!n;t.setButtonState(o.copy_button,a),i.push(a)}if(o.moveup_button){var l=0!==r;t.setButtonState(o.moveup_button,l),i.push(l)}if(o.movedown_button){var c=r!==t.rows.length-1;t.setButtonState(o.movedown_button,c),i.push(c)}}));var o=i.some((function(t){return t}));this.rows.forEach((function(e){return t.setButtonState(e.controls_cell,o)})),this.setButtonState(this.controls_header_cell,o),this.setButtonState(this.table,this.value.length);var r=!(n||this.hide_add_button);this.setButtonState(this.add_row_button,r);var s=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setButtonState(this.delete_last_row_button,s);var a=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setButtonState(this.remove_all_rows_button,a);var l=r||s||a;this.setButtonState(this.controls,l)}},{key:"refreshValue",value:function(){var t=this;this.value=[],this.rows.forEach((function(e,n){t.value[n]=e.getValue()})),this.serialized=JSON.stringify(this.value)}},{key:"addRow",value:function(t){var e=this.rows.length;this.rows[e]=this.getElementEditor(e);var n=this.rows[e].table_controls;return this.hide_delete_buttons||(this.rows[e].delete_button=this._createDeleteButton(e,n)),this.show_copy_button&&(this.rows[e].copy_button=this._createCopyButton(e,n)),this.hide_move_buttons||(this.rows[e].moveup_button=this._createMoveUpButton(e,n)),this.hide_move_buttons||(this.rows[e].movedown_button=this._createMoveDownButton(e,n)),this._supportDragDrop(this.rows[e].row),void 0!==t&&this.rows[e].setValue(t),this.rows[e]}},{key:"_createDeleteButton",value:function(t,e){var n=this,i=this.getButton("","delete","button_delete_row_title_short");return i.classList.add("delete","json-editor-btntype-delete"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue(),o=n.getValue()[e];i.splice(e,1),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("deleteRow",o)})),e.appendChild(i),i}},{key:"_createCopyButton",value:function(t,e){var n=this,i=this.getButton("","copy","button_copy_row_title_short"),o=this.schema;return i.classList.add("copy","json-editor-btntype-copy"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue(),r=i[e];"string"===o.items.type&&"uuid"===o.items.format?r=f():"object"===o.items.type&&o.items.properties&&i.forEach((function(t,n){if(e===n)for(var s=0,a=Object.keys(t);s<a.length;s++){var l=a[s];o.items.properties&&o.items.properties[l]&&"uuid"===o.items.properties[l].format&&((r=Object.assign({},i[e]))[l]=f())}})),i.splice(e+1,0,r),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("copyRow",n.rows[e+1])})),e.appendChild(i),i}},{key:"_createMoveUpButton",value:function(t,e){var n=this,i=this.getButton("","moveup","button_move_up_title");return i.classList.add("moveup","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue();i.splice(e-1,0,i.splice(e,1)[0]),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])})),e.appendChild(i),i}},{key:"_createMoveDownButton",value:function(t,e){var n=this,i=this.getButton("","movedown","button_move_down_title");return i.classList.add("movedown","json-editor-btntype-move"),i.setAttribute("data-i",t),i.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),i=n.getValue();i.splice(e+1,0,i.splice(e,1)[0]),n.setValue(i),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])})),e.appendChild(i),i}},{key:"_supportDragDrop",value:function(t){var e=this;U(t,(function(t,n){var i=e.getValue(),o=i[t];i.splice(t,1),i.splice(n,0,o),e.setValue(i),e.onChange(!0),e.jsoneditor.trigger("moveRow",e.rows[n])}),{useTrigger:!0})}},{key:"addControls",value:function(){var t=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(e){e.preventDefault(),e.stopPropagation(),t.setButtonState(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse","button_collapse")):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand","button_expand"))})),this.options.collapsed&&c(this.toggle_button,"click"),this.schema.options&&void 0!==this.schema.options.disable_collapse?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 t=this.getButton("","collapse","button_collapse");return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add","button_add_row_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-add"),e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation();var n=t.addRow();t.refreshValue(),t.refreshRowButtons(),t.onChange(!0),t.jsoneditor.trigger("addRow",n)})),this.controls.appendChild(e),e}},{key:"_createDeleteLastRowButton",value:function(){var t=this,e=this.getButton("button_delete_last","subtract","button_delete_last_title",[this.getItemTitle()]);return e.classList.add("json-editor-btntype-deletelast"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue(),i=n.pop();t.setValue(n),t.onChange(!0),t.jsoneditor.trigger("deleteRow",i)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton("button_delete_all","delete","button_delete_all_title");return e.classList.add("json-editor-btntype-deleteall"),e.addEventListener("click",(function(e){if(e.preventDefault(),e.stopPropagation(),!t.askConfirmation())return!1;var n=t.getValue();t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows",n)})),this.controls.appendChild(e),e}}],i&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,To(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(q);function No(t){return No="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},No(t)}function Do(t){var e=function(t){if("object"!=No(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=No(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==No(e)?e:e+""}function Fo(t,e,n){return e=Zo(e),function(t,e){if(e&&("object"===No(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ho()?Reflect.construct(e,n||[],Zo(t).constructor):e.apply(t,n))}function Ho(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ho=function(){return!!t})()}function Vo(){return Vo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Zo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Vo.apply(this,arguments)}function Zo(t){return Zo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zo(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}function Uo(t){return Uo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Uo(t)}function Wo(t){var e=function(t){if("object"!=Uo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Uo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Uo(e)?e:e+""}function Go(t,e,n){return e=Yo(e),function(t,e){if(e&&("object"===Uo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jo()?Reflect.construct(e,n||[],Yo(t).constructor):e.apply(t,n))}function Jo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jo=function(){return!!t})()}function $o(){return $o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Yo(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},$o.apply(this,arguments)}function Yo(t){return Yo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yo(t)}function Ko(t,e){return Ko=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ko(t,e)}function Xo(t){return Xo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xo(t)}function Qo(t){var e=function(t){if("object"!=Xo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Xo(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xo(e)?e:e+""}function tr(t,e,n){return e=ir(e),function(t,e){if(e&&("object"===Xo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,er()?Reflect.construct(e,n||[],ir(t).constructor):e.apply(t,n))}function er(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(er=function(){return!!t})()}function nr(){return nr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ir(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},nr.apply(this,arguments)}function ir(t){return ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ir(t)}function or(t,e){return or=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},or(t,e)}n(9868);var rr={ace:z,array:q,arrayChoices:at,arraySelect2:mt,arraySelectize:kt,autocomplete:Tt,base64:Dt,button:Gt,checkbox:ee,choices:ve,datetime:je,describedBy:Re,enum:Ve,hidden:Ye,info:on,integer:gn,ip:En,jodit:In,multiple:Qn,multiselect:Q,null:si,number:dn,object:gi,radio:Ei,sceditor:Ii,select:ce,select2:Zi,selectize:Ki,signature:oo,simplemde:po,starrating:wo,stepper:Lo,string:P,table:Mo,upload:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Fo(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(e,t),n=e,(i=[{key:"getNumColumns",value:function(){return 4}},{key:"build",value:function(){var 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.options.hidden&&(this.container.style.display="none"),this.options=this.expandCallbacks("upload",l({},{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(t,e,n,i){window.alert('No upload_handler defined for "'.concat(t.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("function"!=typeof this.options.upload_handler)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),!0===this.options.enable_drag_drop&&!0===this.options.hide_input||(this.clickHandler=function(e){t.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))),!0===this.options.enable_drag_drop){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(e){e.preventDefault(),e.stopPropagation();var n=e.target.files||e.dataTransfer.files;if(n&&n.length)if(0!==t.options.max_upload_size&&n[0].size>t.options.max_upload_size)t.theme.addInputError(t.uploader,"".concat(t.translate("upload_max_size")," ").concat(t.options.max_upload_size));else if(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)){t.fileDisplay&&(t.fileDisplay.value=n[0].name);var i=new window.FileReader;i.onload=function(e){t.preview_value=e.target.result,t.refreshPreview(n),t.onChange(!0),i=null},i.readAsDataURL(n[0])}else t.theme.addInputError(t.uploader,"".concat(t.translate("upload_wrong_file_format")," ").concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(e){var n=e.dataTransfer.items||e.dataTransfer.files,i=n&&n.length&&(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)),o=e.currentTarget.classList&&e.currentTarget.classList.contains("upload-dropzone")&&i;switch((e.currentTarget===window?"w_":"e_")+e.type){case"w_drop":case"w_dragover":o||(e.dataTransfer.dropEffect="none");break;case"e_dragenter":o?(t.dropZone.classList.add("valid-dropzone"),e.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":o&&(e.dataTransfer.dropEffect="copy");break;case"e_dragleave":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone");break;case"e_drop":t.dropZone.classList.remove("valid-dropzone","invalid-dropzone"),o&&t.uploadHandler(e)}o||e.preventDefault()},!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.addEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.addEventListener(e,t.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 e=this.uploader||this.input,n=document.createElement("div");this.dropZone&&!this.altDropZone&&!0===this.options.drop_zone_top&&n.appendChild(this.dropZone),this.fileUploadGroup&&n.appendChild(this.fileUploadGroup),this.dropZone&&!this.altDropZone&&!0!==this.options.drop_zone_top&&n.appendChild(this.dropZone),n.appendChild(this.preview),e.parentNode.insertBefore(n,e.nextSibling),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.afterInputReady()}))}},{key:"afterInputReady",value:function(){var t=this;if(this.value){var e=document.createElement("img");e.style.maxWidth="100%",e.style.maxHeight="100px",e.onload=function(n){t.preview.appendChild(e)},e.onerror=function(t){console.error("upload error",t,t.currentTarget)},e.src=this.container.querySelector("a").href}this.theme.afterInputReady(this.input)}},{key:"refreshPreview",value:function(t){var e=this;if(this.last_preview!==this.preview_value&&(this.last_preview=this.preview_value,this.preview.innerHTML="",this.preview_value)){var n=t[0],i=this.preview_value.match(/^data:([^;,]+)[;,]/);if(n.mimeType=i?i[1]:"unknown",n.size>0){var o=Math.floor(Math.log(n.size)/Math.log(1024));n.formattedSize="".concat(parseFloat((n.size/Math.pow(1024,o)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][o])}else n.formattedSize="0 Bytes";var r=this.getButton("button_upload","upload","button_upload");r.addEventListener("click",(function(t){t.preventDefault(),r.setAttribute("disabled","disabled"),e.theme.removeInputError(e.uploader),e.theme.getProgressBar&&(e.progressBar=e.theme.getProgressBar(),e.preview.appendChild(e.progressBar)),e.options.upload_handler(e.path,n,{success:function(t){e.setValue(t),e.parent?e.parent.onChildEditorChange(e):e.jsoneditor.onChange(),e.progressBar&&e.preview.removeChild(e.progressBar),r.removeAttribute("disabled")},failure:function(t){e.theme.addInputError(e.uploader,t),e.progressBar&&e.preview.removeChild(e.progressBar),r.removeAttribute("disabled")},updateProgress:function(t){e.progressBar&&(t?e.theme.updateProgressBar(e.progressBar,t):e.theme.updateProgressBarUnknown(e.progressBar))}})})),this.preview.appendChild(this.theme.getUploadPreview(n,r,this.preview_value)),this.options.auto_upload&&(r.dispatchEvent(new window.MouseEvent("click")),r.parentNode.removeChild(r))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Vo(Zo(e.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Vo(Zo(e.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){t=this.applyConstFilter(t),this.value!==t&&(this.value=t,this.input.value=this.value,this.onChange())}},{key:"destroy",value:function(){var t=this;!0===this.options.enable_drag_drop&&(["dragover","drop"].forEach((function(e){window.removeEventListener(e,t.dragHandler,!0)})),["dragenter","dragover","dragleave","drop"].forEach((function(e){t.dropZone.removeEventListener(e,t.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),Vo(Zo(e.prototype),"destroy",this).call(this)}},{key:"isValidMimeType",value:function(t,e){return e.reduce((function(e,n){return e||new RegExp(n.replace(/\*/g,".*"),"gi").test(t)}),!1)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Do(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(_),uuid:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Go(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ko(t,e)}(e,t),n=e,(i=[{key:"preBuild",value:function(){$o(Yo(e.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(){$o(Yo(e.prototype),"build",this).call(this),this.disable(!0),this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t),this.testUuid(t)||(t=this.uuid),this.uuid=t,$o(Yo(e.prototype),"setValue",this).call(this,t,n,i)}},{key:"getUuid",value:function(){return f()}},{key:"testUuid",value:function(t){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(t)}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Wo(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P),colorpicker:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),tr(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&or(t,e)}(e,t),n=e,(i=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,n,i){t=this.applyConstFilter(t);var o=nr(ir(e.prototype),"setValue",this).call(this,t,n,i);return this.picker_instance&&this.picker_instance.domElement&&o&&o.changed&&this.picker_instance.setColor(o.value,!0),o}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){nr(ir(e.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(nr(ir(e.prototype),"disable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="none";for(var t=this.picker_instance.domElement.querySelectorAll("button"),n=0;n<t.length;n++)t[n].disabled=!0}}},{key:"enable",value:function(){if(nr(ir(e.prototype),"enable",this).call(this),this.picker_instance&&this.picker_instance.domElement){this.picker_instance.domElement.style.pointerEvents="auto";for(var t=this.picker_instance.domElement.querySelectorAll("button"),n=0;n<t.length;n++)t[n].disabled=!1}}},{key:"destroy",value:function(){this.createPicker(!1),nr(ir(e.prototype),"destroy",this).call(this)}},{key:"createPicker",value:function(t){var e=this;if(t){if(window.Picker&&!this.picker_instance){var n=this.expandCallbacks("colorpicker",l({},{editor:!1,alpha:!1,color:this.value,popup:"bottom"},this.defaults.options.colorpicker||{},this.options.colorpicker||{},{parent:this.container})),i=function(t){var n=e.picker_instance.settings.editorFormat,i=e.picker_instance.settings.alpha;e.setValue("hex"===n?i?t.hex:t.hex.slice(0,7):t["".concat(n+(i?"a":""),"String")])};n.popup||"function"==typeof n.onChange?n.popup&&"function"!=typeof n.onDone&&(n.onDone=i):n.onChange=i,this.picker_instance=new window.Picker(n),n.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="")}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Qo(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(P)};function sr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}var ar={},lr="en",cr=lr;ar.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(rr).forEach((function(t){var e=function(t){return function(t){if(Array.isArray(t))return t}(t)||function(t){var e=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=e){var n,i,o,r,s=[],a=!0,l=!1;try{for(o=(e=e.call(t)).next;!(a=(n=o.call(e)).done)&&(s.push(n.value),2!==s.length);a=!0);}catch(t){l=!0,i=t}finally{try{if(!a&&null!=e.return&&(r=e.return(),Object(r)!==r))return}finally{if(l)throw i}}return s}}(t)||function(t){if(t){if("string"==typeof t)return sr(t,2);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?sr(t,2):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(t),n=e[0],i=e[1];rr[n].options=i.options||{}}));var ur={options:{upload:function(t,e,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:rr,languages:ar,resolvers:e,custom_validators:[],default_language:lr,language:cr,translate:function(t,e,n){var i={};n&&n.options&&n.options.error_messages&&n.options.error_messages[ur.language]&&(i=n.options.error_messages[ur.language]);var o=ur.languages[ur.language];if(!o)throw new Error("Unknown language ".concat(ur.language));var r=i[t]||o[t]||ur.languages[lr][t]||t;if(e)for(var s=0;s<e.length;s++)r=r.replace(new RegExp("\\{\\{".concat(s,"}}"),"g"),e[s]);return r},translateProperty:function(t,e){return t}};function hr(){hr=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,s=Object.create(r.prototype),a=new S(i||[]);return o(s,"_invoke",{value:C(t,n,a)}),s}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",y={};function v(){}function b(){}function g(){}var _={};c(_,s,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&i.call(x,s)&&(_=x);var k=g.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,r,s,a){var l=h(t[o],t,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==yr(u)&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(u).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function C(e,n,i){var o=d;return function(r,s){if(o===f)throw Error("Generator is already running");if(o===m){if("throw"===r)throw s;return{value:t,done:!0}}for(i.method=r,i.arg=s;;){var a=i.delegate;if(a){var l=E(a,i);if(l){if(l===y)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===d)throw o=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=f;var c=h(e,n,i);if("normal"===c.type){if(o=i.done?m:p,c.arg===y)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(o=m,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),y;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var s=r.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(yr(e)+" is not iterable")}return b.prototype=g,o(k,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(j.prototype),c(j.prototype,a,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var s=new j(u(t,n,i,o),r);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(k),c(k,l,"Generator"),c(k,s,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return a.type="throw",a.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:T(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}function dr(t,e,n,i,o,r,s){try{var a=t[r](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,o)}function pr(t){return function(){var e=this,n=arguments;return new Promise((function(i,o){var r=t.apply(e,n);function s(t){dr(r,i,o,s,a,"next",t)}function a(t){dr(r,i,o,s,a,"throw",t)}s(void 0)}))}}function fr(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var i,o,r,s,a=[],l=!0,c=!1;try{if(r=(n=n.call(t)).next,0===e){if(Object(n)!==n)return;l=!1}else for(;!(l=(i=r.call(n)).done)&&(a.push(i.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(t,e)||function(t,e){if(t){if("string"==typeof t)return mr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?mr(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function mr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function yr(t){return yr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yr(t)}function vr(t){var e=function(t){if("object"!=yr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=yr(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yr(e)?e:e+""}n(1688);var br=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e||{},this.schema={},this.refs=this.options.refs||{},this.refs_with_info={},this.refs_prefix="#/counter/",this.refs_counter=1,this._subSchema1={type:function(t){"object"===yr(t.type)&&(t.type=this._expandSubSchema(t.type))},disallow:function(t){"object"===yr(t.disallow)&&(t.disallow=this._expandSubSchema(t.disallow))},anyOf:function(t){var e=this;Object.entries(t.anyOf).forEach((function(n){var i=fr(n,2),o=i[0],r=i[1];t.anyOf[o]=e.expandSchema(r)}))},dependencies:function(t){var e=this;Object.entries(t.dependencies).forEach((function(n){var i=fr(n,2),o=i[0],r=i[1];"object"!==yr(r)||Array.isArray(r)||(t.dependencies[o]=e.expandSchema(r))}))},not:function(t){t.not=this.expandSchema(t.not)}},this._subSchema2={allOf:function(t,e){var n=this,i=l({},e);return Object.entries(t.allOf).forEach((function(e){var o=fr(e,2),r=o[0],s=o[1];t.allOf[r]=n.expandRefs(s,!0),i=n.extendSchemas(i,n.expandSchema(s))})),delete i.allOf,i},extends:function(t,e){var n,i=this;return delete(n=Array.isArray(t.extends)?t.extends.reduce((function(t,e,n){return i.extendSchemas(t,i.expandSchema(e))}),e):this.extendSchemas(e,this.expandSchema(t.extends))).extends,n},oneOf:function(t,e){var n=this,i=l({},e);return delete i.oneOf,t.oneOf.reduce((function(t,e,o){return t.oneOf[o]=n.extendSchemas(n.expandSchema(e),i),t}),e),e}}},e=[{key:"load",value:(i=pr(hr().mark((function t(e,n,i){return hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return this.schema=e,t.next=3,this._asyncloadExternalRefs(e,n,this._getFileBase(i),!0);case 3:return t.abrupt("return",this.expandRefs(e));case 4:case"end":return t.stop()}}),t,this)}))),function(t,e,n){return i.apply(this,arguments)})},{key:"expandRefs",value:function(t,e){var n=this,i=l({},t);if(!i.$ref)return i;var o=i.$ref.split("#");if(2===o.length&&!this.refs_with_info[i.$ref]){var r=this.expandRecursivePointer(this.schema,o[1]),s=this.extendSchemas(i,this.expandSchema(r));return delete s.$ref,s}var a=o.length>2?this.refs_with_info["#"+o[1]]:this.refs_with_info[i.$ref];delete i.$ref;var c=a.$ref.startsWith("#")?a.fetchUrl:"",u=this._getRef(c,a);if(this.refs[u]){if(e&&h(this.refs[u],"allOf")){var d=this.refs[u].allOf;Object.keys(d).forEach((function(t){d[t]=n.expandRefs(d[t],!0)}))}}else console.warn("reference:'".concat(u,"' not found!"));return o.length>2?this.extendSchemas(i,this.expandSchema(this.expandRecursivePointer(this.refs[u],o[2]))):this.extendSchemas(i,this.expandSchema(this.refs[u]))}},{key:"expandRecursivePointer",value:function(t,e){var n=t;return e.split("/").slice(1).forEach((function(t){n[t]&&(n=n[t])})),n.$refs&&n.$refs.startsWith("#")?this.expandRecursivePointer(t,n.$refs):n}},{key:"expandSchema",value:function(t){var e=this;Object.entries(this._subSchema1).forEach((function(n){var i=fr(n,2),o=i[0],r=i[1];t[o]&&r.call(e,t)}));var n=l({},t);return Object.entries(this._subSchema2).forEach((function(i){var o=fr(i,2),r=o[0],s=o[1];t[r]&&(n=s.call(e,t,n))})),this.expandRefs(n)}},{key:"_getRef",value:function(t,e){var n=t+e;return this.refs[n]?n:t+decodeURIComponent(e.$ref)}},{key:"_expandSubSchema",value:function(t){var e=this;return Array.isArray(t)?t.map((function(t){return"object"===yr(t)?e.expandSchema(t):t})):this.expandSchema(t)}},{key:"_manageRecursivePointer",value:function(t,e){Object.keys(t).forEach((function(n){null!==t[n]&&t[n].$ref&&0===t[n].$ref.indexOf("#")&&(t[n].$ref=e+t[n].$ref)}))}},{key:"_getExternalRefs",value:function(t,e){var n=this,i=arguments.length>2&&void 0!==arguments[2]&&arguments[2];i||this._manageRecursivePointer(t,e);var o={},r=function(t){return Object.keys(t).forEach((function(t){o[t]=!0}))};if(t.$ref&&"object"!==yr(t.$ref)&&(0!==t.$ref.indexOf("#")||!i)){var s=t.$ref,a="";s.indexOf("#")>0&&(s=s.substr(0,s.indexOf("#"))),s!==t.$ref&&(a=t.$ref.substr(t.$ref.indexOf("#")));var l=this.refs_prefix+this.refs_counter++,c=l+a;"#"===t.$ref.substr(0,1)||this.refs[t.$ref]||(o[s]=!0),this.refs_with_info[l]={fetchUrl:e,$ref:s},t.$ref=c}return Object.values(t).forEach((function(t){t&&"object"===yr(t)&&(Array.isArray(t)?Object.values(t).forEach((function(t){t&&"object"===yr(t)&&r(n._getExternalRefs(t,e,i))})):t.$ref&&"string"==typeof t.$ref&&t.$ref.startsWith("#")||r(n._getExternalRefs(t,e,i)))})),t.id&&"string"==typeof t.id&&"urn:"===t.id.substr(0,4)?this.refs[t.id]=t:t.$id&&"string"==typeof t.$id&&"urn:"===t.$id.substr(0,4)&&(this.refs[t.$id]=t),o}},{key:"_getFileBase",value:function(t){if(!t)return"/";var e=this.options.ajaxBase;return void 0===e?this._getFileBaseFromFileLocation(t):e}},{key:"_getFileBaseFromFileLocation",value:function(t){var e=t.split("/");return e.pop(),"".concat(e.join("/"),"/")}},{key:"_joinUrl",value:function(t,e){var n=t;return"http://"!==t.substr(0,7)&&"https://"!==t.substr(0,8)&&"blob:"!==t.substr(0,5)&&"data:"!==t.substr(0,5)&&"#"!==t.substr(0,1)&&"/"!==t.substr(0,1)&&(n=e+t),n.indexOf("#")>0&&(n=n.substr(0,n.indexOf("#"))),n}},{key:"_isUniformResourceName",value:function(t){return"urn:"===t.substr(0,4)}},{key:"_asyncloadExternalRefs",value:(n=pr(hr().mark((function t(e,n,i){var o,r,s,a,l,c,u=this,h=arguments;return hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:o=h.length>3&&void 0!==h[3]&&h[3],r=this._getExternalRefs(e,n,o),s=0,a=hr().mark((function t(){var e,n,o,r,a,h,d,p,f,m,y;return hr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==(e=c[l])){t.next=3;break}return t.abrupt("return",0);case 3:if(!u.refs[e]){t.next=5;break}return t.abrupt("return",0);case 5:if(!u._isUniformResourceName(e)){t.next=40;break}if(u.refs[e]="loading",s++,n=u.options.urn_resolver,o=e,"function"==typeof n){t.next=13;break}throw console.log('No "urn_resolver" callback defined to resolve "'.concat(o,'"')),new Error("Must set urn_resolver option to a callback to resolve ".concat(o));case 13:return o.indexOf("#")>0&&(o=o.substr(0,o.indexOf("#"))),t.prev=14,t.next=17,n(o);case 17:r=t.sent,t.prev=18,a=JSON.parse(r),t.next=26;break;case 22:throw t.prev=22,t.t0=t.catch(18),console.log(t.t0),new Error("Failed to parse external ref ".concat(o));case 26:if(!("boolean"!=typeof a&&"object"!==yr(a)||null===a||Array.isArray(a))){t.next=28;break}throw new Error("External ref does not contain a valid schema - ".concat(o));case 28:return u.refs[e]=a,t.next=31,u._asyncloadExternalRefs(a,e,i);case 31:t.next=37;break;case 33:throw t.prev=33,t.t1=t.catch(14),console.log(t.t1),new Error("Failed to parse external ref ".concat(o));case 37:if("boolean"!=typeof r){t.next=39;break}throw new Error("External ref does not contain a valid schema - ".concat(o));case 39:return t.abrupt("return",0);case 40:if(u.options.ajax){t.next=42;break}throw new Error("Must set ajax option to true to load external ref ".concat(e));case 42:if(s++,h=u._joinUrl(e,i),u.options.ajax_cache_responses&&(p=u.cacheGet(h))&&(d=p),d){t.next=61;break}return t.next=48,new Promise((function(t){var e=new XMLHttpRequest;u.options.ajaxCredentials&&(e.withCredentials=u.options.ajaxCredentials),e.overrideMimeType("application/json"),e.open("GET",h,!0),e.onload=function(){t(e)},e.onerror=function(e){t(void 0)},e.send()}));case 48:if(void 0!==(f=t.sent)){t.next=51;break}throw new Error("Failed to fetch ref via ajax - ".concat(e));case 51:t.prev=51,d=JSON.parse(f.responseText),u.onSchemaLoaded({schema:d,schemaUrl:h}),u.options.ajax_cache_responses&&u.cacheSet(h,d),t.next=61;break;case 57:throw t.prev=57,t.t2=t.catch(51),console.log(t.t2),new Error("Failed to parse external ref ".concat(h));case 61:if(!("boolean"!=typeof d&&"object"!==yr(d)||null===d||Array.isArray(d))){t.next=63;break}throw new Error("External ref does not contain a valid schema - ".concat(h));case 63:return u.refs[e]=d,m=u._getFileBaseFromFileLocation(h),h!==e&&(y=h.split("/"),h=("/"===e.substr(0,1)?"/":"")+y.pop()),t.next=68,u._asyncloadExternalRefs(d,h,m);case 68:case"end":return t.stop()}}),t,null,[[14,33],[18,22],[51,57]])})),l=0,c=Object.keys(r);case 5:if(!(l<c.length)){t.next=13;break}return t.delegateYield(a(),"t0",7);case 7:if(0!==t.t0){t.next=10;break}return t.abrupt("continue",10);case 10:l++,t.next=5;break;case 13:if(s){t.next=15;break}return t.abrupt("return",!0);case 15:this.onAllSchemasLoaded();case 16:case"end":return t.stop()}}),t,this)}))),function(t,e,i){return n.apply(this,arguments)})},{key:"onSchemaLoaded",value:function(t){}},{key:"onAllSchemasLoaded",value:function(){}},{key:"extendSchemas",value:function(t,e){var n=this;t=l({},t),e=l({},e);var i={};return Object.entries(t).forEach((function(t){var o=fr(t,2),r=o[0],s=o[1];void 0!==e[r]?function(t,o){!function(t,e){return("required"===t||"defaultProperties"===t)&&"object"===yr(e)&&Array.isArray(e)}(t,o)?"type"!==t||"string"!=typeof o&&!Array.isArray(o)?"object"!==yr(o)||Array.isArray(o)||null===o?i[t]=o:i[t]=n.extendSchemas(o,e[t]):function(t){"string"==typeof t&&(t=[t]),"string"==typeof e.type&&(e.type=[e.type]),e.type&&e.type.length?i.type=t.filter((function(t){return e.type.includes(t)})):i.type=t,1===i.type.length&&"string"==typeof i.type[0]?i.type=i.type[0]:0===i.type.length&&delete i.type}(o):i[t]=o.concat(e[t]).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[])}(r,s):i[r]=s})),Object.entries(e).forEach((function(e){var n=fr(e,2),o=n[0],r=n[1];void 0===t[o]&&(i[o]=r)})),i}},{key:"getCacheKey",value:function(t){return["je-cache",t].join("::")}},{key:"getCacheBuster",value:function(){return this.options.ajax_cache_buster||(new Date).toISOString().slice(0,10)}},{key:"cacheSet",value:function(t,e){try{window.localStorage.setItem(this.getCacheKey(t),JSON.stringify({cacheBuster:this.getCacheBuster(),schema:e}))}catch(t){console.error(t)}}},{key:"cacheGet",value:function(t){try{var e=window.localStorage.getItem(this.getCacheKey(t));if(e){var n=JSON.parse(e);if(n.cacheBuster&&n.schema&&n.cacheBuster===this.getCacheBuster())return n.schema;this.cacheDelete(t)}}catch(t){console.error(t)}}},{key:"cacheDelete",value:function(t){window.localStorage.removeItem(this.getCacheKey(t))}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,vr(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n,i}(),gr=(n(2762),{default:function(){return{compile:function(t){var e=t.match(/{{\s*([a-zA-Z0-9\-_ .]+)\s*}}/g),n=e&&e.length;if(!n)return function(){return t};for(var i=[],o=function(t){var n,o,r=e[t].replace(/[{}]+/g,"").trim().split("."),s=r.length;s>1?n=function(e){for(o=e,t=0;t<s&&(o=o[r[t]]);t++);return o}:(r=r[0],n=function(t){return t[r]}),i.push({s:e[t],r:n})},r=0;r<n;r++)o(r);return function(e){for(var o,r="".concat(t),s=0;s<n;s++)o=i[s],r=r.replace(o.s,o.r(e));return r}}}},ejs:function(){return!!window.EJS&&{compile:function(t){var e=new window.EJS({text:t});return function(t){return e.render(t)}}}},handlebars:function(){return window.Handlebars},hogan:function(){return!!window.Hogan&&{compile:function(t){var e=window.Hogan.compile(t);return function(t){return e.render(t)}}}},lodash:function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t)(e)}}}},markup:function(){return!(!window.Mark||!window.Mark.up)&&{compile:function(t){return function(e){return window.Mark.up(t,e)}}}},mustache:function(){return!!window.Mustache&&{compile:function(t){return function(e){return window.Mustache.render(t,e)}}}},swig:function(){return window.swig},underscore:function(){return!!window._&&{compile:function(t){return function(e){return window._.template(t)(e)}}}}});function _r(t){return _r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_r(t)}function wr(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function xr(t){var e=function(t){if("object"!=_r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=_r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==_r(e)?e:e+""}var kr={collapse:"",expand:"",delete:"",edit:"",add:"",cancel:"",save:"",moveup:"",movedown:""},Or=function(){return t=function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:kr;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.mapping=n,this.icon_prefix=e},(e=[{key:"getIconClass",value:function(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:this.icon_prefix+t}},{key:"getIcon",value:function(t){var e,n=this.getIconClass(t);if(!n)return null;var i,o=document.createElement("i");return(e=o.classList).add.apply(e,function(t){if(Array.isArray(t))return wr(t)}(i=n.split(" "))||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(i)||function(t,e){if(t){if("string"==typeof t)return wr(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?wr(t,e):void 0}}(i)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),o}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,xr(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function jr(t){return jr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jr(t)}function Cr(t,e,n){return e=Pr(e),function(t,e){if(e&&("object"===jr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Er()?Reflect.construct(e,n||[],Pr(t).constructor):e.apply(t,n))}function Er(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Er=function(){return!!t})()}function Pr(t){return Pr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pr(t)}function Lr(t,e){return Lr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lr(t,e)}var Sr={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"},Tr=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Cr(this,e,["glyphicon glyphicon-",Sr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Ar(t){return Ar="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ar(t)}function Rr(t,e,n){return e=Ir(e),function(t,e){if(e&&("object"===Ar(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Br()?Reflect.construct(e,n||[],Ir(t).constructor):e.apply(t,n))}function Br(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Br=function(){return!!t})()}function Ir(t){return Ir=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ir(t)}function zr(t,e){return zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zr(t,e)}var Mr={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"},Nr=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Rr(this,e,["icon-",Mr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Dr(t){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(t)}function Fr(t,e,n){return e=Vr(e),function(t,e){if(e&&("object"===Dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Hr()?Reflect.construct(e,n||[],Vr(t).constructor):e.apply(t,n))}function Hr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Hr=function(){return!!t})()}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}function Zr(t,e){return Zr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zr(t,e)}var qr={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"},Ur=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Fr(this,e,["fa fa-",qr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Wr(t){return Wr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wr(t)}function Gr(t,e,n){return e=$r(e),function(t,e){if(e&&("object"===Wr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jr()?Reflect.construct(e,n||[],$r(t).constructor):e.apply(t,n))}function Jr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jr=function(){return!!t})()}function $r(t){return $r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$r(t)}function Yr(t,e){return Yr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yr(t,e)}var Kr={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"},Xr=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Gr(this,e,["fas fa-",Kr])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yr(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function Qr(t){return Qr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qr(t)}function ts(t,e,n){return e=ns(e),function(t,e){if(e&&("object"===Qr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,es()?Reflect.construct(e,n||[],ns(t).constructor):e.apply(t,n))}function es(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(es=function(){return!!t})()}function ns(t){return ns=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ns(t)}function is(t,e){return is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},is(t,e)}var os={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"},rs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ts(this,e,["ui-icon ui-icon-",os])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&is(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function ss(t){return ss="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ss(t)}function as(t,e,n){return e=cs(e),function(t,e){if(e&&("object"===ss(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ls()?Reflect.construct(e,n||[],cs(t).constructor):e.apply(t,n))}function ls(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ls=function(){return!!t})()}function cs(t){return cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},cs(t)}function us(t,e){return us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},us(t,e)}var hs={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"},ds=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),as(this,e,["oi oi-",hs])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&us(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function ps(t){return ps="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ps(t)}function fs(t,e,n){return e=ys(e),function(t,e){if(e&&("object"===ps(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ms()?Reflect.construct(e,n||[],ys(t).constructor):e.apply(t,n))}function ms(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ms=function(){return!!t})()}function ys(t){return ys=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ys(t)}function vs(t,e){return vs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},vs(t,e)}var bs={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"},gs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),fs(this,e,["icon icon-",bs])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&vs(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or);function _s(t){return _s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},_s(t)}function ws(t,e,n){return e=ks(e),function(t,e){if(e&&("object"===_s(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xs()?Reflect.construct(e,n||[],ks(t).constructor):e.apply(t,n))}function xs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xs=function(){return!!t})()}function ks(t){return ks=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ks(t)}function Os(t,e){return Os=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Os(t,e)}var js={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"},Cs={bootstrap:function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),ws(this,e,["bi bi-",js])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Os(t,e)}(e,t),n=e,Object.defineProperty(n,"prototype",{writable:!1}),n;var n}(Or),bootstrap3:Tr,fontawesome3:Nr,fontawesome4:Ur,fontawesome5:Xr,jqueryui:rs,openiconic:ds,spectre:gs};function Es(t){return Es="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Es(t)}function Ps(t){var e=function(t){if("object"!=Es(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Es(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Es(e)?e:e+""}var Ls=["matches","webkitMatchesSelector","mozMatchesSelector","msMatchesSelector","oMatchesSelector"].find((function(t){return t in document.documentElement})),Ss=function(){return t=function t(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{disable_theme_rules:!1};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.jsoneditor=e,Object.keys(n).forEach((function(t){void 0!==e.options[t]&&(n[t]=e.options[t])})),this.options=n},e=[{key:"getContainer",value:function(){return document.createElement("div")}},{key:"getOptInCheckbox",value:function(t){var e=document.createElement("span"),n=this.getHiddenLabel(t+" opt-in");n.setAttribute("for",t+"-opt-in"),n.textContent=t+"-opt-in";var i=document.createElement("input");return i.setAttribute("type","checkbox"),i.setAttribute("style","margin: 0 10px 0 0;"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in"),e.appendChild(i),e.appendChild(n),{label:n,checkbox:i,container:e}}},{key:"getOptInSwitch",value:function(t){return this.getOptInCheckbox()}},{key:"getFloatRightLinkHolder",value:function(){var t=document.createElement("div");return t.classList.add("je-float-right-linkholder"),t}},{key:"getModal",value:function(){var t=document.createElement("div");return t.style.display="none",t.classList.add("je-modal"),t}},{key:"getGridContainer",value:function(){return document.createElement("div")}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("row"),t}},{key:"getGridColumn",value:function(){return document.createElement("div")}},{key:"setGridColumnSize",value:function(t,e){}},{key:"getLink",value:function(t){var e=document.createElement("a");return e.setAttribute("href","#"),e.appendChild(document.createTextNode(t)),e}},{key:"disableHeader",value:function(t){t.style.color="#ccc"}},{key:"disableLabel",value:function(t){t.style.color="#ccc"}},{key:"enableHeader",value:function(t){t.style.color=""}},{key:"enableLabel",value:function(t){t.style.color=""}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.innerText="ⓘ",e.classList.add("je-infobutton-icon");var n=document.createElement("span");return n.classList.add("je-infobutton-tooltip"),n.innerText=t,e.onmouseover=function(){n.style.visibility="visible"},e.onmouseleave=function(){n.style.visibility="hidden"},e.appendChild(n),e}},{key:"getFormInputLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(t)),e&&n.classList.add("required"),n}},{key:"getLabelLike",value:function(t,e){var n=document.createElement("b");return n.appendChild(document.createTextNode(t)),e&&n.classList.add("required"),n}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return"string"==typeof t?n.textContent=t:n.appendChild(t),n.classList.add("je-header"),n}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("je-checkbox"),t}},{key:"getCheckboxLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(" ".concat(t))),e&&n.classList.add("required"),n}},{key:"getMultiCheckboxHolder",value:function(t,e,n,i){var o=document.createElement("div");return o.classList.add("control-group"),e&&(e.style.display="block",o.appendChild(e),i&&e.appendChild(i)),Object.values(t).forEach((function(t){t.style.display="inline-block",t.style.marginRight="20px",o.appendChild(t)})),n&&o.appendChild(n),o}},{key:"getFormCheckboxControl",value:function(t,e,n){var i=document.createElement("div");return i.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&i.classList.add("je-checkbox-control--compact"),i}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");return Object.keys(t).forEach((function(n){return e.setAttribute(n,t[n])})),e.classList.add("je-radio"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return n.appendChild(document.createTextNode(" ".concat(t))),e&&n.classList.add("required"),n}},{key:"getFormRadioControl",value:function(t,e,n,i){var o=document.createElement("div");return o.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&o.classList.add("je-radio-control--compact"),"div"!==e.tagName.toLowerCase()&&i&&t&&e&&(e.setAttribute("id",i),e.setAttribute("aria-labelledby",i),t.setAttribute("for",i)),o}},{key:"getSelectInput",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]&&arguments[2],i=document.createElement("select");return t&&this.setSelectOptions(i,t,[],n),i}},{key:"getSwitcher",value:function(t){var e=this.getSelectInput(t,!1);return e.classList.add("je-switcher"),e}},{key:"getSwitcherOptions",value:function(t){return t.getElementsByTagName("option")}},{key:"setSwitcherOptions",value:function(t,e,n){this.setSelectOptions(t,e,n)}},{key:"setSelectOptions",value:function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[],i=arguments.length>3&&void 0!==arguments[3]&&arguments[3],o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:" ";if(t.innerHTML="",i){var r=document.createElement("option");r.setAttribute("value","_placeholder_"),r.textContent=o,r.setAttribute("disabled",""),r.setAttribute("hidden",""),t.appendChild(r)}for(var s=0;s<e.length;s++){var a=document.createElement("option");a.setAttribute("value",e[s]),a.textContent=n[s]||e[s],t.appendChild(a)}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("je-textarea"),t}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),e}},{key:"visuallyHidden",value:function(t){t&&t.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(t){var e=document.createElement("span");return e.textContent=t,e.setAttribute("style","position: absolute;width: 1px;height: 1px;padding: 0;margin: -1px;overflow: hidden;clip: rect(0,0,0,0);border: 0;"),e}},{key:"getRangeInput",value:function(t,e,n,i,o){var r=this.getFormInputField("range");return r.setAttribute("min",t),r.setAttribute("max",e),r.setAttribute("step",n),i&&(i.setAttribute("id",o+"-description"),r.setAttribute("aria-describedby",o+"-description")),r}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),n=document.createElement("button");n.setAttribute("type","button"),n.classList.add("stepper-down");var i=document.createElement("button");i.setAttribute("type","button"),i.classList.add("stepper-up"),t.getAttribute("readonly")&&(n.setAttribute("disabled",!0),i.setAttribute("disabled",!0)),n.textContent="-",i.textContent="+";var o=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},r=t.getAttribute("min"),s=t.getAttribute("max");return n.addEventListener("click",(function(){t.getAttribute("initialized")?r?Number(t.value)>Number(r)&&t.stepDown():t.stepDown():o(t,r),c(t,"change")})),i.addEventListener("click",(function(){t.getAttribute("initialized")?s?Number(t.value)<Number(s)&&t.stepUp():t.stepUp():o(t,r),c(t,"change")})),e.appendChild(n),e.appendChild(i),e}},{key:"getRangeOutput",value:function(t){var e=document.createElement("output"),n=function(t){e.value=t.currentTarget.value};return t.addEventListener("change",n,!1),t.addEventListener("input",n,!1),e}},{key:"getRangeControl",value:function(t,e){var n=document.createElement("div");return n.classList.add("je-range-control"),e&&n.appendChild(e),n.appendChild(t),n}},{key:"getFormInputField",value:function(t){var e=document.createElement("input");return e.setAttribute("type",t),e}},{key:"afterInputReady",value:function(t){}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");return r.classList.add("form-control"),t&&(r.appendChild(t),o&&t.setAttribute("for",o)),"checkbox"!==e.type&&"radio"!==e.type||!t?(i&&t&&t.appendChild(i),r.appendChild(e)):(e.style.width="auto",t.insertBefore(e,t.firstChild),i&&t.appendChild(i)),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),n&&r.appendChild(n),r}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-indented-panel--top"),t}},{key:"getChildEditorHolder",value:function(){return document.createElement("div")}},{key:"getDescription",value:function(t){var e=document.createElement("p");return window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getCheckboxDescription",value:function(t){return this.getDescription(t)}},{key:"getFormInputDescription",value:function(t){return this.getDescription(t)}},{key:"getButtonHolder",value:function(){return document.createElement("span")}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getFormButtonHolder",value:function(t){return this.getButtonHolder()}},{key:"getButton",value:function(t,e,n){var i=document.createElement("button");return i.type="button",this.setButtonText(i,t,e,n),i}},{key:"getFormButton",value:function(t,e,n){return this.getButton(t,e,n)}},{key:"setButtonText",value:function(t,e,n,i){for(;t.firstChild;)t.removeChild(t.firstChild);if(n&&(t.appendChild(n),e=" ".concat(e)),!this.jsoneditor.options.iconlib||!this.jsoneditor.options.remove_button_labels||!n){var o=document.createElement("span");o.appendChild(document.createTextNode(e)),t.appendChild(o)}i&&t.setAttribute("title",i)}},{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(t){var e=document.createElement("th");return e.textContent=t,e}},{key:"getTableCell",value:function(){return document.createElement("td")}},{key:"getErrorMessage",value:function(t){var e=document.createElement("p");return e.style=e.style||{},e.style.color="red",e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(t){}},{key:"addTableRowError",value:function(t){}},{key:"removeTableRowError",value:function(t){}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<div class='je-tabholder tabs'></div><div class='content' id='".concat(e,"'></div><div class='je-tabholder--clear'></div>"),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<div class='tabs je-tabholder--top'></div><div class='je-tabholder--clear'></div><div class='content' id='".concat(e,"'></div>"),n}},{key:"applyStyles",value:function(t,e){Object.keys(e).forEach((function(n){return t.style[n]=e[n]}))}},{key:"closest",value:function(t,e){for(;t&&t!==document;){if(!t[Ls])return!1;if(t[Ls](e))return t;t=t.parentNode}return!1}},{key:"insertBasicTopTab",value:function(t,e){e.firstChild.insertBefore(t,e.firstChild.firstChild)}},{key:"getTab",value:function(t,e){var n=document.createElement("div");return n.appendChild(t),n.id=e,n.classList.add("je-tab"),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("div");return n.appendChild(t),n.id=e,n.classList.add("je-tab--top"),n}},{key:"getTabContentHolder",value:function(t){return t.children[1]}},{key:"getTopTabContentHolder",value:function(t){return t.children[1]}},{key:"getTabContent",value:function(){return this.getIndentedPanel()}},{key:"getTopTabContent",value:function(){return this.getTopIndentedPanel()}},{key:"markTabActive",value:function(t){this.applyStyles(t.tab,{opacity:1,background:"white"}),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){this.applyStyles(t.tab,{opacity:.5,background:""}),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"addTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"addTopTab",value:function(t,e){t.children[0].appendChild(e)}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("je-block-link"),t}},{key:"getBlockLinkHolder",value:function(){return document.createElement("div")}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"createMediaLink",value:function(t,e,n){t.appendChild(e),n.classList.add("je-media"),t.appendChild(n)}},{key:"createImageLink",value:function(t,e,n){t.appendChild(e),e.appendChild(n)}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild}},{key:"getInputGroup",value:function(t,e){}},{key:"cleanText",value:function(t){var e=document.createElement("div");return e.innerHTML=t,e.textContent||e.innerText}},{key:"getDropZone",value:function(t){var e=document.createElement("div");return e.setAttribute("data-text",t),e.classList.add("je-dropzone"),e}},{key:"getUploadPreview",value:function(t,e,n){var i=document.createElement("div");if(i.classList.add("je-upload-preview"),"image"===t.mimeType.substr(0,5)){var o=document.createElement("img");o.src=n,i.appendChild(o)}var r=document.createElement("div");r.innerHTML+="<strong>Name:</strong> ".concat(t.name,"<br><strong>Type:</strong> ").concat(t.type,"<br><strong>Size:</strong> ").concat(t.formattedSize),i.appendChild(r),i.appendChild(e);var s=document.createElement("div");return s.style.clear="left",i.appendChild(s),i}},{key:"getProgressBar",value:function(){var t=document.createElement("progress");return t.setAttribute("max",100),t.setAttribute("value",0),t}},{key:"updateProgressBar",value:function(t,e){t&&t.setAttribute("value",e)}},{key:"updateProgressBarUnknown",value:function(t){t&&t.removeAttribute("value")}}],e&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ps(i.key),i)}}(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Ts(t){return Ts="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ts(t)}function As(t){var e=function(t){if("object"!=Ts(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ts(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ts(e)?e:e+""}function Rs(t,e,n){return e=zs(e),function(t,e){if(e&&("object"===Ts(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Bs()?Reflect.construct(e,n||[],zs(t).constructor):e.apply(t,n))}function Bs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Bs=function(){return!!t})()}function Is(){return Is="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=zs(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Is.apply(this,arguments)}function zs(t){return zs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zs(t)}function Ms(t,e){return Ms=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ms(t,e)}var Ns=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Rs(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ms(t,e)}(e,t),n=e,(i=[{key:"getFormInputLabel",value:function(t,n){var i=Is(zs(e.prototype),"getFormInputLabel",this).call(this,t,n);return i.classList.add("je-form-input-label"),i}},{key:"getFormInputDescription",value:function(t){var n=Is(zs(e.prototype),"getFormInputDescription",this).call(this,t);return n.classList.add("je-form-input-label"),n}},{key:"getIndentedPanel",value:function(){var t=Is(zs(e.prototype),"getIndentedPanel",this).call(this);return t.classList.add("je-indented-panel"),t}},{key:"getTopIndentedPanel",value:function(){return this.getIndentedPanel()}},{key:"getChildEditorHolder",value:function(){var t=Is(zs(e.prototype),"getChildEditorHolder",this).call(this);return t.classList.add("je-child-editor-holder"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("je-header-button-holder"),t}},{key:"getTable",value:function(){var t=Is(zs(e.prototype),"getTable",this).call(this);return t.classList.add("je-table"),t}},{key:"addInputError",value:function(t,e){var n=this.closest(t,".form-control")||t.controlgroup;t.errmsg?t.errmsg.style.display="block":(t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),t.errmsg.style=t.errmsg.style||{},t.errmsg.style.color="red",n.appendChild(t.errmsg)),t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e)),t.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,As(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Ds(t){return Ds="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ds(t)}function Fs(t){var e=function(t){if("object"!=Ds(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ds(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ds(e)?e:e+""}function Hs(t,e,n){return e=qs(e),function(t,e){if(e&&("object"===Ds(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vs()?Reflect.construct(e,n||[],qs(t).constructor):e.apply(t,n))}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vs=function(){return!!t})()}function Zs(){return Zs="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=qs(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Zs.apply(this,arguments)}function qs(t){return qs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qs(t)}function Us(t,e){return Us=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Us(t,e)}Ns.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 Ws=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Hs(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Us(t,e)}(e,t),n=e,(i=[{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("label");n.classList.add("switch");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in");var o=document.createElement("span");o.classList.add("switch-slider");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",n.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"getSelectInput",value:function(t,n){var i=Zs(qs(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-control"),i}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-md-".concat(e)),n&&t.classList.add("col-md-offset-".concat(n))}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),t}},{key:"getRangeInput",value:function(t,n,i,o,r){return Zs(qs(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r)}},{key:"getFormInputField",value:function(t){var n=Zs(qs(e.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&n.classList.add("form-control"),n}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"visuallyHidden",value:function(t){t&&t.classList.add("sr-only")}},{key:"getHiddenText",value:function(t){var e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");return!t||"checkbox"!==e.type&&"radio"!==e.type?(r.classList.add("form-group"),t&&(t.classList.add("control-label"),r.appendChild(t),i&&t.appendChild(i)),r.appendChild(e)):(r.classList.add(e.type),i&&t.appendChild(i),t.insertBefore(e,t.firstChild),r.appendChild(t)),n&&r.appendChild(n),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),r}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("well","well-sm"),t.style.paddingBottom=0,t}},{key:"getInfoButton",value:function(t){var e=document.createElement("span");e.classList.add("glyphicon","glyphicon-info-sign","pull-right"),e.style.padding=".25rem",e.style.position="relative",e.style.display="inline-block";var n=document.createElement("span");return n.style["font-family"]="sans-serif",n.style.visibility="hidden",n.style["background-color"]="rgba(50, 50, 50, .75)",n.style.margin="0 .25rem",n.style.color="#FAFAFA",n.style.padding=".5rem 1rem",n.style["border-radius"]=".25rem",n.style.width="25rem",n.style.position="absolute",n.innerText=t,e.onmouseover=function(){n.style.visibility="visible"},e.onmouseleave=function(){n.style.visibility="hidden"},e.appendChild(n),e}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("help-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeaderContainer",value:function(){return document.createElement("div")}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return n.classList.add("h3"),"string"==typeof t?n.textContent=t:n.appendChild(t),n}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getButton",value:function(t,n,i){var o=Zs(qs(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-default"),o}},{key:"getTableContainer",value:function(){var t=Zs(qs(e.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-bordered"),t.style.width="auto",t.style.maxWidth="none",t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("help-block","errormsg"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<ul class='col-md-2 nav nav-pills nav-stacked' id='".concat(e,"' role='tablist'></ul><div class='col-md-10 tab-content active well well-small' id='").concat(e,"'></div>"),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<ul class='nav nav-tabs' id='".concat(e,"' role='tablist'></ul><div class='tab-content active well well-small' id='").concat(e,"'></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var i=document.createElement("a");return i.setAttribute("href","#".concat(e)),i.appendChild(t),i.setAttribute("aria-controls",e),i.setAttribute("role","tab"),i.setAttribute("data-toggle","tab"),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var i=document.createElement("a");return i.setAttribute("href","#".concat(e)),i.appendChild(t),i.setAttribute("aria-controls",e),i.setAttribute("role","tab"),i.setAttribute("data-toggle","tab"),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);var i=document.createElement("div");i.classList.add("input-group-btn"),n.appendChild(i);for(var o=0;o<e.length;o++)i.appendChild(e[o]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Fs(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Gs(t){return Gs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Gs(t)}function Js(t){var e=function(t){if("object"!=Gs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Gs(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Gs(e)?e:e+""}function $s(t,e,n){return e=Xs(e),function(t,e){if(e&&("object"===Gs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ys()?Reflect.construct(e,n||[],Xs(t).constructor):e.apply(t,n))}function Ys(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ys=function(){return!!t})()}function Ks(){return Ks="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Xs(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Ks.apply(this,arguments)}function Xs(t){return Xs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xs(t)}function Qs(t,e){return Qs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qs(t,e)}Ws.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 ta={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"},ea=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),$s(this,e,[t,ta])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qs(t,e)}(e,t),n=e,(i=[{key:"getSelectInput",value:function(t,n){var i=Ks(Xs(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-control"),!1===this.options.custom_forms?("small"===this.options.input_size&&i.classList.add("form-control-sm"),"large"===this.options.input_size&&i.classList.add("form-control-lg")):(i.classList.remove("form-control"),i.classList.add("custom-select"),"small"===this.options.input_size&&i.classList.add("custom-select-sm"),"large"===this.options.input_size&&i.classList.add("custom-select-lg")),i}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("div");n.classList.add("custom-control","custom-switch","d-inline-block","fs-6");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("custom-control-input","json-editor-opt-in");var o=document.createElement("label");o.setAttribute("for",t+"-opt-in"),o.classList.add("custom-control-label");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",o.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-md-".concat(e)),n&&t.classList.add("offset-md-".concat(n))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var n=t.parentNode.parentNode.getElementsByTagName("label")[0];n&&(n.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),"small"===this.options.input_size&&t.classList.add("form-control-sm"),"large"===this.options.input_size&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,n,i,o,r){var s=Ks(Xs(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r);return!0===this.options.custom_forms&&(s.classList.remove("form-control"),s.classList.add("custom-range")),s}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),n=document.createElement("div"),i=document.createElement("div"),o=document.createElement("button");o.setAttribute("type","button");var r=document.createElement("button");r.setAttribute("type","button"),e.appendChild(n),e.appendChild(t),e.appendChild(i),n.appendChild(o),i.appendChild(r),e.classList.add("input-group"),n.classList.add("input-group-prepend"),i.classList.add("input-group-append"),o.classList.add("btn"),o.classList.add("btn-secondary"),o.classList.add("stepper-down"),r.classList.add("btn"),r.classList.add("btn-secondary"),r.classList.add("stepper-up"),t.getAttribute("readonly")&&(o.setAttribute("disabled",!0),r.setAttribute("disabled",!0)),o.textContent="-",r.textContent="+";var s=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},a=t.getAttribute("min"),l=t.getAttribute("max");return t.addEventListener("change",(function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")})),o.addEventListener("click",(function(){t.getAttribute("initialized")?a?Number(t.value)>Number(a)&&t.stepDown():t.stepDown():s(t,a),c(t,"change")})),r.addEventListener("click",(function(){t.getAttribute("initialized")?l?Number(t.value)<Number(l)&&t.stepUp():t.stepUp():s(t,a),c(t,"change")})),e}},{key:"getFormInputField",value:function(t){var n=Ks(Xs(e.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&"file"!==t&&(n.classList.add("form-control"),"small"===this.options.input_size&&n.classList.add("form-control-sm"),"large"===this.options.input_size&&n.classList.add("form-control-lg")),"file"===t&&n.classList.add("form-control-file"),n}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"visuallyHidden",value:function(t){t&&t.classList.add("sr-only")}},{key:"getHiddenText",value:function(t){var e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");if(r.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type)t&&(r.appendChild(t),i&&r.appendChild(i)),r.appendChild(e);else{var s=document.createElement("div");!1===this.options.custom_forms?(s.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label")):(s.classList.add("custom-control"),e.classList.add("custom-control-input"),t.classList.add("custom-control-label"),"checkbox"===e.type?s.classList.add("custom-checkbox"):s.classList.add("custom-radio")),s.appendChild(e),s.appendChild(t),i&&s.appendChild(i),r.appendChild(s)}return n&&r.appendChild(n),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),r}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ml-3","jsoneditor-twbs4-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var n=document.createTextNode("ⓘ");return e.appendChild(n),"bootstrap"===this.options.tooltip?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):"css"===this.options.tooltip&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,n,i){var o=document.createElement("div");o.classList.add("form-group"),e&&(o.appendChild(e),i&&e.appendChild(i));var r=document.createElement("div");return Object.values(t).forEach((function(t){var e=t.firstChild;r.appendChild(e)})),o.appendChild(r),n&&o.appendChild(n),o}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in t)e.setAttribute(n,t[n]);return!1===this.options.custom_forms?e.classList.add("form-check-input"):e.classList.add("custom-control-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return!1===this.options.custom_forms?n.classList.add("form-check-label"):n.classList.add("custom-control-label"),n.appendChild(document.createTextNode(t)),n}},{key:"getFormRadioControl",value:function(t,e,n){var i=document.createElement("div");return!1===this.options.custom_forms?i.classList.add("form-check"):i.classList.add("custom-control","custom-radio"),i.appendChild(e),i.appendChild(t),n&&(!1===this.options.custom_forms?i.classList.add("form-check-inline"):i.classList.add("custom-control-inline")),i}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","mb-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return n.classList.add("h3"),n.classList.add("card-title"),n.classList.add("level-"+e),"string"==typeof t?n.textContent=t:n.appendChild(t),n.style.display="inline-block",n}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t&&e.classList.add("text-right"),e}},{key:"getButton",value:function(t,n,i){var o=Ks(Xs(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-secondary","btn-sm"),o}},{key:"getTableContainer",value:function(){var t=Ks(Xs(e.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(n,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(n,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.classList.add("card"),n.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);var i=document.createElement("div");i.classList.add("input-group-append"),n.appendChild(i);for(var o=0;o<e.length;o++)e[o].classList.remove("mr-2","btn-secondary"),e[o].classList.add("btn-outline-secondary"),i.appendChild(e[o]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Js(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function na(t){return na="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},na(t)}function ia(t){var e=function(t){if("object"!=na(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=na(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==na(e)?e:e+""}function oa(t,e,n){return e=aa(e),function(t,e){if(e&&("object"===na(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ra()?Reflect.construct(e,n||[],aa(t).constructor):e.apply(t,n))}function ra(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ra=function(){return!!t})()}function sa(){return sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=aa(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},sa.apply(this,arguments)}function aa(t){return aa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},aa(t)}function la(t,e){return la=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},la(t,e)}ea.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 ca={disable_theme_rules:!1,input_size:"normal",object_indent:!0,object_background:"bg-light",object_text:"",table_border:!1,table_zebrastyle:!1,tooltip:"bootstrap"},ua=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),oa(this,e,[t,ca])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&la(t,e)}(e,t),n=e,(i=[{key:"getSelectInput",value:function(t,n){var i=sa(aa(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-control"),i.classList.add("form-select"),"small"===this.options.input_size&&i.classList.add("form-control-sm"),"large"===this.options.input_size&&i.classList.add("form-control-lg"),i}},{key:"getContainer",value:function(){var t=document.createElement("div");return this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("div");n.classList.add("form-check","form-switch","d-inline-block","fs-6");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("role","switch"),i.setAttribute("id",t+"-opt-in"),i.classList.add("form-check-input","json-editor-opt-in");var o=document.createElement("label");o.setAttribute("for",t+"-opt-in"),o.classList.add("form-check-label");var r=document.createElement("span");return r.classList.add("visually-hidden"),r.textContent=t+"-opt-in",o.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-md-".concat(e)),n&&t.classList.add("offset-md-".concat(n))}},{key:"afterInputReady",value:function(t){if(!t.controlgroup){var e=t.name;t.id=e;var n=t.parentNode.parentNode.getElementsByTagName("label")[0];n&&(n.classList.add("form-label"),n.htmlFor=e),t.controlgroup=this.closest(t,".form-group")}}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-control"),"small"===this.options.input_size&&t.classList.add("form-control-sm"),"large"===this.options.input_size&&t.classList.add("form-control-lg"),t}},{key:"getRangeInput",value:function(t,n,i,o,r){var s=sa(aa(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r);return s.classList.remove("form-control"),s.classList.add("form-range"),s}},{key:"getStepperButtons",value:function(t){var e=document.createElement("div"),n=document.createElement("button");n.setAttribute("type","button");var i=document.createElement("button");i.setAttribute("type","button"),e.appendChild(n),e.appendChild(t),e.appendChild(i),e.classList.add("input-group"),n.classList.add("btn"),n.classList.add("btn-secondary"),n.classList.add("stepper-down"),i.classList.add("btn"),i.classList.add("btn-secondary"),i.classList.add("stepper-up"),t.getAttribute("readonly")&&(n.setAttribute("disabled",!0),i.setAttribute("disabled",!0)),n.textContent="-",i.textContent="+";var o=function(t,e){t.value=Number(e||t.value),t.setAttribute("initialized","1")},r=t.getAttribute("min"),s=t.getAttribute("max");return t.addEventListener("change",(function(){t.getAttribute("initialized")||t.setAttribute("initialized","1")})),n.addEventListener("click",(function(){t.getAttribute("initialized")?r?Number(t.value)>Number(r)&&t.stepDown():t.stepDown():o(t,r),c(t,"change")})),i.addEventListener("click",(function(){t.getAttribute("initialized")?s?Number(t.value)<Number(s)&&t.stepUp():t.stepUp():o(t,r),c(t,"change")})),e}},{key:"getFormInputField",value:function(t){var n=sa(aa(e.prototype),"getFormInputField",this).call(this,t);return"checkbox"!==t&&"radio"!==t&&(n.classList.add("form-control"),"small"===this.options.input_size&&n.classList.add("form-control-sm"),"large"===this.options.input_size&&n.classList.add("form-control-lg")),n}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");if(r.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type)t&&(t.classList.add("form-label"),r.appendChild(t),i&&r.appendChild(i)),r.appendChild(e);else{var s=document.createElement("div");s.classList.add("form-check"),e.classList.add("form-check-input"),t.classList.add("form-check-label"),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),s.appendChild(e),s.appendChild(t),i&&s.appendChild(i),r.appendChild(s)}return n&&r.appendChild(n),r}},{key:"getHiddenLabel",value:function(t){var e=document.createElement("label");return e.textContent=t,e.classList.add("visually-hidden"),e}},{key:"visuallyHidden",value:function(t){t&&t.classList.add("visually-hidden")}},{key:"getHiddenText",value:function(t){var e=document.createElement("span");return e.textContent=t,e.classList.add("sr-only"),e}},{key:"getInfoButton",value:function(t){var e=document.createElement("button");e.type="button",e.classList.add("ms-3","jsoneditor-twbs5-text-button"),e.setAttribute("data-toggle","tooltip"),e.setAttribute("data-placement","auto"),e.title=t;var n=document.createTextNode("ⓘ");return e.appendChild(n),"bootstrap"===this.options.tooltip?window.jQuery&&window.jQuery().tooltip?window.jQuery(e).tooltip():console.warn("Could not find popper jQuery plugin of Bootstrap."):"css"===this.options.tooltip&&e.classList.add("je-tooltip"),e}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getMultiCheckboxHolder",value:function(t,e,n,i){var o=document.createElement("div");o.classList.add("form-group"),e&&(o.appendChild(e),i&&e.appendChild(i));var r=document.createElement("div");return Object.values(t).forEach((function(t){var e=t.firstChild;r.appendChild(e)})),o.appendChild(r),n&&o.appendChild(n),o}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in t)e.setAttribute(n,t[n]);return e.classList.add("form-check-input"),e}},{key:"getFormRadioLabel",value:function(t,e){var n=document.createElement("label");return n.classList.add("form-check-label"),n.appendChild(document.createTextNode(t)),n}},{key:"getFormRadioControl",value:function(t,e,n){var i=document.createElement("div");return i.classList.add("form-check"),i.appendChild(e),i.appendChild(t),n&&i.classList.add("form-check-inline"),i}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("card","card-body","my-3"),this.options.object_background&&t.classList.add(this.options.object_background),this.options.object_text&&t.classList.add(this.options.object_text),t}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("small");return e.classList.add("form-text"),e.classList.add("d-block"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return n.classList.add("h3"),n.classList.add("card-title"),n.classList.add("level-"+e),"string"==typeof t?n.textContent=t:n.appendChild(t),n.style.display="inline-block",n}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=document.createElement("span");return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var e=this.getButtonHolder();return e.classList.add("d-block"),"center"===t?e.classList.add("text-center"):"right"===t&&e.classList.add("text-end"),e}},{key:"getButton",value:function(t,n,i){var o=sa(aa(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-secondary","btn-sm"),o}},{key:"getTableContainer",value:function(){var t=sa(aa(e.prototype),"getTableContainer",this).call(this);return t.classList.add("table-responsive"),t}},{key:"getTable",value:function(){var t=document.createElement("table");return t.classList.add("table","table-sm"),this.options.table_border&&t.classList.add("table-bordered"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getErrorMessage",value:function(t){var e=document.createElement("div");return e.classList.add("alert","alert-danger"),e.setAttribute("role","alert"),e.appendChild(document.createTextNode(t)),e}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("is-invalid"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("invalid-feedback"),t.controlgroup.appendChild(t.errmsg),t.errmsg.style.display="block"),t.errmsg.style.display="block",t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("is-invalid"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML="<div class='col-md-2' id='".concat(n,"'><ul class='nav flex-column nav-pills'></ul></div><div class='col-md-10'><div class='tab-content' id='").concat(n,"'></div></div>"),e.classList.add("row"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.classList.add("card"),n.innerHTML="<div class='card-header'><ul class='nav nav-tabs card-header-tabs' id='".concat(e,"'></ul></div><div class='card-body'><div class='tab-content' id='").concat(e,"'></div></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var i=document.createElement("a");return i.classList.add("nav-link"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.classList.add("tab-pane"),t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("active"),void 0!==t.rowPane?t.rowPane.classList.add("active"):t.container.classList.add("active")}},{key:"markTabInactive",value:function(t){t.tab.firstChild.classList.remove("active"),void 0!==t.rowPane?t.rowPane.classList.remove("active"):t.container.classList.remove("active")}},{key:"insertBasicTopTab",value:function(t,e){e.children[0].children[0].insertBefore(t,e.children[0].children[0].firstChild)}},{key:"addTopTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabContentHolder",value:function(t){return t.children[1].children[0]}},{key:"getFirstTab",value:function(t){return t.firstChild.firstChild.firstChild}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("progress-bar"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","progress-striped","active"),e.removeAttribute("aria-valuenow"),e.style.width="100%",e.innerHTML=""}}},{key:"getBlockLink",value:function(){var t=document.createElement("a");return t.classList.add("mb-3","d-inline-block"),t}},{key:"getLinksHolder",value:function(){return document.createElement("div")}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);for(var i=0;i<e.length;i++)e[i].classList.remove("me-2","btn-secondary"),e[i].classList.add("btn-outline-secondary"),n.appendChild(e[i]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,ia(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function ha(t){return ha="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ha(t)}function da(t){var e=function(t){if("object"!=ha(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ha(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ha(e)?e:e+""}function pa(t,e,n){return e=ya(e),function(t,e){if(e&&("object"===ha(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fa()?Reflect.construct(e,n||[],ya(t).constructor):e.apply(t,n))}function fa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fa=function(){return!!t})()}function ma(){return ma="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=ya(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},ma.apply(this,arguments)}function ya(t){return ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ya(t)}function va(t,e){return va=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},va(t,e)}ua.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 ba=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),pa(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&va(t,e)}(e,t),n=e,(i=[{key:"getTable",value:function(){var t=ma(ya(e.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var n=ma(ya(e.prototype),"getTableHeaderCell",this).call(this,t);return n.classList.add("ui-state-active"),n.style.fontWeight="bold",n}},{key:"getTableCell",value:function(){var t=ma(ya(e.prototype),"getTableCell",this).call(this);return t.classList.add("ui-widget-content"),t}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.style.marginLeft="10px",t.style.fontSize=".6em",t.style.display="inline-block",t}},{key:"getFormInputDescription",value:function(t){var e=this.getDescription(t);return e.style.marginLeft="10px",e.style.display="inline-block",e}},{key:"getFormControl",value:function(t,n,i,o){var r=ma(ya(e.prototype),"getFormControl",this).call(this,t,n,i,o);return"checkbox"===n.type?(r.style.lineHeight="25px",r.style.padding="3px 0"):r.style.padding="4px 0 8px 0",r}},{key:"getDescription",value:function(t){var e=document.createElement("span");return e.style.fontSize=".8em",e.style.fontStyle="italic",window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("ui-buttonset"),t.style.fontSize=".7em",t}},{key:"getFormInputLabel",value:function(t,e){var n=document.createElement("label");return n.style.fontWeight="bold",n.style.display="block",n.textContent=t,e&&n.classList.add("required"),n}},{key:"getButton",value:function(t,e,n){var i=document.createElement("button");i.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(i.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),i.appendChild(e)):e?(i.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),i.appendChild(e)):i.classList.add("ui-button-text-only");var o=document.createElement("span");return o.classList.add("ui-button-text"),o.textContent=t||n||".",i.appendChild(o),i.setAttribute("title",n),i}},{key:"setButtonText",value:function(t,e,n,i){t.innerHTML="",t.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),n&&!e?(t.classList.add("ui-button-icon-only"),n.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(n)):n?(t.classList.add("ui-button-text-icon-primary"),n.classList.add("ui-button-icon-primary","ui-icon-primary"),t.appendChild(n)):t.classList.add("ui-button-text-only");var o=document.createElement("span");o.classList.add("ui-button-text"),o.textContent=e||i||".",t.appendChild(o),t.setAttribute("title",i)}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("ui-widget-content","ui-corner-all"),t.style.padding="1em 1.4em",t.style.marginBottom="20px",t}},{key:"afterInputReady",value:function(t){if(!t.controls&&(t.controls=this.closest(t,".form-control"),this.queuedInputErrorText)){var e=this.queuedInputErrorText;delete this.queuedInputErrorText,this.addInputError(t,e)}}},{key:"addInputError",value:function(t,e){t.controls?(t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("div"),t.errmsg.classList.add("ui-state-error"),t.controls.appendChild(t.errmsg)),t.errmsg.textContent=e):this.queuedInputErrorText=e}},{key:"removeInputError",value:function(t){t.controls||delete this.queuedInputErrorText,t.errmsg&&(t.errmsg.style.display="none")}},{key:"markTabActive",value:function(t){t.tab.classList.remove("ui-widget-header"),t.tab.classList.add("ui-state-active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.add("ui-widget-header"),t.tab.classList.remove("ui-state-active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,da(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function ga(t){return ga="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ga(t)}function _a(t){var e=function(t){if("object"!=ga(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=ga(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ga(e)?e:e+""}function wa(t,e,n){return e=ka(e),function(t,e){if(e&&("object"===ga(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xa()?Reflect.construct(e,n||[],ka(t).constructor):e.apply(t,n))}function xa(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xa=function(){return!!t})()}function ka(t){return ka=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ka(t)}function Oa(t,e){return Oa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Oa(t,e)}ba.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 ja=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),wa(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Oa(t,e)}(e,t),n=e,(i=[{key:"addInputError",value:function(t,e){if(t.errmsg)t.errmsg.style.display="block";else{var n=this.closest(t,".form-control");t.errmsg=document.createElement("div"),t.errmsg.setAttribute("class","errmsg"),n.nodeName&&n.appendChild(t.errmsg)}t.errmsg.innerHTML="",t.errmsg.appendChild(document.createTextNode(e)),t.errmsg.setAttribute("role","alert")}},{key:"removeInputError",value:function(t){t.style&&(t.style.borderColor=""),t.errmsg&&(t.errmsg.style.display="none")}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,_a(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Ca(t){return Ca="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ca(t)}function Ea(t){var e=function(t){if("object"!=Ca(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ca(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ca(e)?e:e+""}function Pa(t,e,n){return e=Ta(e),function(t,e){if(e&&("object"===Ca(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,La()?Reflect.construct(e,n||[],Ta(t).constructor):e.apply(t,n))}function La(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(La=function(){return!!t})()}function Sa(){return Sa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Ta(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Sa.apply(this,arguments)}function Ta(t){return Ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ta(t)}function Aa(t,e){return Aa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Aa(t,e)}ja.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 Ra={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"},Ba=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Pa(this,e,[t,Ra])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Aa(t,e)}(e,t),n=e,(i=[{key:"getOptInSwitch",value:function(t){var e=document.createElement("span");e.classList.add("form-group");var n=document.createElement("label");n.classList.add("form-switch","d-inline-block");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in");var o=document.createElement("i");o.classList.add("form-icon");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",n.appendChild(r),n.appendChild(i),n.appendChild(o),e.appendChild(n),{label:n,checkbox:i,container:e}}},{key:"setGridColumnSize",value:function(t,e,n){t.classList.add("col-".concat(e)),n&&t.classList.add("col-mx-auto")}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("container"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("columns"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("column"),this.options.align_bottom&&t.classList.add("je-align-bottom"),t}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return t.classList.add("je-panel-top"),this.options.object_border&&t.classList.add("je-border"),t}},{key:"getHeaderButtonHolder",value:function(){return this.getButtonHolder()}},{key:"getButtonHolder",value:function(){var t=Sa(Ta(e.prototype),"getButtonHolder",this).call(this);return t.classList.add("btn-group"),t}},{key:"getFormButtonHolder",value:function(t){var n=Sa(Ta(e.prototype),"getFormButtonHolder",this).call(this);return n.classList.remove("btn-group"),n.classList.add("d-block"),"center"===t?n.classList.add("text-center"):"right"===t?n.classList.add("text-right"):n.classList.add("text-left"),n}},{key:"getFormButton",value:function(t,n,i){var o=Sa(Ta(e.prototype),"getFormButton",this).call(this,t,n,i);return o.classList.add("btn","btn-primary","mx-2","my-1"),"small"!==this.options.input_size&&o.classList.remove("btn-sm"),"large"===this.options.input_size&&o.classList.add("btn-lg"),o}},{key:"getButton",value:function(t,n,i){var o=Sa(Ta(e.prototype),"getButton",this).call(this,t,n,i);return o.classList.add("btn","btn-sm","btn-primary","mr-2","my-1"),o}},{key:"getHeader",value:function(t,e){var n=document.createElement("span");return"string"==typeof t?n.textContent=t:n.appendChild(t),n.style.display="inline-block",n}},{key:"getFormInputDescription",value:function(t){var n=Sa(Ta(e.prototype),"getFormInputDescription",this).call(this,t);return n.classList.add("je-desc","hide-sm"),n}},{key:"getFormInputLabel",value:function(t,n){var i=Sa(Ta(e.prototype),"getFormInputLabel",this).call(this,t,n);return this.options.label_bold&&i.classList.add("je-label"),i}},{key:"getCheckbox",value:function(){return this.getFormInputField("checkbox")}},{key:"getCheckboxLabel",value:function(t,n){var i=Sa(Ta(e.prototype),"getCheckboxLabel",this).call(this,t,n),o=document.createElement("i");return o.classList.add("form-icon"),i.classList.add("form-checkbox","pr-0"),i.insertBefore(o,i.firstChild),i}},{key:"getFormCheckboxControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-inline"),t}},{key:"getMultiCheckboxHolder",value:function(t,n,i,o){return Sa(Ta(e.prototype),"getMultiCheckboxHolder",this).call(this,t,n,i,o)}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in t)e.setAttribute(n,t[n]);return e}},{key:"getFormRadioLabel",value:function(t,n){var i=Sa(Ta(e.prototype),"getFormRadioLabel",this).call(this,t,n),o=document.createElement("i");return o.classList.add("form-icon"),i.classList.add("form-radio"),i.insertBefore(o,i.firstChild),i}},{key:"getFormRadioControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-inline"),t}},{key:"getFormInputField",value:function(t){var n=Sa(Ta(e.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||n.classList.add("form-input"),n}},{key:"getRangeInput",value:function(t,n,i,o,r){var s=Sa(Ta(e.prototype),"getRangeInput",this).call(this,t,n,i,o,r);return s.classList.add("slider"),s.classList.remove("form-input"),s.setAttribute("oninput",'this.setAttribute("value", this.value)'),s}},{key:"getRangeControl",value:function(t,n){var i=Sa(Ta(e.prototype),"getRangeControl",this).call(this,t,n);return i.classList.add("text-center"),i}},{key:"getSelectInput",value:function(t,n){var i=Sa(Ta(e.prototype),"getSelectInput",this).call(this,t);return i.classList.add("form-select"),i}},{key:"getTextareaInput",value:function(){var t=document.createElement("textarea");return t.classList.add("form-input"),t}},{key:"getFormControl",value:function(t,e,n,i,o){var r=document.createElement("div");return r.classList.add("form-group"),!t||"checkbox"!==e.type&&"radio"!==e.type?(t&&(t.classList.add("form-label"),r.appendChild(t),i&&t.appendChild(i)),r.appendChild(e)):(r.classList.add(e.type),i&&t.appendChild(i),t.insertBefore(e,t.firstChild),r.appendChild(t)),"small"===this.options.input_size?e.classList.add("input-sm","select-sm"):"large"===this.options.input_size&&e.classList.add("input-lg","select-lg"),"checkbox"!==e.type&&r.appendChild(e),n&&r.appendChild(n),"div"!==e.tagName.toLowerCase()&&e&&t&&o&&(t.setAttribute("for",o),e.setAttribute("id",o)),"div"!==e.tagName.toLowerCase()&&e&&n&&(n.setAttribute("id",o+"-description"),e.setAttribute("aria-describedby",o+"-description")),r}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("input-group"),n.appendChild(t);for(var i=0;i<e.length;i++)e[i].classList.add("input-group-btn"),e[i].classList.remove("btn-sm","mr-2","my-1"),n.appendChild(e[i]);return n}}},{key:"getInfoButton",value:function(t){var e=document.createElement("div");e.classList.add("popover","popover-left","float-right");var n=document.createElement("button");n.classList.add("btn","btn-secondary","btn-info","btn-action","s-circle"),n.setAttribute("tabindex","-1"),e.appendChild(n);var i=document.createTextNode("I");n.appendChild(i);var o=document.createElement("div");o.classList.add("popover-container"),e.appendChild(o);var r=document.createElement("div");r.classList.add("card"),o.appendChild(r);var s=document.createElement("div");return s.classList.add("card-body"),s.innerHTML=t,r.appendChild(s),e}},{key:"getTable",value:function(){var t=Sa(Ta(e.prototype),"getTable",this).call(this);return t.classList.add("table","table-scroll"),this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("table-striped"),t}},{key:"getProgressBar",value:function(){var t=Sa(Ta(e.prototype),"getProgressBar",this).call(this);return t.classList.add("progress"),t}},{key:"getTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.classList.add("columns"),n.innerHTML='<div class="column col-2"></div><div class="column col-10 content" id="'.concat(e,'"></div>'),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML='<ul class="tab"></ul><div class="content" id="'.concat(e,'"></div>'),n}},{key:"getTab",value:function(t,e){var n=document.createElement("a");return n.classList.add("btn","btn-secondary","btn-block"),n.setAttribute("href","#".concat(e)),n.appendChild(t),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.id=e,n.classList.add("tab-item");var i=document.createElement("a");return i.setAttribute("href","#".concat(e)),i.appendChild(t),n.appendChild(i),n}},{key:"markTabActive",value:function(t){t.tab.classList.add("active"),void 0!==t.rowPane?t.rowPane.style.display="":t.container.style.display=""}},{key:"markTabInactive",value:function(t){t.tab.classList.remove("active"),void 0!==t.rowPane?t.rowPane.style.display="none":t.container.style.display="none"}},{key:"afterInputReady",value:function(t){if("select"===t.localName)if(t.classList.contains("selectized")){var e=t.nextSibling;e&&(e.classList.remove("form-select"),Array.from(e.querySelectorAll(".form-select")).forEach((function(t){t.classList.remove("form-select")})))}else if(t.classList.contains("select2-hidden-accessible")){var n=t.nextSibling;n&&n.querySelector(".select2-selection--single")&&n.classList.add("form-select")}t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.errmsg||(t.errmsg=document.createElement("p"),t.errmsg.classList.add("form-input-hint"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.classList.remove("d-hide"),t.errmsg.textContent=e,t.errmsg.setAttribute("role","alert"))}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ea(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);function Ia(t){return Ia="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ia(t)}function za(t){var e=function(t){if("object"!=Ia(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Ia(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ia(e)?e:e+""}function Ma(t,e,n){return e=Fa(e),function(t,e){if(e&&("object"===Ia(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Na()?Reflect.construct(e,n||[],Fa(t).constructor):e.apply(t,n))}function Na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Na=function(){return!!t})()}function Da(){return Da="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=Fa(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},Da.apply(this,arguments)}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function Ha(t,e){return Ha=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ha(t,e)}Ba.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 Va={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},Za=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),Ma(this,e,[t,Va])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ha(t,e)}(e,t),n=e,(i=[{key:"getOptInSwitch",value:function(t){var e=this.getHiddenLabel(t+" opt-in");e.setAttribute("for",t+"-opt-in");var n=document.createElement("label");n.classList.add("switch");var i=document.createElement("input");i.setAttribute("type","checkbox"),i.setAttribute("id",t+"-opt-in"),i.classList.add("json-editor-opt-in");var o=document.createElement("span");o.classList.add("switch-slider","round");var r=document.createElement("span");return r.classList.add("sr-only"),r.textContent=t+"-opt-in",n.appendChild(r),n.appendChild(i),n.appendChild(o),{label:e,checkbox:i,container:n}}},{key:"getGridContainer",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col","w-full"),this.options.object_indent||t.classList.add("je-noindent"),t}},{key:"getGridRow",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-wrap","w-full"),t}},{key:"getGridColumn",value:function(){var t=document.createElement("div");return t.classList.add("flex","flex-col"),t}},{key:"setGridColumnSize",value:function(t,e,n){e>0&&e<12?t.classList.add("w-".concat(e,"/12"),"px-1"):t.classList.add("w-full","px-1"),n&&(t.style.marginLeft="".concat(100/12*n,"%"))}},{key:"getIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","p-1"):t.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&&t.classList.add("je-border"),t}},{key:"getTopIndentedPanel",value:function(){var t=document.createElement("div");return this.options.object_panel_default?t.classList.add("w-full","m-2"):t.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&&t.classList.add("je-border"),t}},{key:"getTitle",value:function(){return this.translateProperty(this.schema.title)}},{key:"getSelectInput",value:function(t,n){var i=Da(Fa(e.prototype),"getSelectInput",this).call(this,t);return n?i.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"):i.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&&i.classList.add("compact"),i}},{key:"afterInputReady",value:function(t){t.controlgroup||(t.controlgroup=this.closest(t,".form-group"),this.closest(t,".compact")&&(t.controlgroup.style.marginBottom=0))}},{key:"getTextareaInput",value:function(){var t=Da(Fa(e.prototype),"getTextareaInput",this).call(this);return t.classList.add("block","w-full","px-1","text-sm","leading-normal","bg-white","text-black","border","border-grey","rounded"),this.options.enable_compact&&t.classList.add("compact"),t.style.height=0,t}},{key:"getRangeInput",value:function(t,e,n){var i=this.getFormInputField("range");return i.classList.add("slider"),this.options.enable_compact&&i.classList.add("compact"),i.setAttribute("oninput",'this.setAttribute("value", this.value)'),i.setAttribute("min",t),i.setAttribute("max",e),i.setAttribute("step",n),i}},{key:"getRangeControl",value:function(t,n){var i=Da(Fa(e.prototype),"getRangeControl",this).call(this,t,n);return i.classList.add("text-center","text-black"),i}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,n){var i=Da(Fa(e.prototype),"getCheckboxLabel",this).call(this,t,n);return i.classList.add("inline-flex","items-center"),i}},{key:"getFormCheckboxControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("inline-flex flex-row"),t}},{key:"getMultiCheckboxHolder",value:function(t,n,i,o){var r=Da(Fa(e.prototype),"getMultiCheckboxHolder",this).call(this,t,n,i,o);return r.classList.add("inline-flex","flex-col"),r}},{key:"getFormRadio",value:function(t){var e=this.getFormInputField("radio");for(var n in e.classList.add("form-radio","text-red-600"),t)e.setAttribute(n,t[n]);return e}},{key:"getFormRadioLabel",value:function(t,n){var i=Da(Fa(e.prototype),"getFormRadioLabel",this).call(this,t,n);return i.classList.add("inline-flex","items-center","mr-2"),i}},{key:"getFormRadioControl",value:function(t,e,n){return t.insertBefore(e,t.firstChild),n&&t.classList.add("form-radio"),t}},{key:"getRadioHolder",value:function(t,n,i,o,r){var s=Da(Fa(e.prototype),"getRadioHolder",this).call(this,n,i,o,r);return"h"===t.options.layout?s.classList.add("inline-flex","flex-row"):s.classList.add("inline-flex","flex-col"),s}},{key:"getFormInputLabel",value:function(t,n){var i=Da(Fa(e.prototype),"getFormInputLabel",this).call(this,t,n);return this.options.label_bold?i.classList.add("font-bold"):i.classList.add("required"),i}},{key:"getFormInputField",value:function(t){var n=Da(Fa(e.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||n.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&n.classList.add("compact"),n}},{key:"getFormInputDescription",value:function(t){var e=document.createElement("p");return e.classList.add("block","mt-1","text-xs"),window.DOMPurify?e.innerHTML=window.DOMPurify.sanitize(t):e.textContent=this.cleanText(t),e}},{key:"getFormControl",value:function(t,e,n,i){var o=document.createElement("div");return o.classList.add("form-group","mb-1","w-full"),t&&(t.classList.add("text-xs"),"checkbox"===e.type&&(e.classList.add("form-checkbox","text-xs","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormCheckboxControl(t,e,!1,i)),"radio"===e.type&&(e.classList.add("form-radio","text-red-600","mr-1"),t.classList.add("items-center","flex"),t=this.getFormRadioControl(t,e,!1,i)),o.appendChild(t),!["checkbox","radio"].includes(e.type)&&i&&o.appendChild(i)),["checkbox","radio"].includes(e.type)||("small"===this.options.input_size?e.classList.add("text-xs"):"normal"===this.options.input_size?e.classList.add("text-base"):"large"===this.options.input_size&&e.classList.add("text-xl"),o.appendChild(e)),n&&o.appendChild(n),o}},{key:"getHeaderButtonHolder",value:function(){var t=this.getButtonHolder();return t.classList.add("text-sm"),t}},{key:"getButtonHolder",value:function(){var t=document.createElement("div");return t.classList.add("flex","relative","inline-flex","align-middle"),t}},{key:"getButton",value:function(t,n,i){var o=Da(Fa(e.prototype),"getButton",this).call(this,t,n,i);return o.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"),o}},{key:"getInfoButton",value:function(t){var e=document.createElement("a");e.classList.add("tooltips","float-right"),e.innerHTML="ⓘ";var n=document.createElement("span");return n.innerHTML=t,e.appendChild(n),e}},{key:"getTable",value:function(){var t=Da(Fa(e.prototype),"getTable",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):t.classList.add("table","border","p-0"),t}},{key:"getTableRow",value:function(){var t=Da(Fa(e.prototype),"getTableRow",this).call(this);return this.options.table_border&&t.classList.add("je-table-border"),this.options.table_zebrastyle&&t.classList.add("je-table-zebra"),t}},{key:"getTableHeaderCell",value:function(t){var n=Da(Fa(e.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?n.classList.add("je-table-border"):this.options.table_hdiv?n.classList.add("je-table-hdiv"):n.classList.add("text-xs","border","p-0","m-0"),n}},{key:"getTableCell",value:function(){var t=Da(Fa(e.prototype),"getTableCell",this).call(this);return this.options.table_border?t.classList.add("je-table-border"):this.options.table_hdiv?t.classList.add("je-table-hdiv"):t.classList.add("border-0","p-0","m-0"),t}},{key:"addInputError",value:function(t,e){t.controlgroup&&(t.controlgroup.classList.add("has-error"),t.controlgroup.classList.add("text-red-600"),t.errmsg?t.errmsg.style.display="":(t.errmsg=document.createElement("p"),t.errmsg.classList.add("block","mt-1","text-xs","text-red"),t.controlgroup.appendChild(t.errmsg)),t.errmsg.textContent=e)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.style.display="none",t.controlgroup.classList.remove("text-red-600"),t.controlgroup.classList.remove("has-error"))}},{key:"getTabHolder",value:function(t){var e=document.createElement("div"),n=void 0===t?"":t;return e.innerHTML="<div class='w-2/12' id='".concat(n,"'><ul class='list-reset pl-0 mb-0'></ul></div><div class='w-10/12' id='").concat(n,"'></div>"),e.classList.add("flex"),e}},{key:"addTab",value:function(t,e){t.children[0].children[0].appendChild(e)}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="<ul class='nav-tabs flex list-reset pl-0 mb-0 border-b border-grey-light' id='".concat(e,"'></ul><div class='p-6 block' id='").concat(e,"'></div>"),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.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 i=document.createElement("a");return i.classList.add("nav-link","text-center"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item","flex","border-l","border-t","border-r");var i=document.createElement("a");return i.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),i.setAttribute("href","#".concat(e)),i.setAttribute("data-toggle","tab"),i.appendChild(t),n.appendChild(i),n}},{key:"getTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"getTopTabContent",value:function(){var t=document.createElement("div");return t.setAttribute("role","tabpanel"),t}},{key:"markTabActive",value:function(t){t.tab.firstChild.classList.add("block"),!0===t.tab.firstChild.classList.contains("border-b")?(t.tab.firstChild.classList.add("border-b-0"),t.tab.firstChild.classList.remove("border-b")):t.tab.firstChild.classList.add("border-b-0"),!0===t.container.classList.contains("hidden")?(t.container.classList.remove("hidden"),t.container.classList.add("block")):t.container.classList.add("block")}},{key:"markTabInactive",value:function(t){!0===t.tab.firstChild.classList.contains("border-b-0")?(t.tab.firstChild.classList.add("border-b"),t.tab.firstChild.classList.remove("border-b-0")):t.tab.firstChild.classList.add("border-b"),!0===t.container.classList.contains("block")&&(t.container.classList.remove("block"),t.container.classList.add("hidden"))}},{key:"getProgressBar",value:function(){var t=document.createElement("div");t.classList.add("progress");var e=document.createElement("div");return e.classList.add("bg-blue","leading-none","py-1","text-xs","text-center","text-white"),e.setAttribute("role","progressbar"),e.setAttribute("aria-valuenow",0),e.setAttribute("aria-valuemin",0),e.setAttribute("aria-valuenax",100),e.innerHTML="".concat(0,"%"),t.appendChild(e),t}},{key:"updateProgressBar",value:function(t,e){if(t){var n=t.firstChild,i="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=i,n.innerHTML=i}}},{key:"updateProgressBarUnknown",value:function(t){if(t){var e=t.firstChild;t.classList.add("progress","bg-blue","leading-none","py-1","text-xs","text-center","text-white","block"),e.removeAttribute("aria-valuenow"),e.classList.add("w-full"),e.innerHTML=""}}},{key:"getInputGroup",value:function(t,e){if(t){var n=document.createElement("div");n.classList.add("relative","items-stretch","w-full"),n.appendChild(t);var i=document.createElement("div");i.classList.add("-mr-1"),n.appendChild(i);for(var o=0;o<e.length;o++)i.appendChild(e[o]);return n}}}])&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,za(i.key),i)}}(n.prototype,i),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,i}(Ss);Za.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 qa={html:Ns,bootstrap3:Ws,bootstrap4:ea,bootstrap5:ua,jqueryui:ba,barebones:ja,spectre:Ba,tailwind:Za};const Ua={".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 Wa(t){return Wa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wa(t)}function Ga(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function Ja(){Ja=function(){return e};var t,e={},n=Object.prototype,i=n.hasOwnProperty,o=Object.defineProperty||function(t,e,n){t[e]=n.value},r="function"==typeof Symbol?Symbol:{},s=r.iterator||"@@iterator",a=r.asyncIterator||"@@asyncIterator",l=r.toStringTag||"@@toStringTag";function c(t,e,n){return Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{c({},"")}catch(t){c=function(t,e,n){return t[e]=n}}function u(t,e,n,i){var r=e&&e.prototype instanceof v?e:v,s=Object.create(r.prototype),a=new S(i||[]);return o(s,"_invoke",{value:C(t,n,a)}),s}function h(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}e.wrap=u;var d="suspendedStart",p="suspendedYield",f="executing",m="completed",y={};function v(){}function b(){}function g(){}var _={};c(_,s,(function(){return this}));var w=Object.getPrototypeOf,x=w&&w(w(T([])));x&&x!==n&&i.call(x,s)&&(_=x);var k=g.prototype=v.prototype=Object.create(_);function O(t){["next","throw","return"].forEach((function(e){c(t,e,(function(t){return this._invoke(e,t)}))}))}function j(t,e){function n(o,r,s,a){var l=h(t[o],t,r);if("throw"!==l.type){var c=l.arg,u=c.value;return u&&"object"==Wa(u)&&i.call(u,"__await")?e.resolve(u.__await).then((function(t){n("next",t,s,a)}),(function(t){n("throw",t,s,a)})):e.resolve(u).then((function(t){c.value=t,s(c)}),(function(t){return n("throw",t,s,a)}))}a(l.arg)}var r;o(this,"_invoke",{value:function(t,i){function o(){return new e((function(e,o){n(t,i,e,o)}))}return r=r?r.then(o,o):o()}})}function C(e,n,i){var o=d;return function(r,s){if(o===f)throw Error("Generator is already running");if(o===m){if("throw"===r)throw s;return{value:t,done:!0}}for(i.method=r,i.arg=s;;){var a=i.delegate;if(a){var l=E(a,i);if(l){if(l===y)continue;return l}}if("next"===i.method)i.sent=i._sent=i.arg;else if("throw"===i.method){if(o===d)throw o=m,i.arg;i.dispatchException(i.arg)}else"return"===i.method&&i.abrupt("return",i.arg);o=f;var c=h(e,n,i);if("normal"===c.type){if(o=i.done?m:p,c.arg===y)continue;return{value:c.arg,done:i.done}}"throw"===c.type&&(o=m,i.method="throw",i.arg=c.arg)}}}function E(e,n){var i=n.method,o=e.iterator[i];if(o===t)return n.delegate=null,"throw"===i&&e.iterator.return&&(n.method="return",n.arg=t,E(e,n),"throw"===n.method)||"return"!==i&&(n.method="throw",n.arg=new TypeError("The iterator does not provide a '"+i+"' method")),y;var r=h(o,e.iterator,n.arg);if("throw"===r.type)return n.method="throw",n.arg=r.arg,n.delegate=null,y;var s=r.arg;return s?s.done?(n[e.resultName]=s.value,n.next=e.nextLoc,"return"!==n.method&&(n.method="next",n.arg=t),n.delegate=null,y):s:(n.method="throw",n.arg=new TypeError("iterator result is not an object"),n.delegate=null,y)}function P(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function S(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(P,this),this.reset(!0)}function T(e){if(e||""===e){var n=e[s];if(n)return n.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,r=function n(){for(;++o<e.length;)if(i.call(e,o))return n.value=e[o],n.done=!1,n;return n.value=t,n.done=!0,n};return r.next=r}}throw new TypeError(Wa(e)+" is not iterable")}return b.prototype=g,o(k,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:b,configurable:!0}),b.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===b||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,c(t,l,"GeneratorFunction")),t.prototype=Object.create(k),t},e.awrap=function(t){return{__await:t}},O(j.prototype),c(j.prototype,a,(function(){return this})),e.AsyncIterator=j,e.async=function(t,n,i,o,r){void 0===r&&(r=Promise);var s=new j(u(t,n,i,o),r);return e.isGeneratorFunction(n)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},O(k),c(k,l,"Generator"),c(k,s,(function(){return this})),c(k,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),n=[];for(var i in e)n.push(i);return n.reverse(),function t(){for(;n.length;){var i=n.pop();if(i in e)return t.value=i,t.done=!1,t}return t.done=!0,t}},e.values=T,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var n in this)"t"===n.charAt(0)&&i.call(this,n)&&!isNaN(+n.slice(1))&&(this[n]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var n=this;function o(i,o){return a.type="throw",a.arg=e,n.next=i,o&&(n.method="next",n.arg=t),!!o}for(var r=this.tryEntries.length-1;r>=0;--r){var s=this.tryEntries[r],a=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var l=i.call(s,"catchLoc"),c=i.call(s,"finallyLoc");if(l&&c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!c)throw Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var o=this.tryEntries[n];if(o.tryLoc<=this.prev&&i.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var r=o;break}}r&&("break"===t||"continue"===t)&&r.tryLoc<=e&&e<=r.finallyLoc&&(r=null);var s=r?r.completion:{};return s.type=t,s.arg=e,r?(this.method="next",this.next=r.finallyLoc,y):this.complete(s)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),y},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),L(n),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var i=n.completion;if("throw"===i.type){var o=i.arg;L(n)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,n,i){return this.delegate={iterator:T(e),resultName:n,nextLoc:i},"next"===this.method&&(this.arg=t),y}},e}function $a(t,e,n,i,o,r,s){try{var a=t[r](s),l=a.value}catch(t){return void n(t)}a.done?e(l):Promise.resolve(l).then(i,o)}function Ya(t){var e=function(t){if("object"!=Wa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var n=e.call(t,"string");if("object"!=Wa(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wa(e)?e:e+""}var Ka=function(){function t(e){var n=this,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),!(e instanceof Element))throw new Error("element should be an instance of Element");this.element=e,this.options=l({},t.defaults.options,i),this.ready=!1,this.copyClipboard=null,this.schema=this.options.schema,this.template=this.options.template,this.translate=this.options.translate||t.defaults.translate,this.translateProperty=this.options.translateProperty||t.defaults.translateProperty,this.uuid=0,this.__data={};var o=this.options.theme||t.defaults.theme,r=t.defaults.themes[o];if(!r)throw new Error("Unknown theme ".concat(o));this.element.setAttribute("data-theme",o),this.element.classList.add("je-not-loaded"),this.element.classList.remove("je-ready"),this.theme=new r(this);var s=l(Ua,this.getEditorsRules()),a=function(t,e,i){return i?n.addNewStyleRulesToShadowRoot(t,e,i):n.addNewStyleRules(t,e)};if(!this.theme.options.disable_theme_rules){var c=u(this.element);a("default",s,c),void 0!==r.rules&&a(o,r.rules,c)}var h=t.defaults.iconlibs[this.options.iconlib||t.defaults.iconlib];h&&(this.iconlib=new h),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container),this.promise=this.load()}return e=t,n=[{key:"load",value:(i=Ja().mark((function e(){var n,i,o,r,s,a,l=this;return Ja().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return n=document.location.origin+document.location.pathname.toString(),(i=new br(this.options)).onSchemaLoaded=function(t){l.trigger("schemaLoaded",t)},i.onAllSchemasLoaded=function(){l.trigger("allSchemasLoaded")},this.expandSchema=function(t){return i.expandSchema(t)},this.expandRefs=function(t,e){return i.expandRefs(t,e)},o=document.location.toString(),e.next=9,i.load(this.schema,n,o);case 9:r=e.sent,s=this.options.custom_validators?{custom_validators:this.options.custom_validators}:{},this.validator=new Un(this,null,s,t.defaults),a=this.getEditorClass(r),this.root=this.createEditor(a,{jsoneditor:this,schema:r,required:!0,container:this.root_container}),this.root.preBuild(),this.root.build(),this.root.postBuild(),h(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(){l.ready&&(l.validation_results=l.validator.validate(l.root.getValue()),l.root.showValidationErrors(l.validation_results),l.trigger("ready"),l.trigger("change"))}));case 24:case"end":return e.stop()}}),e,this)})),o=function(){var t=this,e=arguments;return new Promise((function(n,o){var r=i.apply(t,e);function s(t){$a(r,n,o,s,a,"next",t)}function a(t){$a(r,n,o,s,a,"throw",t)}s(void 0)}))},function(){return o.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 1===arguments.length?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,e){return this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[],this.callbacks[t].push(e),this}},{key:"off",value:function(t,e){if(t&&e){this.callbacks=this.callbacks||{},this.callbacks[t]=this.callbacks[t]||[];for(var n=[],i=0;i<this.callbacks[t].length;i++)this.callbacks[t][i]!==e&&n.push(this.callbacks[t][i]);this.callbacks[t]=n}else t?(this.callbacks=this.callbacks||{},this.callbacks[t]=[]):this.callbacks={};return this}},{key:"trigger",value:function(t,e){if(this.callbacks&&this.callbacks[t]&&this.callbacks[t].length)for(var n=0;n<this.callbacks[t].length;n++)this.callbacks[t][n].apply(this,[e]);return this}},{key:"setOption",value:function(t,e){if("show_errors"!==t)throw new Error("Option ".concat(t," must be set during instantiation and cannot be changed later"));return this.options.show_errors=e,this.onChange(),this}},{key:"getEditorsRules",value:function(){return Object.values(t.defaults.editors).reduce((function(t,e){return e.rules?l(t,e.rules):t}),{})}},{key:"getEditorClass",value:function(e){var n,i=this;if(e=this.expandSchema(e),t.defaults.resolvers.find((function(o){return(n=o(e,i))&&t.defaults.editors[n]})),!n)throw new Error("Unknown editor for schema ".concat(JSON.stringify(e)));if(!t.defaults.editors[n])throw new Error("Unknown editor ".concat(n));return t.defaults.editors[n]}},{key:"createEditor",value:function(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1;return new e(n=l({},e.options||{},n),t.defaults,i)}},{key:"onChange",value:function(t){var e=this;if(this.ready&&(t&&this.trigger(t.event,t.data),!this.firing_change))return this.firing_change=!0,window.requestAnimationFrame((function(){e.firing_change=!1,e.ready&&(e.validation_results=e.validator.validate(e.root.getValue()),"never"!==e.options.show_errors?e.root.showValidationErrors(e.validation_results):e.root.showValidationErrors([]),e.trigger("change"))})),this}},{key:"compileTemplate",value:function(e){var n,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaults.template;if("string"==typeof i){if(!t.defaults.templates[i])throw new Error("Unknown template engine ".concat(i));if(!(n=t.defaults.templates[i]()))throw new Error("Template engine ".concat(i," missing required library."))}else n=i;if(!n)throw new Error("No template engine set");if(!n.compile)throw new Error("Invalid template engine set");return n.compile(e)}},{key:"_data",value:function(t,e,n){if(3!==arguments.length)return t.hasAttribute("data-jsoneditor-".concat(e))?this.__data[t.getAttribute("data-jsoneditor-".concat(e))]:null;var i;t.hasAttribute("data-jsoneditor-".concat(e))?i=t.getAttribute("data-jsoneditor-".concat(e)):(i=this.uuid++,t.setAttribute("data-jsoneditor-".concat(e),i)),this.__data[i]=n}},{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,e){return this.watchlist=this.watchlist||{},this.watchlist[t]=this.watchlist[t]||[],this.watchlist[t].push(e),this}},{key:"unwatch",value:function(t,e){if(!this.watchlist||!this.watchlist[t])return this;if(!e)return this.watchlist[t]=null,this;for(var n=[],i=0;i<this.watchlist[t].length;i++)this.watchlist[t][i]!==e&&n.push(this.watchlist[t][i]);return this.watchlist[t]=n.length?n:null,this}},{key:"notifyWatchers",value:function(t){if(!this.watchlist||!this.watchlist[t])return this;for(var e=0;e<this.watchlist[t].length;e++)this.watchlist[t][e]()}},{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,e){var n=document.querySelector("#theme-".concat(t));n||((n=document.createElement("style")).setAttribute("id","theme-".concat(t)),n.appendChild(document.createTextNode("")),document.head.appendChild(n));for(var i=n.sheet?n.sheet:n.styleSheet,o=this.element.nodeName.toLowerCase();i.cssRules.length>0;)i.deleteRule(0);Object.keys(e).forEach((function(n){var r="default"===t?n:"".concat(o,'[data-theme="').concat(t,'"] ').concat(n);i.insertRule?i.insertRule(r+" {"+decodeURIComponent(e[n])+"}",0):i.addRule&&i.addRule(r,decodeURIComponent(e[n]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,e,n){var i=this.element.nodeName.toLowerCase(),o="";Object.keys(e).forEach((function(n){var r="default"===t?n:"".concat(i,'[data-theme="').concat(t,'"] ').concat(n);o+=r+" {"+decodeURIComponent(e[n])+"}\n"}));var r,s=new CSSStyleSheet;s.replaceSync(o),n.adoptedStyleSheets=[].concat(function(t){if(Array.isArray(t))return Ga(t)}(r=n.adoptedStyleSheets)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return Ga(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Ga(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}(),[s])}},{key:"showValidationErrors",value:function(t){var e=null!=t?t:this.validate();Object.values(this.editors).forEach((function(t){t&&(t.is_dirty=!0,t.showValidationErrors(e))}))}}],n&&function(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Ya(i.key),i)}}(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n,i,o}();Ka.defaults=ur,Ka.AbstractEditor=_,Ka.AbstractTheme=Ss,Ka.AbstractIconLib=Or,Object.assign(Ka.defaults.themes,qa),Object.assign(Ka.defaults.editors,rr),Object.assign(Ka.defaults.templates,gr),Object.assign(Ka.defaults.iconlibs,Cs)})(),i})(),t.exports=e()},861:(t,e,n)=>{n.d(e,{A:()=>a});var i=n(601),o=n.n(i),r=n(314),s=n.n(r)()(o());s.push([t.id,".drawflow,.drawflow .parent-node{position:relative}.parent-drawflow{display:flex;overflow:hidden;touch-action:none;outline:0}.drawflow{width:100%;height:100%;user-select:none;perspective:0}.drawflow .drawflow-node{display:flex;align-items:center;position:absolute;background:#0ff;width:160px;min-height:40px;border-radius:4px;border:2px solid #000;color:#000;z-index:2;padding:15px}.drawflow .drawflow-node.selected{background:red}.drawflow .drawflow-node:hover{cursor:move}.drawflow .drawflow-node .inputs,.drawflow .drawflow-node .outputs{width:0}.drawflow .drawflow-node .drawflow_content_node{width:100%;display:block}.drawflow .drawflow-node .input,.drawflow .drawflow-node .output{position:relative;width:20px;height:20px;background:#fff;border-radius:50%;border:2px solid #000;cursor:crosshair;z-index:1;margin-bottom:5px}.drawflow .drawflow-node .input{left:-27px;top:2px;background:#ff0}.drawflow .drawflow-node .output{right:-3px;top:2px}.drawflow svg{z-index:0;position:absolute;overflow:visible!important}.drawflow .connection{position:absolute;pointer-events:none;aspect-ratio:1/1}.drawflow .connection .main-path{fill:none;stroke-width:5px;stroke:#4682b4;pointer-events:all}.drawflow .connection .main-path:hover{stroke:#1266ab;cursor:pointer}.drawflow .connection .main-path.selected{stroke:#43b993}.drawflow .connection .point{cursor:move;stroke:#000;stroke-width:2;fill:#fff;pointer-events:all}.drawflow .connection .point.selected,.drawflow .connection .point:hover{fill:#1266ab}.drawflow .main-path{fill:none;stroke-width:5px;stroke:#4682b4}.drawflow-delete{position:absolute;display:block;width:30px;height:30px;background:#000;color:#fff;z-index:4;border:2px solid #fff;line-height:30px;font-weight:700;text-align:center;border-radius:50%;font-family:monospace;cursor:pointer}.drawflow>.drawflow-delete{margin-left:-15px;margin-top:15px}.parent-node .drawflow-delete{right:-15px;top:-15px}",""]);const a=s},81:(t,e,n)=>{n.d(e,{A:()=>y});var i=n(601),o=n.n(i),r=n(314),s=n.n(r),a=n(417),l=n.n(a),c=new URL(n(982),n.b),u=new URL(n(426),n.b),h=new URL(n(927),n.b),d=s()(o()),p=l()(c),f=l()(u),m=l()(h);d.push([t.id,`/* required styles */\n\n.leaflet-pane,\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-tile-container,\n.leaflet-pane > svg,\n.leaflet-pane > canvas,\n.leaflet-zoom-box,\n.leaflet-image-layer,\n.leaflet-layer {\n\tposition: absolute;\n\tleft: 0;\n\ttop: 0;\n\t}\n.leaflet-container {\n\toverflow: hidden;\n\t}\n.leaflet-tile,\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\t-webkit-user-select: none;\n\t -moz-user-select: none;\n\t user-select: none;\n\t -webkit-user-drag: none;\n\t}\n/* Prevents IE11 from highlighting tiles in blue */\n.leaflet-tile::selection {\n\tbackground: transparent;\n}\n/* Safari renders non-retina tile on retina better with this, but Chrome is worse */\n.leaflet-safari .leaflet-tile {\n\timage-rendering: -webkit-optimize-contrast;\n\t}\n/* hack that prevents hw layers "stretching" when loading new tiles */\n.leaflet-safari .leaflet-tile-container {\n\twidth: 1600px;\n\theight: 1600px;\n\t-webkit-transform-origin: 0 0;\n\t}\n.leaflet-marker-icon,\n.leaflet-marker-shadow {\n\tdisplay: block;\n\t}\n/* .leaflet-container svg: reset svg max-width decleration shipped in Joomla! (joomla.org) 3.x */\n/* .leaflet-container img: map is broken in FF if you have max-width: 100% on tiles */\n.leaflet-container .leaflet-overlay-pane svg {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\t}\n.leaflet-container .leaflet-marker-pane img,\n.leaflet-container .leaflet-shadow-pane img,\n.leaflet-container .leaflet-tile-pane img,\n.leaflet-container img.leaflet-image-layer,\n.leaflet-container .leaflet-tile {\n\tmax-width: none !important;\n\tmax-height: none !important;\n\twidth: auto;\n\tpadding: 0;\n\t}\n\n.leaflet-container img.leaflet-tile {\n\t/* See: https://bugs.chromium.org/p/chromium/issues/detail?id=600120 */\n\tmix-blend-mode: plus-lighter;\n}\n\n.leaflet-container.leaflet-touch-zoom {\n\t-ms-touch-action: pan-x pan-y;\n\ttouch-action: pan-x pan-y;\n\t}\n.leaflet-container.leaflet-touch-drag {\n\t-ms-touch-action: pinch-zoom;\n\t/* Fallback for FF which doesn't support pinch-zoom */\n\ttouch-action: none;\n\ttouch-action: pinch-zoom;\n}\n.leaflet-container.leaflet-touch-drag.leaflet-touch-zoom {\n\t-ms-touch-action: none;\n\ttouch-action: none;\n}\n.leaflet-container {\n\t-webkit-tap-highlight-color: transparent;\n}\n.leaflet-container a {\n\t-webkit-tap-highlight-color: rgba(51, 181, 229, 0.4);\n}\n.leaflet-tile {\n\tfilter: inherit;\n\tvisibility: hidden;\n\t}\n.leaflet-tile-loaded {\n\tvisibility: inherit;\n\t}\n.leaflet-zoom-box {\n\twidth: 0;\n\theight: 0;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tz-index: 800;\n\t}\n/* workaround for https://bugzilla.mozilla.org/show_bug.cgi?id=888319 */\n.leaflet-overlay-pane svg {\n\t-moz-user-select: none;\n\t}\n\n.leaflet-pane { z-index: 400; }\n\n.leaflet-tile-pane { z-index: 200; }\n.leaflet-overlay-pane { z-index: 400; }\n.leaflet-shadow-pane { z-index: 500; }\n.leaflet-marker-pane { z-index: 600; }\n.leaflet-tooltip-pane { z-index: 650; }\n.leaflet-popup-pane { z-index: 700; }\n\n.leaflet-map-pane canvas { z-index: 100; }\n.leaflet-map-pane svg { z-index: 200; }\n\n.leaflet-vml-shape {\n\twidth: 1px;\n\theight: 1px;\n\t}\n.lvml {\n\tbehavior: url(#default#VML);\n\tdisplay: inline-block;\n\tposition: absolute;\n\t}\n\n\n/* control positioning */\n\n.leaflet-control {\n\tposition: relative;\n\tz-index: 800;\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n.leaflet-top,\n.leaflet-bottom {\n\tposition: absolute;\n\tz-index: 1000;\n\tpointer-events: none;\n\t}\n.leaflet-top {\n\ttop: 0;\n\t}\n.leaflet-right {\n\tright: 0;\n\t}\n.leaflet-bottom {\n\tbottom: 0;\n\t}\n.leaflet-left {\n\tleft: 0;\n\t}\n.leaflet-control {\n\tfloat: left;\n\tclear: both;\n\t}\n.leaflet-right .leaflet-control {\n\tfloat: right;\n\t}\n.leaflet-top .leaflet-control {\n\tmargin-top: 10px;\n\t}\n.leaflet-bottom .leaflet-control {\n\tmargin-bottom: 10px;\n\t}\n.leaflet-left .leaflet-control {\n\tmargin-left: 10px;\n\t}\n.leaflet-right .leaflet-control {\n\tmargin-right: 10px;\n\t}\n\n\n/* zoom and fade animations */\n\n.leaflet-fade-anim .leaflet-popup {\n\topacity: 0;\n\t-webkit-transition: opacity 0.2s linear;\n\t -moz-transition: opacity 0.2s linear;\n\t transition: opacity 0.2s linear;\n\t}\n.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {\n\topacity: 1;\n\t}\n.leaflet-zoom-animated {\n\t-webkit-transform-origin: 0 0;\n\t -ms-transform-origin: 0 0;\n\t transform-origin: 0 0;\n\t}\nsvg.leaflet-zoom-animated {\n\twill-change: transform;\n}\n\n.leaflet-zoom-anim .leaflet-zoom-animated {\n\t-webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);\n\t transition: transform 0.25s cubic-bezier(0,0,0.25,1);\n\t}\n.leaflet-zoom-anim .leaflet-tile,\n.leaflet-pan-anim .leaflet-tile {\n\t-webkit-transition: none;\n\t -moz-transition: none;\n\t transition: none;\n\t}\n\n.leaflet-zoom-anim .leaflet-zoom-hide {\n\tvisibility: hidden;\n\t}\n\n\n/* cursors */\n\n.leaflet-interactive {\n\tcursor: pointer;\n\t}\n.leaflet-grab {\n\tcursor: -webkit-grab;\n\tcursor: -moz-grab;\n\tcursor: grab;\n\t}\n.leaflet-crosshair,\n.leaflet-crosshair .leaflet-interactive {\n\tcursor: crosshair;\n\t}\n.leaflet-popup-pane,\n.leaflet-control {\n\tcursor: auto;\n\t}\n.leaflet-dragging .leaflet-grab,\n.leaflet-dragging .leaflet-grab .leaflet-interactive,\n.leaflet-dragging .leaflet-marker-draggable {\n\tcursor: move;\n\tcursor: -webkit-grabbing;\n\tcursor: -moz-grabbing;\n\tcursor: grabbing;\n\t}\n\n/* marker & overlays interactivity */\n.leaflet-marker-icon,\n.leaflet-marker-shadow,\n.leaflet-image-layer,\n.leaflet-pane > svg path,\n.leaflet-tile-container {\n\tpointer-events: none;\n\t}\n\n.leaflet-marker-icon.leaflet-interactive,\n.leaflet-image-layer.leaflet-interactive,\n.leaflet-pane > svg path.leaflet-interactive,\nsvg.leaflet-image-layer.leaflet-interactive path {\n\tpointer-events: visiblePainted; /* IE 9-10 doesn't have auto */\n\tpointer-events: auto;\n\t}\n\n/* visual tweaks */\n\n.leaflet-container {\n\tbackground: #ddd;\n\toutline-offset: 1px;\n\t}\n.leaflet-container a {\n\tcolor: #0078A8;\n\t}\n.leaflet-zoom-box {\n\tborder: 2px dotted #38f;\n\tbackground: rgba(255,255,255,0.5);\n\t}\n\n\n/* general typography */\n.leaflet-container {\n\tfont-family: "Helvetica Neue", Arial, Helvetica, sans-serif;\n\tfont-size: 12px;\n\tfont-size: 0.75rem;\n\tline-height: 1.5;\n\t}\n\n\n/* general toolbar styles */\n\n.leaflet-bar {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.65);\n\tborder-radius: 4px;\n\t}\n.leaflet-bar a {\n\tbackground-color: #fff;\n\tborder-bottom: 1px solid #ccc;\n\twidth: 26px;\n\theight: 26px;\n\tline-height: 26px;\n\tdisplay: block;\n\ttext-align: center;\n\ttext-decoration: none;\n\tcolor: black;\n\t}\n.leaflet-bar a,\n.leaflet-control-layers-toggle {\n\tbackground-position: 50% 50%;\n\tbackground-repeat: no-repeat;\n\tdisplay: block;\n\t}\n.leaflet-bar a:hover,\n.leaflet-bar a:focus {\n\tbackground-color: #f4f4f4;\n\t}\n.leaflet-bar a:first-child {\n\tborder-top-left-radius: 4px;\n\tborder-top-right-radius: 4px;\n\t}\n.leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 4px;\n\tborder-bottom-right-radius: 4px;\n\tborder-bottom: none;\n\t}\n.leaflet-bar a.leaflet-disabled {\n\tcursor: default;\n\tbackground-color: #f4f4f4;\n\tcolor: #bbb;\n\t}\n\n.leaflet-touch .leaflet-bar a {\n\twidth: 30px;\n\theight: 30px;\n\tline-height: 30px;\n\t}\n.leaflet-touch .leaflet-bar a:first-child {\n\tborder-top-left-radius: 2px;\n\tborder-top-right-radius: 2px;\n\t}\n.leaflet-touch .leaflet-bar a:last-child {\n\tborder-bottom-left-radius: 2px;\n\tborder-bottom-right-radius: 2px;\n\t}\n\n/* zoom control */\n\n.leaflet-control-zoom-in,\n.leaflet-control-zoom-out {\n\tfont: bold 18px 'Lucida Console', Monaco, monospace;\n\ttext-indent: 1px;\n\t}\n\n.leaflet-touch .leaflet-control-zoom-in, .leaflet-touch .leaflet-control-zoom-out {\n\tfont-size: 22px;\n\t}\n\n\n/* layers control */\n\n.leaflet-control-layers {\n\tbox-shadow: 0 1px 5px rgba(0,0,0,0.4);\n\tbackground: #fff;\n\tborder-radius: 5px;\n\t}\n.leaflet-control-layers-toggle {\n\tbackground-image: url(${p});\n\twidth: 36px;\n\theight: 36px;\n\t}\n.leaflet-retina .leaflet-control-layers-toggle {\n\tbackground-image: url(${f});\n\tbackground-size: 26px 26px;\n\t}\n.leaflet-touch .leaflet-control-layers-toggle {\n\twidth: 44px;\n\theight: 44px;\n\t}\n.leaflet-control-layers .leaflet-control-layers-list,\n.leaflet-control-layers-expanded .leaflet-control-layers-toggle {\n\tdisplay: none;\n\t}\n.leaflet-control-layers-expanded .leaflet-control-layers-list {\n\tdisplay: block;\n\tposition: relative;\n\t}\n.leaflet-control-layers-expanded {\n\tpadding: 6px 10px 6px 6px;\n\tcolor: #333;\n\tbackground: #fff;\n\t}\n.leaflet-control-layers-scrollbar {\n\toverflow-y: scroll;\n\toverflow-x: hidden;\n\tpadding-right: 5px;\n\t}\n.leaflet-control-layers-selector {\n\tmargin-top: 2px;\n\tposition: relative;\n\ttop: 1px;\n\t}\n.leaflet-control-layers label {\n\tdisplay: block;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\t}\n.leaflet-control-layers-separator {\n\theight: 0;\n\tborder-top: 1px solid #ddd;\n\tmargin: 5px -10px 5px -6px;\n\t}\n\n/* Default icon URLs */\n.leaflet-default-icon-path { /* used only in path-guessing heuristic, see L.Icon.Default */\n\tbackground-image: url(${m});\n\t}\n\n\n/* attribution and scale controls */\n\n.leaflet-container .leaflet-control-attribution {\n\tbackground: #fff;\n\tbackground: rgba(255, 255, 255, 0.8);\n\tmargin: 0;\n\t}\n.leaflet-control-attribution,\n.leaflet-control-scale-line {\n\tpadding: 0 5px;\n\tcolor: #333;\n\tline-height: 1.4;\n\t}\n.leaflet-control-attribution a {\n\ttext-decoration: none;\n\t}\n.leaflet-control-attribution a:hover,\n.leaflet-control-attribution a:focus {\n\ttext-decoration: underline;\n\t}\n.leaflet-attribution-flag {\n\tdisplay: inline !important;\n\tvertical-align: baseline !important;\n\twidth: 1em;\n\theight: 0.6669em;\n\t}\n.leaflet-left .leaflet-control-scale {\n\tmargin-left: 5px;\n\t}\n.leaflet-bottom .leaflet-control-scale {\n\tmargin-bottom: 5px;\n\t}\n.leaflet-control-scale-line {\n\tborder: 2px solid #777;\n\tborder-top: none;\n\tline-height: 1.1;\n\tpadding: 2px 5px 1px;\n\twhite-space: nowrap;\n\t-moz-box-sizing: border-box;\n\t box-sizing: border-box;\n\tbackground: rgba(255, 255, 255, 0.8);\n\ttext-shadow: 1px 1px #fff;\n\t}\n.leaflet-control-scale-line:not(:first-child) {\n\tborder-top: 2px solid #777;\n\tborder-bottom: none;\n\tmargin-top: -2px;\n\t}\n.leaflet-control-scale-line:not(:first-child):not(:last-child) {\n\tborder-bottom: 2px solid #777;\n\t}\n\n.leaflet-touch .leaflet-control-attribution,\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tbox-shadow: none;\n\t}\n.leaflet-touch .leaflet-control-layers,\n.leaflet-touch .leaflet-bar {\n\tborder: 2px solid rgba(0,0,0,0.2);\n\tbackground-clip: padding-box;\n\t}\n\n\n/* popup */\n\n.leaflet-popup {\n\tposition: absolute;\n\ttext-align: center;\n\tmargin-bottom: 20px;\n\t}\n.leaflet-popup-content-wrapper {\n\tpadding: 1px;\n\ttext-align: left;\n\tborder-radius: 12px;\n\t}\n.leaflet-popup-content {\n\tmargin: 13px 24px 13px 20px;\n\tline-height: 1.3;\n\tfont-size: 13px;\n\tfont-size: 1.08333em;\n\tmin-height: 1px;\n\t}\n.leaflet-popup-content p {\n\tmargin: 17px 0;\n\tmargin: 1.3em 0;\n\t}\n.leaflet-popup-tip-container {\n\twidth: 40px;\n\theight: 20px;\n\tposition: absolute;\n\tleft: 50%;\n\tmargin-top: -1px;\n\tmargin-left: -20px;\n\toverflow: hidden;\n\tpointer-events: none;\n\t}\n.leaflet-popup-tip {\n\twidth: 17px;\n\theight: 17px;\n\tpadding: 1px;\n\n\tmargin: -10px auto 0;\n\tpointer-events: auto;\n\n\t-webkit-transform: rotate(45deg);\n\t -moz-transform: rotate(45deg);\n\t -ms-transform: rotate(45deg);\n\t transform: rotate(45deg);\n\t}\n.leaflet-popup-content-wrapper,\n.leaflet-popup-tip {\n\tbackground: white;\n\tcolor: #333;\n\tbox-shadow: 0 3px 14px rgba(0,0,0,0.4);\n\t}\n.leaflet-container a.leaflet-popup-close-button {\n\tposition: absolute;\n\ttop: 0;\n\tright: 0;\n\tborder: none;\n\ttext-align: center;\n\twidth: 24px;\n\theight: 24px;\n\tfont: 16px/24px Tahoma, Verdana, sans-serif;\n\tcolor: #757575;\n\ttext-decoration: none;\n\tbackground: transparent;\n\t}\n.leaflet-container a.leaflet-popup-close-button:hover,\n.leaflet-container a.leaflet-popup-close-button:focus {\n\tcolor: #585858;\n\t}\n.leaflet-popup-scrolled {\n\toverflow: auto;\n\t}\n\n.leaflet-oldie .leaflet-popup-content-wrapper {\n\t-ms-zoom: 1;\n\t}\n.leaflet-oldie .leaflet-popup-tip {\n\twidth: 24px;\n\tmargin: 0 auto;\n\n\t-ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";\n\tfilter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);\n\t}\n\n.leaflet-oldie .leaflet-control-zoom,\n.leaflet-oldie .leaflet-control-layers,\n.leaflet-oldie .leaflet-popup-content-wrapper,\n.leaflet-oldie .leaflet-popup-tip {\n\tborder: 1px solid #999;\n\t}\n\n\n/* div icon */\n\n.leaflet-div-icon {\n\tbackground: #fff;\n\tborder: 1px solid #666;\n\t}\n\n\n/* Tooltip */\n/* Base styles for the element that has a tooltip */\n.leaflet-tooltip {\n\tposition: absolute;\n\tpadding: 6px;\n\tbackground-color: #fff;\n\tborder: 1px solid #fff;\n\tborder-radius: 3px;\n\tcolor: #222;\n\twhite-space: nowrap;\n\t-webkit-user-select: none;\n\t-moz-user-select: none;\n\t-ms-user-select: none;\n\tuser-select: none;\n\tpointer-events: none;\n\tbox-shadow: 0 1px 3px rgba(0,0,0,0.4);\n\t}\n.leaflet-tooltip.leaflet-interactive {\n\tcursor: pointer;\n\tpointer-events: auto;\n\t}\n.leaflet-tooltip-top:before,\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\tposition: absolute;\n\tpointer-events: none;\n\tborder: 6px solid transparent;\n\tbackground: transparent;\n\tcontent: "";\n\t}\n\n/* Directions */\n\n.leaflet-tooltip-bottom {\n\tmargin-top: 6px;\n}\n.leaflet-tooltip-top {\n\tmargin-top: -6px;\n}\n.leaflet-tooltip-bottom:before,\n.leaflet-tooltip-top:before {\n\tleft: 50%;\n\tmargin-left: -6px;\n\t}\n.leaflet-tooltip-top:before {\n\tbottom: 0;\n\tmargin-bottom: -12px;\n\tborder-top-color: #fff;\n\t}\n.leaflet-tooltip-bottom:before {\n\ttop: 0;\n\tmargin-top: -12px;\n\tmargin-left: -6px;\n\tborder-bottom-color: #fff;\n\t}\n.leaflet-tooltip-left {\n\tmargin-left: -6px;\n}\n.leaflet-tooltip-right {\n\tmargin-left: 6px;\n}\n.leaflet-tooltip-left:before,\n.leaflet-tooltip-right:before {\n\ttop: 50%;\n\tmargin-top: -6px;\n\t}\n.leaflet-tooltip-left:before {\n\tright: 0;\n\tmargin-right: -12px;\n\tborder-left-color: #fff;\n\t}\n.leaflet-tooltip-right:before {\n\tleft: 0;\n\tmargin-left: -12px;\n\tborder-right-color: #fff;\n\t}\n\n/* Printing */\n\n@media print {\n\t/* Prevent printers from removing background-images of controls. */\n\t.leaflet-control {\n\t\t-webkit-print-color-adjust: exact;\n\t\tprint-color-adjust: exact;\n\t\t}\n\t}\n`,""]);const y=d},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",i=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),i&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),i&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,i,o,r){"string"==typeof t&&(t=[[null,t,void 0]]);var s={};if(i)for(var a=0;a<this.length;a++){var l=this[a][0];null!=l&&(s[l]=!0)}for(var c=0;c<t.length;c++){var u=[].concat(t[c]);i&&s[u[0]]||(void 0!==r&&(void 0===u[5]||(u[1]="@layer".concat(u[5].length>0?" ".concat(u[5]):""," {").concat(u[1],"}")),u[5]=r),n&&(u[2]?(u[1]="@media ".concat(u[2]," {").concat(u[1],"}"),u[2]=n):u[2]=n),o&&(u[4]?(u[1]="@supports (".concat(u[4],") {").concat(u[1],"}"),u[4]=o):u[4]="".concat(o)),e.push(u))}},e}},417:t=>{t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},601:t=>{t.exports=function(t){return t[1]}},782:function(t){"undefined"!=typeof self&&self,t.exports=function(t){var e={};function n(i){if(e[i])return e[i].exports;var o=e[i]={i,l:!1,exports:{}};return t[i].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,i){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:i})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var i=Object.create(null);if(n.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(i,o,function(e){return t[e]}.bind(null,o));return i},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=0)}([function(t,e,n){n.r(e),n.d(e,"default",(function(){return i}));class i{constructor(t,e=null,n=null){this.events={},this.container=t,this.precanvas=null,this.nodeId=1,this.ele_selected=null,this.node_selected=null,this.drag=!1,this.reroute=!1,this.reroute_fix_curvature=!1,this.curvature=.5,this.reroute_curvature_start_end=.5,this.reroute_curvature=.5,this.reroute_width=6,this.drag_point=!1,this.editor_selected=!1,this.connection=!1,this.connection_ele=null,this.connection_selected=null,this.canvas_x=0,this.canvas_y=0,this.pos_x=0,this.pos_x_start=0,this.pos_y=0,this.pos_y_start=0,this.mouse_x=0,this.mouse_y=0,this.line_path=5,this.first_click=null,this.force_first_input=!1,this.draggable_inputs=!0,this.useuuid=!1,this.parent=n,this.noderegister={},this.render=e,this.drawflow={drawflow:{Home:{data:{}}}},this.module="Home",this.editor_mode="edit",this.zoom=1,this.zoom_max=1.6,this.zoom_min=.5,this.zoom_value=.1,this.zoom_last_value=1,this.evCache=new Array,this.prevDiff=-1}start(){this.container.classList.add("parent-drawflow"),this.container.tabIndex=0,this.precanvas=document.createElement("div"),this.precanvas.classList.add("drawflow"),this.container.appendChild(this.precanvas),this.container.addEventListener("mouseup",this.dragEnd.bind(this)),this.container.addEventListener("mousemove",this.position.bind(this)),this.container.addEventListener("mousedown",this.click.bind(this)),this.container.addEventListener("touchend",this.dragEnd.bind(this)),this.container.addEventListener("touchmove",this.position.bind(this)),this.container.addEventListener("touchstart",this.click.bind(this)),this.container.addEventListener("contextmenu",this.contextmenu.bind(this)),this.container.addEventListener("keydown",this.key.bind(this)),this.container.addEventListener("wheel",this.zoom_enter.bind(this)),this.container.addEventListener("input",this.updateNodeValue.bind(this)),this.container.addEventListener("dblclick",this.dblclick.bind(this)),this.container.onpointerdown=this.pointerdown_handler.bind(this),this.container.onpointermove=this.pointermove_handler.bind(this),this.container.onpointerup=this.pointerup_handler.bind(this),this.container.onpointercancel=this.pointerup_handler.bind(this),this.container.onpointerout=this.pointerup_handler.bind(this),this.container.onpointerleave=this.pointerup_handler.bind(this),this.load()}pointerdown_handler(t){this.evCache.push(t)}pointermove_handler(t){for(var e=0;e<this.evCache.length;e++)if(t.pointerId==this.evCache[e].pointerId){this.evCache[e]=t;break}if(2==this.evCache.length){var n=Math.abs(this.evCache[0].clientX-this.evCache[1].clientX);this.prevDiff>100&&(n>this.prevDiff&&this.zoom_in(),n<this.prevDiff&&this.zoom_out()),this.prevDiff=n}}pointerup_handler(t){this.remove_event(t),this.evCache.length<2&&(this.prevDiff=-1)}remove_event(t){for(var e=0;e<this.evCache.length;e++)if(this.evCache[e].pointerId==t.pointerId){this.evCache.splice(e,1);break}}load(){for(var t in this.drawflow.drawflow[this.module].data)this.addNodeImport(this.drawflow.drawflow[this.module].data[t],this.precanvas);if(this.reroute)for(var t in this.drawflow.drawflow[this.module].data)this.addRerouteImport(this.drawflow.drawflow[this.module].data[t]);for(var t in this.drawflow.drawflow[this.module].data)this.updateConnectionNodes("node-"+t);const e=this.drawflow.drawflow;let n=1;Object.keys(e).map((function(t,i){Object.keys(e[t].data).map((function(t,e){parseInt(t)>=n&&(n=parseInt(t)+1)}))})),this.nodeId=n}removeReouteConnectionSelected(){this.dispatch("connectionUnselected",!0),this.reroute_fix_curvature&&this.connection_selected.parentElement.querySelectorAll(".main-path").forEach(((t,e)=>{t.classList.remove("selected")}))}click(t){if(this.dispatch("click",t),"fixed"===this.editor_mode){if("parent-drawflow"!==t.target.classList[0]&&"drawflow"!==t.target.classList[0])return!1;this.ele_selected=t.target.closest(".parent-drawflow"),t.preventDefault()}else"view"===this.editor_mode?(null!=t.target.closest(".drawflow")||t.target.matches(".parent-drawflow"))&&(this.ele_selected=t.target.closest(".parent-drawflow"),t.preventDefault()):(this.first_click=t.target,this.ele_selected=t.target,0===t.button&&this.contextmenuDel(),null!=t.target.closest(".drawflow_content_node")&&(this.ele_selected=t.target.closest(".drawflow_content_node").parentElement));switch(this.ele_selected.classList[0]){case"drawflow-node":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected!=this.ele_selected&&this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.node_selected!=this.ele_selected&&this.dispatch("nodeSelected",this.ele_selected.id.slice(5)),this.node_selected=this.ele_selected,this.node_selected.classList.add("selected"),this.draggable_inputs?"SELECT"!==t.target.tagName&&(this.drag=!0):"INPUT"!==t.target.tagName&&"TEXTAREA"!==t.target.tagName&&"SELECT"!==t.target.tagName&&!0!==t.target.hasAttribute("contenteditable")&&(this.drag=!0);break;case"output":this.connection=!0,null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.drawConnection(t.target);break;case"parent-drawflow":case"drawflow":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.editor_selected=!0;break;case"main-path":null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null),this.connection_selected=this.ele_selected,this.connection_selected.classList.add("selected");const e=this.connection_selected.parentElement.classList;e.length>1&&(this.dispatch("connectionSelected",{output_id:e[2].slice(14),input_id:e[1].slice(13),output_class:e[3],input_class:e[4]}),this.reroute_fix_curvature&&this.connection_selected.parentElement.querySelectorAll(".main-path").forEach(((t,e)=>{t.classList.add("selected")})));break;case"point":this.drag_point=!0,this.ele_selected.classList.add("selected");break;case"drawflow-delete":this.node_selected&&this.removeNodeId(this.node_selected.id),this.connection_selected&&this.removeConnection(),null!=this.node_selected&&(this.node_selected.classList.remove("selected"),this.node_selected=null,this.dispatch("nodeUnselected",!0)),null!=this.connection_selected&&(this.connection_selected.classList.remove("selected"),this.removeReouteConnectionSelected(),this.connection_selected=null)}"touchstart"===t.type?(this.pos_x=t.touches[0].clientX,this.pos_x_start=t.touches[0].clientX,this.pos_y=t.touches[0].clientY,this.pos_y_start=t.touches[0].clientY,this.mouse_x=t.touches[0].clientX,this.mouse_y=t.touches[0].clientY):(this.pos_x=t.clientX,this.pos_x_start=t.clientX,this.pos_y=t.clientY,this.pos_y_start=t.clientY),["input","output","main-path"].includes(this.ele_selected.classList[0])&&t.preventDefault(),this.dispatch("clickEnd",t)}position(t){if("touchmove"===t.type)var e=t.touches[0].clientX,n=t.touches[0].clientY;else e=t.clientX,n=t.clientY;if(this.connection&&this.updateConnection(e,n),this.editor_selected&&(i=this.canvas_x+-(this.pos_x-e),o=this.canvas_y+-(this.pos_y-n),this.dispatch("translate",{x:i,y:o}),this.precanvas.style.transform="translate("+i+"px, "+o+"px) scale("+this.zoom+")"),this.drag){t.preventDefault();var i=(this.pos_x-e)*this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom),o=(this.pos_y-n)*this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom);this.pos_x=e,this.pos_y=n,this.ele_selected.style.top=this.ele_selected.offsetTop-o+"px",this.ele_selected.style.left=this.ele_selected.offsetLeft-i+"px",this.drawflow.drawflow[this.module].data[this.ele_selected.id.slice(5)].pos_x=this.ele_selected.offsetLeft-i,this.drawflow.drawflow[this.module].data[this.ele_selected.id.slice(5)].pos_y=this.ele_selected.offsetTop-o,this.updateConnectionNodes(this.ele_selected.id)}if(this.drag_point){i=(this.pos_x-e)*this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom),o=(this.pos_y-n)*this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom),this.pos_x=e,this.pos_y=n;var r=this.pos_x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),s=this.pos_y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom));this.ele_selected.setAttributeNS(null,"cx",r),this.ele_selected.setAttributeNS(null,"cy",s);const t=this.ele_selected.parentElement.classList[2].slice(9),a=this.ele_selected.parentElement.classList[1].slice(13),l=this.ele_selected.parentElement.classList[3],c=this.ele_selected.parentElement.classList[4];let u=Array.from(this.ele_selected.parentElement.children).indexOf(this.ele_selected)-1;this.reroute_fix_curvature&&(u-=this.ele_selected.parentElement.querySelectorAll(".main-path").length-1,u<0&&(u=0));const h=t.slice(5),d=this.drawflow.drawflow[this.module].data[h].outputs[l].connections.findIndex((function(t,e){return t.node===a&&t.output===c}));this.drawflow.drawflow[this.module].data[h].outputs[l].connections[d].points[u]={pos_x:r,pos_y:s};const p=this.ele_selected.parentElement.classList[2].slice(9);this.updateConnectionNodes(p)}"touchmove"===t.type&&(this.mouse_x=e,this.mouse_y=n),this.dispatch("mouseMove",{x:e,y:n})}dragEnd(t){if("touchend"===t.type)var e=this.mouse_x,n=this.mouse_y,i=document.elementFromPoint(e,n);else e=t.clientX,n=t.clientY,i=t.target;if(this.drag&&(this.pos_x_start==e&&this.pos_y_start==n||this.dispatch("nodeMoved",this.ele_selected.id.slice(5))),this.drag_point&&(this.ele_selected.classList.remove("selected"),this.pos_x_start==e&&this.pos_y_start==n||this.dispatch("rerouteMoved",this.ele_selected.parentElement.classList[2].slice(14))),this.editor_selected&&(this.canvas_x=this.canvas_x+-(this.pos_x-e),this.canvas_y=this.canvas_y+-(this.pos_y-n),this.editor_selected=!1),!0===this.connection)if("input"===i.classList[0]||this.force_first_input&&(null!=i.closest(".drawflow_content_node")||"drawflow-node"===i.classList[0])){if(!this.force_first_input||null==i.closest(".drawflow_content_node")&&"drawflow-node"!==i.classList[0])o=i.parentElement.parentElement.id,r=i.classList[1];else{if(null!=i.closest(".drawflow_content_node"))var o=i.closest(".drawflow_content_node").parentElement.id;else o=i.id;if(0===Object.keys(this.getNodeFromId(o.slice(5)).inputs).length)var r=!1;else r="input_1"}var s=this.ele_selected.parentElement.parentElement.id,a=this.ele_selected.classList[1];if(s!==o&&!1!==r){if(0===this.container.querySelectorAll(".connection.node_in_"+o+".node_out_"+s+"."+a+"."+r).length){this.connection_ele.classList.add("node_in_"+o),this.connection_ele.classList.add("node_out_"+s),this.connection_ele.classList.add(a),this.connection_ele.classList.add(r);var l=o.slice(5),c=s.slice(5);this.drawflow.drawflow[this.module].data[c].outputs[a].connections.push({node:l,output:r}),this.drawflow.drawflow[this.module].data[l].inputs[r].connections.push({node:c,input:a}),this.updateConnectionNodes("node-"+c),this.updateConnectionNodes("node-"+l),this.dispatch("connectionCreated",{output_id:c,input_id:l,output_class:a,input_class:r})}else this.dispatch("connectionCancel",!0),this.connection_ele.remove();this.connection_ele=null}else this.dispatch("connectionCancel",!0),this.connection_ele.remove(),this.connection_ele=null}else this.dispatch("connectionCancel",!0),this.connection_ele.remove(),this.connection_ele=null;this.drag=!1,this.drag_point=!1,this.connection=!1,this.ele_selected=null,this.editor_selected=!1,this.dispatch("mouseUp",t)}contextmenu(t){if(this.dispatch("contextmenu",t),t.preventDefault(),"fixed"===this.editor_mode||"view"===this.editor_mode)return!1;if(this.precanvas.getElementsByClassName("drawflow-delete").length&&this.precanvas.getElementsByClassName("drawflow-delete")[0].remove(),this.node_selected||this.connection_selected){var e=document.createElement("div");e.classList.add("drawflow-delete"),e.innerHTML="x",this.node_selected&&this.node_selected.appendChild(e),this.connection_selected&&this.connection_selected.parentElement.classList.length>1&&(e.style.top=t.clientY*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))+"px",e.style.left=t.clientX*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))+"px",this.precanvas.appendChild(e))}}contextmenuDel(){this.precanvas.getElementsByClassName("drawflow-delete").length&&this.precanvas.getElementsByClassName("drawflow-delete")[0].remove()}key(t){if(this.dispatch("keydown",t),"fixed"===this.editor_mode||"view"===this.editor_mode)return!1;("Delete"===t.key||"Backspace"===t.key&&t.metaKey)&&(null!=this.node_selected&&"INPUT"!==this.first_click.tagName&&"TEXTAREA"!==this.first_click.tagName&&!0!==this.first_click.hasAttribute("contenteditable")&&this.removeNodeId(this.node_selected.id),null!=this.connection_selected&&this.removeConnection())}zoom_enter(t,e){t.ctrlKey&&(t.preventDefault(),t.deltaY>0?this.zoom_out():this.zoom_in())}zoom_refresh(){this.dispatch("zoom",this.zoom),this.canvas_x=this.canvas_x/this.zoom_last_value*this.zoom,this.canvas_y=this.canvas_y/this.zoom_last_value*this.zoom,this.zoom_last_value=this.zoom,this.precanvas.style.transform="translate("+this.canvas_x+"px, "+this.canvas_y+"px) scale("+this.zoom+")"}zoom_in(){this.zoom<this.zoom_max&&(this.zoom+=this.zoom_value,this.zoom_refresh())}zoom_out(){this.zoom>this.zoom_min&&(this.zoom-=this.zoom_value,this.zoom_refresh())}zoom_reset(){1!=this.zoom&&(this.zoom=1,this.zoom_refresh())}createCurvature(t,e,n,i,o,r){var s=t,a=e,l=n,c=i,u=o;switch(r){case"open":if(t>=n)var h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*(-1*u);else h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*u;return" M "+s+" "+a+" C "+h+" "+a+" "+d+" "+c+" "+l+" "+c;case"close":return t>=n?(h=s+Math.abs(l-s)*(-1*u),d=l-Math.abs(l-s)*u):(h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*u)," M "+s+" "+a+" C "+h+" "+a+" "+d+" "+c+" "+l+" "+c;case"other":return t>=n?(h=s+Math.abs(l-s)*(-1*u),d=l-Math.abs(l-s)*(-1*u)):(h=s+Math.abs(l-s)*u,d=l-Math.abs(l-s)*u)," M "+s+" "+a+" C "+h+" "+a+" "+d+" "+c+" "+l+" "+c;default:return" M "+s+" "+a+" C "+(h=s+Math.abs(l-s)*u)+" "+a+" "+(d=l-Math.abs(l-s)*u)+" "+c+" "+l+" "+c}}drawConnection(t){var e=document.createElementNS("http://www.w3.org/2000/svg","svg");this.connection_ele=e;var n=document.createElementNS("http://www.w3.org/2000/svg","path");n.classList.add("main-path"),n.setAttributeNS(null,"d",""),e.classList.add("connection"),e.appendChild(n),this.precanvas.appendChild(e);var i=t.parentElement.parentElement.id.slice(5),o=t.classList[1];this.dispatch("connectionStart",{output_id:i,output_class:o})}updateConnection(t,e){const n=this.precanvas,i=this.zoom;let o=n.clientWidth/(n.clientWidth*i);o=o||0;let r=n.clientHeight/(n.clientHeight*i);r=r||0;var s=this.connection_ele.children[0],a=this.ele_selected.offsetWidth/2+(this.ele_selected.getBoundingClientRect().x-n.getBoundingClientRect().x)*o,l=this.ele_selected.offsetHeight/2+(this.ele_selected.getBoundingClientRect().y-n.getBoundingClientRect().y)*r,c=t*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),u=e*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom)),h=this.curvature,d=this.createCurvature(a,l,c,u,h,"openclose");s.setAttributeNS(null,"d",d)}addConnection(t,e,n,i){var o=this.getModuleFromNodeId(t);if(o===this.getModuleFromNodeId(e)){var r=this.getNodeFromId(t),s=!1;for(var a in r.outputs[n].connections){var l=r.outputs[n].connections[a];l.node==e&&l.output==i&&(s=!0)}if(!1===s){if(this.drawflow.drawflow[o].data[t].outputs[n].connections.push({node:e.toString(),output:i}),this.drawflow.drawflow[o].data[e].inputs[i].connections.push({node:t.toString(),input:n}),this.module===o){var c=document.createElementNS("http://www.w3.org/2000/svg","svg"),u=document.createElementNS("http://www.w3.org/2000/svg","path");u.classList.add("main-path"),u.setAttributeNS(null,"d",""),c.classList.add("connection"),c.classList.add("node_in_node-"+e),c.classList.add("node_out_node-"+t),c.classList.add(n),c.classList.add(i),c.appendChild(u),this.precanvas.appendChild(c),this.updateConnectionNodes("node-"+t),this.updateConnectionNodes("node-"+e)}this.dispatch("connectionCreated",{output_id:t,input_id:e,output_class:n,input_class:i})}}}updateConnectionNodes(t){const e="node_in_"+t,n="node_out_"+t;this.line_path;const i=this.container,o=this.precanvas,r=this.curvature,s=this.createCurvature,a=this.reroute_curvature,l=this.reroute_curvature_start_end,c=this.reroute_fix_curvature,u=this.reroute_width,h=this.zoom;let d=o.clientWidth/(o.clientWidth*h);d=d||0;let p=o.clientHeight/(o.clientHeight*h);p=p||0;const f=i.querySelectorAll("."+n);Object.keys(f).map((function(e,n){if(null===f[e].querySelector(".point")){var m=i.querySelector("#"+t),y=f[e].classList[1].replace("node_in_",""),v=i.querySelector("#"+y).querySelectorAll("."+f[e].classList[4])[0],b=v.offsetWidth/2+(v.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,g=v.offsetHeight/2+(v.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,_=m.querySelectorAll("."+f[e].classList[3])[0],w=_.offsetWidth/2+(_.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,x=_.offsetHeight/2+(_.getBoundingClientRect().y-o.getBoundingClientRect().y)*p;const n=s(w,x,b,g,r,"openclose");f[e].children[0].setAttributeNS(null,"d",n)}else{const n=f[e].querySelectorAll(".point");let r="";const m=[];n.forEach(((e,c)=>{if(0===c&&n.length-1==0){var f=i.querySelector("#"+t),y=((x=e).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,b=(k=f.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(k.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,g=k.offsetHeight/2+(k.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,_=s(b,g,y,v,l,"open");r+=_,m.push(_),f=e;var w=e.parentElement.classList[1].replace("node_in_",""),x=(O=i.querySelector("#"+w)).querySelectorAll("."+e.parentElement.classList[4])[0];y=(j=O.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(j.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,v=j.offsetHeight/2+(j.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,_=s(b,g,y,v,l,"close"),r+=_,m.push(_)}else if(0===c){var k;f=i.querySelector("#"+t),y=((x=e).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,b=(k=f.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(k.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,g=k.offsetHeight/2+(k.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,_=s(b,g,y,v,l,"open"),r+=_,m.push(_),f=e,y=((x=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,_=s(b,g,y,v,a,"other"),r+=_,m.push(_)}else if(c===n.length-1){var O,j;f=e,w=e.parentElement.classList[1].replace("node_in_",""),x=(O=i.querySelector("#"+w)).querySelectorAll("."+e.parentElement.classList[4])[0],y=(j=O.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(j.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,v=j.offsetHeight/2+(j.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+u,_=s(b,g,y,v,l,"close"),r+=_,m.push(_)}else f=e,y=((x=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+u,v=(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+u,b=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*(o.clientWidth/(o.clientWidth*h))+u,g=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*(o.clientHeight/(o.clientHeight*h))+u,_=s(b,g,y,v,a,"other"),r+=_,m.push(_)})),c?m.forEach(((t,n)=>{f[e].children[n].setAttributeNS(null,"d",t)})):f[e].children[0].setAttributeNS(null,"d",r)}}));const m=i.querySelectorAll("."+e);Object.keys(m).map((function(e,n){if(null===m[e].querySelector(".point")){var h=i.querySelector("#"+t),f=m[e].classList[2].replace("node_out_",""),y=i.querySelector("#"+f).querySelectorAll("."+m[e].classList[3])[0],v=y.offsetWidth/2+(y.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,b=y.offsetHeight/2+(y.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,g=(h=h.querySelectorAll("."+m[e].classList[4])[0]).offsetWidth/2+(h.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,_=h.offsetHeight/2+(h.getBoundingClientRect().y-o.getBoundingClientRect().y)*p;const n=s(v,b,g,_,r,"openclose");m[e].children[0].setAttributeNS(null,"d",n)}else{const n=m[e].querySelectorAll(".point");let r="";const h=[];n.forEach(((e,c)=>{if(0===c&&n.length-1==0){var f=i.querySelector("#"+t),m=((w=e).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,v=(O=f.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(O.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,b=O.offsetHeight/2+(O.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,g=s(m,y,v,b,l,"close");r+=g,h.push(g),f=e;var _=e.parentElement.classList[2].replace("node_out_",""),w=(k=i.querySelector("#"+_)).querySelectorAll("."+e.parentElement.classList[3])[0];m=(x=k.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(x.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,y=x.offsetHeight/2+(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,v=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,l,"open"),r+=g,h.push(g)}else if(0===c){var x;f=e,_=e.parentElement.classList[2].replace("node_out_",""),w=(k=i.querySelector("#"+_)).querySelectorAll("."+e.parentElement.classList[3])[0],m=(x=k.querySelectorAll("."+e.parentElement.classList[3])[0]).offsetWidth/2+(x.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,y=x.offsetHeight/2+(x.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,v=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,l,"open"),r+=g,h.push(g),f=e,v=((w=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,m=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,a,"other"),r+=g,h.push(g)}else if(c===n.length-1){var k,O;f=e,_=e.parentElement.classList[1].replace("node_in_",""),w=(k=i.querySelector("#"+_)).querySelectorAll("."+e.parentElement.classList[4])[0],v=(O=k.querySelectorAll("."+e.parentElement.classList[4])[0]).offsetWidth/2+(O.getBoundingClientRect().x-o.getBoundingClientRect().x)*d,b=O.offsetHeight/2+(O.getBoundingClientRect().y-o.getBoundingClientRect().y)*p,m=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,l,"close"),r+=g,h.push(g)}else f=e,v=((w=n[c+1]).getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,b=(w.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,m=(f.getBoundingClientRect().x-o.getBoundingClientRect().x)*d+u,y=(f.getBoundingClientRect().y-o.getBoundingClientRect().y)*p+u,g=s(m,y,v,b,a,"other"),r+=g,h.push(g)})),c?h.forEach(((t,n)=>{m[e].children[n].setAttributeNS(null,"d",t)})):m[e].children[0].setAttributeNS(null,"d",r)}}))}dblclick(t){null!=this.connection_selected&&this.reroute&&this.createReroutePoint(this.connection_selected),"point"===t.target.classList[0]&&this.removeReroutePoint(t.target)}createReroutePoint(t){this.connection_selected.classList.remove("selected");const e=this.connection_selected.parentElement.classList[2].slice(9),n=this.connection_selected.parentElement.classList[1].slice(13),i=this.connection_selected.parentElement.classList[3],o=this.connection_selected.parentElement.classList[4];this.connection_selected=null;const r=document.createElementNS("http://www.w3.org/2000/svg","circle");r.classList.add("point");var s=this.pos_x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom))-this.precanvas.getBoundingClientRect().x*(this.precanvas.clientWidth/(this.precanvas.clientWidth*this.zoom)),a=this.pos_y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom))-this.precanvas.getBoundingClientRect().y*(this.precanvas.clientHeight/(this.precanvas.clientHeight*this.zoom));r.setAttributeNS(null,"cx",s),r.setAttributeNS(null,"cy",a),r.setAttributeNS(null,"r",this.reroute_width);let l=0;if(this.reroute_fix_curvature){const e=t.parentElement.querySelectorAll(".main-path").length;var c=document.createElementNS("http://www.w3.org/2000/svg","path");if(c.classList.add("main-path"),c.setAttributeNS(null,"d",""),t.parentElement.insertBefore(c,t.parentElement.children[e]),1===e)t.parentElement.appendChild(r);else{const n=Array.from(t.parentElement.children).indexOf(t);l=n,t.parentElement.insertBefore(r,t.parentElement.children[n+e+1])}}else t.parentElement.appendChild(r);const u=e.slice(5),h=this.drawflow.drawflow[this.module].data[u].outputs[i].connections.findIndex((function(t,e){return t.node===n&&t.output===o}));void 0===this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points&&(this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points=[]),this.reroute_fix_curvature?(l>0||this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points!==[]?this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points.splice(l,0,{pos_x:s,pos_y:a}):this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points.push({pos_x:s,pos_y:a}),t.parentElement.querySelectorAll(".main-path").forEach(((t,e)=>{t.classList.remove("selected")}))):this.drawflow.drawflow[this.module].data[u].outputs[i].connections[h].points.push({pos_x:s,pos_y:a}),this.dispatch("addReroute",u),this.updateConnectionNodes(e)}removeReroutePoint(t){const e=t.parentElement.classList[2].slice(9),n=t.parentElement.classList[1].slice(13),i=t.parentElement.classList[3],o=t.parentElement.classList[4];let r=Array.from(t.parentElement.children).indexOf(t);const s=e.slice(5),a=this.drawflow.drawflow[this.module].data[s].outputs[i].connections.findIndex((function(t,e){return t.node===n&&t.output===o}));if(this.reroute_fix_curvature){const e=t.parentElement.querySelectorAll(".main-path").length;t.parentElement.children[e-1].remove(),r-=e,r<0&&(r=0)}else r--;this.drawflow.drawflow[this.module].data[s].outputs[i].connections[a].points.splice(r,1),t.remove(),this.dispatch("removeReroute",s),this.updateConnectionNodes(e)}registerNode(t,e,n=null,i=null){this.noderegister[t]={html:e,props:n,options:i}}getNodeFromId(t){var e=this.getModuleFromNodeId(t);return JSON.parse(JSON.stringify(this.drawflow.drawflow[e].data[t]))}getNodesFromName(t){var e=[];const n=this.drawflow.drawflow;return Object.keys(n).map((function(i,o){for(var r in n[i].data)n[i].data[r].name==t&&e.push(n[i].data[r].id)})),e}addNode(t,e,n,i,o,r,s,a,l=!1){if(this.useuuid)var c=this.getUuid();else c=this.nodeId;const u=document.createElement("div");u.classList.add("parent-node");const h=document.createElement("div");h.innerHTML="",h.setAttribute("id","node-"+c),h.classList.add("drawflow-node"),""!=r&&h.classList.add(...r.split(" "));const d=document.createElement("div");d.classList.add("inputs");const p=document.createElement("div");p.classList.add("outputs");const f={};for(var m=0;m<e;m++){const t=document.createElement("div");t.classList.add("input"),t.classList.add("input_"+(m+1)),f["input_"+(m+1)]={connections:[]},d.appendChild(t)}const y={};for(m=0;m<n;m++){const t=document.createElement("div");t.classList.add("output"),t.classList.add("output_"+(m+1)),y["output_"+(m+1)]={connections:[]},p.appendChild(t)}const v=document.createElement("div");if(v.classList.add("drawflow_content_node"),!1===l)v.innerHTML=a;else if(!0===l)v.appendChild(this.noderegister[a].html.cloneNode(!0));else if(3===parseInt(this.render.version)){let t=this.render.h(this.noderegister[a].html,this.noderegister[a].props,this.noderegister[a].options);t.appContext=this.parent,this.render.render(t,v)}else{let t=new this.render({parent:this.parent,render:t=>t(this.noderegister[a].html,{props:this.noderegister[a].props}),...this.noderegister[a].options}).$mount();v.appendChild(t.$el)}Object.entries(s).forEach((function(t,e){if("object"==typeof t[1])!function t(e,n,i){null!==(e=null===e?s[n]:e[n])&&Object.entries(e).forEach((function(n,o){if("object"==typeof n[1])t(e,n[0],i+"-"+n[0]);else for(var r=v.querySelectorAll("[df-"+i+"-"+n[0]+"]"),s=0;s<r.length;s++)r[s].value=n[1],r[s].isContentEditable&&(r[s].innerText=n[1])}))}(null,t[0],t[0]);else for(var n=v.querySelectorAll("[df-"+t[0]+"]"),i=0;i<n.length;i++)n[i].value=t[1],n[i].isContentEditable&&(n[i].innerText=t[1])})),h.appendChild(d),h.appendChild(v),h.appendChild(p),h.style.top=o+"px",h.style.left=i+"px",u.appendChild(h),this.precanvas.appendChild(u);var b={id:c,name:t,data:s,class:r,html:a,typenode:l,inputs:f,outputs:y,pos_x:i,pos_y:o};return this.drawflow.drawflow[this.module].data[c]=b,this.dispatch("nodeCreated",c),this.useuuid||this.nodeId++,c}addNodeImport(t,e){const n=document.createElement("div");n.classList.add("parent-node");const i=document.createElement("div");i.innerHTML="",i.setAttribute("id","node-"+t.id),i.classList.add("drawflow-node"),""!=t.class&&i.classList.add(...t.class.split(" "));const o=document.createElement("div");o.classList.add("inputs");const r=document.createElement("div");r.classList.add("outputs"),Object.keys(t.inputs).map((function(n,i){const r=document.createElement("div");r.classList.add("input"),r.classList.add(n),o.appendChild(r),Object.keys(t.inputs[n].connections).map((function(i,o){var r=document.createElementNS("http://www.w3.org/2000/svg","svg"),s=document.createElementNS("http://www.w3.org/2000/svg","path");s.classList.add("main-path"),s.setAttributeNS(null,"d",""),r.classList.add("connection"),r.classList.add("node_in_node-"+t.id),r.classList.add("node_out_node-"+t.inputs[n].connections[i].node),r.classList.add(t.inputs[n].connections[i].input),r.classList.add(n),r.appendChild(s),e.appendChild(r)}))}));for(var s=0;s<Object.keys(t.outputs).length;s++){const t=document.createElement("div");t.classList.add("output"),t.classList.add("output_"+(s+1)),r.appendChild(t)}const a=document.createElement("div");if(a.classList.add("drawflow_content_node"),!1===t.typenode)a.innerHTML=t.html;else if(!0===t.typenode)a.appendChild(this.noderegister[t.html].html.cloneNode(!0));else if(3===parseInt(this.render.version)){let e=this.render.h(this.noderegister[t.html].html,this.noderegister[t.html].props,this.noderegister[t.html].options);e.appContext=this.parent,this.render.render(e,a)}else{let e=new this.render({parent:this.parent,render:e=>e(this.noderegister[t.html].html,{props:this.noderegister[t.html].props}),...this.noderegister[t.html].options}).$mount();a.appendChild(e.$el)}Object.entries(t.data).forEach((function(e,n){if("object"==typeof e[1])!function e(n,i,o){null!==(n=null===n?t.data[i]:n[i])&&Object.entries(n).forEach((function(t,i){if("object"==typeof t[1])e(n,t[0],o+"-"+t[0]);else for(var r=a.querySelectorAll("[df-"+o+"-"+t[0]+"]"),s=0;s<r.length;s++)r[s].value=t[1],r[s].isContentEditable&&(r[s].innerText=t[1])}))}(null,e[0],e[0]);else for(var i=a.querySelectorAll("[df-"+e[0]+"]"),o=0;o<i.length;o++)i[o].value=e[1],i[o].isContentEditable&&(i[o].innerText=e[1])})),i.appendChild(o),i.appendChild(a),i.appendChild(r),i.style.top=t.pos_y+"px",i.style.left=t.pos_x+"px",n.appendChild(i),this.precanvas.appendChild(n)}addRerouteImport(t){const e=this.reroute_width,n=this.reroute_fix_curvature,i=this.container;Object.keys(t.outputs).map((function(o,r){Object.keys(t.outputs[o].connections).map((function(r,s){const a=t.outputs[o].connections[r].points;void 0!==a&&a.forEach(((s,l)=>{const c=t.outputs[o].connections[r].node,u=t.outputs[o].connections[r].output,h=i.querySelector(".connection.node_in_node-"+c+".node_out_node-"+t.id+"."+o+"."+u);if(n&&0===l)for(var d=0;d<a.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","path");p.classList.add("main-path"),p.setAttributeNS(null,"d",""),h.appendChild(p)}const f=document.createElementNS("http://www.w3.org/2000/svg","circle");f.classList.add("point");var m=s.pos_x,y=s.pos_y;f.setAttributeNS(null,"cx",m),f.setAttributeNS(null,"cy",y),f.setAttributeNS(null,"r",e),h.appendChild(f)}))}))}))}updateNodeValue(t){for(var e=t.target.attributes,n=0;n<e.length;n++)if(e[n].nodeName.startsWith("df-")){for(var i=e[n].nodeName.slice(3).split("-"),o=this.drawflow.drawflow[this.module].data[t.target.closest(".drawflow_content_node").parentElement.id.slice(5)].data,r=0;r<i.length-1;r+=1)null==o[i[r]]&&(o[i[r]]={}),o=o[i[r]];o[i[i.length-1]]=t.target.value,t.target.isContentEditable&&(o[i[i.length-1]]=t.target.innerText),this.dispatch("nodeDataChanged",t.target.closest(".drawflow_content_node").parentElement.id.slice(5))}}updateNodeDataFromId(t,e){var n=this.getModuleFromNodeId(t);if(this.drawflow.drawflow[n].data[t].data=e,this.module===n){const n=this.container.querySelector("#node-"+t);Object.entries(e).forEach((function(t,i){if("object"==typeof t[1])!function t(i,o,r){null!==(i=null===i?e[o]:i[o])&&Object.entries(i).forEach((function(e,o){if("object"==typeof e[1])t(i,e[0],r+"-"+e[0]);else for(var s=n.querySelectorAll("[df-"+r+"-"+e[0]+"]"),a=0;a<s.length;a++)s[a].value=e[1],s[a].isContentEditable&&(s[a].innerText=e[1])}))}(null,t[0],t[0]);else for(var o=n.querySelectorAll("[df-"+t[0]+"]"),r=0;r<o.length;r++)o[r].value=t[1],o[r].isContentEditable&&(o[r].innerText=t[1])}))}}addNodeInput(t){var e=this.getModuleFromNodeId(t);const n=this.getNodeFromId(t),i=Object.keys(n.inputs).length;if(this.module===e){const e=document.createElement("div");e.classList.add("input"),e.classList.add("input_"+(i+1)),this.container.querySelector("#node-"+t+" .inputs").appendChild(e),this.updateConnectionNodes("node-"+t)}this.drawflow.drawflow[e].data[t].inputs["input_"+(i+1)]={connections:[]}}addNodeOutput(t){var e=this.getModuleFromNodeId(t);const n=this.getNodeFromId(t),i=Object.keys(n.outputs).length;if(this.module===e){const e=document.createElement("div");e.classList.add("output"),e.classList.add("output_"+(i+1)),this.container.querySelector("#node-"+t+" .outputs").appendChild(e),this.updateConnectionNodes("node-"+t)}this.drawflow.drawflow[e].data[t].outputs["output_"+(i+1)]={connections:[]}}removeNodeInput(t,e){var n=this.getModuleFromNodeId(t);const i=this.getNodeFromId(t);this.module===n&&this.container.querySelector("#node-"+t+" .inputs .input."+e).remove();const o=[];Object.keys(i.inputs[e].connections).map((function(n,r){const s=i.inputs[e].connections[r].node,a=i.inputs[e].connections[r].input;o.push({id_output:s,id:t,output_class:a,input_class:e})})),o.forEach(((t,e)=>{this.removeSingleConnection(t.id_output,t.id,t.output_class,t.input_class)})),delete this.drawflow.drawflow[n].data[t].inputs[e];const r=[],s=this.drawflow.drawflow[n].data[t].inputs;Object.keys(s).map((function(t,e){r.push(s[t])})),this.drawflow.drawflow[n].data[t].inputs={};const a=e.slice(6);let l=[];r.forEach(((e,i)=>{e.connections.forEach(((t,e)=>{l.push(t)})),this.drawflow.drawflow[n].data[t].inputs["input_"+(i+1)]=e})),l=new Set(l.map((t=>JSON.stringify(t)))),l=Array.from(l).map((t=>JSON.parse(t))),this.module===n&&this.container.querySelectorAll("#node-"+t+" .inputs .input").forEach(((t,e)=>{const n=t.classList[1].slice(6);parseInt(a)<parseInt(n)&&(t.classList.remove("input_"+n),t.classList.add("input_"+(n-1)))})),l.forEach(((e,i)=>{this.drawflow.drawflow[n].data[e.node].outputs[e.input].connections.forEach(((i,o)=>{if(i.node==t){const r=i.output.slice(6);if(parseInt(a)<parseInt(r)){if(this.module===n){const n=this.container.querySelector(".connection.node_in_node-"+t+".node_out_node-"+e.node+"."+e.input+".input_"+r);n.classList.remove("input_"+r),n.classList.add("input_"+(r-1))}i.points?this.drawflow.drawflow[n].data[e.node].outputs[e.input].connections[o]={node:i.node,output:"input_"+(r-1),points:i.points}:this.drawflow.drawflow[n].data[e.node].outputs[e.input].connections[o]={node:i.node,output:"input_"+(r-1)}}}}))})),this.updateConnectionNodes("node-"+t)}removeNodeOutput(t,e){var n=this.getModuleFromNodeId(t);const i=this.getNodeFromId(t);this.module===n&&this.container.querySelector("#node-"+t+" .outputs .output."+e).remove();const o=[];Object.keys(i.outputs[e].connections).map((function(n,r){const s=i.outputs[e].connections[r].node,a=i.outputs[e].connections[r].output;o.push({id:t,id_input:s,output_class:e,input_class:a})})),o.forEach(((t,e)=>{this.removeSingleConnection(t.id,t.id_input,t.output_class,t.input_class)})),delete this.drawflow.drawflow[n].data[t].outputs[e];const r=[],s=this.drawflow.drawflow[n].data[t].outputs;Object.keys(s).map((function(t,e){r.push(s[t])})),this.drawflow.drawflow[n].data[t].outputs={};const a=e.slice(7);let l=[];r.forEach(((e,i)=>{e.connections.forEach(((t,e)=>{l.push({node:t.node,output:t.output})})),this.drawflow.drawflow[n].data[t].outputs["output_"+(i+1)]=e})),l=new Set(l.map((t=>JSON.stringify(t)))),l=Array.from(l).map((t=>JSON.parse(t))),this.module===n&&this.container.querySelectorAll("#node-"+t+" .outputs .output").forEach(((t,e)=>{const n=t.classList[1].slice(7);parseInt(a)<parseInt(n)&&(t.classList.remove("output_"+n),t.classList.add("output_"+(n-1)))})),l.forEach(((e,i)=>{this.drawflow.drawflow[n].data[e.node].inputs[e.output].connections.forEach(((i,o)=>{if(i.node==t){const r=i.input.slice(7);if(parseInt(a)<parseInt(r)){if(this.module===n){const n=this.container.querySelector(".connection.node_in_node-"+e.node+".node_out_node-"+t+".output_"+r+"."+e.output);n.classList.remove("output_"+r),n.classList.remove(e.output),n.classList.add("output_"+(r-1)),n.classList.add(e.output)}i.points?this.drawflow.drawflow[n].data[e.node].inputs[e.output].connections[o]={node:i.node,input:"output_"+(r-1),points:i.points}:this.drawflow.drawflow[n].data[e.node].inputs[e.output].connections[o]={node:i.node,input:"output_"+(r-1)}}}}))})),this.updateConnectionNodes("node-"+t)}removeNodeId(t){this.removeConnectionNodeId(t);var e=this.getModuleFromNodeId(t.slice(5));this.module===e&&this.container.querySelector("#"+t).remove(),delete this.drawflow.drawflow[e].data[t.slice(5)],this.dispatch("nodeRemoved",t.slice(5))}removeConnection(){if(null!=this.connection_selected){var t=this.connection_selected.parentElement.classList;this.connection_selected.parentElement.remove();var e=this.drawflow.drawflow[this.module].data[t[2].slice(14)].outputs[t[3]].connections.findIndex((function(e,n){return e.node===t[1].slice(13)&&e.output===t[4]}));this.drawflow.drawflow[this.module].data[t[2].slice(14)].outputs[t[3]].connections.splice(e,1);var n=this.drawflow.drawflow[this.module].data[t[1].slice(13)].inputs[t[4]].connections.findIndex((function(e,n){return e.node===t[2].slice(14)&&e.input===t[3]}));this.drawflow.drawflow[this.module].data[t[1].slice(13)].inputs[t[4]].connections.splice(n,1),this.dispatch("connectionRemoved",{output_id:t[2].slice(14),input_id:t[1].slice(13),output_class:t[3],input_class:t[4]}),this.connection_selected=null}}removeSingleConnection(t,e,n,i){var o=this.getModuleFromNodeId(t);if(o===this.getModuleFromNodeId(e)){if(this.drawflow.drawflow[o].data[t].outputs[n].connections.findIndex((function(t,n){return t.node==e&&t.output===i}))>-1){this.module===o&&this.container.querySelector(".connection.node_in_node-"+e+".node_out_node-"+t+"."+n+"."+i).remove();var r=this.drawflow.drawflow[o].data[t].outputs[n].connections.findIndex((function(t,n){return t.node==e&&t.output===i}));this.drawflow.drawflow[o].data[t].outputs[n].connections.splice(r,1);var s=this.drawflow.drawflow[o].data[e].inputs[i].connections.findIndex((function(e,i){return e.node==t&&e.input===n}));return this.drawflow.drawflow[o].data[e].inputs[i].connections.splice(s,1),this.dispatch("connectionRemoved",{output_id:t,input_id:e,output_class:n,input_class:i}),!0}return!1}return!1}removeConnectionNodeId(t){const e="node_in_"+t,n="node_out_"+t,i=this.container.querySelectorAll("."+n);for(var o=i.length-1;o>=0;o--){var r=i[o].classList,s=this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.findIndex((function(t,e){return t.node===r[2].slice(14)&&t.input===r[3]}));this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.splice(s,1);var a=this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.findIndex((function(t,e){return t.node===r[1].slice(13)&&t.output===r[4]}));this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.splice(a,1),i[o].remove(),this.dispatch("connectionRemoved",{output_id:r[2].slice(14),input_id:r[1].slice(13),output_class:r[3],input_class:r[4]})}const l=this.container.querySelectorAll("."+e);for(o=l.length-1;o>=0;o--)r=l[o].classList,a=this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.findIndex((function(t,e){return t.node===r[1].slice(13)&&t.output===r[4]})),this.drawflow.drawflow[this.module].data[r[2].slice(14)].outputs[r[3]].connections.splice(a,1),s=this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.findIndex((function(t,e){return t.node===r[2].slice(14)&&t.input===r[3]})),this.drawflow.drawflow[this.module].data[r[1].slice(13)].inputs[r[4]].connections.splice(s,1),l[o].remove(),this.dispatch("connectionRemoved",{output_id:r[2].slice(14),input_id:r[1].slice(13),output_class:r[3],input_class:r[4]})}getModuleFromNodeId(t){var e;const n=this.drawflow.drawflow;return Object.keys(n).map((function(i,o){Object.keys(n[i].data).map((function(n,o){n==t&&(e=i)}))})),e}addModule(t){this.drawflow.drawflow[t]={data:{}},this.dispatch("moduleCreated",t)}changeModule(t){this.dispatch("moduleChanged",t),this.module=t,this.precanvas.innerHTML="",this.canvas_x=0,this.canvas_y=0,this.pos_x=0,this.pos_y=0,this.mouse_x=0,this.mouse_y=0,this.zoom=1,this.zoom_last_value=1,this.precanvas.style.transform="",this.import(this.drawflow,!1)}removeModule(t){this.module===t&&this.changeModule("Home"),delete this.drawflow.drawflow[t],this.dispatch("moduleRemoved",t)}clearModuleSelected(){this.precanvas.innerHTML="",this.drawflow.drawflow[this.module]={data:{}}}clear(){this.precanvas.innerHTML="",this.drawflow={drawflow:{Home:{data:{}}}}}export(){const t=JSON.parse(JSON.stringify(this.drawflow));return this.dispatch("export",t),t}import(t,e=!0){this.clear(),this.drawflow=JSON.parse(JSON.stringify(t)),this.load(),e&&this.dispatch("import","import")}on(t,e){return"function"!=typeof e?(console.error("The listener callback must be a function, the given type is "+typeof e),!1):"string"!=typeof t?(console.error("The event name must be a string, the given type is "+typeof t),!1):(void 0===this.events[t]&&(this.events[t]={listeners:[]}),void this.events[t].listeners.push(e))}removeListener(t,e){if(!this.events[t])return!1;const n=this.events[t].listeners,i=n.indexOf(e);i>-1&&n.splice(i,1)}dispatch(t,e){if(void 0===this.events[t])return!1;this.events[t].listeners.forEach((t=>{t(e)}))}getUuid(){for(var t=[],e=0;e<36;e++)t[e]="0123456789abcdef".substr(Math.floor(16*Math.random()),1);return t[14]="4",t[19]="0123456789abcdef".substr(3&t[19]|8,1),t[8]=t[13]=t[18]=t[23]="-",t.join("")}}}]).default},481:function(t,e){!function(t){var e="1.9.4";function n(t){var e,n,i,o;for(n=1,i=arguments.length;n<i;n++)for(e in o=arguments[n])t[e]=o[e];return t}var i=Object.create||function(){function t(){}return function(e){return t.prototype=e,new t}}();function o(t,e){var n=Array.prototype.slice;if(t.bind)return t.bind.apply(t,n.call(arguments,1));var i=n.call(arguments,2);return function(){return t.apply(e,i.length?i.concat(n.call(arguments)):arguments)}}var r=0;function s(t){return"_leaflet_id"in t||(t._leaflet_id=++r),t._leaflet_id}function a(t,e,n){var i,o,r,s;return s=function(){i=!1,o&&(r.apply(n,o),o=!1)},r=function(){i?o=arguments:(t.apply(n,arguments),setTimeout(s,e),i=!0)},r}function l(t,e,n){var i=e[1],o=e[0],r=i-o;return t===i&&n?t:((t-o)%r+r)%r+o}function c(){return!1}function u(t,e){if(!1===e)return t;var n=Math.pow(10,void 0===e?6:e);return Math.round(t*n)/n}function h(t){return t.trim?t.trim():t.replace(/^\s+|\s+$/g,"")}function d(t){return h(t).split(/\s+/)}function p(t,e){for(var n in Object.prototype.hasOwnProperty.call(t,"options")||(t.options=t.options?i(t.options):{}),e)t.options[n]=e[n];return t.options}function f(t,e,n){var i=[];for(var o in t)i.push(encodeURIComponent(n?o.toUpperCase():o)+"="+encodeURIComponent(t[o]));return(e&&-1!==e.indexOf("?")?"&":"?")+i.join("&")}var m=/\{ *([\w_ -]+) *\}/g;function y(t,e){return t.replace(m,(function(t,n){var i=e[n];if(void 0===i)throw new Error("No value provided for variable "+t);return"function"==typeof i&&(i=i(e)),i}))}var v=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)};function b(t,e){for(var n=0;n<t.length;n++)if(t[n]===e)return n;return-1}var g="data:image/gif;base64,R0lGODlhAQABAAD/ACwAAAAAAQABAAACADs=";function _(t){return window["webkit"+t]||window["moz"+t]||window["ms"+t]}var w=0;function x(t){var e=+new Date,n=Math.max(0,16-(e-w));return w=e+n,window.setTimeout(t,n)}var k=window.requestAnimationFrame||_("RequestAnimationFrame")||x,O=window.cancelAnimationFrame||_("CancelAnimationFrame")||_("CancelRequestAnimationFrame")||function(t){window.clearTimeout(t)};function j(t,e,n){if(!n||k!==x)return k.call(window,o(t,e));t.call(e)}function C(t){t&&O.call(window,t)}var E={__proto__:null,extend:n,create:i,bind:o,get lastId(){return r},stamp:s,throttle:a,wrapNum:l,falseFn:c,formatNum:u,trim:h,splitWords:d,setOptions:p,getParamString:f,template:y,isArray:v,indexOf:b,emptyImageUrl:g,requestFn:k,cancelFn:O,requestAnimFrame:j,cancelAnimFrame:C};function P(){}function S(t){if("undefined"!=typeof L&&L&&L.Mixin){t=v(t)?t:[t];for(var e=0;e<t.length;e++)t[e]===L.Mixin.Events&&console.warn("Deprecated include of L.Mixin.Events: this property will be removed in future releases, please inherit from L.Evented instead.",(new Error).stack)}}P.extend=function(t){var e=function(){p(this),this.initialize&&this.initialize.apply(this,arguments),this.callInitHooks()},o=e.__super__=this.prototype,r=i(o);for(var s in r.constructor=e,e.prototype=r,this)Object.prototype.hasOwnProperty.call(this,s)&&"prototype"!==s&&"__super__"!==s&&(e[s]=this[s]);return t.statics&&n(e,t.statics),t.includes&&(S(t.includes),n.apply(null,[r].concat(t.includes))),n(r,t),delete r.statics,delete r.includes,r.options&&(r.options=o.options?i(o.options):{},n(r.options,t.options)),r._initHooks=[],r.callInitHooks=function(){if(!this._initHooksCalled){o.callInitHooks&&o.callInitHooks.call(this),this._initHooksCalled=!0;for(var t=0,e=r._initHooks.length;t<e;t++)r._initHooks[t].call(this)}},e},P.include=function(t){var e=this.prototype.options;return n(this.prototype,t),t.options&&(this.prototype.options=e,this.mergeOptions(t.options)),this},P.mergeOptions=function(t){return n(this.prototype.options,t),this},P.addInitHook=function(t){var e=Array.prototype.slice.call(arguments,1),n="function"==typeof t?t:function(){this[t].apply(this,e)};return this.prototype._initHooks=this.prototype._initHooks||[],this.prototype._initHooks.push(n),this};var T={on:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n);return this},off:function(t,e,n){if(arguments.length)if("object"==typeof t)for(var i in t)this._off(i,t[i],e);else{t=d(t);for(var o=1===arguments.length,r=0,s=t.length;r<s;r++)o?this._off(t[r]):this._off(t[r],e,n)}else delete this._events;return this},_on:function(t,e,n,i){if("function"==typeof e){if(!1===this._listens(t,e,n)){n===this&&(n=void 0);var o={fn:e,ctx:n};i&&(o.once=!0),this._events=this._events||{},this._events[t]=this._events[t]||[],this._events[t].push(o)}}else console.warn("wrong listener type: "+typeof e)},_off:function(t,e,n){var i,o,r;if(this._events&&(i=this._events[t]))if(1!==arguments.length)if("function"==typeof e){var s=this._listens(t,e,n);if(!1!==s){var a=i[s];this._firingCount&&(a.fn=c,this._events[t]=i=i.slice()),i.splice(s,1)}}else console.warn("wrong listener type: "+typeof e);else{if(this._firingCount)for(o=0,r=i.length;o<r;o++)i[o].fn=c;delete this._events[t]}},fire:function(t,e,i){if(!this.listens(t,i))return this;var o=n({},e,{type:t,target:this,sourceTarget:e&&e.sourceTarget||this});if(this._events){var r=this._events[t];if(r){this._firingCount=this._firingCount+1||1;for(var s=0,a=r.length;s<a;s++){var l=r[s],c=l.fn;l.once&&this.off(t,c,l.ctx),c.call(l.ctx||this,o)}this._firingCount--}}return i&&this._propagateEvent(o),this},listens:function(t,e,n,i){"string"!=typeof t&&console.warn('"string" type argument expected');var o=e;"function"!=typeof e&&(i=!!e,o=void 0,n=void 0);var r=this._events&&this._events[t];if(r&&r.length&&!1!==this._listens(t,o,n))return!0;if(i)for(var s in this._eventParents)if(this._eventParents[s].listens(t,e,n,i))return!0;return!1},_listens:function(t,e,n){if(!this._events)return!1;var i=this._events[t]||[];if(!e)return!!i.length;n===this&&(n=void 0);for(var o=0,r=i.length;o<r;o++)if(i[o].fn===e&&i[o].ctx===n)return o;return!1},once:function(t,e,n){if("object"==typeof t)for(var i in t)this._on(i,t[i],e,!0);else for(var o=0,r=(t=d(t)).length;o<r;o++)this._on(t[o],e,n,!0);return this},addEventParent:function(t){return this._eventParents=this._eventParents||{},this._eventParents[s(t)]=t,this},removeEventParent:function(t){return this._eventParents&&delete this._eventParents[s(t)],this},_propagateEvent:function(t){for(var e in this._eventParents)this._eventParents[e].fire(t.type,n({layer:t.target,propagatedFrom:t.target},t),!0)}};T.addEventListener=T.on,T.removeEventListener=T.clearAllEventListeners=T.off,T.addOneTimeEventListener=T.once,T.fireEvent=T.fire,T.hasEventListeners=T.listens;var A=P.extend(T);function R(t,e,n){this.x=n?Math.round(t):t,this.y=n?Math.round(e):e}var B=Math.trunc||function(t){return t>0?Math.floor(t):Math.ceil(t)};function I(t,e,n){return t instanceof R?t:v(t)?new R(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new R(t.x,t.y):new R(t,e,n)}function z(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function M(t,e){return!t||t instanceof z?t:new z(t,e)}function N(t,e){if(t)for(var n=e?[t,e]:t,i=0,o=n.length;i<o;i++)this.extend(n[i])}function D(t,e){return t instanceof N?t:new N(t,e)}function F(t,e,n){if(isNaN(t)||isNaN(e))throw new Error("Invalid LatLng object: ("+t+", "+e+")");this.lat=+t,this.lng=+e,void 0!==n&&(this.alt=+n)}function H(t,e,n){return t instanceof F?t:v(t)&&"object"!=typeof t[0]?3===t.length?new F(t[0],t[1],t[2]):2===t.length?new F(t[0],t[1]):null:null==t?t:"object"==typeof t&&"lat"in t?new F(t.lat,"lng"in t?t.lng:t.lon,t.alt):void 0===e?null:new F(t,e,n)}R.prototype={clone:function(){return new R(this.x,this.y)},add:function(t){return this.clone()._add(I(t))},_add:function(t){return this.x+=t.x,this.y+=t.y,this},subtract:function(t){return this.clone()._subtract(I(t))},_subtract:function(t){return this.x-=t.x,this.y-=t.y,this},divideBy:function(t){return this.clone()._divideBy(t)},_divideBy:function(t){return this.x/=t,this.y/=t,this},multiplyBy:function(t){return this.clone()._multiplyBy(t)},_multiplyBy:function(t){return this.x*=t,this.y*=t,this},scaleBy:function(t){return new R(this.x*t.x,this.y*t.y)},unscaleBy:function(t){return new R(this.x/t.x,this.y/t.y)},round:function(){return this.clone()._round()},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},floor:function(){return this.clone()._floor()},_floor:function(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this},ceil:function(){return this.clone()._ceil()},_ceil:function(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this},trunc:function(){return this.clone()._trunc()},_trunc:function(){return this.x=B(this.x),this.y=B(this.y),this},distanceTo:function(t){var e=(t=I(t)).x-this.x,n=t.y-this.y;return Math.sqrt(e*e+n*n)},equals:function(t){return(t=I(t)).x===this.x&&t.y===this.y},contains:function(t){return t=I(t),Math.abs(t.x)<=Math.abs(this.x)&&Math.abs(t.y)<=Math.abs(this.y)},toString:function(){return"Point("+u(this.x)+", "+u(this.y)+")"}},z.prototype={extend:function(t){var e,n;if(!t)return this;if(t instanceof R||"number"==typeof t[0]||"x"in t)e=n=I(t);else if(e=(t=M(t)).min,n=t.max,!e||!n)return this;return this.min||this.max?(this.min.x=Math.min(e.x,this.min.x),this.max.x=Math.max(n.x,this.max.x),this.min.y=Math.min(e.y,this.min.y),this.max.y=Math.max(n.y,this.max.y)):(this.min=e.clone(),this.max=n.clone()),this},getCenter:function(t){return I((this.min.x+this.max.x)/2,(this.min.y+this.max.y)/2,t)},getBottomLeft:function(){return I(this.min.x,this.max.y)},getTopRight:function(){return I(this.max.x,this.min.y)},getTopLeft:function(){return this.min},getBottomRight:function(){return this.max},getSize:function(){return this.max.subtract(this.min)},contains:function(t){var e,n;return(t="number"==typeof t[0]||t instanceof R?I(t):M(t))instanceof z?(e=t.min,n=t.max):e=n=t,e.x>=this.min.x&&n.x<=this.max.x&&e.y>=this.min.y&&n.y<=this.max.y},intersects:function(t){t=M(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>=e.x&&i.x<=n.x,s=o.y>=e.y&&i.y<=n.y;return r&&s},overlaps:function(t){t=M(t);var e=this.min,n=this.max,i=t.min,o=t.max,r=o.x>e.x&&i.x<n.x,s=o.y>e.y&&i.y<n.y;return r&&s},isValid:function(){return!(!this.min||!this.max)},pad:function(t){var e=this.min,n=this.max,i=Math.abs(e.x-n.x)*t,o=Math.abs(e.y-n.y)*t;return M(I(e.x-i,e.y-o),I(n.x+i,n.y+o))},equals:function(t){return!!t&&(t=M(t),this.min.equals(t.getTopLeft())&&this.max.equals(t.getBottomRight()))}},N.prototype={extend:function(t){var e,n,i=this._southWest,o=this._northEast;if(t instanceof F)e=t,n=t;else{if(!(t instanceof N))return t?this.extend(H(t)||D(t)):this;if(e=t._southWest,n=t._northEast,!e||!n)return this}return i||o?(i.lat=Math.min(e.lat,i.lat),i.lng=Math.min(e.lng,i.lng),o.lat=Math.max(n.lat,o.lat),o.lng=Math.max(n.lng,o.lng)):(this._southWest=new F(e.lat,e.lng),this._northEast=new F(n.lat,n.lng)),this},pad:function(t){var e=this._southWest,n=this._northEast,i=Math.abs(e.lat-n.lat)*t,o=Math.abs(e.lng-n.lng)*t;return new N(new F(e.lat-i,e.lng-o),new F(n.lat+i,n.lng+o))},getCenter:function(){return new F((this._southWest.lat+this._northEast.lat)/2,(this._southWest.lng+this._northEast.lng)/2)},getSouthWest:function(){return this._southWest},getNorthEast:function(){return this._northEast},getNorthWest:function(){return new F(this.getNorth(),this.getWest())},getSouthEast:function(){return new F(this.getSouth(),this.getEast())},getWest:function(){return this._southWest.lng},getSouth:function(){return this._southWest.lat},getEast:function(){return this._northEast.lng},getNorth:function(){return this._northEast.lat},contains:function(t){t="number"==typeof t[0]||t instanceof F||"lat"in t?H(t):D(t);var e,n,i=this._southWest,o=this._northEast;return t instanceof N?(e=t.getSouthWest(),n=t.getNorthEast()):e=n=t,e.lat>=i.lat&&n.lat<=o.lat&&e.lng>=i.lng&&n.lng<=o.lng},intersects:function(t){t=D(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>=e.lat&&i.lat<=n.lat,s=o.lng>=e.lng&&i.lng<=n.lng;return r&&s},overlaps:function(t){t=D(t);var e=this._southWest,n=this._northEast,i=t.getSouthWest(),o=t.getNorthEast(),r=o.lat>e.lat&&i.lat<n.lat,s=o.lng>e.lng&&i.lng<n.lng;return r&&s},toBBoxString:function(){return[this.getWest(),this.getSouth(),this.getEast(),this.getNorth()].join(",")},equals:function(t,e){return!!t&&(t=D(t),this._southWest.equals(t.getSouthWest(),e)&&this._northEast.equals(t.getNorthEast(),e))},isValid:function(){return!(!this._southWest||!this._northEast)}},F.prototype={equals:function(t,e){return!!t&&(t=H(t),Math.max(Math.abs(this.lat-t.lat),Math.abs(this.lng-t.lng))<=(void 0===e?1e-9:e))},toString:function(t){return"LatLng("+u(this.lat,t)+", "+u(this.lng,t)+")"},distanceTo:function(t){return q.distance(this,H(t))},wrap:function(){return q.wrapLatLng(this)},toBounds:function(t){var e=180*t/40075017,n=e/Math.cos(Math.PI/180*this.lat);return D([this.lat-e,this.lng-n],[this.lat+e,this.lng+n])},clone:function(){return new F(this.lat,this.lng,this.alt)}};var V,Z={latLngToPoint:function(t,e){var n=this.projection.project(t),i=this.scale(e);return this.transformation._transform(n,i)},pointToLatLng:function(t,e){var n=this.scale(e),i=this.transformation.untransform(t,n);return this.projection.unproject(i)},project:function(t){return this.projection.project(t)},unproject:function(t){return this.projection.unproject(t)},scale:function(t){return 256*Math.pow(2,t)},zoom:function(t){return Math.log(t/256)/Math.LN2},getProjectedBounds:function(t){if(this.infinite)return null;var e=this.projection.bounds,n=this.scale(t);return new z(this.transformation.transform(e.min,n),this.transformation.transform(e.max,n))},infinite:!1,wrapLatLng:function(t){var e=this.wrapLng?l(t.lng,this.wrapLng,!0):t.lng;return new F(this.wrapLat?l(t.lat,this.wrapLat,!0):t.lat,e,t.alt)},wrapLatLngBounds:function(t){var e=t.getCenter(),n=this.wrapLatLng(e),i=e.lat-n.lat,o=e.lng-n.lng;if(0===i&&0===o)return t;var r=t.getSouthWest(),s=t.getNorthEast();return new N(new F(r.lat-i,r.lng-o),new F(s.lat-i,s.lng-o))}},q=n({},Z,{wrapLng:[-180,180],R:6371e3,distance:function(t,e){var n=Math.PI/180,i=t.lat*n,o=e.lat*n,r=Math.sin((e.lat-t.lat)*n/2),s=Math.sin((e.lng-t.lng)*n/2),a=r*r+Math.cos(i)*Math.cos(o)*s*s,l=2*Math.atan2(Math.sqrt(a),Math.sqrt(1-a));return this.R*l}}),U=6378137,W={R:U,MAX_LATITUDE:85.0511287798,project:function(t){var e=Math.PI/180,n=this.MAX_LATITUDE,i=Math.max(Math.min(n,t.lat),-n),o=Math.sin(i*e);return new R(this.R*t.lng*e,this.R*Math.log((1+o)/(1-o))/2)},unproject:function(t){var e=180/Math.PI;return new F((2*Math.atan(Math.exp(t.y/this.R))-Math.PI/2)*e,t.x*e/this.R)},bounds:(V=U*Math.PI,new z([-V,-V],[V,V]))};function G(t,e,n,i){if(v(t))return this._a=t[0],this._b=t[1],this._c=t[2],void(this._d=t[3]);this._a=t,this._b=e,this._c=n,this._d=i}function J(t,e,n,i){return new G(t,e,n,i)}G.prototype={transform:function(t,e){return this._transform(t.clone(),e)},_transform:function(t,e){return e=e||1,t.x=e*(this._a*t.x+this._b),t.y=e*(this._c*t.y+this._d),t},untransform:function(t,e){return e=e||1,new R((t.x/e-this._b)/this._a,(t.y/e-this._d)/this._c)}};var $=n({},q,{code:"EPSG:3857",projection:W,transformation:function(){var t=.5/(Math.PI*W.R);return J(t,.5,-t,.5)}()}),Y=n({},$,{code:"EPSG:900913"});function K(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function X(t,e){var n,i,o,r,s,a,l="";for(n=0,o=t.length;n<o;n++){for(i=0,r=(s=t[n]).length;i<r;i++)l+=(i?"L":"M")+(a=s[i]).x+" "+a.y;l+=e?Nt.svg?"z":"x":""}return l||"M0 0"}var Q,tt=document.documentElement.style,et="ActiveXObject"in window,nt=et&&!document.addEventListener,it="msLaunchUri"in navigator&&!("documentMode"in document),ot=Mt("webkit"),rt=Mt("android"),st=Mt("android 2")||Mt("android 3"),at=parseInt(/WebKit\/([0-9]+)|$/.exec(navigator.userAgent)[1],10),lt=rt&&Mt("Google")&&at<537&&!("AudioNode"in window),ct=!!window.opera,ut=!it&&Mt("chrome"),ht=Mt("gecko")&&!ot&&!ct&&!et,dt=!ut&&Mt("safari"),pt=Mt("phantom"),ft="OTransition"in tt,mt=0===navigator.platform.indexOf("Win"),yt=et&&"transition"in tt,vt="WebKitCSSMatrix"in window&&"m11"in new window.WebKitCSSMatrix&&!st,bt="MozPerspective"in tt,gt=!window.L_DISABLE_3D&&(yt||vt||bt)&&!ft&&!pt,_t="undefined"!=typeof orientation||Mt("mobile"),wt=_t&&ot,xt=_t&&vt,kt=!window.PointerEvent&&window.MSPointerEvent,Ot=!(!window.PointerEvent&&!kt),jt="ontouchstart"in window||!!window.TouchEvent,Ct=!window.L_NO_TOUCH&&(jt||Ot),Et=_t&&ct,Pt=_t&&ht,Lt=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,St=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",c,e),window.removeEventListener("testPassiveEventSupport",c,e)}catch(t){}return t}(),Tt=!!document.createElement("canvas").getContext,At=!(!document.createElementNS||!K("svg").createSVGRect),Rt=!!At&&((Q=document.createElement("div")).innerHTML="<svg/>","http://www.w3.org/2000/svg"===(Q.firstChild&&Q.firstChild.namespaceURI)),Bt=!At&&function(){try{var t=document.createElement("div");t.innerHTML='<v:shape adj="1"/>';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}(),It=0===navigator.platform.indexOf("Mac"),zt=0===navigator.platform.indexOf("Linux");function Mt(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var Nt={ie:et,ielt9:nt,edge:it,webkit:ot,android:rt,android23:st,androidStock:lt,opera:ct,chrome:ut,gecko:ht,safari:dt,phantom:pt,opera12:ft,win:mt,ie3d:yt,webkit3d:vt,gecko3d:bt,any3d:gt,mobile:_t,mobileWebkit:wt,mobileWebkit3d:xt,msPointer:kt,pointer:Ot,touch:Ct,touchNative:jt,mobileOpera:Et,mobileGecko:Pt,retina:Lt,passiveEvents:St,canvas:Tt,svg:At,vml:Bt,inlineSvg:Rt,mac:It,linux:zt},Dt=Nt.msPointer?"MSPointerDown":"pointerdown",Ft=Nt.msPointer?"MSPointerMove":"pointermove",Ht=Nt.msPointer?"MSPointerUp":"pointerup",Vt=Nt.msPointer?"MSPointerCancel":"pointercancel",Zt={touchstart:Dt,touchmove:Ft,touchend:Ht,touchcancel:Vt},qt={touchstart:te,touchmove:Qt,touchend:Qt,touchcancel:Qt},Ut={},Wt=!1;function Gt(t,e,n){return"touchstart"===e&&Xt(),qt[e]?(n=qt[e].bind(this,n),t.addEventListener(Zt[e],n,!1),n):(console.warn("wrong event specified:",e),c)}function Jt(t,e,n){Zt[e]?t.removeEventListener(Zt[e],n,!1):console.warn("wrong event specified:",e)}function $t(t){Ut[t.pointerId]=t}function Yt(t){Ut[t.pointerId]&&(Ut[t.pointerId]=t)}function Kt(t){delete Ut[t.pointerId]}function Xt(){Wt||(document.addEventListener(Dt,$t,!0),document.addEventListener(Ft,Yt,!0),document.addEventListener(Ht,Kt,!0),document.addEventListener(Vt,Kt,!0),Wt=!0)}function Qt(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var n in e.touches=[],Ut)e.touches.push(Ut[n]);e.changedTouches=[e],t(e)}}function te(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&$e(e),Qt(t,e)}function ee(t){var e,n,i={};for(n in t)e=t[n],i[n]=e&&e.bind?e.bind(t):e;return t=i,i.type="dblclick",i.detail=2,i.isTrusted=!1,i._simulated=!0,i}var ne=200;function ie(t,e){t.addEventListener("dblclick",e);var n,i=0;function o(t){if(1===t.detail){if("mouse"!==t.pointerType&&(!t.sourceCapabilities||t.sourceCapabilities.firesTouchEvents)){var o=Ke(t);if(!o.some((function(t){return t instanceof HTMLLabelElement&&t.attributes.for}))||o.some((function(t){return t instanceof HTMLInputElement||t instanceof HTMLSelectElement}))){var r=Date.now();r-i<=ne?2==++n&&e(ee(t)):n=1,i=r}}}else n=t.detail}return t.addEventListener("click",o),{dblclick:e,simDblclick:o}}function oe(t,e){t.removeEventListener("dblclick",e.dblclick),t.removeEventListener("click",e.simDblclick)}var re,se,ae,le,ce,ue=Ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),he=Ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),de="webkitTransition"===he||"OTransition"===he?he+"End":"transitionend";function pe(t){return"string"==typeof t?document.getElementById(t):t}function fe(t,e){var n=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!n||"auto"===n)&&document.defaultView){var i=document.defaultView.getComputedStyle(t,null);n=i?i[e]:null}return"auto"===n?null:n}function me(t,e,n){var i=document.createElement(t);return i.className=e||"",n&&n.appendChild(i),i}function ye(t){var e=t.parentNode;e&&e.removeChild(t)}function ve(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function be(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function ge(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function _e(t,e){if(void 0!==t.classList)return t.classList.contains(e);var n=Oe(t);return n.length>0&&new RegExp("(^|\\s)"+e+"(\\s|$)").test(n)}function we(t,e){if(void 0!==t.classList)for(var n=d(e),i=0,o=n.length;i<o;i++)t.classList.add(n[i]);else if(!_e(t,e)){var r=Oe(t);ke(t,(r?r+" ":"")+e)}}function xe(t,e){void 0!==t.classList?t.classList.remove(e):ke(t,h((" "+Oe(t)+" ").replace(" "+e+" "," ")))}function ke(t,e){void 0===t.className.baseVal?t.className=e:t.className.baseVal=e}function Oe(t){return t.correspondingElement&&(t=t.correspondingElement),void 0===t.className.baseVal?t.className:t.className.baseVal}function je(t,e){"opacity"in t.style?t.style.opacity=e:"filter"in t.style&&Ce(t,e)}function Ce(t,e){var n=!1,i="DXImageTransform.Microsoft.Alpha";try{n=t.filters.item(i)}catch(t){if(1===e)return}e=Math.round(100*e),n?(n.Enabled=100!==e,n.Opacity=e):t.style.filter+=" progid:"+i+"(opacity="+e+")"}function Ee(t){for(var e=document.documentElement.style,n=0;n<t.length;n++)if(t[n]in e)return t[n];return!1}function Pe(t,e,n){var i=e||new R(0,0);t.style[ue]=(Nt.ie3d?"translate("+i.x+"px,"+i.y+"px)":"translate3d("+i.x+"px,"+i.y+"px,0)")+(n?" scale("+n+")":"")}function Le(t,e){t._leaflet_pos=e,Nt.any3d?Pe(t,e):(t.style.left=e.x+"px",t.style.top=e.y+"px")}function Se(t){return t._leaflet_pos||new R(0,0)}if("onselectstart"in document)re=function(){De(window,"selectstart",$e)},se=function(){He(window,"selectstart",$e)};else{var Te=Ee(["userSelect","WebkitUserSelect","OUserSelect","MozUserSelect","msUserSelect"]);re=function(){if(Te){var t=document.documentElement.style;ae=t[Te],t[Te]="none"}},se=function(){Te&&(document.documentElement.style[Te]=ae,ae=void 0)}}function Ae(){De(window,"dragstart",$e)}function Re(){He(window,"dragstart",$e)}function Be(t){for(;-1===t.tabIndex;)t=t.parentNode;t.style&&(Ie(),le=t,ce=t.style.outlineStyle,t.style.outlineStyle="none",De(window,"keydown",Ie))}function Ie(){le&&(le.style.outlineStyle=ce,le=void 0,ce=void 0,He(window,"keydown",Ie))}function ze(t){do{t=t.parentNode}while(!(t.offsetWidth&&t.offsetHeight||t===document.body));return t}function Me(t){var e=t.getBoundingClientRect();return{x:e.width/t.offsetWidth||1,y:e.height/t.offsetHeight||1,boundingClientRect:e}}var Ne={__proto__:null,TRANSFORM:ue,TRANSITION:he,TRANSITION_END:de,get:pe,getStyle:fe,create:me,remove:ye,empty:ve,toFront:be,toBack:ge,hasClass:_e,addClass:we,removeClass:xe,setClass:ke,getClass:Oe,setOpacity:je,testProp:Ee,setTransform:Pe,setPosition:Le,getPosition:Se,get disableTextSelection(){return re},get enableTextSelection(){return se},disableImageDrag:Ae,enableImageDrag:Re,preventOutline:Be,restoreOutline:Ie,getSizedParentNode:ze,getScale:Me};function De(t,e,n,i){if(e&&"object"==typeof e)for(var o in e)qe(t,o,e[o],n);else for(var r=0,s=(e=d(e)).length;r<s;r++)qe(t,e[r],n,i);return this}var Fe="_leaflet_events";function He(t,e,n,i){if(1===arguments.length)Ve(t),delete t[Fe];else if(e&&"object"==typeof e)for(var o in e)Ue(t,o,e[o],n);else if(e=d(e),2===arguments.length)Ve(t,(function(t){return-1!==b(e,t)}));else for(var r=0,s=e.length;r<s;r++)Ue(t,e[r],n,i);return this}function Ve(t,e){for(var n in t[Fe]){var i=n.split(/\d/)[0];e&&!e(i)||Ue(t,i,null,null,n)}}var Ze={mouseenter:"mouseover",mouseleave:"mouseout",wheel:!("onwheel"in window)&&"mousewheel"};function qe(t,e,n,i){var o=e+s(n)+(i?"_"+s(i):"");if(t[Fe]&&t[Fe][o])return this;var r=function(e){return n.call(i||t,e||window.event)},a=r;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?r=Gt(t,e,r):Nt.touch&&"dblclick"===e?r=ie(t,r):"addEventListener"in t?"touchstart"===e||"touchmove"===e||"wheel"===e||"mousewheel"===e?t.addEventListener(Ze[e]||e,r,!!Nt.passiveEvents&&{passive:!1}):"mouseenter"===e||"mouseleave"===e?(r=function(e){e=e||window.event,en(t,e)&&a(e)},t.addEventListener(Ze[e],r,!1)):t.addEventListener(e,a,!1):t.attachEvent("on"+e,r),t[Fe]=t[Fe]||{},t[Fe][o]=r}function Ue(t,e,n,i,o){o=o||e+s(n)+(i?"_"+s(i):"");var r=t[Fe]&&t[Fe][o];if(!r)return this;!Nt.touchNative&&Nt.pointer&&0===e.indexOf("touch")?Jt(t,e,r):Nt.touch&&"dblclick"===e?oe(t,r):"removeEventListener"in t?t.removeEventListener(Ze[e]||e,r,!1):t.detachEvent("on"+e,r),t[Fe][o]=null}function We(t){return t.stopPropagation?t.stopPropagation():t.originalEvent?t.originalEvent._stopped=!0:t.cancelBubble=!0,this}function Ge(t){return qe(t,"wheel",We),this}function Je(t){return De(t,"mousedown touchstart dblclick contextmenu",We),t._leaflet_disable_click=!0,this}function $e(t){return t.preventDefault?t.preventDefault():t.returnValue=!1,this}function Ye(t){return $e(t),We(t),this}function Ke(t){if(t.composedPath)return t.composedPath();for(var e=[],n=t.target;n;)e.push(n),n=n.parentNode;return e}function Xe(t,e){if(!e)return new R(t.clientX,t.clientY);var n=Me(e),i=n.boundingClientRect;return new R((t.clientX-i.left)/n.x-e.clientLeft,(t.clientY-i.top)/n.y-e.clientTop)}var Qe=Nt.linux&&Nt.chrome?window.devicePixelRatio:Nt.mac?3*window.devicePixelRatio:window.devicePixelRatio>0?2*window.devicePixelRatio:1;function tn(t){return Nt.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/Qe:t.deltaY&&1===t.deltaMode?20*-t.deltaY:t.deltaY&&2===t.deltaMode?60*-t.deltaY:t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&Math.abs(t.detail)<32765?20*-t.detail:t.detail?t.detail/-32765*60:0}function en(t,e){var n=e.relatedTarget;if(!n)return!0;try{for(;n&&n!==t;)n=n.parentNode}catch(t){return!1}return n!==t}var nn={__proto__:null,on:De,off:He,stopPropagation:We,disableScrollPropagation:Ge,disableClickPropagation:Je,preventDefault:$e,stop:Ye,getPropagationPath:Ke,getMousePosition:Xe,getWheelDelta:tn,isExternalTarget:en,addListener:De,removeListener:He},on=A.extend({run:function(t,e,n,i){this.stop(),this._el=t,this._inProgress=!0,this._duration=n||.25,this._easeOutPower=1/Math.max(i||.5,.2),this._startPos=Se(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=j(this._animate,this),this._step()},_step:function(t){var e=+new Date-this._startTime,n=1e3*this._duration;e<n?this._runFrame(this._easeOut(e/n),t):(this._runFrame(1),this._complete())},_runFrame:function(t,e){var n=this._startPos.add(this._offset.multiplyBy(t));e&&n._round(),Le(this._el,n),this.fire("step")},_complete:function(){C(this._animId),this._inProgress=!1,this.fire("end")},_easeOut:function(t){return 1-Math.pow(1-t,this._easeOutPower)}}),rn=A.extend({options:{crs:$,center:void 0,zoom:void 0,minZoom:void 0,maxZoom:void 0,layers:[],maxBounds:void 0,renderer:void 0,zoomAnimation:!0,zoomAnimationThreshold:4,fadeAnimation:!0,markerZoomAnimation:!0,transform3DLimit:8388608,zoomSnap:1,zoomDelta:1,trackResize:!0},initialize:function(t,e){e=p(this,e),this._handlers=[],this._layers={},this._zoomBoundLayers={},this._sizeChanged=!0,this._initContainer(t),this._initLayout(),this._onResize=o(this._onResize,this),this._initEvents(),e.maxBounds&&this.setMaxBounds(e.maxBounds),void 0!==e.zoom&&(this._zoom=this._limitZoom(e.zoom)),e.center&&void 0!==e.zoom&&this.setView(H(e.center),e.zoom,{reset:!0}),this.callInitHooks(),this._zoomAnimated=he&&Nt.any3d&&!Nt.mobileOpera&&this.options.zoomAnimation,this._zoomAnimated&&(this._createAnimProxy(),De(this._proxy,de,this._catchTransitionEnd,this)),this._addLayers(this.options.layers)},setView:function(t,e,i){return e=void 0===e?this._zoom:this._limitZoom(e),t=this._limitCenter(H(t),e,this.options.maxBounds),i=i||{},this._stop(),this._loaded&&!i.reset&&!0!==i&&(void 0!==i.animate&&(i.zoom=n({animate:i.animate},i.zoom),i.pan=n({animate:i.animate,duration:i.duration},i.pan)),this._zoom!==e?this._tryAnimatedZoom&&this._tryAnimatedZoom(t,e,i.zoom):this._tryAnimatedPan(t,i.pan))?(clearTimeout(this._sizeTimer),this):(this._resetView(t,e,i.pan&&i.pan.noMoveStart),this)},setZoom:function(t,e){return this._loaded?this.setView(this.getCenter(),t,{zoom:e}):(this._zoom=t,this)},zoomIn:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom+t,e)},zoomOut:function(t,e){return t=t||(Nt.any3d?this.options.zoomDelta:1),this.setZoom(this._zoom-t,e)},setZoomAround:function(t,e,n){var i=this.getZoomScale(e),o=this.getSize().divideBy(2),r=(t instanceof R?t:this.latLngToContainerPoint(t)).subtract(o).multiplyBy(1-1/i),s=this.containerPointToLatLng(o.add(r));return this.setView(s,e,{zoom:n})},_getBoundsCenterZoom:function(t,e){e=e||{},t=t.getBounds?t.getBounds():D(t);var n=I(e.paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.getBoundsZoom(t,!1,n.add(i));if((o="number"==typeof e.maxZoom?Math.min(e.maxZoom,o):o)===1/0)return{center:t.getCenter(),zoom:o};var r=i.subtract(n).divideBy(2),s=this.project(t.getSouthWest(),o),a=this.project(t.getNorthEast(),o);return{center:this.unproject(s.add(a).divideBy(2).add(r),o),zoom:o}},fitBounds:function(t,e){if(!(t=D(t)).isValid())throw new Error("Bounds are not valid.");var n=this._getBoundsCenterZoom(t,e);return this.setView(n.center,n.zoom,e)},fitWorld:function(t){return this.fitBounds([[-90,-180],[90,180]],t)},panTo:function(t,e){return this.setView(t,this._zoom,{pan:e})},panBy:function(t,e){if(e=e||{},!(t=I(t).round()).x&&!t.y)return this.fire("moveend");if(!0!==e.animate&&!this.getSize().contains(t))return this._resetView(this.unproject(this.project(this.getCenter()).add(t)),this.getZoom()),this;if(this._panAnim||(this._panAnim=new on,this._panAnim.on({step:this._onPanTransitionStep,end:this._onPanTransitionEnd},this)),e.noMoveStart||this.fire("movestart"),!1!==e.animate){we(this._mapPane,"leaflet-pan-anim");var n=this._getMapPanePos().subtract(t).round();this._panAnim.run(this._mapPane,n,e.duration||.25,e.easeLinearity)}else this._rawPanBy(t),this.fire("move").fire("moveend");return this},flyTo:function(t,e,n){if(!1===(n=n||{}).animate||!Nt.any3d)return this.setView(t,e,n);this._stop();var i=this.project(this.getCenter()),o=this.project(t),r=this.getSize(),s=this._zoom;t=H(t),e=void 0===e?s:e;var a=Math.max(r.x,r.y),l=a*this.getZoomScale(s,e),c=o.distanceTo(i)||1,u=1.42,h=u*u;function d(t){var e=(l*l-a*a+(t?-1:1)*h*h*c*c)/(2*(t?l:a)*h*c),n=Math.sqrt(e*e+1)-e;return n<1e-9?-18:Math.log(n)}function p(t){return(Math.exp(t)-Math.exp(-t))/2}function f(t){return(Math.exp(t)+Math.exp(-t))/2}function m(t){return p(t)/f(t)}var y=d(0);function v(t){return a*(f(y)/f(y+u*t))}function b(t){return a*(f(y)*m(y+u*t)-p(y))/h}function g(t){return 1-Math.pow(1-t,1.5)}var _=Date.now(),w=(d(1)-y)/u,x=n.duration?1e3*n.duration:1e3*w*.8;function k(){var n=(Date.now()-_)/x,r=g(n)*w;n<=1?(this._flyToFrame=j(k,this),this._move(this.unproject(i.add(o.subtract(i).multiplyBy(b(r)/c)),s),this.getScaleZoom(a/v(r),s),{flyTo:!0})):this._move(t,e)._moveEnd(!0)}return this._moveStart(!0,n.noMoveStart),k.call(this),this},flyToBounds:function(t,e){var n=this._getBoundsCenterZoom(t,e);return this.flyTo(n.center,n.zoom,e)},setMaxBounds:function(t){return t=D(t),this.listens("moveend",this._panInsideMaxBounds)&&this.off("moveend",this._panInsideMaxBounds),t.isValid()?(this.options.maxBounds=t,this._loaded&&this._panInsideMaxBounds(),this.on("moveend",this._panInsideMaxBounds)):(this.options.maxBounds=null,this)},setMinZoom:function(t){var e=this.options.minZoom;return this.options.minZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()<this.options.minZoom)?this.setZoom(t):this},setMaxZoom:function(t){var e=this.options.maxZoom;return this.options.maxZoom=t,this._loaded&&e!==t&&(this.fire("zoomlevelschange"),this.getZoom()>this.options.maxZoom)?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var n=this.getCenter(),i=this._limitCenter(n,this._zoom,D(t));return n.equals(i)||this.panTo(i,e),this._enforcingBounds=!1,this},panInside:function(t,e){var n=I((e=e||{}).paddingTopLeft||e.padding||[0,0]),i=I(e.paddingBottomRight||e.padding||[0,0]),o=this.project(this.getCenter()),r=this.project(t),s=this.getPixelBounds(),a=M([s.min.add(n),s.max.subtract(i)]),l=a.getSize();if(!a.contains(r)){this._enforcingBounds=!0;var c=r.subtract(a.getCenter()),u=a.extend(r).getSize().subtract(l);o.x+=c.x<0?-u.x:u.x,o.y+=c.y<0?-u.y:u.y,this.panTo(this.unproject(o),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=n({animate:!1,pan:!0},!0===t?{animate:!0}:t);var e=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var i=this.getSize(),r=e.divideBy(2).round(),s=i.divideBy(2).round(),a=r.subtract(s);return a.x||a.y?(t.animate&&t.pan?this.panBy(a):(t.pan&&this._rawPanBy(a),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(o(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:e,newSize:i})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=n({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var e=o(this._handleGeolocationResponse,this),i=o(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(e,i,t):navigator.geolocation.getCurrentPosition(e,i,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,n=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+n+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new F(t.coords.latitude,t.coords.longitude),n=e.toBounds(2*t.coords.accuracy),i=this._locateOptions;if(i.setView){var o=this.getBoundsZoom(n);this.setView(e,i.maxZoom?Math.min(o,i.maxZoom):o)}var r={latlng:e,bounds:n,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(r[s]=t.coords[s]);this.fire("locationfound",r)}},addHandler:function(t,e){if(!e)return this;var n=this[t]=new e(this);return this._handlers.push(n),this.options[t]&&n.enable(),this},remove:function(){if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw new Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}var t;for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),ye(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(C(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)ye(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var n=me("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=n),n},getCenter:function(){return this._checkIfLoaded(),this._lastCenter&&!this._moved()?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new N(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,n){t=D(t),n=I(n||[0,0]);var i=this.getZoom()||0,o=this.getMinZoom(),r=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(n),c=M(this.project(a,i),this.project(s,i)).getSize(),u=Nt.any3d?this.options.zoomSnap:1,h=l.x/c.x,d=l.y/c.y,p=e?Math.max(h,d):Math.min(h,d);return i=this.getScaleZoom(p,i),u&&(i=Math.round(i/(u/100))*(u/100),i=e?Math.ceil(i/u)*u:Math.floor(i/u)*u),Math.max(o,Math.min(r,i))},getSize:function(){return this._size&&!this._sizeChanged||(this._size=new R(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var n=this._getTopLeftPoint(t,e);return new z(n,n.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var n=this.options.crs;return e=void 0===e?this._zoom:e,n.scale(t)/n.scale(e)},getScaleZoom:function(t,e){var n=this.options.crs;e=void 0===e?this._zoom:e;var i=n.zoom(t*n.scale(e));return isNaN(i)?1/0:i},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(H(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(I(t),e)},layerPointToLatLng:function(t){var e=I(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(H(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(H(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(D(t))},distance:function(t,e){return this.options.crs.distance(H(t),H(e))},containerPointToLayerPoint:function(t){return I(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return I(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(I(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(H(t)))},mouseEventToContainerPoint:function(t){return Xe(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=pe(t);if(!e)throw new Error("Map container not found.");if(e._leaflet_id)throw new Error("Map container is already initialized.");De(e,"scroll",this._onScroll,this),this._containerId=s(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&Nt.any3d,we(t,"leaflet-container"+(Nt.touch?" leaflet-touch":"")+(Nt.retina?" leaflet-retina":"")+(Nt.ielt9?" leaflet-oldie":"")+(Nt.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=fe(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),Le(this._mapPane,new R(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(we(t.markerPane,"leaflet-zoom-hide"),we(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,n){Le(this._mapPane,new R(0,0));var i=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var o=this._zoom!==e;this._moveStart(o,n)._move(t,e)._moveEnd(o),this.fire("viewreset"),i&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,n,i){void 0===e&&(e=this._zoom);var o=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),i?n&&n.pinch&&this.fire("zoom",n):((o||n&&n.pinch)&&this.fire("zoom",n),this.fire("move",n)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return C(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){Le(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw new Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[s(this._container)]=this;var e=t?He:De;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),Nt.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){C(this._resizeRequest),this._resizeRequest=j((function(){this.invalidateSize({debounceMoveend:!0})}),this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var n,i=[],o="mouseout"===e||"mouseover"===e,r=t.target||t.srcElement,a=!1;r;){if((n=this._targets[s(r)])&&("click"===e||"preclick"===e)&&this._draggableMoved(n)){a=!0;break}if(n&&n.listens(e,!0)){if(o&&!en(r,t))break;if(i.push(n),o)break}if(r===this._container)break;r=r.parentNode}return i.length||a||o||!this.listens(e,!0)||(i=[this]),i},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var n=t.type;"mousedown"===n&&Be(e),this._fireDOMEvent(t,n)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,e,i){if("click"===t.type){var o=n({},t);o.type="preclick",this._fireDOMEvent(o,o.type,i)}var r=this._findEventTargets(t,e);if(i){for(var s=[],a=0;a<i.length;a++)i[a].listens(e,!0)&&s.push(i[a]);r=s.concat(r)}if(r.length){"contextmenu"===e&&$e(t);var l=r[0],c={originalEvent:t};if("keypress"!==t.type&&"keydown"!==t.type&&"keyup"!==t.type){var u=l.getLatLng&&(!l._radius||l._radius<=10);c.containerPoint=u?this.latLngToContainerPoint(l.getLatLng()):this.mouseEventToContainerPoint(t),c.layerPoint=this.containerPointToLayerPoint(c.containerPoint),c.latlng=u?l.getLatLng():this.layerPointToLatLng(c.layerPoint)}for(a=0;a<r.length;a++)if(r[a].fire(e,c,!0),c.originalEvent._stopped||!1===r[a].options.bubblingMouseEvents&&-1!==b(this._mouseEvents,e))return}},_draggableMoved:function(t){return(t=t.dragging&&t.dragging.enabled()?t:this).dragging&&t.dragging.moved()||this.boxZoom&&this.boxZoom.moved()},_clearHandlers:function(){for(var t=0,e=this._handlers.length;t<e;t++)this._handlers[t].disable()},whenReady:function(t,e){return this._loaded?t.call(e||this,{target:this}):this.on("load",t,e),this},_getMapPanePos:function(){return Se(this._mapPane)||new R(0,0)},_moved:function(){var t=this._getMapPanePos();return t&&!t.equals([0,0])},_getTopLeftPoint:function(t,e){return(t&&void 0!==e?this._getNewPixelOrigin(t,e):this.getPixelOrigin()).subtract(this._getMapPanePos())},_getNewPixelOrigin:function(t,e){var n=this.getSize()._divideBy(2);return this.project(t,e)._subtract(n)._add(this._getMapPanePos())._round()},_latLngToNewLayerPoint:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return this.project(t,e)._subtract(i)},_latLngBoundsToNewLayerBounds:function(t,e,n){var i=this._getNewPixelOrigin(n,e);return M([this.project(t.getSouthWest(),e)._subtract(i),this.project(t.getNorthWest(),e)._subtract(i),this.project(t.getSouthEast(),e)._subtract(i),this.project(t.getNorthEast(),e)._subtract(i)])},_getCenterLayerPoint:function(){return this.containerPointToLayerPoint(this.getSize()._divideBy(2))},_getCenterOffset:function(t){return this.latLngToLayerPoint(t).subtract(this._getCenterLayerPoint())},_limitCenter:function(t,e,n){if(!n)return t;var i=this.project(t,e),o=this.getSize().divideBy(2),r=new z(i.subtract(o),i.add(o)),s=this._getBoundsOffset(r,n,e);return Math.abs(s.x)<=1&&Math.abs(s.y)<=1?t:this.unproject(i.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var n=this.getPixelBounds(),i=new z(n.min.add(t),n.max.add(t));return t.add(this._getBoundsOffset(i,e))},_getBoundsOffset:function(t,e,n){var i=M(this.project(e.getNorthEast(),n),this.project(e.getSouthWest(),n)),o=i.min.subtract(t.min),r=i.max.subtract(t.max);return new R(this._rebound(o.x,-r.x),this._rebound(o.y,-r.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),n=this.getMaxZoom(),i=Nt.any3d?this.options.zoomSnap:1;return i&&(t=Math.round(t/i)*i),Math.max(e,Math.min(n,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){xe(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var n=this._getCenterOffset(t)._trunc();return!(!0!==(e&&e.animate)&&!this.getSize().contains(n)||(this.panBy(n,e),0))},_createAnimProxy:function(){var t=this._proxy=me("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",(function(t){var e=ue,n=this._proxy.style[e];Pe(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),n===this._proxy.style[e]&&this._animatingZoom&&this._onZoomTransitionEnd()}),this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){ye(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();Pe(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,n){if(this._animatingZoom)return!0;if(n=n||{},!this._zoomAnimated||!1===n.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var i=this.getZoomScale(e),o=this._getCenterOffset(t)._divideBy(1-1/i);return!(!0!==n.animate&&!this.getSize().contains(o)||(j((function(){this._moveStart(!0,n.noMoveStart||!1)._animateZoom(t,e,!0)}),this),0))},_animateZoom:function(t,e,n,i){this._mapPane&&(n&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,we(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:i}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(o(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&xe(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}});function sn(t,e){return new rn(t,e)}var an=P.extend({options:{position:"topright"},initialize:function(t){p(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),n=this.getPosition(),i=t._controlCorners[n];return we(e,"leaflet-control"),-1!==n.indexOf("bottom")?i.insertBefore(e,i.firstChild):i.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map?(ye(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null,this):this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),ln=function(t){return new an(t)};rn.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",n=this._controlContainer=me("div",e+"control-container",this._container);function i(i,o){var r=e+i+" "+e+o;t[i+o]=me("div",r,n)}i("top","left"),i("top","right"),i("bottom","left"),i("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)ye(this._controlCorners[t]);ye(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var cn=an.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,n,i){return n<i?-1:i<n?1:0}},initialize:function(t,e,n){for(var i in p(this,n),this._layerControlInputs=[],this._layers=[],this._lastZIndex=0,this._handlingClick=!1,this._preventClick=!1,t)this._addLayer(t[i],i);for(i in e)this._addLayer(e[i],i,!0)},onAdd:function(t){this._initLayout(),this._update(),this._map=t,t.on("zoomend",this._checkDisabledLayers,this);for(var e=0;e<this._layers.length;e++)this._layers[e].layer.on("add remove",this._onLayerChange,this);return this._container},addTo:function(t){return an.prototype.addTo.call(this,t),this._expandIfNotCollapsed()},onRemove:function(){this._map.off("zoomend",this._checkDisabledLayers,this);for(var t=0;t<this._layers.length;t++)this._layers[t].layer.off("add remove",this._onLayerChange,this)},addBaseLayer:function(t,e){return this._addLayer(t,e),this._map?this._update():this},addOverlay:function(t,e){return this._addLayer(t,e,!0),this._map?this._update():this},removeLayer:function(t){t.off("add remove",this._onLayerChange,this);var e=this._getLayer(s(t));return e&&this._layers.splice(this._layers.indexOf(e),1),this._map?this._update():this},expand:function(){we(this._container,"leaflet-control-layers-expanded"),this._section.style.height=null;var t=this._map.getSize().y-(this._container.offsetTop+50);return t<this._section.clientHeight?(we(this._section,"leaflet-control-layers-scrollbar"),this._section.style.height=t+"px"):xe(this._section,"leaflet-control-layers-scrollbar"),this._checkDisabledLayers(),this},collapse:function(){return xe(this._container,"leaflet-control-layers-expanded"),this},_initLayout:function(){var t="leaflet-control-layers",e=this._container=me("div",t),n=this.options.collapsed;e.setAttribute("aria-haspopup",!0),Je(e),Ge(e);var i=this._section=me("section",t+"-list");n&&(this._map.on("click",this.collapse,this),De(e,{mouseenter:this._expandSafely,mouseleave:this.collapse},this));var o=this._layersLink=me("a",t+"-toggle",e);o.href="#",o.title="Layers",o.setAttribute("role","button"),De(o,{keydown:function(t){13===t.keyCode&&this._expandSafely()},click:function(t){$e(t),this._expandSafely()}},this),n||this.expand(),this._baseLayersList=me("div",t+"-base",i),this._separator=me("div",t+"-separator",i),this._overlaysList=me("div",t+"-overlays",i),e.appendChild(i)},_getLayer:function(t){for(var e=0;e<this._layers.length;e++)if(this._layers[e]&&s(this._layers[e].layer)===t)return this._layers[e]},_addLayer:function(t,e,n){this._map&&t.on("add remove",this._onLayerChange,this),this._layers.push({layer:t,name:e,overlay:n}),this.options.sortLayers&&this._layers.sort(o((function(t,e){return this.options.sortFunction(t.layer,e.layer,t.name,e.name)}),this)),this.options.autoZIndex&&t.setZIndex&&(this._lastZIndex++,t.setZIndex(this._lastZIndex)),this._expandIfNotCollapsed()},_update:function(){if(!this._container)return this;ve(this._baseLayersList),ve(this._overlaysList),this._layerControlInputs=[];var t,e,n,i,o=0;for(n=0;n<this._layers.length;n++)i=this._layers[n],this._addItem(i),e=e||i.overlay,t=t||!i.overlay,o+=i.overlay?0:1;return this.options.hideSingleBase&&(t=t&&o>1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(s(t.target)),n=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;n&&this._map.fire(n,e)},_createRadioElement:function(t,e){var n='<input type="radio" class="leaflet-control-layers-selector" name="'+t+'"'+(e?' checked="checked"':"")+"/>",i=document.createElement("div");return i.innerHTML=n,i.firstChild},_addItem:function(t){var e,n=document.createElement("label"),i=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=i):e=this._createRadioElement("leaflet-base-layers_"+s(this),i),this._layerControlInputs.push(e),e.layerId=s(t.layer),De(e,"click",this._onInputClick,this);var o=document.createElement("span");o.innerHTML=" "+t.name;var r=document.createElement("span");return n.appendChild(r),r.appendChild(e),r.appendChild(o),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(n),this._checkDisabledLayers(),n},_onInputClick:function(){if(!this._preventClick){var t,e,n=this._layerControlInputs,i=[],o=[];this._handlingClick=!0;for(var r=n.length-1;r>=0;r--)t=n[r],e=this._getLayer(t.layerId).layer,t.checked?i.push(e):t.checked||o.push(e);for(r=0;r<o.length;r++)this._map.hasLayer(o[r])&&this._map.removeLayer(o[r]);for(r=0;r<i.length;r++)this._map.hasLayer(i[r])||this._map.addLayer(i[r]);this._handlingClick=!1,this._refocusOnMap()}},_checkDisabledLayers:function(){for(var t,e,n=this._layerControlInputs,i=this._map.getZoom(),o=n.length-1;o>=0;o--)t=n[o],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&i<e.options.minZoom||void 0!==e.options.maxZoom&&i>e.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,De(t,"click",$e),this.expand();var e=this;setTimeout((function(){He(t,"click",$e),e._preventClick=!1}))}}),un=function(t,e,n){return new cn(t,e,n)},hn=an.extend({options:{position:"topleft",zoomInText:'<span aria-hidden="true">+</span>',zoomInTitle:"Zoom in",zoomOutText:'<span aria-hidden="true">&#x2212;</span>',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",n=me("div",e+" leaflet-bar"),i=this.options;return this._zoomInButton=this._createButton(i.zoomInText,i.zoomInTitle,e+"-in",n,this._zoomIn),this._zoomOutButton=this._createButton(i.zoomOutText,i.zoomOutTitle,e+"-out",n,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),n},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoom<this._map.getMaxZoom()&&this._map.zoomIn(this._map.options.zoomDelta*(t.shiftKey?3:1))},_zoomOut:function(t){!this._disabled&&this._map._zoom>this._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,n,i,o){var r=me("a",n,i);return r.innerHTML=t,r.href="#",r.title=e,r.setAttribute("role","button"),r.setAttribute("aria-label",e),Je(r),De(r,"click",Ye),De(r,"click",o,this),De(r,"click",this._refocusOnMap,this),r},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";xe(this._zoomInButton,e),xe(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(we(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(we(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});rn.mergeOptions({zoomControl:!0}),rn.addInitHook((function(){this.options.zoomControl&&(this.zoomControl=new hn,this.addControl(this.zoomControl))}));var dn=function(t){return new hn(t)},pn=an.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",n=me("div",e),i=this.options;return this._addScales(i,e+"-line",n),t.on(i.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),n},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,n){t.metric&&(this._mScale=me("div",e,n)),t.imperial&&(this._iScale=me("div",e,n))},_update:function(){var t=this._map,e=t.getSize().y/2,n=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(n)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t),n=e<1e3?e+" m":e/1e3+" km";this._updateScale(this._mScale,n,e/t)},_updateImperial:function(t){var e,n,i,o=3.2808399*t;o>5280?(e=o/5280,n=this._getRoundNum(e),this._updateScale(this._iScale,n+" mi",n/e)):(i=this._getRoundNum(o),this._updateScale(this._iScale,i+" ft",i/o))},_updateScale:function(t,e,n){t.style.width=Math.round(this.options.maxWidth*n)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),n=t/e;return e*(n=n>=10?10:n>=5?5:n>=3?3:n>=2?2:1)}}),fn=function(t){return new pn(t)},mn='<svg aria-hidden="true" xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" class="leaflet-attribution-flag"><path fill="#4C7BE1" d="M0 0h12v4H0z"/><path fill="#FFD500" d="M0 4h12v3H0z"/><path fill="#E0BC00" d="M0 7h12v1H0z"/></svg>',yn=an.extend({options:{position:"bottomright",prefix:'<a href="https://leafletjs.com" title="A JavaScript library for interactive maps">'+(Nt.inlineSvg?mn+" ":"")+"Leaflet</a>"},initialize:function(t){p(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=me("div","leaflet-control-attribution"),Je(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",(function(){this.removeAttribution(t.layer.getAttribution())}),this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t?(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update(),this):this},removeAttribution:function(t){return t?(this._attributions[t]&&(this._attributions[t]--,this._update()),this):this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var n=[];this.options.prefix&&n.push(this.options.prefix),t.length&&n.push(t.join(", ")),this._container.innerHTML=n.join(' <span aria-hidden="true">|</span> ')}}});rn.mergeOptions({attributionControl:!0}),rn.addInitHook((function(){this.options.attributionControl&&(new yn).addTo(this)}));var vn=function(t){return new yn(t)};an.Layers=cn,an.Zoom=hn,an.Scale=pn,an.Attribution=yn,ln.layers=un,ln.zoom=dn,ln.scale=fn,ln.attribution=vn;var bn=P.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled?(this._enabled=!1,this.removeHooks(),this):this},enabled:function(){return!!this._enabled}});bn.addTo=function(t,e){return t.addHandler(e,this),this};var gn={Events:T},_n=Nt.touch?"touchstart mousedown":"mousedown",wn=A.extend({options:{clickTolerance:3},initialize:function(t,e,n,i){p(this,i),this._element=t,this._dragStartTarget=e||t,this._preventOutline=n},enable:function(){this._enabled||(De(this._dragStartTarget,_n,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(wn._dragging===this&&this.finishDrag(!0),He(this._dragStartTarget,_n,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(this._enabled&&(this._moved=!1,!_e(this._element,"leaflet-zoom-anim")))if(t.touches&&1!==t.touches.length)wn._dragging===this&&this.finishDrag();else if(!(wn._dragging||t.shiftKey||1!==t.which&&1!==t.button&&!t.touches||(wn._dragging=this,this._preventOutline&&Be(this._element),Ae(),re(),this._moving))){this.fire("down");var e=t.touches?t.touches[0]:t,n=ze(this._element);this._startPoint=new R(e.clientX,e.clientY),this._startPos=Se(this._element),this._parentScale=Me(n);var i="mousedown"===t.type;De(document,i?"mousemove":"touchmove",this._onMove,this),De(document,i?"mouseup":"touchend touchcancel",this._onUp,this)}},_onMove:function(t){if(this._enabled)if(t.touches&&t.touches.length>1)this._moved=!0;else{var e=t.touches&&1===t.touches.length?t.touches[0]:t,n=new R(e.clientX,e.clientY)._subtract(this._startPoint);(n.x||n.y)&&(Math.abs(n.x)+Math.abs(n.y)<this.options.clickTolerance||(n.x/=this._parentScale.x,n.y/=this._parentScale.y,$e(t),this._moved||(this.fire("dragstart"),this._moved=!0,we(document.body,"leaflet-dragging"),this._lastTarget=t.target||t.srcElement,window.SVGElementInstance&&this._lastTarget instanceof window.SVGElementInstance&&(this._lastTarget=this._lastTarget.correspondingUseElement),we(this._lastTarget,"leaflet-drag-target")),this._newPos=this._startPos.add(n),this._moving=!0,this._lastEvent=t,this._updatePosition()))}},_updatePosition:function(){var t={originalEvent:this._lastEvent};this.fire("predrag",t),Le(this._element,this._newPos),this.fire("drag",t)},_onUp:function(){this._enabled&&this.finishDrag()},finishDrag:function(t){xe(document.body,"leaflet-dragging"),this._lastTarget&&(xe(this._lastTarget,"leaflet-drag-target"),this._lastTarget=null),He(document,"mousemove touchmove",this._onMove,this),He(document,"mouseup touchend touchcancel",this._onUp,this),Re(),se();var e=this._moved&&this._moving;this._moving=!1,wn._dragging=!1,e&&this.fire("dragend",{noInertia:t,distance:this._newPos.distanceTo(this._startPos)})}});function xn(t,e,n){var i,o,r,s,a,l,c,u,h,d=[1,4,2,8];for(o=0,c=t.length;o<c;o++)t[o]._code=In(t[o],e);for(s=0;s<4;s++){for(u=d[s],i=[],o=0,r=(c=t.length)-1;o<c;r=o++)a=t[o],l=t[r],a._code&u?l._code&u||((h=Bn(l,a,u,e,n))._code=In(h,e),i.push(h)):(l._code&u&&((h=Bn(l,a,u,e,n))._code=In(h,e),i.push(h)),i.push(a));t=i}return t}function kn(t,e){var n,i,o,r,s,a,l,c,u;if(!t||0===t.length)throw new Error("latlngs not passed");Nn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var h=H([0,0]),d=D(t);d.getNorthWest().distanceTo(d.getSouthWest())*d.getNorthEast().distanceTo(d.getNorthWest())<1700&&(h=On(t));var p=t.length,f=[];for(n=0;n<p;n++){var m=H(t[n]);f.push(e.project(H([m.lat-h.lat,m.lng-h.lng])))}for(a=l=c=0,n=0,i=p-1;n<p;i=n++)o=f[n],r=f[i],s=o.y*r.x-r.y*o.x,l+=(o.x+r.x)*s,c+=(o.y+r.y)*s,a+=3*s;u=0===a?f[0]:[l/a,c/a];var y=e.unproject(I(u));return H([y.lat+h.lat,y.lng+h.lng])}function On(t){for(var e=0,n=0,i=0,o=0;o<t.length;o++){var r=H(t[o]);e+=r.lat,n+=r.lng,i++}return H([e/i,n/i])}var jn,Cn={__proto__:null,clipPolygon:xn,polygonCenter:kn,centroid:On};function En(t,e){if(!e||!t.length)return t.slice();var n=e*e;return t=Sn(t=An(t,n),n)}function Pn(t,e,n){return Math.sqrt(Mn(t,e,n,!0))}function Ln(t,e,n){return Mn(t,e,n)}function Sn(t,e){var n=t.length,i=new(typeof Uint8Array!=void 0+""?Uint8Array:Array)(n);i[0]=i[n-1]=1,Tn(t,i,e,0,n-1);var o,r=[];for(o=0;o<n;o++)i[o]&&r.push(t[o]);return r}function Tn(t,e,n,i,o){var r,s,a,l=0;for(s=i+1;s<=o-1;s++)(a=Mn(t[s],t[i],t[o],!0))>l&&(r=s,l=a);l>n&&(e[r]=1,Tn(t,e,n,i,r),Tn(t,e,n,r,o))}function An(t,e){for(var n=[t[0]],i=1,o=0,r=t.length;i<r;i++)zn(t[i],t[o])>e&&(n.push(t[i]),o=i);return o<r-1&&n.push(t[r-1]),n}function Rn(t,e,n,i,o){var r,s,a,l=i?jn:In(t,n),c=In(e,n);for(jn=c;;){if(!(l|c))return[t,e];if(l&c)return!1;a=In(s=Bn(t,e,r=l||c,n,o),n),r===l?(t=s,l=a):(e=s,c=a)}}function Bn(t,e,n,i,o){var r,s,a=e.x-t.x,l=e.y-t.y,c=i.min,u=i.max;return 8&n?(r=t.x+a*(u.y-t.y)/l,s=u.y):4&n?(r=t.x+a*(c.y-t.y)/l,s=c.y):2&n?(r=u.x,s=t.y+l*(u.x-t.x)/a):1&n&&(r=c.x,s=t.y+l*(c.x-t.x)/a),new R(r,s,o)}function In(t,e){var n=0;return t.x<e.min.x?n|=1:t.x>e.max.x&&(n|=2),t.y<e.min.y?n|=4:t.y>e.max.y&&(n|=8),n}function zn(t,e){var n=e.x-t.x,i=e.y-t.y;return n*n+i*i}function Mn(t,e,n,i){var o,r=e.x,s=e.y,a=n.x-r,l=n.y-s,c=a*a+l*l;return c>0&&((o=((t.x-r)*a+(t.y-s)*l)/c)>1?(r=n.x,s=n.y):o>0&&(r+=a*o,s+=l*o)),a=t.x-r,l=t.y-s,i?a*a+l*l:new R(r,s)}function Nn(t){return!v(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function Dn(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),Nn(t)}function Fn(t,e){var n,i,o,r,s,a,l,c;if(!t||0===t.length)throw new Error("latlngs not passed");Nn(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var u=H([0,0]),h=D(t);h.getNorthWest().distanceTo(h.getSouthWest())*h.getNorthEast().distanceTo(h.getNorthWest())<1700&&(u=On(t));var d=t.length,p=[];for(n=0;n<d;n++){var f=H(t[n]);p.push(e.project(H([f.lat-u.lat,f.lng-u.lng])))}for(n=0,i=0;n<d-1;n++)i+=p[n].distanceTo(p[n+1])/2;if(0===i)c=p[0];else for(n=0,r=0;n<d-1;n++)if(s=p[n],a=p[n+1],(r+=o=s.distanceTo(a))>i){l=(r-i)/o,c=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var m=e.unproject(I(c));return H([m.lat+u.lat,m.lng+u.lng])}var Hn={__proto__:null,simplify:En,pointToSegmentDistance:Pn,closestPointOnSegment:Ln,clipSegment:Rn,_getEdgeIntersection:Bn,_getBitCode:In,_sqClosestPointOnSegment:Mn,isFlat:Nn,_flat:Dn,polylineCenter:Fn},Vn={project:function(t){return new R(t.lng,t.lat)},unproject:function(t){return new F(t.y,t.x)},bounds:new z([-180,-90],[180,90])},Zn={R:6378137,R_MINOR:6356752.314245179,bounds:new z([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,n=this.R,i=t.lat*e,o=this.R_MINOR/n,r=Math.sqrt(1-o*o),s=r*Math.sin(i),a=Math.tan(Math.PI/4-i/2)/Math.pow((1-s)/(1+s),r/2);return i=-n*Math.log(Math.max(a,1e-10)),new R(t.lng*e*n,i)},unproject:function(t){for(var e,n=180/Math.PI,i=this.R,o=this.R_MINOR/i,r=Math.sqrt(1-o*o),s=Math.exp(-t.y/i),a=Math.PI/2-2*Math.atan(s),l=0,c=.1;l<15&&Math.abs(c)>1e-7;l++)e=r*Math.sin(a),e=Math.pow((1-e)/(1+e),r/2),a+=c=Math.PI/2-2*Math.atan(s*e)-a;return new F(a*n,t.x*n/i)}},qn={__proto__:null,LonLat:Vn,Mercator:Zn,SphericalMercator:W},Un=n({},q,{code:"EPSG:3395",projection:Zn,transformation:function(){var t=.5/(Math.PI*Zn.R);return J(t,.5,-t,.5)}()}),Wn=n({},q,{code:"EPSG:4326",projection:Vn,transformation:J(1/180,1,-1/180,.5)}),Gn=n({},Z,{projection:Vn,transformation:J(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var n=e.lng-t.lng,i=e.lat-t.lat;return Math.sqrt(n*n+i*i)},infinite:!0});Z.Earth=q,Z.EPSG3395=Un,Z.EPSG3857=$,Z.EPSG900913=Y,Z.EPSG4326=Wn,Z.Simple=Gn;var Jn=A.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[s(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[s(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var n=this.getEvents();e.on(n,this),this.once("remove",(function(){e.off(n,this)}),this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});rn.include({addLayer:function(t){if(!t._layerAdd)throw new Error("The provided object is not a Layer.");var e=s(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=s(t);return this._layers[e]?(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null,this):this},hasLayer:function(t){return s(t)in this._layers},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},_addLayers:function(t){for(var e=0,n=(t=t?v(t)?t:[t]:[]).length;e<n;e++)this.addLayer(t[e])},_addZoomLimit:function(t){isNaN(t.options.maxZoom)&&isNaN(t.options.minZoom)||(this._zoomBoundLayers[s(t)]=t,this._updateZoomLevels())},_removeZoomLimit:function(t){var e=s(t);this._zoomBoundLayers[e]&&(delete this._zoomBoundLayers[e],this._updateZoomLevels())},_updateZoomLevels:function(){var t=1/0,e=-1/0,n=this._getZoomSpan();for(var i in this._zoomBoundLayers){var o=this._zoomBoundLayers[i].options;t=void 0===o.minZoom?t:Math.min(t,o.minZoom),e=void 0===o.maxZoom?e:Math.max(e,o.maxZoom)}this._layersMaxZoom=e===-1/0?void 0:e,this._layersMinZoom=t===1/0?void 0:t,n!==this._getZoomSpan()&&this.fire("zoomlevelschange"),void 0===this.options.maxZoom&&this._layersMaxZoom&&this.getZoom()>this._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()<this._layersMinZoom&&this.setZoom(this._layersMinZoom)}});var $n=Jn.extend({initialize:function(t,e){var n,i;if(p(this,e),this._layers={},t)for(n=0,i=t.length;n<i;n++)this.addLayer(t[n])},addLayer:function(t){var e=this.getLayerId(t);return this._layers[e]=t,this._map&&this._map.addLayer(t),this},removeLayer:function(t){var e=t in this._layers?t:this.getLayerId(t);return this._map&&this._layers[e]&&this._map.removeLayer(this._layers[e]),delete this._layers[e],this},hasLayer:function(t){return("number"==typeof t?t:this.getLayerId(t))in this._layers},clearLayers:function(){return this.eachLayer(this.removeLayer,this)},invoke:function(t){var e,n,i=Array.prototype.slice.call(arguments,1);for(e in this._layers)(n=this._layers[e])[t]&&n[t].apply(n,i);return this},onAdd:function(t){this.eachLayer(t.addLayer,t)},onRemove:function(t){this.eachLayer(t.removeLayer,t)},eachLayer:function(t,e){for(var n in this._layers)t.call(e,this._layers[n]);return this},getLayer:function(t){return this._layers[t]},getLayers:function(){var t=[];return this.eachLayer(t.push,t),t},setZIndex:function(t){return this.invoke("setZIndex",t)},getLayerId:function(t){return s(t)}}),Yn=function(t,e){return new $n(t,e)},Kn=$n.extend({addLayer:function(t){return this.hasLayer(t)?this:(t.addEventParent(this),$n.prototype.addLayer.call(this,t),this.fire("layeradd",{layer:t}))},removeLayer:function(t){return this.hasLayer(t)?(t in this._layers&&(t=this._layers[t]),t.removeEventParent(this),$n.prototype.removeLayer.call(this,t),this.fire("layerremove",{layer:t})):this},setStyle:function(t){return this.invoke("setStyle",t)},bringToFront:function(){return this.invoke("bringToFront")},bringToBack:function(){return this.invoke("bringToBack")},getBounds:function(){var t=new N;for(var e in this._layers){var n=this._layers[e];t.extend(n.getBounds?n.getBounds():n.getLatLng())}return t}}),Xn=function(t,e){return new Kn(t,e)},Qn=P.extend({options:{popupAnchor:[0,0],tooltipAnchor:[0,0],crossOrigin:!1},initialize:function(t){p(this,t)},createIcon:function(t){return this._createIcon("icon",t)},createShadow:function(t){return this._createIcon("shadow",t)},_createIcon:function(t,e){var n=this._getIconUrl(t);if(!n){if("icon"===t)throw new Error("iconUrl not set in Icon options (see the docs).");return null}var i=this._createImg(n,e&&"IMG"===e.tagName?e:null);return this._setIconStyles(i,t),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),i},_setIconStyles:function(t,e){var n=this.options,i=n[e+"Size"];"number"==typeof i&&(i=[i,i]);var o=I(i),r=I("shadow"===e&&n.shadowAnchor||n.iconAnchor||o&&o.divideBy(2,!0));t.className="leaflet-marker-"+e+" "+(n.className||""),r&&(t.style.marginLeft=-r.x+"px",t.style.marginTop=-r.y+"px"),o&&(t.style.width=o.x+"px",t.style.height=o.y+"px")},_createImg:function(t,e){return(e=e||document.createElement("img")).src=t,e},_getIconUrl:function(t){return Nt.retina&&this.options[t+"RetinaUrl"]||this.options[t+"Url"]}});function ti(t){return new Qn(t)}var ei=Qn.extend({options:{iconUrl:"marker-icon.png",iconRetinaUrl:"marker-icon-2x.png",shadowUrl:"marker-shadow.png",iconSize:[25,41],iconAnchor:[12,41],popupAnchor:[1,-34],tooltipAnchor:[16,-28],shadowSize:[41,41]},_getIconUrl:function(t){return"string"!=typeof ei.imagePath&&(ei.imagePath=this._detectIconPath()),(this.options.imagePath||ei.imagePath)+Qn.prototype._getIconUrl.call(this,t)},_stripUrl:function(t){var e=function(t,e,n){var i=e.exec(t);return i&&i[n]};return(t=e(t,/^url\((['"])?(.+)\1\)$/,2))&&e(t,/^(.*)marker-icon\.png$/,1)},_detectIconPath:function(){var t=me("div","leaflet-default-icon-path",document.body),e=fe(t,"background-image")||fe(t,"backgroundImage");if(document.body.removeChild(t),e=this._stripUrl(e))return e;var n=document.querySelector('link[href$="leaflet.css"]');return n?n.href.substring(0,n.href.length-11-1):""}}),ni=bn.extend({initialize:function(t){this._marker=t},addHooks:function(){var t=this._marker._icon;this._draggable||(this._draggable=new wn(t,t,!0)),this._draggable.on({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).enable(),we(t,"leaflet-marker-draggable")},removeHooks:function(){this._draggable.off({dragstart:this._onDragStart,predrag:this._onPreDrag,drag:this._onDrag,dragend:this._onDragEnd},this).disable(),this._marker._icon&&xe(this._marker._icon,"leaflet-marker-draggable")},moved:function(){return this._draggable&&this._draggable._moved},_adjustPan:function(t){var e=this._marker,n=e._map,i=this._marker.options.autoPanSpeed,o=this._marker.options.autoPanPadding,r=Se(e._icon),s=n.getPixelBounds(),a=n.getPixelOrigin(),l=M(s.min._subtract(a).add(o),s.max._subtract(a).subtract(o));if(!l.contains(r)){var c=I((Math.max(l.max.x,r.x)-l.max.x)/(s.max.x-l.max.x)-(Math.min(l.min.x,r.x)-l.min.x)/(s.min.x-l.min.x),(Math.max(l.max.y,r.y)-l.max.y)/(s.max.y-l.max.y)-(Math.min(l.min.y,r.y)-l.min.y)/(s.min.y-l.min.y)).multiplyBy(i);n.panBy(c,{animate:!1}),this._draggable._newPos._add(c),this._draggable._startPos._add(c),Le(e._icon,this._draggable._newPos),this._onDrag(t),this._panRequest=j(this._adjustPan.bind(this,t))}},_onDragStart:function(){this._oldLatLng=this._marker.getLatLng(),this._marker.closePopup&&this._marker.closePopup(),this._marker.fire("movestart").fire("dragstart")},_onPreDrag:function(t){this._marker.options.autoPan&&(C(this._panRequest),this._panRequest=j(this._adjustPan.bind(this,t)))},_onDrag:function(t){var e=this._marker,n=e._shadow,i=Se(e._icon),o=e._map.layerPointToLatLng(i);n&&Le(n,i),e._latlng=o,t.latlng=o,t.oldLatLng=this._oldLatLng,e.fire("move",t).fire("drag",t)},_onDragEnd:function(t){C(this._panRequest),delete this._oldLatLng,this._marker.fire("moveend").fire("dragend",t)}}),ii=Jn.extend({options:{icon:new ei,interactive:!0,keyboard:!0,title:"",alt:"Marker",zIndexOffset:0,opacity:1,riseOnHover:!1,riseOffset:250,pane:"markerPane",shadowPane:"shadowPane",bubblingMouseEvents:!1,autoPanOnFocus:!0,draggable:!1,autoPan:!1,autoPanPadding:[50,50],autoPanSpeed:10},initialize:function(t,e){p(this,e),this._latlng=H(t)},onAdd:function(t){this._zoomAnimated=this._zoomAnimated&&t.options.markerZoomAnimation,this._zoomAnimated&&t.on("zoomanim",this._animateZoom,this),this._initIcon(),this.update()},onRemove:function(t){this.dragging&&this.dragging.enabled()&&(this.options.draggable=!0,this.dragging.removeHooks()),delete this.dragging,this._zoomAnimated&&t.off("zoomanim",this._animateZoom,this),this._removeIcon(),this._removeShadow()},getEvents:function(){return{zoom:this.update,viewreset:this.update}},getLatLng:function(){return this._latlng},setLatLng:function(t){var e=this._latlng;return this._latlng=H(t),this.update(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},setZIndexOffset:function(t){return this.options.zIndexOffset=t,this.update()},getIcon:function(){return this.options.icon},setIcon:function(t){return this.options.icon=t,this._map&&(this._initIcon(),this.update()),this._popup&&this.bindPopup(this._popup,this._popup.options),this},getElement:function(){return this._icon},update:function(){if(this._icon&&this._map){var t=this._map.latLngToLayerPoint(this._latlng).round();this._setPos(t)}return this},_initIcon:function(){var t=this.options,e="leaflet-zoom-"+(this._zoomAnimated?"animated":"hide"),n=t.icon.createIcon(this._icon),i=!1;n!==this._icon&&(this._icon&&this._removeIcon(),i=!0,t.title&&(n.title=t.title),"IMG"===n.tagName&&(n.alt=t.alt||"")),we(n,e),t.keyboard&&(n.tabIndex="0",n.setAttribute("role","button")),this._icon=n,t.riseOnHover&&this.on({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&De(n,"focus",this._panOnFocus,this);var o=t.icon.createShadow(this._shadow),r=!1;o!==this._shadow&&(this._removeShadow(),r=!0),o&&(we(o,e),o.alt=""),this._shadow=o,t.opacity<1&&this._updateOpacity(),i&&this.getPane().appendChild(this._icon),this._initInteraction(),o&&r&&this.getPane(t.shadowPane).appendChild(this._shadow)},_removeIcon:function(){this.options.riseOnHover&&this.off({mouseover:this._bringToFront,mouseout:this._resetZIndex}),this.options.autoPanOnFocus&&He(this._icon,"focus",this._panOnFocus,this),ye(this._icon),this.removeInteractiveTarget(this._icon),this._icon=null},_removeShadow:function(){this._shadow&&ye(this._shadow),this._shadow=null},_setPos:function(t){this._icon&&Le(this._icon,t),this._shadow&&Le(this._shadow,t),this._zIndex=t.y+this.options.zIndexOffset,this._resetZIndex()},_updateZIndex:function(t){this._icon&&(this._icon.style.zIndex=this._zIndex+t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center).round();this._setPos(e)},_initInteraction:function(){if(this.options.interactive&&(we(this._icon,"leaflet-interactive"),this.addInteractiveTarget(this._icon),ni)){var t=this.options.draggable;this.dragging&&(t=this.dragging.enabled(),this.dragging.disable()),this.dragging=new ni(this),t&&this.dragging.enable()}},setOpacity:function(t){return this.options.opacity=t,this._map&&this._updateOpacity(),this},_updateOpacity:function(){var t=this.options.opacity;this._icon&&je(this._icon,t),this._shadow&&je(this._shadow,t)},_bringToFront:function(){this._updateZIndex(this.options.riseOffset)},_resetZIndex:function(){this._updateZIndex(0)},_panOnFocus:function(){var t=this._map;if(t){var e=this.options.icon.options,n=e.iconSize?I(e.iconSize):I(0,0),i=e.iconAnchor?I(e.iconAnchor):I(0,0);t.panInside(this._latlng,{paddingTopLeft:i,paddingBottomRight:n.subtract(i)})}},_getPopupAnchor:function(){return this.options.icon.options.popupAnchor},_getTooltipAnchor:function(){return this.options.icon.options.tooltipAnchor}});function oi(t,e){return new ii(t,e)}var ri=Jn.extend({options:{stroke:!0,color:"#3388ff",weight:3,opacity:1,lineCap:"round",lineJoin:"round",dashArray:null,dashOffset:null,fill:!1,fillColor:null,fillOpacity:.2,fillRule:"evenodd",interactive:!0,bubblingMouseEvents:!0},beforeAdd:function(t){this._renderer=t.getRenderer(this)},onAdd:function(){this._renderer._initPath(this),this._reset(),this._renderer._addPath(this)},onRemove:function(){this._renderer._removePath(this)},redraw:function(){return this._map&&this._renderer._updatePath(this),this},setStyle:function(t){return p(this,t),this._renderer&&(this._renderer._updateStyle(this),this.options.stroke&&t&&Object.prototype.hasOwnProperty.call(t,"weight")&&this._updateBounds()),this},bringToFront:function(){return this._renderer&&this._renderer._bringToFront(this),this},bringToBack:function(){return this._renderer&&this._renderer._bringToBack(this),this},getElement:function(){return this._path},_reset:function(){this._project(),this._update()},_clickTolerance:function(){return(this.options.stroke?this.options.weight/2:0)+(this._renderer.options.tolerance||0)}}),si=ri.extend({options:{fill:!0,radius:10},initialize:function(t,e){p(this,e),this._latlng=H(t),this._radius=this.options.radius},setLatLng:function(t){var e=this._latlng;return this._latlng=H(t),this.redraw(),this.fire("move",{oldLatLng:e,latlng:this._latlng})},getLatLng:function(){return this._latlng},setRadius:function(t){return this.options.radius=this._radius=t,this.redraw()},getRadius:function(){return this._radius},setStyle:function(t){var e=t&&t.radius||this._radius;return ri.prototype.setStyle.call(this,t),this.setRadius(e),this},_project:function(){this._point=this._map.latLngToLayerPoint(this._latlng),this._updateBounds()},_updateBounds:function(){var t=this._radius,e=this._radiusY||t,n=this._clickTolerance(),i=[t+n,e+n];this._pxBounds=new z(this._point.subtract(i),this._point.add(i))},_update:function(){this._map&&this._updatePath()},_updatePath:function(){this._renderer._updateCircle(this)},_empty:function(){return this._radius&&!this._renderer._bounds.intersects(this._pxBounds)},_containsPoint:function(t){return t.distanceTo(this._point)<=this._radius+this._clickTolerance()}});function ai(t,e){return new si(t,e)}var li=si.extend({initialize:function(t,e,i){if("number"==typeof e&&(e=n({},i,{radius:e})),p(this,e),this._latlng=H(t),isNaN(this.options.radius))throw new Error("Circle radius cannot be NaN");this._mRadius=this.options.radius},setRadius:function(t){return this._mRadius=t,this.redraw()},getRadius:function(){return this._mRadius},getBounds:function(){var t=[this._radius,this._radiusY||this._radius];return new N(this._map.layerPointToLatLng(this._point.subtract(t)),this._map.layerPointToLatLng(this._point.add(t)))},setStyle:ri.prototype.setStyle,_project:function(){var t=this._latlng.lng,e=this._latlng.lat,n=this._map,i=n.options.crs;if(i.distance===q.distance){var o=Math.PI/180,r=this._mRadius/q.R/o,s=n.project([e+r,t]),a=n.project([e-r,t]),l=s.add(a).divideBy(2),c=n.unproject(l).lat,u=Math.acos((Math.cos(r*o)-Math.sin(e*o)*Math.sin(c*o))/(Math.cos(e*o)*Math.cos(c*o)))/o;(isNaN(u)||0===u)&&(u=r/Math.cos(Math.PI/180*e)),this._point=l.subtract(n.getPixelOrigin()),this._radius=isNaN(u)?0:l.x-n.project([c,t-u]).x,this._radiusY=l.y-s.y}else{var h=i.unproject(i.project(this._latlng).subtract([this._mRadius,0]));this._point=n.latLngToLayerPoint(this._latlng),this._radius=this._point.x-n.latLngToLayerPoint(h).x}this._updateBounds()}});function ci(t,e,n){return new li(t,e,n)}var ui=ri.extend({options:{smoothFactor:1,noClip:!1},initialize:function(t,e){p(this,e),this._setLatLngs(t)},getLatLngs:function(){return this._latlngs},setLatLngs:function(t){return this._setLatLngs(t),this.redraw()},isEmpty:function(){return!this._latlngs.length},closestLayerPoint:function(t){for(var e,n,i=1/0,o=null,r=Mn,s=0,a=this._parts.length;s<a;s++)for(var l=this._parts[s],c=1,u=l.length;c<u;c++){var h=r(t,e=l[c-1],n=l[c],!0);h<i&&(i=h,o=r(t,e,n))}return o&&(o.distance=Math.sqrt(i)),o},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return Fn(this._defaultShape(),this._map.options.crs)},getBounds:function(){return this._bounds},addLatLng:function(t,e){return e=e||this._defaultShape(),t=H(t),e.push(t),this._bounds.extend(t),this.redraw()},_setLatLngs:function(t){this._bounds=new N,this._latlngs=this._convertLatLngs(t)},_defaultShape:function(){return Nn(this._latlngs)?this._latlngs:this._latlngs[0]},_convertLatLngs:function(t){for(var e=[],n=Nn(t),i=0,o=t.length;i<o;i++)n?(e[i]=H(t[i]),this._bounds.extend(e[i])):e[i]=this._convertLatLngs(t[i]);return e},_project:function(){var t=new z;this._rings=[],this._projectLatlngs(this._latlngs,this._rings,t),this._bounds.isValid()&&t.isValid()&&(this._rawPxBounds=t,this._updateBounds())},_updateBounds:function(){var t=this._clickTolerance(),e=new R(t,t);this._rawPxBounds&&(this._pxBounds=new z([this._rawPxBounds.min.subtract(e),this._rawPxBounds.max.add(e)]))},_projectLatlngs:function(t,e,n){var i,o,r=t[0]instanceof F,s=t.length;if(r){for(o=[],i=0;i<s;i++)o[i]=this._map.latLngToLayerPoint(t[i]),n.extend(o[i]);e.push(o)}else for(i=0;i<s;i++)this._projectLatlngs(t[i],e,n)},_clipPoints:function(){var t=this._renderer._bounds;if(this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else{var e,n,i,o,r,s,a,l=this._parts;for(e=0,i=0,o=this._rings.length;e<o;e++)for(n=0,r=(a=this._rings[e]).length;n<r-1;n++)(s=Rn(a[n],a[n+1],t,n,!0))&&(l[i]=l[i]||[],l[i].push(s[0]),s[1]===a[n+1]&&n!==r-2||(l[i].push(s[1]),i++))}},_simplifyPoints:function(){for(var t=this._parts,e=this.options.smoothFactor,n=0,i=t.length;n<i;n++)t[n]=En(t[n],e)},_update:function(){this._map&&(this._clipPoints(),this._simplifyPoints(),this._updatePath())},_updatePath:function(){this._renderer._updatePoly(this)},_containsPoint:function(t,e){var n,i,o,r,s,a,l=this._clickTolerance();if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(n=0,r=this._parts.length;n<r;n++)for(i=0,o=(s=(a=this._parts[n]).length)-1;i<s;o=i++)if((e||0!==i)&&Pn(t,a[o],a[i])<=l)return!0;return!1}});function hi(t,e){return new ui(t,e)}ui._flat=Dn;var di=ui.extend({options:{fill:!0},isEmpty:function(){return!this._latlngs.length||!this._latlngs[0].length},getCenter:function(){if(!this._map)throw new Error("Must add layer to map before using getCenter()");return kn(this._defaultShape(),this._map.options.crs)},_convertLatLngs:function(t){var e=ui.prototype._convertLatLngs.call(this,t),n=e.length;return n>=2&&e[0]instanceof F&&e[0].equals(e[n-1])&&e.pop(),e},_setLatLngs:function(t){ui.prototype._setLatLngs.call(this,t),Nn(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return Nn(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,n=new R(e,e);if(t=new z(t.min.subtract(n),t.max.add(n)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t))if(this.options.noClip)this._parts=this._rings;else for(var i,o=0,r=this._rings.length;o<r;o++)(i=xn(this._rings[o],t,!0)).length&&this._parts.push(i)},_updatePath:function(){this._renderer._updatePoly(this,!0)},_containsPoint:function(t){var e,n,i,o,r,s,a,l,c=!1;if(!this._pxBounds||!this._pxBounds.contains(t))return!1;for(o=0,a=this._parts.length;o<a;o++)for(r=0,s=(l=(e=this._parts[o]).length)-1;r<l;s=r++)n=e[r],i=e[s],n.y>t.y!=i.y>t.y&&t.x<(i.x-n.x)*(t.y-n.y)/(i.y-n.y)+n.x&&(c=!c);return c||ui.prototype._containsPoint.call(this,t,!0)}});function pi(t,e){return new di(t,e)}var fi=Kn.extend({initialize:function(t,e){p(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,n,i,o=v(t)?t:t.features;if(o){for(e=0,n=o.length;e<n;e++)((i=o[e]).geometries||i.geometry||i.features||i.coordinates)&&this.addData(i);return this}var r=this.options;if(r.filter&&!r.filter(t))return this;var s=mi(t,r);return s?(s.feature=xi(t),s.defaultOptions=s.options,this.resetStyle(s),r.onEachFeature&&r.onEachFeature(t,s),this.addLayer(s)):this},resetStyle:function(t){return void 0===t?this.eachLayer(this.resetStyle,this):(t.options=n({},t.defaultOptions),this._setLayerStyle(t,this.options.style),this)},setStyle:function(t){return this.eachLayer((function(e){this._setLayerStyle(e,t)}),this)},_setLayerStyle:function(t,e){t.setStyle&&("function"==typeof e&&(e=e(t.feature)),t.setStyle(e))}});function mi(t,e){var n,i,o,r,s="Feature"===t.type?t.geometry:t,a=s?s.coordinates:null,l=[],c=e&&e.pointToLayer,u=e&&e.coordsToLatLng||vi;if(!a&&!s)return null;switch(s.type){case"Point":return yi(c,t,n=u(a),e);case"MultiPoint":for(o=0,r=a.length;o<r;o++)n=u(a[o]),l.push(yi(c,t,n,e));return new Kn(l);case"LineString":case"MultiLineString":return i=bi(a,"LineString"===s.type?0:1,u),new ui(i,e);case"Polygon":case"MultiPolygon":return i=bi(a,"Polygon"===s.type?1:2,u),new di(i,e);case"GeometryCollection":for(o=0,r=s.geometries.length;o<r;o++){var h=mi({geometry:s.geometries[o],type:"Feature",properties:t.properties},e);h&&l.push(h)}return new Kn(l);case"FeatureCollection":for(o=0,r=s.features.length;o<r;o++){var d=mi(s.features[o],e);d&&l.push(d)}return new Kn(l);default:throw new Error("Invalid GeoJSON object.")}}function yi(t,e,n,i){return t?t(e,n):new ii(n,i&&i.markersInheritOptions&&i)}function vi(t){return new F(t[1],t[0],t[2])}function bi(t,e,n){for(var i,o=[],r=0,s=t.length;r<s;r++)i=e?bi(t[r],e-1,n):(n||vi)(t[r]),o.push(i);return o}function gi(t,e){return void 0!==(t=H(t)).alt?[u(t.lng,e),u(t.lat,e),u(t.alt,e)]:[u(t.lng,e),u(t.lat,e)]}function _i(t,e,n,i){for(var o=[],r=0,s=t.length;r<s;r++)o.push(e?_i(t[r],Nn(t[r])?0:e-1,n,i):gi(t[r],i));return!e&&n&&o.length>0&&o.push(o[0].slice()),o}function wi(t,e){return t.feature?n({},t.feature,{geometry:e}):xi(e)}function xi(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var ki={toGeoJSON:function(t){return wi(this,{type:"Point",coordinates:gi(this.getLatLng(),t)})}};function Oi(t,e){return new fi(t,e)}ii.include(ki),li.include(ki),si.include(ki),ui.include({toGeoJSON:function(t){var e=!Nn(this._latlngs);return wi(this,{type:(e?"Multi":"")+"LineString",coordinates:_i(this._latlngs,e?1:0,!1,t)})}}),di.include({toGeoJSON:function(t){var e=!Nn(this._latlngs),n=e&&!Nn(this._latlngs[0]),i=_i(this._latlngs,n?2:e?1:0,!0,t);return e||(i=[i]),wi(this,{type:(n?"Multi":"")+"Polygon",coordinates:i})}}),$n.include({toMultiPoint:function(t){var e=[];return this.eachLayer((function(n){e.push(n.toGeoJSON(t).geometry.coordinates)})),wi(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var n="GeometryCollection"===e,i=[];return this.eachLayer((function(e){if(e.toGeoJSON){var o=e.toGeoJSON(t);if(n)i.push(o.geometry);else{var r=xi(o);"FeatureCollection"===r.type?i.push.apply(i,r.features):i.push(r)}}})),n?wi(this,{geometries:i,type:"GeometryCollection"}):{type:"FeatureCollection",features:i}}});var ji=Oi,Ci=Jn.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,n){this._url=t,this._bounds=D(e),p(this,n)},onAdd:function(){this._image||(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(we(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){ye(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&be(this._image),this},bringToBack:function(){return this._map&&ge(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=D(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:me("img");we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onload=o(this.fire,this,"load"),e.onerror=o(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t?this._url=e.src:(e.src=this._url,e.alt=this.options.alt)},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),n=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;Pe(this._image,n,e)},_reset:function(){var t=this._image,e=new z(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),n=e.getSize();Le(t,e.min),t.style.width=n.x+"px",t.style.height=n.y+"px"},_updateOpacity:function(){je(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),Ei=function(t,e,n){return new Ci(t,e,n)},Pi=Ci.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:me("video");if(we(e,"leaflet-image-layer"),this._zoomAnimated&&we(e,"leaflet-zoom-animated"),this.options.className&&we(e,this.options.className),e.onselectstart=c,e.onmousemove=c,e.onloadeddata=o(this.fire,this,"load"),t){for(var n=e.getElementsByTagName("source"),i=[],r=0;r<n.length;r++)i.push(n[r].src);this._url=n.length>0?i:[e.src]}else{v(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var s=0;s<this._url.length;s++){var a=me("source");a.src=this._url[s],e.appendChild(a)}}}});function Li(t,e,n){return new Pi(t,e,n)}var Si=Ci.extend({_initImage:function(){var t=this._image=this._url;we(t,"leaflet-image-layer"),this._zoomAnimated&&we(t,"leaflet-zoom-animated"),this.options.className&&we(t,this.options.className),t.onselectstart=c,t.onmousemove=c}});function Ti(t,e,n){return new Si(t,e,n)}var Ai=Jn.extend({options:{interactive:!1,offset:[0,0],className:"",pane:void 0,content:""},initialize:function(t,e){t&&(t instanceof F||v(t))?(this._latlng=H(t),p(this,e)):(p(this,t),this._source=e),this.options.content&&(this._content=this.options.content)},openOn:function(t){return(t=arguments.length?t:this._source._map).hasLayer(this)||t.addLayer(this),this},close:function(){return this._map&&this._map.removeLayer(this),this},toggle:function(t){return this._map?this.close():(arguments.length?this._source=t:t=this._source,this._prepareOpen(),this.openOn(t._map)),this},onAdd:function(t){this._zoomAnimated=t._zoomAnimated,this._container||this._initLayout(),t._fadeAnimated&&je(this._container,0),clearTimeout(this._removeTimeout),this.getPane().appendChild(this._container),this.update(),t._fadeAnimated&&je(this._container,1),this.bringToFront(),this.options.interactive&&(we(this._container,"leaflet-interactive"),this.addInteractiveTarget(this._container))},onRemove:function(t){t._fadeAnimated?(je(this._container,0),this._removeTimeout=setTimeout(o(ye,void 0,this._container),200)):ye(this._container),this.options.interactive&&(xe(this._container,"leaflet-interactive"),this.removeInteractiveTarget(this._container))},getLatLng:function(){return this._latlng},setLatLng:function(t){return this._latlng=H(t),this._map&&(this._updatePosition(),this._adjustPan()),this},getContent:function(){return this._content},setContent:function(t){return this._content=t,this.update(),this},getElement:function(){return this._container},update:function(){this._map&&(this._container.style.visibility="hidden",this._updateContent(),this._updateLayout(),this._updatePosition(),this._container.style.visibility="",this._adjustPan())},getEvents:function(){var t={zoom:this._updatePosition,viewreset:this._updatePosition};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},isOpen:function(){return!!this._map&&this._map.hasLayer(this)},bringToFront:function(){return this._map&&be(this._container),this},bringToBack:function(){return this._map&&ge(this._container),this},_prepareOpen:function(t){var e=this._source;if(!e._map)return!1;if(e instanceof Kn){e=null;var n=this._source._layers;for(var i in n)if(n[i]._map){e=n[i];break}if(!e)return!1;this._source=e}if(!t)if(e.getCenter)t=e.getCenter();else if(e.getLatLng)t=e.getLatLng();else{if(!e.getBounds)throw new Error("Unable to get source layer LatLng.");t=e.getBounds().getCenter()}return this.setLatLng(t),this._map&&this.update(),!0},_updateContent:function(){if(this._content){var t=this._contentNode,e="function"==typeof this._content?this._content(this._source||this):this._content;if("string"==typeof e)t.innerHTML=e;else{for(;t.hasChildNodes();)t.removeChild(t.firstChild);t.appendChild(e)}this.fire("contentupdate")}},_updatePosition:function(){if(this._map){var t=this._map.latLngToLayerPoint(this._latlng),e=I(this.options.offset),n=this._getAnchor();this._zoomAnimated?Le(this._container,t.add(n)):e=e.add(t).add(n);var i=this._containerBottom=-e.y,o=this._containerLeft=-Math.round(this._containerWidth/2)+e.x;this._container.style.bottom=i+"px",this._container.style.left=o+"px"}},_getAnchor:function(){return[0,0]}});rn.include({_initOverlay:function(t,e,n,i){var o=e;return o instanceof t||(o=new t(i).setContent(e)),n&&o.setLatLng(n),o}}),Jn.include({_initOverlay:function(t,e,n,i){var o=n;return o instanceof t?(p(o,i),o._source=this):(o=e&&!i?e:new t(i,this)).setContent(n),o}});var Ri=Ai.extend({options:{pane:"popupPane",offset:[0,7],maxWidth:300,minWidth:50,maxHeight:null,autoPan:!0,autoPanPaddingTopLeft:null,autoPanPaddingBottomRight:null,autoPanPadding:[5,5],keepInView:!1,closeButton:!0,autoClose:!0,closeOnEscapeKey:!0,className:""},openOn:function(t){return!(t=arguments.length?t:this._source._map).hasLayer(this)&&t._popup&&t._popup.options.autoClose&&t.removeLayer(t._popup),t._popup=this,Ai.prototype.openOn.call(this,t)},onAdd:function(t){Ai.prototype.onAdd.call(this,t),t.fire("popupopen",{popup:this}),this._source&&(this._source.fire("popupopen",{popup:this},!0),this._source instanceof ri||this._source.on("preclick",We))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("popupclose",{popup:this}),this._source&&(this._source.fire("popupclose",{popup:this},!0),this._source instanceof ri||this._source.off("preclick",We))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return(void 0!==this.options.closeOnClick?this.options.closeOnClick:this._map.options.closePopupOnClick)&&(t.preclick=this.close),this.options.keepInView&&(t.moveend=this._adjustPan),t},_initLayout:function(){var t="leaflet-popup",e=this._container=me("div",t+" "+(this.options.className||"")+" leaflet-zoom-animated"),n=this._wrapper=me("div",t+"-content-wrapper",e);if(this._contentNode=me("div",t+"-content",n),Je(e),Ge(this._contentNode),De(e,"contextmenu",We),this._tipContainer=me("div",t+"-tip-container",e),this._tip=me("div",t+"-tip",this._tipContainer),this.options.closeButton){var i=this._closeButton=me("a",t+"-close-button",e);i.setAttribute("role","button"),i.setAttribute("aria-label","Close popup"),i.href="#close",i.innerHTML='<span aria-hidden="true">&#215;</span>',De(i,"click",(function(t){$e(t),this.close()}),this)}},_updateLayout:function(){var t=this._contentNode,e=t.style;e.width="",e.whiteSpace="nowrap";var n=t.offsetWidth;n=Math.min(n,this.options.maxWidth),n=Math.max(n,this.options.minWidth),e.width=n+1+"px",e.whiteSpace="",e.height="";var i=t.offsetHeight,o=this.options.maxHeight,r="leaflet-popup-scrolled";o&&i>o?(e.height=o+"px",we(t,r)):xe(t,r),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),n=this._getAnchor();Le(this._container,e.add(n))},_adjustPan:function(){if(this.options.autoPan)if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning)this._autopanning=!1;else{var t=this._map,e=parseInt(fe(this._container,"marginBottom"),10)||0,n=this._container.offsetHeight+e,i=this._containerWidth,o=new R(this._containerLeft,-n-this._containerBottom);o._add(Se(this._container));var r=t.layerPointToContainerPoint(o),s=I(this.options.autoPanPadding),a=I(this.options.autoPanPaddingTopLeft||s),l=I(this.options.autoPanPaddingBottomRight||s),c=t.getSize(),u=0,h=0;r.x+i+l.x>c.x&&(u=r.x+i-c.x+l.x),r.x-u-a.x<0&&(u=r.x-a.x),r.y+n+l.y>c.y&&(h=r.y+n-c.y+l.y),r.y-h-a.y<0&&(h=r.y-a.y),(u||h)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,h]))}},_getAnchor:function(){return I(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}}),Bi=function(t,e){return new Ri(t,e)};rn.mergeOptions({closePopupOnClick:!0}),rn.include({openPopup:function(t,e,n){return this._initOverlay(Ri,t,e,n).openOn(this),this},closePopup:function(t){return(t=arguments.length?t:this._popup)&&t.close(),this}}),Jn.include({bindPopup:function(t,e){return this._popup=this._initOverlay(Ri,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof Kn||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){Ye(t);var e=t.layer||t.target;this._popup._source!==e||e instanceof ri?(this._popup._source=e,this.openPopup(t.latlng)):this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var Ii=Ai.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){Ai.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){Ai.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=Ai.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=me("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+s(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,n,i=this._map,o=this._container,r=i.latLngToContainerPoint(i.getCenter()),s=i.layerPointToContainerPoint(t),a=this.options.direction,l=o.offsetWidth,c=o.offsetHeight,u=I(this.options.offset),h=this._getAnchor();"top"===a?(e=l/2,n=c):"bottom"===a?(e=l/2,n=0):"center"===a?(e=l/2,n=c/2):"right"===a?(e=0,n=c/2):"left"===a?(e=l,n=c/2):s.x<r.x?(a="right",e=0,n=c/2):(a="left",e=l+2*(u.x+h.x),n=c/2),t=t.subtract(I(e,n,!0)).add(u).add(h),xe(o,"leaflet-tooltip-right"),xe(o,"leaflet-tooltip-left"),xe(o,"leaflet-tooltip-top"),xe(o,"leaflet-tooltip-bottom"),we(o,"leaflet-tooltip-"+a),Le(o,t)},_updatePosition:function(){var t=this._map.latLngToLayerPoint(this._latlng);this._setPosition(t)},setOpacity:function(t){this.options.opacity=t,this._container&&je(this._container,t)},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center);this._setPosition(e)},_getAnchor:function(){return I(this._source&&this._source._getTooltipAnchor&&!this.options.sticky?this._source._getTooltipAnchor():[0,0])}}),zi=function(t,e){return new Ii(t,e)};rn.include({openTooltip:function(t,e,n){return this._initOverlay(Ii,t,e,n).openOn(this),this},closeTooltip:function(t){return t.close(),this}}),Jn.include({bindTooltip:function(t,e){return this._tooltip&&this.isTooltipOpen()&&this.unbindTooltip(),this._tooltip=this._initOverlay(Ii,this._tooltip,t,e),this._initTooltipInteractions(),this._tooltip.options.permanent&&this._map&&this._map.hasLayer(this)&&this.openTooltip(),this},unbindTooltip:function(){return this._tooltip&&(this._initTooltipInteractions(!0),this.closeTooltip(),this._tooltip=null),this},_initTooltipInteractions:function(t){if(t||!this._tooltipHandlersAdded){var e=t?"off":"on",n={remove:this.closeTooltip,move:this._moveTooltip};this._tooltip.options.permanent?n.add=this._openTooltip:(n.mouseover=this._openTooltip,n.mouseout=this.closeTooltip,n.click=this._openTooltip,this._map?this._addFocusListeners():n.add=this._addFocusListeners),this._tooltip.options.sticky&&(n.mousemove=this._moveTooltip),this[e](n),this._tooltipHandlersAdded=!t}},openTooltip:function(t){return this._tooltip&&(this instanceof Kn||(this._tooltip._source=this),this._tooltip._prepareOpen(t)&&(this._tooltip.openOn(this._map),this.getElement?this._setAriaDescribedByOnLayer(this):this.eachLayer&&this.eachLayer(this._setAriaDescribedByOnLayer,this))),this},closeTooltip:function(){if(this._tooltip)return this._tooltip.close()},toggleTooltip:function(){return this._tooltip&&this._tooltip.toggle(this),this},isTooltipOpen:function(){return this._tooltip.isOpen()},setTooltipContent:function(t){return this._tooltip&&this._tooltip.setContent(t),this},getTooltip:function(){return this._tooltip},_addFocusListeners:function(){this.getElement?this._addFocusListenersOnLayer(this):this.eachLayer&&this.eachLayer(this._addFocusListenersOnLayer,this)},_addFocusListenersOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&(De(e,"focus",(function(){this._tooltip._source=t,this.openTooltip()}),this),De(e,"blur",this.closeTooltip,this))},_setAriaDescribedByOnLayer:function(t){var e="function"==typeof t.getElement&&t.getElement();e&&e.setAttribute("aria-describedby",this._tooltip._container.id)},_openTooltip:function(t){if(this._tooltip&&this._map)if(this._map.dragging&&this._map.dragging.moving()&&!this._openOnceFlag){this._openOnceFlag=!0;var e=this;this._map.once("moveend",(function(){e._openOnceFlag=!1,e._openTooltip(t)}))}else this._tooltip._source=t.layer||t.target,this.openTooltip(this._tooltip.options.sticky?t.latlng:void 0)},_moveTooltip:function(t){var e,n,i=t.latlng;this._tooltip.options.sticky&&t.originalEvent&&(e=this._map.mouseEventToContainerPoint(t.originalEvent),n=this._map.containerPointToLayerPoint(e),i=this._map.layerPointToLatLng(n)),this._tooltip.setLatLng(i)}});var Mi=Qn.extend({options:{iconSize:[12,12],html:!1,bgPos:null,className:"leaflet-div-icon"},createIcon:function(t){var e=t&&"DIV"===t.tagName?t:document.createElement("div"),n=this.options;if(n.html instanceof Element?(ve(e),e.appendChild(n.html)):e.innerHTML=!1!==n.html?n.html:"",n.bgPos){var i=I(n.bgPos);e.style.backgroundPosition=-i.x+"px "+-i.y+"px"}return this._setIconStyles(e,"icon"),e},createShadow:function(){return null}});function Ni(t){return new Mi(t)}Qn.Default=ei;var Di=Jn.extend({options:{tileSize:256,opacity:1,updateWhenIdle:Nt.mobile,updateWhenZooming:!0,updateInterval:200,zIndex:1,bounds:null,minZoom:0,maxZoom:void 0,maxNativeZoom:void 0,minNativeZoom:void 0,noWrap:!1,pane:"tilePane",className:"",keepBuffer:2},initialize:function(t){p(this,t)},onAdd:function(){this._initContainer(),this._levels={},this._tiles={},this._resetView()},beforeAdd:function(t){t._addZoomLimit(this)},onRemove:function(t){this._removeAllTiles(),ye(this._container),t._removeZoomLimit(this),this._container=null,this._tileZoom=void 0},bringToFront:function(){return this._map&&(be(this._container),this._setAutoZIndex(Math.max)),this},bringToBack:function(){return this._map&&(ge(this._container),this._setAutoZIndex(Math.min)),this},getContainer:function(){return this._container},setOpacity:function(t){return this.options.opacity=t,this._updateOpacity(),this},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},isLoading:function(){return this._loading},redraw:function(){if(this._map){this._removeAllTiles();var t=this._clampZoom(this._map.getZoom());t!==this._tileZoom&&(this._tileZoom=t,this._updateLevels()),this._update()}return this},getEvents:function(){var t={viewprereset:this._invalidateAll,viewreset:this._resetView,zoom:this._resetView,moveend:this._onMoveEnd};return this.options.updateWhenIdle||(this._onMove||(this._onMove=a(this._onMoveEnd,this.options.updateInterval,this)),t.move=this._onMove),this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},createTile:function(){return document.createElement("div")},getTileSize:function(){var t=this.options.tileSize;return t instanceof R?t:new R(t,t)},_updateZIndex:function(){this._container&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._container.style.zIndex=this.options.zIndex)},_setAutoZIndex:function(t){for(var e,n=this.getPane().children,i=-t(-1/0,1/0),o=0,r=n.length;o<r;o++)e=n[o].style.zIndex,n[o]!==this._container&&e&&(i=t(i,+e));isFinite(i)&&(this.options.zIndex=i+t(-1,1),this._updateZIndex())},_updateOpacity:function(){if(this._map&&!Nt.ielt9){je(this._container,this.options.opacity);var t=+new Date,e=!1,n=!1;for(var i in this._tiles){var o=this._tiles[i];if(o.current&&o.loaded){var r=Math.min(1,(t-o.loaded)/200);je(o.el,r),r<1?e=!0:(o.active?n=!0:this._onOpaqueTile(o),o.active=!0)}}n&&!this._noPrune&&this._pruneTiles(),e&&(C(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this))}},_onOpaqueTile:c,_initContainer:function(){this._container||(this._container=me("div","leaflet-layer "+(this.options.className||"")),this._updateZIndex(),this.options.opacity<1&&this._updateOpacity(),this.getPane().appendChild(this._container))},_updateLevels:function(){var t=this._tileZoom,e=this.options.maxZoom;if(void 0!==t){for(var n in this._levels)n=Number(n),this._levels[n].el.children.length||n===t?(this._levels[n].el.style.zIndex=e-Math.abs(t-n),this._onUpdateLevel(n)):(ye(this._levels[n].el),this._removeTilesAtZoom(n),this._onRemoveLevel(n),delete this._levels[n]);var i=this._levels[t],o=this._map;return i||((i=this._levels[t]={}).el=me("div","leaflet-tile-container leaflet-zoom-animated",this._container),i.el.style.zIndex=e,i.origin=o.project(o.unproject(o.getPixelOrigin()),t).round(),i.zoom=t,this._setZoomTransform(i,o.getCenter(),o.getZoom()),c(i.el.offsetWidth),this._onCreateLevel(i)),this._level=i,i}},_onUpdateLevel:c,_onRemoveLevel:c,_onCreateLevel:c,_pruneTiles:function(){if(this._map){var t,e,n=this._map.getZoom();if(n>this.options.maxZoom||n<this.options.minZoom)this._removeAllTiles();else{for(t in this._tiles)(e=this._tiles[t]).retain=e.current;for(t in this._tiles)if((e=this._tiles[t]).current&&!e.active){var i=e.coords;this._retainParent(i.x,i.y,i.z,i.z-5)||this._retainChildren(i.x,i.y,i.z,i.z+2)}for(t in this._tiles)this._tiles[t].retain||this._removeTile(t)}}},_removeTilesAtZoom:function(t){for(var e in this._tiles)this._tiles[e].coords.z===t&&this._removeTile(e)},_removeAllTiles:function(){for(var t in this._tiles)this._removeTile(t)},_invalidateAll:function(){for(var t in this._levels)ye(this._levels[t].el),this._onRemoveLevel(Number(t)),delete this._levels[t];this._removeAllTiles(),this._tileZoom=void 0},_retainParent:function(t,e,n,i){var o=Math.floor(t/2),r=Math.floor(e/2),s=n-1,a=new R(+o,+r);a.z=+s;var l=this._tileCoordsToKey(a),c=this._tiles[l];return c&&c.active?(c.retain=!0,!0):(c&&c.loaded&&(c.retain=!0),s>i&&this._retainParent(o,r,s,i))},_retainChildren:function(t,e,n,i){for(var o=2*t;o<2*t+2;o++)for(var r=2*e;r<2*e+2;r++){var s=new R(o,r);s.z=n+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];l&&l.active?l.retain=!0:(l&&l.loaded&&(l.retain=!0),n+1<i&&this._retainChildren(o,r,n+1,i))}},_resetView:function(t){var e=t&&(t.pinch||t.flyTo);this._setView(this._map.getCenter(),this._map.getZoom(),e,e)},_animateZoom:function(t){this._setView(t.center,t.zoom,!0,t.noUpdate)},_clampZoom:function(t){var e=this.options;return void 0!==e.minNativeZoom&&t<e.minNativeZoom?e.minNativeZoom:void 0!==e.maxNativeZoom&&e.maxNativeZoom<t?e.maxNativeZoom:t},_setView:function(t,e,n,i){var o=Math.round(e);o=void 0!==this.options.maxZoom&&o>this.options.maxZoom||void 0!==this.options.minZoom&&o<this.options.minZoom?void 0:this._clampZoom(o);var r=this.options.updateWhenZooming&&o!==this._tileZoom;i&&!r||(this._tileZoom=o,this._abortLoading&&this._abortLoading(),this._updateLevels(),this._resetGrid(),void 0!==o&&this._update(t),n||this._pruneTiles(),this._noPrune=!!n),this._setZoomTransforms(t,e)},_setZoomTransforms:function(t,e){for(var n in this._levels)this._setZoomTransform(this._levels[n],t,e)},_setZoomTransform:function(t,e,n){var i=this._map.getZoomScale(n,t.zoom),o=t.origin.multiplyBy(i).subtract(this._map._getNewPixelOrigin(e,n)).round();Nt.any3d?Pe(t.el,o,i):Le(t.el,o)},_resetGrid:function(){var t=this._map,e=t.options.crs,n=this._tileSize=this.getTileSize(),i=this._tileZoom,o=this._map.getPixelWorldBounds(this._tileZoom);o&&(this._globalTileRange=this._pxBoundsToTileRange(o)),this._wrapX=e.wrapLng&&!this.options.noWrap&&[Math.floor(t.project([0,e.wrapLng[0]],i).x/n.x),Math.ceil(t.project([0,e.wrapLng[1]],i).x/n.y)],this._wrapY=e.wrapLat&&!this.options.noWrap&&[Math.floor(t.project([e.wrapLat[0],0],i).y/n.x),Math.ceil(t.project([e.wrapLat[1],0],i).y/n.y)]},_onMoveEnd:function(){this._map&&!this._map._animatingZoom&&this._update()},_getTiledPixelBounds:function(t){var e=this._map,n=e._animatingZoom?Math.max(e._animateToZoom,e.getZoom()):e.getZoom(),i=e.getZoomScale(n,this._tileZoom),o=e.project(t,this._tileZoom).floor(),r=e.getSize().divideBy(2*i);return new z(o.subtract(r),o.add(r))},_update:function(t){var e=this._map;if(e){var n=this._clampZoom(e.getZoom());if(void 0===t&&(t=e.getCenter()),void 0!==this._tileZoom){var i=this._getTiledPixelBounds(t),o=this._pxBoundsToTileRange(i),r=o.getCenter(),s=[],a=this.options.keepBuffer,l=new z(o.getBottomLeft().subtract([a,-a]),o.getTopRight().add([a,-a]));if(!(isFinite(o.min.x)&&isFinite(o.min.y)&&isFinite(o.max.x)&&isFinite(o.max.y)))throw new Error("Attempted to load an infinite number of tiles");for(var c in this._tiles){var u=this._tiles[c].coords;u.z===this._tileZoom&&l.contains(new R(u.x,u.y))||(this._tiles[c].current=!1)}if(Math.abs(n-this._tileZoom)>1)this._setView(t,n);else{for(var h=o.min.y;h<=o.max.y;h++)for(var d=o.min.x;d<=o.max.x;d++){var p=new R(d,h);if(p.z=this._tileZoom,this._isValidTile(p)){var f=this._tiles[this._tileCoordsToKey(p)];f?f.current=!0:s.push(p)}}if(s.sort((function(t,e){return t.distanceTo(r)-e.distanceTo(r)})),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var m=document.createDocumentFragment();for(d=0;d<s.length;d++)this._addTile(s[d],m);this._level.el.appendChild(m)}}}}},_isValidTile:function(t){var e=this._map.options.crs;if(!e.infinite){var n=this._globalTileRange;if(!e.wrapLng&&(t.x<n.min.x||t.x>n.max.x)||!e.wrapLat&&(t.y<n.min.y||t.y>n.max.y))return!1}if(!this.options.bounds)return!0;var i=this._tileCoordsToBounds(t);return D(this.options.bounds).overlaps(i)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,n=this.getTileSize(),i=t.scaleBy(n),o=i.add(n);return[e.unproject(i,t.z),e.unproject(o,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),n=new N(e[0],e[1]);return this.options.noWrap||(n=this._map.wrapLatLngBounds(n)),n},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),n=new R(+e[0],+e[1]);return n.z=+e[2],n},_removeTile:function(t){var e=this._tiles[t];e&&(ye(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){we(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=c,t.onmousemove=c,Nt.ielt9&&this.options.opacity<1&&je(t,this.options.opacity)},_addTile:function(t,e){var n=this._getTilePos(t),i=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),o(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&j(o(this._tileReady,this,t,null,r)),Le(r,n),this._tiles[i]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,n){e&&this.fire("tileerror",{error:e,tile:n,coords:t});var i=this._tileCoordsToKey(t);(n=this._tiles[i])&&(n.loaded=+new Date,this._map._fadeAnimated?(je(n.el,0),C(this._fadeFrame),this._fadeFrame=j(this._updateOpacity,this)):(n.active=!0,this._pruneTiles()),e||(we(n.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:n.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),Nt.ielt9||!this._map._fadeAnimated?j(this._pruneTiles,this):setTimeout(o(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new R(this._wrapX?l(t.x,this._wrapX):t.x,this._wrapY?l(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new z(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}});function Fi(t){return new Di(t)}var Hi=Di.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=p(this,e)).detectRetina&&Nt.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var n=document.createElement("img");return De(n,"load",o(this._tileOnLoad,this,e,n)),De(n,"error",o(this._tileOnError,this,e,n)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(n.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(n.referrerPolicy=this.options.referrerPolicy),n.alt="",n.src=this.getTileUrl(t),n},getTileUrl:function(t){var e={r:Nt.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var i=this._globalTileRange.max.y-t.y;this.options.tms&&(e.y=i),e["-y"]=i}return y(this._url,n(e,this.options))},_tileOnLoad:function(t,e){Nt.ielt9?setTimeout(o(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,n){var i=this.options.errorTileUrl;i&&e.getAttribute("src")!==i&&(e.src=i),t(n,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom;return this.options.zoomReverse&&(t=e-t),t+this.options.zoomOffset},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=c,e.onerror=c,!e.complete)){e.src=g;var n=this._tiles[t].coords;ye(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:n})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",g),Di.prototype._removeTile.call(this,t)},_tileReady:function(t,e,n){if(this._map&&(!n||n.getAttribute("src")!==g))return Di.prototype._tileReady.call(this,t,e,n)}});function Vi(t,e){return new Hi(t,e)}var Zi=Hi.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,e){this._url=t;var i=n({},this.defaultWmsParams);for(var o in e)o in this.options||(i[o]=e[o]);var r=(e=p(this,e)).detectRetina&&Nt.retina?2:1,s=this.getTileSize();i.width=s.x*r,i.height=s.y*r,this.wmsParams=i},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,Hi.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),n=this._crs,i=M(n.project(e[0]),n.project(e[1])),o=i.min,r=i.max,s=(this._wmsVersion>=1.3&&this._crs===Wn?[o.y,o.x,r.y,r.x]:[o.x,o.y,r.x,r.y]).join(","),a=Hi.prototype.getTileUrl.call(this,t);return a+f(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,e){return n(this.wmsParams,t),e||this.redraw(),this}});function qi(t,e){return new Zi(t,e)}Hi.WMS=Zi,Vi.wms=qi;var Ui=Jn.extend({options:{padding:.1},initialize:function(t){p(this,t),s(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),we(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var n=this._map.getZoomScale(e,this._zoom),i=this._map.getSize().multiplyBy(.5+this.options.padding),o=this._map.project(this._center,e),r=i.multiplyBy(-n).add(o).subtract(this._map._getNewPixelOrigin(t,e));Nt.any3d?Pe(this._container,r,n):Le(this._container,r)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),n=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new z(n,n.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),Wi=Ui.extend({options:{tolerance:0},getEvents:function(){var t=Ui.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){Ui.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");De(t,"mousemove",this._onMouseMove,this),De(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),De(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){C(this._redrawRequest),delete this._ctx,ye(this._container),He(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ui.prototype._update.call(this);var t=this._bounds,e=this._container,n=t.getSize(),i=Nt.retina?2:1;Le(e,t.min),e.width=i*n.x,e.height=i*n.y,e.style.width=n.x+"px",e.style.height=n.y+"px",Nt.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){Ui.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[s(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,n=e.next,i=e.prev;n?n.prev=i:this._drawLast=i,i?i.next=n:this._drawFirst=n,delete t._order,delete this._layers[s(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,n,i=t.options.dashArray.split(/[, ]+/),o=[];for(n=0;n<i.length;n++){if(e=Number(i[n]),isNaN(e))return;o.push(e)}t.options._dashArray=o}else t.options._dashArray=t.options.dashArray},_requestRedraw:function(t){this._map&&(this._extendRedrawBounds(t),this._redrawRequest=this._redrawRequest||j(this._redraw,this))},_extendRedrawBounds:function(t){if(t._pxBounds){var e=(t.options.weight||0)+1;this._redrawBounds=this._redrawBounds||new z,this._redrawBounds.extend(t._pxBounds.min.subtract([e,e])),this._redrawBounds.extend(t._pxBounds.max.add([e,e]))}},_redraw:function(){this._redrawRequest=null,this._redrawBounds&&(this._redrawBounds.min._floor(),this._redrawBounds.max._ceil()),this._clear(),this._draw(),this._redrawBounds=null},_clear:function(){var t=this._redrawBounds;if(t){var e=t.getSize();this._ctx.clearRect(t.min.x,t.min.y,e.x,e.y)}else this._ctx.save(),this._ctx.setTransform(1,0,0,1,0,0),this._ctx.clearRect(0,0,this._container.width,this._container.height),this._ctx.restore()},_draw:function(){var t,e=this._redrawBounds;if(this._ctx.save(),e){var n=e.getSize();this._ctx.beginPath(),this._ctx.rect(e.min.x,e.min.y,n.x,n.y),this._ctx.clip()}this._drawing=!0;for(var i=this._drawFirst;i;i=i.next)t=i.layer,(!e||t._pxBounds&&t._pxBounds.intersects(e))&&t._updatePath();this._drawing=!1,this._ctx.restore()},_updatePoly:function(t,e){if(this._drawing){var n,i,o,r,s=t._parts,a=s.length,l=this._ctx;if(a){for(l.beginPath(),n=0;n<a;n++){for(i=0,o=s[n].length;i<o;i++)r=s[n][i],l[i?"lineTo":"moveTo"](r.x,r.y);e&&l.closePath()}this._fillStroke(l,t)}}},_updateCircle:function(t){if(this._drawing&&!t._empty()){var e=t._point,n=this._ctx,i=Math.max(Math.round(t._radius),1),o=(Math.max(Math.round(t._radiusY),1)||i)/i;1!==o&&(n.save(),n.scale(1,o)),n.beginPath(),n.arc(e.x,e.y/o,i,0,2*Math.PI,!1),1!==o&&n.restore(),this._fillStroke(n,t)}},_fillStroke:function(t,e){var n=e.options;n.fill&&(t.globalAlpha=n.fillOpacity,t.fillStyle=n.fillColor||n.color,t.fill(n.fillRule||"evenodd")),n.stroke&&0!==n.weight&&(t.setLineDash&&t.setLineDash(e.options&&e.options._dashArray||[]),t.globalAlpha=n.opacity,t.lineWidth=n.weight,t.strokeStyle=n.color,t.lineCap=n.lineCap,t.lineJoin=n.lineJoin,t.stroke())},_onClick:function(t){for(var e,n,i=this._map.mouseEventToLayerPoint(t),o=this._drawFirst;o;o=o.next)(e=o.layer).options.interactive&&e._containsPoint(i)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(e))&&(n=e);this._fireEvent(!!n&&[n],t)},_onMouseMove:function(t){if(this._map&&!this._map.dragging.moving()&&!this._map._animatingZoom){var e=this._map.mouseEventToLayerPoint(t);this._handleMouseHover(t,e)}},_handleMouseOut:function(t){var e=this._hoveredLayer;e&&(xe(this._container,"leaflet-interactive"),this._fireEvent([e],t,"mouseout"),this._hoveredLayer=null,this._mouseHoverThrottled=!1)},_handleMouseHover:function(t,e){if(!this._mouseHoverThrottled){for(var n,i,r=this._drawFirst;r;r=r.next)(n=r.layer).options.interactive&&n._containsPoint(e)&&(i=n);i!==this._hoveredLayer&&(this._handleMouseOut(t),i&&(we(this._container,"leaflet-interactive"),this._fireEvent([i],t,"mouseover"),this._hoveredLayer=i)),this._fireEvent(!!this._hoveredLayer&&[this._hoveredLayer],t),this._mouseHoverThrottled=!0,setTimeout(o((function(){this._mouseHoverThrottled=!1}),this),32)}},_fireEvent:function(t,e,n){this._map._fireDOMEvent(e,n||e.type,t)},_bringToFront:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;n&&(n.prev=i,i?i.next=n:n&&(this._drawFirst=n),e.prev=this._drawLast,this._drawLast.next=e,e.next=null,this._drawLast=e,this._requestRedraw(t))}},_bringToBack:function(t){var e=t._order;if(e){var n=e.next,i=e.prev;i&&(i.next=n,n?n.prev=i:i&&(this._drawLast=i),e.prev=null,e.next=this._drawFirst,this._drawFirst.prev=e,this._drawFirst=e,this._requestRedraw(t))}}});function Gi(t){return Nt.canvas?new Wi(t):null}var Ji=function(){try{return document.namespaces.add("lvml","urn:schemas-microsoft-com:vml"),function(t){return document.createElement("<lvml:"+t+' class="lvml">')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),$i={_initContainer:function(){this._container=me("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(Ui.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=Ji("shape");we(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=Ji("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;ye(e),t.removeInteractiveTarget(e),delete this._layers[s(t)]},_updateStyle:function(t){var e=t._stroke,n=t._fill,i=t.options,o=t._container;o.stroked=!!i.stroke,o.filled=!!i.fill,i.stroke?(e||(e=t._stroke=Ji("stroke")),o.appendChild(e),e.weight=i.weight+"px",e.color=i.color,e.opacity=i.opacity,i.dashArray?e.dashStyle=v(i.dashArray)?i.dashArray.join(" "):i.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=i.lineCap.replace("butt","flat"),e.joinstyle=i.lineJoin):e&&(o.removeChild(e),t._stroke=null),i.fill?(n||(n=t._fill=Ji("fill")),o.appendChild(n),n.color=i.fillColor||i.color,n.opacity=i.fillOpacity):n&&(o.removeChild(n),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),n=Math.round(t._radius),i=Math.round(t._radiusY||n);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+n+","+i+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){be(t._container)},_bringToBack:function(t){ge(t._container)}},Yi=Nt.vml?Ji:K,Ki=Ui.extend({_initContainer:function(){this._container=Yi("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=Yi("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){ye(this._container),He(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){Ui.prototype._update.call(this);var t=this._bounds,e=t.getSize(),n=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,n.setAttribute("width",e.x),n.setAttribute("height",e.y)),Le(n,t.min),n.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=Yi("path");t.options.className&&we(e,t.options.className),t.options.interactive&&we(e,"leaflet-interactive"),this._updateStyle(t),this._layers[s(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){ye(t._path),t.removeInteractiveTarget(t._path),delete this._layers[s(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,n=t.options;e&&(n.stroke?(e.setAttribute("stroke",n.color),e.setAttribute("stroke-opacity",n.opacity),e.setAttribute("stroke-width",n.weight),e.setAttribute("stroke-linecap",n.lineCap),e.setAttribute("stroke-linejoin",n.lineJoin),n.dashArray?e.setAttribute("stroke-dasharray",n.dashArray):e.removeAttribute("stroke-dasharray"),n.dashOffset?e.setAttribute("stroke-dashoffset",n.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),n.fill?(e.setAttribute("fill",n.fillColor||n.color),e.setAttribute("fill-opacity",n.fillOpacity),e.setAttribute("fill-rule",n.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,X(t._parts,e))},_updateCircle:function(t){var e=t._point,n=Math.max(Math.round(t._radius),1),i="a"+n+","+(Math.max(Math.round(t._radiusY),1)||n)+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-n)+","+e.y+i+2*n+",0 "+i+2*-n+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){be(t._path)},_bringToBack:function(t){ge(t._path)}});function Xi(t){return Nt.svg||Nt.vml?new Ki(t):null}Nt.vml&&Ki.include($i),rn.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&Gi(t)||Xi(t)}});var Qi=di.extend({initialize:function(t,e){di.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=D(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});function to(t,e){return new Qi(t,e)}Ki.create=Yi,Ki.pointsToPath=X,fi.geometryToLayer=mi,fi.coordsToLatLng=vi,fi.coordsToLatLngs=bi,fi.latLngToCoords=gi,fi.latLngsToCoords=_i,fi.getFeature=wi,fi.asFeature=xi,rn.mergeOptions({boxZoom:!0});var eo=bn.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){De(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){He(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){ye(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),re(),Ae(),this._startPoint=this._map.mouseEventToContainerPoint(t),De(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=me("div","leaflet-zoom-box",this._container),we(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new z(this._point,this._startPoint),n=e.getSize();Le(this._box,e.min),this._box.style.width=n.x+"px",this._box.style.height=n.y+"px"},_finish:function(){this._moved&&(ye(this._box),xe(this._container,"leaflet-crosshair")),se(),Re(),He(document,{contextmenu:Ye,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(o(this._resetState,this),0);var e=new N(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});rn.addInitHook("addHandler","boxZoom",eo),rn.mergeOptions({doubleClickZoom:!0});var no=bn.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,n=e.getZoom(),i=e.options.zoomDelta,o=t.originalEvent.shiftKey?n-i:n+i;"center"===e.options.doubleClickZoom?e.setZoom(o):e.setZoomAround(t.containerPoint,o)}});rn.addInitHook("addHandler","doubleClickZoom",no),rn.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var io=bn.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new wn(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}we(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){xe(this._map._container,"leaflet-grab"),xe(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=D(this._map.options.maxBounds);this._offsetLimit=M(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,n=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(n),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.x<e.min.x&&(t.x=this._viscousLimit(t.x,e.min.x)),t.y<e.min.y&&(t.y=this._viscousLimit(t.y,e.min.y)),t.x>e.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),n=this._initialWorldOffset,i=this._draggable._newPos.x,o=(i-e+n)%t+e-n,r=(i+e+n)%t-e-n,s=Math.abs(o+n)<Math.abs(r+n)?o:r;this._draggable._absPos=this._draggable._newPos.clone(),this._draggable._newPos.x=s},_onDragEnd:function(t){var e=this._map,n=e.options,i=!n.inertia||t.noInertia||this._times.length<2;if(e.fire("dragend",t),i)e.fire("moveend");else{this._prunePositions(+new Date);var o=this._lastPos.subtract(this._positions[0]),r=(this._lastTime-this._times[0])/1e3,s=n.easeLinearity,a=o.multiplyBy(s/r),l=a.distanceTo([0,0]),c=Math.min(n.inertiaMaxSpeed,l),u=a.multiplyBy(c/l),h=c/(n.inertiaDeceleration*s),d=u.multiplyBy(-h/2).round();d.x||d.y?(d=e._limitOffset(d,e.options.maxBounds),j((function(){e.panBy(d,{duration:h,easeLinearity:s,noMoveStart:!0,animate:!0})}))):e.fire("moveend")}}});rn.addInitHook("addHandler","dragging",io),rn.mergeOptions({keyboard:!0,keyboardPanDelta:80});var oo=bn.extend({keyCodes:{left:[37],right:[39],down:[40],up:[38],zoomIn:[187,107,61,171],zoomOut:[189,109,54,173]},initialize:function(t){this._map=t,this._setPanDelta(t.options.keyboardPanDelta),this._setZoomDelta(t.options.zoomDelta)},addHooks:function(){var t=this._map._container;t.tabIndex<=0&&(t.tabIndex="0"),De(t,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.on({focus:this._addHooks,blur:this._removeHooks},this)},removeHooks:function(){this._removeHooks(),He(this._map._container,{focus:this._onFocus,blur:this._onBlur,mousedown:this._onMouseDown},this),this._map.off({focus:this._addHooks,blur:this._removeHooks},this)},_onMouseDown:function(){if(!this._focused){var t=document.body,e=document.documentElement,n=t.scrollTop||e.scrollTop,i=t.scrollLeft||e.scrollLeft;this._map._container.focus(),window.scrollTo(i,n)}},_onFocus:function(){this._focused=!0,this._map.fire("focus")},_onBlur:function(){this._focused=!1,this._map.fire("blur")},_setPanDelta:function(t){var e,n,i=this._panKeys={},o=this.keyCodes;for(e=0,n=o.left.length;e<n;e++)i[o.left[e]]=[-1*t,0];for(e=0,n=o.right.length;e<n;e++)i[o.right[e]]=[t,0];for(e=0,n=o.down.length;e<n;e++)i[o.down[e]]=[0,t];for(e=0,n=o.up.length;e<n;e++)i[o.up[e]]=[0,-1*t]},_setZoomDelta:function(t){var e,n,i=this._zoomKeys={},o=this.keyCodes;for(e=0,n=o.zoomIn.length;e<n;e++)i[o.zoomIn[e]]=t;for(e=0,n=o.zoomOut.length;e<n;e++)i[o.zoomOut[e]]=-t},_addHooks:function(){De(document,"keydown",this._onKeyDown,this)},_removeHooks:function(){He(document,"keydown",this._onKeyDown,this)},_onKeyDown:function(t){if(!(t.altKey||t.ctrlKey||t.metaKey)){var e,n=t.keyCode,i=this._map;if(n in this._panKeys){if(!i._panAnim||!i._panAnim._inProgress)if(e=this._panKeys[n],t.shiftKey&&(e=I(e).multiplyBy(3)),i.options.maxBounds&&(e=i._limitOffset(I(e),i.options.maxBounds)),i.options.worldCopyJump){var o=i.wrapLatLng(i.unproject(i.project(i.getCenter()).add(e)));i.panTo(o)}else i.panBy(e)}else if(n in this._zoomKeys)i.setZoom(i.getZoom()+(t.shiftKey?3:1)*this._zoomKeys[n]);else{if(27!==n||!i._popup||!i._popup.options.closeOnEscapeKey)return;i.closePopup()}Ye(t)}}});rn.addInitHook("addHandler","keyboard",oo),rn.mergeOptions({scrollWheelZoom:!0,wheelDebounceTime:40,wheelPxPerZoomLevel:60});var ro=bn.extend({addHooks:function(){De(this._map._container,"wheel",this._onWheelScroll,this),this._delta=0},removeHooks:function(){He(this._map._container,"wheel",this._onWheelScroll,this)},_onWheelScroll:function(t){var e=tn(t),n=this._map.options.wheelDebounceTime;this._delta+=e,this._lastMousePos=this._map.mouseEventToContainerPoint(t),this._startTime||(this._startTime=+new Date);var i=Math.max(n-(+new Date-this._startTime),0);clearTimeout(this._timer),this._timer=setTimeout(o(this._performZoom,this),i),Ye(t)},_performZoom:function(){var t=this._map,e=t.getZoom(),n=this._map.options.zoomSnap||0;t._stop();var i=this._delta/(4*this._map.options.wheelPxPerZoomLevel),o=4*Math.log(2/(1+Math.exp(-Math.abs(i))))/Math.LN2,r=n?Math.ceil(o/n)*n:o,s=t._limitZoom(e+(this._delta>0?r:-r))-e;this._delta=0,this._startTime=null,s&&("center"===t.options.scrollWheelZoom?t.setZoom(e+s):t.setZoomAround(this._lastMousePos,e+s))}});rn.addInitHook("addHandler","scrollWheelZoom",ro);var so=600;rn.mergeOptions({tapHold:Nt.touchNative&&Nt.safari&&Nt.mobile,tapTolerance:15});var ao=bn.extend({addHooks:function(){De(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){He(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new R(e.clientX,e.clientY),this._holdTimeout=setTimeout(o((function(){this._cancel(),this._isTapValid()&&(De(document,"touchend",$e),De(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))}),this),so),De(document,"touchend touchcancel contextmenu",this._cancel,this),De(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){He(document,"touchend",$e),He(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),He(document,"touchend touchcancel contextmenu",this._cancel,this),He(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new R(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var n=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});n._simulated=!0,e.target.dispatchEvent(n)}});rn.addInitHook("addHandler","tapHold",ao),rn.mergeOptions({touchZoom:Nt.touch,bounceAtZoomLimits:!0});var lo=bn.extend({addHooks:function(){we(this._map._container,"leaflet-touch-zoom"),De(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){xe(this._map._container,"leaflet-touch-zoom"),He(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(n.add(i)._divideBy(2))),this._startDist=n.distanceTo(i),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),De(document,"touchmove",this._onTouchMove,this),De(document,"touchend touchcancel",this._onTouchEnd,this),$e(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,n=e.mouseEventToContainerPoint(t.touches[0]),i=e.mouseEventToContainerPoint(t.touches[1]),r=n.distanceTo(i)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoom<e.getMinZoom()&&r<1||this._zoom>e.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var s=n._add(i)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===s.x&&0===s.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(s),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),C(this._animRequest);var a=o(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=j(a,this,!0),$e(t)}},_onTouchEnd:function(){this._moved&&this._zooming?(this._zooming=!1,C(this._animRequest),He(document,"touchmove",this._onTouchMove,this),He(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))):this._zooming=!1}});rn.addInitHook("addHandler","touchZoom",lo),rn.BoxZoom=eo,rn.DoubleClickZoom=no,rn.Drag=io,rn.Keyboard=oo,rn.ScrollWheelZoom=ro,rn.TapHold=ao,rn.TouchZoom=lo,t.Bounds=z,t.Browser=Nt,t.CRS=Z,t.Canvas=Wi,t.Circle=li,t.CircleMarker=si,t.Class=P,t.Control=an,t.DivIcon=Mi,t.DivOverlay=Ai,t.DomEvent=nn,t.DomUtil=Ne,t.Draggable=wn,t.Evented=A,t.FeatureGroup=Kn,t.GeoJSON=fi,t.GridLayer=Di,t.Handler=bn,t.Icon=Qn,t.ImageOverlay=Ci,t.LatLng=F,t.LatLngBounds=N,t.Layer=Jn,t.LayerGroup=$n,t.LineUtil=Hn,t.Map=rn,t.Marker=ii,t.Mixin=gn,t.Path=ri,t.Point=R,t.PolyUtil=Cn,t.Polygon=di,t.Polyline=ui,t.Popup=Ri,t.PosAnimation=on,t.Projection=qn,t.Rectangle=Qi,t.Renderer=Ui,t.SVG=Ki,t.SVGOverlay=Si,t.TileLayer=Hi,t.Tooltip=Ii,t.Transformation=G,t.Util=E,t.VideoOverlay=Pi,t.bind=o,t.bounds=M,t.canvas=Gi,t.circle=ci,t.circleMarker=ai,t.control=ln,t.divIcon=Ni,t.extend=n,t.featureGroup=Xn,t.geoJSON=Oi,t.geoJson=ji,t.gridLayer=Fi,t.icon=ti,t.imageOverlay=Ei,t.latLng=H,t.latLngBounds=D,t.layerGroup=Yn,t.map=sn,t.marker=oi,t.point=I,t.polygon=pi,t.polyline=hi,t.popup=Bi,t.rectangle=to,t.setOptions=p,t.stamp=s,t.svg=Xi,t.svgOverlay=Ti,t.tileLayer=Vi,t.tooltip=zi,t.transformation=J,t.version=e,t.videoOverlay=Li;var co=window.L;t.noConflict=function(){return window.L=co,this},window.L=t}(e)},72:t=>{var e=[];function n(t){for(var n=-1,i=0;i<e.length;i++)if(e[i].identifier===t){n=i;break}return n}function i(t,i){for(var r={},s=[],a=0;a<t.length;a++){var l=t[a],c=i.base?l[0]+i.base:l[0],u=r[c]||0,h="".concat(c," ").concat(u);r[c]=u+1;var d=n(h),p={css:l[1],media:l[2],sourceMap:l[3],supports:l[4],layer:l[5]};if(-1!==d)e[d].references++,e[d].updater(p);else{var f=o(p,i);i.byIndex=a,e.splice(a,0,{identifier:h,updater:f,references:1})}s.push(h)}return s}function o(t,e){var n=e.domAPI(e);n.update(t);return function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,o){var r=i(t=t||[],o=o||{});return function(t){t=t||[];for(var s=0;s<r.length;s++){var a=n(r[s]);e[a].references--}for(var l=i(t,o),c=0;c<r.length;c++){var u=n(r[c]);0===e[u].references&&(e[u].updater(),e.splice(u,1))}r=l}}},659:t=>{var e={};t.exports=function(t,n){var i=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!i)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");i.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var i="";n.supports&&(i+="@supports (".concat(n.supports,") {")),n.media&&(i+="@media ".concat(n.media," {"));var o=void 0!==n.layer;o&&(i+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),i+=n.css,o&&(i+="}"),n.media&&(i+="}"),n.supports&&(i+="}");var r=n.sourceMap;r&&"undefined"!=typeof btoa&&(i+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(r))))," */")),e.styleTagTransform(i,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},426:(t,e,n)=>{t.exports=n.p+"images/layers-2x.png"},982:(t,e,n)=>{t.exports=n.p+"images/layers.png"},272:(t,e,n)=>{t.exports=n.p+"images/marker-icon-2x.png"},927:(t,e,n)=>{t.exports=n.p+"images/marker-icon.png"},980:(t,e,n)=>{t.exports=n.p+"images/marker-shadow.png"}},e={};function n(i){var o=e[i];if(void 0!==o)return o.exports;var r=e[i]={id:i,exports:{}};return t[i].call(r.exports,r,r.exports,n),r.exports}n.m=t,n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var i in e)n.o(e,i)&&!n.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{var t;if("string"==typeof import.meta.url&&(t=import.meta.url),!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=t})(),n.b=document.baseURI||self.location.href,n.nc=void 0;var i={};n.d(i,{AU:()=>tt,Zx:()=>z,J3:()=>W});var o=n(692),r=n(481),s=n.n(r),a=n(72),l=n.n(a),c=n(825),u=n.n(c),h=n(659),d=n.n(h),p=n(56),f=n.n(p),m=n(540),y=n.n(m),v=n(113),b=n.n(v),g=n(81),_={};_.styleTagTransform=b(),_.setAttributes=f(),_.insert=d().bind(null,"head"),_.domAPI=u(),_.insertStyleElement=y();l()(g.A,_);g.A&&g.A.locals&&g.A.locals;function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function x(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return k(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?k(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}function k(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function O(t,e,n){return e=C(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,j()?Reflect.construct(e,n||[],C(t).constructor):e.apply(t,n))}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&P(t,e)}function P(t,e){return P=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},P(t,e)}function S(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function T(t,e,n){return(e=I(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function A(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function R(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,I(i.key),i)}}function B(t,e,n){return e&&R(t.prototype,e),n&&R(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t}function I(t){var e=function(t,e){if("object"!=w(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=w(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==w(e)?e:e+""}delete s().Icon.Default.prototype._getIconUrl,s().Icon.Default.mergeOptions({iconRetinaUrl:new URL(n(272),n.b).href,iconUrl:new URL(n(927),n.b).href,shadowUrl:new URL(n(980),n.b).href});var z=function(){return B((function t(e,n){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},s=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};A(this,t),this.container=e.contentContainer||e,this.schema=n,this.data=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?S(Object(n),!0).forEach((function(e){T(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({},r),delete this.data._flags,this.callback=s,this.options=i,this.container.innerHTML="",Object.assign(this.container.style,{display:"flex",flexDirection:"column",padding:"20px",background:"#fdfdfd",borderRadius:"8px",border:"1px solid #ccc",minHeight:"400px",width:"100%",overflowX:"hidden",overflowY:"auto",gap:"10px"}),this.registerLeafletEditor(),this.registerEnumEditor(),this.registerTreeSelector(),o.JSONEditor.defaults.resolvers.unshift((function(t){if("leaflet-map"===t.format)return"leaflet-map"})),o.JSONEditor.defaults.resolvers.unshift((function(t){if("dynamicEnum"===t.format)return"dynamicEnum"})),o.JSONEditor.defaults.resolvers.unshift((function(t){if("treeSelector"===t.format)return"treeSelector"})),this.createEditor()}),[{key:"registerTreeSelector",value:function(){o.JSONEditor.defaults.editors.treeSelector=function(){function t(){return A(this,t),O(this,t,arguments)}return E(t,o.JSONEditor.AbstractEditor),B(t,[{key:"build",value:function(){var t;this.container=this.theme.getContainer(),this.input=this.theme.getFormInputField("hidden"),this.container.appendChild(this.input),this.schema.title&&(this.header=this.theme.getHeader(this.schema.title),this.container.appendChild(this.header)),this.treeContainer=document.createElement("div"),Object.assign(this.treeContainer.style,{border:"1px solid #ccc",padding:"8px",maxHeight:"300px",overflowY:"auto",background:"#fff"}),this.container.appendChild(this.treeContainer);var e=document.createElement("style");e.textContent="\n .je-tree li { margin: 4px 0; }\n .je-tree .node-label { cursor: pointer; display:inline-block; padding:2px 6px; border-radius:4px; }\n .je-tree .node-label.folder { font-weight:600; }\n .je-tree .node-children { margin-left: 14px; display: block; }\n .je-tree .collapsed > .node-children { display: none; }\n .je-tree .selected { background:#007bff; color:#fff; }\n ",this.treeContainer.appendChild(e);var n=(null===(t=this.schema.options)||void 0===t?void 0:t.tree)||[];if(this.currentTree=n,this.rootUL=document.createElement("ul"),this.rootUL.className="je-tree",this.rootUL.style.listStyle="none",this.rootUL.style.paddingLeft="6px",this.treeContainer.appendChild(this.rootUL),this.buildTree(n,this.rootUL),void 0===this.value&&void 0!==this.schema.default)this.setValue(this.schema.default);else if(this.jsoneditor&&this.jsoneditor.options&&this.jsoneditor.options.startval){var i=this.jsoneditor.options.startval[this.key];void 0!==i&&this.setValue(i)}this.register()}},{key:"buildTree",value:function(t,e){var n=this;t.forEach((function(t){var i=document.createElement("li");i.classList.add("collapsed");var o=document.createElement("span");if(o.textContent=t.label,o.className="node-label "+(t.children?"folder":"leaf"),i.appendChild(o),e.appendChild(i),t.children&&t.children.length){var r=document.createElement("div");r.className="node-children",i.appendChild(r);var s=document.createElement("ul");s.style.listStyle="none",s.style.paddingLeft="6px",r.appendChild(s),n.buildTree(t.children,s),o.addEventListener("click",(function(t){t.stopPropagation(),i.classList.toggle("collapsed")}))}else o.addEventListener("click",(function(e){e.stopPropagation(),n.selectLeaf(o,t)}))}))}},{key:"selectLeaf",value:function(t,e){this.treeContainer.querySelectorAll(".node-label").forEach((function(t){return t.classList.remove("selected")})),t.classList.add("selected"),this.value=void 0!==e.value?e.value:e.label,this.input&&(this.input.value=this.value),this.onChange(!0)}},{key:"setOptions",value:function(t){this.currentTree=t,this.rootUL.innerHTML="",this.buildTree(t,this.rootUL)}},{key:"setValue",value:function(t){this.value=t,this.input&&(this.input.value=t),this.treeContainer.querySelectorAll(".node-label").forEach((function(e){e.classList.remove("selected"),e.textContent!==t&&e.datasetValue!==String(t)||e.classList.add("selected")})),this.onChange(!0)}},{key:"getValue",value:function(){return this.value}}])}()}},{key:"registerEnumEditor",value:function(){o.JSONEditor.defaults.editors.dynamicEnum=function(){function t(){return A(this,t),O(this,t,arguments)}return E(t,o.JSONEditor.AbstractEditor),B(t,[{key:"build",value:function(){var t=this;if(this.schema.title){var e=document.createElement("label");e.textContent=this.schema.title,e.style.display="block",e.style.marginBottom="4px",this.container.appendChild(e)}this.select=document.createElement("select"),this.select.classList.add("form-control"),this.input=this.select,this.container.appendChild(this.select),this.setOptions(this.schema.options||[]),this.select.addEventListener("change",(function(){t.value=t.select.value,t.onChange(!0)})),this.register()}},{key:"setOptions",value:function(t){this.options=t,this.select.innerHTML="";var e,n=x(t);try{for(n.s();!(e=n.n()).done;){var i=e.value,o=document.createElement("option");o.value=i.option_id,o.textContent=i.option_desc,this.select.appendChild(o)}}catch(t){n.e(t)}finally{n.f()}}},{key:"setValue",value:function(t){this.value=t,this.select.value=t,this.onChange(!0)}},{key:"refresh",value:function(){this.setOptions(this.options),this.select.value=this.value}},{key:"getValue",value:function(){return this.select.value}}])}()}},{key:"registerLeafletEditor",value:function(){o.JSONEditor.defaults.editors["leaflet-map"]=function(){function t(){return A(this,t),O(this,t,arguments)}return E(t,o.JSONEditor.AbstractEditor),B(t,[{key:"build",value:function(){var t,e=this;if(this.schema.title){var n=document.createElement("label");n.textContent=this.schema.title,n.style.display="block",n.style.marginBottom="4px",this.container.appendChild(n)}this.inputsDiv=document.createElement("div"),Object.assign(this.inputsDiv.style,{display:"flex",gap:"10px"}),this.latInput=document.createElement("input"),this.latInput.type="number",this.latInput.placeholder="Latitude",this.latInput.step="any",this.latInput.style.flex="1",this.inputsDiv.appendChild(this.latInput),this.lngInput=document.createElement("input"),this.lngInput.type="number",this.lngInput.placeholder="Longitude",this.lngInput.step="any",this.lngInput.style.flex="1",this.inputsDiv.appendChild(this.lngInput),this.container.appendChild(this.inputsDiv),this.mapDiv=document.createElement("div"),Object.assign(this.mapDiv.style,{flex:"1",width:"100%",minHeight:"300px",background:"#eee",border:"1px solid #ccc",borderRadius:"4px"}),this.container.appendChild(this.mapDiv),this.value=(null===(t=this.data)||void 0===t?void 0:t.location)||{lat:0,lng:0},this.latInput.addEventListener("input",(function(){return e.updateFromInputs()})),this.lngInput.addEventListener("input",(function(){return e.updateFromInputs()})),requestAnimationFrame((function(){return e.initMap()}))}},{key:"initMap",value:function(){var t=this;this.map||(this.map=s().map(this.mapDiv).setView([this.value.lat,this.value.lng],8),s().tileLayer("https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:"&copy; OpenStreetMap contributors"}).addTo(this.map),this.marker=s().marker([this.value.lat,this.value.lng],{draggable:!0}).addTo(this.map),this.marker.on("dragend",(function(e){var n=e.target.getLatLng();t.setValue({lat:n.lat,lng:n.lng}),t.onChange(!0)})),setTimeout((function(){return t.map.invalidateSize()}),200),requestAnimationFrame((function(){return t.map.invalidateSize()})),this.ro=new ResizeObserver((function(){t.map&&t.map.invalidateSize()})),this.ro.observe(this.container))}},{key:"updateFromInputs",value:function(){var t=parseFloat(this.latInput.value)||0,e=parseFloat(this.lngInput.value)||0;this.setValue({lat:t,lng:e}),this.onChange(!0)}},{key:"setValue",value:function(t){t||(t={});var e="number"==typeof t.lat?t.lat:0,n="number"==typeof t.lng?t.lng:0;this.value={lat:e,lng:n},this.marker&&this.marker.setLatLng([e,n]),this.map&&this.map.panTo([e,n]),this.latInput&&(this.latInput.value=e.toFixed(6)),this.lngInput&&(this.lngInput.value=n.toFixed(6))}},{key:"getValue",value:function(){return this.value}}])}()}},{key:"createEditor",value:function(){var t,e=this;this.editor=new o.JSONEditor(this.container,{schema:this.schema,startval:this.cleanFlags(this.data),show_errors:"always",theme:"bootstrap4",disable_edit_json:!0,disable_collapse:!0,disable_properties:!0,prompt_before_delete:!1,object_layout:(null===(t=this.options)||void 0===t?void 0:t.object_layout)||"grid"});var n=document.createElement("button");n.type="button",n.textContent="Submit",Object.assign(n.style,{marginTop:"15px",backgroundColor:"#28a745",color:"#fff",borderRadius:"5px",padding:"10px 15px",border:"none",cursor:"pointer",fontWeight:"600"}),n.onclick=function(){var t=e.editor.getValue();e.callback(t),console.log("Form submitted:",t)},this.container.appendChild(n)}},{key:"setValue",value:function(t){var e=this.cleanFlags(t);this.data=e,this.editor.setValue(e)}},{key:"cleanFlags",value:function(t){if(!t||"object"!==w(t))return t;var e=Array.isArray(t)?[]:{};for(var n in t)"_flags"!==n&&(e[n]=this.cleanFlags(t[n]));return e}}])}(),M=n(782),N=n.n(M),D=n(861),F={};F.styleTagTransform=b(),F.setAttributes=f(),F.insert=d().bind(null,"head"),F.domAPI=u(),F.insertStyleElement=y();l()(D.A,F);D.A&&D.A.locals&&D.A.locals;function H(t){return H="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},H(t)}function V(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return Z(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Z(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}function Z(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function q(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,U(i.key),i)}}function U(t){var e=function(t,e){if("object"!=H(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=H(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==H(e)?e:e+""}var W=function(){return t=function t(e,n){var i=arguments.length>3?arguments[3]:void 0,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:function(){};!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.w=e.contentContainer||e;var r=this.getLayout(this.w),s=(r.container,r.menu),a=r.workarea;this.menu=s,this.workarea=a,this.callback=o,this.id=null,this.enableDropEvents(),this.editor=new(N())(this.workarea),this.editor.start(),n&&this.loadSchema(n),this.addExportButton(),i&&Object.keys(i).length>0&&this.editor.import(i)},e=[{key:"loadSchema",value:function(t){var e,n=V(t);try{for(n.s();!(e=n.n()).done;){var i=e.value;this.addOption(i.label,i.icon,i.type,i.inputs,i.outputs,i.html,i.data)}}catch(t){n.e(t)}finally{n.f()}}},{key:"setValue",value:function(t){if(t&&(this.id=t.id,this.editor.module,this.editor.clear(),t.object))try{this.editor.import(t.object)}catch(t){console.error("Error importing data into Drawflow:",t)}}},{key:"add",value:function(){this.editor.addNode("github",0,1,150,300,"github",{name:""},'<div><input type="text" df-name></div>')}},{key:"getLayout",value:function(t){var e=document.createElement("div");e.style.display="flex",e.style.width="100%",e.style.height="100%";var n=document.createElement("div");n.style.width="200px",n.style.height="100%",n.style.background="#eee",n.style.overflowY="auto";var i=document.createElement("div");return i.style.flex="1",i.style.height="100%",i.style.position="relative",i.style.overflow="auto",i.style.background="#f9f9f9",e.appendChild(n),e.appendChild(i),t.appendChild(e),{container:e,menu:n,workarea:i}}},{key:"addExportButton",value:function(){var t=this,e=document.createElement("button");e.textContent="SAVE",e.style.width="100%",e.style.padding="8px",e.style.cursor="pointer",e.style.border="none",e.style.background="#444",e.style.color="white",e.style.fontWeight="bold",e.onclick=function(){var e=t.editor.export();t.callback&&t.callback(e)},this.menu.appendChild(e)}},{key:"addOption",value:function(t,e,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:1,o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,r=arguments.length>5&&void 0!==arguments[5]?arguments[5]:"",s=arguments.length>6&&void 0!==arguments[6]?arguments[6]:{};this.addMenuOption(this.menu,t,e,n,i,o,r,s)}},{key:"drag",value:function(t){var e=t.target;t.dataTransfer.setData("node",e.getAttribute("data-node")),t.dataTransfer.setData("inputs",e.getAttribute("data-inputs")),t.dataTransfer.setData("outputs",e.getAttribute("data-outputs")),t.dataTransfer.setData("html",e.getAttribute("data-html")),t.dataTransfer.setData("data",e.getAttribute("data-data"))}},{key:"dragOver",value:function(t){t.preventDefault()}},{key:"drop",value:function(t){t.preventDefault();var e=t.dataTransfer.getData("node"),n=parseInt(t.dataTransfer.getData("inputs")),i=parseInt(t.dataTransfer.getData("outputs")),o=t.dataTransfer.getData("html")||"<div>".concat(e,"</div>"),r=JSON.parse(t.dataTransfer.getData("data")||"{}"),s=t.clientX-this.workarea.getBoundingClientRect().left,a=t.clientY-this.workarea.getBoundingClientRect().top;this.editor.addNode(e,n,i,s,a,e,r,o)}},{key:"enableDropEvents",value:function(){var t=this;this.workarea.addEventListener("dragover",(function(e){return t.dragOver(e)})),this.workarea.addEventListener("drop",(function(e){return t.drop(e)}))}},{key:"addMenuOption",value:function(t,e,n,i,o,r,s,a){var l=this,c=document.createElement("div");if(c.className="drag-drawflow",c.setAttribute("draggable","true"),c.setAttribute("data-node",i),c.setAttribute("data-inputs",o),c.setAttribute("data-outputs",r),c.setAttribute("data-html",s),c.setAttribute("data-data",JSON.stringify(a)),c.ondragstart=function(t){return l.drag(t)},n){var u=document.createElement("i");u.className=n,c.appendChild(u)}var h=document.createElement("span");return h.textContent=" "+e,c.appendChild(h),c.style.cursor="grab",c.style.padding="8px",c.style.borderBottom="1px solid #ccc",t.appendChild(c),c}}],e&&q(t.prototype,e),n&&q(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}();function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function J(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function $(t,e,n){return(e=Q(e))in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Y(t,e){var n="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!n){if(Array.isArray(t)||(n=function(t,e){if(t){if("string"==typeof t)return K(t,e);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?K(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){n&&(t=n);var i=0,o=function(){};return{s:o,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var r,s=!0,a=!1;return{s:function(){n=n.call(t)},n:function(){var t=n.next();return s=t.done,t},e:function(t){a=!0,r=t},f:function(){try{s||null==n.return||n.return()}finally{if(a)throw r}}}}function K(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=Array(e);n<e;n++)i[n]=t[n];return i}function X(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,Q(i.key),i)}}function Q(t){var e=function(t,e){if("object"!=G(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e||"default");if("object"!=G(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==G(e)?e:e+""}var tt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.raw=e,this.nodes=this.extractNodes(e)},e=[{key:"extractNodes",value:function(t){var e;return(null==t||null===(e=t.drawflow)||void 0===e||null===(e=e.Home)||void 0===e?void 0:e.data)||{}}},{key:"getNodesByLevel",value:function(t){return Object.values(this.nodes).filter((function(e){return e.data.level===t}))}},{key:"getChildren",value:function(t){var e,n=this;return((null===(e=t.outputs)||void 0===e||null===(e=e.output_1)||void 0===e?void 0:e.connections)||[]).map((function(t){return n.nodes[t.node]})).filter(Boolean)}},{key:"getLevel",value:function(t){var e=this;if(t<1)return[];if(1===t)return this.getNodesByLevel(1).map((function(t){return t.data.name}));var n,i=this.getNodesByLevel(t-1),o=this.getNodesByLevel(t),r=[],s=Y(i);try{var a=function(){var t=n.value,i=e.getFullPath(t).map((function(t){return t.data.name})).join(":"),s=o.filter((function(n){return e.getFullPath(n).includes(t)})).map((function(t){return t.data.name}));r.push($({},i,s))};for(s.s();!(n=s.n()).done;)a()}catch(t){s.e(t)}finally{s.f()}return r}},{key:"getFullPath",value:function(t){for(var e=[t],n=t;;){var i=this.findParent(n);if(!i)break;e.unshift(i),n=i}return e}},{key:"findParent",value:function(t){var e=this;return Object.values(this.nodes).find((function(n){return e.getChildren(n).includes(t)}))}},{key:"getProducts",value:function(){var t=this;return Object.values(this.nodes).filter((function(t){var e;return"product"===(null===(e=t.data)||void 0===e?void 0:e.type)})).map((function(e){var n=t.getFullPath(e),i={id:e.id,name:e.data.name,sku:e.data.sku};return n.forEach((function(t){1===t.data.level&&(i.category=t.data.name),2===t.data.level&&(i.subcategory=t.data.name),3===t.data.level&&t!==e&&(i.subsubcategory=t.data.name)})),i}))}},{key:"getLevelByName",value:function(t){var e=this;return Object.values(this.nodes).filter((function(e){var n;return(null===(n=e.data)||void 0===n?void 0:n.type)===t})).map((function(t){var n,i=e.getFullPath(t),o=function(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?J(Object(n),!0).forEach((function(e){$(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}({id:t.id,name:t.data.name,type:t.data.type},t.data),r=Y(i);try{for(r.s();!(n=r.n()).done;){var s=n.value,a=s.data.level;1===a?o.category=s.data.name:2===a?o.subcategory=s.data.name:3===a&&s!==t&&(o.subsubcategory=s.data.name)}}catch(t){r.e(t)}finally{r.f()}return o}))}}],e&&X(t.prototype,e),n&&X(t,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e,n}(),et=i.AU,nt=i.Zx,it=i.J3;export{et as TreeParser,nt as vi_Form,it as vi_TreeForm};