diff --git a/public/javascripts/@json-editor/json-editor/2.5.2/jsoneditor.js b/public/javascripts/@json-editor/json-editor/2.5.2/jsoneditor.js deleted file mode 100644 index 64fd8bdc2be..00000000000 --- a/public/javascripts/@json-editor/json-editor/2.5.2/jsoneditor.js +++ /dev/null @@ -1,14 +0,0 @@ -/*! - * /** - * * @name JSON Editor - * * @description JSON Schema Based Editor - * * This library is the continuation of jdorn's great work (see also https://github.com/jdorn/json-editor/issues/800) - * * @version "2.5.2" - * * @author Jeremy Dorn - * * @see https://github.com/jdorn/json-editor/ - * * @see https://github.com/json-editor/json-editor - * * @license MIT - * * @example see README.md and docs/ for requirements, examples and usage info - * * / - */ -!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n=e();for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},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 r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},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="/dist/",n(n.s=165)}([function(t,e,n){var r=n(34),i=n(94),o=n(70),a=n(63),s=n(120),l=a.set,c=a.getterFor("Array Iterator");t.exports=s(Array,"Array",(function(t,e){l(this,{type:"Array Iterator",target:r(t),index:0,kind:e})}),(function(){var t=c(this),e=t.target,n=t.kind,r=t.index++;return!e||r>=e.length?(t.target=void 0,{value:void 0,done:!0}):"keys"==n?{value:r,done:!1}:"values"==n?{value:e[r],done:!1}:{value:[r,e[r]],done:!1}}),"values"),o.Arguments=o.Array,i("keys"),i("values"),i("entries")},function(t,e,n){var r=n(14),i=n(22),o=n(52),a=n(64),s=n(23),l=n(90),c=n(111),u=n(17),h=n(27),d=n(66),p=n(26),f=n(28),y=n(32),m=n(34),v=n(62),b=n(60),g=n(53),_=n(67),w=n(65),k=n(141),x=n(88),j=n(47),O=n(30),C=n(73),E=n(39),S=n(45),R=n(83),P=n(74),L=n(75),T=n(84),A=n(19),I=n(113),D=n(114),B=n(91),N=n(63),F=n(54).forEach,V=P("hidden"),H=A("toPrimitive"),z=N.set,M=N.getterFor("Symbol"),q=Object.prototype,U=i.Symbol,G=o("JSON","stringify"),$=j.f,J=O.f,W=k.f,Z=C.f,Q=R("symbols"),Y=R("op-symbols"),X=R("string-to-symbol-registry"),K=R("symbol-to-string-registry"),tt=R("wks"),et=i.QObject,nt=!et||!et.prototype||!et.prototype.findChild,rt=s&&u((function(){return 7!=g(J({},"a",{get:function(){return J(this,"a",{value:7}).a}})).a}))?function(t,e,n){var r=$(q,e);r&&delete q[e],J(t,e,n),r&&t!==q&&J(q,e,r)}:J,it=function(t,e){var n=Q[t]=g(U.prototype);return z(n,{type:"Symbol",tag:t,description:e}),s||(n.description=e),n},ot=c?function(t){return"symbol"==typeof t}:function(t){return Object(t)instanceof U},at=function(t,e,n){t===q&&at(Y,e,n),f(t);var r=v(e,!0);return f(n),h(Q,r)?(n.enumerable?(h(t,V)&&t[V][r]&&(t[V][r]=!1),n=g(n,{enumerable:b(0,!1)})):(h(t,V)||J(t,V,b(1,{})),t[V][r]=!0),rt(t,r,n)):J(t,r,n)},st=function(t,e){f(t);var n=m(e),r=_(n).concat(ht(n));return F(r,(function(e){s&&!lt.call(n,e)||at(t,e,n[e])})),t},lt=function(t){var e=v(t,!0),n=Z.call(this,e);return!(this===q&&h(Q,e)&&!h(Y,e))&&(!(n||!h(this,e)||!h(Q,e)||h(this,V)&&this[V][e])||n)},ct=function(t,e){var n=m(t),r=v(e,!0);if(n!==q||!h(Q,r)||h(Y,r)){var i=$(n,r);return!i||!h(Q,r)||h(n,V)&&n[V][r]||(i.enumerable=!0),i}},ut=function(t){var e=W(m(t)),n=[];return F(e,(function(t){h(Q,t)||h(L,t)||n.push(t)})),n},ht=function(t){var e=t===q,n=W(e?Y:m(t)),r=[];return F(n,(function(t){!h(Q,t)||e&&!h(q,t)||r.push(Q[t])})),r};(l||(S((U=function(){if(this instanceof U)throw TypeError("Symbol is not a constructor");var t=arguments.length&&void 0!==arguments[0]?String(arguments[0]):void 0,e=T(t),n=function(t){this===q&&n.call(Y,t),h(this,V)&&h(this[V],e)&&(this[V][e]=!1),rt(this,e,b(1,t))};return s&&nt&&rt(q,e,{configurable:!0,set:n}),it(e,t)}).prototype,"toString",(function(){return M(this).tag})),S(U,"withoutSetter",(function(t){return it(T(t),t)})),C.f=lt,O.f=at,j.f=ct,w.f=k.f=ut,x.f=ht,I.f=function(t){return it(A(t),t)},s&&(J(U.prototype,"description",{configurable:!0,get:function(){return M(this).description}}),a||S(q,"propertyIsEnumerable",lt,{unsafe:!0}))),r({global:!0,wrap:!0,forced:!l,sham:!l},{Symbol:U}),F(_(tt),(function(t){D(t)})),r({target:"Symbol",stat:!0,forced:!l},{for:function(t){var e=String(t);if(h(X,e))return X[e];var n=U(e);return X[e]=n,K[n]=e,n},keyFor:function(t){if(!ot(t))throw TypeError(t+" is not a symbol");if(h(K,t))return K[t]},useSetter:function(){nt=!0},useSimple:function(){nt=!1}}),r({target:"Object",stat:!0,forced:!l,sham:!s},{create:function(t,e){return void 0===e?g(t):st(g(t),e)},defineProperty:at,defineProperties:st,getOwnPropertyDescriptor:ct}),r({target:"Object",stat:!0,forced:!l},{getOwnPropertyNames:ut,getOwnPropertySymbols:ht}),r({target:"Object",stat:!0,forced:u((function(){x.f(1)}))},{getOwnPropertySymbols:function(t){return x.f(y(t))}}),G)&&r({target:"JSON",stat:!0,forced:!l||u((function(){var t=U();return"[null]"!=G([t])||"{}"!=G({a:t})||"{}"!=G(Object(t))}))},{stringify:function(t,e,n){for(var r,i=[t],o=1;arguments.length>o;)i.push(arguments[o++]);if(r=e,(p(e)||void 0!==t)&&!ot(t))return d(e)||(e=function(t,e){if("function"==typeof r&&(e=r.call(this,t,e)),!ot(e))return e}),i[1]=e,G.apply(null,i)}});U.prototype[H]||E(U.prototype,H,U.prototype.valueOf),B(U,"Symbol"),L[V]=!0},function(t,e,n){var r=n(14),i=n(23),o=n(22),a=n(27),s=n(26),l=n(30).f,c=n(107),u=o.Symbol;if(i&&"function"==typeof u&&(!("description"in u.prototype)||void 0!==u().description)){var h={},d=function(){var t=arguments.length<1||void 0===arguments[0]?void 0:String(arguments[0]),e=this instanceof d?new u(t):void 0===t?u():u(t);return""===t&&(h[e]=!0),e};c(d,u);var p=d.prototype=u.prototype;p.constructor=d;var f=p.toString,y="Symbol(test)"==String(u("test")),m=/^Symbol\((.*)\)[^)]+$/;l(p,"description",{configurable:!0,get:function(){var t=s(this)?this.valueOf():this,e=f.call(t);if(a(h,t))return"";var n=y?e.slice(7,-1):e.replace(m,"$1");return""===n?void 0:n}}),r({global:!0,forced:!0},{Symbol:d})}},function(t,e,n){n(114)("iterator")},function(t,e,n){var r=n(45),i=Date.prototype,o=i.toString,a=i.getTime;new Date(NaN)+""!="Invalid Date"&&r(i,"toString",(function(){var t=a.call(this);return t==t?o.call(this):"Invalid Date"}))},function(t,e,n){var r=n(95),i=n(45),o=n(152);r||i(Object.prototype,"toString",o,{unsafe:!0})},function(t,e,n){var r=n(45),i=n(28),o=n(17),a=n(97),s=RegExp.prototype,l=s.toString,c=o((function(){return"/a/b"!=l.call({source:"a",flags:"b"})})),u="toString"!=l.name;(c||u)&&r(RegExp.prototype,"toString",(function(){var t=i(this),e=String(t.source),n=t.flags;return"/"+e+"/"+String(void 0===n&&t instanceof RegExp&&!("flags"in s)?a.call(t):n)}),{unsafe:!0})},function(t,e,n){var r=n(124).charAt,i=n(63),o=n(120),a=i.set,s=i.getterFor("String Iterator");o(String,"String",(function(t){a(this,{type:"String Iterator",string:String(t),index:0})}),(function(){var t,e=s(this),n=e.string,i=e.index;return i>=n.length?{value:void 0,done:!0}:(t=r(n,i),e.index+=t.length,{value:t,done:!1})}))},function(t,e,n){var r=n(22),i=n(125),o=n(0),a=n(39),s=n(19),l=s("iterator"),c=s("toStringTag"),u=o.values;for(var h in i){var d=r[h],p=d&&d.prototype;if(p){if(p[l]!==u)try{a(p,l,u)}catch(t){p[l]=u}if(p[c]||a(p,c,h),i[h])for(var f in o)if(p[f]!==o[f])try{a(p,f,o[f])}catch(t){p[f]=o[f]}}}},function(t,e,n){var r=n(14),i=n(23);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperty:n(30).f})},function(t,e,n){n(14)({target:"Object",stat:!0,sham:!n(23)},{create:n(53)})},function(t,e,n){var r=n(14),i=n(17),o=n(32),a=n(76),s=n(122);r({target:"Object",stat:!0,forced:i((function(){a(1)})),sham:!s},{getPrototypeOf:function(t){return a(o(t))}})},function(t,e,n){n(14)({target:"Object",stat:!0},{setPrototypeOf:n(96)})},function(t,e,n){var r=n(14),i=n(52),o=n(55),a=n(28),s=n(26),l=n(53),c=n(131),u=n(17),h=i("Reflect","construct"),d=u((function(){function t(){}return!(h((function(){}),[],t)instanceof t)})),p=!u((function(){h((function(){}))})),f=d||p;r({target:"Reflect",stat:!0,forced:f,sham:f},{construct:function(t,e){o(t),a(e);var n=arguments.length<3?t:o(arguments[2]);if(p&&!d)return h(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 r=[null];return r.push.apply(r,e),new(c.apply(t,r))}var i=n.prototype,u=l(s(i)?i:Object.prototype),f=Function.apply.call(t,u,e);return s(f)?f:u}})},function(t,e,n){var r=n(22),i=n(47).f,o=n(39),a=n(45),s=n(82),l=n(107),c=n(89);t.exports=function(t,e){var n,u,h,d,p,f=t.target,y=t.global,m=t.stat;if(n=y?r:m?r[f]||s(f,{}):(r[f]||{}).prototype)for(u in e){if(d=e[u],h=t.noTargetGet?(p=i(n,u))&&p.value:n[u],!c(y?u:f+(m?".":"#")+u,t.forced)&&void 0!==h){if(typeof d==typeof h)continue;l(d,h)}(t.sham||h&&h.sham)&&o(d,"sham",!0),a(n,u,d,t)}}},function(t,e,n){var r=n(14),i=n(17),o=n(34),a=n(47).f,s=n(23),l=i((function(){a(1)}));r({target:"Object",stat:!0,forced:!s||l,sham:!s},{getOwnPropertyDescriptor:function(t,e){return a(o(t),e)}})},function(t,e,n){var r=n(14),i=n(26),o=n(28),a=n(27),s=n(47),l=n(76);r({target:"Reflect",stat:!0},{get:function t(e,n){var r,c,u=arguments.length<3?e:arguments[2];return o(e)===u?e[n]:(r=s.f(e,n))?a(r,"value")?r.value:void 0===r.get?void 0:r.get.call(u):i(c=l(e))?t(c,n,u):void 0}})},function(t,e){t.exports=function(t){try{return!!t()}catch(t){return!0}}},function(t,e,n){var r=n(14),i=n(17),o=n(66),a=n(26),s=n(32),l=n(35),c=n(68),u=n(92),h=n(69),d=n(19),p=n(116),f=d("isConcatSpreadable"),y=p>=51||!i((function(){var t=[];return t[f]=!1,t.concat()[0]!==t})),m=h("concat"),v=function(t){if(!a(t))return!1;var e=t[f];return void 0!==e?!!e:o(t)};r({target:"Array",proto:!0,forced:!y||!m},{concat:function(t){var e,n,r,i,o,a=s(this),h=u(a,0),d=0;for(e=-1,r=arguments.length;e9007199254740991)throw TypeError("Maximum allowed index exceeded");for(n=0;n=9007199254740991)throw TypeError("Maximum allowed index exceeded");c(h,d++,o)}return h.length=d,h}})},function(t,e,n){var r=n(22),i=n(83),o=n(27),a=n(84),s=n(90),l=n(111),c=i("wks"),u=r.Symbol,h=l?u:u&&u.withoutSetter||a;t.exports=function(t){return o(c,t)||(s&&o(u,t)?c[t]=u[t]:c[t]=h("Symbol."+t)),c[t]}},function(t,e,n){var r=n(14),i=n(118);r({target:"Array",proto:!0,forced:[].forEach!=i},{forEach:i})},function(t,e,n){var r=n(22),i=n(125),o=n(118),a=n(39);for(var s in i){var l=r[s],c=l&&l.prototype;if(c&&c.forEach!==o)try{a(c,"forEach",o)}catch(t){c.forEach=o}}},function(t,e,n){(function(e){var n=function(t){return t&&t.Math==Math&&t};t.exports=n("object"==typeof globalThis&&globalThis)||n("object"==typeof window&&window)||n("object"==typeof self&&self)||n("object"==typeof e&&e)||Function("return this")()}).call(this,n(138))},function(t,e,n){var r=n(17);t.exports=!r((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]}))},function(t,e,n){var r=n(14),i=n(77);r({target:"RegExp",proto:!0,forced:/./.exec!==i},{exec:i})},function(t,e,n){n(14)({target:"Array",stat:!0},{isArray:n(66)})},function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},function(t,e,n){var r=n(26);t.exports=function(t){if(!r(t))throw TypeError(String(t)+" is not an object");return t}},function(t,e,n){var r=n(14),i=n(85).includes,o=n(94);r({target:"Array",proto:!0,forced:!n(40)("indexOf",{ACCESSORS:!0,1:0})},{includes:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("includes")},function(t,e,n){var r=n(23),i=n(103),o=n(28),a=n(62),s=Object.defineProperty;e.f=r?s:function(t,e,n){if(o(t),e=a(e,!0),o(n),i)try{return s(t,e,n)}catch(t){}if("get"in n||"set"in n)throw TypeError("Accessors not supported");return"value"in n&&(t[e]=n.value),t}},function(t,e,n){var r=n(14),i=n(26),o=n(66),a=n(86),s=n(35),l=n(34),c=n(68),u=n(19),h=n(69),d=n(40),p=h("slice"),f=d("slice",{ACCESSORS:!0,0:0,1:2}),y=u("species"),m=[].slice,v=Math.max;r({target:"Array",proto:!0,forced:!p||!f},{slice:function(t,e){var n,r,u,h=l(this),d=s(h.length),p=a(t,d),f=a(void 0===e?d:e,d);if(o(h)&&("function"!=typeof(n=h.constructor)||n!==Array&&!o(n.prototype)?i(n)&&null===(n=n[y])&&(n=void 0):n=void 0,n===Array||void 0===n))return m.call(h,p,f);for(r=new(void 0===n?Array:n)(v(f-p,0)),u=0;p0?i(r(t),9007199254740991):0}},function(t,e,n){var r=n(14),i=n(142);r({target:"Array",stat:!0,forced:!n(146)((function(t){Array.from(t)}))},{from:i})},function(t,e,n){var r=n(14),i=n(128),o=n(38);r({target:"String",proto:!0,forced:!n(129)("includes")},{includes:function(t){return!!~String(o(this)).indexOf(i(t),arguments.length>1?arguments[1]:void 0)}})},function(t,e){t.exports=function(t){if(null==t)throw TypeError("Can't call method on "+t);return t}},function(t,e,n){var r=n(23),i=n(30),o=n(60);t.exports=r?function(t,e,n){return i.f(t,e,o(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n){var r=n(23),i=n(17),o=n(27),a=Object.defineProperty,s={},l=function(t){throw t};t.exports=function(t,e){if(o(s,t))return s[t];e||(e={});var n=[][t],c=!!o(e,"ACCESSORS")&&e.ACCESSORS,u=o(e,0)?e[0]:l,h=o(e,1)?e[1]:void 0;return s[t]=!!n&&!i((function(){if(c&&!r)return!0;var t={length:-1};c?a(t,1,{enumerable:!0,get:l}):t[1]=1,n.call(t,u,h)}))}},function(t,e,n){var r=n(14),i=n(149).left,o=n(56),a=n(40),s=o("reduce"),l=a("reduce",{1:0});r({target:"Array",proto:!0,forced:!s||!l},{reduce:function(t){return i(this,t,arguments.length,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(14),i=n(32),o=n(67);r({target:"Object",stat:!0,forced:n(17)((function(){o(1)}))},{keys:function(t){return o(i(t))}})},function(t,e,n){var r=n(99),i=n(28),o=n(32),a=n(35),s=n(50),l=n(38),c=n(100),u=n(101),h=Math.max,d=Math.min,p=Math.floor,f=/\$([$&'`]|\d\d?|<[^>]*>)/g,y=/\$([$&'`]|\d\d?)/g;r("replace",2,(function(t,e,n,r){var m=r.REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE,v=r.REPLACE_KEEPS_$0,b=m?"$":"$0";return[function(n,r){var i=l(this),o=null==n?void 0:n[t];return void 0!==o?o.call(n,i,r):e.call(String(i),n,r)},function(t,r){if(!m&&v||"string"==typeof r&&-1===r.indexOf(b)){var o=n(e,t,this,r);if(o.done)return o.value}var l=i(t),p=String(this),f="function"==typeof r;f||(r=String(r));var y=l.global;if(y){var _=l.unicode;l.lastIndex=0}for(var w=[];;){var k=u(l,p);if(null===k)break;if(w.push(k),!y)break;""===String(k[0])&&(l.lastIndex=c(p,a(l.lastIndex),_))}for(var x,j="",O=0,C=0;C=O&&(j+=p.slice(O,S)+A,O=S+E.length)}return j+p.slice(O)}];function g(t,n,r,i,a,s){var l=r+t.length,c=i.length,u=y;return void 0!==a&&(a=o(a),u=f),e.call(s,u,(function(e,o){var s;switch(o.charAt(0)){case"$":return"$";case"&":return t;case"`":return n.slice(0,r);case"'":return n.slice(l);case"<":s=a[o.slice(1,-1)];break;default:var u=+o;if(0===u)return e;if(u>c){var h=p(u/10);return 0===h?e:h<=c?void 0===i[h-1]?o.charAt(1):i[h-1]+o.charAt(1):e}s=i[u-1]}return void 0===s?"":s}))}}))},function(t,e,n){var r=n(14),i=n(54).map,o=n(69),a=n(40),s=o("map"),l=a("map");r({target:"Array",proto:!0,forced:!s||!l},{map:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(22),i=n(39),o=n(27),a=n(82),s=n(105),l=n(63),c=l.get,u=l.enforce,h=String(String).split("String");(t.exports=function(t,e,n,s){var l=!!s&&!!s.unsafe,c=!!s&&!!s.enumerable,d=!!s&&!!s.noTargetGet;"function"==typeof n&&("string"!=typeof e||o(n,"name")||i(n,"name",e),u(n).source=h.join("string"==typeof e?e:"")),t!==r?(l?!d&&t[e]&&(c=!0):delete t[e],c?t[e]=n:i(t,e,n)):c?t[e]=n:a(e,n)})(Function.prototype,"toString",(function(){return"function"==typeof this&&c(this).source||s(this)}))},function(t,e,n){var r=n(99),i=n(28),o=n(35),a=n(38),s=n(100),l=n(101);r("match",1,(function(t,e,n){return[function(e){var n=a(this),r=null==e?void 0:e[t];return void 0!==r?r.call(e,n):new RegExp(e)[t](String(n))},function(t){var r=n(e,t,this);if(r.done)return r.value;var a=i(t),c=String(this);if(!a.global)return l(a,c);var u=a.unicode;a.lastIndex=0;for(var h,d=[],p=0;null!==(h=l(a,c));){var f=String(h[0]);d[p]=f,""===f&&(a.lastIndex=s(c,o(a.lastIndex),u)),p++}return 0===p?null:d}]}))},function(t,e,n){var r=n(23),i=n(73),o=n(60),a=n(34),s=n(62),l=n(27),c=n(103),u=Object.getOwnPropertyDescriptor;e.f=r?u:function(t,e){if(t=a(t),e=s(e,!0),c)try{return u(t,e)}catch(t){}if(l(t,e))return o(!i.f.call(t,e),t[e])}},function(t,e,n){var r=n(14),i=n(61),o=n(34),a=n(56),s=[].join,l=i!=Object,c=a("join",",");r({target:"Array",proto:!0,forced:l||!c},{join:function(t){return s.call(o(this),void 0===t?",":t)}})},function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},function(t,e,n){var r=n(99),i=n(98),o=n(28),a=n(38),s=n(155),l=n(100),c=n(35),u=n(101),h=n(77),d=n(17),p=[].push,f=Math.min,y=!d((function(){return!RegExp(4294967295,"y")}));r("split",2,(function(t,e,n){var r;return r="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(t,n){var r=String(a(this)),o=void 0===n?4294967295:n>>>0;if(0===o)return[];if(void 0===t)return[r];if(!i(t))return e.call(r,t,o);for(var s,l,c,u=[],d=(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.unicode?"u":"")+(t.sticky?"y":""),f=0,y=new RegExp(t.source,d+"g");(s=h.call(y,r))&&!((l=y.lastIndex)>f&&(u.push(r.slice(f,s.index)),s.length>1&&s.index=o));)y.lastIndex===s.index&&y.lastIndex++;return f===r.length?!c&&y.test("")||u.push(""):u.push(r.slice(f)),u.length>o?u.slice(0,o):u}:"0".split(void 0,0).length?function(t,n){return void 0===t&&0===n?[]:e.call(this,t,n)}:e,[function(e,n){var i=a(this),o=null==e?void 0:e[t];return void 0!==o?o.call(e,i,n):r.call(String(i),e,n)},function(t,i){var a=n(r,t,this,i,r!==e);if(a.done)return a.value;var h=o(t),d=String(this),p=s(h,RegExp),m=h.unicode,v=(h.ignoreCase?"i":"")+(h.multiline?"m":"")+(h.unicode?"u":"")+(y?"y":"g"),b=new p(y?h:"^(?:"+h.source+")",v),g=void 0===i?4294967295:i>>>0;if(0===g)return[];if(0===d.length)return null===u(b,d)?[d]:[];for(var _=0,w=0,k=[];w"+t+"<\/script>"},f=function(){try{r=document.domain&&new ActiveXObject("htmlfile")}catch(t){}var t,e;f=r?function(t){t.write(p("")),t.close();var e=t.parentWindow.Object;return t=null,e}(r):((e=c("iframe")).style.display="none",l.appendChild(e),e.src=String("javascript:"),(t=e.contentWindow.document).open(),t.write(p("document.F=Object")),t.close(),t.F);for(var n=a.length;n--;)delete f.prototype[a[n]];return f()};s[h]=!0,t.exports=Object.create||function(t,e){var n;return null!==t?(d.prototype=i(t),n=new d,d.prototype=null,n[h]=t):n=f(),void 0===e?n:o(n,e)}},function(t,e,n){var r=n(115),i=n(61),o=n(32),a=n(35),s=n(92),l=[].push,c=function(t){var e=1==t,n=2==t,c=3==t,u=4==t,h=6==t,d=5==t||h;return function(p,f,y,m){for(var v,b,g=o(p),_=i(g),w=r(f,y,3),k=a(_.length),x=0,j=m||s,O=e?j(p,k):n?j(p,0):void 0;k>x;x++)if((d||x in _)&&(b=w(v=_[x],x,g),t))if(e)O[x]=b;else if(b)switch(t){case 3:return!0;case 5:return v;case 6:return x;case 2:l.call(O,v)}else if(u)return!1;return h?-1:c||u?u:O}};t.exports={forEach:c(0),map:c(1),filter:c(2),some:c(3),every:c(4),find:c(5),findIndex:c(6)}},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(String(t)+" is not a function");return t}},function(t,e,n){var r=n(17);t.exports=function(t,e){var n=[][t];return!!n&&r((function(){n.call(null,e||function(){throw 1},1)}))}},function(t,e,n){var r=n(14),i=n(123).values;r({target:"Object",stat:!0},{values:function(t){return i(t)}})},function(t,e,n){var r=n(14),i=n(123).entries;r({target:"Object",stat:!0},{entries:function(t){return i(t)}})},function(t,e,n){var r=n(23),i=n(22),o=n(89),a=n(126),s=n(30).f,l=n(65).f,c=n(98),u=n(97),h=n(127),d=n(45),p=n(17),f=n(63).set,y=n(153),m=n(19)("match"),v=i.RegExp,b=v.prototype,g=/a/g,_=/a/g,w=new v(g)!==g,k=h.UNSUPPORTED_Y;if(r&&o("RegExp",!w||k||p((function(){return _[m]=!1,v(g)!=g||v(_)==_||"/a/i"!=v(g,"i")})))){for(var x=function(t,e){var n,r=this instanceof x,i=c(t),o=void 0===e;if(!r&&i&&t.constructor===x&&o)return t;w?i&&!o&&(t=t.source):t instanceof x&&(o&&(e=u.call(t)),t=t.source),k&&(n=!!e&&e.indexOf("y")>-1)&&(e=e.replace(/y/g,""));var s=a(w?new v(t,e):v(t,e),r?this:b,x);return k&&n&&f(s,{sticky:n}),s},j=function(t){t in x||s(x,t,{configurable:!0,get:function(){return v[t]},set:function(e){v[t]=e}})},O=l(v),C=0;O.length>C;)j(O[C++]);b.constructor=x,x.prototype=b,d(i,"RegExp",x)}y("RegExp")},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e,n){var r=n(17),i=n(49),o="".split;t.exports=r((function(){return!Object("z").propertyIsEnumerable(0)}))?function(t){return"String"==i(t)?o.call(t,""):Object(t)}:Object},function(t,e,n){var r=n(26);t.exports=function(t,e){if(!r(t))return t;var n,i;if(e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;if("function"==typeof(n=t.valueOf)&&!r(i=n.call(t)))return i;if(!e&&"function"==typeof(n=t.toString)&&!r(i=n.call(t)))return i;throw TypeError("Can't convert object to primitive value")}},function(t,e,n){var r,i,o,a=n(139),s=n(22),l=n(26),c=n(39),u=n(27),h=n(74),d=n(75),p=s.WeakMap;if(a){var f=new p,y=f.get,m=f.has,v=f.set;r=function(t,e){return v.call(f,t,e),e},i=function(t){return y.call(f,t)||{}},o=function(t){return m.call(f,t)}}else{var b=h("state");d[b]=!0,r=function(t,e){return c(t,b,e),e},i=function(t){return u(t,b)?t[b]:{}},o=function(t){return u(t,b)}}t.exports={set:r,get:i,has:o,enforce:function(t){return o(t)?i(t):r(t,{})},getterFor:function(t){return function(e){var n;if(!l(e)||(n=i(e)).type!==t)throw TypeError("Incompatible receiver, "+t+" required");return n}}}},function(t,e){t.exports=!1},function(t,e,n){var r=n(110),i=n(87).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,i)}},function(t,e,n){var r=n(49);t.exports=Array.isArray||function(t){return"Array"==r(t)}},function(t,e,n){var r=n(110),i=n(87);t.exports=Object.keys||function(t){return r(t,i)}},function(t,e,n){var r=n(62),i=n(30),o=n(60);t.exports=function(t,e,n){var a=r(e);a in t?i.f(t,a,o(0,n)):t[a]=n}},function(t,e,n){var r=n(17),i=n(19),o=n(116),a=i("species");t.exports=function(t){return o>=51||!r((function(){var e=[];return(e.constructor={})[a]=function(){return{foo:1}},1!==e[t](Boolean).foo}))}},function(t,e){t.exports={}},function(t,e,n){var r=n(14),i=n(154);r({global:!0,forced:parseInt!=i},{parseInt:i})},function(t,e,n){var r=n(14),i=n(54).filter,o=n(69),a=n(40),s=o("filter"),l=a("filter");r({target:"Array",proto:!0,forced:!s||!l},{filter:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r={}.propertyIsEnumerable,i=Object.getOwnPropertyDescriptor,o=i&&!r.call({1:2},1);e.f=o?function(t){var e=i(this,t);return!!e&&e.enumerable}:r},function(t,e,n){var r=n(83),i=n(84),o=r("keys");t.exports=function(t){return o[t]||(o[t]=i(t))}},function(t,e){t.exports={}},function(t,e,n){var r=n(27),i=n(32),o=n(74),a=n(122),s=o("IE_PROTO"),l=Object.prototype;t.exports=a?Object.getPrototypeOf:function(t){return t=i(t),r(t,s)?t[s]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?l:null}},function(t,e,n){var r,i,o=n(97),a=n(127),s=RegExp.prototype.exec,l=String.prototype.replace,c=s,u=(r=/a/,i=/b*/g,s.call(r,"a"),s.call(i,"a"),0!==r.lastIndex||0!==i.lastIndex),h=a.UNSUPPORTED_Y||a.BROKEN_CARET,d=void 0!==/()??/.exec("")[1];(u||d||h)&&(c=function(t){var e,n,r,i,a=this,c=h&&a.sticky,p=o.call(a),f=a.source,y=0,m=t;return c&&(-1===(p=p.replace("y","")).indexOf("g")&&(p+="g"),m=String(t).slice(a.lastIndex),a.lastIndex>0&&(!a.multiline||a.multiline&&"\n"!==t[a.lastIndex-1])&&(f="(?: "+f+")",m=" "+m,y++),n=new RegExp("^(?:"+f+")",p)),d&&(n=new RegExp("^"+f+"$(?!\\s)",p)),u&&(e=a.lastIndex),r=s.call(c?n:a,m),c?r?(r.input=r.input.slice(y),r[0]=r[0].slice(y),r.index=a.lastIndex,a.lastIndex+=r[0].length):a.lastIndex=0:u&&r&&(a.lastIndex=a.global?r.index+r[0].length:e),d&&r&&r.length>1&&l.call(r[0],n,(function(){for(i=1;i1?arguments[1]:void 0)}})},function(t,e,n){var r=n(38),i="["+n(80)+"]",o=RegExp("^"+i+i+"*"),a=RegExp(i+i+"*$"),s=function(t){return function(e){var n=String(r(e));return 1&t&&(n=n.replace(o,"")),2&t&&(n=n.replace(a,"")),n}};t.exports={start:s(1),end:s(2),trim:s(3)}},function(t,e){t.exports="\t\n\v\f\r                 \u2028\u2029\ufeff"},function(t,e,n){var r=n(14),i=n(85).indexOf,o=n(56),a=n(40),s=[].indexOf,l=!!s&&1/[1].indexOf(1,-0)<0,c=o("indexOf"),u=a("indexOf",{ACCESSORS:!0,1:0});r({target:"Array",proto:!0,forced:l||!c||!u},{indexOf:function(t){return l?s.apply(this,arguments)||0:i(this,t,arguments.length>1?arguments[1]:void 0)}})},function(t,e,n){var r=n(22),i=n(39);t.exports=function(t,e){try{i(r,t,e)}catch(n){r[t]=e}return e}},function(t,e,n){var r=n(64),i=n(106);(t.exports=function(t,e){return i[t]||(i[t]=void 0!==e?e:{})})("versions",[]).push({version:"3.6.5",mode:r?"pure":"global",copyright:"© 2020 Denis Pushkarev (zloirock.ru)"})},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol("+String(void 0===t?"":t)+")_"+(++n+r).toString(36)}},function(t,e,n){var r=n(34),i=n(35),o=n(86),a=function(t){return function(e,n,a){var s,l=r(e),c=i(l.length),u=o(a,c);if(t&&n!=n){for(;c>u;)if((s=l[u++])!=s)return!0}else for(;c>u;u++)if((t||u in l)&&l[u]===n)return t||u||0;return!t&&-1}};t.exports={includes:a(!0),indexOf:a(!1)}},function(t,e,n){var r=n(50),i=Math.max,o=Math.min;t.exports=function(t,e){var n=r(t);return n<0?i(n+e,0):o(n,e)}},function(t,e){t.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},function(t,e){e.f=Object.getOwnPropertySymbols},function(t,e,n){var r=n(17),i=/#|\.prototype\./,o=function(t,e){var n=s[a(t)];return n==c||n!=l&&("function"==typeof e?r(e):!!e)},a=o.normalize=function(t){return String(t).replace(i,".").toLowerCase()},s=o.data={},l=o.NATIVE="N",c=o.POLYFILL="P";t.exports=o},function(t,e,n){var r=n(17);t.exports=!!Object.getOwnPropertySymbols&&!r((function(){return!String(Symbol())}))},function(t,e,n){var r=n(30).f,i=n(27),o=n(19)("toStringTag");t.exports=function(t,e,n){t&&!i(t=n?t:t.prototype,o)&&r(t,o,{configurable:!0,value:e})}},function(t,e,n){var r=n(26),i=n(66),o=n(19)("species");t.exports=function(t,e){var n;return i(t)&&("function"!=typeof(n=t.constructor)||n!==Array&&!i(n.prototype)?r(n)&&null===(n=n[o])&&(n=void 0):n=void 0),new(void 0===n?Array:n)(0===e?0:e)}},function(t,e,n){var r=n(14),i=n(54).find,o=n(94),a=n(40),s=!0,l=a("find");"find"in[]&&Array(1).find((function(){s=!1})),r({target:"Array",proto:!0,forced:s||!l},{find:function(t){return i(this,t,arguments.length>1?arguments[1]:void 0)}}),o("find")},function(t,e,n){var r=n(19),i=n(53),o=n(30),a=r("unscopables"),s=Array.prototype;null==s[a]&&o.f(s,a,{configurable:!0,value:i(null)}),t.exports=function(t){s[a][t]=!0}},function(t,e,n){var r={};r[n(19)("toStringTag")]="z",t.exports="[object z]"===String(r)},function(t,e,n){var r=n(28),i=n(148);t.exports=Object.setPrototypeOf||("__proto__"in{}?function(){var t,e=!1,n={};try{(t=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__").set).call(n,[]),e=n instanceof Array}catch(t){}return function(n,o){return r(n),i(o),e?t.call(n,o):n.__proto__=o,n}}():void 0)},function(t,e,n){var r=n(28);t.exports=function(){var t=r(this),e="";return t.global&&(e+="g"),t.ignoreCase&&(e+="i"),t.multiline&&(e+="m"),t.dotAll&&(e+="s"),t.unicode&&(e+="u"),t.sticky&&(e+="y"),e}},function(t,e,n){var r=n(26),i=n(49),o=n(19)("match");t.exports=function(t){var e;return r(t)&&(void 0!==(e=t[o])?!!e:"RegExp"==i(t))}},function(t,e,n){n(24);var r=n(45),i=n(17),o=n(19),a=n(77),s=n(39),l=o("species"),c=!i((function(){var t=/./;return t.exec=function(){var t=[];return t.groups={a:"7"},t},"7"!=="".replace(t,"$")})),u="$0"==="a".replace(/./,"$0"),h=o("replace"),d=!!/./[h]&&""===/./[h]("a","$0"),p=!i((function(){var t=/(?:)/,e=t.exec;t.exec=function(){return e.apply(this,arguments)};var n="ab".split(t);return 2!==n.length||"a"!==n[0]||"b"!==n[1]}));t.exports=function(t,e,n,h){var f=o(t),y=!i((function(){var e={};return e[f]=function(){return 7},7!=""[t](e)})),m=y&&!i((function(){var e=!1,n=/a/;return"split"===t&&((n={}).constructor={},n.constructor[l]=function(){return n},n.flags="",n[f]=/./[f]),n.exec=function(){return e=!0,null},n[f](""),!e}));if(!y||!m||"replace"===t&&(!c||!u||d)||"split"===t&&!p){var v=/./[f],b=n(f,""[t],(function(t,e,n,r,i){return e.exec===a?y&&!i?{done:!0,value:v.call(e,n,r)}:{done:!0,value:t.call(n,e,r)}:{done:!1}}),{REPLACE_KEEPS_$0:u,REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE:d}),g=b[0],_=b[1];r(String.prototype,t,g),r(RegExp.prototype,f,2==e?function(t,e){return _.call(t,this,e)}:function(t){return _.call(t,this)})}h&&s(RegExp.prototype[f],"sham",!0)}},function(t,e,n){var r=n(124).charAt;t.exports=function(t,e,n){return e+(n?r(t,e).length:1)}},function(t,e,n){var r=n(49),i=n(77);t.exports=function(t,e){var n=t.exec;if("function"==typeof n){var o=n.call(t,e);if("object"!=typeof o)throw TypeError("RegExp exec method returned something other than an Object or null");return o}if("RegExp"!==r(t))throw TypeError("RegExp#exec called on incompatible receiver");return i.call(t,e)}},function(t,e,n){var r=n(14),i=n(156);r({global:!0,forced:parseFloat!=i},{parseFloat:i})},function(t,e,n){var r=n(23),i=n(17),o=n(104);t.exports=!r&&!i((function(){return 7!=Object.defineProperty(o("div"),"a",{get:function(){return 7}}).a}))},function(t,e,n){var r=n(22),i=n(26),o=r.document,a=i(o)&&i(o.createElement);t.exports=function(t){return a?o.createElement(t):{}}},function(t,e,n){var r=n(106),i=Function.toString;"function"!=typeof r.inspectSource&&(r.inspectSource=function(t){return i.call(t)}),t.exports=r.inspectSource},function(t,e,n){var r=n(22),i=n(82),o=r["__core-js_shared__"]||i("__core-js_shared__",{});t.exports=o},function(t,e,n){var r=n(27),i=n(108),o=n(47),a=n(30);t.exports=function(t,e){for(var n=i(e),s=a.f,l=o.f,c=0;cl;)r(s,n=e[l++])&&(~o(c,n)||c.push(n));return c}},function(t,e,n){var r=n(90);t.exports=r&&!Symbol.sham&&"symbol"==typeof Symbol.iterator},function(t,e,n){var r=n(23),i=n(30),o=n(28),a=n(67);t.exports=r?Object.defineProperties:function(t,e){o(t);for(var n,r=a(e),s=r.length,l=0;s>l;)i.f(t,n=r[l++],e[n]);return t}},function(t,e,n){var r=n(19);e.f=r},function(t,e,n){var r=n(109),i=n(27),o=n(113),a=n(30).f;t.exports=function(t){var e=r.Symbol||(r.Symbol={});i(e,t)||a(e,t,{value:o.f(t)})}},function(t,e,n){var r=n(55);t.exports=function(t,e,n){if(r(t),void 0===e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,i){return t.call(e,n,r,i)}}return function(){return t.apply(e,arguments)}}},function(t,e,n){var r,i,o=n(22),a=n(117),s=o.process,l=s&&s.versions,c=l&&l.v8;c?i=(r=c.split("."))[0]+r[1]:a&&(!(r=a.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=a.match(/Chrome\/(\d+)/))&&(i=r[1]),t.exports=i&&+i},function(t,e,n){var r=n(52);t.exports=r("navigator","userAgent")||""},function(t,e,n){var r=n(54).forEach,i=n(56),o=n(40),a=i("forEach"),s=o("forEach");t.exports=a&&s?[].forEach:function(t){return r(this,t,arguments.length>1?arguments[1]:void 0)}},function(t,e,n){var r=n(95),i=n(49),o=n(19)("toStringTag"),a="Arguments"==i(function(){return arguments}());t.exports=r?i:function(t){var e,n,r;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=function(t,e){try{return t[e]}catch(t){}}(e=Object(t),o))?n:a?i(e):"Object"==(r=i(e))&&"function"==typeof e.callee?"Arguments":r}},function(t,e,n){var r=n(14),i=n(147),o=n(76),a=n(96),s=n(91),l=n(39),c=n(45),u=n(19),h=n(64),d=n(70),p=n(121),f=p.IteratorPrototype,y=p.BUGGY_SAFARI_ITERATORS,m=u("iterator"),v=function(){return this};t.exports=function(t,e,n,u,p,b,g){i(n,e,u);var _,w,k,x=function(t){if(t===p&&S)return S;if(!y&&t in C)return C[t];switch(t){case"keys":case"values":case"entries":return function(){return new n(this,t)}}return function(){return new n(this)}},j=e+" Iterator",O=!1,C=t.prototype,E=C[m]||C["@@iterator"]||p&&C[p],S=!y&&E||x(p),R="Array"==e&&C.entries||E;if(R&&(_=o(R.call(new t)),f!==Object.prototype&&_.next&&(h||o(_)===f||(a?a(_,f):"function"!=typeof _[m]&&l(_,m,v)),s(_,j,!0,!0),h&&(d[j]=v))),"values"==p&&E&&"values"!==E.name&&(O=!0,S=function(){return E.call(this)}),h&&!g||C[m]===S||l(C,m,S),d[e]=S,p)if(w={values:x("values"),keys:b?S:x("keys"),entries:x("entries")},g)for(k in w)(y||O||!(k in C))&&c(C,k,w[k]);else r({target:e,proto:!0,forced:y||O},w);return w}},function(t,e,n){var r,i,o,a=n(76),s=n(39),l=n(27),c=n(19),u=n(64),h=c("iterator"),d=!1;[].keys&&("next"in(o=[].keys())?(i=a(a(o)))!==Object.prototype&&(r=i):d=!0),null==r&&(r={}),u||l(r,h)||s(r,h,(function(){return this})),t.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:d}},function(t,e,n){var r=n(17);t.exports=!r((function(){function t(){}return t.prototype.constructor=null,Object.getPrototypeOf(new t)!==t.prototype}))},function(t,e,n){var r=n(23),i=n(67),o=n(34),a=n(73).f,s=function(t){return function(e){for(var n,s=o(e),l=i(s),c=l.length,u=0,h=[];c>u;)n=l[u++],r&&!a.call(s,n)||h.push(t?[n,s[n]]:s[n]);return h}};t.exports={entries:s(!0),values:s(!1)}},function(t,e,n){var r=n(50),i=n(38),o=function(t){return function(e,n){var o,a,s=String(i(e)),l=r(n),c=s.length;return l<0||l>=c?t?"":void 0:(o=s.charCodeAt(l))<55296||o>56319||l+1===c||(a=s.charCodeAt(l+1))<56320||a>57343?t?s.charAt(l):o:t?s.slice(l,l+2):a-56320+(o-55296<<10)+65536}};t.exports={codeAt:o(!1),charAt:o(!0)}},function(t,e){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}},function(t,e,n){var r=n(26),i=n(96);t.exports=function(t,e,n){var o,a;return i&&"function"==typeof(o=e.constructor)&&o!==n&&r(a=o.prototype)&&a!==n.prototype&&i(t,a),t}},function(t,e,n){var r=n(17);function i(t,e){return RegExp(t,e)}e.UNSUPPORTED_Y=r((function(){var t=i("a","y");return t.lastIndex=2,null!=t.exec("abcd")})),e.BROKEN_CARET=r((function(){var t=i("^r","gy");return t.lastIndex=2,null!=t.exec("str")}))},function(t,e,n){var r=n(98);t.exports=function(t){if(r(t))throw TypeError("The method doesn't accept regular expressions");return t}},function(t,e,n){var r=n(19)("match");t.exports=function(t){var e=/./;try{"/./"[t](e)}catch(n){try{return e[r]=!1,"/./"[t](e)}catch(t){}}return!1}},function(t,e,n){var r,i=n(14),o=n(47).f,a=n(35),s=n(128),l=n(38),c=n(129),u=n(64),h="".startsWith,d=Math.min,p=c("startsWith");i({target:"String",proto:!0,forced:!!(u||p||(r=o(String.prototype,"startsWith"),!r||r.writable))&&!p},{startsWith:function(t){var e=String(l(this));s(t);var n=a(d(arguments.length>1?arguments[1]:void 0,e.length)),r=String(t);return h?h.call(e,r,n):e.slice(n,n+r.length)===r}})},function(t,e,n){var r=n(55),i=n(26),o=[].slice,a={},s=function(t,e,n){if(!(e in a)){for(var r=[],i=0;i9007199254740991)throw TypeError("Maximum allowed length exceeded");for(u=l(m,r),h=0;hv-r+n;h--)delete m[h-1]}else if(n>r)for(h=v-r;h>b;h--)p=h+n-1,(d=h+r-1)in m?m[p]=m[d]:delete m[p];for(h=0;h=0;)n+=d[e],d[e]=c(n/t),n=n%t*1e7},v=function(){for(var t=6,e="";--t>=0;)if(""!==e||0===t||0!==d[t]){var n=String(d[t]);e=""===e?n:e+a.call("0",7-n.length)+n}return e};if(h<0||h>20)throw RangeError("Incorrect fraction digits");if(l!=l)return"NaN";if(l<=-1e21||l>=1e21)return String(l);if(l<0&&(p="-",l=-l),l>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}(l*u(2,69,1))-69)<0?l*u(2,-e,1):l/u(2,e,1),n*=4503599627370496,(e=52-e)>0){for(y(0,n),r=h;r>=7;)y(1e7,0),r-=7;for(y(u(10,r,1),0),r=e-1;r>=23;)m(1<<23),r-=23;m(1<0?p+((s=f.length)<=h?"0."+a.call("0",h-s)+f:f.slice(0,s-h)+"."+f.slice(s-h)):p+f}})},function(t,e,n){var r=n(23),i=n(22),o=n(89),a=n(45),s=n(27),l=n(49),c=n(126),u=n(62),h=n(17),d=n(53),p=n(65).f,f=n(47).f,y=n(30).f,m=n(79).trim,v=i.Number,b=v.prototype,g="Number"==l(d(b)),_=function(t){var e,n,r,i,o,a,s,l,c=u(t,!1);if("string"==typeof c&&c.length>2)if(43===(e=(c=m(c)).charCodeAt(0))||45===e){if(88===(n=c.charCodeAt(2))||120===n)return NaN}else if(48===e){switch(c.charCodeAt(1)){case 66:case 98:r=2,i=49;break;case 79:case 111:r=8,i=55;break;default:return+c}for(a=(o=c.slice(2)).length,s=0;si)return NaN;return parseInt(o,r)}return+c};if(o("Number",!v(" 0o1")||!v("0b1")||v("+0x1"))){for(var w,k=function(t){var e=arguments.length<1?0:t,n=this;return n instanceof k&&(g?h((function(){b.valueOf.call(n)})):"Number"!=l(n))?c(new v(_(e)),n,k):_(e)},x=r?p(v):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,isFinite,isInteger,isNaN,isSafeInteger,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,parseFloat,parseInt,isInteger".split(","),j=0;x.length>j;j++)s(v,w=x[j])&&!s(k,w)&&y(k,w,f(v,w));k.prototype=b,b.constructor=k,a(i,"Number",k)}},function(t,e){},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(22),i=n(105),o=r.WeakMap;t.exports="function"==typeof o&&/native code/.test(i(o))},function(t,e,n){var r=n(52);t.exports=r("document","documentElement")},function(t,e,n){var r=n(34),i=n(65).f,o={}.toString,a="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];t.exports.f=function(t){return a&&"[object Window]"==o.call(t)?function(t){try{return i(t)}catch(t){return a.slice()}}(t):i(r(t))}},function(t,e,n){var r=n(115),i=n(32),o=n(143),a=n(144),s=n(35),l=n(68),c=n(145);t.exports=function(t){var e,n,u,h,d,p,f=i(t),y="function"==typeof this?this:Array,m=arguments.length,v=m>1?arguments[1]:void 0,b=void 0!==v,g=c(f),_=0;if(b&&(v=r(v,m>2?arguments[2]:void 0,2)),null==g||y==Array&&a(g))for(n=new y(e=s(f.length));e>_;_++)p=b?v(f[_],_):f[_],l(n,_,p);else for(d=(h=g.call(f)).next,n=new y;!(u=d.call(h)).done;_++)p=b?o(h,v,[u.value,_],!0):u.value,l(n,_,p);return n.length=_,n}},function(t,e,n){var r=n(28);t.exports=function(t,e,n,i){try{return i?e(r(n)[0],n[1]):e(n)}catch(e){var o=t.return;throw void 0!==o&&r(o.call(t)),e}}},function(t,e,n){var r=n(19),i=n(70),o=r("iterator"),a=Array.prototype;t.exports=function(t){return void 0!==t&&(i.Array===t||a[o]===t)}},function(t,e,n){var r=n(119),i=n(70),o=n(19)("iterator");t.exports=function(t){if(null!=t)return t[o]||t["@@iterator"]||i[r(t)]}},function(t,e,n){var r=n(19)("iterator"),i=!1;try{var o=0,a={next:function(){return{done:!!o++}},return:function(){i=!0}};a[r]=function(){return this},Array.from(a,(function(){throw 2}))}catch(t){}t.exports=function(t,e){if(!e&&!i)return!1;var n=!1;try{var o={};o[r]=function(){return{next:function(){return{done:n=!0}}}},t(o)}catch(t){}return n}},function(t,e,n){var r=n(121).IteratorPrototype,i=n(53),o=n(60),a=n(91),s=n(70),l=function(){return this};t.exports=function(t,e,n){var c=e+" Iterator";return t.prototype=i(r,{next:o(1,n)}),a(t,c,!1,!0),s[c]=l,t}},function(t,e,n){var r=n(26);t.exports=function(t){if(!r(t)&&null!==t)throw TypeError("Can't set "+String(t)+" as a prototype");return t}},function(t,e,n){var r=n(55),i=n(32),o=n(61),a=n(35),s=function(t){return function(e,n,s,l){r(n);var c=i(e),u=o(c),h=a(c.length),d=t?h-1:0,p=t?-1:1;if(s<2)for(;;){if(d in u){l=u[d],d+=p;break}if(d+=p,t?d<0:h<=d)throw TypeError("Reduce of empty array with no initial value")}for(;t?d>=0:h>d;d+=p)d in u&&(l=n(l,u[d],d,c));return l}};t.exports={left:s(!1),right:s(!0)}},function(t,e,n){var r=n(14),i=n(151);r({target:"Object",stat:!0,forced:Object.assign!==i},{assign:i})},function(t,e,n){var r=n(23),i=n(17),o=n(67),a=n(88),s=n(73),l=n(32),c=n(61),u=Object.assign,h=Object.defineProperty;t.exports=!u||i((function(){if(r&&1!==u({b:1},u(h({},"a",{enumerable:!0,get:function(){h(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var t={},e={},n=Symbol();return t[n]=7,"abcdefghijklmnopqrst".split("").forEach((function(t){e[t]=t})),7!=u({},t)[n]||"abcdefghijklmnopqrst"!=o(u({},e)).join("")}))?function(t,e){for(var n=l(t),i=arguments.length,u=1,h=a.f,d=s.f;i>u;)for(var p,f=c(arguments[u++]),y=h?o(f).concat(h(f)):o(f),m=y.length,v=0;m>v;)p=y[v++],r&&!d.call(f,p)||(n[p]=f[p]);return n}:u},function(t,e,n){var r=n(95),i=n(119);t.exports=r?{}.toString:function(){return"[object "+i(this)+"]"}},function(t,e,n){var r=n(52),i=n(30),o=n(19),a=n(23),s=o("species");t.exports=function(t){var e=r(t),n=i.f;a&&e&&!e[s]&&n(e,s,{configurable:!0,get:function(){return this}})}},function(t,e,n){var r=n(22),i=n(79).trim,o=n(80),a=r.parseInt,s=/^[+-]?0[Xx]/,l=8!==a(o+"08")||22!==a(o+"0x16");t.exports=l?function(t,e){var n=i(String(t));return a(n,e>>>0||(s.test(n)?16:10))}:a},function(t,e,n){var r=n(28),i=n(55),o=n(19)("species");t.exports=function(t,e){var n,a=r(t).constructor;return void 0===a||null==(n=r(a)[o])?e:i(n)}},function(t,e,n){var r=n(22),i=n(79).trim,o=n(80),a=r.parseFloat,s=1/a(o+"-0")!=-1/0;t.exports=s?function(t){var e=i(String(t)),n=a(e);return 0===n&&"-"==e.charAt(0)?-0:n}:a},function(t,e,n){var r=n(14),i=n(23);r({target:"Object",stat:!0,forced:!i,sham:!i},{defineProperties:n(112)})},function(t,e,n){var r=n(14),i=n(23),o=n(108),a=n(34),s=n(47),l=n(68);r({target:"Object",stat:!0,sham:!i},{getOwnPropertyDescriptors:function(t){for(var e,n,r=a(t),i=s.f,c=o(r),u={},h=0;c.length>h;)void 0!==(n=i(r,e=c[h++]))&&l(u,e,n);return u}})},function(t,e,n){var r=n(14),i=n(22),o=n(117),a=[].slice,s=function(t){return function(e,n){var r=arguments.length>2,i=r?a.call(arguments,2):void 0;return t(r?function(){("function"==typeof e?e:Function(e)).apply(this,i)}:e,n)}};r({global:!0,bind:!0,forced:/MSIE .\./.test(o)},{setTimeout:s(i.setTimeout),setInterval:s(i.setInterval)})},function(t,e,n){var r=n(49);t.exports=function(t){if("number"!=typeof t&&"Number"!=r(t))throw TypeError("Incorrect invocation");return+t}},function(t,e,n){var r=n(50),i=n(38);t.exports="".repeat||function(t){var e=String(i(this)),n="",o=r(t);if(o<0||o==1/0)throw RangeError("Wrong number of repetitions");for(;o>0;(o>>>=1)&&(e+=e))1&o&&(n+=e);return n}},function(t,e,n){var r=n(14),i=n(79).trim;r({target:"String",proto:!0,forced:n(163)("trim")},{trim:function(){return i(this)}})},function(t,e,n){var r=n(17),i=n(80);t.exports=function(t){return r((function(){return!!i[t]()||"​…᠎"!="​…᠎"[t]()||i[t].name!==t}))}},function(t,e,n){n(14)({target:"Date",stat:!0},{now:function(){return(new Date).getTime()}})},function(t,e,n){n.r(e),n.d(e,"JSONEditor",(function(){return rl}));n(1),n(2),n(3),n(18),n(93),n(20),n(36),n(25),n(0),n(41),n(31),n(4),n(33),n(150),n(9),n(42),n(5),n(57),n(6),n(7),n(21),n(8),n(58),n(59),n(24),n(43),n(29);var r=["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","r","ruby","sass","scala","scss","smarty","sql","sqlserver","stylus","svg","twig","vbscript","xml","yaml"],i=[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(t){return"string"===t.type&&r.includes(t.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;et.length)&&(e=t.length);for(var n=0,r=new Array(e);n255)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:r(t.message)}]}}n(102);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})(t)}function d(t){return null!==t&&("object"===h(t)&&!t.nodeType&&t!==t.window&&!(t.constructor&&!v(t.constructor.prototype,"isPrototypeOf")))}function p(t){return d(t)?f({},t):Array.isArray(t)?t.map(p):t}function f(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),r=1;rt.length)&&(e=t.length);for(var n=0,r=new Array(e);nt.minimum:e>=t.minimum;return window.math?r=window.math[t.exclusiveMinimum?"larger":"largerEq"](window.math.bignumber(e),window.math.bignumber(t.minimum)):window.Decimal&&(r=new window.Decimal(e)[t.exclusiveMinimum?"gt":"gte"](new window.Decimal(t.minimum))),r?[]:[{path:n,property:"minimum",message:this.translate(t.exclusiveMinimum?"error_minimum_excl":"error_minimum_incl",[t.minimum])}]}},this._validateStringSubSchema={maxLength:function(t,e,n){var r=[];return"".concat(e).length>t.maxLength&&r.push({path:n,property:"maxLength",message:this.translate("error_maxLength",[t.maxLength])}),r},minLength:function(t,e,n){return"".concat(e).lengtht.maxItems?[{path:n,property:"maxItems",message:this.translate("error_maxItems",[t.maxItems])}]:[]},minItems:function(t,e,n){return e.lengtht.maxProperties?[{path:n,property:"maxProperties",message:this.translate("error_maxProperties",[t.maxProperties])}]:[]},minProperties:function(t,e,n){return Object.keys(e).length2&&void 0!==arguments[2]?arguments[2]:1e7,r={match:0,extra:0};if("object"===_(t)&&null!==t){var i=this._getSchema(e).properties;for(var o in i)if(v(i,o)){if("object"===_(t[o])&&"object"===_(i[o])&&"object"===_(i[o].properties)){var a=this.fitTest(t[o],i[o],n/100);r.match+=a.match,r.extra+=a.extra}void 0!==t[o]&&(r.match+=n)}else r.extra+=n}return r}},{key:"_getSchema",value:function(t){return void 0===t?f({},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 r=this,i=[];return n=n||this.jsoneditor.root.formname,t=f({},this.jsoneditor.expandRefs(t)),void 0===e?this._validateV3Required(t,e,n):(Object.keys(t).forEach((function(o){r._validateSubSchema[o]&&i.push.apply(i,k(r._validateSubSchema[o].call(r,t,e,n)))})),i.push.apply(i,k(this._validateByValueType(t,e,n))),t.links&&t.links.forEach((function(o,a){o.rel&&"describedby"===o.rel.toLowerCase()&&(t=r._expandSchemaLink(t,a),i.push.apply(i,k(r._validateSchema(t,e,n,r.translate))))})),["date","time","datetime-local"].includes(t.format)&&i.push.apply(i,k(this._validateDateTimeSubSchema(t,e,n))),["uuid"].includes(t.format)&&i.push.apply(i,k(this._validateUUIDSchema(t,e,n))),i.push.apply(i,k(this._validateCustomValidator(t,e,n))),this._removeDuplicateErrors(i))}},{key:"_expandSchemaLink",value:function(t,e){var n=t.links[e].href,r=this.jsoneditor.root.getValue(),i=this.jsoneditor.compileTemplate(n,this.jsoneditor.template),o=document.location.origin+document.location.pathname+i(r);return t.links=t.links.slice(0,e).concat(t.links.slice(e+1)),f({},t,this.jsoneditor.refs[o])}},{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?[{path:n,property:"required",message:this.translate("error_notset")}]:[]}},{key:"_validateByValueType",value:function(t,e,n){var r=this,i=[];if(null===e)return i;if("number"==typeof e)Object.keys(t).forEach((function(o){r._validateNumberSubSchema[o]&&i.push.apply(i,k(r._validateNumberSubSchema[o].call(r,t,e,n)))}));else if("string"==typeof e)Object.keys(t).forEach((function(o){r._validateStringSubSchema[o]&&i.push.apply(i,k(r._validateStringSubSchema[o].call(r,t,e,n)))}));else if(Array.isArray(e))Object.keys(t).forEach((function(o){r._validateArraySubSchema[o]&&i.push.apply(i,k(r._validateArraySubSchema[o].call(r,t,e,n)))}));else if("object"===_(e)){var o={};Object.keys(t).forEach((function(a){r._validateObjectSubSchema[a]&&i.push.apply(i,k(r._validateObjectSubSchema[a].call(r,t,e,n,o)))})),void 0!==t.additionalProperties||!this.jsoneditor.options.no_additional_properties||t.oneOf||t.anyOf||t.allOf||(t.additionalProperties=!1),Object.keys(t).forEach((function(a){void 0!==r._validateObjectSubSchema2[a]&&i.push.apply(i,k(r._validateObjectSubSchema2[a].call(r,t,e,n,o)))}))}return i}},{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}$"])}]}},{key:"_validateNumberSubSchemaMultipleDivisible",value:function(t,e,n){var r=t.multipleOf||t.divisibleBy,i=e/r===Math.floor(e/r);return window.math?i=window.math.mod(window.math.bignumber(e),window.math.bignumber(r)).equals(0):window.Decimal&&(i=new window.Decimal(e).mod(new window.Decimal(r)).equals(0)),i?[]:[{path:n,property:t.multipleOf?"multipleOf":"divisibleBy",message:this.translate("error_multipleOf",[r])}]}},{key:"_validateDateTimeSubSchema",value:function(t,e,n){var r=this,i=this.jsoneditor.getEditor(n),o=i&&i.flatpickr?i.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:r.translate("error_invalid_epoch")}]:e!==Math.abs(parseInt(e))?[{path:n,property:"format",message:r.translate("error_".concat(t.format.replace(/-/g,"_")),[o])}]:[]}(t,e,n);if(i&&i.flatpickr){if(i)return function(t,e,n,i){if(""!==e){var o;if("single"!==i.flatpickr.config.mode){var a="range"===i.flatpickr.config.mode?i.flatpickr.l10n.rangeSeparator:", ";o=i.flatpickr.selectedDates.map((function(t){return i.flatpickr.formatDate(t,i.flatpickr.config.dateFormat)})).join(a)}try{if(o){if(o!==e)throw new Error("".concat(i.flatpickr.config.mode," mismatch"))}else if(i.flatpickr.formatDate(i.flatpickr.parseDate(e,i.flatpickr.config.dateFormat),i.flatpickr.config.dateFormat)!==e)throw new Error("mismatch")}catch(t){var s=void 0!==i.flatpickr.config.errorDateFormat?i.flatpickr.config.errorDateFormat:i.flatpickr.config.dateFormat;return[{path:n,property:"format",message:r.translate("error_".concat(i.format.replace(/-/g,"_")),[s])}]}}return[]}(0,e,n,i)}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,"_")),[o])}];return[]}},{key:"_validateCustomValidator",value:function(t,e,n){var r=this,i=[];i.push.apply(i,k(u.call(this,t,e,n,this.translate)));var o=function(o){i.push.apply(i,k(o.call(r,t,e,n)))};return this.defaults.custom_validators.forEach(o),this.options.custom_validators&&this.options.custom_validators.forEach(o),i}},{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"===_(t)},null:function(t){return null===t}};return"string"==typeof t?!n[t]||n[t](e):!this._validateSchema(t,e).length}}])&&O(e.prototype,n),r&&O(e,r),t}();n(72),n(37),n(130);function E(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return S(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return S(t,e)}(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 S(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n=s&&!l&&(l=!0,e())}),n,c)}},o.send()}})),s||e()}},{key:"extendSchemas",value:function(t,e){var n=this;t=f({},t),e=f({},e);var r={},i=function(t,i){!function(t,e){return("required"===t||"defaultProperties"===t)&&"object"===R(e)&&Array.isArray(e)}(t,i)?"type"!==t||"string"!=typeof i&&!Array.isArray(i)?"object"!==R(i)||Array.isArray(i)||null===i?r[t]=i:r[t]=n.extendSchemas(i,e[t]):o(i):r[t]=i.concat(e[t]).reduce((function(t,e){return t.includes(e)||t.push(e),t}),[])},o=function(t){"string"==typeof t&&(t=[t]),"string"==typeof e.type&&(e.type=[e.type]),e.type&&e.type.length?r.type=t.filter((function(t){return e.type.includes(t)})):r.type=t,1===r.type.length&&"string"==typeof r.type[0]?r.type=r.type[0]:0===r.type.length&&delete r.type};return Object.entries(t).forEach((function(t){var n=E(t,2),o=n[0],a=n[1];void 0!==e[o]?i(o,a):r[o]=a})),Object.entries(e).forEach((function(e){var n=E(e,2),i=n[0],o=n[1];void 0===t[i]&&(r[i]=o)})),r}}])&&P(e.prototype,n),r&&P(e,r),t}();n(10),n(15),n(11),n(12),n(13),n(16),n(132);function T(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if("undefined"==typeof Symbol||!(Symbol.iterator in Object(t)))return;var n=[],r=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(r=(a=s.next()).done)&&(n.push(a.value),!e||n.length!==e);r=!0);}catch(t){i=!0,o=t}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}return n}(t,e)||function(t,e){if(!t)return;if("string"==typeof t)return A(t,e);var n=Object.prototype.toString.call(t).slice(8,-1);"Object"===n&&t.constructor&&(n=t.constructor.name);if("Map"===n||"Set"===n)return Array.from(t);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return A(t,e)}(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 A(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,r=new Array(e);n0):this.dependenciesFulfilled&&(!i||0===i.length)):this.dependenciesFulfilled=!1}}},{key:"setContainer",value:function(t){this.container=t,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(t){var e=this;this.optInCheckbox=document.createElement("input"),this.optInCheckbox.setAttribute("type","checkbox"),this.optInCheckbox.setAttribute("style","margin: 0 10px 0 0;"),this.optInCheckbox.classList.add("json-editor-opt-in"),this.optInCheckbox.addEventListener("click",(function(){e.isActive()?e.deactivate():e.activate()})),(this.jsoneditor.options.show_opt_in||this.options.show_opt_in)&&this.parent&&"object"===this.parent.schema.type&&!this.isRequired()&&this.header&&(this.header.appendChild(this.optInCheckbox),this.header.insertBefore(this.optInCheckbox,this.header.firstChild))}},{key:"preBuild",value:function(){}},{key:"build",value:function(){}},{key:"postBuild",value:function(){this.setupWatchListeners(),this.addLinks(),this.setValue(this.getDefault(),!0),this.updateHeaderText(),this.register(),this.onWatchedFieldChange()}},{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()},v(this.schema,"watch")){var e,n,r,i,o,a=this.container.getAttribute("data-schemapath");Object.keys(this.schema.watch).forEach((function(s){if(e=t.schema.watch[s],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("#"===(r=n.shift())&&(r=t.jsoneditor.schema.id||t.jsoneditor.root.formname),!(i=t.theme.closest(t.container,'[data-schemaid="'.concat(r,'"]'))))throw new Error("Could not find ancestor node with id ".concat(r));o="".concat(i.getAttribute("data-schemapath"),".").concat(n.join(".")),a.startsWith(o)&&(t.watchLoop=!0),t.jsoneditor.watch(o,t.watch_listener),t.watched[s]=o}))}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;t1&&(e[i]="".concat(t," ").concat(r[t]))})),e}},{key:"getValidId",value:function(t){return(t=void 0===t?"":t.toString()).replace(/\s+/g,"-")}},{key:"setInputAttributes",value:function(t){var e=this;if(this.schema.options&&this.schema.options.inputAttributes){var n=this.schema.options.inputAttributes,r=["name","type"].concat(t);Object.keys(n).forEach((function(t){r.includes(t.toLowerCase())||e.input.setAttribute(t,n[t])}))}}},{key:"expandCallbacks",value:function(t,e){var n=this,r=this.defaults.callbacks[t];return Object.entries(e).forEach((function(i){var o=T(i,2),a=o[0],s=o[1];s===Object(s)?e[a]=n.expandCallbacks(t,s):"string"==typeof s&&"object"===I(r)&&"function"==typeof r[s]&&(e[a]=r[s].bind(null,n))})),e}},{key:"showValidationErrors",value:function(t){}}])&&D(e.prototype,n),r&&D(e,r),t}();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})(t)}function F(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function V(t,e){for(var n=0;n100);)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(e){t.adjust_height(e.currentTarget)})),this.input.addEventListener("change",(function(e){t.adjust_height(e.currentTarget)})),this.adjust_height()),this.format&&this.input.setAttribute("data-schemaformat",this.format);var i=this.input;if("range"===this.format&&(i=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,i,this.description,this.infoButton),this.container.appendChild(this.control),window.requestAnimationFrame((function(){t.input.parentNode&&t.afterInputReady(),t.adjust_height&&t.adjust_height(t.input)})),this.schema.template){var o=this.expandCallbacks("template",{template:this.schema.template});"function"==typeof o.template?this.template=o.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",f({},this.defaults.options.cleave||{},this.options.cleave||{}));"object"===N(e)&&Object.keys(e).length>0&&(this.cleave_instance=new window.Cleave(t,e))}},{key:"setupImask",value:function(t){var e=this.expandCallbacks("imask",f({},this.defaults.options.imask||{},this.options.imask||{}));"object"===N(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 r=t[n].match(/^regex:\/(.*)\/([gimsuy]*)$/);if(null!==r)try{t[n]=new RegExp(r[1],r[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],r=e[1];if(void 0!==window[n]&&void 0!==window[n][r])return window[n][r]}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:H(U(o.prototype),"getValue",this).call(this)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,H(U(o.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,H(U(o.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.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),H(U(o.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)),H(U(o.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)}}])&&V(e.prototype,n),r&&V(e,r),o}(B);function $(t){return($="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})(t)}function J(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function W(t,e){for(var n=0;n=this.schema.items.length?!0===this.schema.additionalItems?{}:this.schema.additionalItems?f({},this.schema.additionalItems):void 0:f({},this.schema.items[t]):this.schema.items?f({},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: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 r,i=this.jsoneditor.getEditorClass(n);this.tabs_holder?(r="tabs-top"===this.schema.format?this.theme.getTopTabContent():this.theme.getTabContent()).id="".concat(this.path,".").concat(t):r=e.child_editors?this.theme.getChildEditorHolder():this.theme.getIndentedPanel(),this.row_holder.appendChild(r);var o=this.jsoneditor.createEditor(i,{jsoneditor:this.jsoneditor,schema:n,container:r,path:"".concat(this.path,".").concat(t),parent:this,required:!0});return o.preBuild(),o.build(),o.postBuild(),o.title_controls||(o.array_controls=this.theme.getButtonHolder(),r.appendChild(o.array_controls)),o}},{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,it(lt(o.prototype),"destroy",this).call(this)}},{key:"empty",value:function(t){var e=this;this.rows&&(this.rows.forEach((function(n,r){t&&(e.checkParent(n.tab)&&n.tab.parentNode.removeChild(n.tab),e.destroyRow(n,!0),e.row_cache[r]=null),e.rows[r]=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.lengththis.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;e=this.ensureArraySize(e);var r=JSON.stringify(e);if(r!==this.serialized){e.forEach((function(e,r){if(t.rows[r])t.rows[r].setValue(e,n);else if(t.row_cache[r])t.rows[r]=t.row_cache[r],t.rows[r].setValue(e,n),t.rows[r].container.style.display="",t.rows[r].tab&&(t.rows[r].tab.style.display=""),t.rows[r].register(),t.jsoneditor.trigger("addRow",t.rows[r]);else{var i=t.addRow(e,n);t.jsoneditor.trigger("addRow",i)}}));for(var i=e.length;i=this.rows.length;this.rows.forEach((function(t,n){if(t.movedown_button){var i=n!==e.rows.length-1;e.setVisibility(t.movedown_button,i)}t.delete_button&&e.setVisibility(t.delete_button,!r),e.value[n]=t.getValue()})),!this.collapsed&&this.setupButtons(r)?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,r=this.rows.length;this.rows[r]=this.getElementEditor(r),this.row_cache[r]=this.rows[r],this.tabs_holder&&(this.rows[r].tab_text=document.createElement("span"),this.rows[r].tab_text.textContent=this.rows[r].getHeaderText(),"tabs-top"===this.schema.format?(this.rows[r].tab=this.theme.getTopTab(this.rows[r].tab_text,this.getValidId(this.rows[r].path)),this.theme.addTopTab(this.tabs_holder,this.rows[r].tab)):(this.rows[r].tab=this.theme.getTab(this.rows[r].tab_text,this.getValidId(this.rows[r].path)),this.theme.addTab(this.tabs_holder,this.rows[r].tab)),this.rows[r].tab.addEventListener("click",(function(t){n.active_tab=n.rows[r].tab,n.refreshTabs(),t.preventDefault(),t.stopPropagation()})));var i=this.rows[r].title_controls||this.rows[r].array_controls;return this.hide_delete_buttons||(this.rows[r].delete_button=this._createDeleteButton(r,i)),this.show_copy_button&&(this.rows[r].copy_button=this._createCopyButton(r,i)),r&&!this.hide_move_buttons&&(this.rows[r].moveup_button=this._createMoveUpButton(r,i)),this.hide_move_buttons||(this.rows[r].movedown_button=this._createMoveDownButton(r,i)),t&&this.rows[r].setValue(t,e),this.refreshTabs(),this.rows[r]}},{key:"_createDeleteButton",value:function(t,e){var n=this,r=this.getButton(this.getItemTitle(),"delete",this.translate("button_delete_row_title",[this.getItemTitle()]));return r.classList.add("delete","json-editor-btntype-delete"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue().filter((function(t,n){return n!==e})),i=null,o=n.rows[e];n.setValue(r),n.rows[e]?i=n.rows[e].tab:n.rows[e-1]&&(i=n.rows[e-1].tab),i&&(n.active_tab=i,n.refreshTabs()),n.onChange(!0),n.jsoneditor.trigger("deleteRow",o)})),e&&e.appendChild(r),r}},{key:"_createCopyButton",value:function(t,e){var n=this,r=this.getButton(this.getItemTitle(),"copy","Copy ".concat(this.getItemTitle()));return r.classList.add("copy","json-editor-btntype-copy"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){var e=n.getValue();t.preventDefault(),t.stopPropagation();var r=1*t.currentTarget.getAttribute("data-i");e.forEach((function(t,n){n===r&&e.push(t)})),n.setValue(e),n.refreshValue(!0),n.onChange(!0)})),e.appendChild(r),r}},{key:"_createMoveUpButton",value:function(t,e){var n=this,r=this.getButton("","tabs-top"===this.schema.format?"moveleft":"moveup",this.translate("button_move_up_title"));return r.classList.add("moveup","json-editor-btntype-move"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i");if(!(e<=0)){var r=n.getValue(),i=r[e-1];r[e-1]=r[e],r[e]=i,n.setValue(r),n.active_tab=n.rows[e-1].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])}})),e&&e.appendChild(r),r}},{key:"_createMoveDownButton",value:function(t,e){var n=this,r=this.getButton("","tabs-top"===this.schema.format?"moveright":"movedown",this.translate("button_move_down_title"));return r.classList.add("movedown","json-editor-btntype-move"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();if(!(e>=r.length-1)){var i=r[e+1];r[e+1]=r[e],r[e]=i,n.setValue(r),n.active_tab=n.rows[e+1].tab,n.refreshTabs(),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])}})),e&&e.appendChild(r),r}},{key:"addControls",value:function(){this.collapsed=!1,this.toggle_button=this._createToggleButton(),this.options.collapsed&&y(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",this.translate("button_collapse"));e.classList.add("json-editor-btntype-toggle"),this.title.insertBefore(e,this.title.childNodes[0]);var n=this.row_holder.style.display,r=this.controls.style.display;return e.addEventListener("click",(function(e){e.preventDefault(),e.stopPropagation(),t.panel&&t.setVisibility(t.panel,t.collapsed),t.tabs_holder&&t.setVisibility(t.tabs_holder,t.collapsed),t.collapsed?(t.collapsed=!1,t.row_holder.style.display=n,t.controls.style.display=r,t.setButtonText(e.currentTarget,"","collapse",t.translate("button_collapse"))):(t.collapsed=!0,t.row_holder.style.display="none",t.controls.style.display="none",t.setButtonText(e.currentTarget,"","expand",t.translate("button_expand")))})),e}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add",this.translate("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,r=t.rows.length;t.row_cache[r]?(n=t.rows[r]=t.row_cache[r],t.rows[r].setValue(t.rows[r].getDefault(),!0),t.rows[r].container.style.display="",t.rows[r].tab&&(t.rows[r].tab.style.display=""),t.rows[r].register()):n=t.addRow(),t.active_tab=t.rows[r].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(this.translate("button_delete_last",[this.getItemTitle()]),"subtract",this.translate("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(),r=null,i=n.pop();t.setValue(n),t.rows[t.rows.length-1]&&(r=t.rows[t.rows.length-1].tab),r&&(t.active_tab=r,t.refreshTabs()),t.onChange(!0),t.jsoneditor.trigger("deleteRow",i)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton(this.translate("button_delete_all"),"delete",this.translate("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;t.empty(!0),t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows")})),this.controls.appendChild(e),e}},{key:"showValidationErrors",value:function(t){var e=this,n=[],r=[];t.forEach((function(t){t.path===e.path?n.push(t):r.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(r)}))}}])&&rt(e.prototype,n),r&&rt(e,r),o}(B);function ut(t){return(ut="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})(t)}function ht(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function dt(t,e){for(var n=0;n1&&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;nType: ".concat(t,", Size: ").concat(Math.floor((this.value.length-this.value.split(",")[0].length-1)/1.33333)," bytes"),"image"===t.substr(0,5)){this.preview.innerHTML+="
";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="Invalid data URI"}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),ie(le(o.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),ie(le(o.prototype),"disable",this).call(this)}},{key:"setValue",value:function(t){this.value!==t&&(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),ie(le(o.prototype),"destroy",this).call(this)}}])&&re(e.prototype,n),r&&re(e,r),o}(B);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})(t)}function he(t,e){for(var n=0;n0?t.disable():t.enable()},n.validated&&this.jsoneditor.on("change",this.changeHandler)}},{key:"enable",value:function(){this.always_disabled||(this.input.disabled=!1,de(me(o.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.input.disabled=!0,de(me(o.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,de(me(o.prototype),"destroy",this).call(this)}}])&&he(e.prototype,n),r&&he(e,r),o}(B);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})(t)}function ge(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function _e(t,e){for(var n=0;n *":"box-sizing:border-box"};var Ke=function(t){!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}}),e&&Ze(t,e)}(o,t);var e,n,r,i=Qe(o);function o(){return $e(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"build",value:function(){if(We(Xe(o.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"===Ge(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 e=[];if(!1!==this.options.flatpickr.showToggleButton){var n=this.getButton("","time"===this.schema.format?"time":"calendar",this.translate("flatpickr_toggle_button"));n.setAttribute("data-toggle",""),e.push(n)}if(!1!==this.options.flatpickr.showClearButton){var r=this.getButton("","clear",this.translate("flatpickr_clear_button"));r.setAttribute("data-clear",""),e.push(r)}var i=this.input.parentNode,a=this.input.nextSibling,s=this.theme.getInputGroup(this.input,e);void 0!==s?(this.options.flatpickr.inline=!1,i.insertBefore(s,a),t=s):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,e,n){if("string"===this.schema.type)We(Xe(o.prototype),"setValue",this).call(this,t,e,n),this.flatpickr&&this.flatpickr.setDate(t);else if(t>0){var r=new Date(1e3*t),i=r.getFullYear(),a=this.zeroPad(r.getMonth()+1),s=this.zeroPad(r.getDate()),l=this.zeroPad(r.getHours()),c=this.zeroPad(r.getMinutes()),u=this.zeroPad(r.getSeconds()),h=[i,a,s].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,We(Xe(o.prototype),"destroy",this).call(this)}},{key:"zeroPad",value:function(t){return"0".concat(t).slice(-2)}}])&&Je(e.prototype,n),r&&Je(e,r),o}(G);function tn(t){return(tn="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})(t)}function en(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nn(t,e){for(var n=0;nt.length)&&(e=t.length);for(var n=0,r=new Array(e);nnull";if("object"===un(t)){var n="";return function(t,e){Array.isArray(t)||"number"==typeof t.length&&t.length>0&&t.length-1 in t?Array.from(t).forEach((function(t,n){return e(n,t)})):Object.entries(t).forEach((function(t){var n=hn(t,2),r=n[0],i=n[1];return e(r,i)}))}(t,(function(r,i){var o=e.getHTML(i);Array.isArray(t)||(o="
".concat(r,": ").concat(o,"
")),n+="
  • ".concat(o,"
  • ")})),n=Array.isArray(t)?"
      ".concat(n,"
    "):"
      ".concat(n,"
    ")}return"boolean"==typeof t?t?"true":"false":"string"==typeof t?t.replace(/&/g,"&").replace(//g,">"):t}},{key:"setValue",value:function(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),yn(gn(o.prototype),"destroy",this).call(this)}}])&&fn(e.prototype,n),r&&fn(e,r),o}(B);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})(t)}function kn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function xn(t,e){for(var n=0;na.extra)&&((i=a).i=r)),e.validate(t).length||null!==o.i||(o.i=r,null!==a&&(o.match=a.match))}));var a=o.i;void 0!==this.anyOf&&this.anyOf&&o.matcht.length)&&(e=t.length);for(var n=0,r=new Array(e);no)&&(r=s);!1===r&&(a.push({width:0,minh:999999,maxh:0,editors:[]}),r=a.length-1),a[r].editors.push({key:t,width:i,height:o}),a[r].width+=i,a[r].minh=Math.min(a[r].minh,o),a[r].maxh=Math.max(a[r].maxh,o)}})),t=0;ta[t].editors[u].width)&&(u=e),a[t].editors[e].width*=12/a[t].width,a[t].editors[e].width=Math.floor(a[t].editors[e].width),h+=a[t].editors[e].width;h<12&&(a[t].editors[u].width+=12-h),a[t].width=12}if(this.layout===JSON.stringify(a))return!1;for(this.layout=JSON.stringify(a),r=document.createElement("div"),t=0;t0?f.firstChild.isObjOrArray&&(r.appendChild(d),f.insertBefore(r,f.firstChild),n.theme.insertBasicTopTab(e.tab,p),e.basicPane=r):(r.appendChild(d),f.appendChild(r),n.theme.addTopTab(p,e.tab),e.basicPane=r)),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),o.appendChild(e.container),e.rowPane=r}}));this.tabPanesContainer.firstChild;)this.tabPanesContainer.removeChild(this.tabPanesContainer.firstChild);var m=this.tabs_holder.parentNode;m.removeChild(m.firstChild),m.appendChild(p),this.tabPanesContainer=f,this.tabs_holder=p;var v=this.theme.getFirstTab(this.tabs_holder);return void(v&&y(v,"click"))}this.property_order.forEach((function(t){var e=n.editors[t];e.property_removed||(i=n.theme.getGridRow(),r.appendChild(i),e.options.hidden?e.container.style.display="none":n.theme.setGridColumnSize(e.container,12),i.appendChild(e.container))}))}for(;this.row_container.firstChild;)this.row_container.removeChild(this.row_container.firstChild);this.row_container.appendChild(r)}}},{key:"getPropertySchema",value:function(t){var e=this,n=this.schema.properties[t]||{};n=f({},n);var r=!!this.schema.properties[t];return this.schema.patternProperties&&Object.keys(this.schema.patternProperties).forEach((function(i){new RegExp(i).test(t)&&(n.allOf=n.allOf||[],n.allOf.push(e.schema.patternProperties[i]),r=!0)})),!r&&this.schema.additionalProperties&&"object"===zr(this.schema.additionalProperties)&&(n=f({},this.schema.additionalProperties)),n}},{key:"preBuild",value:function(){var t=this;if(qr(Jr(o.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=Vr(e,2),r=n[0],i=n[1],o=t.jsoneditor.getEditorClass(i);t.editors[r]=t.jsoneditor.createEditor(o,{jsoneditor:t.jsoneditor,schema:i,path:"".concat(t.path,".").concat(r),parent:t,compact:!0,required:!0},t.currentDepth+1),t.editors[r].preBuild();var a=t.editors[r].options.hidden?0:t.editors[r].options.grid_columns||t.editors[r].getNumColumns();t.minwidth+=a,t.maxwidth+=a})),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 r=t.editors[e].schema.propertyOrder,i=t.editors[n].schema.propertyOrder;return"number"!=typeof r&&(r=1e3),"number"!=typeof i&&(i=1e3),r-i}))}},{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 r=this.rows.length,i="object"===t.schema.type||"array"===t.schema.type;this.rows[r]=t,this.rows[r].rowPane=n,i?(this.addTab(r),this.theme.addTopTab(e,this.rows[r].tab)):void 0===this.basicTab?(this.addTab(r),this.basicTab=r,this.basicPane=n,this.theme.addTopTab(e,this.rows[r].tab)):(this.rows[r].tab=this.rows[this.basicTab].tab,this.rows[r].tab_text=this.rows[this.basicTab].tab_text,this.rows[r].rowPane=this.rows[this.basicTab].rowPane)}},{key:"refreshTabs",value:function(t){var e=this,n=void 0!==this.basicTab,r=!1;this.rows.forEach((function(i){i.tab&&i.rowPane&&i.rowPane.parentNode&&(n&&i.tab===e.rows[e.basicTab].tab&&r||(t?i.tab_text.textContent=i.getHeaderText():(n&&i.tab===e.rows[e.basicTab].tab&&(r=!0),i.tab===e.active_tab?e.theme.markTabActive(i):e.theme.markTabInactive(i))))}))}},{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=Vr(e,2),r=n[0],i=n[1],o=t.theme.getTableCell();t.editor_holder.appendChild(o),i.setContainer(o),i.build(),i.postBuild(),i.setOptInCheckbox(i.header),t.editors[r].options.hidden&&(o.style.display="none"),t.editors[r].options.input_width&&(o.style.width=t.editors[r].options.input_width)}));else{if(this.options.table)throw new Error("Not supported yet");this.header="",this.options.compact||(this.header=document.createElement("label"),this.header.textContent=this.getTitle()),this.title=this.theme.getHeader(this.header),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=this.theme.getTextareaInput(),this.editjson_textarea.classList.add("je-edit-json--textarea"),this.editjson_save=this.getButton("Save","save","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("Copy","copy","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("Cancel","cancel","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),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("add","add","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.classList.add("property-selector-input"),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(),t.onChange(!0)}})),this.addproperty_input.addEventListener("input",(function(t){t.target.previousSibling.childNodes.forEach((function(e){e.innerText.includes(t.target.value)?e.style.display="":e.style.display="none"}))})),this.addproperty_holder.appendChild(this.addproperty_list),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),document.addEventListener("click",this.onOutsideModalClick),this.schema.description&&(this.description=this.theme.getDescription(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.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.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 r=t.theme.getTabContent(),i=t.theme.getGridColumn(),o=!(!n.schema||"object"!==n.schema.type&&"array"!==n.schema.type);if(r.isObjOrArray=o,e){if(o){var a=t.theme.getGridContainer();a.appendChild(i),r.appendChild(a),t.tabPanesContainer.appendChild(r),t.row_container=a}else void 0===t.row_container_basic&&(t.row_container_basic=t.theme.getGridContainer(),r.appendChild(t.row_container_basic),0===t.tabPanesContainer.childElementCount?t.tabPanesContainer.appendChild(r):t.tabPanesContainer.insertBefore(r,t.tabPanesContainer.childNodes[1])),t.row_container_basic.appendChild(i);t.addRow(n,t.tabs_holder,r),r.id=t.getValidId(n.schema.title)}else t.row_container.appendChild(i);n.setContainer(i),n.build(),n.postBuild(),n.setOptInCheckbox(n.header)})),this.rows[0]&&y(this.rows[0].tab,"click"),this.collapsed=!1,this.collapse_control=this.getButton("","collapse",this.translate("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",t.translate("button_collapse"))):(t.editor_holder.style.display="none",t.collapsed=!0,t.setButtonText(t.collapse_control,"","expand",t.translate("button_expand")))})),this.options.collapsed&&y(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","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",this.translate("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()}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())}},{key:"deactivateNonRequiredProperties",value:function(){var t=this;(this.jsoneditor.options.show_opt_in||this.options.show_opt_in)&&Object.entries(this.editors).forEach((function(e){var n=Vr(e,2),r=n[0],i=n[1];t.isRequiredObject(i)||t.editors[r].deactivate()}))}},{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(){if(this.editjson_holder){var t=document.createElement("textarea");t.value=this.editjson_textarea.value,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),document.execCommand("copy"),document.body.removeChild(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 r;this.schema.properties[t]&&(r=this.schema.properties[t].propertyOrder),"number"!=typeof r&&(r=1e3),e.propertyOrder=r;for(var i=0;i=i?this.getSchemaOnMaxDepth(n):n,path:"".concat(this.path,".").concat(t),parent:this},this.currentDepth+1),this.editors[t].preBuild(),!e){var o=this.theme.getChildEditorHolder();this.editor_holder.appendChild(o),this.editors[t].setContainer(o),this.editors[t].build(),this.editors[t].postBuild(),this.editors[t].setOptInCheckbox(r.header),this.editors[t].activate()}this.cached_editors[t]=this.editors[t]}e||(this.refreshValue(),this.layoutEditors())}}},{key:"onOutsideModalClick",value:function(t){this.addproperty_holder&&!this.addproperty_holder.contains(t.path[0]||t.composedPath()[0])&&this.adding_property&&(t.preventDefault(),t.stopPropagation(),this.toggleAddProperty())}},{key:"onChildEditorChange",value:function(t){this.refreshValue(),qr(Jr(o.prototype),"onChildEditorChange",this).call(this,t)}},{key:"canHaveAdditionalProperties",value:function(){return"boolean"==typeof this.schema.additionalProperties?this.schema.additionalProperties:!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.onOutsideModalClick),qr(Jr(o.prototype),"destroy",this).call(this)}},{key:"getValue",value:function(){if(this.dependenciesFulfilled){var t=qr(Jr(o.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}}},{key:"refreshValue",value:function(){var t=this;this.value={},Object.keys(this.editors).forEach((function(e){t.editors[e].isActive()&&(t.value[e]=t.editors[e].getValue())})),this.adding_property&&this.refreshAddProperties()}},{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,r=!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(i){t.addPropertyCheckbox(i),t.isRequiredObject(t.cached_editors[i])&&i in t.editors&&(t.addproperty_checkboxes[i].disabled=!0),void 0!==t.schema.minProperties&&n<=t.schema.minProperties?(t.addproperty_checkboxes[i].disabled=t.addproperty_checkboxes[i].checked,t.addproperty_checkboxes[i].checked||(r=!0)):i in t.editors?r=!0:e||v(t.schema.properties,i)?(t.addproperty_checkboxes[i].disabled=!1,r=!0):t.addproperty_checkboxes[i].disabled=!0})),this.canHaveAdditionalProperties()&&(r=!0),Object.keys(this.schema.properties).forEach((function(e){t.cached_editors[e]||(r=!0,t.addPropertyCheckbox(e))})),r?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"!==zr(t=t||{})||Array.isArray(t))&&(t={}),Object.entries(this.cached_editors).forEach((function(r){var i=Vr(r,2),o=i[0],a=i[1];void 0!==t[o]?(n.addObjectProperty(o),a.setValue(t[o],e)):e||n.isRequiredObject(a)?a.setValue(a.getDefault(),e):n.removeObjectProperty(o)})),Object.entries(t).forEach((function(t){var r=Vr(t,2),i=r[0],o=r[1];n.cached_editors[i]||(n.addObjectProperty(i),n.editors[i]&&n.editors[i].setValue(o,e,!!n.editors[i].template))})),this.refreshValue(),this.layoutEditors(),this.onChange()}},{key:"showValidationErrors",value:function(t){var e=this,n=[],r=[];t.forEach((function(t){t.path===e.path?n.push(t):r.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(r)}))}}])&&Mr(e.prototype,n),r&&Mr(e,r),o}(B);function Zr(t){return(Zr="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})(t)}function Qr(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Yr(t,e){for(var n=0;n-1;i--){var o=this.formname+(i+1),a=this.theme.getFormInputField("radio");a.name="".concat(this.formname,"[starrating]"),a.value=this.enum_values[i],a.id=o,a.addEventListener("change",r,!1),this.radioGroup.push(a);var s=document.createElement("label");s.htmlFor=o,s.title=this.enum_values[i],this.options.displayValue&&s.classList.add("starrating-display-enabled"),this.ratingContainer.appendChild(a),this.ratingContainer.appendChild(s)}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.always_disabled=!0;for(var l=0;l 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 ho=function(t){!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}}),e&&so(t,e)}(o,t);var e,n,r,i=lo(o);function o(){return io(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"build",value:function(){ao(uo(o.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(){ao(uo(o.prototype),"enable",this).call(this),this.stepperDown.removeAttribute("disabled"),this.stepperUp.removeAttribute("disabled")}},{key:"disable",value:function(){ao(uo(o.prototype),"disable",this).call(this),this.stepperDown.setAttribute("disabled",!0),this.stepperUp.setAttribute("disabled",!0)}}])&&oo(e.prototype,n),r&&oo(e,r),o}(tr);function po(t){return(po="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})(t)}function fo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function yo(t,e){for(var n=0;nthis.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;e=this.ensureArraySize(e);var r=JSON.stringify(e);if(r!==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,n=this.schema.maxItems&&this.schema.maxItems<=this.rows.length,r=[];this.rows.forEach((function(i,o){if(i.delete_button){var a=!e;t.setVisibility(i.delete_button,a),r.push(a)}if(i.copy_button){var s=!n;t.setVisibility(i.copy_button,s),r.push(s)}if(i.moveup_button){var l=0!==o;t.setVisibility(i.moveup_button,l),r.push(l)}if(i.movedown_button){var c=o!==t.rows.length-1;t.setVisibility(i.movedown_button,c),r.push(c)}}));var i=r.some((function(t){return t}));this.rows.forEach((function(e){return t.setVisibility(e.controls_cell,i)})),this.setVisibility(this.controls_header_cell,i),this.setVisibility(this.table,this.value.length);var o=!(n||this.hide_add_button);this.setVisibility(this.add_row_button,o);var a=!(!this.value.length||e||this.hide_delete_last_row_buttons);this.setVisibility(this.delete_last_row_button,a);var s=!(this.value.length<=1||e||this.hide_delete_all_rows_buttons);this.setVisibility(this.remove_all_rows_button,s);var l=o||a||s;this.setVisibility(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;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)),t&&this.rows[e].setValue(t)}},{key:"_createDeleteButton",value:function(t,e){var n=this,r=this.getButton("","delete",this.translate("button_delete_row_title_short"));return r.classList.add("delete","json-editor-btntype-delete"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){if(t.preventDefault(),t.stopPropagation(),!n.askConfirmation())return!1;var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e,1),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("deleteRow",n.rows[e])})),e.appendChild(r),r}},{key:"_createCopyButton",value:function(t,e){var n=this,r=this.getButton("","copy",this.translate("button_copy_row_title_short"));return r.classList.add("copy","json-editor-btntype-copy"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e+1,0,r[e]),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("copyRow",n.rows[e+1])})),e.appendChild(r),r}},{key:"_createMoveUpButton",value:function(t,e){var n=this,r=this.getButton("","moveup",this.translate("button_move_up_title"));return r.classList.add("moveup","json-editor-btntype-move"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e-1,0,r.splice(e,1)[0]),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e-1])})),e.appendChild(r),r}},{key:"_createMoveDownButton",value:function(t,e){var n=this,r=this.getButton("","movedown",this.translate("button_move_down_title"));return r.classList.add("movedown","json-editor-btntype-move"),r.setAttribute("data-i",t),r.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var e=1*t.currentTarget.getAttribute("data-i"),r=n.getValue();r.splice(e+1,0,r.splice(e,1)[0]),n.setValue(r),n.onChange(!0),n.jsoneditor.trigger("moveRow",n.rows[e+1])})),e.appendChild(r),r}},{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.setVisibility(t.panel,t.collapsed),t.collapsed?(t.collapsed=!1,t.setButtonText(e.currentTarget,"","collapse",t.translate("button_collapse"))):(t.collapsed=!0,t.setButtonText(e.currentTarget,"","expand",t.translate("button_expand")))})),this.options.collapsed&&y(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",this.translate("button_collapse"));return t.classList.add("json-editor-btntype-toggle"),t}},{key:"_createAddRowButton",value:function(){var t=this,e=this.getButton(this.getItemTitle(),"add",this.translate("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(this.translate("button_delete_last",[this.getItemTitle()]),"subtract",this.translate("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(),r=n.pop();t.setValue(n),t.onChange(!0),t.jsoneditor.trigger("deleteRow",r)})),this.controls.appendChild(e),e}},{key:"_createRemoveAllRowsButton",value:function(){var t=this,e=this.getButton(this.translate("button_delete_all"),"delete",this.translate("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;t.setValue([]),t.onChange(!0),t.jsoneditor.trigger("deleteAllRows")})),this.controls.appendChild(e),e}}])&&yo(e.prototype,n),r&&yo(e,r),o}(ct);n(135);function ko(t){return(ko="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})(t)}function xo(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function jo(t,e){for(var n=0;nt.options.max_upload_size)t.theme.addInputError(t.uploader,"Filesize too large. Max size is ".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 r=new window.FileReader;r.onload=function(e){t.preview_value=e.target.result,t.refreshPreview(n),t.onChange(!0),r=null},r.readAsDataURL(n[0])}else t.theme.addInputError(t.uploader,"Wrong file format. Allowed format(s): ".concat(t.options.mime_type.toString()))},this.uploader.addEventListener("change",this.uploadHandler),this.dragHandler=function(e){var n=e.dataTransfer.items||e.dataTransfer.files,r=n&&n.length&&(0===t.options.mime_type.length||t.isValidMimeType(n[0].type,t.options.mime_type)),i=e.currentTarget.classList&&e.currentTarget.classList.contains("upload-dropzone")&&r;switch((e.currentTarget===window?"w_":"e_")+e.type){case"w_drop":case"w_dragover":i||(e.dataTransfer.dropEffect="none");break;case"e_dragenter":i?(t.dropZone.classList.add("valid-dropzone"),e.dataTransfer.dropEffect="copy"):t.dropZone.classList.add("invalid-dropzone");break;case"e_dragover":i&&(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"),i&&t.uploadHandler(e)}i||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],r=this.preview_value.match(/^data:([^;,]+)[;,]/);if(n.mimeType=r?r[1]:"unknown",n.size>0){var i=Math.floor(Math.log(n.size)/Math.log(1024));n.formattedSize="".concat(parseFloat((n.size/Math.pow(1024,i)).toFixed(2))," ").concat(["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"][i])}else n.formattedSize="0 Bytes";var o=this.getButton("Upload","upload","Upload");o.addEventListener("click",(function(t){t.preventDefault(),o.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),o.removeAttribute("disabled")},failure:function(t){e.theme.addInputError(e.uploader,t),e.progressBar&&e.preview.removeChild(e.progressBar),o.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,o,this.preview_value)),this.options.auto_upload&&(o.dispatchEvent(new window.MouseEvent("click")),this.preview.removeChild(o))}}},{key:"enable",value:function(){this.always_disabled||(this.uploader&&(this.uploader.disabled=!1),Oo(Ro(o.prototype),"enable",this).call(this))}},{key:"disable",value:function(t){t&&(this.always_disabled=!0),this.uploader&&(this.uploader.disabled=!0),Oo(Ro(o.prototype),"disable",this).call(this)}},{key:"setValue",value:function(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),Oo(Ro(o.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)}}])&&jo(e.prototype,n),r&&jo(e,r),o}(B),uuid:function(t){!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}}),e&&Io(t,e)}(o,t);var e,n,r,i=Do(o);function o(){return Lo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"preBuild",value:function(){Ao(No(o.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(){Ao(No(o.prototype),"build",this).call(this),this.always_disabled=!0,this.input.setAttribute("readonly","true")}},{key:"sanitize",value:function(t){return this.testUuid(t)||(t=this.uuid),t}},{key:"setValue",value:function(t,e,n){this.testUuid(t)||(t=this.uuid),this.uuid=t,Ao(No(o.prototype),"setValue",this).call(this,t,e,n)}},{key:"getUuid",value:function(){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)}))}},{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)}}])&&To(e.prototype,n),r&&To(e,r),o}(G),colorpicker:function(t){!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}}),e&&Mo(t,e)}(o,t);var e,n,r,i=qo(o);function o(){return Vo(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"postBuild",value:function(){window.Picker&&(this.input.type="text"),this.input.style.padding="3px"}},{key:"setValue",value:function(t,e,n){var r=zo(Go(o.prototype),"setValue",this).call(this,t,e,n);return this.picker_instance&&this.picker_instance.domElement&&r&&r.changed&&this.picker_instance.setColor(r.value,!0),r}},{key:"getNumColumns",value:function(){return 2}},{key:"afterInputReady",value:function(){zo(Go(o.prototype),"afterInputReady",this).call(this),this.createPicker(!0)}},{key:"disable",value:function(){if(zo(Go(o.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"),e=0;e1?n=function(e){for(i=e,t=0;tt.length)&&(e=t.length);for(var n=0,r=new Array(e);n0&&void 0!==arguments[0]?arguments[0]:"",n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xo;Qo(this,t),this.mapping=n,this.icon_prefix=e}var e,n,r;return e=t,(n=[{key:"getIconClass",value:function(t){return this.mapping[t]?this.icon_prefix+this.mapping[t]:null}},{key:"getIcon",value:function(t){var e,n=this.getIconClass(t);if(!n)return null;var r=document.createElement("i");return(e=r.classList).add.apply(e,Wo(n.split(" "))),r}}])&&Yo(e.prototype,n),r&&Yo(e,r),t}();function ta(t){return(ta="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})(t)}function ea(t,e){return(ea=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function na(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ia(t);if(e){var i=ia(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ra(this,n)}}function ra(t,e){return!e||"object"!==ta(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ia(t){return(ia=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var oa={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"};function aa(t){return(aa="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})(t)}function sa(t,e){return(sa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function la(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ua(t);if(e){var i=ua(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ca(this,n)}}function ca(t,e){return!e||"object"!==aa(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ua(t){return(ua=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var ha={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"};function da(t){return(da="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})(t)}function pa(t,e){return(pa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function fa(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ma(t);if(e){var i=ma(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return ya(this,n)}}function ya(t,e){return!e||"object"!==da(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ma(t){return(ma=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var va={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"};function ba(t){return(ba="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})(t)}function ga(t,e){return(ga=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function _a(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=ka(t);if(e){var i=ka(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return wa(this,n)}}function wa(t,e){return!e||"object"!==ba(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function ka(t){return(ka=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var xa={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"};function ja(t){return(ja="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})(t)}function Oa(t,e){return(Oa=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ca(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Sa(t);if(e){var i=Sa(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Ea(this,n)}}function Ea(t,e){return!e||"object"!==ja(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Sa(t){return(Sa=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Ra={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"};function Pa(t){return(Pa="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})(t)}function La(t,e){return(La=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function Ta(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}();return function(){var n,r=Ia(t);if(e){var i=Ia(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return Aa(this,n)}}function Aa(t,e){return!e||"object"!==Pa(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function Ia(t){return(Ia=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}var Da={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"},Ba={bootstrap3:function(t){!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}}),e&&ea(t,e)}(n,t);var e=na(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"glyphicon glyphicon-",oa)}return n}(Ko),fontawesome3:function(t){!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}}),e&&sa(t,e)}(n,t);var e=la(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"icon-",ha)}return n}(Ko),fontawesome4:function(t){!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}}),e&&pa(t,e)}(n,t);var e=fa(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"fa fa-",va)}return n}(Ko),fontawesome5:function(t){!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}}),e&&ga(t,e)}(n,t);var e=_a(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"fas fa-",xa)}return n}(Ko),jqueryui:function(t){!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}}),e&&Oa(t,e)}(n,t);var e=Ca(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"ui-icon ui-icon-",Ra)}return n}(Ko),spectre:function(t){!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}}),e&&La(t,e)}(n,t);var e=Ta(n);function n(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,n),e.call(this,"icon icon-",Da)}return n}(Ko)};n(136);function Na(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Fa(t,e){for(var n=0;n1&&void 0!==arguments[1]?arguments[1]:{disable_theme_rules:!1};Na(this,t),this.jsoneditor=e,Object.keys(n).forEach((function(t){void 0!==e.options[t]&&(n[t]=e.options[t])})),this.options=n}var e,n,r;return e=t,(n=[{key:"getContainer",value:function(){return document.createElement("div")}},{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:"getHeader",value:function(t){var e=document.createElement("h3");return"string"==typeof t?e.textContent=t:e.appendChild(t),e.classList.add("je-header"),e}},{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,r){var i=document.createElement("div");return i.classList.add("control-group"),e&&(e.style.display="block",i.appendChild(e),r&&e.appendChild(r)),Object.values(t).forEach((function(t){t.style.display="inline-block",t.style.marginRight="20px",i.appendChild(t)})),n&&i.appendChild(n),i}},{key:"getFormCheckboxControl",value:function(t,e,n){var r=document.createElement("div");return r.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&r.classList.add("je-checkbox-control--compact"),r}},{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){var r=document.createElement("div");return r.appendChild(t),e.style.width="auto",t.insertBefore(e,t.firstChild),n&&r.classList.add("je-radio-control--compact"),r}},{key:"getSelectInput",value:function(t,e){var n=document.createElement("select");return t&&this.setSelectOptions(n,t),n}},{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]:[];t.innerHTML="";for(var r=0;rNumber(o)&&t.stepDown():t.stepDown():i(t,o),y(t,"change")})),r.addEventListener("click",(function(){t.getAttribute("initialized")?a?Number(t.value)
    "),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="
    "),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[Va])return!1;if(t[Va](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 r=document.createElement("div");if(r.classList.add("je-upload-preview"),"image"===t.mimeType.substr(0,5)){var i=document.createElement("img");i.src=n,r.appendChild(i)}var o=document.createElement("div");o.innerHTML+="Name: ".concat(t.name,"
    Type: ").concat(t.type,"
    Size: ").concat(t.formattedSize),r.appendChild(o),r.appendChild(e);var a=document.createElement("div");return a.style.clear="left",r.appendChild(a),r}},{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")}}])&&Fa(e.prototype,n),r&&Fa(e,r),t}();function za(t){return(za="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})(t)}function Ma(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function qa(t,e){for(var n=0;n
    "),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML="
    "),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var r=document.createElement("a");return r.setAttribute("href","#".concat(e)),r.appendChild(t),r.setAttribute("aria-controls",e),r.setAttribute("role","tab"),r.setAttribute("data-toggle","tab"),n.appendChild(r),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.setAttribute("role","presentation");var r=document.createElement("a");return r.setAttribute("href","#".concat(e)),r.appendChild(t),r.setAttribute("aria-controls",e),r.setAttribute("role","tab"),r.setAttribute("data-toggle","tab"),n.appendChild(r),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,r="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=r,n.innerHTML=r}}},{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 r=document.createElement("div");r.classList.add("input-group-btn"),n.appendChild(r);for(var i=0;iNumber(s)&&t.stepDown():t.stepDown():a(t,s),y(t,"change")})),o.addEventListener("click",(function(){t.getAttribute("initialized")?l?Number(t.value)
    "),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="
    "),n}},{key:"getTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var r=document.createElement("a");return r.classList.add("nav-link"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),n}},{key:"getTopTab",value:function(t,e){var n=document.createElement("li");n.classList.add("nav-item");var r=document.createElement("a");return r.classList.add("nav-link"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),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,r="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=r,n.innerHTML=r}}},{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 r=document.createElement("div");r.classList.add("input-group-append"),n.appendChild(r);for(var i=0;i .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 js=function(t){!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}}),e&&_s(t,e)}(o,t);var e,n,r,i=ws(o);function o(){return vs(this,o),i.apply(this,arguments)}return e=o,(n=[{key:"getTable",value:function(){var t=gs(xs(o.prototype),"getTable",this).call(this);return t.setAttribute("cellpadding",5),t.setAttribute("cellspacing",0),t}},{key:"getTableHeaderCell",value:function(t){var e=gs(xs(o.prototype),"getTableHeaderCell",this).call(this,t);return e.classList.add("ui-state-active"),e.style.fontWeight="bold",e}},{key:"getTableCell",value:function(){var t=gs(xs(o.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,e,n,r){var i=gs(xs(o.prototype),"getFormControl",this).call(this,t,e,n,r);return"checkbox"===e.type?(i.style.lineHeight="25px",i.style.padding="3px 0"):i.style.padding="4px 0 8px 0",i}},{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 r=document.createElement("button");r.classList.add("ui-button","ui-widget","ui-state-default","ui-corner-all"),e&&!t?(r.classList.add("ui-button-icon-only"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),r.appendChild(e)):e?(r.classList.add("ui-button-text-icon-primary"),e.classList.add("ui-button-icon-primary","ui-icon-primary"),r.appendChild(e)):r.classList.add("ui-button-text-only");var i=document.createElement("span");return i.classList.add("ui-button-text"),i.textContent=t||n||".",r.appendChild(i),r.setAttribute("title",n),r}},{key:"setButtonText",value:function(t,e,n,r){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 i=document.createElement("span");i.classList.add("ui-button-text"),i.textContent=e||r||".",t.appendChild(i),t.setAttribute("title",r)}},{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"}}])&&bs(e.prototype,n),r&&bs(e,r),o}(Ha);js.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"'};function Os(t){return(Os="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})(t)}function Cs(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Es(t,e){for(var n=0;n'),n}},{key:"getTopTabHolder",value:function(t){var e=void 0===t?"":t,n=document.createElement("div");return n.innerHTML='
      '),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 r=document.createElement("a");return r.setAttribute("href","#".concat(e)),r.appendChild(t),n.appendChild(r),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)}},{key:"removeInputError",value:function(t){t.errmsg&&(t.errmsg.classList.add("d-hide"),t.controlgroup.classList.remove("has-error"))}}])&&Is(e.prototype,n),r&&Is(e,r),o}(Ha);zs.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"};function Ms(t){return(Ms="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})(t)}function qs(t,e){for(var n=0;n0&&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.schema.title}},{key:"getSelectInput",value:function(t,e){var n=Us(Ws(o.prototype),"getSelectInput",this).call(this,t);return e?n.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"):n.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&&n.classList.add("compact"),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=Us(Ws(o.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 r=this.getFormInputField("range");return r.classList.add("slider"),this.options.enable_compact&&r.classList.add("compact"),r.setAttribute("oninput",'this.setAttribute("value", this.value)'),r.setAttribute("min",t),r.setAttribute("max",e),r.setAttribute("step",n),r}},{key:"getRangeControl",value:function(t,e){var n=Us(Ws(o.prototype),"getRangeControl",this).call(this,t,e);return n.classList.add("text-center","text-black"),n}},{key:"getCheckbox",value:function(){var t=this.getFormInputField("checkbox");return t.classList.add("form-checkbox","text-red-600"),t}},{key:"getCheckboxLabel",value:function(t,e){var n=Us(Ws(o.prototype),"getCheckboxLabel",this).call(this,t,e);return n.classList.add("inline-flex","items-center"),n}},{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,e,n,r){var i=Us(Ws(o.prototype),"getMultiCheckboxHolder",this).call(this,t,e,n,r);return i.classList.add("inline-flex","flex-col"),i}},{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,e){var n=Us(Ws(o.prototype),"getFormRadioLabel",this).call(this,t,e);return n.classList.add("inline-flex","items-center","mr-2"),n}},{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,e,n,r,i){var a=Us(Ws(o.prototype),"getRadioHolder",this).call(this,e,n,r,i);return"h"===t.options.layout?a.classList.add("inline-flex","flex-row"):a.classList.add("inline-flex","flex-col"),a}},{key:"getFormInputLabel",value:function(t,e){var n=Us(Ws(o.prototype),"getFormInputLabel",this).call(this,t,e);return this.options.label_bold?n.classList.add("font-bold"):n.classList.add("required"),n}},{key:"getFormInputField",value:function(t){var e=Us(Ws(o.prototype),"getFormInputField",this).call(this,t);return["checkbox","radio"].includes(t)||e.classList.add("block","w-full","px-1","text-black","text-sm","leading-normal","bg-white","border","border-grey","rounded"),this.options.enable_compact&&e.classList.add("compact"),e}},{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,r){var i=document.createElement("div");return i.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,r)),"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,r)),i.appendChild(t),!["checkbox","radio"].includes(e.type)&&r&&i.appendChild(r)),["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"),i.appendChild(e)),n&&i.appendChild(n),i}},{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,e,n){var r=Us(Ws(o.prototype),"getButton",this).call(this,t,e,n);return r.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"),r}},{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=Us(Ws(o.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=Us(Ws(o.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 e=Us(Ws(o.prototype),"getTableHeaderCell",this).call(this,t);return this.options.table_border?e.classList.add("je-table-border"):this.options.table_hdiv?e.classList.add("je-table-hdiv"):e.classList.add("text-xs","border","p-0","m-0"),e}},{key:"getTableCell",value:function(){var t=Us(Ws(o.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.classList.add("bg-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.classList.remove("bg-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="
        "),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="
        "),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 r=document.createElement("a");return r.classList.add("nav-link","text-center"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),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 r=document.createElement("a");return r.classList.add("nav-link","-mb-px","flex-row","text-center","bg-white","p-2","hover:bg-blue-400","rounded-t"),r.setAttribute("href","#".concat(e)),r.setAttribute("data-toggle","tab"),r.appendChild(t),n.appendChild(r),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,r="".concat(e,"%");n.setAttribute("aria-valuenow",e),n.style.width=r,n.innerHTML=r}}},{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 r=document.createElement("div");r.classList.add("-mr-1"),n.appendChild(r);for(var i=0;it.length)&&(e=t.length);for(var n=0,r=new Array(e);n1&&void 0!==arguments[1]?arguments[1]:{};if(el(this,t),!(e instanceof Element))throw new Error("element should be an instance of Element");this.element=e,this.options=f({},t.defaults.options,r),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.uuid=0,this.__data={};var i=this.options.theme||t.defaults.theme,o=t.defaults.themes[i];if(!o)throw new Error("Unknown theme ".concat(i));this.element.setAttribute("data-theme",i),this.theme=new o(this);var a=f(Xs,this.getEditorsRules()),s=function(t,e,r){return r?n.addNewStyleRulesToShadowRoot(t,e,r):n.addNewStyleRules(t,e)};if(!this.theme.options.disable_theme_rules){var l=m(this.element);s("default",a,l),void 0!==o.rules&&s(i,o.rules,l)}var c=t.defaults.iconlibs[this.options.iconlib||t.defaults.iconlib];c&&(this.iconlib=new c),this.root_container=this.theme.getContainer(),this.element.appendChild(this.root_container);var u=document.location.origin+document.location.pathname.toString(),h=new L(this.options),d=document.location.toString();this.expandSchema=function(t,e){return h.expandSchema(t,e)},this.expandRefs=function(t,e){return h.expandRefs(t,e)},this.refs=h.refs,h.load(this.schema,(function(e){var r=n.options.custom_validators?{custom_validators:n.options.custom_validators}:{};n.validator=new C(n,null,r,t.defaults);var i=n.getEditorClass(e);n.root=n.createEditor(i,{jsoneditor:n,schema:e,required:!0,container:n.root_container}),n.root.preBuild(),n.root.build(),n.root.postBuild(),v(n.options,"startval")&&n.root.setValue(n.options.startval),n.validation_results=n.validator.validate(n.root.getValue()),n.root.showValidationErrors(n.validation_results),n.ready=!0,window.requestAnimationFrame((function(){n.ready&&(n.validation_results=n.validator.validate(n.root.getValue()),n.root.showValidationErrors(n.validation_results),n.trigger("ready"),n.trigger("change"))}))}),u,d)}var e,n,r;return e=t,(n=[{key:"getValue",value:function(){if(!this.ready)throw new Error("JSON Editor not ready yet. Listen for 'ready' event before getting the value");return this.root.getValue()}},{key:"setValue",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Listen for 'ready' event before setting the value");return this.root.setValue(t),this}},{key:"validate",value:function(t){if(!this.ready)throw new Error("JSON Editor not ready yet. Listen for 'ready' event before validating");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=[],r=0;r2&&void 0!==arguments[2]?arguments[2]:1;return new e(n=f({},e.options||{},n),t.defaults,r)}},{key:"onChange",value:function(){var t=this;if(this.ready&&!this.firing_change)return this.firing_change=!0,window.requestAnimationFrame((function(){t.firing_change=!1,t.ready&&(t.validation_results=t.validator.validate(t.root.getValue()),"never"!==t.options.show_errors?t.root.showValidationErrors(t.validation_results):t.root.showValidationErrors([]),t.trigger("change"))})),this}},{key:"compileTemplate",value:function(e){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t.defaults.template;if("string"==typeof r){if(!t.defaults.templates[r])throw new Error("Unknown template engine ".concat(r));if(!(n=t.defaults.templates[r]()))throw new Error("Template engine ".concat(r," missing required library."))}else n=r;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 r;t.hasAttribute("data-jsoneditor-".concat(e))?r=t.getAttribute("data-jsoneditor-".concat(e)):(r=this.uuid++,t.setAttribute("data-jsoneditor-".concat(e),r)),this.__data[r]=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=[],r=0;r0;)r.deleteRule(0);Object.keys(e).forEach((function(n){var o="default"===t?n:"".concat(i,'[data-theme="').concat(t,'"] ').concat(n);r.insertRule?r.insertRule(o+" {"+decodeURIComponent(e[n])+"}",0):r.addRule&&r.addRule(o,decodeURIComponent(e[n]),0)}))}},{key:"addNewStyleRulesToShadowRoot",value:function(t,e,n){var r=this.element.nodeName.toLowerCase(),i="";Object.keys(e).forEach((function(n){var o="default"===t?n:"".concat(r,'[data-theme="').concat(t,'"] ').concat(n);i+=o+" {"+decodeURIComponent(e[n])+"}\n"}));var o=new CSSStyleSheet;o.replaceSync(i),n.adoptedStyleSheets=[].concat(Ks(n.adoptedStyleSheets),[o])}}])&&nl(e.prototype,n),r&&nl(e,r),t}();rl.defaults=c,rl.AbstractEditor=B,rl.AbstractTheme=Ha,rl.AbstractIconLib=Ko,Object.assign(rl.defaults.themes,Ys),Object.assign(rl.defaults.editors,$o),Object.assign(rl.defaults.templates,Jo),Object.assign(rl.defaults.iconlibs,Ba)}])})); \ No newline at end of file