UNPKG

grapesjs-clot

Version:

Free and Open Source Web Builder Framework

3 lines 1.29 MB
/*! grapesjs-clot - 0.1.160 */
!function(e,t){'object'==typeof exports&&'object'==typeof module?module.exports=t():'function'==typeof define&&define.amd?define([],t):'object'==typeof exports?exports["grapesjs-clot"]=t():e["grapesjs-clot"]=t()}('undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:this,(function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){'undefined'!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:'Module'}),Object.defineProperty(e,'__esModule',{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&'object'==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,'default',{enumerable:!0,value:e}),2&t&&'string'!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e['default']}:function(){return e};return n.d(t,'a',t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=26)}([function(e,t,n){"use strict";n.r(t),n.d(t,"default",(function(){return Cn})),n.d(t,"VERSION",(function(){return i["e"]})),n.d(t,"restArguments",(function(){return o})),n.d(t,"isObject",(function(){return a})),n.d(t,"isNull",(function(){return s})),n.d(t,"isUndefined",(function(){return l})),n.d(t,"isBoolean",(function(){return c})),n.d(t,"isElement",(function(){return u})),n.d(t,"isString",(function(){return d})),n.d(t,"isNumber",(function(){return h})),n.d(t,"isDate",(function(){return p})),n.d(t,"isRegExp",(function(){return g})),n.d(t,"isError",(function(){return v})),n.d(t,"isSymbol",(function(){return m})),n.d(t,"isArrayBuffer",(function(){return y})),n.d(t,"isDataView",(function(){return j})),n.d(t,"isArray",(function(){return E})),n.d(t,"isFunction",(function(){return O})),n.d(t,"isArguments",(function(){return T})),n.d(t,"isFinite",(function(){return A})),n.d(t,"isNaN",(function(){return M})),n.d(t,"isTypedArray",(function(){return z})),n.d(t,"isEmpty",(function(){return H})),n.d(t,"isMatch",(function(){return W})),n.d(t,"isEqual",(function(){return Y})),n.d(t,"isMap",(function(){return oe})),n.d(t,"isWeakMap",(function(){return ae})),n.d(t,"isSet",(function(){return se})),n.d(t,"isWeakSet",(function(){return le})),n.d(t,"keys",(function(){return U})),n.d(t,"allKeys",(function(){return J})),n.d(t,"values",(function(){return ce})),n.d(t,"pairs",(function(){return ue})),n.d(t,"invert",(function(){return fe})),n.d(t,"functions",(function(){return de})),n.d(t,"methods",(function(){return de})),n.d(t,"extend",(function(){return pe})),n.d(t,"extendOwn",(function(){return ge})),n.d(t,"assign",(function(){return ge})),n.d(t,"defaults",(function(){return ve})),n.d(t,"create",(function(){return ye})),n.d(t,"clone",(function(){return be})),n.d(t,"tap",(function(){return we})),n.d(t,"get",(function(){return Ce})),n.d(t,"has",(function(){return Se})),n.d(t,"mapObject",(function(){return De})),n.d(t,"identity",(function(){return je})),n.d(t,"constant",(function(){return D})),n.d(t,"noop",(function(){return Le})),n.d(t,"toPath",(function(){return Oe})),n.d(t,"property",(function(){return Pe})),n.d(t,"propertyOf",(function(){return Ne})),n.d(t,"matcher",(function(){return Ee})),n.d(t,"matches",(function(){return Ee})),n.d(t,"times",(function(){return Re})),n.d(t,"random",(function(){return Fe})),n.d(t,"now",(function(){return Ie})),n.d(t,"escape",(function(){return Be})),n.d(t,"unescape",(function(){return Ue})),n.d(t,"templateSettings",(function(){return He})),n.d(t,"template",(function(){return Ye})),n.d(t,"result",(function(){return Je})),n.d(t,"uniqueId",(function(){return Qe})),n.d(t,"chain",(function(){return Ze})),n.d(t,"iteratee",(function(){return Ae})),n.d(t,"partial",(function(){return nt})),n.d(t,"bind",(function(){return rt})),n.d(t,"bindAll",(function(){return at})),n.d(t,"memoize",(function(){return st})),n.d(t,"delay",(function(){return lt})),n.d(t,"defer",(function(){return ct})),n.d(t,"throttle",(function(){return ut})),n.d(t,"debounce",(function(){return ft})),n.d(t,"wrap",(function(){return dt})),n.d(t,"negate",(function(){return ht})),n.d(t,"compose",(function(){return pt})),n.d(t,"after",(function(){return gt})),n.d(t,"before",(function(){return vt})),n.d(t,"once",(function(){return mt})),n.d(t,"findKey",(function(){return yt})),n.d(t,"findIndex",(function(){return wt})),n.d(t,"findLastIndex",(function(){return Ot})),n.d(t,"sortedIndex",(function(){return xt})),n.d(t,"indexOf",(function(){return Ct})),n.d(t,"lastIndexOf",(function(){return St})),n.d(t,"find",(function(){return jt})),n.d(t,"detect",(function(){return jt})),n.d(t,"findWhere",(function(){return Et})),n.d(t,"each",(function(){return Pt})),n.d(t,"forEach",(function(){return Pt})),n.d(t,"map",(function(){return _t})),n.d(t,"collect",(function(){return _t})),n.d(t,"reduce",(function(){return At})),n.d(t,"foldl",(function(){return At})),n.d(t,"inject",(function(){return At})),n.d(t,"reduceRight",(function(){return Mt})),n.d(t,"foldr",(function(){return Mt})),n.d(t,"filter",(function(){return Dt})),n.d(t,"select",(function(){return Dt})),n.d(t,"reject",(function(){return Lt})),n.d(t,"every",(function(){return Nt})),n.d(t,"all",(function(){return Nt})),n.d(t,"some",(function(){return Rt})),n.d(t,"any",(function(){return Rt})),n.d(t,"contains",(function(){return Ft})),n.d(t,"includes",(function(){return Ft})),n.d(t,"include",(function(){return Ft})),n.d(t,"invoke",(function(){return It})),n.d(t,"pluck",(function(){return zt})),n.d(t,"where",(function(){return Vt})),n.d(t,"max",(function(){return Bt})),n.d(t,"min",(function(){return Ut})),n.d(t,"shuffle",(function(){return Wt})),n.d(t,"sample",(function(){return Ht})),n.d(t,"sortBy",(function(){return $t})),n.d(t,"groupBy",(function(){return Kt})),n.d(t,"indexBy",(function(){return Gt})),n.d(t,"countBy",(function(){return Yt})),n.d(t,"partition",(function(){return Jt})),n.d(t,"toArray",(function(){return Qt})),n.d(t,"size",(function(){return Zt})),n.d(t,"pick",(function(){return tn})),n.d(t,"omit",(function(){return nn})),n.d(t,"first",(function(){return on})),n.d(t,"head",(function(){return on})),n.d(t,"take",(function(){return on})),n.d(t,"initial",(function(){return rn})),n.d(t,"last",(function(){return sn})),n.d(t,"rest",(function(){return an})),n.d(t,"tail",(function(){return an})),n.d(t,"drop",(function(){return an})),n.d(t,"compact",(function(){return ln})),n.d(t,"flatten",(function(){return cn})),n.d(t,"without",(function(){return fn})),n.d(t,"uniq",(function(){return dn})),n.d(t,"unique",(function(){return dn})),n.d(t,"union",(function(){return hn})),n.d(t,"intersection",(function(){return pn})),n.d(t,"difference",(function(){return un})),n.d(t,"unzip",(function(){return gn})),n.d(t,"transpose",(function(){return gn})),n.d(t,"zip",(function(){return vn})),n.d(t,"object",(function(){return mn})),n.d(t,"range",(function(){return yn})),n.d(t,"chunk",(function(){return bn})),n.d(t,"mixin",(function(){return On}));var r={};n.r(r),n.d(r,"VERSION",(function(){return i["e"]})),n.d(r,"restArguments",(function(){return o})),n.d(r,"isObject",(function(){return a})),n.d(r,"isNull",(function(){return s})),n.d(r,"isUndefined",(function(){return l})),n.d(r,"isBoolean",(function(){return c})),n.d(r,"isElement",(function(){return u})),n.d(r,"isString",(function(){return d})),n.d(r,"isNumber",(function(){return h})),n.d(r,"isDate",(function(){return p})),n.d(r,"isRegExp",(function(){return g})),n.d(r,"isError",(function(){return v})),n.d(r,"isSymbol",(function(){return m})),n.d(r,"isArrayBuffer",(function(){return y})),n.d(r,"isDataView",(function(){return j})),n.d(r,"isArray",(function(){return E})),n.d(r,"isFunction",(function(){return O})),n.d(r,"isArguments",(function(){return T})),n.d(r,"isFinite",(function(){return A})),n.d(r,"isNaN",(function(){return M})),n.d(r,"isTypedArray",(function(){return z})),n.d(r,"isEmpty",(function(){return H})),n.d(r,"isMatch",(function(){return W})),n.d(r,"isEqual",(function(){return Y})),n.d(r,"isMap",(function(){return oe})),n.d(r,"isWeakMap",(function(){return ae})),n.d(r,"isSet",(function(){return se})),n.d(r,"isWeakSet",(function(){return le})),n.d(r,"keys",(function(){return U})),n.d(r,"allKeys",(function(){return J})),n.d(r,"values",(function(){return ce})),n.d(r,"pairs",(function(){return ue})),n.d(r,"invert",(function(){return fe})),n.d(r,"functions",(function(){return de})),n.d(r,"methods",(function(){return de})),n.d(r,"extend",(function(){return pe})),n.d(r,"extendOwn",(function(){return ge})),n.d(r,"assign",(function(){return ge})),n.d(r,"defaults",(function(){return ve})),n.d(r,"create",(function(){return ye})),n.d(r,"clone",(function(){return be})),n.d(r,"tap",(function(){return we})),n.d(r,"get",(function(){return Ce})),n.d(r,"has",(function(){return Se})),n.d(r,"mapObject",(function(){return De})),n.d(r,"identity",(function(){return je})),n.d(r,"constant",(function(){return D})),n.d(r,"noop",(function(){return Le})),n.d(r,"toPath",(function(){return Oe})),n.d(r,"property",(function(){return Pe})),n.d(r,"propertyOf",(function(){return Ne})),n.d(r,"matcher",(function(){return Ee})),n.d(r,"matches",(function(){return Ee})),n.d(r,"times",(function(){return Re})),n.d(r,"random",(function(){return Fe})),n.d(r,"now",(function(){return Ie})),n.d(r,"escape",(function(){return Be})),n.d(r,"unescape",(function(){return Ue})),n.d(r,"templateSettings",(function(){return He})),n.d(r,"template",(function(){return Ye})),n.d(r,"result",(function(){return Je})),n.d(r,"uniqueId",(function(){return Qe})),n.d(r,"chain",(function(){return Ze})),n.d(r,"iteratee",(function(){return Ae})),n.d(r,"partial",(function(){return nt})),n.d(r,"bind",(function(){return rt})),n.d(r,"bindAll",(function(){return at})),n.d(r,"memoize",(function(){return st})),n.d(r,"delay",(function(){return lt})),n.d(r,"defer",(function(){return ct})),n.d(r,"throttle",(function(){return ut})),n.d(r,"debounce",(function(){return ft})),n.d(r,"wrap",(function(){return dt})),n.d(r,"negate",(function(){return ht})),n.d(r,"compose",(function(){return pt})),n.d(r,"after",(function(){return gt})),n.d(r,"before",(function(){return vt})),n.d(r,"once",(function(){return mt})),n.d(r,"findKey",(function(){return yt})),n.d(r,"findIndex",(function(){return wt})),n.d(r,"findLastIndex",(function(){return Ot})),n.d(r,"sortedIndex",(function(){return xt})),n.d(r,"indexOf",(function(){return Ct})),n.d(r,"lastIndexOf",(function(){return St})),n.d(r,"find",(function(){return jt})),n.d(r,"detect",(function(){return jt})),n.d(r,"findWhere",(function(){return Et})),n.d(r,"each",(function(){return Pt})),n.d(r,"forEach",(function(){return Pt})),n.d(r,"map",(function(){return _t})),n.d(r,"collect",(function(){return _t})),n.d(r,"reduce",(function(){return At})),n.d(r,"foldl",(function(){return At})),n.d(r,"inject",(function(){return At})),n.d(r,"reduceRight",(function(){return Mt})),n.d(r,"foldr",(function(){return Mt})),n.d(r,"filter",(function(){return Dt})),n.d(r,"select",(function(){return Dt})),n.d(r,"reject",(function(){return Lt})),n.d(r,"every",(function(){return Nt})),n.d(r,"all",(function(){return Nt})),n.d(r,"some",(function(){return Rt})),n.d(r,"any",(function(){return Rt})),n.d(r,"contains",(function(){return Ft})),n.d(r,"includes",(function(){return Ft})),n.d(r,"include",(function(){return Ft})),n.d(r,"invoke",(function(){return It})),n.d(r,"pluck",(function(){return zt})),n.d(r,"where",(function(){return Vt})),n.d(r,"max",(function(){return Bt})),n.d(r,"min",(function(){return Ut})),n.d(r,"shuffle",(function(){return Wt})),n.d(r,"sample",(function(){return Ht})),n.d(r,"sortBy",(function(){return $t})),n.d(r,"groupBy",(function(){return Kt})),n.d(r,"indexBy",(function(){return Gt})),n.d(r,"countBy",(function(){return Yt})),n.d(r,"partition",(function(){return Jt})),n.d(r,"toArray",(function(){return Qt})),n.d(r,"size",(function(){return Zt})),n.d(r,"pick",(function(){return tn})),n.d(r,"omit",(function(){return nn})),n.d(r,"first",(function(){return on})),n.d(r,"head",(function(){return on})),n.d(r,"take",(function(){return on})),n.d(r,"initial",(function(){return rn})),n.d(r,"last",(function(){return sn})),n.d(r,"rest",(function(){return an})),n.d(r,"tail",(function(){return an})),n.d(r,"drop",(function(){return an})),n.d(r,"compact",(function(){return ln})),n.d(r,"flatten",(function(){return cn})),n.d(r,"without",(function(){return fn})),n.d(r,"uniq",(function(){return dn})),n.d(r,"unique",(function(){return dn})),n.d(r,"union",(function(){return hn})),n.d(r,"intersection",(function(){return pn})),n.d(r,"difference",(function(){return un})),n.d(r,"unzip",(function(){return gn})),n.d(r,"transpose",(function(){return gn})),n.d(r,"zip",(function(){return vn})),n.d(r,"object",(function(){return mn})),n.d(r,"range",(function(){return yn})),n.d(r,"chunk",(function(){return bn})),n.d(r,"mixin",(function(){return On})),n.d(r,"default",(function(){return xn}));var i=n(12);function o(e,t){return t=null==t?e.length-1:+t,function(){for(var n=Math.max(arguments.length-t,0),r=Array(n),i=0;i<n;i++)r[i]=arguments[i+t];switch(t){case 0:return e.call(this,r);case 1:return e.call(this,arguments[0],r);case 2:return e.call(this,arguments[0],arguments[1],r)}var o=Array(t+1);for(i=0;i<t;i++)o[i]=arguments[i];return o[t]=r,e.apply(this,o)}}function a(e){var t=typeof e;return'function'===t||'object'===t&&!!e}function s(e){return null===e}function l(e){return void 0===e}function c(e){return!0===e||!1===e||'[object Boolean]'===i["t"].call(e)}function u(e){return!(!e||1!==e.nodeType)}function f(e){var t='[object '+e+']';return function(e){return i["t"].call(e)===t}}var d=f('String'),h=f('Number'),p=f('Date'),g=f('RegExp'),v=f('Error'),m=f('Symbol'),y=f('ArrayBuffer'),b=f('Function'),w=i["p"].document&&i["p"].document.childNodes;1&&'object'!=typeof Int8Array&&'function'!=typeof w&&(b=function(e){return'function'==typeof e||!1});var O=b,x=f('Object'),k=i["s"]&&x(new DataView(new ArrayBuffer(8))),C='undefined'!=typeof Map&&x(new Map),S=f('DataView');var j=k?function(e){return null!=e&&O(e.getInt8)&&y(e.buffer)}:S,E=i["k"]||f('Array');function P(e,t){return null!=e&&i["i"].call(e,t)}var _=f('Arguments');!function(){_(arguments)||(_=function(e){return P(e,'callee')})}();var T=_;function A(e){return!m(e)&&Object(i["f"])(e)&&!isNaN(parseFloat(e))}function M(e){return h(e)&&Object(i["g"])(e)}function D(e){return function(){return e}}function L(e){return function(t){var n=e(t);return'number'==typeof n&&n>=0&&n<=i["b"]}}function N(e){return function(t){return null==t?void 0:t[e]}}var R=N('byteLength'),F=L(R),I=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var z=i["r"]?function(e){return i["l"]?Object(i["l"])(e)&&!j(e):F(e)&&I.test(i["t"].call(e))}:D(!1),V=N('length');function B(e,t){t=function(e){for(var t={},n=e.length,r=0;r<n;++r)t[e[r]]=!0;return{contains:function(e){return t[e]},push:function(n){return t[n]=!0,e.push(n)}}}(t);var n=i["n"].length,r=e.constructor,o=O(r)&&r.prototype||i["c"],a='constructor';for(P(e,a)&&!t.contains(a)&&t.push(a);n--;)(a=i["n"][n])in e&&e[a]!==o[a]&&!t.contains(a)&&t.push(a)}function U(e){if(!a(e))return[];if(i["m"])return Object(i["m"])(e);var t=[];for(var n in e)P(e,n)&&t.push(n);return i["h"]&&B(e,t),t}function H(e){if(null==e)return!0;var t=V(e);return'number'==typeof t&&(E(e)||d(e)||T(e))?0===t:0===V(U(e))}function W(e,t){var n=U(t),r=n.length;if(null==e)return!r;for(var i=Object(e),o=0;o<r;o++){var a=n[o];if(t[a]!==i[a]||!(a in i))return!1}return!0}function $(e){return e instanceof $?e:this instanceof $?void(this._wrapped=e):new $(e)}function q(e){return new Uint8Array(e.buffer||e,e.byteOffset||0,R(e))}$.VERSION=i["e"],$.prototype.value=function(){return this._wrapped},$.prototype.valueOf=$.prototype.toJSON=$.prototype.value,$.prototype.toString=function(){return String(this._wrapped)};var K='[object DataView]';function G(e,t,n,r){if(e===t)return 0!==e||1/e==1/t;if(null==e||null==t)return!1;if(e!=e)return t!=t;var o=typeof e;return('function'===o||'object'===o||'object'==typeof t)&&function e(t,n,r,o){t instanceof $&&(t=t._wrapped);n instanceof $&&(n=n._wrapped);var a=i["t"].call(t);if(a!==i["t"].call(n))return!1;if(k&&'[object Object]'==a&&j(t)){if(!j(n))return!1;a=K}switch(a){case'[object RegExp]':case'[object String]':return''+t==''+n;case'[object Number]':return+t!=+t?+n!=+n:0==+t?1/+t==1/n:+t==+n;case'[object Date]':case'[object Boolean]':return+t==+n;case'[object Symbol]':return i["d"].valueOf.call(t)===i["d"].valueOf.call(n);case'[object ArrayBuffer]':case K:return e(q(t),q(n),r,o)}var s='[object Array]'===a;if(!s&&z(t)){if(R(t)!==R(n))return!1;if(t.buffer===n.buffer&&t.byteOffset===n.byteOffset)return!0;s=!0}if(!s){if('object'!=typeof t||'object'!=typeof n)return!1;var l=t.constructor,c=n.constructor;if(l!==c&&!(O(l)&&l instanceof l&&O(c)&&c instanceof c)&&'constructor'in t&&'constructor'in n)return!1}o=o||[];var u=(r=r||[]).length;for(;u--;)if(r[u]===t)return o[u]===n;if(r.push(t),o.push(n),s){if((u=t.length)!==n.length)return!1;for(;u--;)if(!G(t[u],n[u],r,o))return!1}else{var f,d=U(t);if(u=d.length,U(n).length!==u)return!1;for(;u--;)if(f=d[u],!P(n,f)||!G(t[f],n[f],r,o))return!1}return r.pop(),o.pop(),!0}(e,t,n,r)}function Y(e,t){return G(e,t)}function J(e){if(!a(e))return[];var t=[];for(var n in e)t.push(n);return i["h"]&&B(e,t),t}function X(e){var t=V(e);return function(n){if(null==n)return!1;var r=J(n);if(V(r))return!1;for(var i=0;i<t;i++)if(!O(n[e[i]]))return!1;return e!==re||!O(n[Q])}}var Q='forEach',Z='has',ee=['clear','delete'],te=['get',Z,'set'],ne=ee.concat(Q,te),re=ee.concat(te),ie=['add'].concat(ee,Q,Z),oe=C?X(ne):f('Map'),ae=C?X(re):f('WeakMap'),se=C?X(ie):f('Set'),le=f('WeakSet');function ce(e){for(var t=U(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=e[t[i]];return r}function ue(e){for(var t=U(e),n=t.length,r=Array(n),i=0;i<n;i++)r[i]=[t[i],e[t[i]]];return r}function fe(e){for(var t={},n=U(e),r=0,i=n.length;r<i;r++)t[e[n[r]]]=n[r];return t}function de(e){var t=[];for(var n in e)O(e[n])&&t.push(n);return t.sort()}function he(e,t){return function(n){var r=arguments.length;if(t&&(n=Object(n)),r<2||null==n)return n;for(var i=1;i<r;i++)for(var o=arguments[i],a=e(o),s=a.length,l=0;l<s;l++){var c=a[l];t&&void 0!==n[c]||(n[c]=o[c])}return n}}var pe=he(J),ge=he(U),ve=he(J,!0);function me(e){if(!a(e))return{};if(i["j"])return Object(i["j"])(e);var t=function(){};t.prototype=e;var n=new t;return t.prototype=null,n}function ye(e,t){var n=me(e);return t&&ge(n,t),n}function be(e){return a(e)?E(e)?e.slice():pe({},e):e}function we(e,t){return t(e),e}function Oe(e){return E(e)?e:[e]}function xe(e){return $.toPath(e)}function ke(e,t){for(var n=t.length,r=0;r<n;r++){if(null==e)return;e=e[t[r]]}return n?e:void 0}function Ce(e,t,n){var r=ke(e,xe(t));return l(r)?n:r}function Se(e,t){for(var n=(t=xe(t)).length,r=0;r<n;r++){var i=t[r];if(!P(e,i))return!1;e=e[i]}return!!n}function je(e){return e}function Ee(e){return e=ge({},e),function(t){return W(t,e)}}function Pe(e){return e=xe(e),function(t){return ke(t,e)}}function _e(e,t,n){if(void 0===t)return e;switch(null==n?3:n){case 1:return function(n){return e.call(t,n)};case 3:return function(n,r,i){return e.call(t,n,r,i)};case 4:return function(n,r,i,o){return e.call(t,n,r,i,o)}}return function(){return e.apply(t,arguments)}}function Te(e,t,n){return null==e?je:O(e)?_e(e,t,n):a(e)&&!E(e)?Ee(e):Pe(e)}function Ae(e,t){return Te(e,t,1/0)}function Me(e,t,n){return $.iteratee!==Ae?$.iteratee(e,t):Te(e,t,n)}function De(e,t,n){t=Me(t,n);for(var r=U(e),i=r.length,o={},a=0;a<i;a++){var s=r[a];o[s]=t(e[s],s,e)}return o}function Le(){}function Ne(e){return null==e?Le:function(t){return Ce(e,t)}}function Re(e,t,n){var r=Array(Math.max(0,e));t=_e(t,n,1);for(var i=0;i<e;i++)r[i]=t(i);return r}function Fe(e,t){return null==t&&(t=e,e=0),e+Math.floor(Math.random()*(t-e+1))}$.toPath=Oe,$.iteratee=Ae;var Ie=Date.now||function(){return(new Date).getTime()};function ze(e){var t=function(t){return e[t]},n='(?:'+U(e).join('|')+')',r=RegExp(n),i=RegExp(n,'g');return function(e){return e=null==e?'':''+e,r.test(e)?e.replace(i,t):e}}var Ve={'&':'&amp;','<':'&lt;','>':'&gt;','"':'&quot;',"'":'&#x27;','`':'&#x60;'},Be=ze(Ve),Ue=ze(fe(Ve)),He=$.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},We=/(.)^/,$e={"'":"'",'\\':'\\','\r':'r','\n':'n','\u2028':'u2028','\u2029':'u2029'},qe=/\\|'|\r|\n|\u2028|\u2029/g;function Ke(e){return'\\'+$e[e]}var Ge=/^\s*(\w|\$)+\s*$/;function Ye(e,t,n){!t&&n&&(t=n),t=ve({},t,$.templateSettings);var r=RegExp([(t.escape||We).source,(t.interpolate||We).source,(t.evaluate||We).source].join('|')+'|$','g'),i=0,o="__p+='";e.replace(r,(function(t,n,r,a,s){return o+=e.slice(i,s).replace(qe,Ke),i=s+t.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":r?o+="'+\n((__t=("+r+"))==null?'':__t)+\n'":a&&(o+="';\n"+a+"\n__p+='"),t})),o+="';\n";var a,s=t.variable;if(s){if(!Ge.test(s))throw new Error('variable is not a bare identifier: '+s)}else o='with(obj||{}){\n'+o+'}\n',s='obj';o="var __t,__p='',__j=Array.prototype.join,"+"print=function(){__p+=__j.call(arguments,'');};\n"+o+'return __p;\n';try{a=new Function(s,'_',o)}catch(e){throw e.source=o,e}var l=function(e){return a.call(this,e,$)};return l.source='function('+s+'){\n'+o+'}',l}function Je(e,t,n){var r=(t=xe(t)).length;if(!r)return O(n)?n.call(e):n;for(var i=0;i<r;i++){var o=null==e?void 0:e[t[i]];void 0===o&&(o=n,i=r),e=O(o)?o.call(e):o}return e}var Xe=0;function Qe(e){var t=++Xe+'';return e?e+t:t}function Ze(e){var t=$(e);return t._chain=!0,t}function et(e,t,n,r,i){if(!(r instanceof t))return e.apply(n,i);var o=me(e.prototype),s=e.apply(o,i);return a(s)?s:o}var tt=o((function(e,t){var n=tt.placeholder,r=function(){for(var i=0,o=t.length,a=Array(o),s=0;s<o;s++)a[s]=t[s]===n?arguments[i++]:t[s];for(;i<arguments.length;)a.push(arguments[i++]);return et(e,r,this,this,a)};return r}));tt.placeholder=$;var nt=tt,rt=o((function(e,t,n){if(!O(e))throw new TypeError('Bind must be called on a function');var r=o((function(i){return et(e,r,t,this,n.concat(i))}));return r})),it=L(V);function ot(e,t,n,r){if(r=r||[],t||0===t){if(t<=0)return r.concat(e)}else t=1/0;for(var i=r.length,o=0,a=V(e);o<a;o++){var s=e[o];if(it(s)&&(E(s)||T(s)))if(t>1)ot(s,t-1,n,r),i=r.length;else for(var l=0,c=s.length;l<c;)r[i++]=s[l++];else n||(r[i++]=s)}return r}var at=o((function(e,t){var n=(t=ot(t,!1,!1)).length;if(n<1)throw new Error('bindAll must be passed function names');for(;n--;){var r=t[n];e[r]=rt(e[r],e)}return e}));function st(e,t){var n=function(r){var i=n.cache,o=''+(t?t.apply(this,arguments):r);return P(i,o)||(i[o]=e.apply(this,arguments)),i[o]};return n.cache={},n}var lt=o((function(e,t,n){return setTimeout((function(){return e.apply(null,n)}),t)})),ct=nt(lt,$,1);function ut(e,t,n){var r,i,o,a,s=0;n||(n={});var l=function(){s=!1===n.leading?0:Ie(),r=null,a=e.apply(i,o),r||(i=o=null)},c=function(){var c=Ie();s||!1!==n.leading||(s=c);var u=t-(c-s);return i=this,o=arguments,u<=0||u>t?(r&&(clearTimeout(r),r=null),s=c,a=e.apply(i,o),r||(i=o=null)):r||!1===n.trailing||(r=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(r),s=0,r=i=o=null},c}function ft(e,t,n){var r,i,a,s,l,c=function(){var o=Ie()-i;t>o?r=setTimeout(c,t-o):(r=null,n||(s=e.apply(l,a)),r||(a=l=null))},u=o((function(o){return l=this,a=o,i=Ie(),r||(r=setTimeout(c,t),n&&(s=e.apply(l,a))),s}));return u.cancel=function(){clearTimeout(r),r=a=l=null},u}function dt(e,t){return nt(t,e)}function ht(e){return function(){return!e.apply(this,arguments)}}function pt(){var e=arguments,t=e.length-1;return function(){for(var n=t,r=e[t].apply(this,arguments);n--;)r=e[n].call(this,r);return r}}function gt(e,t){return function(){if(--e<1)return t.apply(this,arguments)}}function vt(e,t){var n;return function(){return--e>0&&(n=t.apply(this,arguments)),e<=1&&(t=null),n}}var mt=nt(vt,2);function yt(e,t,n){t=Me(t,n);for(var r,i=U(e),o=0,a=i.length;o<a;o++)if(t(e[r=i[o]],r,e))return r}function bt(e){return function(t,n,r){n=Me(n,r);for(var i=V(t),o=e>0?0:i-1;o>=0&&o<i;o+=e)if(n(t[o],o,t))return o;return-1}}var wt=bt(1),Ot=bt(-1);function xt(e,t,n,r){for(var i=(n=Me(n,r,1))(t),o=0,a=V(e);o<a;){var s=Math.floor((o+a)/2);n(e[s])<i?o=s+1:a=s}return o}function kt(e,t,n){return function(r,o,a){var s=0,l=V(r);if('number'==typeof a)e>0?s=a>=0?a:Math.max(a+l,s):l=a>=0?Math.min(a+1,l):a+l+1;else if(n&&a&&l)return r[a=n(r,o)]===o?a:-1;if(o!=o)return(a=t(i["q"].call(r,s,l),M))>=0?a+s:-1;for(a=e>0?s:l-1;a>=0&&a<l;a+=e)if(r[a]===o)return a;return-1}}var Ct=kt(1,wt,xt),St=kt(-1,Ot);function jt(e,t,n){var r=(it(e)?wt:yt)(e,t,n);if(void 0!==r&&-1!==r)return e[r]}function Et(e,t){return jt(e,Ee(t))}function Pt(e,t,n){var r,i;if(t=_e(t,n),it(e))for(r=0,i=e.length;r<i;r++)t(e[r],r,e);else{var o=U(e);for(r=0,i=o.length;r<i;r++)t(e[o[r]],o[r],e)}return e}function _t(e,t,n){t=Me(t,n);for(var r=!it(e)&&U(e),i=(r||e).length,o=Array(i),a=0;a<i;a++){var s=r?r[a]:a;o[a]=t(e[s],s,e)}return o}function Tt(e){var t=function(t,n,r,i){var o=!it(t)&&U(t),a=(o||t).length,s=e>0?0:a-1;for(i||(r=t[o?o[s]:s],s+=e);s>=0&&s<a;s+=e){var l=o?o[s]:s;r=n(r,t[l],l,t)}return r};return function(e,n,r,i){var o=arguments.length>=3;return t(e,_e(n,i,4),r,o)}}var At=Tt(1),Mt=Tt(-1);function Dt(e,t,n){var r=[];return t=Me(t,n),Pt(e,(function(e,n,i){t(e,n,i)&&r.push(e)})),r}function Lt(e,t,n){return Dt(e,ht(Me(t)),n)}function Nt(e,t,n){t=Me(t,n);for(var r=!it(e)&&U(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(!t(e[a],a,e))return!1}return!0}function Rt(e,t,n){t=Me(t,n);for(var r=!it(e)&&U(e),i=(r||e).length,o=0;o<i;o++){var a=r?r[o]:o;if(t(e[a],a,e))return!0}return!1}function Ft(e,t,n,r){return it(e)||(e=ce(e)),('number'!=typeof n||r)&&(n=0),Ct(e,t,n)>=0}var It=o((function(e,t,n){var r,i;return O(t)?i=t:(t=xe(t),r=t.slice(0,-1),t=t[t.length-1]),_t(e,(function(e){var o=i;if(!o){if(r&&r.length&&(e=ke(e,r)),null==e)return;o=e[t]}return null==o?o:o.apply(e,n)}))}));function zt(e,t){return _t(e,Pe(t))}function Vt(e,t){return Dt(e,Ee(t))}function Bt(e,t,n){var r,i,o=-1/0,a=-1/0;if(null==t||'number'==typeof t&&'object'!=typeof e[0]&&null!=e)for(var s=0,l=(e=it(e)?e:ce(e)).length;s<l;s++)null!=(r=e[s])&&r>o&&(o=r);else t=Me(t,n),Pt(e,(function(e,n,r){((i=t(e,n,r))>a||i===-1/0&&o===-1/0)&&(o=e,a=i)}));return o}function Ut(e,t,n){var r,i,o=1/0,a=1/0;if(null==t||'number'==typeof t&&'object'!=typeof e[0]&&null!=e)for(var s=0,l=(e=it(e)?e:ce(e)).length;s<l;s++)null!=(r=e[s])&&r<o&&(o=r);else t=Me(t,n),Pt(e,(function(e,n,r){((i=t(e,n,r))<a||i===1/0&&o===1/0)&&(o=e,a=i)}));return o}function Ht(e,t,n){if(null==t||n)return it(e)||(e=ce(e)),e[Fe(e.length-1)];var r=it(e)?be(e):ce(e),i=V(r);t=Math.max(Math.min(t,i),0);for(var o=i-1,a=0;a<t;a++){var s=Fe(a,o),l=r[a];r[a]=r[s],r[s]=l}return r.slice(0,t)}function Wt(e){return Ht(e,1/0)}function $t(e,t,n){var r=0;return t=Me(t,n),zt(_t(e,(function(e,n,i){return{value:e,index:r++,criteria:t(e,n,i)}})).sort((function(e,t){var n=e.criteria,r=t.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(n<r||void 0===r)return-1}return e.index-t.index})),'value')}function qt(e,t){return function(n,r,i){var o=t?[[],[]]:{};return r=Me(r,i),Pt(n,(function(t,i){var a=r(t,i,n);e(o,t,a)})),o}}var Kt=qt((function(e,t,n){P(e,n)?e[n].push(t):e[n]=[t]})),Gt=qt((function(e,t,n){e[n]=t})),Yt=qt((function(e,t,n){P(e,n)?e[n]++:e[n]=1})),Jt=qt((function(e,t,n){e[n?0:1].push(t)}),!0),Xt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function Qt(e){return e?E(e)?i["q"].call(e):d(e)?e.match(Xt):it(e)?_t(e,je):ce(e):[]}function Zt(e){return null==e?0:it(e)?e.length:U(e).length}function en(e,t,n){return t in n}var tn=o((function(e,t){var n={},r=t[0];if(null==e)return n;O(r)?(t.length>1&&(r=_e(r,t[1])),t=J(e)):(r=en,t=ot(t,!1,!1),e=Object(e));for(var i=0,o=t.length;i<o;i++){var a=t[i],s=e[a];r(s,a,e)&&(n[a]=s)}return n})),nn=o((function(e,t){var n,r=t[0];return O(r)?(r=ht(r),t.length>1&&(n=t[1])):(t=_t(ot(t,!1,!1),String),r=function(e,n){return!Ft(t,n)}),tn(e,r,n)}));function rn(e,t,n){return i["q"].call(e,0,Math.max(0,e.length-(null==t||n?1:t)))}function on(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[0]:rn(e,e.length-t)}function an(e,t,n){return i["q"].call(e,null==t||n?1:t)}function sn(e,t,n){return null==e||e.length<1?null==t||n?void 0:[]:null==t||n?e[e.length-1]:an(e,Math.max(0,e.length-t))}function ln(e){return Dt(e,Boolean)}function cn(e,t){return ot(e,t,!1)}var un=o((function(e,t){return t=ot(t,!0,!0),Dt(e,(function(e){return!Ft(t,e)}))})),fn=o((function(e,t){return un(e,t)}));function dn(e,t,n,r){c(t)||(r=n,n=t,t=!1),null!=n&&(n=Me(n,r));for(var i=[],o=[],a=0,s=V(e);a<s;a++){var l=e[a],u=n?n(l,a,e):l;t&&!n?(a&&o===u||i.push(l),o=u):n?Ft(o,u)||(o.push(u),i.push(l)):Ft(i,l)||i.push(l)}return i}var hn=o((function(e){return dn(ot(e,!0,!0))}));function pn(e){for(var t=[],n=arguments.length,r=0,i=V(e);r<i;r++){var o=e[r];if(!Ft(t,o)){var a;for(a=1;a<n&&Ft(arguments[a],o);a++);a===n&&t.push(o)}}return t}function gn(e){for(var t=e&&Bt(e,V).length||0,n=Array(t),r=0;r<t;r++)n[r]=zt(e,r);return n}var vn=o(gn);function mn(e,t){for(var n={},r=0,i=V(e);r<i;r++)t?n[e[r]]=t[r]:n[e[r][0]]=e[r][1];return n}function yn(e,t,n){null==t&&(t=e||0,e=0),n||(n=t<e?-1:1);for(var r=Math.max(Math.ceil((t-e)/n),0),i=Array(r),o=0;o<r;o++,e+=n)i[o]=e;return i}function bn(e,t){if(null==t||t<1)return[];for(var n=[],r=0,o=e.length;r<o;)n.push(i["q"].call(e,r,r+=t));return n}function wn(e,t){return e._chain?$(t).chain():t}function On(e){return Pt(de(e),(function(t){var n=$[t]=e[t];$.prototype[t]=function(){var e=[this._wrapped];return i["o"].apply(e,arguments),wn(this,n.apply($,e))}})),$}Pt(['pop','push','reverse','shift','sort','splice','unshift'],(function(e){var t=i["a"][e];$.prototype[e]=function(){var n=this._wrapped;return null!=n&&(t.apply(n,arguments),'shift'!==e&&'splice'!==e||0!==n.length||delete n[0]),wn(this,n)}})),Pt(['concat','join','slice'],(function(e){var t=i["a"][e];$.prototype[e]=function(){var e=this._wrapped;return null!=e&&(e=t.apply(e,arguments)),wn(this,e)}}));var xn=$,kn=On(r);kn._=kn;var Cn=kn},function(e,t,n){"use strict";n.r(t),function(e){n.d(t,"isDef",(function(){return l})),n.d(t,"hasWin",(function(){return c})),n.d(t,"getGlobal",(function(){return u})),n.d(t,"toLowerCase",(function(){return f})),n.d(t,"getUiClass",(function(){return p})),n.d(t,"isCommentNode",(function(){return j})),n.d(t,"isTaggableNode",(function(){return E})),n.d(t,"find",(function(){return P})),n.d(t,"escape",(function(){return _})),n.d(t,"on",(function(){return m})),n.d(t,"off",(function(){return y})),n.d(t,"hasDnd",(function(){return k})),n.d(t,"upFirst",(function(){return w})),n.d(t,"matches",(function(){return h})),n.d(t,"getModel",(function(){return T})),n.d(t,"getElRect",(function(){return A})),n.d(t,"camelCase",(function(){return O})),n.d(t,"isTextNode",(function(){return S})),n.d(t,"getKeyCode",(function(){return D})),n.d(t,"getKeyChar",(function(){return L})),n.d(t,"isEscKey",(function(){return N})),n.d(t,"isEnterKey",(function(){return R})),n.d(t,"getElement",(function(){return C})),n.d(t,"shallowDiff",(function(){return v})),n.d(t,"normalizeFloat",(function(){return x})),n.d(t,"getPointerEvent",(function(){return M})),n.d(t,"getUnitFromValue",(function(){return b})),n.d(t,"capitalize",(function(){return z})),n.d(t,"getViewEl",(function(){return U})),n.d(t,"setViewEl",(function(){return H})),n.d(t,"appendStyles",(function(){return g})),n.d(t,"isObject",(function(){return F})),n.d(t,"isEmptyObj",(function(){return I})),n.d(t,"isComponent",(function(){return V})),n.d(t,"createId",(function(){return W})),n.d(t,"isRule",(function(){return B}));var r=n(22),i=n.n(r),o=n(14),a=n.n(o),s=n(0),l=function(e){return void 0!==e},c=function(){return'undefined'!=typeof window},u=function(){return'undefined'!=typeof globalThis?globalThis:'undefined'!=typeof window?window:e},f=function(e){return(e||'').toLowerCase()},d=c()?window.Element.prototype:{},h=d.matches||d.webkitMatchesSelector||d.mozMatchesSelector||d.msMatchesSelector,p=function(e,t){var n=e.getConfig(),r=n.stylePrefix;return[n.customUI&&"".concat(r,"cui"),t].filter((function(e){return e})).join(' ')},g=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s["isArray"])(t)?a()(t):[t];if(r.length){var i=r.shift();if(i&&(!n.unique||!document.querySelector("link[href=\"".concat(i,"\"]")))){var o=document,l=o.head,c=document.createElement('link');c.href=i,c.rel='stylesheet',n.prepand?l.insertBefore(c,l.firstChild):l.appendChild(c)}e(r)}},v=function(e,t){var n={},r=Object(s["keys"])(t);for(var i in e)if(e.hasOwnProperty(i)){var o=e[i],a=t[i];r.indexOf(i)>=0?o!==a&&(n[i]=a):n[i]=null}for(var l in t)t.hasOwnProperty(l)&&Object(s["isUndefined"])(e[l])&&(n[l]=t[l]);return n},m=function(e,t,n,r){t=t.split(/\s+/),e=e instanceof Array?e:[e];for(var i=function(i){e.forEach((function(e){return e&&e.addEventListener(t[i],n,r)}))},o=0;o<t.length;++o)i(o)},y=function(e,t,n,r){t=t.split(/\s+/),e=e instanceof Array?e:[e];for(var i=function(i){e.forEach((function(e){return e&&e.removeEventListener(t[i],n,r)}))},o=0;o<t.length;++o)i(o)},b=function(e){return e.replace(parseFloat(e),'')},w=function(e){return e[0].toUpperCase()+e.toLowerCase().slice(1)},O=function(e){return e.replace(/-./g,(function(e){return e[1].toUpperCase()}))},x=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:0,r=0;if(isNaN(e))return n;if(e=parseFloat(e),Math.floor(e)!==e){var i=t.toString().split('.')[1];r=i?i.length:0}return r?parseFloat(e.toFixed(r)):e},k=function(e){return'draggable'in document.createElement('i')&&(e?e.get('Config').nativeDnD:1)},C=function(e){return Object(s["isElement"])(e)||S(e)?e:e&&e.getEl?e.getEl():void 0},S=function(e){return e&&3===e.nodeType},j=function(e){return e&&8===e.nodeType},E=function(e){return e&&!S(e)&&!j(e)},P=function(e,t){var n=null;return e.some((function(r,i){return t(r,i,e)?(n=r,1):0})),n},_=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'';return"".concat(e).replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;').replace(/"/g,'&quot;').replace(/'/g,'&#039;').replace(/`/g,'&#96;')},T=function(e,t){var n=e;return!t&&e&&e.__cashData?n=e.__cashData.model:Object(s["isElement"])(e)&&(n=t(e).data('model')),n},A=function(e){var t,n={top:0,left:0,width:0,height:0};if(!e)return n;if(S(e)){var r=document.createRange();r.selectNode(e),t=r.getBoundingClientRect(),r.detach()}return t||(e.getBoundingClientRect?e.getBoundingClientRect():n)},M=function(e){return e.touches&&e.touches[0]?e.touches[0]:e},D=function(e){return e.which||e.keyCode},L=function(e){return String.fromCharCode(D(e))},N=function(e){return 27===D(e)},R=function(e){return 13===D(e)},F=function(e){return null!==e&&!Array.isArray(e)&&'object'===i()(e)},I=function(e){return Object.keys(e).length<=0},z=function(e){return e&&e.charAt(0).toUpperCase()+e.substring(1)},V=function(e){return e&&e.toHTML},B=function(e){return e&&e.toCSS},U=function(e){return e.__gjsv},H=function(e,t){e.__gjsv=t},W=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,t='',n='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',r=n.length,i=0;i<e;i++)t+=n.charAt(Math.floor(Math.random()*r));return t}}.call(this,n(23))},function(e,t,n){"use strict";1&&(e.exports=n(239))},function(e,t){e.exports=function(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){(function(r){var i,o;!function(a){var s='object'==typeof self&&self.self===self&&self||'object'==typeof r&&r.global===r&&r;if(1)i=[n(0),n(45),t],void 0===(o=function(e,t,n){s.Backbone=function(e,t,n,r){var i=e.Backbone,o=Array.prototype.slice;t.VERSION='1.3.3',t.$=r,t.noConflict=function(){return e.Backbone=i,this},t.emulateHTTP=!1,t.emulateJSON=!1;var a=function(e,t,r){n.each(t,(function(t,i){n[i]&&(e.prototype[i]=function(e,t,r){switch(e){case 1:return function(){return n[t](this[r])};case 2:return function(e){return n[t](this[r],e)};case 3:return function(e,i){return n[t](this[r],s(e,this),i)};case 4:return function(e,i,o){return n[t](this[r],s(e,this),i,o)};default:return function(){var e=o.call(arguments);return e.unshift(this[r]),n[t].apply(n,e)}}}(t,i,r))}))},s=function(e,t){return n.isFunction(e)?e:n.isObject(e)&&!t._isModel(e)?l(e):n.isString(e)?function(t){return t.get(e)}:e},l=function(e){var t=n.matches(e);return function(e){return t(e.attributes)}},c=t.Events={},u=/\s+/,f=function(e,t,r,i,o){var a,s=0;if(r&&'object'==typeof r){void 0!==i&&'context'in o&&void 0===o.context&&(o.context=i);for(a=n.keys(r);s<a.length;s++)t=f(e,t,a[s],r[a[s]],o)}else if(r&&u.test(r))for(a=r.split(u);s<a.length;s++)t=e(t,a[s],i,o);else t=e(t,r,i,o);return t};c.on=function(e,t,n){return d(this,e,t,n)};var d=function(e,t,n,r,i){(e._events=f(h,e._events||{},t,n,{context:r,ctx:e,listening:i}),i)&&((e._listeners||(e._listeners={}))[i.id]=i);return e};c.listenTo=function(e,t,r){if(!e)return this;var i=e._listenId||(e._listenId=n.uniqueId('l')),o=this._listeningTo||(this._listeningTo={}),a=o[i];if(!a){var s=this._listenId||(this._listenId=n.uniqueId('l'));a=o[i]={obj:e,objId:i,id:s,listeningTo:o,count:0}}return d(e,t,r,this,a),this};var h=function(e,t,n,r){if(n){var i=e[t]||(e[t]=[]),o=r.context,a=r.ctx,s=r.listening;s&&s.count++,i.push({callback:n,context:o,ctx:o||a,listening:s})}return e};c.off=function(e,t,n){return this._events?(this._events=f(p,this._events,e,t,{context:n,listeners:this._listeners}),this):this},c.stopListening=function(e,t,r){var i=this._listeningTo;if(!i)return this;for(var o=e?[e._listenId]:n.keys(i),a=0;a<o.length;a++){var s=i[o[a]];if(!s)break;s.obj.off(t,r,this)}return this};var p=function(e,t,r,i){if(e){var o,a=0,s=i.context,l=i.listeners;if(t||r||s){for(var c=t?[t]:n.keys(e);a<c.length;a++){var u=e[t=c[a]];if(!u)break;for(var f=[],d=0;d<u.length;d++){var h=u[d];r&&r!==h.callback&&r!==h.callback._callback||s&&s!==h.context?f.push(h):(o=h.listening)&&0==--o.count&&(delete l[o.id],delete o.listeningTo[o.objId])}f.length?e[t]=f:delete e[t]}return e}for(var p=n.keys(l);a<p.length;a++)delete l[(o=l[p[a]]).id],delete o.listeningTo[o.objId]}};c.once=function(e,t,r){var i=f(g,{},e,t,n.bind(this.off,this));return'string'==typeof e&&null==r&&(t=void 0),this.on(i,t,r)},c.listenToOnce=function(e,t,r){var i=f(g,{},t,r,n.bind(this.stopListening,this,e));return this.listenTo(e,i)};var g=function(e,t,r,i){if(r){var o=e[t]=n.once((function(){i(t,o),r.apply(this,arguments)}));o._callback=r}return e};c.trigger=function(e){if(!this._events)return this;for(var t=Math.max(0,arguments.length-1),n=Array(t),r=0;r<t;r++)n[r]=arguments[r+1];return f(v,this._events,e,void 0,n),this};var v=function(e,t,n,r){if(e){var i=e[t],o=e.all;i&&o&&(o=o.slice()),i&&m(i,r),o&&m(o,[t].concat(r))}return e},m=function(e,t){var n,r=-1,i=e.length,o=t[0],a=t[1],s=t[2];switch(t.length){case 0:for(;++r<i;)(n=e[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a);return;case 3:for(;++r<i;)(n=e[r]).callback.call(n.ctx,o,a,s);return;default:for(;++r<i;)(n=e[r]).callback.apply(n.ctx,t);return}};c.bind=c.on,c.unbind=c.off,n.extend(t,c);var y=t.Model=function(e,t){var r=e||{};t||(t={}),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},t.collection&&(this.collection=t.collection),t.parse&&(r=this.parse(r,t)||{});var i=n.result(this,'defaults');r=n.defaults(n.extend({},i,r),i),this.set(r,t),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,c,{changed:null,validationError:null,idAttribute:'id',cidPrefix:'c',initialize:function(){},toJSON:function(e){return n.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(e){return this.attributes[e]},escape:function(e){return n.escape(this.get(e))},has:function(e){return null!=this.get(e)},matches:function(e){return!!n.iteratee(e,this)(this.attributes)},set:function(e,t,r){if(null==e)return this;var i;if('object'==typeof e?(i=e,r=t):(i={})[e]=t,r||(r={}),!this._validate(i,r))return!1;var o=r.unset,a=r.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,f=this._previousAttributes;for(var d in i)t=i[d],n.isEqual(c[d],t)||s.push(d),n.isEqual(f[d],t)?delete u[d]:u[d]=t,o?delete c[d]:c[d]=t;if(this.idAttribute in i&&(this.id=this.get(this.idAttribute)),!a){s.length&&(this._pending=r);for(var h=0;h<s.length;h++)this.trigger('change:'+s[h],this,c[s[h]],r)}if(l)return this;if(!a)for(;this._pending;)r=this._pending,this._pending=!1,this.trigger('change',this,r);return this._pending=!1,this._changing=!1,this},unset:function(e,t){return this.set(e,void 0,n.extend({},t,{unset:!0}))},clear:function(e){var t={};for(var r in this.attributes)t[r]=void 0;return this.set(t,n.extend({},e,{unset:!0}))},hasChanged:function(e){return null==e?!n.isEmpty(this.changed):n.has(this.changed,e)},changedAttributes:function(e){if(!e)return!!this.hasChanged()&&n.clone(this.changed);var t=this._changing?this._previousAttributes:this.attributes,r={};for(var i in e){var o=e[i];n.isEqual(t[i],o)||(r[i]=o)}return!!n.size(r)&&r},previous:function(e){return null!=e&&this._previousAttributes?this._previousAttributes[e]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(e){e=n.extend({parse:!0},e);var t=this,r=e.success;return e.success=function(n){var i=e.parse?t.parse(n,e):n;if(!t.set(i,e))return!1;r&&r.call(e.context,t,n,e),t.trigger('sync',t,n,e)},F(this,e),this.sync('read',this,e)},save:function(e,t,r){var i;null==e||'object'==typeof e?(i=e,r=t):(i={})[e]=t;var o=(r=n.extend({validate:!0,parse:!0},r)).wait;if(i&&!o){if(!this.set(i,r))return!1}else if(!this._validate(i,r))return!1;var a=this,s=r.success,l=this.attributes;r.success=function(e){a.attributes=l;var t=r.parse?a.parse(e,r):e;if(o&&(t=n.extend({},i,t)),t&&!a.set(t,r))return!1;s&&s.call(r.context,a,e,r),a.trigger('sync',a,e,r)},F(this,r),i&&o&&(this.attributes=n.extend({},l,i));var c=this.isNew()?'create':r.patch?'patch':'update';'patch'!==c||r.attrs||(r.attrs=i);var u=this.sync(c,this,r);return this.attributes=l,u},destroy:function(e){e=e?n.clone(e):{};var t=this,r=e.success,i=e.wait,o=function(){t.stopListening(),t.trigger('destroy',t,t.collection,e)};e.success=function(n){i&&o(),r&&r.call(e.context,t,n,e),t.isNew()||t.trigger('sync',t,n,e)};var a=!1;return this.isNew()?n.defer(e.success):(F(this,e),a=this.sync('delete',this,e)),i||o(),a},url:function(){var e=n.result(this,'urlRoot')||n.result(this.collection,'url')||R();if(this.isNew())return e;var t=this.get(this.idAttribute);return e.replace(/[^\/]$/,'$&/')+encodeURIComponent(t)},parse:function(e,t){return e},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(e){return this._validate({},n.extend({},e,{validate:!0}))},_validate:function(e,t){if(!t.validate||!this.validate)return!0;e=n.extend({},this.attributes,e);var r=this.validationError=this.validate(e,t)||null;return!r||(this.trigger('invalid',this,r,n.extend(t,{validationError:r})),!1)}}),a(y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},'attributes');var b=t.Collection=function(e,t){t||(t={}),t.model&&(this.model=t.model),void 0!==t.comparator&&(this.comparator=t.comparator),this._reset(),this.initialize.apply(this,arguments),e&&this.reset(e,n.extend({silent:!0},t))},w={add:!0,remove:!0,merge:!0},O={add:!0,remove:!1},x=function(e,t,n){n=Math.min(Math.max(n,0),e.length);var r,i=Array(e.length-n),o=t.length;for(r=0;r<i.length;r++)i[r]=e[r+n];for(r=0;r<o;r++)e[r+n]=t[r];for(r=0;r<i.length;r++)e[r+o+n]=i[r]};n.extend(b.prototype,c,{model:y,initialize:function(){},toJSON:function(e){return this.map((function(t){return t.toJSON(e)}))},sync:function(){return t.sync.apply(this,arguments)},add:function(e,t){return this.set(e,n.extend({merge:!1},t,O))},remove:function(e,t){t=n.extend({},t);var r=!n.isArray(e);e=r?[e]:e.slice();var i=this._removeModels(e,t);return!t.silent&&i.length&&(t.changes={added:[],merged:[],removed:i},this.trigger('update',this,t)),r?i[0]:i},set:function(e,t){if(null!=e){(t=n.extend({},w,t)).parse&&!this._isModel(e)&&(e=this.parse(e,t)||[]);var r=!n.isArray(e);e=r?[e]:e.slice();var i=t.at;null!=i&&(i=+i),i>this.length&&(i=this.length),i<0&&(i+=this.length+1);var o,a,s=[],l=[],c=[],u=[],f={},d=t.add,h=t.merge,p=t.remove,g=!1,v=this.comparator&&null==i&&!1!==t.sort,m=n.isString(this.comparator)?this.comparator:null;for(a=0;a<e.length;a++){o=e[a];var y=this.get(o);if(y){if(h&&o!==y){var b=this._isModel(o)?o.attributes:o;t.parse&&(b=y.parse(b,t)),y.set(b,t),c.push(y),v&&!g&&(g=y.hasChanged(m))}f[y.cid]||(f[y.cid]=!0,s.push(y)),e[a]=y}else d&&(o=e[a]=this._prepareModel(o,t))&&(l.push(o),this._addReference(o,t),f[o.cid]=!0,s.push(o))}if(p){for(a=0;a<this.length;a++)f[(o=this.models[a]).cid]||u.push(o);u.length&&this._removeModels(u,t)}var O=!1,k=!v&&d&&p;if(s.length&&k?(O=this.length!==s.length||n.some(this.models,(function(e,t){return e!==s[t]})),this.models.length=0,x(this.models,s,0),this.length=this.models.length):l.length&&(v&&(g=!0),x(this.models,l,null==i?this.length:i),this.length=this.models.length),g&&this.sort({silent:!0}),!t.silent){for(a=0;a<l.length;a++)null!=i&&(t.index=i+a),(o=l[a]).trigger('add',o,this,t);(g||O)&&this.trigger('sort',this,t),(l.length||u.length||c.length)&&(t.changes={added:l,removed:u,merged:c},this.trigger('update',this,t))}return r?e[0]:e}},reset:function(e,t){t=t?n.clone(t):{};for(var r=0;r<this.models.length;r++)this._removeReference(this.models[r],t);return t.previousModels=this.models,this._reset(),e=this.add(e,n.extend({silent:!0},t)),t.silent||this.trigger('reset',this,t),e},push:function(e,t){return this.add(e,n.extend({at:this.length},t))},pop:function(e){var t=this.at(this.length-1);return this.remove(t,e)},unshift:function(e,t){return this.add(e,n.extend({at:0},t))},shift:function(e){var t=this.at(0);return this.remove(t,e)},slice:function(){return o.apply(this.models,arguments)},get:function(e){if(null!=e)return this._byId[e]||this._byId[this.modelId(e.attributes||e)]||e.cid&&this._byId[e.cid]},has:function(e){return null!=this.get(e)},at:function(e){return e<0&&(e+=this.length),this.models[e]},where:function(e,t){return this[t?'find':'filter'](e)},findWhere:function(e){return this.where(e,!0)},sort:function(e){var t=this.comparator;if(!t)throw new Error('Cannot sort a set without a comparator');e||(e={});var r=t.length;return n.isFunction(t)&&(t=n.bind(t,this)),1===r||n.isString(t)?this.models=this.sortBy(t):this.models.sort(t),e.silent||this.trigger('sort',this,e),this},pluck:function(e){return this.map(e+'')},fetch:function(e){var t=(e=n.extend({parse:!0},e)).success,r=this;return e.success=function(n){var i=e.reset?'reset':'set';r[i](n,e),t&&t.call(e.context,r,n,e),r.trigger('sync',r,n,e)},F(this,e),this.sync('read',this,e)},create:function(e,t){var r=(t=t?n.clone(t):{}).wait;if(!(e=this._prepareModel(e,t)))return!1;r||this.add(e,t);var i=this,o=t.success;return t.success=function(e,t,n){r&&i.add(e,n),o&&o.call(n.context,e,t,n)},e.save(null,t),e},parse:function(e,t){return e},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(e){return e[this.model.prototype.idAttribute||'id']},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(e,t){if(this._isModel(e))return e.collection||(e.collection=this),e;(t=t?n.clone(t):{}).collection=this;var r=new this.model(e,t);return r.validationError?(this.trigger('invalid',this,r.validationError,t),!1):r},_removeModels:function(e,t){for(var n=[],r=0;r<e.length;r++){var i=this.get(e[r]);if(i){var o=this.indexOf(i);this.models.splice(o,1),this.length--,delete this._byId[i.cid];var a=this.modelId(i.attributes);null!=a&&delete this._byId[a],t.silent||(t.index=o,i.trigger('remove',i,this,t)),n.push(i),this._removeReference(i,t)}}return n},_isModel:function(e){return e instanceof y},_addReference:function(e,t){this._byId[e.cid]=e;var n=this.modelId(e.attributes);null!=n&&(this._byId[n]=e),e.on('all',this._onModelEvent,this)},_removeReference:function(e,t){delete this._byId[e.cid];var n=this.modelId(e.attributes);null!=n&&delete this._byId[n],this===e.collection&&delete e.collection,e.off('all',this._onModelEvent,this)},_onModelEvent:function(e,t,n,r){if(t){if(('add'===e||'remove'===e)&&n!==this)return;if('destroy'===e&&this.remove(t,r),'change'===e){var i=this.modelId(t.previousAttributes()),o=this.modelId(t.attributes);i!==o&&(null!=i&&delete this._byId[i],null!=o&&(this._byId[o]=t))}}this.trigger.apply(this,arguments)}}),a(b,{forEach:3,each:3,map:3,collect:3,reduce:0,foldl:0,inject:0,reduceRight:0,foldr:0,find:3,detect:3,filter:3,select:3,reject:3,every:3,all:3,some:3,any:3,include:3,includes:3,contains:3,invoke:0,max:3,min:3,toArray:1,size:1,first:3,head:3,take:3,initial:3,rest:3,tail:3,drop:3,last:3,without:0,difference:0,indexOf:3,shuffle:1,lastIndexOf:3,isEmpty:1,chain:1,sample:3,partition:3,groupBy:3,countBy:3,sortBy:3,indexBy:3,findIndex:3,findLastIndex:3},'models');var k=t.View=function(e){this.cid=n.uniqueId('view'),n.extend(this,n.pick(e,S)),this._ensureElement(),this.initialize.apply(this,arguments)},C=/^(\S+)\s*(.*)$/,S=['model','collection','el','id','attributes','className','tagName','events'];n.extend(k.prototype,c,{tagName:'div',$:function(e){return this.$el.find(e)},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(e){return this.undelegateEvents(),this._setElement(e),this.delegateEvents(),this},_setElement:function(e){this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0]},delegateEvents:function(e){if(e||(e=n.result(this,'events')),!e)return this;for(var t in this.undelegateEvents(),e){var r=e[t];if(n.isFunction(r)||(r=this[r]),r){var i=t.match(C);this.delegate(i[1],i[2],n.bind(r,this))}}return this},delegate:function(e,t,n){return this.$el.on(e+'.delegateEvents'+this.cid,t,n),this},undelegateEvents:function(){return this.$el&&this.$el.off('.delegateEvents'+this.cid),this},undelegate:function(e,t,n){return this.$el.off(e+'.delegateEvents'+this.cid,t,n),this},_createElement:function(e){return document.createElement(e)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,'el'));else{var e=n.extend({},n.result(this,'attributes'));this.id&&(e.id=n.result(this,'id')),this.className&&(e['class']=n.result(this,'className')),this.setElement(this._createElement(n.result(this,'tagName'))),this._setAttributes(e)}},_setAttributes:function(e){this.$el.attr(e)}}),t.sync=function(e,r,i){var o=j[e];n.defaults(i||(i={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var a={type:o,dataType:'json'};if(i.url||(a.url=n.result(r,'url')||R()),null!=i.data||!r||'create'!==e&&'update'!==e&&'patch'!==e||(a.contentType='application/json',a.data=JSON.stringify(i.attrs||r.toJSON(i))),i.emulateJSON&&(a.contentType='application/x-www-form-urlencoded',a.data=a.data?{model:a.data}:{}),i.emulateHTTP&&('PUT'===o||'DELETE'===o||'PATCH'===o)){a.type='POST',i.emulateJSON&&(a.data._method=o);var s=i.beforeSend;i.beforeSend=function(e){if(e.setRequestHeader('X-HTTP-Method-Override',o),s)return s.apply(this,arguments)}}'GET'===a.type||i.emulateJSON||(a.processData=!1);var l=i.error;i.error=function(e,t,n){i.textStatus=t,i.errorThrown=n,l&&l.call(i.context,e,t,n)};var c=i.xhr=t.ajax(n.extend(a,i));return r.trigger('request',r,c,i),c};var j={create:'POST',update:'PUT',patch:'PATCH',delete:'DELETE',read:'GET'};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var E=t.Router=function(e){e||(e={}),e.routes&&(this.routes=e.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},P=/\((.*?)\)/g,_=/(\(\?)?:\w+/g,T=/\*\w+/g,A=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(E.prototype,c,{initialize:function(){},route:function(e,r,i){n.isRegExp(e)||(e=this._routeToRegExp(e)),n.isFunction(r)&&(i=r,r=''),i||(i=this[r]);var o=this;return t.history.route(e,(function(n){var a=o._extractParameters(e,n);!1!==o.execute(i,a,r)&&(o.trigger.apply(o,['route:'+r].concat(a)),o.trigger('route',r,a),t.history.trigger('route',o,r,a))})),this},execute:function(e,t,n){e&&e.apply(this,t)},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,'routes');for(var e,t=n.keys(this.routes);null!=(e=t.pop());)this.route(e,this.routes[e])}},_routeToRegExp:function(e){return e=e.replace(A,'\\$&').replace(P,'(?:$1)?').replace(_,(function(e,t){return t?e:'([^/?]+)'})).replace(T,'([^?]*?)'),new RegExp('^'+e+'(?:\\?([\\s\\S]*))?$')},_extractParameters:function(e,t){var r=e.exec(t).slice(1);return n.map(r,(function(e,t){return t===r.length-1?e||null:e?decodeURIComponent(e):null}))}});var M=t.History=function(){this.handlers=[],this.checkUrl=n.bind(this.checkUrl,this),'undefined'!=typeof window&&(this.location=window.location,this.history=window.history)},D=/^[#\/]|\s+$/g,L=/^\/+|\/+$/g,N=/#.*$/;M.started=!1,n.extend(M.prototype,c,{interval:50,atRoot:function(){return this.location.pathname.replace(/[^\/]$/,'$&/')===this.root&&!this.getSearch()},matchRoot:function(){return this.decodeFragment(this.location.pathname).slice(0,this.root.length-1)+'/'===this.root},decodeFragment:function(e){return decodeURI(e.replace(/%25/g,'%2525'))},getSearch:function(){var e=this.location.href.replace(/#.*/,'').match(/\?.+/);return e?e[0]:''},getHash:function(e){var t=(e||this).location.href.match(/#(.*)$/);return t?t[1]:''},getPath:function(){var e=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return'/'===e.charAt(0)?e.slice(1):e},getFragment:function(e){return null==e&&(e=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),e.replace(D,'')},start:function(e){if(M.started)throw new Error('Backbone.history has already been started');if(M.started=!0,this.options=n.extend({root:'/'},this.options,e),this.root=this.options.root,this._wantsHashChange=!1!==this.options.hashChange,this._hasHashChange='onhashchange'in window&&(void 0===document.documentMode||document.documentMode>7),this._useHashChange=this._wantsHashChange&&this._hasHashChange,this._wantsPushState=!!this.options.pushState,this._hasPushState=!(!this.history||!this.history.pushState),this._usePushState=this._wantsPushState&&this._hasPushState,this.fragment=this.getFragment(),this.root=('/'+this.root+'/').replace(L,'/'),this._wantsHashChange&&this._wantsPushState){if(!this._hasPushState&&!this.atRoot()){var t=this.root.slice(0,-1)||'/';return this.location.replace(t+'#'+this.getPath()),!0}this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0})}if(!this._hasHashChange&&this._wantsHashChange&&!this._usePushState){this.iframe=document.createElement('iframe'),this.iframe.src='javascript:0',this.iframe.style.display='none',this.iframe.tabIndex=-1;var r=document.body,i=r.insertBefore(this.iframe,r.firstChild).contentWindow;i.document.open(),i.document.close(),i.location.hash='#'+this.fragment}var o=window.addEventListener||function(e,t){return attachEvent('on'+e,t)};if(this._usePushState?o('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe?o('hashchange',this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var e=window.removeEventListener||function(e,t){return detachEvent('on'+e,t)};this._usePushState?e('popstate',this.checkUrl,!1):this._useHashChange&&!this.iframe&&e('hashchange',this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),M.started=!1},route:function(e,t){this.handlers.unshift({route:e,callback:t})},checkUrl:function(e){var t=this.getFragment();if(t===this.fragment&&this.iframe&&(t=this.getHash(this.iframe.contentWindow)),t===this.fragment)return!1;this.iframe&&this.navigate(t),this.loadUrl()},loadUrl:function(e){return!!this.matchRoot()&&(e=this.fragment=this.getFragment(e),n.some(this.handlers,(function(t){if(t.route.test(e))return t.callback(e),!0})))},navigate:function(e,t){if(!M.started)return!1;t&&!0!==t||(t={trigger:!!t}),e=this.getFragment(e||'');var n=this.root;''!==e&&'?'!==e.charAt(0)||(n=n.slice(0,-1)||'/');var r=n+e;if(e=this.decodeFragment(e.replace(N,'')),this.fragment!==e){if(this.fragment=e,this._usePushState)this.history[t.replace?'replaceState':'pushState']({},document.title,r);else{if(!this._wantsHashChange)return this.location.assign(r);if(this._updateHash(this.location,e,t.replace),this.iframe&&e!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;t.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,e,t.replace)}}return t.trigger?this.loadUrl(e):void 0}},_updateHash:function(e,t,n){if(n){var r=e.href.replace(/(javascript:|#).*$/,'');e.replace(r+'#'+t)}else e.hash='#'+t}}),t.history=new M;y.extend=b.extend=E.extend=k.extend=M.extend=function(e,t){var r,i=this;return r=e&&n.has(e,'constructor')?e.constructor:function(){return i.apply(this,arguments)},n.extend(r,i,t),r.prototype=n.create(i.prototype,e),r.prototype.constructor=r,r.__super__=i.prototype,r};var R=function(){throw new Error('A "url" property or function must be specified')},F=function(e,t){var n=t.error;t.error=function(r){n&&n.call(t.context,e,r,t),e.trigger('error',e,r,t)}};return t}(s,n,e,t)}.apply(t,i))||(e.exports=o);else;}()}).call(this,n(23))},function(e,t){function n(t){return e.exports=n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";n.d(t,"i",(function(){return j})),n.d(t,"f",(function(){return _})),n.d(t,"d",(function(){return A})),n.d(t,"c",(function(){return M})),n.d(t,"e",(function(){return H})),n.d(t,"g",(function(){return $})),n.d(t,"h",(function(){return Y})),n.d(t,"b",(function(){return X})),n.d(t,"a",(function(){return Q}));var r=n(56),i=n.n(r),o=n(46),a=n.n(o),s=n(156),l=n.n(s),c=n(157),u=n.n(c),f=n(26),d=(n(51),n(40)),h=n.n(d),p=n(53),g=n.n(p),v=n(57),m=n(32),y=n(3),b=n.n(y);n(0);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var O,x,k=function(e){var t=f["myEditor"].getModel().get('DomComponents').getById(e.id);if(t&&(e.rteEnabled||e.opts.force)){var n=e.content,r=t.components(),i=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){b()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({fromDisable:1},e.opts);t.set('content','',i),e.rteCustomRte?(r.length&&r.reset(null,e.opts),t.set('content',n,i)):r.resetFromString(n,e.opts)}},C=null,S='',j='',E='',P=[],_=!1,T='',A={Synced:1,AwaitingACK:2,AwaitingWithBuffer:3,ApplyingRemoteOp:4,ApplyingLocalOp:5,ApplyingRemoteOpWithoutACK:6,ApplyingBufferedLocalOp:7,CreatingLocalOpFromBuffer:8,ApplyingRemoteOpWithBuffer:9,SendingOpToController:10,EditorInitializing:11},M=A.EditorInitializing,D=0,L=null,N=null,R=0,F=null,I=null,z=new Array,V=new Array,B=null,U=null,H=function(e,t,n,r,i){if(S=t,E=e,j=n,O=r,x=i,M=A.EditorInitializing,D=0,C)B=C.subscribe("/topic/public/".concat(E),K),U=C.subscribe("/user/".concat(S,"/msg"),K),C.send("/app/chat.register/".concat(E),{},JSON.stringify({senderName:j,senderEmail:S,type:'JOIN',noteId:E})),_=!0;else{var o=new u.a("".concat(x,"websocket"));(C=l.a.over(o)).connect({},W,q)}},W=function(){B=C.subscribe("/topic/public/".concat(E),K),U=C.subscribe("/user/".concat(S,"/msg"),K),C.send("/app/chat.register/".concat(E),{},JSON.stringify({senderName:j,senderEmail:S,type:'JOIN',noteId:E})),_=!0},$=function(){B.unsubscribe(),U.unsubscribe(),C.send("/app/chat.send/".concat(E),{},JSON.stringify({senderName:j,senderEmail:S,type:'LEAVE',noteId:E})),_=!1},q=function(){console.log('Error!!')},K=function(){var e=i()(a.a.mark((function e(t){var n,r,i,o,s,l,c,u,d,p,y,b,w,k,_,L,N;return a.a.wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:if('JOIN'!==(n=h.a.parse(t.body)).type){e.next=5;break}n.senderEmail===S?(T=n.sessionId,r=n.queue,P=r.split(' '),O(P),1==parseInt(n.op)&&(M=A.Synced,console.log('state: Synced'))):(i=n.queue,o=new v["a"](document.cookie),s="".concat(x,"note/saveTempCollaborationNote/"),P=i.split(' '),O(P),P[0]==S&&(l=f["myEditor"].getWrapper(),c=f["myEditor"].getComponents(),u=f["myEditor"].getStyle(),Object(m["d"])(c),Object(m["a"])(c),d=l.get('attributes').id,p={action:'copy-wrapper'},y={components:c,style:u,id:d},g.a.put(s+"".concat(E),y,{headers:{Authorization:'Bearer '+o.getCookieByName('token')}}).then((function(e){var t={senderName:j,senderEmail:S,sessionId:T,type:'COPY',ts:D,op:h.a.stringify(p),newcomer:n.senderEmail,noteId:E};C.send("/app/chat.send/".concat(E),{},h.a.stringify(t)),console.log('state: '+M)})).catch((function(e){console.log('error!!!!',e)})))),e.next=57;break;case 5:if('COPY'!==n.type){e.next=9;break}M==A.EditorInitializing&&(b=h.a.parse(n.op),w=n.ts,k=new v["a"](document.cookie),_="".concat(x,"note/loadTempCollaborationNote/"),D=w,'copy-wrapper'==b.action&&g.a.get(_+"".concat(E),{headers:{Authorization:'Bearer '+k.getCookieByName('token')}}).then((function(e){var t=e.data.res;for(f["myEditor"].getWrapper().set('attributes',{id:t.id}),f["myEditor"].setComponents(t.components),f["myEditor"].setStyle(t.style);0!=V.length;){var n=V.shift();n.ts>D&&(b=h.a.parse(n.op),G(b.action,b.opts))}var r=f["myEditor"].getComponents();Object(m["f"])(r),M=A.Synced,console.log('state: Synced')})).catch((function(e){console.log('error!!!!',e)}))),e.next=57;break;case 9:if('LEAVE'!==n.type){e.next=18;break}L=f["myEditor"].getComponents(),console.log('leaver',n.senderEmail),Object(m["g"])(L,n.senderName),N=n.queue,P=N.split(' '),O(P),e.next=57;break;case 18:if('ACK'!==n.type){e.next=34;break}if(M!=A.AwaitingACK){e.next=24;break}M=A.Synced,console.log('state: Synced'),e.next=32;break;case 24:if(M!=A.AwaitingWithBuffer){e.next=31;break}return M=A.CreatingLocalOpFromBuffer,console.log('state: CreatingLocalOpFromBuffer'),e.next=29,Z();case 29:e.next=32;break;case 31:M!=A.AwaitingACK&&M!=A.AwaitingWithBuffer&&M!=A.EditorInitializing&&M!=A.Synced&&K(t);case 32:e.next=57;break;case 34:if('OP'!==n.type){e.next=57;break}if(M!=A.Synced){e.next=42;break}return M=A.ApplyingRemoteOp,console.log('state: ApplyingRemoteOp'),e.next=40,ee(n);case 40:e.next=57;break;case 42:if(M!=A.AwaitingACK){e.next=49;break}return M=A.ApplyingRemoteOpWithoutACK,console.log('state: ApplyingRemoteOpWithoutACK'),e.next=47,te(n);case 47:e.next=57;break;case 49:if(M!=A.AwaitingWithBuffer){e.next=56;break}return M=A.ApplyingRemoteOpWithBuffer,console.log('state: ApplyingRemoteOpWithBuffer'),e.next=54,ne(n);case 54:e.next=57;break;case 56:M==A.EditorInitializing?V.push(n):M!=A.Synced&&M!=A.AwaitingACK&&M!=A.AwaitingWithBuffer&&M!=A.EditorInitializing&&K(t);case 57:case"end":return e.stop()}}),e)})));return function(t){return e.apply(this,arguments)}}(),G=function(e,t){var n=f["myEditor"].getModel().getCurrentFrame().droppable;if('delete-component'===e)!function(e,t){var n=[],r=e.getModel().get('DomComponents').getById(t.id);r&&r.get('removable')?(r.remove(),r.collection&&n.push(r),n.length&&e.select(n)):e.getModel().logWarning('The element is not removable',{component:r})}(f["myEditor"].getModel().getEditor(),t);else if('add-component'===e){if(!t.dropContent)return;n.applyAppendOrMoveComponent(t,'add-component');var r=f["myEditor"].getComponents();Object(m["d"])(r)}else'move-component'===e?n.applyAppendOrMoveComponent(t,'move-component'):'select-component'===e?function(e){var t=f["myEditor"].getModel().get('DomComponents').getById(e.id);t&&(t.set('status','freezed-remote-selected'),t.set('chooser',e.username))}(t):'unselect-component'===e?function(e){var t=f["myEditor"].getModel().get('DomComponents').getById(e.id);t&&(t.set('status',''),t.set('chooser',''))}(t):'copy-component'===e||('update-content'===e?k(t):'update-trait'===e?function(e){var t=f["myEditor"].getModel().get('DomComponents').getById(e.id);if(t){var n=t.getTraits()[e.traitIndex];n.set('value',e.value);for(var r=n.get('options').map((function(e){return e.value})),i=0;i<r.length;i++)if(r[i].length>0)for(var o=r[i].split(' '),a=0;a<o.length;a++)o[a].length>0&&t.removeClass(o[a]);var s=n.get('value');if(delete t.attributes.attributes[''],s.length>0&&'text-black'!==s)for(var l=s.split(' '),c=0;c<l.length;c++)t.addClass(l[c]);t.em.trigger('component:toggled')}}(t):'update-style'===e?f["myEditor"].getModel().get('StyleManager').applyUpdateStyle(t):'set-image-src'===e&&function(e){var t=f["myEditor"].getModel().get('DomComponents').getById(e.id),n=e.src;t.set({src:n})}(t))},Y=function(e){M=e},J=function(){var e={senderName:j,senderEmail:S,sessionId:T,type:'OP',ts:D,op:h.a.stringify(L),noteId:E};C.send("/app/chat.send/".concat(E),{},h.a.stringify(e)),z.length<=0?(M=A.AwaitingACK,console.log('state: AwaitingACK')):(M=A.AwaitingWithBuffer,console.log('state: AwaitingWithBuffer'))},X=function(e){e.username=j,L=e,D+=1,M=A.SendingOpToController,console.log('state: SendingOpToController'),J()},Q=function(e){e.username=j,z.push(e),M=A.AwaitingWithBuffer,console.log('state: AwaitingWithBuffer')},Z=function(){D+=1,L=z[0],z.shift(),M=A.SendingOpToController,console.log('state: SendingOpToController'),J()},ee=function(e){N=h.a.parse(e.op),R=e.ts,D=R,G(N.action,N.opts),M=A.Synced,console.log('state: Synced')},te=function(e){D=e.ts,D+=1,R=e.ts,N=h.a.parse(e.op),I=re(N,L),F=re(L,N),G(I.action,I.opts),L=F,M=A.SendingOpToController,console.log('state: SendingOpToController'),J()},ne=function(e){N=h.a.parse(e.op),R=e.ts;var t=new Array;D=R,D+=1,t[0]=re(N,L);for(var n=0;n<z.length;n++)t[n+1]=re(t[n],z[n]);G(t[t.length-1].action,t[t.length-1].opts),F=re(L,N),L=F;for(var r=0;r<z.length;r++)z[r]=re(z[r],t[r]);M=A.SendingOpToController,console.log('state: SendingOpToController'),J()},re=function(e,t){var n=e.action,r=t.action;return'add-component'===n?'delete-component'===r?function(e,t){console.log('TAD');var n=t.opts.parentId,r=t.opts.index,i=e.opts.dstId,o=e.opts.pos;n===i&&(('after'===o.method?o.indexEl+1:o.indexEl)>r&&(e.opts.pos.indexEl-=1));return e}(e,t):'move-component'===r?function(e,t){console.log('TAM');var n=t.opts.dstId,r=t.opts.pos,i='after'===r.method?r.indexEl+1:r.indexEl,o=t.opts.srcParentId,a=t.opts.srcIndex,s=e.opts.dstId,l=e.opts.pos,c='after'===l.method?l.indexEl+1:l.indexEl;return s===o&&c>a&&(e.opts.pos.indexEl-=1),n===s&&c>i&&(e.opts.pos.indexEl+=1),e}(e,t):'add-component'===r?function(e,t){console.log('TAA');var n=t.opts.dstId,r=t.opts.pos,i=e.opts.dstId,o=e.opts.pos;if(n==i){var a='after'===r.method?r.indexEl+1:r.indexEl,s='after'===o.method?o.indexEl+1:o.indexEl;(s>a||s==a&&e.username>t.username)&&(e.opts.pos.indexEl+=1)}return e}(e,t):e:'move-component'===n?'delete-component'===r?function(e,t){console.log('TMD');var n=t.opts.parentId,r=t.opts.index,i=e.opts.dstId,o=e.opts.pos;n==i&&(('after'===o.method?o.indexEl+1:o.indexEl)>r&&(e.opts.pos.indexEl-=1));return e}(e,t):'move-component'===r?function(e,t){console.log('TMM');var n=t.opts.dstId,r=t.opts.pos,i='after'===r.method?r.indexEl+1:r.indexEl,o=t.opts.srcParentId,a=t.opts.srcIndex,s=e.opts.dstId,l=e.opts.pos,c='after'===l.method?l.indexEl+1:l.indexEl;return s===o&&c>a&&(e.opts.pos.indexEl-=1),n===s&&(c>i||c==i&&e.username>t.username)&&(e.opts.pos.indexEl+=1),e}(e,t):'add-component'===r?function(e,t){console.log('TMA');var n=t.opts.dstId,r=t.opts.pos,i='after'===r.method?r.indexEl+1:r.indexEl,o=e.opts.dstId,a=e.opts.pos,s='after'===a.method?a.indexEl+1:a.indexEl;return n===o&&s>=i&&(e.opts.pos.indexEl+=1),e}(e,t):e:e}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(19);function i(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function o(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?i(Object(n),!0).forEach((function(t){Object(r["a"])(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}},function(e,t){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){function n(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}e.exports=function(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){var r=n(231);e.exports=function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){var r=n(22)["default"],i=n(232);e.exports=function(e,t){if(t&&("object"===r(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return i(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";(function(e){n.d(t,"e",(function(){return r})),n.d(t,"p",(function(){return i})),n.d(t,"a",(function(){return o})),n.d(t,"c",(function(){return a})),n.d(t,"d",(function(){return s})),n.d(t,"o",(function(){return l})),n.d(t,"q",(function(){return c})),n.d(t,"t",(function(){return u})),n.d(t,"i",(function(){return f})),n.d(t,"r",(function(){return d})),n.d(t,"s",(function(){return h})),n.d(t,"k",(function(){return p})),n.d(t,"m",(function(){return g})),n.d(t,"j",(function(){return v})),n.d(t,"l",(function(){return m})),n.d(t,"g",(function(){return y})),n.d(t,"f",(function(){return b})),n.d(t,"h",(function(){return w})),n.d(t,"n",(function(){return O})),n.d(t,"b",(function(){return x}));var r='1.13.1',i='object'==typeof self&&self.self===self&&self||'object'==typeof e&&e.global===e&&e||Function('return this')()||{},o=Array.prototype,a=Object.prototype,s='undefined'!=typeof Symbol?Symbol.prototype:null,l=o.push,c=o.slice,u=a.toString,f=a.hasOwnProperty,d='undefined'!=typeof ArrayBuffer,h='undefined'!=typeof DataView,p=Array.isArray,g=Object.keys,v=Object.create,m=d&&ArrayBuffer.isView,y=isNaN,b=isFinite,w=!{toString:null}.propertyIsEnumerable('toString'),O=['valueOf','isPrototypeOf','toString','propertyIsEnumerable','hasOwnProperty','toLocaleString'],x=Math.pow(2,53)-1}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"b",(function(){return z})),n.d(t,"c",(function(){return H})),n.d(t,"d",(function(){return W})),n.d(t,"a",(function(){return $}));var r=n(22),i=n.n(r),o=n(14),a=n.n(o),s=n(62),l=n.n(s),c=n(3),u=n.n(c),f=n(8),d=n.n(f),h=n(9),p=n.n(h),g=n(10),v=n.n(g),m=n(11),y=n.n(m),b=n(5),w=n.n(b),O=n(0),x=n(1),k=n(67),C=n(4),S=n.n(C),j=n(32),E=n(36),P=n(44);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A,M=S.a.Model.extend({defaults:{type:'text',label:'',name:'',min:'',max:'',unit:'',step:1,value:'',target:'',default:'',placeholder:'',changeProp:0,options:[]},initialize:function(){var e=this.get('target'),t=this.get('name'),n=this.get('changeProp');if(!this.get('id')&&this.set('id',t),e){this.target=e,this.unset('target');var r=n?"change:".concat(t):"change:attributes:".concat(t);this.listenTo(e,r,this.targetUpdated)}},props:function(){return this.attributes},targetUpdated:function(){var e=this.getTargetValue();this.set({value:e},{fromTarget:1})},getValue:function(){return this.getTargetValue()},getTargetValue:function(){var e,t=this.get('name'),n=this.target;return e=this.get('changeProp')?n.get(t):n.getAttributes()[t],Object(O["isUndefined"])(e)?'':e},setTargetValue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.target,r=this.get('name');if(!Object(O["isUndefined"])(e)){var i=e;if('false'===e?i=!1:'true'===e&&(i=!0),this.get('changeProp'))n.set(r,i,t);else{var o=T({},n.get('attributes'));o[r]=i,n.set('attributes',o,t)}}},setValueFromInput:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={value:e};this.set(r,T(T({},n),{},{avoidStore:1})),t&&(this.set('value','',n),this.set(r,n))},getInitValue:function(){var e,t=this.target,n=this.get('name');if(t){var r=t.get('attributes');e=this.get('changeProp')?t.get(n):r[n]}return e||this.get('value')||this.get('default')}}),D=S.a.Collection.extend({model:M,initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=t.em||'',this.listenTo(this,'add',this.handleAdd),this.listenTo(this,'reset',this.handleReset)},handleReset:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.previousModels,r=void 0===n?[]:n;r.forEach((function(e){return e.trigger('remove')}))},handleAdd:function(e){var t=this.target;t&&(e.target=t)},setTarget:function(e){this.target=e},add:function(e,t){var n=this.em;if(Object(O["isString"])(e)||Object(O["isArray"])(e)){var r=n&&n.get&&n.get('TraitManager'),i=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{build:function(t){var n=[];'string'==typeof t&&(t=[t]);for(var r=0;r<t.length;r++){var i={},o=t[r];switch(i.name=o,o){case'target':i.type='select',i.default=!1,i.options=e.optionsTarget}n.push(i)}return n}}}(r&&r.getConfig());Object(O["isString"])(e)&&(e=[e]);for(var o=0,a=e.length;o<a;o++){var s=e[o],l=Object(O["isString"])(s)?i.build(s)[0]:s;l.target=this.target,e[o]=l}}return S.a.Collection.prototype.add.apply(this,[e,t])}});function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=w()(e);if(t){var i=w()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return y()(this,n)}}var F=function(e){return e.replace(/[|\\{}()[\]^$+*?.]/g,'\\$&')},I=function(e){return e&&e.getConfig('avoidInlineStyle')},z='component:drag',V='__symbols',B='__symbol',U='__symbol_ovrd',H='component:update',W="".concat(H,"-inside"),$=function(e){v()(n,e);var t=R(n);function n(){return d()(this,n),t.apply(this,arguments)}return p()(n,[{key:"init",value:function(){}},{key:"updated",value:function(e,t,n){}},{key:"removed",value:function(){}},{key:"initialize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(O["bindAll"])(this,'__upSymbProps','__upSymbCls','__upSymbComps');var i=r.em,o=this.parent(),a=o&&o.attributes,s=this.get('propagate');if(s&&this.set('propagate',Object(O["isArray"])(s)?s:[s]),a&&a.propagate&&!s){var l={},c=a.propagate;c.forEach((function(e){return l[e]=o.get(e)})),l.propagate=c,this.set(N(N({},l),t))}if(r&&r.config&&r.config.voidElements.indexOf(this.get('tagName'))>=0&&this.set('void',!0),r.em=i,this.opt=r,this.em=i,this.frame=r.frame,this.config=r.config||{},this.set('attributes',N(N({},Object(O["result"])(this,'defaults').attributes||{}),this.get('attributes')||{})),this.ccid=n.createId(this,r),this.initClasses(),this.initTraits(),this.initComponents(),this.initToolbar(),this.initScriptProps(),this.listenTo(this,'script',this.scriptUpdated),this.listenTo(this,'change:tagName',this.tagUpdated),this.listenTo(this,'change:attributes',this.attrUpdated),this.listenTo(this,'change:attributes:id',this._idUpdated),this.on('change:toolbar',this.__emitUpdateTlb),this.on('change',this.__onChange),this.on(W,this.__propToParent),this.set('status',''),this.views=[],['classes','traits','components'].forEach((function(t){var n="add remove ".concat('components'!==t?'change':'');e.listenTo(e.get(t),n.trim(),(function(){for(var n=arguments.length,r=new Array(n),i=0;i<n;i++)r[i]=arguments[i];return e.emitUpdate.apply(e,[t].concat(r))}))})),!r.temporary){var u=i&&i.get('CssComposer'),f=this.attributes,d=f.styles,h=f.type;d&&u&&u.addCollection(d,{},{group:"cmp:".concat(h)}),this.__postAdd(),this.init(),this.__isSymbolOrInst()&&this.__initSymb(),i&&i.trigger('component:create',this)}}},{key:"__postAdd",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.em,n=t&&t.get('UndoManager'),r=this.components();n&&!this.__hasUm&&(n.add(r),n.add(this.getSelectors()),this.__hasUm=1),e.recursive&&r.map((function(t){return t.__postAdd(e)}))}},{key:"__postRemove",value:function(){var e=this.em,t=e&&e.get('UndoManager');t&&(t.remove(this.components()),t.remove(this.getSelectors()),delete this.__hasUm)}},{key:"__onChange",value:function(e,t){var n=this.changedAttributes();['status','open','toolbar','traits'].forEach((function(e){return delete n[e]})),Object(x["isEmptyObj"])(n)||(this.__changesUp(t),this.__propSelfToParent({component:this,changed:n,options:t}))}},{key:"__changesUp",value:function(e){var t=this.em;[this.frame,t].forEach((function(t){return t&&t.changesUp(e)}))}},{key:"__propSelfToParent",value:function(e){this.trigger(H,e),this.__propToParent(e)}},{key:"__propToParent",value:function(e){var t=this.parent();t&&t.trigger(W,e)}},{key:"__emitUpdateTlb",value:function(){this.emitUpdate('toolbar')}},{key:"is",value:function(e){return!(this.get('type')!=e)}},{key:"props",value:function(){return this.attributes}},{key:"index",value:function(){var e=this.collection;return e?e.indexOf(this):0}},{key:"setDragMode",value:function(e){return this.set('dmode',e)}},{key:"find",value:function(e){var t=[],n=this.view.$el.find(e);return n.each((function(e){var r=n.eq(e).data('model');r&&t.push(r)})),t}},{key:"findType",value:function(e){var t=[];return function n(r){return r.forEach((function(r){r.is(e)&&t.push(r),n(r.components())}))}(this.components()),t}},{key:"closest",value:function(e){var t=this.view.$el.closest(e);return t.length&&t.data('model')}},{key:"closestType",value:function(e){for(var t=this.parent();t&&!t.is(e);)t=t.parent();return t}},{key:"contains",value:function(e){var t=!1;if(!e)return t;var n=function n(r){!t&&r.forEach((function(r){r===e&&(t=!0),!t&&n(r.components())}))};return n(this.components()),t}},{key:"tagUpdated",value:function(){this.trigger('rerender')}},{key:"replaceWith",value:function(e){var t=this.collection,n=t.indexOf(this);return t.remove(this),t.add(e,{at:n})}},{key:"attrUpdated",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.get('attributes'),o=i.class;o&&this.setClass(o),delete i.class;var a=i.style;a&&this.setStyle(a),delete i.style;var s=N({},this.previous('attributes')),l=Object(x["shallowDiff"])(s,this.get('attributes'));Object(O["keys"])(l).forEach((function(e){return n.trigger("change:attributes:".concat(e),n,l[e],r)}))}},{key:"setAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.set('attributes',N({},e),t),this}},{key:"addAttributes",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.setAttributes(N(N({},this.getAttributes({noClass:1})),e),t)}},{key:"removeAttributes",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(e)?e:[e],r=this.getAttributes();return n.map((function(e){return delete r[e]})),this.setAttributes(r,t)}},{key:"getStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=Object(O["isString"])(e)?e:'',i=r?t:e;if(n&&n.getConfig('avoidInlineStyle')&&!i.inline){var o=n.get('state'),a=n.get('CssComposer'),s=a.getIdRule(this.getId(),N({state:o},i));if(this.rule=s,s)return s.getStyle(r)}return k["a"].getStyle.call(this,r)}},{key:"setStyle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=this.opt;if(r&&r.getConfig('avoidInlineStyle')&&!i.temporary&&!n.inline){var o=this.get('style')||{};t=N(N({},t=Object(O["isString"])(t)?this.parseStyle(t):t),o);var a=r.get('state'),s=r.get('CssComposer'),l=this.getStyle(n);this.rule=s.setIdRule(this.getId(),t,N(N({},n),{},{state:a}));var c=Object(x["shallowDiff"])(l,t);this.set('style','',{silent:1}),Object(O["keys"])(c).forEach((function(t){return e.trigger("change:style:".concat(t))}))}else t=k["a"].setStyle.apply(this,arguments);return t}},{key:"getAttributes",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.em,r=[],i=N({},this.get('attributes')),o=n&&n.get('SelectorManager'),a=this.getId();if(t.noClass||(this.get('classes').forEach((function(e){return r.push(Object(O["isString"])(e)?e:e.get('name'))})),r.length&&(i.class=r.join(' '))),!t.noStyle){var s=this.get('style');Object(x["isObject"])(s)&&!Object(x["isEmptyObj"])(s)&&(i.style=this.styleToString({inline:1}))}Object(O["has"])(i,'id')||(I(n)?e=o&&o.get(a,o.Selector.TYPE_ID):Object(O["isEmpty"])(this.getStyle())||(e=1),(this.__getSymbol()||this.__getSymbols())&&(e=1),e&&(i.id=a));return i}},{key:"addClass",value:function(e){var t=this.em.get('SelectorManager').addClass(e);return this.get('classes').add(t)}},{key:"setClass",value:function(e){return this.get('classes').reset(),this.addClass(e)}},{key:"removeClass",value:function(e){var t=[];e=Object(O["isArray"])(e)?e:[e];var n=this.get('classes'),r=E["a"].TYPE_CLASS;return e.forEach((function(e){e.split(' ').forEach((function(e){var i=n.where({name:e,type:r})[0];i&&t.push(n.remove(i))}))})),t}},{key:"getClasses",value:function(){var e=this.getAttributes().class;return e?e.split(' '):[]}},{key:"__logSymbol",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.__getSymbol(),i=this.__getSymbols();(r||i)&&this.em.log(e,{model:this,toUp:t,context:'symbols',opts:n})}},{key:"__initSymb",value:function(){this.__symbReady||(this.on('change',this.__upSymbProps),this.__symbReady=1)}},{key:"__isSymbol",value:function(){return Object(O["isArray"])(this.get(V))}},{key:"__isSymbolOrInst",value:function(){return!(!this.__isSymbol()&&!this.get(B))}},{key:"__isSymbolTop",value:function(){var e=this.parent();return this.__isSymbolOrInst()&&(!e||e&&!e.__isSymbol()&&!e.__getSymbol())}},{key:"__isSymbolNested",value:function(){if(!this.__isSymbolOrInst()||this.__isSymbolTop())return!1;var e=(this.__isSymbol()?this:this.__getSymbol()).__getSymbTop(),t=this.__getSymbTop();return(t.__isSymbol()?t:t.__getSymbol())!==e}},{key:"__getAllById",value:function(){var e=this.em;return e?e.get('DomComponents').allById():{}}},{key:"__getSymbol",value:function(){var e=this.get(B);if(e&&Object(O["isString"])(e)){var t=this.__getAllById()[e];t?(e=t,this.set(B,t)):e=0}return e}},{key:"__getSymbols",value:function(){var e=this,t=this.get(V);return t&&Object(O["isArray"])(t)&&(t.forEach((function(n,r){n&&Object(O["isString"])(n)&&(t[r]=e.__getAllById()[n])})),t=t.filter((function(e){return e&&!Object(O["isString"])(e)}))),t}},{key:"__isSymbOvrd",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',t=this.get(U),n=e.split(':'),r=l()(n,1),i=r[0],o=e!==i?[e,i]:[e];return!0===t||Object(O["isArray"])(t)&&o.some((function(e){return t.indexOf(e)>=0}))}},{key:"__getSymbToUp",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[],r=this.em,i=t.changed,o=r&&r.get('symbols');if(t.fromInstance||t.noPropagate||t.fromUndo||!o||i&&this.__isSymbOvrd(i))return n;var s=this.__getSymbols()||[],l=this.__getSymbol(),c=l?[l].concat(a()(l.__getSymbols()||[])):s;return n=c.filter((function(t){return t!==e})).filter((function(e){return!(i&&e.__isSymbOvrd(i))}))}},{key:"__getSymbTop",value:function(e){for(var t=this,n=this.parent(e);n&&(n.__isSymbol()||n.__getSymbol());)t=n,n=n.parent(e);return t}},{key:"__upSymbProps",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.changedAttributes(),i=r.attributes||{};if(delete r.status,delete r.open,delete r[V],delete r[B],delete r[U],delete r.attributes,delete i.id,Object(x["isEmptyObj"])(i)||(r.attributes=i),!Object(x["isEmptyObj"])(r)){var o=this.__getSymbToUp(n);Object(O["keys"])(r).map((function(e){t.__isSymbOvrd(e)&&delete r[e]})),this.__logSymbol('props',o,{opts:n,changed:r}),o.forEach((function(e){var i=N({},r);Object(O["keys"])(i).map((function(t){e.__isSymbOvrd(t)&&delete i[t]})),e.set(i,N({fromInstance:t},n))}))}}},{key:"__upSymbCls",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.__getSymbToUp(r);this.__logSymbol('classes',i,{opts:r}),i.forEach((function(e){e.set('classes',n.get('classes'),{fromInstance:n})})),this.__changesUp(r)}},{key:"__upSymbComps",value:function(e,t,n){var r=this,i=n||t||{},o={fromInstance:i.fromInstance,fromUndo:i.fromUndo},s=e.opt.temporary;if(n)if(n.add){var l=[],c=!!this.__getSymbols(),u=this.__getSymbToUp(N(N({},o),{},{changed:'components:add'}));if(u.length){var f=e.__getSymbol();l=(f?f.__getSymbols():e.__getSymbols())||[],(l=a()(l)).push(f||e)}!s&&this.__logSymbol('add',u,{opts:n,addedInstances:l.map((function(e){return e.cid})),added:e.cid}),u.forEach((function(t){var i=t.__getSymbTop(),o=l.filter((function(e){var t=e.__getSymbTop({prev:1});return i&&t&&t===i}))[0]||e.clone({symbol:1,symbolInv:c});t.append(o,N({fromInstance:r},n))}))}else{var d=e.__getSymbol();if(d&&!n.temporary&&d.set(V,d.__getSymbols().filter((function(t){return t!==e}))),!e.__isSymbolTop()){var h='components:remove',p=n.index,g=e.parent(),v=N({fromInstance:e},n),m=e.__isSymbolNested(),y=function(e){var t=e.parent();t&&!t.__isSymbOvrd(h)&&e.remove(v)},b=g.__isSymbOvrd(h)?[]:e.__getSymbToUp(o);m&&(b=g.__getSymbToUp(N(N({},o),{},{changed:h})),y=function(e){var t=e.components().at(p);t&&t.remove(N({fromInstance:g},v))}),!s&&this.__logSymbol('remove',b,{opts:n,removed:e.cid,isSymbNested:m}),b.forEach(y)}}else{var w=this.__getSymbToUp(N(N({},o),{},{changed:'components:reset'}));this.__logSymbol('reset',w,{components:e.models}),w.forEach((function(n){var i=e.models.map((function(e){return e.clone({symbol:1})}));n.components().reset(i,N({fromInstance:r},t))}))}this.__changesUp(i)}},{key:"initClasses",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r='change:classes',i=this.get('attributes').class||[],o=[this,r,this.initClasses],a=this.get('classes')||i,s=Object(O["isString"])(a)?a.split(' '):a;this.stopListening.apply(this,o);var l=this.normalizeClasses(s),c=new P["a"]([]);return this.set('classes',c,n),c.add(l),c.on('add remove reset',this.__upSymbCls),this.listenTo.apply(this,o),this}},{key:"initComponents",value:function(){var e=[this,'change:components',this.initComponents];this.stopListening.apply(this,e);var t=new j["b"](null,this.opt);t.parent=this;var n=this.get('components'),r=!this.opt.avoidChildren;return this.set('components',t),r&&n&&t.add(Object(O["isFunction"])(n)?n(this):n,this.opt),t.on('add remove reset',this.__upSymbComps),this.listenTo.apply(this,e),this}},{key:"initTraits",value:function(e){var t=this.em,n='change:traits';this.off(n,this.initTraits),this.__loadTraits();var r=N({},this.get('attributes')),i=this.get('traits');return i.each((function(e){if(!e.get('changeProp')){var t=e.get('name'),n=e.getInitValue();t&&n&&(r[t]=n)}})),i.length&&this.set('attributes',r),this.on(n,this.initTraits),e&&t&&t.trigger('component:toggled'),this}},{key:"initScriptProps",value:function(){if(!this.opt.temporary){var e='script-props',t=["change:".concat(e),this.initScriptProps];this.off.apply(this,t);var n=this.previous(e)||[],r=this.get(e)||[],i=n.map((function(e){return"change:".concat(e)})).join(' '),o=r.map((function(e){return"change:".concat(e)})).join(' ');i&&this.off(i,this.__scriptPropsChange),o&&this.on(o,this.__scriptPropsChange),this.on.apply(this,t)}}},{key:"__scriptPropsChange",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};n.avoidStore||this.trigger('rerender')}},{key:"append",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(O["isArray"])(e)?e:[e],r=n.map((function(e){return Object(O["isString"])(e)||e.collection&&e.collection.remove(e,{temporary:1}),e})),i=this.components().add(r,t);return Object(O["isArray"])(i)?i:[i]}},{key:"components",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('components');return Object(O["isUndefined"])(e)?n:(n.reset(null,t),e?this.append(e,t):[])}},{key:"getChildAt",value:function(e){return this.components().at(e||0)||null}},{key:"getLastChild",value:function(){var e=this.components();return e.at(e.length-1)||null}},{key:"empty",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.components().reset(null,e),this}},{key:"parent",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.collection||e.prev&&this.prevColl;return t?t.parent:null}},{key:"scriptUpdated",value:function(){this.set('scriptUpdated',1)}},{key:"initToolbar",value:function(){var e=this.em,t=e&&e.getConfig('stylePrefix')||'';if(!this.get('toolbar')){var n=[];this.collection&&n.push({attributes:{class:'fa fa-arrow-up'},command:function(e){return e.runCommand('core:component-exit',{force:1})}}),this.get('draggable')&&n.push({attributes:{class:"fa fa-arrows ".concat(t,"no-touch-actions"),draggable:!0},command:'tlb-move'}),this.get('copyable')&&n.push({attributes:{class:'fa fa-clone'},command:'tlb-clone'}),this.get('removable')&&n.push({attributes:{class:'fa fa-trash-o'},command:'tlb-delete'}),this.set('toolbar',n)}}},{key:"__loadTraits",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e||this.get('traits');if(!(n instanceof D)){n=Object(O["isFunction"])(n)?n(this):n;var r=new D([],this.opt);r.setTarget(this),n.length&&(n.forEach((function(e){return e.attributes&&delete e.attributes.value})),r.add(n)),this.set({traits:r},t)}return this}},{key:"getTraits",value:function(){return this.__loadTraits(),a()(this.get('traits').models)}},{key:"setTraits",value:function(e){var t=Object(O["isArray"])(e)?e:[e];return this.set({traits:t}),this.getTraits()}},{key:"getTrait",value:function(e){return this.getTraits().filter((function(t){return t.get('id')===e||t.get('name')===e}))[0]||null}},{key:"updateTrait",value:function(e,t){var n,r=this.getTrait(e);return r&&r.set(t),null===(n=this.em)||void 0===n||n.trigger('component:toggled'),this}},{key:"getTraitIndex",value:function(e){var t=this.getTrait(e);return t?this.get('traits').indexOf(t):-1}},{key:"removeTrait",value:function(e){var t,n=this,r=(Object(O["isArray"])(e)?e:[e]).map((function(e){return n.getTrait(e)})),i=this.get('traits'),o=r.length?i.remove(r):[];return null===(t=this.em)||void 0===t||t.trigger('component:toggled'),Object(O["isArray"])(o)?o:[o]}},{key:"addTrait",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.__loadTraits();var r=this.get('traits').add(e,n);return null===(t=this.em)||void 0===t||t.trigger('component:toggled'),Object(O["isArray"])(r)?r:[r]}},{key:"normalizeClasses",value:function(e){var t=[],n=this.em,r=n&&n.get('SelectorManager');if(r)return e.models?a()(e.models):(e.forEach((function(e){return t.push(r.add(e))})),t)}},{key:"clone",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.em,n=N({},this.attributes),r=N({},this.opt),i=this.getId(),o=t&&t.get('CssComposer');n.attributes=N({},n.attributes),delete n.attributes.id,n.components=[],n.classes=[],n.traits=[],this.__isSymbolTop()&&(e.symbol=1),this.get('components').each((function(t,r){n.components[r]=t.clone(N(N({},e),{},{_inner:1}))})),this.get('traits').each((function(e,t){n.traits[t]=e.clone()})),this.get('classes').each((function(e,t){n.classes[t]=e.get('name')})),n.status='',r.collection=null;var s=new this.constructor(n,r),l="#".concat(s.getId()),c=o?o.getRules("#".concat(i)):[];c.forEach((function(e){var t=e.clone();t.set('selectors',[l]),o.getAll().add(t)})),s.set(V,0);var u=this.__getSymbol(),f=this.__getSymbols();e.symbol||!u&&!f?u?(u.set(V,[].concat(a()(u.__getSymbols()),[s])),s.__initSymb()):e.symbol&&(this.__isSymbol()?(this.set(V,[].concat(a()(f),[s])),s.set(B,this),s.__initSymb()):e.symbolInv?(this.set(V,[s]),s.set(B,this),[this,s].map((function(e){return e.__initSymb()}))):(s.set(V,[this]),[this,s].map((function(e){return e.__initSymb()})),this.set(B,s))):(s.set(B,0),s.set(V,0));var d='component:clone';return t&&t.trigger(d,s),this.trigger(d,s),s}},{key:"getName",value:function(){var e=this.em,t=this.attributes,n=t.type,r=t.tagName,i=t.name,o=n||r,a=!n&&r,s='domComponents.names.',l=i&&(null==e?void 0:e.t("".concat(s).concat(i))),c=a&&(null==e?void 0:e.t("".concat(s).concat(a))),u=e&&(e.t("".concat(s).concat(n))||e.t("".concat(s).concat(r)));return this.get('custom-name')||l||i||c||Object(x["capitalize"])(a)||u||Object(x["capitalize"])(o)}},{key:"getIcon",value:function(){var e=this.get('icon');return e?e+' ':''}},{key:"toHTML",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this,n=[],r=e.tag,i=r||t.get('tagName'),o=t.get('void'),a=e.attributes,s=this.getAttrToHTML();if(delete e.tag,a&&(Object(O["isFunction"])(a)?s=a(t,s)||{}:Object(x["isObject"])(a)&&(s=a)),e.withProps){var l=this.toJSON();Object(O["forEach"])(l,(function(e,t){'_'!==t[0]&&['classes','attributes','components'].indexOf(t)<0&&(s["data-gjs-".concat(t)]=Object(O["isArray"])(e)||Object(x["isObject"])(e)?JSON.stringify(e):e)}))}for(var c in s){var u=s[c];if(!Object(O["isUndefined"])(u)&&null!==u)if(Object(O["isBoolean"])(u))u&&n.push(c);else{var f='';if(e.altQuoteAttr&&Object(O["isString"])(u)&&u.indexOf('"')>=0)f="'".concat(u.replace(/'/g,'&apos;'),"'");else{var d=Object(O["isString"])(u)?u.replace(/"/g,'&quot;'):u;f="\"".concat(d,"\"")}n.push("".concat(c,"=").concat(f))}}var h=n.length?" ".concat(n.join(' ')):'',p=t.getInnerHTML(e),g="<".concat(i).concat(h).concat(o?'/':'',">").concat(p);return!o&&(g+="</".concat(i,">")),g}},{key:"getInnerHTML",value:function(e){return this.__innerHTML(e)}},{key:"__innerHTML",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.components();return t.length?t.map((function(t){return t.toHTML(e)})).join(''):this.get('content')}},{key:"getAttrToHTML",value:function(){var e=this.getAttributes();return delete e.style,e}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=C["Model"].prototype.toJSON.call(this,e);if(t.attributes=this.getAttributes(),delete t.attributes.class,delete t.toolbar,delete t.traits,delete t.status,delete t.open,!e.fromUndo){var n=t[B],r=t[V];r&&Object(O["isArray"])(r)&&(t[V]=r.filter((function(e){return e})).map((function(e){return e.getId?e.getId():e}))),n&&!Object(O["isString"])(n)&&(t[B]=n.getId())}return this.em.getConfig('avoidDefaults')&&this.getChangedProps(t),t}},{key:"getChangedProps",value:function(e){var t=e||C["Model"].prototype.toJSON.apply(this),n=Object(O["result"])(this,'defaults');return Object(O["forEach"])(n,(function(e,n){-1===['type'].indexOf(n)&&t[n]===e&&delete t[n]})),Object(O["isEmpty"])(t.type)&&delete t.type,Object(O["forEach"])(['attributes','style'],(function(e){Object(O["isEmpty"])(n[e])&&Object(O["isEmpty"])(t[e])&&delete t[e]})),Object(O["forEach"])(['classes','components'],(function(e){(!t[e]||Object(O["isEmpty"])(n[e])&&!t[e].length)&&delete t[e]})),t}},{key:"getId",value:function(){return(this.get('attributes')||{}).id||this.ccid||this.cid}},{key:"setId",value:function(e,t){var n=N({},this.get('attributes'));return n.id=e,this.set('attributes',n,t),this}},{key:"getEl",value:function(e){var t=this.getView(e);return t&&t.el}},{key:"getView",value:function(e){var t=this.view,n=this.views;return e&&(t=n.filter((function(t){return t._getFrame()===e.view}))[0]),t}},{key:"getCurrentView",value:function(){var e=(this.em.get('currentFrame')||{}).model;return this.getView(e)}},{key:"__getScriptProps",value:function(){var e=this.props();return(this.get('script-props')||[]).reduce((function(t,n){return t[n]=e[n],t}),{})}},{key:"getScriptString",value:function(e){var t=this,n=e||this.get('script');if(!n)return n;if(this.get('script-props'))n=n.toString().trim();else{if('function'==typeof n){var r=n.toString().trim();n=(r=r.replace(/^function[\s\w]*\(\)\s?\{/,'').replace(/\}$/,'')).trim()}var o=this.em.getConfig(),a=F(o.tagVarStart||'{[ '),s=F(o.tagVarEnd||' ]}'),l=new RegExp("".concat(a,"([\\w\\d-]*)").concat(s),'g');n=n.replace(l,(function(e,n){t.scriptUpdated();var r=t.attributes[n]||'';return Object(O["isArray"])(r)||'object'==i()(r)?JSON.stringify(r):r}))}return n}},{key:"emitUpdate",value:function(e){for(var t=this.em,n=H+(e?":".concat(e):''),r=e&&this.get(e),i=arguments.length,o=new Array(i>1?i-1:0),a=1;a<i;a++)o[a-1]=arguments[a];e&&this.updated.apply(this,[e,r,e&&this.previous(e)].concat(o)),this.trigger.apply(this,[n].concat(o)),t&&t.trigger.apply(t,[n,this].concat(o)),['components','classes'].indexOf(e)>=0&&this.__propSelfToParent({component:this,changed:u()({},e,r),options:o[2]||o[1]||{}})}},{key:"onAll",value:function(e){return Object(O["isFunction"])(e)&&(e(this),this.components().forEach((function(t){return t.onAll(e)}))),this}},{key:"remove",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.em,r=this.collection,i=function(){r&&r.remove(e,N(N({},t),{},{action:'remove-component'})),t.root&&e.components('')},o=N({},t);return[this,n].map((function(t){return t.trigger('component:remove:before',e,i,o)})),!o.abort&&i(),this}},{key:"move",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.remove({temporary:1}),e&&e.append(this,t),this}},{key:"isInstanceOf",value:function(e){var t,n,r=null===(t=this.em)||void 0===t||null===(n=t.get('DomComponents').getType(e))||void 0===n?void 0:n.model;return!!r&&this instanceof r}},{key:"isChildOf",value:function(e){for(var t=Object(O["isString"])(e),n=this.parent();n;){if(t){if(n.isInstanceOf(e))return!0}else if(n===e)return!0;n=n.parent()}return!1}},{key:"resetId",value:function(){var e=this.em,t=this.getId();if(t){var r=n.createId(this);this.setId(r);var i=e&&e.get('CssComposer').getIdRule(t),o=i&&i.get('selectors').at(0);return o&&o.set('name',r),this}}},{key:"_getStyleRule",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.id,n=this.em,r=t||this.getId();return n&&n.get('CssComposer').getIdRule(r)}},{key:"_getStyleSelector",value:function(e){var t=this._getStyleRule(e);return t&&t.get('selectors').at(0)}},{key:"_idUpdated",value:function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!r.idUpdate){var i=this.ccid,o=this.get('attributes')||{},a=o.id,s=(this.previous('attributes')||{}).id||i,l=n.getList(this);if(l[a]||!a&&s)return this.setId(s,{idUpdate:1});delete l[s],l[a]=this,this.ccid=a;var c=this._getStyleSelector({id:s});c&&c.set({name:a,label:a})}}}]),n}(C["Model"].extend(k["a"]));$.isComponent=function(e){return{tagName:Object(x["toLowerCase"])(e.tagName)}},$.ensureInList=function(e){var t=$.getList(e),n=e.getId(),r=t[n];if(r){if(r!==e){var i=$.getIncrementId(n,t);e.setId(i),t[i]=e}}else t[n]=e;e.components().forEach((function(e){return $.ensureInList(e)}))},$.createId=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=$.getList(e),i=n.idMap,o=void 0===i?{}:i,a=e.get('attributes'),s=a.id;return s?(t=$.getIncrementId(s,r,n),e.setId(t),s!==t&&(o[s]=t)):t=$.getNewId(r),r[t]=e,t},$.getNewId=function(e){for(var t=Object.keys(e).length.toString().length+2,n=(Math.random()+1.1).toString(36).slice(-t),r="i".concat(n);e[r];)r=$.getNewId(e);return r},$.getIncrementId=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.keepIds,i=void 0===r?[]:r,o=1,a=e;if(i.indexOf(e)<0)for(;t[a];)o++,a="".concat(e,"-").concat(o);return a},$.getList=function(e){var t=e.opt,n=void 0===t?{}:t,r=n.domc,i=n.em,o=r||i&&i.get('DomComponents');return o?o.componentsById:{}},$.checkId=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=Object(O["isArray"])(e)?e:[e],o=r.keepIds,a=void 0===o?[]:o;i.forEach((function(e){var i=e.attributes,o=void 0===i?{}:i,s=e.components,l=o.id;if(l&&n[l]&&a.indexOf(l)<0){var c=$.getIncrementId(l,n);o.id=c,Object(O["isArray"])(t)&&t.forEach((function(e){var t=e.selectors;t.forEach((function(e,n){e==="#".concat(l)&&(t[n]="#".concat(c))}))}))}s&&$.checkId(s,t,n,r)}))},$.getDefaults=function(){return Object(O["result"])(this.prototype,'defaults')},$.prototype.defaults=(A={tagName:'div',type:'',name:'',removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,'stylable-require':'','style-signature':'',unstylable:'',highlightable:!0,copyable:!0,resizable:!0,editable:!1,layerable:!0,selectable:!0,hoverable:!0,void:!1,state:'',status:'',chooser:'',content:'',icon:'',style:'',styles:'',classes:'',script:'','script-props':'','script-export':'',attributes:'',traits:['id','title'],propagate:'',dmode:'',toolbar:null},u()(A,B,0),u()(A,V,0),u()(A,U,0),u()(A,"_undo",!0),u()(A,"_undoexc",['status','open']),A)},function(e,t,n){var r=n(169),i=n(170),o=n(104),a=n(171);e.exports=function(e){return r(e)||i(e)||o(e)||a()},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(72);var i=n(86),o=n(64);function a(e){return function(e){if(Array.isArray(e))return Object(r["a"])(e)}(e)||Object(i["a"])(e)||Object(o["a"])(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),l=n(32),c=n(87),u=n(44),f=n(18),d=n(1);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=a.a.View.extend({className:function(){return this.getClasses()},tagName:function(){return this.model.get('tagName')},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.model,n=e.config||{},r=n.em,i=t.opt||{},o=this.$el,a=this.el;this.opts=e,this.modelOpt=i,this.config=n,this.em=r||'',this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.attr=t.get('attributes'),this.classe=this.attr.class||[],this.listenTo(t,'change:style',this.updateStyle),this.listenTo(t,'change:attributes',this.renderAttributes),this.listenTo(t,'change:highlightable',this.updateHighlight),this.listenTo(t,'change:status',this.updateStatus),this.listenTo(t,'change:script rerender',this.reset),this.listenTo(t,'change:content',this.updateContent),this.listenTo(t,'change',this.handleChange),this.listenTo(t,'active',this.onActive),this.listenTo(t,'disable',this.onDisable),o.data('model',t),Object(d["setViewEl"])(a,this),t.view=this,this._getFrame()&&t.views.push(this),this.initClasses(),this.initComponents({avoidRender:1}),this.events=p(p({},this.events),{},{dragstart:'handleDragStart'}),this.delegateEvents(),!i.temporary&&this.init(this._clbObj())},__isDraggable:function(){var e=this.model,t=this.config,n=e.attributes.draggable;return t.draggableComponents&&n},_clbObj:function(){var e=this.em,t=this.model,n=this.el;return{editor:e&&e.getEditor(),model:t,el:n}},init:function(){},removed:function(){},onActive:function(){},onDisable:function(){},remove:function(){var e;a.a.View.prototype.remove.apply(this,arguments);var t=this.model,n=this.$el,r=t.views,i=this._getFrame()||{};return t.components().forEach((function(e){var t=e.getView(i.model);null==t||t.remove()})),null===(e=this.childrenView)||void 0===e||e.remove(),r.splice(r.indexOf(this),1),this.removed(this._clbObj()),n.data({model:'',collection:'',view:''}),this},handleDragStart:function(e){if(!this.__isDraggable())return!1;e.stopPropagation(),e.preventDefault(),this.em.get('Commands').run('tlb-move',{target:this.model,event:e})},initClasses:function(){var e=this.model,t='change:classes',n=e.get('classes');n instanceof u["a"]&&(this.stopListening(e,t,this.initClasses),this.listenTo(e,t,this.initClasses),this.listenTo(n,'add remove change',this.updateClasses),n.length&&this.importClasses())},initComponents:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.model,n=this.$el,r=this.childrenView,i='change:components',o=t.get('components'),a=[t,i,this.initComponents];o instanceof l["b"]&&(n.data('collection',o),r&&r.remove(),this.stopListening.apply(this,a),!e.avoidRender&&this.renderChildren(),this.listenTo.apply(this,a))},handleChange:function(){var e=this.model,t=Object(s["keys"])(e.changed);if(1!==t.length||'status'!==t[0])for(var n in e.emitUpdate(),e.changed)e.emitUpdate(n)},importClasses:function(){var e=this.config.em.get('SelectorManager');e&&this.model.get('classes').each((function(t){e.add(t.get('name'))}))},updateStatus:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.em,n=t?t.get('Canvas').getConfig():{},r=n.extHl,i=this.el,o=this.model.get('status'),a=this.ppfx,s="".concat(a,"selected"),l="".concat(s,"-parent"),c="".concat(a,"freezed"),u="".concat(a,"remote"),f="".concat(a,"hovered"),d=[s,l,c,f],h=r&&!e.noExtHl?'':s;this.$el.removeClass(d.join(' '));var p=i.getAttribute('class')||'',g='';switch(o){case'selected':g="".concat(p," ").concat(h);break;case'selected-parent':g="".concat(p," ").concat(l);break;case'freezed':g="".concat(p," ").concat(c);break;case'freezed-selected':g="".concat(p," ").concat(c," ").concat(h);break;case'freezed-remote-selected':g="".concat(p," ").concat(c," ").concat(u," ").concat(h," ");break;case'hovered':g=e.avoidHover?'':"".concat(p," ").concat(f)}(g=g.trim())&&i.setAttribute('class',g)},updateHighlight:function(){var e=this.model,t=e.get('textable'),n=e.get('highlightable')&&(t||!e.isChildOf('text'));this.setAttribute('data-gjs-highlightable',!!n||'')},updateStyle:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.model,i=this.em;if(i&&i.getConfig('avoidInlineStyle')&&!n.inline){var o=r.getStyle();!Object(s["isEmpty"])(o)&&r.setStyle(o)}else this.setAttribute('style',r.styleToString(n))},updateClasses:function(){var e=this.model.get('classes').pluck('name').join(' ');this.setAttribute('class',e),this.updateStatus(),this.onAttrUpdate()},setAttribute:function(e,t){var n=this.$el;t?n.attr(e,t):n.removeAttr(e)},getClasses:function(){return this.model.getClasses().join(' ')},updateAttributes:function(){var e=[],t=this.model,n=this.$el,r=this.el,i=t.attributes,o=i.textable,a=i.type,l=p(p({id:t.getId(),'data-gjs-type':a||'default'},this.__isDraggable()&&{draggable:!0}),o&&{contenteditable:'false'});Object(s["each"])(r.attributes,(function(t){return e.push(t.nodeName)})),e.forEach((function(e){return n.removeAttr(e)})),this.updateStyle(),this.updateHighlight();var c=p(p({},l),t.getAttributes());Object(s["keys"])(c).forEach((function(e){return!1===c[e]&&delete c[e]})),n.attr(c)},updateContent:function(){var e=this.model.get('content'),t=this.model.components().length;this.getChildrenContainer().innerHTML=t?'':e},prevDef:function(e){e.preventDefault()},updateScript:function(){var e=this.model,t=this.em;e.get('script')&&t&&t.get('Canvas').getCanvasView().updateScript(this)},getChildrenContainer:function(){var e=this.el;return'function'==typeof this.getChildrenSelector?e=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,e},getOffsetRect:function(){var e={},t=this.el,n=0,r=0;return function i(o){var a=o.offsetParent;a?(n+=a.offsetTop,r+=a.offsetLeft,i(a)):(e.top=t.offsetTop+n,e.left=t.offsetLeft+r,e.bottom=e.top+t.offsetHeight,e.right=e.left+t.offsetWidth)}(t),e},isInViewport:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.rect,n=this.el,r=n.ownerDocument,i=r.body,o=r.defaultView.frameElement,a=t||this.getOffsetRect(),s=a.top,l=a.left,c=this._getFrame().getOffsetRect();return s>=c.scrollTop&&l>=c.scrollLeft&&s<=c.scrollBottom&&l<=o.offsetWidth+i.scrollLeft},scrollIntoView:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getOffsetRect(),n=this.isInViewport({rect:t});if(!n||e.force){var r=this.el;'smooth'!==e.behavior?r.ownerDocument.defaultView.scrollTo(0,t.top):r.scrollIntoView(p({behavior:'smooth',block:'nearest'},e))}},reset:function(){var e=this.el;this.el='',this._ensureElement(),this._setData(),Object(f["m"])(e,this.el),this.render()},_setData:function(){var e=this.model,t=e.components();this.$el.data({model:e,collection:t,view:this})},_getFrame:function(){return this.config.frameView},renderChildren:function(){this.updateContent();var e=this.getChildrenContainer(),t=this.childrenView||new c["a"]({collection:this.model.get('components'),config:this.config,componentTypes:this.opts.componentTypes});t.render(e),this.childrenView=t;for(var n=Array.prototype.slice.call(t.el.childNodes),r=0,i=n.length;r<i;r++)e.appendChild(n.shift())},renderAttributes:function(){this.updateAttributes(),this.updateClasses()},onAttrUpdate:function(){},render:function(){return this.renderAttributes(),this.modelOpt.temporary||(this.renderChildren(),this.updateScript(),Object(d["setViewEl"])(this.el,this),this.postRender()),this},postRender:function(){this.modelOpt.temporary||this.onRender(this._clbObj())},onRender:function(){}})},function(e,t,n){"use strict";n.d(t,"k",(function(){return a})),n.d(t,"i",(function(){return s})),n.d(t,"l",(function(){return l})),n.d(t,"h",(function(){return c})),n.d(t,"d",(function(){return u})),n.d(t,"j",(function(){return f})),n.d(t,"m",(function(){return d})),n.d(t,"b",(function(){return h})),n.d(t,"a",(function(){return p})),n.d(t,"f",(function(){return g})),n.d(t,"g",(function(){return v})),n.d(t,"e",(function(){return m})),n.d(t,"c",(function(){return y}));var r=n(0),i='tag',o='attributes',a='transitionend oTransitionEnd transitionend webkitTransitionEnd',s=function(e){return e&&9===e.nodeType},l=function(e){var t=e&&e.parentNode;t&&t.removeChild(e)},c=function(e,t){return e.querySelectorAll(t)},u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e&&e.setAttribute&&Object(r["each"])(t,(function(t,n){return e.setAttribute(n,t)}))},f=function(e){return e&&!!(e.offsetWidth||e.offsetHeight||e.getClientRects().length)},d=function(e,t){e.parentNode.replaceChild(t,e)},h=function(e,t,n){var i=e.childNodes,o=i.length,a=Object(r["isUndefined"])(n)?o:n;Object(r["isString"])(t)&&(e.insertAdjacentHTML('beforeEnd',t),t=e.lastChild,e.removeChild(t)),a>=o?e.appendChild(t):e.insertBefore(t,i[a])},p=function(e,t){return h(e,t)},g=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2?arguments[2]:void 0,i=document.createElement(e);return t&&Object(r["each"])(t,(function(e,t){return i.setAttribute(t,e)})),n&&(Object(r["isString"])(n)?i.innerHTML=n:i.appendChild(n)),i},v=function(e){return document.createTextNode(e)},m=function(e,t){var n,r=e.type;try{n=new window[t](r,e)}catch(e){(n=document.createEvent(t)).initEvent(r,!0,!0)}return n._parentEvent=e,0===r.indexOf('key')&&(n.keyCodeVal=e.keyCode,['keyCode','which'].forEach((function(e){Object.defineProperty(n,e,{get:function(){return this.keyCodeVal}})}))),n},y=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=Array.isArray(t)?t:[t];n.forEach((function(t){var n=t[i]||'div',a=t[o]||{},s=document.createElement(n);Object(r["each"])(a,(function(e,t){s.setAttribute(t,e)})),e.appendChild(s)}))}},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(82);var i=n(64),o=n(83);function a(e,t){return Object(r["a"])(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw i}}return o}}(e,t)||Object(i["a"])(e,t)||Object(o["a"])()}},function(e,t){'function'==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}}},function(e,t){function n(t){return e.exports=n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e.exports.__esModule=!0,e.exports["default"]=e.exports,n(t)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){"use strict";function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}n.d(t,"a",(function(){return r}))},,function(e,t,n){"use strict";n.r(t),n.d(t,"myEditor",(function(){return q})),n.d(t,"myCurrentFrame",(function(){return K}));var r=n(3),i=n.n(r),o=n(0),a=n(45),s={stylePrefix:'gjs-',components:'',style:'',fromElement:0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:'900px',width:'100%',log:['warning','error'],baseCss:"\n    * {\n      box-sizing: border-box;\n    }\n    html, body, [data-gjs-type=wrapper] {\n      min-height: 100%;\n    }\n    body {\n      margin: 0;\n      height: 100%;\n      background-color: #fff\n    }\n    [data-gjs-type=wrapper] {\n      overflow: auto;\n      overflow-x: hidden;\n    }\n\n    * ::-webkit-scrollbar-track {\n      background: rgba(0, 0, 0, 0.1)\n    }\n\n    * ::-webkit-scrollbar-thumb {\n      background: rgba(255, 255, 255, 0.2)\n    }\n\n    * ::-webkit-scrollbar {\n      width: 10px\n    }\n  ",protectedCss:'* { box-sizing: border-box; } body {margin: 0;}',canvasCss:'',defaultCommand:'select-comp',showToolbar:1,showDevices:1,devicePreviewMode:0,mediaCondition:'max-width',tagVarStart:'{[ ',tagVarEnd:' ]}',keepEmptyTextNodes:0,jsInHtml:!0,nativeDnD:1,multipleSelection:1,exportWrapper:0,wrapperIsBody:1,optsHtml:{},optsCss:{},avoidInlineStyle:1,avoidDefaults:1,clearStyles:0,dragMode:0,listenToEl:[],cssIcons:'https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css',icons:{close:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',move:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M13,6V11H18V7.75L22.25,12L18,16.25V13H13V18H16.25L12,22.25L7.75,18H11V13H6V16.25L1.75,12L6,7.75V11H11V6H7.75L12,1.75L16.25,6H13Z"/></svg>',plus:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" /></svg>',caret:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M7,10L12,15L17,10H7Z" /></svg>'},el:'',i18n:{},undoManager:{},assetManager:{},canvas:{},layers:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:'Code',keepUnusedStyles:0,multiFrames:0,customUI:!1},l=n(34),c=n.n(l),u=n(8),f=n.n(u),d=n(9),h=n.n(d),p=n(10),g=n.n(p),v=n(11),m=n.n(v),y=n(5),b=n.n(y),w=n(4),O=n.n(w),x=n(1);function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var C=function(e){g()(n,e);var t=k(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n)}(w["Model"]),S=function(e){g()(n,e);var t=k(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"getByComponent",value:function(e){var t=this;return this.filter((function(n){return t.getComponent(n)===e}))[0]}},{key:"addComponent",value:function(e,t){var n=this,r=(Object(o["isArray"])(e)?e:[e]).filter((function(e){return!n.hasComponent(e)})).map((function(e){return{component:e}}));return this.push(r,t)}},{key:"getComponent",value:function(e){return e.get('component')}},{key:"hasComponent",value:function(e){var t=this.getByComponent(e);return t&&this.contains(t)}},{key:"lastComponent",value:function(){var e=this.last();return e&&this.getComponent(e)}},{key:"allComponents",value:function(){var e=this;return this.map((function(t){return e.getComponent(t)})).filter((function(e){return e}))}},{key:"removeComponent",value:function(e,t){var n=this,r=(Object(o["isArray"])(e)?e:[e]).map((function(e){return n.getByComponent(e)}));return this.remove(r,t)}}]),n}(w["Collection"]);S.prototype.model=C;var j=n(6),E=["unset"];function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function T(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}O.a.$=a["default"];var A,M,D=[n(260),n(261),n(264),n(233),n(256),n(254),n(257),n(248),n(255),n(258),n(253),n(251),n(262),n(246),n(259),n(99),n(249),n(247),n(263),n(252),n(265),n(250)];!function(e){var t=e.$;if(t&&t.prototype&&'jQuery'!==t.prototype.constructor.name){var n=t.fn;n.hide=function(){return this.css('display','none')},n.show=function(){return this.css('display','block')},n.focus=function(){var e=this.get(0);return e&&e.focus(),this},n.bind=function(e,t){return this.on(e,t)},n.unbind=function(e,t){if(Object(o["isObject"])(e)){for(var n in e)e.hasOwnProperty(n)&&this.off(n,e[n]);return this}return this.off(e,t)},n.click=function(e){return e?this.on('click',e):this.trigger('click')},n.change=function(e){return e?this.on('change',e):this.trigger('change')},n.keydown=function(e){return e?this.on('keydown',e):this.trigger('keydown')},n.delegate=function(e,t,n,r){return r||(r=n),this.on(t,e,(function(e){e.data=n,r(e)}))},n.scrollLeft=function(){var e=this.get(0),t=(e=9==e.nodeType?e.defaultView:e)instanceof Window?e:null;return t?t.pageXOffset:e.scrollLeft||0},n.scrollTop=function(){var e=this.get(0),t=(e=9==e.nodeType?e.defaultView:e)instanceof Window?e:null;return t?t.pageYOffset:e.scrollTop||0};var r=t.prototype.offset;n.offset=function(e){var t,n;return e&&(t=e.top,n=e.left),void 0!==t&&this.css('top',"".concat(t,"px")),void 0!==n&&this.css('left',"".concat(n,"px")),r.call(this)},t.map=function(e,t){for(var n=[],r=0;r<e.length;r++)n.push(t(e[r],r));return n};var i=Array.prototype.indexOf;t.inArray=function(e,t,n){return null==t?-1:i.call(t,e,n)},t.Event=function(e,n){if(!(this instanceof t.Event))return new t.Event(e,n);this.type=e,this.isDefaultPrevented=function(){return!1}}}}({Backbone:O.a,$:O.a.$});var L={debug:console.log,info:console.info,warning:console.warn,error:console.error},N=function(e){g()(n,e);var t=T(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"defaults",value:function(){return{editing:0,selected:0,clipboard:null,dmode:0,componentHovered:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:''}}},{key:"initialize",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t,this.set('Config',t),this.set('modules',[]),this.set('toLoad',[]),this.set('storables',[]),this.set('selected',new S),this.set('dmode',t.dragMode),this.set('hasPages',!!t.pageManager);var n=t.el,r=t.log,i=!0===r?Object(o["keys"])(L):Object(o["isArray"])(r)?r:[];Object(o["bindAll"])(this,'initBaseColorPicker'),n&&t.fromElement&&(this.config.components=n.innerHTML),this.attrsOrig=n?Object(o["toArray"])(n.attributes).reduce((function(e,t){return e[t.nodeName]=t.nodeValue,e}),{}):'',D.forEach((function(t){return e.loadModule(t)})),this.on('change:componentHovered',this.componentHovered,this),this.on('change:changesCount',this.updateChanges,this),this.on('change:readyLoad change:readyCanvas',this._checkReady,this),i.forEach((function(t){return e.listenLog(t)})),[{from:'change:selectedComponent',to:'component:toggled'}].forEach((function(t){var n=t.from,r=t.to;e.listenTo(e,n,(function(){for(var t=arguments.length,i=new Array(t),o=0;o<t;o++)i[o]=arguments[o];e.trigger.apply(e,[r].concat(i)),e.logWarning("The event '".concat(n,"' is deprecated, replace it with '").concat(r,"'"))}))}))}},{key:"_checkReady",value:function(){this.get('readyLoad')&&this.get('readyCanvas')&&!this.get('ready')&&this.set('ready',!0)}},{key:"getContainer",value:function(){return this.config.el}},{key:"listenLog",value:function(e){this.listenTo(this,"log:".concat(e),L[e])}},{key:"getConfig",value:function(e){var t=this.config;return Object(o["isUndefined"])(e)?t:t[e]}},{key:"loadOnStart",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null,r=this.get('StorageManager');this.get('toLoad').forEach((function(e){return e.onLoad()}));var i=function(){e.get('modules').forEach((function(t){return t.postLoad&&t.postLoad(e)})),e.set('readyLoad',1),t&&t()};r&&r.canAutoload()?this.load(i):setTimeout(i);var o=new n({noticeOnUnload:!1,storageManager:!1,undoManager:!1});['PageManager','Canvas'].forEach((function(e){return o.get(e).onLoad()})),this.set('shallow',o)}},{key:"updateChanges",value:function(){var e=this,t=this.get('StorageManager'),n=this.get('changesCount');M&&clearTimeout(M),M=setTimeout((function(){return e.trigger('update')})),this.config.noticeOnUnload&&(window.onbeforeunload=n?function(e){return 1}:null),t.isAutosave()&&n>=t.getStepsBeforeSave()&&this.store()}},{key:"loadModule",value:function(e){var t=this.config,n=new(e.default||e),r=n.name.charAt(0).toLowerCase()+n.name.slice(1),i=Object(o["isUndefined"])(t[r])?t[n.name]:t[r],a=!0===i?{}:i||{},s=this.get('StorageManager');if(a.pStylePrefix=t.pStylePrefix||'',Object(o["isUndefined"])(i)||i||(a._disable=1),n.storageKey&&n.store&&n.load&&s){a.stm=s;var l='domComponents'==r?'unshift':'push';this.get('storables')[l](n)}return a.em=this,n.init(_({},a)),!n.private&&this.set(n.name,n),n.onLoad&&this.get('toLoad').push(n),this.get('modules').push(n),this}},{key:"init",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.destroyed&&(this.initialize(t),this.destroyed=0),this.set('Editor',e)}},{key:"getEditor",value:function(){return this.get('Editor')}},{key:"handleUpdates",value:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.__skip||r.temporary||r.noCount||r.avoidStore||!this.get('ready')||(A&&clearTimeout(A),A=setTimeout((function(){var e=n.get('changesCount')||0,t=(r.unset,c()(r,E));n.set('changesCount',e+1,t)}),0))}},{key:"changesUp",value:function(e){this.handleUpdates(0,0,e)}},{key:"componentHovered",value:function(e,t,n){var r=this.previous('componentHovered');r&&this.trigger('component:unhovered',r,n),t&&this.trigger('component:hovered',t,n)}},{key:"getSelected",value:function(){return this.get('selected').lastComponent()}},{key:"getSelectedAll",value:function(){return this.get('selected').allComponents()}},{key:"setSelected",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.event,i=r&&(r.ctrlKey||r.metaKey),s=r||{},l=(s.shiftKey,Object(o["isArray"])(e)),c=(l?e:[e]).map((function(e){return Object(x["getModel"])(e,a["default"])})),u=this.getSelectedAll(),f=this.getConfig('multipleSelection');l&&this.removeSelected(u.filter((function(e){return!Object(o["contains"])(c,e)}))),c.forEach((function(e){var r=Object(x["getModel"])(e);if(r&&(t.trigger('component:select:before',r,n),!r.get('selectable')||n.abort)){if(!n.useValid)return;for(var o=r.parent();o&&!o.get('selectable');)o=o.parent();r=o}if(i&&f)return t.toggleSelected(r);!l&&t.removeSelected(u.filter((function(e){return e!==r}))),t.addSelected(r,n),r}))}},{key:"addSelected",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(x["getModel"])(e,a["default"]),i=Object(o["isArray"])(r)?r:[r];i.forEach((function(e){if(!e||e.get('selectable')){var r=t.get('selected');if(n.forceChange&&t.removeSelected(e,n),r.addComponent(e,n),e&&e.set('chooser',j["i"]),e&&t.trigger('component:select',e,n),e){var i={action:'select-component',opts:{id:e.getId(),username:j["i"]}};j["c"]==j["d"].Synced?(Object(j["h"])(j["d"].ApplyingLocalOp),Object(j["b"])(i)):j["c"]!=j["d"].AwaitingACK&&j["c"]!=j["d"].AwaitingWithBuffer||(Object(j["h"])(j["d"].ApplyingBufferedLocalOp),Object(j["a"])(i))}}}))}},{key:"removeSelected",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(x["getModel"])(e,a["default"]),r=Object(o["isArray"])(n)?n:[n];this.get('selected').removeComponent(n,t),r.forEach((function(e){if(e){e.set('chooser','');var t={action:'unselect-component',opts:{id:e.getId()}};j["c"]==j["d"].Synced?(Object(j["h"])(j["d"].ApplyingLocalOp),Object(j["b"])(t)):j["c"]!=j["d"].AwaitingACK&&j["c"]!=j["d"].AwaitingWithBuffer||(Object(j["h"])(j["d"].ApplyingBufferedLocalOp),Object(j["a"])(t))}}))}},{key:"toggleSelected",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(x["getModel"])(e,a["default"]),i=Object(o["isArray"])(r)?r:[r];i.forEach((function(e){t.get('selected').hasComponent(e)?t.removeSelected(e,n):t.addSelected(e,n)}))}},{key:"setHovered",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!e)return this.set('componentHovered','');var n='component:hover',r=Object(x["getModel"])(e);if(r){if(t.forceChange&&this.set('componentHovered',''),this.trigger("".concat(n,":before"),r,t),!r.get('hoverable')){if(!t.useValid||t.abort)return;for(var i=r&&r.parent();i&&!i.get('hoverable');)i=i.parent();r=i}t.abort||(this.set('componentHovered',r,t),this.trigger(n,r,t))}}},{key:"getHovered",value:function(){return this.get('componentHovered')}},{key:"setComponents",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.get('DomComponents').setComponents(e,t)}},{key:"getComponents",value:function(){var e=this.get('DomComponents'),t=this.get('CodeManager');if(e&&t){var n=e.getComponents();return t.getCode(n,'json')}}},{key:"setStyle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get('CssComposer');return n.clear(t),n.getAll().add(e,t),this}},{key:"addStyle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getStyle().add(e,t);return Object(o["isArray"])(n)?n:[n]}},{key:"getStyle",value:function(){return this.get('CssComposer').getAll()}},{key:"setState",value:function(e){return this.set('state',e),this}},{key:"getState",value:function(){return this.get('state')||''}},{key:"getHtml",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.config,n=t.optsHtml,r=t.exportWrapper,i=t.wrapperIsBody,o=t.jsInHtml?this.getJs(e):'',a=e.component||this.get('DomComponents').getComponent(),s=a?this.get('CodeManager').getCode(a,'html',_(_({exportWrapper:r,wrapperIsBody:i},n),e)):'';return s+=o?"<script>".concat(o,"<\/script>"):''}},{key:"getCss",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.config,n=t.optsCss,r=t.wrapperIsBody,i=e.avoidProtected,a=Object(o["isUndefined"])(e.keepUnusedStyles)?t.keepUnusedStyles:e.keepUnusedStyles,s=this.get('CssComposer'),l=e.component||this.get('DomComponents').getComponent(),c=i?'':t.protectedCss,u=l&&this.get('CodeManager').getCode(l,'css',_(_({cssc:s,wrapperIsBody:r,keepUnusedStyles:a},n),e));return l?e.json?u:c+u:''}},{key:"getJs",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.component||this.get('DomComponents').getWrapper();return t?this.get('CodeManager').getCode(t,'js').trim():''}},{key:"store",value:function(e){var t=this,n=this.get('StorageManager');if(n){var r=this.storeData();return n.store(r,(function(n){e&&e(n,r),t.set('changesCount',0),t.trigger('storage:store',r)})),r}}},{key:"storeVersion",value:function(e,t){var n=this,r=this.get('StorageManager');if(r){var i=this.storeData();return r.storeVersion(i,t,(function(t){e&&e(t,i),n.set('changesCount',0),n.trigger('storage:store',i)})),i}}},{key:"storeData",value:function(){var e={},t=this.getEditing();return t&&t.trigger('sync:content',{noCount:!0}),this.get('storables').forEach((function(t){e=_(_({},e),t.store(1))})),e}},{key:"load",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:null;this.getCacheLoad(1,(function(n){e.loadData(n),t&&t(n)}))}},{key:"loadData",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=this.get('StorageManager'),r=n.__clearKeys(t);return this.get('storables').forEach((function(t){t.load(r),t.postLoad&&t.postLoad(e)})),r}},{key:"getCacheLoad",value:function(e,t){var n=this;if(this.cacheLoad&&!e)return this.cacheLoad;var r=this.get('StorageManager'),i=[];if(!r)return{};this.get('storables').forEach((function(e){var t=e.storageKey;t=Object(o["isFunction"])(t)?t():t,(Object(o["isArray"])(t)?t:[t]).forEach((function(e){return i.push(e)}))})),r.load(i,(function(e){n.cacheLoad=e,t&&t(e),setTimeout((function(){return n.trigger('storage:load',e)}))}))}},{key:"getDeviceModel",value:function(){var e=this.get('device');return this.get('DeviceManager').get(e)}},{key:"runDefault",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.get('Commands').get(this.config.defaultCommand);t&&!this.defaultRunning&&(t.stop(this,this,e),t.run(this,this,e),this.defaultRunning=1)}},{key:"stopDefault",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.get('Commands'),n=t.get(this.config.defaultCommand);n&&this.defaultRunning&&(n.stop(this,this,e),this.defaultRunning=0)}},{key:"refreshCanvas",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.set('canvasOffset',null),this.set('canvasOffset',this.get('Canvas').getOffset()),e.tools&&this.trigger('canvas:updateTools')}},{key:"clearSelection",value:function(e){(e||window).getSelection().removeAllRanges()}},{key:"getCurrentMedia",value:function(){var e=this.config,t=this.getDeviceModel(),n=e.mediaCondition,r=e.devicePreviewMode,i=t&&t.get('widthMedia');return t&&i&&!r?"(".concat(n,": ").concat(i,")"):''}},{key:"getWrapper",value:function(){return this.get('DomComponents').getWrapper()}},{key:"setCurrentFrame",value:function(e){return this.set('currentFrame',e)}},{key:"getCurrentFrame",value:function(){return this.get('currentFrame')}},{key:"getCurrentFrameModel",value:function(){return(this.getCurrentFrame()||{}).model}},{key:"getDirtyCount",value:function(){return this.get('changesCount')}},{key:"getZoomDecimal",value:function(){return this.get('Canvas').getZoomDecimal()}},{key:"getZoomMultiplier",value:function(){return this.get('Canvas').getZoomMultiplier()}},{key:"setDragMode",value:function(e){return this.set('dmode',e)}},{key:"t",value:function(){for(var e=this.get('I18n'),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return null==e?void 0:e.t.apply(e,n)}},{key:"inAbsoluteMode",value:function(){return'absolute'===this.get('dmode')}},{key:"destroyAll",value:function(){var e=this,t=this.config,n=this.view,r=this.getEditor(),i=(t.grapesjs||{}).editors,o=void 0===i?[]:i,s=this.get('shallow');null==s||s.destroyAll(),this.stopListening(),this.stopDefault(),this.get('modules').slice().reverse().forEach((function(e){return e.destroy()})),n&&n.remove(),this.clear({silent:!0}),this.destroyed=1,['config','view','_previousAttributes','_events','_listeners'].forEach((function(t){return e[t]={}})),o.splice(o.indexOf(r),1),Object(x["hasWin"])()&&Object(a["default"])(t.el).empty().attr(this.attrsOrig)}},{key:"getEditing",value:function(){var e=this.get('editing');return e&&e.model||null}},{key:"setEditing",value:function(e){return this.set('editing',e),this}},{key:"isEditing",value:function(){return!!this.get('editing')}},{key:"log",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.ns,r=t.level,i=void 0===r?'debug':r;if(this.trigger('log',e,t),i&&this.trigger("log:".concat(i),e,t),n){var o="log-".concat(n);this.trigger(o,e,t),i&&this.trigger("".concat(o,":").concat(i),e,t)}}},{key:"logInfo",value:function(e,t){this.log(e,_(_({},t),{},{level:'info'}))}},{key:"logWarning",value:function(e,t){this.log(e,_(_({},t),{},{level:'warning'}))}},{key:"logError",value:function(e,t){this.log(e,_(_({},t),{},{level:'error'}))}},{key:"initBaseColorPicker",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getConfig(),r=n.colorPicker,i=void 0===r?{}:r,o=n.el,s=n.stylePrefix;return Object(a["default"])(e).spectrum(_(_({containerClassName:"".concat(s,"one-bg ").concat(s,"two-color"),appendTo:o||'body',maxSelectionSize:8,showPalette:!0,palette:[],showAlpha:!0,chooseText:'Ok',cancelText:'⨯'},t),i))}},{key:"skip",value:function(e){this.__skip=!0;var t=this.get('UndoManager');t?t.skip(e):e(),this.__skip=!1}},{key:"data",value:function(e,t,n){var r='_gjs-data';if(e[r]||(e[r]={}),Object(o["isUndefined"])(n))return e[r][t];e[r][t]=n}}]),n}(w["Model"]);function R(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var F=O.a.$,I=function(e){g()(n,e);var t=R(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"initialize",value:function(){var e=this,t=this.model;t.view=this,this.conf=t.config,this.pn=t.get('Panels'),this.cv=t.get('Canvas'),t.once('change:ready',(function(){e.pn.active(),e.pn.disableButtons(),setTimeout((function(){t.trigger('load',t.get('Editor')),t.set('changesCount',0)}))}))}},{key:"render",value:function(){var e=this.$el,t=this.conf,n=this.model,r=t.stylePrefix,i=F(t.el||"body ".concat(t.container));Object(x["appendStyles"])(t.cssIcons,{unique:1,prepand:1}),e.empty(),t.width&&i.css('width',t.width),t.height&&i.css('height',t.height),e.append(this.cv.render()),e.append(this.pn.render());var o=n.get('shallow').get('Canvas').render();return o.style.display='none',e.append(o),e.attr('class',"".concat(r,"editor ").concat(r,"one-bg ").concat(r,"two-color")),i.addClass("".concat(r,"editor-cont")).empty().append(e),this}}]),n}(w["View"]),z=n(27);n(40);function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.$,r=B(B({},s),e);r.pStylePrefix=r.stylePrefix;var i,o=new N(r);return{$:n,editor:o,modules:[],init:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return o.init(this,B(B({},r),t)),this.modules=['I18n','Utils','Config','Commands','Keymaps','Modal','Panels','Canvas','Parser','CodeManager','UndoManager','RichTextEditor',['Pages','PageManager'],'DomComponents',['Components','DomComponents'],'LayerManager',['Layers','LayerManager'],'CssComposer',['Css','CssComposer'],'StorageManager',['Storage','StorageManager'],'AssetManager',['Assets','AssetManager'],'BlockManager',['Blocks','BlockManager'],'TraitManager',['Traits','TraitManager'],'SelectorManager',['Selectors','SelectorManager'],'StyleManager',['Styles','StyleManager'],'DeviceManager',['Devices','DeviceManager']],this.modules.forEach((function(t){Array.isArray(t)?e[t[0]]=o.get(t[1]):e[t]=o.get(t)})),o.once('change:ready',(function(){e.UndoManager.clear(),o.get('modules').forEach((function(e){e.postRender&&e.postRender(i)}))})),this},disconnectWS:function(){try{Object(j["g"])()}catch(e){console.log('err: ',e)}},getConfig:function(e){return o.getConfig(e)},getHtml:function(e){return o.getHtml(e)},getCss:function(e){return o.getCss(e)},getJs:function(e){return o.getJs(e)},getComponents:function(){return o.get('DomComponents').getComponents()},getWrapper:function(){return o.get('DomComponents').getWrapper()},setComponents:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.setComponents(e,t),this},addComponents:function(e,t){return this.getWrapper().append(e,t)},getStyle:function(){return o.get('CssComposer').getAll()},setStyle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.setStyle(e,t),this},addStyle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.addStyle(e,t)},getSelected:function(){return o.getSelected()},getSelectedAll:function(){return o.getSelectedAll()},getSelectedToStyle:function(){var e=o.getSelected();if(e)return this.StyleManager.getModelToStyle(e)},select:function(e,t){return o.setSelected(e,t),this},selectAdd:function(e){return o.addSelected(e),this},selectRemove:function(e){return o.removeSelected(e),this},selectToggle:function(e){return o.toggleSelected(e),this},getEditing:function(){return o.getEditing()},setDevice:function(e){return o.set('device',e),this},getDevice:function(){return o.get('device')},runCommand:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.get('Commands').run(e,t)},stopCommand:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.get('Commands').stop(e,t)},store:function(e){return o.store(e)},storeVersion:function(e,t){return o.storeVersion(e,t)},storeData:function(){return o.storeData()},load:function(e){return o.load(e)},loadData:function(e){return o.loadData(e)},getContainer:function(){return r.el},getDirtyCount:function(){return o.getDirtyCount()},refresh:function(e){o.refreshCanvas(e)},setCustomRte:function(e){this.RichTextEditor.customRte=e},setCustomParserCss:function(e){return this.Parser.getConfig().parserCss=e,this},setDragMode:function(e){return o.setDragMode(e),this},log:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return o.log(e,t),this},t:function(){var e;return(e=o).t.apply(e,arguments)},on:function(e,t){return o.on(e,t),this},once:function(e,t){return o.once(e,t),this},off:function(e,t){return o.off(e,t),this},trigger:function(e){return o.trigger.apply(o,arguments),this},destroy:function(){var e=this;o&&(o.destroyAll(),this.modules.forEach((function(t){Array.isArray(t)?e[t[0]]=0:e[t]=0})),this.modules=0,i=0,o=0,r=0)},getEl:function(){return i&&i.el},getModel:function(){return o},render:function(){return i&&i.remove(),(i=new I({model:o,config:r})).render().el},onReady:function(e){o.get('ready')?e(this):o.on('load',e)},html:z["a"]}},H={plugins:[]};function W(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function $(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?W(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}!function(){if(Object(x["hasWin"])()&&function(){for(var e,t=window.navigator.userAgent,n=[['edge',/Edge\/([0-9\._]+)/],['ie',/MSIE\s(7\.0)/],['ie',/MSIE\s([0-9\.]+);.*Trident\/[4-7].0/],['ie',/Trident\/7\.0.*rv\:([0-9\.]+).*\).*Gecko$/]],r=0;r<n.length;r++){if(e=n[r][1].exec(t))break}return!!e}()){var e=DOMImplementation.prototype.createHTMLDocument;DOMImplementation.prototype.createHTMLDocument=function(t){return t||(t=''),e.apply(document.implementation,[t])}}}();var q=null,K=null,G=new function(e){var t=e||{};for(var n in H)n in t||(t[n]=H[n]);var r={};return{add:function(e,t){return r[e]?r[e]:(r[e]=t,t)},get:function(e){return r[e]},getAll:function(){return r}}},Y=[],J={autorender:1,plugins:[],pluginsOpts:{}};t["default"]={$:a["default"],editors:Y,plugins:G,version:'0.1.160',init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};!j["f"]&&e.isCollab&&e.noteId&&e.email&&e.username&&Object(j["e"])(e.noteId,e.email,e.username,e.setQueue,e.url);var t=e,n=t.headless,r=e.container;if(!r&&!n)throw new Error("'container' is required");(e=$($($({},J),e),{},{grapesjs:this})).el=!n&&(Object(o["isElement"])(r)?r:document.querySelector(r));var i=new U(e,{$:a["default"]}).init(),s=i.getModel();e.plugins.forEach((function(t){var n=Object(o["isFunction"])(t)?t:G.get(t),r=e.pluginsOpts[t]||{};if(!n){var a=Object(x["getGlobal"])()[t];n=(null==a?void 0:a.default)||a}n?n(i,r):Object(o["isFunction"])(t)?t(i,r):s.logWarning("Plugin ".concat(t," not found"),{context:'plugins',plugin:t})})),s.loadOnStart(),e.autorender&&!n&&i.render(),Y.push(i);var l=i.getWrapper();return l.set('attributes',{id:'Hello!'}),K=(q=i).getModel().getCurrentFrame(),i}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(1);function i(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),i=1;i<t;i++)n[i-1]=arguments[i];var o=e.raw;return o.reduce((function(e,t,i){var a=n[i-1],s=o[i-1];return Array.isArray(a)?a=a.join(''):s&&'$'===s.slice(-1)?e=e.slice(0,-1):a=Object(r["escape"])(a),e+a+t}))}},function(e,t,n){"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function i(e,t,n){return t&&r(e.prototype,t),n&&r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}n.d(t,"a",(function(){return i}))},function(e,t){e.exports=function(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";var r,i=n(121),o=Object.prototype.toString,a=(r=Object.create(null),function(e){var t=o.call(e);return r[t]||(r[t]=t.slice(8,-1).toLowerCase())});function s(e){return e=e.toLowerCase(),function(t){return a(t)===e}}function l(e){return Array.isArray(e)}function c(e){return void 0===e}var u=s('ArrayBuffer');function f(e){return null!==e&&'object'==typeof e}function d(e){if('object'!==a(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}var h=s('Date'),p=s('File'),g=s('Blob'),v=s('FileList');function m(e){return'[object Function]'===o.call(e)}var y=s('URLSearchParams');function b(e,t){if(null!=e)if('object'!=typeof e&&(e=[e]),l(e))for(var n=0,r=e.length;n<r;n++)t.call(null,e[n],n,e);else for(var i in e)Object.prototype.hasOwnProperty.call(e,i)&&t.call(null,e[i],i,e)}var w,O=(w='undefined'!=typeof Uint8Array&&Object.getPrototypeOf(Uint8Array),function(e){return w&&e instanceof w});e.exports={isArray:l,isArrayBuffer:u,isBuffer:function(e){return null!==e&&!c(e)&&null!==e.constructor&&!c(e.constructor)&&'function'==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)},isFormData:function(e){var t='[object FormData]';return e&&('function'==typeof FormData&&e instanceof FormData||o.call(e)===t||m(e.toString)&&e.toString()===t)},isArrayBufferView:function(e){return'undefined'!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer&&u(e.buffer)},isString:function(e){return'string'==typeof e},isNumber:function(e){return'number'==typeof e},isObject:f,isPlainObject:d,isUndefined:c,isDate:h,isFile:p,isBlob:g,isFunction:m,isStream:function(e){return f(e)&&m(e.pipe)},isURLSearchParams:y,isStandardBrowserEnv:function(){return('undefined'==typeof navigator||'ReactNative'!==navigator.product&&'NativeScript'!==navigator.product&&'NS'!==navigator.product)&&('undefined'!=typeof window&&'undefined'!=typeof document)},forEach:b,merge:function e(){var t={};function n(n,r){d(t[r])&&d(n)?t[r]=e(t[r],n):d(n)?t[r]=e({},n):l(n)?t[r]=n.slice():t[r]=n}for(var r=0,i=arguments.length;r<i;r++)b(arguments[r],n);return t},extend:function(e,t,n){return b(t,(function(t,r){e[r]=n&&'function'==typeof t?i(t,n):t})),e},trim:function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,'')},stripBOM:function(e){return 65279===e.charCodeAt(0)&&(e=e.slice(1)),e},inherits:function(e,t,n,r){e.prototype=Object.create(t.prototype,r),e.prototype.constructor=e,n&&Object.assign(e.prototype,n)},toFlatObject:function(e,t,n){var r,i,o,a={};t=t||{};do{for(i=(r=Object.getOwnPropertyNames(e)).length;i-- >0;)a[o=r[i]]||(t[o]=e[o],a[o]=!0);e=Object.getPrototypeOf(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},kindOf:a,kindOfTest:s,endsWith:function(e,t,n){e=String(e),(void 0===n||n>e.length)&&(n=e.length),n-=t.length;var r=e.indexOf(t,n);return-1!==r&&r===n},toArray:function(e){if(!e)return null;var t=e.length;if(c(t))return null;for(var n=new Array(t);t-- >0;)n[t]=e[t];return n},isTypedArray:O,isFileList:v}},function(e,t,n){"use strict";n.d(t,"c",(function(){return y})),n.d(t,"d",(function(){return b})),n.d(t,"e",(function(){return w})),n.d(t,"g",(function(){return O})),n.d(t,"f",(function(){return x})),n.d(t,"a",(function(){return k}));var r=n(22),i=n.n(r),o=n(14),a=n.n(o),s=n(34),l=n.n(s),c=n(3),u=n.n(c),f=n(4),d=n.n(f),h=n(0),p=n(13),g=["at"];function v(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function m(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?v(Object(n),!0).forEach((function(t){u()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):v(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var y=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!t)return[];var r=Object(h["isArray"])(t)||Object(h["isFunction"])(t.map)?t:[t];return r.map((function(t){n.push(t.getId()),e(t.components().models,n)})),n},b=function e(t){(Object(h["isArray"])(t)||Object(h["isFunction"])(t.map)?t:[t]).map((function(t){var n=t.get('attributes');n.id=t.getId(),t.set('attributes',n),e(t.components().models)}))},w=function e(t,n){(Object(h["isArray"])(t)||Object(h["isFunction"])(t.map)?t:[t]).map((function(t){var r=n.shift();t.set('attributes',{id:r}),e(t.components().models,n)}))},O=function e(t,n){(Object(h["isArray"])(t)||Object(h["isFunction"])(t.map)?t:[t]).map((function(t){t.get('chooser')==n&&(t.set('status',''),t.set('chooser','')),e(t.components().models,n)}))},x=function e(t){(Object(h["isArray"])(t)||Object(h["isFunction"])(t.map)?t:[t]).map((function(t){t.get('chooser').length>0&&t.set('status','freezed-remote-selected'),e(t.components().models)}))},k=function e(t){(Object(h["isArray"])(t)||Object(h["isFunction"])(t.map)?t:[t]).map((function(t){t.get('chooser').length>0&&'selected'!=t.get('status')&&'freezed-remote-selected'!=t.get('status')&&t.set('chooser',''),e(t.components().models)}))},C=function e(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=Object(h["isArray"])(t)?t:[t];return i.map((function(t){var i=t.attributes,o=void 0===i?{}:i,a=t.components,s=t.tagName,l=o.id,c=t;if(l&&n[l]&&(c=n[l],s&&c.set({tagName:s},m(m({},r),{},{silent:!0}))),a){var u=e(a,n);if(Object(h["isFunction"])(c.components)){var f=c.components();f.length>0&&f.reset(u,r)}else c.components=u}return c}))};t["b"]=d.a.Collection.extend({initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.opt=t,this.listenTo(this,'add',this.onAdd),this.listenTo(this,'remove',this.removeChildren),this.listenTo(this,'reset',this.resetChildren);var n=t.em,r=t.config;this.config=r,this.em=n,this.domc=t.domc||n&&n.get('DomComponents')},resetChildren:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this,i=n.previousModels||[],o=i.filter((function(t){return!e.get(t.cid)})),a=y(e);n.keepIds=y(i).filter((function(e){return a.indexOf(e)>=0})),o.forEach((function(e){return t.removeChildren(e,r,n)})),e.each((function(e){return t.onAdd(e)}))},resetFromString:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.keepIds=y(this);var r=this.domc,i=(null==r?void 0:r.allById())||{},o=this.parseString(t,n),a=Object(h["isArray"])(o)?o:[o],s=C(a,i,n);this.reset(s,n),null===(e=this.em)||void 0===e||e.trigger('component:content',this.parent,n,t)},removeChildren:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e){var i=this.domc,o=this.em,a=r.temporary||r.fromUndo;if(e.prevColl=this,!a){var s=e.getId(),l=o.get('SelectorManager').getAll(),c=o.get('CssComposer').getAll(),u=(r.keepIds||[]).indexOf(s)<0,f=i?i.allById():{};delete f[s];var d=u?c.remove(c.filter((function(e){return e.getSelectors().getFullString()==="#".concat(s)})),r):[];l.remove(d.map((function(e){return e.getSelectors().at(0)}))),e.opt.temporary||(o.get('Commands').run('core:component-style-clear',{target:e}),e.removed(),e.trigger('removed'),o.trigger('component:remove',e));var h=e.components();h.forEach((function(e){return n.removeChildren(e,t,r)}))}var p=e.components();o.stopListening(p),o.stopListening(e),o.stopListening(e.get('classes')),e.__postRemove()}},model:function(e,t){var n,r=t.collection.opt,i=r.em,o=i.get('DomComponents').componentTypes;t.em=i,t.config=r.config,t.componentTypes=o,t.domc=r.domc;for(var a=0;a<o.length;a++){if(o[a].id==e.type){n=o[a].model;break}}return n||(n=o[o.length-1].model,i&&e.type&&i.logWarning("Component type '".concat(e.type,"' not found"),{attrs:e,options:t})),new n(e,t)},parseString:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.domc,i=n.get('CssComposer'),o=n.get('Parser').parseHtml(e);if(p["a"].checkId(o.html,o.css,r.componentsById,t),o.css&&i&&!t.temporary){t.at;var a=l()(t,g);i.addCollection(o.css,m(m({},a),{},{extend:1}))}return o.html},add:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.keepIds=[].concat(a()(n.keepIds||[]),a()(y(n.previousModels))),Object(h["isString"])(e)?e=this.parseString(e,n):Object(h["isArray"])(e)&&(e=a()(e)).forEach((function(r,i){if(Object(h["isString"])(r)){var o=t.parseString(r,n);e[i]=Object(h["isArray"])(o)&&!o.length?null:o}}));var r=Object(h["isArray"])(e);e=(r?e:[e]).filter((function(e){return e})).map((function(e){return t.processDef(e)})),e=r?Object(h["flatten"])(e,1):e[0];var i=d.a.Collection.prototype.add.apply(this,[e,n]);return this.__firstAdd=i,i},processDef:function(e){if(e.cid&&e.ccid)return e;var t=this.em,n=this.config,r=(void 0===n?{}:n).processor,o=e;if(r){var a=r(o=m({},o));a&&(Object(h["each"])(o,(function(e,t){return delete o[t]})),Object(h["extend"])(o,a))}if(o.$$typeof&&'object'==i()(o.props)){(o=m({},o)).props=m({},o.props);var s=t.get('DomComponents'),l=t.get('Parser').parserHtml;Object(h["each"])(o,(function(e,t){Object(h["includes"])(['props','type'],t)||delete o[t]}));var c=o.props,u=c.children;delete c.children,delete o.props;var f=l.splitPropsFromAttr(c);o.attributes=f.attrs,u&&(o.components=u),o.type?s.getType(o.type)||(o.tagName=o.type,delete o.type):o.type='textnode',Object(h["extend"])(o,f.props)}return o},onAdd:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.domc,i=this.em,o=e.getStyle(),a=i&&i.getConfig('avoidInlineStyle');if(r&&r.Component.ensureInList(e),!Object(h["isEmpty"])(o)&&!a&&i&&i.get&&i.getConfig('forceClass')&&!n.temporary){var s=e.cid;i.get('CssComposer').setClassRule(s,o);e.setStyle({}),e.addClass(s)}e.__postAdd({recursive:1}),this.__onAddEnd()},__onAddEnd:Object(h["debounce"])((function(){}))})},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(24);function i(){i=function(){return e};var e={},t=Object.prototype,n=t.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",l=o.toStringTag||"@@toStringTag";function c(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{c({},"")}catch(e){c=function(e,t,n){return e[t]=n}}function u(e,t,n,r){var i=t&&t.prototype instanceof h?t:h,o=Object.create(i.prototype),a=new S(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return E()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=x(a,n);if(s){if(s===d)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=f(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}e.wrap=u;var d={};function h(){}function p(){}function g(){}var v={};c(v,a,(function(){return this}));var m=Object.getPrototypeOf,y=m&&m(m(j([])));y&&y!==t&&n.call(y,a)&&(v=y);var b=g.prototype=h.prototype=Object.create(v);function w(e){["next","throw","return"].forEach((function(t){c(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){var i;this._invoke=function(o,a){function s(){return new t((function(i,s){!function i(o,a,s,l){var c=f(e[o],e,a);if("throw"!==c.type){var u=c.arg,d=u.value;return d&&"object"==Object(r["a"])(d)&&n.call(d,"__await")?t.resolve(d.__await).then((function(e){i("next",e,s,l)}),(function(e){i("throw",e,s,l)})):t.resolve(d).then((function(e){u.value=e,s(u)}),(function(e){return i("throw",e,s,l)}))}l(c.arg)}(o,a,i,s)}))}return i=i?i.then(s,s):s()}}function x(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,x(e,t),"throw"===t.method))return d;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return d}var r=f(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,d;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,d):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,d)}function k(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function C(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function S(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(k,this),this.reset(!0)}function j(e){if(e){var t=e[a];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var r=-1,i=function t(){for(;++r<e.length;)if(n.call(e,r))return t.value=e[r],t.done=!1,t;return t.value=void 0,t.done=!0,t};return i.next=i}}return{next:E}}function E(){return{value:void 0,done:!0}}return p.prototype=g,c(b,"constructor",g),c(g,"constructor",p),p.displayName=c(g,l,"GeneratorFunction"),e.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===p||"GeneratorFunction"===(t.displayName||t.name))},e.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,g):(e.__proto__=g,c(e,l,"GeneratorFunction")),e.prototype=Object.create(b),e},e.awrap=function(e){return{__await:e}},w(O.prototype),c(O.prototype,s,(function(){return this})),e.AsyncIterator=O,e.async=function(t,n,r,i,o){void 0===o&&(o=Promise);var a=new O(u(t,n,r,i),o);return e.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},w(b),c(b,l,"Generator"),c(b,a,(function(){return this})),c(b,"toString",(function(){return"[object Generator]"})),e.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},e.values=j,S.prototype={constructor:S,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(C),!e)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function r(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var i=this.tryEntries.length-1;i>=0;--i){var o=this.tryEntries[i],a=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var s=n.call(o,"catchLoc"),l=n.call(o,"finallyLoc");if(s&&l){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(s){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===e||"continue"===e)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=e,a.arg=t,o?(this.method="next",this.next=o.finallyLoc,d):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),C(n),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;C(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:j(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),d}},e}},function(e,t,n){var r=n(227);e.exports=function(e,t){if(null==e)return{};var n,i,o=r(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(i=0;i<a.length;i++)n=a[i],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";var r={};function i(e,t){}function o(e,t,n){t||r[n]||(e(!1,n),r[n]=!0)}t["a"]=function(e,t){o(i,e,t)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(8),i=n.n(r),o=n(9),a=n.n(o),s=n(10),l=n.n(s),c=n(11),u=n.n(c),f=n(5),d=n.n(f),h=n(4),p=n(0);function g(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u()(this,n)}}var v=1,m=2,y=function(e){l()(n,e);var t=g(n);function n(){return i()(this,n),t.apply(this,arguments)}return a()(n,[{key:"defaults",value:function(){return{name:'',label:'',type:v,active:!0,private:!1,protected:!1,_undo:!0}}},{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.config,i=void 0===r?{}:r,o=this.get('name'),a=this.get('label');o?a||this.set('label',o):this.set('name',a);var s=this.get('name'),l=i.escapeName,c=l?l(s):n.escapeName(s);this.set('name',c),this.em=i.em}},{key:"isId",value:function(){return this.get('type')===m}},{key:"isClass",value:function(){return this.get('type')===v}},{key:"getFullName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.escape,n=this.get('name'),r='';switch(this.get('type')){case v:r='.';break;case m:r='#'}return r+(t?t(n):n)}},{key:"toString",value:function(){return this.getFullName()}},{key:"getLabel",value:function(){return this.get('label')}},{key:"setLabel",value:function(e){return this.set('label',e)}},{key:"getActive",value:function(){return this.get('active')}},{key:"setActive",value:function(e){return this.set('active',e)}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.em,n=h["Model"].prototype.toJSON.call(this,[e]),r=Object(p["result"])(this,'defaults');if(t&&t.getConfig('avoidDefaults')){Object(p["forEach"])(r,(function(e,t){n[t]===e&&delete n[t]})),n.label===n.name&&delete n.label;var i=Object(p["keys"])(n).length;1===i&&n.name&&(n=n.name),2===i&&n.name&&n.type&&(n=this.getFullName())}return n}}]),n}(h["Model"]);y.prototype.idAttribute='name',y.TYPE_CLASS=v,y.TYPE_ID=m,y.escapeName=function(e){return"".concat(e).trim().replace(/([^a-z0-9\w-\:]+)/gi,'-')}},function(e,t,n){"use strict";var r=n(21),i=n(108);function o(){i.call(this)}r(o,i),o.prototype.removeAllListeners=function(e){e?delete this._listeners[e]:this._listeners={}},o.prototype.once=function(e,t){var n=this,r=!1;this.on(e,(function i(){n.removeListener(e,i),r||(r=!0,t.apply(this,arguments))}))},o.prototype.emit=function(){var e=arguments[0],t=this._listeners[e];if(t){for(var n=arguments.length,r=new Array(n-1),i=1;i<n;i++)r[i-1]=arguments[i];for(var o=0;o<t.length;o++)t[o].apply(this,r)}},o.prototype.on=o.prototype.addListener=i.prototype.addEventListener,o.prototype.removeListener=i.prototype.removeEventListener,e.exports.EventEmitter=o},function(e,t,n){"use strict";function r(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}n.d(t,"a",(function(){return r}))},function(e,t,n){var r;!function(){'use strict';var n={}.hasOwnProperty;function i(){for(var e=[],t=0;t<arguments.length;t++){var r=arguments[t];if(r){var o=typeof r;if('string'===o||'number'===o)e.push(r);else if(Array.isArray(r)){if(r.length){var a=i.apply(null,r);a&&e.push(a)}}else if('object'===o){if(r.toString!==Object.prototype.toString&&!r.toString.toString().includes('[native code]')){e.push(r.toString());continue}for(var s in r)n.call(r,s)&&r[s]&&e.push(s)}}}return e.join(' ')}1&&e.exports?(i.default=i,e.exports=i):1&&(void 0===(r=function(){return i}.apply(t,[]))||(e.exports=r))}()},function(e,t){var n='~',r='\\x'+('0'+n.charCodeAt(0).toString(16)).slice(-2),i='\\'+r,o=new RegExp(r,'g'),a=new RegExp(i,'g'),s=new RegExp('(?:^|([^\\\\]))'+i),l=[].indexOf||function(e){for(var t=this.length;t--&&this[t]!==e;);return t},c=String;function u(e,t,r){return t instanceof Array?function(e,t,n){for(var r=0,i=t.length;r<i;r++)t[r]=u(e,t[r],n);return t}(e,t,r):t instanceof c?t.length?r.hasOwnProperty(t)?r[t]:r[t]=function(e,t){for(var r=0,i=t.length;r<i;e=e[t[r++].replace(a,n)]);return e}(e,t.split(n)):e:t instanceof Object?function(e,t,n){for(var r in t)t.hasOwnProperty(r)&&(t[r]=u(e,t[r],n));return t}(e,t,r):t}var f={stringify:function(e,t,a,s){return f.parser.stringify(e,function(e,t,a){var s,c,u=!1,f=!!t,d=[],h=[e],p=[e],g=[a?n:'[Circular]'],v=e,m=1;return f&&(c='object'==typeof t?function(e,n){return''!==e&&t.indexOf(e)<0?void 0:n}:t),function(e,t){return f&&(t=c.call(this,e,t)),u?(v!==this&&(s=m-l.call(h,this)-1,m-=s,h.splice(m,h.length),d.splice(m-1,d.length),v=this),'object'==typeof t&&t?(l.call(h,t)<0&&h.push(v=t),m=h.length,(s=l.call(p,t))<0?(s=p.push(t)-1,a?(d.push((''+e).replace(o,r)),g[s]=n+d.join(n)):g[s]=g[0]):t=g[s]):'string'==typeof t&&a&&(t=t.replace(r,i).replace(n,r))):u=!0,t}}(e,t,!s),a)},parse:function(e,t){return f.parser.parse(e,function(e){return function(t,o){var a='string'==typeof o;return a&&o.charAt(0)===n?new c(o.slice(1)):(''===t&&(o=u(o,o,{})),a&&(o=o.replace(s,'$1'+n).replace(i,r)),e?e.call(this,t,o):o)}}(t))},parser:JSON};e.exports=f},function(e,t,n){"use strict";function r(e){return(r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}n.d(t,"a",(function(){return s}));var i=n(24),o=n(81);function a(e,t){if(t&&("object"===Object(i["a"])(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return Object(o["a"])(e)}function s(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,i=r(e);if(t){var o=r(this).constructor;n=Reflect.construct(i,arguments,o)}else n=i.apply(this,arguments);return a(this,n)}}},function(e,t,n){"use strict";function r(e,t){return(r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&r(e,t)}n.d(t,"a",(function(){return i}))},function(e,t,n){"use strict";var r=n(107);e.exports={getOrigin:function(e){if(!e)return null;var t=new r(e);if('file:'===t.protocol)return null;var n=t.port;return n||(n='https:'===t.protocol?'443':'80'),t.protocol+'//'+t.hostname+':'+n},isOriginEqual:function(e,t){var n=this.getOrigin(e)===this.getOrigin(t);return n},isSchemeEqual:function(e,t){return e.split(':')[0]===t.split(':')[0]},addPath:function(e,t){var n=e.split('?');return n[0]+t+(n[1]?'?'+n[1]:'')},addQuery:function(e,t){return e+(-1===e.indexOf('?')?'?'+t:'&'+t)},isLoopbackAddr:function(e){return/^127\.([0-9]{1,3})\.([0-9]{1,3})\.([0-9]{1,3})$/i.test(e)||/^\[::1\]$/.test(e)}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return y}));var r=n(8),i=n.n(r),o=n(9),a=n.n(o),s=n(10),l=n.n(s),c=n(11),u=n.n(c),f=n(5),d=n.n(f),h=n(0),p=n(4),g=n(36);function v(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=d()(e);if(t){var i=d()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return u()(this,n)}}var m=function e(t,n){return t.reduce((function(r,i,o){return r.concat(e(t.slice(o+1),"".concat(n).concat(i)))}),[n])},y=function(e){l()(n,e);var t=v(n);function n(){return i()(this,n),t.apply(this,arguments)}return a()(n,[{key:"modelId",value:function(e){return"".concat(e.name,"_").concat(e.type||g["a"].TYPE_CLASS)}},{key:"getStyleable",value:function(){return Object(h["filter"])(this.models,(function(e){return e.get('active')&&!e.get('private')}))}},{key:"getValid",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.noDisabled;return Object(h["filter"])(this.models,(function(e){return!e.get('private')})).filter((function(e){return t?e.get('active'):1}))}},{key:"getFullString",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=e||this;return r.forEach((function(e){return n.push(e.getFullName(t))})),n.join('').trim()}},{key:"getFullName",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.combination,n=e.array,r=[],i=this.map((function(t){return t.getFullName(e)})).sort();return t?i.forEach((function(e,t){r=r.concat(m(i.slice(t+1),e))})):r=i,n?r:t?r.join(','):r.join('')}}]),n}(p["Collection"]);y.prototype.model=g["a"]},function(e,t,n){"use strict";n.r(t);var r='undefined'!=typeof document?document:null,i='undefined'!=typeof window?window:null,o=Array.prototype,a=o.filter,s=o.indexOf,l=o.map,c=o.push,u=o.reverse,f=o.slice,d=o.splice,h=/^#[\w-]*$/,p=/^\.[\w-]*$/,g=/<.+>/,v=/^\w+$/;function m(e,t){return void 0===t&&(t=r),p.test(e)?t.getElementsByClassName(e.slice(1)):v.test(e)?t.getElementsByTagName(e):t.querySelectorAll(e)}function y(e,t){if(void 0===t&&(t=r),e){if(e.__cash)return e;var n=e;if(P(e)){if(t.__cash&&(t=t[0]),!(n=h.test(e)?t.getElementById(e.slice(1)):g.test(e)?he(e):m(e,t)))return}else if(E(e))return this.ready(e);(n.nodeType||n===i)&&(n=[n]),this.length=n.length;for(var o=0,a=this.length;o<a;o++)this[o]=n[o]}}function b(e,t){return new y(e,t)}var w=b.fn=b.prototype=y.prototype={constructor:b,__cash:!0,length:0,splice:d};w.get=function(e){return void 0===e?f.call(this):this[e<0?e+this.length:e]},w.eq=function(e){return b(this.get(e))},w.first=function(){return this.eq(0)},w.last=function(){return this.eq(-1)},w.map=function(e){return b(l.call(this,(function(t,n){return e.call(t,n,t)})))},w.slice=function(){return b(f.apply(this,arguments))};var O=/(?:^\w|[A-Z]|\b\w)/g,x=/[\s-_]+/g;function k(e){return e.replace(O,(function(e,t){return e[t?'toUpperCase':'toLowerCase']()})).replace(x,'')}function C(e,t){for(var n=0,r=e.length;n<r&&!1!==t.call(e[n],e[n],n,e);n++);}b.camelCase=k,b.each=C,w.each=function(e){return C(this,(function(t,n){return e.call(t,n,t)})),this},w.removeProp=function(e){return this.each((function(t,n){delete n[e]}))},b.extend=w.extend=function(e){void 0===e&&(e=this);for(var t=arguments,n=t.length,r=n<2?0:1;r<n;r++)for(var i in t[r])e[i]=t[r][i];return e};var S=1;function j(e,t){var n=e&&(e.matches||e.webkitMatchesSelector||e.mozMatchesSelector||e.msMatchesSelector||e.oMatchesSelector);return!!n&&n.call(e,t)}function E(e){return'function'==typeof e}function P(e){return'string'==typeof e}function _(e){return!isNaN(parseFloat(e))&&isFinite(e)}b.guid=S,b.matches=j,b.isFunction=E,b.isString=P,b.isNumeric=_;var T=Array.isArray;function A(e){return P(e)?function(t,n){return j(n,e)}:e.__cash?function(t,n){return e.is(n)}:function(e,t,n){return t===n}}b.isArray=T,w.prop=function(e,t){if(e){if(P(e))return arguments.length<2?this[0]&&this[0][e]:this.each((function(n,r){r[e]=t}));for(var n in e)this.prop(n,e[n]);return this}},w.filter=function(e){if(!e)return b();var t=E(e)?e:A(e);return b(a.call(this,(function(n,r){return t.call(n,r,n,e)})))};var M=/\S+/g;function D(e){return P(e)&&e.match(M)||[]}function L(e){return e.filter((function(e,t,n){return n.indexOf(e)===t}))}function N(e,t,n){if(1===e.nodeType){var r=i.getComputedStyle(e,null);return t?n?r.getPropertyValue(t):r[t]:r}}function R(e,t){return parseInt(N(e,t),10)||0}w.hasClass=function(e){var t=D(e),n=!1;return t.length&&this.each((function(e,r){return!(n=r.classList.contains(t[0]))})),n},w.removeAttr=function(e){var t=D(e);return t.length?this.each((function(e,n){C(t,(function(e){n.removeAttribute(e)}))})):this},w.attr=function(e,t){if(e){if(P(e)){if(arguments.length<2){if(!this[0])return;var n=this[0].getAttribute(e);return null===n?void 0:n}return null===t?this.removeAttr(e):this.each((function(n,r){r.setAttribute(e,t)}))}for(var r in e)this.attr(r,e[r]);return this}},w.toggleClass=function(e,t){var n=D(e),r=void 0!==t;return n.length?this.each((function(e,i){C(n,(function(e){r?t?i.classList.add(e):i.classList.remove(e):i.classList.toggle(e)}))})):this},w.addClass=function(e){return this.toggleClass(e,!0)},w.removeClass=function(e){return arguments.length?this.toggleClass(e,!1):this.attr('class','')},b.unique=L,w.add=function(e,t){return b(L(this.get().concat(b(e,t).get())))};var F=/^--/;function I(e){return F.test(e)}var z={},V=r&&r.createElement('div'),B=V?V.style:{},U=['webkit','moz','ms','o'];function H(e,t){if(void 0===t&&(t=I(e)),t)return e;if(!z[e]){var n=k(e),r=''+n.charAt(0).toUpperCase()+n.slice(1);C((n+' '+U.join(r+' ')+r).split(' '),(function(t){if(t in B)return z[e]=t,!1}))}return z[e]}b.prefixedProp=H;var W={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function $(e,t,n){return void 0===n&&(n=I(e)),n||W[e]||!_(t)?t:t+'px'}w.css=function(e,t){if(P(e)){var n=I(e);return e=H(e,n),arguments.length<2?this[0]&&N(this[0],e,n):e?(t=$(e,t,n),this.each((function(r,i){1===i.nodeType&&(n?i.style.setProperty(e,t):i.style[e]=t)}))):this}for(var r in e)this.css(r,e[r]);return this};var q='__cashData',K=/^data-(.*)/;function G(e){return e[q]=e[q]||{}}function Y(e,t){var n=G(e);if(t){if(!(t in n)){var r=e.dataset?e.dataset[t]||e.dataset[k(t)]:b(e).attr('data-'+t);if(void 0!==r){try{r=JSON.parse(r)}catch(e){}n[t]=r}}return n[t]}return n}function J(e,t){return R(e,'border'+(t?'Left':'Top')+'Width')+R(e,'padding'+(t?'Left':'Top'))+R(e,'padding'+(t?'Right':'Bottom'))+R(e,'border'+(t?'Right':'Bottom')+'Width')}function X(e,t){for(var n=0,r=t.length;n<r;n++)if(e.indexOf(t[n])<0)return!1;return!0}function Q(e,t,n){C(e[n],(function(e){e[0];var r=e[1];t.removeEventListener(n,r)})),delete e[n]}b.hasData=function(e){return q in e},w.data=function(e,t){var n=this;if(!e){if(!this[0])return;return C(this[0].attributes,(function(e){var t=e.name.match(K);t&&n.data(t[1])})),Y(this[0])}if(P(e))return void 0===t?this[0]&&Y(this[0],e):this.each((function(n,r){return function(e,t,n){G(e)[t]=n}(r,e,t)}));for(var r in e)this.data(r,e[r]);return this},w.removeData=function(e){return this.each((function(t,n){return function(e,t){void 0===t?delete e[q]:delete G(e)[t]}(n,e)}))},C(['Width','Height'],(function(e){w['inner'+e]=function(){if(this[0])return this[0]===i?i['inner'+e]:this[0]['client'+e]}})),C(['width','height'],(function(e,t){w[e]=function(n){return this[0]?arguments.length?(n=parseInt(n,10),this.each((function(r,i){if(1===i.nodeType){var o=N(i,'boxSizing');i.style[e]=$(e,n+('border-box'===o?J(i,!t):0))}}))):this[0]===i?this[0][k('outer-'+e)]:this[0].getBoundingClientRect()[e]-J(this[0],!t):void 0===n?void 0:this}})),C(['Width','Height'],(function(e,t){w['outer'+e]=function(n){if(this[0])return this[0]===i?i['outer'+e]:this[0]['offset'+e]+(n?R(this[0],'margin'+(t?'Top':'Left'))+R(this[0],'margin'+(t?'Bottom':'Right')):0)}}));var Z='__cashEvents',ee='.';function te(e){return e[Z]=e[Z]||{}}function ne(e){var t=e.split(ee);return[t[0],t.slice(1).sort()]}function re(e,t,n,r){var i=te(e);if(t){var o=i[t];if(!o)return;r&&(r.guid=r.guid||S++),i[t]=o.filter((function(i){var o=i[0],a=i[1];if(r&&a.guid!==r.guid||!X(o,n))return!0;e.removeEventListener(t,a)}))}else if(n&&n.length)for(t in i)re(e,t,n,r);else for(t in i)Q(i,e,t)}w.off=function(e,t){var n=this;return void 0===e?this.each((function(e,t){return re(t)})):C(D(e),(function(e){var r=ne(e),i=r[0],o=r[1];n.each((function(e,n){return re(n,i,o,t)}))})),this},w.on=function(e,t,n,r){var i=this;if(!P(e)){for(var o in e)this.on(o,t,e[o]);return this}return E(t)&&(n=t,t=!1),C(D(e),(function(e){var o=ne(e),a=o[0],s=o[1];i.each((function(e,i){var o=function e(o){if(!o.namespace||X(s,o.namespace.split(ee))){var l=i;if(t){for(var c=o.target;!j(c,t);){if(c===i)return;if(!(c=c.parentNode))return}l=c}o.namespace=o.namespace||'';var u=n.call(l,o,o.data);r&&re(i,a,s,e),!1===u&&(o.preventDefault(),o.stopPropagation())}};o.guid=n.guid=n.guid||S++,function(e,t,n,r){r.guid=r.guid||S++;var i=te(e);i[t]=i[t]||[],i[t].push([n,r]),e.addEventListener(t,r)}(i,a,s,o)}))})),this},w.one=function(e,t,n){return this.on(e,t,n,!0)},w.ready=function(e){var t=function(){return e(b)};return'loading'!==r.readyState?setTimeout(t):r.addEventListener('DOMContentLoaded',t),this},w.trigger=function(e,t){var n=e;if(P(e)){var i=ne(e),o=i[0],a=i[1];(n=r.createEvent('HTMLEvents')).initEvent(o,!0,!0),n.namespace=a.join(ee)}return n.data=t,this.each((function(e,t){t.dispatchEvent(n)}))};var ie=/select-one/i,oe=/select-multiple/i;function ae(e){var t=e.type;return ie.test(t)?function(e){return e.selectedIndex<0?null:e.options[e.selectedIndex].value}(e):oe.test(t)?function(e){var t=[];return C(e.options,(function(e){!e.selected||e.disabled||e.parentNode.disabled||t.push(e.value)})),t}(e):e.value}var se=/%20/g;var le=/file|reset|submit|button|image/i,ce=/radio|checkbox/i;w.serialize=function(){var e='';return this.each((function(t,n){C(n.elements||[n],(function(t){if(!t.disabled&&t.name&&'FIELDSET'!==t.tagName&&!le.test(t.type)&&(!ce.test(t.type)||t.checked)){var n=ae(t);if(void 0!==n)C(T(n)?n:[n],(function(n){e+=function(e,t){return'&'+encodeURIComponent(e)+'='+encodeURIComponent(t).replace(se,'+')}(t.name,n)}))}}))})),e.substr(1)},w.val=function(e){return void 0===e?this[0]&&ae(this[0]):this.each((function(t,n){var r=oe.test(n.type),i=null===e?r?[]:'':e;r&&T(i)?C(n.options,(function(e){e.selected=i.indexOf(e.value)>=0})):n.value=i}))},w.clone=function(){return this.map((function(e,t){return t.cloneNode(!0)}))},w.detach=function(){return this.each((function(e,t){t.parentNode&&t.parentNode.removeChild(t)}))};var ue,fe=/^\s*<(\w+)[^>]*>/,de=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function he(e){if(function(){if(!ue){var e=r.createElement('table'),t=r.createElement('tr');ue={'*':r.createElement('div'),tr:r.createElement('tbody'),td:t,th:t,thead:e,tbody:e,tfoot:e}}}(),!P(e))return[];if(de.test(e))return[r.createElement(RegExp.$1)];var t=fe.test(e)&&RegExp.$1,n=ue[t]||ue['*'];return n.innerHTML=e,b(n.childNodes).detach().get()}function pe(e,t,n){if(void 0!==t){var r=P(t);!r&&t.length?C(t,(function(t){return pe(e,t,n)})):C(e,r?function(e){e.insertAdjacentHTML(n?'afterbegin':'beforeend',t)}:function(e,r){return function(e,t,n){n?e.insertBefore(t,e.childNodes[0]):e.appendChild(t)}(e,r?t.cloneNode(!0):t,n)})}}b.parseHTML=he,w.empty=function(){var e=this[0];if(e)for(;e.firstChild;)e.removeChild(e.firstChild);return this},w.append=function(){var e=this;return C(arguments,(function(t){pe(e,t)})),this},w.appendTo=function(e){return pe(b(e),this),this},w.html=function(e){if(void 0===e)return this[0]&&this[0].innerHTML;var t=e.nodeType?e[0].outerHTML:e;return this.each((function(e,n){n.innerHTML=t}))},w.insertAfter=function(e){var t=this;return b(e).each((function(e,n){var r=n.parentNode;t.each((function(t,i){r.insertBefore(e?i.cloneNode(!0):i,n.nextSibling)}))})),this},w.after=function(){var e=this;return C(u.apply(arguments),(function(t){u.apply(b(t).slice()).insertAfter(e)})),this},w.insertBefore=function(e){var t=this;return b(e).each((function(e,n){var r=n.parentNode;t.each((function(t,i){r.insertBefore(e?i.cloneNode(!0):i,n)}))})),this},w.before=function(){var e=this;return C(arguments,(function(t){b(t).insertBefore(e)})),this},w.prepend=function(){var e=this;return C(arguments,(function(t){pe(e,t,!0)})),this},w.prependTo=function(e){return pe(b(e),u.apply(this.slice()),!0),this},w.remove=function(){return this.detach().off()},w.replaceWith=function(e){var t=this;return this.each((function(n,r){var i=r.parentNode;if(i){var o=n?b(e).clone():b(e);if(!o[0])return t.remove(),!1;i.replaceChild(o[0],r),b(o[0]).after(o.slice(1))}}))},w.replaceAll=function(e){return b(e).replaceWith(this),this},w.text=function(e){return void 0===e?this[0]?this[0].textContent:'':this.each((function(t,n){n.textContent=e}))};var ge=r&&r.documentElement;w.offset=function(){var e=this[0];if(e){var t=e.getBoundingClientRect();return{top:t.top+i.pageYOffset-ge.clientTop,left:t.left+i.pageXOffset-ge.clientLeft}}},w.offsetParent=function(){return b(this[0]&&this[0].offsetParent)},w.position=function(){var e=this[0];if(e)return{left:e.offsetLeft,top:e.offsetTop}},w.children=function(e){var t=[];return this.each((function(e,n){c.apply(t,n.children)})),t=b(L(t)),e?t.filter((function(t,n){return j(n,e)})):t},w.contents=function(){var e=[];return this.each((function(t,n){c.apply(e,'IFRAME'===n.tagName?[n.contentDocument]:n.childNodes)})),b(e.length&&L(e))},w.find=function(e){for(var t=[],n=0,r=this.length;n<r;n++){var i=m(e,this[n]);i.length&&c.apply(t,i)}return b(t.length&&L(t))},w.has=function(e){var t=P(e)?function(t,n){return!!m(e,n).length}:function(t,n){return n.contains(e)};return this.filter(t)},w.is=function(e){if(!e||!this[0])return!1;var t=A(e),n=!1;return this.each((function(r,i){return!(n=t(r,i,e))})),n},w.next=function(){return b(this[0]&&this[0].nextElementSibling)},w.not=function(e){if(!e||!this[0])return this;var t=A(e);return this.filter((function(n,r){return!t(n,r,e)}))},w.parent=function(){var e=[];return this.each((function(t,n){n&&n.parentNode&&e.push(n.parentNode)})),b(L(e))},w.index=function(e){var t=e?b(e)[0]:this[0],n=e?this:b(t).parent().children();return s.call(n,t)},w.closest=function(e){return e&&this[0]?this.is(e)?this.filter(e):this.parent().closest(e):b()},w.parents=function(e){var t,n=[];return this.each((function(i,o){for(t=o;t&&t.parentNode&&t!==r.body.parentNode;)t=t.parentNode,(!e||e&&j(t,e))&&n.push(t)})),b(L(n))},w.prev=function(){return b(this[0]&&this[0].previousElementSibling)},w.siblings=function(){var e=this[0];return this.parent().children().filter((function(t,n){return n!==e}))},t["default"]=b},function(e,t,n){var r=n(172)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(14),a=n.n(o),s=n(0),l=n(1);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function u(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["a"]={getConfig:function(e){return this.__getConfig(e)},__getConfig:function(e){var t=this.config||{};return e?t[e]:t},getAll:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.all?e.array?a()(this.all.models):this.all:[]},getAllMap:function(){return this.getAll().reduce((function(e,t){return e[t.get(t.idAttribute)]=t,e}),{})},__initConfig:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=u(u({},e),t),this.em=this.config.em},__initListen:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.all,n=this.em,r=this.events;t&&n&&t.on('add',(function(e,t,i){return n.trigger(r.add,e,i)})).on('remove',(function(e,t,i){return n.trigger(r.remove,e,i)})).on('change',(function(e,t){return n.trigger(r.update,e,e.changedAttributes(),t)})).on('all',this.__catchAllEvent,this),this.cls=[t].concat(e.collections||[]),(e.propagate||[]).forEach((function(e){var r=e.entity,i=e.event;r.on('all',(function(e,r,o,a){var s=u({event:e},a||o);[n,t].map((function(e){return e.trigger(i,r,s)}))}))}))},__remove:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=Object(s["isString"])(e)?this.get(e):e,o=function(){return i&&t.all.remove(i,n),i};return!n.silent&&r&&r.trigger(this.events.removeBefore,i,o,n),!n.abort&&o()},__catchAllEvent:function(e,t,n,r){var i=this.em,o=this.events,a=r||n;i&&o.all&&i.trigger(o.all,{event:e,model:t,options:a}),this.__onAllEvent()},__appendTo:function(){var e=this.getConfig().appendTo;if(e){var t=Object(s["isElement"])(e)?e:document.querySelector(e);if(!t)return this.__logWarn('"appendTo" element not found');t.appendChild(this.render())}},__onAllEvent:function(){},__logWarn:function(e){this.em.logWarning("[".concat(this.name,"]: ").concat(e))},_createId:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:16,n=this.getAll(),r=n.length+t,i=this.getAllMap();do{e=Object(l["createId"])(r)}while(i[e]);return e},__listenAdd:function(e,t){var n=this;e.on('add',(function(e,r,i){return n.em.trigger(t,e,i)}))},__listenRemove:function(e,t){var n=this;e.on('remove',(function(e,r,i){return n.em.trigger(t,e,i)}))},__listenUpdate:function(e,t){var n=this;e.on('change',(function(e,r){return n.em.trigger(t,e,e.changedAttributes(),r)}))},__destroy:function(){this.cls.forEach((function(e){e.stopListening(),e.reset()})),this.em=0}}},function(e,t,n){"use strict";function r(){return!('undefined'==typeof window||!window.document||!window.document.createElement)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";n.r(t);var r=n(22),i=n.n(r),o=n(3),a=n.n(o),s=n(4),l=n.n(s),c=n(0),u=n(1),f=n(18),d=n(65);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=l.a.View.extend({events:function(){return this.model.get('events')||{mousedown:'handleClick'}},attributes:function(){return this.model.get('attributes')},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.config,n=void 0===t?{}:t;this.em=n.em,this.editor=n.editor},handleClick:function(e){e.preventDefault(),e.stopPropagation();var t=this.editor,n=this.em,r=t.Canvas.getFrameEl().getBoundingClientRect(),i=r.left,o=r.top,a=p(p({},e),{},{clientX:e.clientX-i,clientY:e.clientY-o});n.trigger('toolbar:run:before'),this.execCommand(a)},execCommand:function(e){var t={event:e},n=this.model.get('command'),r=this.editor;'function'==typeof n&&n(r,null,t),'string'==typeof n&&r.runCommand(n,t)},render:function(){var e=this.editor,t=this.$el,n=this.model,r=n.get('id'),i=n.get('label'),o=e.getConfig('stylePrefix');return t.addClass("".concat(o,"toolbar-item")),r&&t.addClass("".concat(o,"toolbar-item__").concat(r)),i&&t.append(i),this}}),v=d["a"].extend({itemView:g,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config={editor:e.editor||'',em:e.em},this.listenTo(this.collection,'reset',this.render)}}),m=l.a.Model.extend({defaults:{command:'',attributes:{}}}),y=l.a.Collection.extend({model:m}),b=n(6);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var x,k=l.a.$;t["default"]={init:function(e){Object(c["bindAll"])(this,'onHover','onOut','onClick','onFrameScroll','onFrameUpdated','onContainerChange')},enable:function(){this.frameOff=this.canvasOff=this.adjScroll=null,this.startSelectComponent(),x=1},startSelectComponent:function(){this.toggleSelectComponent(1),this.em.getSelected()&&this.onSelect()},stopSelectComponent:function(){this.toggleSelectComponent()},toggleSelectComponent:function(e){var t=this,n=this.em,r=n.getConfig('listenToEl'),i=n.getContainer().parentNode,o=e?'on':'off',a={on:u["on"],off:u["off"]};!r.length&&i&&r.push(i);a[o](window,'resize',this.onFrameUpdated),a[o](r,'scroll',this.onContainerChange),n[o]('component:toggled component:update undo redo',this.onSelect,this),n[o]('change:componentHovered',this.onHovered,this),n[o]('component:resize styleable:change component:input',this.updateGlobalPos,this),n[o]('component:update:toolbar',this._upToolbar,this),n[o]('change:canvasOffset',this.updateAttached,this),n[o]('frame:updated',this.onFrameUpdated,this),n[o]('canvas:updateTools',this.onFrameUpdated,this),n.get('Canvas').getFrames().forEach((function(e){var n,r,i=e.view;i&&(n=i.getWindow(),r=i.getBody(),a[o](r,'mouseover',t.onHover),a[o](r,'mouseleave',t.onOut),a[o](r,'click touchend',t.onClick),a[o](n,'scroll',t.onFrameScroll,!0))}))},onHover:function(e){e.stopPropagation();var t=this.em,n=e.target,r=Object(u["getViewEl"])(n),i=r&&r._getFrame(),o=k(n),a=o.data('model');if(!a)for(var s=o.parent();!a&&s.length&&!Object(f["i"])(s[0]);)a=s.data('model'),s=s.parent();this.currentDoc=n.ownerDocument,t.setHovered(a,{useValid:!0}),i&&t.set('currentFrame',i)},onFrameUpdated:function(){this.updateLocalPos(),this.updateGlobalPos()},onHovered:function(e,t){var n=this,r={};t?t.views.forEach((function(e){var i=e.el,o=n.getElementPos(i);r={el:i,pos:o,component:t,view:Object(u["getViewEl"])(i)},n.updateToolsLocal(r),i.ownerDocument===n.currentDoc&&(n.elHovered=r)})):(this.currentDoc=null,this.elHovered=0,this.updateToolsLocal(),this.canvas.getFrames().forEach((function(e){var t=e.view,r=t&&t.getToolsEl();r&&n.toggleToolsEl(0,0,{el:r})})))},onSelect:Object(c["debounce"])((function(){var e=this.em,t=e.getSelected(),n=e.get('currentFrame')||{},r=t&&t.getView(n.model),i=r&&r.el,o={};i&&Object(f["j"])(i)&&(o={el:i,pos:this.getElementPos(i),component:t,view:Object(u["getViewEl"])(i)});this.elSelected=o,this.updateToolsGlobal(),this.updateLocalPos(o),this.initResize(t)})),updateGlobalPos:function(){var e=this.getElSelected();e.el&&(e.pos=this.getElementPos(e.el),this.updateToolsGlobal())},updateLocalPos:function(e){var t=this.getElHovered();t.el&&(t.pos=this.getElementPos(t.el),this.updateToolsLocal(e))},getElHovered:function(){return this.elHovered||{}},getElSelected:function(){return this.elSelected||{}},onOut:function(){this.em.setHovered(0)},toggleToolsEl:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.el||this.canvas.getToolsEl(t);return r&&(r.style.display=e?'':'none'),r||{}},showElementOffset:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};x&&this.editor.runCommand('show-offset',{el:e,elPos:t,view:n.view,force:1,top:0,left:0})},hideElementOffset:function(e){this.editor.stopCommand('show-offset',{view:e})},showFixedElementOffset:function(e,t){this.editor.runCommand('show-offset',{el:e,elPos:t,state:'Fixed'})},hideFixedElementOffset:function(e,t){this.editor&&this.editor.stopCommand('show-offset',{state:'Fixed'})},hideHighlighter:function(e){this.canvas.getHighlighter(e).style.opacity=0},onClick:function(e){e.stopPropagation(),e.preventDefault();var t=this.em;if(t.get('_cmpDrag'))return t.set('_cmpDrag');var n=k(e.target),r=n.data('model');if('freezed-remote-selected'!=r.get('status')){if(!r)for(var i=n.parent();!r&&i.length&&!Object(f["i"])(i[0]);)r=i.data('model'),i=i.parent();if(r){if(t.isEditing()&&!r.get('textable')&&r.isChildOf('text'))return;this.select(r,e)}}},select:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&(this.editor.select(e,{event:t,useValid:!0}),this.initResize(e))},updateBadge:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.canvas,i=k(e).data('model');if(i&&i.get('badgable')){var o=this.getBadge(n);if(!n.posOnly){var a=this.canvas.getConfig(),s=i.getIcon(),l=a.pStylePrefix||'',c="".concat(l,"badge"),u=a.customBadgeLabel,f="".concat(s?"<div class=\"".concat(c,"__icon\">").concat(s,"</div>"):'',"\n        <div class=\"").concat(c,"__name\">").concat(i.getName(),"</div>"),d=i.get('chooser');o.innerHTML='freezed-remote-selected'==i.get('status')?d:u?u(i):f}var h='px',p=o.style;p.display='block';var g=r.getTargetToElementFixed(e,o,{pos:t}),v=g.top,m=n.leftOff<0?-n.leftOff:0;p.top=v+h,p.left=m+h}},showHighlighter:function(e){this.canvas.getHighlighter(e).style.opacity=''},initResize:function(e){var t,n=this.em,r=this.canvas,o=n?n.get('Editor'):'',a=(n?n.get('Config'):'').stylePrefix||'',s="".concat(a,"resizing"),l=!Object(c["isElement"])(e)&&Object(u["isTaggableNode"])(e)?e:n.getSelected(),f=l&&l.get('resizable'),d={},h=function(e,t,n){var r=n.docs;r&&r.forEach((function(t){var n=t.body,r=n.className||'';n.className=('add'==e?"".concat(r," ").concat(s):r.replace(s,'')).trim()}))};if(o&&f){var p=Object(c["isElement"])(e)?e:l.getEl();d={onStart:function(e){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.el,a=i.config,s=i.resizer,c=a.keyHeight,f=a.keyWidth,d=a.currentUnit,p=a.keepAutoHeight,g=a.keepAutoWidth;h('add',0,i),t=n.get('StyleManager').getModelToStyle(l),r.toggleFramesEvents();var v=getComputedStyle(o),m=t.getStyle(),y=m[f];a.autoWidth=g&&'auto'===y,isNaN(parseFloat(y))&&(y=v[f]);var b=m[c];a.autoHeight=p&&'auto'===b,isNaN(parseFloat(b))&&(b=v[c]),s.startDim.w=parseFloat(y),s.startDim.h=parseFloat(b),x=0,d&&(a.unitHeight=Object(u["getUnitFromValue"])(b),a.unitWidth=Object(u["getUnitFromValue"])(y))},onMove:function(){o.trigger('component:resize')},onEnd:function(e,t){h('remove',0,t),o.trigger('component:resize'),r.toggleFramesEvents(1),x=1},updateTarget:function(e,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(t){var a=o.store,s=o.selectedHandler,l=o.config,c=o.id,u=l.keyHeight,f=l.keyWidth,d=l.autoHeight,h=l.autoWidth,p=l.unitWidth,g=l.unitHeight,v=['tc','bc'].indexOf(s)>=0,m=['cl','cr'].indexOf(s)>=0,y={},w=a?'':1;if(!v){var x=r.getBody().offsetWidth,k=i.w<x?i.w:x;y[f]=h?'auto':"".concat(k).concat(p)}m||(y[u]=d?'auto':"".concat(i.h).concat(g)),t.addStyle(O(O({},y),{},{en:w}),{avoidStore:!a});var C="update:component:style",S="".concat(C,":").concat(u," ").concat(C,":").concat(f);if(n&&n.trigger(S,null,null,{noEmit:1}),a){var j={id:c,style:y},E={action:'update-style',opts:j};b["c"]==b["d"].Synced?(Object(b["h"])(b["d"].ApplyingLocalOp),Object(b["b"])(E)):b["c"]!=b["d"].AwaitingACK&&b["c"]!=b["d"].AwaitingWithBuffer||(Object(b["h"])(b["d"].ApplyingBufferedLocalOp),Object(b["a"])(E))}}}},'object'==i()(f)&&(d=O(O(O({},d),f),{},{parent:d})),this.resizer=o.runCommand('resize',{el:p,options:d,force:1})}else o.stopCommand('resize'),this.resizer=null},updateToolbar:function(e){var t=this.config.em,n=e==t?t.getSelected():e,r=this.canvas.getToolbarEl(),i=r.style,o=n.get('toolbar'),a=t.get('Config').showToolbar;if(n&&a&&o&&o.length){if(i.display='',!this.toolbar){r.innerHTML='',this.toolbar=new y(o);var s=new v({collection:this.toolbar,editor:this.editor,em:t});r.appendChild(s.render().el)}this.toolbar.reset(o),i.top='-100px',i.left=0}else i.display='none'},updateToolbarPos:function(e){var t='px',n=this.canvas.getToolbarEl().style;n.top="".concat(e.top).concat(t),n.left="".concat(e.left).concat(t),n.opacity=''},getCanvasPosition:function(){return this.canvas.getCanvasView().getPosition()},getBadge:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.canvas.getBadgeEl(e.view)},onFrameScroll:function(){this.updateTools()},updateTools:function(){this.updateLocalPos(),this.updateGlobalPos()},isCompSelected:function(e){return e&&'selected'===e.get('status')},updateToolsLocal:function(e){var t=e||this.getElHovered(),n=t.el,r=t.pos,i=t.view,o=t.component;if(n){var a=o.get('hoverable'),s=this.lastHovered!==n,l=s?{}:{posOnly:1};s&&a&&(this.lastHovered=n,this.showHighlighter(i),this.showElementOffset(n,r,{view:i})),this.isCompSelected(o)&&(this.hideHighlighter(i),this.hideElementOffset(i));var c='px',u=this.toggleToolsEl(1,i),f=u.style,d=this.canvas.canvasRectOffset(n,r),h=d.top,p=d.left;this.updateBadge(n,r,O(O({},l),{},{view:i,topOff:h,leftOff:p})),f.top=h+c,f.left=p+c,f.width=r.width+c,f.height=r.height+c,this._trgToolUp('local',{component:o,el:u,top:h,left:p,width:r.width,height:r.height})}else this.lastHovered=0},_upToolbar:Object(c["debounce"])((function(){this.updateToolsGlobal({force:1})})),_trgToolUp:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em.trigger('canvas:tools:update',O({type:e},t))},updateToolsGlobal:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getElSelected(),n=t.el,r=t.pos,i=t.component;if(!n)return this.toggleToolsEl(),void(this.lastSelected=0);var o=this.canvas,a=this.lastSelected!==n;(a||e.force)&&(this.lastSelected=n,this.updateToolbar(i));var s='px',l=this.toggleToolsEl(1),c=l.style,u=o.getTargetToElementFixed(n,o.getToolbarEl(),{pos:r}),f=u.canvasOffsetTop,d=u.canvasOffsetLeft;c.top=f+s,c.left=d+s,c.width=r.width+s,c.height=r.height+s,this.updateToolbarPos({top:u.top,left:u.left}),this._trgToolUp('global',{component:i,el:l,top:f,left:d,width:r.width,height:r.height})},updateAttached:Object(c["debounce"])((function(){this.updateGlobalPos()})),onContainerChange:Object(c["debounce"])((function(){this.em.refreshCanvas()}),150),getElementPos:function(e){return this.canvas.getCanvasView().getElementPos(e)},hideBadge:function(){this.getBadge().style.display='none'},cleanPrevious:function(e){e&&e.set({status:'',state:''})},getContentWindow:function(){return this.canvas.getWindow()},run:function(e){Object(u["hasWin"])()&&(this.editor=e&&e.get('Editor'),this.enable())},stop:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(Object(u["hasWin"])()){var r=this.em,i=this.editor;this.onHovered(),this.stopSelectComponent(),!n.preserveSelected&&r.setSelected(null),this.toggleToolsEl(),i&&i.stopCommand('resize')}}}},function(e,t,n){"use strict";(function(t){var r=n(58),i={},o=!1,a=t.chrome&&t.chrome.app&&t.chrome.app.runtime;e.exports={attachEvent:function(e,n){void 0!==t.addEventListener?t.addEventListener(e,n,!1):t.document&&t.attachEvent&&(t.document.attachEvent('on'+e,n),t.attachEvent('on'+e,n))},detachEvent:function(e,n){void 0!==t.addEventListener?t.removeEventListener(e,n,!1):t.document&&t.detachEvent&&(t.document.detachEvent('on'+e,n),t.detachEvent('on'+e,n))},unloadAdd:function(e){if(a)return null;var t=r.string(8);return i[t]=e,o&&setTimeout(this.triggerUnloadCallbacks,0),t},unloadDel:function(e){e in i&&delete i[e]},triggerUnloadCallbacks:function(){for(var e in i)i[e](),delete i[e]}};a||e.exports.attachEvent('unload',(function(){o||(o=!0,e.exports.triggerUnloadCallbacks())}))}).call(this,n(23))},function(e,t,n){"use strict";n.d(t,"a",(function(){return g})),n.d(t,"b",(function(){return v}));const{parse:r,stringify:i}=JSON,{keys:o}=Object,a=String,s='string',l={},c='object',u=(e,t)=>t,f=e=>e instanceof a?a(e):e,d=(e,t)=>typeof t===s?new a(t):t,h=(e,t,n,r)=>{const i=[];for(let s=o(n),{length:u}=s,f=0;f<u;f++){const o=s[f],u=n[o];if(u instanceof a){const a=e[u];typeof a!==c||t.has(a)?n[o]=r.call(n,o,a):(t.add(a),n[o]=l,i.push({k:o,a:[e,t,a,r]}))}else n[o]!==l&&(n[o]=r.call(n,o,u))}for(let{length:e}=i,t=0;t<e;t++){const{k:e,a:o}=i[t];n[e]=r.call(n,e,h.apply(null,o))}return n},p=(e,t,n)=>{const r=a(t.push(n)-1);return e.set(n,r),r},g=(e,t)=>{const n=r(e,d).map(f),i=n[0],o=t||u,a=typeof i===c&&i?h(n,new Set,i,o):i;return o.call({'':a},'',a)},v=(e,t,n)=>{const r=t&&typeof t===c?(e,n)=>''===e||-1<t.indexOf(e)?n:void 0:t||u,o=new Map,a=[],l=[];let f=+p(o,a,r.call({'':e},'',e)),d=!f;for(;f<a.length;)d=!0,l[f]=i(a[f++],h,n);return'['+l.join(',')+']';function h(e,t){if(d)return d=!d,t;const n=r.call(this,e,t);switch(typeof n){case c:if(null===n)return n;case s:return o.get(n)||p(o,a,n)}return n}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return h}));var r=n(3),i=n.n(r),o=n(8),a=n.n(o),s=n(9),l=n.n(s),c=n(0),u=n(1);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return a()(this,e),this.opts={container:null,onStart:null,onDrag:null,onEnd:null,setPosition:null,getPosition:null,guidesStatic:null,guidesTarget:null,snapOffset:5,doc:0,scale:1},Object(c["bindAll"])(this,'drag','stop','keyHandle','handleScroll'),this.setOptions(t),this.delta={x:0,y:0},this}return l()(e,[{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=d(d({},this.opts),e)}},{key:"toggleDrag",value:function(e){var t=this.getDocumentEl(),n=this.getContainerEl(),r=this.getWindowEl(),i=e?'on':'off',o={on:u["on"],off:u["off"]};o[i](n,'mousemove dragover',this.drag),o[i](t,'mouseup dragend touchend',this.stop),o[i](t,'keydown',this.keyHandle),o[i](r,'scroll',this.handleScroll)}},{key:"handleScroll",value:function(){var e=this.lastScroll,t=this.delta,n=this.getScrollInfo(),r={x:n.x-e.x,y:n.y-e.y};this.move(t.x+r.x,t.y+r.y),this.lastScrollDiff=r}},{key:"start",value:function(e){var t=this.opts,n=t.onStart;this.toggleDrag(1),this.startPointer=this.getPointerPos(e),this.guidesStatic=Object(c["result"])(t,'guidesStatic')||[],this.guidesTarget=Object(c["result"])(t,'guidesTarget')||[],Object(c["isFunction"])(n)&&n(e,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff={x:0,y:0},this.globScrollDiff={x:0,y:0},this.drag(e)}},{key:"drag",value:function(e){var t=this,n=this.opts,r=this.lastScrollDiff,i=this.globScrollDiff,o=n.onDrag,a=this.startPointer,s=this.getPointerPos(e),l={x:i.x+r.x,y:i.y+r.y};this.globScrollDiff=l;var u={x:s.x-a.x+l.x,y:s.y-a.y+l.y};this.lastScrollDiff={x:0,y:0};var f=this.lockedAxis;'x'===(f=e.shiftKey?!f&&this.detectAxisLock(u.x,u.y):null)?u.x=a.x:'y'===f&&(u.y=a.y);var h=function(r){['x','y'].forEach((function(e){return r[e]=r[e]*Object(c["result"])(n,'scale')})),t.delta=r,t.move(r.x,r.y),Object(c["isFunction"])(o)&&o(e,t)},p=d({},u);if(this.currentPointer=s,this.lockedAxis=f,this.lastScroll=this.getScrollInfo(),h(u),this.guidesTarget.length){var g=this.snapGuides(p),v=g.newDelta,m=g.trgX,y=g.trgY;(m||y)&&h(v)}0===e.which&&this.stop(e)}},{key:"snapGuides",value:function(e){var t=this,n=e,r=this.trgX,i=this.trgY;return this.guidesTarget.forEach((function(n){n.x&&t.trgX||n.y&&t.trgY||(n.active=0,t.guidesStatic.forEach((function(o){if(!(n.y&&o.x||n.x&&o.y)){var a=n.y&&o.y,s=a?'y':'x',l=n[s],u=o[s],f=e[s],d=a?i:r;if(t.isPointIn(l,u)&&Object(c["isUndefined"])(d)){var h=f-(l-u);t.setGuideLock(n,h)}}})))})),r=this.trgX,i=this.trgY,['x','y'].forEach((function(r){var i=r.toUpperCase(),o=t["trg".concat(i)];o&&!t.isPointIn(e[r],o.lock)&&(t.setGuideLock(o,null),o=null),o&&!Object(c["isUndefined"])(o.lock)&&(n[r]=o.lock)})),{newDelta:n,trgX:this.trgX,trgY:this.trgY}}},{key:"isPointIn",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.offset,i=r||this.opts.snapOffset;return e>=t&&e<=t+i||e<=t&&e>=t-i}},{key:"setGuideLock",value:function(e,t){var n=Object(c["isUndefined"])(e.x)?'Y':'X',r="trg".concat(n);return null!==t?(e.active=1,e.lock=t,this[r]=e):(delete e.active,delete e.lock,delete this[r]),e}},{key:"stop",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.delta,r=t.cancel,i=r?0:n.x,o=r?0:n.y;this.toggleDrag(),this.lockedAxis=null,this.move(i,o,1);var a=this.opts.onEnd;Object(c["isFunction"])(a)&&a(e,this,{cancelled:r})}},{key:"keyHandle",value:function(e){Object(u["isEscKey"])(e)&&this.stop(e,{cancel:1})}},{key:"move",value:function(e,t,n){var r=this.el,i=this.opts,o=this.startPosition;if(o){var a=i.setPosition,s=o.x+e,l=o.y+t;this.position={x:s,y:l,end:n},Object(c["isFunction"])(a)&&a(this.position),r&&(r.style.left="".concat(s,"px"),r.style.top="".concat(l,"px"))}}},{key:"getContainerEl",value:function(){var e=this.opts.container;return e?[e]:this.getDocumentEl()}},{key:"getWindowEl",value:function(){return this.getContainerEl().map((function(e){var t=e.ownerDocument||e;return t.defaultView||t.parentWindow}))}},{key:"getDocumentEl",value:function(e){var t=this.opts.doc;if(e=e||this.el,!this.docs){var n=[document];e&&n.push(e.ownerDocument),t&&n.push(t),this.docs=n}return this.docs}},{key:"getPointerPos",value:function(e){var t=this.opts.getPointerPosition,n=Object(u["getPointerEvent"])(e);return t?t(e):{x:n.clientX,y:n.clientY}}},{key:"getStartPosition",value:function(){var e=this.el,t=this.opts.getPosition,n={x:0,y:0};return Object(c["isFunction"])(t)?n=t():e&&(n={x:parseFloat(e.style.left),y:parseFloat(e.style.top)}),n}},{key:"getScrollInfo",value:function(){var e=this.opts.doc,t=e&&e.body;return{y:t?t.scrollTop:0,x:t?t.scrollLeft:0}}},{key:"detectAxisLock",value:function(e,t){var n=e,r=t,i=Math.abs(n),o=Math.abs(r);return r>=i||r<=-i?'x':n>o||n<-o?'y':void 0}}]),e}()},function(e,t,n){e.exports=n(205)},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=i.a.$;t["a"]=i.a.View.extend({events:{change:'handleChange'},template:function(){return"<span class=\"".concat(this.holderClass(),"\"></span>")},inputClass:function(){return"".concat(this.ppfx,"field")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.ppfx||'';this.opts=e,this.ppfx=t,this.em=e.target||{},!e.onChange&&this.listenTo(this.model,'change:value',this.handleModelChange)},elementUpdated:function(){this.model.trigger('el:change')},setValue:function(e){var t=this.model,n=e||t.get('defaults'),r=this.getInputEl();r&&(r.value=n)},handleModelChange:function(e,t,n){this.setValue(t,n)},handleChange:function(e){e.stopPropagation();var t=this.getInputEl().value;this.__onInputChange(t),this.elementUpdated()},__onInputChange:function(e){this.model.set({value:e},{fromInput:1})},getInputEl:function(){if(!this.inputEl){var e=this.model,t=this.opts.type||'text',n=e.get('placeholder')||e.get('defaults')||e.get('default')||'';this.inputEl=o("<input type=\"".concat(t,"\" placeholder=\"").concat(n,"\">"))}return this.inputEl.get(0)},render:function(){this.inputEl=null;var e=this.$el;return e.addClass(this.inputClass()),e.html(this.template()),e.find(".".concat(this.holderClass())).append(this.getInputEl()),this}})},function(e,t,n){"use strict";function r(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}function i(e){return function(){var t=this,n=arguments;return new Promise((function(i,o){var a=e.apply(t,n);function s(e){r(a,i,o,s,l,"next",e)}function l(e){r(a,i,o,s,l,"throw",e)}s(void 0)}))}}n.d(t,"a",(function(){return i}))},function(e,t){function n(e,t,n,r,i,o,a){try{var s=e[o](a),l=s.value}catch(e){return void n(e)}s.done?t(l):Promise.resolve(l).then(r,i)}e.exports=function(e){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=e.apply(t,r);function s(e){n(a,i,o,s,l,"next",e)}function l(e){n(a,i,o,s,l,"throw",e)}s(void 0)}))}},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";var r=n(8),i=n.n(r),o=n(9),a=n.n(o),s=function(){function e(t){i()(this,e),this.cookie=t}return a()(e,[{key:"parseCookie",value:function(e){for(var t={},n=document.cookie.split('; '),r=0,i=n.length;r<i;++r)t[(e=(e=n[r]).split('='))[0]]=e[1];return t}},{key:"getCookieByName",value:function(e){var t=this.parseCookie(this.cookie)[e];return t&&(t=decodeURIComponent(t)),t}}]),e}();t["a"]=s},function(e,t,n){"use strict";var r=n(180),i='abcdefghijklmnopqrstuvwxyz012345';e.exports={string:function(e){for(var t=i.length,n=r.randomBytes(e),o=[],a=0;a<e;a++)o.push(i.substr(n[a]%t,1));return o.join('')},number:function(e){return Math.floor(Math.random()*e)},numberString:function(e){var t=(''+(e-1)).length;return(new Array(t+1).join('0')+this.number(e)).slice(-t)}}},function(e,t,n){"use strict";var r=n(21),i=n(43),o=n(109);function a(e,t,n,r){o.call(this,e,t,function(e){return function(t,n,r){var o={};'string'==typeof n&&(o.headers={'Content-type':'text/plain'});var a=i.addPath(t,'/xhr_send'),s=new e('POST',a,n,o);return s.once('finish',(function(e){if(s=null,200!==e&&204!==e)return r(new Error('http status '+e));r()})),function(){s.close(),s=null;var e=new Error('Aborted');e.code=1e3,r(e)}}}(r),n,r)}r(a,o),e.exports=a},function(e,t,n){"use strict";var r=n(31);function i(e,t,n,r,i){Error.call(this),this.message=e,this.name='AxiosError',t&&(this.code=t),n&&(this.config=n),r&&(this.request=r),i&&(this.response=i)}r.inherits(i,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code,status:this.response&&this.response.status?this.response.status:null}}});var o=i.prototype,a={};['ERR_BAD_OPTION_VALUE','ERR_BAD_OPTION','ECONNABORTED','ETIMEDOUT','ERR_NETWORK','ERR_FR_TOO_MANY_REDIRECTS','ERR_DEPRECATED','ERR_BAD_RESPONSE','ERR_BAD_REQUEST','ERR_CANCELED'].forEach((function(e){a[e]={value:e}})),Object.defineProperties(i,a),Object.defineProperty(o,'isAxiosError',{value:!0}),i.from=function(e,t,n,a,s,l){var c=Object.create(o);return r.toFlatObject(e,c,(function(e){return e!==Error.prototype})),i.call(c,e.message,t,n,a,s),c.name=e.name,l&&Object.assign(c,l),c},e.exports=i},function(e,t,n){1&&(e.exports=function(){'use strict';var e=navigator.userAgent,t=navigator.platform,n=/gecko\/\d/i.test(e),r=/MSIE \d/.test(e),i=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(e),o=/Edge\/(\d+)/.exec(e),a=r||i||o,s=a&&(r?document.documentMode||6:+(o||i)[1]),l=!o&&/WebKit\//.test(e),c=l&&/Qt\/\d+\.\d+/.test(e),u=!o&&/Chrome\//.test(e),f=/Opera\//.test(e),d=/Apple Computer/.test(navigator.vendor),h=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(e),p=/PhantomJS/.test(e),g=d&&(/Mobile\/\w+/.test(e)||navigator.maxTouchPoints>2),v=/Android/.test(e),m=g||v||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(e),y=g||/Mac/.test(t),b=/\bCrOS\b/.test(e),w=/win/i.test(t),O=f&&e.match(/Version\/(\d*\.\d*)/);O&&(O=Number(O[1])),O&&O>=15&&(f=!1,l=!0);var x=y&&(c||f&&(null==O||O<12.11)),k=n||a&&s>=9;function C(e){return new RegExp("(^|\\s)"+e+"(?:$|\\s)\\s*")}var S,j=function(e,t){var n=e.className,r=C(t).exec(n);if(r){var i=n.slice(r.index+r[0].length);e.className=n.slice(0,r.index)+(i?r[1]+i:"")}};function E(e){for(var t=e.childNodes.length;t>0;--t)e.removeChild(e.firstChild);return e}function P(e,t){return E(e).appendChild(t)}function _(e,t,n,r){var i=document.createElement(e);if(n&&(i.className=n),r&&(i.style.cssText=r),"string"==typeof t)i.appendChild(document.createTextNode(t));else if(t)for(var o=0;o<t.length;++o)i.appendChild(t[o]);return i}function T(e,t,n,r){var i=_(e,t,n,r);return i.setAttribute("role","presentation"),i}function A(e,t){if(3==t.nodeType&&(t=t.parentNode),e.contains)return e.contains(t);do{if(11==t.nodeType&&(t=t.host),t==e)return!0}while(t=t.parentNode)}function M(){var e;try{e=document.activeElement}catch(t){e=document.body||null}for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;return e}function D(e,t){var n=e.className;C(t).test(n)||(e.className+=(n?" ":"")+t)}function L(e,t){for(var n=e.split(" "),r=0;r<n.length;r++)n[r]&&!C(n[r]).test(t)&&(t+=" "+n[r]);return t}S=document.createRange?function(e,t,n,r){var i=document.createRange();return i.setEnd(r||e,n),i.setStart(e,t),i}:function(e,t,n){var r=document.body.createTextRange();try{r.moveToElementText(e.parentNode)}catch(e){return r}return r.collapse(!0),r.moveEnd("character",n),r.moveStart("character",t),r};var N=function(e){e.select()};function R(e){var t=Array.prototype.slice.call(arguments,1);return function(){return e.apply(null,t)}}function F(e,t,n){for(var r in t||(t={}),e)!e.hasOwnProperty(r)||!1===n&&t.hasOwnProperty(r)||(t[r]=e[r]);return t}function I(e,t,n,r,i){null==t&&-1==(t=e.search(/[^\s\u00a0]/))&&(t=e.length);for(var o=r||0,a=i||0;;){var s=e.indexOf("\t",o);if(s<0||s>=t)return a+(t-o);a+=s-o,a+=n-a%n,o=s+1}}g?N=function(e){e.selectionStart=0,e.selectionEnd=e.value.length}:a&&(N=function(e){try{e.select()}catch(e){}});var z=function(){this.id=null,this.f=null,this.time=0,this.handler=R(this.onTimeout,this)};function V(e,t){for(var n=0;n<e.length;++n)if(e[n]==t)return n;return-1}z.prototype.onTimeout=function(e){e.id=0,e.time<=+new Date?e.f():setTimeout(e.handler,e.time-+new Date)},z.prototype.set=function(e,t){this.f=t;var n=+new Date+e;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,e),this.time=n)};var B=50,U={toString:function(){return"CodeMirror.Pass"}},H={scroll:!1},W={origin:"*mouse"},$={origin:"+move"};function q(e,t,n){for(var r=0,i=0;;){var o=e.indexOf("\t",r);-1==o&&(o=e.length);var a=o-r;if(o==e.length||i+a>=t)return r+Math.min(a,t-i);if(i+=o-r,r=o+1,(i+=n-i%n)>=t)return r}}var K=[""];function G(e){for(;K.length<=e;)K.push(Y(K)+" ");return K[e]}function Y(e){return e[e.length-1]}function J(e,t){for(var n=[],r=0;r<e.length;r++)n[r]=t(e[r],r);return n}function X(){}function Q(e,t){var n;return Object.create?n=Object.create(e):(X.prototype=e,n=new X),t&&F(t,n),n}var Z=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ee(e){return/\w/.test(e)||e>"€"&&(e.toUpperCase()!=e.toLowerCase()||Z.test(e))}function te(e,t){return t?!!(t.source.indexOf("\\w")>-1&&ee(e))||t.test(e):ee(e)}function ne(e){for(var t in e)if(e.hasOwnProperty(t)&&e[t])return!1;return!0}var re=/[\u0300-\u036f\u0483-\u0489\u0591-\u05bd\u05bf\u05c1\u05c2\u05c4\u05c5\u05c7\u0610-\u061a\u064b-\u065e\u0670\u06d6-\u06dc\u06de-\u06e4\u06e7\u06e8\u06ea-\u06ed\u0711\u0730-\u074a\u07a6-\u07b0\u07eb-\u07f3\u0816-\u0819\u081b-\u0823\u0825-\u0827\u0829-\u082d\u0900-\u0902\u093c\u0941-\u0948\u094d\u0951-\u0955\u0962\u0963\u0981\u09bc\u09be\u09c1-\u09c4\u09cd\u09d7\u09e2\u09e3\u0a01\u0a02\u0a3c\u0a41\u0a42\u0a47\u0a48\u0a4b-\u0a4d\u0a51\u0a70\u0a71\u0a75\u0a81\u0a82\u0abc\u0ac1-\u0ac5\u0ac7\u0ac8\u0acd\u0ae2\u0ae3\u0b01\u0b3c\u0b3e\u0b3f\u0b41-\u0b44\u0b4d\u0b56\u0b57\u0b62\u0b63\u0b82\u0bbe\u0bc0\u0bcd\u0bd7\u0c3e-\u0c40\u0c46-\u0c48\u0c4a-\u0c4d\u0c55\u0c56\u0c62\u0c63\u0cbc\u0cbf\u0cc2\u0cc6\u0ccc\u0ccd\u0cd5\u0cd6\u0ce2\u0ce3\u0d3e\u0d41-\u0d44\u0d4d\u0d57\u0d62\u0d63\u0dca\u0dcf\u0dd2-\u0dd4\u0dd6\u0ddf\u0e31\u0e34-\u0e3a\u0e47-\u0e4e\u0eb1\u0eb4-\u0eb9\u0ebb\u0ebc\u0ec8-\u0ecd\u0f18\u0f19\u0f35\u0f37\u0f39\u0f71-\u0f7e\u0f80-\u0f84\u0f86\u0f87\u0f90-\u0f97\u0f99-\u0fbc\u0fc6\u102d-\u1030\u1032-\u1037\u1039\u103a\u103d\u103e\u1058\u1059\u105e-\u1060\u1071-\u1074\u1082\u1085\u1086\u108d\u109d\u135f\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17b7-\u17bd\u17c6\u17c9-\u17d3\u17dd\u180b-\u180d\u18a9\u1920-\u1922\u1927\u1928\u1932\u1939-\u193b\u1a17\u1a18\u1a56\u1a58-\u1a5e\u1a60\u1a62\u1a65-\u1a6c\u1a73-\u1a7c\u1a7f\u1b00-\u1b03\u1b34\u1b36-\u1b3a\u1b3c\u1b42\u1b6b-\u1b73\u1b80\u1b81\u1ba2-\u1ba5\u1ba8\u1ba9\u1c2c-\u1c33\u1c36\u1c37\u1cd0-\u1cd2\u1cd4-\u1ce0\u1ce2-\u1ce8\u1ced\u1dc0-\u1de6\u1dfd-\u1dff\u200c\u200d\u20d0-\u20f0\u2cef-\u2cf1\u2de0-\u2dff\u302a-\u302f\u3099\u309a\ua66f-\ua672\ua67c\ua67d\ua6f0\ua6f1\ua802\ua806\ua80b\ua825\ua826\ua8c4\ua8e0-\ua8f1\ua926-\ua92d\ua947-\ua951\ua980-\ua982\ua9b3\ua9b6-\ua9b9\ua9bc\uaa29-\uaa2e\uaa31\uaa32\uaa35\uaa36\uaa43\uaa4c\uaab0\uaab2-\uaab4\uaab7\uaab8\uaabe\uaabf\uaac1\uabe5\uabe8\uabed\udc00-\udfff\ufb1e\ufe00-\ufe0f\ufe20-\ufe26\uff9e\uff9f]/;function ie(e){return e.charCodeAt(0)>=768&&re.test(e)}function oe(e,t,n){for(;(n<0?t>0:t<e.length)&&ie(e.charAt(t));)t+=n;return t}function ae(e,t,n){for(var r=t>n?-1:1;;){if(t==n)return t;var i=(t+n)/2,o=r<0?Math.ceil(i):Math.floor(i);if(o==t)return e(o)?t:n;e(o)?n=o:t=o+r}}var se=null;function le(e,t,n){var r;se=null;for(var i=0;i<e.length;++i){var o=e[i];if(o.from<t&&o.to>t)return i;o.to==t&&(o.from!=o.to&&"before"==n?r=i:se=i),o.from==t&&(o.from!=o.to&&"before"!=n?r=i:se=i)}return null!=r?r:se}var ce=function(){var e="bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN",t="nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111",n=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,r=/[stwN]/,i=/[LRr]/,o=/[Lb1n]/,a=/[1n]/;function s(e,t,n){this.level=e,this.from=t,this.to=n}return function(l,c){var u="ltr"==c?"L":"R";if(0==l.length||"ltr"==c&&!n.test(l))return!1;for(var f,d=l.length,h=[],p=0;p<d;++p)h.push((f=l.charCodeAt(p))<=247?e.charAt(f):1424<=f&&f<=1524?"R":1536<=f&&f<=1785?t.charAt(f-1536):1774<=f&&f<=2220?"r":8192<=f&&f<=8203?"w":8204==f?"b":"L");for(var g=0,v=u;g<d;++g){var m=h[g];"m"==m?h[g]=v:v=m}for(var y=0,b=u;y<d;++y){var w=h[y];"1"==w&&"r"==b?h[y]="n":i.test(w)&&(b=w,"r"==w&&(h[y]="R"))}for(var O=1,x=h[0];O<d-1;++O){var k=h[O];"+"==k&&"1"==x&&"1"==h[O+1]?h[O]="1":","!=k||x!=h[O+1]||"1"!=x&&"n"!=x||(h[O]=x),x=k}for(var C=0;C<d;++C){var S=h[C];if(","==S)h[C]="N";else if("%"==S){var j=void 0;for(j=C+1;j<d&&"%"==h[j];++j);for(var E=C&&"!"==h[C-1]||j<d&&"1"==h[j]?"1":"N",P=C;P<j;++P)h[P]=E;C=j-1}}for(var _=0,T=u;_<d;++_){var A=h[_];"L"==T&&"1"==A?h[_]="L":i.test(A)&&(T=A)}for(var M=0;M<d;++M)if(r.test(h[M])){var D=void 0;for(D=M+1;D<d&&r.test(h[D]);++D);for(var L="L"==(M?h[M-1]:u),N=L==("L"==(D<d?h[D]:u))?L?"L":"R":u,R=M;R<D;++R)h[R]=N;M=D-1}for(var F,I=[],z=0;z<d;)if(o.test(h[z])){var V=z;for(++z;z<d&&o.test(h[z]);++z);I.push(new s(0,V,z))}else{var B=z,U=I.length,H="rtl"==c?1:0;for(++z;z<d&&"L"!=h[z];++z);for(var W=B;W<z;)if(a.test(h[W])){B<W&&(I.splice(U,0,new s(1,B,W)),U+=H);var $=W;for(++W;W<z&&a.test(h[W]);++W);I.splice(U,0,new s(2,$,W)),U+=H,B=W}else++W;B<z&&I.splice(U,0,new s(1,B,z))}return"ltr"==c&&(1==I[0].level&&(F=l.match(/^\s+/))&&(I[0].from=F[0].length,I.unshift(new s(0,0,F[0].length))),1==Y(I).level&&(F=l.match(/\s+$/))&&(Y(I).to-=F[0].length,I.push(new s(0,d-F[0].length,d)))),"rtl"==c?I.reverse():I}}();function ue(e,t){var n=e.order;return null==n&&(n=e.order=ce(e.text,t)),n}var fe=[],de=function(e,t,n){if(e.addEventListener)e.addEventListener(t,n,!1);else if(e.attachEvent)e.attachEvent("on"+t,n);else{var r=e._handlers||(e._handlers={});r[t]=(r[t]||fe).concat(n)}};function he(e,t){return e._handlers&&e._handlers[t]||fe}function pe(e,t,n){if(e.removeEventListener)e.removeEventListener(t,n,!1);else if(e.detachEvent)e.detachEvent("on"+t,n);else{var r=e._handlers,i=r&&r[t];if(i){var o=V(i,n);o>-1&&(r[t]=i.slice(0,o).concat(i.slice(o+1)))}}}function ge(e,t){var n=he(e,t);if(n.length)for(var r=Array.prototype.slice.call(arguments,2),i=0;i<n.length;++i)n[i].apply(null,r)}function ve(e,t,n){return"string"==typeof t&&(t={type:t,preventDefault:function(){this.defaultPrevented=!0}}),ge(e,n||t.type,e,t),xe(t)||t.codemirrorIgnore}function me(e){var t=e._handlers&&e._handlers.cursorActivity;if(t)for(var n=e.curOp.cursorActivityHandlers||(e.curOp.cursorActivityHandlers=[]),r=0;r<t.length;++r)-1==V(n,t[r])&&n.push(t[r])}function ye(e,t){return he(e,t).length>0}function be(e){e.prototype.on=function(e,t){de(this,e,t)},e.prototype.off=function(e,t){pe(this,e,t)}}function we(e){e.preventDefault?e.preventDefault():e.returnValue=!1}function Oe(e){e.stopPropagation?e.stopPropagation():e.cancelBubble=!0}function xe(e){return null!=e.defaultPrevented?e.defaultPrevented:0==e.returnValue}function ke(e){we(e),Oe(e)}function Ce(e){return e.target||e.srcElement}function Se(e){var t=e.which;return null==t&&(1&e.button?t=1:2&e.button?t=3:4&e.button&&(t=2)),y&&e.ctrlKey&&1==t&&(t=3),t}var je,Ee,Pe=function(){if(a&&s<9)return!1;var e=_('div');return"draggable"in e||"dragDrop"in e}();function _e(e){if(null==je){var t=_("span","​");P(e,_("span",[t,document.createTextNode("x")])),0!=e.firstChild.offsetHeight&&(je=t.offsetWidth<=1&&t.offsetHeight>2&&!(a&&s<8))}var n=je?_("span","​"):_("span"," ",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}function Te(e){if(null!=Ee)return Ee;var t=P(e,document.createTextNode("AخA")),n=S(t,0,1).getBoundingClientRect(),r=S(t,1,2).getBoundingClientRect();return E(e),!(!n||n.left==n.right)&&(Ee=r.right-n.right<3)}var Ae,Me=3!="\n\nb".split(/\n/).length?function(e){for(var t=0,n=[],r=e.length;t<=r;){var i=e.indexOf("\n",t);-1==i&&(i=e.length);var o=e.slice(t,"\r"==e.charAt(i-1)?i-1:i),a=o.indexOf("\r");-1!=a?(n.push(o.slice(0,a)),t+=a+1):(n.push(o),t=i+1)}return n}:function(e){return e.split(/\r\n?|\n/)},De=window.getSelection?function(e){try{return e.selectionStart!=e.selectionEnd}catch(e){return!1}}:function(e){var t;try{t=e.ownerDocument.selection.createRange()}catch(e){}return!(!t||t.parentElement()!=e)&&0!=t.compareEndPoints("StartToEnd",t)},Le="oncopy"in(Ae=_("div"))||(Ae.setAttribute("oncopy","return;"),"function"==typeof Ae.oncopy),Ne=null,Re={},Fe={};function Ie(e,t){arguments.length>2&&(t.dependencies=Array.prototype.slice.call(arguments,2)),Re[e]=t}function ze(e){if("string"==typeof e&&Fe.hasOwnProperty(e))e=Fe[e];else if(e&&"string"==typeof e.name&&Fe.hasOwnProperty(e.name)){var t=Fe[e.name];"string"==typeof t&&(t={name:t}),(e=Q(t,e)).name=t.name}else{if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+xml$/.test(e))return ze("application/xml");if("string"==typeof e&&/^[\w\-]+\/[\w\-]+\+json$/.test(e))return ze("application/json")}return"string"==typeof e?{name:e}:e||{name:"null"}}function Ve(e,t){t=ze(t);var n=Re[t.name];if(!n)return Ve(e,"text/plain");var r=n(e,t);if(Be.hasOwnProperty(t.name)){var i=Be[t.name];for(var o in i)i.hasOwnProperty(o)&&(r.hasOwnProperty(o)&&(r["_"+o]=r[o]),r[o]=i[o])}if(r.name=t.name,t.helperType&&(r.helperType=t.helperType),t.modeProps)for(var a in t.modeProps)r[a]=t.modeProps[a];return r}var Be={};function Ue(e,t){F(t,Be.hasOwnProperty(e)?Be[e]:Be[e]={})}function He(e,t){if(!0===t)return t;if(e.copyState)return e.copyState(t);var n={};for(var r in t){var i=t[r];i instanceof Array&&(i=i.concat([])),n[r]=i}return n}function We(e,t){for(var n;e.innerMode&&(n=e.innerMode(t))&&n.mode!=e;)t=n.state,e=n.mode;return n||{mode:e,state:t}}function $e(e,t,n){return!e.startState||e.startState(t,n)}var qe=function(e,t,n){this.pos=this.start=0,this.string=e,this.tabSize=t||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function Ke(e,t){if((t-=e.first)<0||t>=e.size)throw new Error("There is no line "+(t+e.first)+" in the document.");for(var n=e;!n.lines;)for(var r=0;;++r){var i=n.children[r],o=i.chunkSize();if(t<o){n=i;break}t-=o}return n.lines[t]}function Ge(e,t,n){var r=[],i=t.line;return e.iter(t.line,n.line+1,(function(e){var o=e.text;i==n.line&&(o=o.slice(0,n.ch)),i==t.line&&(o=o.slice(t.ch)),r.push(o),++i})),r}function Ye(e,t,n){var r=[];return e.iter(t,n,(function(e){r.push(e.text)})),r}function Je(e,t){var n=t-e.height;if(n)for(var r=e;r;r=r.parent)r.height+=n}function Xe(e){if(null==e.parent)return null;for(var t=e.parent,n=V(t.lines,e),r=t.parent;r;t=r,r=r.parent)for(var i=0;r.children[i]!=t;++i)n+=r.children[i].chunkSize();return n+t.first}function Qe(e,t){var n=e.first;e:do{for(var r=0;r<e.children.length;++r){var i=e.children[r],o=i.height;if(t<o){e=i;continue e}t-=o,n+=i.chunkSize()}return n}while(!e.lines);for(var a=0;a<e.lines.length;++a){var s=e.lines[a].height;if(t<s)break;t-=s}return n+a}function Ze(e,t){return t>=e.first&&t<e.first+e.size}function et(e,t){return String(e.lineNumberFormatter(t+e.firstLineNumber))}function tt(e,t,n){if(void 0===n&&(n=null),!(this instanceof tt))return new tt(e,t,n);this.line=e,this.ch=t,this.sticky=n}function nt(e,t){return e.line-t.line||e.ch-t.ch}function rt(e,t){return e.sticky==t.sticky&&0==nt(e,t)}function it(e){return tt(e.line,e.ch)}function ot(e,t){return nt(e,t)<0?t:e}function at(e,t){return nt(e,t)<0?e:t}function st(e,t){return Math.max(e.first,Math.min(t,e.first+e.size-1))}function lt(e,t){if(t.line<e.first)return tt(e.first,0);var n=e.first+e.size-1;return t.line>n?tt(n,Ke(e,n).text.length):function(e,t){var n=e.ch;return null==n||n>t?tt(e.line,t):n<0?tt(e.line,0):e}(t,Ke(e,t.line).text.length)}function ct(e,t){for(var n=[],r=0;r<t.length;r++)n[r]=lt(e,t[r]);return n}qe.prototype.eol=function(){return this.pos>=this.string.length},qe.prototype.sol=function(){return this.pos==this.lineStart},qe.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},qe.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},qe.prototype.eat=function(e){var t=this.string.charAt(this.pos);if("string"==typeof e?t==e:t&&(e.test?e.test(t):e(t)))return++this.pos,t},qe.prototype.eatWhile=function(e){for(var t=this.pos;this.eat(e););return this.pos>t},qe.prototype.eatSpace=function(){for(var e=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e},qe.prototype.skipToEnd=function(){this.pos=this.string.length},qe.prototype.skipTo=function(e){var t=this.string.indexOf(e,this.pos);if(t>-1)return this.pos=t,!0},qe.prototype.backUp=function(e){this.pos-=e},qe.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=I(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},qe.prototype.indentation=function(){return I(this.string,null,this.tabSize)-(this.lineStart?I(this.string,this.lineStart,this.tabSize):0)},qe.prototype.match=function(e,t,n){if("string"!=typeof e){var r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&!1!==t&&(this.pos+=r[0].length),r)}var i=function(e){return n?e.toLowerCase():e};if(i(this.string.substr(this.pos,e.length))==i(e))return!1!==t&&(this.pos+=e.length),!0},qe.prototype.current=function(){return this.string.slice(this.start,this.pos)},qe.prototype.hideFirstChars=function(e,t){this.lineStart+=e;try{return t()}finally{this.lineStart-=e}},qe.prototype.lookAhead=function(e){var t=this.lineOracle;return t&&t.lookAhead(e)},qe.prototype.baseToken=function(){var e=this.lineOracle;return e&&e.baseToken(this.pos)};var ut=function(e,t){this.state=e,this.lookAhead=t},ft=function(e,t,n,r){this.state=t,this.doc=e,this.line=n,this.maxLookAhead=r||0,this.baseTokens=null,this.baseTokenPos=1};function dt(e,t,n,r){var i=[e.state.modeGen],o={};Ot(e,t.text,e.doc.mode,n,(function(e,t){return i.push(e,t)}),o,r);for(var a=n.state,s=function(r){n.baseTokens=i;var s=e.state.overlays[r],l=1,c=0;n.state=!0,Ot(e,t.text,s.mode,n,(function(e,t){for(var n=l;c<e;){var r=i[l];r>e&&i.splice(l,1,e,i[l+1],r),l+=2,c=Math.min(e,r)}if(t)if(s.opaque)i.splice(n,l-n,e,"overlay "+t),l=n+2;else for(;n<l;n+=2){var o=i[n+1];i[n+1]=(o?o+" ":"")+"overlay "+t}}),o),n.state=a,n.baseTokens=null,n.baseTokenPos=1},l=0;l<e.state.overlays.length;++l)s(l);return{styles:i,classes:o.bgClass||o.textClass?o:null}}function ht(e,t,n){if(!t.styles||t.styles[0]!=e.state.modeGen){var r=pt(e,Xe(t)),i=t.text.length>e.options.maxHighlightLength&&He(e.doc.mode,r.state),o=dt(e,t,r);i&&(r.state=i),t.stateAfter=r.save(!i),t.styles=o.styles,o.classes?t.styleClasses=o.classes:t.styleClasses&&(t.styleClasses=null),n===e.doc.highlightFrontier&&(e.doc.modeFrontier=Math.max(e.doc.modeFrontier,++e.doc.highlightFrontier))}return t.styles}function pt(e,t,n){var r=e.doc,i=e.display;if(!r.mode.startState)return new ft(r,!0,t);var o=function(e,t,n){for(var r,i,o=e.doc,a=n?-1:t-(e.doc.mode.innerMode?1e3:100),s=t;s>a;--s){if(s<=o.first)return o.first;var l=Ke(o,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ut?c.lookAhead:0)<=o.modeFrontier))return s;var u=I(l.text,null,e.options.tabSize);(null==i||r>u)&&(i=s-1,r=u)}return i}(e,t,n),a=o>r.first&&Ke(r,o-1).stateAfter,s=a?ft.fromSaved(r,a,o):new ft(r,$e(r.mode),o);return r.iter(o,t,(function(n){gt(e,n.text,s);var r=s.line;n.stateAfter=r==t-1||r%5==0||r>=i.viewFrom&&r<i.viewTo?s.save():null,s.nextLine()})),n&&(r.modeFrontier=s.line),s}function gt(e,t,n,r){var i=e.doc.mode,o=new qe(t,e.options.tabSize,n);for(o.start=o.pos=r||0,""==t&&vt(i,n.state);!o.eol();)mt(i,o,n.state),o.start=o.pos}function vt(e,t){if(e.blankLine)return e.blankLine(t);if(e.innerMode){var n=We(e,t);return n.mode.blankLine?n.mode.blankLine(n.state):void 0}}function mt(e,t,n,r){for(var i=0;i<10;i++){r&&(r[0]=We(e,n).mode);var o=e.token(t,n);if(t.pos>t.start)return o}throw new Error("Mode "+e.name+" failed to advance stream.")}ft.prototype.lookAhead=function(e){var t=this.doc.getLine(this.line+e);return null!=t&&e>this.maxLookAhead&&(this.maxLookAhead=e),t},ft.prototype.baseToken=function(e){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=e;)this.baseTokenPos+=2;var t=this.baseTokens[this.baseTokenPos+1];return{type:t&&t.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-e}},ft.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},ft.fromSaved=function(e,t,n){return t instanceof ut?new ft(e,He(e.mode,t.state),n,t.lookAhead):new ft(e,He(e.mode,t),n)},ft.prototype.save=function(e){var t=!1!==e?He(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ut(t,this.maxLookAhead):t};var yt=function(e,t,n){this.start=e.start,this.end=e.pos,this.string=e.current(),this.type=t||null,this.state=n};function bt(e,t,n,r){var i,o,a=e.doc,s=a.mode,l=Ke(a,(t=lt(a,t)).line),c=pt(e,t.line,n),u=new qe(l.text,e.options.tabSize,c);for(r&&(o=[]);(r||u.pos<t.ch)&&!u.eol();)u.start=u.pos,i=mt(s,u,c.state),r&&o.push(new yt(u,i,He(a.mode,c.state)));return r?o:new yt(u,i,c.state)}function wt(e,t){if(e)for(;;){var n=e.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;e=e.slice(0,n.index)+e.slice(n.index+n[0].length);var r=n[1]?"bgClass":"textClass";null==t[r]?t[r]=n[2]:new RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(t[r])||(t[r]+=" "+n[2])}return e}function Ot(e,t,n,r,i,o,a){var s=n.flattenSpans;null==s&&(s=e.options.flattenSpans);var l,c=0,u=null,f=new qe(t,e.options.tabSize,r),d=e.options.addModeClass&&[null];for(""==t&&wt(vt(n,r.state),o);!f.eol();){if(f.pos>e.options.maxHighlightLength?(s=!1,a&&gt(e,t,r,f.pos),f.pos=t.length,l=null):l=wt(mt(n,f,r.state,d),o),d){var h=d[0].name;h&&(l="m-"+(l?h+" "+l:h))}if(!s||u!=l){for(;c<f.start;)i(c=Math.min(f.start,c+5e3),u);u=l}f.start=f.pos}for(;c<f.pos;){var p=Math.min(f.pos,c+5e3);i(p,u),c=p}}var xt=!1,kt=!1;function Ct(e,t,n){this.marker=e,this.from=t,this.to=n}function St(e,t){if(e)for(var n=0;n<e.length;++n){var r=e[n];if(r.marker==t)return r}}function jt(e,t){for(var n,r=0;r<e.length;++r)e[r]!=t&&(n||(n=[])).push(e[r]);return n}function Et(e,t){if(t.full)return null;var n=Ze(e,t.from.line)&&Ke(e,t.from.line).markedSpans,r=Ze(e,t.to.line)&&Ke(e,t.to.line).markedSpans;if(!n&&!r)return null;var i=t.from.ch,o=t.to.ch,a=0==nt(t.from,t.to),s=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t)||o.from==t&&"bookmark"==a.type&&(!n||!o.marker.insertLeft)){var s=null==o.to||(a.inclusiveRight?o.to>=t:o.to>t);(r||(r=[])).push(new Ct(a,o.from,s?null:o.to))}}return r}(n,i,a),l=function(e,t,n){var r;if(e)for(var i=0;i<e.length;++i){var o=e[i],a=o.marker;if(null==o.to||(a.inclusiveRight?o.to>=t:o.to>t)||o.from==t&&"bookmark"==a.type&&(!n||o.marker.insertLeft)){var s=null==o.from||(a.inclusiveLeft?o.from<=t:o.from<t);(r||(r=[])).push(new Ct(a,s?null:o.from-t,null==o.to?null:o.to-t))}}return r}(r,o,a),c=1==t.text.length,u=Y(t.text).length+(c?i:0);if(s)for(var f=0;f<s.length;++f){var d=s[f];if(null==d.to){var h=St(l,d.marker);h?c&&(d.to=null==h.to?null:h.to+u):d.to=i}}if(l)for(var p=0;p<l.length;++p){var g=l[p];null!=g.to&&(g.to+=u),null==g.from?St(s,g.marker)||(g.from=u,c&&(s||(s=[])).push(g)):(g.from+=u,c&&(s||(s=[])).push(g))}s&&(s=Pt(s)),l&&l!=s&&(l=Pt(l));var v=[s];if(!c){var m,y=t.text.length-2;if(y>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(m||(m=[])).push(new Ct(s[b].marker,null,null));for(var w=0;w<y;++w)v.push(m);v.push(l)}return v}function Pt(e){for(var t=0;t<e.length;++t){var n=e[t];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&e.splice(t--,1)}return e.length?e:null}function _t(e){var t=e.markedSpans;if(t){for(var n=0;n<t.length;++n)t[n].marker.detachLine(e);e.markedSpans=null}}function Tt(e,t){if(t){for(var n=0;n<t.length;++n)t[n].marker.attachLine(e);e.markedSpans=t}}function At(e){return e.inclusiveLeft?-1:0}function Mt(e){return e.inclusiveRight?1:0}function Dt(e,t){var n=e.lines.length-t.lines.length;if(0!=n)return n;var r=e.find(),i=t.find(),o=nt(r.from,i.from)||At(e)-At(t);if(o)return-o;var a=nt(r.to,i.to)||Mt(e)-Mt(t);return a||t.id-e.id}function Lt(e,t){var n,r=kt&&e.markedSpans;if(r)for(var i=void 0,o=0;o<r.length;++o)(i=r[o]).marker.collapsed&&null==(t?i.from:i.to)&&(!n||Dt(n,i.marker)<0)&&(n=i.marker);return n}function Nt(e){return Lt(e,!0)}function Rt(e){return Lt(e,!1)}function Ft(e,t){var n,r=kt&&e.markedSpans;if(r)for(var i=0;i<r.length;++i){var o=r[i];o.marker.collapsed&&(null==o.from||o.from<t)&&(null==o.to||o.to>t)&&(!n||Dt(n,o.marker)<0)&&(n=o.marker)}return n}function It(e,t,n,r,i){var o=Ke(e,t),a=kt&&o.markedSpans;if(a)for(var s=0;s<a.length;++s){var l=a[s];if(l.marker.collapsed){var c=l.marker.find(0),u=nt(c.from,n)||At(l.marker)-At(i),f=nt(c.to,r)||Mt(l.marker)-Mt(i);if(!(u>=0&&f<=0||u<=0&&f>=0)&&(u<=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?nt(c.to,n)>=0:nt(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&i.inclusiveLeft?nt(c.from,r)<=0:nt(c.from,r)<0)))return!0}}}function zt(e){for(var t;t=Nt(e);)e=t.find(-1,!0).line;return e}function Vt(e,t){var n=Ke(e,t),r=zt(n);return n==r?t:Xe(r)}function Bt(e,t){if(t>e.lastLine())return t;var n,r=Ke(e,t);if(!Ut(e,r))return t;for(;n=Rt(r);)r=n.find(1,!0).line;return Xe(r)+1}function Ut(e,t){var n=kt&&t.markedSpans;if(n)for(var r=void 0,i=0;i<n.length;++i)if((r=n[i]).marker.collapsed){if(null==r.from)return!0;if(!r.marker.widgetNode&&0==r.from&&r.marker.inclusiveLeft&&Ht(e,t,r))return!0}}function Ht(e,t,n){if(null==n.to){var r=n.marker.find(1,!0);return Ht(e,r.line,St(r.line.markedSpans,n.marker))}if(n.marker.inclusiveRight&&n.to==t.text.length)return!0;for(var i=void 0,o=0;o<t.markedSpans.length;++o)if((i=t.markedSpans[o]).marker.collapsed&&!i.marker.widgetNode&&i.from==n.to&&(null==i.to||i.to!=n.from)&&(i.marker.inclusiveLeft||n.marker.inclusiveRight)&&Ht(e,t,i))return!0}function Wt(e){for(var t=0,n=(e=zt(e)).parent,r=0;r<n.lines.length;++r){var i=n.lines[r];if(i==e)break;t+=i.height}for(var o=n.parent;o;o=(n=o).parent)for(var a=0;a<o.children.length;++a){var s=o.children[a];if(s==n)break;t+=s.height}return t}function $t(e){if(0==e.height)return 0;for(var t,n=e.text.length,r=e;t=Nt(r);){var i=t.find(0,!0);r=i.from.line,n+=i.from.ch-i.to.ch}for(r=e;t=Rt(r);){var o=t.find(0,!0);n-=r.text.length-o.from.ch,n+=(r=o.to.line).text.length-o.to.ch}return n}function qt(e){var t=e.display,n=e.doc;t.maxLine=Ke(n,n.first),t.maxLineLength=$t(t.maxLine),t.maxLineChanged=!0,n.iter((function(e){var n=$t(e);n>t.maxLineLength&&(t.maxLineLength=n,t.maxLine=e)}))}var Kt=function(e,t,n){this.text=e,Tt(this,t),this.height=n?n(this):1};function Gt(e){e.parent=null,_t(e)}Kt.prototype.lineNo=function(){return Xe(this)},be(Kt);var Yt={},Jt={};function Xt(e,t){if(!e||/^\s*$/.test(e))return null;var n=t.addModeClass?Jt:Yt;return n[e]||(n[e]=e.replace(/\S+/g,"cm-$&"))}function Qt(e,t){var n=T("span",null,null,l?"padding-right: .1px":null),r={pre:T("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:e,trailingSpace:!1,splitSpaces:e.getOption("lineWrapping")};t.measure={};for(var i=0;i<=(t.rest?t.rest.length:0);i++){var o=i?t.rest[i-1]:t.line,a=void 0;r.pos=0,r.addToken=en,Te(e.display.measure)&&(a=ue(o,e.doc.direction))&&(r.addToken=tn(r.addToken,a)),r.map=[],rn(o,r,ht(e,o,t!=e.display.externalMeasured&&Xe(o))),o.styleClasses&&(o.styleClasses.bgClass&&(r.bgClass=L(o.styleClasses.bgClass,r.bgClass||"")),o.styleClasses.textClass&&(r.textClass=L(o.styleClasses.textClass,r.textClass||""))),0==r.map.length&&r.map.push(0,0,r.content.appendChild(_e(e.display.measure))),0==i?(t.measure.map=r.map,t.measure.cache={}):((t.measure.maps||(t.measure.maps=[])).push(r.map),(t.measure.caches||(t.measure.caches=[])).push({}))}if(l){var s=r.content.lastChild;(/\bcm-tab\b/.test(s.className)||s.querySelector&&s.querySelector(".cm-tab"))&&(r.content.className="cm-tab-wrap-hack")}return ge(e,"renderLine",e,t.line,r.pre),r.pre.className&&(r.textClass=L(r.pre.className,r.textClass||"")),r}function Zt(e){var t=_("span","•","cm-invalidchar");return t.title="\\u"+e.charCodeAt(0).toString(16),t.setAttribute("aria-label",t.title),t}function en(e,t,n,r,i,o,l){if(t){var c,u=e.splitSpaces?function(e,t){if(e.length>1&&!/  /.test(e))return e;for(var n=t,r="",i=0;i<e.length;i++){var o=e.charAt(i);" "!=o||!n||i!=e.length-1&&32!=e.charCodeAt(i+1)||(o=" "),r+=o,n=" "==o}return r}(t,e.trailingSpace):t,f=e.cm.state.specialChars,d=!1;if(f.test(t)){c=document.createDocumentFragment();for(var h=0;1;){f.lastIndex=h;var p=f.exec(t),g=p?p.index-h:t.length-h;if(g){var v=document.createTextNode(u.slice(h,h+g));a&&s<9?c.appendChild(_("span",[v])):c.appendChild(v),e.map.push(e.pos,e.pos+g,v),e.col+=g,e.pos+=g}if(!p)break;h+=g+1;var m=void 0;if("\t"==p[0]){var y=e.cm.options.tabSize,b=y-e.col%y;(m=c.appendChild(_("span",G(b),"cm-tab"))).setAttribute("role","presentation"),m.setAttribute("cm-text","\t"),e.col+=b}else"\r"==p[0]||"\n"==p[0]?((m=c.appendChild(_("span","\r"==p[0]?"␍":"␤","cm-invalidchar"))).setAttribute("cm-text",p[0]),e.col+=1):((m=e.cm.options.specialCharPlaceholder(p[0])).setAttribute("cm-text",p[0]),a&&s<9?c.appendChild(_("span",[m])):c.appendChild(m),e.col+=1);e.map.push(e.pos,e.pos+1,m),e.pos++}}else e.col+=t.length,c=document.createTextNode(u),e.map.push(e.pos,e.pos+t.length,c),a&&s<9&&(d=!0),e.pos+=t.length;if(e.trailingSpace=32==u.charCodeAt(t.length-1),n||r||i||d||o||l){var w=n||"";r&&(w+=r),i&&(w+=i);var O=_("span",[c],w,o);if(l)for(var x in l)l.hasOwnProperty(x)&&"style"!=x&&"class"!=x&&O.setAttribute(x,l[x]);return e.content.appendChild(O)}e.content.appendChild(c)}}function tn(e,t){return function(n,r,i,o,a,s,l){i=i?i+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+r.length;;){for(var f=void 0,d=0;d<t.length&&!((f=t[d]).to>c&&f.from<=c);d++);if(f.to>=u)return e(n,r,i,o,a,s,l);e(n,r.slice(0,f.to-c),i,o,null,s,l),o=null,r=r.slice(f.to-c),c=f.to}}}function nn(e,t,n,r){var i=!r&&n.widgetNode;i&&e.map.push(e.pos,e.pos+t,i),!r&&e.cm.display.input.needsContentAttribute&&(i||(i=e.content.appendChild(document.createElement("span"))),i.setAttribute("cm-marker",n.id)),i&&(e.cm.display.input.setUneditable(i),e.content.appendChild(i)),e.pos+=t,e.trailingSpace=!1}function rn(e,t,n){var r=e.markedSpans,i=e.text,o=0;if(r)for(var a,s,l,c,u,f,d,h=i.length,p=0,g=1,v="",m=0;;){if(m==p){l=c=u=s="",d=null,f=null,m=1/0;for(var y=[],b=void 0,w=0;w<r.length;++w){var O=r[w],x=O.marker;if("bookmark"==x.type&&O.from==p&&x.widgetNode)y.push(x);else if(O.from<=p&&(null==O.to||O.to>p||x.collapsed&&O.to==p&&O.from==p)){if(null!=O.to&&O.to!=p&&m>O.to&&(m=O.to,c=""),x.className&&(l+=" "+x.className),x.css&&(s=(s?s+";":"")+x.css),x.startStyle&&O.from==p&&(u+=" "+x.startStyle),x.endStyle&&O.to==m&&(b||(b=[])).push(x.endStyle,O.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var k in x.attributes)(d||(d={}))[k]=x.attributes[k];x.collapsed&&(!f||Dt(f.marker,x)<0)&&(f=O)}else O.from>p&&m>O.from&&(m=O.from)}if(b)for(var C=0;C<b.length;C+=2)b[C+1]==m&&(c+=" "+b[C]);if(!f||f.from==p)for(var S=0;S<y.length;++S)nn(t,0,y[S]);if(f&&(f.from||0)==p){if(nn(t,(null==f.to?h+1:f.to)-p,f.marker,null==f.from),null==f.to)return;f.to==p&&(f=!1)}}if(p>=h)break;for(var j=Math.min(h,m);1;){if(v){var E=p+v.length;if(!f){var P=E>j?v.slice(0,j-p):v;t.addToken(t,P,a?a+l:l,u,p+P.length==m?c:"",s,d)}if(E>=j){v=v.slice(j-p),p=j;break}p=E,u=""}v=i.slice(o,o=n[g++]),a=Xt(n[g++],t.cm.options)}}else for(var _=1;_<n.length;_+=2)t.addToken(t,i.slice(o,o=n[_]),Xt(n[_+1],t.cm.options))}function on(e,t,n){this.line=t,this.rest=function(e){for(var t,n;t=Rt(e);)e=t.find(1,!0).line,(n||(n=[])).push(e);return n}(t),this.size=this.rest?Xe(Y(this.rest))-n+1:1,this.node=this.text=null,this.hidden=Ut(e,t)}function an(e,t,n){for(var r,i=[],o=t;o<n;o=r){var a=new on(e.doc,Ke(e.doc,o),o);r=o+a.size,i.push(a)}return i}var sn=null,ln=null;function cn(e,t){var n=he(e,t);if(n.length){var r,i=Array.prototype.slice.call(arguments,2);sn?r=sn.delayedCallbacks:ln?r=ln:(r=ln=[],setTimeout(un,0));for(var o=function(e){r.push((function(){return n[e].apply(null,i)}))},a=0;a<n.length;++a)o(a)}}function un(){var e=ln;ln=null;for(var t=0;t<e.length;++t)e[t]()}function fn(e,t,n,r){for(var i=0;i<t.changes.length;i++){var o=t.changes[i];"text"==o?pn(e,t):"gutter"==o?vn(e,t,n,r):"class"==o?gn(e,t):"widget"==o&&mn(e,t,r)}t.changes=null}function dn(e){return e.node==e.text&&(e.node=_("div",null,null,"position: relative"),e.text.parentNode&&e.text.parentNode.replaceChild(e.node,e.text),e.node.appendChild(e.text),a&&s<8&&(e.node.style.zIndex=2)),e.node}function hn(e,t){var n=e.display.externalMeasured;return n&&n.line==t.line?(e.display.externalMeasured=null,t.measure=n.measure,n.built):Qt(e,t)}function pn(e,t){var n=t.text.className,r=hn(e,t);t.text==t.node&&(t.node=r.pre),t.text.parentNode.replaceChild(r.pre,t.text),t.text=r.pre,r.bgClass!=t.bgClass||r.textClass!=t.textClass?(t.bgClass=r.bgClass,t.textClass=r.textClass,gn(e,t)):n&&(t.text.className=n)}function gn(e,t){!function(e,t){var n=t.bgClass?t.bgClass+" "+(t.line.bgClass||""):t.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),t.background)n?t.background.className=n:(t.background.parentNode.removeChild(t.background),t.background=null);else if(n){var r=dn(t);t.background=r.insertBefore(_("div",null,n),r.firstChild),e.display.input.setUneditable(t.background)}}(e,t),t.line.wrapClass?dn(t).className=t.line.wrapClass:t.node!=t.text&&(t.node.className="");var n=t.textClass?t.textClass+" "+(t.line.textClass||""):t.line.textClass;t.text.className=n||""}function vn(e,t,n,r){if(t.gutter&&(t.node.removeChild(t.gutter),t.gutter=null),t.gutterBackground&&(t.node.removeChild(t.gutterBackground),t.gutterBackground=null),t.line.gutterClass){var i=dn(t);t.gutterBackground=_("div",null,"CodeMirror-gutter-background "+t.line.gutterClass,"left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px; width: "+r.gutterTotalWidth+"px"),e.display.input.setUneditable(t.gutterBackground),i.insertBefore(t.gutterBackground,t.text)}var o=t.line.gutterMarkers;if(e.options.lineNumbers||o){var a=dn(t),s=t.gutter=_("div",null,"CodeMirror-gutter-wrapper","left: "+(e.options.fixedGutter?r.fixedPos:-r.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),e.display.input.setUneditable(s),a.insertBefore(s,t.text),t.line.gutterClass&&(s.className+=" "+t.line.gutterClass),!e.options.lineNumbers||o&&o["CodeMirror-linenumbers"]||(t.lineNumber=s.appendChild(_("div",et(e.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+r.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+e.display.lineNumInnerWidth+"px"))),o)for(var l=0;l<e.display.gutterSpecs.length;++l){var c=e.display.gutterSpecs[l].className,u=o.hasOwnProperty(c)&&o[c];u&&s.appendChild(_("div",[u],"CodeMirror-gutter-elt","left: "+r.gutterLeft[c]+"px; width: "+r.gutterWidth[c]+"px"))}}}function mn(e,t,n){t.alignable&&(t.alignable=null);for(var r=C("CodeMirror-linewidget"),i=t.node.firstChild,o=void 0;i;i=o)o=i.nextSibling,r.test(i.className)&&t.node.removeChild(i);bn(e,t,n)}function yn(e,t,n,r){var i=hn(e,t);return t.text=t.node=i.pre,i.bgClass&&(t.bgClass=i.bgClass),i.textClass&&(t.textClass=i.textClass),gn(e,t),vn(e,t,n,r),bn(e,t,r),t.node}function bn(e,t,n){if(wn(e,t.line,t,n,!0),t.rest)for(var r=0;r<t.rest.length;r++)wn(e,t.rest[r],t,n,!1)}function wn(e,t,n,r,i){if(t.widgets)for(var o=dn(n),a=0,s=t.widgets;a<s.length;++a){var l=s[a],c=_("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),On(l,c,n,r),e.display.input.setUneditable(c),i&&l.above?o.insertBefore(c,n.gutter||n.text):o.appendChild(c),cn(l,"redraw")}}function On(e,t,n,r){if(e.noHScroll){(n.alignable||(n.alignable=[])).push(t);var i=r.wrapperWidth;t.style.left=r.fixedPos+"px",e.coverGutter||(i-=r.gutterTotalWidth,t.style.paddingLeft=r.gutterTotalWidth+"px"),t.style.width=i+"px"}e.coverGutter&&(t.style.zIndex=5,t.style.position="relative",e.noHScroll||(t.style.marginLeft=-r.gutterTotalWidth+"px"))}function xn(e){if(null!=e.height)return e.height;var t=e.doc.cm;if(!t)return 0;if(!A(document.body,e.node)){var n="position: relative;";e.coverGutter&&(n+="margin-left: -"+t.display.gutters.offsetWidth+"px;"),e.noHScroll&&(n+="width: "+t.display.wrapper.clientWidth+"px;"),P(t.display.measure,_("div",[e.node],null,n))}return e.height=e.node.parentNode.offsetHeight}function kn(e,t){for(var n=Ce(t);n!=e.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==e.sizer&&n!=e.mover)return!0}function Cn(e){return e.lineSpace.offsetTop}function Sn(e){return e.mover.offsetHeight-e.lineSpace.offsetHeight}function jn(e){if(e.cachedPaddingH)return e.cachedPaddingH;var t=P(e.measure,_("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(t):t.currentStyle,r={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(r.left)||isNaN(r.right)||(e.cachedPaddingH=r),r}function En(e){return B-e.display.nativeBarWidth}function Pn(e){return e.display.scroller.clientWidth-En(e)-e.display.barWidth}function _n(e){return e.display.scroller.clientHeight-En(e)-e.display.barHeight}function Tn(e,t,n){if(e.line==t)return{map:e.measure.map,cache:e.measure.cache};for(var r=0;r<e.rest.length;r++)if(e.rest[r]==t)return{map:e.measure.maps[r],cache:e.measure.caches[r]};for(var i=0;i<e.rest.length;i++)if(Xe(e.rest[i])>n)return{map:e.measure.maps[i],cache:e.measure.caches[i],before:!0}}function An(e,t,n,r){return Ln(e,Dn(e,t),n,r)}function Mn(e,t){if(t>=e.display.viewFrom&&t<e.display.viewTo)return e.display.view[fr(e,t)];var n=e.display.externalMeasured;return n&&t>=n.lineN&&t<n.lineN+n.size?n:void 0}function Dn(e,t){var n=Xe(t),r=Mn(e,n);r&&!r.text?r=null:r&&r.changes&&(fn(e,r,n,ar(e)),e.curOp.forceUpdate=!0),r||(r=function(e,t){var n=Xe(t=zt(t)),r=e.display.externalMeasured=new on(e.doc,t,n);r.lineN=n;var i=r.built=Qt(e,r);return r.text=i.pre,P(e.display.lineMeasure,i.pre),r}(e,t));var i=Tn(r,t,n);return{line:t,view:r,rect:null,map:i.map,cache:i.cache,before:i.before,hasHeights:!1}}function Ln(e,t,n,r,i){t.before&&(n=-1);var o,l=n+(r||"");return t.cache.hasOwnProperty(l)?o=t.cache[l]:(t.rect||(t.rect=t.view.text.getBoundingClientRect()),t.hasHeights||(function(e,t,n){var r=e.options.lineWrapping,i=r&&Pn(e);if(!t.measure.heights||r&&t.measure.width!=i){var o=t.measure.heights=[];if(r){t.measure.width=i;for(var a=t.text.firstChild.getClientRects(),s=0;s<a.length-1;s++){var l=a[s],c=a[s+1];Math.abs(l.bottom-c.bottom)>2&&o.push((l.bottom+c.top)/2-n.top)}}o.push(n.bottom-n.top)}}(e,t.view,t.rect),t.hasHeights=!0),(o=function(e,t,n,r){var i,o=Fn(t.map,n,r),l=o.node,c=o.start,u=o.end,f=o.collapse;if(3==l.nodeType){for(var d=0;d<4;d++){for(;c&&ie(t.line.text.charAt(o.coverStart+c));)--c;for(;o.coverStart+u<o.coverEnd&&ie(t.line.text.charAt(o.coverStart+u));)++u;if((i=a&&s<9&&0==c&&u==o.coverEnd-o.coverStart?l.parentNode.getBoundingClientRect():In(S(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,f="right"}a&&s<11&&(i=function(e,t){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(e){if(null!=Ne)return Ne;var t=P(e,_("span","x")),n=t.getBoundingClientRect(),r=S(t,0,1).getBoundingClientRect();return Ne=Math.abs(n.left-r.left)>1}(e))return t;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:t.left*n,right:t.right*n,top:t.top*r,bottom:t.bottom*r}}(e.display.measure,i))}else{var h;c>0&&(f=r="right"),i=e.options.lineWrapping&&(h=l.getClientRects()).length>1?h["right"==r?h.length-1:0]:l.getBoundingClientRect()}if(a&&s<9&&!c&&(!i||!i.left&&!i.right)){var p=l.parentNode.getClientRects()[0];i=p?{left:p.left,right:p.left+or(e.display),top:p.top,bottom:p.bottom}:Rn}for(var g=i.top-t.rect.top,v=i.bottom-t.rect.top,m=(g+v)/2,y=t.view.measure.heights,b=0;b<y.length-1&&!(m<y[b]);b++);var w=b?y[b-1]:0,O=y[b],x={left:("right"==f?i.right:i.left)-t.rect.left,right:("left"==f?i.left:i.right)-t.rect.left,top:w,bottom:O};return i.left||i.right||(x.bogus=!0),e.options.singleCursorHeightPerLine||(x.rtop=g,x.rbottom=v),x}(e,t,n,r)).bogus||(t.cache[l]=o)),{left:o.left,right:o.right,top:i?o.rtop:o.top,bottom:i?o.rbottom:o.bottom}}var Nn,Rn={left:0,right:0,top:0,bottom:0};function Fn(e,t,n){for(var r,i,o,a,s,l,c=0;c<e.length;c+=3)if(s=e[c],l=e[c+1],t<s?(i=0,o=1,a="left"):t<l?o=(i=t-s)+1:(c==e.length-3||t==l&&e[c+3]>t)&&(i=(o=l-s)-1,t>=l&&(a="right")),null!=i){if(r=e[c+2],s==l&&n==(r.insertLeft?"left":"right")&&(a=n),"left"==n&&0==i)for(;c&&e[c-2]==e[c-3]&&e[c-1].insertLeft;)r=e[(c-=3)+2],a="left";if("right"==n&&i==l-s)for(;c<e.length-3&&e[c+3]==e[c+4]&&!e[c+5].insertLeft;)r=e[(c+=3)+2],a="right";break}return{node:r,start:i,end:o,collapse:a,coverStart:s,coverEnd:l}}function In(e,t){var n=Rn;if("left"==t)for(var r=0;r<e.length&&(n=e[r]).left==n.right;r++);else for(var i=e.length-1;i>=0&&(n=e[i]).left==n.right;i--);return n}function zn(e){if(e.measure&&(e.measure.cache={},e.measure.heights=null,e.rest))for(var t=0;t<e.rest.length;t++)e.measure.caches[t]={}}function Vn(e){e.display.externalMeasure=null,E(e.display.lineMeasure);for(var t=0;t<e.display.view.length;t++)zn(e.display.view[t])}function Bn(e){Vn(e),e.display.cachedCharWidth=e.display.cachedTextHeight=e.display.cachedPaddingH=null,e.options.lineWrapping||(e.display.maxLineChanged=!0),e.display.lineNumChars=null}function Un(){return u&&v?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function Hn(){return u&&v?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function Wn(e){var t=0;if(e.widgets)for(var n=0;n<e.widgets.length;++n)e.widgets[n].above&&(t+=xn(e.widgets[n]));return t}function $n(e,t,n,r,i){if(!i){var o=Wn(t);n.top+=o,n.bottom+=o}if("line"==r)return n;r||(r="local");var a=Wt(t);if("local"==r?a+=Cn(e.display):a-=e.display.viewOffset,"page"==r||"window"==r){var s=e.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==r?0:Hn());var l=s.left+("window"==r?0:Un());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function qn(e,t,n){if("div"==n)return t;var r=t.left,i=t.top;if("page"==n)r-=Un(),i-=Hn();else if("local"==n||!n){var o=e.display.sizer.getBoundingClientRect();r+=o.left,i+=o.top}var a=e.display.lineSpace.getBoundingClientRect();return{left:r-a.left,top:i-a.top}}function Kn(e,t,n,r,i){return r||(r=Ke(e.doc,t.line)),$n(e,r,An(e,r,t.ch,i),n)}function Gn(e,t,n,r,i,o){function a(t,a){var s=Ln(e,i,t,a?"right":"left",o);return a?s.left=s.right:s.right=s.left,$n(e,r,s,n)}r=r||Ke(e.doc,t.line),i||(i=Dn(e,r));var s=ue(r,e.doc.direction),l=t.ch,c=t.sticky;if(l>=r.text.length?(l=r.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(e,t,n){return a(n?e-1:e,1==s[t].level!=n)}var f=le(s,l,c),d=se,h=u(l,f,"before"==c);return null!=d&&(h.other=u(l,d,"before"!=c)),h}function Yn(e,t){var n=0;t=lt(e.doc,t),e.options.lineWrapping||(n=or(e.display)*t.ch);var r=Ke(e.doc,t.line),i=Wt(r)+Cn(e.display);return{left:n,right:n,top:i,bottom:i+r.height}}function Jn(e,t,n,r,i){var o=tt(e,t,n);return o.xRel=i,r&&(o.outside=r),o}function Xn(e,t,n){var r=e.doc;if((n+=e.display.viewOffset)<0)return Jn(r.first,0,null,-1,-1);var i=Qe(r,n),o=r.first+r.size-1;if(i>o)return Jn(r.first+r.size-1,Ke(r,o).text.length,null,1,1);t<0&&(t=0);for(var a=Ke(r,i);;){var s=tr(e,a,i,t,n),l=Ft(a,s.ch+(s.xRel>0||s.outside>0?1:0));if(!l)return s;var c=l.find(1);if(c.line==i)return c;a=Ke(r,i=c.line)}}function Qn(e,t,n,r){r-=Wn(t);var i=t.text.length,o=ae((function(t){return Ln(e,n,t-1).bottom<=r}),i,0);return{begin:o,end:i=ae((function(t){return Ln(e,n,t).top>r}),o,i)}}function Zn(e,t,n,r){return n||(n=Dn(e,t)),Qn(e,t,n,$n(e,t,Ln(e,n,r),"line").top)}function er(e,t,n,r){return!(e.bottom<=n)&&(e.top>n||(r?e.left:e.right)>t)}function tr(e,t,n,r,i){i-=Wt(t);var o=Dn(e,t),a=Wn(t),s=0,l=t.text.length,c=!0,u=ue(t,e.doc.direction);if(u){var f=(e.options.lineWrapping?rr:nr)(e,t,n,o,u,r,i);s=(c=1!=f.level)?f.from:f.to-1,l=c?f.to:f.from-1}var d,h,p=null,g=null,v=ae((function(t){var n=Ln(e,o,t);return n.top+=a,n.bottom+=a,!!er(n,r,i,!1)&&(n.top<=i&&n.left<=r&&(p=t,g=n),!0)}),s,l),m=!1;if(g){var y=r-g.left<g.right-r,b=y==c;v=p+(b?0:1),h=b?"after":"before",d=y?g.left:g.right}else{c||v!=l&&v!=s||v++,h=0==v?"after":v==t.text.length?"before":Ln(e,o,v-(c?1:0)).bottom+a<=i==c?"after":"before";var w=Gn(e,tt(n,v,h),"line",t,o);d=w.left,m=i<w.top?-1:i>=w.bottom?1:0}return Jn(n,v=oe(t.text,v,1),h,m,r-d)}function nr(e,t,n,r,i,o,a){var s=ae((function(s){var l=i[s],c=1!=l.level;return er(Gn(e,tt(n,c?l.to:l.from,c?"before":"after"),"line",t,r),o,a,!0)}),0,i.length-1),l=i[s];if(s>0){var c=1!=l.level,u=Gn(e,tt(n,c?l.from:l.to,c?"after":"before"),"line",t,r);er(u,o,a,!0)&&u.top>a&&(l=i[s-1])}return l}function rr(e,t,n,r,i,o,a){var s=Qn(e,t,r,a),l=s.begin,c=s.end;/\s/.test(t.text.charAt(c-1))&&c--;for(var u=null,f=null,d=0;d<i.length;d++){var h=i[d];if(!(h.from>=c||h.to<=l)){var p=Ln(e,r,1!=h.level?Math.min(c,h.to)-1:Math.max(l,h.from)).right,g=p<o?o-p+1e9:p-o;(!u||f>g)&&(u=h,f=g)}}return u||(u=i[i.length-1]),u.from<l&&(u={from:l,to:u.to,level:u.level}),u.to>c&&(u={from:u.from,to:c,level:u.level}),u}function ir(e){if(null!=e.cachedTextHeight)return e.cachedTextHeight;if(null==Nn){Nn=_("pre",null,"CodeMirror-line-like");for(var t=0;t<49;++t)Nn.appendChild(document.createTextNode("x")),Nn.appendChild(_("br"));Nn.appendChild(document.createTextNode("x"))}P(e.measure,Nn);var n=Nn.offsetHeight/50;return n>3&&(e.cachedTextHeight=n),E(e.measure),n||1}function or(e){if(null!=e.cachedCharWidth)return e.cachedCharWidth;var t=_("span","xxxxxxxxxx"),n=_("pre",[t],"CodeMirror-line-like");P(e.measure,n);var r=t.getBoundingClientRect(),i=(r.right-r.left)/10;return i>2&&(e.cachedCharWidth=i),i||10}function ar(e){for(var t=e.display,n={},r={},i=t.gutters.clientLeft,o=t.gutters.firstChild,a=0;o;o=o.nextSibling,++a){var s=e.display.gutterSpecs[a].className;n[s]=o.offsetLeft+o.clientLeft+i,r[s]=o.clientWidth}return{fixedPos:sr(t),gutterTotalWidth:t.gutters.offsetWidth,gutterLeft:n,gutterWidth:r,wrapperWidth:t.wrapper.clientWidth}}function sr(e){return e.scroller.getBoundingClientRect().left-e.sizer.getBoundingClientRect().left}function lr(e){var t=ir(e.display),n=e.options.lineWrapping,r=n&&Math.max(5,e.display.scroller.clientWidth/or(e.display)-3);return function(i){if(Ut(e.doc,i))return 0;var o=0;if(i.widgets)for(var a=0;a<i.widgets.length;a++)i.widgets[a].height&&(o+=i.widgets[a].height);return n?o+(Math.ceil(i.text.length/r)||1)*t:o+t}}function cr(e){var t=e.doc,n=lr(e);t.iter((function(e){var t=n(e);t!=e.height&&Je(e,t)}))}function ur(e,t,n,r){var i=e.display;if(!n&&"true"==Ce(t).getAttribute("cm-not-content"))return null;var o,a,s=i.lineSpace.getBoundingClientRect();try{o=t.clientX-s.left,a=t.clientY-s.top}catch(e){return null}var l,c=Xn(e,o,a);if(r&&c.xRel>0&&(l=Ke(e.doc,c.line).text).length==c.ch){var u=I(l,l.length,e.options.tabSize)-l.length;c=tt(c.line,Math.max(0,Math.round((o-jn(e.display).left)/or(e.display))-u))}return c}function fr(e,t){if(t>=e.display.viewTo)return null;if((t-=e.display.viewFrom)<0)return null;for(var n=e.display.view,r=0;r<n.length;r++)if((t-=n[r].size)<0)return r}function dr(e,t,n,r){null==t&&(t=e.doc.first),null==n&&(n=e.doc.first+e.doc.size),r||(r=0);var i=e.display;if(r&&n<i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>t)&&(i.updateLineNumbers=t),e.curOp.viewChanged=!0,t>=i.viewTo)kt&&Vt(e.doc,t)<i.viewTo&&pr(e);else if(n<=i.viewFrom)kt&&Bt(e.doc,n+r)>i.viewFrom?pr(e):(i.viewFrom+=r,i.viewTo+=r);else if(t<=i.viewFrom&&n>=i.viewTo)pr(e);else if(t<=i.viewFrom){var o=gr(e,n,n+r,1);o?(i.view=i.view.slice(o.index),i.viewFrom=o.lineN,i.viewTo+=r):pr(e)}else if(n>=i.viewTo){var a=gr(e,t,t,-1);a?(i.view=i.view.slice(0,a.index),i.viewTo=a.lineN):pr(e)}else{var s=gr(e,t,t,-1),l=gr(e,n,n+r,1);s&&l?(i.view=i.view.slice(0,s.index).concat(an(e,s.lineN,l.lineN)).concat(i.view.slice(l.index)),i.viewTo+=r):pr(e)}var c=i.externalMeasured;c&&(n<c.lineN?c.lineN+=r:t<c.lineN+c.size&&(i.externalMeasured=null))}function hr(e,t,n){e.curOp.viewChanged=!0;var r=e.display,i=e.display.externalMeasured;if(i&&t>=i.lineN&&t<i.lineN+i.size&&(r.externalMeasured=null),!(t<r.viewFrom||t>=r.viewTo)){var o=r.view[fr(e,t)];if(null!=o.node){var a=o.changes||(o.changes=[]);-1==V(a,n)&&a.push(n)}}}function pr(e){e.display.viewFrom=e.display.viewTo=e.doc.first,e.display.view=[],e.display.viewOffset=0}function gr(e,t,n,r){var i,o=fr(e,t),a=e.display.view;if(!kt||n==e.doc.first+e.doc.size)return{index:o,lineN:n};for(var s=e.display.viewFrom,l=0;l<o;l++)s+=a[l].size;if(s!=t){if(r>0){if(o==a.length-1)return null;i=s+a[o].size-t,o++}else i=s-t;t+=i,n+=i}for(;Vt(e.doc,n)!=n;){if(o==(r<0?0:a.length-1))return null;n+=r*a[o-(r<0?1:0)].size,o+=r}return{index:o,lineN:n}}function vr(e){for(var t=e.display.view,n=0,r=0;r<t.length;r++){var i=t[r];i.hidden||i.node&&!i.changes||++n}return n}function mr(e){e.display.input.showSelection(e.display.input.prepareSelection())}function yr(e,t){void 0===t&&(t=!0);for(var n=e.doc,r={},i=r.cursors=document.createDocumentFragment(),o=r.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(t||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=e.display.viewTo||s.to().line<e.display.viewFrom)){var l=s.empty();(l||e.options.showCursorWhenSelecting)&&br(e,s.head,i),l||Or(e,s,o)}}return r}function br(e,t,n){var r=Gn(e,t,"div",null,null,!e.options.singleCursorHeightPerLine),i=n.appendChild(_("div"," ","CodeMirror-cursor"));if(i.style.left=r.left+"px",i.style.top=r.top+"px",i.style.height=Math.max(0,r.bottom-r.top)*e.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(e.getWrapperElement().className)){var o=Kn(e,t,"div",null,null);o.right-o.left>0&&(i.style.width=o.right-o.left+"px")}if(r.other){var a=n.appendChild(_("div"," ","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=r.other.left+"px",a.style.top=r.other.top+"px",a.style.height=.85*(r.other.bottom-r.other.top)+"px"}}function wr(e,t){return e.top-t.top||e.left-t.left}function Or(e,t,n){var r=e.display,i=e.doc,o=document.createDocumentFragment(),a=jn(e.display),s=a.left,l=Math.max(r.sizerWidth,Pn(e)-r.sizer.offsetLeft)-a.right,c="ltr"==i.direction;function u(e,t,n,r){t<0&&(t=0),t=Math.round(t),r=Math.round(r),o.appendChild(_("div",null,"CodeMirror-selected","position: absolute; left: "+e+"px;\n                             top: "+t+"px; width: "+(null==n?l-e:n)+"px;\n                             height: "+(r-t)+"px"))}function f(t,n,r){var o,a,f=Ke(i,t),d=f.text.length;function h(n,r){return Kn(e,tt(t,n),"div",f,r)}function p(t,n,r){var i=Zn(e,f,null,t),o="ltr"==n==("after"==r)?"left":"right";return h("after"==r?i.begin:i.end-(/\s/.test(f.text.charAt(i.end-1))?2:1),o)[o]}var g=ue(f,i.direction);return function(e,t,n,r){if(!e)return r(t,n,"ltr",0);for(var i=!1,o=0;o<e.length;++o){var a=e[o];(a.from<n&&a.to>t||t==n&&a.to==t)&&(r(Math.max(a.from,t),Math.min(a.to,n),1==a.level?"rtl":"ltr",o),i=!0)}i||r(t,n,"ltr")}(g,n||0,null==r?d:r,(function(e,t,i,f){var v="ltr"==i,m=h(e,v?"left":"right"),y=h(t-1,v?"right":"left"),b=null==n&&0==e,w=null==r&&t==d,O=0==f,x=!g||f==g.length-1;if(y.top-m.top<=3){var k=(c?w:b)&&x,C=(c?b:w)&&O?s:(v?m:y).left,S=k?l:(v?y:m).right;u(C,m.top,S-C,m.bottom)}else{var j,E,P,_;v?(j=c&&b&&O?s:m.left,E=c?l:p(e,i,"before"),P=c?s:p(t,i,"after"),_=c&&w&&x?l:y.right):(j=c?p(e,i,"before"):s,E=!c&&b&&O?l:m.right,P=!c&&w&&x?s:y.left,_=c?p(t,i,"after"):l),u(j,m.top,E-j,m.bottom),m.bottom<y.top&&u(s,m.bottom,null,y.top),u(P,y.top,_-P,y.bottom)}(!o||wr(m,o)<0)&&(o=m),wr(y,o)<0&&(o=y),(!a||wr(m,a)<0)&&(a=m),wr(y,a)<0&&(a=y)})),{start:o,end:a}}var d=t.from(),h=t.to();if(d.line==h.line)f(d.line,d.ch,h.ch);else{var p=Ke(i,d.line),g=Ke(i,h.line),v=zt(p)==zt(g),m=f(d.line,d.ch,v?p.text.length+1:null).end,y=f(h.line,v?0:null,h.ch).start;v&&(m.top<y.top-2?(u(m.right,m.top,null,m.bottom),u(s,y.top,y.left,y.bottom)):u(m.right,m.top,y.left-m.right,m.bottom)),m.bottom<y.top&&u(s,m.bottom,null,y.top)}n.appendChild(o)}function xr(e){if(e.state.focused){var t=e.display;clearInterval(t.blinker);var n=!0;t.cursorDiv.style.visibility="",e.options.cursorBlinkRate>0?t.blinker=setInterval((function(){e.hasFocus()||jr(e),t.cursorDiv.style.visibility=(n=!n)?"":"hidden"}),e.options.cursorBlinkRate):e.options.cursorBlinkRate<0&&(t.cursorDiv.style.visibility="hidden")}}function kr(e){e.hasFocus()||(e.display.input.focus(),e.state.focused||Sr(e))}function Cr(e){e.state.delayingBlurEvent=!0,setTimeout((function(){e.state.delayingBlurEvent&&(e.state.delayingBlurEvent=!1,e.state.focused&&jr(e))}),100)}function Sr(e,t){e.state.delayingBlurEvent&&!e.state.draggingText&&(e.state.delayingBlurEvent=!1),"nocursor"!=e.options.readOnly&&(e.state.focused||(ge(e,"focus",e,t),e.state.focused=!0,D(e.display.wrapper,"CodeMirror-focused"),e.curOp||e.display.selForContextMenu==e.doc.sel||(e.display.input.reset(),l&&setTimeout((function(){return e.display.input.reset(!0)}),20)),e.display.input.receivedFocus()),xr(e))}function jr(e,t){e.state.delayingBlurEvent||(e.state.focused&&(ge(e,"blur",e,t),e.state.focused=!1,j(e.display.wrapper,"CodeMirror-focused")),clearInterval(e.display.blinker),setTimeout((function(){e.state.focused||(e.display.shift=!1)}),150))}function Er(e){for(var t=e.display,n=t.lineDiv.offsetTop,r=Math.max(0,t.scroller.getBoundingClientRect().top),i=t.lineDiv.getBoundingClientRect().top,o=0,l=0;l<t.view.length;l++){var c=t.view[l],u=e.options.lineWrapping,f=void 0,d=0;if(!c.hidden){if(i+=c.line.height,a&&s<8){var h=c.node.offsetTop+c.node.offsetHeight;f=h-n,n=h}else{var p=c.node.getBoundingClientRect();f=p.bottom-p.top,!u&&c.text.firstChild&&(d=c.text.firstChild.getBoundingClientRect().right-p.left-1)}var g=c.line.height-f;if((g>.005||g<-.005)&&(i<r&&(o-=g),Je(c.line,f),Pr(c.line),c.rest))for(var v=0;v<c.rest.length;v++)Pr(c.rest[v]);if(d>e.display.sizerWidth){var m=Math.ceil(d/or(e.display));m>e.display.maxLineLength&&(e.display.maxLineLength=m,e.display.maxLine=c.line,e.display.maxLineChanged=!0)}}}Math.abs(o)>2&&(t.scroller.scrollTop+=o)}function Pr(e){if(e.widgets)for(var t=0;t<e.widgets.length;++t){var n=e.widgets[t],r=n.node.parentNode;r&&(n.height=r.offsetHeight)}}function _r(e,t,n){var r=n&&null!=n.top?Math.max(0,n.top):e.scroller.scrollTop;r=Math.floor(r-Cn(e));var i=n&&null!=n.bottom?n.bottom:r+e.wrapper.clientHeight,o=Qe(t,r),a=Qe(t,i);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<o?(o=s,a=Qe(t,Wt(Ke(t,s))+e.wrapper.clientHeight)):Math.min(l,t.lastLine())>=a&&(o=Qe(t,Wt(Ke(t,l))-e.wrapper.clientHeight),a=l)}return{from:o,to:Math.max(a,o+1)}}function Tr(e,t){var n=e.display,r=ir(e.display);t.top<0&&(t.top=0);var i=e.curOp&&null!=e.curOp.scrollTop?e.curOp.scrollTop:n.scroller.scrollTop,o=_n(e),a={};t.bottom-t.top>o&&(t.bottom=t.top+o);var s=e.doc.height+Sn(n),l=t.top<r,c=t.bottom>s-r;if(t.top<i)a.scrollTop=l?0:t.top;else if(t.bottom>i+o){var u=Math.min(t.top,(c?s:t.bottom)-o);u!=i&&(a.scrollTop=u)}var f=e.options.fixedGutter?0:n.gutters.offsetWidth,d=e.curOp&&null!=e.curOp.scrollLeft?e.curOp.scrollLeft:n.scroller.scrollLeft-f,h=Pn(e)-n.gutters.offsetWidth,p=t.right-t.left>h;return p&&(t.right=t.left+h),t.left<10?a.scrollLeft=0:t.left<d?a.scrollLeft=Math.max(0,t.left+f-(p?0:10)):t.right>h+d-3&&(a.scrollLeft=t.right+(p?0:10)-h),a}function Ar(e,t){null!=t&&(Lr(e),e.curOp.scrollTop=(null==e.curOp.scrollTop?e.doc.scrollTop:e.curOp.scrollTop)+t)}function Mr(e){Lr(e);var t=e.getCursor();e.curOp.scrollToPos={from:t,to:t,margin:e.options.cursorScrollMargin}}function Dr(e,t,n){null==t&&null==n||Lr(e),null!=t&&(e.curOp.scrollLeft=t),null!=n&&(e.curOp.scrollTop=n)}function Lr(e){var t=e.curOp.scrollToPos;t&&(e.curOp.scrollToPos=null,Nr(e,Yn(e,t.from),Yn(e,t.to),t.margin))}function Nr(e,t,n,r){var i=Tr(e,{left:Math.min(t.left,n.left),top:Math.min(t.top,n.top)-r,right:Math.max(t.right,n.right),bottom:Math.max(t.bottom,n.bottom)+r});Dr(e,i.scrollLeft,i.scrollTop)}function Rr(e,t){Math.abs(e.doc.scrollTop-t)<2||(n||ci(e,{top:t}),Fr(e,t,!0),n&&ci(e),ii(e,100))}function Fr(e,t,n){t=Math.max(0,Math.min(e.display.scroller.scrollHeight-e.display.scroller.clientHeight,t)),(e.display.scroller.scrollTop!=t||n)&&(e.doc.scrollTop=t,e.display.scrollbars.setScrollTop(t),e.display.scroller.scrollTop!=t&&(e.display.scroller.scrollTop=t))}function Ir(e,t,n,r){t=Math.max(0,Math.min(t,e.display.scroller.scrollWidth-e.display.scroller.clientWidth)),(n?t==e.doc.scrollLeft:Math.abs(e.doc.scrollLeft-t)<2)&&!r||(e.doc.scrollLeft=t,di(e),e.display.scroller.scrollLeft!=t&&(e.display.scroller.scrollLeft=t),e.display.scrollbars.setScrollLeft(t))}function zr(e){var t=e.display,n=t.gutters.offsetWidth,r=Math.round(e.doc.height+Sn(e.display));return{clientHeight:t.scroller.clientHeight,viewHeight:t.wrapper.clientHeight,scrollWidth:t.scroller.scrollWidth,clientWidth:t.scroller.clientWidth,viewWidth:t.wrapper.clientWidth,barLeft:e.options.fixedGutter?n:0,docHeight:r,scrollHeight:r+En(e)+t.barHeight,nativeBarWidth:t.nativeBarWidth,gutterWidth:n}}var Vr=function(e,t,n){this.cm=n;var r=this.vert=_("div",[_("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),i=this.horiz=_("div",[_("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");r.tabIndex=i.tabIndex=-1,e(r),e(i),de(r,"scroll",(function(){r.clientHeight&&t(r.scrollTop,"vertical")})),de(i,"scroll",(function(){i.clientWidth&&t(i.scrollLeft,"horizontal")})),this.checkedZeroWidth=!1,a&&s<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};Vr.prototype.update=function(e){var t=e.scrollWidth>e.clientWidth+1,n=e.scrollHeight>e.clientHeight+1,r=e.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=t?r+"px":"0";var i=e.viewHeight-(t?r:0);this.vert.firstChild.style.height=Math.max(0,e.scrollHeight-e.clientHeight+i)+"px"}else this.vert.style.display="",this.vert.firstChild.style.height="0";if(t){this.horiz.style.display="block",this.horiz.style.right=n?r+"px":"0",this.horiz.style.left=e.barLeft+"px";var o=e.viewWidth-e.barLeft-(n?r:0);this.horiz.firstChild.style.width=Math.max(0,e.scrollWidth-e.clientWidth+o)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&e.clientHeight>0&&(0==r&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?r:0,bottom:t?r:0}},Vr.prototype.setScrollLeft=function(e){this.horiz.scrollLeft!=e&&(this.horiz.scrollLeft=e),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},Vr.prototype.setScrollTop=function(e){this.vert.scrollTop!=e&&(this.vert.scrollTop=e),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},Vr.prototype.zeroWidthHack=function(){var e=y&&!h?"12px":"18px";this.horiz.style.height=this.vert.style.width=e,this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new z,this.disableVert=new z},Vr.prototype.enableZeroWidthBar=function(e,t,n){e.style.pointerEvents="auto",t.set(1e3,(function r(){var i=e.getBoundingClientRect();("vert"==n?document.elementFromPoint(i.right-1,(i.top+i.bottom)/2):document.elementFromPoint((i.right+i.left)/2,i.bottom-1))!=e?e.style.pointerEvents="none":t.set(1e3,r)}))},Vr.prototype.clear=function(){var e=this.horiz.parentNode;e.removeChild(this.horiz),e.removeChild(this.vert)};var Br=function(){};function Ur(e,t){t||(t=zr(e));var n=e.display.barWidth,r=e.display.barHeight;Hr(e,t);for(var i=0;i<4&&n!=e.display.barWidth||r!=e.display.barHeight;i++)n!=e.display.barWidth&&e.options.lineWrapping&&Er(e),Hr(e,zr(e)),n=e.display.barWidth,r=e.display.barHeight}function Hr(e,t){var n=e.display,r=n.scrollbars.update(t);n.sizer.style.paddingRight=(n.barWidth=r.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=r.bottom)+"px",n.heightForcer.style.borderBottom=r.bottom+"px solid transparent",r.right&&r.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=r.bottom+"px",n.scrollbarFiller.style.width=r.right+"px"):n.scrollbarFiller.style.display="",r.bottom&&e.options.coverGutterNextToScrollbar&&e.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=r.bottom+"px",n.gutterFiller.style.width=t.gutterWidth+"px"):n.gutterFiller.style.display=""}Br.prototype.update=function(){return{bottom:0,right:0}},Br.prototype.setScrollLeft=function(){},Br.prototype.setScrollTop=function(){},Br.prototype.clear=function(){};var Wr={native:Vr,null:Br};function $r(e){e.display.scrollbars&&(e.display.scrollbars.clear(),e.display.scrollbars.addClass&&j(e.display.wrapper,e.display.scrollbars.addClass)),e.display.scrollbars=new Wr[e.options.scrollbarStyle]((function(t){e.display.wrapper.insertBefore(t,e.display.scrollbarFiller),de(t,"mousedown",(function(){e.state.focused&&setTimeout((function(){return e.display.input.focus()}),0)})),t.setAttribute("cm-not-content","true")}),(function(t,n){"horizontal"==n?Ir(e,t):Rr(e,t)}),e),e.display.scrollbars.addClass&&D(e.display.wrapper,e.display.scrollbars.addClass)}var qr=0;function Kr(e){var t;e.curOp={cm:e,viewChanged:!1,startHeight:e.doc.height,forceUpdate:!1,updateInput:0,typing:!1,changeObjs:null,cursorActivityHandlers:null,cursorActivityCalled:0,selectionChanged:!1,updateMaxLine:!1,scrollLeft:null,scrollTop:null,scrollToPos:null,focus:!1,id:++qr,markArrays:null},t=e.curOp,sn?sn.ops.push(t):t.ownsGroup=sn={ops:[t],delayedCallbacks:[]}}function Gr(e){var t=e.curOp;t&&function(e,t){var n=e.ownsGroup;if(n)try{!function(e){var t=e.delayedCallbacks,n=0;do{for(;n<t.length;n++)t[n].call(null);for(var r=0;r<e.ops.length;r++){var i=e.ops[r];if(i.cursorActivityHandlers)for(;i.cursorActivityCalled<i.cursorActivityHandlers.length;)i.cursorActivityHandlers[i.cursorActivityCalled++].call(null,i.cm)}}while(n<t.length)}(n)}finally{sn=null,t(n)}}(t,(function(e){for(var t=0;t<e.ops.length;t++)e.ops[t].cm.curOp=null;!function(e){for(var t=e.ops,n=0;n<t.length;n++)Yr(t[n]);for(var r=0;r<t.length;r++)Jr(t[r]);for(var i=0;i<t.length;i++)Xr(t[i]);for(var o=0;o<t.length;o++)Qr(t[o]);for(var a=0;a<t.length;a++)Zr(t[a])}(e)}))}function Yr(e){var t=e.cm,n=t.display;!function(e){var t=e.display;!t.scrollbarsClipped&&t.scroller.offsetWidth&&(t.nativeBarWidth=t.scroller.offsetWidth-t.scroller.clientWidth,t.heightForcer.style.height=En(e)+"px",t.sizer.style.marginBottom=-t.nativeBarWidth+"px",t.sizer.style.borderRightWidth=En(e)+"px",t.scrollbarsClipped=!0)}(t),e.updateMaxLine&&qt(t),e.mustUpdate=e.viewChanged||e.forceUpdate||null!=e.scrollTop||e.scrollToPos&&(e.scrollToPos.from.line<n.viewFrom||e.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&t.options.lineWrapping,e.update=e.mustUpdate&&new ai(t,e.mustUpdate&&{top:e.scrollTop,ensure:e.scrollToPos},e.forceUpdate)}function Jr(e){e.updatedDisplay=e.mustUpdate&&si(e.cm,e.update)}function Xr(e){var t=e.cm,n=t.display;e.updatedDisplay&&Er(t),e.barMeasure=zr(t),n.maxLineChanged&&!t.options.lineWrapping&&(e.adjustWidthTo=An(t,n.maxLine,n.maxLine.text.length).left+3,t.display.sizerWidth=e.adjustWidthTo,e.barMeasure.scrollWidth=Math.max(n.scroller.clientWidth,n.sizer.offsetLeft+e.adjustWidthTo+En(t)+t.display.barWidth),e.maxScrollLeft=Math.max(0,n.sizer.offsetLeft+e.adjustWidthTo-Pn(t))),(e.updatedDisplay||e.selectionChanged)&&(e.preparedSelection=n.input.prepareSelection())}function Qr(e){var t=e.cm;null!=e.adjustWidthTo&&(t.display.sizer.style.minWidth=e.adjustWidthTo+"px",e.maxScrollLeft<t.doc.scrollLeft&&Ir(t,Math.min(t.display.scroller.scrollLeft,e.maxScrollLeft),!0),t.display.maxLineChanged=!1);var n=e.focus&&e.focus==M();e.preparedSelection&&t.display.input.showSelection(e.preparedSelection,n),(e.updatedDisplay||e.startHeight!=t.doc.height)&&Ur(t,e.barMeasure),e.updatedDisplay&&fi(t,e.barMeasure),e.selectionChanged&&xr(t),t.state.focused&&e.updateInput&&t.display.input.reset(e.typing),n&&kr(e.cm)}function Zr(e){var t=e.cm,n=t.display,r=t.doc;e.updatedDisplay&&li(t,e.update),null==n.wheelStartX||null==e.scrollTop&&null==e.scrollLeft&&!e.scrollToPos||(n.wheelStartX=n.wheelStartY=null),null!=e.scrollTop&&Fr(t,e.scrollTop,e.forceScroll),null!=e.scrollLeft&&Ir(t,e.scrollLeft,!0,!0),e.scrollToPos&&function(e,t){if(!ve(e,"scrollCursorIntoView")){var n=e.display,r=n.sizer.getBoundingClientRect(),i=null;if(t.top+r.top<0?i=!0:t.bottom+r.top>(window.innerHeight||document.documentElement.clientHeight)&&(i=!1),null!=i&&!p){var o=_("div","​",null,"position: absolute;\n                         top: "+(t.top-n.viewOffset-Cn(e.display))+"px;\n                         height: "+(t.bottom-t.top+En(e)+n.barHeight)+"px;\n                         left: "+t.left+"px; width: "+Math.max(2,t.right-t.left)+"px;");e.display.lineSpace.appendChild(o),o.scrollIntoView(i),e.display.lineSpace.removeChild(o)}}}(t,function(e,t,n,r){var i;null==r&&(r=0),e.options.lineWrapping||t!=n||(n="before"==t.sticky?tt(t.line,t.ch+1,"before"):t,t=t.ch?tt(t.line,"before"==t.sticky?t.ch-1:t.ch,"after"):t);for(var o=0;o<5;o++){var a=!1,s=Gn(e,t),l=n&&n!=t?Gn(e,n):s,c=Tr(e,i={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-r,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+r}),u=e.doc.scrollTop,f=e.doc.scrollLeft;if(null!=c.scrollTop&&(Rr(e,c.scrollTop),Math.abs(e.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(Ir(e,c.scrollLeft),Math.abs(e.doc.scrollLeft-f)>1&&(a=!0)),!a)break}return i}(t,lt(r,e.scrollToPos.from),lt(r,e.scrollToPos.to),e.scrollToPos.margin));var i=e.maybeHiddenMarkers,o=e.maybeUnhiddenMarkers;if(i)for(var a=0;a<i.length;++a)i[a].lines.length||ge(i[a],"hide");if(o)for(var s=0;s<o.length;++s)o[s].lines.length&&ge(o[s],"unhide");n.wrapper.offsetHeight&&(r.scrollTop=t.display.scroller.scrollTop),e.changeObjs&&ge(t,"changes",t,e.changeObjs),e.update&&e.update.finish()}function ei(e,t){if(e.curOp)return t();Kr(e);try{return t()}finally{Gr(e)}}function ti(e,t){return function(){if(e.curOp)return t.apply(e,arguments);Kr(e);try{return t.apply(e,arguments)}finally{Gr(e)}}}function ni(e){return function(){if(this.curOp)return e.apply(this,arguments);Kr(this);try{return e.apply(this,arguments)}finally{Gr(this)}}}function ri(e){return function(){var t=this.cm;if(!t||t.curOp)return e.apply(this,arguments);Kr(t);try{return e.apply(this,arguments)}finally{Gr(t)}}}function ii(e,t){e.doc.highlightFrontier<e.display.viewTo&&e.state.highlight.set(t,R(oi,e))}function oi(e){var t=e.doc;if(!(t.highlightFrontier>=e.display.viewTo)){var n=+new Date+e.options.workTime,r=pt(e,t.highlightFrontier),i=[];t.iter(r.line,Math.min(t.first+t.size,e.display.viewTo+500),(function(o){if(r.line>=e.display.viewFrom){var a=o.styles,s=o.text.length>e.options.maxHighlightLength?He(t.mode,r.state):null,l=dt(e,o,r,!0);s&&(r.state=s),o.styles=l.styles;var c=o.styleClasses,u=l.classes;u?o.styleClasses=u:c&&(o.styleClasses=null);for(var f=!a||a.length!=o.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),d=0;!f&&d<a.length;++d)f=a[d]!=o.styles[d];f&&i.push(r.line),o.stateAfter=r.save(),r.nextLine()}else o.text.length<=e.options.maxHighlightLength&&gt(e,o.text,r),o.stateAfter=r.line%5==0?r.save():null,r.nextLine();if(+new Date>n)return ii(e,e.options.workDelay),!0})),t.highlightFrontier=r.line,t.modeFrontier=Math.max(t.modeFrontier,r.line),i.length&&ei(e,(function(){for(var t=0;t<i.length;t++)hr(e,i[t],"text")}))}}var ai=function(e,t,n){var r=e.display;this.viewport=t,this.visible=_r(r,e.doc,t),this.editorIsHidden=!r.wrapper.offsetWidth,this.wrapperHeight=r.wrapper.clientHeight,this.wrapperWidth=r.wrapper.clientWidth,this.oldDisplayWidth=Pn(e),this.force=n,this.dims=ar(e),this.events=[]};function si(e,t){var n=e.display,r=e.doc;if(t.editorIsHidden)return pr(e),!1;if(!t.force&&t.visible.from>=n.viewFrom&&t.visible.to<=n.viewTo&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo)&&n.renderedView==n.view&&0==vr(e))return!1;hi(e)&&(pr(e),t.dims=ar(e));var i=r.first+r.size,o=Math.max(t.visible.from-e.options.viewportMargin,r.first),a=Math.min(i,t.visible.to+e.options.viewportMargin);n.viewFrom<o&&o-n.viewFrom<20&&(o=Math.max(r.first,n.viewFrom)),n.viewTo>a&&n.viewTo-a<20&&(a=Math.min(i,n.viewTo)),kt&&(o=Vt(e.doc,o),a=Bt(e.doc,a));var s=o!=n.viewFrom||a!=n.viewTo||n.lastWrapHeight!=t.wrapperHeight||n.lastWrapWidth!=t.wrapperWidth;!function(e,t,n){var r=e.display;0==r.view.length||t>=r.viewTo||n<=r.viewFrom?(r.view=an(e,t,n),r.viewFrom=t):(r.viewFrom>t?r.view=an(e,t,r.viewFrom).concat(r.view):r.viewFrom<t&&(r.view=r.view.slice(fr(e,t))),r.viewFrom=t,r.viewTo<n?r.view=r.view.concat(an(e,r.viewTo,n)):r.viewTo>n&&(r.view=r.view.slice(0,fr(e,n)))),r.viewTo=n}(e,o,a),n.viewOffset=Wt(Ke(e.doc,n.viewFrom)),e.display.mover.style.top=n.viewOffset+"px";var c=vr(e);if(!s&&0==c&&!t.force&&n.renderedView==n.view&&(null==n.updateLineNumbers||n.updateLineNumbers>=n.viewTo))return!1;var u=function(e){if(e.hasFocus())return null;var t=M();if(!t||!A(e.display.lineDiv,t))return null;var n={activeElt:t};if(window.getSelection){var r=window.getSelection();r.anchorNode&&r.extend&&A(e.display.lineDiv,r.anchorNode)&&(n.anchorNode=r.anchorNode,n.anchorOffset=r.anchorOffset,n.focusNode=r.focusNode,n.focusOffset=r.focusOffset)}return n}(e);return c>4&&(n.lineDiv.style.display="none"),function(e,t,n){var r=e.display,i=e.options.lineNumbers,o=r.lineDiv,a=o.firstChild;function s(t){var n=t.nextSibling;return l&&y&&e.display.currentWheelTarget==t?t.style.display="none":t.parentNode.removeChild(t),n}for(var c=r.view,u=r.viewFrom,f=0;f<c.length;f++){var d=c[f];if(d.hidden);else if(d.node&&d.node.parentNode==o){for(;a!=d.node;)a=s(a);var h=i&&null!=t&&t<=u&&d.lineNumber;d.changes&&(V(d.changes,"gutter")>-1&&(h=!1),fn(e,d,u,n)),h&&(E(d.lineNumber),d.lineNumber.appendChild(document.createTextNode(et(e.options,u)))),a=d.node.nextSibling}else{var p=yn(e,d,u,n);o.insertBefore(p,a)}u+=d.size}for(;a;)a=s(a)}(e,n.updateLineNumbers,t.dims),c>4&&(n.lineDiv.style.display=""),n.renderedView=n.view,function(e){if(e&&e.activeElt&&e.activeElt!=M()&&(e.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(e.activeElt.nodeName)&&e.anchorNode&&A(document.body,e.anchorNode)&&A(document.body,e.focusNode))){var t=window.getSelection(),n=document.createRange();n.setEnd(e.anchorNode,e.anchorOffset),n.collapse(!1),t.removeAllRanges(),t.addRange(n),t.extend(e.focusNode,e.focusOffset)}}(u),E(n.cursorDiv),E(n.selectionDiv),n.gutters.style.height=n.sizer.style.minHeight=0,s&&(n.lastWrapHeight=t.wrapperHeight,n.lastWrapWidth=t.wrapperWidth,ii(e,400)),n.updateLineNumbers=null,!0}function li(e,t){for(var n=t.viewport,r=!0;;r=!1){if(r&&e.options.lineWrapping&&t.oldDisplayWidth!=Pn(e))r&&(t.visible=_r(e.display,e.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(e.doc.height+Sn(e.display)-_n(e),n.top)}),t.visible=_r(e.display,e.doc,n),t.visible.from>=e.display.viewFrom&&t.visible.to<=e.display.viewTo)break;if(!si(e,t))break;Er(e);var i=zr(e);mr(e),Ur(e,i),fi(e,i),t.force=!1}t.signal(e,"update",e),e.display.viewFrom==e.display.reportedViewFrom&&e.display.viewTo==e.display.reportedViewTo||(t.signal(e,"viewportChange",e,e.display.viewFrom,e.display.viewTo),e.display.reportedViewFrom=e.display.viewFrom,e.display.reportedViewTo=e.display.viewTo)}function ci(e,t){var n=new ai(e,t);if(si(e,n)){Er(e),li(e,n);var r=zr(e);mr(e),Ur(e,r),fi(e,r),n.finish()}}function ui(e){var t=e.gutters.offsetWidth;e.sizer.style.marginLeft=t+"px",cn(e,"gutterChanged",e)}function fi(e,t){e.display.sizer.style.minHeight=t.docHeight+"px",e.display.heightForcer.style.top=t.docHeight+"px",e.display.gutters.style.height=t.docHeight+e.display.barHeight+En(e)+"px"}function di(e){var t=e.display,n=t.view;if(t.alignWidgets||t.gutters.firstChild&&e.options.fixedGutter){for(var r=sr(t)-t.scroller.scrollLeft+e.doc.scrollLeft,i=t.gutters.offsetWidth,o=r+"px",a=0;a<n.length;a++)if(!n[a].hidden){e.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=o),n[a].gutterBackground&&(n[a].gutterBackground.style.left=o));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=o}e.options.fixedGutter&&(t.gutters.style.left=r+i+"px")}}function hi(e){if(!e.options.lineNumbers)return!1;var t=e.doc,n=et(e.options,t.first+t.size-1),r=e.display;if(n.length!=r.lineNumChars){var i=r.measure.appendChild(_("div",[_("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),o=i.firstChild.offsetWidth,a=i.offsetWidth-o;return r.lineGutter.style.width="",r.lineNumInnerWidth=Math.max(o,r.lineGutter.offsetWidth-a)+1,r.lineNumWidth=r.lineNumInnerWidth+a,r.lineNumChars=r.lineNumInnerWidth?n.length:-1,r.lineGutter.style.width=r.lineNumWidth+"px",ui(e.display),!0}return!1}function pi(e,t){for(var n=[],r=!1,i=0;i<e.length;i++){var o=e[i],a=null;if("string"!=typeof o&&(a=o.style,o=o.className),"CodeMirror-linenumbers"==o){if(!t)continue;r=!0}n.push({className:o,style:a})}return t&&!r&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function gi(e){var t=e.gutters,n=e.gutterSpecs;E(t),e.lineGutter=null;for(var r=0;r<n.length;++r){var i=n[r],o=i.className,a=i.style,s=t.appendChild(_("div",null,"CodeMirror-gutter "+o));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==o&&(e.lineGutter=s,s.style.width=(e.lineNumWidth||1)+"px")}t.style.display=n.length?"":"none",ui(e)}function vi(e){gi(e.display),dr(e),di(e)}function mi(e,t,r,i){var o=this;this.input=r,o.scrollbarFiller=_("div",null,"CodeMirror-scrollbar-filler"),o.scrollbarFiller.setAttribute("cm-not-content","true"),o.gutterFiller=_("div",null,"CodeMirror-gutter-filler"),o.gutterFiller.setAttribute("cm-not-content","true"),o.lineDiv=T("div",null,"CodeMirror-code"),o.selectionDiv=_("div",null,null,"position: relative; z-index: 1"),o.cursorDiv=_("div",null,"CodeMirror-cursors"),o.measure=_("div",null,"CodeMirror-measure"),o.lineMeasure=_("div",null,"CodeMirror-measure"),o.lineSpace=T("div",[o.measure,o.lineMeasure,o.selectionDiv,o.cursorDiv,o.lineDiv],null,"position: relative; outline: none");var c=T("div",[o.lineSpace],"CodeMirror-lines");o.mover=_("div",[c],null,"position: relative"),o.sizer=_("div",[o.mover],"CodeMirror-sizer"),o.sizerWidth=null,o.heightForcer=_("div",null,null,"position: absolute; height: "+B+"px; width: 1px;"),o.gutters=_("div",null,"CodeMirror-gutters"),o.lineGutter=null,o.scroller=_("div",[o.sizer,o.heightForcer,o.gutters],"CodeMirror-scroll"),o.scroller.setAttribute("tabIndex","-1"),o.wrapper=_("div",[o.scrollbarFiller,o.gutterFiller,o.scroller],"CodeMirror"),o.wrapper.setAttribute('translate','no'),a&&s<8&&(o.gutters.style.zIndex=-1,o.scroller.style.paddingRight=0),l||n&&m||(o.scroller.draggable=!0),e&&(e.appendChild?e.appendChild(o.wrapper):e(o.wrapper)),o.viewFrom=o.viewTo=t.first,o.reportedViewFrom=o.reportedViewTo=t.first,o.view=[],o.renderedView=null,o.externalMeasured=null,o.viewOffset=0,o.lastWrapHeight=o.lastWrapWidth=0,o.updateLineNumbers=null,o.nativeBarWidth=o.barHeight=o.barWidth=0,o.scrollbarsClipped=!1,o.lineNumWidth=o.lineNumInnerWidth=o.lineNumChars=null,o.alignWidgets=!1,o.cachedCharWidth=o.cachedTextHeight=o.cachedPaddingH=null,o.maxLine=null,o.maxLineLength=0,o.maxLineChanged=!1,o.wheelDX=o.wheelDY=o.wheelStartX=o.wheelStartY=null,o.shift=!1,o.selForContextMenu=null,o.activeTouch=null,o.gutterSpecs=pi(i.gutters,i.lineNumbers),gi(o),r.init(o)}ai.prototype.signal=function(e,t){ye(e,t)&&this.events.push(arguments)},ai.prototype.finish=function(){for(var e=0;e<this.events.length;e++)ge.apply(null,this.events[e])};var yi=0,bi=null;function wi(e){var t=e.wheelDeltaX,n=e.wheelDeltaY;return null==t&&e.detail&&e.axis==e.HORIZONTAL_AXIS&&(t=e.detail),null==n&&e.detail&&e.axis==e.VERTICAL_AXIS?n=e.detail:null==n&&(n=e.wheelDelta),{x:t,y:n}}function Oi(e){var t=wi(e);return t.x*=bi,t.y*=bi,t}function xi(e,t){var r=wi(t),i=r.x,o=r.y,a=e.display,s=a.scroller,c=s.scrollWidth>s.clientWidth,u=s.scrollHeight>s.clientHeight;if(i&&c||o&&u){if(o&&y&&l)e:for(var d=t.target,h=a.view;d!=s;d=d.parentNode)for(var p=0;p<h.length;p++)if(h[p].node==d){e.display.currentWheelTarget=d;break e}if(i&&!n&&!f&&null!=bi)return o&&u&&Rr(e,Math.max(0,s.scrollTop+o*bi)),Ir(e,Math.max(0,s.scrollLeft+i*bi)),(!o||o&&u)&&we(t),void(a.wheelStartX=null);if(o&&null!=bi){var g=o*bi,v=e.doc.scrollTop,m=v+a.wrapper.clientHeight;g<0?v=Math.max(0,v+g-50):m=Math.min(e.doc.height,m+g+50),ci(e,{top:v,bottom:m})}yi<20&&(null==a.wheelStartX?(a.wheelStartX=s.scrollLeft,a.wheelStartY=s.scrollTop,a.wheelDX=i,a.wheelDY=o,setTimeout((function(){if(null!=a.wheelStartX){var e=s.scrollLeft-a.wheelStartX,t=s.scrollTop-a.wheelStartY,n=t&&a.wheelDY&&t/a.wheelDY||e&&a.wheelDX&&e/a.wheelDX;a.wheelStartX=a.wheelStartY=null,n&&(bi=(bi*yi+n)/(yi+1),++yi)}}),200)):(a.wheelDX+=i,a.wheelDY+=o))}}a?bi=-.53:n?bi=15:u?bi=-.7:d&&(bi=-1/3);var ki=function(e,t){this.ranges=e,this.primIndex=t};ki.prototype.primary=function(){return this.ranges[this.primIndex]},ki.prototype.equals=function(e){if(e==this)return!0;if(e.primIndex!=this.primIndex||e.ranges.length!=this.ranges.length)return!1;for(var t=0;t<this.ranges.length;t++){var n=this.ranges[t],r=e.ranges[t];if(!rt(n.anchor,r.anchor)||!rt(n.head,r.head))return!1}return!0},ki.prototype.deepCopy=function(){for(var e=[],t=0;t<this.ranges.length;t++)e[t]=new Ci(it(this.ranges[t].anchor),it(this.ranges[t].head));return new ki(e,this.primIndex)},ki.prototype.somethingSelected=function(){for(var e=0;e<this.ranges.length;e++)if(!this.ranges[e].empty())return!0;return!1},ki.prototype.contains=function(e,t){t||(t=e);for(var n=0;n<this.ranges.length;n++){var r=this.ranges[n];if(nt(t,r.from())>=0&&nt(e,r.to())<=0)return n}return-1};var Ci=function(e,t){this.anchor=e,this.head=t};function Si(e,t,n){var r=e&&e.options.selectionsMayTouch,i=t[n];t.sort((function(e,t){return nt(e.from(),t.from())})),n=V(t,i);for(var o=1;o<t.length;o++){var a=t[o],s=t[o-1],l=nt(s.to(),a.from());if(r&&!a.empty()?l>0:l>=0){var c=at(s.from(),a.from()),u=ot(s.to(),a.to()),f=s.empty()?a.from()==a.head:s.from()==s.head;o<=n&&--n,t.splice(--o,2,new Ci(f?u:c,f?c:u))}}return new ki(t,n)}function ji(e,t){return new ki([new Ci(e,t||e)],0)}function Ei(e){return e.text?tt(e.from.line+e.text.length-1,Y(e.text).length+(1==e.text.length?e.from.ch:0)):e.to}function Pi(e,t){if(nt(e,t.from)<0)return e;if(nt(e,t.to)<=0)return Ei(t);var n=e.line+t.text.length-(t.to.line-t.from.line)-1,r=e.ch;return e.line==t.to.line&&(r+=Ei(t).ch-t.to.ch),tt(n,r)}function _i(e,t){for(var n=[],r=0;r<e.sel.ranges.length;r++){var i=e.sel.ranges[r];n.push(new Ci(Pi(i.anchor,t),Pi(i.head,t)))}return Si(e.cm,n,e.sel.primIndex)}function Ti(e,t,n){return e.line==t.line?tt(n.line,e.ch-t.ch+n.ch):tt(n.line+(e.line-t.line),e.ch)}function Ai(e){e.doc.mode=Ve(e.options,e.doc.modeOption),Mi(e)}function Mi(e){e.doc.iter((function(e){e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null)})),e.doc.modeFrontier=e.doc.highlightFrontier=e.doc.first,ii(e,100),e.state.modeGen++,e.curOp&&dr(e)}function Di(e,t){return 0==t.from.ch&&0==t.to.ch&&""==Y(t.text)&&(!e.cm||e.cm.options.wholeLineUpdateBefore)}function Li(e,t,n,r){function i(e){return n?n[e]:null}function o(e,n,i){!function(e,t,n,r){e.text=t,e.stateAfter&&(e.stateAfter=null),e.styles&&(e.styles=null),null!=e.order&&(e.order=null),_t(e),Tt(e,n);var i=r?r(e):1;i!=e.height&&Je(e,i)}(e,n,i,r),cn(e,"change",e,t)}function a(e,t){for(var n=[],o=e;o<t;++o)n.push(new Kt(c[o],i(o),r));return n}var s=t.from,l=t.to,c=t.text,u=Ke(e,s.line),f=Ke(e,l.line),d=Y(c),h=i(c.length-1),p=l.line-s.line;if(t.full)e.insert(0,a(0,c.length)),e.remove(c.length,e.size-c.length);else if(Di(e,t)){var g=a(0,c.length-1);o(f,f.text,h),p&&e.remove(s.line,p),g.length&&e.insert(s.line,g)}else if(u==f)if(1==c.length)o(u,u.text.slice(0,s.ch)+d+u.text.slice(l.ch),h);else{var v=a(1,c.length-1);v.push(new Kt(d+u.text.slice(l.ch),h,r)),o(u,u.text.slice(0,s.ch)+c[0],i(0)),e.insert(s.line+1,v)}else if(1==c.length)o(u,u.text.slice(0,s.ch)+c[0]+f.text.slice(l.ch),i(0)),e.remove(s.line+1,p);else{o(u,u.text.slice(0,s.ch)+c[0],i(0)),o(f,d+f.text.slice(l.ch),h);var m=a(1,c.length-1);p>1&&e.remove(s.line+1,p-1),e.insert(s.line+1,m)}cn(e,"change",e,t)}function Ni(e,t,n){!function e(r,i,o){if(r.linked)for(var a=0;a<r.linked.length;++a){var s=r.linked[a];if(s.doc!=i){var l=o&&s.sharedHist;n&&!l||(t(s.doc,l),e(s.doc,r,l))}}}(e,null,!0)}function Ri(e,t){if(t.cm)throw new Error("This document is already in use.");e.doc=t,t.cm=e,cr(e),Ai(e),Fi(e),e.options.direction=t.direction,e.options.lineWrapping||qt(e),e.options.mode=t.modeOption,dr(e)}function Fi(e){("rtl"==e.doc.direction?D:j)(e.display.lineDiv,"CodeMirror-rtl")}function Ii(e){this.done=[],this.undone=[],this.undoDepth=e?e.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=e?e.maxGeneration:1}function zi(e,t){var n={from:it(t.from),to:Ei(t),text:Ge(e,t.from,t.to)};return Wi(e,n,t.from.line,t.to.line+1),Ni(e,(function(e){return Wi(e,n,t.from.line,t.to.line+1)}),!0),n}function Vi(e){for(;e.length&&Y(e).ranges;)e.pop()}function Bi(e,t,n,r){var i=e.history;i.undone.length=0;var o,a,s=+new Date;if((i.lastOp==r||i.lastOrigin==t.origin&&t.origin&&("+"==t.origin.charAt(0)&&i.lastModTime>s-(e.cm?e.cm.options.historyEventDelay:500)||"*"==t.origin.charAt(0)))&&(o=function(e,t){return t?(Vi(e.done),Y(e.done)):e.done.length&&!Y(e.done).ranges?Y(e.done):e.done.length>1&&!e.done[e.done.length-2].ranges?(e.done.pop(),Y(e.done)):void 0}(i,i.lastOp==r)))a=Y(o.changes),0==nt(t.from,t.to)&&0==nt(t.from,a.to)?a.to=Ei(t):o.changes.push(zi(e,t));else{var l=Y(i.done);for(l&&l.ranges||Hi(e.sel,i.done),o={changes:[zi(e,t)],generation:i.generation},i.done.push(o);i.done.length>i.undoDepth;)i.done.shift(),i.done[0].ranges||i.done.shift()}i.done.push(n),i.generation=++i.maxGeneration,i.lastModTime=i.lastSelTime=s,i.lastOp=i.lastSelOp=r,i.lastOrigin=i.lastSelOrigin=t.origin,a||ge(e,"historyAdded")}function Ui(e,t,n,r){var i=e.history,o=r&&r.origin;n==i.lastSelOp||o&&i.lastSelOrigin==o&&(i.lastModTime==i.lastSelTime&&i.lastOrigin==o||function(e,t,n,r){var i=t.charAt(0);return"*"==i||"+"==i&&n.ranges.length==r.ranges.length&&n.somethingSelected()==r.somethingSelected()&&new Date-e.history.lastSelTime<=(e.cm?e.cm.options.historyEventDelay:500)}(e,o,Y(i.done),t))?i.done[i.done.length-1]=t:Hi(t,i.done),i.lastSelTime=+new Date,i.lastSelOrigin=o,i.lastSelOp=n,r&&!1!==r.clearRedo&&Vi(i.undone)}function Hi(e,t){var n=Y(t);n&&n.ranges&&n.equals(e)||t.push(e)}function Wi(e,t,n,r){var i=t["spans_"+e.id],o=0;e.iter(Math.max(e.first,n),Math.min(e.first+e.size,r),(function(n){n.markedSpans&&((i||(i=t["spans_"+e.id]={}))[o]=n.markedSpans),++o}))}function $i(e){if(!e)return null;for(var t,n=0;n<e.length;++n)e[n].marker.explicitlyCleared?t||(t=e.slice(0,n)):t&&t.push(e[n]);return t?t.length?t:null:e}function qi(e,t){var n=function(e,t){var n=t["spans_"+e.id];if(!n)return null;for(var r=[],i=0;i<t.text.length;++i)r.push($i(n[i]));return r}(e,t),r=Et(e,t);if(!n)return r;if(!r)return n;for(var i=0;i<n.length;++i){var o=n[i],a=r[i];if(o&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<o.length;++c)if(o[c].marker==l.marker)continue e;o.push(l)}else a&&(n[i]=a)}return n}function Ki(e,t,n){for(var r=[],i=0;i<e.length;++i){var o=e[i];if(o.ranges)r.push(n?ki.prototype.deepCopy.call(o):o);else{var a=o.changes,s=[];r.push({changes:s});for(var l=0;l<a.length;++l){var c=a[l],u=void 0;if(s.push({from:c.from,to:c.to,text:c.text}),t)for(var f in c)(u=f.match(/^spans_(\d+)$/))&&V(t,Number(u[1]))>-1&&(Y(s)[f]=c[f],delete c[f])}}}return r}function Gi(e,t,n,r){if(r){var i=e.anchor;if(n){var o=nt(t,i)<0;o!=nt(n,i)<0?(i=t,t=n):o!=nt(t,n)<0&&(t=n)}return new Ci(i,t)}return new Ci(n||t,t)}function Yi(e,t,n,r,i){null==i&&(i=e.cm&&(e.cm.display.shift||e.extend)),eo(e,new ki([Gi(e.sel.primary(),t,n,i)],0),r)}function Ji(e,t,n){for(var r=[],i=e.cm&&(e.cm.display.shift||e.extend),o=0;o<e.sel.ranges.length;o++)r[o]=Gi(e.sel.ranges[o],t[o],null,i);eo(e,Si(e.cm,r,e.sel.primIndex),n)}function Xi(e,t,n,r){var i=e.sel.ranges.slice(0);i[t]=n,eo(e,Si(e.cm,i,e.sel.primIndex),r)}function Qi(e,t,n,r){eo(e,ji(t,n),r)}function Zi(e,t,n){var r=e.history.done,i=Y(r);i&&i.ranges?(r[r.length-1]=t,to(e,t,n)):eo(e,t,n)}function eo(e,t,n){to(e,t,n),Ui(e,e.sel,e.cm?e.cm.curOp.id:NaN,n)}function to(e,t,n){(ye(e,"beforeSelectionChange")||e.cm&&ye(e.cm,"beforeSelectionChange"))&&(t=function(e,t,n){var r={ranges:t.ranges,update:function(t){this.ranges=[];for(var n=0;n<t.length;n++)this.ranges[n]=new Ci(lt(e,t[n].anchor),lt(e,t[n].head))},origin:n&&n.origin};return ge(e,"beforeSelectionChange",e,r),e.cm&&ge(e.cm,"beforeSelectionChange",e.cm,r),r.ranges!=t.ranges?Si(e.cm,r.ranges,r.ranges.length-1):t}(e,t,n));var r=n&&n.bias||(nt(t.primary().head,e.sel.primary().head)<0?-1:1);no(e,io(e,t,r,!0)),n&&!1===n.scroll||!e.cm||"nocursor"==e.cm.getOption("readOnly")||Mr(e.cm)}function no(e,t){t.equals(e.sel)||(e.sel=t,e.cm&&(e.cm.curOp.updateInput=1,e.cm.curOp.selectionChanged=!0,me(e.cm)),cn(e,"cursorActivity",e))}function ro(e){no(e,io(e,e.sel,null,!1))}function io(e,t,n,r){for(var i,o=0;o<t.ranges.length;o++){var a=t.ranges[o],s=t.ranges.length==e.sel.ranges.length&&e.sel.ranges[o],l=ao(e,a.anchor,s&&s.anchor,n,r),c=ao(e,a.head,s&&s.head,n,r);(i||l!=a.anchor||c!=a.head)&&(i||(i=t.ranges.slice(0,o)),i[o]=new Ci(l,c))}return i?Si(e.cm,i,t.primIndex):t}function oo(e,t,n,r,i){var o=Ke(e,t.line);if(o.markedSpans)for(var a=0;a<o.markedSpans.length;++a){var s=o.markedSpans[a],l=s.marker,c="selectLeft"in l?!l.selectLeft:l.inclusiveLeft,u="selectRight"in l?!l.selectRight:l.inclusiveRight;if((null==s.from||(c?s.from<=t.ch:s.from<t.ch))&&(null==s.to||(u?s.to>=t.ch:s.to>t.ch))){if(i&&(ge(l,"beforeCursorEnter"),l.explicitlyCleared)){if(o.markedSpans){--a;continue}break}if(!l.atomic)continue;if(n){var f=l.find(r<0?1:-1),d=void 0;if((r<0?u:c)&&(f=so(e,f,-r,f&&f.line==t.line?o:null)),f&&f.line==t.line&&(d=nt(f,n))&&(r<0?d<0:d>0))return oo(e,f,t,r,i)}var h=l.find(r<0?-1:1);return(r<0?c:u)&&(h=so(e,h,r,h.line==t.line?o:null)),h?oo(e,h,t,r,i):null}}return t}function ao(e,t,n,r,i){var o=r||1,a=oo(e,t,n,o,i)||!i&&oo(e,t,n,o,!0)||oo(e,t,n,-o,i)||!i&&oo(e,t,n,-o,!0);return a||(e.cantEdit=!0,tt(e.first,0))}function so(e,t,n,r){return n<0&&0==t.ch?t.line>e.first?lt(e,tt(t.line-1)):null:n>0&&t.ch==(r||Ke(e,t.line)).text.length?t.line<e.first+e.size-1?tt(t.line+1,0):null:new tt(t.line,t.ch+n)}function lo(e){e.setSelection(tt(e.firstLine(),0),tt(e.lastLine()),H)}function co(e,t,n){var r={canceled:!1,from:t.from,to:t.to,text:t.text,origin:t.origin,cancel:function(){return r.canceled=!0}};return n&&(r.update=function(t,n,i,o){t&&(r.from=lt(e,t)),n&&(r.to=lt(e,n)),i&&(r.text=i),void 0!==o&&(r.origin=o)}),ge(e,"beforeChange",e,r),e.cm&&ge(e.cm,"beforeChange",e.cm,r),r.canceled?(e.cm&&(e.cm.curOp.updateInput=2),null):{from:r.from,to:r.to,text:r.text,origin:r.origin}}function uo(e,t,n){if(e.cm){if(!e.cm.curOp)return ti(e.cm,uo)(e,t,n);if(e.cm.state.suppressEdits)return}if(!(ye(e,"beforeChange")||e.cm&&ye(e.cm,"beforeChange"))||(t=co(e,t,!0))){var r=xt&&!n&&function(e,t,n){var r=null;if(e.iter(t.line,n.line+1,(function(e){if(e.markedSpans)for(var t=0;t<e.markedSpans.length;++t){var n=e.markedSpans[t].marker;!n.readOnly||r&&-1!=V(r,n)||(r||(r=[])).push(n)}})),!r)return null;for(var i=[{from:t,to:n}],o=0;o<r.length;++o)for(var a=r[o],s=a.find(0),l=0;l<i.length;++l){var c=i[l];if(!(nt(c.to,s.from)<0||nt(c.from,s.to)>0)){var u=[l,1],f=nt(c.from,s.from),d=nt(c.to,s.to);(f<0||!a.inclusiveLeft&&!f)&&u.push({from:c.from,to:s.from}),(d>0||!a.inclusiveRight&&!d)&&u.push({from:s.to,to:c.to}),i.splice.apply(i,u),l+=u.length-3}}return i}(e,t.from,t.to);if(r)for(var i=r.length-1;i>=0;--i)fo(e,{from:r[i].from,to:r[i].to,text:i?[""]:t.text,origin:t.origin});else fo(e,t)}}function fo(e,t){if(1!=t.text.length||""!=t.text[0]||0!=nt(t.from,t.to)){var n=_i(e,t);Bi(e,t,n,e.cm?e.cm.curOp.id:NaN),go(e,t,n,Et(e,t));var r=[];Ni(e,(function(e,n){n||-1!=V(r,e.history)||(bo(e.history,t),r.push(e.history)),go(e,t,null,Et(e,t))}))}}function ho(e,t,n){var r=e.cm&&e.cm.state.suppressEdits;if(!r||n){for(var i,o=e.history,a=e.sel,s="undo"==t?o.done:o.undone,l="undo"==t?o.undone:o.done,c=0;c<s.length&&(i=s[c],n?!i.ranges||i.equals(e.sel):i.ranges);c++);if(c!=s.length){for(o.lastOrigin=o.lastSelOrigin=null;;){if(!(i=s.pop()).ranges){if(r)return void s.push(i);break}if(Hi(i,l),n&&!i.equals(e.sel))return void eo(e,i,{clearRedo:!1});a=i}var u=[];Hi(a,l),l.push({changes:u,generation:o.generation}),o.generation=i.generation||++o.maxGeneration;for(var f=ye(e,"beforeChange")||e.cm&&ye(e.cm,"beforeChange"),d=function(n){var r=i.changes[n];if(r.origin=t,f&&!co(e,r,!1))return s.length=0,{};u.push(zi(e,r));var o=n?_i(e,r):Y(s);go(e,r,o,qi(e,r)),!n&&e.cm&&e.cm.scrollIntoView({from:r.from,to:Ei(r)});var a=[];Ni(e,(function(e,t){t||-1!=V(a,e.history)||(bo(e.history,r),a.push(e.history)),go(e,r,null,qi(e,r))}))},h=i.changes.length-1;h>=0;--h){var p=d(h);if(p)return p.v}}}}function po(e,t){if(0!=t&&(e.first+=t,e.sel=new ki(J(e.sel.ranges,(function(e){return new Ci(tt(e.anchor.line+t,e.anchor.ch),tt(e.head.line+t,e.head.ch))})),e.sel.primIndex),e.cm)){dr(e.cm,e.first,e.first-t,t);for(var n=e.cm.display,r=n.viewFrom;r<n.viewTo;r++)hr(e.cm,r,"gutter")}}function go(e,t,n,r){if(e.cm&&!e.cm.curOp)return ti(e.cm,go)(e,t,n,r);if(t.to.line<e.first)po(e,t.text.length-1-(t.to.line-t.from.line));else if(!(t.from.line>e.lastLine())){if(t.from.line<e.first){var i=t.text.length-1-(e.first-t.from.line);po(e,i),t={from:tt(e.first,0),to:tt(t.to.line+i,t.to.ch),text:[Y(t.text)],origin:t.origin}}var o=e.lastLine();t.to.line>o&&(t={from:t.from,to:tt(o,Ke(e,o).text.length),text:[t.text[0]],origin:t.origin}),t.removed=Ge(e,t.from,t.to),n||(n=_i(e,t)),e.cm?function(e,t,n){var r=e.doc,i=e.display,o=t.from,a=t.to,s=!1,l=o.line;e.options.lineWrapping||(l=Xe(zt(Ke(r,o.line))),r.iter(l,a.line+1,(function(e){if(e==i.maxLine)return s=!0,!0}))),r.sel.contains(t.from,t.to)>-1&&me(e),Li(r,t,n,lr(e)),e.options.lineWrapping||(r.iter(l,o.line+t.text.length,(function(e){var t=$t(e);t>i.maxLineLength&&(i.maxLine=e,i.maxLineLength=t,i.maxLineChanged=!0,s=!1)})),s&&(e.curOp.updateMaxLine=!0)),function(e,t){if(e.modeFrontier=Math.min(e.modeFrontier,t),!(e.highlightFrontier<t-10)){for(var n=e.first,r=t-1;r>n;r--){var i=Ke(e,r).stateAfter;if(i&&(!(i instanceof ut)||r+i.lookAhead<t)){n=r+1;break}}e.highlightFrontier=Math.min(e.highlightFrontier,n)}}(r,o.line),ii(e,400);var c=t.text.length-(a.line-o.line)-1;t.full?dr(e):o.line!=a.line||1!=t.text.length||Di(e.doc,t)?dr(e,o.line,a.line+1,c):hr(e,o.line,"text");var u=ye(e,"changes"),f=ye(e,"change");if(f||u){var d={from:o,to:a,text:t.text,removed:t.removed,origin:t.origin};f&&cn(e,"change",e,d),u&&(e.curOp.changeObjs||(e.curOp.changeObjs=[])).push(d)}e.display.selForContextMenu=null}(e.cm,t,r):Li(e,t,r),to(e,n,H),e.cantEdit&&ao(e,tt(e.firstLine(),0))&&(e.cantEdit=!1)}}function vo(e,t,n,r,i){var o;r||(r=n),nt(r,n)<0&&(n=(o=[r,n])[0],r=o[1]),"string"==typeof t&&(t=e.splitLines(t)),uo(e,{from:n,to:r,text:t,origin:i})}function mo(e,t,n,r){n<e.line?e.line+=r:t<e.line&&(e.line=t,e.ch=0)}function yo(e,t,n,r){for(var i=0;i<e.length;++i){var o=e[i],a=!0;if(o.ranges){o.copied||((o=e[i]=o.deepCopy()).copied=!0);for(var s=0;s<o.ranges.length;s++)mo(o.ranges[s].anchor,t,n,r),mo(o.ranges[s].head,t,n,r)}else{for(var l=0;l<o.changes.length;++l){var c=o.changes[l];if(n<c.from.line)c.from=tt(c.from.line+r,c.from.ch),c.to=tt(c.to.line+r,c.to.ch);else if(t<=c.to.line){a=!1;break}}a||(e.splice(0,i+1),i=0)}}}function bo(e,t){var n=t.from.line,r=t.to.line,i=t.text.length-(r-n)-1;yo(e.done,n,r,i),yo(e.undone,n,r,i)}function wo(e,t,n,r){var i=t,o=t;return"number"==typeof t?o=Ke(e,st(e,t)):i=Xe(t),null==i?null:(r(o,i)&&e.cm&&hr(e.cm,i,n),o)}function Oo(e){this.lines=e,this.parent=null;for(var t=0,n=0;n<e.length;++n)e[n].parent=this,t+=e[n].height;this.height=t}function xo(e){this.children=e;for(var t=0,n=0,r=0;r<e.length;++r){var i=e[r];t+=i.chunkSize(),n+=i.height,i.parent=this}this.size=t,this.height=n,this.parent=null}Ci.prototype.from=function(){return at(this.anchor,this.head)},Ci.prototype.to=function(){return ot(this.anchor,this.head)},Ci.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch},Oo.prototype={chunkSize:function(){return this.lines.length},removeInner:function(e,t){for(var n=e,r=e+t;n<r;++n){var i=this.lines[n];this.height-=i.height,Gt(i),cn(i,"delete")}this.lines.splice(e,t)},collapse:function(e){e.push.apply(e,this.lines)},insertInner:function(e,t,n){this.height+=n,this.lines=this.lines.slice(0,e).concat(t).concat(this.lines.slice(e));for(var r=0;r<t.length;++r)t[r].parent=this},iterN:function(e,t,n){for(var r=e+t;e<r;++e)if(n(this.lines[e]))return!0}},xo.prototype={chunkSize:function(){return this.size},removeInner:function(e,t){this.size-=t;for(var n=0;n<this.children.length;++n){var r=this.children[n],i=r.chunkSize();if(e<i){var o=Math.min(t,i-e),a=r.height;if(r.removeInner(e,o),this.height-=a-r.height,i==o&&(this.children.splice(n--,1),r.parent=null),0==(t-=o))break;e=0}else e-=i}if(this.size-t<25&&(this.children.length>1||!(this.children[0]instanceof Oo))){var s=[];this.collapse(s),this.children=[new Oo(s)],this.children[0].parent=this}},collapse:function(e){for(var t=0;t<this.children.length;++t)this.children[t].collapse(e)},insertInner:function(e,t,n){this.size+=t.length,this.height+=n;for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<=o){if(i.insertInner(e,t,n),i.lines&&i.lines.length>50){for(var a=i.lines.length%25+25,s=a;s<i.lines.length;){var l=new Oo(i.lines.slice(s,s+=25));i.height-=l.height,this.children.splice(++r,0,l),l.parent=this}i.lines=i.lines.slice(0,a),this.maybeSpill()}break}e-=o}},maybeSpill:function(){if(!(this.children.length<=10)){var e=this;do{var t=new xo(e.children.splice(e.children.length-5,5));if(e.parent){e.size-=t.size,e.height-=t.height;var n=V(e.parent.children,e);e.parent.children.splice(n+1,0,t)}else{var r=new xo(e.children);r.parent=e,e.children=[r,t],e=r}t.parent=e.parent}while(e.children.length>10);e.parent.maybeSpill()}},iterN:function(e,t,n){for(var r=0;r<this.children.length;++r){var i=this.children[r],o=i.chunkSize();if(e<o){var a=Math.min(t,o-e);if(i.iterN(e,a,n))return!0;if(0==(t-=a))break;e=0}else e-=o}}};var ko=function(e,t,n){if(n)for(var r in n)n.hasOwnProperty(r)&&(this[r]=n[r]);this.doc=e,this.node=t};function Co(e,t,n){Wt(t)<(e.curOp&&e.curOp.scrollTop||e.doc.scrollTop)&&Ar(e,n)}ko.prototype.clear=function(){var e=this.doc.cm,t=this.line.widgets,n=this.line,r=Xe(n);if(null!=r&&t){for(var i=0;i<t.length;++i)t[i]==this&&t.splice(i--,1);t.length||(n.widgets=null);var o=xn(this);Je(n,Math.max(0,n.height-o)),e&&(ei(e,(function(){Co(e,n,-o),hr(e,r,"widget")})),cn(e,"lineWidgetCleared",e,this,r))}},ko.prototype.changed=function(){var e=this,t=this.height,n=this.doc.cm,r=this.line;this.height=null;var i=xn(this)-t;i&&(Ut(this.doc,r)||Je(r,r.height+i),n&&ei(n,(function(){n.curOp.forceUpdate=!0,Co(n,r,i),cn(n,"lineWidgetChanged",n,e,Xe(r))})))},be(ko);var So=0,jo=function(e,t){this.lines=[],this.type=t,this.doc=e,this.id=++So};function Eo(e,t,n,r,i){if(r&&r.shared)return function(e,t,n,r,i){(r=F(r)).shared=!1;var o=[Eo(e,t,n,r,i)],a=o[0],s=r.widgetNode;return Ni(e,(function(e){s&&(r.widgetNode=s.cloneNode(!0)),o.push(Eo(e,lt(e,t),lt(e,n),r,i));for(var l=0;l<e.linked.length;++l)if(e.linked[l].isParent)return;a=Y(o)})),new Po(o,a)}(e,t,n,r,i);if(e.cm&&!e.cm.curOp)return ti(e.cm,Eo)(e,t,n,r,i);var o=new jo(e,i),a=nt(t,n);if(r&&F(r,o,!1),a>0||0==a&&!1!==o.clearWhenEmpty)return o;if(o.replacedWith&&(o.collapsed=!0,o.widgetNode=T("span",[o.replacedWith],"CodeMirror-widget"),r.handleMouseEvents||o.widgetNode.setAttribute("cm-ignore-events","true"),r.insertLeft&&(o.widgetNode.insertLeft=!0)),o.collapsed){if(It(e,t.line,t,n,o)||t.line!=n.line&&It(e,n.line,t,n,o))throw new Error("Inserting collapsed marker partially overlapping an existing one");kt=!0}o.addToHistory&&Bi(e,{from:t,to:n,origin:"markText"},e.sel,NaN);var s,l=t.line,c=e.cm;if(e.iter(l,n.line+1,(function(r){c&&o.collapsed&&!c.options.lineWrapping&&zt(r)==c.display.maxLine&&(s=!0),o.collapsed&&l!=t.line&&Je(r,0),function(e,t,n){var r=n&&window.WeakSet&&(n.markedSpans||(n.markedSpans=new WeakSet));r&&r.has(e.markedSpans)?e.markedSpans.push(t):(e.markedSpans=e.markedSpans?e.markedSpans.concat([t]):[t],r&&r.add(e.markedSpans)),t.marker.attachLine(e)}(r,new Ct(o,l==t.line?t.ch:null,l==n.line?n.ch:null),e.cm&&e.cm.curOp),++l})),o.collapsed&&e.iter(t.line,n.line+1,(function(t){Ut(e,t)&&Je(t,0)})),o.clearOnEnter&&de(o,"beforeCursorEnter",(function(){return o.clear()})),o.readOnly&&(xt=!0,(e.history.done.length||e.history.undone.length)&&e.clearHistory()),o.collapsed&&(o.id=++So,o.atomic=!0),c){if(s&&(c.curOp.updateMaxLine=!0),o.collapsed)dr(c,t.line,n.line+1);else if(o.className||o.startStyle||o.endStyle||o.css||o.attributes||o.title)for(var u=t.line;u<=n.line;u++)hr(c,u,"text");o.atomic&&ro(c.doc),cn(c,"markerAdded",c,o)}return o}jo.prototype.clear=function(){if(!this.explicitlyCleared){var e=this.doc.cm,t=e&&!e.curOp;if(t&&Kr(e),ye(this,"clear")){var n=this.find();n&&cn(this,"clear",n.from,n.to)}for(var r=null,i=null,o=0;o<this.lines.length;++o){var a=this.lines[o],s=St(a.markedSpans,this);e&&!this.collapsed?hr(e,Xe(a),"text"):e&&(null!=s.to&&(i=Xe(a)),null!=s.from&&(r=Xe(a))),a.markedSpans=jt(a.markedSpans,s),null==s.from&&this.collapsed&&!Ut(this.doc,a)&&e&&Je(a,ir(e.display))}if(e&&this.collapsed&&!e.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=zt(this.lines[l]),u=$t(c);u>e.display.maxLineLength&&(e.display.maxLine=c,e.display.maxLineLength=u,e.display.maxLineChanged=!0)}null!=r&&e&&this.collapsed&&dr(e,r,i+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,e&&ro(e.doc)),e&&cn(e,"markerCleared",e,this,r,i),t&&Gr(e),this.parent&&this.parent.clear()}},jo.prototype.find=function(e,t){var n,r;null==e&&"bookmark"==this.type&&(e=1);for(var i=0;i<this.lines.length;++i){var o=this.lines[i],a=St(o.markedSpans,this);if(null!=a.from&&(n=tt(t?o:Xe(o),a.from),-1==e))return n;if(null!=a.to&&(r=tt(t?o:Xe(o),a.to),1==e))return r}return n&&{from:n,to:r}},jo.prototype.changed=function(){var e=this,t=this.find(-1,!0),n=this,r=this.doc.cm;t&&r&&ei(r,(function(){var i=t.line,o=Xe(t.line),a=Mn(r,o);if(a&&(zn(a),r.curOp.selectionChanged=r.curOp.forceUpdate=!0),r.curOp.updateMaxLine=!0,!Ut(n.doc,i)&&null!=n.height){var s=n.height;n.height=null;var l=xn(n)-s;l&&Je(i,i.height+l)}cn(r,"markerChanged",r,e)}))},jo.prototype.attachLine=function(e){if(!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;t.maybeHiddenMarkers&&-1!=V(t.maybeHiddenMarkers,this)||(t.maybeUnhiddenMarkers||(t.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(e)},jo.prototype.detachLine=function(e){if(this.lines.splice(V(this.lines,e),1),!this.lines.length&&this.doc.cm){var t=this.doc.cm.curOp;(t.maybeHiddenMarkers||(t.maybeHiddenMarkers=[])).push(this)}},be(jo);var Po=function(e,t){this.markers=e,this.primary=t;for(var n=0;n<e.length;++n)e[n].parent=this};function _o(e){return e.findMarks(tt(e.first,0),e.clipPos(tt(e.lastLine())),(function(e){return e.parent}))}function To(e){for(var t=function(t){var n=e[t],r=[n.primary.doc];Ni(n.primary.doc,(function(e){return r.push(e)}));for(var i=0;i<n.markers.length;i++){var o=n.markers[i];-1==V(r,o.doc)&&(o.parent=null,n.markers.splice(i--,1))}},n=0;n<e.length;n++)t(n)}Po.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var e=0;e<this.markers.length;++e)this.markers[e].clear();cn(this,"clear")}},Po.prototype.find=function(e,t){return this.primary.find(e,t)},be(Po);var Ao=0,Mo=function(e,t,n,r,i){if(!(this instanceof Mo))return new Mo(e,t,n,r,i);null==n&&(n=0),xo.call(this,[new Oo([new Kt("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var o=tt(n,0);this.sel=ji(o),this.history=new Ii(null),this.id=++Ao,this.modeOption=t,this.lineSep=r,this.direction="rtl"==i?"rtl":"ltr",this.extend=!1,"string"==typeof e&&(e=this.splitLines(e)),Li(this,{from:o,to:o,text:e}),eo(this,ji(o),H)};Mo.prototype=Q(xo.prototype,{constructor:Mo,iter:function(e,t,n){n?this.iterN(e-this.first,t-e,n):this.iterN(this.first,this.first+this.size,e)},insert:function(e,t){for(var n=0,r=0;r<t.length;++r)n+=t[r].height;this.insertInner(e-this.first,t,n)},remove:function(e,t){this.removeInner(e-this.first,t)},getValue:function(e){var t=Ye(this,this.first,this.first+this.size);return!1===e?t:t.join(e||this.lineSeparator())},setValue:ri((function(e){var t=tt(this.first,0),n=this.first+this.size-1;uo(this,{from:t,to:tt(n,Ke(this,n).text.length),text:this.splitLines(e),origin:"setValue",full:!0},!0),this.cm&&Dr(this.cm,0,0),eo(this,ji(t),H)})),replaceRange:function(e,t,n,r){vo(this,e,t=lt(this,t),n=n?lt(this,n):t,r)},getRange:function(e,t,n){var r=Ge(this,lt(this,e),lt(this,t));return!1===n?r:''===n?r.join(''):r.join(n||this.lineSeparator())},getLine:function(e){var t=this.getLineHandle(e);return t&&t.text},getLineHandle:function(e){if(Ze(this,e))return Ke(this,e)},getLineNumber:function(e){return Xe(e)},getLineHandleVisualStart:function(e){return"number"==typeof e&&(e=Ke(this,e)),zt(e)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(e){return lt(this,e)},getCursor:function(e){var t=this.sel.primary();return null==e||"head"==e?t.head:"anchor"==e?t.anchor:"end"==e||"to"==e||!1===e?t.to():t.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:ri((function(e,t,n){Qi(this,lt(this,"number"==typeof e?tt(e,t||0):e),null,n)})),setSelection:ri((function(e,t,n){Qi(this,lt(this,e),lt(this,t||e),n)})),extendSelection:ri((function(e,t,n){Yi(this,lt(this,e),t&&lt(this,t),n)})),extendSelections:ri((function(e,t){Ji(this,ct(this,e),t)})),extendSelectionsBy:ri((function(e,t){Ji(this,ct(this,J(this.sel.ranges,e)),t)})),setSelections:ri((function(e,t,n){if(e.length){for(var r=[],i=0;i<e.length;i++)r[i]=new Ci(lt(this,e[i].anchor),lt(this,e[i].head||e[i].anchor));null==t&&(t=Math.min(e.length-1,this.sel.primIndex)),eo(this,Si(this.cm,r,t),n)}})),addSelection:ri((function(e,t,n){var r=this.sel.ranges.slice(0);r.push(new Ci(lt(this,e),lt(this,t||e))),eo(this,Si(this.cm,r,r.length-1),n)})),getSelection:function(e){for(var t,n=this.sel.ranges,r=0;r<n.length;r++){var i=Ge(this,n[r].from(),n[r].to());t=t?t.concat(i):i}return!1===e?t:t.join(e||this.lineSeparator())},getSelections:function(e){for(var t=[],n=this.sel.ranges,r=0;r<n.length;r++){var i=Ge(this,n[r].from(),n[r].to());!1!==e&&(i=i.join(e||this.lineSeparator())),t[r]=i}return t},replaceSelection:function(e,t,n){for(var r=[],i=0;i<this.sel.ranges.length;i++)r[i]=e;this.replaceSelections(r,t,n||"+input")},replaceSelections:ri((function(e,t,n){for(var r=[],i=this.sel,o=0;o<i.ranges.length;o++){var a=i.ranges[o];r[o]={from:a.from(),to:a.to(),text:this.splitLines(e[o]),origin:n}}for(var s=t&&"end"!=t&&function(e,t,n){for(var r=[],i=tt(e.first,0),o=i,a=0;a<t.length;a++){var s=t[a],l=Ti(s.from,i,o),c=Ti(Ei(s),i,o);if(i=s.to,o=c,"around"==n){var u=e.sel.ranges[a],f=nt(u.head,u.anchor)<0;r[a]=new Ci(f?c:l,f?l:c)}else r[a]=new Ci(l,l)}return new ki(r,e.sel.primIndex)}(this,r,t),l=r.length-1;l>=0;l--)uo(this,r[l]);s?Zi(this,s):this.cm&&Mr(this.cm)})),undo:ri((function(){ho(this,"undo")})),redo:ri((function(){ho(this,"redo")})),undoSelection:ri((function(){ho(this,"undo",!0)})),redoSelection:ri((function(){ho(this,"redo",!0)})),setExtending:function(e){this.extend=e},getExtending:function(){return this.extend},historySize:function(){for(var e=this.history,t=0,n=0,r=0;r<e.done.length;r++)e.done[r].ranges||++t;for(var i=0;i<e.undone.length;i++)e.undone[i].ranges||++n;return{undo:t,redo:n}},clearHistory:function(){var e=this;this.history=new Ii(this.history),Ni(this,(function(t){return t.history=e.history}),!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(e){return e&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(e){return this.history.generation==(e||this.cleanGeneration)},getHistory:function(){return{done:Ki(this.history.done),undone:Ki(this.history.undone)}},setHistory:function(e){var t=this.history=new Ii(this.history);t.done=Ki(e.done.slice(0),null,!0),t.undone=Ki(e.undone.slice(0),null,!0)},setGutterMarker:ri((function(e,t,n){return wo(this,e,"gutter",(function(e){var r=e.gutterMarkers||(e.gutterMarkers={});return r[t]=n,!n&&ne(r)&&(e.gutterMarkers=null),!0}))})),clearGutter:ri((function(e){var t=this;this.iter((function(n){n.gutterMarkers&&n.gutterMarkers[e]&&wo(t,n,"gutter",(function(){return n.gutterMarkers[e]=null,ne(n.gutterMarkers)&&(n.gutterMarkers=null),!0}))}))})),lineInfo:function(e){var t;if("number"==typeof e){if(!Ze(this,e))return null;if(t=e,!(e=Ke(this,e)))return null}else if(null==(t=Xe(e)))return null;return{line:t,handle:e,text:e.text,gutterMarkers:e.gutterMarkers,textClass:e.textClass,bgClass:e.bgClass,wrapClass:e.wrapClass,widgets:e.widgets}},addLineClass:ri((function(e,t,n){return wo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass";if(e[r]){if(C(n).test(e[r]))return!1;e[r]+=" "+n}else e[r]=n;return!0}))})),removeLineClass:ri((function(e,t,n){return wo(this,e,"gutter"==t?"gutter":"class",(function(e){var r="text"==t?"textClass":"background"==t?"bgClass":"gutter"==t?"gutterClass":"wrapClass",i=e[r];if(!i)return!1;if(null==n)e[r]=null;else{var o=i.match(C(n));if(!o)return!1;var a=o.index+o[0].length;e[r]=i.slice(0,o.index)+(o.index&&a!=i.length?" ":"")+i.slice(a)||null}return!0}))})),addLineWidget:ri((function(e,t,n){return function(e,t,n,r){var i=new ko(e,n,r),o=e.cm;return o&&i.noHScroll&&(o.display.alignWidgets=!0),wo(e,t,"widget",(function(t){var n=t.widgets||(t.widgets=[]);if(null==i.insertAt?n.push(i):n.splice(Math.min(n.length,Math.max(0,i.insertAt)),0,i),i.line=t,o&&!Ut(e,t)){var r=Wt(t)<e.scrollTop;Je(t,t.height+xn(i)),r&&Ar(o,i.height),o.curOp.forceUpdate=!0}return!0})),o&&cn(o,"lineWidgetAdded",o,i,"number"==typeof t?t:Xe(t)),i}(this,e,t,n)})),removeLineWidget:function(e){e.clear()},markText:function(e,t,n){return Eo(this,lt(this,e),lt(this,t),n,n&&n.type||"range")},setBookmark:function(e,t){var n={replacedWith:t&&(null==t.nodeType?t.widget:t),insertLeft:t&&t.insertLeft,clearWhenEmpty:!1,shared:t&&t.shared,handleMouseEvents:t&&t.handleMouseEvents};return Eo(this,e=lt(this,e),e,n,"bookmark")},findMarksAt:function(e){var t=[],n=Ke(this,(e=lt(this,e)).line).markedSpans;if(n)for(var r=0;r<n.length;++r){var i=n[r];(null==i.from||i.from<=e.ch)&&(null==i.to||i.to>=e.ch)&&t.push(i.marker.parent||i.marker)}return t},findMarks:function(e,t,n){e=lt(this,e),t=lt(this,t);var r=[],i=e.line;return this.iter(e.line,t.line+1,(function(o){var a=o.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];null!=l.to&&i==e.line&&e.ch>=l.to||null==l.from&&i!=e.line||null!=l.from&&i==t.line&&l.from>=t.ch||n&&!n(l.marker)||r.push(l.marker.parent||l.marker)}++i})),r},getAllMarks:function(){var e=[];return this.iter((function(t){var n=t.markedSpans;if(n)for(var r=0;r<n.length;++r)null!=n[r].from&&e.push(n[r].marker)})),e},posFromIndex:function(e){var t,n=this.first,r=this.lineSeparator().length;return this.iter((function(i){var o=i.text.length+r;if(o>e)return t=e,!0;e-=o,++n})),lt(this,tt(n,t))},indexFromPos:function(e){var t=(e=lt(this,e)).ch;if(e.line<this.first||e.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,e.line,(function(e){t+=e.text.length+n})),t},copy:function(e){var t=new Mo(Ye(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return t.scrollTop=this.scrollTop,t.scrollLeft=this.scrollLeft,t.sel=this.sel,t.extend=!1,e&&(t.history.undoDepth=this.history.undoDepth,t.setHistory(this.getHistory())),t},linkedDoc:function(e){e||(e={});var t=this.first,n=this.first+this.size;null!=e.from&&e.from>t&&(t=e.from),null!=e.to&&e.to<n&&(n=e.to);var r=new Mo(Ye(this,t,n),e.mode||this.modeOption,t,this.lineSep,this.direction);return e.sharedHist&&(r.history=this.history),(this.linked||(this.linked=[])).push({doc:r,sharedHist:e.sharedHist}),r.linked=[{doc:this,isParent:!0,sharedHist:e.sharedHist}],function(e,t){for(var n=0;n<t.length;n++){var r=t[n],i=r.find(),o=e.clipPos(i.from),a=e.clipPos(i.to);if(nt(o,a)){var s=Eo(e,o,a,r.primary,r.primary.type);r.markers.push(s),s.parent=r}}}(r,_o(this)),r},unlinkDoc:function(e){if(e instanceof _a&&(e=e.doc),this.linked)for(var t=0;t<this.linked.length;++t)if(this.linked[t].doc==e){this.linked.splice(t,1),e.unlinkDoc(this),To(_o(this));break}if(e.history==this.history){var n=[e.id];Ni(e,(function(e){return n.push(e.id)}),!0),e.history=new Ii(null),e.history.done=Ki(this.history.done,n),e.history.undone=Ki(this.history.undone,n)}},iterLinkedDocs:function(e){Ni(this,e)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(e){return this.lineSep?e.split(this.lineSep):Me(e)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:ri((function(e){var t;"rtl"!=e&&(e="ltr"),e!=this.direction&&(this.direction=e,this.iter((function(e){return e.order=null})),this.cm&&ei(t=this.cm,(function(){Fi(t),dr(t)})))}))}),Mo.prototype.eachLine=Mo.prototype.iter;var Do=0;function Lo(e){var t=this;if(No(t),!ve(t,e)&&!kn(t.display,e)){we(e),a&&(Do=+new Date);var n=ur(t,e,!0),r=e.dataTransfer.files;if(n&&!t.isReadOnly())if(r&&r.length&&window.FileReader&&window.File)for(var i=r.length,o=Array(i),s=0,l=function(){++s==i&&ti(t,(function(){var e={from:n=lt(t.doc,n),to:n,text:t.doc.splitLines(o.filter((function(e){return null!=e})).join(t.doc.lineSeparator())),origin:"paste"};uo(t.doc,e),Zi(t.doc,ji(lt(t.doc,n),lt(t.doc,Ei(e))))}))()},c=function(e,n){if(t.options.allowDropFileTypes&&-1==V(t.options.allowDropFileTypes,e.type))l();else{var r=new FileReader;r.onerror=function(){return l()},r.onload=function(){var e=r.result;/[\x00-\x08\x0e-\x1f]{2}/.test(e)||(o[n]=e),l()},r.readAsText(e)}},u=0;u<r.length;u++)c(r[u],u);else{if(t.state.draggingText&&t.doc.sel.contains(n)>-1)return t.state.draggingText(e),void setTimeout((function(){return t.display.input.focus()}),20);try{var f=e.dataTransfer.getData("Text");if(f){var d;if(t.state.draggingText&&!t.state.draggingText.copy&&(d=t.listSelections()),to(t.doc,ji(n,n)),d)for(var h=0;h<d.length;++h)vo(t.doc,"",d[h].anchor,d[h].head,"drag");t.replaceSelection(f,"around","paste"),t.display.input.focus()}}catch(e){}}}}function No(e){e.display.dragCursor&&(e.display.lineSpace.removeChild(e.display.dragCursor),e.display.dragCursor=null)}function Ro(e){if(document.getElementsByClassName){for(var t=document.getElementsByClassName("CodeMirror"),n=[],r=0;r<t.length;r++){var i=t[r].CodeMirror;i&&n.push(i)}n.length&&n[0].operation((function(){for(var t=0;t<n.length;t++)e(n[t])}))}}var Fo=!1;function Io(){var e;Fo||(de(window,"resize",(function(){null==e&&(e=setTimeout((function(){e=null,Ro(zo)}),100))})),de(window,"blur",(function(){return Ro(jr)})),Fo=!0)}function zo(e){var t=e.display;t.cachedCharWidth=t.cachedTextHeight=t.cachedPaddingH=null,t.scrollbarsClipped=!1,e.setSize()}for(var Vo={3:"Pause",8:"Backspace",9:"Tab",13:"Enter",16:"Shift",17:"Ctrl",18:"Alt",19:"Pause",20:"CapsLock",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"PrintScrn",45:"Insert",46:"Delete",59:";",61:"=",91:"Mod",92:"Mod",93:"Mod",106:"*",107:"=",109:"-",110:".",111:"/",145:"ScrollLock",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'",224:"Mod",63232:"Up",63233:"Down",63234:"Left",63235:"Right",63272:"Delete",63273:"Home",63275:"End",63276:"PageUp",63277:"PageDown",63302:"Insert"},Bo=0;Bo<10;Bo++)Vo[Bo+48]=Vo[Bo+96]=String(Bo);for(var Uo=65;Uo<=90;Uo++)Vo[Uo]=String.fromCharCode(Uo);for(var Ho=1;Ho<=12;Ho++)Vo[Ho+111]=Vo[Ho+63235]="F"+Ho;var Wo={};function $o(e){var t,n,r,i,o=e.split(/-(?!$)/);e=o[o.length-1];for(var a=0;a<o.length-1;a++){var s=o[a];if(/^(cmd|meta|m)$/i.test(s))i=!0;else if(/^a(lt)?$/i.test(s))t=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else{if(!/^s(hift)?$/i.test(s))throw new Error("Unrecognized modifier name: "+s);r=!0}}return t&&(e="Alt-"+e),n&&(e="Ctrl-"+e),i&&(e="Cmd-"+e),r&&(e="Shift-"+e),e}function qo(e){var t={};for(var n in e)if(e.hasOwnProperty(n)){var r=e[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==r){delete e[n];continue}for(var i=J(n.split(" "),$o),o=0;o<i.length;o++){var a=void 0,s=void 0;o==i.length-1?(s=i.join(" "),a=r):(s=i.slice(0,o+1).join(" "),a="...");var l=t[s];if(l){if(l!=a)throw new Error("Inconsistent bindings for "+s)}else t[s]=a}delete e[n]}for(var c in t)e[c]=t[c];return e}function Ko(e,t,n,r){var i=(t=Xo(t)).call?t.call(e,r):t[e];if(!1===i)return"nothing";if("..."===i)return"multi";if(null!=i&&n(i))return"handled";if(t.fallthrough){if("[object Array]"!=Object.prototype.toString.call(t.fallthrough))return Ko(e,t.fallthrough,n,r);for(var o=0;o<t.fallthrough.length;o++){var a=Ko(e,t.fallthrough[o],n,r);if(a)return a}}}function Go(e){var t="string"==typeof e?e:Vo[e.keyCode];return"Ctrl"==t||"Alt"==t||"Shift"==t||"Mod"==t}function Yo(e,t,n){var r=e;return t.altKey&&"Alt"!=r&&(e="Alt-"+e),(x?t.metaKey:t.ctrlKey)&&"Ctrl"!=r&&(e="Ctrl-"+e),(x?t.ctrlKey:t.metaKey)&&"Mod"!=r&&(e="Cmd-"+e),!n&&t.shiftKey&&"Shift"!=r&&(e="Shift-"+e),e}function Jo(e,t){if(f&&34==e.keyCode&&e["char"])return!1;var n=Vo[e.keyCode];return null!=n&&!e.altGraphKey&&(3==e.keyCode&&e.code&&(n=e.code),Yo(n,e,t))}function Xo(e){return"string"==typeof e?Wo[e]:e}function Qo(e,t){for(var n=e.doc.sel.ranges,r=[],i=0;i<n.length;i++){for(var o=t(n[i]);r.length&&nt(o.from,Y(r).to)<=0;){var a=r.pop();if(nt(a.from,o.from)<0){o.from=a.from;break}}r.push(o)}ei(e,(function(){for(var t=r.length-1;t>=0;t--)vo(e.doc,"",r[t].from,r[t].to,"+delete");Mr(e)}))}function Zo(e,t,n){var r=oe(e.text,t+n,n);return r<0||r>e.text.length?null:r}function ea(e,t,n){var r=Zo(e,t.ch,n);return null==r?null:new tt(t.line,r,n<0?"after":"before")}function ta(e,t,n,r,i){if(e){"rtl"==t.doc.direction&&(i=-i);var o=ue(n,t.doc.direction);if(o){var a,s=i<0?Y(o):o[0],l=i<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==t.doc.direction){var c=Dn(t,n);a=i<0?n.text.length-1:0;var u=Ln(t,c,a).top;a=ae((function(e){return Ln(t,c,e).top==u}),i<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=Zo(n,a,1))}else a=i<0?s.to:s.from;return new tt(r,a,l)}}return new tt(r,i<0?n.text.length:0,i<0?"before":"after")}Wo.basic={Left:"goCharLeft",Right:"goCharRight",Up:"goLineUp",Down:"goLineDown",End:"goLineEnd",Home:"goLineStartSmart",PageUp:"goPageUp",PageDown:"goPageDown",Delete:"delCharAfter",Backspace:"delCharBefore","Shift-Backspace":"delCharBefore",Tab:"defaultTab","Shift-Tab":"indentAuto",Enter:"newlineAndIndent",Insert:"toggleOverwrite",Esc:"singleSelection"},Wo.pcDefault={"Ctrl-A":"selectAll","Ctrl-D":"deleteLine","Ctrl-Z":"undo","Shift-Ctrl-Z":"redo","Ctrl-Y":"redo","Ctrl-Home":"goDocStart","Ctrl-End":"goDocEnd","Ctrl-Up":"goLineUp","Ctrl-Down":"goLineDown","Ctrl-Left":"goGroupLeft","Ctrl-Right":"goGroupRight","Alt-Left":"goLineStart","Alt-Right":"goLineEnd","Ctrl-Backspace":"delGroupBefore","Ctrl-Delete":"delGroupAfter","Ctrl-S":"save","Ctrl-F":"find","Ctrl-G":"findNext","Shift-Ctrl-G":"findPrev","Shift-Ctrl-F":"replace","Shift-Ctrl-R":"replaceAll","Ctrl-[":"indentLess","Ctrl-]":"indentMore","Ctrl-U":"undoSelection","Shift-Ctrl-U":"redoSelection","Alt-U":"redoSelection",fallthrough:"basic"},Wo.emacsy={"Ctrl-F":"goCharRight","Ctrl-B":"goCharLeft","Ctrl-P":"goLineUp","Ctrl-N":"goLineDown","Ctrl-A":"goLineStart","Ctrl-E":"goLineEnd","Ctrl-V":"goPageDown","Shift-Ctrl-V":"goPageUp","Ctrl-D":"delCharAfter","Ctrl-H":"delCharBefore","Alt-Backspace":"delWordBefore","Ctrl-K":"killLine","Ctrl-T":"transposeChars","Ctrl-O":"openLine"},Wo.macDefault={"Cmd-A":"selectAll","Cmd-D":"deleteLine","Cmd-Z":"undo","Shift-Cmd-Z":"redo","Cmd-Y":"redo","Cmd-Home":"goDocStart","Cmd-Up":"goDocStart","Cmd-End":"goDocEnd","Cmd-Down":"goDocEnd","Alt-Left":"goGroupLeft","Alt-Right":"goGroupRight","Cmd-Left":"goLineLeft","Cmd-Right":"goLineRight","Alt-Backspace":"delGroupBefore","Ctrl-Alt-Backspace":"delGroupAfter","Alt-Delete":"delGroupAfter","Cmd-S":"save","Cmd-F":"find","Cmd-G":"findNext","Shift-Cmd-G":"findPrev","Cmd-Alt-F":"replace","Shift-Cmd-Alt-F":"replaceAll","Cmd-[":"indentLess","Cmd-]":"indentMore","Cmd-Backspace":"delWrappedLineLeft","Cmd-Delete":"delWrappedLineRight","Cmd-U":"undoSelection","Shift-Cmd-U":"redoSelection","Ctrl-Up":"goDocStart","Ctrl-Down":"goDocEnd",fallthrough:["basic","emacsy"]},Wo["default"]=y?Wo.macDefault:Wo.pcDefault;var na={selectAll:lo,singleSelection:function(e){return e.setSelection(e.getCursor("anchor"),e.getCursor("head"),H)},killLine:function(e){return Qo(e,(function(t){if(t.empty()){var n=Ke(e.doc,t.head.line).text.length;return t.head.ch==n&&t.head.line<e.lastLine()?{from:t.head,to:tt(t.head.line+1,0)}:{from:t.head,to:tt(t.head.line,n)}}return{from:t.from(),to:t.to()}}))},deleteLine:function(e){return Qo(e,(function(t){return{from:tt(t.from().line,0),to:lt(e.doc,tt(t.to().line+1,0))}}))},delLineLeft:function(e){return Qo(e,(function(e){return{from:tt(e.from().line,0),to:e.from()}}))},delWrappedLineLeft:function(e){return Qo(e,(function(t){var n=e.charCoords(t.head,"div").top+5;return{from:e.coordsChar({left:0,top:n},"div"),to:t.from()}}))},delWrappedLineRight:function(e){return Qo(e,(function(t){var n=e.charCoords(t.head,"div").top+5,r=e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div");return{from:t.from(),to:r}}))},undo:function(e){return e.undo()},redo:function(e){return e.redo()},undoSelection:function(e){return e.undoSelection()},redoSelection:function(e){return e.redoSelection()},goDocStart:function(e){return e.extendSelection(tt(e.firstLine(),0))},goDocEnd:function(e){return e.extendSelection(tt(e.lastLine()))},goLineStart:function(e){return e.extendSelectionsBy((function(t){return ra(e,t.head.line)}),{origin:"+move",bias:1})},goLineStartSmart:function(e){return e.extendSelectionsBy((function(t){return ia(e,t.head)}),{origin:"+move",bias:1})},goLineEnd:function(e){return e.extendSelectionsBy((function(t){return function(e,t){var n=Ke(e.doc,t),r=function(e){for(var t;t=Rt(e);)e=t.find(1,!0).line;return e}(n);return r!=n&&(t=Xe(r)),ta(!0,e,n,t,-1)}(e,t.head.line)}),{origin:"+move",bias:-1})},goLineRight:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:e.display.lineDiv.offsetWidth+100,top:n},"div")}),$)},goLineLeft:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5;return e.coordsChar({left:0,top:n},"div")}),$)},goLineLeftSmart:function(e){return e.extendSelectionsBy((function(t){var n=e.cursorCoords(t.head,"div").top+5,r=e.coordsChar({left:0,top:n},"div");return r.ch<e.getLine(r.line).search(/\S/)?ia(e,t.head):r}),$)},goLineUp:function(e){return e.moveV(-1,"line")},goLineDown:function(e){return e.moveV(1,"line")},goPageUp:function(e){return e.moveV(-1,"page")},goPageDown:function(e){return e.moveV(1,"page")},goCharLeft:function(e){return e.moveH(-1,"char")},goCharRight:function(e){return e.moveH(1,"char")},goColumnLeft:function(e){return e.moveH(-1,"column")},goColumnRight:function(e){return e.moveH(1,"column")},goWordLeft:function(e){return e.moveH(-1,"word")},goGroupRight:function(e){return e.moveH(1,"group")},goGroupLeft:function(e){return e.moveH(-1,"group")},goWordRight:function(e){return e.moveH(1,"word")},delCharBefore:function(e){return e.deleteH(-1,"codepoint")},delCharAfter:function(e){return e.deleteH(1,"char")},delWordBefore:function(e){return e.deleteH(-1,"word")},delWordAfter:function(e){return e.deleteH(1,"word")},delGroupBefore:function(e){return e.deleteH(-1,"group")},delGroupAfter:function(e){return e.deleteH(1,"group")},indentAuto:function(e){return e.indentSelection("smart")},indentMore:function(e){return e.indentSelection("add")},indentLess:function(e){return e.indentSelection("subtract")},insertTab:function(e){return e.replaceSelection("\t")},insertSoftTab:function(e){for(var t=[],n=e.listSelections(),r=e.options.tabSize,i=0;i<n.length;i++){var o=n[i].from(),a=I(e.getLine(o.line),o.ch,r);t.push(G(r-a%r))}e.replaceSelections(t)},defaultTab:function(e){e.somethingSelected()?e.indentSelection("add"):e.execCommand("insertTab")},transposeChars:function(e){return ei(e,(function(){for(var t=e.listSelections(),n=[],r=0;r<t.length;r++)if(t[r].empty()){var i=t[r].head,o=Ke(e.doc,i.line).text;if(o)if(i.ch==o.length&&(i=new tt(i.line,i.ch-1)),i.ch>0)i=new tt(i.line,i.ch+1),e.replaceRange(o.charAt(i.ch-1)+o.charAt(i.ch-2),tt(i.line,i.ch-2),i,"+transpose");else if(i.line>e.doc.first){var a=Ke(e.doc,i.line-1).text;a&&(i=new tt(i.line,1),e.replaceRange(o.charAt(0)+e.doc.lineSeparator()+a.charAt(a.length-1),tt(i.line-1,a.length-1),i,"+transpose"))}n.push(new Ci(i,i))}e.setSelections(n)}))},newlineAndIndent:function(e){return ei(e,(function(){for(var t=e.listSelections(),n=t.length-1;n>=0;n--)e.replaceRange(e.doc.lineSeparator(),t[n].anchor,t[n].head,"+input");t=e.listSelections();for(var r=0;r<t.length;r++)e.indentLine(t[r].from().line,null,!0);Mr(e)}))},openLine:function(e){return e.replaceSelection("\n","start")},toggleOverwrite:function(e){return e.toggleOverwrite()}};function ra(e,t){var n=Ke(e.doc,t),r=zt(n);return r!=n&&(t=Xe(r)),ta(!0,e,r,t,1)}function ia(e,t){var n=ra(e,t.line),r=Ke(e.doc,n.line),i=ue(r,e.doc.direction);if(!i||0==i[0].level){var o=Math.max(n.ch,r.text.search(/\S/)),a=t.line==n.line&&t.ch<=o&&t.ch;return tt(n.line,a?0:o,n.sticky)}return n}function oa(e,t,n){if("string"==typeof t&&!(t=na[t]))return!1;e.display.input.ensurePolled();var r=e.display.shift,i=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),n&&(e.display.shift=!1),i=t(e)!=U}finally{e.display.shift=r,e.state.suppressEdits=!1}return i}var aa=new z;function sa(e,t,n,r){var i=e.state.keySeq;if(i){if(Go(t))return"handled";if(/\'$/.test(t)?e.state.keySeq=null:aa.set(50,(function(){e.state.keySeq==i&&(e.state.keySeq=null,e.display.input.reset())})),la(e,i+" "+t,n,r))return!0}return la(e,t,n,r)}function la(e,t,n,r){var i=function(e,t,n){for(var r=0;r<e.state.keyMaps.length;r++){var i=Ko(t,e.state.keyMaps[r],n,e);if(i)return i}return e.options.extraKeys&&Ko(t,e.options.extraKeys,n,e)||Ko(t,e.options.keyMap,n,e)}(e,t,r);return"multi"==i&&(e.state.keySeq=t),"handled"==i&&cn(e,"keyHandled",e,t,n),"handled"!=i&&"multi"!=i||(we(n),xr(e)),!!i}function ca(e,t){var n=Jo(t,!0);return!!n&&(t.shiftKey&&!e.state.keySeq?sa(e,"Shift-"+n,t,(function(t){return oa(e,t,!0)}))||sa(e,n,t,(function(t){if("string"==typeof t?/^go[A-Z]/.test(t):t.motion)return oa(e,t)})):sa(e,n,t,(function(t){return oa(e,t)})))}var ua=null;function fa(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||(t.curOp.focus=M(),ve(t,e)))){a&&s<11&&27==e.keyCode&&(e.returnValue=!1);var r=e.keyCode;t.display.shift=16==r||e.shiftKey;var i=ca(t,e);f&&(ua=i?r:null,i||88!=r||Le||!(y?e.metaKey:e.ctrlKey)||t.replaceSelection("",null,"cut")),n&&!y&&!i&&46==r&&e.shiftKey&&!e.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=r||/\bCodeMirror-crosshair\b/.test(t.display.lineDiv.className)||function(e){var t=e.display.lineDiv;function n(e){18!=e.keyCode&&e.altKey||(j(t,"CodeMirror-crosshair"),pe(document,"keyup",n),pe(document,"mouseover",n))}D(t,"CodeMirror-crosshair"),de(document,"keyup",n),de(document,"mouseover",n)}(t)}}function da(e){16==e.keyCode&&(this.doc.sel.shift=!1),ve(this,e)}function ha(e){var t=this;if(!(e.target&&e.target!=t.display.input.getField()||kn(t.display,e)||ve(t,e)||e.ctrlKey&&!e.altKey||y&&e.metaKey)){var n=e.keyCode,r=e.charCode;if(f&&n==ua)return ua=null,void we(e);if(!f||e.which&&!(e.which<10)||!ca(t,e)){var i=String.fromCharCode(null==r?n:r);"\b"!=i&&(function(e,t,n){return sa(e,"'"+n+"'",t,(function(t){return oa(e,t,!0)}))}(t,e,i)||t.display.input.onKeyPress(e))}}}var pa,ga,va=400,ma=function(e,t,n){this.time=e,this.pos=t,this.button=n};function ya(e){var t=this,n=t.display;if(!(ve(t,e)||n.activeTouch&&n.input.supportsTouch()))if(n.input.ensurePolled(),n.shift=e.shiftKey,kn(n,e))l||(n.scroller.draggable=!1,setTimeout((function(){return n.scroller.draggable=!0}),100));else if(!Oa(t,e)){var r=ur(t,e),i=Se(e),o=r?function(e,t){var n=+new Date;return ga&&ga.compare(n,e,t)?(pa=ga=null,"triple"):pa&&pa.compare(n,e,t)?(ga=new ma(n,e,t),pa=null,"double"):(pa=new ma(n,e,t),ga=null,"single")}(r,i):"single";window.focus(),1==i&&t.state.selectingText&&t.state.selectingText(e),r&&function(e,t,n,r,i){var o="Click";return"double"==r?o="Double"+o:"triple"==r&&(o="Triple"+o),sa(e,Yo(o=(1==t?"Left":2==t?"Middle":"Right")+o,i),i,(function(t){if("string"==typeof t&&(t=na[t]),!t)return!1;var r=!1;try{e.isReadOnly()&&(e.state.suppressEdits=!0),r=t(e,n)!=U}finally{e.state.suppressEdits=!1}return r}))}(t,i,r,o,e)||(1==i?r?function(e,t,n,r){a?setTimeout(R(kr,e),0):e.curOp.focus=M();var i,o=function(e,t,n){var r=e.getOption("configureMouse"),i=r?r(e,t,n):{};if(null==i.unit){var o=b?n.shiftKey&&n.metaKey:n.altKey;i.unit=o?"rectangle":"single"==t?"char":"double"==t?"word":"line"}return(null==i.extend||e.doc.extend)&&(i.extend=e.doc.extend||n.shiftKey),null==i.addNew&&(i.addNew=y?n.metaKey:n.ctrlKey),null==i.moveOnDrag&&(i.moveOnDrag=!(y?n.altKey:n.ctrlKey)),i}(e,n,r),c=e.doc.sel;e.options.dragDrop&&Pe&&!e.isReadOnly()&&"single"==n&&(i=c.contains(t))>-1&&(nt((i=c.ranges[i]).from(),t)<0||t.xRel>0)&&(nt(i.to(),t)>0||t.xRel<0)?function(e,t,n,r){var i=e.display,o=!1,c=ti(e,(function(t){l&&(i.scroller.draggable=!1),e.state.draggingText=!1,e.state.delayingBlurEvent&&(e.hasFocus()?e.state.delayingBlurEvent=!1:Cr(e)),pe(i.wrapper.ownerDocument,"mouseup",c),pe(i.wrapper.ownerDocument,"mousemove",u),pe(i.scroller,"dragstart",f),pe(i.scroller,"drop",c),o||(we(t),r.addNew||Yi(e.doc,n,null,null,r.extend),l&&!d||a&&9==s?setTimeout((function(){i.wrapper.ownerDocument.body.focus({preventScroll:!0}),i.input.focus()}),20):i.input.focus())})),u=function(e){o=o||Math.abs(t.clientX-e.clientX)+Math.abs(t.clientY-e.clientY)>=10},f=function(){return o=!0};l&&(i.scroller.draggable=!0),e.state.draggingText=c,c.copy=!r.moveOnDrag,de(i.wrapper.ownerDocument,"mouseup",c),de(i.wrapper.ownerDocument,"mousemove",u),de(i.scroller,"dragstart",f),de(i.scroller,"drop",c),e.state.delayingBlurEvent=!0,setTimeout((function(){return i.input.focus()}),20),i.scroller.dragDrop&&i.scroller.dragDrop()}(e,r,t,o):function(e,t,n,r){a&&Cr(e);var i=e.display,o=e.doc;we(t);var s,l,c=o.sel,u=c.ranges;if(r.addNew&&!r.extend?(l=o.sel.contains(n),s=l>-1?u[l]:new Ci(n,n)):(s=o.sel.primary(),l=o.sel.primIndex),"rectangle"==r.unit)r.addNew||(s=new Ci(n,n)),n=ur(e,t,!0,!0),l=-1;else{var f=ba(e,n,r.unit);s=r.extend?Gi(s,f.anchor,f.head,r.extend):f}r.addNew?-1==l?(l=u.length,eo(o,Si(e,u.concat([s]),l),{scroll:!1,origin:"*mouse"})):u.length>1&&u[l].empty()&&"char"==r.unit&&!r.extend?(eo(o,Si(e,u.slice(0,l).concat(u.slice(l+1)),0),{scroll:!1,origin:"*mouse"}),c=o.sel):Xi(o,l,s,W):(l=0,eo(o,new ki([s],0),W),c=o.sel);var d=n;function h(t){if(0!=nt(d,t))if(d=t,"rectangle"==r.unit){for(var i=[],a=e.options.tabSize,u=I(Ke(o,n.line).text,n.ch,a),f=I(Ke(o,t.line).text,t.ch,a),h=Math.min(u,f),p=Math.max(u,f),g=Math.min(n.line,t.line),v=Math.min(e.lastLine(),Math.max(n.line,t.line));g<=v;g++){var m=Ke(o,g).text,y=q(m,h,a);h==p?i.push(new Ci(tt(g,y),tt(g,y))):m.length>y&&i.push(new Ci(tt(g,y),tt(g,q(m,p,a))))}i.length||i.push(new Ci(n,n)),eo(o,Si(e,c.ranges.slice(0,l).concat(i),l),{origin:"*mouse",scroll:!1}),e.scrollIntoView(t)}else{var b,w=s,O=ba(e,t,r.unit),x=w.anchor;nt(O.anchor,x)>0?(b=O.head,x=at(w.from(),O.anchor)):(b=O.anchor,x=ot(w.to(),O.head));var k=c.ranges.slice(0);k[l]=function(e,t){var n=t.anchor,r=t.head,i=Ke(e.doc,n.line);if(0==nt(n,r)&&n.sticky==r.sticky)return t;var o=ue(i);if(!o)return t;var a=le(o,n.ch,n.sticky),s=o[a];if(s.from!=n.ch&&s.to!=n.ch)return t;var l,c=a+(s.from==n.ch==(1!=s.level)?0:1);if(0==c||c==o.length)return t;if(r.line!=n.line)l=(r.line-n.line)*("ltr"==e.doc.direction?1:-1)>0;else{var u=le(o,r.ch,r.sticky),f=u-a||(r.ch-n.ch)*(1==s.level?-1:1);l=u==c-1||u==c?f<0:f>0}var d=o[c+(l?-1:0)],h=l==(1==d.level),p=h?d.from:d.to,g=h?"after":"before";return n.ch==p&&n.sticky==g?t:new Ci(new tt(n.line,p,g),r)}(e,new Ci(lt(o,x),b)),eo(o,Si(e,k,l),W)}}var p=i.wrapper.getBoundingClientRect(),g=0;function v(t){e.state.selectingText=!1,g=1/0,t&&(we(t),i.input.focus()),pe(i.wrapper.ownerDocument,"mousemove",m),pe(i.wrapper.ownerDocument,"mouseup",y),o.history.lastSelOrigin=null}var m=ti(e,(function(t){0!==t.buttons&&Se(t)?function t(n){var a=++g,s=ur(e,n,!0,"rectangle"==r.unit);if(s)if(0!=nt(s,d)){e.curOp.focus=M(),h(s);var l=_r(i,o);(s.line>=l.to||s.line<l.from)&&setTimeout(ti(e,(function(){g==a&&t(n)})),150)}else{var c=n.clientY<p.top?-20:n.clientY>p.bottom?20:0;c&&setTimeout(ti(e,(function(){g==a&&(i.scroller.scrollTop+=c,t(n))})),50)}}(t):v(t)})),y=ti(e,v);e.state.selectingText=y,de(i.wrapper.ownerDocument,"mousemove",m),de(i.wrapper.ownerDocument,"mouseup",y)}(e,r,t,o)}(t,r,o,e):Ce(e)==n.scroller&&we(e):2==i?(r&&Yi(t.doc,r),setTimeout((function(){return n.input.focus()}),20)):3==i&&(k?t.display.input.onContextMenu(e):Cr(t)))}}function ba(e,t,n){if("char"==n)return new Ci(t,t);if("word"==n)return e.findWordAt(t);if("line"==n)return new Ci(tt(t.line,0),lt(e.doc,tt(t.line+1,0)));var r=n(e,t);return new Ci(r.from,r.to)}function wa(e,t,n,r){var i,o;if(t.touches)i=t.touches[0].clientX,o=t.touches[0].clientY;else try{i=t.clientX,o=t.clientY}catch(e){return!1}if(i>=Math.floor(e.display.gutters.getBoundingClientRect().right))return!1;r&&we(t);var a=e.display,s=a.lineDiv.getBoundingClientRect();if(o>s.bottom||!ye(e,n))return xe(t);o-=s.top-a.viewOffset;for(var l=0;l<e.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=i)return ge(e,n,e,Qe(e.doc,o),e.display.gutterSpecs[l].className,t),xe(t)}}function Oa(e,t){return wa(e,t,"gutterClick",!0)}function xa(e,t){kn(e.display,t)||function(e,t){return!!ye(e,"gutterContextMenu")&&wa(e,t,"gutterContextMenu",!1)}(e,t)||ve(e,t,"contextmenu")||k||e.display.input.onContextMenu(t)}function ka(e){e.display.wrapper.className=e.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+e.options.theme.replace(/(^|\s)\s*/g," cm-s-"),Bn(e)}ma.prototype.compare=function(e,t,n){return this.time+va>e&&0==nt(t,this.pos)&&n==this.button};var Ca={toString:function(){return"CodeMirror.Init"}},Sa={},ja={};function Ea(e,t,n){if(!t!=!(n&&n!=Ca)){var r=e.display.dragFunctions,i=t?de:pe;i(e.display.scroller,"dragstart",r.start),i(e.display.scroller,"dragenter",r.enter),i(e.display.scroller,"dragover",r.over),i(e.display.scroller,"dragleave",r.leave),i(e.display.scroller,"drop",r.drop)}}function Pa(e){e.options.lineWrapping?(D(e.display.wrapper,"CodeMirror-wrap"),e.display.sizer.style.minWidth="",e.display.sizerWidth=null):(j(e.display.wrapper,"CodeMirror-wrap"),qt(e)),cr(e),dr(e),Bn(e),setTimeout((function(){return Ur(e)}),100)}function _a(e,t){var n=this;if(!(this instanceof _a))return new _a(e,t);this.options=t=t?F(t):{},F(Sa,t,!1);var r=t.value;"string"==typeof r?r=new Mo(r,t.mode,null,t.lineSeparator,t.direction):t.mode&&(r.modeOption=t.mode),this.doc=r;var i=new _a.inputStyles[t.inputStyle](this),o=this.display=new mi(e,r,i,t);for(var c in o.wrapper.CodeMirror=this,ka(this),t.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),$r(this),this.state={keyMaps:[],overlays:[],modeGen:0,overwrite:!1,delayingBlurEvent:!1,focused:!1,suppressEdits:!1,pasteIncoming:-1,cutIncoming:-1,selectingText:!1,draggingText:!1,highlight:new z,keySeq:null,specialChars:null},t.autofocus&&!m&&o.input.focus(),a&&s<11&&setTimeout((function(){return n.display.input.reset(!0)}),20),function(e){var t=e.display;de(t.scroller,"mousedown",ti(e,ya)),de(t.scroller,"dblclick",a&&s<11?ti(e,(function(t){if(!ve(e,t)){var n=ur(e,t);if(n&&!Oa(e,t)&&!kn(e.display,t)){we(t);var r=e.findWordAt(n);Yi(e.doc,r.anchor,r.head)}}})):function(t){return ve(e,t)||we(t)}),de(t.scroller,"contextmenu",(function(t){return xa(e,t)})),de(t.input.getField(),"contextmenu",(function(n){t.scroller.contains(n.target)||xa(e,n)}));var n,r={end:0};function i(){t.activeTouch&&(n=setTimeout((function(){return t.activeTouch=null}),1e3),(r=t.activeTouch).end=+new Date)}function o(e,t){if(null==t.left)return!0;var n=t.left-e.left,r=t.top-e.top;return n*n+r*r>20*20}de(t.scroller,"touchstart",(function(i){if(!ve(e,i)&&!function(e){if(1!=e.touches.length)return!1;var t=e.touches[0];return t.radiusX<=1&&t.radiusY<=1}(i)&&!Oa(e,i)){t.input.ensurePolled(),clearTimeout(n);var o=+new Date;t.activeTouch={start:o,moved:!1,prev:o-r.end<=300?r:null},1==i.touches.length&&(t.activeTouch.left=i.touches[0].pageX,t.activeTouch.top=i.touches[0].pageY)}})),de(t.scroller,"touchmove",(function(){t.activeTouch&&(t.activeTouch.moved=!0)})),de(t.scroller,"touchend",(function(n){var r=t.activeTouch;if(r&&!kn(t,n)&&null!=r.left&&!r.moved&&new Date-r.start<300){var a,s=e.coordsChar(t.activeTouch,"page");a=!r.prev||o(r,r.prev)?new Ci(s,s):!r.prev.prev||o(r,r.prev.prev)?e.findWordAt(s):new Ci(tt(s.line,0),lt(e.doc,tt(s.line+1,0))),e.setSelection(a.anchor,a.head),e.focus(),we(n)}i()})),de(t.scroller,"touchcancel",i),de(t.scroller,"scroll",(function(){t.scroller.clientHeight&&(Rr(e,t.scroller.scrollTop),Ir(e,t.scroller.scrollLeft,!0),ge(e,"scroll",e))})),de(t.scroller,"mousewheel",(function(t){return xi(e,t)})),de(t.scroller,"DOMMouseScroll",(function(t){return xi(e,t)})),de(t.wrapper,"scroll",(function(){return t.wrapper.scrollTop=t.wrapper.scrollLeft=0})),t.dragFunctions={enter:function(t){ve(e,t)||ke(t)},over:function(t){ve(e,t)||(function(e,t){var n=ur(e,t);if(n){var r=document.createDocumentFragment();br(e,n,r),e.display.dragCursor||(e.display.dragCursor=_("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),e.display.lineSpace.insertBefore(e.display.dragCursor,e.display.cursorDiv)),P(e.display.dragCursor,r)}}(e,t),ke(t))},start:function(t){return function(e,t){if(a&&(!e.state.draggingText||+new Date-Do<100))ke(t);else if(!ve(e,t)&&!kn(e.display,t)&&(t.dataTransfer.setData("Text",e.getSelection()),t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setDragImage&&!d)){var n=_("img",null,null,"position: fixed; left: 0; top: 0;");n.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",f&&(n.width=n.height=1,e.display.wrapper.appendChild(n),n._top=n.offsetTop),t.dataTransfer.setDragImage(n,0,0),f&&n.parentNode.removeChild(n)}}(e,t)},drop:ti(e,Lo),leave:function(t){ve(e,t)||No(e)}};var l=t.input.getField();de(l,"keyup",(function(t){return da.call(e,t)})),de(l,"keydown",ti(e,fa)),de(l,"keypress",ti(e,ha)),de(l,"focus",(function(t){return Sr(e,t)})),de(l,"blur",(function(t){return jr(e,t)}))}(this),Io(),Kr(this),this.curOp.forceUpdate=!0,Ri(this,r),t.autofocus&&!m||this.hasFocus()?setTimeout((function(){n.hasFocus()&&!n.state.focused&&Sr(n)}),20):jr(this),ja)ja.hasOwnProperty(c)&&ja[c](this,t[c],Ca);hi(this),t.finishInit&&t.finishInit(this);for(var u=0;u<Ta.length;++u)Ta[u](this);Gr(this),l&&t.lineWrapping&&"optimizelegibility"==getComputedStyle(o.lineDiv).textRendering&&(o.lineDiv.style.textRendering="auto")}_a.defaults=Sa,_a.optionHandlers=ja;var Ta=[];function Aa(e,t,n,r){var i,o=e.doc;null==n&&(n="add"),"smart"==n&&(o.mode.indent?i=pt(e,t).state:n="prev");var a=e.options.tabSize,s=Ke(o,t),l=I(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(r||/\S/.test(s.text)){if("smart"==n&&((c=o.mode.indent(i,s.text.slice(u.length),s.text))==U||c>150)){if(!r)return;n="prev"}}else c=0,n="not";"prev"==n?c=t>o.first?I(Ke(o,t-1).text,null,a):0:"add"==n?c=l+e.options.indentUnit:"subtract"==n?c=l-e.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var f="",d=0;if(e.options.indentWithTabs)for(var h=Math.floor(c/a);h;--h)d+=a,f+="\t";if(d<c&&(f+=G(c-d)),f!=u)return vo(o,f,tt(t,0),tt(t,u.length),"+input"),s.stateAfter=null,!0;for(var p=0;p<o.sel.ranges.length;p++){var g=o.sel.ranges[p];if(g.head.line==t&&g.head.ch<u.length){var v=tt(t,u.length);Xi(o,p,new Ci(v,v));break}}}_a.defineInitHook=function(e){return Ta.push(e)};var Ma=null;function Da(e){Ma=e}function La(e,t,n,r,i){var o=e.doc;e.display.shift=!1,r||(r=o.sel);var a=+new Date-200,s="paste"==i||e.state.pasteIncoming>a,l=Me(t),c=null;if(s&&r.ranges.length>1)if(Ma&&Ma.text.join("\n")==t){if(r.ranges.length%Ma.text.length==0){c=[];for(var u=0;u<Ma.text.length;u++)c.push(o.splitLines(Ma.text[u]))}}else l.length==r.ranges.length&&e.options.pasteLinesPerSelection&&(c=J(l,(function(e){return[e]})));for(var f=e.curOp.updateInput,d=r.ranges.length-1;d>=0;d--){var h=r.ranges[d],p=h.from(),g=h.to();h.empty()&&(n&&n>0?p=tt(p.line,p.ch-n):e.state.overwrite&&!s?g=tt(g.line,Math.min(Ke(o,g.line).text.length,g.ch+Y(l).length)):s&&Ma&&Ma.lineWise&&Ma.text.join("\n")==l.join("\n")&&(p=g=tt(p.line,0)));var v={from:p,to:g,text:c?c[d%c.length]:l,origin:i||(s?"paste":e.state.cutIncoming>a?"cut":"+input")};uo(e.doc,v),cn(e,"inputRead",e,v)}t&&!s&&Ra(e,t),Mr(e),e.curOp.updateInput<2&&(e.curOp.updateInput=f),e.curOp.typing=!0,e.state.pasteIncoming=e.state.cutIncoming=-1}function Na(e,t){var n=e.clipboardData&&e.clipboardData.getData("Text");if(n)return e.preventDefault(),t.isReadOnly()||t.options.disableInput||ei(t,(function(){return La(t,n,0,null,"paste")})),!0}function Ra(e,t){if(e.options.electricChars&&e.options.smartIndent)for(var n=e.doc.sel,r=n.ranges.length-1;r>=0;r--){var i=n.ranges[r];if(!(i.head.ch>100||r&&n.ranges[r-1].head.line==i.head.line)){var o=e.getModeAt(i.head),a=!1;if(o.electricChars){for(var s=0;s<o.electricChars.length;s++)if(t.indexOf(o.electricChars.charAt(s))>-1){a=Aa(e,i.head.line,"smart");break}}else o.electricInput&&o.electricInput.test(Ke(e.doc,i.head.line).text.slice(0,i.head.ch))&&(a=Aa(e,i.head.line,"smart"));a&&cn(e,"electricInput",e,i.head.line)}}}function Fa(e){for(var t=[],n=[],r=0;r<e.doc.sel.ranges.length;r++){var i=e.doc.sel.ranges[r].head.line,o={anchor:tt(i,0),head:tt(i+1,0)};n.push(o),t.push(e.getRange(o.anchor,o.head))}return{text:t,ranges:n}}function Ia(e,t,n,r){e.setAttribute("autocorrect",n?"":"off"),e.setAttribute("autocapitalize",r?"":"off"),e.setAttribute("spellcheck",!!t)}function za(){var e=_("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),t=_("div",[e],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return l?e.style.width="1000px":e.setAttribute("wrap","off"),g&&(e.style.border="1px solid black"),Ia(e),t}function Va(e,t,n,r,i){var o=t,a=n,s=Ke(e,t.line),l=i&&"rtl"==e.direction?-n:n;function c(o){var a,c;if("codepoint"==r){var u=s.text.charCodeAt(t.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var f=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new tt(t.line,Math.max(0,Math.min(s.text.length,t.ch+n*(f?2:1))),-n)}}else a=i?function(e,t,n,r){var i=ue(t,e.doc.direction);if(!i)return ea(t,n,r);n.ch>=t.text.length?(n.ch=t.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var o=le(i,n.ch,n.sticky),a=i[o];if("ltr"==e.doc.direction&&a.level%2==0&&(r>0?a.to>n.ch:a.from<n.ch))return ea(t,n,r);var s,l=function(e,n){return Zo(t,e instanceof tt?e.ch:e,n)},c=function(n){return e.options.lineWrapping?(s=s||Dn(e,t),Zn(e,t,s,n)):{begin:0,end:t.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==e.doc.direction||1==a.level){var f=1==a.level==r<0,d=l(n,f?1:-1);if(null!=d&&(f?d<=a.to&&d<=u.end:d>=a.from&&d>=u.begin)){var h=f?"before":"after";return new tt(n.line,d,h)}}var p=function(e,t,r){for(var o=function(e,t){return t?new tt(n.line,l(e,1),"before"):new tt(n.line,e,"after")};e>=0&&e<i.length;e+=t){var a=i[e],s=t>0==(1!=a.level),c=s?r.begin:l(r.end,-1);if(a.from<=c&&c<a.to)return o(c,s);if(c=s?a.from:l(a.to,-1),r.begin<=c&&c<r.end)return o(c,s)}},g=p(o+r,r,u);if(g)return g;var v=r>0?u.end:l(u.begin,-1);return null==v||r>0&&v==t.text.length||!(g=p(r>0?0:i.length-1,r,c(v)))?null:g}(e.cm,s,t,n):ea(s,t,n);if(null==a){if(o||(c=t.line+l)<e.first||c>=e.first+e.size||(t=new tt(c,t.ch,t.sticky),!(s=Ke(e,c))))return!1;t=ta(i,e.cm,s,t.line,l)}else t=a;return!0}if("char"==r||"codepoint"==r)c();else if("column"==r)c(!0);else if("word"==r||"group"==r)for(var u=null,f="group"==r,d=e.cm&&e.cm.getHelper(t,"wordChars"),h=!0;!(n<0)||c(!h);h=!1){var p=s.text.charAt(t.ch)||"\n",g=te(p,d)?"w":f&&"\n"==p?"n":!f||/\s/.test(p)?null:"p";if(!f||h||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),t.sticky="after");break}if(g&&(u=g),n>0&&!c(!h))break}var v=ao(e,t,o,a,!0);return rt(o,v)&&(v.hitSide=!0),v}function Ba(e,t,n,r){var i,o,a=e.doc,s=t.left;if("page"==r){var l=Math.min(e.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight),c=Math.max(l-.5*ir(e.display),3);i=(n>0?t.bottom:t.top)+n*c}else"line"==r&&(i=n>0?t.bottom+3:t.top-3);for(;(o=Xn(e,s,i)).outside;){if(n<0?i<=0:i>=a.height){o.hitSide=!0;break}i+=5*n}return o}var Ua=function(e){this.cm=e,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new z,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function Ha(e,t){var n=Mn(e,t.line);if(!n||n.hidden)return null;var r=Ke(e.doc,t.line),i=Tn(n,r,t.line),o=ue(r,e.doc.direction),a="left";o&&(a=le(o,t.ch)%2?"right":"left");var s=Fn(i.map,t.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function Wa(e,t){return t&&(e.bad=!0),e}function $a(e,t,n){var r;if(t==e.display.lineDiv){if(!(r=e.display.lineDiv.childNodes[n]))return Wa(e.clipPos(tt(e.display.viewTo-1)),!0);t=null,n=0}else for(r=t;;r=r.parentNode){if(!r||r==e.display.lineDiv)return null;if(r.parentNode&&r.parentNode==e.display.lineDiv)break}for(var i=0;i<e.display.view.length;i++){var o=e.display.view[i];if(o.node==r)return qa(o,t,n)}}function qa(e,t,n){var r=e.text.firstChild,i=!1;if(!t||!A(r,t))return Wa(tt(Xe(e.line),0),!0);if(t==r&&(i=!0,t=r.childNodes[n],n=0,!t)){var o=e.rest?Y(e.rest):e.line;return Wa(tt(Xe(o),o.text.length),i)}var a=3==t.nodeType?t:null,s=t;for(a||1!=t.childNodes.length||3!=t.firstChild.nodeType||(a=t.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=r;)s=s.parentNode;var l=e.measure,c=l.maps;function u(t,n,r){for(var i=-1;i<(c?c.length:0);i++)for(var o=i<0?l.map:c[i],a=0;a<o.length;a+=3){var s=o[a+2];if(s==t||s==n){var u=Xe(i<0?e.line:e.rest[i]),f=o[a]+r;return(r<0||s!=t)&&(f=o[a+(r?1:0)]),tt(u,f)}}}var f=u(a,s,n);if(f)return Wa(f,i);for(var d=s.nextSibling,h=a?a.nodeValue.length-n:0;d;d=d.nextSibling){if(f=u(d,d.firstChild,0))return Wa(tt(f.line,f.ch-h),i);h+=d.textContent.length}for(var p=s.previousSibling,g=n;p;p=p.previousSibling){if(f=u(p,p.firstChild,-1))return Wa(tt(f.line,f.ch+g),i);g+=p.textContent.length}}Ua.prototype.init=function(e){var t=this,n=this,r=n.cm,i=n.div=e.lineDiv;function o(e){for(var t=e.target;t;t=t.parentNode){if(t==i)return!0;if(/\bCodeMirror-(?:line)?widget\b/.test(t.className))break}return!1}function a(e){if(o(e)&&!ve(r,e)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()}),"cut"==e.type&&r.replaceSelection("",null,"cut");else{if(!r.options.lineWiseCopyCut)return;var t=Fa(r);Da({lineWise:!0,text:t.text}),"cut"==e.type&&r.operation((function(){r.setSelections(t.ranges,0,H),r.replaceSelection("",null,"cut")}))}if(e.clipboardData){e.clipboardData.clearData();var a=Ma.text.join("\n");if(e.clipboardData.setData("Text",a),e.clipboardData.getData("Text")==a)return void e.preventDefault()}var s=za(),l=s.firstChild;r.display.lineSpace.insertBefore(s,r.display.lineSpace.firstChild),l.value=Ma.text.join("\n");var c=M();N(l),setTimeout((function(){r.display.lineSpace.removeChild(s),c.focus(),c==i&&n.showPrimarySelection()}),50)}}i.contentEditable=!0,Ia(i,r.options.spellcheck,r.options.autocorrect,r.options.autocapitalize),de(i,"paste",(function(e){!o(e)||ve(r,e)||Na(e,r)||s<=11&&setTimeout(ti(r,(function(){return t.updateFromDOM()})),20)})),de(i,"compositionstart",(function(e){t.composing={data:e.data,done:!1}})),de(i,"compositionupdate",(function(e){t.composing||(t.composing={data:e.data,done:!1})})),de(i,"compositionend",(function(e){t.composing&&(e.data!=t.composing.data&&t.readFromDOMSoon(),t.composing.done=!0)})),de(i,"touchstart",(function(){return n.forceCompositionEnd()})),de(i,"input",(function(){t.composing||t.readFromDOMSoon()})),de(i,"copy",a),de(i,"cut",a)},Ua.prototype.screenReaderLabelChanged=function(e){e?this.div.setAttribute('aria-label',e):this.div.removeAttribute('aria-label')},Ua.prototype.prepareSelection=function(){var e=yr(this.cm,!1);return e.focus=M()==this.div,e},Ua.prototype.showSelection=function(e,t){e&&this.cm.display.view.length&&((e.focus||t)&&this.showPrimarySelection(),this.showMultipleSelections(e))},Ua.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},Ua.prototype.showPrimarySelection=function(){var e=this.getSelection(),t=this.cm,r=t.doc.sel.primary(),i=r.from(),o=r.to();if(t.display.viewTo==t.display.viewFrom||i.line>=t.display.viewTo||o.line<t.display.viewFrom)e.removeAllRanges();else{var a=$a(t,e.anchorNode,e.anchorOffset),s=$a(t,e.focusNode,e.focusOffset);if(!a||a.bad||!s||s.bad||0!=nt(at(a,s),i)||0!=nt(ot(a,s),o)){var l=t.display.view,c=i.line>=t.display.viewFrom&&Ha(t,i)||{node:l[0].measure.map[2],offset:0},u=o.line<t.display.viewTo&&Ha(t,o);if(!u){var f=l[l.length-1].measure,d=f.maps?f.maps[f.maps.length-1]:f.map;u={node:d[d.length-1],offset:d[d.length-2]-d[d.length-3]}}if(c&&u){var h,p=e.rangeCount&&e.getRangeAt(0);try{h=S(c.node,c.offset,u.offset,u.node)}catch(e){}h&&(!n&&t.state.focused?(e.collapse(c.node,c.offset),h.collapsed||(e.removeAllRanges(),e.addRange(h))):(e.removeAllRanges(),e.addRange(h)),p&&null==e.anchorNode?e.addRange(p):n&&this.startGracePeriod()),this.rememberSelection()}else e.removeAllRanges()}}},Ua.prototype.startGracePeriod=function(){var e=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout((function(){e.gracePeriod=!1,e.selectionChanged()&&e.cm.operation((function(){return e.cm.curOp.selectionChanged=!0}))}),20)},Ua.prototype.showMultipleSelections=function(e){P(this.cm.display.cursorDiv,e.cursors),P(this.cm.display.selectionDiv,e.selection)},Ua.prototype.rememberSelection=function(){var e=this.getSelection();this.lastAnchorNode=e.anchorNode,this.lastAnchorOffset=e.anchorOffset,this.lastFocusNode=e.focusNode,this.lastFocusOffset=e.focusOffset},Ua.prototype.selectionInEditor=function(){var e=this.getSelection();if(!e.rangeCount)return!1;var t=e.getRangeAt(0).commonAncestorContainer;return A(this.div,t)},Ua.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&M()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},Ua.prototype.blur=function(){this.div.blur()},Ua.prototype.getField=function(){return this.div},Ua.prototype.supportsTouch=function(){return!0},Ua.prototype.receivedFocus=function(){var e=this,t=this;this.selectionInEditor()?setTimeout((function(){return e.pollSelection()}),20):ei(this.cm,(function(){return t.cm.curOp.selectionChanged=!0})),this.polling.set(this.cm.options.pollInterval,(function e(){t.cm.state.focused&&(t.pollSelection(),t.polling.set(t.cm.options.pollInterval,e))}))},Ua.prototype.selectionChanged=function(){var e=this.getSelection();return e.anchorNode!=this.lastAnchorNode||e.anchorOffset!=this.lastAnchorOffset||e.focusNode!=this.lastFocusNode||e.focusOffset!=this.lastFocusOffset},Ua.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var e=this.getSelection(),t=this.cm;if(v&&u&&this.cm.display.gutterSpecs.length&&function(e){for(var t=e;t;t=t.parentNode)if(/CodeMirror-gutter-wrapper/.test(t.className))return!0;return!1}(e.anchorNode))return this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),void this.focus();if(!this.composing){this.rememberSelection();var n=$a(t,e.anchorNode,e.anchorOffset),r=$a(t,e.focusNode,e.focusOffset);n&&r&&ei(t,(function(){eo(t.doc,ji(n,r),H),(n.bad||r.bad)&&(t.curOp.selectionChanged=!0)}))}}},Ua.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var e,t,n,r=this.cm,i=r.display,o=r.doc.sel.primary(),a=o.from(),s=o.to();if(0==a.ch&&a.line>r.firstLine()&&(a=tt(a.line-1,Ke(r.doc,a.line-1).length)),s.ch==Ke(r.doc,s.line).text.length&&s.line<r.lastLine()&&(s=tt(s.line+1,0)),a.line<i.viewFrom||s.line>i.viewTo-1)return!1;a.line==i.viewFrom||0==(e=fr(r,a.line))?(t=Xe(i.view[0].line),n=i.view[0].node):(t=Xe(i.view[e].line),n=i.view[e-1].node.nextSibling);var l,c,u=fr(r,s.line);if(u==i.view.length-1?(l=i.viewTo-1,c=i.lineDiv.lastChild):(l=Xe(i.view[u+1].line)-1,c=i.view[u+1].node.previousSibling),!n)return!1;for(var f=r.doc.splitLines(function(e,t,n,r,i){var o="",a=!1,s=e.doc.lineSeparator(),l=!1;function c(){a&&(o+=s,l&&(o+=s),a=l=!1)}function u(e){e&&(c(),o+=e)}function f(t){if(1==t.nodeType){var n=t.getAttribute("cm-text");if(n)return void u(n);var o,d=t.getAttribute("cm-marker");if(d){var h=e.findMarks(tt(r,0),tt(i+1,0),(v=+d,function(e){return e.id==v}));return void(h.length&&(o=h[0].find(0))&&u(Ge(e.doc,o.from,o.to).join(s)))}if("false"==t.getAttribute("contenteditable"))return;var p=/^(pre|div|p|li|table|br)$/i.test(t.nodeName);if(!/^br$/i.test(t.nodeName)&&0==t.textContent.length)return;p&&c();for(var g=0;g<t.childNodes.length;g++)f(t.childNodes[g]);/^(pre|p)$/i.test(t.nodeName)&&(l=!0),p&&(a=!0)}else 3==t.nodeType&&u(t.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "));var v}for(;f(t),t!=n;)t=t.nextSibling,l=!1;return o}(r,n,c,t,l)),d=Ge(r.doc,tt(t,0),tt(l,Ke(r.doc,l).text.length));f.length>1&&d.length>1;)if(Y(f)==Y(d))f.pop(),d.pop(),l--;else{if(f[0]!=d[0])break;f.shift(),d.shift(),t++}for(var h=0,p=0,g=f[0],v=d[0],m=Math.min(g.length,v.length);h<m&&g.charCodeAt(h)==v.charCodeAt(h);)++h;for(var y=Y(f),b=Y(d),w=Math.min(y.length-(1==f.length?h:0),b.length-(1==d.length?h:0));p<w&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)++p;if(1==f.length&&1==d.length&&t==a.line)for(;h&&h>a.ch&&y.charCodeAt(y.length-p-1)==b.charCodeAt(b.length-p-1);)h--,p++;f[f.length-1]=y.slice(0,y.length-p).replace(/^\u200b+/,""),f[0]=f[0].slice(h).replace(/\u200b+$/,"");var O=tt(t,h),x=tt(l,d.length?Y(d).length-p:0);return f.length>1||f[0]||nt(O,x)?(vo(r.doc,f,O,x,"+input"),!0):void 0},Ua.prototype.ensurePolled=function(){this.forceCompositionEnd()},Ua.prototype.reset=function(){this.forceCompositionEnd()},Ua.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},Ua.prototype.readFromDOMSoon=function(){var e=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout((function(){if(e.readDOMTimeout=null,e.composing){if(!e.composing.done)return;e.composing=null}e.updateFromDOM()}),80))},Ua.prototype.updateFromDOM=function(){var e=this;!this.cm.isReadOnly()&&this.pollContent()||ei(this.cm,(function(){return dr(e.cm)}))},Ua.prototype.setUneditable=function(e){e.contentEditable="false"},Ua.prototype.onKeyPress=function(e){0==e.charCode||this.composing||(e.preventDefault(),this.cm.isReadOnly()||ti(this.cm,La)(this.cm,String.fromCharCode(null==e.charCode?e.keyCode:e.charCode),0))},Ua.prototype.readOnlyChanged=function(e){this.div.contentEditable=String("nocursor"!=e)},Ua.prototype.onContextMenu=function(){},Ua.prototype.resetPosition=function(){},Ua.prototype.needsContentAttribute=!0;var Ka=function(e){this.cm=e,this.prevInput="",this.pollingFast=!1,this.polling=new z,this.hasSelection=!1,this.composing=null};Ka.prototype.init=function(e){var t=this,n=this,r=this.cm;this.createField(e);var i=this.textarea;function o(e){if(!ve(r,e)){if(r.somethingSelected())Da({lineWise:!1,text:r.getSelections()});else{if(!r.options.lineWiseCopyCut)return;var t=Fa(r);Da({lineWise:!0,text:t.text}),"cut"==e.type?r.setSelections(t.ranges,null,H):(n.prevInput="",i.value=t.text.join("\n"),N(i))}"cut"==e.type&&(r.state.cutIncoming=+new Date)}}e.wrapper.insertBefore(this.wrapper,e.wrapper.firstChild),g&&(i.style.width="0px"),de(i,"input",(function(){a&&s>=9&&t.hasSelection&&(t.hasSelection=null),n.poll()})),de(i,"paste",(function(e){ve(r,e)||Na(e,r)||(r.state.pasteIncoming=+new Date,n.fastPoll())})),de(i,"cut",o),de(i,"copy",o),de(e.scroller,"paste",(function(t){if(!kn(e,t)&&!ve(r,t)){if(!i.dispatchEvent)return r.state.pasteIncoming=+new Date,void n.focus();var o=new Event("paste");o.clipboardData=t.clipboardData,i.dispatchEvent(o)}})),de(e.lineSpace,"selectstart",(function(t){kn(e,t)||we(t)})),de(i,"compositionstart",(function(){var e=r.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:e,range:r.markText(e,r.getCursor("to"),{className:"CodeMirror-composing"})}})),de(i,"compositionend",(function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)}))},Ka.prototype.createField=function(e){this.wrapper=za(),this.textarea=this.wrapper.firstChild},Ka.prototype.screenReaderLabelChanged=function(e){e?this.textarea.setAttribute('aria-label',e):this.textarea.removeAttribute('aria-label')},Ka.prototype.prepareSelection=function(){var e=this.cm,t=e.display,n=e.doc,r=yr(e);if(e.options.moveInputWithCursor){var i=Gn(e,n.sel.primary().head,"div"),o=t.wrapper.getBoundingClientRect(),a=t.lineDiv.getBoundingClientRect();r.teTop=Math.max(0,Math.min(t.wrapper.clientHeight-10,i.top+a.top-o.top)),r.teLeft=Math.max(0,Math.min(t.wrapper.clientWidth-10,i.left+a.left-o.left))}return r},Ka.prototype.showSelection=function(e){var t=this.cm.display;P(t.cursorDiv,e.cursors),P(t.selectionDiv,e.selection),null!=e.teTop&&(this.wrapper.style.top=e.teTop+"px",this.wrapper.style.left=e.teLeft+"px")},Ka.prototype.reset=function(e){if(!this.contextMenuPending&&!this.composing){var t=this.cm;if(t.somethingSelected()){this.prevInput="";var n=t.getSelection();this.textarea.value=n,t.state.focused&&N(this.textarea),a&&s>=9&&(this.hasSelection=n)}else e||(this.prevInput=this.textarea.value="",a&&s>=9&&(this.hasSelection=null))}},Ka.prototype.getField=function(){return this.textarea},Ka.prototype.supportsTouch=function(){return!1},Ka.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!m||M()!=this.textarea))try{this.textarea.focus()}catch(e){}},Ka.prototype.blur=function(){this.textarea.blur()},Ka.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},Ka.prototype.receivedFocus=function(){this.slowPoll()},Ka.prototype.slowPoll=function(){var e=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,(function(){e.poll(),e.cm.state.focused&&e.slowPoll()}))},Ka.prototype.fastPoll=function(){var e=!1,t=this;t.pollingFast=!0,t.polling.set(20,(function n(){t.poll()||e?(t.pollingFast=!1,t.slowPoll()):(e=!0,t.polling.set(60,n))}))},Ka.prototype.poll=function(){var e=this,t=this.cm,n=this.textarea,r=this.prevInput;if(this.contextMenuPending||!t.state.focused||De(n)&&!r&&!this.composing||t.isReadOnly()||t.options.disableInput||t.state.keySeq)return!1;var i=n.value;if(i==r&&!t.somethingSelected())return!1;if(a&&s>=9&&this.hasSelection===i||y&&/[\uf700-\uf7ff]/.test(i))return t.display.input.reset(),!1;if(t.doc.sel==t.display.selForContextMenu){var o=i.charCodeAt(0);if(8203!=o||r||(r="​"),8666==o)return this.reset(),this.cm.execCommand("undo")}for(var l=0,c=Math.min(r.length,i.length);l<c&&r.charCodeAt(l)==i.charCodeAt(l);)++l;return ei(t,(function(){La(t,i.slice(l),r.length-l,null,e.composing?"*compose":null),i.length>1e3||i.indexOf("\n")>-1?n.value=e.prevInput="":e.prevInput=i,e.composing&&(e.composing.range.clear(),e.composing.range=t.markText(e.composing.start,t.getCursor("to"),{className:"CodeMirror-composing"}))})),!0},Ka.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},Ka.prototype.onKeyPress=function(){a&&s>=9&&(this.hasSelection=null),this.fastPoll()},Ka.prototype.onContextMenu=function(e){var t=this,n=t.cm,r=n.display,i=t.textarea;t.contextMenuPending&&t.contextMenuPending();var o=ur(n,e),c=r.scroller.scrollTop;if(o&&!f){n.options.resetSelectionOnContextMenu&&-1==n.doc.sel.contains(o)&&ti(n,eo)(n.doc,ji(o),H);var u,d=i.style.cssText,h=t.wrapper.style.cssText,p=t.wrapper.offsetParent.getBoundingClientRect();if(t.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n      top: "+(e.clientY-p.top-5)+"px; left: "+(e.clientX-p.left-5)+"px;\n      z-index: 1000; background: "+(a?"rgba(255, 255, 255, .05)":"transparent")+";\n      outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",l&&(u=window.scrollY),r.input.focus(),l&&window.scrollTo(null,u),r.input.reset(),n.somethingSelected()||(i.value=t.prevInput=" "),t.contextMenuPending=m,r.selForContextMenu=n.doc.sel,clearTimeout(r.detectingSelectAll),a&&s>=9&&v(),k){ke(e);var g=function(){pe(window,"mouseup",g),setTimeout(m,20)};de(window,"mouseup",g)}else setTimeout(m,50)}function v(){if(null!=i.selectionStart){var e=n.somethingSelected(),o="​"+(e?i.value:"");i.value="⇚",i.value=o,t.prevInput=e?"":"​",i.selectionStart=1,i.selectionEnd=o.length,r.selForContextMenu=n.doc.sel}}function m(){if(t.contextMenuPending==m&&(t.contextMenuPending=!1,t.wrapper.style.cssText=h,i.style.cssText=d,a&&s<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=c),null!=i.selectionStart)){(!a||a&&s<9)&&v();var e=0,o=function(){r.selForContextMenu==n.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"​"==t.prevInput?ti(n,lo)(n):e++<10?r.detectingSelectAll=setTimeout(o,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(o,200)}}},Ka.prototype.readOnlyChanged=function(e){e||this.reset(),this.textarea.disabled="nocursor"==e,this.textarea.readOnly=!!e},Ka.prototype.setUneditable=function(){},Ka.prototype.needsContentAttribute=!1,function(e){var t=e.optionHandlers;function n(n,r,i,o){e.defaults[n]=r,i&&(t[n]=o?function(e,t,n){n!=Ca&&i(e,t,n)}:i)}e.defineOption=n,e.Init=Ca,n("value","",(function(e,t){return e.setValue(t)}),!0),n("mode",null,(function(e,t){e.doc.modeOption=t,Ai(e)}),!0),n("indentUnit",2,Ai,!0),n("indentWithTabs",!1),n("smartIndent",!0),n("tabSize",4,(function(e){Mi(e),Bn(e),dr(e)}),!0),n("lineSeparator",null,(function(e,t){if(e.doc.lineSep=t,t){var n=[],r=e.doc.first;e.doc.iter((function(e){for(var i=0;;){var o=e.text.indexOf(t,i);if(-1==o)break;i=o+t.length,n.push(tt(r,o))}r++}));for(var i=n.length-1;i>=0;i--)vo(e.doc,t,n[i],tt(n[i].line,n[i].ch+t.length))}})),n("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,(function(e,t,n){e.state.specialChars=new RegExp(t.source+(t.test("\t")?"":"|\t"),"g"),n!=Ca&&e.refresh()})),n("specialCharPlaceholder",Zt,(function(e){return e.refresh()}),!0),n("electricChars",!0),n("inputStyle",m?"contenteditable":"textarea",(function(){throw new Error("inputStyle can not (yet) be changed in a running editor")}),!0),n("spellcheck",!1,(function(e,t){return e.getInputField().spellcheck=t}),!0),n("autocorrect",!1,(function(e,t){return e.getInputField().autocorrect=t}),!0),n("autocapitalize",!1,(function(e,t){return e.getInputField().autocapitalize=t}),!0),n("rtlMoveVisually",!w),n("wholeLineUpdateBefore",!0),n("theme","default",(function(e){ka(e),vi(e)}),!0),n("keyMap","default",(function(e,t,n){var r=Xo(t),i=n!=Ca&&Xo(n);i&&i.detach&&i.detach(e,r),r.attach&&r.attach(e,i||null)})),n("extraKeys",null),n("configureMouse",null),n("lineWrapping",!1,Pa,!0),n("gutters",[],(function(e,t){e.display.gutterSpecs=pi(t,e.options.lineNumbers),vi(e)}),!0),n("fixedGutter",!0,(function(e,t){e.display.gutters.style.left=t?sr(e.display)+"px":"0",e.refresh()}),!0),n("coverGutterNextToScrollbar",!1,(function(e){return Ur(e)}),!0),n("scrollbarStyle","native",(function(e){$r(e),Ur(e),e.display.scrollbars.setScrollTop(e.doc.scrollTop),e.display.scrollbars.setScrollLeft(e.doc.scrollLeft)}),!0),n("lineNumbers",!1,(function(e,t){e.display.gutterSpecs=pi(e.options.gutters,t),vi(e)}),!0),n("firstLineNumber",1,vi,!0),n("lineNumberFormatter",(function(e){return e}),vi,!0),n("showCursorWhenSelecting",!1,mr,!0),n("resetSelectionOnContextMenu",!0),n("lineWiseCopyCut",!0),n("pasteLinesPerSelection",!0),n("selectionsMayTouch",!1),n("readOnly",!1,(function(e,t){"nocursor"==t&&(jr(e),e.display.input.blur()),e.display.input.readOnlyChanged(t)})),n("screenReaderLabel",null,(function(e,t){t=''===t?null:t,e.display.input.screenReaderLabelChanged(t)})),n("disableInput",!1,(function(e,t){t||e.display.input.reset()}),!0),n("dragDrop",!0,Ea),n("allowDropFileTypes",null),n("cursorBlinkRate",530),n("cursorScrollMargin",0),n("cursorHeight",1,mr,!0),n("singleCursorHeightPerLine",!0,mr,!0),n("workTime",100),n("workDelay",100),n("flattenSpans",!0,Mi,!0),n("addModeClass",!1,Mi,!0),n("pollInterval",100),n("undoDepth",200,(function(e,t){return e.doc.history.undoDepth=t})),n("historyEventDelay",1250),n("viewportMargin",10,(function(e){return e.refresh()}),!0),n("maxHighlightLength",1e4,Mi,!0),n("moveInputWithCursor",!0,(function(e,t){t||e.display.input.resetPosition()})),n("tabindex",null,(function(e,t){return e.display.input.getField().tabIndex=t||""})),n("autofocus",null),n("direction","ltr",(function(e,t){return e.doc.setDirection(t)}),!0),n("phrases",null)}(_a),function(e){var t=e.optionHandlers,n=e.helpers={};e.prototype={constructor:e,focus:function(){window.focus(),this.display.input.focus()},setOption:function(e,n){var r=this.options,i=r[e];r[e]==n&&"mode"!=e||(r[e]=n,t.hasOwnProperty(e)&&ti(this,t[e])(this,n,i),ge(this,"optionChange",this,e))},getOption:function(e){return this.options[e]},getDoc:function(){return this.doc},addKeyMap:function(e,t){this.state.keyMaps[t?"push":"unshift"](Xo(e))},removeKeyMap:function(e){for(var t=this.state.keyMaps,n=0;n<t.length;++n)if(t[n]==e||t[n].name==e)return t.splice(n,1),!0},addOverlay:ni((function(t,n){var r=t.token?t:e.getMode(this.options,t);if(r.startState)throw new Error("Overlays may not be stateful.");!function(e,t,n){for(var r=0,i=n(t);r<e.length&&n(e[r])<=i;)r++;e.splice(r,0,t)}(this.state.overlays,{mode:r,modeSpec:t,opaque:n&&n.opaque,priority:n&&n.priority||0},(function(e){return e.priority})),this.state.modeGen++,dr(this)})),removeOverlay:ni((function(e){for(var t=this.state.overlays,n=0;n<t.length;++n){var r=t[n].modeSpec;if(r==e||"string"==typeof e&&r.name==e)return t.splice(n,1),this.state.modeGen++,void dr(this)}})),indentLine:ni((function(e,t,n){"string"!=typeof t&&"number"!=typeof t&&(t=null==t?this.options.smartIndent?"smart":"prev":t?"add":"subtract"),Ze(this.doc,e)&&Aa(this,e,t,n)})),indentSelection:ni((function(e){for(var t=this.doc.sel.ranges,n=-1,r=0;r<t.length;r++){var i=t[r];if(i.empty())i.head.line>n&&(Aa(this,i.head.line,e,!0),n=i.head.line,r==this.doc.sel.primIndex&&Mr(this));else{var o=i.from(),a=i.to(),s=Math.max(n,o.line);n=Math.min(this.lastLine(),a.line-(a.ch?0:1))+1;for(var l=s;l<n;++l)Aa(this,l,e);var c=this.doc.sel.ranges;0==o.ch&&t.length==c.length&&c[r].from().ch>0&&Xi(this.doc,r,new Ci(o,c[r].to()),H)}}})),getTokenAt:function(e,t){return bt(this,e,t)},getLineTokens:function(e,t){return bt(this,tt(e),t,!0)},getTokenTypeAt:function(e){e=lt(this.doc,e);var t,n=ht(this,Ke(this.doc,e.line)),r=0,i=(n.length-1)/2,o=e.ch;if(0==o)t=n[2];else for(;;){var a=r+i>>1;if((a?n[2*a-1]:0)>=o)i=a;else{if(!(n[2*a+1]<o)){t=n[2*a+2];break}r=a+1}}var s=t?t.indexOf("overlay "):-1;return s<0?t:0==s?null:t.slice(0,s-1)},getModeAt:function(t){var n=this.doc.mode;return n.innerMode?e.innerMode(n,this.getTokenAt(t).state).mode:n},getHelper:function(e,t){return this.getHelpers(e,t)[0]},getHelpers:function(e,t){var r=[];if(!n.hasOwnProperty(t))return r;var i=n[t],o=this.getModeAt(e);if("string"==typeof o[t])i[o[t]]&&r.push(i[o[t]]);else if(o[t])for(var a=0;a<o[t].length;a++){var s=i[o[t][a]];s&&r.push(s)}else o.helperType&&i[o.helperType]?r.push(i[o.helperType]):i[o.name]&&r.push(i[o.name]);for(var l=0;l<i._global.length;l++){var c=i._global[l];c.pred(o,this)&&-1==V(r,c.val)&&r.push(c.val)}return r},getStateAfter:function(e,t){var n=this.doc;return pt(this,(e=st(n,null==e?n.first+n.size-1:e))+1,t).state},cursorCoords:function(e,t){var n=this.doc.sel.primary();return Gn(this,null==e?n.head:"object"==typeof e?lt(this.doc,e):e?n.from():n.to(),t||"page")},charCoords:function(e,t){return Kn(this,lt(this.doc,e),t||"page")},coordsChar:function(e,t){return Xn(this,(e=qn(this,e,t||"page")).left,e.top)},lineAtHeight:function(e,t){return e=qn(this,{top:e,left:0},t||"page").top,Qe(this.doc,e+this.display.viewOffset)},heightAtLine:function(e,t,n){var r,i=!1;if("number"==typeof e){var o=this.doc.first+this.doc.size-1;e<this.doc.first?e=this.doc.first:e>o&&(e=o,i=!0),r=Ke(this.doc,e)}else r=e;return $n(this,r,{top:0,left:0},t||"page",n||i).top+(i?this.doc.height-Wt(r):0)},defaultTextHeight:function(){return ir(this.display)},defaultCharWidth:function(){return or(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(e,t,n,r,i){var o,a,s,l=this.display,c=(e=Gn(this,lt(this.doc,e))).bottom,u=e.left;if(t.style.position="absolute",t.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(t),l.sizer.appendChild(t),"over"==r)c=e.top;else if("above"==r||"near"==r){var f=Math.max(l.wrapper.clientHeight,this.doc.height),d=Math.max(l.sizer.clientWidth,l.lineSpace.clientWidth);('above'==r||e.bottom+t.offsetHeight>f)&&e.top>t.offsetHeight?c=e.top-t.offsetHeight:e.bottom+t.offsetHeight<=f&&(c=e.bottom),u+t.offsetWidth>d&&(u=d-t.offsetWidth)}t.style.top=c+"px",t.style.left=t.style.right="","right"==i?(u=l.sizer.clientWidth-t.offsetWidth,t.style.right="0px"):("left"==i?u=0:"middle"==i&&(u=(l.sizer.clientWidth-t.offsetWidth)/2),t.style.left=u+"px"),n&&(o=this,a={left:u,top:c,right:u+t.offsetWidth,bottom:c+t.offsetHeight},null!=(s=Tr(o,a)).scrollTop&&Rr(o,s.scrollTop),null!=s.scrollLeft&&Ir(o,s.scrollLeft))},triggerOnKeyDown:ni(fa),triggerOnKeyPress:ni(ha),triggerOnKeyUp:da,triggerOnMouseDown:ni(ya),execCommand:function(e){if(na.hasOwnProperty(e))return na[e].call(null,this)},triggerElectric:ni((function(e){Ra(this,e)})),findPosH:function(e,t,n,r){var i=1;t<0&&(i=-1,t=-t);for(var o=lt(this.doc,e),a=0;a<t&&!(o=Va(this.doc,o,i,n,r)).hitSide;++a);return o},moveH:ni((function(e,t){var n=this;this.extendSelectionsBy((function(r){return n.display.shift||n.doc.extend||r.empty()?Va(n.doc,r.head,e,t,n.options.rtlMoveVisually):e<0?r.from():r.to()}),$)})),deleteH:ni((function(e,t){var n=this.doc.sel,r=this.doc;n.somethingSelected()?r.replaceSelection("",null,"+delete"):Qo(this,(function(n){var i=Va(r,n.head,e,t,!1);return e<0?{from:i,to:n.head}:{from:n.head,to:i}}))})),findPosV:function(e,t,n,r){var i=1,o=r;t<0&&(i=-1,t=-t);for(var a=lt(this.doc,e),s=0;s<t;++s){var l=Gn(this,a,"div");if(null==o?o=l.left:l.left=o,(a=Ba(this,l,i,n)).hitSide)break}return a},moveV:ni((function(e,t){var n=this,r=this.doc,i=[],o=!this.display.shift&&!r.extend&&r.sel.somethingSelected();if(r.extendSelectionsBy((function(a){if(o)return e<0?a.from():a.to();var s=Gn(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),i.push(s.left);var l=Ba(n,s,e,t);return"page"==t&&a==r.sel.primary()&&Ar(n,Kn(n,l,"div").top-s.top),l}),$),i.length)for(var a=0;a<r.sel.ranges.length;a++)r.sel.ranges[a].goalColumn=i[a]})),findWordAt:function(e){var t=Ke(this.doc,e.line).text,n=e.ch,r=e.ch;if(t){var i=this.getHelper(e,"wordChars");"before"!=e.sticky&&r!=t.length||!n?++r:--n;for(var o=t.charAt(n),a=te(o,i)?function(e){return te(e,i)}:/\s/.test(o)?function(e){return/\s/.test(e)}:function(e){return!/\s/.test(e)&&!te(e)};n>0&&a(t.charAt(n-1));)--n;for(;r<t.length&&a(t.charAt(r));)++r}return new Ci(tt(e.line,n),tt(e.line,r))},toggleOverwrite:function(e){null!=e&&e==this.state.overwrite||((this.state.overwrite=!this.state.overwrite)?D(this.display.cursorDiv,"CodeMirror-overwrite"):j(this.display.cursorDiv,"CodeMirror-overwrite"),ge(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==M()},isReadOnly:function(){return!(!this.options.readOnly&&!this.doc.cantEdit)},scrollTo:ni((function(e,t){Dr(this,e,t)})),getScrollInfo:function(){var e=this.display.scroller;return{left:e.scrollLeft,top:e.scrollTop,height:e.scrollHeight-En(this)-this.display.barHeight,width:e.scrollWidth-En(this)-this.display.barWidth,clientHeight:_n(this),clientWidth:Pn(this)}},scrollIntoView:ni((function(e,t){null==e?(e={from:this.doc.sel.primary().head,to:null},null==t&&(t=this.options.cursorScrollMargin)):"number"==typeof e?e={from:tt(e,0),to:null}:null==e.from&&(e={from:e,to:null}),e.to||(e.to=e.from),e.margin=t||0,null!=e.from.line?function(e,t){Lr(e),e.curOp.scrollToPos=t}(this,e):Nr(this,e.from,e.to,e.margin)})),setSize:ni((function(e,t){var n=this,r=function(e){return"number"==typeof e||/^\d+$/.test(String(e))?e+"px":e};null!=e&&(this.display.wrapper.style.width=r(e)),null!=t&&(this.display.wrapper.style.height=r(t)),this.options.lineWrapping&&Vn(this);var i=this.display.viewFrom;this.doc.iter(i,this.display.viewTo,(function(e){if(e.widgets)for(var t=0;t<e.widgets.length;t++)if(e.widgets[t].noHScroll){hr(n,i,"widget");break}++i})),this.curOp.forceUpdate=!0,ge(this,"refresh",this)})),operation:function(e){return ei(this,e)},startOperation:function(){return Kr(this)},endOperation:function(){return Gr(this)},refresh:ni((function(){var e=this.display.cachedTextHeight;dr(this),this.curOp.forceUpdate=!0,Bn(this),Dr(this,this.doc.scrollLeft,this.doc.scrollTop),ui(this.display),(null==e||Math.abs(e-ir(this.display))>.5||this.options.lineWrapping)&&cr(this),ge(this,"refresh",this)})),swapDoc:ni((function(e){var t=this.doc;return t.cm=null,this.state.selectingText&&this.state.selectingText(),Ri(this,e),Bn(this),this.display.input.reset(),Dr(this,e.scrollLeft,e.scrollTop),this.curOp.forceScroll=!0,cn(this,"swapDoc",this,t),t})),phrase:function(e){var t=this.options.phrases;return t&&Object.prototype.hasOwnProperty.call(t,e)?t[e]:e},getInputField:function(){return this.display.input.getField()},getWrapperElement:function(){return this.display.wrapper},getScrollerElement:function(){return this.display.scroller},getGutterElement:function(){return this.display.gutters}},be(e),e.registerHelper=function(t,r,i){n.hasOwnProperty(t)||(n[t]=e[t]={_global:[]}),n[t][r]=i},e.registerGlobalHelper=function(t,r,i,o){e.registerHelper(t,r,o),n[t]._global.push({pred:i,val:o})}}(_a);var Ga="iter insert remove copy getEditor constructor".split(" ");for(var Ya in Mo.prototype)Mo.prototype.hasOwnProperty(Ya)&&V(Ga,Ya)<0&&(_a.prototype[Ya]=function(e){return function(){return e.apply(this.doc,arguments)}}(Mo.prototype[Ya]));return be(Mo),_a.inputStyles={textarea:Ka,contenteditable:Ua},_a.defineMode=function(e){_a.defaults.mode||"null"==e||(_a.defaults.mode=e),Ie.apply(this,arguments)},_a.defineMIME=function(e,t){Fe[e]=t},_a.defineMode("null",(function(){return{token:function(e){return e.skipToEnd()}}})),_a.defineMIME("text/plain","null"),_a.defineExtension=function(e,t){_a.prototype[e]=t},_a.defineDocExtension=function(e,t){Mo.prototype[e]=t},_a.fromTextArea=function(e,t){if((t=t?F(t):{}).value=e.value,!t.tabindex&&e.tabIndex&&(t.tabindex=e.tabIndex),!t.placeholder&&e.placeholder&&(t.placeholder=e.placeholder),null==t.autofocus){var n=M();t.autofocus=n==e||null!=e.getAttribute("autofocus")&&n==document.body}function r(){e.value=s.getValue()}var i;if(e.form&&(de(e.form,"submit",r),!t.leaveSubmitMethodAlone)){var o=e.form;i=o.submit;try{var a=o.submit=function(){r(),o.submit=i,o.submit(),o.submit=a}}catch(e){}}t.finishInit=function(n){n.save=r,n.getTextArea=function(){return e},n.toTextArea=function(){n.toTextArea=isNaN,r(),e.parentNode.removeChild(n.getWrapperElement()),e.style.display="",e.form&&(pe(e.form,"submit",r),t.leaveSubmitMethodAlone||"function"!=typeof e.form.submit||(e.form.submit=i))}},e.style.display="none";var s=_a((function(t){return e.parentNode.insertBefore(t,e.nextSibling)}),t);return s},function(e){e.off=pe,e.on=de,e.wheelEventPixels=Oi,e.Doc=Mo,e.splitLines=Me,e.countColumn=I,e.findColumn=q,e.isWordChar=ee,e.Pass=U,e.signal=ge,e.Line=Kt,e.changeEnd=Ei,e.scrollbarModel=Wr,e.Pos=tt,e.cmpPos=nt,e.modes=Re,e.mimeModes=Fe,e.resolveMode=ze,e.getMode=Ve,e.modeExtensions=Be,e.extendMode=Ue,e.copyState=He,e.startState=$e,e.innerMode=We,e.commands=na,e.keyMap=Wo,e.keyName=Jo,e.isModifierKey=Go,e.lookupKey=Ko,e.normalizeKeyMap=qo,e.StringStream=qe,e.SharedTextMarker=Po,e.TextMarker=jo,e.LineWidget=ko,e.e_preventDefault=we,e.e_stopPropagation=Oe,e.e_stop=ke,e.addClass=D,e.contains=A,e.rmClass=j,e.keyNames=Vo}(_a),_a.version="5.63.0",_a}())},function(e,t,n){var r=n(228),i=n(229),o=n(104),a=n(230);e.exports=function(e,t){return r(e)||i(e,t)||o(e,t)||a()},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";1&&(!function e(){if('undefined'!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&'function'==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(240))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(72);function i(e,t){if(e){if("string"==typeof e)return Object(r["a"])(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Object(r["a"])(e,t):void 0}}},function(e,t,n){"use strict";var r=n(0),i=n(4),o=n.n(i);t["a"]=o.a.View.extend({itemView:'',itemsView:'',itemType:'type',autoAdd:0,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0;this.config=t||e.config||{},this.autoAdd&&this.listenTo(this.collection,'add',this.addTo),this.items=[],this.init()},init:function(){},addTo:function(e){this.add(e)},itemViewNotFound:function(e){var t=this.config,n=this.ns,r=t.em,i="".concat(n?"[".concat(n,"]: "):'',"'").concat(e,"' type not found");r&&r.logWarning(i)},add:function(e,t){var n,i=this.config,o=this.reuseView,a=this.items,s=this.itemsView,l=void 0===s?{}:s,c=t||null,u=this.itemView,f=e.get(this.itemType);l[f]?u=l[f]:!f||l[f]||Object(r["includes"])(['button','checkbox','color','date','datetime-local','email','file','hidden','image','month','number','password','radio','range','reset','search','submit','tel','text','time','url','week'],f)||this.itemViewNotFound(f),n=e.view&&o?e.view:new u({model:e,config:i},i),a&&a.push(n);var d=n.render().el;c?c.appendChild(d):this.$el.append(d)},render:function(){var e=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each((function(t){this.add(t,e)}),this),this.$el.append(e),this.onRender(),this},onRender:function(){},onRemoveBefore:function(){},onRemove:function(){},remove:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.items;this.onRemoveBefore(t,e),this.clearItems(),o.a.View.prototype.remove.apply(this,arguments),this.onRemove(t,e)},clearItems:function(){this.items}})},function(e,t,n){"use strict";n.r(t);var r=n(4);t["default"]=r["Model"].extend({initialize:function(e){this.config=e||{},this.editorModel=this.em=this.config.em||{},this.pfx=this.config.stylePrefix,this.ppfx=this.config.pStylePrefix,this.hoverClass=this.pfx+'hover',this.badgeClass=this.pfx+'badge',this.plhClass=this.pfx+'placeholder',this.freezClass=this.ppfx+'freezed',this.canvas=this.em.get&&this.em.get('Canvas'),this.init(this.config)},onFrameScroll:function(e){},getCanvas:function(){return this.canvas.getElement()},getCanvasBody:function(){return this.canvas.getBody()},getCanvasTools:function(){return this.canvas.getToolsEl()},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+e.ownerDocument.body.scrollTop,left:t.left+e.ownerDocument.body.scrollLeft}},init:function(e){},callRun:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id;if(e.trigger("run:".concat(n,":before"),t),!t||!t.abort){var r=t.sender||e,i=this.run(e,r,t);return e.trigger("run:".concat(n),i,t),e.trigger('run',n,i,t),i}e.trigger("abort:".concat(n),t)},callStop:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.id,r=t.sender||e;e.trigger("stop:".concat(n,":before"),t);var i=this.stop(e,r,t);return e.trigger("stop:".concat(n),i,t),e.trigger('stop',n,i,t),i},stopCommand:function(){this.em.get('Commands').stop(this.id)},run:function(e,t){},stop:function(e,t){}})},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(0),a=n(1),s=n(89);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=Object(s["a"])().parseStyle;t["a"]={parseStyle:u,extendStyle:function(e){return c(c({},this.getStyle()),e)},getStyle:function(e){var t=c({},this.get('style')||{});return e&&Object(o["isString"])(e)?t[e]:t},setStyle:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(o["isString"])(t)&&(t=u(t));var r=this.getStyle(n),i=c({},t);this.set('style',i,n);var s=Object(a["shallowDiff"])(r,i);return Object(o["keys"])(s).forEach((function(t){var r=e.em;n.noEvent||(e.trigger("change:style:".concat(t)),r&&(r.trigger("styleable:change",e,t,n),r.trigger("styleable:change:".concat(t),e,t,n)))})),i},addStyle:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'',n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};'string'==typeof e?e={prop:t}:n=t||{},e=this.extendStyle(e),this.setStyle(e,n)},removeStyle:function(e){var t=this.getStyle();delete t[e],this.setStyle(t)},styleToString:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[],n=this.getStyle(e);for(var r in n){var i=e.important,a=Object(o["isArray"])(i)?i.indexOf(r)>=0:i,s="".concat(n[r]).concat(a?' !important':''),l='__'==r.substr(0,2);s&&!l&&t.push("".concat(r,":").concat(s,";"))}return t.join('')},getSelectors:function(){return this.get('selectors')||this.get('classes')},getSelectorsString:function(e){return this.selectorsToString?this.selectorsToString(e):this.getSelectors().getFullString()},_validate:function(e,t){var n,r=e.style,i=this.em||t.em,a=null==i||null===(n=i.get('CssComposer'))||void 0===n?void 0:n.getConfig().onBeforeStyle;if(r&&a){var s=a(c({},r));s&&Object(o["keys"])(r).map((function(t){Object(o["isUndefined"])(s[t])&&delete e.style[t]})),s&&Object(o["keys"])(s).map((function(t){e.style[t]=s[t]}))}return!0}}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(20),i=n(2);function o(e){var t=i["useRef"](!1),n=i["useState"](e),o=Object(r["a"])(n,2),a=o[0],s=o[1];return i["useEffect"]((function(){return t.current=!1,function(){t.current=!0}}),[]),[a,function(e,n){n&&t.current||s(e)}]}},function(e,t,n){"use strict";var r=n(21),i=n(110);function o(e,t,n){i.call(this,e,t,n,{noCredentials:!0})}r(o,i),o.enabled=i.enabled,e.exports=o},function(e,t,n){"use strict";(function(t){e.exports={isOpera:function(){return t.navigator&&/opera/i.test(t.navigator.userAgent)},isKonqueror:function(){return t.navigator&&/konqueror/i.test(t.navigator.userAgent)},hasDomain:function(){if(!t.document)return!0;try{return!!t.document.domain}catch(e){return!1}}}}).call(this,n(23))},function(e,t,n){"use strict";(function(t){var r=n(50),i=n(70);e.exports={WPrefix:'_jp',currentWindowId:null,polluteGlobalNamespace:function(){e.exports.WPrefix in t||(t[e.exports.WPrefix]={})},postMessage:function(n,r){t.parent!==t&&t.parent.postMessage(JSON.stringify({windowId:e.exports.currentWindowId,type:n,data:r||''}),'*')},createIframe:function(e,n){var i,o,a=t.document.createElement('iframe'),s=function(){clearTimeout(i);try{a.onload=null}catch(e){}a.onerror=null},l=function(){a&&(s(),setTimeout((function(){a&&a.parentNode.removeChild(a),a=null}),0),r.unloadDel(o))},c=function(e){a&&(l(),n(e))};return a.src=e,a.style.display='none',a.style.position='absolute',a.onerror=function(){c('onerror')},a.onload=function(){clearTimeout(i),i=setTimeout((function(){c('onload timeout')}),2e3)},t.document.body.appendChild(a),i=setTimeout((function(){c('timeout')}),15e3),o=r.unloadAdd(l),{post:function(e,t){setTimeout((function(){try{a&&a.contentWindow&&a.contentWindow.postMessage(e,t)}catch(e){}}),0)},cleanup:l,loaded:s}},createHtmlfile:function(n,i){var o,a,s,l=['Active'].concat('Object').join('X'),c=new t[l]('htmlfile'),u=function(){clearTimeout(o),s.onerror=null},f=function(){c&&(u(),r.unloadDel(a),s.parentNode.removeChild(s),s=c=null,CollectGarbage())},d=function(e){c&&(f(),i(e))};c.open(),c.write('<html><s'+'cript>'+'document.domain="'+t.document.domain+'";'+'</s'+'cript></html>'),c.close(),c.parentWindow[e.exports.WPrefix]=t[e.exports.WPrefix];var h=c.createElement('div');return c.body.appendChild(h),s=c.createElement('iframe'),h.appendChild(s),s.src=n,s.onerror=function(){d('onerror')},o=setTimeout((function(){d('timeout')}),15e3),a=r.unloadAdd(f),{post:function(e,t){try{setTimeout((function(){s&&s.contentWindow&&s.contentWindow.postMessage(e,t)}),0)}catch(e){}},cleanup:f,loaded:u}}},e.exports.iframeEnabled=!1,t.document&&(e.exports.iframeEnabled=('function'==typeof t.postMessage||'object'==typeof t.postMessage)&&!i.isKonqueror())}).call(this,n(23))},function(e,t,n){"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(21),i=n(37).EventEmitter;function o(e,t){i.call(this);var n=this;this.bufferPosition=0,this.xo=new t('POST',e,null),this.xo.on('chunk',this._chunkHandler.bind(this)),this.xo.once('finish',(function(e,t){n._chunkHandler(e,t),n.xo=null;var r=200===e?'network':'permanent';n.emit('close',null,r),n._cleanup()}))}r(o,i),o.prototype._chunkHandler=function(e,t){if(200===e&&t)for(var n=-1;;this.bufferPosition+=n+1){var r=t.slice(this.bufferPosition);if(-1===(n=r.indexOf('\n')))break;var i=r.slice(0,n);i&&this.emit('message',i)}},o.prototype._cleanup=function(){this.removeAllListeners()},o.prototype.abort=function(){this.xo&&(this.xo.close(),this.emit('close',null,'user'),this.xo=null),this._cleanup()},e.exports=o},function(e,t,n){"use strict";var r=n(21),i=n(110);function o(e,t,n,r){i.call(this,e,t,n,r)}r(o,i),o.enabled=i.enabled&&i.supportsCORS,e.exports=o},function(e,t,n){"use strict";var r=n(60);function i(e){r.call(this,null==e?'canceled':e,r.ERR_CANCELED),this.name='CanceledError'}n(31).inherits(i,r,{__CANCEL__:!0}),e.exports=i},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r).a.$;t["default"]={startSelectPosition:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.isPointed=!1;var i=this.editorModel.get('Utils'),o=e.ownerDocument.body;i&&!this.sorter&&(this.sorter=new i.Sorter({container:o,placer:this.canvas.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,direction:'a',document:t,wmargin:1,nested:1,em:this.editorModel,canvasRelative:1,scale:function(){return n.em.getZoomDecimal()}})),r.onStart&&(this.sorter.onStart=r.onStart),e&&this.sorter.startSort(e,{container:o})},getOffsetDim:function(){var e=this.offset(this.canvas.getFrameEl()),t=this.offset(this.canvas.getElement());return{top:e.top-t.top,left:e.left-t.left}},stopSelectPosition:function(){this.posTargetCollection=null,this.posIndex='after'==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&(this.sorter.moved=0,this.sorter.endMove()),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&'after'==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?i(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?i(this.cDim[this.posIndex][5]).parent():i(this.outsideElem),this.posTargetModel=this.posTargetEl.data('model'),this.posTargetCollection=this.posTargetEl.data('model-comp'))},enable:function(){this.startSelectPosition()},nearFloat:function(e,t,n){var r=e||0,i=t||'before',o=n.length,a=0!==o&&'after'==i&&r==o;return 0!==o&&(!a&&!n[r][4]||n[r-1]&&!n[r-1][4]||a&&!n[r-1][4])?1:0},run:function(){this.enable()},stop:function(){this.stopSelectPosition(),this.$wrapper.css('cursor',''),this.$wrapper.unbind()}}},function(e,t,n){"use strict";var r=n(92),i=n(1);Object(i["hasWin"])()&&(window.Promise=window.Promise||r["a"]),t["a"]='function'==typeof fetch?fetch.bind():function(e,t){return new r["a"]((function(n,i){var o=new XMLHttpRequest;for(var a in o.open(t.method||'get',e),o.withCredentials='include'==t.credentials,t.headers||{})o.setRequestHeader(a,t.headers[a]);o.onload=function(e){return n({status:o.status,statusText:o.statusText,text:function(){return r["a"].resolve(o.responseText)}})},o.onerror=i,o.upload&&t.onProgress&&(o.upload.onprogress=t.onProgress),t.body?o.send(t.body):o.send()}))}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(0),a=n(4),s=n.n(a);function l(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function c(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var u=s.a.Model,f=s.a.View;t["a"]={types:[],initialize:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.em;this.em=r,this.opts=n,this.model=function(){var e,n,i,o=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(o&&o.type){var s=t.getBaseType();e=(i=t.getType(o.type))?i.model:s.model,n=i?i.view:s.view}else{var l=t.recognizeType(o);e=(i=l.type).model,n=i.view,o=l.attributes}var u=new e(o,c(c({},a),{},{em:r}));return u.typeView=n,u};var i=this.init&&this.init.bind(this);i&&i()},recognizeType:function(e){for(var t=this.getTypes(),n=0;n<t.length;n++){var r=t[n],i=r.isType(e);if(i='boolean'==typeof i&&i?{type:r.id}:i)return{type:r,attributes:i}}return{type:this.getBaseType(),attributes:e}},getBaseType:function(){var e=this.getTypes();return e[e.length-1]},getTypes:function(){return this.types},getType:function(e){for(var t=this.getTypes(),n=0;n<t.length;n++){var r=t[n];if(r.id===e)return r}},addType:function(e,t){var n=this.getType(e),r=this.getBaseType(),i=n?n.model:r.model,a=n?n.view:r.view,s=t.model,l=t.view,c=t.isType;s=s instanceof u||Object(o["isFunction"])(s)?s:i.extend(s||{}),l=l instanceof f||Object(o["isFunction"])(l)?l:a.extend(l||{}),!this.extendViewApi||t.model||t.view||(l=l.extend(t)),n?(n.model=s,n.view=l,n.isType=c||n.isType):(t.id=e,t.model=s,t.view=l,t.isType=c||function(t){if(t&&t.type==e)return!0},this.getTypes().unshift(t))}}},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=n(0),a=n(1),s=n(54);i.a.$;t["a"]=s["a"].extend({events:{'change input':'handleChange','change select':'handleUnitChange','click [data-arrow-up]':'upArrowClick','click [data-arrow-down]':'downArrowClick','mousedown [data-arrows]':'downIncrement',keydown:'handleKeyDown'},template:function(){var e=this.ppfx;return"\n      <span class=\"".concat(e,"input-holder\"></span>\n      <span class=\"").concat(e,"field-units\"></span>\n      <div class=\"").concat(e,"field-arrows\" data-arrows>\n        <div class=\"").concat(e,"field-arrow-u\" data-arrow-up></div>\n        <div class=\"").concat(e,"field-arrow-d\" data-arrow-down></div>\n      </div>\n    ")},inputClass:function(){var e=this.ppfx;return this.opts.contClass||"".concat(e,"field ").concat(e,"field-integer")},initialize:function(){s["a"].prototype.initialize.apply(this,arguments),Object(o["bindAll"])(this,'moveIncrement','upIncrement'),this.doc=document,this.listenTo(this.model,'change:unit',this.handleModelChange)},setValue:function(e,t){var n=t||{},r=this.validateInputValue(e,{deepCheck:1}),i={value:r.value};(r.unit||r.force)&&(i.unit=r.unit),this.model.set(i,n),n.silent&&this.handleModelChange()},handleChange:function(e){e.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},handleUnitChange:function(e){e.stopPropagation();var t=this.getUnitEl().value;this.model.set('unit',t),this.elementUpdated()},handleKeyDown:function(e){'ArrowUp'===e.key&&(e.preventDefault(),this.upArrowClick()),'ArrowDown'===e.key&&(e.preventDefault(),this.downArrowClick())},elementUpdated:function(){this.model.trigger('el:change')},handleModelChange:function(){var e=this.model;this.getInputEl().value=e.get('value');var t=this.getUnitEl();t&&(t.value=e.get('unit')||'')},getUnitEl:function(){if(!this.unitEl){var e=this.model,t=e.get('units')||[];if(t.length){var n=['<option value="" disabled hidden>-</option>'];t.forEach((function(t){var r=t==e.get('unit')?'selected':'';n.push("<option ".concat(r,">").concat(t,"</option>"))}));var r=document.createElement('div');r.innerHTML="<select class=\"".concat(this.ppfx,"input-unit\">").concat(n.join(''),"</select>"),this.unitEl=r.firstChild}}return this.unitEl},upArrowClick:function(){var e=this.model,t=e.get('step'),n=parseFloat(e.get('value'));this.setValue(this.normalizeValue(n+t)),this.elementUpdated()},downArrowClick:function(){var e=this.model,t=e.get('step'),n=parseFloat(e.get('value'));this.setValue(this.normalizeValue(n-t)),this.elementUpdated()},downIncrement:function(e){e.preventDefault(),this.moved=0;var t=this.model.get('value')||0;t=this.normalizeValue(t),this.current={y:e.pageY,val:t},Object(a["on"])(this.doc,'mousemove',this.moveIncrement),Object(a["on"])(this.doc,'mouseup',this.upIncrement)},moveIncrement:function(e){this.moved=1;var t=this.model,n=t.get('step'),r=this.current,i=this.normalizeValue(r.val+(r.y-e.pageY)*n),o=this.validateInputValue(i),a=o.value,s=o.unit;return this.prValue=a,t.set({value:a,unit:s},{avoidStore:1}),!1},upIncrement:function(){var e=this.model,t=e.get('step');if(Object(a["off"])(this.doc,'mouseup',this.upIncrement),Object(a["off"])(this.doc,'mousemove',this.moveIncrement),this.prValue&&this.moved){var n=this.prValue-t;e.set('value',n,{avoidStore:1}).set('value',n+t),this.elementUpdated()}},normalizeValue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=this.model,r=n.get('step'),i=0;if(isNaN(e))return t;if(e=parseFloat(e),Math.floor(e)!==e){var o=r.toString().split('.')[1];i=o?o.length:0}return i?parseFloat(e.toFixed(i)):e},validateInputValue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=0,r=t||{},i=this.model,a='',s=Object(o["isUndefined"])(e)?a:e,l=t.units||i.get('units')||[],c=i.get('unit')||l.length&&l[0]||'',u=Object(o["isUndefined"])(t.max)?i.get('max'):t.max,f=Object(o["isUndefined"])(t.min)?i.get('min'):t.min,d=!!i.get('limitlessMax'),h=!!i.get('limitlessMin');if(r.deepCheck){var p=i.get('fixedValues')||[];if(''===s&&(c=''),s){var g=new RegExp('^'+p.join('|'),'g');if(p.length&&g.test(s))s=s.match(g)[0],c='',n=1;else{var v=s+'';s+='',s=parseFloat(s.replace(',','.')),s=isNaN(s)?a:s;var m=v.replace(s,'');Object(o["indexOf"])(l,m)>=0&&(c=m)}}}return d||Object(o["isUndefined"])(u)||''===u||(s=s>u?u:s),h||Object(o["isUndefined"])(f)||''===f||(s=s<f?f:s),{force:n,value:s,unit:c}},render:function(){s["a"].prototype.render.call(this),this.unitEl=null;var e=this.getUnitEl();return e&&this.$el.find(".".concat(this.ppfx,"field-units")).get(0).appendChild(e),this}})},function(e,t,n){"use strict";n.d(t,"b",(function(){return l}));var r=n(4),i=n.n(r),o=n(0),a=n(1),s=Number.MAX_VALUE,l=function(e){var t=/(-?\d*\.?\d+)\w{0,}/.exec(e);return t?t[0]:''};t["a"]=i.a.Model.extend({initialize:function(){Object(o["bindAll"])(this,'sortRules'),this.compCls=[],this.ids=[]},buildFromModel:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r='',i=this.em,o=i&&i.getConfig('avoidInlineStyle'),a=e.styleToString(),s=e.get('classes'),l=n.wrapperIsBody,c=e.get('wrapper');if(this.ids.push("#".concat(e.getId())),s.each((function(e){return t.compCls.push(e.getFullName())})),!o&&a){var u="#".concat(e.getId());r="".concat(u=l&&c?'body':u,"{").concat(a,"}")}var f=e.components();return f.each((function(e){return r+=t.buildFromModel(e,n)})),r},build:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.json,i=n.em||'',s=n.cssc||i&&i.get('CssComposer');this.em=i,this.compCls=[],this.ids=[],this.model=e;var l=[],c=e?this.buildFromModel(e,n):'',u=Object(o["isUndefined"])(n.clearStyles)&&i?i.getConfig('clearStyles'):n.clearStyles;if(s){var f=n.rules||s.getAll(),d={},h=[];n.onlyMatched&&e&&Object(a["hasWin"])()&&(f=this.matchedRules(e,f)),f.forEach((function(e){var i=e.getAtRule();if(i){var o=d[i];o?o.push(e):d[i]=[e]}else{var a=t.buildFromRule(e,h,n);r?l.push(a):c+=a}})),this.sortMediaObject(d).forEach((function(e){var i='',o=e.key;e.value.forEach((function(e){var a=t.buildFromRule(e,h,n);e.get('singleAtRule')?c+="".concat(o,"{").concat(a,"}"):i+=a,r&&l.push(a)})),i&&(c+="".concat(o,"{").concat(i,"}"))})),i&&u&&f.remove&&f.remove(h)}return r?l.filter((function(e){return e})):c},buildFromRule:function(e,t){var n,r=this,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o='',a=this.model,s=e.selectorsToString({skipAdd:1}),l=e.get('selectorsAdd'),c=e.get('singleAtRule');if(e.get('selectors').each((function(e){var t=e.getFullName();(r.compCls.indexOf(t)>=0||r.ids.indexOf(t)>=0||i.keepUnusedStyles)&&(n=1)})),s&&n||l||c||!a){var u=e.getDeclaration({body:1});u&&(i.json?o=e:o+=u)}else t.push(e);return o},matchedRules:function(e,t){var n=this,r=e.getEl(),i=[];return t.forEach((function(e){try{e.selectorsToString().split(',').some((function(e){return r.matches(n.__cleanSelector(e))}))&&i.push(e)}catch(e){}})),e.components().forEach((function(e){i=i.concat(n.matchedRules(e,t))})),i=i.filter((function(e,t){return i.indexOf(e)===t}))},getQueryLength:function(e){var t=/(-?\d*\.?\d+)\w{0,}/.exec(e);return t?parseFloat(t[1]):s},sortMediaObject:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=[];return Object(o["each"])(t,(function(e,t){return n.push({key:t,value:e})})),n.sort((function(t,n){var r=[t.key,n.key].every((function(e){return-1!==e.indexOf('min-width')})),i=r?t.key:n.key,o=r?n.key:t.key;return e.getQueryLength(i)-e.getQueryLength(o)}))},sortRules:function(e,t){var n=function(e){return e.get('mediaText')},r=[n(e),n(t)].every((function(e){return-1!==e.indexOf('min-width')})),i=n(r?e:t),o=n(r?t:e);return this.getQueryLength(i)-this.getQueryLength(o)},__cleanSelector:function(e){return e.split(' ').map((function(e){return e.split(':')[0]})).join(' ')}})},function(e,t,n){"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";1&&(e.exports=n(243))},function(e,t,n){"use strict";n.d(t,"a",(function(){return i}));var r=n(2);function i(e,t,n){var i=r["useRef"]({});return'value'in i.current&&!n(i.current.condition,t)||(i.current.value=e(),i.current.condition=t),i.current.value}},function(e,t,n){"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,"a",(function(){return r}))},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=n(0);t["a"]=i.a.View.extend({initialize:function(e){this.opts=e||{},this.config=e.config||{},this.em=this.config.em;var t=this.collection;this.listenTo(t,'add',this.addTo),this.listenTo(t,'reset',this.resetChildren),this.listenTo(t,'remove',this.removeChildren)},removeChildren:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};e.views.forEach((function(e){if(e){var t=e.childrenView,n=e.scriptContainer;t&&t.stopListening(),n&&n.remove(),e.remove.apply(e)}}));var i=e.components();i.forEach((function(e){return n.removeChildren(e,t,r)}))},addTo:function(e){var t=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=this.config.em,r=this.collection.indexOf(e);if(this.addToCollection(e,null,r),n&&!t.temporary){var i=function e(t){n.trigger('component:add',t),t.components().forEach((function(t){return e(t)}))};i(e)}},addToCollection:function(e,t,r){this.compView||(this.compView=n(17).default);for(var i=this.config,a=this.opts,s=this.em,l=t||null,c=i.frameView,u=void 0===c?{}:c,f=u.model&&e.getView(u.model),d=a.componentTypes||s&&s.get('DomComponents').getTypes(),h=e.get('type')||'default',p=this.compView,g=0;g<d.length;g++)if(d[g].id==h){p=d[g].view;break}var v,m=f||new p({model:e,config:i,componentTypes:d});try{v=m.render().el}catch(e){v=document.createTextNode(''),s.logError(e)}if(l)l.appendChild(v);else{var y=this.parentEl,b=y.childNodes;if(Object(o["isUndefined"])(r))y.appendChild(v);else{var w=b.length==r;w&&r--,w||!b.length?y.appendChild(v):y.insertBefore(v,b[r])}}return e.opt.temporary||null==s||s.trigger('component:mount',e),v},resetChildren:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.previousModels,i=void 0===r?[]:r;this.parentEl.innerHTML='',i.forEach((function(e){return t.removeChildren(e,t.collection)})),e.each((function(e){return t.addToCollection(e)}))},render:function(e){var t=this,n=this.el,r=document.createDocumentFragment();return this.parentEl=e||this.el,this.collection.each((function(e){return t.addToCollection(e,r)})),n.innerHTML='',n.appendChild(r),this}})},function(e,t,n){"use strict";var r=n(4),i=n.n(r),o=i.a.View.extend({tagName:'style',initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=e.config||{};var t=this.model;this.listenTo(t,'change',this.render),this.listenTo(t,'destroy remove',this.remove),this.listenTo(t.get('selectors'),'change',this.render)},render:function(){var e=this.model,t=this.el,n=e.get('important');return t.innerHTML=e.toCSS({important:n}),this}}),a=o.extend({_createElement:function(e){return document.createTextNode('')},render:function(){var e=this.model,t=e.get('important');return this.el.textContent=e.getDeclaration({important:t}),this}}),s=i.a.$,l=function(e,t){return"".concat(e).concat(t?"-".concat(parseFloat(t)):'')};t["a"]=i.a.View.extend({initialize:function(e){var t=e.config||{};this.atRules={},this.config=t,this.em=t.em,this.pfx=t.stylePrefix||'',this.className=this.pfx+'rules';var n=this.collection;this.listenTo(n,'add',this.addTo),this.listenTo(n,'reset',this.render)},addTo:function(e){this.addToCollection(e)},addToCollection:function(e,t){if(this.renderStarted){var n,r,i=t||null,s={model:e,config:this.config};if('keyframes'===e.get('atRuleType')){var c=e.getAtRule(),u=this.atRules[c];if(!u){var f=document.createElement('style');u=document.createTextNode(''),f.appendChild(document.createTextNode("".concat(c,"{"))),f.appendChild(u),f.appendChild(document.createTextNode("}")),this.atRules[c]=u,n=f}r=new a(s),u.appendData(r.render().el.textContent)}else n=(r=new o(s)).render().el;var d=this.className,h=e.get('mediaText'),p=l(d),g=p;if(h&&(g=l(d,this.getMediaWidth(h))),n){var v,m=i||this.el;try{v=m.querySelector("#".concat(g))}catch(e){}v||(v=m.querySelector("#".concat(p))),v.appendChild(n)}return n}},getMediaWidth:function(e){return e&&e.replace("(".concat(this.em.getConfig('mediaCondition'),": "),'').replace(')','')},render:function(){var e=this;this.renderStarted=1,this.atRules={};var t=this.em,n=this.$el,r=this.className,i=this.collection,o=document.createDocumentFragment();n.empty();var a=t.get('DeviceManager').getAll().pluck('priority');return a.every((function(e){return e}))&&a.unshift(0),a.forEach((function(e){return s("<div id=\"".concat(l(r,e),"\"></div>")).appendTo(o)})),i.each((function(t){return e.addToCollection(t,o)})),n.append(o),n.attr('class',r),this}})},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(22),a=n.n(o),s=n(0),l='text/html',c=l,u=function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=new DOMParser,i=n.htmlType||c,o=i===l,a=o?e:"<div>".concat(e,"</div>"),u=r.parseFromString(a,i);if(o){var f=u.head,d=u.body,h=f.querySelectorAll('script');Object(s["each"])(h,(function(e){return d.appendChild(e)}));var p=[];Object(s["each"])(f.children,(function(e){return p.push(e)})),Object(s["each"])(p,(function(e,t){return d.insertBefore(e,d.children[t])})),t=d}else t=u.firstChild;return t};function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["a"]=function(e){var t=e,n='data-gjs-',r='parse:html';return{compTypes:'',modelAttrStart:n,splitPropsFromAttr:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r={},i={};return Object(s["each"])(t,(function(t,o){if(0===o.indexOf(e.modelAttrStart)){var a=o.replace(n,''),l=t.length,c=t&&Object(s["isString"])(t),u=c&&t.substr(0,1),f=c&&t.substr(l-1);t='false'!==(t='true'===t||t)&&t;try{t='{'==u&&'}'==f||'['==u&&']'==f?JSON.parse(t):t}catch(e){}r[a]=t}else i[o]=t})),{props:r,attrs:i}},parseStyle:function(e){for(var t={},n=e.split(';'),r=0,i=n.length;r<i;r++){var o=n[r].trim();if(o){var a=o.split(':');t[a[0].trim()]=a.slice(1).join(':').trim()}}return t},parseClass:function(e){for(var t=[],n=e.split(' '),r=0,i=n.length;r<i;r++){var o=n[r].trim();o&&t.push(o)}return t},parseNode:function(r){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=[],s=r.childNodes,l=0,c=s.length;l<c;l++){var u=s[l],f=u.attributes||[],h=f.length,p=o[o.length-1],g=u.childNodes.length,v=this.compTypes,m={};if(v){var y='',b=u.getAttribute&&u.getAttribute("".concat(n,"type"));if(b)m={type:b};else{for(var w=0;w<v.length;w++){var O=v[w];if(y=O.model.isComponent(u,i)){'object'!==a()(y)&&(y={type:O.id});break}}m=y}}m.tagName||(m.tagName=u.tagName?u.tagName.toLowerCase():''),h&&(m.attributes={});for(var x=0;x<h;x++){var k=f[x].nodeName,C=f[x].nodeValue;if('style'==k)m.style=this.parseStyle(C);else if('class'==k)m.classes=this.parseClass(C);else{if('contenteditable'==k)continue;if(0===k.indexOf(n)){var S=k.replace(n,''),j=C.length,E=C&&C.substr(0,1),P=C&&C.substr(j-1);C='false'!==(C='true'===C||C)&&C;try{C='{'==E&&'}'==P||'['==E&&']'==P?JSON.parse(C):C}catch(e){}m[S]=C}else''===C&&!0===u[k]&&(C=!0),m.attributes[k]=C}}if(g&&!m.components){var _=u.childNodes[0];1===g&&3===_.nodeType?(!m.type&&(m.type='text'),m.components={type:'textnode',content:_.nodeValue}):m.components=this.parseNode(u,d(d({},i),{},{inSvg:i.inSvg||'svg'===m.type}))}if('textnode'==m.type){if(p&&'textnode'==p.type){p.content+=m.content;continue}if(!e.keepEmptyTextNodes){var T=u.nodeValue;if(' '!=T&&!T.trim())continue}}g||'/>'!=="".concat(u.outerHTML).slice(-2)||(m.void=!0);var A=m.components;if(!m.type&&A){for(var M=1,D=0,L=0;L<A.length;L++){var N=A[L],R=N.type;if(['text','textnode'].indexOf(R)<0&&t.textTags.indexOf(N.tagName)<0){M=0;break}'textnode'==R&&(D=1)}M&&D&&(m.type='text')}(m.tagName||'textnode'==m.type)&&o.push(m)}return o},parse:function(n,i){var o,a=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},l=t.em,c=l&&l.get('Config')||{},f={html:null,css:null},h=d(d({},e),a),p=d(d({},e.optionsHtml),{},{htmlType:(null===(o=e.optionsHtml)||void 0===o?void 0:o.htmlType)||e.htmlType},a),g=Object(s["isFunction"])(h.parserHtml)?h.parserHtml(n,p):u(n,p),v=g.querySelectorAll('script'),m=v.length,y=Object(s["isUndefined"])(c.allowScripts)?p.allowScripts:c.allowScripts;if(!y)for(;m--;)v[m].parentNode.removeChild(v[m]);if(p.allowUnsafeAttr||this.__clearUnsafeAttr(g),i){for(var b=g.querySelectorAll('style'),w=b.length,O='';w--;)O=b[w].innerHTML+O,b[w].parentNode.removeChild(b[w]);O&&(f.css=i.parse(O))}l&&l.trigger("".concat(r,":root"),{input:n,root:g});var x=this.parseNode(g),k=1!==x.length||t.returnArray?x:x[0];return f.html=k,l&&l.trigger(r,{input:n,output:f}),f},__clearUnsafeAttr:function(e){var t=this,n=e.attributes||[],r=e.childNodes||[],i=[];Object(s["each"])(n,(function(e){var t=e.nodeName||'';0===t.indexOf('on')&&i.push(t)})),i.map((function(t){return e.removeAttribute(t)})),Object(s["each"])(r,(function(e){return t.__clearUnsafeAttr(e)}))}}}},function(e,t,n){"use strict";var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),l=n(22),c=n.n(l),u=n(1),f=n(54);function d(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function h(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?d(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):d(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var p=a.a.$;p&&function(e,t){if(Object(u["hasWin"])()){var n={beforeShow:P,move:P,change:P,show:P,hide:P,color:!1,flat:!1,showInput:!1,allowEmpty:!1,showButtons:!0,clickoutFiresChange:!0,showInitial:!1,showPalette:!1,showPaletteOnly:!1,hideAfterPaletteSelect:!1,togglePaletteOnly:!1,showSelectionPalette:!0,localStorageKey:!1,appendTo:'body',maxSelectionSize:7,cancelText:'cancel',chooseText:'choose',togglePaletteMoreText:'more',togglePaletteLessText:'less',clearText:'Clear Color Selection',noColorSelectedText:'No Color Selected',preferredFormat:!1,className:'',containerClassName:'',replacerClassName:'',showAlpha:!1,theme:'sp-light',palette:[['#ffffff','#000000','#ff0000','#ff8000','#ffff00','#008000','#0000ff','#4b0082','#9400d3']],selectionPalette:[],disabled:!1,offset:null},r=[],i=!!/msie/i.exec(window.navigator.userAgent),o=function(){function e(e,t){return!!~(''+e).indexOf(t)}var t=document.createElement('div').style;return t.cssText='background-color:rgba(0,0,0,.5)',e(t.backgroundColor,'rgba')||e(t.backgroundColor,'hsla')}(),a=["<div class='sp-replacer'>","<div class='sp-preview'><div class='sp-preview-inner'></div></div>","<div class='sp-dd'>&#9660;</div>",'</div>'].join(''),s=function(){var e='';if(i)for(var t=1;t<=6;t++)e+="<div class='sp-"+t+"'></div>";return["<div class='sp-container sp-hidden'>","<div class='sp-palette-container'>","<div class='sp-palette sp-thumb sp-cf'></div>","<div class='sp-palette-button-container sp-cf'>","<button type='button' class='sp-palette-toggle'></button>",'</div>','</div>',"<div class='sp-picker-container'>","<div class='sp-top sp-cf'>","<div class='sp-fill'></div>","<div class='sp-top-inner'>","<div class='sp-color'>","<div class='sp-sat'>","<div class='sp-val'>","<div class='sp-dragger'></div>",'</div>','</div>','</div>',"<div class='sp-clear sp-clear-display'>",'</div>',"<div class='sp-hue'>","<div class='sp-slider'></div>",e,'</div>','</div>',"<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",'</div>',"<div class='sp-input-container sp-cf'>","<input class='sp-input' type='text' spellcheck='false'  />",'</div>',"<div class='sp-initial sp-thumb sp-cf'></div>","<div class='sp-button-container sp-cf'>","<a class='sp-cancel' href='#'></a>","<button type='button' class='sp-choose'></button>",'</div>','</div>','</div>'].join('')}(),l='spectrum.id';e.fn.spectrum=function(t,n){if('string'==typeof t){var i=this,o=Array.prototype.slice.call(arguments,1);return this.each((function(){var n=r[e(this).data(l)];if(n){var a=n[t];if(!a)throw new Error("Spectrum: no such method: '"+t+"'");'get'==t?i=n.get():'container'==t?i=n.container:'option'==t?i=n.option.apply(n,o):'destroy'==t?(n.destroy(),e(this).removeData(l)):a.apply(n,o)}})),i}return this.spectrum('destroy').each((function(){var n=E(this,e.extend({},t,e(this).data()));e(this).data(l,n.id)}))},e.fn.spectrum.load=!0,e.fn.spectrum.loadOpts={},e.fn.spectrum.draggable=A,e.fn.spectrum.defaults=n,e.fn.spectrum.inputTypeColorSupport=function t(){if(void 0===t._cachedResult){var n=e("<input type='color'/>")[0];t._cachedResult='color'===n.type&&''!==n.value}return t._cachedResult},e.spectrum={},e.spectrum.localization={},e.spectrum.palettes={},e.fn.spectrum.processNativeColorInputs=function(){var t=e('input[type=color]');t.length&&!M()&&t.spectrum({preferredFormat:'hex6'})};var f=/^[\s,#]+/,d=/\s+$/,h=0,p=Math,g=p.round,v=p.min,m=p.max,y=p.random,b=function e(t,n){if(n=n||{},(t=t||'')instanceof e)return t;if(!(this instanceof e))return new e(t,n);var r=function(e){var t={r:0,g:0,b:0},n=1,r=!1,i=!1;'string'==typeof e&&(e=function(e){e=e.replace(f,'').replace(d,'').toLowerCase();var t,n=!1;if(k[e])e=k[e],n=!0;else if('transparent'==e)return{r:0,g:0,b:0,a:0,format:'name'};if(t=S.rgb.exec(e))return{r:t[1],g:t[2],b:t[3]};if(t=S.rgba.exec(e))return{r:t[1],g:t[2],b:t[3],a:t[4]};if(t=S.hsl.exec(e))return{h:t[1],s:t[2],l:t[3]};if(t=S.hsla.exec(e))return{h:t[1],s:t[2],l:t[3],a:t[4]};if(t=S.hsv.exec(e))return{h:t[1],s:t[2],v:t[3]};if(t=S.hsva.exec(e))return{h:t[1],s:t[2],v:t[3],a:t[4]};if(t=S.hex8.exec(e))return{a:(r=t[1],Z(r)/255),r:Z(t[2]),g:Z(t[3]),b:Z(t[4]),format:n?'name':'hex8'};var r;if(t=S.hex6.exec(e))return{r:Z(t[1]),g:Z(t[2]),b:Z(t[3]),format:n?'name':'hex'};if(t=S.hex3.exec(e))return{r:Z(t[1]+''+t[1]),g:Z(t[2]+''+t[2]),b:Z(t[3]+''+t[3]),format:n?'name':'hex'};return!1}(e));'object'==c()(e)&&(e.hasOwnProperty('r')&&e.hasOwnProperty('g')&&e.hasOwnProperty('b')?(o=e.r,a=e.g,s=e.b,t={r:255*X(o,255),g:255*X(a,255),b:255*X(s,255)},r=!0,i='%'===String(e.r).substr(-1)?'prgb':'rgb'):e.hasOwnProperty('h')&&e.hasOwnProperty('s')&&e.hasOwnProperty('v')?(e.s=te(e.s),e.v=te(e.v),t=function(e,t,n){e=6*X(e,360),t=X(t,100),n=X(n,100);var r=p.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(e.h,e.s,e.v),r=!0,i='hsv'):e.hasOwnProperty('h')&&e.hasOwnProperty('s')&&e.hasOwnProperty('l')&&(e.s=te(e.s),e.l=te(e.l),t=function(e,t,n){var r,i,o;function a(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}if(e=X(e,360),t=X(t,100),n=X(n,100),0===t)r=i=o=n;else{var s=n<.5?n*(1+t):n+t-n*t,l=2*n-s;r=a(l,s,e+1/3),i=a(l,s,e),o=a(l,s,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,e.s,e.l),r=!0,i='hsl'),e.hasOwnProperty('a')&&(n=e.a));var o,a,s;return n=J(n),{ok:r,format:e.format||i,r:v(255,m(t.r,0)),g:v(255,m(t.g,0)),b:v(255,m(t.b,0)),a:n}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=g(100*this._a)/100,this._format=n.format||r.format,this._gradientType=n.gradientType,this._r<1&&(this._r=g(this._r)),this._g<1&&(this._g=g(this._g)),this._b<1&&(this._b=g(this._b)),this._ok=r.ok,this._tc_id=h++};b.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},setAlpha:function(e){return this._a=J(e),this._roundA=g(100*this._a)/100,this},toHsv:function(){var e=L(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=L(this._r,this._g,this._b),t=g(360*e.h),n=g(100*e.s),r=g(100*e.v);return 1==this._a?'hsv('+t+', '+n+'%, '+r+'%)':'hsva('+t+', '+n+'%, '+r+'%, '+this._roundA+')'},toHsl:function(){var e=D(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=D(this._r,this._g,this._b),t=g(360*e.h),n=g(100*e.s),r=g(100*e.l);return 1==this._a?'hsl('+t+', '+n+'%, '+r+'%)':'hsla('+t+', '+n+'%, '+r+'%, '+this._roundA+')'},toHex:function(e){return N(this._r,this._g,this._b,e)},toHexString:function(e){return'#'+this.toHex(e)},toHex8:function(){return R(this._r,this._g,this._b,this._a)},toHex8String:function(){return'#'+this.toHex8()},toRgb:function(){return{r:g(this._r),g:g(this._g),b:g(this._b),a:this._a}},toRgbString:function(){return 1==this._a?'rgb('+g(this._r)+', '+g(this._g)+', '+g(this._b)+')':'rgba('+g(this._r)+', '+g(this._g)+', '+g(this._b)+', '+this._roundA+')'},toPercentageRgb:function(){return{r:g(100*X(this._r,255))+'%',g:g(100*X(this._g,255))+'%',b:g(100*X(this._b,255))+'%',a:this._a}},toPercentageRgbString:function(){return 1==this._a?'rgb('+g(100*X(this._r,255))+'%, '+g(100*X(this._g,255))+'%, '+g(100*X(this._b,255))+'%)':'rgba('+g(100*X(this._r,255))+'%, '+g(100*X(this._g,255))+'%, '+g(100*X(this._b,255))+'%, '+this._roundA+')'},toName:function(){return 0===this._a?'transparent':!(this._a<1)&&(C[N(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t='#'+R(this._r,this._g,this._b,this._a),n=t,r=this._gradientType?'GradientType = 1, ':'';e&&(n=b(e).toHex8String());return'progid:DXImageTransform.Microsoft.gradient('+r+'startColorstr='+t+',endColorstr='+n+')'},toString:function(e){var t=!!e;e=e||this._format;var n=!1,r=this._a<1&&this._a>=0;return t||!r||'hex'!==e&&'hex6'!==e&&'hex3'!==e&&'name'!==e?('rgb'===e&&(n=this.toRgbString()),'prgb'===e&&(n=this.toPercentageRgbString()),'hex'!==e&&'hex6'!==e||(n=this.toHexString()),'hex3'===e&&(n=this.toHexString(!0)),'hex8'===e&&(n=this.toHex8String()),'name'===e&&(n=this.toName()),'hsl'===e&&(n=this.toHslString()),'hsv'===e&&(n=this.toHsvString()),n||this.toHexString()):'name'===e&&0===this._a?this.toName():this.toRgbString()},_applyModification:function(e,t){var n=e.apply(null,[this].concat([].slice.call(t)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(V,arguments)},brighten:function(){return this._applyModification(B,arguments)},darken:function(){return this._applyModification(U,arguments)},desaturate:function(){return this._applyModification(F,arguments)},saturate:function(){return this._applyModification(I,arguments)},greyscale:function(){return this._applyModification(z,arguments)},spin:function(){return this._applyModification(H,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(G,arguments)},complement:function(){return this._applyCombination(W,arguments)},monochromatic:function(){return this._applyCombination(Y,arguments)},splitcomplement:function(){return this._applyCombination(K,arguments)},triad:function(){return this._applyCombination($,arguments)},tetrad:function(){return this._applyCombination(q,arguments)}},b.fromRatio=function(e,t){if('object'==c()(e)){var n={};for(var r in e)e.hasOwnProperty(r)&&(n[r]='a'===r?e[r]:te(e[r]));e=n}return b(e,t)},b.equals=function(e,t){return!(!e||!t)&&b(e).toRgbString()==b(t).toRgbString()},b.random=function(){return b.fromRatio({r:y(),g:y(),b:y()})},b.mix=function(e,t,n){n=0===n?0:n||50;var r,i=b(e).toRgb(),o=b(t).toRgb(),a=n/100,s=2*a-1,l=o.a-i.a,c=1-(r=((r=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:o.r*r+i.r*c,g:o.g*r+i.g*c,b:o.b*r+i.b*c,a:o.a*a+i.a*(1-a)};return b(u)},b.readability=function(e,t){var n=b(e),r=b(t),i=n.toRgb(),o=r.toRgb(),a=n.getBrightness(),s=r.getBrightness(),l=Math.max(i.r,o.r)-Math.min(i.r,o.r)+Math.max(i.g,o.g)-Math.min(i.g,o.g)+Math.max(i.b,o.b)-Math.min(i.b,o.b);return{brightness:Math.abs(a-s),color:l}},b.isReadable=function(e,t){var n=b.readability(e,t);return n.brightness>125&&n.color>500},b.mostReadable=function(e,t){for(var n=null,r=0,i=!1,o=0;o<t.length;o++){var a=b.readability(e,t[o]),s=a.brightness>125&&a.color>500,l=3*(a.brightness/125)+a.color/500;(s&&!i||s&&i&&l>r||!s&&!i&&l>r)&&(i=s,r=l,n=b(t[o]))}return n};var w,O,x,k=b.names={aliceblue:'f0f8ff',antiquewhite:'faebd7',aqua:'0ff',aquamarine:'7fffd4',azure:'f0ffff',beige:'f5f5dc',bisque:'ffe4c4',black:'000',blanchedalmond:'ffebcd',blue:'00f',blueviolet:'8a2be2',brown:'a52a2a',burlywood:'deb887',burntsienna:'ea7e5d',cadetblue:'5f9ea0',chartreuse:'7fff00',chocolate:'d2691e',coral:'ff7f50',cornflowerblue:'6495ed',cornsilk:'fff8dc',crimson:'dc143c',cyan:'0ff',darkblue:'00008b',darkcyan:'008b8b',darkgoldenrod:'b8860b',darkgray:'a9a9a9',darkgreen:'006400',darkgrey:'a9a9a9',darkkhaki:'bdb76b',darkmagenta:'8b008b',darkolivegreen:'556b2f',darkorange:'ff8c00',darkorchid:'9932cc',darkred:'8b0000',darksalmon:'e9967a',darkseagreen:'8fbc8f',darkslateblue:'483d8b',darkslategray:'2f4f4f',darkslategrey:'2f4f4f',darkturquoise:'00ced1',darkviolet:'9400d3',deeppink:'ff1493',deepskyblue:'00bfff',dimgray:'696969',dimgrey:'696969',dodgerblue:'1e90ff',firebrick:'b22222',floralwhite:'fffaf0',forestgreen:'228b22',fuchsia:'f0f',gainsboro:'dcdcdc',ghostwhite:'f8f8ff',gold:'ffd700',goldenrod:'daa520',gray:'808080',green:'008000',greenyellow:'adff2f',grey:'808080',honeydew:'f0fff0',hotpink:'ff69b4',indianred:'cd5c5c',indigo:'4b0082',ivory:'fffff0',khaki:'f0e68c',lavender:'e6e6fa',lavenderblush:'fff0f5',lawngreen:'7cfc00',lemonchiffon:'fffacd',lightblue:'add8e6',lightcoral:'f08080',lightcyan:'e0ffff',lightgoldenrodyellow:'fafad2',lightgray:'d3d3d3',lightgreen:'90ee90',lightgrey:'d3d3d3',lightpink:'ffb6c1',lightsalmon:'ffa07a',lightseagreen:'20b2aa',lightskyblue:'87cefa',lightslategray:'789',lightslategrey:'789',lightsteelblue:'b0c4de',lightyellow:'ffffe0',lime:'0f0',limegreen:'32cd32',linen:'faf0e6',magenta:'f0f',maroon:'800000',mediumaquamarine:'66cdaa',mediumblue:'0000cd',mediumorchid:'ba55d3',mediumpurple:'9370db',mediumseagreen:'3cb371',mediumslateblue:'7b68ee',mediumspringgreen:'00fa9a',mediumturquoise:'48d1cc',mediumvioletred:'c71585',midnightblue:'191970',mintcream:'f5fffa',mistyrose:'ffe4e1',moccasin:'ffe4b5',navajowhite:'ffdead',navy:'000080',oldlace:'fdf5e6',olive:'808000',olivedrab:'6b8e23',orange:'ffa500',orangered:'ff4500',orchid:'da70d6',palegoldenrod:'eee8aa',palegreen:'98fb98',paleturquoise:'afeeee',palevioletred:'db7093',papayawhip:'ffefd5',peachpuff:'ffdab9',peru:'cd853f',pink:'ffc0cb',plum:'dda0dd',powderblue:'b0e0e6',purple:'800080',rebeccapurple:'663399',red:'f00',rosybrown:'bc8f8f',royalblue:'4169e1',saddlebrown:'8b4513',salmon:'fa8072',sandybrown:'f4a460',seagreen:'2e8b57',seashell:'fff5ee',sienna:'a0522d',silver:'c0c0c0',skyblue:'87ceeb',slateblue:'6a5acd',slategray:'708090',slategrey:'708090',snow:'fffafa',springgreen:'00ff7f',steelblue:'4682b4',tan:'d2b48c',teal:'008080',thistle:'d8bfd8',tomato:'ff6347',turquoise:'40e0d0',violet:'ee82ee',wheat:'f5deb3',white:'fff',whitesmoke:'f5f5f5',yellow:'ff0',yellowgreen:'9acd32'},C=b.hexNames=function(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[e[n]]=n);return t}(k),S=(O='[\\s|\\(]+('+(w='(?:'+'[-\\+]?\\d*\\.\\d+%?'+')|(?:'+'[-\\+]?\\d+%?'+')')+')[,|\\s]+('+w+')[,|\\s]+('+w+')\\s*\\)?',x='[\\s|\\(]+('+w+')[,|\\s]+('+w+')[,|\\s]+('+w+')[,|\\s]+('+w+')\\s*\\)?',{rgb:new RegExp('rgb'+O),rgba:new RegExp('rgba'+x),hsl:new RegExp('hsl'+O),hsla:new RegExp('hsla'+x),hsv:new RegExp('hsv'+O),hsva:new RegExp('hsva'+x),hex3:/^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex8:/^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});window.tinycolor=b,e((function(){e.fn.spectrum.load&&e.fn.spectrum.processNativeColorInputs()}))}function j(t,n,r,i){for(var a=[],s=0;s<t.length;s++){var l=t[s];if(l){var c=b(l),u=c.toHsl().l<.5?'sp-thumb-el sp-thumb-dark':'sp-thumb-el sp-thumb-light';u+=b.equals(n,l)?' sp-thumb-active':'';var f=c.toString(i.preferredFormat||'rgb'),d=o?'background-color:'+c.toRgbString():'filter:'+c.toFilter();a.push('<span title="'+f+'" data-color="'+c.toRgbString()+'" class="'+u+'"><span class="sp-thumb-inner" style="'+d+';"></span></span>')}else{a.push(e('<div />').append(e('<span data-color="" style="background-color:transparent;" class="'+'sp-clear-display'+'"></span>').attr('title',i.noColorSelectedText)).html())}}return"<div class='sp-cf "+r+"'>"+a.join('')+'</div>'}function E(l,c){var u,f,d,h,p=function(t,r){var i=e.extend({},n,t);return i.callbacks={move:T(i.move,r),change:T(i.change,r),show:T(i.show,r),hide:T(i.hide,r),beforeShow:T(i.beforeShow,r)},i}(c,l),g=p.flat,v=p.showSelectionPalette,m=p.localStorageKey,y=p.theme,w=p.callbacks,O=(u=$e,f=10,function(){var e=this,t=arguments,n=function(){h=null,u.apply(e,t)};d&&clearTimeout(h),!d&&h||(h=setTimeout(n,f))}),x=!1,k=!1,C=!0,S=0,E=0,P=0,D=0,L=0,N=0,R=0,F=0,I=0,z=0,V=1,B=[],U=[],H={},W=p.selectionPalette.slice(0),$=p.maxSelectionSize,q='sp-dragging',K=null,G=l.ownerDocument,Y=(G.body,e(l)),J=!1,X=e(s,G).addClass(y),Q=X.find('.sp-picker-container'),Z=X.find('.sp-color'),ee=X.find('.sp-dragger'),te=X.find('.sp-hue'),ne=X.find('.sp-slider'),re=X.find('.sp-alpha-inner'),ie=X.find('.sp-alpha'),oe=X.find('.sp-alpha-handle'),ae=X.find('.sp-input'),se=X.find('.sp-palette'),le=X.find('.sp-initial'),ce=X.find('.sp-cancel'),ue=X.find('.sp-clear'),fe=X.find('.sp-choose'),de=X.find('.sp-palette-toggle'),he=Y.is('input'),pe=he&&'color'===Y.attr('type')&&M(),ge=he&&!g,ve=ge?e(a).addClass(y).addClass(p.className).addClass(p.replacerClassName):e([]),me=ge?ve:Y,ye=ve.find('.sp-preview-inner'),be=p.color||he&&Y.val(),we=!1,Oe=p.preferredFormat,xe=!p.showButtons||p.clickoutFiresChange,ke=!be,Ce=p.allowEmpty&&!pe;function Se(){if(p.showPaletteOnly&&(p.showPalette=!0),de.text(p.showPaletteOnly?p.togglePaletteMoreText:p.togglePaletteLessText),p.palette){B=p.palette.slice(0),U=e.isArray(B[0])?B:[B],H={};for(var t=0;t<U.length;t++)for(var n=0;n<U[t].length;n++){var r=b(U[t][n]).toRgbString();H[r]=!0}}X.toggleClass('sp-flat',g),X.toggleClass('sp-input-disabled',!p.showInput),X.toggleClass('sp-alpha-enabled',p.showAlpha),X.toggleClass('sp-clear-enabled',Ce),X.toggleClass('sp-buttons-disabled',!p.showButtons),X.toggleClass('sp-palette-buttons-disabled',!p.togglePaletteOnly),X.toggleClass('sp-palette-disabled',!p.showPalette),X.toggleClass('sp-palette-only',p.showPaletteOnly),X.toggleClass('sp-initial-disabled',!p.showInitial),X.addClass(p.className).addClass(p.containerClassName),$e()}function je(){if(m&&window.localStorage){try{var t=window.localStorage[m].split(',#');t.length>1&&(delete window.localStorage[m],e.each(t,(function(e,t){Ee(t)})))}catch(e){}try{W=window.localStorage[m].split(';')}catch(e){}}}function Ee(t){if(v){var n=b(t).toRgbString();if(!H[n]&&-1===e.inArray(n,W))for(W.push(n);W.length>$;)W.shift();if(m&&window.localStorage)try{window.localStorage[m]=W.join(';')}catch(e){}}}function Pe(){var t=Ve(),n=e.map(U,(function(e,n){return j(e,t,'sp-palette-row sp-palette-row-'+n,p)}));je(),W&&n.push(j(function(){var e=[];if(p.showPalette)for(var t=0;t<W.length;t++){var n=b(W[t]).toRgbString();H[n]||e.push(W[t])}return e.reverse().slice(0,p.maxSelectionSize)}(),t,'sp-palette-row sp-palette-row-selection',p)),se.html(n.join(''))}function _e(){if(p.showInitial){var e=we,t=Ve();le.html(j([e,t],t,'sp-palette-row-initial',p))}}function Te(){(E<=0||S<=0||D<=0)&&$e(),k=!0,X.addClass(q),K=null,Y.trigger('dragstart.spectrum',[Ve()])}function Ae(){k=!1,X.removeClass(q),Y.trigger('dragstop.spectrum',[Ve()])}function Me(){var e=ae.val();if(null!==e&&''!==e||!Ce){var t=b(e);t.isValid()?(ze(t),We(!0)):ae.addClass('sp-validation-error')}else ze(null),We(!0)}function De(){x?Fe():Le()}function Le(){var t=e.Event('beforeShow.spectrum');if(x)$e();else if(Y.trigger('beforeShow.spectrum',[Ve()]),!1!==w.beforeShow(Ve())&&!t.isDefaultPrevented()){!function(){for(var e=0;e<r.length;e++)r[e]&&r[e].hide()}(),x=!0;var n=e(G);n.bind('keydown.spectrum',Ne),n.bind('click.spectrum',Re),e(window).bind('resize.spectrum',O),ve.addClass('sp-active'),X.removeClass('sp-hidden'),$e(),Ue(),we=Ve(),_e(),w.show(we),Y.trigger('show.spectrum',[we])}}function Ne(e){27===e.keyCode&&Fe()}function Re(e){2!=e.button&&(k||(xe?We(!0):Ie(),Fe()))}function Fe(){x&&!g&&(x=!1,e(G).unbind('keydown.spectrum',Ne),e(G).unbind('click.spectrum',Re),e(window).unbind('resize.spectrum',O),ve.removeClass('sp-active'),X.addClass('sp-hidden'),w.hide(Ve()),Y.trigger('hide.spectrum',[Ve()]))}function Ie(){ze(we,!0)}function ze(e,t){var n,r;b.equals(e,Ve())?Ue():(!e&&Ce?ke=!0:(ke=!1,C=!e,r=(n=b(e)).toHsv(),F=r.h%360/360,I=r.s,z=r.v,V=r.a),Ue(),n&&n.isValid()&&!t&&(Oe=p.preferredFormat||n.getFormat()))}function Ve(e){return e=e||{},Ce&&ke?null:b.fromRatio({h:F,s:I,v:z,a:Math.round(100*V)/100},{format:e.format||Oe})}function Be(){Ue(),w.move(Ve()),Y.trigger('move.spectrum',[Ve()])}function Ue(){ae.removeClass('sp-validation-error'),He();var e=b.fromRatio({h:F,s:1,v:1});Z.css('background-color',e.toHexString());var t=Oe;V<1&&(0!==V||'name'!==t)&&('hex'!==t&&'hex3'!==t&&'hex6'!==t&&'name'!==t||(t='rgb'));var n=Ve({format:t}),r='';if(ye.removeClass('sp-clear-display'),ye.css('background-color','transparent'),!n&&Ce)ye.addClass('sp-clear-display');else{var a=n.toHexString(),s=n.toRgbString();if(o||1===n.alpha?ye.css('background-color',s):(ye.css('background-color','transparent'),ye.css('filter',n.toFilter())),p.showAlpha){var l=n.toRgb();l.a=0;var c=b(l).toRgbString(),u='linear-gradient(left, '+c+', '+a+')';i?re.css('filter',b(c).toFilter({gradientType:1},a)):(re.css('background','-webkit-'+u),re.css('background','-moz-'+u),re.css('background','-ms-'+u),re.css('background','linear-gradient(to right, '+c+', '+a+')'))}r=n.toString(t)}p.showInput&&ae.val(r),p.showPalette&&Pe(),_e()}function He(){var e=I,t=z;if(Ce&&ke)oe.hide(),ne.hide(),ee.hide();else{oe.show(),ne.show(),ee.show();var n=e*S,r=E-t*E;n=Math.max(-P,Math.min(S-P,n-P)),r=Math.max(-P,Math.min(E-P,r-P)),ee.css({top:r+'px',left:n+'px'});var i=V*L;oe.css({left:i-N/2+'px'});var o=F*D;ne.css({top:o-R+'px'})}}function We(e){var t=Ve(),n='',r=!!C||!b.equals(t,we);t&&(n=t.toString(Oe),!x&&Ee(t)),he&&Y.val(n),e&&r&&(w.change(t),Y.trigger('change',[t]))}function $e(){x&&(S=Z.width(),E=Z.height(),P=ee.height(),te.width(),D=te.height(),R=ne.height(),L=ie.width(),N=oe.width(),g||(X.css('position','absolute'),p.offset?X.offset(p.offset):X.offset(function(t,n){var r=0,i=t.outerWidth(),o=t.outerHeight(),a=n.outerHeight(),s=t[0].ownerDocument,l=s.documentElement,c=l.clientWidth,u=l.clientHeight,f=e(s).scrollLeft(),d=e(s).scrollTop(),h=c+f,p=u+d,g=n.offset();return g.top+=a,g.left-=Math.min(g.left,g.left+i>h&&h>i?Math.abs(g.left+i-h):0),g.top-=Math.min(g.top,g.top+o>p&&p>o?Math.abs(o+a-r):r),g}(X,me))),He(),p.showPalette&&Pe(),Y.trigger('reflow.spectrum'))}function qe(){Fe(),J=!0,Y.attr('disabled',!0),me.addClass('sp-disabled')}!function(){if(i&&X.find('*:not(input)').attr('unselectable','on'),Se(),ge&&Y.after(ve).hide(),Ce||ue.hide(),g)Y.after(X).hide();else{var t='parent'===p.appendTo?Y.parent():e(p.appendTo);1!==t.length&&(t=e('body')),t.append(X)}function n(t){return t.data&&t.data.ignore?(ze(e(t.target).closest('.sp-thumb-el').data('color')),Be()):(ze(e(t.target).closest('.sp-thumb-el').data('color')),Be(),p.hideAfterPaletteSelect&&(We(!0),Fe())),!1}je(),me.bind('click.spectrum touchstart.spectrum',(function(t){J||De(),t.stopPropagation(),e(t.target).is('input')||t.preventDefault()})),(Y.is(':disabled')||!0===p.disabled)&&qe(),X.click(_),ae.change(Me),ae.bind('paste',(function(){setTimeout(Me,1)})),ae.keydown((function(e){13==e.keyCode&&Me()})),ce.text(p.cancelText),ce.bind('click.spectrum',(function(e){e.stopPropagation(),e.preventDefault(),Ie(),Fe()})),ue.attr('title',p.clearText),ue.bind('click.spectrum',(function(e){e.stopPropagation(),e.preventDefault(),ke=!0,Be(),g&&We(!0)})),fe.text(p.chooseText),fe.bind('click.spectrum',(function(e){e.stopPropagation(),e.preventDefault(),i&&ae.is(':focus')&&ae.trigger('change'),ae.hasClass('sp-validation-error')||(We(!0),Fe())})),de.text(p.showPaletteOnly?p.togglePaletteMoreText:p.togglePaletteLessText),de.bind('click.spectrum',(function(e){e.stopPropagation(),e.preventDefault(),p.showPaletteOnly=!p.showPaletteOnly,p.showPaletteOnly||g||X.css('left','-='+(Q.outerWidth(!0)+5)),Se()})),A(ie,(function(e,t,n){V=e/L,ke=!1,n.shiftKey&&(V=Math.round(10*V)/10),Be()}),Te,Ae),A(te,(function(e,t){F=parseFloat(t/D),ke=!1,p.showAlpha||(V=1),Be()}),Te,Ae),A(Z,(function(e,t,n){if(n.shiftKey){if(!K){var r=I*S,i=E-z*E,o=Math.abs(e-r)>Math.abs(t-i);K=o?'x':'y'}}else K=null;var a=!K||'y'===K;(!K||'x'===K)&&(I=parseFloat(e/S)),a&&(z=parseFloat((E-t)/E)),ke=!1,p.showAlpha||(V=1),Be()}),Te,Ae),be?(ze(be),Ue(),Oe=p.preferredFormat||b(be).getFormat(),Ee(be)):Ue(),g&&Le();var r=i?'mousedown.spectrum':'click.spectrum touchstart.spectrum';se.delegate('.sp-thumb-el',r,n),le.delegate('.sp-thumb-el:nth-child(1)',r,{ignore:!0},n)}();var Ke={show:Le,hide:Fe,toggle:De,reflow:$e,option:function(n,r){return n===t?e.extend({},p):r===t?p[n]:(p[n]=r,'preferredFormat'===n&&(Oe=p.preferredFormat),void Se())},enable:function(){J=!1,Y.attr('disabled',!1),me.removeClass('sp-disabled')},disable:qe,offset:function(e){p.offset=e,$e()},set:function(e){ze(e),We()},get:Ve,destroy:function(){Y.show(),me.unbind('click.spectrum touchstart.spectrum'),X.remove(),ve.remove(),r[Ke.id]=null},container:X};return Ke.id=r.push(Ke)-1,Ke}function P(){}function _(e){e.stopPropagation()}function T(e,t){var n=Array.prototype.slice,r=n.call(arguments,2);return function(){return e.apply(t,r.concat(n.call(arguments)))}}function A(t,n,r,o){n=n||function(){},r=r||function(){},o=o||function(){};var a=document,s=!1,l={},c=0,u=0,f='ontouchstart'in window,d={};function h(e){e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),e.returnValue=!1}function p(e){if(s){if(i&&a.documentMode<9&&!e.button)return g();var r=e&&e.touches&&e.touches[0],o=r&&r.pageX||e.pageX,d=r&&r.pageY||e.pageY,p=Math.max(0,Math.min(o-l.left,u)),v=Math.max(0,Math.min(d-l.top,c));f&&h(e),n.apply(t,[p,v,e])}}function g(){s&&(e(a).unbind(d),e(a.body).removeClass('sp-dragging'),setTimeout((function(){o.apply(t,arguments)}),0)),s=!1}d['selectstart']=h,d['dragstart']=h,d['touchmove mousemove']=p,d['touchend mouseup']=g,e(t).bind('touchstart mousedown',(function(n){var i=n.which?3==n.which:2==n.button;i||s||!1!==r.apply(t,arguments)&&(s=!0,c=e(t).height(),u=e(t).width(),l=e(t).offset(),e(a).bind(d),e(a.body).addClass('sp-dragging'),p(n),h(n))}))}function M(){return e.fn.spectrum.inputTypeColorSupport()}function D(e,t,n){e=X(e,255),t=X(t,255),n=X(n,255);var r,i,o=m(e,t,n),a=v(e,t,n),s=(o+a)/2;if(o==a)r=i=0;else{var l=o-a;switch(i=s>.5?l/(2-o-a):l/(o+a),o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,l:s}}function L(e,t,n){e=X(e,255),t=X(t,255),n=X(n,255);var r,i,o=m(e,t,n),a=v(e,t,n),s=o,l=o-a;if(i=0===o?0:l/o,o==a)r=0;else{switch(o){case e:r=(t-n)/l+(t<n?6:0);break;case t:r=(n-e)/l+2;break;case n:r=(e-t)/l+4}r/=6}return{h:r,s:i,v:s}}function N(e,t,n,r){var i=[ee(g(e).toString(16)),ee(g(t).toString(16)),ee(g(n).toString(16))];return r&&i[0].charAt(0)==i[0].charAt(1)&&i[1].charAt(0)==i[1].charAt(1)&&i[2].charAt(0)==i[2].charAt(1)?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join('')}function R(e,t,n,r){var i;return[ee((i=r,Math.round(255*parseFloat(i)).toString(16))),ee(g(e).toString(16)),ee(g(t).toString(16)),ee(g(n).toString(16))].join('')}function F(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s-=t/100,n.s=Q(n.s),b(n)}function I(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.s+=t/100,n.s=Q(n.s),b(n)}function z(e){return b(e).desaturate(100)}function V(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l+=t/100,n.l=Q(n.l),b(n)}function B(e,t){t=0===t?0:t||10;var n=b(e).toRgb();return n.r=m(0,v(255,n.r-g(255*(-t/100)))),n.g=m(0,v(255,n.g-g(255*(-t/100)))),n.b=m(0,v(255,n.b-g(255*(-t/100)))),b(n)}function U(e,t){t=0===t?0:t||10;var n=b(e).toHsl();return n.l-=t/100,n.l=Q(n.l),b(n)}function H(e,t){var n=b(e).toHsl(),r=(g(n.h)+t)%360;return n.h=r<0?360+r:r,b(n)}function W(e){var t=b(e).toHsl();return t.h=(t.h+180)%360,b(t)}function $(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+120)%360,s:t.s,l:t.l}),b({h:(n+240)%360,s:t.s,l:t.l})]}function q(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+90)%360,s:t.s,l:t.l}),b({h:(n+180)%360,s:t.s,l:t.l}),b({h:(n+270)%360,s:t.s,l:t.l})]}function K(e){var t=b(e).toHsl(),n=t.h;return[b(e),b({h:(n+72)%360,s:t.s,l:t.l}),b({h:(n+216)%360,s:t.s,l:t.l})]}function G(e,t,n){t=t||6,n=n||30;var r=b(e).toHsl(),i=360/n,o=[b(e)];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(b(r));return o}function Y(e,t){t=t||6;for(var n=b(e).toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(b({h:r,s:i,v:o})),o=(o+s)%1;return a}function J(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function X(e,t){(function(e){return'string'==typeof e&&-1!=e.indexOf('.')&&1===parseFloat(e)})(e)&&(e='100%');var n=function(e){return'string'==typeof e&&-1!=e.indexOf('%')}(e);return e=v(t,m(0,parseFloat(e))),n&&(e=parseInt(e*t,10)/100),p.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function Q(e){return v(1,m(0,e))}function Z(e){return parseInt(e,16)}function ee(e){return 1==e.length?'0'+e:''+e}function te(e){return e<=1&&(e=100*e+'%'),e}}(p);var g=function(e){var t='name'===e.getFormat()&&e.toName(),n=1==e.getAlpha()?e.toHexString():e.toRgbString();return t||n.replace(/ /g,'')};t["a"]=f["a"].extend({template:function(){var e=this.ppfx;return"\n      <div class=\"".concat(this.holderClass(),"\"></div>\n      <div class=\"").concat(e,"field-colorp\">\n        <div class=\"").concat(e,"field-colorp-c\" data-colorp-c>\n          <div class=\"").concat(e,"checker-bg\"></div>\n        </div>\n      </div>\n    ")},inputClass:function(){var e=this.ppfx;return"".concat(e,"field ").concat(e,"field-color")},holderClass:function(){return"".concat(this.ppfx,"input-holder")},remove:function(){f["a"].prototype.remove.apply(this,arguments),this.colorEl.spectrum('destroy')},handleChange:function(e){e.stopPropagation();var t=e.target.value;Object(s["isUndefined"])(t)||this.__onInputChange(t)},__onInputChange:function(e){var t=this.model,n=this.opts.onChange,r=e,i=this.getColorEl();if(i){i.spectrum('set',r);var o=i.spectrum('get'),a=r&&g(o);a&&(r=a)}n?n(r):t.set({value:r},{fromInput:1})},setValue:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=Object(s["isUndefined"])(t.def)?n.get('defaults'):t.def,i=Object(s["isUndefined"])(e)?Object(s["isUndefined"])(r)?'':r:e,o=this.getInputEl(),a=this.getColorEl(),l='none'!=i?i:'';o.value=i,a.get(0).style.backgroundColor=l,(t.fromTarget||t.fromInput&&!t.avoidStore)&&(a.spectrum('set',l),this.noneColor='none'==i)},getColorEl:function(){if(!this.colorEl){var e,t=this.em,n=this.model,r=this.opts,i=this,o=this.ppfx,a=r.onChange,s=p("<div class=\"".concat(this.ppfx,"field-color-picker\"></div>")),l=s.get(0).style,c=t&&t.config?t.config.el:'',u=t&&t.getConfig&&t.getConfig('colorPicker')||{},f=0;this.$el.find("[data-colorp-c]").append(s),s.spectrum(h(h(h({color:n.getValue()||!1,containerClassName:"".concat(o,"one-bg ").concat(o,"two-color"),appendTo:c||'body',maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:'Ok',cancelText:'⨯',palette:[]},u),n.get('colorPicker')||{}),{},{move:function(e){var t=g(e);l.backgroundColor=t,a?a(t,!0):n.setValueFromInput(t,0)},change:function(e){f=1;var t=g(e);l.backgroundColor=t,a?a(t):(n.setValueFromInput(0,0),n.setValueFromInput(t)),i.noneColor=0},show:function(t){f=0,e=a?n.getValue({noDefault:!0}):g(t)},hide:function(t){f||!e&&!a||(i.noneColor&&(e=''),l.backgroundColor=e,s.spectrum('set',e),a?a(e,!0):n.setValueFromInput(e,0))}})),t&&t.on&&this.listenTo(t,'component:selected',(function(){f=1,s.spectrum('hide')})),this.colorEl=s}return this.colorEl},render:function(){return f["a"].prototype.render.call(this),this.getColorEl(),this}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return _}));var r=n(3),i=n.n(r),o=n(8),a=n.n(o),s=n(9),l=n.n(s),c=n(10),u=n.n(c),f=n(11),d=n.n(f),h=n(5),p=n.n(h),g=n(0),v=n(4),m=n(14),y=n.n(m),b=n(1);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}var k='__aw',C='__ah',S=function(e){u()(n,e);var t=x(n);function n(){return a()(this,n),t.apply(this,arguments)}return l()(n,[{key:"defaults",value:function(){return{x:0,y:0,changesCount:0,attributes:{},width:null,height:null,head:[],component:'',styles:'',_undo:!0,_undoexc:['changesCount']}}},{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.config,r=n.em,i=this.attributes,o=i.styles,a=i.component,s=r.get('DomComponents'),l=s.getConfig(),c=r.get('CssComposer').getAll(),u={};this.em=r;var f={em:r,config:l,frame:this,idMap:u};if(!Object(b["isComponent"])(a)){var d=Object(b["isObject"])(a)?a:{components:a};!d.type&&(d.type='wrapper');var h=s.getType('wrapper').model;this.set('component',new h(d,f))}if(o){if(!Object(b["isObject"])(o)){var p=Object.keys(u);p.length&&Array.isArray(o)&&o.forEach((function(e){var t=e.selectors;if(t&&1==t.length){var n=t[0],r=n.name&&2===n.type&&n;if(r&&u[r.name])r.name=u[r.name];else if(Object(g["isString"])(n)&&'#'===n[0]){var i=n.substring(1);i&&u[i]&&(t[0]="#".concat(u[i]))}}})),c.add(o),this.set('styles',c)}}else this.set('styles',c);!e.width&&this.set(k,1),!e.height&&this.set(C,1)}},{key:"onRemove",value:function(){this.getComponent().remove({root:1})}},{key:"changesUp",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};e.temporary||e.noCount||e.avoidStore||this.set('changesCount',this.get('changesCount')+1)}},{key:"getComponent",value:function(){return this.get('component')}},{key:"getStyles",value:function(){return this.get('styles')}},{key:"disable",value:function(){this.trigger('disable')}},{key:"remove",value:function(){this.view=0;var e=this.collection;return e&&e.remove(this)}},{key:"getHead",value:function(){var e=this.get('head')||[];return y()(e)}},{key:"setHead",value:function(e){return this.set('head',y()(e))}},{key:"addHeadItem",value:function(e){var t=this.getHead();t.push(e),this.setHead(t)}},{key:"getHeadByAttr",value:function(e,t,n){return this.getHead().filter((function(r){return r.attributes&&r.attributes[e]==t&&(!n||n===r.tag)}))[0]}},{key:"removeHeadByAttr",value:function(e,t,n){var r=this.getHead(),i=this.getHeadByAttr(e,t,n),o=r.indexOf(i);o>=0&&(r.splice(o,1),this.setHead(r))}},{key:"addLink",value:function(e){var t='link';!this.getHeadByAttr('href',e,t)&&this.addHeadItem({tag:t,attributes:{href:e,rel:'stylesheet'}})}},{key:"removeLink",value:function(e){this.removeHeadByAttr('href',e,'link')}},{key:"addScript",value:function(e){var t='script';!this.getHeadByAttr('src',e,t)&&this.addHeadItem({tag:t,attributes:{src:e}})}},{key:"removeScript",value:function(e){this.removeHeadByAttr('src',e,'script')}},{key:"getPage",value:function(){var e=this.collection;return e&&e.page}},{key:"_emitUpdated",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.em.trigger('frame:updated',O({frame:this},e))}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=v["Model"].prototype.toJSON.call(this,e),n=this.em,r=n&&n.get('StorageManager'),i=r&&r.getConfig(),o=Object(g["result"])(this,'defaults');if(i&&!e.fromUndo){var a={component:this.getComponent()};i.storeHtml&&(t.html=n.getHtml(a)),i.storeCss&&(t.css=n.getCss(a))}return e.fromUndo&&delete t.component,delete t.styles,delete t.changesCount,t[k]&&delete t.width,t[C]&&delete t.height,Object(g["forEach"])(t,(function(e,n){0===n.indexOf('_')&&delete t[n]})),Object(g["forEach"])(o,(function(e,n){t[n]===e&&delete t[n]})),Object(g["forEach"])(['attributes','head'],(function(e){Object(g["isEmpty"])(t[e])&&delete t[e]})),t}}]),n}(v["Model"]);function j(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function E(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?j(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):j(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function P(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=p()(e);if(t){var i=p()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return d()(this,n)}}var _=function(e){u()(n,e);var t=P(n);function n(){return a()(this,n),t.apply(this,arguments)}return l()(n,[{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(g["bindAll"])(this,'itemLoaded'),this.config=t,this.on('reset',this.onReset),this.on('remove',this.onRemove)}},{key:"onReset",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.previousModels||[];r.map((function(e){return t.onRemove(e)}))}},{key:"onRemove",value:function(e){e&&e.onRemove()}},{key:"itemLoaded",value:function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger('loaded:all'),this.listenToLoadItems(0))}},{key:"listenToLoad",value:function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(1)}},{key:"listenToLoadItems",value:function(e){var t=this;this.forEach((function(n){return n[e?'on':'off']('loaded',t.itemLoaded)}))}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config;return v["Collection"].prototype.add.call(this,e,E(E({},t),{},{config:n}))}}]),n}(v["Collection"]);_.prototype.model=S},function(e,t,n){"use strict";(function(e){var r=n(22),i=n.n(r),o=n(159),a=n(160),s=setTimeout;function l(e){return Boolean(e&&void 0!==e.length)}function c(){}function u(e){if(!(this instanceof u))throw new TypeError('Promises must be constructed via new');if('function'!=typeof e)throw new TypeError('not a function');this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],v(e,this)}function f(e,t){for(;3===e._state;)e=e._value;0!==e._state?(e._handled=!0,u._immediateFn((function(){var n=1===e._state?t.onFulfilled:t.onRejected;if(null!==n){var r;try{r=n(e._value)}catch(e){return void h(t.promise,e)}d(t.promise,r)}else(1===e._state?d:h)(t.promise,e._value)}))):e._deferreds.push(t)}function d(e,t){try{if(t===e)throw new TypeError('A promise cannot be resolved with itself.');if(t&&('object'===i()(t)||'function'==typeof t)){var n=t.then;if(t instanceof u)return e._state=3,e._value=t,void p(e);if('function'==typeof n)return void v((r=n,o=t,function(){r.apply(o,arguments)}),e)}e._state=1,e._value=t,p(e)}catch(t){h(e,t)}var r,o}function h(e,t){e._state=2,e._value=t,p(e)}function p(e){2===e._state&&0===e._deferreds.length&&u._immediateFn((function(){e._handled||u._unhandledRejectionFn(e._value)}));for(var t=0,n=e._deferreds.length;t<n;t++)f(e,e._deferreds[t]);e._deferreds=null}function g(e,t,n){this.onFulfilled='function'==typeof e?e:null,this.onRejected='function'==typeof t?t:null,this.promise=n}function v(e,t){var n=!1;try{e((function(e){n||(n=!0,d(t,e))}),(function(e){n||(n=!0,h(t,e))}))}catch(e){if(n)return;n=!0,h(t,e)}}u.prototype['catch']=function(e){return this.then(null,e)},u.prototype.then=function(e,t){var n=new this.constructor(c);return f(this,new g(e,t,n)),n},u.prototype['finally']=o["a"],u.all=function(e){return new u((function(t,n){if(!l(e))return n(new TypeError('Promise.all accepts an array'));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function a(e,s){try{if(s&&('object'===i()(s)||'function'==typeof s)){var l=s.then;if('function'==typeof l)return void l.call(s,(function(t){a(e,t)}),n)}r[e]=s,0==--o&&t(r)}catch(e){n(e)}}for(var s=0;s<r.length;s++)a(s,r[s])}))},u.allSettled=a["a"],u.resolve=function(e){return e&&'object'===i()(e)&&e.constructor===u?e:new u((function(t){t(e)}))},u.reject=function(e){return new u((function(t,n){n(e)}))},u.race=function(e){return new u((function(t,n){if(!l(e))return n(new TypeError('Promise.race accepts an array'));for(var r=0,i=e.length;r<i;r++)u.resolve(e[r]).then(t,n)}))},u._immediateFn='function'==typeof e&&function(t){e(t)}||function(e){s(e,0)},u._unhandledRejectionFn=function(e){'undefined'!=typeof console&&console&&console.warn('Possible Unhandled Promise Rejection:',e)},t["a"]=u}).call(this,n(130).setImmediate)},function(e,t,n){"use strict";(function(t){var r=n(37).EventEmitter,i=n(21),o=n(50),a=n(70),s=n(43);function l(e,t,n){var i=this;r.call(this),setTimeout((function(){i._start(e,t,n)}),0)}i(l,r),l.prototype._start=function(e,n,r){var i=this,a=new t.XDomainRequest;n=s.addQuery(n,'t='+ +new Date),a.onerror=function(){i._error()},a.ontimeout=function(){i._error()},a.onprogress=function(){a.responseText,i.emit('chunk',200,a.responseText)},a.onload=function(){i.emit('finish',200,a.responseText),i._cleanup(!1)},this.xdr=a,this.unloadRef=o.unloadAdd((function(){i._cleanup(!0)}));try{this.xdr.open(e,n),this.timeout&&(this.xdr.timeout=this.timeout),this.xdr.send(r)}catch(e){this._error()}},l.prototype._error=function(){this.emit('finish',0,''),this._cleanup(!1)},l.prototype._cleanup=function(e){if(this.xdr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xdr.ontimeout=this.xdr.onerror=this.xdr.onprogress=this.xdr.onload=null,e)try{this.xdr.abort()}catch(e){}this.unloadRef=this.xdr=null}},l.prototype.close=function(){this._cleanup(!0)},l.enabled=!(!t.XDomainRequest||!a.hasDomain()),e.exports=l}).call(this,n(23))},function(e,t,n){"use strict";(function(t){var r=n(21),i=n(114),o=n(95);e.exports=function(e){function n(t,n){i.call(this,e.transportName,t,n)}return r(n,i),n.enabled=function(n,r){if(!t.document)return!1;var a=o.extend({},r);return a.sameOrigin=!0,e.enabled(a)&&i.enabled()},n.transportName='iframe-'+e.transportName,n.needBody=!0,n.roundTrips=i.roundTrips+e.roundTrips-1,n.facadeTransport=e,n}}).call(this,n(23))},function(e,t,n){"use strict";e.exports={isObject:function(e){var t=typeof e;return'function'===t||'object'===t&&!!e},extend:function(e){if(!this.isObject(e))return e;for(var t,n,r=1,i=arguments.length;r<i;r++)for(n in t=arguments[r])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e}}},function(e,t,n){"use strict";function r(e){this.type=e}r.prototype.initEvent=function(e,t,n){return this.type=e,this.bubbles=t,this.cancelable=n,this.timeStamp=+new Date,this},r.prototype.stopPropagation=function(){},r.prototype.preventDefault=function(){},r.CAPTURING_PHASE=1,r.AT_TARGET=2,r.BUBBLING_PHASE=3,e.exports=r},function(e,t,n){"use strict";(function(t){var r=n(31),i=n(210),o=n(60),a=n(123),s=n(124),l={'Content-Type':'application/x-www-form-urlencoded'};function c(e,t){!r.isUndefined(e)&&r.isUndefined(e['Content-Type'])&&(e['Content-Type']=t)}var u,f={transitional:a,adapter:(('undefined'!=typeof XMLHttpRequest||void 0!==t&&'[object process]'===Object.prototype.toString.call(t))&&(u=n(125)),u),transformRequest:[function(e,t){if(i(t,'Accept'),i(t,'Content-Type'),r.isFormData(e)||r.isArrayBuffer(e)||r.isBuffer(e)||r.isStream(e)||r.isFile(e)||r.isBlob(e))return e;if(r.isArrayBufferView(e))return e.buffer;if(r.isURLSearchParams(e))return c(t,'application/x-www-form-urlencoded;charset=utf-8'),e.toString();var n,o=r.isObject(e),a=t&&t['Content-Type'];if((n=r.isFileList(e))||o&&'multipart/form-data'===a){var l=this.env&&this.env.FormData;return s(n?{'files[]':e}:e,l&&new l)}return o||'application/json'===a?(c(t,'application/json'),function(e,t,n){if(r.isString(e))try{return(t||JSON.parse)(e),r.trim(e)}catch(e){if('SyntaxError'!==e.name)throw e}return(n||JSON.stringify)(e)}(e)):e}],transformResponse:[function(e){var t=this.transitional||f.transitional,n=t&&t.silentJSONParsing,i=t&&t.forcedJSONParsing,a=!n&&'json'===this.responseType;if(a||i&&r.isString(e)&&e.length)try{return JSON.parse(e)}catch(e){if(a){if('SyntaxError'===e.name)throw o.from(e,o.ERR_BAD_RESPONSE,this,null,this.response);throw e}}return e}],timeout:0,xsrfCookieName:'XSRF-TOKEN',xsrfHeaderName:'X-XSRF-TOKEN',maxContentLength:-1,maxBodyLength:-1,env:{FormData:n(222)},validateStatus:function(e){return e>=200&&e<300},headers:{common:{Accept:'application/json, text/plain, */*'}}};r.forEach(['delete','get','head'],(function(e){f.headers[e]={}})),r.forEach(['post','put','patch'],(function(e){f.headers[e]=r.merge(l)})),e.exports=f}).call(this,n(98))},function(e,t){var n,r,i=e.exports={};function o(){throw new Error('setTimeout has not been defined')}function a(){throw new Error('clearTimeout has not been defined')}function s(e){if(n===setTimeout)return setTimeout(e,0);if((n===o||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n='function'==typeof setTimeout?setTimeout:o}catch(e){n=o}try{r='function'==typeof clearTimeout?clearTimeout:a}catch(e){r=a}}();var l,c=[],u=!1,f=-1;function d(){u&&l&&(u=!1,l.length?c=l.concat(c):f=-1,c.length&&h())}function h(){if(!u){var e=s(d);u=!0;for(var t=c.length;t;){for(l=c,c=[];++f<t;)l&&l[f].run();f=-1,t=c.length}l=null,u=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function p(e,t){this.fun=e,this.array=t}function g(){}i.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];c.push(new p(e,t)),1!==c.length||u||s(h)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title='browser',i.browser=!0,i.env={},i.argv=[],i.version='',i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(e){return[]},i.binding=function(e){throw new Error('process.binding is not supported')},i.cwd=function(){return'/'},i.chdir=function(e){throw new Error('process.chdir is not supported')},i.umask=function(){return 0}},function(e,t,n){"use strict";n.r(t),n.d(t,"evAll",(function(){return _})),n.d(t,"evPfx",(function(){return T})),n.d(t,"evPageSelect",(function(){return A})),n.d(t,"evPageSelectBefore",(function(){return M})),n.d(t,"evPageUpdate",(function(){return D})),n.d(t,"evPageAdd",(function(){return L})),n.d(t,"evPageAddBefore",(function(){return N})),n.d(t,"evPageRemove",(function(){return R})),n.d(t,"evPageRemoveBefore",(function(){return F}));var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(0),l=n(1),c=n(4),u=n(8),f=n.n(u),d=n(9),h=n.n(d),p=n(10),g=n.n(p),v=n(11),m=n.n(v),y=n(5),b=n.n(y),w=n(91);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var x=function(e){g()(n,e);var t=O(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"defaults",value:function(){return{frames:[],_undo:!0}}},{key:"initialize",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.config,i=void 0===r?{}:r,o=i.em,a={};this.em=o,e.frames||(a.component=e.component,a.styles=e.styles,['component','styles'].map((function(e){return t.unset(e)})));var s=e.frames||[a],l=new w["a"](s,i);l.page=this,this.set('frames',l);var c=o&&o.get('UndoManager');c&&c.add(l)}},{key:"onRemove",value:function(){this.get('frames').reset()}},{key:"getFrames",value:function(){return this.get('frames')}},{key:"getId",value:function(){return this.id}},{key:"getName",value:function(){return this.get('name')}},{key:"setName",value:function(e){return this.get({name:e})}},{key:"getAllFrames",value:function(){return this.getFrames().models||[]}},{key:"getMainFrame",value:function(){return this.getFrames().at(0)}},{key:"getMainComponent",value:function(){var e=this.getMainFrame();return e&&e.getComponent()}},{key:"toJSON",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=c["Model"].prototype.toJSON.call(this,e),n=Object(s["result"])(this,'defaults');return Object(s["forEach"])(t,(function(e,n){0===n.indexOf('_')&&delete t[n]})),Object(s["forEach"])(n,(function(e,n){t[n]===e&&delete t[n]})),t}}]),n}(c["Model"]);function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var j=function(e){g()(n,e);var t=S(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=t,this.on('reset',this.onReset),this.on('remove',this.onRemove)}},{key:"onReset",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.previousModels||[];r.map((function(e){return t.onRemove(e)}))}},{key:"onRemove",value:function(e){e&&e.onRemove()}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config;return c["Collection"].prototype.add.call(this,e,C(C({},t),{},{config:n}))}}]),n}(c["Collection"]);function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}j.prototype.model=x;var _='page',T="".concat(_,":"),A="".concat(T,"select"),M="".concat(A,":before"),D="".concat(T,"update"),L="".concat(T,"add"),N="".concat(L,":before"),R="".concat(T,"remove"),F="".concat(R,":before"),I='change:selected',z='main';t["default"]=function(){return{name:'PageManager',storageKey:'pages',Page:x,Pages:j,events:{all:_,select:A,selectBefore:M,update:D,add:L,addBefore:N,remove:R,removeBefore:F},init:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s["bindAll"])(this,'_onPageChange');var n=t.em,r=P({},t);this.config=r,this.em=n;var i=new j([],r);this.pages=i;var o=new c["Model"]({_undo:!0});return this.model=o,i.on('add',(function(e,t,r){return n.trigger(L,e,r)})),i.on('remove',(function(e,t,r){return n.trigger(R,e,r)})),i.on('change',(function(e,t){n.trigger(D,e,e.changedAttributes(),t)})),i.on('reset',(function(t){return t.at(0)&&e.select(t.at(0))})),i.on('all',this.__onChange,this),o.on(I,this._onPageChange),this},__onChange:function(e,t,n,r){var i=r||n;this.em.trigger(_,{event:e,page:t,options:i})},onLoad:function(){var e=this.pages,t={silent:!0};e.add(this.config.pages||[],t);var n=e.length?this.getMain():this.add({type:z},t);this.select(n,t)},_onPageChange:function(e,t,n){var r=this.em,i=r.get('LayerManager'),o=t.getMainComponent();i&&o&&i.setRoot(o),r.trigger(A,t,e.previous('selected')),this.__onChange(I,t,n)},postLoad:function(){var e=this.em,t=this.model,n=e.get('UndoManager');n&&n.add(t),n&&n.add(this.pages)},add:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em;e.id=e.id||this._createId();var i=function(){var r=t.pages.add(e,n);return n.select&&t.select(r),r};return!n.silent&&r.trigger(N,e,i,n),!n.abort&&i()},remove:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=Object(s["isString"])(e)?this.get(e):e,o=function(){return i&&t.pages.remove(i,n),i};return!n.silent&&r.trigger(F,i,o,n),!n.abort&&o()},get:function(e){return this.pages.filter((function(t){return t.get('id')===e}))[0]},getMain:function(){var e=this.pages;return e.filter((function(e){return e.get('type')===z}))[0]||e.at(0)},getAll:function(){return i()(this.pages.models)},getAllWrappers:function(){var e=this.getAll();return Object(s["unique"])(Object(s["flatten"])(e.map((function(e){return e.getAllFrames().map((function(e){return e.getComponent()}))}))))},getAllMap:function(){return this.getAll().reduce((function(e,t){return e[t.get('id')]=t,e}),{})},select:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(s["isString"])(e)?this.get(e):e;return n&&(this.em.trigger(M,n,t),this.model.set('selected',n,t)),this},getSelected:function(){return this.model.get('selected')},destroy:function(){var e=this;this.pages.off().reset(),this.model.stopListening(),this.model.clear({silent:!0}),['selected','config','em','pages','model'].map((function(t){return e[t]=0}))},store:function(e){if(!this.em.get('hasPages'))return{};var t={},n=this.config;return t[this.storageKey]=JSON.stringify(this.getAll()),!e&&n.stm&&n.stm.store(t),t},load:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.storageKey,n=e[t]||[];if('string'==typeof n)try{n=JSON.parse(e[t])}catch(e){}return n&&n.length&&this.pages.reset(n),n},_createId:function(){var e,t=this.getAll().length+16,n=this.getAllMap();do{e=Object(l["createId"])(t)}while(n[e]);return e}}}},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r),o=i.a.Model.extend({defaults:{id:'',label:'',tagName:'span',className:'',command:'',context:'',buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1},initialize:function(e){if(this.get('buttons').length){var t=n(100).default;this.set('buttons',new t(this.get('buttons')))}}});t["default"]=i.a.Collection.extend({model:o,deactivateAllExceptOne:function(e,t){this.forEach((function(n,r){n!==e&&(n.set('active',!1),t&&n.get('buttons').length&&n.get('buttons').deactivateAllExceptOne(e,t))}))},deactivateAll:function(e,t){var n=e||'';this.forEach((function(e){e.get('context')==n&&e!==t&&e.set('active',!1,{fromCollection:1})}))},disableAllButtons:function(e){var t=e||'';this.forEach((function(e,n){e.get('context')==t&&e.set('disable',!0)}))},disableAllButtonsExceptOne:function(e,t){this.forEach((function(n,r){n!==e&&(n.set('disable',!0),t&&n.get('buttons').length&&n.get('buttons').disableAllButtonsExceptOne(e,t))}))}})},function(e,t,n){"use strict";n.d(t,"a",(function(){return o})),n.d(t,"b",(function(){return a}));var r=n(24),i=n(84);n(85);function o(e,t){'function'==typeof e?e(t):'object'===Object(r["a"])(e)&&e&&'current'in e&&(e.current=t)}function a(e){var t,n,r=Object(i["isMemo"])(e)?e.type.type:e.type;return!('function'==typeof r&&!(null===(t=r.prototype)||void 0===t?void 0:t.render))&&!('function'==typeof e&&!(null===(n=e.prototype)||void 0===n?void 0:n.render))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return l}));var r=function(e){return+setTimeout(e,16)},i=function(e){return clearTimeout(e)};'undefined'!=typeof window&&'requestAnimationFrame'in window&&(r=function(e){return window.requestAnimationFrame(e)},i=function(e){return window.cancelAnimationFrame(e)});var o=0,a=new Map;function s(e){a.delete(e)}function l(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=o+=1;function i(t){if(0===t)s(n),e();else{var o=r((function(){i(t-1)}));a.set(n,o)}}return i(t),n}l.cancel=function(e){var t=a.get(e);return s(t),i(t)}},function(e,t){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){var r=n(103);e.exports=function(e,t){if(e){if("string"==typeof e)return r(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?r(e,t):void 0}},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){(function(){var e,n,r,i,o={}.hasOwnProperty,a=[].slice;e={LF:'\n',NULL:'\0'},r=function(){var t;function n(e,t,n){this.command=e,this.headers=null!=t?t:{},this.body=null!=n?n:''}return n.prototype.toString=function(){var t,r,i,a,s;for(r in t=[this.command],(i=!1===this.headers['content-length'])&&delete this.headers['content-length'],s=this.headers)o.call(s,r)&&(a=s[r],t.push(r+":"+a));return this.body&&!i&&t.push("content-length:"+n.sizeOfUTF8(this.body)),t.push(e.LF+this.body),t.join(e.LF)},n.sizeOfUTF8=function(e){return e?encodeURI(e).match(/%..|./g).length:0},t=function(t){var r,i,o,a,s,l,c,u,f,d,h,p,g,v,m,y,b;for(a=t.search(RegExp(""+e.LF+e.LF)),o=(s=t.substring(0,a).split(e.LF)).shift(),l={},p=function(e){return e.replace(/^\s+|\s+$/g,'')},g=0,m=(y=s.reverse()).length;g<m;g++)u=(d=y[g]).indexOf(':'),l[p(d.substring(0,u))]=p(d.substring(u+1));if(r='',h=a+2,l['content-length'])f=parseInt(l['content-length']),r=(''+t).substring(h,h+f);else for(i=null,c=v=h,b=t.length;(h<=b?v<b:v>b)&&(i=t.charAt(c))!==e.NULL;c=h<=b?++v:--v)r+=i;return new n(o,l,r)},n.unmarshall=function(n){var r;return function(){var i,o,a,s;for(s=[],i=0,o=(a=n.split(RegExp(""+e.NULL+e.LF+"*"))).length;i<o;i++)(null!=(r=a[i])?r.length:void 0)>0&&s.push(t(r));return s}()},n.marshall=function(t,r,i){return new n(t,r,i).toString()+e.NULL},n}(),n=function(){var t;function n(e){this.ws=e,this.ws.binaryType="arraybuffer",this.counter=0,this.connected=!1,this.heartbeat={outgoing:1e4,incoming:1e4},this.maxWebSocketFrameSize=16*1024,this.subscriptions={}}return n.prototype.debug=function(e){var t;return"undefined"!=typeof window&&null!==window&&null!=(t=window.console)?t.log(e):void 0},t=function(){return Date.now?Date.now():(new Date).valueOf},n.prototype._transmit=function(e,t,n){var i;for(i=r.marshall(e,t,n),"function"==typeof this.debug&&this.debug(">>> "+i);1;){if(!(i.length>this.maxWebSocketFrameSize))return this.ws.send(i);this.ws.send(i.substring(0,this.maxWebSocketFrameSize)),i=i.substring(this.maxWebSocketFrameSize),"function"==typeof this.debug&&this.debug("remaining = "+i.length)}},n.prototype._setupHeartbeat=function(n){var r,o,a,s,l,c,u;if((l=n.version)===i.VERSIONS.V1_1||l===i.VERSIONS.V1_2)return o=(c=function(){var e,t,r,i;for(i=[],e=0,t=(r=n['heart-beat'].split(",")).length;e<t;e++)s=r[e],i.push(parseInt(s));return i}())[0],r=c[1],0!==this.heartbeat.outgoing&&0!==r&&(a=Math.max(this.heartbeat.outgoing,r),"function"==typeof this.debug&&this.debug("send PING every "+a+"ms"),this.pinger=i.setInterval(a,(u=this,function(){return u.ws.send(e.LF),"function"==typeof u.debug?u.debug(">>> PING"):void 0}))),0!==this.heartbeat.incoming&&0!==o?(a=Math.max(this.heartbeat.incoming,o),"function"==typeof this.debug&&this.debug("check PONG every "+a+"ms"),this.ponger=i.setInterval(a,function(e){return function(){var n;if((n=t()-e.serverActivity)>2*a)return"function"==typeof e.debug&&e.debug("did not receive server activity for the last "+n+"ms"),e.ws.close()}}(this))):void 0},n.prototype._parseConnect=function(){var e,t,n,r;switch(r={},(e=1<=arguments.length?a.call(arguments,0):[]).length){case 2:r=e[0],t=e[1];break;case 3:e[1]instanceof Function?(r=e[0],t=e[1],n=e[2]):(r.login=e[0],r.passcode=e[1],t=e[2]);break;case 4:r.login=e[0],r.passcode=e[1],t=e[2],n=e[3];break;default:r.login=e[0],r.passcode=e[1],t=e[2],n=e[3],r.host=e[4]}return[r,t,n]},n.prototype.connect=function(){var n,o,s,l,c;return n=1<=arguments.length?a.call(arguments,0):[],l=this._parseConnect.apply(this,n),s=l[0],this.connectCallback=l[1],o=l[2],"function"==typeof this.debug&&this.debug("Opening Web Socket..."),this.ws.onmessage=(c=this,function(n){var i,a,s,l,u,f,d,h,p,g,v,m;if(l='undefined'!=typeof ArrayBuffer&&n.data instanceof ArrayBuffer?(i=new Uint8Array(n.data),"function"==typeof c.debug&&c.debug("--- got data length: "+i.length),function(){var e,t,n;for(n=[],e=0,t=i.length;e<t;e++)a=i[e],n.push(String.fromCharCode(a));return n}().join('')):n.data,c.serverActivity=t(),l!==e.LF){for("function"==typeof c.debug&&c.debug("<<< "+l),m=[],p=0,g=(v=r.unmarshall(l)).length;p<g;p++)switch((u=v[p]).command){case"CONNECTED":"function"==typeof c.debug&&c.debug("connected to server "+u.headers.server),c.connected=!0,c._setupHeartbeat(u.headers),m.push("function"==typeof c.connectCallback?c.connectCallback(u):void 0);break;case"MESSAGE":h=u.headers.subscription,(d=c.subscriptions[h]||c.onreceive)?(s=c,f=u.headers["message-id"],u.ack=function(e){return null==e&&(e={}),s.ack(f,h,e)},u.nack=function(e){return null==e&&(e={}),s.nack(f,h,e)},m.push(d(u))):m.push("function"==typeof c.debug?c.debug("Unhandled received MESSAGE: "+u):void 0);break;case"RECEIPT":m.push("function"==typeof c.onreceipt?c.onreceipt(u):void 0);break;case"ERROR":m.push("function"==typeof o?o(u):void 0);break;default:m.push("function"==typeof c.debug?c.debug("Unhandled frame: "+u):void 0)}return m}"function"==typeof c.debug&&c.debug("<<< PONG")}),this.ws.onclose=function(e){return function(){var t;return t="Whoops! Lost connection to "+e.ws.url,"function"==typeof e.debug&&e.debug(t),e._cleanUp(),"function"==typeof o?o(t):void 0}}(this),this.ws.onopen=function(e){return function(){return"function"==typeof e.debug&&e.debug('Web Socket Opened...'),s["accept-version"]=i.VERSIONS.supportedVersions(),s["heart-beat"]=[e.heartbeat.outgoing,e.heartbeat.incoming].join(','),e._transmit("CONNECT",s)}}(this)},n.prototype.disconnect=function(e,t){return null==t&&(t={}),this._transmit("DISCONNECT",t),this.ws.onclose=null,this.ws.close(),this._cleanUp(),"function"==typeof e?e():void 0},n.prototype._cleanUp=function(){if(this.connected=!1,this.pinger&&i.clearInterval(this.pinger),this.ponger)return i.clearInterval(this.ponger)},n.prototype.send=function(e,t,n){return null==t&&(t={}),null==n&&(n=''),t.destination=e,this._transmit("SEND",t,n)},n.prototype.subscribe=function(e,t,n){var r;return null==n&&(n={}),n.id||(n.id="sub-"+this.counter++),n.destination=e,this.subscriptions[n.id]=t,this._transmit("SUBSCRIBE",n),r=this,{id:n.id,unsubscribe:function(){return r.unsubscribe(n.id)}}},n.prototype.unsubscribe=function(e){return delete this.subscriptions[e],this._transmit("UNSUBSCRIBE",{id:e})},n.prototype.begin=function(e){var t,n;return n=e||"tx-"+this.counter++,this._transmit("BEGIN",{transaction:n}),t=this,{id:n,commit:function(){return t.commit(n)},abort:function(){return t.abort(n)}}},n.prototype.commit=function(e){return this._transmit("COMMIT",{transaction:e})},n.prototype.abort=function(e){return this._transmit("ABORT",{transaction:e})},n.prototype.ack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("ACK",n)},n.prototype.nack=function(e,t,n){return null==n&&(n={}),n["message-id"]=e,n.subscription=t,this._transmit("NACK",n)},n}(),i={VERSIONS:{V1_0:'1.0',V1_1:'1.1',V1_2:'1.2',supportedVersions:function(){return'1.1,1.0'}},client:function(e,t){var r;return null==t&&(t=['v10.stomp','v11.stomp']),r=new(i.WebSocketClass||WebSocket)(e,t),new n(r)},over:function(e){return new n(e)},Frame:r},1&&null!==t&&(t.Stomp=i),"undefined"!=typeof window&&null!==window?(i.setInterval=function(e,t){return window.setInterval(t,e)},i.clearInterval=function(e){return window.clearInterval(e)},window.Stomp=i):t||(self.Stomp=i)}).call(this)},function(e,t,n){(function(e){var t=n(106);for(k in t)e[k]=t[k]}).call(this,n(23))},function(e,t,n){"use strict";(function(t){var r=n(181),i=n(182),o=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,a=/[\n\r\t]/g,s=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,l=/:\d+$/,c=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,u=/^[a-zA-Z]:/;function f(e){return(e||'').toString().replace(o,'')}var d=[['#','hash'],['?','query'],function(e,t){return g(t.protocol)?e.replace(/\\/g,'/'):e},['/','pathname'],['@','auth',1],[NaN,'host',void 0,1,1],[/:(\d*)$/,'port',void 0,1],[NaN,'hostname',void 0,1,1]],h={hash:1,query:1};function p(e){var n,r=('undefined'!=typeof window?window:void 0!==t?t:'undefined'!=typeof self?self:{}).location||{},i={},o=typeof(e=e||r);if('blob:'===e.protocol)i=new m(unescape(e.pathname),{});else if('string'===o)for(n in i=new m(e,{}),h)delete i[n];else if('object'===o){for(n in e)n in h||(i[n]=e[n]);void 0===i.slashes&&(i.slashes=s.test(e.href))}return i}function g(e){return'file:'===e||'ftp:'===e||'http:'===e||'https:'===e||'ws:'===e||'wss:'===e}function v(e,t){e=(e=f(e)).replace(a,''),t=t||{};var n,r=c.exec(e),i=r[1]?r[1].toLowerCase():'',o=!!r[2],s=!!r[3],l=0;return o?s?(n=r[2]+r[3]+r[4],l=r[2].length+r[3].length):(n=r[2]+r[4],l=r[2].length):s?(n=r[3]+r[4],l=r[3].length):n=r[4],'file:'===i?l>=2&&(n=n.slice(2)):g(i)?n=r[4]:i?o&&(n=n.slice(2)):l>=2&&g(t.protocol)&&(n=r[4]),{protocol:i,slashes:o||g(i),slashesCount:l,rest:n}}function m(e,t,n){if(e=(e=f(e)).replace(a,''),!(this instanceof m))return new m(e,t,n);var o,s,l,c,h,y,b=d.slice(),w=typeof t,O=this,x=0;for('object'!==w&&'string'!==w&&(n=t,t=null),n&&'function'!=typeof n&&(n=i.parse),o=!(s=v(e||'',t=p(t))).protocol&&!s.slashes,O.slashes=s.slashes||o&&t.slashes,O.protocol=s.protocol||t.protocol||'',e=s.rest,('file:'===s.protocol&&(2!==s.slashesCount||u.test(e))||!s.slashes&&(s.protocol||s.slashesCount<2||!g(O.protocol)))&&(b[3]=[/(.*)/,'pathname']);x<b.length;x++)'function'!=typeof(c=b[x])?(l=c[0],y=c[1],l!=l?O[y]=e:'string'==typeof l?~(h='@'===l?e.lastIndexOf(l):e.indexOf(l))&&('number'==typeof c[2]?(O[y]=e.slice(0,h),e=e.slice(h+c[2])):(O[y]=e.slice(h),e=e.slice(0,h))):(h=l.exec(e))&&(O[y]=h[1],e=e.slice(0,h.index)),O[y]=O[y]||o&&c[3]&&t[y]||'',c[4]&&(O[y]=O[y].toLowerCase())):e=c(e,O);n&&(O.query=n(O.query)),o&&t.slashes&&'/'!==O.pathname.charAt(0)&&(''!==O.pathname||''!==t.pathname)&&(O.pathname=function(e,t){if(''===e)return t;for(var n=(t||'/').split('/').slice(0,-1).concat(e.split('/')),r=n.length,i=n[r-1],o=!1,a=0;r--;)'.'===n[r]?n.splice(r,1):'..'===n[r]?(n.splice(r,1),a++):a&&(0===r&&(o=!0),n.splice(r,1),a--);return o&&n.unshift(''),'.'!==i&&'..'!==i||n.push(''),n.join('/')}(O.pathname,t.pathname)),'/'!==O.pathname.charAt(0)&&g(O.protocol)&&(O.pathname='/'+O.pathname),r(O.port,O.protocol)||(O.host=O.hostname,O.port=''),O.username=O.password='',O.auth&&(~(h=O.auth.indexOf(':'))?(O.username=O.auth.slice(0,h),O.username=encodeURIComponent(decodeURIComponent(O.username)),O.password=O.auth.slice(h+1),O.password=encodeURIComponent(decodeURIComponent(O.password))):O.username=encodeURIComponent(decodeURIComponent(O.auth)),O.auth=O.password?O.username+':'+O.password:O.username),O.origin='file:'!==O.protocol&&g(O.protocol)&&O.host?O.protocol+'//'+O.host:'null',O.href=O.toString()}m.prototype={set:function(e,t,n){var o=this;switch(e){case'query':'string'==typeof t&&t.length&&(t=(n||i.parse)(t)),o[e]=t;break;case'port':o[e]=t,r(t,o.protocol)?t&&(o.host=o.hostname+':'+t):(o.host=o.hostname,o[e]='');break;case'hostname':o[e]=t,o.port&&(t+=':'+o.port),o.host=t;break;case'host':o[e]=t,l.test(t)?(t=t.split(':'),o.port=t.pop(),o.hostname=t.join(':')):(o.hostname=t,o.port='');break;case'protocol':o.protocol=t.toLowerCase(),o.slashes=!n;break;case'pathname':case'hash':if(t){var a='pathname'===e?'/':'#';o[e]=t.charAt(0)!==a?a+t:t}else o[e]=t;break;case'username':case'password':o[e]=encodeURIComponent(t);break;case'auth':var s=t.indexOf(':');~s?(o.username=t.slice(0,s),o.username=encodeURIComponent(decodeURIComponent(o.username)),o.password=t.slice(s+1),o.password=encodeURIComponent(decodeURIComponent(o.password))):o.username=encodeURIComponent(decodeURIComponent(t))}for(var c=0;c<d.length;c++){var u=d[c];u[4]&&(o[u[1]]=o[u[1]].toLowerCase())}return o.auth=o.password?o.username+':'+o.password:o.username,o.origin='file:'!==o.protocol&&g(o.protocol)&&o.host?o.protocol+'//'+o.host:'null',o.href=o.toString(),o},toString:function(e){e&&'function'==typeof e||(e=i.stringify);var t,n=this,r=n.host,o=n.protocol;o&&':'!==o.charAt(o.length-1)&&(o+=':');var a=o+(n.protocol&&n.slashes||g(n.protocol)?'//':'');return n.username?(a+=n.username,n.password&&(a+=':'+n.password),a+='@'):n.password?(a+=':'+n.password,a+='@'):'file:'!==n.protocol&&g(n.protocol)&&!r&&'/'!==n.pathname&&(a+='@'),(':'===r[r.length-1]||l.test(n.hostname)&&!n.port)&&(r+=':'),a+=r+n.pathname,(t='object'==typeof n.query?e(n.query):n.query)&&(a+='?'!==t.charAt(0)?'?'+t:t),n.hash&&(a+=n.hash),a}},m.extractProtocol=v,m.location=p,m.trimLeft=f,m.qs=i,e.exports=m}).call(this,n(23))},function(e,t,n){"use strict";function r(){this._listeners={}}r.prototype.addEventListener=function(e,t){e in this._listeners||(this._listeners[e]=[]);var n=this._listeners[e];-1===n.indexOf(t)&&(n=n.concat([t])),this._listeners[e]=n},r.prototype.removeEventListener=function(e,t){var n=this._listeners[e];if(n){var r=n.indexOf(t);-1===r||(n.length>1?this._listeners[e]=n.slice(0,r).concat(n.slice(r+1)):delete this._listeners[e])}},r.prototype.dispatchEvent=function(){var e=arguments[0],t=e.type,n=1===arguments.length?[e]:Array.apply(null,arguments);if(this['on'+t]&&this['on'+t].apply(this,n),t in this._listeners)for(var r=this._listeners[t],i=0;i<r.length;i++)r[i].apply(this,n)},e.exports=r},function(e,t,n){"use strict";var r=n(21),i=n(43),o=n(185),a=n(186);function s(e,t,n,r,s){var l=i.addPath(e,t),c=this;o.call(this,e,n),this.poll=new a(r,l,s),this.poll.on('message',(function(e){c.emit('message',e)})),this.poll.once('close',(function(e,t){c.poll=null,c.emit('close',e,t),c.close()}))}r(s,o),s.prototype.close=function(){o.prototype.close.call(this),this.removeAllListeners(),this.poll&&(this.poll.abort(),this.poll=null)},e.exports=s},function(e,t,n){"use strict";(function(t){var r=n(37).EventEmitter,i=n(21),o=n(50),a=n(43),s=t.XMLHttpRequest;function l(e,t,n,i){var o=this;r.call(this),setTimeout((function(){o._start(e,t,n,i)}),0)}i(l,r),l.prototype._start=function(e,t,n,r){var i=this;try{this.xhr=new s}catch(e){}if(!this.xhr)return this.emit('finish',0,'no xhr support'),void this._cleanup();t=a.addQuery(t,'t='+ +new Date),this.unloadRef=o.unloadAdd((function(){i._cleanup(!0)}));try{this.xhr.open(e,t,!0),this.timeout&&'timeout'in this.xhr&&(this.xhr.timeout=this.timeout,this.xhr.ontimeout=function(){i.emit('finish',0,''),i._cleanup(!1)})}catch(e){return this.emit('finish',0,''),void this._cleanup(!1)}if(r&&r.noCredentials||!l.supportsCORS||(this.xhr.withCredentials=!0),r&&r.headers)for(var c in r.headers)this.xhr.setRequestHeader(c,r.headers[c]);this.xhr.onreadystatechange=function(){if(i.xhr){var e,t,n=i.xhr;switch(n.readyState,n.readyState){case 3:try{t=n.status,e=n.responseText}catch(e){}1223===t&&(t=204),200===t&&e&&e.length>0&&i.emit('chunk',t,e);break;case 4:1223===(t=n.status)&&(t=204),12005!==t&&12029!==t||(t=0),n.responseText,i.emit('finish',t,n.responseText),i._cleanup(!1)}}};try{i.xhr.send(n)}catch(e){i.emit('finish',0,''),i._cleanup(!1)}},l.prototype._cleanup=function(e){if(this.xhr){if(this.removeAllListeners(),o.unloadDel(this.unloadRef),this.xhr.onreadystatechange=function(){},this.xhr.ontimeout&&(this.xhr.ontimeout=null),e)try{this.xhr.abort()}catch(e){}this.unloadRef=this.xhr=null}},l.prototype.close=function(){this._cleanup(!0)},l.enabled=!!s;var c=['Active'].concat('Object').join('X');!l.enabled&&c in t&&(s=function(){try{return new t[c]('Microsoft.XMLHTTP')}catch(e){return null}},l.enabled=!!new s);var u=!1;try{u='withCredentials'in new s}catch(e){}l.supportsCORS=u,e.exports=l}).call(this,n(23))},function(e,t,n){"use strict";var r=n(21),i=n(59),o=n(73),a=n(93);function s(e){if(!a.enabled)throw new Error('Transport created when disabled');i.call(this,e,'/xhr_streaming',o,a)}r(s,i),s.enabled=function(e){return!e.cookie_needed&&!e.nullOrigin&&(a.enabled&&e.sameScheme)},s.transportName='xdr-streaming',s.roundTrips=2,e.exports=s},function(e,t,n){"use strict";var r=n(21),i=n(59),o=n(187),a=n(74),s=n(113);function l(e){if(!l.enabled())throw new Error('Transport created when disabled');i.call(this,e,'/eventsource',o,a)}r(l,i),l.enabled=function(){return!!s},l.transportName='eventsource',l.roundTrips=2,e.exports=l},function(e,t,n){(function(t){e.exports=t.EventSource}).call(this,n(23))},function(e,t,n){"use strict";var r=n(21),i=n(37).EventEmitter,o=n(115),a=n(43),s=n(71),l=n(50),c=n(58);function u(e,t,n){if(!u.enabled())throw new Error('Transport created when disabled');i.call(this);var r=this;this.origin=a.getOrigin(n),this.baseUrl=n,this.transUrl=t,this.transport=e,this.windowId=c.string(8);var o=a.addPath(n,'/iframe.html')+'#'+this.windowId;this.iframeObj=s.createIframe(o,(function(e){r.emit('close',1006,'Unable to load an iframe ('+e+')'),r.close()})),this.onmessageCallback=this._message.bind(this),l.attachEvent('message',this.onmessageCallback)}r(u,i),u.prototype.close=function(){if(this.removeAllListeners(),this.iframeObj){l.detachEvent('message',this.onmessageCallback);try{this.postMessage('c')}catch(e){}this.iframeObj.cleanup(),this.iframeObj=null,this.onmessageCallback=this.iframeObj=null}},u.prototype._message=function(e){if(e.data,!a.isOriginEqual(e.origin,this.origin))return e.origin,void this.origin;var t;try{t=JSON.parse(e.data)}catch(t){return void e.data}if(t.windowId!==this.windowId)return t.windowId,void this.windowId;switch(t.type){case's':this.iframeObj.loaded(),this.postMessage('s',JSON.stringify([o,this.transport,this.transUrl,this.baseUrl]));break;case't':this.emit('message',t.data);break;case'c':var n;try{n=JSON.parse(t.data)}catch(e){return void t.data}this.emit('close',n[0],n[1]),this.close()}},u.prototype.postMessage=function(e,t){this.iframeObj.post(JSON.stringify({windowId:this.windowId,type:e,data:t||''}),this.origin)},u.prototype.send=function(e){this.postMessage('m',e)},u.enabled=function(){return s.iframeEnabled},u.transportName='iframe',u.roundTrips=2,e.exports=u},function(e,t){e.exports='1.6.0'},function(e,t,n){"use strict";var r=n(21),i=n(188),o=n(69),a=n(59);function s(e){if(!i.enabled)throw new Error('Transport created when disabled');a.call(this,e,'/htmlfile',i,o)}r(s,a),s.enabled=function(e){return i.enabled&&e.sameOrigin},s.transportName='htmlfile',s.roundTrips=2,e.exports=s},function(e,t,n){"use strict";var r=n(21),i=n(59),o=n(73),a=n(74),s=n(69);function l(e){if(!s.enabled&&!a.enabled)throw new Error('Transport created when disabled');i.call(this,e,'/xhr',o,a)}r(l,i),l.enabled=function(e){return!e.nullOrigin&&(!(!s.enabled||!e.sameOrigin)||a.enabled)},l.transportName='xhr-polling',l.roundTrips=2,e.exports=l},function(e,t,n){"use strict";(function(t){e.exports=t.location||{origin:'http://localhost:80',protocol:'http:',host:'localhost',port:80,href:'http://localhost/',hash:''}}).call(this,n(23))},function(e,t,n){"use strict";var r=n(21),i=n(37).EventEmitter,o=n(69),a=n(120);function s(e){var t=this;i.call(this),this.ir=new a(e,o),this.ir.once('finish',(function(e,n){t.ir=null,t.emit('message',JSON.stringify([e,n]))}))}r(s,i),s.transportName='iframe-info-receiver',s.prototype.close=function(){this.ir&&(this.ir.close(),this.ir=null),this.removeAllListeners()},e.exports=s},function(e,t,n){"use strict";var r=n(37).EventEmitter,i=n(21),o=n(95);function a(e,t){r.call(this);var n=this,i=+new Date;this.xo=new t('GET',e),this.xo.once('finish',(function(e,t){var r,a;if(200===e){if(a=+new Date-i,t)try{r=JSON.parse(t)}catch(e){}o.isObject(r)||(r={})}n.emit('finish',r,a),n.removeAllListeners()}))}i(a,r),a.prototype.close=function(){this.removeAllListeners(),this.xo.close()},e.exports=a},function(e,t,n){"use strict";e.exports=function(e,t){return function(){for(var n=new Array(arguments.length),r=0;r<n.length;r++)n[r]=arguments[r];return e.apply(t,n)}}},function(e,t,n){"use strict";var r=n(31);function i(e){return encodeURIComponent(e).replace(/%3A/gi,':').replace(/%24/g,'$').replace(/%2C/gi,',').replace(/%20/g,'+').replace(/%5B/gi,'[').replace(/%5D/gi,']')}e.exports=function(e,t,n){if(!t)return e;var o;if(n)o=n(t);else if(r.isURLSearchParams(t))o=t.toString();else{var a=[];r.forEach(t,(function(e,t){null!=e&&(r.isArray(e)?t+='[]':e=[e],r.forEach(e,(function(e){r.isDate(e)?e=e.toISOString():r.isObject(e)&&(e=JSON.stringify(e)),a.push(i(t)+'='+i(e))})))})),o=a.join('&')}if(o){var s=e.indexOf('#');-1!==s&&(e=e.slice(0,s)),e+=(-1===e.indexOf('?')?'?':'&')+o}return e}},function(e,t,n){"use strict";e.exports={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1}},function(e,t,n){"use strict";(function(t){var r=n(31);e.exports=function(e,n){n=n||new FormData;var i=[];function o(e){return null===e?'':r.isDate(e)?e.toISOString():r.isArrayBuffer(e)||r.isTypedArray(e)?'function'==typeof Blob?new Blob([e]):t.from(e):e}return function e(t,a){if(r.isPlainObject(t)||r.isArray(t)){if(-1!==i.indexOf(t))throw Error('Circular reference detected in '+a);i.push(t),r.forEach(t,(function(t,i){if(!r.isUndefined(t)){var s,l=a?a+'.'+i:i;if(t&&!a&&'object'==typeof t)if(r.endsWith(i,'{}'))t=JSON.stringify(t);else if(r.endsWith(i,'[]')&&(s=r.toArray(t)))return void s.forEach((function(e){!r.isUndefined(e)&&n.append(l,o(e))}));e(t,l)}})),i.pop()}else n.append(a,o(t))}(e),n}}).call(this,n(211).Buffer)},function(e,t,n){"use strict";var r=n(31),i=n(215),o=n(216),a=n(122),s=n(126),l=n(219),c=n(220),u=n(123),f=n(60),d=n(75),h=n(221);e.exports=function(e){return new Promise((function(t,n){var p,g=e.data,v=e.headers,m=e.responseType;function y(){e.cancelToken&&e.cancelToken.unsubscribe(p),e.signal&&e.signal.removeEventListener('abort',p)}r.isFormData(g)&&r.isStandardBrowserEnv()&&delete v['Content-Type'];var b=new XMLHttpRequest;if(e.auth){var w=e.auth.username||'',O=e.auth.password?unescape(encodeURIComponent(e.auth.password)):'';v.Authorization='Basic '+btoa(w+':'+O)}var x=s(e.baseURL,e.url);function k(){if(b){var r='getAllResponseHeaders'in b?l(b.getAllResponseHeaders()):null,o={data:m&&'text'!==m&&'json'!==m?b.response:b.responseText,status:b.status,statusText:b.statusText,headers:r,config:e,request:b};i((function(e){t(e),y()}),(function(e){n(e),y()}),o),b=null}}if(b.open(e.method.toUpperCase(),a(x,e.params,e.paramsSerializer),!0),b.timeout=e.timeout,'onloadend'in b?b.onloadend=k:b.onreadystatechange=function(){b&&4===b.readyState&&(0!==b.status||b.responseURL&&0===b.responseURL.indexOf('file:'))&&setTimeout(k)},b.onabort=function(){b&&(n(new f('Request aborted',f.ECONNABORTED,e,b)),b=null)},b.onerror=function(){n(new f('Network Error',f.ERR_NETWORK,e,b,b)),b=null},b.ontimeout=function(){var t=e.timeout?'timeout of '+e.timeout+'ms exceeded':'timeout exceeded',r=e.transitional||u;e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),n(new f(t,r.clarifyTimeoutError?f.ETIMEDOUT:f.ECONNABORTED,e,b)),b=null},r.isStandardBrowserEnv()){var C=(e.withCredentials||c(x))&&e.xsrfCookieName?o.read(e.xsrfCookieName):void 0;C&&(v[e.xsrfHeaderName]=C)}'setRequestHeader'in b&&r.forEach(v,(function(e,t){void 0===g&&'content-type'===t.toLowerCase()?delete v[t]:b.setRequestHeader(t,e)})),r.isUndefined(e.withCredentials)||(b.withCredentials=!!e.withCredentials),m&&'json'!==m&&(b.responseType=e.responseType),'function'==typeof e.onDownloadProgress&&b.addEventListener('progress',e.onDownloadProgress),'function'==typeof e.onUploadProgress&&b.upload&&b.upload.addEventListener('progress',e.onUploadProgress),(e.cancelToken||e.signal)&&(p=function(e){b&&(n(!e||e&&e.type?new d:e),b.abort(),b=null)},e.cancelToken&&e.cancelToken.subscribe(p),e.signal&&(e.signal.aborted?p():e.signal.addEventListener('abort',p))),g||(g=null);var S=h(x);S&&-1===['http','https','file'].indexOf(S)?n(new f('Unsupported protocol '+S+':',f.ERR_BAD_REQUEST,e)):b.send(g)}))}},function(e,t,n){"use strict";var r=n(217),i=n(218);e.exports=function(e,t){return e&&!r(t)?i(e,t):t}},function(e,t,n){"use strict";e.exports=function(e){return!(!e||!e.__CANCEL__)}},function(e,t,n){"use strict";var r=n(31);e.exports=function(e,t){t=t||{};var n={};function i(e,t){return r.isPlainObject(e)&&r.isPlainObject(t)?r.merge(e,t):r.isPlainObject(t)?r.merge({},t):r.isArray(t)?t.slice():t}function o(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(e[n],t[n])}function a(e){if(!r.isUndefined(t[e]))return i(void 0,t[e])}function s(n){return r.isUndefined(t[n])?r.isUndefined(e[n])?void 0:i(void 0,e[n]):i(void 0,t[n])}function l(n){return n in t?i(e[n],t[n]):n in e?i(void 0,e[n]):void 0}var c={url:a,method:a,data:a,baseURL:s,transformRequest:s,transformResponse:s,paramsSerializer:s,timeout:s,timeoutMessage:s,withCredentials:s,adapter:s,responseType:s,xsrfCookieName:s,xsrfHeaderName:s,onUploadProgress:s,onDownloadProgress:s,decompress:s,maxContentLength:s,maxBodyLength:s,beforeRedirect:s,transport:s,httpAgent:s,httpsAgent:s,cancelToken:s,socketPath:s,responseEncoding:s,validateStatus:l};return r.forEach(Object.keys(e).concat(Object.keys(t)),(function(e){var t=c[e]||o,i=t(e);r.isUndefined(i)&&t!==l||(n[e]=i)})),n}},function(e,t){e.exports={version:"0.27.2"}},function(e,t,n){(function(e){var r=void 0!==e&&e||"undefined"!=typeof self&&self||window,i=Function.prototype.apply;function o(e,t){this._id=e,this._clearFn=t}t.setTimeout=function(){return new o(i.call(setTimeout,r,arguments),clearTimeout)},t.setInterval=function(){return new o(i.call(setInterval,r,arguments),clearInterval)},t.clearTimeout=t.clearInterval=function(e){e&&e.close()},o.prototype.unref=o.prototype.ref=function(){},o.prototype.close=function(){this._clearFn.call(r,this._id)},t.enroll=function(e,t){clearTimeout(e._idleTimeoutId),e._idleTimeout=t},t.unenroll=function(e){clearTimeout(e._idleTimeoutId),e._idleTimeout=-1},t._unrefActive=t.active=function(e){clearTimeout(e._idleTimeoutId);var t=e._idleTimeout;t>=0&&(e._idleTimeoutId=setTimeout((function(){e._onTimeout&&e._onTimeout()}),t))},n(234),t.setImmediate="undefined"!=typeof self&&self.setImmediate||void 0!==e&&e.setImmediate||this&&this.setImmediate,t.clearImmediate="undefined"!=typeof self&&self.clearImmediate||void 0!==e&&e.clearImmediate||this&&this.clearImmediate}).call(this,n(23))},function(e,t,n){1&&function(e){"use strict";function t(e){for(var t={},n=0;n<e.length;++n)t[e[n].toLowerCase()]=!0;return t}e.defineMode("css",(function(t,n){var r=n.inline;n.propertyKeywords||(n=e.resolveMode("text/css"));var i,o,a=t.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},f=n.mediaValueKeywords||{},d=n.propertyKeywords||{},h=n.nonStandardPropertyKeywords||{},p=n.fontProperties||{},g=n.counterDescriptors||{},v=n.colorKeywords||{},m=n.valueKeywords||{},y=n.allowNested,b=n.lineComment,w=!0===n.supportsAtComponent,O=!1!==t.highlightNonStandardPropertyKeywords;function x(e,t){return i=t,e}function k(e,t){var n=e.next();if(s[n]){var r=s[n](e,t);if(!1!==r)return r}return"@"==n?(e.eatWhile(/[\w\\\-]/),x("def",e.current())):"="==n||("~"==n||"|"==n)&&e.eat("=")?x(null,"compare"):"\""==n||"'"==n?(t.tokenize=C(n),t.tokenize(e,t)):"#"==n?(e.eatWhile(/[\w\\\-]/),x("atom","hash")):"!"==n?(e.match(/^\s*\w*/),x("keyword","important")):/\d/.test(n)||"."==n&&e.eat(/\d/)?(e.eatWhile(/[\w.%]/),x("number","unit")):"-"!==n?/[,+>*\/]/.test(n)?x(null,"select-op"):"."==n&&e.match(/^-?[_a-z][_a-z0-9-]*/i)?x("qualifier","qualifier"):/[:;{}\[\]\(\)]/.test(n)?x(null,n):e.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(e.current())&&(t.tokenize=S),x("variable callee","variable")):/[\w\\\-]/.test(n)?(e.eatWhile(/[\w\\\-]/),x("property","word")):x(null,null):/[\d.]/.test(e.peek())?(e.eatWhile(/[\w.%]/),x("number","unit")):e.match(/^-[\w\\\-]*/)?(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?x("variable-2","variable-definition"):x("variable-2","variable")):e.match(/^\w+-/)?x("meta","meta"):void 0}function C(e){return function(t,n){for(var r,i=!1;null!=(r=t.next());){if(r==e&&!i){")"==e&&t.backUp(1);break}i=!i&&"\\"==r}return(r==e||!i&&")"!=e)&&(n.tokenize=null),x("string","string")}}function S(e,t){return e.next(),e.match(/^\s*[\"\')]/,!1)?t.tokenize=null:t.tokenize=C(")"),x(null,"(")}function j(e,t,n){this.type=e,this.indent=t,this.prev=n}function E(e,t,n,r){return e.context=new j(n,t.indentation()+(!1===r?0:a),e.context),n}function P(e){return e.context.prev&&(e.context=e.context.prev),e.context.type}function _(e,t,n){return M[n.context.type](e,t,n)}function T(e,t,n,r){for(var i=r||1;i>0;i--)n.context=n.context.prev;return _(e,t,n)}function A(e){var t=e.current().toLowerCase();o=m.hasOwnProperty(t)?"atom":v.hasOwnProperty(t)?"keyword":"variable"}var M={top:function(e,t,n){if("{"==e)return E(n,t,"block");if("}"==e&&n.context.prev)return P(n);if(w&&/@component/i.test(e))return E(n,t,"atComponentBlock");if(/^@(-moz-)?document$/i.test(e))return E(n,t,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(e))return E(n,t,"atBlock");if(/^@(font-face|counter-style)/i.test(e))return n.stateArg=e,"restricted_atBlock_before";if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(e))return"keyframes";if(e&&"@"==e.charAt(0))return E(n,t,"at");if("hash"==e)o="builtin";else if("word"==e)o="tag";else{if("variable-definition"==e)return"maybeprop";if("interpolation"==e)return E(n,t,"interpolation");if(":"==e)return"pseudo";if(y&&"("==e)return E(n,t,"parens")}return n.context.type},block:function(e,t,n){if("word"==e){var r=t.current().toLowerCase();return d.hasOwnProperty(r)?(o="property","maybeprop"):h.hasOwnProperty(r)?(o=O?"string-2":"property","maybeprop"):y?(o=t.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(o+=" error","maybeprop")}return"meta"==e?"block":y||"hash"!=e&&"qualifier"!=e?M.top(e,t,n):(o="error","block")},maybeprop:function(e,t,n){return":"==e?E(n,t,"prop"):_(e,t,n)},prop:function(e,t,n){if(";"==e)return P(n);if("{"==e&&y)return E(n,t,"propBlock");if("}"==e||"{"==e)return T(e,t,n);if("("==e)return E(n,t,"parens");if("hash"!=e||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(t.current())){if("word"==e)A(t);else if("interpolation"==e)return E(n,t,"interpolation")}else o+=" error";return"prop"},propBlock:function(e,t,n){return"}"==e?P(n):"word"==e?(o="property","maybeprop"):n.context.type},parens:function(e,t,n){return"{"==e||"}"==e?T(e,t,n):")"==e?P(n):"("==e?E(n,t,"parens"):"interpolation"==e?E(n,t,"interpolation"):("word"==e&&A(t),"parens")},pseudo:function(e,t,n){return"meta"==e?"pseudo":"word"==e?(o="variable-3",n.context.type):_(e,t,n)},documentTypes:function(e,t,n){return"word"==e&&l.hasOwnProperty(t.current())?(o="tag",n.context.type):M.atBlock(e,t,n)},atBlock:function(e,t,n){if("("==e)return E(n,t,"atBlock_parens");if("}"==e||";"==e)return T(e,t,n);if("{"==e)return P(n)&&E(n,t,y?"block":"top");if("interpolation"==e)return E(n,t,"interpolation");if("word"==e){var r=t.current().toLowerCase();o="only"==r||"not"==r||"and"==r||"or"==r?"keyword":c.hasOwnProperty(r)?"attribute":u.hasOwnProperty(r)?"property":f.hasOwnProperty(r)?"keyword":d.hasOwnProperty(r)?"property":h.hasOwnProperty(r)?O?"string-2":"property":m.hasOwnProperty(r)?"atom":v.hasOwnProperty(r)?"keyword":"error"}return n.context.type},atComponentBlock:function(e,t,n){return"}"==e?T(e,t,n):"{"==e?P(n)&&E(n,t,y?"block":"top",!1):("word"==e&&(o="error"),n.context.type)},atBlock_parens:function(e,t,n){return")"==e?P(n):"{"==e||"}"==e?T(e,t,n,2):M.atBlock(e,t,n)},restricted_atBlock_before:function(e,t,n){return"{"==e?E(n,t,"restricted_atBlock"):"word"==e&&"@counter-style"==n.stateArg?(o="variable","restricted_atBlock_before"):_(e,t,n)},restricted_atBlock:function(e,t,n){return"}"==e?(n.stateArg=null,P(n)):"word"==e?(o="@font-face"==n.stateArg&&!p.hasOwnProperty(t.current().toLowerCase())||"@counter-style"==n.stateArg&&!g.hasOwnProperty(t.current().toLowerCase())?"error":"property","maybeprop"):"restricted_atBlock"},keyframes:function(e,t,n){return"word"==e?(o="variable","keyframes"):"{"==e?E(n,t,"top"):_(e,t,n)},at:function(e,t,n){return";"==e?P(n):"{"==e||"}"==e?T(e,t,n):("word"==e?o="tag":"hash"==e&&(o="builtin"),"at")},interpolation:function(e,t,n){return"}"==e?P(n):"{"==e||";"==e?T(e,t,n):("word"==e?o="variable":"variable"!=e&&"("!=e&&")"!=e&&(o="error"),"interpolation")}};return{startState:function(e){return{tokenize:null,state:r?"block":"top",stateArg:null,context:new j(r?"block":"top",e||0,null)}},token:function(e,t){if(!t.tokenize&&e.eatSpace())return null;var n=(t.tokenize||k)(e,t);return n&&"object"==typeof n&&(i=n[1],n=n[0]),o=n,"comment"!=i&&(t.state=M[t.state](i,e,t)),o},indent:function(e,t){var n=e.context,r=t&&t.charAt(0),i=n.indent;return"prop"!=n.type||"}"!=r&&")"!=r||(n=n.prev),n.prev&&("}"!=r||"block"!=n.type&&"top"!=n.type&&"interpolation"!=n.type&&"restricted_atBlock"!=n.type?(")"!=r||"parens"!=n.type&&"atBlock_parens"!=n.type)&&("{"!=r||"at"!=n.type&&"atBlock"!=n.type)||(i=Math.max(0,n.indent-a)):i=(n=n.prev).indent),i},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}}));var n=["domain","regexp","url","url-prefix"],r=t(n),i=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],o=t(i),a=["width","min-width","max-width","height","min-height","max-height","device-width","min-device-width","max-device-width","device-height","min-device-height","max-device-height","aspect-ratio","min-aspect-ratio","max-aspect-ratio","device-aspect-ratio","min-device-aspect-ratio","max-device-aspect-ratio","color","min-color","max-color","color-index","min-color-index","max-color-index","monochrome","min-monochrome","max-monochrome","resolution","min-resolution","max-resolution","scan","grid","orientation","device-pixel-ratio","min-device-pixel-ratio","max-device-pixel-ratio","pointer","any-pointer","hover","any-hover","prefers-color-scheme"],s=t(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=t(l),u=["align-content","align-items","align-self","alignment-adjust","alignment-baseline","all","anchor-point","animation","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-timing-function","appearance","azimuth","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","binding","bleed","block-size","bookmark-label","bookmark-level","bookmark-state","bookmark-target","border","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-decoration-break","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","color","color-profile","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","content","counter-increment","counter-reset","crop","cue","cue-after","cue-before","cursor","direction","display","dominant-baseline","drop-initial-after-adjust","drop-initial-after-align","drop-initial-before-adjust","drop-initial-before-align","drop-initial-size","drop-initial-value","elevation","empty-cells","fit","fit-content","fit-position","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","float-offset","flow-from","flow-into","font","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-size","font-size-adjust","font-stretch","font-style","font-synthesis","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","gap","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-gap","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-gap","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphens","icon","image-orientation","image-rendering","image-resolution","inline-box-align","inset","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","left","letter-spacing","line-break","line-height","line-height-step","line-stacking","line-stacking-ruby","line-stacking-shift","line-stacking-strategy","list-style","list-style-image","list-style-position","list-style-type","margin","margin-bottom","margin-left","margin-right","margin-top","marks","marquee-direction","marquee-loop","marquee-play-count","marquee-speed","marquee-style","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","move-to","nav-down","nav-index","nav-left","nav-right","nav-up","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-style","overflow-wrap","overflow-x","overflow-y","padding","padding-bottom","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","page-policy","pause","pause-after","pause-before","perspective","perspective-origin","pitch","pitch-range","place-content","place-items","place-self","play-during","position","presentation-level","punctuation-trim","quotes","region-break-after","region-break-before","region-break-inside","region-fragment","rendering-intent","resize","rest","rest-after","rest-before","richness","right","rotate","rotation","rotation-point","row-gap","ruby-align","ruby-overhang","ruby-position","ruby-span","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-type","shape-image-threshold","shape-inside","shape-margin","shape-outside","size","speak","speak-as","speak-header","speak-numeral","speak-punctuation","speech-rate","stress","string-set","tab-size","table-layout","target","target-name","target-new","target-position","text-align","text-align-last","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-height","text-indent","text-justify","text-orientation","text-outline","text-overflow","text-rendering","text-shadow","text-size-adjust","text-space-collapse","text-transform","text-underline-position","text-wrap","top","touch-action","transform","transform-origin","transform-style","transition","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-select","vertical-align","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","volume","white-space","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","z-index","clip-path","clip-rule","mask","enable-background","filter","flood-color","flood-opacity","lighting-color","stop-color","stop-opacity","pointer-events","color-interpolation","color-interpolation-filters","color-rendering","fill","fill-opacity","fill-rule","image-rendering","marker","marker-end","marker-mid","marker-start","paint-order","shape-rendering","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","text-rendering","baseline-shift","dominant-baseline","glyph-orientation-horizontal","glyph-orientation-vertical","text-anchor","writing-mode"],f=t(u),d=["accent-color","aspect-ratio","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","content-visibility","margin-block","margin-block-end","margin-block-start","margin-inline","margin-inline-end","margin-inline-start","overflow-anchor","overscroll-behavior","padding-block","padding-block-end","padding-block-start","padding-inline","padding-inline-end","padding-inline-start","scroll-snap-stop","scrollbar-3d-light-color","scrollbar-arrow-color","scrollbar-base-color","scrollbar-dark-shadow-color","scrollbar-face-color","scrollbar-highlight-color","scrollbar-shadow-color","scrollbar-track-color","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","shape-inside","zoom"],h=t(d),p=t(["font-display","font-family","src","unicode-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=t(["additive-symbols","fallback","negative","pad","prefix","range","speak-as","suffix","symbols","system"]),v=["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkgrey","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkslategrey","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dimgrey","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightgrey","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightslategrey","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","slategrey","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"],m=t(v),y=["above","absolute","activeborder","additive","activecaption","afar","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","amharic","amharic-abegede","antialiased","appworkspace","arabic-indic","armenian","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","binary","bengali","blink","block","block-axis","blur","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","brightness","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","cambodian","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","cjk-earthly-branch","cjk-heavenly-stem","cjk-ideographic","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","contrast","copy","counter","counters","cover","crop","cross","crosshair","cubic-bezier","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","devanagari","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","drop-shadow","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic","ethiopic-abegede","ethiopic-abegede-am-et","ethiopic-abegede-gez","ethiopic-abegede-ti-er","ethiopic-abegede-ti-et","ethiopic-halehame-aa-er","ethiopic-halehame-aa-et","ethiopic-halehame-am-et","ethiopic-halehame-gez","ethiopic-halehame-om-et","ethiopic-halehame-sid-et","ethiopic-halehame-so-et","ethiopic-halehame-ti-er","ethiopic-halehame-ti-et","ethiopic-halehame-tig","ethiopic-numeric","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","georgian","grayscale","graytext","grid","groove","gujarati","gurmukhi","hand","hangul","hangul-consonant","hard-light","hebrew","help","hidden","hide","higher","highlight","highlighttext","hiragana","hiragana-iroha","horizontal","hsl","hsla","hue","hue-rotate","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","japanese-formal","japanese-informal","justify","kannada","katakana","katakana-iroha","keep-all","khmer","korean-hangul-formal","korean-hanja-formal","korean-hanja-informal","landscape","lao","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-alpha","lower-armenian","lower-greek","lower-hexadecimal","lower-latin","lower-norwegian","lower-roman","lowercase","ltr","luminosity","malayalam","manipulation","match","matrix","matrix3d","media-controls-background","media-current-time-display","media-fullscreen-button","media-mute-button","media-play-button","media-return-to-realtime-button","media-rewind-button","media-seek-back-button","media-seek-forward-button","media-slider","media-sliderthumb","media-time-remaining-display","media-volume-slider","media-volume-slider-container","media-volume-sliderthumb","medium","menu","menulist","menulist-button","menulist-text","menulist-textfield","menutext","message-box","middle","min-intrinsic","mix","mongolian","monospace","move","multiple","multiple_mask_images","multiply","myanmar","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","octal","opacity","open-quote","optimizeLegibility","optimizeSpeed","oriya","oromo","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","persian","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturate","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","searchfield","searchfield-cancel-button","searchfield-decoration","searchfield-results-button","searchfield-results-decoration","self-start","self-end","semi-condensed","semi-expanded","separate","sepia","serif","show","sidama","simp-chinese-formal","simp-chinese-informal","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","somali","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","square-button","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","tamil","telugu","text","text-bottom","text-top","textarea","textfield","thai","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","tibetan","tigre","tigrinya-er","tigrinya-er-abegede","tigrinya-et","tigrinya-et-abegede","to","top","trad-chinese-formal","trad-chinese-informal","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-alpha","upper-armenian","upper-greek","upper-hexadecimal","upper-latin","upper-norwegian","upper-roman","uppercase","urdu","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"],b=t(y),w=n.concat(i).concat(a).concat(l).concat(u).concat(d).concat(v).concat(y);function O(e,t){for(var n,r=!1;null!=(n=e.next());){if(r&&"/"==n){t.tokenize=null;break}r="*"==n}return["comment","comment"]}e.registerHelper("hintWords","css",w),e.defineMIME("text/css",{documentTypes:r,mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:f,nonStandardPropertyKeywords:h,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=O,O(e,t))}},name:"css"}),e.defineMIME("text/x-scss",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:f,nonStandardPropertyKeywords:h,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=O,O(e,t)):["operator","operator"]},":":function(e){return!!e.match(/^\s*\{/,!1)&&[null,null]},$:function(e){return e.match(/^[\w-]+/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(e){return!!e.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),e.defineMIME("text/x-less",{mediaTypes:o,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:f,nonStandardPropertyKeywords:h,colorKeywords:m,valueKeywords:b,fontProperties:p,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(e,t){return e.eat("/")?(e.skipToEnd(),["comment","comment"]):e.eat("*")?(t.tokenize=O,O(e,t)):["operator","operator"]},"@":function(e){return e.eat("{")?[null,"interpolation"]:!e.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&(e.eatWhile(/[\w\\\-]/),e.match(/^\s*:/,!1)?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),e.defineMIME("text/x-gss",{documentTypes:r,mediaTypes:o,mediaFeatures:s,propertyKeywords:f,nonStandardPropertyKeywords:h,fontProperties:p,counterDescriptors:g,colorKeywords:m,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(e,t){return!!e.eat("*")&&(t.tokenize=O,O(e,t))}},name:"css",helperType:"gss"})}(n(61))},function(e,t,n){"use strict";n.r(t),t["default"]={run:function(e){e.DomComponents.clear(),e.CssComposer.clear()}}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n(1),o=n(52);t["default"]={run:function(e){Object(r["bindAll"])(this,'onKeyUp','enableDragger','disableDragger'),this.editor=e,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(1)},stop:function(e){this.toggleMove(),this.disableDragger()},onKeyUp:function(e){' '===Object(i["getKeyChar"])(e)&&this.editor.stopCommand(this.id)},enableDragger:function(e){this.toggleDragger(1,e)},disableDragger:function(e){this.toggleDragger(0,e)},toggleDragger:function(e,t){var n=this.canvasModel,r=this.em,i=this.dragger,a=e?'add':'remove';this.getCanvas().classList[a]("".concat(this.ppfx,"is__grabbing")),i||(i=new o["a"]({getPosition:function(){return{x:n.get('x'),y:n.get('y')}},setPosition:function(e){var t=e.x,r=e.y;n.set({x:t,y:r})},onStart:function(e,t){r.trigger('canvas:move:start',t)},onDrag:function(e,t){r.trigger('canvas:move',t)},onEnd:function(e,t){r.trigger('canvas:move:end',t)}}),this.dragger=i),e?i.start(t):i.stop()},toggleMove:function(e){var t=this.ppfx,n=e?'add':'remove',r=e?'on':'off',o={on:i["on"],off:i["off"]},a=this.getCanvas(),s=["".concat(t,"is__grab")];!e&&s.push("".concat(t,"is__grabbing")),s.forEach((function(e){return a.classList[n](e)})),o[r](document,'keyup',this.onKeyUp),o[r](a,'mousedown',this.enableDragger),o[r](document,'mouseup',this.disableDragger)}}},function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r),o=n(0),a=n(6);t["default"]={run:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},s=[],l=r.component||e.getSelectedAll();return l=Object(o["isArray"])(l)?i()(l):[l],e.select(null),l.forEach((function(e){var t=e.getId(),r=e.collection.indexOf(e),i=e.parent().getId();if(!e||!e.get('removable'))return n.em.logWarning('The element is not removable',{component:e});if(e.remove(),e.collection&&s.push(e),t){var o={action:'delete-component',opts:{id:t,index:r,parentId:i}};a["c"]==a["d"].Synced?(Object(a["h"])(a["d"].ApplyingLocalOp),Object(a["b"])(o)):a["c"]!=a["d"].AwaitingACK&&a["c"]!=a["d"].AwaitingWithBuffer||(Object(a["h"])(a["d"].ApplyingBufferedLocalOp),Object(a["a"])(o))}})),s.length&&e.select(s),l}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(0),a=n(52);function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var c='dmode';t["default"]={run:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};Object(o["bindAll"])(this,'setPosition','onStart','onDrag','onEnd','getPosition','getGuidesStatic','renderGuide','getGuidesTarget');var i=r.target,s=r.event,u=r.mode,f=r.dragger,d=void 0===f?{}:f,h=i.getEl(),p=l({doc:h.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){return n.guidesStatic},guidesTarget:function(){return n.guidesTarget}},d);this.setupGuides(),this.opts=r,this.editor=e,this.em=e.getModel(),this.target=i,this.isTran='translate'==u,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var g=this.dragger;return g?g.setOptions(p):(g=new a["a"](p),this.dragger=g),s&&g.start(s),this.toggleDrag(1),this.em.trigger("".concat(c,":start"),this.getEventOpts()),g},getEventOpts:function(){return{mode:this.opts.mode,target:this.target,guidesTarget:this.guidesTarget,guidesStatic:this.guidesStatic}},stop:function(){this.toggleDrag()},setupGuides:function(){(this.guides||[]).forEach((function(e){var t=e.guide;t&&t.parentNode.removeChild(t)})),this.guides=[]},getGuidesContainer:function(){var e=this,t=this.guidesEl;if(!t){var n=this.editor,r=this.em,i=this.opts,a=n.getConfig('stylePrefix'),s=document.createElement('div'),l=document.createElement('div'),c="<div class=\"".concat(a,"guide-info__line ").concat(a,"danger-bg\">\n        <div class=\"").concat(a,"guide-info__content ").concat(a,"danger-color\"></div>\n      </div>");(t=document.createElement('div')).className="".concat(a,"guides"),s.className="".concat(a,"guide-info ").concat(a,"guide-info__x"),l.className="".concat(a,"guide-info ").concat(a,"guide-info__y"),s.innerHTML=c,l.innerHTML=c,t.appendChild(s),t.appendChild(l),n.Canvas.getGlobalToolsEl().appendChild(t),this.guidesEl=t,this.elGuideInfoX=s,this.elGuideInfoY=l,this.elGuideInfoContentX=s.querySelector(".".concat(a,"guide-info__content")),this.elGuideInfoContentY=l.querySelector(".".concat(a,"guide-info__content")),r.on('canvas:update frame:scroll',Object(o["debounce"])((function(){e.updateGuides(),i.debug&&e.guides.forEach((function(t){return e.renderGuide(t)}))}),200))}return t},getGuidesStatic:function(){var e=this,t=[],n=this.target.getEl(),r=n.parentNode,i=void 0===r?{}:r;return Object(o["each"])(i.children,(function(r){return t=t.concat(n!==r?e.getElementGuides(r):[])})),t.concat(this.getElementGuides(i))},getGuidesTarget:function(){return this.getElementGuides(this.target.getEl())},updateGuides:function(e){var t,n,r=this;(e||this.guides).forEach((function(e){var i=e.origin,a=t===i?n:r.getElementPos(i);t=i,n=a,Object(o["each"])(r.getGuidePosUpdate(e,a),(function(t,n){return e[n]=t})),e.originRect=a}))},getGuidePosUpdate:function(e,t){var n={},r=t.top,i=t.height,o=t.left,a=t.width;switch(e.type){case't':n.y=r;break;case'b':n.y=r+i;break;case'l':n.x=o;break;case'r':n.x=o+a;break;case'x':n.x=o+a/2;break;case'y':n.y=r+i/2}return n},renderGuide:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.guide||document.createElement('div'),n='px',r=e.active?2:1,i=t.children[0];return t.style="position: absolute; background-color: ".concat(e.active?'green':'red',";"),t.children.length||((i=document.createElement('div')).style='position: absolute; color: red; padding: 5px; top: 0; left: 0;',t.appendChild(i)),e.y?(t.style.width='100%',t.style.height="".concat(r).concat(n),t.style.top="".concat(e.y).concat(n),t.style.left=0):(t.style.width="".concat(r).concat(n),t.style.height='100%',t.style.left="".concat(e.x).concat(n),t.style.top="0".concat(n)),!e.guide&&this.guidesContainer.appendChild(t),t},getElementPos:function(e){return this.editor.Canvas.getElementPos(e,{noScroll:1})},getElementGuides:function(e){var t=this,n=this.opts,r=this.getElementPos(e),i=r.top,o=r.height,a=r.left,s=r.width,c=[{type:'t',y:i},{type:'b',y:i+o},{type:'l',x:a},{type:'r',x:a+s},{type:'x',x:a+s/2},{type:'y',y:i+o/2}].map((function(i){return l(l({},i),{},{origin:e,originRect:r,guide:n.debug&&t.renderGuide(i)})}));return c.forEach((function(e){return t.guides.push(e)})),c},getTranslate:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'x',n=0;return(e||'').split(' ').forEach((function(e){var r=e.trim(),i="translate".concat(t.toUpperCase(),"(");0===r.indexOf(i)&&(n=parseFloat(r.replace(i,'')))})),n},setTranslate:function(e,t,n){var r="translate".concat(t.toUpperCase(),"("),i="".concat(r).concat(n,")"),o=(e||'').split(' ').map((function(e){return 0===e.trim().indexOf(r)&&(e=i),e})).join(' ');return o.indexOf(r)<0&&(o+=" ".concat(i)),o},getPosition:function(){var e=this.target,t=this.isTran,n=e.getStyle(),r=n.left,i=n.top,o=n.transform,a=0,s=0;return t?(a=this.getTranslate(o),s=this.getTranslate(o,'y')):(a=parseFloat(r||0),s=parseFloat(i||0)),{x:a,y:s}},setPosition:function(e){var t=e.x,n=e.y,r=e.end,i=e.position,a=e.width,s=e.height,l=this.target,c=this.isTran,u=this.em,f='px',d=r?'':1,h="".concat(t).concat(f),p="".concat(n).concat(f),g={};if(c){var v=l.getStyle()['transform']||'';v=this.setTranslate(v,'x',h),g={transform:v=this.setTranslate(v,'y',p),en:d},l.addStyle(g,{avoidStore:!r})}else{var m={position:i,width:a,height:s},y={left:h,top:p,en:d};Object(o["keys"])(m).forEach((function(e){var t=m[e];t&&(y[e]=t)})),g=y,l.addStyle(g,{avoidStore:!r})}u.getSelected()&&Object(o["keys"])(g).forEach((function(e){return u.trigger("update:component:style:".concat(e))}))},_getDragData:function(){var e=this.target;return{target:e,parent:e.parent(),index:e.index()}},onStart:function(e){var t=this.target,n=this.editor,r=this.isTran,i=this.opts,o=i.center,a=i.onStart,s=n.Canvas,l=t.getStyle(),c='absolute',u=[c,'relative'];if(a&&a(this._getDragData()),!r&&l.position!==c){var f,d=s.offset(t.getEl()),h=d.left,p=d.top,g=d.width,v=d.height,m=t.parent();do{var y=m.getStyle();f=u.indexOf(y.position)>=0?m:null,m=m.parent()}while(m&&!f);if(o){var b=s.getMouseRelativeCanvas(e);h=b.x,p=b.y}else if(f){var w=s.offset(f.getEl());h-=w.left,p-=w.top}this.setPosition({x:h,y:p,width:"".concat(g,"px"),height:"".concat(v,"px"),position:c})}},onDrag:function(){var e=this,t=this.guidesTarget,n=this.opts,r=n.onDrag;this.updateGuides(t),n.debug&&t.forEach((function(t){return e.renderGuide(t)})),n.guidesInfo&&this.renderGuideInfo(t.filter((function(e){return e.active}))),r&&r(this._getDragData())},onEnd:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.editor,i=this.opts,o=this.id,a=i.onEnd;a&&a(e,n,l(l({event:e},n),this._getDragData())),r.stopCommand(o),this.hideGuidesInfo(),this.em.trigger("".concat(c,":end"),this.getEventOpts())},hideGuidesInfo:function(){var e=this;['X','Y'].forEach((function(t){var n=e["elGuideInfo".concat(t)];n&&(n.style.display='none')}))},renderGuideInfo:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],n=this.guidesStatic;this.hideGuidesInfo(),t.forEach((function(t){var r=t.origin,i=t.x,a=e.getElementPos(r),s=Object(o["isUndefined"])(i)?'y':'x',u='y'===s,f=a[u?'left':'top'],d=a.rect[u?'left':'top'],h=u?f+a.width:f+a.height,p=u?d+a.rect.width:d+a.rect.height,g=e["elGuideInfo".concat(s.toUpperCase())],v=e["elGuideInfoContent".concat(s.toUpperCase())],m=g.style,y=n.filter((function(e){return e.type===t.type})).map((function(e){var t=e.originRect,n=t.left,r=t.width,i=t.top,o=t.height,a=u?n+r:i+o;return{gap:a<f?f-a:(u?n:i)-h,guide:e}})).filter((function(e){return e.gap>0})).sort((function(e,t){return e.gap-t.gap})).map((function(e){return e.guide}))[0];if(y){var b=y.originRect,w=b.left,O=b.width,x=b.top,k=b.height,C=b.rect,S=u?w<a.left:x<a.top,j=u?w:x,E=u?C.left:C.top,P=u?w+O:x+k,_=u?C.left+C.width:C.top+C.height,T=u?t.y:t.x,A=S?P:h,M="".concat(T,"px"),D=S?f-P:j-h,L=S?d-_:E-p;m.display='',m[u?'top':'left']=M,m[u?'left':'top']="".concat(A,"px"),m[u?'width':'height']="".concat(D,"px"),v.innerHTML="".concat(Math.round(L),"px"),e.em.trigger("".concat(c,":active"),l(l({},e.getEventOpts()),{},{guide:t,guidesStatic:n,matched:y,posFirst:T,posSecond:A,size:D,sizeRaw:L,elGuideInfo:g,elGuideInfoCnt:v}))}}))},toggleDrag:function(e){var t=this.ppfx,n=this.editor,r=e?'add':'remove',i=["".concat(t,"is__grabbing")],o=n.Canvas,a=o.getBody();i.forEach((function(e){return a.classList[r](e)})),o[e?'startAutoscroll':'stopAutoscroll']()}}},function(e,t,n){"use strict";n.r(t),t["default"]={run:function(e){if(e.Canvas.hasFocus()){var t=[];e.getSelectedAll().forEach((function(e){var n=e.components(),r=n&&n.filter((function(e){return e.get('selectable')}))[0];r&&t.push(r)})),t.length&&e.select(t)}}}},function(e,t,n){"use strict";n.r(t),t["default"]={run:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(e.Canvas.hasFocus()||n.force){var r=[];e.getSelectedAll().forEach((function(e){for(var t=e.parent();t&&!t.get('selectable');)t=t.parent();t&&r.push(t)})),r.length&&e.select(r)}}}},function(e,t,n){"use strict";n.r(t),t["default"]={run:function(e){if(e.Canvas.hasFocus()){var t=[];e.getSelectedAll().forEach((function(e){var n=e.parent();if(n){var r,i=n.components().length,o=0,a=0;do{o++,r=(a=e.index()+o)<=i?n.getChildAt(a):null}while(r&&!r.get('selectable'));t.push(r||e)}})),t.length&&e.select(t)}}}},function(e,t,n){"use strict";n.r(t),t["default"]={run:function(e){if(e.Canvas.hasFocus()){var t=[];e.getSelectedAll().forEach((function(e){var n=e.parent();if(n){var r,i=0,o=0;do{i++,r=(o=e.index()-i)>=0?n.getChildAt(o):null}while(r&&!r.get('selectable'));t.push(r||e)}})),t.length&&e.select(t)}}}},function(e,t,n){"use strict";n.r(t);var r=n(0);t["default"]={run:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.target,o=[];if(!i.get('styles'))return o;var a=i.get('type'),s=e.Pages.getAllWrappers(),l=Object(r["flatten"])(s.map((function(e){return e.findType(a)}))).length;if(!l){var c=e.CssComposer.getAll();o=c.filter((function(e){return e.get('group')==="cmp:".concat(a)})),c.remove(o)}return o}}},function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r);t["default"]={run:function(e){var t=e.getModel(),n=i()(e.getSelectedAll());n.length&&t.set('clipboard',n)}}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n(4),o=n.n(i),a=n(49),s=o.a.$;t["default"]=Object(r["extend"])({},a["default"],{init:function(e){Object(r["bindAll"])(this,'startDelete','stopDelete','onDelete'),this.hoverClass=this.pfx+'hover-delete',this.badgeClass=this.pfx+'badge-red'},enable:function(){this.$el.find('*').mouseover(this.startDelete).mouseout(this.stopDelete).click(this.onDelete)},startDelete:function(e){e.stopPropagation();var t=s(e.target);t.data('model').get('removable')&&(t.addClass(this.hoverClass),this.attachBadge(t.get(0)))},stopDelete:function(e){e.stopPropagation(),s(e.target).removeClass(this.hoverClass),this.badge&&this.badge.css({left:-1e3,top:-1e3})},onDelete:function(e){e.stopPropagation();var t=s(e.target);t.data('model').get('removable')&&(t.data('model').destroy(),this.removeBadge(),this.clean())},updateBadgeLabel:function(e){this.badge.html('Remove '+e.getName())}})},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r).a.$;t["default"]={run:function(e,t){var n=this;t&&t.set&&t.set('active',0);var r=e.getConfig(),o=e.Modal,a=r.stylePrefix;if(this.cm=e.CodeManager||null,!this.$editors){var s=this.buildEditor('htmlmixed','hopscotch','HTML'),l=this.buildEditor('css','hopscotch','CSS');this.htmlEditor=s.el,this.cssEditor=l.el;var c=i("<div class=\"".concat(a,"export-dl\"></div>"));c.append(s.$el).append(l.$el),this.$editors=c}o.open({title:r.textViewCode,content:this.$editors}).getModel().once('change:open',(function(){return e.stopCommand(n.id)})),this.htmlEditor.setContent(e.getHtml()),this.cssEditor.setContent(e.getCss())},stop:function(e){var t=e.Modal;t&&t.close()},buildEditor:function(e,t,n){var r=document.createElement('textarea');!this.codeMirror&&(this.codeMirror=this.cm.getViewer('CodeMirror'));var i=this.codeMirror.clone().set({label:n,codeName:e,theme:t,input:r}),o=new this.cm.EditorView({model:i,config:this.cm.getConfig()}).render().$el;return i.init(r),{el:i,$el:o}}}},function(e,t,n){"use strict";n.r(t);var r=n(0);t["default"]={isEnabled:function(){var e=document;return e.fullscreenElement||e.webkitFullscreenElement||e.mozFullScreenElement?1:0},enable:function(e){var t='';return e.requestFullscreen?e.requestFullscreen():e.webkitRequestFullscreen?(t='webkit',e.webkitRequestFullscreen()):e.mozRequestFullScreen?(t='moz',e.mozRequestFullScreen()):e.msRequestFullscreen?e.msRequestFullscreen():console.warn('Fullscreen not supported'),t},disable:function(){var e=document;this.isEnabled()&&(e.exitFullscreen?e.exitFullscreen():e.webkitExitFullscreen?e.webkitExitFullscreen():e.mozCancelFullScreen?e.mozCancelFullScreen():e.msExitFullscreen&&e.msExitFullscreen())},fsChanged:function(e,t){document;var n=(e||'')+'fullscreenchange';this.isEnabled()||(this.stop(null,this.sender),document.removeEventListener(n,this.fsChanged))},run:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.sender=t;var i=n.target,o=Object(r["isElement"])(i)?i:document.querySelector(i),a=this.enable(o||e.getContainer());this.fsChanged=this.fsChanged.bind(this,a),document.addEventListener(a+'fullscreenchange',this.fsChanged),e.trigger('change:canvasOffset')},stop:function(e,t){t&&t.set&&t.set('active',!1),this.disable(),e&&e.trigger('change:canvasOffset')}}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n(4),o=n.n(i),a=n(1),s=n(49),l=n(76),c=o.a.$;t["default"]=Object(r["extend"])({},l["default"],s["default"],{init:function(e){s["default"].init.apply(this,arguments),Object(r["bindAll"])(this,'initSorter','rollback','onEndMove'),this.opt=e,this.hoverClass=this.ppfx+'highlighter-warning',this.badgeClass=this.ppfx+'badge-warning',this.noSelClass=this.ppfx+'no-select'},enable:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s["default"].enable.apply(this,t),this.getBadgeEl().addClass(this.badgeClass),this.getHighlighterEl().addClass(this.hoverClass);var r=this.$wrapper;r.css('cursor','move'),r.on('mousedown',this.initSorter),r.addClass(this.noSelClass)},toggleClipboard:function(){},initSorter:function(e){var t=c(e.target).data('model').get('draggable');t&&(this.cacheEl=null,this.startSelectPosition(e.target,this.frameEl.contentDocument),this.sorter.draggable=t,this.sorter.onEndMove=this.onEndMove.bind(this),this.stopSelectComponent(),this.$wrapper.off('mousedown',this.initSorter),Object(a["on"])(this.getContentWindow(),'keydown',this.rollback))},initSorterFromModel:function(e){var t=e.get('draggable');if(t){this.cacheEl=null;var n=e.view.el;this.startSelectPosition(n,this.frameEl.contentDocument),this.sorter.draggable=t,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),Object(a["on"])(this.getContentWindow(),'keydown',this.rollback)}},initSorterFromModels:function(e){this.cacheEl=null;var t=e[e.length-1],n=(this.em.get('currentFrame')||{}).model,r=t.getEl(n),i=r.ownerDocument;this.startSelectPosition(r,i,{onStart:this.onStart}),this.sorter.draggable=t.get('draggable'),this.sorter.toMove=e,this.sorter.onMoveClb=this.onDrag,this.sorter.onEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),Object(a["on"])(this.getContentWindow(),'keydown',this.rollback)},onEndMoveFromModel:function(){Object(a["off"])(this.getContentWindow(),'keydown',this.rollback)},onEndMove:function(){this.enable(),Object(a["off"])(this.getContentWindow(),'keydown',this.rollback)},onSelect:function(e,t){},rollback:function(e,t){(27==(e.which||e.keyCode)||t)&&(this.sorter.moved=!1,this.sorter.endMove())},getBadgeEl:function(){return this.$badge||(this.$badge=c(this.getBadge())),this.$badge},getHighlighterEl:function(){return this.$hl||(this.$hl=c(this.canvas.getHighlighter())),this.$hl},stop:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];s["default"].stop.apply(this,t),this.getBadgeEl().removeClass(this.badgeClass),this.getHighlighterEl().removeClass(this.hoverClass);var r=this.$wrapper;r.css('cursor','').unbind().removeClass(this.noSelClass)}})},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n(18);t["default"]={open:function(e){var t=this,n=this.editor,i=this.title,o=this.config,a=this.am,s=o.custom;if(Object(r["isFunction"])(s.open))return s.open(a.__customData());n.Modal.open({title:i,content:e}).onceClose((function(){return n.stopCommand(t.id)}))},close:function(){var e=this.config.custom;if(Object(r["isFunction"])(e.close))return e.close(this.am.__customData());var t=this.editor.Modal;t&&t.close()},run:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.AssetManager,o=r.getConfig(),a=n.types,s=void 0===a?[]:a,l=n.accept,c=n.select;if(this.title=n.modalTitle||e.t('assetManager.modalTitle')||'',this.editor=e,this.config=o,this.am=r,r.setTarget(n.target),r.onClick(n.onClick),r.onDblClick(n.onDblClick),r.onSelect(n.onSelect),r.__behaviour({select:c,types:s,options:n}),o.custom)this.rendered=this.rendered||Object(i["f"])('div'),this.rendered.className="".concat(o.stylePrefix,"custom-wrp"),r.__behaviour({container:this.rendered}),r.__trgCustom();else{if(!this.rendered||s){var u=r.getAll().filter((function(e){return e}));s&&s.length&&(u=u.filter((function(e){return-1!==s.indexOf(e.get('type'))}))),r.render(u),this.rendered=r.getContainer()}if(l){var f=this.rendered.querySelector("input#".concat(o.stylePrefix,"uploadFile"));f&&f.setAttribute('accept',l)}}return this.open(this.rendered),this},stop:function(e){this.editor=e,this.close(this.rendered)}}},function(e,t,n){"use strict";n.r(t);var r=n(0),i=n(18);t["default"]={open:function(){var e=this.container,t=this.editor,n=this.bm,i=this.config,o=i.custom,a=i.appendTo;if(Object(r["isFunction"])(o.open))return o.open(n.__customData());if(this.firstRender&&!a){var s='views-container',l=t.Panels;(l.getPanel(s)||l.addPanel({id:s})).set('appendContent',e).trigger('change:appendContent'),o||e.appendChild(n.render())}e&&(e.style.display='block')},close:function(){var e=this.container,t=this.config.custom;if(Object(r["isFunction"])(t.close))return t.close(this.bm.__customData());e&&(e.style.display='none')},run:function(e){var t=e.Blocks;this.config=t.getConfig(),this.firstRender=!this.container,this.container=this.container||Object(i["f"])('div'),this.editor=e,this.bm=t;var n=this.container;t.__behaviour({container:n}),this.config.custom&&t.__trgCustom(),this.open()},stop:function(){this.close()}}},function(e,t,n){"use strict";n.r(t),t["default"]={run:function(e){var t=e.LayerManager,n=e.Panels;if(!t.getConfig().appendTo){if(!this.layers){var r='views-container',i=document.createElement('div'),o=n.getPanel(r)||n.addPanel({id:r});i.appendChild(t.render()),o.set('appendContent',i).trigger('change:appendContent'),this.layers=i}this.layers.style.display='block'}},stop:function(){var e=this.layers;e&&(e.style.display='none')}}},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r).a.$;t["default"]={run:function(e,t){if(this.sender=t,!this.$cn){var n=e.getConfig(),r=e.Panels,o='change:appendContent';this.$cn=i('<div></div>'),this.$cn2=i('<div></div>'),this.$cn.append(this.$cn2);var a=e.DeviceManager;if(a&&n.showDevices){var s=r.addPanel({id:'devices-c'}),l=a.render();s.set('appendContent',l).trigger(o)}var c=e.SelectorManager;this.slm=c;var u=c.getConfig();u.custom?c.__trgCustom({container:this.$cn2.get(0)}):u.appendTo||this.$cn2.append(c.render([]));var f=e.StyleManager;this.sm=f;var d=f.getConfig(),h=d.stylePrefix;this.$header=i("<div class=\"".concat(h,"header\">").concat(e.t('styleManager.empty'),"</div>")),this.$cn.append(this.$header),d.custom?f.__trgCustom({container:this.$cn2.get(0)}):d.appendTo||this.$cn2.append(f.render());var p='views-container';this.panel=r.getPanel(p),this.panel||(this.panel=r.addPanel({id:p})),this.panel.set('appendContent',this.$cn).trigger(o),this.em=e.getModel(),this.listenTo(this.em,f.events.target,this.toggleSm)}this.toggleSm()},toggleSm:function(){var e,t,n,r,i=this.sender,o=this.sm;i&&i.get&&!i.get('active')||!o||(o.getSelected()?(null===(e=this.$cn2)||void 0===e||e.show(),null===(t=this.$header)||void 0===t||t.hide()):(null===(n=this.$cn2)||void 0===n||n.hide(),null===(r=this.$header)||void 0===r||r.show()))},stop:function(){var e,t;null===(e=this.$cn2)||void 0===e||e.hide(),null===(t=this.$header)||void 0===t||t.hide()}}},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n.n(r).a.$;t["default"]={run:function(e,t){this.sender=t;var n=e.getModel(),r=e.Config.stylePrefix,o=e.TraitManager,a=o.getConfig();if(!a.appendTo){if(!this.$cn){this.$cn=i('<div></div>'),this.$cn2=i('<div></div>'),this.$cn.append(this.$cn2),this.$header=i('<div>').append("<div class=\"".concat(a.stylePrefix,"header\">").concat(n.t('traitManager.empty'),"</div>")),this.$cn.append(this.$header),this.$cn2.append("<div class=\"".concat(r,"traits-label\">").concat(n.t('traitManager.label'),"</div>")),this.$cn2.append(o.render());var s=e.Panels;(s.getPanel('views-container')?s.getPanel('views-container'):s.addPanel({id:'views-container'})).set('appendContent',this.$cn.get(0)).trigger('change:appendContent'),this.target=e.getModel(),this.listenTo(this.target,'component:toggled',this.toggleTm)}this.toggleTm()}},toggleTm:function(){var e=this.sender;e&&e.get&&!e.get('active')||(1===this.target.getSelectedAll().length?(this.$cn2.show(),this.$header.hide()):(this.$cn2.hide(),this.$header.show()))},stop:function(){this.$cn2&&this.$cn2.hide(),this.$header&&this.$header.hide()}}},function(e,t,n){"use strict";n.r(t);var r=n(0);t["default"]={run:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=e.getModel(),o=i.get('clipboard'),a=e.getSelected();o&&a&&(e.getSelectedAll().forEach((function(t){if(t){var i=t.collection;if(i){var a,s={at:i.indexOf(t)+1,action:n.action||'paste-component'},l=o.filter((function(e){return e.get('copyable')}));a=Object(r["contains"])(o,t)&&t.get('copyable')?i.add(t.clone(),s):i.add(l.map((function(e){return e.clone()})),s),(a=Object(r["isArray"])(a)?a:[a]).forEach((function(t){return e.trigger('component:paste',t)}))}}})),a.emitUpdate())}}},function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r),o=n(0),a='sw-visibility';t["default"]={getPanels:function(e){return this.panels||(this.panels=e.Panels.getPanels()),this.panels},preventDrag:function(e){e.abort=1},tglEffects:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e?'on':'off';if(t){var r=t.get('Canvas'),i=r.getBody(),a=r.getToolbarEl();a&&(a.style.display=e?'none':'');var s=i.querySelectorAll(".".concat(this.ppfx,"no-pointer"));Object(o["each"])(s,(function(t){return t.style.pointerEvents=e?'all':''})),t[n]('run:tlb-move:before',this.preventDrag)}},run:function(e,t){this.sender=t,this.selected=i()(e.getSelectedAll()),e.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=e.Commands.isActive(a)),this.shouldRunSwVisibility&&e.stopCommand(a),e.getModel().stopDefault();this.getPanels(e);var n=e.Canvas.getElement(),r=(e.getEl(),e.Config.stylePrefix,n.style);r.width='100%',r.height='100%',r.top='0',r.left='0',r.padding='0',r.margin='0',e.refresh(),this.tglEffects(1,e.getModel())},stop:function(e){var t=this.sender,n=void 0===t?{}:t,r=this.selected;n.set&&n.set('active',0);var i=this.getPanels(e);this.shouldRunSwVisibility&&(e.runCommand(a),this.shouldRunSwVisibility=!1),e.getModel().runDefault(),i.forEach((function(e){return e.set('visible',!0)})),e.Canvas.getElement().setAttribute('style',''),r&&e.select(r),delete this.selected,this.helper&&(this.helper.style.display='none'),e.refresh(),this.tglEffects(0,e.getModel())}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r);function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}t["default"]={run:function(e,t,n){var r=n||{},a=e.Canvas,s=a.getCanvasView(),l=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({appendTo:a.getResizerEl(),prefix:e.getConfig().stylePrefix,posFetcher:s.getElementPos.bind(s),mousePosFetcher:a.getMouseRelativePos},r.options||{}),c=this.canvasResizer;return c&&!r.forceNew||(this.canvasResizer=e.Utils.Resizer.init(l),c=this.canvasResizer),c.setOptions(l),c.blur(),c.focus(r.el),c},stop:function(){var e;null===(e=this.canvasResizer)||void 0===e||e.blur()}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(4),a=n.n(o),s=n(0),l=n(1);function c(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var u=a.a.$;t["default"]={getOffsetMethod:function(e){return'get'+(e||'')+'OffsetViewerEl'},run:function(e,t,n){var r=n||{},o=r.state||'',a=e.getConfig(),f=this.em.getZoomDecimal(),d=r.el||'';if(!a.showOffsets||Object(l["isTextNode"])(d)||!a.showOffsetsSelected&&'Fixed'==o)e.stopCommand(this.id,n);else{var h=e.Canvas,p=function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?c(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):c(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},r.elPos||h.getElementPos(d));Object(s["isUndefined"])(r.top)||(p.top=r.top),Object(s["isUndefined"])(r.left)||(p.left=r.left);var g=window.getComputedStyle(d),v=this.ppfx,m=o+'State',y=h[this.getOffsetMethod(o)](n.view);y.style.opacity='';var b=this['marginT'+o],w=this['marginB'+o],O=this['marginL'+o],x=this['marginR'+o],k=this['padT'+o],C=this['padB'+o],S=this['padL'+o],j=this['padR'+o];if(y.childNodes.length&&(this[m]='1',b=y.querySelector('[data-offset-m-t]'),w=y.querySelector('[data-offset-m-b]'),O=y.querySelector('[data-offset-m-l]'),x=y.querySelector('[data-offset-m-r]'),k=y.querySelector('[data-offset-p-t]'),C=y.querySelector('[data-offset-p-b]'),S=y.querySelector('[data-offset-p-l]'),j=y.querySelector('[data-offset-p-r]')),!this[m]){var E=o.toLowerCase(),P=E+'margin-v',_=E+'padding-v',T=u("<div class=\"".concat(v,"marginName\">")).get(0),A=u("<div class=\"".concat(v,"paddingName\">")).get(0),M=v+_+'-el',D="".concat(v+P+'-el'," ").concat(v+P),L="".concat(M," ").concat(v+_);b=u("<div class=\"".concat(D,"-top\"></div>")).get(0),w=u("<div class=\"".concat(D,"-bottom\"></div>")).get(0),O=u("<div class=\"".concat(D,"-left\"></div>")).get(0),x=u("<div class=\"".concat(D,"-right\"></div>")).get(0),k=u("<div class=\"".concat(L,"-top\"></div>")).get(0),C=u("<div class=\"".concat(L,"-bottom\"></div>")).get(0),S=u("<div class=\"".concat(L,"-left\"></div>")).get(0),j=u("<div class=\"".concat(L,"-right\"></div>")).get(0),this['marginT'+o]=b,this['marginB'+o]=w,this['marginL'+o]=O,this['marginR'+o]=x,this['padT'+o]=k,this['padB'+o]=C,this['padL'+o]=S,this['padR'+o]=j,T.appendChild(b),T.appendChild(w),T.appendChild(O),T.appendChild(x),A.appendChild(k),A.appendChild(C),A.appendChild(S),A.appendChild(j),y.appendChild(T),y.appendChild(A),this[m]='1'}var N='px',R=parseFloat(g.marginLeft.replace(N,''))*f,F=parseFloat(g.marginRight.replace(N,''))*f,I=parseFloat(g.marginTop.replace(N,''))*f,z=parseFloat(g.marginBottom.replace(N,''))*f,V=b.style,B=w.style,U=O.style,H=x.style,W=k.style,$=C.style,q=S.style,K=j.style,G=parseFloat(p.left),Y=parseFloat(g.width)*f+N;V.height=I+N,V.width=Y,V.top=p.top-I+N,V.left=G+N,B.height=z+N,B.width=Y,B.top=p.top+p.height+N,B.left=G+N;var J=p.height+I+z+N,X=p.top-I+N;U.height=J,U.width=R+N,U.top=X,U.left=G-R+N,H.height=J,H.width=F+N,H.top=X,H.left=G+p.width+N;var Q=parseFloat(g.paddingTop)*f;W.height=Q+N;var Z=parseFloat(g.paddingBottom)*f;$.height=Z+N;var ee=p.height-Z-Q+N,te=p.top+Q+N;q.height=ee,q.width=parseFloat(g.paddingLeft)*f+N,q.top=te;var ne=parseFloat(g.paddingRight)*f;K.height=ee,K.width=ne+N,K.top=te}},stop:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n||{},i=r.state||'',o=this.getOffsetMethod(i),a=e.Canvas,s=a[o](n.view);s.style.opacity=0}}},function(e,t,n){"use strict";n.r(t);var r=n(0);t["default"]={init:function(){Object(r["bindAll"])(this,'_onFramesChange')},run:function(e){this.toggleVis(e)},stop:function(e){this.toggleVis(e,0)},toggleVis:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1;if(!e.Commands.isActive('preview')){var r=e.Canvas,i=n?'on':'off';r.getFrames().forEach((function(e){return t._upFrame(e,n)})),r.getModel()[i]('change:frames',this._onFramesChange)}},_onFramesChange:function(e,t){var n=this;t.forEach((function(e){return n._upFrame(e,1)}))},_upFrame:function(e,t){var n=t?'add':'remove';e.view.getBody().classList[n]("".concat(this.ppfx,"dashed"))}}},function(e,t,n){var r=n(105),i=n(173);e.exports=r.Stomp,e.exports.overTCP=i.overTCP,e.exports.overWS=i.overWS},function(e,t,n){"use strict";(function(t){var r=n(178);e.exports=n(193)(r),'_sockjs_onload'in t&&setTimeout(t._sockjs_onload,1)}).call(this,n(23))},function(e,t,n){var r,i,o;1&&(i=[n(0),n(4)],void 0===(o='function'==typeof(r=function(e,t){var n=Array.prototype.slice;function r(e,t,n){return n.length<=4?e.call(t,n[0],n[1],n[2],n[3]):e.apply(t,n)}function i(e,t){return n.call(e,t)}function o(t,n){return null!=t&&(e.isArray(n)||(n=i(arguments,1)),e.all(n,(function(e){return e in t})))}var a,s,l=(a=!1,s=-1,function(){return a||(s++,a=!0,e.defer((function(){a=!1}))),s});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(t,n,r,i){for(var o,a=0,s=n.length;a<s;a++)if(o=n[a]){if("on"===t){if(!i.objectRegistry.register(o))continue}else if(!i.objectRegistry.unregister(o))continue;e.isFunction(o[t])&&o[t]("all",r,i)}}function f(t,n){var r=n.type,i=n.undoTypes,o=!i[r]||i[r][t];e.isFunction(o)&&o(n.object,n.before,n.after,n.options)}function d(t,r,i,o,a){if(!(i.isCurrentlyUndoRedoing||"undo"===t&&-1===i.pointer||"redo"===t&&i.pointer===i.length-1)){i.isCurrentlyUndoRedoing=!0;var s,l,c="undo"===t;for(a?l=c&&i.pointer===i.length-1||!c&&-1===i.pointer?e.clone(i.models):n.apply(i.models,c?[0,i.pointer]:[i.pointer,i.length-1]):(s=i.at(c?i.pointer:i.pointer+1),l=o?i.where({magicFusionIndex:s.get("magicFusionIndex")}):[s]),i.pointer+=(c?-1:1)*l.length;s=c?l.pop():l.shift();)s[t]();i.isCurrentlyUndoRedoing=!1,r.trigger(t,r)}}function h(e,t,n,i){if(e.track&&!e.isCurrentlyUndoRedoing&&t in i&&function(e,t){var n=e.condition,i=typeof n;return"function"===i?!!r(n,e,t):"boolean"!==i||n}(i[t],n)){var a=r(i[t]["on"],i[t],n);if(o(a,"object","before","after")){if(a.type=t,a.magicFusionIndex=l(),a.undoTypes=i,e.pointer<e.length-1)for(var s=e.length-e.pointer-1;s--;)e.pop();e.pointer=e.length,e.add(a),e.length>e.maximumStackLength&&(e.shift(),e.pointer--)}}}c.prototype={isRegistered:function(t){return t&&t.cid?this.registeredObjects[t.cid]:e.contains(this.registeredObjects,t)},register:function(e){return!this.isRegistered(e)&&(e&&e.cid?(this.registeredObjects[e.cid]=e,this.cidIndexes.push(e.cid)):this.registeredObjects.push(e),!0)},unregister:function(t){if(this.isRegistered(t)){if(t&&t.cid)delete this.registeredObjects[t.cid],this.cidIndexes.splice(e.indexOf(this.cidIndexes,t.cid),1);else{var n=e.indexOf(this.registeredObjects,t);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return e.map(this.cidIndexes,(function(e){return this.registeredObjects[e]}),this).concat(this.registeredObjects)}};var p={add:{undo:function(e,t,n,r){e.remove(n,r)},redo:function(e,t,n,r){r.index&&(r.at=r.index),e.add(n,r)},on:function(t,n,r){return{object:n,before:void 0,after:t,options:e.clone(r)}}},remove:{undo:function(e,t,n,r){"index"in r&&(r.at=r.index),e.add(t,r)},redo:function(e,t,n,r){e.remove(t,r)},on:function(t,n,r){return{object:n,before:t,after:void 0,options:e.clone(r)}}},change:{undo:function(t,n,r,i){e.isEmpty(n)?e.each(e.keys(r),t.unset,t):(t.set(n),i&&i.unsetData&&i.unsetData.before&&i.unsetData.before.length&&e.each(i.unsetData.before,t.unset,t))},redo:function(t,n,r,i){e.isEmpty(r)?e.each(e.keys(n),t.unset,t):(t.set(r),i&&i.unsetData&&i.unsetData.after&&i.unsetData.after.length&&e.each(i.unsetData.after,t.unset,t))},on:function(t,n){var r=t.changedAttributes(),i=e.keys(r),o=e.pick(t.previousAttributes(),i),a=e.keys(o),s=(n||(n={})).unsetData={after:[],before:[]};return i.length!=a.length&&(i.length>a.length?e.each(i,(function(e){e in o||s.before.push(e)}),this):e.each(a,(function(e){e in r||s.after.push(e)}))),{object:t,before:o,after:r,options:e.clone(n)}}},reset:{undo:function(e,t,n){e.reset(t)},redo:function(e,t,n){e.reset(n)},on:function(t,n){return{object:t,before:n.previousModels,after:e.clone(t.models)}}}};function g(){}function v(t,n,r,i){if("object"==typeof n)return e.each(n,(function(e,n){2===t?v(t,e,r,i):v(t,n,e,r)}));switch(t){case 0:o(r,"undo","redo","on")&&e.all(e.pick(r,"undo","redo","on"),e.isFunction)&&(i[n]=r);break;case 1:i[n]&&e.isObject(r)&&(i[n]=e.extend({},i[n],r));break;case 2:delete i[n]}return this}g.prototype=p;var m=t.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(e){f("undo",this.attributes)},redo:function(e){f("redo",this.attributes)}}),y=t.Collection.extend({model:m,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(e){this.maximumStackLength=e}}),b=t.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(t){this.stack=new y,this.objectRegistry=new c,this.undoTypes=new g,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",(function(e,t){this.stack.setMaxLength(t)}),this),t&&t.track&&this.startTracking(),t&&t.register&&(e.isArray(t.register)||e.isArguments(t.register)?r(this.register,this,t.register):this.register(t.register))},startTracking:function(){this.set("track",!0),this.stack.track=!0},stopTracking:function(){this.set("track",!1),this.stack.track=!1},isTracking:function(){return this.get("track")},_addToStack:function(e){h(this.stack,e,i(arguments,1),this.undoTypes)},register:function(){u("on",arguments,this._addToStack,this)},unregister:function(){u("off",arguments,this._addToStack,this)},unregisterAll:function(){r(this.unregister,this,this.objectRegistry.get())},undo:function(e){d("undo",this,this.stack,e)},undoAll:function(){d("undo",this,this.stack,!1,!0)},redo:function(e){d("redo",this,this.stack,e)},redoAll:function(){d("redo",this,this.stack,!1,!0)},isAvailable:function(e){var t=this.stack,n=t.length;switch(e){case"undo":return n>0&&t.pointer>-1;case"redo":return n>0&&t.pointer<n-1;default:return!1}},merge:function(t){for(var n,r=e.isArray(t)?t:i(arguments);n=r.pop();)n instanceof b&&n.stack instanceof y&&(n.stack=this.stack)},addUndoType:function(e,t){v(0,e,t,this.undoTypes)},changeUndoType:function(e,t){v(1,e,t,this.undoTypes)},removeUndoType:function(e){v(2,e,void 0,this.undoTypes)},clear:function(){this.stack.reset(),this.stack.pointer=-1}});return e.extend(b,{defaults:function(t){e.extend(b.prototype.defaults,t)},addUndoType:function(e,t){v(0,e,t,p)},changeUndoType:function(e,t){v(1,e,t,p)},removeUndoType:function(e){v(2,e,void 0,p)}}),t.UndoManager=b})?r.apply(t,i):r)||(e.exports=o))},function(e,t,n){"use strict";t["a"]=function(e){var t=this.constructor;return this.then((function(n){return t.resolve(e()).then((function(){return n}))}),(function(n){return t.resolve(e()).then((function(){return t.reject(n)}))}))}},function(e,t,n){"use strict";var r=n(22),i=n.n(r);t["a"]=function(e){return new this((function(t,n){if(!e||void 0===e.length)return n(new TypeError(i()(e)+' '+e+' is not iterable(cannot read property Symbol(Symbol.iterator))'));var r=Array.prototype.slice.call(e);if(0===r.length)return t([]);var o=r.length;function a(e,n){if(n&&('object'===i()(n)||'function'==typeof n)){var s=n.then;if('function'==typeof s)return void s.call(n,(function(t){a(e,t)}),(function(n){r[e]={status:'rejected',reason:n},0==--o&&t(r)}))}r[e]={status:'fulfilled',value:n},0==--o&&t(r)}for(var s=0;s<r.length;s++)a(s,r[s])}))}},function(e,t,n){"use strict";n.d(t,"a",(function(){return o}));var r=n(63),i=n.n(r);function o(e){return e instanceof HTMLElement?e:i.a.findDOMNode(e)}},function(e,t,n){"use strict";n.d(t,"a",(function(){return a}));var r=n(2),i=n.n(r),o=n(84);function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[];return i.a.Children.forEach(e,(function(e){(null!=e||t.keepEmpty)&&(Array.isArray(e)?n=n.concat(a(e)):Object(o["isFragment"])(e)&&e.props?n=n.concat(a(e.props.children,t)):n.push(e))})),n}},function(e,t,n){"use strict";n.d(t,"a",(function(){return s}));var r=n(82),i=n(86),o=n(64),a=n(83);function s(e){return Object(r["a"])(e)||Object(i["a"])(e)||Object(o["a"])(e)||Object(a["a"])()}},function(e,t,n){"use strict";(function(e){function r(){return(r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function i(e){return(i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function o(e,t){return(o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e})(e,t)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}function s(e,t,n){return(s=a()?Reflect.construct.bind():function(e,t,n){var r=[null];r.push.apply(r,t);var i=new(Function.bind.apply(e,r));return n&&o(i,n.prototype),i}).apply(null,arguments)}function l(e){var t="function"==typeof Map?new Map:void 0;return(l=function(e){if(null===e||(n=e,-1===Function.toString.call(n).indexOf("[native code]")))return e;var n;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,r)}function r(){return s(e,arguments,i(this).constructor)}return r.prototype=Object.create(e.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),o(r,e)})(e)}n.d(t,"a",(function(){return A}));var c=/%[sdj%]/g,u=function(){};function f(e){if(!e||!e.length)return null;var t={};return e.forEach((function(e){var n=e.field;t[n]=t[n]||[],t[n].push(e)})),t}function d(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];var i=0,o=n.length;if('function'==typeof e)return e.apply(null,n);if('string'==typeof e){var a=e.replace(c,(function(e){if('%%'===e)return'%';if(i>=o)return e;switch(e){case'%s':return String(n[i++]);case'%d':return Number(n[i++]);case'%j':try{return JSON.stringify(n[i++])}catch(e){return'[Circular]'}break;default:return e}}));return a}return e}function h(e,t){return null==e||(!('array'!==t||!Array.isArray(e)||e.length)||!(!function(e){return'string'===e||'url'===e||'hex'===e||'email'===e||'date'===e||'pattern'===e}(t)||'string'!=typeof e||e))}function p(e,t,n){var r=0,i=e.length;!function o(a){if(a&&a.length)n(a);else{var s=r;r+=1,s<i?t(e[s],o):n([])}}([])}void 0!==e&&e.env&&"production"!='production'&&'undefined'!=typeof window&&'undefined'!=typeof document&&(u=function(e,t){'undefined'!=typeof console&&console.warn&&'undefined'==typeof ASYNC_VALIDATOR_NO_WARNING&&t.every((function(e){return'string'==typeof e}))&&console.warn(e,t)});var g=function(e){var t,n;function r(t,n){var r;return(r=e.call(this,'Async Validation Error')||this).errors=t,r.fields=n,r}return n=e,(t=r).prototype=Object.create(n.prototype),t.prototype.constructor=t,o(t,n),r}(l(Error));function v(e,t,n,r,i){if(t.first){var o=new Promise((function(t,o){p(function(e){var t=[];return Object.keys(e).forEach((function(n){t.push.apply(t,e[n]||[])})),t}(e),n,(function(e){return r(e),e.length?o(new g(e,f(e))):t(i)}))}));return o["catch"]((function(e){return e})),o}var a=!0===t.firstFields?Object.keys(e):t.firstFields||[],s=Object.keys(e),l=s.length,c=0,u=[],d=new Promise((function(t,o){var d=function(e){if(u.push.apply(u,e),++c===l)return r(u),u.length?o(new g(u,f(u))):t(i)};s.length||(r(u),t(i)),s.forEach((function(t){var r=e[t];-1!==a.indexOf(t)?p(r,n,d):function(e,t,n){var r=[],i=0,o=e.length;function a(e){r.push.apply(r,e||[]),++i===o&&n(r)}e.forEach((function(e){t(e,a)}))}(r,n,d)}))}));return d["catch"]((function(e){return e})),d}function m(e,t){return function(n){var r,i;return r=e.fullFields?function(e,t){for(var n=e,r=0;r<t.length;r++){if(null==n)return n;n=n[t[r]]}return n}(t,e.fullFields):t[n.field||e.fullField],(i=n)&&void 0!==i.message?(n.field=n.field||e.fullField,n.fieldValue=r,n):{message:'function'==typeof n?n():n,fieldValue:r,field:n.field||e.fullField}}}function y(e,t){if(t)for(var n in t)if(t.hasOwnProperty(n)){var i=t[n];'object'==typeof i&&'object'==typeof e[n]?e[n]=r({},e[n],i):e[n]=i}return e}var b,w=function(e,t,n,r,i,o){!e.required||n.hasOwnProperty(e.field)&&!h(t,o||e.type)||r.push(d(i.messages.required,e.fullField))},O=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+\.)+[a-zA-Z\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}))$/,x=/^#?([a-f0-9]{6}|[a-f0-9]{3})$/i,k={integer:function(e){return k.number(e)&&parseInt(e,10)===e},float:function(e){return k.number(e)&&!k.integer(e)},array:function(e){return Array.isArray(e)},regexp:function(e){if(e instanceof RegExp)return!0;try{return!!new RegExp(e)}catch(e){return!1}},date:function(e){return'function'==typeof e.getTime&&'function'==typeof e.getMonth&&'function'==typeof e.getYear&&!isNaN(e.getTime())},number:function(e){return!isNaN(e)&&'number'==typeof e},object:function(e){return'object'==typeof e&&!k.array(e)},method:function(e){return'function'==typeof e},email:function(e){return'string'==typeof e&&e.length<=320&&!!e.match(O)},url:function(e){return'string'==typeof e&&e.length<=2048&&!!e.match(function(){if(b)return b;var e='[a-fA-F\\d:]',t=function(t){return t&&t.includeBoundaries?"(?:(?<=\\s|^)(?="+e+")|(?<="+e+")(?=\\s|$))":''},n='(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}',r='[a-fA-F\\d]{1,4}',i=("\n(?:\n(?:"+r+":){7}(?:"+r+"|:)|                                    // 1:2:3:4:5:6:7::  1:2:3:4:5:6:7:8\n(?:"+r+":){6}(?:"+n+"|:"+r+"|:)|                             // 1:2:3:4:5:6::    1:2:3:4:5:6::8   1:2:3:4:5:6::8  1:2:3:4:5:6::1.2.3.4\n(?:"+r+":){5}(?::"+n+"|(?::"+r+"){1,2}|:)|                   // 1:2:3:4:5::      1:2:3:4:5::7:8   1:2:3:4:5::8    1:2:3:4:5::7:1.2.3.4\n(?:"+r+":){4}(?:(?::"+r+"){0,1}:"+n+"|(?::"+r+"){1,3}|:)| // 1:2:3:4::        1:2:3:4::6:7:8   1:2:3:4::8      1:2:3:4::6:7:1.2.3.4\n(?:"+r+":){3}(?:(?::"+r+"){0,2}:"+n+"|(?::"+r+"){1,4}|:)| // 1:2:3::          1:2:3::5:6:7:8   1:2:3::8        1:2:3::5:6:7:1.2.3.4\n(?:"+r+":){2}(?:(?::"+r+"){0,3}:"+n+"|(?::"+r+"){1,5}|:)| // 1:2::            1:2::4:5:6:7:8   1:2::8          1:2::4:5:6:7:1.2.3.4\n(?:"+r+":){1}(?:(?::"+r+"){0,4}:"+n+"|(?::"+r+"){1,6}|:)| // 1::              1::3:4:5:6:7:8   1::8            1::3:4:5:6:7:1.2.3.4\n(?::(?:(?::"+r+"){0,5}:"+n+"|(?::"+r+"){1,7}|:))             // ::2:3:4:5:6:7:8  ::2:3:4:5:6:7:8  ::8             ::1.2.3.4\n)(?:%[0-9a-zA-Z]{1,})?                                             // %eth0            %1\n").replace(/\s*\/\/.*$/gm,'').replace(/\n/g,'').trim(),o=new RegExp("(?:^"+n+"$)|(?:^"+i+"$)"),a=new RegExp("^"+n+"$"),s=new RegExp("^"+i+"$"),l=function(e){return e&&e.exact?o:new RegExp("(?:"+t(e)+n+t(e)+")|(?:"+t(e)+i+t(e)+")",'g')};l.v4=function(e){return e&&e.exact?a:new RegExp(""+t(e)+n+t(e),'g')},l.v6=function(e){return e&&e.exact?s:new RegExp(""+t(e)+i+t(e),'g')};var c=l.v4().source,u=l.v6().source;return b=new RegExp("(?:^"+("(?:"+"(?:(?:[a-z]+:)?//)"+"|www\\.)"+'(?:\\S+(?::\\S*)?@)?'+"(?:localhost|"+c+"|"+u+"|"+"(?:(?:[a-z\\u00a1-\\uffff0-9][-_]*)*[a-z\\u00a1-\\uffff0-9]+)"+"(?:\\.(?:[a-z\\u00a1-\\uffff0-9]-*)*[a-z\\u00a1-\\uffff0-9]+)*"+"(?:\\.(?:[a-z\\u00a1-\\uffff]{2,}))"+")"+'(?::\\d{2,5})?'+'(?:[/?#][^\\s"]*)?')+"$)",'i')}())},hex:function(e){return'string'==typeof e&&!!e.match(x)}},C='enum',S={required:w,whitespace:function(e,t,n,r,i){(/^\s+$/.test(t)||''===t)&&r.push(d(i.messages.whitespace,e.fullField))},type:function(e,t,n,r,i){if(e.required&&void 0===t)w(e,t,n,r,i);else{var o=e.type;['integer','float','array','regexp','object','method','email','number','date','url','hex'].indexOf(o)>-1?k[o](t)||r.push(d(i.messages.types[o],e.fullField,e.type)):o&&typeof t!==e.type&&r.push(d(i.messages.types[o],e.fullField,e.type))}},range:function(e,t,n,r,i){var o='number'==typeof e.len,a='number'==typeof e.min,s='number'==typeof e.max,l=t,c=null,u='number'==typeof t,f='string'==typeof t,h=Array.isArray(t);if(u?c='number':f?c='string':h&&(c='array'),!c)return!1;h&&(l=t.length),f&&(l=t.replace(/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,'_').length),o?l!==e.len&&r.push(d(i.messages[c].len,e.fullField,e.len)):a&&!s&&l<e.min?r.push(d(i.messages[c].min,e.fullField,e.min)):s&&!a&&l>e.max?r.push(d(i.messages[c].max,e.fullField,e.max)):a&&s&&(l<e.min||l>e.max)&&r.push(d(i.messages[c].range,e.fullField,e.min,e.max))},enum:function(e,t,n,r,i){e[C]=Array.isArray(e[C])?e[C]:[],-1===e[C].indexOf(t)&&r.push(d(i.messages[C],e.fullField,e[C].join(', ')))},pattern:function(e,t,n,r,i){if(e.pattern)if(e.pattern instanceof RegExp)e.pattern.lastIndex=0,e.pattern.test(t)||r.push(d(i.messages.pattern.mismatch,e.fullField,t,e.pattern));else if('string'==typeof e.pattern){new RegExp(e.pattern).test(t)||r.push(d(i.messages.pattern.mismatch,e.fullField,t,e.pattern))}}},j='enum',E=function(e,t,n,r,i){var o=e.type,a=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t,o)&&!e.required)return n();S.required(e,t,r,a,i,o),h(t,o)||S.type(e,t,r,a,i)}n(a)},P={string:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t,'string')&&!e.required)return n();S.required(e,t,r,o,i,'string'),h(t,'string')||(S.type(e,t,r,o,i),S.range(e,t,r,o,i),S.pattern(e,t,r,o,i),!0===e.whitespace&&S.whitespace(e,t,r,o,i))}n(o)},method:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&S.type(e,t,r,o,i)}n(o)},number:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(''===t&&(t=void 0),h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&(S.type(e,t,r,o,i),S.range(e,t,r,o,i))}n(o)},boolean:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&S.type(e,t,r,o,i)}n(o)},regexp:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),h(t)||S.type(e,t,r,o,i)}n(o)},integer:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&(S.type(e,t,r,o,i),S.range(e,t,r,o,i))}n(o)},float:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&(S.type(e,t,r,o,i),S.range(e,t,r,o,i))}n(o)},array:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(null==t&&!e.required)return n();S.required(e,t,r,o,i,'array'),null!=t&&(S.type(e,t,r,o,i),S.range(e,t,r,o,i))}n(o)},object:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&S.type(e,t,r,o,i)}n(o)},enum:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i),void 0!==t&&S[j](e,t,r,o,i)}n(o)},pattern:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t,'string')&&!e.required)return n();S.required(e,t,r,o,i),h(t,'string')||S.pattern(e,t,r,o,i)}n(o)},date:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t,'date')&&!e.required)return n();var a;if(S.required(e,t,r,o,i),!h(t,'date'))a=t instanceof Date?t:new Date(t),S.type(e,a,r,o,i),a&&S.range(e,a.getTime(),r,o,i)}n(o)},url:E,hex:E,email:E,required:function(e,t,n,r,i){var o=[],a=Array.isArray(t)?'array':typeof t;S.required(e,t,r,o,i,a),n(o)},any:function(e,t,n,r,i){var o=[];if(e.required||!e.required&&r.hasOwnProperty(e.field)){if(h(t)&&!e.required)return n();S.required(e,t,r,o,i)}n(o)}};function _(){return{default:'Validation error on field %s',required:'%s is required',enum:'%s must be one of %s',whitespace:'%s cannot be empty',date:{format:'%s date %s is invalid for format %s',parse:'%s date could not be parsed, %s is invalid ',invalid:'%s date %s is invalid'},types:{string:'%s is not a %s',method:'%s is not a %s (function)',array:'%s is not an %s',object:'%s is not an %s',number:'%s is not a %s',date:'%s is not a %s',boolean:'%s is not a %s',integer:'%s is not an %s',float:'%s is not a %s',regexp:'%s is not a valid %s',email:'%s is not a valid %s',url:'%s is not a valid %s',hex:'%s is not a valid %s'},string:{len:'%s must be exactly %s characters',min:'%s must be at least %s characters',max:'%s cannot be longer than %s characters',range:'%s must be between %s and %s characters'},number:{len:'%s must equal %s',min:'%s cannot be less than %s',max:'%s cannot be greater than %s',range:'%s must be between %s and %s'},array:{len:'%s must be exactly %s in length',min:'%s cannot be less than %s in length',max:'%s cannot be greater than %s in length',range:'%s must be between %s and %s in length'},pattern:{mismatch:'%s value %s does not match pattern %s'},clone:function(){var e=JSON.parse(JSON.stringify(this));return e.clone=this.clone,e}}}var T=_(),A=function(){function e(e){this.rules=null,this._messages=T,this.define(e)}var t=e.prototype;return t.define=function(e){var t=this;if(!e)throw new Error('Cannot configure a schema with no rules');if('object'!=typeof e||Array.isArray(e))throw new Error('Rules must be an object');this.rules={},Object.keys(e).forEach((function(n){var r=e[n];t.rules[n]=Array.isArray(r)?r:[r]}))},t.messages=function(e){return e&&(this._messages=y(_(),e)),this._messages},t.validate=function(t,n,i){var o=this;void 0===n&&(n={}),void 0===i&&(i=function(){});var a=t,s=n,l=i;if('function'==typeof s&&(l=s,s={}),!this.rules||0===Object.keys(this.rules).length)return l&&l(null,a),Promise.resolve(a);if(s.messages){var c=this.messages();c===T&&(c=_()),y(c,s.messages),s.messages=c}else s.messages=this.messages();var u={};(s.keys||Object.keys(this.rules)).forEach((function(e){var n=o.rules[e],i=a[e];n.forEach((function(n){var s=n;'function'==typeof s.transform&&(a===t&&(a=r({},a)),i=a[e]=s.transform(i)),(s='function'==typeof s?{validator:s}:r({},s)).validator=o.getValidationMethod(s),s.validator&&(s.field=e,s.fullField=s.fullField||e,s.type=o.getType(s),u[e]=u[e]||[],u[e].push({rule:s,value:i,source:a,field:e}))}))}));var h={};return v(u,s,(function(t,n){var i,o=t.rule,l=!('object'!==o.type&&'array'!==o.type||'object'!=typeof o.fields&&'object'!=typeof o.defaultField);function c(e,t){return r({},t,{fullField:o.fullField+"."+e,fullFields:o.fullFields?[].concat(o.fullFields,[e]):[e]})}function u(i){void 0===i&&(i=[]);var u=Array.isArray(i)?i:[i];!s.suppressWarning&&u.length&&e.warning('async-validator:',u),u.length&&void 0!==o.message&&(u=[].concat(o.message));var f=u.map(m(o,a));if(s.first&&f.length)return h[o.field]=1,n(f);if(l){if(o.required&&!t.value)return void 0!==o.message?f=[].concat(o.message).map(m(o,a)):s.error&&(f=[s.error(o,d(s.messages.required,o.field))]),n(f);var p={};o.defaultField&&Object.keys(t.value).map((function(e){p[e]=o.defaultField})),p=r({},p,t.rule.fields);var g={};Object.keys(p).forEach((function(e){var t=p[e],n=Array.isArray(t)?t:[t];g[e]=n.map(c.bind(null,e))}));var v=new e(g);v.messages(s.messages),t.rule.options&&(t.rule.options.messages=s.messages,t.rule.options.error=s.error),v.validate(t.value,t.rule.options||s,(function(e){var t=[];f&&f.length&&t.push.apply(t,f),e&&e.length&&t.push.apply(t,e),n(t.length?t:null)}))}else n(f)}if(l=l&&(o.required||!o.required&&t.value),o.field=t.field,o.asyncValidator)i=o.asyncValidator(o,t.value,u,t.source,s);else if(o.validator){try{i=o.validator(o,t.value,u,t.source,s)}catch(e){null==console.error||console.error(e),s.suppressValidatorError||setTimeout((function(){throw e}),0),u(e.message)}!0===i?u():!1===i?u('function'==typeof o.message?o.message(o.fullField||o.field):o.message||(o.fullField||o.field)+" fails"):i instanceof Array?u(i):i instanceof Error&&u(i.message)}i&&i.then&&i.then((function(){return u()}),(function(e){return u(e)}))}),(function(e){!function(e){for(var t,n,r=[],i={},o=0;o<e.length;o++)t=e[o],n=void 0,Array.isArray(t)?r=(n=r).concat.apply(n,t):r.push(t);r.length?(i=f(r),l(r,i)):l(null,a)}(e)}),a)},t.getType=function(e){if(void 0===e.type&&e.pattern instanceof RegExp&&(e.type='pattern'),'function'!=typeof e.validator&&e.type&&!P.hasOwnProperty(e.type))throw new Error(d('Unknown rule type %s',e.type));return e.type||'string'},t.getValidationMethod=function(e){if('function'==typeof e.validator)return e.validator;var t=Object.keys(e),n=t.indexOf('message');return-1!==n&&t.splice(n,1),1===t.length&&'required'===t[0]?P.required:P[this.getType(e)]||void 0},e}();A.register=function(e,t){if('function'!=typeof t)throw new Error('Cannot register a validator by type, validator is not a function');P[e]=t},A.warning=u,A.messages=T,A.validators=P}).call(this,n(98))},function(e,t,n){"use strict";n.d(t,"a",(function(){return ue}));var r=n(19),i=n(7),o=n(20),a=n(24),s=n(2),l=n(161),c=n(101),u=n(39),f=n.n(u),d=n(48);function h(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit".concat(e)]="webkit".concat(t),n["Moz".concat(e)]="moz".concat(t),n["ms".concat(e)]="MS".concat(t),n["O".concat(e)]="o".concat(t.toLowerCase()),n}var p,g,v,m=(p=Object(d["a"])(),g='undefined'!=typeof window?window:{},v={animationend:h('Animation','AnimationEnd'),transitionend:h('Transition','TransitionEnd')},p&&('AnimationEvent'in g||delete v.animationend.animation,'TransitionEvent'in g||delete v.transitionend.transition),v),y={};if(Object(d["a"])()){var b=document.createElement('div');y=b.style}var w={};function O(e){if(w[e])return w[e];var t=m[e];if(t)for(var n=Object.keys(t),r=n.length,i=0;i<r;i+=1){var o=n[i];if(Object.prototype.hasOwnProperty.call(t,o)&&o in y)return w[e]=t[o],w[e]}return''}var x=O('animationend'),k=O('transitionend'),C=!(!x||!k),S=x||'animationend',j=k||'transitionend';function E(e,t){return e?'object'===Object(a["a"])(e)?e[t.replace(/-\w/g,(function(e){return e[1].toUpperCase()}))]:"".concat(e,"-").concat(t):null}var P='none',_='appear',T='enter',A='leave',M='none',D='prepare',L='start',N='active',R='end',F=n(68),I=n(102),z=Object(d["a"])()?s["useLayoutEffect"]:s["useEffect"],V=[D,L,N,R],B=!1,U=!0;function H(e){return e===N||e===R}var W=function(e,t){var n=Object(F["a"])(M),r=Object(o["a"])(n,2),i=r[0],a=r[1],l=function(){var e=s["useRef"](null);function t(){I["a"].cancel(e.current)}return s["useEffect"]((function(){return function(){t()}}),[]),[function n(r){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:2;t();var o=Object(I["a"])((function(){i<=1?r({isCanceled:function(){return o!==e.current}}):n(r,i-1)}));e.current=o},t]}(),c=Object(o["a"])(l,2),u=c[0],f=c[1];return z((function(){if(i!==M&&i!==R){var e=V.indexOf(i),n=V[e+1],r=t(i);r===B?a(n,!0):u((function(e){function t(){e.isCanceled()||a(n,!0)}!0===r?t():Promise.resolve(r).then(t)}))}}),[e,i]),s["useEffect"]((function(){return function(){f()}}),[]),[function(){a(D,!0)},i]};function $(e,t,n,a){var l=a.motionEnter,c=void 0===l||l,u=a.motionAppear,f=void 0===u||u,d=a.motionLeave,h=void 0===d||d,p=a.motionDeadline,g=a.motionLeaveImmediately,v=a.onAppearPrepare,m=a.onEnterPrepare,y=a.onLeavePrepare,b=a.onAppearStart,w=a.onEnterStart,O=a.onLeaveStart,x=a.onAppearActive,k=a.onEnterActive,C=a.onLeaveActive,E=a.onAppearEnd,M=a.onEnterEnd,R=a.onLeaveEnd,I=a.onVisibleChanged,V=Object(F["a"])(),$=Object(o["a"])(V,2),q=$[0],K=$[1],G=Object(F["a"])(P),Y=Object(o["a"])(G,2),J=Y[0],X=Y[1],Q=Object(F["a"])(null),Z=Object(o["a"])(Q,2),ee=Z[0],te=Z[1],ne=Object(s["useRef"])(!1),re=Object(s["useRef"])(null);function ie(){return n()}var oe=Object(s["useRef"])(!1);function ae(e){var t=ie();if(!e||e.deadline||e.target===t){var n,r=oe.current;J===_&&r?n=null==E?void 0:E(t,e):J===T&&r?n=null==M?void 0:M(t,e):J===A&&r&&(n=null==R?void 0:R(t,e)),J!==P&&r&&!1!==n&&(X(P,!0),te(null,!0))}}var se=function(e){var t=Object(s["useRef"])(),n=Object(s["useRef"])(e);n.current=e;var r=s["useCallback"]((function(e){n.current(e)}),[]);function i(e){e&&(e.removeEventListener(j,r),e.removeEventListener(S,r))}return s["useEffect"]((function(){return function(){i(t.current)}}),[]),[function(e){t.current&&t.current!==e&&i(t.current),e&&e!==t.current&&(e.addEventListener(j,r),e.addEventListener(S,r),t.current=e)},i]}(ae),le=Object(o["a"])(se,1)[0],ce=s["useMemo"]((function(){var e,t,n;switch(J){case _:return e={},Object(r["a"])(e,D,v),Object(r["a"])(e,L,b),Object(r["a"])(e,N,x),e;case T:return t={},Object(r["a"])(t,D,m),Object(r["a"])(t,L,w),Object(r["a"])(t,N,k),t;case A:return n={},Object(r["a"])(n,D,y),Object(r["a"])(n,L,O),Object(r["a"])(n,N,C),n;default:return{}}}),[J]),ue=W(J,(function(e){if(e===D){var t=ce[D];return t?t(ie()):B}var n;he in ce&&te((null===(n=ce[he])||void 0===n?void 0:n.call(ce,ie(),null))||null);return he===N&&(le(ie()),p>0&&(clearTimeout(re.current),re.current=setTimeout((function(){ae({deadline:!0})}),p))),U})),fe=Object(o["a"])(ue,2),de=fe[0],he=fe[1],pe=H(he);oe.current=pe,z((function(){K(t);var n,r=ne.current;(ne.current=!0,e)&&(!r&&t&&f&&(n=_),r&&t&&c&&(n=T),(r&&!t&&h||!r&&g&&!t&&h)&&(n=A),n&&(X(n),de()))}),[t]),Object(s["useEffect"])((function(){(J===_&&!f||J===T&&!c||J===A&&!h)&&X(P)}),[f,c,h]),Object(s["useEffect"])((function(){return function(){ne.current=!1,clearTimeout(re.current)}}),[]);var ge=s["useRef"](!1);Object(s["useEffect"])((function(){q&&(ge.current=!0),void 0!==q&&J===P&&((ge.current||q)&&(null==I||I(q)),ge.current=!0)}),[q,J]);var ve=ee;return ce[D]&&he===L&&(ve=Object(i["a"])({transition:'none'},ve)),[J,he,ve,null!=q?q:t]}var q=n(28),K=n(29),G=n(42),Y=n(41),J=function(e){Object(G["a"])(n,e);var t=Object(Y["a"])(n);function n(){return Object(q["a"])(this,n),t.apply(this,arguments)}return Object(K["a"])(n,[{key:"render",value:function(){return this.props.children}}]),n}(s["Component"]);var X=function(e){var t=e;function n(e){return!(!e.motionName||!t)}'object'===Object(a["a"])(e)&&(t=e.transitionSupport);var u=s["forwardRef"]((function(e,t){var a=e.visible,u=void 0===a||a,d=e.removeOnLeave,h=void 0===d||d,p=e.forceRender,g=e.children,v=e.motionName,m=e.leavedClassName,y=e.eventProps,b=n(e),w=Object(s["useRef"])(),O=Object(s["useRef"])();var x=$(b,u,(function(){try{return w.current instanceof HTMLElement?w.current:Object(l["a"])(O.current)}catch(e){return null}}),e),k=Object(o["a"])(x,4),C=k[0],S=k[1],j=k[2],_=k[3],T=s["useRef"](_);_&&(T.current=!0);var A,M=s["useCallback"]((function(e){w.current=e,Object(c["a"])(t,e)}),[t]),N=Object(i["a"])(Object(i["a"])({},y),{},{visible:u});if(g)if(C!==P&&n(e)){var R,F;S===D?F='prepare':H(S)?F='active':S===L&&(F='start'),A=g(Object(i["a"])(Object(i["a"])({},N),{},{className:f()(E(v,C),(R={},Object(r["a"])(R,E(v,"".concat(C,"-").concat(F)),F),Object(r["a"])(R,v,'string'==typeof v),R)),style:j}),M)}else A=_?g(Object(i["a"])({},N),M):!h&&T.current?g(Object(i["a"])(Object(i["a"])({},N),{},{className:m}),M):p?g(Object(i["a"])(Object(i["a"])({},N),{},{style:{display:'none'}}),M):null;else A=null;s["isValidElement"](A)&&Object(c["b"])(A)&&(A.ref||(A=s["cloneElement"](A,{ref:M})));return s["createElement"](J,{ref:O},A)}));return u.displayName='CSSMotion',u}(C),Q=n(15),Z=n(38),ee='add',te='keep',ne='remove',re='removed';function ie(e){var t;return t=e&&'object'===Object(a["a"])(e)&&'key'in e?e:{key:e},Object(i["a"])(Object(i["a"])({},t),{},{key:String(t.key)})}function oe(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return e.map(ie)}function ae(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=[],r=0,o=t.length,a=oe(e),s=oe(t);a.forEach((function(e){for(var t=!1,a=r;a<o;a+=1){var l=s[a];if(l.key===e.key){r<a&&(n=n.concat(s.slice(r,a).map((function(e){return Object(i["a"])(Object(i["a"])({},e),{},{status:ee})}))),r=a),n.push(Object(i["a"])(Object(i["a"])({},l),{},{status:te})),r+=1,t=!0;break}}t||n.push(Object(i["a"])(Object(i["a"])({},e),{},{status:ne}))})),r<o&&(n=n.concat(s.slice(r).map((function(e){return Object(i["a"])(Object(i["a"])({},e),{},{status:ee})}))));var l={};n.forEach((function(e){var t=e.key;l[t]=(l[t]||0)+1}));var c=Object.keys(l).filter((function(e){return l[e]>1}));return c.forEach((function(e){(n=n.filter((function(t){var n=t.key,r=t.status;return n!==e||r!==ne}))).forEach((function(t){t.key===e&&(t.status=te)}))})),n}var se=["component","children","onVisibleChanged","onAllRemoved"],le=["status"],ce=['eventProps','visible','children','motionName','motionAppear','motionEnter','motionLeave','motionLeaveImmediately','motionDeadline','removeOnLeave','leavedClassName','onAppearStart','onAppearActive','onAppearEnd','onEnterStart','onEnterActive','onEnterEnd','onLeaveStart','onLeaveActive','onLeaveEnd'];var ue=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:X,n=function(e){Object(G["a"])(r,e);var n=Object(Y["a"])(r);function r(){var e;Object(q["a"])(this,r);for(var t=arguments.length,o=new Array(t),a=0;a<t;a++)o[a]=arguments[a];return(e=n.call.apply(n,[this].concat(o))).state={keyEntities:[]},e.removeKey=function(t){var n=e.state.keyEntities.map((function(e){return e.key!==t?e:Object(i["a"])(Object(i["a"])({},e),{},{status:re})}));return e.setState({keyEntities:n}),n.filter((function(e){return e.status!==re})).length},e}return Object(K["a"])(r,[{key:"render",value:function(){var e=this,n=this.state.keyEntities,r=this.props,i=r.component,o=r.children,a=r.onVisibleChanged,l=r.onAllRemoved,c=Object(Z["a"])(r,se),u=i||s["Fragment"],f={};return ce.forEach((function(e){f[e]=c[e],delete c[e]})),delete c.keys,s["createElement"](u,c,n.map((function(n){var r=n.status,i=Object(Z["a"])(n,le),c=r===ee||r===te;return s["createElement"](t,Object(Q["a"])({},f,{key:i.key,visible:c,eventProps:i,onVisibleChanged:function(t){(null==a||a(t,{key:i.key}),t)||0===e.removeKey(i.key)&&l&&l()}}),o)})))}}],[{key:"getDerivedStateFromProps",value:function(e,t){var n=e.keys,r=t.keyEntities,i=oe(n);return{keyEntities:ae(r,i).filter((function(e){var t=r.find((function(t){var n=t.key;return e.key===n}));return!t||t.status!==re||e.status!==ne}))}}}]),r}(s["Component"]);return n.defaultProps={component:'div'},n}(C)},,,,function(e,t,n){var r=n(103);e.exports=function(e){if(Array.isArray(e))return r(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){var r=n(22)["default"];function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports["default"]=e.exports;var t={},n=Object.prototype,o=n.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",l=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function u(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{u({},"")}catch(e){u=function(e,t,n){return e[t]=n}}function f(e,t,n,r){var i=t&&t.prototype instanceof p?t:p,o=Object.create(i.prototype),a=new j(r||[]);return o._invoke=function(e,t,n){var r="suspendedStart";return function(i,o){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw o;return P()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=k(a,n);if(s){if(s===h)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=d(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===h)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}(e,n,a),o}function d(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var h={};function p(){}function g(){}function v(){}var m={};u(m,s,(function(){return this}));var y=Object.getPrototypeOf,b=y&&y(y(E([])));b&&b!==n&&o.call(b,s)&&(m=b);var w=v.prototype=p.prototype=Object.create(m);function O(e){["next","throw","return"].forEach((function(t){u(e,t,(function(e){return this._invoke(t,e)}))}))}function x(e,t){var n;this._invoke=function(i,a){function s(){return new t((function(n,s){!function n(i,a,s,l){var c=d(e[i],e,a);if("throw"!==c.type){var u=c.arg,f=u.value;return f&&"object"==r(f)&&o.call(f,"__await")?t.resolve(f.__await).then((function(e){n("next",e,s,l)}),(function(e){n("throw",e,s,l)})):t.resolve(f).then((function(e){u.value=e,s(u)}),(function(e){return n("throw",e,s,l)}))}l(c.arg)}(i,a,n,s)}))}return n=n?n.then(s,s):s()}}function k(e,t){var n=e.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(e.iterator["return"]&&(t.method="return",t.arg=void 0,k(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var r=d(n,e.iterator,t.arg);if("throw"===r.type)return t.method="throw",t.arg=r.arg,t.delegate=null,h;var i=r.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function j(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function E(e){if(e){var t=e[s];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return g.prototype=v,u(w,"constructor",v),u(v,"constructor",g),g.displayName=u(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,u(e,c,"GeneratorFunction")),e.prototype=Object.create(w),e},t.awrap=function(e){return{__await:e}},O(x.prototype),u(x.prototype,l,(function(){return this})),t.AsyncIterator=x,t.async=function(e,n,r,i,o){void 0===o&&(o=Promise);var a=new x(f(e,n,r,i),o);return t.isGeneratorFunction(n)?a:a.next().then((function(e){return e.done?e.value:a.next()}))},O(w),u(w,c,"Generator"),u(w,s,(function(){return this})),u(w,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=[];for(var n in e)t.push(n);return t.reverse(),function n(){for(;t.length;){var r=t.pop();if(r in e)return n.value=r,n.done=!1,n}return n.done=!0,n}},t.values=E,j.prototype={constructor:j,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return a.type="throw",a.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],a=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var s=o.call(i,"catchLoc"),l=o.call(i,"finallyLoc");if(s&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&o.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=e,a.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(a)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),S(n),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;S(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:E(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),h}},t}e.exports=i,e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){(function(){var e,r,i,o,a,s;e=n(105),r=n(106),e.Stomp.setInterval=function(e,t){return setInterval(t,e)},e.Stomp.clearInterval=function(e){return clearInterval(e)},a=function(e,t){var n,i;return n=null,i={url:'tcp:// '+t+':'+e,send:function(e){return n.write(e)},close:function(){return n.end()}},(n=r.connect(e,t,(function(e){return i.onopen()}))).on('error',(function(e){return"function"==typeof i.onclose?i.onclose(e):void 0})),n.on('close',(function(e){return"function"==typeof i.onclose?i.onclose(e):void 0})),n.on('data',(function(e){var t;return t={data:e.toString()},i.onmessage(t)})),i},s=function(e){var t,r,i,o;return t=n(174).client,r=null,o={url:e,send:function(e){return r.sendUTF(e)},close:function(){return r.close()}},(i=new t).on('connect',(function(e){return r=e,o.onopen(),r.on('error',(function(e){return"function"==typeof o.onclose?o.onclose(e):void 0})),r.on('close',(function(){return"function"==typeof o.onclose?o.onclose():void 0})),r.on('message',(function(e){var t;if('utf8'===e.type)return t={data:e.utf8Data},o.onmessage(t)}))})),i.connect(e),o},i=function(t,n){var r;return r=a(n,t),e.Stomp.over(r)},o=function(t){var n;return n=s(t),e.Stomp.over(n)},t.overTCP=i,t.overWS=o}).call(this)},function(e,t,n){var r;if('object'==typeof globalThis)r=globalThis;else try{r=n(175)}catch(e){}finally{if(r||'undefined'==typeof window||(r=window),!r)throw new Error('Could not determine global this')}var i=r.WebSocket||r.MozWebSocket,o=n(176);function a(e,t){return t?new i(e,t):new i(e)}i&&['CONNECTING','OPEN','CLOSING','CLOSED'].forEach((function(e){Object.defineProperty(a,e,{get:function(){return i[e]}})})),e.exports={w3cwebsocket:i?a:null,version:o}},function(e,t){var n=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};e.exports=function(){if(this)return this;if("object"==typeof globalThis&&globalThis)return globalThis;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return n()}try{return __global__||n()}finally{delete Object.prototype.__global__}}()},function(e,t,n){e.exports=n(177).version},function(e){e.exports=JSON.parse("{\"name\":\"websocket\",\"description\":\"Websocket Client & Server Library implementing the WebSocket protocol as specified in RFC 6455.\",\"keywords\":[\"websocket\",\"websockets\",\"socket\",\"networking\",\"comet\",\"push\",\"RFC-6455\",\"realtime\",\"server\",\"client\"],\"author\":\"Brian McKelvey <theturtle32@gmail.com> (https://github.com/theturtle32)\",\"contributors\":[\"Iñaki Baz Castillo <ibc@aliax.net> (http://dev.sipdoc.net)\"],\"version\":\"1.0.34\",\"repository\":{\"type\":\"git\",\"url\":\"https://github.com/theturtle32/WebSocket-Node.git\"},\"homepage\":\"https://github.com/theturtle32/WebSocket-Node\",\"engines\":{\"node\":\">=4.0.0\"},\"dependencies\":{\"bufferutil\":\"^4.0.1\",\"debug\":\"^2.2.0\",\"es5-ext\":\"^0.10.50\",\"typedarray-to-buffer\":\"^3.1.5\",\"utf-8-validate\":\"^5.0.2\",\"yaeti\":\"^0.0.6\"},\"devDependencies\":{\"buffer-equal\":\"^1.0.0\",\"gulp\":\"^4.0.2\",\"gulp-jshint\":\"^2.0.4\",\"jshint-stylish\":\"^2.2.1\",\"jshint\":\"^2.0.0\",\"tape\":\"^4.9.1\"},\"config\":{\"verbose\":false},\"scripts\":{\"test\":\"tape test/unit/*.js\",\"gulp\":\"gulp\"},\"main\":\"index\",\"directories\":{\"lib\":\"./lib\"},\"browser\":\"lib/browser.js\",\"license\":\"Apache-2.0\"}")},function(e,t,n){"use strict";e.exports=[n(179),n(184),n(111),n(112),n(94)(n(112)),n(116),n(94)(n(116)),n(117),n(189),n(94)(n(117)),n(190)]},function(e,t,n){"use strict";var r=n(50),i=n(43),o=n(21),a=n(37).EventEmitter,s=n(183);function l(e,t,n){if(!l.enabled())throw new Error('Transport created when disabled');a.call(this);var o=this,c=i.addPath(e,'/websocket');c='https'===c.slice(0,5)?'wss'+c.slice(5):'ws'+c.slice(4),this.url=c,this.ws=new s(this.url,[],n),this.ws.onmessage=function(e){e.data,o.emit('message',e.data)},this.unloadRef=r.unloadAdd((function(){o.ws.close()})),this.ws.onclose=function(e){e.code,e.reason,o.emit('close',e.code,e.reason),o._cleanup()},this.ws.onerror=function(e){o.emit('close',1006,'WebSocket connection broken'),o._cleanup()}}o(l,a),l.prototype.send=function(e){var t='['+e+']';this.ws.send(t)},l.prototype.close=function(){var e=this.ws;this._cleanup(),e&&e.close()},l.prototype._cleanup=function(){var e=this.ws;e&&(e.onmessage=e.onclose=e.onerror=null),r.unloadDel(this.unloadRef),this.unloadRef=this.ws=null,this.removeAllListeners()},l.enabled=function(){return!!s},l.transportName='websocket',l.roundTrips=2,e.exports=l},function(e,t,n){"use strict";(function(t){t.crypto&&t.crypto.getRandomValues?e.exports.randomBytes=function(e){var n=new Uint8Array(e);return t.crypto.getRandomValues(n),n}:e.exports.randomBytes=function(e){for(var t=new Array(e),n=0;n<e;n++)t[n]=Math.floor(256*Math.random());return t}}).call(this,n(23))},function(e,t,n){"use strict";e.exports=function(e,t){if(t=t.split(':')[0],!(e=+e))return!1;switch(t){case'http':case'ws':return 80!==e;case'https':case'wss':return 443!==e;case'ftp':return 21!==e;case'gopher':return 70!==e;case'file':return!1}return 0!==e}},function(e,t,n){"use strict";var r,i=Object.prototype.hasOwnProperty;function o(e){try{return decodeURIComponent(e.replace(/\+/g,' '))}catch(e){return null}}function a(e){try{return encodeURIComponent(e)}catch(e){return null}}t.stringify=function(e,t){t=t||'';var n,o,s=[];for(o in'string'!=typeof t&&(t='?'),e)if(i.call(e,o)){if((n=e[o])||null!==n&&n!==r&&!isNaN(n)||(n=''),o=a(o),n=a(n),null===o||null===n)continue;s.push(o+'='+n)}return s.length?t+s.join('&'):''},t.parse=function(e){for(var t,n=/([^=?#&]+)=?([^&]*)/g,r={};t=n.exec(e);){var i=o(t[1]),a=o(t[2]);null===i||null===a||i in r||(r[i]=a)}return r}},function(e,t,n){"use strict";(function(t){var n=t.WebSocket||t.MozWebSocket;e.exports=n?function(e){return new n(e)}:void 0}).call(this,n(23))},function(e,t,n){"use strict";(function(t){var r=n(21),i=n(59),o=n(73),a=n(74),s=n(69),l=n(70);function c(e){if(!s.enabled&&!a.enabled)throw new Error('Transport created when disabled');i.call(this,e,'/xhr_streaming',o,a)}r(c,i),c.enabled=function(e){return!e.nullOrigin&&(!l.isOpera()&&a.enabled)},c.transportName='xhr-streaming',c.roundTrips=2,c.needBody=!!t.document,e.exports=c}).call(this,n(23))},function(e,t,n){"use strict";var r=n(21),i=n(37).EventEmitter;function o(e,t){i.call(this),this.sendBuffer=[],this.sender=t,this.url=e}r(o,i),o.prototype.send=function(e){this.sendBuffer.push(e),this.sendStop||this.sendSchedule()},o.prototype.sendScheduleWait=function(){var e,t=this;this.sendStop=function(){t.sendStop=null,clearTimeout(e)},e=setTimeout((function(){t.sendStop=null,t.sendSchedule()}),25)},o.prototype.sendSchedule=function(){this.sendBuffer.length;var e=this;if(this.sendBuffer.length>0){var t='['+this.sendBuffer.join(',')+']';this.sendStop=this.sender(this.url,t,(function(t){e.sendStop=null,t?(e.emit('close',t.code||1006,'Sending error: '+t),e.close()):e.sendScheduleWait()})),this.sendBuffer=[]}},o.prototype._cleanup=function(){this.removeAllListeners()},o.prototype.close=function(){this._cleanup(),this.sendStop&&(this.sendStop(),this.sendStop=null)},e.exports=o},function(e,t,n){"use strict";var r=n(21),i=n(37).EventEmitter;function o(e,t,n){i.call(this),this.Receiver=e,this.receiveUrl=t,this.AjaxObject=n,this._scheduleReceiver()}r(o,i),o.prototype._scheduleReceiver=function(){var e=this,t=this.poll=new this.Receiver(this.receiveUrl,this.AjaxObject);t.on('message',(function(t){e.emit('message',t)})),t.once('close',(function(n,r){e.pollIsClosing,e.poll=t=null,e.pollIsClosing||('network'===r?e._scheduleReceiver():(e.emit('close',n||1006,r),e.removeAllListeners()))}))},o.prototype.abort=function(){this.removeAllListeners(),this.pollIsClosing=!0,this.poll&&this.poll.abort()},e.exports=o},function(e,t,n){"use strict";var r=n(21),i=n(37).EventEmitter,o=n(113);function a(e){i.call(this);var t=this,n=this.es=new o(e);n.onmessage=function(e){e.data,t.emit('message',decodeURI(e.data))},n.onerror=function(e){n.readyState;var r=2!==n.readyState?'network':'permanent';t._cleanup(),t._close(r)}}r(a,i),a.prototype.abort=function(){this._cleanup(),this._close('user')},a.prototype._cleanup=function(){var e=this.es;e&&(e.onmessage=e.onerror=null,e.close(),this.es=null)},a.prototype._close=function(e){var t=this;setTimeout((function(){t.emit('close',null,e),t.removeAllListeners()}),200)},e.exports=a},function(e,t,n){"use strict";(function(t){var r=n(21),i=n(71),o=n(43),a=n(37).EventEmitter,s=n(58);function l(e){a.call(this);var n=this;i.polluteGlobalNamespace(),this.id='a'+s.string(6),e=o.addQuery(e,'c='+decodeURIComponent(i.WPrefix+'.'+this.id)),l.htmlfileEnabled;var r=l.htmlfileEnabled?i.createHtmlfile:i.createIframe;t[i.WPrefix][this.id]={start:function(){n.iframeObj.loaded()},message:function(e){n.emit('message',e)},stop:function(){n._cleanup(),n._close('network')}},this.iframeObj=r(e,(function(){n._cleanup(),n._close('permanent')}))}r(l,a),l.prototype.abort=function(){this._cleanup(),this._close('user')},l.prototype._cleanup=function(){this.iframeObj&&(this.iframeObj.cleanup(),this.iframeObj=null),delete t[i.WPrefix][this.id]},l.prototype._close=function(e){this.emit('close',null,e),this.removeAllListeners()},l.htmlfileEnabled=!1;var c=['Active'].concat('Object').join('X');if(c in t)try{l.htmlfileEnabled=!!new t[c]('htmlfile')}catch(e){}l.enabled=l.htmlfileEnabled||i.iframeEnabled,e.exports=l}).call(this,n(23))},function(e,t,n){"use strict";var r=n(21),i=n(59),o=n(111),a=n(73),s=n(93);function l(e){if(!s.enabled)throw new Error('Transport created when disabled');i.call(this,e,'/xhr',a,s)}r(l,i),l.enabled=o.enabled,l.transportName='xdr-polling',l.roundTrips=2,e.exports=l},function(e,t,n){"use strict";(function(t){var r=n(21),i=n(109),o=n(191),a=n(192);function s(e){if(!s.enabled())throw new Error('Transport created when disabled');i.call(this,e,'/jsonp',a,o)}r(s,i),s.enabled=function(){return!!t.document},s.transportName='jsonp-polling',s.roundTrips=1,s.needBody=!0,e.exports=s}).call(this,n(23))},function(e,t,n){"use strict";(function(t){var r=n(71),i=n(58),o=n(70),a=n(43),s=n(21),l=n(37).EventEmitter;function c(e){var n=this;l.call(this),r.polluteGlobalNamespace(),this.id='a'+i.string(6);var o=a.addQuery(e,'c='+encodeURIComponent(r.WPrefix+'.'+this.id));t[r.WPrefix][this.id]=this._callback.bind(this),this._createScript(o),this.timeoutId=setTimeout((function(){n._abort(new Error('JSONP script loaded abnormally (timeout)'))}),c.timeout)}s(c,l),c.prototype.abort=function(){if(t[r.WPrefix][this.id]){var e=new Error('JSONP user aborted read');e.code=1e3,this._abort(e)}},c.timeout=35e3,c.scriptErrorTimeout=1e3,c.prototype._callback=function(e){this._cleanup(),this.aborting||(e&&this.emit('message',e),this.emit('close',null,'network'),this.removeAllListeners())},c.prototype._abort=function(e){this._cleanup(),this.aborting=!0,this.emit('close',e.code,e.message),this.removeAllListeners()},c.prototype._cleanup=function(){if(clearTimeout(this.timeoutId),this.script2&&(this.script2.parentNode.removeChild(this.script2),this.script2=null),this.script){var e=this.script;e.parentNode.removeChild(e),e.onreadystatechange=e.onerror=e.onload=e.onclick=null,this.script=null}delete t[r.WPrefix][this.id]},c.prototype._scriptError=function(){var e=this;this.errorTimer||(this.errorTimer=setTimeout((function(){e.loadedOkay||e._abort(new Error('JSONP script loaded abnormally (onerror)'))}),c.scriptErrorTimeout))},c.prototype._createScript=function(e){var n,r=this,a=this.script=t.document.createElement('script');if(a.id='a'+i.string(8),a.src=e,a.type='text/javascript',a.charset='UTF-8',a.onerror=this._scriptError.bind(this),a.onload=function(){r._abort(new Error('JSONP script loaded abnormally (onload)'))},a.onreadystatechange=function(){if(a.readyState,/loaded|closed/.test(a.readyState)){if(a&&a.htmlFor&&a.onclick){r.loadedOkay=!0;try{a.onclick()}catch(e){}}a&&r._abort(new Error('JSONP script loaded abnormally (onreadystatechange)'))}},void 0===a.async&&t.document.attachEvent)if(o.isOpera())(n=this.script2=t.document.createElement('script')).text="try{var a = document.getElementById('"+a.id+"'); if(a)a.onerror();}catch(x){};",a.async=n.async=!1;else{try{a.htmlFor=a.id,a.event='onclick'}catch(e){}a.async=!0}void 0!==a.async&&(a.async=!0);var s=t.document.getElementsByTagName('head')[0];s.insertBefore(a,s.firstChild),n&&s.insertBefore(n,s.firstChild)},e.exports=c}).call(this,n(23))},function(e,t,n){"use strict";(function(t){var r,i,o=n(58),a=n(43);e.exports=function(e,n,s){r||((r=t.document.createElement('form')).style.display='none',r.style.position='absolute',r.method='POST',r.enctype='application/x-www-form-urlencoded',r.acceptCharset='UTF-8',(i=t.document.createElement('textarea')).name='d',r.appendChild(i),t.document.body.appendChild(r));var l='a'+o.string(8);r.target=l,r.action=a.addQuery(a.addPath(e,'/jsonp_send'),'i='+l);var c=function(e){try{return t.document.createElement('<iframe name="'+e+'">')}catch(r){var n=t.document.createElement('iframe');return n.name=e,n}}(l);c.id=l,c.style.display='none',r.appendChild(c);try{i.value=n}catch(e){}r.submit();var u=function(e){c.onerror&&(c.onreadystatechange=c.onerror=c.onload=null,setTimeout((function(){c.parentNode.removeChild(c),c=null}),500),i.value='',s(e))};return c.onerror=function(){u()},c.onload=function(){u()},c.onreadystatechange=function(e){c.readyState,'complete'===c.readyState&&u()},function(){u(new Error('Aborted'))}}}).call(this,n(23))},function(e,t,n){"use strict";(function(t){n(194);var r,i=n(107),o=n(21),a=n(58),s=n(195),l=n(43),c=n(50),u=n(196),f=n(95),d=n(70),h=n(197),p=n(96),g=n(108),v=n(118),m=n(198),y=n(199),b=n(200);function w(e,t,n){if(!(this instanceof w))return new w(e,t,n);if(arguments.length<1)throw new TypeError("Failed to construct 'SockJS: 1 argument required, but only 0 present");g.call(this),this.readyState=w.CONNECTING,this.extensions='',this.protocol='',(n=n||{}).protocols_whitelist&&h.warn("'protocols_whitelist' is DEPRECATED. Use 'transports' instead."),this._transportsWhitelist=n.transports,this._transportOptions=n.transportOptions||{},this._timeout=n.timeout||0;var r=n.sessionId||8;if('function'==typeof r)this._generateSessionId=r;else{if('number'!=typeof r)throw new TypeError('If sessionId is used in the options, it needs to be a number or a function.');this._generateSessionId=function(){return a.string(r)}}this._server=n.server||a.numberString(1e3);var o=new i(e);if(!o.host||!o.protocol)throw new SyntaxError("The URL '"+e+"' is invalid");if(o.hash)throw new SyntaxError('The URL must not contain a fragment');if('http:'!==o.protocol&&'https:'!==o.protocol)throw new SyntaxError("The URL's scheme must be either 'http:' or 'https:'. '"+o.protocol+"' is not allowed.");var s='https:'===o.protocol;if('https:'===v.protocol&&!s&&!l.isLoopbackAddr(o.hostname))throw new Error('SecurityError: An insecure SockJS connection may not be initiated from a page loaded over HTTPS');t?Array.isArray(t)||(t=[t]):t=[];var c=t.sort();c.forEach((function(e,t){if(!e)throw new SyntaxError("The protocols entry '"+e+"' is invalid.");if(t<c.length-1&&e===c[t+1])throw new SyntaxError("The protocols entry '"+e+"' is duplicated.")}));var u=l.getOrigin(v.href);this._origin=u?u.toLowerCase():null,o.set('pathname',o.pathname.replace(/\/+$/,'')),this.url=o.href,this.url,this._urlInfo={nullOrigin:!d.hasDomain(),sameOrigin:l.isOriginEqual(this.url,v.href),sameScheme:l.isSchemeEqual(this.url,v.href)},this._ir=new b(this.url,this._urlInfo),this._ir.once('finish',this._receiveInfo.bind(this))}function O(e){return 1e3===e||e>=3e3&&e<=4999}o(w,g),w.prototype.close=function(e,t){if(e&&!O(e))throw new Error('InvalidAccessError: Invalid code');if(t&&t.length>123)throw new SyntaxError('reason argument has an invalid length');if(this.readyState!==w.CLOSING&&this.readyState!==w.CLOSED){this._close(e||1e3,t||'Normal closure',!0)}},w.prototype.send=function(e){if('string'!=typeof e&&(e=''+e),this.readyState===w.CONNECTING)throw new Error('InvalidStateError: The connection has not been established yet');this.readyState===w.OPEN&&this._transport.send(s.quote(e))},w.version=n(115),w.CONNECTING=0,w.OPEN=1,w.CLOSING=2,w.CLOSED=3,w.prototype._receiveInfo=function(e,t){if(this._ir=null,e){this._rto=this.countRTO(t),this._transUrl=e.base_url?e.base_url:this.url,e=f.extend(e,this._urlInfo);var n=r.filterToEnabled(this._transportsWhitelist,e);this._transports=n.main,this._transports.length,this._connect()}else this._close(1002,'Cannot connect to server')},w.prototype._connect=function(){for(var e=this._transports.shift();e;e=this._transports.shift()){if(e.transportName,e.needBody&&(!t.document.body||void 0!==t.document.readyState&&'complete'!==t.document.readyState&&'interactive'!==t.document.readyState))return this._transports.unshift(e),void c.attachEvent('load',this._connect.bind(this));var n=Math.max(this._timeout,this._rto*e.roundTrips||5e3);this._transportTimeoutId=setTimeout(this._transportTimeout.bind(this),n);var r=l.addPath(this._transUrl,'/'+this._server+'/'+this._generateSessionId()),i=this._transportOptions[e.transportName],o=new e(r,this._transUrl,i);return o.on('message',this._transportMessage.bind(this)),o.once('close',this._transportClose.bind(this)),o.transportName=e.transportName,void(this._transport=o)}this._close(2e3,'All transports failed',!1)},w.prototype._transportTimeout=function(){this.readyState===w.CONNECTING&&(this._transport&&this._transport.close(),this._transportClose(2007,'Transport timed out'))},w.prototype._transportMessage=function(e){var t,n=this,r=e.slice(0,1),i=e.slice(1);switch(r){case'o':return void this._open();case'h':return this.dispatchEvent(new p('heartbeat')),void this.transport}if(i)try{t=JSON.parse(i)}catch(e){}if(void 0!==t)switch(r){case'a':Array.isArray(t)&&t.forEach((function(e){n.transport,n.dispatchEvent(new y(e))}));break;case'm':this.transport,this.dispatchEvent(new y(t));break;case'c':Array.isArray(t)&&2===t.length&&this._close(t[0],t[1],!0)}},w.prototype._transportClose=function(e,t){this.transport,this._transport&&(this._transport.removeAllListeners(),this._transport=null,this.transport=null),O(e)||2e3===e||this.readyState!==w.CONNECTING?this._close(e,t):this._connect()},w.prototype._open=function(){this._transport&&this._transport.transportName,this.readyState,this.readyState===w.CONNECTING?(this._transportTimeoutId&&(clearTimeout(this._transportTimeoutId),this._transportTimeoutId=null),this.readyState=w.OPEN,this.transport=this._transport.transportName,this.dispatchEvent(new p('open')),this.transport):this._close(1006,'Server lost session')},w.prototype._close=function(e,t,n){this.transport,this.readyState;var r=!1;if(this._ir&&(r=!0,this._ir.close(),this._ir=null),this._transport&&(this._transport.close(),this._transport=null,this.transport=null),this.readyState===w.CLOSED)throw new Error('InvalidStateError: SockJS has already been closed');this.readyState=w.CLOSING,setTimeout(function(){this.readyState=w.CLOSED,r&&this.dispatchEvent(new p('error'));var i=new m('close');i.wasClean=n||!1,i.code=e||1e3,i.reason=t,this.dispatchEvent(i),this.onmessage=this.onclose=this.onerror=null}.bind(this),0)},w.prototype.countRTO=function(e){return e>100?4*e:300+e},e.exports=function(e){return r=u(e),n(203)(w,e),w}}).call(this,n(23))},function(e,t,n){"use strict";var r,i=Array.prototype,o=Object.prototype,a=Function.prototype,s=String.prototype,l=i.slice,c=o.toString,u=function(e){return'[object Function]'===o.toString.call(e)},f=function(e){return'[object String]'===c.call(e)},d=Object.defineProperty&&function(){try{return Object.defineProperty({},'x',{}),!0}catch(e){return!1}}();r=d?function(e,t,n,r){!r&&t in e||Object.defineProperty(e,t,{configurable:!0,enumerable:!1,writable:!0,value:n})}:function(e,t,n,r){!r&&t in e||(e[t]=n)};var h=function(e,t,n){for(var i in t)o.hasOwnProperty.call(t,i)&&r(e,i,t[i],n)},p=function(e){if(null==e)throw new TypeError("can't convert "+e+' to object');return Object(e)};function g(e){var t=+e;return t!=t?t=0:0!==t&&t!==1/0&&t!==-1/0&&(t=(t>0||-1)*Math.floor(Math.abs(t))),t}function v(){}h(a,{bind:function(e){var t=this;if(!u(t))throw new TypeError('Function.prototype.bind called on incompatible '+t);for(var n=l.call(arguments,1),r=function(){if(this instanceof s){var r=t.apply(this,n.concat(l.call(arguments)));return Object(r)===r?r:this}return t.apply(e,n.concat(l.call(arguments)))},i=Math.max(0,t.length-n.length),o=[],a=0;a<i;a++)o.push('$'+a);var s=Function('binder','return function ('+o.join(',')+'){ return binder.apply(this, arguments); }')(r);return t.prototype&&(v.prototype=t.prototype,s.prototype=new v,v.prototype=null),s}}),h(Array,{isArray:function(e){return'[object Array]'===c.call(e)}});var m,y,b,w=Object('a'),O='a'!==w[0]||!(0 in w);h(i,{forEach:function(e){var t=p(this),n=O&&f(this)?this.split(''):t,r=arguments[1],i=-1,o=n.length>>>0;if(!u(e))throw new TypeError;for(;++i<o;)i in n&&e.call(r,n[i],i,t)}},(m=i.forEach,y=!0,b=!0,m&&(m.call('foo',(function(e,t,n){'object'!=typeof n&&(y=!1)})),m.call([1],(function(){b='string'==typeof this}),'x')),!(m&&y&&b)));var x=Array.prototype.indexOf&&-1!==[0,1].indexOf(1,2);h(i,{indexOf:function(e){var t=O&&f(this)?this.split(''):p(this),n=t.length>>>0;if(!n)return-1;var r=0;for(arguments.length>1&&(r=g(arguments[1])),r=r>=0?r:Math.max(0,n+r);r<n;r++)if(r in t&&t[r]===e)return r;return-1}},x);var k,C=s.split;2!=='ab'.split(/(?:ab)*/).length||4!=='.'.split(/(.?)(.?)/).length||'t'==='tesst'.split(/(s)*/)[1]||4!=='test'.split(/(?:)/,-1).length||''.split(/.?/).length||'.'.split(/()()/).length>1?(k=void 0===/()??/.exec('')[1],s.split=function(e,t){var n=this;if(void 0===e&&0===t)return[];if('[object RegExp]'!==c.call(e))return C.call(this,e,t);var r,o,a,s,l=[],u=(e.ignoreCase?'i':'')+(e.multiline?'m':'')+(e.extended?'x':'')+(e.sticky?'y':''),f=0;for(e=new RegExp(e.source,u+'g'),n+='',k||(r=new RegExp('^'+e.source+'$(?!\\s)',u)),t=void 0===t?-1>>>0:t>>>0;(o=e.exec(n))&&!((a=o.index+o[0].length)>f&&(l.push(n.slice(f,o.index)),!k&&o.length>1&&o[0].replace(r,(function(){for(var e=1;e<arguments.length-2;e++)void 0===arguments[e]&&(o[e]=void 0)})),o.length>1&&o.index<n.length&&i.push.apply(l,o.slice(1)),s=o[0].length,f=a,l.length>=t));)e.lastIndex===o.index&&e.lastIndex++;return f===n.length?!s&&e.test('')||l.push(''):l.push(n.slice(f)),l.length>t?l.slice(0,t):l}):'0'.split(void 0,0).length&&(s.split=function(e,t){return void 0===e&&0===t?[]:C.call(this,e,t)});var S=s.substr,j=''.substr&&'b'!=='0b'.substr(-1);h(s,{substr:function(e,t){return S.call(this,e<0&&(e=this.length+e)<0?0:e,t)}},j)},function(e,t,n){"use strict";var r,i=/[\x00-\x1f\ud800-\udfff\ufffe\uffff\u0300-\u0333\u033d-\u0346\u034a-\u034c\u0350-\u0352\u0357-\u0358\u035c-\u0362\u0374\u037e\u0387\u0591-\u05af\u05c4\u0610-\u0617\u0653-\u0654\u0657-\u065b\u065d-\u065e\u06df-\u06e2\u06eb-\u06ec\u0730\u0732-\u0733\u0735-\u0736\u073a\u073d\u073f-\u0741\u0743\u0745\u0747\u07eb-\u07f1\u0951\u0958-\u095f\u09dc-\u09dd\u09df\u0a33\u0a36\u0a59-\u0a5b\u0a5e\u0b5c-\u0b5d\u0e38-\u0e39\u0f43\u0f4d\u0f52\u0f57\u0f5c\u0f69\u0f72-\u0f76\u0f78\u0f80-\u0f83\u0f93\u0f9d\u0fa2\u0fa7\u0fac\u0fb9\u1939-\u193a\u1a17\u1b6b\u1cda-\u1cdb\u1dc0-\u1dcf\u1dfc\u1dfe\u1f71\u1f73\u1f75\u1f77\u1f79\u1f7b\u1f7d\u1fbb\u1fbe\u1fc9\u1fcb\u1fd3\u1fdb\u1fe3\u1feb\u1fee-\u1fef\u1ff9\u1ffb\u1ffd\u2000-\u2001\u20d0-\u20d1\u20d4-\u20d7\u20e7-\u20e9\u2126\u212a-\u212b\u2329-\u232a\u2adc\u302b-\u302c\uaab2-\uaab3\uf900-\ufa0d\ufa10\ufa12\ufa15-\ufa1e\ufa20\ufa22\ufa25-\ufa26\ufa2a-\ufa2d\ufa30-\ufa6d\ufa70-\ufad9\ufb1d\ufb1f\ufb2a-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufb4e\ufff0-\uffff]/g;e.exports={quote:function(e){var t=JSON.stringify(e);return i.lastIndex=0,i.test(t)?(r||(r=function(e){var t,n={},r=[];for(t=0;t<65536;t++)r.push(String.fromCharCode(t));return e.lastIndex=0,r.join('').replace(e,(function(e){return n[e]='\\u'+('0000'+e.charCodeAt(0).toString(16)).slice(-4),''})),e.lastIndex=0,n}(i)),t.replace(i,(function(e){return r[e]}))):t}}},function(e,t,n){"use strict";e.exports=function(e){return{filterToEnabled:function(t,n){var r={main:[],facade:[]};return t?'string'==typeof t&&(t=[t]):t=[],e.forEach((function(e){e&&('websocket'===e.transportName&&!1===n.websocket||(t.length&&-1===t.indexOf(e.transportName)?e.transportName:e.enabled(n)?(e.transportName,r.main.push(e),e.facadeTransport&&r.facade.push(e.facadeTransport)):e.transportName))})),r}}}},function(e,t,n){"use strict";(function(t){var n={};['log','debug','warn'].forEach((function(e){var r;try{r=t.console&&t.console[e]&&t.console[e].apply}catch(e){}n[e]=r?function(){return t.console[e].apply(t.console,arguments)}:'log'===e?function(){}:n.log})),e.exports=n}).call(this,n(23))},function(e,t,n){"use strict";var r=n(21),i=n(96);function o(){i.call(this),this.initEvent('close',!1,!1),this.wasClean=!1,this.code=0,this.reason=''}r(o,i),e.exports=o},function(e,t,n){"use strict";var r=n(21),i=n(96);function o(e){i.call(this),this.initEvent('message',!1,!1),this.data=e}r(o,i),e.exports=o},function(e,t,n){"use strict";var r=n(37).EventEmitter,i=n(21),o=n(43),a=n(93),s=n(74),l=n(69),c=n(201),u=n(202),f=n(120);function d(e,t){var n=this;r.call(this),setTimeout((function(){n.doXhr(e,t)}),0)}i(d,r),d._getReceiver=function(e,t,n){return n.sameOrigin?new f(t,l):s.enabled?new f(t,s):a.enabled&&n.sameScheme?new f(t,a):u.enabled()?new u(e,t):new f(t,c)},d.prototype.doXhr=function(e,t){var n=this,r=o.addPath(e,'/info');this.xo=d._getReceiver(e,r,t),this.timeoutRef=setTimeout((function(){n._cleanup(!1),n.emit('finish')}),d.timeout),this.xo.once('finish',(function(e,t){n._cleanup(!0),n.emit('finish',e,t)}))},d.prototype._cleanup=function(e){clearTimeout(this.timeoutRef),this.timeoutRef=null,!e&&this.xo&&this.xo.close(),this.xo=null},d.prototype.close=function(){this.removeAllListeners(),this._cleanup(!1)},d.timeout=8e3,e.exports=d},function(e,t,n){"use strict";var r=n(37).EventEmitter;function i(){var e=this;r.call(this),this.to=setTimeout((function(){e.emit('finish',200,'{}')}),i.timeout)}n(21)(i,r),i.prototype.close=function(){clearTimeout(this.to)},i.timeout=2e3,e.exports=i},function(e,t,n){"use strict";(function(t){var r=n(37).EventEmitter,i=n(21),o=n(50),a=n(114),s=n(119);function l(e,n){var i=this;r.call(this);var l=function(){var t=i.ifr=new a(s.transportName,n,e);t.once('message',(function(e){if(e){var t;try{t=JSON.parse(e)}catch(e){return i.emit('finish'),void i.close()}var n=t[0],r=t[1];i.emit('finish',n,r)}i.close()})),t.once('close',(function(){i.emit('finish'),i.close()}))};t.document.body?l():o.attachEvent('load',l)}i(l,r),l.enabled=function(){return a.enabled()},l.prototype.close=function(){this.ifr&&this.ifr.close(),this.removeAllListeners(),this.ifr=null},e.exports=l}).call(this,n(23))},function(e,t,n){"use strict";var r=n(43),i=n(50),o=n(204),a=n(119),s=n(71),l=n(118);e.exports=function(e,t){var n,c={};t.forEach((function(e){e.facadeTransport&&(c[e.facadeTransport.transportName]=e.facadeTransport)})),c[a.transportName]=a,e.bootstrap_iframe=function(){var t;s.currentWindowId=l.hash.slice(1);i.attachEvent('message',(function(i){if(i.source===parent&&(void 0===n&&(n=i.origin),i.origin===n)){var a;try{a=JSON.parse(i.data)}catch(e){return void i.data}if(a.windowId===s.currentWindowId)switch(a.type){case's':var u;try{u=JSON.parse(a.data)}catch(e){a.data;break}var f=u[0],d=u[1],h=u[2],p=u[3];if(f!==e.version)throw new Error('Incompatible SockJS! Main site uses:'+' "'+f+'", the iframe:'+' "'+e.version+'".');if(!r.isOriginEqual(h,l.href)||!r.isOriginEqual(p,l.href))throw new Error('Can\'t connect to different domain from within an '+'iframe. ('+l.href+', '+h+', '+p+')');t=new o(new c[d](h,p));break;case'm':t._send(a.data);break;case'c':t&&t._close(),t=null}}})),s.postMessage('s')}}},function(e,t,n){"use strict";var r=n(71);function i(e){this._transport=e,e.on('message',this._transportMessage.bind(this)),e.on('close',this._transportClose.bind(this))}i.prototype._transportClose=function(e,t){r.postMessage('c',JSON.stringify([e,t]))},i.prototype._transportMessage=function(e){r.postMessage('t',e)},i.prototype._send=function(e){this._transport.send(e)},i.prototype._close=function(){this._transport.close(),this._transport.removeAllListeners()},e.exports=i},function(e,t,n){"use strict";var r=n(31),i=n(121),o=n(206),a=n(128);var s=function e(t){var n=new o(t),s=i(o.prototype.request,n);return r.extend(s,o.prototype,n),r.extend(s,n),s.create=function(n){return e(a(t,n))},s}(n(97));s.Axios=o,s.CanceledError=n(75),s.CancelToken=n(224),s.isCancel=n(127),s.VERSION=n(129).version,s.toFormData=n(124),s.AxiosError=n(60),s.Cancel=s.CanceledError,s.all=function(e){return Promise.all(e)},s.spread=n(225),s.isAxiosError=n(226),e.exports=s,e.exports.default=s},function(e,t,n){"use strict";var r=n(31),i=n(122),o=n(207),a=n(208),s=n(128),l=n(126),c=n(223),u=c.validators;function f(e){this.defaults=e,this.interceptors={request:new o,response:new o}}f.prototype.request=function(e,t){'string'==typeof e?(t=t||{}).url=e:t=e||{},(t=s(this.defaults,t)).method?t.method=t.method.toLowerCase():this.defaults.method?t.method=this.defaults.method.toLowerCase():t.method='get';var n=t.transitional;void 0!==n&&c.assertOptions(n,{silentJSONParsing:u.transitional(u.boolean),forcedJSONParsing:u.transitional(u.boolean),clarifyTimeoutError:u.transitional(u.boolean)},!1);var r=[],i=!0;this.interceptors.request.forEach((function(e){'function'==typeof e.runWhen&&!1===e.runWhen(t)||(i=i&&e.synchronous,r.unshift(e.fulfilled,e.rejected))}));var o,l=[];if(this.interceptors.response.forEach((function(e){l.push(e.fulfilled,e.rejected)})),!i){var f=[a,void 0];for(Array.prototype.unshift.apply(f,r),f=f.concat(l),o=Promise.resolve(t);f.length;)o=o.then(f.shift(),f.shift());return o}for(var d=t;r.length;){var h=r.shift(),p=r.shift();try{d=h(d)}catch(e){p(e);break}}try{o=a(d)}catch(e){return Promise.reject(e)}for(;l.length;)o=o.then(l.shift(),l.shift());return o},f.prototype.getUri=function(e){e=s(this.defaults,e);var t=l(e.baseURL,e.url);return i(t,e.params,e.paramsSerializer)},r.forEach(['delete','get','head','options'],(function(e){f.prototype[e]=function(t,n){return this.request(s(n||{},{method:e,url:t,data:(n||{}).data}))}})),r.forEach(['post','put','patch'],(function(e){function t(t){return function(n,r,i){return this.request(s(i||{},{method:e,headers:t?{'Content-Type':'multipart/form-data'}:{},url:n,data:r}))}}f.prototype[e]=t(),f.prototype[e+'Form']=t(!0)})),e.exports=f},function(e,t,n){"use strict";var r=n(31);function i(){this.handlers=[]}i.prototype.use=function(e,t,n){return this.handlers.push({fulfilled:e,rejected:t,synchronous:!!n&&n.synchronous,runWhen:n?n.runWhen:null}),this.handlers.length-1},i.prototype.eject=function(e){this.handlers[e]&&(this.handlers[e]=null)},i.prototype.forEach=function(e){r.forEach(this.handlers,(function(t){null!==t&&e(t)}))},e.exports=i},function(e,t,n){"use strict";var r=n(31),i=n(209),o=n(127),a=n(97),s=n(75);function l(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new s}e.exports=function(e){return l(e),e.headers=e.headers||{},e.data=i.call(e,e.data,e.headers,e.transformRequest),e.headers=r.merge(e.headers.common||{},e.headers[e.method]||{},e.headers),r.forEach(['delete','get','head','post','put','patch','common'],(function(t){delete e.headers[t]})),(e.adapter||a.adapter)(e).then((function(t){return l(e),t.data=i.call(e,t.data,t.headers,e.transformResponse),t}),(function(t){return o(t)||(l(e),t&&t.response&&(t.response.data=i.call(e,t.response.data,t.response.headers,e.transformResponse))),Promise.reject(t)}))}},function(e,t,n){"use strict";var r=n(31),i=n(97);e.exports=function(e,t,n){var o=this||i;return r.forEach(n,(function(n){e=n.call(o,e,t)})),e}},function(e,t,n){"use strict";var r=n(31);e.exports=function(e,t){r.forEach(e,(function(n,r){r!==t&&r.toUpperCase()===t.toUpperCase()&&(e[t]=n,delete e[r])}))}},function(e,t,n){"use strict";(function(e){var r=n(212),i=n(213),o=n(214);function a(){return l.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function s(e,t){if(a()<t)throw new RangeError('Invalid typed array length');return l.TYPED_ARRAY_SUPPORT?(e=new Uint8Array(t)).__proto__=l.prototype:(null===e&&(e=new l(t)),e.length=t),e}function l(e,t,n){if(!(l.TYPED_ARRAY_SUPPORT||this instanceof l))return new l(e,t,n);if('number'==typeof e){if('string'==typeof t)throw new Error('If encoding is specified then the first argument must be a string');return f(this,e)}return c(this,e,t,n)}function c(e,t,n,r){if('number'==typeof t)throw new TypeError('"value" argument must not be a number');return'undefined'!=typeof ArrayBuffer&&t instanceof ArrayBuffer?function(e,t,n,r){if(t.byteLength,n<0||t.byteLength<n)throw new RangeError('\'offset\' is out of bounds');if(t.byteLength<n+(r||0))throw new RangeError('\'length\' is out of bounds');t=void 0===n&&void 0===r?new Uint8Array(t):void 0===r?new Uint8Array(t,n):new Uint8Array(t,n,r);l.TYPED_ARRAY_SUPPORT?(e=t).__proto__=l.prototype:e=d(e,t);return e}(e,t,n,r):'string'==typeof t?function(e,t,n){'string'==typeof n&&''!==n||(n='utf8');if(!l.isEncoding(n))throw new TypeError('"encoding" must be a valid string encoding');var r=0|p(t,n),i=(e=s(e,r)).write(t,n);i!==r&&(e=e.slice(0,i));return e}(e,t,n):function(e,t){if(l.isBuffer(t)){var n=0|h(t.length);return 0===(e=s(e,n)).length||t.copy(e,0,0,n),e}if(t){if('undefined'!=typeof ArrayBuffer&&t.buffer instanceof ArrayBuffer||'length'in t)return'number'!=typeof t.length||(r=t.length)!=r?s(e,0):d(e,t);if('Buffer'===t.type&&o(t.data))return d(e,t.data)}var r;throw new TypeError('First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.')}(e,t)}function u(e){if('number'!=typeof e)throw new TypeError('"size" argument must be a number');if(e<0)throw new RangeError('"size" argument must not be negative')}function f(e,t){if(u(t),e=s(e,t<0?0:0|h(t)),!l.TYPED_ARRAY_SUPPORT)for(var n=0;n<t;++n)e[n]=0;return e}function d(e,t){var n=t.length<0?0:0|h(t.length);e=s(e,n);for(var r=0;r<n;r+=1)e[r]=255&t[r];return e}function h(e){if(e>=a())throw new RangeError('Attempt to allocate Buffer larger than maximum '+'size: 0x'+a().toString(16)+' bytes');return 0|e}function p(e,t){if(l.isBuffer(e))return e.length;if('undefined'!=typeof ArrayBuffer&&'function'==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;'string'!=typeof e&&(e=''+e);var n=e.length;if(0===n)return 0;for(var r=!1;;)switch(t){case'ascii':case'latin1':case'binary':return n;case'utf8':case'utf-8':case void 0:return B(e).length;case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return 2*n;case'hex':return n>>>1;case'base64':return U(e).length;default:if(r)return B(e).length;t=(''+t).toLowerCase(),r=!0}}function g(e,t,n){var r=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return'';if((void 0===n||n>this.length)&&(n=this.length),n<=0)return'';if((n>>>=0)<=(t>>>=0))return'';for(e||(e='utf8');1;)switch(e){case'hex':return T(this,t,n);case'utf8':case'utf-8':return j(this,t,n);case'ascii':return P(this,t,n);case'latin1':case'binary':return _(this,t,n);case'base64':return S(this,t,n);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return A(this,t,n);default:if(r)throw new TypeError('Unknown encoding: '+e);e=(e+'').toLowerCase(),r=!0}}function v(e,t,n){var r=e[t];e[t]=e[n],e[n]=r}function m(e,t,n,r,i){if(0===e.length)return-1;if('string'==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),n=+n,isNaN(n)&&(n=i?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(i)return-1;n=e.length-1}else if(n<0){if(!i)return-1;n=0}if('string'==typeof t&&(t=l.from(t,r)),l.isBuffer(t))return 0===t.length?-1:y(e,t,n,r,i);if('number'==typeof t)return t&=255,l.TYPED_ARRAY_SUPPORT&&'function'==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):y(e,[t],n,r,i);throw new TypeError('val must be string, number or Buffer')}function y(e,t,n,r,i){var o,a=1,s=e.length,l=t.length;if(void 0!==r&&('ucs2'===(r=String(r).toLowerCase())||'ucs-2'===r||'utf16le'===r||'utf-16le'===r)){if(e.length<2||t.length<2)return-1;a=2,s/=2,l/=2,n/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){var u=-1;for(o=n;o<s;o++)if(c(e,o)===c(t,-1===u?0:o-u)){if(-1===u&&(u=o),o-u+1===l)return u*a}else-1!==u&&(o-=o-u),u=-1}else for(n+l>s&&(n=s-l),o=n;o>=0;o--){for(var f=!0,d=0;d<l;d++)if(c(e,o+d)!==c(t,d)){f=!1;break}if(f)return o}return-1}function b(e,t,n,r){n=Number(n)||0;var i=e.length-n;r?(r=Number(r))>i&&(r=i):r=i;var o=t.length;if(o%2!=0)throw new TypeError('Invalid hex string');r>o/2&&(r=o/2);for(var a=0;a<r;++a){var s=parseInt(t.substr(2*a,2),16);if(isNaN(s))return a;e[n+a]=s}return a}function w(e,t,n,r){return H(B(t,e.length-n),e,n,r)}function O(e,t,n,r){return H(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,r)}function x(e,t,n,r){return O(e,t,n,r)}function k(e,t,n,r){return H(U(t),e,n,r)}function C(e,t,n,r){return H(function(e,t){for(var n,r,i,o=[],a=0;a<e.length&&!((t-=2)<0);++a)n=e.charCodeAt(a),r=n>>8,i=n%256,o.push(i),o.push(r);return o}(t,e.length-n),e,n,r)}function S(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function j(e,t,n){n=Math.min(e.length,n);for(var r=[],i=t;i<n;){var o,a,s,l,c=e[i],u=null,f=c>239?4:c>223?3:c>191?2:1;if(i+f<=n)switch(f){case 1:c<128&&(u=c);break;case 2:128==(192&(o=e[i+1]))&&(l=(31&c)<<6|63&o)>127&&(u=l);break;case 3:o=e[i+1],a=e[i+2],128==(192&o)&&128==(192&a)&&(l=(15&c)<<12|(63&o)<<6|63&a)>2047&&(l<55296||l>57343)&&(u=l);break;case 4:o=e[i+1],a=e[i+2],s=e[i+3],128==(192&o)&&128==(192&a)&&128==(192&s)&&(l=(15&c)<<18|(63&o)<<12|(63&a)<<6|63&s)>65535&&l<1114112&&(u=l)}null===u?(u=65533,f=1):u>65535&&(u-=65536,r.push(u>>>10&1023|55296),u=56320|1023&u),r.push(u),i+=f}return function(e){var t=e.length;if(t<=E)return String.fromCharCode.apply(String,e);var n='',r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=E));return n}(r)}t.Buffer=l,t.SlowBuffer=function(e){+e!=e&&(e=0);return l.alloc(+e)},t.INSPECT_MAX_BYTES=50,l.TYPED_ARRAY_SUPPORT=void 0!==e.TYPED_ARRAY_SUPPORT?e.TYPED_ARRAY_SUPPORT:function(){try{var e=new Uint8Array(1);return e.__proto__={__proto__:Uint8Array.prototype,foo:function(){return 42}},42===e.foo()&&'function'==typeof e.subarray&&0===e.subarray(1,1).byteLength}catch(e){return!1}}(),t.kMaxLength=a(),l.poolSize=8192,l._augment=function(e){return e.__proto__=l.prototype,e},l.from=function(e,t,n){return c(null,e,t,n)},l.TYPED_ARRAY_SUPPORT&&(l.prototype.__proto__=Uint8Array.prototype,l.__proto__=Uint8Array,'undefined'!=typeof Symbol&&Symbol.species&&l[Symbol.species]===l&&Object.defineProperty(l,Symbol.species,{value:null,configurable:!0})),l.alloc=function(e,t,n){return function(e,t,n,r){return u(t),t<=0?s(e,t):void 0!==n?'string'==typeof r?s(e,t).fill(n,r):s(e,t).fill(n):s(e,t)}(null,e,t,n)},l.allocUnsafe=function(e){return f(null,e)},l.allocUnsafeSlow=function(e){return f(null,e)},l.isBuffer=function(e){return!(null==e||!e._isBuffer)},l.compare=function(e,t){if(!l.isBuffer(e)||!l.isBuffer(t))throw new TypeError('Arguments must be Buffers');if(e===t)return 0;for(var n=e.length,r=t.length,i=0,o=Math.min(n,r);i<o;++i)if(e[i]!==t[i]){n=e[i],r=t[i];break}return n<r?-1:r<n?1:0},l.isEncoding=function(e){switch(String(e).toLowerCase()){case'hex':case'utf8':case'utf-8':case'ascii':case'latin1':case'binary':case'base64':case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return!0;default:return!1}},l.concat=function(e,t){if(!o(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return l.alloc(0);var n;if(void 0===t)for(t=0,n=0;n<e.length;++n)t+=e[n].length;var r=l.allocUnsafe(t),i=0;for(n=0;n<e.length;++n){var a=e[n];if(!l.isBuffer(a))throw new TypeError('"list" argument must be an Array of Buffers');a.copy(r,i),i+=a.length}return r},l.byteLength=p,l.prototype._isBuffer=!0,l.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError('Buffer size must be a multiple of 16-bits');for(var t=0;t<e;t+=2)v(this,t,t+1);return this},l.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError('Buffer size must be a multiple of 32-bits');for(var t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},l.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError('Buffer size must be a multiple of 64-bits');for(var t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},l.prototype.toString=function(){var e=0|this.length;return 0===e?'':0===arguments.length?j(this,0,e):g.apply(this,arguments)},l.prototype.equals=function(e){if(!l.isBuffer(e))throw new TypeError('Argument must be a Buffer');return this===e||0===l.compare(this,e)},l.prototype.inspect=function(){var e='',n=t.INSPECT_MAX_BYTES;return this.length>0&&(e=this.toString('hex',0,n).match(/.{2}/g).join(' '),this.length>n&&(e+=' ... ')),'<Buffer '+e+'>'},l.prototype.compare=function(e,t,n,r,i){if(!l.isBuffer(e))throw new TypeError('Argument must be a Buffer');if(void 0===t&&(t=0),void 0===n&&(n=e?e.length:0),void 0===r&&(r=0),void 0===i&&(i=this.length),t<0||n>e.length||r<0||i>this.length)throw new RangeError('out of range index');if(r>=i&&t>=n)return 0;if(r>=i)return-1;if(t>=n)return 1;if(this===e)return 0;for(var o=(i>>>=0)-(r>>>=0),a=(n>>>=0)-(t>>>=0),s=Math.min(o,a),c=this.slice(r,i),u=e.slice(t,n),f=0;f<s;++f)if(c[f]!==u[f]){o=c[f],a=u[f];break}return o<a?-1:a<o?1:0},l.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},l.prototype.indexOf=function(e,t,n){return m(this,e,t,n,!0)},l.prototype.lastIndexOf=function(e,t,n){return m(this,e,t,n,!1)},l.prototype.write=function(e,t,n,r){if(void 0===t)r='utf8',n=this.length,t=0;else if(void 0===n&&'string'==typeof t)r=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error('Buffer.write(string, encoding, offset[, length]) is no longer supported');t|=0,isFinite(n)?(n|=0,void 0===r&&(r='utf8')):(r=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError('Attempt to write outside buffer bounds');r||(r='utf8');for(var o=!1;;)switch(r){case'hex':return b(this,e,t,n);case'utf8':case'utf-8':return w(this,e,t,n);case'ascii':return O(this,e,t,n);case'latin1':case'binary':return x(this,e,t,n);case'base64':return k(this,e,t,n);case'ucs2':case'ucs-2':case'utf16le':case'utf-16le':return C(this,e,t,n);default:if(o)throw new TypeError('Unknown encoding: '+r);r=(''+r).toLowerCase(),o=!0}},l.prototype.toJSON=function(){return{type:'Buffer',data:Array.prototype.slice.call(this._arr||this,0)}};var E=4096;function P(e,t,n){var r='';n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(127&e[i]);return r}function _(e,t,n){var r='';n=Math.min(e.length,n);for(var i=t;i<n;++i)r+=String.fromCharCode(e[i]);return r}function T(e,t,n){var r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);for(var i='',o=t;o<n;++o)i+=V(e[o]);return i}function A(e,t,n){for(var r=e.slice(t,n),i='',o=0;o<r.length;o+=2)i+=String.fromCharCode(r[o]+256*r[o+1]);return i}function M(e,t,n){if(e%1!=0||e<0)throw new RangeError('offset is not uint');if(e+t>n)throw new RangeError('Trying to access beyond buffer length')}function D(e,t,n,r,i,o){if(!l.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(n+r>e.length)throw new RangeError('Index out of range')}function L(e,t,n,r){t<0&&(t=65535+t+1);for(var i=0,o=Math.min(e.length-n,2);i<o;++i)e[n+i]=(t&255<<8*(r?i:1-i))>>>8*(r?i:1-i)}function N(e,t,n,r){t<0&&(t=4294967295+t+1);for(var i=0,o=Math.min(e.length-n,4);i<o;++i)e[n+i]=t>>>8*(r?i:3-i)&255}function R(e,t,n,r,i,o){if(n+r>e.length)throw new RangeError('Index out of range');if(n<0)throw new RangeError('Index out of range')}function F(e,t,n,r,o){return o||R(e,0,n,4),i.write(e,t,n,r,23,4),n+4}function I(e,t,n,r,o){return o||R(e,0,n,8),i.write(e,t,n,r,52,8),n+8}l.prototype.slice=function(e,t){var n,r=this.length;if((e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e),l.TYPED_ARRAY_SUPPORT)(n=this.subarray(e,t)).__proto__=l.prototype;else{var i=t-e;n=new l(i,void 0);for(var o=0;o<i;++o)n[o]=this[o+e]}return n},l.prototype.readUIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r},l.prototype.readUIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e+--t],i=1;t>0&&(i*=256);)r+=this[e+--t]*i;return r},l.prototype.readUInt8=function(e,t){return t||M(e,1,this.length),this[e]},l.prototype.readUInt16LE=function(e,t){return t||M(e,2,this.length),this[e]|this[e+1]<<8},l.prototype.readUInt16BE=function(e,t){return t||M(e,2,this.length),this[e]<<8|this[e+1]},l.prototype.readUInt32LE=function(e,t){return t||M(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},l.prototype.readUInt32BE=function(e,t){return t||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},l.prototype.readIntLE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=this[e],i=1,o=0;++o<t&&(i*=256);)r+=this[e+o]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},l.prototype.readIntBE=function(e,t,n){e|=0,t|=0,n||M(e,t,this.length);for(var r=t,i=1,o=this[e+--r];r>0&&(i*=256);)o+=this[e+--r]*i;return o>=(i*=128)&&(o-=Math.pow(2,8*t)),o},l.prototype.readInt8=function(e,t){return t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},l.prototype.readInt16LE=function(e,t){t||M(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt16BE=function(e,t){t||M(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},l.prototype.readInt32LE=function(e,t){return t||M(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},l.prototype.readInt32BE=function(e,t){return t||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},l.prototype.readFloatLE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!0,23,4)},l.prototype.readFloatBE=function(e,t){return t||M(e,4,this.length),i.read(this,e,!1,23,4)},l.prototype.readDoubleLE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!0,52,8)},l.prototype.readDoubleBE=function(e,t){return t||M(e,8,this.length),i.read(this,e,!1,52,8)},l.prototype.writeUIntLE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,o=0;for(this[t]=255&e;++o<n&&(i*=256);)this[t+o]=e/i&255;return t+n},l.prototype.writeUIntBE=function(e,t,n,r){(e=+e,t|=0,n|=0,r)||D(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+n},l.prototype.writeUInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,255,0),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},l.prototype.writeUInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeUInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,65535,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeUInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):N(this,e,t,!0),t+4},l.prototype.writeUInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,4294967295,0),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeIntLE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=0,a=1,s=0;for(this[t]=255&e;++o<n&&(a*=256);)e<0&&0===s&&0!==this[t+o-1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeIntBE=function(e,t,n,r){if(e=+e,t|=0,!r){var i=Math.pow(2,8*n-1);D(this,e,t,n,i-1,-i)}var o=n-1,a=1,s=0;for(this[t+o]=255&e;--o>=0&&(a*=256);)e<0&&0===s&&0!==this[t+o+1]&&(s=1),this[t+o]=(e/a>>0)-s&255;return t+n},l.prototype.writeInt8=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,1,127,-128),l.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},l.prototype.writeInt16LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):L(this,e,t,!0),t+2},l.prototype.writeInt16BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,2,32767,-32768),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):L(this,e,t,!1),t+2},l.prototype.writeInt32LE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),l.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):N(this,e,t,!0),t+4},l.prototype.writeInt32BE=function(e,t,n){return e=+e,t|=0,n||D(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),l.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):N(this,e,t,!1),t+4},l.prototype.writeFloatLE=function(e,t,n){return F(this,e,t,!0,n)},l.prototype.writeFloatBE=function(e,t,n){return F(this,e,t,!1,n)},l.prototype.writeDoubleLE=function(e,t,n){return I(this,e,t,!0,n)},l.prototype.writeDoubleBE=function(e,t,n){return I(this,e,t,!1,n)},l.prototype.copy=function(e,t,n,r){if(n||(n=0),r||0===r||(r=this.length),t>=e.length&&(t=e.length),t||(t=0),r>0&&r<n&&(r=n),r===n)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError('targetStart out of bounds');if(n<0||n>=this.length)throw new RangeError('sourceStart out of bounds');if(r<0)throw new RangeError('sourceEnd out of bounds');r>this.length&&(r=this.length),e.length-t<r-n&&(r=e.length-t+n);var i,o=r-n;if(this===e&&n<t&&t<r)for(i=o-1;i>=0;--i)e[i+t]=this[i+n];else if(o<1e3||!l.TYPED_ARRAY_SUPPORT)for(i=0;i<o;++i)e[i+t]=this[i+n];else Uint8Array.prototype.set.call(e,this.subarray(n,n+o),t);return o},l.prototype.fill=function(e,t,n,r){if('string'==typeof e){if('string'==typeof t?(r=t,t=0,n=this.length):'string'==typeof n&&(r=n,n=this.length),1===e.length){var i=e.charCodeAt(0);i<256&&(e=i)}if(void 0!==r&&'string'!=typeof r)throw new TypeError('encoding must be a string');if('string'==typeof r&&!l.isEncoding(r))throw new TypeError('Unknown encoding: '+r)}else'number'==typeof e&&(e&=255);if(t<0||this.length<t||this.length<n)throw new RangeError('Out of range index');if(n<=t)return this;var o;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),'number'==typeof e)for(o=t;o<n;++o)this[o]=e;else{var a=l.isBuffer(e)?e:B(new l(e,r).toString()),s=a.length;for(o=0;o<n-t;++o)this[o+t]=a[o%s]}return this};var z=/[^+\/0-9A-Za-z-_]/g;function V(e){return e<16?'0'+e.toString(16):e.toString(16)}function B(e,t){var n;t=t||1/0;for(var r=e.length,i=null,o=[],a=0;a<r;++a){if((n=e.charCodeAt(a))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===r){(t-=3)>-1&&o.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&o.push(239,191,189),i=n;continue}n=(i-55296<<10|n-56320)+65536}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;o.push(n)}else if(n<2048){if((t-=2)<0)break;o.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;o.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error('Invalid code point');if((t-=4)<0)break;o.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return o}function U(e){return r.toByteArray(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,'')}(e).replace(z,'')).length<2)return'';for(;e.length%4!=0;)e+='=';return e}(e))}function H(e,t,n,r){for(var i=0;i<r&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}}).call(this,n(23))},function(e,t,n){"use strict";t.byteLength=function(e){var t=c(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,r=c(e),a=r[0],s=r[1],l=new o(function(e,t,n){return 3*(t+n)/4-n}(0,a,s)),u=0,f=s>0?a-4:a;for(n=0;n<f;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],l[u++]=t>>16&255,l[u++]=t>>8&255,l[u++]=255&t;2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,l[u++]=255&t);1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,l[u++]=t>>8&255,l[u++]=255&t);return l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,l=n-i;s<l;s+=a)o.push(u(e,s,s+a>l?l:s+a));1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+'==')):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+'='));return o.join('')};for(var r=[],i=[],o='undefined'!=typeof Uint8Array?Uint8Array:Array,a='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/',s=0,l=a.length;s<l;++s)r[s]=a[s],i[a.charCodeAt(s)]=s;function c(e){var t=e.length;if(t%4>0)throw new Error('Invalid string. Length must be a multiple of 4');var n=e.indexOf('=');return-1===n&&(n=t),[n,n===t?0:4-n%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join('')}i['-'.charCodeAt(0)]=62,i['_'.charCodeAt(0)]=63},function(e,t){t.read=function(e,t,n,r,i){var o,a,s=8*i-r-1,l=(1<<s)-1,c=l>>1,u=-7,f=n?i-1:0,d=n?-1:1,h=e[t+f];for(f+=d,o=h&(1<<-u)-1,h>>=-u,u+=s;u>0;o=256*o+e[t+f],f+=d,u-=8);for(a=o&(1<<-u)-1,o>>=-u,u+=r;u>0;a=256*a+e[t+f],f+=d,u-=8);if(0===o)o=1-c;else{if(o===l)return a?NaN:(h?-1:1)*(1/0);a+=Math.pow(2,r),o-=c}return(h?-1:1)*a*Math.pow(2,o-r)},t.write=function(e,t,n,r,i,o){var a,s,l,c=8*o-i-1,u=(1<<c)-1,f=u>>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=r?0:o-1,p=r?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=u):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),(t+=a+f>=1?d/l:d*Math.pow(2,1-f))*l>=2&&(a++,l/=2),a+f>=u?(s=0,a=u):a+f>=1?(s=(t*l-1)*Math.pow(2,i),a+=f):(s=t*Math.pow(2,f-1)*Math.pow(2,i),a=0));i>=8;e[n+h]=255&s,h+=p,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[n+h]=255&a,h+=p,a/=256,c-=8);e[n+h-p]|=128*g}},function(e,t){var n={}.toString;e.exports=Array.isArray||function(e){return'[object Array]'==n.call(e)}},function(e,t,n){"use strict";var r=n(60);e.exports=function(e,t,n){var i=n.config.validateStatus;n.status&&i&&!i(n.status)?t(new r('Request failed with status code '+n.status,[r.ERR_BAD_REQUEST,r.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n)):e(n)}},function(e,t,n){"use strict";var r=n(31);e.exports=r.isStandardBrowserEnv()?{write:function(e,t,n,i,o,a){var s=[];s.push(e+'='+encodeURIComponent(t)),r.isNumber(n)&&s.push('expires='+new Date(n).toGMTString()),r.isString(i)&&s.push('path='+i),r.isString(o)&&s.push('domain='+o),!0===a&&s.push('secure'),document.cookie=s.join('; ')},read:function(e){var t=document.cookie.match(new RegExp('(^|;\\s*)('+e+')=([^;]*)'));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,'',Date.now()-864e5)}}:{write:function(){},read:function(){return null},remove:function(){}}},function(e,t,n){"use strict";e.exports=function(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}},function(e,t,n){"use strict";e.exports=function(e,t){return t?e.replace(/\/+$/,'')+'/'+t.replace(/^\/+/,''):e}},function(e,t,n){"use strict";var r=n(31),i=['age','authorization','content-length','content-type','etag','expires','from','host','if-modified-since','if-unmodified-since','last-modified','location','max-forwards','proxy-authorization','referer','retry-after','user-agent'];e.exports=function(e){var t,n,o,a={};return e?(r.forEach(e.split('\n'),(function(e){if(o=e.indexOf(':'),t=r.trim(e.substr(0,o)).toLowerCase(),n=r.trim(e.substr(o+1)),t){if(a[t]&&i.indexOf(t)>=0)return;a[t]='set-cookie'===t?(a[t]?a[t]:[]).concat([n]):a[t]?a[t]+', '+n:n}})),a):a}},function(e,t,n){"use strict";var r=n(31);e.exports=r.isStandardBrowserEnv()?function(){var e,t=/(msie|trident)/i.test(navigator.userAgent),n=document.createElement('a');function i(e){var r=e;return t&&(n.setAttribute('href',r),r=n.href),n.setAttribute('href',r),{href:n.href,protocol:n.protocol?n.protocol.replace(/:$/,''):'',host:n.host,search:n.search?n.search.replace(/^\?/,''):'',hash:n.hash?n.hash.replace(/^#/,''):'',hostname:n.hostname,port:n.port,pathname:'/'===n.pathname.charAt(0)?n.pathname:'/'+n.pathname}}return e=i(window.location.href),function(t){var n=r.isString(t)?i(t):t;return n.protocol===e.protocol&&n.host===e.host}}():function(){return!0}},function(e,t,n){"use strict";e.exports=function(e){var t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||''}},function(e,t){e.exports=null},function(e,t,n){"use strict";var r=n(129).version,i=n(60),o={};['object','boolean','number','function','string','symbol'].forEach((function(e,t){o[e]=function(n){return typeof n===e||'a'+(t<1?'n ':' ')+e}}));var a={};o.transitional=function(e,t,n){function o(e,t){return'[Axios v'+r+'] Transitional option \''+e+'\''+t+(n?'. '+n:'')}return function(n,r,s){if(!1===e)throw new i(o(r,' has been removed'+(t?' in '+t:'')),i.ERR_DEPRECATED);return t&&!a[r]&&(a[r]=!0,console.warn(o(r,' has been deprecated since v'+t+' and will be removed in the near future'))),!e||e(n,r,s)}},e.exports={assertOptions:function(e,t,n){if('object'!=typeof e)throw new i('options must be an object',i.ERR_BAD_OPTION_VALUE);for(var r=Object.keys(e),o=r.length;o-- >0;){var a=r[o],s=t[a];if(s){var l=e[a],c=void 0===l||s(l,a,e);if(!0!==c)throw new i('option '+a+' must be '+c,i.ERR_BAD_OPTION_VALUE)}else if(!0!==n)throw new i('Unknown option '+a,i.ERR_BAD_OPTION)}},validators:o}},function(e,t,n){"use strict";var r=n(75);function i(e){if('function'!=typeof e)throw new TypeError('executor must be a function.');var t;this.promise=new Promise((function(e){t=e}));var n=this;this.promise.then((function(e){if(n._listeners){var t,r=n._listeners.length;for(t=0;t<r;t++)n._listeners[t](e);n._listeners=null}})),this.promise.then=function(e){var t,r=new Promise((function(e){n.subscribe(e),t=e})).then(e);return r.cancel=function(){n.unsubscribe(t)},r},e((function(e){n.reason||(n.reason=new r(e),t(n.reason))}))}i.prototype.throwIfRequested=function(){if(this.reason)throw this.reason},i.prototype.subscribe=function(e){this.reason?e(this.reason):this._listeners?this._listeners.push(e):this._listeners=[e]},i.prototype.unsubscribe=function(e){if(this._listeners){var t=this._listeners.indexOf(e);-1!==t&&this._listeners.splice(t,1)}},i.source=function(){var e;return{token:new i((function(t){e=t})),cancel:e}},e.exports=i},function(e,t,n){"use strict";e.exports=function(e){return function(t){return e.apply(null,t)}}},function(e,t,n){"use strict";var r=n(31);e.exports=function(e){return r.isObject(e)&&!0===e.isAxiosError}},function(e,t){e.exports=function(e,t){if(null==e)return{};var n,r,i={},o=Object.keys(e);for(r=0;r<o.length;r++)n=o[r],t.indexOf(n)>=0||(i[n]=e[n]);return i},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){e.exports=function(e){if(Array.isArray(e))return e},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){e.exports=function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,o=[],a=!0,s=!1;try{for(n=n.call(e);!(a=(r=n.next()).done)&&(o.push(r.value),!t||o.length!==t);a=!0);}catch(e){s=!0,i=e}finally{try{a||null==n["return"]||n["return"]()}finally{if(s)throw i}}return o}},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){e.exports=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.")},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){function n(t,r){return e.exports=n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},e.exports.__esModule=!0,e.exports["default"]=e.exports,n(t,r)}e.exports=n,e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t){e.exports=function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e},e.exports.__esModule=!0,e.exports["default"]=e.exports},function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(158),l=n.n(s),c=n(0);function u(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function f(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?u(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):u(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n,r,o={maximumStackLength:500,trackSelection:1},a=function(e){return e.avoidStore||e.noUndo},s=function(e){return Object.keys(e.changedAttributes())};return{name:'UndoManager',init:function(){var u=this,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=f(f({},o),d),e=n.em,this.em=e,n._disable&&(n=f(f({},n),{},{maximumStackLength:0}));var h=!0;return(t=new l.a(f({track:!0,register:[]},n))).changeUndoType('change',{condition:function(e){var t=e.get('_undo');if(t){var n=e.get('_undoexc');if(Object(c["isArray"])(n)&&s(e).some((function(e){return n.indexOf(e)>=0})))return!1;if(Object(c["isBoolean"])(t))return!0;if(Object(c["isArray"])(t)&&s(e).some((function(e){return t.indexOf(e)>=0})))return!0}return!1},on:function(e,t,n){!r&&(r=e.previousAttributes());var i=n||t||{};if(i.noUndo&&setTimeout((function(){r=null})),!a(i)){var o=e.toJSON({fromUndo:h}),s={object:e,before:r,after:o};if(r=null,!Object(c["isEmpty"])(o))return s}}}),t.changeUndoType('add',{on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!a(n)&&u.isRegistered(t))return{object:t,before:void 0,after:e,options:f(f({},n),{},{fromUndo:h})}}}),t.changeUndoType('remove',{on:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(!a(n)&&u.isRegistered(t))return{object:t,before:e,after:void 0,options:f(f({},n),{},{fromUndo:h})}}}),t.changeUndoType('reset',{undo:function(e,t){e.reset(t,{fromUndo:h})},redo:function(e,t,n){e.reset(n,{fromUndo:h})},on:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!a(t)&&u.isRegistered(e))return{object:e,before:t.previousModels,after:i()(e.models),options:f(f({},t),{},{fromUndo:h})}}}),t.on('undo redo',(function(){e.trigger('change:canvasOffset'),e.getSelectedAll().map((function(e){return e.trigger('rerender:layer')}))})),['undo','redo'].forEach((function(n){return t.on(n,(function(){return e.trigger(n)}))})),this},postLoad:function(){n.trackSelection&&e&&this.add(e.get('selected'))},getConfig:function(){return n},add:function(e){return t.register(e),this},remove:function(e){return t.unregister(e),this},removeAll:function(){return t.unregisterAll(),this},start:function(){return t.startTracking(),this},stop:function(){return t.stopTracking(),this},undo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!e.isEditing()&&t.undo(n),this},undoAll:function(){return t.undoAll(),this},redo:function(){var n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return!e.isEditing()&&t.redo(n),this},redoAll:function(){return t.redoAll(),this},hasUndo:function(){return t.isAvailable('undo')},hasRedo:function(){return t.isAvailable('redo')},isRegistered:function(e){return!!this.getInstance().objectRegistry.isRegistered(e)},getStack:function(){return t.stack},getStackGroup:function(){var e=[],t=[];return this.getStack().forEach((function(n){var r=n.get('magicFusionIndex');t.indexOf(r)<0&&(t.push(r),e.push(n))})),e},skip:function(e){this.stop(),e(),this.start()},getGroupedStack:function(){var e={},t=this.getStack();return t.forEach((function(t,n){var r=t.get('magicFusionIndex'),i=function(e,t){var n=e.attributes,r=n.type,i=n.after,o=n.before,a=n.object,s=n.options;return{index:t,type:r,after:i,before:o,object:a,options:void 0===s?{}:s}}(t,n);e[r]?e[r].push(i):e[r]=[i]})),Object.keys(e).map((function(t){var n=e[t];return{index:n[n.length-1].index,actions:n,labels:Object(c["unique"])(n.reduce((function(e,t){var n,r=null===(n=t.options)||void 0===n?void 0:n.action;return r&&e.push(r),e}),[]))}}))},goToGroup:function(e){var t=this;if(e){var n=this.getPointer(),r=e.index-n;Object(c["times"])(Math.abs(r),(function(){t[r<0?'undo':'redo'](!1)}))}},getPointer:function(){return this.getStack().pointer},clear:function(){return t.clear(),this},getInstance:function(){return t},destroy:function(){this.clear().removeAll(),[e,t,n,r].forEach((function(e){return{}})),this.em={}}}}},function(e,t,n){(function(e,t){!function(e,n){"use strict";if(!e.setImmediate){var r,i,o,a,s,l=1,c={},u=!1,f=e.document,d=Object.getPrototypeOf&&Object.getPrototypeOf(e);d=d&&d.setTimeout?d:e,"[object process]"==={}.toString.call(e.process)?r=function(e){t.nextTick((function(){p(e)}))}:!function(){if(e.postMessage&&!e.importScripts){var t=!0,n=e.onmessage;return e.onmessage=function(){t=!1},e.postMessage("","*"),e.onmessage=n,t}}()?e.MessageChannel?((o=new MessageChannel).port1.onmessage=function(e){p(e.data)},r=function(e){o.port2.postMessage(e)}):f&&"onreadystatechange"in f.createElement("script")?(i=f.documentElement,r=function(e){var t=f.createElement("script");t.onreadystatechange=function(){p(e),t.onreadystatechange=null,i.removeChild(t),t=null},i.appendChild(t)}):r=function(e){setTimeout(p,0,e)}:(a="setImmediate$"+Math.random()+"$",s=function(t){t.source===e&&"string"==typeof t.data&&0===t.data.indexOf(a)&&p(+t.data.slice(a.length))},e.addEventListener?e.addEventListener("message",s,!1):e.attachEvent("onmessage",s),r=function(t){e.postMessage(a+t,"*")}),d.setImmediate=function(e){"function"!=typeof e&&(e=new Function(""+e));for(var t=new Array(arguments.length-1),n=0;n<t.length;n++)t[n]=arguments[n+1];var i={callback:e,args:t};return c[l]=i,r(l),l++},d.clearImmediate=h}function h(e){delete c[e]}function p(e){if(u)setTimeout(p,0,e);else{var t=c[e];if(t){u=!0;try{!function(e){var t=e.callback,r=e.args;switch(r.length){case 0:t();break;case 1:t(r[0]);break;case 2:t(r[0],r[1]);break;case 3:t(r[0],r[1],r[2]);break;default:t.apply(n,r)}}(t)}finally{h(e),u=!1}}}}}("undefined"==typeof self?void 0===e?this:e:self)}).call(this,n(23),n(98))},function(e,t,n){1&&function(e){"use strict";var t={script:[["lang",/(javascript|babel)/i,"javascript"],["type",/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i,"javascript"],["type",/./,"text/plain"],[null,null,"javascript"]],style:[["lang",/^css$/i,"css"],["type",/^(text\/)?(x-)?(stylesheet|css)$/i,"css"],["type",/./,"text/plain"],[null,null,"css"]]},n={};function r(e,t){var r=e.match(function(e){var t=n[e];return t||(n[e]=new RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"))}(t));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}function i(e,t){return new RegExp((t?"^":"")+"</s*"+e+"s*>","i")}function o(e,t){for(var n in e)for(var r=t[n]||(t[n]=[]),i=e[n],o=i.length-1;o>=0;o--)r.unshift(i[o])}e.defineMode("htmlmixed",(function(n,a){var s=e.getMode(n,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),l={},c=a&&a.tags,u=a&&a.scriptTypes;if(o(t,l),c&&o(c,l),u)for(var f=u.length-1;f>=0;f--)l.script.unshift(["type",u[f].matches,u[f].mode]);function d(t,o){var a,c=s.token(t,o.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(t.current())&&(a=o.htmlState.tagName&&o.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))o.inTag=a+" ";else if(o.inTag&&u&&/>$/.test(t.current())){var f=/^([\S]+) (.*)/.exec(o.inTag);o.inTag=null;var h=">"==t.current()&&function(e,t){for(var n=0;n<e.length;n++){var i=e[n];if(!i[0]||i[1].test(r(t,i[0])))return i[2]}}(l[f[1]],f[2]),p=e.getMode(n,h),g=i(f[1],!0),v=i(f[1],!1);o.token=function(e,t){return e.match(g,!1)?(t.token=d,t.localState=t.localMode=null,null):function(e,t,n){var r=e.current(),i=r.search(t);return i>-1?e.backUp(r.length-i):r.match(/<\/?$/)&&(e.backUp(r.length),e.match(t,!1)||e.match(r)),n}(e,v,t.localMode.token(e,t.localState))},o.localMode=p,o.localState=e.startState(p,s.indent(o.htmlState,"",""))}else o.inTag&&(o.inTag+=t.current(),t.eol()&&(o.inTag+=" "));return c}return{startState:function(){return{token:d,inTag:null,localMode:null,localState:null,htmlState:e.startState(s)}},copyState:function(t){var n;return t.localState&&(n=e.copyState(t.localMode,t.localState)),{token:t.token,inTag:t.inTag,localMode:t.localMode,localState:n,htmlState:e.copyState(s,t.htmlState)}},token:function(e,t){return t.token(e,t)},indent:function(t,n,r){return!t.localMode||/^\s*<\//.test(n)?s.indent(t.htmlState,n,r):t.localMode.indent?t.localMode.indent(t.localState,n,r):e.Pass},innerMode:function(e){return{state:e.localState||e.htmlState,mode:e.localMode||s}}}}),"xml","javascript","css"),e.defineMIME("text/html","htmlmixed")}(n(61),n(236),n(237),n(131))},function(e,t,n){1&&function(e){"use strict";var t={autoSelfClosers:{area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},implicitlyClosed:{dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},contextGrabbers:{dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}},doNotIndent:{pre:!0},allowUnquoted:!0,allowMissing:!0,caseFold:!0},n={autoSelfClosers:{},implicitlyClosed:{},contextGrabbers:{},doNotIndent:{},allowUnquoted:!1,allowMissing:!1,allowMissingTagName:!1,caseFold:!1};e.defineMode("xml",(function(r,i){var o,a,s=r.indentUnit,l={},c=i.htmlMode?t:n;for(var u in c)l[u]=c[u];for(var u in i)l[u]=i[u];function f(e,t){function n(n){return t.tokenize=n,n(e,t)}var r=e.next();return"<"==r?e.eat("!")?e.eat("[")?e.match("CDATA[")?n(h("atom","]]>")):null:e.match("--")?n(h("comment","--\x3e")):e.match("DOCTYPE",!0,!0)?(e.eatWhile(/[\w\._\-]/),n(function e(t){return function(n,r){for(var i;null!=(i=n.next());){if("<"==i)return r.tokenize=e(t+1),r.tokenize(n,r);if(">"==i){if(1==t){r.tokenize=f;break}return r.tokenize=e(t-1),r.tokenize(n,r)}}return"meta"}}(1))):null:e.eat("?")?(e.eatWhile(/[\w\._\-]/),t.tokenize=h("meta","?>"),"meta"):(o=e.eat("/")?"closeTag":"openTag",t.tokenize=d,"tag bracket"):"&"==r?(e.eat("#")?e.eat("x")?e.eatWhile(/[a-fA-F\d]/)&&e.eat(";"):e.eatWhile(/[\d]/)&&e.eat(";"):e.eatWhile(/[\w\.\-:]/)&&e.eat(";"))?"atom":"error":(e.eatWhile(/[^&<]/),null)}function d(e,t){var n,r,i=e.next();if(">"==i||"/"==i&&e.eat(">"))return t.tokenize=f,o=">"==i?"endTag":"selfcloseTag","tag bracket";if("="==i)return o="equals",null;if("<"==i){t.tokenize=f,t.state=y,t.tagName=t.tagStart=null;var a=t.tokenize(e,t);return a?a+" tag error":"tag error"}return/[\'\"]/.test(i)?(t.tokenize=(n=i,(r=function(e,t){for(;!e.eol();)if(e.next()==n){t.tokenize=d;break}return"string"}).isInAttribute=!0,r),t.stringStartCol=e.column(),t.tokenize(e,t)):(e.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word")}function h(e,t){return function(n,r){for(;!n.eol();){if(n.match(t)){r.tokenize=f;break}n.next()}return e}}function p(e){return e&&e.toLowerCase()}function g(e,t,n){this.prev=e.context,this.tagName=t||"",this.indent=e.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(t)||e.context&&e.context.noIndent)&&(this.noIndent=!0)}function v(e){e.context&&(e.context=e.context.prev)}function m(e,t){for(var n;1;){if(!e.context)return;if(n=e.context.tagName,!l.contextGrabbers.hasOwnProperty(p(n))||!l.contextGrabbers[p(n)].hasOwnProperty(p(t)))return;v(e)}}function y(e,t,n){return"openTag"==e?(n.tagStart=t.column(),b):"closeTag"==e?w:y}function b(e,t,n){return"word"==e?(n.tagName=t.current(),a="tag",k):l.allowMissingTagName&&"endTag"==e?(a="tag bracket",k(e,0,n)):(a="error",b)}function w(e,t,n){if("word"==e){var r=t.current();return n.context&&n.context.tagName!=r&&l.implicitlyClosed.hasOwnProperty(p(n.context.tagName))&&v(n),n.context&&n.context.tagName==r||!1===l.matchClosing?(a="tag",O):(a="tag error",x)}return l.allowMissingTagName&&"endTag"==e?(a="tag bracket",O(e,0,n)):(a="error",x)}function O(e,t,n){return"endTag"!=e?(a="error",O):(v(n),y)}function x(e,t,n){return a="error",O(e,0,n)}function k(e,t,n){if("word"==e)return a="attribute",C;if("endTag"==e||"selfcloseTag"==e){var r=n.tagName,i=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==e||l.autoSelfClosers.hasOwnProperty(p(r))?m(n,r):(m(n,r),n.context=new g(n,r,i==n.indented)),y}return a="error",k}function C(e,t,n){return"equals"==e?S:(l.allowMissing||(a="error"),k(e,0,n))}function S(e,t,n){return"string"==e?j:"word"==e&&l.allowUnquoted?(a="string",k):(a="error",k(e,0,n))}function j(e,t,n){return"string"==e?j:k(e,0,n)}return f.isInText=!0,{startState:function(e){var t={tokenize:f,state:y,indented:e||0,tagName:null,tagStart:null,context:null};return null!=e&&(t.baseIndent=e),t},token:function(e,t){if(!t.tagName&&e.sol()&&(t.indented=e.indentation()),e.eatSpace())return null;o=null;var n=t.tokenize(e,t);return(n||o)&&"comment"!=n&&(a=null,t.state=t.state(o||n,e,t),a&&(n="error"==a?n+" error":a)),n},indent:function(t,n,r){var i=t.context;if(t.tokenize.isInAttribute)return t.tagStart==t.indented?t.stringStartCol+1:t.indented+s;if(i&&i.noIndent)return e.Pass;if(t.tokenize!=d&&t.tokenize!=f)return r?r.match(/^(\s*)/)[0].length:0;if(t.tagName)return!1!==l.multilineTagIndentPastTag?t.tagStart+t.tagName.length+2:t.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var o=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(o&&o[1])for(;i;){if(i.tagName==o[2]){i=i.prev;break}if(!l.implicitlyClosed.hasOwnProperty(p(i.tagName)))break;i=i.prev}else if(o)for(;i;){var a=l.contextGrabbers[p(i.tagName)];if(!a||!a.hasOwnProperty(p(o[2])))break;i=i.prev}for(;i&&i.prev&&!i.startOfLine;)i=i.prev;return i?i.indent+s:t.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(e){e.state==S&&(e.state=k)},xmlCurrentTag:function(e){return e.tagName?{name:e.tagName,close:"closeTag"==e.type}:null},xmlCurrentContext:function(e){for(var t=[],n=e.context;n;n=n.prev)t.push(n.tagName);return t.reverse()}}})),e.defineMIME("text/xml","xml"),e.defineMIME("application/xml","xml"),e.mimeModes.hasOwnProperty("text/html")||e.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(61))},function(e,t,n){1&&function(e){"use strict";e.defineMode("javascript",(function(t,n){var r,i,o=t.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,u=n.typescript,f=n.wordCharacters||/[\w$\xa1-\uffff]/,d=function(){function e(e){return{type:e,style:"keyword"}}var t=e("keyword a"),n=e("keyword b"),r=e("keyword c"),i=e("keyword d"),o=e("operator"),a={type:"atom",style:"atom"};return{if:e("if"),while:t,with:t,else:n,do:n,try:n,finally:n,return:i,break:i,continue:i,new:e("new"),delete:r,void:r,throw:r,debugger:e("debugger"),var:e("var"),const:e("var"),let:e("var"),function:e("function"),catch:e("catch"),for:e("for"),switch:e("switch"),case:e("case"),default:e("default"),in:o,typeof:o,instanceof:o,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:e("this"),class:e("class"),super:e("atom"),yield:r,export:e("export"),import:e("import"),extends:r,await:r}}(),h=/[+\-*&%=<>!?|~^@]/,p=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(e,t,n){return r=e,i=n,t}function v(e,t){var n,r=e.next();if('"'==r||"'"==r)return t.tokenize=(n=r,function(e,t){var r,i=!1;if(s&&"@"==e.peek()&&e.match(p))return t.tokenize=v,g("jsonld-keyword","meta");for(;null!=(r=e.next())&&(r!=n||i);)i=!i&&"\\"==r;return i||(t.tokenize=v),g("string","string")}),t.tokenize(e,t);if("."==r&&e.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==r&&e.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(r))return g(r);if("="==r&&e.eat(">"))return g("=>","operator");if("0"==r&&e.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");if(/\d/.test(r))return e.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");if("/"==r)return e.eat("*")?(t.tokenize=m,m(e,t)):e.eat("/")?(e.skipToEnd(),g("comment","comment")):Ze(e,t,1)?(function(e){for(var t,n=!1,r=!1;null!=(t=e.next());){if(!n){if("/"==t&&!r)return;"["==t?r=!0:r&&"]"==t&&(r=!1)}n=!n&&"\\"==t}}(e),e.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2")):(e.eat("="),g("operator","operator",e.current()));if("`"==r)return t.tokenize=y,y(e,t);if("#"==r&&"!"==e.peek())return e.skipToEnd(),g("meta","meta");if("#"==r&&e.eatWhile(f))return g("variable","property");if("<"==r&&e.match("!--")||"-"==r&&e.match("->")&&!/\S/.test(e.string.slice(0,e.start)))return e.skipToEnd(),g("comment","comment");if(h.test(r))return">"==r&&t.lexical&&">"==t.lexical.type||(e.eat("=")?"!"!=r&&"="!=r||e.eat("="):/[<>*+\-|&?]/.test(r)&&(e.eat(r),">"==r&&e.eat(r))),"?"==r&&e.eat(".")?g("."):g("operator","operator",e.current());if(f.test(r)){e.eatWhile(f);var i=e.current();if("."!=t.lastType){if(d.propertyIsEnumerable(i)){var o=d[i];return g(o.type,o.style,i)}if("async"==i&&e.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",i)}return g("variable","variable",i)}}function m(e,t){for(var n,r=!1;n=e.next();){if("/"==n&&r){t.tokenize=v;break}r="*"==n}return g("comment","comment")}function y(e,t){for(var n,r=!1;null!=(n=e.next());){if(!r&&("`"==n||"$"==n&&e.eat("{"))){t.tokenize=v;break}r=!r&&"\\"==n}return g("quasi","string-2",e.current())}var b="([{}])";function w(e,t){t.fatArrowAt&&(t.fatArrowAt=null);var n=e.string.indexOf("=>",e.start);if(!(n<0)){if(u){var r=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(e.string.slice(e.start,n));r&&(n=r.index)}for(var i=0,o=!1,a=n-1;a>=0;--a){var s=e.string.charAt(a),l=b.indexOf(s);if(l>=0&&l<3){if(!i){++a;break}if(0==--i){"("==s&&(o=!0);break}}else if(l>=3&&l<6)++i;else if(f.test(s))o=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(e.string.charAt(a-1)==s&&"\\"!=e.string.charAt(a-2)){a--;break}}else if(o&&!i){++a;break}}o&&!i&&(t.fatArrowAt=a)}}var O={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function x(e,t,n,r,i,o){this.indented=e,this.column=t,this.type=n,this.prev=i,this.info=o,null!=r&&(this.align=r)}function k(e,t){if(!c)return!1;for(var n=e.localVars;n;n=n.next)if(n.name==t)return!0;for(var r=e.context;r;r=r.prev)for(n=r.vars;n;n=n.next)if(n.name==t)return!0}function C(e,t,n,r,i){var o=e.cc;for(S.state=e,S.stream=i,S.marked=null,S.cc=o,S.style=t,e.lexical.hasOwnProperty("align")||(e.lexical.align=!0);1;)if((o.length?o.pop():l?U:V)(n,r)){for(;o.length&&o[o.length-1].lex;)o.pop()();return S.marked?S.marked:"variable"==n&&k(e,r)?"variable-2":t}}var S={state:null,column:null,marked:null,cc:null};function j(){for(var e=arguments.length-1;e>=0;e--)S.cc.push(arguments[e])}function E(){return j.apply(null,arguments),!0}function P(e,t){for(var n=t;n;n=n.next)if(n.name==e)return!0;return!1}function _(e){var t=S.state;if(S.marked="def",c){if(t.context)if("var"==t.lexical.info&&t.context&&t.context.block){var r=function e(t,n){if(n){if(n.block){var r=e(t,n.prev);return r?r==n.prev?n:new A(r,n.vars,!0):null}return P(t,n.vars)?n:new A(n.prev,new M(t,n.vars),!1)}return null}(e,t.context);if(null!=r)return void(t.context=r)}else if(!P(e,t.localVars))return void(t.localVars=new M(e,t.localVars));n.globalVars&&!P(e,t.globalVars)&&(t.globalVars=new M(e,t.globalVars))}}function T(e){return"public"==e||"private"==e||"protected"==e||"abstract"==e||"readonly"==e}function A(e,t,n){this.prev=e,this.vars=t,this.block=n}function M(e,t){this.name=e,this.next=t}var D=new M("this",new M("arguments",null));function L(){S.state.context=new A(S.state.context,S.state.localVars,!1),S.state.localVars=D}function N(){S.state.context=new A(S.state.context,S.state.localVars,!0),S.state.localVars=null}function R(){S.state.localVars=S.state.context.vars,S.state.context=S.state.context.prev}function F(e,t){var n=function(){var n=S.state,r=n.indented;if("stat"==n.lexical.type)r=n.lexical.indented;else for(var i=n.lexical;i&&")"==i.type&&i.align;i=i.prev)r=i.indented;n.lexical=new x(r,S.stream.column(),e,null,n.lexical,t)};return n.lex=!0,n}function I(){var e=S.state;e.lexical.prev&&(")"==e.lexical.type&&(e.indented=e.lexical.indented),e.lexical=e.lexical.prev)}function z(e){return function t(n){return n==e?E():";"==e||"}"==n||")"==n||"]"==n?j():E(t)}}function V(e,t){return"var"==e?E(F("vardef",t),Ce,z(";"),I):"keyword a"==e?E(F("form"),W,V,I):"keyword b"==e?E(F("form"),V,I):"keyword d"==e?S.stream.match(/^\s*$/,!1)?E():E(F("stat"),q,z(";"),I):"debugger"==e?E(z(";")):"{"==e?E(F("}"),N,le,I,R):";"==e?E():"if"==e?("else"==S.state.lexical.info&&S.state.cc[S.state.cc.length-1]==I&&S.state.cc.pop()(),E(F("form"),W,V,I,Te)):"function"==e?E(Le):"for"==e?E(F("form"),N,Ae,V,R,I):"class"==e||u&&"interface"==t?(S.marked="keyword",E(F("form","class"==e?e:t),ze,I)):"variable"==e?u&&"declare"==t?(S.marked="keyword",E(V)):u&&("module"==t||"enum"==t||"type"==t)&&S.stream.match(/^\s*\w/,!1)?(S.marked="keyword","enum"==t?E(Xe):"type"==t?E(Re,z("operator"),he,z(";")):E(F("form"),Se,z("{"),F("}"),le,I,I)):u&&"namespace"==t?(S.marked="keyword",E(F("form"),U,V,I)):u&&"abstract"==t?(S.marked="keyword",E(V)):E(F("stat"),te):"switch"==e?E(F("form"),W,z("{"),F("}","switch"),N,le,I,I,R):"case"==e?E(U,z(":")):"default"==e?E(z(":")):"catch"==e?E(F("form"),L,B,V,I,R):"export"==e?E(F("stat"),He,I):"import"==e?E(F("stat"),$e,I):"async"==e?E(V):"@"==t?E(U,V):j(F("stat"),U,z(";"),I)}function B(e){if("("==e)return E(Fe,z(")"))}function U(e,t){return $(e,t,!1)}function H(e,t){return $(e,t,!0)}function W(e){return"("!=e?j():E(F(")"),q,z(")"),I)}function $(e,t,n){if(S.state.fatArrowAt==S.stream.start){var r=n?Q:X;if("("==e)return E(L,F(")"),ae(Fe,")"),I,z("=>"),r,R);if("variable"==e)return j(L,Se,z("=>"),r,R)}var i=n?G:K;return O.hasOwnProperty(e)?E(i):"function"==e?E(Le,i):"class"==e||u&&"interface"==t?(S.marked="keyword",E(F("form"),Ie,I)):"keyword c"==e||"async"==e?E(n?H:U):"("==e?E(F(")"),q,z(")"),I,i):"operator"==e||"spread"==e?E(n?H:U):"["==e?E(F("]"),Je,I,i):"{"==e?se(re,"}",null,i):"quasi"==e?j(Y,i):"new"==e?E(function(e){return function(t){return"."==t?E(e?ee:Z):"variable"==t&&u?E(Oe,e?G:K):j(e?H:U)}}(n)):E()}function q(e){return e.match(/[;\}\)\],]/)?j():j(U)}function K(e,t){return","==e?E(q):G(e,t,!1)}function G(e,t,n){var r=0==n?K:G,i=0==n?U:H;return"=>"==e?E(L,n?Q:X,R):"operator"==e?/\+\+|--/.test(t)||u&&"!"==t?E(r):u&&"<"==t&&S.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?E(F(">"),ae(he,">"),I,r):"?"==t?E(U,z(":"),i):E(i):"quasi"==e?j(Y,r):";"!=e?"("==e?se(H,")","call",r):"."==e?E(ne,r):"["==e?E(F("]"),q,z("]"),I,r):u&&"as"==t?(S.marked="keyword",E(he,r)):"regexp"==e?(S.state.lastType=S.marked="operator",S.stream.backUp(S.stream.pos-S.stream.start-1),E(i)):void 0:void 0}function Y(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?E(Y):E(q,J)}function J(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,E(Y)}function X(e){return w(S.stream,S.state),j("{"==e?V:U)}function Q(e){return w(S.stream,S.state),j("{"==e?V:H)}function Z(e,t){if("target"==t)return S.marked="keyword",E(K)}function ee(e,t){if("target"==t)return S.marked="keyword",E(G)}function te(e){return":"==e?E(I,V):j(K,z(";"),I)}function ne(e){if("variable"==e)return S.marked="property",E()}function re(e,t){return"async"==e?(S.marked="property",E(re)):"variable"==e||"keyword"==S.style?(S.marked="property","get"==t||"set"==t?E(ie):(u&&S.state.fatArrowAt==S.stream.start&&(n=S.stream.match(/^\s*:\s*/,!1))&&(S.state.fatArrowAt=S.stream.pos+n[0].length),E(oe))):"number"==e||"string"==e?(S.marked=s?"property":S.style+" property",E(oe)):"jsonld-keyword"==e?E(oe):u&&T(t)?(S.marked="keyword",E(re)):"["==e?E(U,ce,z("]"),oe):"spread"==e?E(H,oe):"*"==t?(S.marked="keyword",E(re)):":"==e?j(oe):void 0;var n}function ie(e){return"variable"!=e?j(oe):(S.marked="property",E(Le))}function oe(e){return":"==e?E(H):"("==e?j(Le):void 0}function ae(e,t,n){function r(i,o){if(n?n.indexOf(i)>-1:","==i){var a=S.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),E((function(n,r){return n==t||r==t?j():j(e)}),r)}return i==t||o==t?E():n&&n.indexOf(";")>-1?j(e):E(z(t))}return function(n,i){return n==t||i==t?E():j(e,r)}}function se(e,t,n){for(var r=3;r<arguments.length;r++)S.cc.push(arguments[r]);return E(F(t,n),ae(e,t),I)}function le(e){return"}"==e?E():j(V,le)}function ce(e,t){if(u){if(":"==e)return E(he);if("?"==t)return E(ce)}}function ue(e,t){if(u&&(":"==e||"in"==t))return E(he)}function fe(e){if(u&&":"==e)return S.stream.match(/^\s*\w+\s+is\b/,!1)?E(U,de,he):E(he)}function de(e,t){if("is"==t)return S.marked="keyword",E()}function he(e,t){return"keyof"==t||"typeof"==t||"infer"==t||"readonly"==t?(S.marked="keyword",E("typeof"==t?H:he)):"variable"==e||"void"==t?(S.marked="type",E(we)):"|"==t||"&"==t?E(he):"string"==e||"number"==e||"atom"==e?E(we):"["==e?E(F("]"),ae(he,"]",","),I,we):"{"==e?E(F("}"),ge,I,we):"("==e?E(ae(be,")"),pe,we):"<"==e?E(ae(he,">"),he):"quasi"==e?j(me,we):void 0}function pe(e){if("=>"==e)return E(he)}function ge(e){return e.match(/[\}\)\]]/)?E():","==e||";"==e?E(ge):j(ve,ge)}function ve(e,t){return"variable"==e||"keyword"==S.style?(S.marked="property",E(ve)):"?"==t||"number"==e||"string"==e?E(ve):":"==e?E(he):"["==e?E(z("variable"),ue,z("]"),ve):"("==e?j(Ne,ve):e.match(/[;\}\)\],]/)?void 0:E()}function me(e,t){return"quasi"!=e?j():"${"!=t.slice(t.length-2)?E(me):E(he,ye)}function ye(e){if("}"==e)return S.marked="string-2",S.state.tokenize=y,E(me)}function be(e,t){return"variable"==e&&S.stream.match(/^\s*[?:]/,!1)||"?"==t?E(be):":"==e?E(he):"spread"==e?E(be):j(he)}function we(e,t){return"<"==t?E(F(">"),ae(he,">"),I,we):"|"==t||"."==e||"&"==t?E(he):"["==e?E(he,z("]"),we):"extends"==t||"implements"==t?(S.marked="keyword",E(he)):"?"==t?E(he,z(":"),he):void 0}function Oe(e,t){if("<"==t)return E(F(">"),ae(he,">"),I,we)}function xe(){return j(he,ke)}function ke(e,t){if("="==t)return E(he)}function Ce(e,t){return"enum"==t?(S.marked="keyword",E(Xe)):j(Se,ce,Pe,_e)}function Se(e,t){return u&&T(t)?(S.marked="keyword",E(Se)):"variable"==e?(_(t),E()):"spread"==e?E(Se):"["==e?se(Ee,"]"):"{"==e?se(je,"}"):void 0}function je(e,t){return"variable"!=e||S.stream.match(/^\s*:/,!1)?("variable"==e&&(S.marked="property"),"spread"==e?E(Se):"}"==e?j():"["==e?E(U,z(']'),z(':'),je):E(z(":"),Se,Pe)):(_(t),E(Pe))}function Ee(){return j(Se,Pe)}function Pe(e,t){if("="==t)return E(H)}function _e(e){if(","==e)return E(Ce)}function Te(e,t){if("keyword b"==e&&"else"==t)return E(F("form","else"),V,I)}function Ae(e,t){return"await"==t?E(Ae):"("==e?E(F(")"),Me,I):void 0}function Me(e){return"var"==e?E(Ce,De):"variable"==e?E(De):j(De)}function De(e,t){return")"==e?E():";"==e?E(De):"in"==t||"of"==t?(S.marked="keyword",E(U,De)):j(U,De)}function Le(e,t){return"*"==t?(S.marked="keyword",E(Le)):"variable"==e?(_(t),E(Le)):"("==e?E(L,F(")"),ae(Fe,")"),I,fe,V,R):u&&"<"==t?E(F(">"),ae(xe,">"),I,Le):void 0}function Ne(e,t){return"*"==t?(S.marked="keyword",E(Ne)):"variable"==e?(_(t),E(Ne)):"("==e?E(L,F(")"),ae(Fe,")"),I,fe,R):u&&"<"==t?E(F(">"),ae(xe,">"),I,Ne):void 0}function Re(e,t){return"keyword"==e||"variable"==e?(S.marked="type",E(Re)):"<"==t?E(F(">"),ae(xe,">"),I):void 0}function Fe(e,t){return"@"==t&&E(U,Fe),"spread"==e?E(Fe):u&&T(t)?(S.marked="keyword",E(Fe)):u&&"this"==e?E(ce,Pe):j(Se,ce,Pe)}function Ie(e,t){return"variable"==e?ze(e,t):Ve(e,t)}function ze(e,t){if("variable"==e)return _(t),E(Ve)}function Ve(e,t){return"<"==t?E(F(">"),ae(xe,">"),I,Ve):"extends"==t||"implements"==t||u&&","==e?("implements"==t&&(S.marked="keyword"),E(u?he:U,Ve)):"{"==e?E(F("}"),Be,I):void 0}function Be(e,t){return"async"==e||"variable"==e&&("static"==t||"get"==t||"set"==t||u&&T(t))&&S.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(S.marked="keyword",E(Be)):"variable"==e||"keyword"==S.style?(S.marked="property",E(Ue,Be)):"number"==e||"string"==e?E(Ue,Be):"["==e?E(U,ce,z("]"),Ue,Be):"*"==t?(S.marked="keyword",E(Be)):u&&"("==e?j(Ne,Be):";"==e||","==e?E(Be):"}"==e?E():"@"==t?E(U,Be):void 0}function Ue(e,t){if("!"==t)return E(Ue);if("?"==t)return E(Ue);if(":"==e)return E(he,Pe);if("="==t)return E(H);var n=S.state.lexical.prev;return j(n&&"interface"==n.info?Ne:Le)}function He(e,t){return"*"==t?(S.marked="keyword",E(Ye,z(";"))):"default"==t?(S.marked="keyword",E(U,z(";"))):"{"==e?E(ae(We,"}"),Ye,z(";")):j(V)}function We(e,t){return"as"==t?(S.marked="keyword",E(z("variable"))):"variable"==e?j(H,We):void 0}function $e(e){return"string"==e?E():"("==e?j(U):"."==e?j(K):j(qe,Ke,Ye)}function qe(e,t){return"{"==e?se(qe,"}"):("variable"==e&&_(t),"*"==t&&(S.marked="keyword"),E(Ge))}function Ke(e){if(","==e)return E(qe,Ke)}function Ge(e,t){if("as"==t)return S.marked="keyword",E(qe)}function Ye(e,t){if("from"==t)return S.marked="keyword",E(U)}function Je(e){return"]"==e?E():j(ae(H,"]"))}function Xe(){return j(F("form"),Se,z("{"),F("}"),ae(Qe,"}"),I,I)}function Qe(){return j(Se,Pe)}function Ze(e,t,n){return t.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(t.lastType)||"quasi"==t.lastType&&/\{\s*$/.test(e.string.slice(0,e.pos-(n||0)))}return R.lex=!0,I.lex=!0,{startState:function(e){var t={tokenize:v,lastType:"sof",cc:[],lexical:new x((e||0)-o,0,"block",!1),localVars:n.localVars,context:n.localVars&&new A(null,null,!1),indented:e||0};return n.globalVars&&"object"==typeof n.globalVars&&(t.globalVars=n.globalVars),t},token:function(e,t){if(e.sol()&&(t.lexical.hasOwnProperty("align")||(t.lexical.align=!1),t.indented=e.indentation(),w(e,t)),t.tokenize!=m&&e.eatSpace())return null;var n=t.tokenize(e,t);return"comment"==r?n:(t.lastType="operator"!=r||"++"!=i&&"--"!=i?r:"incdec",C(t,n,r,i,e))},indent:function(t,r){if(t.tokenize==m||t.tokenize==y)return e.Pass;if(t.tokenize!=v)return 0;var i,s=r&&r.charAt(0),l=t.lexical;if(!/^\s*else\b/.test(r))for(var c=t.cc.length-1;c>=0;--c){var u=t.cc[c];if(u==I)l=l.prev;else if(u!=Te&&u!=R)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(i=t.cc[t.cc.length-1])&&(i==K||i==G)&&!/^[,\.=+\-*:?[\(]/.test(r));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var f=l.type,d=s==f;return"vardef"==f?l.indented+("operator"==t.lastType||","==t.lastType?l.info.length+1:0):"form"==f&&"{"==s?l.indented:"form"==f?l.indented+o:"stat"==f?l.indented+(function(e,t){return"operator"==e.lastType||","==e.lastType||h.test(t.charAt(0))||/[,.]/.test(t.charAt(0))}(t,r)?a||o:0):"switch"!=l.info||d||0==n.doubleIndentSwitch?l.align?l.column+(d?0:1):l.indented+(d?0:o):l.indented+(/^(?:case|default)\b/.test(r)?o:2*o)},electricInput:/^\s*(?:case .*?:|default:|\{|\})$/,blockCommentStart:l?null:"/*",blockCommentEnd:l?null:"*/",blockCommentContinue:l?null:" * ",lineComment:l?null:"//",fold:"brace",closeBrackets:"()[]{}''\"\"``",helperType:l?"json":"javascript",jsonldMode:s,jsonMode:l,expressionAllowed:Ze,skipExpression:function(t){C(t,"atom","atom","true",new e.StringStream("",2,null))}}})),e.registerHelper("wordChars","javascript",/[\w$]/),e.defineMIME("text/javascript","javascript"),e.defineMIME("text/ecmascript","javascript"),e.defineMIME("application/javascript","javascript"),e.defineMIME("application/x-javascript","javascript"),e.defineMIME("application/ecmascript","javascript"),e.defineMIME("application/json",{name:"javascript",json:!0}),e.defineMIME("application/x-json",{name:"javascript",json:!0}),e.defineMIME("application/manifest+json",{name:"javascript",json:!0}),e.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),e.defineMIME("text/typescript",{name:"javascript",typescript:!0}),e.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(61))},function(e,t,n){1&&function(e){e.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(e,t){return/^[;{}]$/.test(t)}}),e.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(e,t,n,r){return this.jsonMode?/^[\[,{]$/.test(t)||/^}/.test(n):(";"!=t||!r.lexical||")"!=r.lexical.type)&&/^[;{}]$/.test(t)&&!/^;/.test(n)}});var t=/^(a|abbr|acronym|area|base|bdo|big|br|button|caption|cite|code|col|colgroup|dd|del|dfn|em|frame|hr|iframe|img|input|ins|kbd|label|legend|link|map|object|optgroup|option|param|q|samp|script|select|small|span|strong|sub|sup|textarea|tt|var)$/;e.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(e,n,r,i){var o=!1;return"html"==this.configuration&&(o=!!i.context&&t.test(i.context.tagName)),!o&&("tag"==e&&/>$/.test(n)&&i.context||/^</.test(r))}}),e.defineExtension("commentRange",(function(t,n,r){var i=this,o=e.innerMode(i.getMode(),i.getTokenAt(n).state).mode;i.operation((function(){if(t)i.replaceRange(o.commentEnd,r),i.replaceRange(o.commentStart,n),n.line==r.line&&n.ch==r.ch&&i.setCursor(n.line,n.ch+o.commentStart.length);else{var e=i.getRange(n,r),a=e.indexOf(o.commentStart),s=e.lastIndexOf(o.commentEnd);a>-1&&s>-1&&s>a&&(e=e.substr(0,a)+e.substring(a+o.commentStart.length,s)+e.substr(s+o.commentEnd.length)),i.replaceRange(e,n,r)}}))})),e.defineExtension("autoIndentRange",(function(e,t){var n=this;this.operation((function(){for(var r=e.line;r<=t.line;r++)n.indentLine(r,"smart")}))})),e.defineExtension("autoFormatRange",(function(t,n){var r=this,i=r.getMode(),o=r.getRange(t,n).split("\n"),a=e.copyState(i,r.getTokenAt(t).state),s=r.getOption("tabSize"),l="",c=0,u=0===t.ch;function f(){l+="\n",u=!0,++c}for(var d=0;d<o.length;++d){for(var h=new e.StringStream(o[d],s);!h.eol();){var p=e.innerMode(i,a),g=i.token(h,a),v=h.current();h.start=h.pos,u&&!/\S/.test(v)||(l+=v,u=!1),!u&&p.mode.newlineAfterToken&&p.mode.newlineAfterToken(g,v,h.string.slice(h.pos)||o[d+1]||"",p.state)&&f()}!h.pos&&i.blankLine&&i.blankLine(a),!u&&d<o.length-1&&f()}r.operation((function(){r.replaceRange(l,t,n);for(var e=t.line+1,i=t.line+c;e<=i;++e)r.indentLine(e,"smart");r.setSelection(t,r.getCursor(!1))}))}))}(n(61))},function(e,t,n){"use strict";var r=Symbol.for("react.element"),i=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=Symbol.for("react.provider"),c=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),p=Symbol.iterator;var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},v=Object.assign,m={};function y(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}function b(){}function w(e,t,n){this.props=e,this.context=t,this.refs=m,this.updater=n||g}y.prototype.isReactComponent={},y.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},y.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},b.prototype=y.prototype;var O=w.prototype=new b;O.constructor=w,v(O,y.prototype),O.isPureReactComponent=!0;var x=Array.isArray,k=Object.prototype.hasOwnProperty,C={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function j(e,t,n){var i,o={},a=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(a=""+t.key),t)k.call(t,i)&&!S.hasOwnProperty(i)&&(o[i]=t[i]);var l=arguments.length-2;if(1===l)o.children=n;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];o.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===o[i]&&(o[i]=l[i]);return{$$typeof:r,type:e,key:a,ref:s,props:o,_owner:C.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===r}var P=/\/+/g;function _(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function T(e,t,n,o,a){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case r:case i:l=!0}}if(l)return a=a(l=e),e=""===o?"."+_(l,0):o,x(a)?(n="",null!=e&&(n=e.replace(P,"$&/")+"/"),T(a,t,n,"",(function(e){return e}))):null!=a&&(E(a)&&(a=function(e,t){return{$$typeof:r,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(a,n+(!a.key||l&&l.key===a.key?"":(""+a.key).replace(P,"$&/")+"/")+e)),t.push(a)),1;if(l=0,o=""===o?".":o+":",x(e))for(var c=0;c<e.length;c++){var u=o+_(s=e[c],c);l+=T(s,t,n,u,a)}else if("function"==typeof(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e)))for(e=u.call(e),c=0;!(s=e.next()).done;)l+=T(s=s.value,t,n,u=o+_(s,c++),a);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function A(e,t,n){if(null==e)return e;var r=[],i=0;return T(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function M(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var D={current:null},L={transition:null},N={ReactCurrentDispatcher:D,ReactCurrentBatchConfig:L,ReactCurrentOwner:C};t.Children={map:A,forEach:function(e,t,n){A(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return A(e,(function(){t++})),t},toArray:function(e){return A(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=y,t.Fragment=o,t.Profiler=s,t.PureComponent=w,t.StrictMode=a,t.Suspense=f,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=N,t.cloneElement=function(e,t,n){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=v({},e.props),o=e.key,a=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(a=t.ref,s=C.current),void 0!==t.key&&(o=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)k.call(t,c)&&!S.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=n;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:r,type:e.type,key:o,ref:a,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:c,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:l,_context:e},e.Consumer=e},t.createElement=j,t.createFactory=function(e){var t=j.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:M}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=L.transition;L.transition={};try{e()}finally{L.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return D.current.useCallback(e,t)},t.useContext=function(e){return D.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return D.current.useDeferredValue(e)},t.useEffect=function(e,t){return D.current.useEffect(e,t)},t.useId=function(){return D.current.useId()},t.useImperativeHandle=function(e,t,n){return D.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return D.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return D.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return D.current.useMemo(e,t)},t.useReducer=function(e,t,n){return D.current.useReducer(e,t,n)},t.useRef=function(e){return D.current.useRef(e)},t.useState=function(e){return D.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return D.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return D.current.useTransition()},t.version="18.2.0"},function(e,t,n){"use strict";var r=n(2),i=n(241);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var a=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)a.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),f=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,h={},p={};function g(e,t,n,r,i,o,a){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=a}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){v[e]=new g(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];v[t]=new g(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){v[e]=new g(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){v[e]=new g(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){v[e]=new g(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){v[e]=new g(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){v[e]=new g(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){v[e]=new g(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){v[e]=new g(e,5,!1,e.toLowerCase(),null,!1,!1)}));var m=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=v.hasOwnProperty(t)?v[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!f.call(p,e)||!f.call(h,e)&&(d.test(e)?p[e]=!0:(h[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(m,y);v[t]=new g(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(m,y);v[t]=new g(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(m,y);v[t]=new g(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!1,!1)})),v.xlinkHref=new g("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){v[e]=new g(e,1,!1,e.toLowerCase(),null,!0,!0)}));var w=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,O=Symbol.for("react.element"),x=Symbol.for("react.portal"),k=Symbol.for("react.fragment"),C=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),j=Symbol.for("react.provider"),E=Symbol.for("react.context"),P=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),T=Symbol.for("react.suspense_list"),A=Symbol.for("react.memo"),M=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function N(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var R,F=Object.assign;function I(e){if(void 0===R)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return"\n"+R+e}var z=!1;function V(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),o=r.stack.split("\n"),a=i.length-1,s=o.length-1;1<=a&&0<=s&&i[a]!==o[s];)s--;for(;1<=a&&0<=s;a--,s--)if(i[a]!==o[s]){if(1!==a||1!==s)do{if(a--,0>--s||i[a]!==o[s]){var l="\n"+i[a].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=a&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?I(e):""}function B(e){switch(e.tag){case 5:return I(e.type);case 16:return I("Lazy");case 13:return I("Suspense");case 19:return I("SuspenseList");case 0:case 2:case 15:return e=V(e.type,!1);case 11:return e=V(e.type.render,!1);case 1:return e=V(e.type,!0);default:return""}}function U(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return function e(t){if(null==t)return null;if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t;switch(t){case k:return"Fragment";case x:return"Portal";case S:return"Profiler";case C:return"StrictMode";case _:return"Suspense";case T:return"SuspenseList"}if("object"==typeof t)switch(t.$$typeof){case E:return(t.displayName||"Context")+".Consumer";case j:return(t._context.displayName||"Context")+".Provider";case P:var n=t.render;return(t=t.displayName)||(t=""!==(t=n.displayName||n.name||"")?"ForwardRef("+t+")":"ForwardRef"),t;case A:return null!==(n=t.displayName||null)?n:e(t.type)||"Memo";case M:n=t._payload,t=t._init;try{return e(t(n))}catch(e){}}return null}(t);case 8:return t===C?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function H(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function $(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,o.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function q(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function G(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=H(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function J(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function X(e,t){J(e,t);var n=H(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?Z(e,t.type,n):t.hasOwnProperty("defaultValue")&&Z(e,t.type,H(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Q(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function Z(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var ee=Array.isArray;function te(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+H(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function ne(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(o(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function re(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(o(92));if(ee(n)){if(1<n.length)throw Error(o(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:H(n)}}function ie(e,t){var n=H(t.value),r=H(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function ae(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function se(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?ae(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var le,ce=function(e){return"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(t,n,r,i){MSApp.execUnsafeLocalFunction((function(){return e(t,n)}))}:e}((function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((le=le||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=le.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}}));function ue(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},de=["Webkit","ms","Moz","O"];function he(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function pe(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=he(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){de.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ge=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ve(e,t){if(t){if(ge[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(o(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(o(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(o(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(o(62))}}function me(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ye=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,Oe=null,xe=null;function ke(e){if(e=di(e)){if("function"!=typeof we)throw Error(o(280));var t=e.stateNode;t&&(t=pi(t),we(e.stateNode,e.type,t))}}function Ce(e){Oe?xe?xe.push(e):xe=[e]:Oe=e}function Se(){if(Oe){var e=Oe,t=xe;if(xe=Oe=null,ke(e),t)for(e=0;e<t.length;e++)ke(t[e])}}function je(e,t){return e(t)}function Ee(){}var Pe=!1;function _e(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return je(e,t,n)}finally{Pe=!1,(null!==Oe||null!==xe)&&(Ee(),Se())}}function Te(e,t){var n=e.stateNode;if(null===n)return null;var r=pi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(o(231,t,typeof n));return n}var Ae=!1;if(u)try{var Me={};Object.defineProperty(Me,"passive",{get:function(){Ae=!0}}),window.addEventListener("test",Me,Me),window.removeEventListener("test",Me,Me)}catch(e){Ae=!1}function De(e,t,n,r,i,o,a,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Le=!1,Ne=null,Re=!1,Fe=null,Ie={onError:function(e){Le=!0,Ne=e}};function ze(e,t,n,r,i,o,a,s,l){Le=!1,Ne=null,De.apply(Ie,arguments)}function Ve(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Be(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&(null!==(e=e.alternate)&&(t=e.memoizedState)),null!==t)return t.dehydrated}return null}function Ue(e){if(Ve(e)!==e)throw Error(o(188))}function He(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ve(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return Ue(i),e;if(a===r)return Ue(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}(e))?function e(t){if(5===t.tag||6===t.tag)return t;for(t=t.child;null!==t;){var n=e(t);if(null!==n)return n;t=t.sibling}return null}(e):null}var We=i.unstable_scheduleCallback,$e=i.unstable_cancelCallback,qe=i.unstable_shouldYield,Ke=i.unstable_requestPaint,Ge=i.unstable_now,Ye=i.unstable_getCurrentPriorityLevel,Je=i.unstable_ImmediatePriority,Xe=i.unstable_UserBlockingPriority,Qe=i.unstable_NormalPriority,Ze=i.unstable_LowPriority,et=i.unstable_IdlePriority,tt=null,nt=null;var rt=Math.clz32?Math.clz32:function(e){return 0===(e>>>=0)?32:31-(it(e)/ot|0)|0},it=Math.log,ot=Math.LN2;var at=64,st=4194304;function lt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ct(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,o=e.pingedLanes,a=268435455&n;if(0!==a){var s=a&~i;0!==s?r=lt(s):0!==(o&=a)&&(r=lt(o))}else 0!==(a=n&~i)?r=lt(a):0!==o&&(r=lt(o));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(o=t&-t)||16===i&&0!=(4194240&o)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-rt(t)),r|=e[n],t&=~i;return r}function ut(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:default:return-1}}function ft(e){return 0!==(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function dt(){var e=at;return 0==(4194240&(at<<=1))&&(at=64),e}function ht(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function pt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-rt(t)]=n}function gt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-rt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var vt=0;function mt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var yt,bt,wt,Ot,xt,kt=!1,Ct=[],St=null,jt=null,Et=null,Pt=new Map,_t=new Map,Tt=[],At="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Mt(e,t){switch(e){case"focusin":case"focusout":St=null;break;case"dragenter":case"dragleave":jt=null;break;case"mouseover":case"mouseout":Et=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":_t.delete(t.pointerId)}}function Dt(e,t,n,r,i,o){return null===e||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},null!==t&&(null!==(t=di(t))&&bt(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Lt(e){var t=fi(e.target);if(null!==t){var n=Ve(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Be(n)))return e.blockedOn=t,void xt(e.priority,(function(){wt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=qt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=di(n))&&bt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);ye=r,n.target.dispatchEvent(r),ye=null,t.shift()}return!0}function Rt(e,t,n){Nt(e)&&n.delete(t)}function Ft(){kt=!1,null!==St&&Nt(St)&&(St=null),null!==jt&&Nt(jt)&&(jt=null),null!==Et&&Nt(Et)&&(Et=null),Pt.forEach(Rt),_t.forEach(Rt)}function It(e,t){e.blockedOn===t&&(e.blockedOn=null,kt||(kt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ft)))}function zt(e){function t(t){return It(t,e)}if(0<Ct.length){It(Ct[0],e);for(var n=1;n<Ct.length;n++){var r=Ct[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==St&&It(St,e),null!==jt&&It(jt,e),null!==Et&&It(Et,e),Pt.forEach(t),_t.forEach(t),n=0;n<Tt.length;n++)(r=Tt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Tt.length&&null===(n=Tt[0]).blockedOn;)Lt(n),null===n.blockedOn&&Tt.shift()}var Vt=w.ReactCurrentBatchConfig,Bt=!0;function Ut(e,t,n,r){var i=vt,o=Vt.transition;Vt.transition=null;try{vt=1,Wt(e,t,n,r)}finally{vt=i,Vt.transition=o}}function Ht(e,t,n,r){var i=vt,o=Vt.transition;Vt.transition=null;try{vt=4,Wt(e,t,n,r)}finally{vt=i,Vt.transition=o}}function Wt(e,t,n,r){if(Bt){var i=qt(e,t,n,r);if(null===i)Fr(e,t,r,$t,n),Mt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return St=Dt(St,e,t,n,r,i),!0;case"dragenter":return jt=Dt(jt,e,t,n,r,i),!0;case"mouseover":return Et=Dt(Et,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Pt.set(o,Dt(Pt.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,_t.set(o,Dt(_t.get(o)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Mt(e,r),4&t&&-1<At.indexOf(e)){for(;null!==i;){var o=di(i);if(null!==o&&yt(o),null===(o=qt(e,t,n,r))&&Fr(e,t,r,$t,n),o===i)break;i=o}null!==i&&r.stopPropagation()}else Fr(e,t,r,null,n)}}var $t=null;function qt(e,t,n,r){if($t=null,null!==(e=fi(e=be(r))))if(null===(t=Ve(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Be(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return $t=e,null}function Kt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ye()){case Je:return 1;case Xe:return 4;case Qe:case Ze:return 16;case et:return 536870912;default:return 16}default:return 16}}var Gt=null,Yt=null,Jt=null;function Xt(){if(Jt)return Jt;var e,t,n=Yt,r=n.length,i="value"in Gt?Gt.value:Gt.textContent,o=i.length;for(e=0;e<r&&n[e]===i[e];e++);var a=r-e;for(t=1;t<=a&&n[r-t]===i[o-t];t++);return Jt=i.slice(e,1<t?1-t:void 0)}function Qt(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function Zt(){return!0}function en(){return!1}function tn(e){function t(t,n,r,i,o){for(var a in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=o,this.currentTarget=null,e)e.hasOwnProperty(a)&&(t=e[a],this[a]=t?t(i):i[a]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?Zt:en,this.isPropagationStopped=en,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=Zt)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=Zt)},persist:function(){},isPersistent:Zt}),t}var nn,rn,on,an={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},sn=tn(an),ln=F({},an,{view:0,detail:0}),cn=tn(ln),un=F({},ln,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:On,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==on&&(on&&"mousemove"===e.type?(nn=e.screenX-on.screenX,rn=e.screenY-on.screenY):rn=nn=0,on=e),nn)},movementY:function(e){return"movementY"in e?e.movementY:rn}}),fn=tn(un),dn=tn(F({},un,{dataTransfer:0})),hn=tn(F({},ln,{relatedTarget:0})),pn=tn(F({},an,{animationName:0,elapsedTime:0,pseudoElement:0})),gn=tn(F({},an,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),vn=tn(F({},an,{data:0})),mn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},yn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},bn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function wn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=bn[e])&&!!t[e]}function On(){return wn}var xn=tn(F({},ln,{key:function(e){if(e.key){var t=mn[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=Qt(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?yn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:On,charCode:function(e){return"keypress"===e.type?Qt(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?Qt(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),kn=tn(F({},un,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=tn(F({},ln,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:On})),Sn=tn(F({},an,{propertyName:0,elapsedTime:0,pseudoElement:0})),jn=tn(F({},un,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),En=[9,13,27,32],Pn=u&&"CompositionEvent"in window,_n=null;u&&"documentMode"in document&&(_n=document.documentMode);var Tn=u&&"TextEvent"in window&&!_n,An=u&&(!Pn||_n&&8<_n&&11>=_n),Mn=String.fromCharCode(32),Dn=!1;function Ln(e,t){switch(e){case"keyup":return-1!==En.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Rn=!1;var Fn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function In(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Fn[e.type]:"textarea"===t}function zn(e,t,n,r){Ce(r),0<(t=zr(t,"onChange")).length&&(n=new sn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,Bn=null;function Un(e){Ar(e,0)}function Hn(e){if(q(hi(e)))return e}function Wn(e,t){if("change"===e)return t}var $n=!1;if(u){var qn;if(u){var Kn="oninput"in document;if(!Kn){var Gn=document.createElement("div");Gn.setAttribute("oninput","return;"),Kn="function"==typeof Gn.oninput}qn=Kn}else qn=!1;$n=qn&&(!document.documentMode||9<document.documentMode)}function Yn(){Vn&&(Vn.detachEvent("onpropertychange",Jn),Bn=Vn=null)}function Jn(e){if("value"===e.propertyName&&Hn(Bn)){var t=[];zn(t,Bn,e,be(e)),_e(Un,t)}}function Xn(e,t,n){"focusin"===e?(Yn(),Bn=n,(Vn=t).attachEvent("onpropertychange",Jn)):"focusout"===e&&Yn()}function Qn(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Hn(Bn)}function Zn(e,t){if("click"===e)return Hn(t)}function er(e,t){if("input"===e||"change"===e)return Hn(t)}var tr="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function nr(e,t){if(tr(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!f.call(t,i)||!tr(e[i],t[i]))return!1}return!0}function rr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ir(e,t){var n,r=rr(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=rr(r)}}function or(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function ar(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function sr(e){var t=or(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&function e(t,n){return!(!t||!n)&&(t===n||(!t||3!==t.nodeType)&&(n&&3===n.nodeType?e(t,n.parentNode):"contains"in t?t.contains(n):!!t.compareDocumentPosition&&!!(16&t.compareDocumentPosition(n))))}(n.ownerDocument.documentElement,n)){if(null!==r&&ar(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,o=Math.min(r.start,i);r=void 0===r.end?o:Math.min(r.end,i),!e.extend&&o>r&&(i=r,r=o,o=i),i=ir(n,o);var a=ir(n,r);i&&a&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==a.node||e.focusOffset!==a.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(a.node,a.offset)):(t.setEnd(a.node,a.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var lr=u&&"documentMode"in document&&11>=document.documentMode,cr=null,ur=null,fr=null,dr=!1;function hr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;dr||null==cr||cr!==K(r)||("selectionStart"in(r=cr)&&ar(r)?r={start:r.selectionStart,end:r.selectionEnd}:r={anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},fr&&nr(fr,r)||(fr=r,0<(r=zr(ur,"onSelect")).length&&(t=new sn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=cr)))}function pr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var gr={animationend:pr("Animation","AnimationEnd"),animationiteration:pr("Animation","AnimationIteration"),animationstart:pr("Animation","AnimationStart"),transitionend:pr("Transition","TransitionEnd")},vr={},mr={};function yr(e){if(vr[e])return vr[e];if(!gr[e])return e;var t,n=gr[e];for(t in n)if(n.hasOwnProperty(t)&&t in mr)return vr[e]=n[t];return e}u&&(mr=document.createElement("div").style,"AnimationEvent"in window||(delete gr.animationend.animation,delete gr.animationiteration.animation,delete gr.animationstart.animation),"TransitionEvent"in window||delete gr.transitionend.transition);var br=yr("animationend"),wr=yr("animationiteration"),Or=yr("animationstart"),xr=yr("transitionend"),kr=new Map,Cr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Sr(e,t){kr.set(e,t),l(t,[e])}for(var jr=0;jr<Cr.length;jr++){var Er=Cr[jr];Sr(Er.toLowerCase(),"on"+(Er[0].toUpperCase()+Er.slice(1)))}Sr(br,"onAnimationEnd"),Sr(wr,"onAnimationIteration"),Sr(Or,"onAnimationStart"),Sr("dblclick","onDoubleClick"),Sr("focusin","onFocus"),Sr("focusout","onBlur"),Sr(xr,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Pr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),_r=new Set("cancel close invalid load scroll toggle".split(" ").concat(Pr));function Tr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,a,s,l,c){if(ze.apply(this,arguments),Le){if(!Le)throw Error(o(198));var u=Ne;Le=!1,Ne=null,Re||(Re=!0,Fe=u)}}(r,t,void 0,e),e.currentTarget=null}function Ar(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var s=r[a],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,c),o=l}else for(a=0;a<r.length;a++){if(l=(s=r[a]).instance,c=s.currentTarget,s=s.listener,l!==o&&i.isPropagationStopped())break e;Tr(i,s,c),o=l}}}if(Re)throw e=Fe,Re=!1,Fe=null,e}function Mr(e,t){var n=t[li];void 0===n&&(n=t[li]=new Set);var r=e+"__bubble";n.has(r)||(Rr(t,e,2,!1),n.add(r))}function Dr(e,t,n){var r=0;t&&(r|=4),Rr(n,e,r,t)}var Lr="_reactListening"+Math.random().toString(36).slice(2);function Nr(e){if(!e[Lr]){e[Lr]=!0,a.forEach((function(t){"selectionchange"!==t&&(_r.has(t)||Dr(t,!1,e),Dr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Lr]||(t[Lr]=!0,Dr("selectionchange",!1,t))}}function Rr(e,t,n,r){switch(Kt(t)){case 1:var i=Ut;break;case 4:i=Ht;break;default:i=Wt}n=i.bind(null,t,n,e),i=void 0,!Ae||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Fr(e,t,n,r,i){var o=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var a=r.tag;if(3===a||4===a){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===a)for(a=r.return;null!==a;){var l=a.tag;if((3===l||4===l)&&((l=a.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;a=a.return}for(;null!==s;){if(null===(a=fi(s)))return;if(5===(l=a.tag)||6===l){r=o=a;continue e}s=s.parentNode}}r=r.return}_e((function(){var r=o,i=be(n),a=[];e:{var s=kr.get(e);if(void 0!==s){var l=sn,c=e;switch(e){case"keypress":if(0===Qt(n))break e;case"keydown":case"keyup":l=xn;break;case"focusin":c="focus",l=hn;break;case"focusout":c="blur",l=hn;break;case"beforeblur":case"afterblur":l=hn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=fn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=dn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case br:case wr:case Or:l=pn;break;case xr:l=Sn;break;case"scroll":l=cn;break;case"wheel":l=jn;break;case"copy":case"cut":case"paste":l=gn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=kn}var u=0!=(4&t),f=!u&&"scroll"===e,d=u?null!==s?s+"Capture":null:s;u=[];for(var h,p=r;null!==p;){var g=(h=p).stateNode;if(5===h.tag&&null!==g&&(h=g,null!==d&&(null!=(g=Te(p,d))&&u.push(Ir(p,g,h)))),f)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),a.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===ye||!(c=n.relatedTarget||n.fromElement)||!fi(c)&&!c[si])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?fi(c):null)&&(c!==(f=Ve(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,g="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=kn,g="onPointerLeave",d="onPointerEnter",p="pointer"),f=null==l?s:hi(l),h=null==c?s:hi(c),(s=new u(g,p+"leave",l,n,i)).target=f,s.relatedTarget=h,g=null,fi(i)===r&&((u=new u(d,p+"enter",c,n,i)).target=h,u.relatedTarget=f,g=u),f=g,l&&c)e:{for(d=c,p=0,h=u=l;h;h=Vr(h))p++;for(h=0,g=d;g;g=Vr(g))h++;for(;0<p-h;)u=Vr(u),p--;for(;0<h-p;)d=Vr(d),h--;for(;p--;){if(u===d||null!==d&&u===d.alternate)break e;u=Vr(u),d=Vr(d)}u=null}else u=null;null!==l&&Br(a,s,l,u,!1),null!==c&&null!==f&&Br(a,f,c,u,!0)}if("select"===(l=(s=r?hi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var v=Wn;else if(In(s))if($n)v=er;else{v=Qn;var m=Xn}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(v=Zn);switch(v&&(v=v(e,r))?zn(a,v,n,i):(m&&m(e,s,r),"focusout"===e&&(m=s._wrapperState)&&m.controlled&&"number"===s.type&&Z(s,"number",s.value)),m=r?hi(r):window,e){case"focusin":(In(m)||"true"===m.contentEditable)&&(cr=m,ur=r,fr=null);break;case"focusout":fr=ur=cr=null;break;case"mousedown":dr=!0;break;case"contextmenu":case"mouseup":case"dragend":dr=!1,hr(a,n,i);break;case"selectionchange":if(lr)break;case"keydown":case"keyup":hr(a,n,i)}var y;if(Pn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else Rn?Ln(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(An&&"ko"!==n.locale&&(Rn||"onCompositionStart"!==b?"onCompositionEnd"===b&&Rn&&(y=Xt()):(Yt="value"in(Gt=i)?Gt.value:Gt.textContent,Rn=!0)),0<(m=zr(r,b)).length&&(b=new vn(b,e,null,n,i),a.push({event:b,listeners:m}),y?b.data=y:null!==(y=Nn(n))&&(b.data=y))),(y=Tn?function(e,t){switch(e){case"compositionend":return Nn(t);case"keypress":return 32!==t.which?null:(Dn=!0,Mn);case"textInput":return(e=t.data)===Mn&&Dn?null:e;default:return null}}(e,n):function(e,t){if(Rn)return"compositionend"===e||!Pn&&Ln(e,t)?(e=Xt(),Jt=Yt=Gt=null,Rn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return An&&"ko"!==t.locale?null:t.data;default:return null}}(e,n))&&(0<(r=zr(r,"onBeforeInput")).length&&(i=new vn("onBeforeInput","beforeinput",null,n,i),a.push({event:i,listeners:r}),i.data=y))}Ar(a,t)}))}function Ir(e,t,n){return{instance:e,listener:t,currentTarget:n}}function zr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,o=i.stateNode;5===i.tag&&null!==o&&(i=o,null!=(o=Te(e,n))&&r.unshift(Ir(e,o,i)),null!=(o=Te(e,t))&&r.push(Ir(e,o,i))),e=e.return}return r}function Vr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Br(e,t,n,r,i){for(var o=t._reactName,a=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=Te(n,o))&&a.unshift(Ir(n,l,s)):i||null!=(l=Te(n,o))&&a.push(Ir(n,l,s))),n=n.return}0!==a.length&&e.push({event:t,listeners:a})}var Ur=/\r\n?/g,Hr=/\u0000|\uFFFD/g;function Wr(e){return("string"==typeof e?e:""+e).replace(Ur,"\n").replace(Hr,"")}function $r(e,t,n){if(t=Wr(t),Wr(e)!==t&&n)throw Error(o(425))}function qr(){}var Kr=null,Gr=null;function Yr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var Jr="function"==typeof setTimeout?setTimeout:void 0,Xr="function"==typeof clearTimeout?clearTimeout:void 0,Qr="function"==typeof Promise?Promise:void 0,Zr="function"==typeof queueMicrotask?queueMicrotask:void 0!==Qr?function(e){return Qr.resolve(null).then(e).catch(ei)}:Jr;function ei(e){setTimeout((function(){throw e}))}function ti(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void zt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);zt(t)}function ni(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ri(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var ii=Math.random().toString(36).slice(2),oi="__reactFiber$"+ii,ai="__reactProps$"+ii,si="__reactContainer$"+ii,li="__reactEvents$"+ii,ci="__reactListeners$"+ii,ui="__reactHandles$"+ii;function fi(e){var t=e[oi];if(t)return t;for(var n=e.parentNode;n;){if(t=n[si]||n[oi]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ri(e);null!==e;){if(n=e[oi])return n;e=ri(e)}return t}n=(e=n).parentNode}return null}function di(e){return!(e=e[oi]||e[si])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function hi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(o(33))}function pi(e){return e[ai]||null}var gi=[],vi=-1;function mi(e){return{current:e}}function yi(e){0>vi||(e.current=gi[vi],gi[vi]=null,vi--)}function bi(e,t){vi++,gi[vi]=e.current,e.current=t}var wi={},Oi=mi(wi),xi=mi(!1),ki=wi;function Ci(e,t){var n=e.type.contextTypes;if(!n)return wi;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,o={};for(i in n)o[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=o),o}function Si(e){return null!=(e=e.childContextTypes)}function ji(){yi(xi),yi(Oi)}function Ei(e,t,n){if(Oi.current!==wi)throw Error(o(168));bi(Oi,t),bi(xi,n)}function Pi(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,U(e)||"Unknown",i));return F({},n,r)}function _i(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||wi,ki=Oi.current,bi(Oi,e),bi(xi,xi.current),!0}function Ti(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=Pi(e,t,ki),r.__reactInternalMemoizedMergedChildContext=e,yi(xi),yi(Oi),bi(Oi,e)):yi(xi),bi(xi,n)}var Ai=null,Mi=!1,Di=!1;function Li(e){null===Ai?Ai=[e]:Ai.push(e)}function Ni(){if(!Di&&null!==Ai){Di=!0;var e=0,t=vt;try{var n=Ai;for(vt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ai=null,Mi=!1}catch(t){throw null!==Ai&&(Ai=Ai.slice(e+1)),We(Je,Ni),t}finally{vt=t,Di=!1}}return null}var Ri=[],Fi=0,Ii=null,zi=0,Vi=[],Bi=0,Ui=null,Hi=1,Wi="";function $i(e,t){Ri[Fi++]=zi,Ri[Fi++]=Ii,Ii=e,zi=t}function qi(e,t,n){Vi[Bi++]=Hi,Vi[Bi++]=Wi,Vi[Bi++]=Ui,Ui=e;var r=Hi;e=Wi;var i=32-rt(r)-1;r&=~(1<<i),n+=1;var o=32-rt(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Hi=1<<32-rt(t)+i|n<<i|r,Wi=o+e}else Hi=1<<o|n<<i|r,Wi=e}function Ki(e){null!==e.return&&($i(e,1),qi(e,1,0))}function Gi(e){for(;e===Ii;)Ii=Ri[--Fi],Ri[Fi]=null,zi=Ri[--Fi],Ri[Fi]=null;for(;e===Ui;)Ui=Vi[--Bi],Vi[Bi]=null,Wi=Vi[--Bi],Vi[Bi]=null,Hi=Vi[--Bi],Vi[Bi]=null}var Yi=null,Ji=null,Xi=!1,Qi=null;function Zi(e,t){var n=Oc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function eo(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Yi=e,Ji=ni(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Yi=e,Ji=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ui?{id:Hi,overflow:Wi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Oc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Yi=e,Ji=null,!0);default:return!1}}function to(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function no(e){if(Xi){var t=Ji;if(t){var n=t;if(!eo(e,t)){if(to(e))throw Error(o(418));t=ni(n.nextSibling);var r=Yi;t&&eo(e,t)?Zi(r,n):(e.flags=-4097&e.flags|2,Xi=!1,Yi=e)}}else{if(to(e))throw Error(o(418));e.flags=-4097&e.flags|2,Xi=!1,Yi=e}}}function ro(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Yi=e}function io(e){if(e!==Yi)return!1;if(!Xi)return ro(e),Xi=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Yr(e.type,e.memoizedProps)),t&&(t=Ji)){if(to(e))throw oo(),Error(o(418));for(;t;)Zi(e,t),t=ni(t.nextSibling)}if(ro(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){Ji=ni(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}Ji=null}}else Ji=Yi?ni(e.stateNode.nextSibling):null;return!0}function oo(){for(var e=Ji;e;)e=ni(e.nextSibling)}function ao(){Ji=Yi=null,Xi=!1}function so(e){null===Qi?Qi=[e]:Qi.push(e)}var lo=w.ReactCurrentBatchConfig;function co(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var uo=mi(null),fo=null,ho=null,po=null;function go(){po=ho=fo=null}function vo(e){var t=uo.current;yi(uo),e._currentValue=t}function mo(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function yo(e,t){fo=e,po=ho=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(hs=!0),e.firstContext=null)}function bo(e){var t=e._currentValue;if(po!==e)if(e={context:e,memoizedValue:t,next:null},null===ho){if(null===fo)throw Error(o(308));ho=e,fo.dependencies={lanes:0,firstContext:e}}else ho=ho.next=e;return t}var wo=null;function Oo(e){null===wo?wo=[e]:wo.push(e)}function xo(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Oo(t)):(n.next=i.next,i.next=n),t.interleaved=n,ko(e,r)}function ko(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Co=!1;function So(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function jo(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Eo(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Po(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&yl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,ko(e,n)}return null===(i=r.interleaved)?(t.next=t,Oo(r)):(t.next=i.next,i.next=t),r.interleaved=t,ko(e,n)}function _o(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}function To(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,o=null;if(null!==(n=n.firstBaseUpdate)){do{var a={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===o?i=o=a:o=o.next=a,n=n.next}while(null!==n);null===o?i=o=t:o=o.next=t}else i=o=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Ao(e,t,n,r){var i=e.updateQueue;Co=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===a?o=c:a.next=c,a=l;var u=e.alternate;null!==u&&((s=(u=u.updateQueue).lastBaseUpdate)!==a&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l))}if(null!==o){var f=i.baseState;a=0,u=c=l=null,s=o;do{var d=s.lane,h=s.eventTime;if((r&d)===d){null!==u&&(u=u.next={eventTime:h,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,g=s;switch(d=t,h=n,g.tag){case 1:if("function"==typeof(p=g.payload)){f=p.call(h,f,d);break e}f=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=g.payload)?p.call(h,f,d):p))break e;f=F({},f,d);break e;case 2:Co=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[s]:d.push(s))}else h={eventTime:h,lane:d,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=h,l=f):u=u.next=h,a|=d;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(d=s).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}while(1);if(null===u&&(l=f),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{a|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);jl|=a,e.lanes=a,e.memoizedState=f}}function Mo(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var Do=(new r.Component).refs;function Lo(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var No={isMounted:function(e){return!!(e=e._reactInternals)&&Ve(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wl(),i=$l(e),o=Eo(r,i);o.payload=t,null!=n&&(o.callback=n),null!==(t=Po(e,o,i))&&(ql(t,e,i,r),_o(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wl(),i=$l(e),o=Eo(r,i);o.tag=1,o.payload=t,null!=n&&(o.callback=n),null!==(t=Po(e,o,i))&&(ql(t,e,i,r),_o(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wl(),r=$l(e),i=Eo(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Po(e,i,r))&&(ql(t,e,r,n),_o(t,e,r))}};function Ro(e,t,n,r,i,o,a){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,o,a):!t.prototype||!t.prototype.isPureReactComponent||(!nr(n,r)||!nr(i,o))}function Fo(e,t,n){var r=!1,i=wi,o=t.contextType;return"object"==typeof o&&null!==o?o=bo(o):(i=Si(t)?ki:Oi.current,o=(r=null!=(r=t.contextTypes))?Ci(e,i):wi),t=new t(n,o),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=No,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=o),t}function Io(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&No.enqueueReplaceState(t,t.state,null)}function zo(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Do,So(e);var o=t.contextType;"object"==typeof o&&null!==o?i.context=bo(o):(o=Si(t)?ki:Oi.current,i.context=Ci(e,o)),i.state=e.memoizedState,"function"==typeof(o=t.getDerivedStateFromProps)&&(Lo(e,t,o,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&No.enqueueReplaceState(i,i.state,null),Ao(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Vo(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:((t=function(e){var t=i.refs;t===Do&&(t=i.refs={}),null===e?delete t[a]:t[a]=e})._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function Bo(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Uo(e){return(0,e._init)(e._payload)}function Ho(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=kc(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ec(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var o=n.type;return o===k?f(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===o||"object"==typeof o&&null!==o&&o.$$typeof===M&&Uo(o)===t.type)?((r=i(t,n.props)).ref=Vo(e,t,n),r.return=e,r):((r=Cc(n.type,n.key,n.props,null,e.mode,r)).ref=Vo(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Pc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function f(e,t,n,r,o){return null===t||7!==t.tag?((t=Sc(n,e.mode,r,o)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Ec(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case O:return(n=Cc(t.type,t.key,t.props,null,e.mode,n)).ref=Vo(e,null,t),n.return=e,n;case x:return(t=Pc(t,e.mode,n)).return=e,t;case M:return d(e,(0,t._init)(t._payload),n)}if(ee(t)||N(t))return(t=Sc(t,e.mode,n,null)).return=e,t;Bo(e,t)}return null}function h(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case O:return n.key===i?c(e,t,n,r):null;case x:return n.key===i?u(e,t,n,r):null;case M:return h(e,t,(i=n._init)(n._payload),r)}if(ee(n)||N(n))return null!==i?null:f(e,t,n,r,null);Bo(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case O:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case x:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case M:return p(e,t,n,(0,r._init)(r._payload),i)}if(ee(r)||N(r))return f(t,e=e.get(n)||null,r,i,null);Bo(t,r)}return null}function g(i,o,s,l){for(var c=null,u=null,f=o,g=o=0,v=null;null!==f&&g<s.length;g++){f.index>g?(v=f,f=null):v=f.sibling;var m=h(i,f,s[g],l);if(null===m){null===f&&(f=v);break}e&&f&&null===m.alternate&&t(i,f),o=a(m,o,g),null===u?c=m:u.sibling=m,u=m,f=v}if(g===s.length)return n(i,f),Xi&&$i(i,g),c;if(null===f){for(;g<s.length;g++)null!==(f=d(i,s[g],l))&&(o=a(f,o,g),null===u?c=f:u.sibling=f,u=f);return Xi&&$i(i,g),c}for(f=r(i,f);g<s.length;g++)null!==(v=p(f,i,g,s[g],l))&&(e&&null!==v.alternate&&f.delete(null===v.key?g:v.key),o=a(v,o,g),null===u?c=v:u.sibling=v,u=v);return e&&f.forEach((function(e){return t(i,e)})),Xi&&$i(i,g),c}function v(i,s,l,c){var u=N(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var f=u=null,g=s,v=s=0,m=null,y=l.next();null!==g&&!y.done;v++,y=l.next()){g.index>v?(m=g,g=null):m=g.sibling;var b=h(i,g,y.value,c);if(null===b){null===g&&(g=m);break}e&&g&&null===b.alternate&&t(i,g),s=a(b,s,v),null===f?u=b:f.sibling=b,f=b,g=m}if(y.done)return n(i,g),Xi&&$i(i,v),u;if(null===g){for(;!y.done;v++,y=l.next())null!==(y=d(i,y.value,c))&&(s=a(y,s,v),null===f?u=y:f.sibling=y,f=y);return Xi&&$i(i,v),u}for(g=r(i,g);!y.done;v++,y=l.next())null!==(y=p(g,i,v,y.value,c))&&(e&&null!==y.alternate&&g.delete(null===y.key?v:y.key),s=a(y,s,v),null===f?u=y:f.sibling=y,f=y);return e&&g.forEach((function(e){return t(i,e)})),Xi&&$i(i,v),u}return function e(r,o,a,l){if("object"==typeof a&&null!==a&&a.type===k&&null===a.key&&(a=a.props.children),"object"==typeof a&&null!==a){switch(a.$$typeof){case O:e:{for(var c=a.key,u=o;null!==u;){if(u.key===c){if((c=a.type)===k){if(7===u.tag){n(r,u.sibling),(o=i(u,a.props.children)).return=r,r=o;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===M&&Uo(c)===u.type){n(r,u.sibling),(o=i(u,a.props)).ref=Vo(r,u,a),o.return=r,r=o;break e}n(r,u);break}t(r,u),u=u.sibling}a.type===k?((o=Sc(a.props.children,r.mode,l,a.key)).return=r,r=o):((l=Cc(a.type,a.key,a.props,null,r.mode,l)).ref=Vo(r,o,a),l.return=r,r=l)}return s(r);case x:e:{for(u=a.key;null!==o;){if(o.key===u){if(4===o.tag&&o.stateNode.containerInfo===a.containerInfo&&o.stateNode.implementation===a.implementation){n(r,o.sibling),(o=i(o,a.children||[])).return=r,r=o;break e}n(r,o);break}t(r,o),o=o.sibling}(o=Pc(a,r.mode,l)).return=r,r=o}return s(r);case M:return e(r,o,(u=a._init)(a._payload),l)}if(ee(a))return g(r,o,a,l);if(N(a))return v(r,o,a,l);Bo(r,a)}return"string"==typeof a&&""!==a||"number"==typeof a?(a=""+a,null!==o&&6===o.tag?(n(r,o.sibling),(o=i(o,a)).return=r,r=o):(n(r,o),(o=Ec(a,r.mode,l)).return=r,r=o),s(r)):n(r,o)}}var Wo=Ho(!0),$o=Ho(!1),qo={},Ko=mi(qo),Go=mi(qo),Yo=mi(qo);function Jo(e){if(e===qo)throw Error(o(174));return e}function Xo(e,t){switch(bi(Yo,t),bi(Go,e),bi(Ko,qo),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:se(null,"");break;default:t=se(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}yi(Ko),bi(Ko,t)}function Qo(){yi(Ko),yi(Go),yi(Yo)}function Zo(e){Jo(Yo.current);var t=Jo(Ko.current),n=se(t,e.type);t!==n&&(bi(Go,e),bi(Ko,n))}function ea(e){Go.current===e&&(yi(Ko),yi(Go))}var ta=mi(0);function na(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var ra=[];function ia(){for(var e=0;e<ra.length;e++)ra[e]._workInProgressVersionPrimary=null;ra.length=0}var oa=w.ReactCurrentDispatcher,aa=w.ReactCurrentBatchConfig,sa=0,la=null,ca=null,ua=null,fa=!1,da=!1,ha=0,pa=0;function ga(){throw Error(o(321))}function va(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!tr(e[n],t[n]))return!1;return!0}function ma(e,t,n,r,i,a){if(sa=a,la=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,oa.current=null===e||null===e.memoizedState?es:ts,e=n(r,i),da){a=0;do{if(da=!1,ha=0,25<=a)throw Error(o(301));a+=1,ua=ca=null,t.updateQueue=null,oa.current=ns,e=n(r,i)}while(da)}if(oa.current=Za,t=null!==ca&&null!==ca.next,sa=0,ua=ca=la=null,fa=!1,t)throw Error(o(300));return e}function ya(){var e=0!==ha;return ha=0,e}function ba(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===ua?la.memoizedState=ua=e:ua=ua.next=e,ua}function wa(){if(null===ca){var e=la.alternate;e=null!==e?e.memoizedState:null}else e=ca.next;var t=null===ua?la.memoizedState:ua.next;if(null!==t)ua=t,ca=e;else{if(null===e)throw Error(o(310));e={memoizedState:(ca=e).memoizedState,baseState:ca.baseState,baseQueue:ca.baseQueue,queue:ca.queue,next:null},null===ua?la.memoizedState=ua=e:ua=ua.next=e}return ua}function Oa(e,t){return"function"==typeof t?t(e):t}function xa(e){var t=wa(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=ca,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var f=u.lane;if((sa&f)===f)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var d={lane:f,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,s=r):c=c.next=d,la.lanes|=f,jl|=f}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,tr(r,t.memoizedState)||(hs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,la.lanes|=a,jl|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function ka(e){var t=wa(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);tr(a,t.memoizedState)||(hs=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ca(){}function Sa(e,t){var n=la,r=wa(),i=t(),a=!tr(r.memoizedState,i);if(a&&(r.memoizedState=i,hs=!0),r=r.queue,Fa(Pa.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==ua&&1&ua.memoizedState.tag){if(n.flags|=2048,Ma(9,Ea.bind(null,n,r,i,t),void 0,null),null===bl)throw Error(o(349));0!=(30&sa)||ja(n,t,i)}return i}function ja(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ea(e,t,n,r){t.value=n,t.getSnapshot=r,_a(t)&&Ta(e)}function Pa(e,t,n){return n((function(){_a(t)&&Ta(e)}))}function _a(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!tr(e,n)}catch(e){return!0}}function Ta(e){var t=ko(e,1);null!==t&&ql(t,e,1,-1)}function Aa(e){var t=ba();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Oa,lastRenderedState:e},t.queue=e,e=e.dispatch=Ya.bind(null,la,e),[t.memoizedState,e]}function Ma(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=la.updateQueue)?(t={lastEffect:null,stores:null},la.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Da(){return wa().memoizedState}function La(e,t,n,r){var i=ba();la.flags|=e,i.memoizedState=Ma(1|t,n,void 0,void 0===r?null:r)}function Na(e,t,n,r){var i=wa();r=void 0===r?null:r;var o=void 0;if(null!==ca){var a=ca.memoizedState;if(o=a.destroy,null!==r&&va(r,a.deps))return void(i.memoizedState=Ma(t,n,o,r))}la.flags|=e,i.memoizedState=Ma(1|t,n,o,r)}function Ra(e,t){return La(8390656,8,e,t)}function Fa(e,t){return Na(2048,8,e,t)}function Ia(e,t){return Na(4,2,e,t)}function za(e,t){return Na(4,4,e,t)}function Va(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Ba(e,t,n){return n=null!=n?n.concat([e]):null,Na(4,4,Va.bind(null,t,e),n)}function Ua(){}function Ha(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&va(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Wa(e,t){var n=wa();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&va(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $a(e,t,n){return 0==(21&sa)?(e.baseState&&(e.baseState=!1,hs=!0),e.memoizedState=n):(tr(n,t)||(n=dt(),la.lanes|=n,jl|=n,e.baseState=!0),t)}function qa(e,t){var n=vt;vt=0!==n&&4>n?n:4,e(!0);var r=aa.transition;aa.transition={};try{e(!1),t()}finally{vt=n,aa.transition=r}}function Ka(){return wa().memoizedState}function Ga(e,t,n){var r=$l(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Ja(e))Xa(t,n);else if(null!==(n=xo(e,t,n,r))){ql(n,e,r,Wl()),Qa(n,t,r)}}function Ya(e,t,n){var r=$l(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Ja(e))Xa(t,i);else{var o=e.alternate;if(0===e.lanes&&(null===o||0===o.lanes)&&null!==(o=t.lastRenderedReducer))try{var a=t.lastRenderedState,s=o(a,n);if(i.hasEagerState=!0,i.eagerState=s,tr(s,a)){var l=t.interleaved;return null===l?(i.next=i,Oo(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=xo(e,t,i,r))&&(ql(n,e,r,i=Wl()),Qa(n,t,r))}}function Ja(e){var t=e.alternate;return e===la||null!==t&&t===la}function Xa(e,t){da=fa=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Qa(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,gt(e,n)}}var Za={readContext:bo,useCallback:ga,useContext:ga,useEffect:ga,useImperativeHandle:ga,useInsertionEffect:ga,useLayoutEffect:ga,useMemo:ga,useReducer:ga,useRef:ga,useState:ga,useDebugValue:ga,useDeferredValue:ga,useTransition:ga,useMutableSource:ga,useSyncExternalStore:ga,useId:ga,unstable_isNewReconciler:!1},es={readContext:bo,useCallback:function(e,t){return ba().memoizedState=[e,void 0===t?null:t],e},useContext:bo,useEffect:Ra,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,La(4194308,4,Va.bind(null,t,e),n)},useLayoutEffect:function(e,t){return La(4194308,4,e,t)},useInsertionEffect:function(e,t){return La(4,2,e,t)},useMemo:function(e,t){var n=ba();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=ba();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Ga.bind(null,la,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},ba().memoizedState=e},useState:Aa,useDebugValue:Ua,useDeferredValue:function(e){return ba().memoizedState=e},useTransition:function(){var e=Aa(!1),t=e[0];return e=qa.bind(null,e[1]),ba().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=la,i=ba();if(Xi){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===bl)throw Error(o(349));0!=(30&sa)||ja(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Ra(Pa.bind(null,r,a,e),[e]),r.flags|=2048,Ma(9,Ea.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=ba(),t=bl.identifierPrefix;if(Xi){var n=Wi;t=":"+t+"R"+(n=(Hi&~(1<<32-rt(Hi)-1)).toString(32)+n),0<(n=ha++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=pa++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},ts={readContext:bo,useCallback:Ha,useContext:bo,useEffect:Fa,useImperativeHandle:Ba,useInsertionEffect:Ia,useLayoutEffect:za,useMemo:Wa,useReducer:xa,useRef:Da,useState:function(){return xa(Oa)},useDebugValue:Ua,useDeferredValue:function(e){return $a(wa(),ca.memoizedState,e)},useTransition:function(){return[xa(Oa)[0],wa().memoizedState]},useMutableSource:Ca,useSyncExternalStore:Sa,useId:Ka,unstable_isNewReconciler:!1},ns={readContext:bo,useCallback:Ha,useContext:bo,useEffect:Fa,useImperativeHandle:Ba,useInsertionEffect:Ia,useLayoutEffect:za,useMemo:Wa,useReducer:ka,useRef:Da,useState:function(){return ka(Oa)},useDebugValue:Ua,useDeferredValue:function(e){var t=wa();return null===ca?t.memoizedState=e:$a(t,ca.memoizedState,e)},useTransition:function(){return[ka(Oa)[0],wa().memoizedState]},useMutableSource:Ca,useSyncExternalStore:Sa,useId:Ka,unstable_isNewReconciler:!1};function rs(e,t){try{var n="",r=t;do{n+=B(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function is(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function os(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var as="function"==typeof WeakMap?WeakMap:Map;function ss(e,t,n){(n=Eo(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Ll||(Ll=!0,Nl=r),os(0,t)},n}function ls(e,t,n){(n=Eo(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){os(0,t)}}var o=e.stateNode;return null!==o&&"function"==typeof o.componentDidCatch&&(n.callback=function(){os(0,t),"function"!=typeof r&&(null===Rl?Rl=new Set([this]):Rl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function cs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new as;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=gc.bind(null,e,t,n),t.then(e,e))}function us(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function fs(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Eo(-1,1)).tag=2,Po(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var ds=w.ReactCurrentOwner,hs=!1;function ps(e,t,n,r){t.child=null===e?$o(t,null,n,r):Wo(t,e.child,n,r)}function gs(e,t,n,r,i){n=n.render;var o=t.ref;return yo(t,i),r=ma(e,t,n,r,o,i),n=ya(),null===e||hs?(Xi&&n&&Ki(t),t.flags|=1,ps(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fs(e,t,i))}function vs(e,t,n,r,i){if(null===e){var o=n.type;return"function"!=typeof o||xc(o)||void 0!==o.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Cc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=o,ms(e,t,o,r,i))}if(o=e.child,0==(e.lanes&i)){var a=o.memoizedProps;if((n=null!==(n=n.compare)?n:nr)(a,r)&&e.ref===t.ref)return Fs(e,t,i)}return t.flags|=1,(e=kc(o,r)).ref=t.ref,e.return=t,t.child=e}function ms(e,t,n,r,i){if(null!==e){var o=e.memoizedProps;if(nr(o,r)&&e.ref===t.ref){if(hs=!1,t.pendingProps=r=o,0==(e.lanes&i))return t.lanes=e.lanes,Fs(e,t,i);0!=(131072&e.flags)&&(hs=!0)}}return ws(e,t,n,r,i)}function ys(e,t,n){var r=t.pendingProps,i=r.children,o=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},bi(kl,xl),xl|=n;else{if(0==(1073741824&n))return e=null!==o?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,bi(kl,xl),xl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==o?o.baseLanes:n,bi(kl,xl),xl|=r}else null!==o?(r=o.baseLanes|n,t.memoizedState=null):r=n,bi(kl,xl),xl|=r;return ps(e,t,i,n),t.child}function bs(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ws(e,t,n,r,i){var o=Si(n)?ki:Oi.current;return o=Ci(t,o),yo(t,i),n=ma(e,t,n,r,o,i),r=ya(),null===e||hs?(Xi&&r&&Ki(t),t.flags|=1,ps(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Fs(e,t,i))}function Os(e,t,n,r,i){if(Si(n)){var o=!0;_i(t)}else o=!1;if(yo(t,i),null===t.stateNode)Rs(e,t),Fo(t,n,r),zo(t,n,r,i),r=!0;else if(null===e){var a=t.stateNode,s=t.memoizedProps;a.props=s;var l=a.context,c=n.contextType;"object"==typeof c&&null!==c?c=bo(c):c=Ci(t,c=Si(n)?ki:Oi.current);var u=n.getDerivedStateFromProps,f="function"==typeof u||"function"==typeof a.getSnapshotBeforeUpdate;f||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==r||l!==c)&&Io(t,a,r,c),Co=!1;var d=t.memoizedState;a.state=d,Ao(t,r,a,i),l=t.memoizedState,s!==r||d!==l||xi.current||Co?("function"==typeof u&&(Lo(t,n,u,r),l=t.memoizedState),(s=Co||Ro(t,n,s,r,d,l,c))?(f||"function"!=typeof a.UNSAFE_componentWillMount&&"function"!=typeof a.componentWillMount||("function"==typeof a.componentWillMount&&a.componentWillMount(),"function"==typeof a.UNSAFE_componentWillMount&&a.UNSAFE_componentWillMount()),"function"==typeof a.componentDidMount&&(t.flags|=4194308)):("function"==typeof a.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),a.props=r,a.state=l,a.context=c,r=s):("function"==typeof a.componentDidMount&&(t.flags|=4194308),r=!1)}else{a=t.stateNode,jo(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:co(t.type,s),a.props=c,f=t.pendingProps,d=a.context,"object"==typeof(l=n.contextType)&&null!==l?l=bo(l):l=Ci(t,l=Si(n)?ki:Oi.current);var h=n.getDerivedStateFromProps;(u="function"==typeof h||"function"==typeof a.getSnapshotBeforeUpdate)||"function"!=typeof a.UNSAFE_componentWillReceiveProps&&"function"!=typeof a.componentWillReceiveProps||(s!==f||d!==l)&&Io(t,a,r,l),Co=!1,d=t.memoizedState,a.state=d,Ao(t,r,a,i);var p=t.memoizedState;s!==f||d!==p||xi.current||Co?("function"==typeof h&&(Lo(t,n,h,r),p=t.memoizedState),(c=Co||Ro(t,n,c,r,d,p,l)||!1)?(u||"function"!=typeof a.UNSAFE_componentWillUpdate&&"function"!=typeof a.componentWillUpdate||("function"==typeof a.componentWillUpdate&&a.componentWillUpdate(r,p,l),"function"==typeof a.UNSAFE_componentWillUpdate&&a.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof a.componentDidUpdate&&(t.flags|=4),"function"==typeof a.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),a.props=r,a.state=p,a.context=l,r=c):("function"!=typeof a.componentDidUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof a.getSnapshotBeforeUpdate||s===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return xs(e,t,n,r,o,i)}function xs(e,t,n,r,i,o){bs(e,t);var a=0!=(128&t.flags);if(!r&&!a)return i&&Ti(t,n,!1),Fs(e,t,o);r=t.stateNode,ds.current=t;var s=a&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&a?(t.child=Wo(t,e.child,null,o),t.child=Wo(t,null,s,o)):ps(e,t,s,o),t.memoizedState=r.state,i&&Ti(t,n,!0),t.child}function ks(e){var t=e.stateNode;t.pendingContext?Ei(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ei(0,t.context,!1),Xo(e,t.containerInfo)}function Cs(e,t,n,r,i){return ao(),so(i),t.flags|=256,ps(e,t,n,r),t.child}var Ss,js,Es,Ps={dehydrated:null,treeContext:null,retryLane:0};function _s(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ts(e,t,n){var r,i=t.pendingProps,a=ta.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),bi(ta,1&a),null===e)return no(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=jc(l,i,0,null),e=Sc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=_s(n),t.memoizedState=Ps,e):As(t,l));if(null!==(a=e.memoizedState)&&null!==(r=a.dehydrated))return function(e,t,n,r,i,a,s){if(n)return 256&t.flags?(t.flags&=-257,r=is(Error(o(422))),Ms(e,t,s,r)):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(a=r.fallback,i=t.mode,r=jc({mode:"visible",children:r.children},i,0,null),(a=Sc(a,i,s,null)).flags|=2,r.return=t,a.return=t,r.sibling=a,t.child=r,0!=(1&t.mode)&&Wo(t,e.child,null,s),t.child.memoizedState=_s(s),t.memoizedState=Ps,a);if(0==(1&t.mode))return Ms(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,a=Error(o(419)),r=is(a,r,void 0),Ms(e,t,s,r)}if(l=0!=(s&e.childLanes),hs||l){if(null!==(r=bl)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==a.retryLane&&(a.retryLane=i,ko(e,i),ql(r,e,i,-1))}return oc(),r=is(Error(o(421))),Ms(e,t,s,r)}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=mc.bind(null,e),i._reactRetry=t,null):(e=a.treeContext,Ji=ni(i.nextSibling),Yi=t,Xi=!0,Qi=null,null!==e&&(Vi[Bi++]=Hi,Vi[Bi++]=Wi,Vi[Bi++]=Ui,Hi=e.id,Wi=e.overflow,Ui=t),(t=As(t,r.children)).flags|=4096,t)}(e,t,l,i,r,a,n);if(s){s=i.fallback,l=t.mode,r=(a=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==a?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=kc(a,c)).subtreeFlags=14680064&a.subtreeFlags,null!==r?s=kc(r,s):(s=Sc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?_s(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=Ps,i}return e=(s=e.child).sibling,i=kc(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function As(e,t){return(t=jc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Ms(e,t,n,r){return null!==r&&so(r),Wo(t,e.child,null,n),(e=As(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Ds(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),mo(e.return,t,n)}function Ls(e,t,n,r,i){var o=e.memoizedState;null===o?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=i)}function Ns(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;if(ps(e,t,r.children,n),0!=(2&(r=ta.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Ds(e,n,t);else if(19===e.tag)Ds(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(bi(ta,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===na(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ls(t,!1,i,n,o);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===na(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ls(t,!0,n,null,o);break;case"together":Ls(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Rs(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Fs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),jl|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=kc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=kc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Is(e,t){if(!Xi)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function zs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Vs(e,t,n){var r=t.pendingProps;switch(Gi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return zs(t),null;case 1:return Si(t.type)&&ji(),zs(t),null;case 3:return r=t.stateNode,Qo(),yi(xi),yi(Oi),ia(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(io(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Qi&&(Jl(Qi),Qi=null))),zs(t),null;case 5:ea(t);var i=Jo(Yo.current);if(n=t.type,null!==e&&null!=t.stateNode)js(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return zs(t),null}if(e=Jo(Ko.current),io(t)){r=t.stateNode,n=t.type;var a=t.memoizedProps;switch(r[oi]=t,r[ai]=a,e=0!=(1&t.mode),n){case"dialog":Mr("cancel",r),Mr("close",r);break;case"iframe":case"object":case"embed":Mr("load",r);break;case"video":case"audio":for(i=0;i<Pr.length;i++)Mr(Pr[i],r);break;case"source":Mr("error",r);break;case"img":case"image":case"link":Mr("error",r),Mr("load",r);break;case"details":Mr("toggle",r);break;case"input":Y(r,a),Mr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!a.multiple},Mr("invalid",r);break;case"textarea":re(r,a),Mr("invalid",r)}for(var l in ve(n,a),i=null,a)if(a.hasOwnProperty(l)){var c=a[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==a.suppressHydrationWarning&&$r(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==a.suppressHydrationWarning&&$r(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Mr("scroll",r)}switch(n){case"input":$(r),Q(r,a,!0);break;case"textarea":$(r),oe(r);break;case"select":case"option":break;default:"function"==typeof a.onClick&&(r.onclick=qr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=ae(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[oi]=t,e[ai]=r,Ss(e,t),t.stateNode=e;e:{switch(l=me(n,r),n){case"dialog":Mr("cancel",e),Mr("close",e),i=r;break;case"iframe":case"object":case"embed":Mr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Pr.length;i++)Mr(Pr[i],e);i=r;break;case"source":Mr("error",e),i=r;break;case"img":case"image":case"link":Mr("error",e),Mr("load",e),i=r;break;case"details":Mr("toggle",e),i=r;break;case"input":Y(e,r),i=G(e,r),Mr("invalid",e);break;case"option":i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=F({},r,{value:void 0}),Mr("invalid",e);break;case"textarea":re(e,r),i=ne(e,r),Mr("invalid",e);break;default:i=r}for(a in ve(n,i),c=i)if(c.hasOwnProperty(a)){var u=c[a];"style"===a?pe(e,u):"dangerouslySetInnerHTML"===a?null!=(u=u?u.__html:void 0)&&ce(e,u):"children"===a?"string"==typeof u?("textarea"!==n||""!==u)&&ue(e,u):"number"==typeof u&&ue(e,""+u):"suppressContentEditableWarning"!==a&&"suppressHydrationWarning"!==a&&"autoFocus"!==a&&(s.hasOwnProperty(a)?null!=u&&"onScroll"===a&&Mr("scroll",e):null!=u&&b(e,a,u,l))}switch(n){case"input":$(e),Q(e,r,!1);break;case"textarea":$(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+H(r.value));break;case"select":e.multiple=!!r.multiple,null!=(a=r.value)?te(e,!!r.multiple,a,!1):null!=r.defaultValue&&te(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=qr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return zs(t),null;case 6:if(e&&null!=t.stateNode)Es(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(n=Jo(Yo.current),Jo(Ko.current),io(t)){if(r=t.stateNode,n=t.memoizedProps,r[oi]=t,(a=r.nodeValue!==n)&&null!==(e=Yi))switch(e.tag){case 3:$r(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&$r(r.nodeValue,n,0!=(1&e.mode))}a&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[oi]=t,t.stateNode=r}return zs(t),null;case 13:if(yi(ta),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(Xi&&null!==Ji&&0!=(1&t.mode)&&0==(128&t.flags))oo(),ao(),t.flags|=98560,a=!1;else if(a=io(t),null!==r&&null!==r.dehydrated){if(null===e){if(!a)throw Error(o(318));if(!(a=null!==(a=t.memoizedState)?a.dehydrated:null))throw Error(o(317));a[oi]=t}else ao(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;zs(t),a=!1}else null!==Qi&&(Jl(Qi),Qi=null),a=!0;if(!a)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!==(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&ta.current)?0===Cl&&(Cl=3):oc())),null!==t.updateQueue&&(t.flags|=4),zs(t),null);case 4:return Qo(),null===e&&Nr(t.stateNode.containerInfo),zs(t),null;case 10:return vo(t.type._context),zs(t),null;case 17:return Si(t.type)&&ji(),zs(t),null;case 19:if(yi(ta),null===(a=t.memoizedState))return zs(t),null;if(r=0!=(128&t.flags),null===(l=a.rendering))if(r)Is(a,!1);else{if(0!==Cl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=na(e))){for(t.flags|=128,Is(a,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(a=n).flags&=14680066,null===(l=a.alternate)?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=l.childLanes,a.lanes=l.lanes,a.child=l.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=l.memoizedProps,a.memoizedState=l.memoizedState,a.updateQueue=l.updateQueue,a.type=l.type,e=l.dependencies,a.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return bi(ta,1&ta.current|2),t.child}e=e.sibling}null!==a.tail&&Ge()>Ml&&(t.flags|=128,r=!0,Is(a,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=na(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Is(a,!0),null===a.tail&&"hidden"===a.tailMode&&!l.alternate&&!Xi)return zs(t),null}else 2*Ge()-a.renderingStartTime>Ml&&1073741824!==n&&(t.flags|=128,r=!0,Is(a,!1),t.lanes=4194304);a.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=a.last)?n.sibling=l:t.child=l,a.last=l)}return null!==a.tail?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=Ge(),t.sibling=null,n=ta.current,bi(ta,r?1&n|2:1&n),t):(zs(t),null);case 22:case 23:return tc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&xl)&&(zs(t),6&t.subtreeFlags&&(t.flags|=8192)):zs(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}function Bs(e,t){switch(Gi(t),t.tag){case 1:return Si(t.type)&&ji(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return Qo(),yi(xi),yi(Oi),ia(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ea(t),null;case 13:if(yi(ta),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));ao()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return yi(ta),null;case 4:return Qo(),null;case 10:return vo(t.type._context),null;case 22:case 23:return tc(),null;case 24:default:return null}}Ss=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},js=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Jo(Ko.current);var o,a=null;switch(n){case"input":i=G(e,i),r=G(e,r),a=[];break;case"select":i=F({},i,{value:void 0}),r=F({},r,{value:void 0}),a=[];break;case"textarea":i=ne(e,i),r=ne(e,r),a=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=qr)}for(u in ve(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(o in l)l.hasOwnProperty(o)&&(n||(n={}),n[o]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(o in l)!l.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(n||(n={}),n[o]="");for(o in c)c.hasOwnProperty(o)&&l[o]!==c[o]&&(n||(n={}),n[o]=c[o])}else n||(a||(a=[]),a.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(a=a||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(a=a||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Mr("scroll",e),a||l===c||(a=[])):(a=a||[]).push(u,c))}n&&(a=a||[]).push("style",n);var u=a;(t.updateQueue=u)&&(t.flags|=4)}},Es=function(e,t,n,r){n!==r&&(t.flags|=4)};var Us=!1,Hs=!1,Ws="function"==typeof WeakSet?WeakSet:Set,$s=null;function qs(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){pc(e,t,n)}else n.current=null}function Ks(e,t,n){try{n()}catch(n){pc(e,t,n)}}var Gs=!1;function Ys(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var o=i.destroy;i.destroy=void 0,void 0!==o&&Ks(t,n,o)}i=i.next}while(i!==r)}}function Js(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function Xs(e){var t=e.ref;if(null!==t){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}"function"==typeof t?t(e):t.current=e}}function Qs(e){var t=e.alternate;null!==t&&(e.alternate=null,Qs(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&(null!==(t=e.stateNode)&&(delete t[oi],delete t[ai],delete t[li],delete t[ci],delete t[ui])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function Zs(e){return 5===e.tag||3===e.tag||4===e.tag}function el(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||Zs(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}var tl=null,nl=!1;function rl(e,t,n){for(n=n.child;null!==n;)il(e,t,n),n=n.sibling}function il(e,t,n){if(nt&&"function"==typeof nt.onCommitFiberUnmount)try{nt.onCommitFiberUnmount(tt,n)}catch(e){}switch(n.tag){case 5:Hs||qs(n,t);case 6:var r=tl,i=nl;tl=null,rl(e,t,n),nl=i,null!==(tl=r)&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):tl.removeChild(n.stateNode));break;case 18:null!==tl&&(nl?(e=tl,n=n.stateNode,8===e.nodeType?ti(e.parentNode,n):1===e.nodeType&&ti(e,n),zt(e)):ti(tl,n.stateNode));break;case 4:r=tl,i=nl,tl=n.stateNode.containerInfo,nl=!0,rl(e,t,n),tl=r,nl=i;break;case 0:case 11:case 14:case 15:if(!Hs&&(null!==(r=n.updateQueue)&&null!==(r=r.lastEffect))){i=r=r.next;do{var o=i,a=o.destroy;o=o.tag,void 0!==a&&(0!=(2&o)||0!=(4&o))&&Ks(n,t,a),i=i.next}while(i!==r)}rl(e,t,n);break;case 1:if(!Hs&&(qs(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){pc(n,t,e)}rl(e,t,n);break;case 21:rl(e,t,n);break;case 22:1&n.mode?(Hs=(r=Hs)||null!==n.memoizedState,rl(e,t,n),Hs=r):rl(e,t,n);break;default:rl(e,t,n)}}function ol(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ws),t.forEach((function(t){var r=yc.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function al(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:tl=l.stateNode,nl=!1;break e;case 3:case 4:tl=l.stateNode.containerInfo,nl=!0;break e}l=l.return}if(null===tl)throw Error(o(160));il(a,s,i),tl=null,nl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){pc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)sl(t,e),t=t.sibling}function sl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(al(t,e),ll(e),4&r){try{Ys(3,e,e.return),Js(3,e)}catch(t){pc(e,e.return,t)}try{Ys(5,e,e.return)}catch(t){pc(e,e.return,t)}}break;case 1:al(t,e),ll(e),512&r&&null!==n&&qs(n,n.return);break;case 5:if(al(t,e),ll(e),512&r&&null!==n&&qs(n,n.return),32&e.flags){var i=e.stateNode;try{ue(i,"")}catch(t){pc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var a=e.memoizedProps,s=null!==n?n.memoizedProps:a,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===a.type&&null!=a.name&&J(i,a),me(l,s);var u=me(l,a);for(s=0;s<c.length;s+=2){var f=c[s],d=c[s+1];"style"===f?pe(i,d):"dangerouslySetInnerHTML"===f?ce(i,d):"children"===f?ue(i,d):b(i,f,d,u)}switch(l){case"input":X(i,a);break;case"textarea":ie(i,a);break;case"select":var h=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!a.multiple;var p=a.value;null!=p?te(i,!!a.multiple,p,!1):h!==!!a.multiple&&(null!=a.defaultValue?te(i,!!a.multiple,a.defaultValue,!0):te(i,!!a.multiple,a.multiple?[]:"",!1))}i[ai]=a}catch(t){pc(e,e.return,t)}}break;case 6:if(al(t,e),ll(e),4&r){if(null===e.stateNode)throw Error(o(162));i=e.stateNode,a=e.memoizedProps;try{i.nodeValue=a}catch(t){pc(e,e.return,t)}}break;case 3:if(al(t,e),ll(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{zt(t.containerInfo)}catch(t){pc(e,e.return,t)}break;case 4:al(t,e),ll(e);break;case 13:al(t,e),ll(e),8192&(i=e.child).flags&&(a=null!==i.memoizedState,i.stateNode.isHidden=a,!a||null!==i.alternate&&null!==i.alternate.memoizedState||(Al=Ge())),4&r&&ol(e);break;case 22:if(f=null!==n&&null!==n.memoizedState,1&e.mode?(Hs=(u=Hs)||f,al(t,e),Hs=u):al(t,e),ll(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!f&&0!=(1&e.mode))for($s=e,f=e.child;null!==f;){for(d=$s=f;null!==$s;){switch(p=(h=$s).child,h.tag){case 0:case 11:case 14:case 15:Ys(4,h,h.return);break;case 1:qs(h,h.return);var g=h.stateNode;if("function"==typeof g.componentWillUnmount){r=h,n=h.return;try{t=r,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(e){pc(r,n,e)}}break;case 5:qs(h,h.return);break;case 22:if(null!==h.memoizedState){fl(d);continue}}null!==p?(p.return=h,$s=p):fl(d)}f=f.sibling}e:for(f=null,d=e;;){if(5===d.tag){if(null===f){f=d;try{i=d.stateNode,u?"function"==typeof(a=i.style).setProperty?a.setProperty("display","none","important"):a.display="none":(l=d.stateNode,s=null!=(c=d.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=he("display",s))}catch(t){pc(e,e.return,t)}}}else if(6===d.tag){if(null===f)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(t){pc(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;f===d&&(f=null),d=d.return}f===d&&(f=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:al(t,e),ll(e),4&r&&ol(e);break;case 21:break;default:al(t,e),ll(e)}}function ll(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(Zs(n)){var r=n;break e}n=n.return}throw Error(o(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(ue(i,""),r.flags&=-33),function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?r.insertBefore(t,n):r.appendChild(t);else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,el(e),i);break;case 3:case 4:var a=r.stateNode.containerInfo;!function e(t,n,r){var i=t.tag;if(5===i||6===i)t=t.stateNode,n?8===r.nodeType?r.parentNode.insertBefore(t,n):r.insertBefore(t,n):(8===r.nodeType?(n=r.parentNode).insertBefore(t,r):(n=r).appendChild(t),null!=(r=r._reactRootContainer)||null!==n.onclick||(n.onclick=qr));else if(4!==i&&null!==(t=t.child))for(e(t,n,r),t=t.sibling;null!==t;)e(t,n,r),t=t.sibling}(e,el(e),a);break;default:throw Error(o(161))}}catch(t){pc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function cl(e,t,n){$s=e,function e(t,n,r){for(var i=0!=(1&t.mode);null!==$s;){var o=$s,a=o.child;if(22===o.tag&&i){var s=null!==o.memoizedState||Us;if(!s){var l=o.alternate,c=null!==l&&null!==l.memoizedState||Hs;l=Us;var u=Hs;if(Us=s,(Hs=c)&&!u)for($s=o;null!==$s;)c=(s=$s).child,22===s.tag&&null!==s.memoizedState?dl(o):null!==c?(c.return=s,$s=c):dl(o);for(;null!==a;)$s=a,e(a,n,r),a=a.sibling;$s=o,Us=l,Hs=u}ul(t)}else 0!=(8772&o.subtreeFlags)&&null!==a?(a.return=o,$s=a):ul(t)}}(e,t,n)}function ul(e){for(;null!==$s;){var t=$s;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Hs||Js(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Hs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:co(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&Mo(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=t.child.stateNode;break;case 1:n=t.child.stateNode}Mo(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var f=u.memoizedState;if(null!==f){var d=f.dehydrated;null!==d&&zt(d)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(o(163))}Hs||512&t.flags&&Xs(t)}catch(e){pc(t,t.return,e)}}if(t===e){$s=null;break}if(null!==(n=t.sibling)){n.return=t.return,$s=n;break}$s=t.return}}function fl(e){for(;null!==$s;){var t=$s;if(t===e){$s=null;break}var n=t.sibling;if(null!==n){n.return=t.return,$s=n;break}$s=t.return}}function dl(e){for(;null!==$s;){var t=$s;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{Js(4,t)}catch(e){pc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){pc(t,i,e)}}var o=t.return;try{Xs(t)}catch(e){pc(t,o,e)}break;case 5:var a=t.return;try{Xs(t)}catch(e){pc(t,a,e)}}}catch(e){pc(t,t.return,e)}if(t===e){$s=null;break}var s=t.sibling;if(null!==s){s.return=t.return,$s=s;break}$s=t.return}}var hl,pl=Math.ceil,gl=w.ReactCurrentDispatcher,vl=w.ReactCurrentOwner,ml=w.ReactCurrentBatchConfig,yl=0,bl=null,wl=null,Ol=0,xl=0,kl=mi(0),Cl=0,Sl=null,jl=0,El=0,Pl=0,_l=null,Tl=null,Al=0,Ml=1/0,Dl=null,Ll=!1,Nl=null,Rl=null,Fl=!1,Il=null,zl=0,Vl=0,Bl=null,Ul=-1,Hl=0;function Wl(){return 0!=(6&yl)?Ge():-1!==Ul?Ul:Ul=Ge()}function $l(e){return 0==(1&e.mode)?1:0!=(2&yl)&&0!==Ol?Ol&-Ol:null!==lo.transition?(0===Hl&&(Hl=dt()),Hl):0!==(e=vt)?e:e=void 0===(e=window.event)?16:Kt(e.type)}function ql(e,t,n,r){if(50<Vl)throw Vl=0,Bl=null,Error(o(185));pt(e,n,r),0!=(2&yl)&&e===bl||(e===bl&&(0==(2&yl)&&(El|=n),4===Cl&&Xl(e,Ol)),Kl(e,r),1===n&&0===yl&&0==(1&t.mode)&&(Ml=Ge()+500,Mi&&Ni()))}function Kl(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes;0<o;){var a=31-rt(o),s=1<<a,l=i[a];-1===l?0!=(s&n)&&0==(s&r)||(i[a]=ut(s,t)):l<=t&&(e.expiredLanes|=s),o&=~s}}(e,t);var r=ct(e,e===bl?Ol:0);if(0===r)null!==n&&$e(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&$e(n),1===t)0===e.tag?function(e){Mi=!0,Li(e)}(Ql.bind(null,e)):Li(Ql.bind(null,e)),Zr((function(){0==(6&yl)&&Ni()})),n=null;else{switch(mt(r)){case 1:n=Je;break;case 4:n=Xe;break;case 16:n=Qe;break;case 536870912:n=et;break;default:n=Qe}n=bc(n,Gl.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Gl(e,t){if(Ul=-1,Hl=0,0!=(6&yl))throw Error(o(327));var n=e.callbackNode;if(dc()&&e.callbackNode!==n)return null;var r=ct(e,e===bl?Ol:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=ac(e,r);else{t=r;var i=yl;yl|=2;var a=ic();bl===e&&Ol===t||(Dl=null,Ml=Ge()+500,nc(e,t));do{try{lc();break}catch(t){rc(e,t)}}while(1);go(),gl.current=a,yl=i,null!==wl?t=0:(bl=null,Ol=0,t=Cl)}if(0!==t){if(2===t&&(0!==(i=ft(e))&&(r=i,t=Yl(e,i))),1===t)throw n=Sl,nc(e,0),Xl(e,r),Kl(e,Ge()),n;if(6===t)Xl(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!tr(o(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=ac(e,r))&&(0!==(a=ft(e))&&(r=a,t=Yl(e,a))),1===t))throw n=Sl,nc(e,0),Xl(e,r),Kl(e,Ge()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:fc(e,Tl,Dl);break;case 3:if(Xl(e,r),(130023424&r)===r&&10<(t=Al+500-Ge())){if(0!==ct(e,0))break;if(((i=e.suspendedLanes)&r)!==r){Wl(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=Jr(fc.bind(null,e,Tl,Dl),t);break}fc(e,Tl,Dl);break;case 4:if(Xl(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-rt(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Ge()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*pl(r/1960))-r)){e.timeoutHandle=Jr(fc.bind(null,e,Tl,Dl),r);break}fc(e,Tl,Dl);break;case 5:fc(e,Tl,Dl);break;default:throw Error(o(329))}}}return Kl(e,Ge()),e.callbackNode===n?Gl.bind(null,e):null}function Yl(e,t){var n=_l;return e.current.memoizedState.isDehydrated&&(nc(e,t).flags|=256),2!==(e=ac(e,t))&&(t=Tl,Tl=n,null!==t&&Jl(t)),e}function Jl(e){null===Tl?Tl=e:Tl.push.apply(Tl,e)}function Xl(e,t){for(t&=~Pl,t&=~El,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-rt(t),r=1<<n;e[n]=-1,t&=~r}}function Ql(e){if(0!=(6&yl))throw Error(o(327));dc();var t=ct(e,0);if(0==(1&t))return Kl(e,Ge()),null;var n=ac(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=Yl(e,r))}if(1===n)throw n=Sl,nc(e,0),Xl(e,t),Kl(e,Ge()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,fc(e,Tl,Dl),Kl(e,Ge()),null}function Zl(e,t){var n=yl;yl|=1;try{return e(t)}finally{0===(yl=n)&&(Ml=Ge()+500,Mi&&Ni())}}function ec(e){null!==Il&&0===Il.tag&&0==(6&yl)&&dc();var t=yl;yl|=1;var n=ml.transition,r=vt;try{if(ml.transition=null,vt=1,e)return e()}finally{vt=r,ml.transition=n,0==(6&(yl=t))&&Ni()}}function tc(){xl=kl.current,yi(kl)}function nc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,Xr(n)),null!==wl)for(n=wl.return;null!==n;){var r=n;switch(Gi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&ji();break;case 3:Qo(),yi(xi),yi(Oi),ia();break;case 5:ea(r);break;case 4:Qo();break;case 13:case 19:yi(ta);break;case 10:vo(r.type._context);break;case 22:case 23:tc()}n=n.return}if(bl=e,wl=e=kc(e.current,null),Ol=xl=t,Cl=0,Sl=null,Pl=El=jl=0,Tl=_l=null,null!==wo){for(t=0;t<wo.length;t++)if(null!==(r=(n=wo[t]).interleaved)){n.interleaved=null;var i=r.next,o=n.pending;if(null!==o){var a=o.next;o.next=i,r.next=a}n.pending=r}wo=null}return e}function rc(e,t){do{var n=wl;try{if(go(),oa.current=Za,fa){for(var r=la.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}fa=!1}if(sa=0,ua=ca=la=null,da=!1,ha=0,vl.current=null,null===n||null===n.return){Cl=1,Sl=t,wl=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Ol,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,f=l,d=f.tag;if(0==(1&f.mode)&&(0===d||11===d||15===d)){var h=f.alternate;h?(f.updateQueue=h.updateQueue,f.memoizedState=h.memoizedState,f.lanes=h.lanes):(f.updateQueue=null,f.memoizedState=null)}var p=us(s);if(null!==p){p.flags&=-257,fs(p,s,l,0,t),1&p.mode&&cs(a,u,t),c=u;var g=(t=p).updateQueue;if(null===g){var v=new Set;v.add(c),t.updateQueue=v}else g.add(c);break e}if(0==(1&t)){cs(a,u,t),oc();break e}c=Error(o(426))}else if(Xi&&1&l.mode){var m=us(s);if(null!==m){0==(65536&m.flags)&&(m.flags|=256),fs(m,s,l,0,t),so(rs(c,l));break e}}a=c=rs(c,l),4!==Cl&&(Cl=2),null===_l?_l=[a]:_l.push(a),a=s;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t,To(a,ss(0,c,t));break e;case 1:l=c;var y=a.type,b=a.stateNode;if(0==(128&a.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Rl||!Rl.has(b)))){a.flags|=65536,t&=-t,a.lanes|=t,To(a,ls(a,l,t));break e}}a=a.return}while(null!==a)}uc(n)}catch(e){t=e,wl===n&&null!==n&&(wl=n=n.return);continue}break}while(1)}function ic(){var e=gl.current;return gl.current=Za,null===e?Za:e}function oc(){0!==Cl&&3!==Cl&&2!==Cl||(Cl=4),null===bl||0==(268435455&jl)&&0==(268435455&El)||Xl(bl,Ol)}function ac(e,t){var n=yl;yl|=2;var r=ic();bl===e&&Ol===t||(Dl=null,nc(e,t));do{try{sc();break}catch(t){rc(e,t)}}while(1);if(go(),yl=n,gl.current=r,null!==wl)throw Error(o(261));return bl=null,Ol=0,Cl}function sc(){for(;null!==wl;)cc(wl)}function lc(){for(;null!==wl&&!qe();)cc(wl)}function cc(e){var t=hl(e.alternate,e,xl);e.memoizedProps=e.pendingProps,null===t?uc(e):wl=t,vl.current=null}function uc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Vs(n,t,xl)))return void(wl=n)}else{if(null!==(n=Bs(n,t)))return n.flags&=32767,void(wl=n);if(null===e)return Cl=6,void(wl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(wl=t);wl=t=e}while(null!==t);0===Cl&&(Cl=5)}function fc(e,t,n){var r=vt,i=ml.transition;try{ml.transition=null,vt=1,function(e,t,n,r){do{dc()}while(null!==Il);if(0!=(6&yl))throw Error(o(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-rt(n),o=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~o}}(e,a),e===bl&&(wl=bl=null,Ol=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Fl||(Fl=!0,bc(Qe,(function(){return dc(),null}))),a=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||a){a=ml.transition,ml.transition=null;var s=vt;vt=1;var l=yl;yl|=4,vl.current=null,function(e,t){if(Kr=Bt,ar(e=or())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,f=0,d=e,h=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(l=s+i),d!==a||0!==r&&3!==d.nodeType||(c=s+r),3===d.nodeType&&(s+=d.nodeValue.length),null!==(p=d.firstChild);)h=d,d=p;for(;;){if(d===e)break t;if(h===n&&++u===i&&(l=s),h===a&&++f===r&&(c=s),null!==(p=d.nextSibling))break;h=(d=h).parentNode}d=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Gr={focusedElem:e,selectionRange:n},Bt=!1,$s=t;null!==$s;)if(e=(t=$s).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,$s=e;else for(;null!==$s;){t=$s;try{var g=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:break;case 1:if(null!==g){var v=g.memoizedProps,m=g.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?v:co(t.type,v),m);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var w=t.stateNode.containerInfo;1===w.nodeType?w.textContent="":9===w.nodeType&&w.documentElement&&w.removeChild(w.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(e){pc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,$s=e;break}$s=t.return}g=Gs,Gs=!1}(e,n),sl(n,e),sr(Gr),Bt=!!Kr,Gr=Kr=null,e.current=n,cl(n,e,i),Ke(),yl=l,vt=s,ml.transition=a}else e.current=n;if(Fl&&(Fl=!1,Il=e,zl=i),0===(a=e.pendingLanes)&&(Rl=null),function(e){if(nt&&"function"==typeof nt.onCommitFiberRoot)try{nt.onCommitFiberRoot(tt,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),Kl(e,Ge()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)i=t[n],r(i.value,{componentStack:i.stack,digest:i.digest});if(Ll)throw Ll=!1,e=Nl,Nl=null,e;0!=(1&zl)&&0!==e.tag&&dc(),0!=(1&(a=e.pendingLanes))?e===Bl?Vl++:(Vl=0,Bl=e):Vl=0,Ni()}(e,t,n,r)}finally{ml.transition=i,vt=r}return null}function dc(){if(null!==Il){var e=mt(zl),t=ml.transition,n=vt;try{if(ml.transition=null,vt=16>e?16:e,null===Il)var r=!1;else{if(e=Il,Il=null,zl=0,0!=(6&yl))throw Error(o(331));var i=yl;for(yl|=4,$s=e.current;null!==$s;){var a=$s,s=a.child;if(0!=(16&$s.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for($s=u;null!==$s;){var f=$s;switch(f.tag){case 0:case 11:case 15:Ys(8,f,a)}var d=f.child;if(null!==d)d.return=f,$s=d;else for(;null!==$s;){var h=(f=$s).sibling,p=f.return;if(Qs(f),f===u){$s=null;break}if(null!==h){h.return=p,$s=h;break}$s=p}}}var g=a.alternate;if(null!==g){var v=g.child;if(null!==v){g.child=null;do{var m=v.sibling;v.sibling=null,v=m}while(null!==v)}}$s=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,$s=s;else e:for(;null!==$s;){if(0!=(2048&(a=$s).flags))switch(a.tag){case 0:case 11:case 15:Ys(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,$s=y;break e}$s=a.return}}var b=e.current;for($s=b;null!==$s;){var w=(s=$s).child;if(0!=(2064&s.subtreeFlags)&&null!==w)w.return=s,$s=w;else e:for(s=b;null!==$s;){if(0!=(2048&(l=$s).flags))try{switch(l.tag){case 0:case 11:case 15:Js(9,l)}}catch(e){pc(l,l.return,e)}if(l===s){$s=null;break e}var O=l.sibling;if(null!==O){O.return=l.return,$s=O;break e}$s=l.return}}if(yl=i,Ni(),nt&&"function"==typeof nt.onPostCommitFiberRoot)try{nt.onPostCommitFiberRoot(tt,e)}catch(e){}r=!0}return r}finally{vt=n,ml.transition=t}}return!1}function hc(e,t,n){e=Po(e,t=ss(0,t=rs(n,t),1),1),t=Wl(),null!==e&&(pt(e,1,t),Kl(e,t))}function pc(e,t,n){if(3===e.tag)hc(e,e,n);else for(;null!==t;){if(3===t.tag){hc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Rl||!Rl.has(r))){t=Po(t,e=ls(t,e=rs(n,e),1),1),e=Wl(),null!==t&&(pt(t,1,e),Kl(t,e));break}}t=t.return}}function gc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=Wl(),e.pingedLanes|=e.suspendedLanes&n,bl===e&&(Ol&n)===n&&(4===Cl||3===Cl&&(130023424&Ol)===Ol&&500>Ge()-Al?nc(e,0):Pl|=n),Kl(e,t)}function vc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=st,0==(130023424&(st<<=1))&&(st=4194304)));var n=Wl();null!==(e=ko(e,t))&&(pt(e,t,n),Kl(e,n))}function mc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),vc(e,n)}function yc(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),vc(e,n)}function bc(e,t){return We(e,t)}function wc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Oc(e,t,n,r){return new wc(e,t,n,r)}function xc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function kc(e,t){var n=e.alternate;return null===n?((n=Oc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Cc(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)xc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case k:return Sc(n.children,i,a,t);case C:s=8,i|=8;break;case S:return(e=Oc(12,n,t,2|i)).elementType=S,e.lanes=a,e;case _:return(e=Oc(13,n,t,i)).elementType=_,e.lanes=a,e;case T:return(e=Oc(19,n,t,i)).elementType=T,e.lanes=a,e;case D:return jc(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case j:s=10;break e;case E:s=9;break e;case P:s=11;break e;case A:s=14;break e;case M:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Oc(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function Sc(e,t,n,r){return(e=Oc(7,e,r,t)).lanes=n,e}function jc(e,t,n,r){return(e=Oc(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Ec(e,t,n){return(e=Oc(6,e,null,t)).lanes=n,e}function Pc(e,t,n){return(t=Oc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function _c(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ht(0),this.expirationTimes=ht(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ht(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Tc(e,t,n,r,i,o,a,s,l){return e=new _c(e,t,n,s,l),1===t?(t=1,!0===o&&(t|=8)):t=0,o=Oc(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},So(o),e}function Ac(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:x,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Mc(e){if(!e)return wi;e:{if(Ve(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Si(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(Si(n))return Pi(e,n,t)}return t}function Dc(e,t,n,r,i,o,a,s,l){return(e=Tc(n,r,!0,e,0,o,0,s,l)).context=Mc(null),n=e.current,(o=Eo(r=Wl(),i=$l(n))).callback=null!=t?t:null,Po(n,o,i),e.current.lanes=i,pt(e,i,r),Kl(e,r),e}function Lc(e,t,n,r){var i=t.current,o=Wl(),a=$l(i);return n=Mc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Eo(o,a)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Po(i,t,a))&&(ql(e,i,a,o),_o(e,i,a)),a}function Nc(e){if(!(e=e.current).child)return null;switch(e.child.tag){case 5:default:return e.child.stateNode}}function Rc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Fc(e,t){Rc(e,t),(e=e.alternate)&&Rc(e,t)}hl=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||xi.current)hs=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return hs=!1,function(e,t,n){switch(t.tag){case 3:ks(t),ao();break;case 5:Zo(t);break;case 1:Si(t.type)&&_i(t);break;case 4:Xo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;bi(uo,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(bi(ta,1&ta.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ts(e,t,n):(bi(ta,1&ta.current),null!==(e=Fs(e,t,n))?e.sibling:null);bi(ta,1&ta.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Ns(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),bi(ta,ta.current),r)break;return null;case 22:case 23:return t.lanes=0,ys(e,t,n)}return Fs(e,t,n)}(e,t,n);hs=0!=(131072&e.flags)}else hs=!1,Xi&&0!=(1048576&t.flags)&&qi(t,zi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Rs(e,t),e=t.pendingProps;var i=Ci(t,Oi.current);yo(t,n),i=ma(null,t,r,e,i,n);var a=ya();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Si(r)?(a=!0,_i(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,So(t),i.updater=No,t.stateNode=i,i._reactInternals=t,zo(t,r,e,n),t=xs(null,t,r,!0,a,n)):(t.tag=0,Xi&&a&&Ki(t),ps(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Rs(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return xc(e)?1:0;if(null!=e){if((e=e.$$typeof)===P)return 11;if(e===A)return 14}return 2}(r),e=co(r,e),i){case 0:t=ws(null,t,r,e,n);break e;case 1:t=Os(null,t,r,e,n);break e;case 11:t=gs(null,t,r,e,n);break e;case 14:t=vs(null,t,r,co(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,ws(e,t,r,i=t.elementType===r?i:co(r,i),n);case 1:return r=t.type,i=t.pendingProps,Os(e,t,r,i=t.elementType===r?i:co(r,i),n);case 3:e:{if(ks(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,jo(e,t),Ao(t,r,null,n);var s=t.memoizedState;if(r=s.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Cs(e,t,r,n,i=rs(Error(o(423)),t));break e}if(r!==i){t=Cs(e,t,r,n,i=rs(Error(o(424)),t));break e}for(Ji=ni(t.stateNode.containerInfo.firstChild),Yi=t,Xi=!0,Qi=null,n=$o(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ao(),r===i){t=Fs(e,t,n);break e}ps(e,t,r,n)}t=t.child}return t;case 5:return Zo(t),null===e&&no(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,Yr(r,i)?s=null:null!==a&&Yr(r,a)&&(t.flags|=32),bs(e,t),ps(e,t,s,n),t.child;case 6:return null===e&&no(t),null;case 13:return Ts(e,t,n);case 4:return Xo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Wo(t,null,r,n):ps(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,gs(e,t,r,i=t.elementType===r?i:co(r,i),n);case 7:return ps(e,t,t.pendingProps,n),t.child;case 8:case 12:return ps(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,s=i.value,bi(uo,r._currentValue),r._currentValue=s,null!==a)if(tr(a.value,s)){if(a.children===i.children&&!xi.current){t=Fs(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=Eo(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var f=(u=u.shared).pending;null===f?c.next=c:(c.next=f.next,f.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),mo(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),mo(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}ps(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,yo(t,n),r=r(i=bo(i)),t.flags|=1,ps(e,t,r,n),t.child;case 14:return i=co(r=t.type,t.pendingProps),vs(e,t,r,i=co(r.type,i),n);case 15:return ms(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:co(r,i),Rs(e,t),t.tag=1,Si(r)?(e=!0,_i(t)):e=!1,yo(t,n),Fo(t,r,i),zo(t,r,i,n),xs(null,t,r,!0,e,n);case 19:return Ns(e,t,n);case 22:return ys(e,t,n)}throw Error(o(156,t.tag))};var Ic="function"==typeof reportError?reportError:function(e){console.error(e)};function zc(e){this._internalRoot=e}function Vc(e){this._internalRoot=e}function Bc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Uc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Hc(){}function Wc(e,t,n,r,i){var o=n._reactRootContainer;if(o){var a=o;if("function"==typeof i){var s=i;i=function(){var e=Nc(a);s.call(e)}}Lc(t,a,e,i)}else a=function(e,t,n,r,i){if(i){if("function"==typeof r){var o=r;r=function(){var e=Nc(a);o.call(e)}}var a=Dc(t,r,e,0,null,!1,0,"",Hc);return e._reactRootContainer=a,e[si]=a.current,Nr(8===e.nodeType?e.parentNode:e),ec(),a}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Nc(l);s.call(e)}}var l=Tc(e,0,!1,null,0,!1,0,"",Hc);return e._reactRootContainer=l,e[si]=l.current,Nr(8===e.nodeType?e.parentNode:e),ec((function(){Lc(t,l,n,r)})),l}(n,t,e,i,r);return Nc(a)}Vc.prototype.render=zc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(o(409));Lc(e,t,null,null)},Vc.prototype.unmount=zc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;ec((function(){Lc(null,e,null,null)})),t[si]=null}},Vc.prototype.unstable_scheduleHydration=function(e){if(e){var t=Ot();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Tt.length&&0!==t&&t<Tt[n].priority;n++);Tt.splice(n,0,e),0===n&&Lt(e)}},yt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=lt(t.pendingLanes);0!==n&&(gt(t,1|n),Kl(t,Ge()),0==(6&yl)&&(Ml=Ge()+500,Ni()))}break;case 13:ec((function(){var t=ko(e,1);if(null!==t){var n=Wl();ql(t,e,1,n)}})),Fc(e,1)}},bt=function(e){if(13===e.tag){var t=ko(e,134217728);if(null!==t)ql(t,e,134217728,Wl());Fc(e,134217728)}},wt=function(e){if(13===e.tag){var t=$l(e),n=ko(e,t);if(null!==n)ql(n,e,t,Wl());Fc(e,t)}},Ot=function(){return vt},xt=function(e,t){var n=vt;try{return vt=e,t()}finally{vt=n}},we=function(e,t,n){switch(t){case"input":if(X(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=pi(r);if(!i)throw Error(o(90));q(r),X(r,i)}}}break;case"textarea":ie(e,n);break;case"select":null!=(t=n.value)&&te(e,!!n.multiple,t,!1)}},je=Zl,Ee=ec;var $c={usingClientEntryPoint:!1,Events:[di,hi,pi,Ce,Se,Zl]},qc={findFiberByHostInstance:fi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},Kc={bundleType:qc.bundleType,version:qc.version,rendererPackageName:qc.rendererPackageName,rendererConfig:qc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:w.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=He(e))?null:e.stateNode},findFiberByHostInstance:qc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var Gc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Gc.isDisabled&&Gc.supportsFiber)try{tt=Gc.inject(Kc),nt=Gc}catch(e){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=$c,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Bc(t))throw Error(o(200));return Ac(e,t,null,n)},t.createRoot=function(e,t){if(!Bc(e))throw Error(o(299));var n=!1,r="",i=Ic;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Tc(e,1,!1,null,0,n,0,r,i),e[si]=t.current,Nr(8===e.nodeType?e.parentNode:e),new zc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return e=null===(e=He(t))?null:e.stateNode},t.flushSync=function(e){return ec(e)},t.hydrate=function(e,t,n){if(!Uc(t))throw Error(o(200));return Wc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Bc(e))throw Error(o(405));var r=null!=n&&n.hydratedSources||null,i=!1,a="",s=Ic;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(a=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Dc(t,null,e,1,null!=n?n:null,i,0,a,s),e[si]=t.current,Nr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Vc(t)},t.render=function(e,t,n){if(!Uc(t))throw Error(o(200));return Wc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Uc(e))throw Error(o(40));return!!e._reactRootContainer&&(ec((function(){Wc(null,null,e,!1,(function(){e._reactRootContainer=null,e[si]=null}))})),!0)},t.unstable_batchedUpdates=Zl,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Uc(n))throw Error(o(200));if(null==e||void 0===e._reactInternals)throw Error(o(38));return Wc(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},function(e,t,n){"use strict";1&&(e.exports=n(242))},function(e,t,n){"use strict";(function(e){function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<o(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,a=i>>>1;r<a;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>o(l,n))c<i&&0>o(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>o(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function o(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var a=performance;t.unstable_now=function(){return a.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],f=1,d=null,h=3,p=!1,g=!1,v=!1,m="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b=void 0!==e?e:null;function w(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function O(e){if(v=!1,w(e),!g)if(null!==r(c))g=!0,D(x);else{var t=r(u);null!==t&&L(O,t.startTime-e)}}function x(e,n){g=!1,v&&(v=!1,y(j),j=-1),p=!0;var o=h;try{for(w(n),d=r(c);null!==d&&(!(d.expirationTime>n)||e&&!_());){var a=d.callback;if("function"==typeof a){d.callback=null,h=d.priorityLevel;var s=a(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?d.callback=s:d===r(c)&&i(c),w(n)}else i(c);d=r(c)}if(null!==d)var l=!0;else{var f=r(u);null!==f&&L(O,f.startTime-n),l=!1}return l}finally{d=null,h=o,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var k,C=!1,S=null,j=-1,E=5,P=-1;function _(){return!(t.unstable_now()-P<E)}function T(){if(null!==S){var e=t.unstable_now();P=e;var n=!0;try{n=S(!0,e)}finally{n?k():(C=!1,S=null)}}else C=!1}if("function"==typeof b)k=function(){b(T)};else if("undefined"!=typeof MessageChannel){var A=new MessageChannel,M=A.port2;A.port1.onmessage=T,k=function(){M.postMessage(null)}}else k=function(){m(T,0)};function D(e){S=e,C||(C=!0,k())}function L(e,n){j=m((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){g||p||(g=!0,D(x))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return h},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(h){case 1:case 2:case 3:var t=3;break;default:t=h}var n=h;h=t;try{return e()}finally{h=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=h;h=e;try{return t()}finally{h=n}},t.unstable_scheduleCallback=function(e,i,o){var a=t.unstable_now();switch("object"==typeof o&&null!==o?o="number"==typeof(o=o.delay)&&0<o?a+o:a:o=a,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:f++,callback:i,priorityLevel:e,startTime:o,expirationTime:s=o+s,sortIndex:-1},o>a?(e.sortIndex=o,n(u,e),null===r(c)&&e===r(u)&&(v?(y(j),j=-1):v=!0,L(O,o-a))):(e.sortIndex=s,n(c,e),g||p||(g=!0,D(x))),e},t.unstable_shouldYield=_,t.unstable_wrapCallback=function(e){var t=h;return function(){var n=h;h=t;try{return e.apply(this,arguments)}finally{h=n}}}}).call(this,n(130).setImmediate)},function(e,t,n){"use strict";var r="function"==typeof Symbol&&Symbol.for,i=r?Symbol.for("react.element"):60103,o=r?Symbol.for("react.portal"):60106,a=r?Symbol.for("react.fragment"):60107,s=r?Symbol.for("react.strict_mode"):60108,l=r?Symbol.for("react.profiler"):60114,c=r?Symbol.for("react.provider"):60109,u=r?Symbol.for("react.context"):60110,f=r?Symbol.for("react.async_mode"):60111,d=r?Symbol.for("react.concurrent_mode"):60111,h=r?Symbol.for("react.forward_ref"):60112,p=r?Symbol.for("react.suspense"):60113,g=r?Symbol.for("react.suspense_list"):60120,v=r?Symbol.for("react.memo"):60115,m=r?Symbol.for("react.lazy"):60116,y=r?Symbol.for("react.block"):60121,b=r?Symbol.for("react.fundamental"):60117,w=r?Symbol.for("react.responder"):60118,O=r?Symbol.for("react.scope"):60119;function x(e){if("object"==typeof e&&null!==e){var t=e.$$typeof;switch(t){case i:switch(e=e.type){case f:case d:case a:case l:case s:case p:return e;default:switch(e=e&&e.$$typeof){case u:case h:case m:case v:case c:return e;default:return t}}case o:return t}}}function k(e){return x(e)===d}t.AsyncMode=f,t.ConcurrentMode=d,t.ContextConsumer=u,t.ContextProvider=c,t.Element=i,t.ForwardRef=h,t.Fragment=a,t.Lazy=m,t.Memo=v,t.Portal=o,t.Profiler=l,t.StrictMode=s,t.Suspense=p,t.isAsyncMode=function(e){return k(e)||x(e)===f},t.isConcurrentMode=k,t.isContextConsumer=function(e){return x(e)===u},t.isContextProvider=function(e){return x(e)===c},t.isElement=function(e){return"object"==typeof e&&null!==e&&e.$$typeof===i},t.isForwardRef=function(e){return x(e)===h},t.isFragment=function(e){return x(e)===a},t.isLazy=function(e){return x(e)===m},t.isMemo=function(e){return x(e)===v},t.isPortal=function(e){return x(e)===o},t.isProfiler=function(e){return x(e)===l},t.isStrictMode=function(e){return x(e)===s},t.isSuspense=function(e){return x(e)===p},t.isValidElementType=function(e){return"string"==typeof e||"function"==typeof e||e===a||e===d||e===l||e===s||e===p||e===g||"object"==typeof e&&null!==e&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===c||e.$$typeof===u||e.$$typeof===h||e.$$typeof===b||e.$$typeof===w||e.$$typeof===O||e.$$typeof===y)},t.typeOf=x},function(e,t,n){"use strict";n.r(t);var r=n(4),i=n(13);t["default"]=r["View"].extend({initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.items=[],this.opt=e;var t=e.config||{};this.level=e.level,this.config=t,this.preview=e.preview,this.ppfx=t.pStylePrefix||'',this.pfx=t.stylePrefix||'',this.parent=e.parent,this.parentView=e.parentView;var n=this.pfx,r=this.ppfx,o=this.parent,a=this.collection;this.listenTo(a,'add',this.addTo),this.listenTo(a,'reset resetNavigator',this.render),this.listenTo(a,'remove',this.removeChildren),this.className="".concat(n,"layers");var s=t.em;if(t.sortable&&!this.opt.sorter){var l=s.get('Utils');this.opt.sorter=new l.Sorter({container:t.sortContainer||this.el,containerSel:".".concat(this.className),itemSel:".".concat(n,"layer"),ignoreViewChildren:1,onEndMove:function(e,t,n){var r=t.getSourceModel();s.setSelected(r,{forceChange:1}),s.trigger("".concat(i["b"],":end"),n)},avoidSelectOnEnd:1,nested:1,ppfx:r,pfx:n})}this.sorter=this.opt.sorter||'',this.$el.data('collection',a),o&&this.$el.data('model',o)},removeChildren:function(e){var t=e.viewLayer;t&&(t.remove(),e.viewLayer=0)},addTo:function(e){var t=this.collection.indexOf(e);this.addToCollection(e,null,t)},addToCollection:function(e,t,n){var r=this.level,i=this.parentView,o=this.opt.ItemView,a=t||null,s=new o({ItemView:o,level:r,model:e,parentView:i,config:this.config,sorter:this.sorter,isCountable:this.isCountable,opened:this.opt.opened}),l=s.render().el;if(a)a.appendChild(l);else if(void 0!==n){var c='before';this.$el.children().length==n&&(n--,c='after'),n<0?this.$el.append(l):this.$el.children().eq(n)[c](l)}else this.$el.append(l);return this.items.push(s),l},remove:function(){r["View"].prototype.remove.apply(this,arguments),this.items.map((function(e){return e.remove()}))},isCountable:function(e,t){var n=e.get('type'),r=e.get('tagName');return!(('textnode'==n||'br'==r)&&t||!e.get('layerable'))},render:function(){var e=this,t=document.createDocumentFragment(),n=this.el;return n.innerHTML='',this.collection.each((function(n){return e.addToCollection(n,t)})),n.appendChild(t),n.className=this.className,this}})},function(e,t,n){var r={"./CanvasClear":132,"./CanvasClear.js":132,"./CanvasMove":133,"./CanvasMove.js":133,"./CommandAbstract":66,"./CommandAbstract.js":66,"./ComponentDelete":134,"./ComponentDelete.js":134,"./ComponentDrag":135,"./ComponentDrag.js":135,"./ComponentEnter":136,"./ComponentEnter.js":136,"./ComponentExit":137,"./ComponentExit.js":137,"./ComponentNext":138,"./ComponentNext.js":138,"./ComponentPrev":139,"./ComponentPrev.js":139,"./ComponentStyleClear":140,"./ComponentStyleClear.js":140,"./CopyComponent":141,"./CopyComponent.js":141,"./DeleteComponent":142,"./DeleteComponent.js":142,"./ExportTemplate":143,"./ExportTemplate.js":143,"./Fullscreen":144,"./Fullscreen.js":144,"./MoveComponent":145,"./MoveComponent.js":145,"./OpenAssets":146,"./OpenAssets.js":146,"./OpenBlocks":147,"./OpenBlocks.js":147,"./OpenLayers":148,"./OpenLayers.js":148,"./OpenStyleManager":149,"./OpenStyleManager.js":149,"./OpenTraitManager":150,"./OpenTraitManager.js":150,"./PasteComponent":151,"./PasteComponent.js":151,"./Preview":152,"./Preview.js":152,"./Resize":153,"./Resize.js":153,"./SelectComponent":49,"./SelectComponent.js":49,"./SelectPosition":76,"./SelectPosition.js":76,"./ShowOffset":154,"./ShowOffset.js":154,"./SwitchVisibility":155,"./SwitchVisibility.js":155};function i(e){var t=o(e);return n(t)}function o(e){if(!n.o(r,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code='MODULE_NOT_FOUND',t}return r[e]}i.keys=function(){return Object.keys(r)},i.resolve=o,e.exports=i,i.id=245},function(e,t,n){"use strict";n.r(t),n.d(t,"evAll",(function(){return Ui})),n.d(t,"evPfx",(function(){return Hi})),n.d(t,"evSelect",(function(){return Wi})),n.d(t,"evUpdate",(function(){return $i})),n.d(t,"evAdd",(function(){return qi})),n.d(t,"evRemove",(function(){return Ki})),n.d(t,"evRemoveBefore",(function(){return Gi})),n.d(t,"evCustom",(function(){return Yi})),n.d(t,"evOpen",(function(){return Ji})),n.d(t,"evClose",(function(){return Xi})),n.d(t,"evUpload",(function(){return Qi})),n.d(t,"evUploadStart",(function(){return Zi})),n.d(t,"evUploadEnd",(function(){return eo})),n.d(t,"evUploadError",(function(){return to})),n.d(t,"evUploadRes",(function(){return no}));var r=n(3),i=n.n(r),o=n(0),a=n(47),s={assets:[],noAssets:'',stylePrefix:'am-',upload:0,uploadName:'files',headers:{},params:{},credentials:'include',multiUpload:!0,autoAdd:!0,customFetch:null,uploadFile:null,embedAsBase64:!0,handleAdd:null,beforeUpload:null,showUrlInput:!0,custom:!1,dropzone:!1,openAssetsOnDrop:1,dropzoneContent:''},l=n(4),c=n.n(l),u=n(8),f=n.n(u),d=n(9),h=n.n(d),p=n(10),g=n.n(p),v=n(11),m=n.n(v),y=n(5),b=n.n(y);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var O=function(e){g()(n,e);var t=w(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"defaults",value:function(){return{type:'',src:''}}},{key:"getType",value:function(){return this.get('type')}},{key:"getSrc",value:function(){return this.get('src')}},{key:"getFilename",value:function(){return this.get('src').split('/').pop().split('?').shift()}},{key:"getExtension",value:function(){return this.getFilename().split('.').pop()}}]),n}(l["Model"]);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}O.prototype.idAttribute='src',O.getDefaults=function(){return Object(o["result"])(this.prototype,'defaults')};var S,j,E=function(e){g()(n,e);var t=C(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"defaults",value:function(){return k(k({},O.getDefaults()),{},{type:'image',unitDim:'px',height:0,width:0})}}]),n}(O),P=n(30),_=n.n(P),T=c.a.View.extend({initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e,this.collection=e.collection;var t=e.config||{};this.config=t,this.pfx=t.stylePrefix||'',this.ppfx=t.pStylePrefix||'',this.em=t.em,this.className=this.pfx+'asset',this.listenTo(this.model,'destroy remove',this.remove),this.model.view=this;var n=this.init&&this.init.bind(this);n&&n(e)},__getBhv:function(){var e=this.em,t=e&&e.get('AssetManager');return t&&t.__getBehaviour()||{}},template:function(){var e=this.pfx;return"\n      <div class=\"".concat(e,"preview-cont\">\n        ").concat(this.getPreview(),"\n      </div>\n      <div class=\"").concat(e,"meta\">\n        ").concat(this.getInfo(),"\n      </div>\n      <div class=\"").concat(e,"close\" data-toggle=\"asset-remove\">\n        &Cross;\n      </div>\n    ")},updateTarget:function(e){e&&e.set&&(e.set('attributes',Object(o["clone"])(e.get('attributes'))),e.set('src',this.model.get('src')))},getPreview:function(){return''},getInfo:function(){return''},render:function(){var e=this.el;return e.innerHTML=this.template(this,this.model),e.className=this.className,this}}),A=n(27),M=n(6),D=T.extend({events:{'click [data-toggle=asset-remove]':'onRemove',click:'onClick',dblclick:'onDblClick'},getPreview:function(){var e=this.pfx,t=this.ppfx,n=this.model.get('src');return Object(A["a"])(S||(S=_()(["\n      <div class=\"","preview\" style=\"background-image: url('","');\"></div>\n      <div class=\"","preview-bg ","checker-bg\"></div>\n    "])),e,n,e,t)},getInfo:function(){var e=this.pfx,t=this.model,n=t.get('name'),r=t.get('width'),i=t.get('height'),o=t.get('unitDim'),a=r&&i?"".concat(r,"x").concat(i).concat(o):'';return n=n||t.getFilename(),Object(A["a"])(j||(j=_()(["\n      <div class=\"","name\">","</div>\n      <div class=\"","dimensions\">","</div>\n    "])),e,n,e,a)},init:function(e){var t=this.pfx;this.className+=" ".concat(t,"asset-image")},onClick:function(){var e=this.model,t=this.pfx,n=this.__getBhv().select,r=this.config.onClick,i=this.collection;if(i.trigger('deselectAll'),this.$el.addClass(t+'highlight'),Object(o["isFunction"])(n)){n(e,!1);var a={},s={src:e.getSrc(),id:this.collection.target.ccid};a.opts=s,a.action='set-image-src',M["c"]==M["d"].Synced?(Object(M["h"])(M["d"].ApplyingLocalOp),Object(M["b"])(a)):M["c"]!=M["d"].AwaitingACK&&M["c"]!=M["d"].AwaitingWithBuffer||(Object(M["h"])(M["d"].ApplyingBufferedLocalOp),Object(M["a"])(a))}else Object(o["isFunction"])(r)?r(e):this.updateTarget(i.target)},onDblClick:function(){var e=this.em,t=this.model,n=this.__getBhv().select,r=this.config.onDblClick,i=this.collection,a=i.target,s=i.onSelect;Object(o["isFunction"])(n)?n(t,!0):Object(o["isFunction"])(r)?r(t):(this.updateTarget(a),e&&e.get('Modal').close()),Object(o["isFunction"])(s)&&s(t)},onRemove:function(e){e.stopImmediatePropagation(),this.model.collection.remove(this.model)}}),L=n(78),N=c.a.Collection.extend(L["a"]).extend({types:[{id:'image',model:E,view:D,isType:function(e){return'string'==typeof e?{type:'image',src:e}:e}}]}),R=n(34),F=n.n(R),I=n(15),z=n(19),V=n(7),B=n(2),U=n.n(B),H={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm193.5 301.7l-210.6 292a31.8 31.8 0 01-51.7 0L318.5 484.9c-3.8-5.3 0-12.7 6.5-12.7h46.9c10.2 0 19.9 4.9 25.9 13.3l71.2 98.8 157.2-218c6-8.3 15.6-13.3 25.9-13.3H699c6.5 0 10.3 7.4 6.5 12.7z"}}]},name:"check-circle",theme:"filled"},W=n(20),$=n(38),q=n(39),K=n.n(q),G=Object(B["createContext"])({}),Y=n(24);function J(e,t){(function(e){return'string'==typeof e&&-1!==e.indexOf('.')&&1===parseFloat(e)})(e)&&(e='100%');var n=function(e){return'string'==typeof e&&-1!==e.indexOf('%')}(e);return e=360===t?e:Math.min(t,Math.max(0,parseFloat(e))),n&&(e=parseInt(String(e*t),10)/100),Math.abs(e-t)<1e-6?1:e=360===t?(e<0?e%t+t:e%t)/parseFloat(String(t)):e%t/parseFloat(String(t))}function X(e){return Math.min(1,Math.max(0,e))}function Q(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function Z(e){return e<=1?"".concat(100*Number(e),"%"):e}function ee(e){return 1===e.length?'0'+e:String(e)}function te(e,t,n){e=J(e,255),t=J(t,255),n=J(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=0,s=(r+i)/2;if(r===i)a=0,o=0;else{var l=r-i;switch(a=s>.5?l/(2-r-i):l/(r+i),r){case e:o=(t-n)/l+(t<n?6:0);break;case t:o=(n-e)/l+2;break;case n:o=(e-t)/l+4}o/=6}return{h:o,s:a,l:s}}function ne(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*(6*n):n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function re(e,t,n){e=J(e,255),t=J(t,255),n=J(n,255);var r=Math.max(e,t,n),i=Math.min(e,t,n),o=0,a=r,s=r-i,l=0===r?0:s/r;if(r===i)o=0;else{switch(r){case e:o=(t-n)/s+(t<n?6:0);break;case t:o=(n-e)/s+2;break;case n:o=(e-t)/s+4}o/=6}return{h:o,s:l,v:a}}function ie(e,t,n,r){var i=[ee(Math.round(e).toString(16)),ee(Math.round(t).toString(16)),ee(Math.round(n).toString(16))];return r&&i[0].startsWith(i[0].charAt(1))&&i[1].startsWith(i[1].charAt(1))&&i[2].startsWith(i[2].charAt(1))?i[0].charAt(0)+i[1].charAt(0)+i[2].charAt(0):i.join('')}function oe(e){return Math.round(255*parseFloat(e)).toString(16)}function ae(e){return se(e)/255}function se(e){return parseInt(e,16)}var le={aliceblue:'#f0f8ff',antiquewhite:'#faebd7',aqua:'#00ffff',aquamarine:'#7fffd4',azure:'#f0ffff',beige:'#f5f5dc',bisque:'#ffe4c4',black:'#000000',blanchedalmond:'#ffebcd',blue:'#0000ff',blueviolet:'#8a2be2',brown:'#a52a2a',burlywood:'#deb887',cadetblue:'#5f9ea0',chartreuse:'#7fff00',chocolate:'#d2691e',coral:'#ff7f50',cornflowerblue:'#6495ed',cornsilk:'#fff8dc',crimson:'#dc143c',cyan:'#00ffff',darkblue:'#00008b',darkcyan:'#008b8b',darkgoldenrod:'#b8860b',darkgray:'#a9a9a9',darkgreen:'#006400',darkgrey:'#a9a9a9',darkkhaki:'#bdb76b',darkmagenta:'#8b008b',darkolivegreen:'#556b2f',darkorange:'#ff8c00',darkorchid:'#9932cc',darkred:'#8b0000',darksalmon:'#e9967a',darkseagreen:'#8fbc8f',darkslateblue:'#483d8b',darkslategray:'#2f4f4f',darkslategrey:'#2f4f4f',darkturquoise:'#00ced1',darkviolet:'#9400d3',deeppink:'#ff1493',deepskyblue:'#00bfff',dimgray:'#696969',dimgrey:'#696969',dodgerblue:'#1e90ff',firebrick:'#b22222',floralwhite:'#fffaf0',forestgreen:'#228b22',fuchsia:'#ff00ff',gainsboro:'#dcdcdc',ghostwhite:'#f8f8ff',goldenrod:'#daa520',gold:'#ffd700',gray:'#808080',green:'#008000',greenyellow:'#adff2f',grey:'#808080',honeydew:'#f0fff0',hotpink:'#ff69b4',indianred:'#cd5c5c',indigo:'#4b0082',ivory:'#fffff0',khaki:'#f0e68c',lavenderblush:'#fff0f5',lavender:'#e6e6fa',lawngreen:'#7cfc00',lemonchiffon:'#fffacd',lightblue:'#add8e6',lightcoral:'#f08080',lightcyan:'#e0ffff',lightgoldenrodyellow:'#fafad2',lightgray:'#d3d3d3',lightgreen:'#90ee90',lightgrey:'#d3d3d3',lightpink:'#ffb6c1',lightsalmon:'#ffa07a',lightseagreen:'#20b2aa',lightskyblue:'#87cefa',lightslategray:'#778899',lightslategrey:'#778899',lightsteelblue:'#b0c4de',lightyellow:'#ffffe0',lime:'#00ff00',limegreen:'#32cd32',linen:'#faf0e6',magenta:'#ff00ff',maroon:'#800000',mediumaquamarine:'#66cdaa',mediumblue:'#0000cd',mediumorchid:'#ba55d3',mediumpurple:'#9370db',mediumseagreen:'#3cb371',mediumslateblue:'#7b68ee',mediumspringgreen:'#00fa9a',mediumturquoise:'#48d1cc',mediumvioletred:'#c71585',midnightblue:'#191970',mintcream:'#f5fffa',mistyrose:'#ffe4e1',moccasin:'#ffe4b5',navajowhite:'#ffdead',navy:'#000080',oldlace:'#fdf5e6',olive:'#808000',olivedrab:'#6b8e23',orange:'#ffa500',orangered:'#ff4500',orchid:'#da70d6',palegoldenrod:'#eee8aa',palegreen:'#98fb98',paleturquoise:'#afeeee',palevioletred:'#db7093',papayawhip:'#ffefd5',peachpuff:'#ffdab9',peru:'#cd853f',pink:'#ffc0cb',plum:'#dda0dd',powderblue:'#b0e0e6',purple:'#800080',rebeccapurple:'#663399',red:'#ff0000',rosybrown:'#bc8f8f',royalblue:'#4169e1',saddlebrown:'#8b4513',salmon:'#fa8072',sandybrown:'#f4a460',seagreen:'#2e8b57',seashell:'#fff5ee',sienna:'#a0522d',silver:'#c0c0c0',skyblue:'#87ceeb',slateblue:'#6a5acd',slategray:'#708090',slategrey:'#708090',snow:'#fffafa',springgreen:'#00ff7f',steelblue:'#4682b4',tan:'#d2b48c',teal:'#008080',thistle:'#d8bfd8',tomato:'#ff6347',turquoise:'#40e0d0',violet:'#ee82ee',wheat:'#f5deb3',white:'#ffffff',whitesmoke:'#f5f5f5',yellow:'#ffff00',yellowgreen:'#9acd32'};function ce(e){var t,n,r,i={r:0,g:0,b:0},o=1,a=null,s=null,l=null,c=!1,u=!1;return'string'==typeof e&&(e=function(e){if(0===(e=e.trim().toLowerCase()).length)return!1;var t=!1;if(le[e])e=le[e],t=!0;else if('transparent'===e)return{r:0,g:0,b:0,a:0,format:'name'};var n=he.rgb.exec(e);if(n)return{r:n[1],g:n[2],b:n[3]};if(n=he.rgba.exec(e))return{r:n[1],g:n[2],b:n[3],a:n[4]};if(n=he.hsl.exec(e))return{h:n[1],s:n[2],l:n[3]};if(n=he.hsla.exec(e))return{h:n[1],s:n[2],l:n[3],a:n[4]};if(n=he.hsv.exec(e))return{h:n[1],s:n[2],v:n[3]};if(n=he.hsva.exec(e))return{h:n[1],s:n[2],v:n[3],a:n[4]};if(n=he.hex8.exec(e))return{r:se(n[1]),g:se(n[2]),b:se(n[3]),a:ae(n[4]),format:t?'name':'hex8'};if(n=he.hex6.exec(e))return{r:se(n[1]),g:se(n[2]),b:se(n[3]),format:t?'name':'hex'};if(n=he.hex4.exec(e))return{r:se(n[1]+n[1]),g:se(n[2]+n[2]),b:se(n[3]+n[3]),a:ae(n[4]+n[4]),format:t?'name':'hex8'};if(n=he.hex3.exec(e))return{r:se(n[1]+n[1]),g:se(n[2]+n[2]),b:se(n[3]+n[3]),format:t?'name':'hex'};return!1}(e)),'object'==typeof e&&(pe(e.r)&&pe(e.g)&&pe(e.b)?(t=e.r,n=e.g,r=e.b,i={r:255*J(t,255),g:255*J(n,255),b:255*J(r,255)},c=!0,u='%'===String(e.r).substr(-1)?'prgb':'rgb'):pe(e.h)&&pe(e.s)&&pe(e.v)?(a=Z(e.s),s=Z(e.v),i=function(e,t,n){e=6*J(e,360),t=J(t,100),n=J(n,100);var r=Math.floor(e),i=e-r,o=n*(1-t),a=n*(1-i*t),s=n*(1-(1-i)*t),l=r%6;return{r:255*[n,a,o,o,s,n][l],g:255*[s,n,n,a,o,o][l],b:255*[o,o,s,n,n,a][l]}}(e.h,a,s),c=!0,u='hsv'):pe(e.h)&&pe(e.s)&&pe(e.l)&&(a=Z(e.s),l=Z(e.l),i=function(e,t,n){var r,i,o;if(e=J(e,360),t=J(t,100),n=J(n,100),0===t)i=n,o=n,r=n;else{var a=n<.5?n*(1+t):n+t-n*t,s=2*n-a;r=ne(s,a,e+1/3),i=ne(s,a,e),o=ne(s,a,e-1/3)}return{r:255*r,g:255*i,b:255*o}}(e.h,a,l),c=!0,u='hsl'),Object.prototype.hasOwnProperty.call(e,'a')&&(o=e.a)),o=Q(o),{ok:c,format:e.format||u,r:Math.min(255,Math.max(i.r,0)),g:Math.min(255,Math.max(i.g,0)),b:Math.min(255,Math.max(i.b,0)),a:o}}var ue="(?:".concat('[-\\+]?\\d*\\.\\d+%?',")|(?:").concat('[-\\+]?\\d+%?',")"),fe="[\\s|\\(]+(".concat(ue,")[,|\\s]+(").concat(ue,")[,|\\s]+(").concat(ue,")\\s*\\)?"),de="[\\s|\\(]+(".concat(ue,")[,|\\s]+(").concat(ue,")[,|\\s]+(").concat(ue,")[,|\\s]+(").concat(ue,")\\s*\\)?"),he={CSS_UNIT:new RegExp(ue),rgb:new RegExp('rgb'+fe),rgba:new RegExp('rgba'+de),hsl:new RegExp('hsl'+fe),hsla:new RegExp('hsla'+de),hsv:new RegExp('hsv'+fe),hsva:new RegExp('hsva'+de),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/};function pe(e){return Boolean(he.CSS_UNIT.exec(String(e)))}var ge=2,ve=.16,me=.05,ye=.05,be=.15,we=5,Oe=4,xe=[{index:7,opacity:.15},{index:6,opacity:.25},{index:5,opacity:.3},{index:5,opacity:.45},{index:5,opacity:.65},{index:5,opacity:.85},{index:4,opacity:.9},{index:3,opacity:.95},{index:2,opacity:.97},{index:1,opacity:.98}];function ke(e){var t=re(e.r,e.g,e.b);return{h:360*t.h,s:t.s,v:t.v}}function Ce(e){var t=e.r,n=e.g,r=e.b;return"#".concat(ie(t,n,r,!1))}function Se(e,t,n){var r=n/100;return{r:(t.r-e.r)*r+e.r,g:(t.g-e.g)*r+e.g,b:(t.b-e.b)*r+e.b}}function je(e,t,n){var r;return(r=Math.round(e.h)>=60&&Math.round(e.h)<=240?n?Math.round(e.h)-ge*t:Math.round(e.h)+ge*t:n?Math.round(e.h)+ge*t:Math.round(e.h)-ge*t)<0?r+=360:r>=360&&(r-=360),r}function Ee(e,t,n){return 0===e.h&&0===e.s?e.s:((r=n?e.s-ve*t:t===Oe?e.s+ve:e.s+me*t)>1&&(r=1),n&&t===we&&r>.1&&(r=.1),r<.06&&(r=.06),Number(r.toFixed(2)));var r}function Pe(e,t,n){var r;return(r=n?e.v+ye*t:e.v-be*t)>1&&(r=1),Number(r.toFixed(2))}function _e(e){for(var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=[],r=ce(e),i=we;i>0;i-=1){var o=ke(r),a=Ce(ce({h:je(o,i,!0),s:Ee(o,i,!0),v:Pe(o,i,!0)}));n.push(a)}n.push(Ce(r));for(var s=1;s<=Oe;s+=1){var l=ke(r),c=Ce(ce({h:je(l,s),s:Ee(l,s),v:Pe(l,s)}));n.push(c)}return'dark'===t.theme?xe.map((function(e){var r=e.index,i=e.opacity;return Ce(Se(ce(t.backgroundColor||'#141414'),ce(n[r]),100*i))})):n}var Te={red:'#F5222D',volcano:'#FA541C',orange:'#FA8C16',gold:'#FAAD14',yellow:'#FADB14',lime:'#A0D911',green:'#52C41A',cyan:'#13C2C2',blue:'#1890FF',geekblue:'#2F54EB',purple:'#722ED1',magenta:'#EB2F96',grey:'#666666'},Ae={},Me={};Object.keys(Te).forEach((function(e){Ae[e]=_e(Te[e]),Ae[e].primary=Ae[e][5],Me[e]=_e(Te[e],{theme:'dark',backgroundColor:'#141414'}),Me[e].primary=Me[e][5]}));Ae.red,Ae.volcano,Ae.gold,Ae.orange,Ae.yellow,Ae.lime,Ae.green,Ae.cyan,Ae.blue,Ae.geekblue,Ae.purple,Ae.magenta,Ae.grey;var De=n(35),Le=n(48),Ne='data-rc-order',Re="rc-util-key",Fe=new Map;function Ie(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.mark;return t?t.startsWith('data-')?t:"data-".concat(t):Re}function ze(e){return e.attachTo?e.attachTo:document.querySelector('head')||document.body}function Ve(e){return'queue'===e?'prependQueue':e?'prepend':'append'}function Be(e){return Array.from((Fe.get(e)||e).children).filter((function(e){return'STYLE'===e.tagName}))}function Ue(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!Object(Le["a"])())return null;var n=t.csp,r=t.prepend,i=document.createElement('style');i.setAttribute(Ne,Ve(r)),(null==n?void 0:n.nonce)&&(i.nonce=null==n?void 0:n.nonce),i.innerHTML=e;var o=ze(t),a=o.firstChild;if(r){if('queue'===r){var s=Be(o).filter((function(e){return['prepend','prependQueue'].includes(e.getAttribute(Ne))}));if(s.length)return o.insertBefore(i,s[s.length-1].nextSibling),i}o.insertBefore(i,a)}else o.appendChild(i);return i}function He(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=ze(t);return Be(n).find((function(n){return n.getAttribute(Ie(t))===e}))}function We(e,t){var n=Fe.get(e);if(!n||!document.contains(n)){var r=Ue('',t),i=r.parentNode;Fe.set(e,i),i.removeChild(r)}}function $e(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=ze(n);We(r,n);var i=He(t,n);if(i){var o,a,s;if((null===(o=n.csp)||void 0===o?void 0:o.nonce)&&i.nonce!==(null===(a=n.csp)||void 0===a?void 0:a.nonce))i.nonce=null===(s=n.csp)||void 0===s?void 0:s.nonce;return i.innerHTML!==e&&(i.innerHTML=e),i}var l=Ue(e,n);return l.setAttribute(Ie(n),t),l}function qe(e){return'object'===Object(Y["a"])(e)&&'string'==typeof e.name&&'string'==typeof e.theme&&('object'===Object(Y["a"])(e.icon)||'function'==typeof e.icon)}function Ke(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).reduce((function(t,n){var r=e[n];switch(n){case'class':t.className=r,delete t.class;break;default:t[n]=r}return t}),{})}function Ge(e){return _e(e)[0]}function Ye(e){return e?Array.isArray(e)?e:[e]:[]}var Je="\n.anticon {\n  display: inline-block;\n  color: inherit;\n  font-style: normal;\n  line-height: 0;\n  text-align: center;\n  text-transform: none;\n  vertical-align: -0.125em;\n  text-rendering: optimizeLegibility;\n  -webkit-font-smoothing: antialiased;\n  -moz-osx-font-smoothing: grayscale;\n}\n\n.anticon > * {\n  line-height: 1;\n}\n\n.anticon svg {\n  display: inline-block;\n}\n\n.anticon::before {\n  display: none;\n}\n\n.anticon .anticon-icon {\n  display: block;\n}\n\n.anticon[tabindex] {\n  cursor: pointer;\n}\n\n.anticon-spin::before,\n.anticon-spin {\n  display: inline-block;\n  -webkit-animation: loadingCircle 1s infinite linear;\n  animation: loadingCircle 1s infinite linear;\n}\n\n@-webkit-keyframes loadingCircle {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}\n\n@keyframes loadingCircle {\n  100% {\n    -webkit-transform: rotate(360deg);\n    transform: rotate(360deg);\n  }\n}\n",Xe=["icon","className","onClick","style","primaryColor","secondaryColor"],Qe={primaryColor:'#333',secondaryColor:'#E6E6E6',calculated:!1};var Ze=function(e){var t,n,r=e.icon,i=e.className,o=e.onClick,a=e.style,s=e.primaryColor,l=e.secondaryColor,c=Object($["a"])(e,Xe),u=Qe;if(s&&(u={primaryColor:s,secondaryColor:l||Ge(s)}),function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:Je,t=Object(B["useContext"])(G),n=t.csp;Object(B["useEffect"])((function(){$e(e,'@ant-design-icons',{prepend:!0,csp:n})}),[])}(),t=qe(r),n="icon should be icon definiton, but got ".concat(r),Object(De["a"])(t,"[@ant-design/icons] ".concat(n)),!qe(r))return null;var f=r;return f&&'function'==typeof f.icon&&(f=Object(V["a"])(Object(V["a"])({},f),{},{icon:f.icon(u.primaryColor,u.secondaryColor)})),function e(t,n,r){return r?U.a.createElement(t.tag,Object(V["a"])(Object(V["a"])({key:n},Ke(t.attrs)),r),(t.children||[]).map((function(r,i){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(i))}))):U.a.createElement(t.tag,Object(V["a"])({key:n},Ke(t.attrs)),(t.children||[]).map((function(r,i){return e(r,"".concat(n,"-").concat(t.tag,"-").concat(i))})))}(f.icon,"svg-".concat(f.name),Object(V["a"])({className:i,onClick:o,style:a,'data-icon':f.name,width:'1em',height:'1em',fill:'currentColor','aria-hidden':'true'},c))};Ze.displayName='IconReact',Ze.getTwoToneColors=function(){return Object(V["a"])({},Qe)},Ze.setTwoToneColors=function(e){var t=e.primaryColor,n=e.secondaryColor;Qe.primaryColor=t,Qe.secondaryColor=n||Ge(t),Qe.calculated=!!n};var et=Ze;function tt(e){var t=Ye(e),n=Object(W["a"])(t,2),r=n[0],i=n[1];return et.setTwoToneColors({primaryColor:r,secondaryColor:i})}var nt=["className","icon","spin","rotate","tabIndex","onClick","twoToneColor"];tt('#1890ff');var rt=B["forwardRef"]((function(e,t){var n,r=e.className,i=e.icon,o=e.spin,a=e.rotate,s=e.tabIndex,l=e.onClick,c=e.twoToneColor,u=Object($["a"])(e,nt),f=B["useContext"](G).prefixCls,d=void 0===f?'anticon':f,h=K()(d,(n={},Object(z["a"])(n,"".concat(d,"-").concat(i.name),!!i.name),Object(z["a"])(n,"".concat(d,"-spin"),!!o||'loading'===i.name),n),r),p=s;void 0===p&&l&&(p=-1);var g=a?{msTransform:"rotate(".concat(a,"deg)"),transform:"rotate(".concat(a,"deg)")}:void 0,v=Ye(c),m=Object(W["a"])(v,2),y=m[0],b=m[1];return B["createElement"]("span",Object(V["a"])(Object(V["a"])({role:"img","aria-label":i.name},u),{},{ref:t,tabIndex:p,onClick:l,className:h}),B["createElement"](et,{icon:i,primaryColor:y,secondaryColor:b,style:g}))}));rt.displayName='AntdIcon',rt.getTwoToneColor=function(){var e=et.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor},rt.setTwoToneColor=tt;var it=rt,ot=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:H}))};ot.displayName='CheckCircleFilled';var at=B["forwardRef"](ot),st={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm165.4 618.2l-66-.3L512 563.4l-99.3 118.4-66.1.3c-4.4 0-8-3.5-8-8 0-1.9.7-3.7 1.9-5.2l130.1-155L340.5 359a8.32 8.32 0 01-1.9-5.2c0-4.4 3.6-8 8-8l66.1.3L512 464.6l99.3-118.4 66-.3c4.4 0 8 3.5 8 8 0 1.9-.7 3.7-1.9 5.2L553.5 514l130 155c1.2 1.5 1.9 3.3 1.9 5.2 0 4.4-3.6 8-8 8z"}}]},name:"close-circle",theme:"filled"},lt=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:st}))};lt.displayName='CloseCircleFilled';var ct=B["forwardRef"](lt),ut={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm-32 232c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V296zm32 440a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"exclamation-circle",theme:"filled"},ft=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:ut}))};ft.displayName='ExclamationCircleFilled';var dt=B["forwardRef"](ft),ht={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z"}}]},name:"info-circle",theme:"filled"},pt=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:ht}))};pt.displayName='InfoCircleFilled';var gt=B["forwardRef"](pt),vt={icon:{tag:"svg",attrs:{viewBox:"0 0 1024 1024",focusable:"false"},children:[{tag:"path",attrs:{d:"M988 548c-19.9 0-36-16.1-36-36 0-59.4-11.6-117-34.6-171.3a440.45 440.45 0 00-94.3-139.9 437.71 437.71 0 00-139.9-94.3C629 83.6 571.4 72 512 72c-19.9 0-36-16.1-36-36s16.1-36 36-36c69.1 0 136.2 13.5 199.3 40.3C772.3 66 827 103 874 150c47 47 83.9 101.8 109.7 162.7 26.7 63.1 40.2 130.2 40.2 199.3.1 19.9-16 36-35.9 36z"}}]},name:"loading",theme:"outlined"},mt=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:vt}))};mt.displayName='LoadingOutlined';var yt,bt=B["forwardRef"](mt),wt=n(28),Ot=n(29),xt=n(42),kt=n(41),Ct=n(33),St=n(55),jt=n(63),Et=n.n(jt),Pt=Object(V["a"])({},jt),_t=Pt.version,Tt=Pt.render,At=Pt.unmountComponentAtNode;try{Number((_t||'').split('.')[0])>=18&&(yt=Pt.createRoot)}catch(e){}function Mt(e){var t=Pt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;t&&'object'===Object(Y["a"])(t)&&(t.usingClientEntryPoint=e)}var Dt='__rc_react_root__';function Lt(e,t){yt?function(e,t){Mt(!0);var n=t[Dt]||yt(t);Mt(!1),n.render(e),t[Dt]=n}(e,t):function(e,t){Tt(e,t)}(e,t)}function Nt(e){return Rt.apply(this,arguments)}function Rt(){return(Rt=Object(St["a"])(Object(Ct["a"])().mark((function e(t){return Object(Ct["a"])().wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.resolve().then((function(){var e;null===(e=t[Dt])||void 0===e||e.unmount(),delete t[Dt]})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function Ft(e){At(e)}function It(){return(It=Object(St["a"])(Object(Ct["a"])().mark((function e(t){return Object(Ct["a"])().wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:if(void 0===yt){e.next=2;break}return e.abrupt("return",Nt(t));case 2:Ft(t);case 3:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var zt=n(165),Vt=function(e){Object(xt["a"])(n,e);var t=Object(kt["a"])(n);function n(){var e;Object(wt["a"])(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).closeTimer=null,e.close=function(t){t&&t.stopPropagation(),e.clearCloseTimer();var n=e.props,r=n.onClose,i=n.noticeKey;r&&r(i)},e.startCloseTimer=function(){e.props.duration&&(e.closeTimer=window.setTimeout((function(){e.close()}),1e3*e.props.duration))},e.clearCloseTimer=function(){e.closeTimer&&(clearTimeout(e.closeTimer),e.closeTimer=null)},e}return Object(Ot["a"])(n,[{key:"componentDidMount",value:function(){this.startCloseTimer()}},{key:"componentDidUpdate",value:function(e){(this.props.duration!==e.duration||this.props.updateMark!==e.updateMark||this.props.visible!==e.visible&&this.props.visible)&&this.restartCloseTimer()}},{key:"componentWillUnmount",value:function(){this.clearCloseTimer()}},{key:"restartCloseTimer",value:function(){this.clearCloseTimer(),this.startCloseTimer()}},{key:"render",value:function(){var e=this,t=this.props,n=t.prefixCls,r=t.className,i=t.closable,o=t.closeIcon,a=t.style,s=t.onClick,l=t.children,c=t.holder,u="".concat(n,"-notice"),f=Object.keys(this.props).reduce((function(t,n){return'data-'!==n.substr(0,5)&&'aria-'!==n.substr(0,5)&&'role'!==n||(t[n]=e.props[n]),t}),{}),d=B["createElement"]("div",Object(I["a"])({className:K()(u,r,Object(z["a"])({},"".concat(u,"-closable"),i)),style:a,onMouseEnter:this.clearCloseTimer,onMouseLeave:this.startCloseTimer,onClick:s},f),B["createElement"]("div",{className:"".concat(u,"-content")},l),i?B["createElement"]("a",{tabIndex:0,onClick:this.close,className:"".concat(u,"-close")},o||B["createElement"]("span",{className:"".concat(u,"-close-x")})):null);return c?Et.a.createPortal(d,c):d}}]),n}(B["Component"]);Vt.defaultProps={onClose:function(){},duration:1.5};var Bt=n(16);function Ut(e){var t=B["useRef"]({}),n=B["useState"]([]),r=Object(W["a"])(n,2),i=r[0],o=r[1];return[function(n){var r=!0;e.add(n,(function(e,n){var i=n.key;if(e&&(!t.current[i]||r)){var a=B["createElement"](Vt,Object(I["a"])({},n,{holder:e}));t.current[i]=a,o((function(e){var t=e.findIndex((function(e){return e.key===n.key}));if(-1===t)return[].concat(Object(Bt["a"])(e),[a]);var r=Object(Bt["a"])(e);return r[t]=a,r}))}r=!1}))},B["createElement"](B["Fragment"],null,i)]}var Ht=["getContainer"],Wt=0,$t=Date.now();function qt(){var e=Wt;return Wt+=1,"rcNotification_".concat($t,"_").concat(e)}var Kt=function(e){Object(xt["a"])(n,e);var t=Object(kt["a"])(n);function n(){var e;Object(wt["a"])(this,n);for(var r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(e=t.call.apply(t,[this].concat(i))).state={notices:[]},e.hookRefs=new Map,e.add=function(t,n){var r=t.key||qt(),i=Object(V["a"])(Object(V["a"])({},t),{},{key:r}),o=e.props.maxCount;e.setState((function(e){var t=e.notices,a=t.map((function(e){return e.notice.key})).indexOf(r),s=t.concat();return-1!==a?s.splice(a,1,{notice:i,holderCallback:n}):(o&&t.length>=o&&(i.key=s[0].notice.key,i.updateMark=qt(),i.userPassKey=r,s.shift()),s.push({notice:i,holderCallback:n})),{notices:s}}))},e.remove=function(t){e.setState((function(e){return{notices:e.notices.filter((function(e){var n=e.notice,r=n.key;return(n.userPassKey||r)!==t}))}}))},e.noticePropsMap={},e}return Object(Ot["a"])(n,[{key:"getTransitionName",value:function(){var e=this.props,t=e.prefixCls,n=e.animation,r=this.props.transitionName;return!r&&n&&(r="".concat(t,"-").concat(n)),r}},{key:"render",value:function(){var e=this,t=this.state.notices,n=this.props,r=n.prefixCls,i=n.className,o=n.closeIcon,a=n.style,s=[];return t.forEach((function(n,i){var a=n.notice,l=n.holderCallback,c=i===t.length-1?a.updateMark:void 0,u=a.key,f=a.userPassKey,d=Object(V["a"])(Object(V["a"])(Object(V["a"])({prefixCls:r,closeIcon:o},a),a.props),{},{key:u,noticeKey:f||u,updateMark:c,onClose:function(t){var n;e.remove(t),null===(n=a.onClose)||void 0===n||n.call(a)},onClick:a.onClick,children:a.content});s.push(u),e.noticePropsMap[u]={props:d,holderCallback:l}})),B["createElement"]("div",{className:K()(r,i),style:a},B["createElement"](zt["a"],{keys:s,motionName:this.getTransitionName(),onVisibleChanged:function(t,n){var r=n.key;t||delete e.noticePropsMap[r]}},(function(t){var n=t.key,i=t.className,o=t.style,a=t.visible,s=e.noticePropsMap[n],l=s.props,c=s.holderCallback;return c?B["createElement"]("div",{key:n,className:K()(i,"".concat(r,"-hook-holder")),style:Object(V["a"])({},o),ref:function(t){void 0!==n&&(t?(e.hookRefs.set(n,t),c(t,l)):e.hookRefs.delete(n))}}):B["createElement"](Vt,Object(I["a"])({},l,{className:K()(i,null==l?void 0:l.className),style:Object(V["a"])(Object(V["a"])({},o),null==l?void 0:l.style),visible:a}))})))}}]),n}(B["Component"]);Kt.newInstance=void 0,Kt.defaultProps={prefixCls:'rc-notification',animation:'fade',style:{top:65,left:'50%'}},Kt.newInstance=function(e,t){var n=e||{},r=n.getContainer,i=Object($["a"])(n,Ht),o=document.createElement('div');r?r().appendChild(o):document.body.appendChild(o);var a=!1;Lt(B["createElement"](Kt,Object(I["a"])({},i,{ref:function(e){a||(a=!0,t({notice:function(t){e.add(t)},removeNotice:function(t){e.remove(t)},component:e,destroy:function(){!function(e){It.apply(this,arguments)}(o),o.parentNode&&o.parentNode.removeChild(o)},useNotification:function(){return Ut(e)}}))}})),o)};var Gt=Kt,Yt=n(81),Jt=n(162),Xt='RC_FORM_INTERNAL_HOOKS',Qt=function(){Object(De["a"])(!1,'Can not find FormContext. Please make sure you wrap Field under Form.')},Zt=B["createContext"]({getFieldValue:Qt,getFieldsValue:Qt,getFieldError:Qt,getFieldWarning:Qt,getFieldsError:Qt,isFieldsTouched:Qt,isFieldTouched:Qt,isFieldValidating:Qt,isFieldsValidating:Qt,resetFields:Qt,setFields:Qt,setFieldValue:Qt,setFieldsValue:Qt,validateFields:Qt,submit:Qt,getInternalHooks:function(){return Qt(),{dispatch:Qt,initEntityValue:Qt,registerField:Qt,useSubscribe:Qt,setInitialValues:Qt,destroyForm:Qt,setCallbacks:Qt,registerWatch:Qt,getFields:Qt,setValidateMessages:Qt,setPreserve:Qt,getInitialValue:Qt}}});function en(e){return null==e?[]:Array.isArray(e)?e:[e]}var tn=n(164),nn="'${name}' is not a valid ${type}",rn={default:"Validation error on field '${name}'",required:"'${name}' is required",enum:"'${name}' must be one of [${enum}]",whitespace:"'${name}' cannot be empty",date:{format:"'${name}' is invalid for format date",parse:"'${name}' could not be parsed as date",invalid:"'${name}' is invalid date"},types:{string:nn,method:nn,array:nn,object:nn,number:nn,date:nn,boolean:nn,integer:nn,float:nn,regexp:nn,email:nn,url:nn,hex:nn},string:{len:"'${name}' must be exactly ${len} characters",min:"'${name}' must be at least ${min} characters",max:"'${name}' cannot be longer than ${max} characters",range:"'${name}' must be between ${min} and ${max} characters"},number:{len:"'${name}' must equal ${len}",min:"'${name}' cannot be less than ${min}",max:"'${name}' cannot be greater than ${max}",range:"'${name}' must be between ${min} and ${max}"},array:{len:"'${name}' must be exactly ${len} in length",min:"'${name}' cannot be less than ${min} in length",max:"'${name}' cannot be greater than ${max} in length",range:"'${name}' must be between ${min} and ${max} in length"},pattern:{mismatch:"'${name}' does not match pattern ${pattern}"}};function on(e,t){for(var n=e,r=0;r<t.length;r+=1){if(null==n)return;n=n[t[r]]}return n}var an=n(163);function sn(e,t,n,r){if(!t.length)return n;var i,o=Object(an["a"])(t),a=o[0],s=o.slice(1);return i=e||'number'!=typeof a?Array.isArray(e)?Object(Bt["a"])(e):Object(V["a"])({},e):[],r&&void 0===n&&1===s.length?delete i[a][s[0]]:i[a]=sn(i[a],s,n,r),i}function ln(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return t.length&&r&&void 0===n&&!on(e,t.slice(0,-1))?e:sn(e,t,n,r)}function cn(e){return Array.isArray(e)?function(e){return e.map((function(e){return cn(e)}))}(e):'object'===Object(Y["a"])(e)&&null!==e?function(e){if(Object.getPrototypeOf(e)===Object.prototype){var t={};for(var n in e)t[n]=cn(e[n]);return t}return e}(e):e}var un=cn;function fn(e){return en(e)}function dn(e,t){return on(e,t)}function hn(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]&&arguments[3],i=ln(e,t,n,r);return i}function pn(e,t){var n={};return t.forEach((function(t){var r=dn(e,t);n=hn(n,t,r)})),n}function gn(e,t){return e&&e.some((function(e){return bn(e,t)}))}function vn(e){return'object'===Object(Y["a"])(e)&&null!==e&&Object.getPrototypeOf(e)===Object.prototype}function mn(e,t){var n=Array.isArray(e)?Object(Bt["a"])(e):Object(V["a"])({},e);return t?(Object.keys(t).forEach((function(e){var r=n[e],i=t[e],o=vn(r)&&vn(i);n[e]=o?mn(r,i||{}):un(i)})),n):n}function yn(e){for(var t=arguments.length,n=new Array(t>1?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce((function(e,t){return mn(e,t)}),e)}function bn(e,t){return!(!e||!t||e.length!==t.length)&&e.every((function(e,n){return t[n]===e}))}function wn(e){var t=arguments.length<=1?void 0:arguments[1];return t&&t.target&&'object'===Object(Y["a"])(t.target)&&e in t.target?t.target[e]:t}function On(e,t,n){var r=e.length;if(t<0||t>=r||n<0||n>=r)return e;var i=e[t],o=t-n;return o>0?[].concat(Object(Bt["a"])(e.slice(0,n)),[i],Object(Bt["a"])(e.slice(n,t)),Object(Bt["a"])(e.slice(t+1,r))):o<0?[].concat(Object(Bt["a"])(e.slice(0,t)),Object(Bt["a"])(e.slice(t+1,n+1)),[i],Object(Bt["a"])(e.slice(n+1,r))):e}var xn=tn["a"];function kn(e,t){return e.replace(/\$\{\w+\}/g,(function(e){var n=e.slice(2,-1);return t[n]}))}var Cn='CODE_LOGIC_ERROR';function Sn(e,t,n,r,i){return jn.apply(this,arguments)}function jn(){return(jn=Object(St["a"])(Object(Ct["a"])().mark((function e(t,n,r,i,o){var a,s,l,c,u,f,d,h,p;return Object(Ct["a"])().wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:return delete(a=Object(V["a"])({},r)).ruleIndex,a.validator&&(s=a.validator,a.validator=function(){try{return s.apply(void 0,arguments)}catch(e){return console.error(e),Promise.reject(Cn)}}),l=null,a&&'array'===a.type&&a.defaultField&&(l=a.defaultField,delete a.defaultField),c=new xn(Object(z["a"])({},t,[a])),u=yn({},rn,i.validateMessages),c.messages(u),f=[],e.prev=9,e.next=12,Promise.resolve(c.validate(Object(z["a"])({},t,n),Object(V["a"])({},i)));case 12:e.next=17;break;case 14:e.prev=14,e.t0=e["catch"](9),e.t0.errors&&(f=e.t0.errors.map((function(e,t){var n=e.message,r=n===Cn?u.default:n;return B["isValidElement"](r)?B["cloneElement"](r,{key:"error_".concat(t)}):r})));case 17:if(f.length||!l){e.next=22;break}return e.next=20,Promise.all(n.map((function(e,n){return Sn("".concat(t,".").concat(n),e,l,i,o)})));case 20:return d=e.sent,e.abrupt("return",d.reduce((function(e,t){return[].concat(Object(Bt["a"])(e),Object(Bt["a"])(t))}),[]));case 22:return h=Object(V["a"])(Object(V["a"])({},r),{},{name:t,enum:(r.enum||[]).join(', ')},o),p=f.map((function(e){return'string'==typeof e?kn(e,h):e})),e.abrupt("return",p);case 25:case"end":return e.stop()}}),e,null,[[9,14]])})))).apply(this,arguments)}function En(e,t,n,r,i,o){var a,s=e.join('.'),l=n.map((function(e,t){var n=e.validator,r=Object(V["a"])(Object(V["a"])({},e),{},{ruleIndex:t});return n&&(r.validator=function(e,t,r){var i=!1,o=n(e,t,(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];Promise.resolve().then((function(){Object(De["a"])(!i,'Your validator function has already return a promise. `callback` will be ignored.'),i||r.apply(void 0,t)}))}));i=o&&'function'==typeof o.then&&'function'==typeof o.catch,Object(De["a"])(i,'`callback` is deprecated. Please return a promise instead.'),i&&o.then((function(){r()})).catch((function(e){r(e||' ')}))}),r})).sort((function(e,t){var n=e.warningOnly,r=e.ruleIndex,i=t.warningOnly,o=t.ruleIndex;return!!n==!!i?r-o:n?1:-1}));if(!0===i)a=new Promise(function(){var e=Object(St["a"])(Object(Ct["a"])().mark((function e(n,i){var a,c,u;return Object(Ct["a"])().wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:a=0;case 1:if(!(a<l.length)){e.next=12;break}return c=l[a],e.next=5,Sn(s,t,c,r,o);case 5:if(!(u=e.sent).length){e.next=9;break}return i([{errors:u,rule:c}]),e.abrupt("return");case 9:a+=1,e.next=1;break;case 12:n([]);case 13:case"end":return e.stop()}}),e)})));return function(t,n){return e.apply(this,arguments)}}());else{var c=l.map((function(e){return Sn(s,t,e,r,o).then((function(t){return{errors:t,rule:e}}))}));a=(i?function(e){return _n.apply(this,arguments)}(c):function(e){return Pn.apply(this,arguments)}(c)).then((function(e){return Promise.reject(e)}))}return a.catch((function(e){return e})),a}function Pn(){return(Pn=Object(St["a"])(Object(Ct["a"])().mark((function e(t){return Object(Ct["a"])().wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:return e.abrupt("return",Promise.all(t).then((function(e){var t;return(t=[]).concat.apply(t,Object(Bt["a"])(e))})));case 1:case"end":return e.stop()}}),e)})))).apply(this,arguments)}function _n(){return(_n=Object(St["a"])(Object(Ct["a"])().mark((function e(t){var n;return Object(Ct["a"])().wrap((function(e){for(;1;)switch(e.prev=e.next){case 0:return n=0,e.abrupt("return",new Promise((function(e){t.forEach((function(r){r.then((function(r){r.errors.length&&e([r]),(n+=1)===t.length&&e([])}))}))})));case 2:case"end":return e.stop()}}),e)})))).apply(this,arguments)}var Tn=["name"],An=[];function Mn(e,t,n,r,i,o){return'function'==typeof e?e(t,n,'source'in o?{source:o.source}:{}):r!==i}var Dn=function(e){Object(xt["a"])(n,e);var t=Object(kt["a"])(n);function n(e){var r;(Object(wt["a"])(this,n),(r=t.call(this,e)).state={resetCount:0},r.cancelRegisterFunc=null,r.mounted=!1,r.touched=!1,r.dirty=!1,r.validatePromise=null,r.prevValidating=void 0,r.errors=An,r.warnings=An,r.cancelRegister=function(){var e=r.props,t=e.preserve,n=e.isListField,i=e.name;r.cancelRegisterFunc&&r.cancelRegisterFunc(n,t,fn(i)),r.cancelRegisterFunc=null},r.getNamePath=function(){var e=r.props,t=e.name,n=e.fieldContext.prefixName,i=void 0===n?[]:n;return void 0!==t?[].concat(Object(Bt["a"])(i),Object(Bt["a"])(t)):[]},r.getRules=function(){var e=r.props,t=e.rules,n=void 0===t?[]:t,i=e.fieldContext;return n.map((function(e){return'function'==typeof e?e(i):e}))},r.refresh=function(){r.mounted&&r.setState((function(e){return{resetCount:e.resetCount+1}}))},r.triggerMetaEvent=function(e){var t=r.props.onMetaChange;null==t||t(Object(V["a"])(Object(V["a"])({},r.getMeta()),{},{destroy:e}))},r.onStoreChange=function(e,t,n){var i=r.props,o=i.shouldUpdate,a=i.dependencies,s=void 0===a?[]:a,l=i.onReset,c=n.store,u=r.getNamePath(),f=r.getValue(e),d=r.getValue(c),h=t&&gn(t,u);switch('valueUpdate'===n.type&&'external'===n.source&&f!==d&&(r.touched=!0,r.dirty=!0,r.validatePromise=null,r.errors=An,r.warnings=An,r.triggerMetaEvent()),n.type){case'reset':if(!t||h)return r.touched=!1,r.dirty=!1,r.validatePromise=null,r.errors=An,r.warnings=An,r.triggerMetaEvent(),null==l||l(),void r.refresh();break;case'remove':if(o)return void r.reRender();break;case'setField':if(h){var p=n.data;return'touched'in p&&(r.touched=p.touched),'validating'in p&&!('originRCField'in p)&&(r.validatePromise=p.validating?Promise.resolve([]):null),'errors'in p&&(r.errors=p.errors||An),'warnings'in p&&(r.warnings=p.warnings||An),r.dirty=!0,r.triggerMetaEvent(),void r.reRender()}if(o&&!u.length&&Mn(o,e,c,f,d,n))return void r.reRender();break;case'dependenciesUpdate':if(s.map(fn).some((function(e){return gn(n.relatedFields,e)})))return void r.reRender();break;default:if(h||(!s.length||u.length||o)&&Mn(o,e,c,f,d,n))return void r.reRender()}!0===o&&r.reRender()},r.validateRules=function(e){var t=r.getNamePath(),n=r.getValue(),i=Promise.resolve().then((function(){if(!r.mounted)return[];var o=r.props,a=o.validateFirst,s=void 0!==a&&a,l=o.messageVariables,c=(e||{}).triggerName,u=r.getRules();c&&(u=u.filter((function(e){var t=e.validateTrigger;return!t||en(t).includes(c)})));var f=En(t,n,u,e,s,l);return f.catch((function(e){return e})).then((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:An;if(r.validatePromise===i){var t;r.validatePromise=null;var n=[],o=[];null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,r=e.errors,i=void 0===r?An:r;t?o.push.apply(o,Object(Bt["a"])(i)):n.push.apply(n,Object(Bt["a"])(i))})),r.errors=n,r.warnings=o,r.triggerMetaEvent(),r.reRender()}})),f}));return r.validatePromise=i,r.dirty=!0,r.errors=An,r.warnings=An,r.triggerMetaEvent(),r.reRender(),i},r.isFieldValidating=function(){return!!r.validatePromise},r.isFieldTouched=function(){return r.touched},r.isFieldDirty=function(){return!(!r.dirty&&void 0===r.props.initialValue)||void 0!==(0,r.props.fieldContext.getInternalHooks(Xt).getInitialValue)(r.getNamePath())},r.getErrors=function(){return r.errors},r.getWarnings=function(){return r.warnings},r.isListField=function(){return r.props.isListField},r.isList=function(){return r.props.isList},r.isPreserve=function(){return r.props.preserve},r.getMeta=function(){return r.prevValidating=r.isFieldValidating(),{touched:r.isFieldTouched(),validating:r.prevValidating,errors:r.errors,warnings:r.warnings,name:r.getNamePath()}},r.getOnlyChild=function(e){if('function'==typeof e){var t=r.getMeta();return Object(V["a"])(Object(V["a"])({},r.getOnlyChild(e(r.getControlled(),t,r.props.fieldContext))),{},{isFunction:!0})}var n=Object(Jt["a"])(e);return 1===n.length&&B["isValidElement"](n[0])?{child:n[0],isFunction:!1}:{child:n,isFunction:!1}},r.getValue=function(e){var t=r.props.fieldContext.getFieldsValue,n=r.getNamePath();return dn(e||t(!0),n)},r.getControlled=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=r.props,n=t.trigger,i=t.validateTrigger,o=t.getValueFromEvent,a=t.normalize,s=t.valuePropName,l=t.getValueProps,c=t.fieldContext,u=void 0!==i?i:c.validateTrigger,f=r.getNamePath(),d=c.getInternalHooks,h=c.getFieldsValue,p=d(Xt),g=p.dispatch,v=r.getValue(),m=l||function(e){return Object(z["a"])({},s,e)},y=e[n],b=Object(V["a"])(Object(V["a"])({},e),m(v));b[n]=function(){var e;r.touched=!0,r.dirty=!0,r.triggerMetaEvent();for(var t=arguments.length,n=new Array(t),i=0;i<t;i++)n[i]=arguments[i];e=o?o.apply(void 0,n):wn.apply(void 0,[s].concat(n)),a&&(e=a(e,v,h(!0))),g({type:'updateValue',namePath:f,value:e}),y&&y.apply(void 0,n)};var w=en(u||[]);return w.forEach((function(e){var t=b[e];b[e]=function(){t&&t.apply(void 0,arguments);var n=r.props.rules;n&&n.length&&g({type:'validateField',namePath:f,triggerName:e})}})),b},e.fieldContext)&&(0,(0,e.fieldContext.getInternalHooks)(Xt).initEntityValue)(Object(Yt["a"])(r));return r}return Object(Ot["a"])(n,[{key:"componentDidMount",value:function(){var e=this.props,t=e.shouldUpdate,n=e.fieldContext;if(this.mounted=!0,n){var r=(0,n.getInternalHooks)(Xt).registerField;this.cancelRegisterFunc=r(this)}!0===t&&this.reRender()}},{key:"componentWillUnmount",value:function(){this.cancelRegister(),this.triggerMetaEvent(!0),this.mounted=!1}},{key:"reRender",value:function(){this.mounted&&this.forceUpdate()}},{key:"render",value:function(){var e,t=this.state.resetCount,n=this.props.children,r=this.getOnlyChild(n),i=r.child;return r.isFunction?e=i:B["isValidElement"](i)?e=B["cloneElement"](i,this.getControlled(i.props)):(Object(De["a"])(!i,'`children` of Field is not validate ReactElement.'),e=i),B["createElement"](B["Fragment"],{key:t},e)}}]),n}(B["Component"]);Dn.contextType=Zt,Dn.defaultProps={trigger:'onChange',valuePropName:'value'};var Ln=function(e){var t=e.name,n=Object($["a"])(e,Tn),r=B["useContext"](Zt),i=void 0!==t?fn(t):void 0,o='keep';return n.isListField||(o="_".concat((i||[]).join('_'))),B["createElement"](Dn,Object(I["a"])({key:o,name:i},n,{fieldContext:r}))},Nn=B["createContext"](null),Rn=function(e){var t=e.name,n=e.initialValue,r=e.children,i=e.rules,o=e.validateTrigger,a=B["useContext"](Zt),s=B["useRef"]({keys:[],id:0}).current,l=B["useMemo"]((function(){var e=fn(a.prefixName)||[];return[].concat(Object(Bt["a"])(e),Object(Bt["a"])(fn(t)))}),[a.prefixName,t]),c=B["useMemo"]((function(){return Object(V["a"])(Object(V["a"])({},a),{},{prefixName:l})}),[a,l]),u=B["useMemo"]((function(){return{getKey:function(e){var t=l.length,n=e[t];return[s.keys[n],e.slice(t+1)]}}}),[l]);if('function'!=typeof r)return Object(De["a"])(!1,'Form.List only accepts function as children.'),null;return B["createElement"](Nn.Provider,{value:u},B["createElement"](Zt.Provider,{value:c},B["createElement"](Ln,{name:[],shouldUpdate:function(e,t,n){return'internal'!==n.source&&e!==t},rules:i,validateTrigger:o,initialValue:n,isList:!0},(function(e,t){var n=e.value,i=void 0===n?[]:n,o=e.onChange,c=a.getFieldValue,u=function(){return c(l||[])||[]},f={add:function(e,t){var n=u();t>=0&&t<=n.length?(s.keys=[].concat(Object(Bt["a"])(s.keys.slice(0,t)),[s.id],Object(Bt["a"])(s.keys.slice(t))),o([].concat(Object(Bt["a"])(n.slice(0,t)),[e],Object(Bt["a"])(n.slice(t))))):(s.keys=[].concat(Object(Bt["a"])(s.keys),[s.id]),o([].concat(Object(Bt["a"])(n),[e]))),s.id+=1},remove:function(e){var t=u(),n=new Set(Array.isArray(e)?e:[e]);n.size<=0||(s.keys=s.keys.filter((function(e,t){return!n.has(t)})),o(t.filter((function(e,t){return!n.has(t)}))))},move:function(e,t){if(e!==t){var n=u();e<0||e>=n.length||t<0||t>=n.length||(s.keys=On(s.keys,e,t),o(On(n,e,t)))}}},d=i||[];return Array.isArray(d)||(d=[]),r(d.map((function(e,t){var n=s.keys[t];return void 0===n&&(s.keys[t]=s.id,n=s.keys[t],s.id+=1),{name:t,key:n,isListField:!0}})),f,t)}))))};var Fn='__@field_split__';function In(e){return e.map((function(e){return"".concat(Object(Y["a"])(e),":").concat(e)})).join(Fn)}var zn=function(){function e(){Object(wt["a"])(this,e),this.kvs=new Map}return Object(Ot["a"])(e,[{key:"set",value:function(e,t){this.kvs.set(In(e),t)}},{key:"get",value:function(e){return this.kvs.get(In(e))}},{key:"update",value:function(e,t){var n=t(this.get(e));n?this.set(e,n):this.delete(e)}},{key:"delete",value:function(e){this.kvs.delete(In(e))}},{key:"map",value:function(e){return Object(Bt["a"])(this.kvs.entries()).map((function(t){var n=Object(W["a"])(t,2),r=n[0],i=n[1],o=r.split(Fn);return e({key:o.map((function(e){var t=e.match(/^([^:]*):(.*)$/),n=Object(W["a"])(t,3),r=n[1],i=n[2];return'number'===r?Number(i):i})),value:i})}))}},{key:"toJSON",value:function(){var e={};return this.map((function(t){var n=t.key,r=t.value;return e[n.join('.')]=r,null})),e}}]),e}(),Vn=["name","errors"],Bn=Object(Ot["a"])((function e(t){var n=this;Object(wt["a"])(this,e),this.formHooked=!1,this.forceRootUpdate=void 0,this.subscribable=!0,this.store={},this.fieldEntities=[],this.initialValues={},this.callbacks={},this.validateMessages=null,this.preserve=null,this.lastValidatePromise=null,this.getForm=function(){return{getFieldValue:n.getFieldValue,getFieldsValue:n.getFieldsValue,getFieldError:n.getFieldError,getFieldWarning:n.getFieldWarning,getFieldsError:n.getFieldsError,isFieldsTouched:n.isFieldsTouched,isFieldTouched:n.isFieldTouched,isFieldValidating:n.isFieldValidating,isFieldsValidating:n.isFieldsValidating,resetFields:n.resetFields,setFields:n.setFields,setFieldValue:n.setFieldValue,setFieldsValue:n.setFieldsValue,validateFields:n.validateFields,submit:n.submit,_init:!0,getInternalHooks:n.getInternalHooks}},this.getInternalHooks=function(e){return e===Xt?(n.formHooked=!0,{dispatch:n.dispatch,initEntityValue:n.initEntityValue,registerField:n.registerField,useSubscribe:n.useSubscribe,setInitialValues:n.setInitialValues,destroyForm:n.destroyForm,setCallbacks:n.setCallbacks,setValidateMessages:n.setValidateMessages,getFields:n.getFields,setPreserve:n.setPreserve,getInitialValue:n.getInitialValue,registerWatch:n.registerWatch}):(Object(De["a"])(!1,'`getInternalHooks` is internal usage. Should not call directly.'),null)},this.useSubscribe=function(e){n.subscribable=e},this.prevWithoutPreserves=null,this.setInitialValues=function(e,t){if(n.initialValues=e||{},t){var r,i=yn({},e,n.store);null===(r=n.prevWithoutPreserves)||void 0===r||r.map((function(t){var n=t.key;i=hn(i,n,dn(e,n))})),n.prevWithoutPreserves=null,n.updateStore(i)}},this.destroyForm=function(){var e=new zn;n.getFieldEntities(!0).forEach((function(t){n.isMergedPreserve(t.isPreserve())||e.set(t.getNamePath(),!0)})),n.prevWithoutPreserves=e},this.getInitialValue=function(e){var t=dn(n.initialValues,e);return e.length?un(t):t},this.setCallbacks=function(e){n.callbacks=e},this.setValidateMessages=function(e){n.validateMessages=e},this.setPreserve=function(e){n.preserve=e},this.watchList=[],this.registerWatch=function(e){return n.watchList.push(e),function(){n.watchList=n.watchList.filter((function(t){return t!==e}))}},this.notifyWatch=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];if(n.watchList.length){var t=n.getFieldsValue();n.watchList.forEach((function(n){n(t,e)}))}},this.timeoutId=null,this.warningUnhooked=function(){},this.updateStore=function(e){n.store=e},this.getFieldEntities=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];return e?n.fieldEntities.filter((function(e){return e.getNamePath().length})):n.fieldEntities},this.getFieldsMap=function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=new zn;return n.getFieldEntities(e).forEach((function(e){var n=e.getNamePath();t.set(n,e)})),t},this.getFieldEntitiesForNamePathList=function(e){if(!e)return n.getFieldEntities(!0);var t=n.getFieldsMap(!0);return e.map((function(e){var n=fn(e);return t.get(n)||{INVALIDATE_NAME_PATH:fn(e)}}))},this.getFieldsValue=function(e,t){if(n.warningUnhooked(),!0===e&&!t)return n.store;var r=n.getFieldEntitiesForNamePathList(Array.isArray(e)?e:null),i=[];return r.forEach((function(n){var r,o='INVALIDATE_NAME_PATH'in n?n.INVALIDATE_NAME_PATH:n.getNamePath();if(e||!(null===(r=n.isListField)||void 0===r?void 0:r.call(n)))if(t){var a='getMeta'in n?n.getMeta():null;t(a)&&i.push(o)}else i.push(o)})),pn(n.store,i.map(fn))},this.getFieldValue=function(e){n.warningUnhooked();var t=fn(e);return dn(n.store,t)},this.getFieldsError=function(e){return n.warningUnhooked(),n.getFieldEntitiesForNamePathList(e).map((function(t,n){return t&&!('INVALIDATE_NAME_PATH'in t)?{name:t.getNamePath(),errors:t.getErrors(),warnings:t.getWarnings()}:{name:fn(e[n]),errors:[],warnings:[]}}))},this.getFieldError=function(e){n.warningUnhooked();var t=fn(e);return n.getFieldsError([t])[0].errors},this.getFieldWarning=function(e){n.warningUnhooked();var t=fn(e);return n.getFieldsError([t])[0].warnings},this.isFieldsTouched=function(){n.warningUnhooked();for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];var i,o=t[0],a=t[1],s=!1;0===t.length?i=null:1===t.length?Array.isArray(o)?(i=o.map(fn),s=!1):(i=null,s=o):(i=o.map(fn),s=a);var l=n.getFieldEntities(!0),c=function(e){return e.isFieldTouched()};if(!i)return s?l.every(c):l.some(c);var u=new zn;i.forEach((function(e){u.set(e,[])})),l.forEach((function(e){var t=e.getNamePath();i.forEach((function(n){n.every((function(e,n){return t[n]===e}))&&u.update(n,(function(t){return[].concat(Object(Bt["a"])(t),[e])}))}))}));var f=function(e){return e.some(c)},d=u.map((function(e){return e.value}));return s?d.every(f):d.some(f)},this.isFieldTouched=function(e){return n.warningUnhooked(),n.isFieldsTouched([e])},this.isFieldsValidating=function(e){n.warningUnhooked();var t=n.getFieldEntities();if(!e)return t.some((function(e){return e.isFieldValidating()}));var r=e.map(fn);return t.some((function(e){var t=e.getNamePath();return gn(r,t)&&e.isFieldValidating()}))},this.isFieldValidating=function(e){return n.warningUnhooked(),n.isFieldsValidating([e])},this.resetWithFieldInitialValue=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=new zn,r=n.getFieldEntities(!0);r.forEach((function(e){var n=e.props.initialValue,r=e.getNamePath();if(void 0!==n){var i=t.get(r)||new Set;i.add({entity:e,value:n}),t.set(r,i)}}));var i,o=function(r){r.forEach((function(r){if(void 0!==r.props.initialValue){var i=r.getNamePath();if(void 0!==n.getInitialValue(i))Object(De["a"])(!1,"Form already set 'initialValues' with path '".concat(i.join('.'),"'. Field can not overwrite it."));else{var o=t.get(i);if(o&&o.size>1)Object(De["a"])(!1,"Multiple Field with path '".concat(i.join('.'),"' set 'initialValue'. Can not decide which one to pick."));else if(o){var a=n.getFieldValue(i);e.skipExist&&void 0!==a||n.updateStore(hn(n.store,i,Object(Bt["a"])(o)[0].value))}}}}))};e.entities?i=e.entities:e.namePathList?(i=[],e.namePathList.forEach((function(e){var n,r=t.get(e);r&&(n=i).push.apply(n,Object(Bt["a"])(Object(Bt["a"])(r).map((function(e){return e.entity}))))}))):i=r,o(i)},this.resetFields=function(e){n.warningUnhooked();var t=n.store;if(!e)return n.updateStore(yn({},n.initialValues)),n.resetWithFieldInitialValue(),n.notifyObservers(t,null,{type:'reset'}),void n.notifyWatch();var r=e.map(fn);r.forEach((function(e){var t=n.getInitialValue(e);n.updateStore(hn(n.store,e,t))})),n.resetWithFieldInitialValue({namePathList:r}),n.notifyObservers(t,r,{type:'reset'}),n.notifyWatch(r)},this.setFields=function(e){n.warningUnhooked();var t=n.store,r=[];e.forEach((function(e){var i=e.name,o=(e.errors,Object($["a"])(e,Vn)),a=fn(i);r.push(a),'value'in o&&n.updateStore(hn(n.store,a,o.value)),n.notifyObservers(t,[a],{type:'setField',data:e})})),n.notifyWatch(r)},this.getFields=function(){return n.getFieldEntities(!0).map((function(e){var t=e.getNamePath(),r=e.getMeta(),i=Object(V["a"])(Object(V["a"])({},r),{},{name:t,value:n.getFieldValue(t)});return Object.defineProperty(i,'originRCField',{value:!0}),i}))},this.initEntityValue=function(e){var t=e.props.initialValue;if(void 0!==t){var r=e.getNamePath();void 0===dn(n.store,r)&&n.updateStore(hn(n.store,r,t))}},this.isMergedPreserve=function(e){var t=void 0!==e?e:n.preserve;return null==t||t},this.registerField=function(e){n.fieldEntities.push(e);var t=e.getNamePath();if(n.notifyWatch([t]),void 0!==e.props.initialValue){var r=n.store;n.resetWithFieldInitialValue({entities:[e],skipExist:!0}),n.notifyObservers(r,[e.getNamePath()],{type:'valueUpdate',source:'internal'})}return function(r,i){var o=arguments.length>2&&void 0!==arguments[2]?arguments[2]:[];if(n.fieldEntities=n.fieldEntities.filter((function(t){return t!==e})),!n.isMergedPreserve(i)&&(!r||o.length>1)){var a=r?void 0:n.getInitialValue(t);if(t.length&&n.getFieldValue(t)!==a&&n.fieldEntities.every((function(e){return!bn(e.getNamePath(),t)}))){var s=n.store;n.updateStore(hn(s,t,a,!0)),n.notifyObservers(s,[t],{type:'remove'}),n.triggerDependenciesUpdate(s,t)}}n.notifyWatch([t])}},this.dispatch=function(e){switch(e.type){case'updateValue':var t=e.namePath,r=e.value;n.updateValue(t,r);break;case'validateField':var i=e.namePath,o=e.triggerName;n.validateFields([i],{triggerName:o})}},this.notifyObservers=function(e,t,r){if(n.subscribable){var i=Object(V["a"])(Object(V["a"])({},r),{},{store:n.getFieldsValue(!0)});n.getFieldEntities().forEach((function(n){(0,n.onStoreChange)(e,t,i)}))}else n.forceRootUpdate()},this.triggerDependenciesUpdate=function(e,t){var r=n.getDependencyChildrenFields(t);return r.length&&n.validateFields(r),n.notifyObservers(e,r,{type:'dependenciesUpdate',relatedFields:[t].concat(Object(Bt["a"])(r))}),r},this.updateValue=function(e,t){var r=fn(e),i=n.store;n.updateStore(hn(n.store,r,t)),n.notifyObservers(i,[r],{type:'valueUpdate',source:'internal'}),n.notifyWatch([r]);var o=n.triggerDependenciesUpdate(i,r),a=n.callbacks.onValuesChange;a&&a(pn(n.store,[r]),n.getFieldsValue());n.triggerOnFieldsChange([r].concat(Object(Bt["a"])(o)))},this.setFieldsValue=function(e){n.warningUnhooked();var t=n.store;if(e){var r=yn(n.store,e);n.updateStore(r)}n.notifyObservers(t,null,{type:'valueUpdate',source:'external'}),n.notifyWatch()},this.setFieldValue=function(e,t){n.setFields([{name:e,value:t}])},this.getDependencyChildrenFields=function(e){var t=new Set,r=[],i=new zn;n.getFieldEntities().forEach((function(e){(e.props.dependencies||[]).forEach((function(t){var n=fn(t);i.update(n,(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Set;return t.add(e),t}))}))}));return function e(n){(i.get(n)||new Set).forEach((function(n){if(!t.has(n)){t.add(n);var i=n.getNamePath();n.isFieldDirty()&&i.length&&(r.push(i),e(i))}}))}(e),r},this.triggerOnFieldsChange=function(e,t){var r=n.callbacks.onFieldsChange;if(r){var i=n.getFields();if(t){var o=new zn;t.forEach((function(e){var t=e.name,n=e.errors;o.set(t,n)})),i.forEach((function(e){e.errors=o.get(e.name)||e.errors}))}r(i.filter((function(t){var n=t.name;return gn(e,n)})),i)}},this.validateFields=function(e,t){n.warningUnhooked();var r=!!e,i=r?e.map(fn):[],o=[];n.getFieldEntities(!0).forEach((function(a){if(r||i.push(a.getNamePath()),(null==t?void 0:t.recursive)&&r){var s=a.getNamePath();s.every((function(t,n){return e[n]===t||void 0===e[n]}))&&i.push(s)}if(a.props.rules&&a.props.rules.length){var l=a.getNamePath();if(!r||gn(i,l)){var c=a.validateRules(Object(V["a"])({validateMessages:Object(V["a"])(Object(V["a"])({},rn),n.validateMessages)},t));o.push(c.then((function(){return{name:l,errors:[],warnings:[]}})).catch((function(e){var t,n=[],r=[];return null===(t=e.forEach)||void 0===t||t.call(e,(function(e){var t=e.rule.warningOnly,i=e.errors;t?r.push.apply(r,Object(Bt["a"])(i)):n.push.apply(n,Object(Bt["a"])(i))})),n.length?Promise.reject({name:l,errors:n,warnings:r}):{name:l,errors:n,warnings:r}})))}}}));var a=function(e){var t=!1,n=e.length,r=[];return e.length?new Promise((function(i,o){e.forEach((function(e,a){e.catch((function(e){return t=!0,e})).then((function(e){n-=1,r[a]=e,n>0||(t&&o(r),i(r))}))}))})):Promise.resolve([])}(o);n.lastValidatePromise=a,a.catch((function(e){return e})).then((function(e){var t=e.map((function(e){return e.name}));n.notifyObservers(n.store,t,{type:'validateFinish'}),n.triggerOnFieldsChange(t,e)}));var s=a.then((function(){return n.lastValidatePromise===a?Promise.resolve(n.getFieldsValue(i)):Promise.reject([])})).catch((function(e){var t=e.filter((function(e){return e&&e.errors.length}));return Promise.reject({values:n.getFieldsValue(i),errorFields:t,outOfDate:n.lastValidatePromise!==a})}));return s.catch((function(e){return e})),s},this.submit=function(){n.warningUnhooked(),n.validateFields().then((function(e){var t=n.callbacks.onFinish;if(t)try{t(e)}catch(e){console.error(e)}})).catch((function(e){var t=n.callbacks.onFinishFailed;t&&t(e)}))},this.forceRootUpdate=t}));var Un=function(e){var t=B["useRef"](),n=B["useState"]({}),r=Object(W["a"])(n,2)[1];if(!t.current)if(e)t.current=e;else{var i=new Bn((function(){r({})}));t.current=i.getForm()}return[t.current]},Hn=B["createContext"]({triggerFormChange:function(){},triggerFormFinish:function(){},registerForm:function(){},unregisterForm:function(){}}),Wn=function(e){var t=e.validateMessages,n=e.onFormChange,r=e.onFormFinish,i=e.children,o=B["useContext"](Hn),a=B["useRef"]({});return B["createElement"](Hn.Provider,{value:Object(V["a"])(Object(V["a"])({},o),{},{validateMessages:Object(V["a"])(Object(V["a"])({},o.validateMessages),t),triggerFormChange:function(e,t){n&&n(e,{changedFields:t,forms:a.current}),o.triggerFormChange(e,t)},triggerFormFinish:function(e,t){r&&r(e,{values:t,forms:a.current}),o.triggerFormFinish(e,t)},registerForm:function(e,t){e&&(a.current=Object(V["a"])(Object(V["a"])({},a.current),{},Object(z["a"])({},e,t))),o.registerForm(e,t)},unregisterForm:function(e){var t=Object(V["a"])({},a.current);delete t[e],a.current=t,o.unregisterForm(e)}})},i)},$n=Hn,qn=["name","initialValues","fields","form","preserve","children","component","validateMessages","validateTrigger","onValuesChange","onFieldsChange","onFinish","onFinishFailed"],Kn=function(e,t){var n=e.name,r=e.initialValues,i=e.fields,o=e.form,a=e.preserve,s=e.children,l=e.component,c=void 0===l?'form':l,u=e.validateMessages,f=e.validateTrigger,d=void 0===f?'onChange':f,h=e.onValuesChange,p=e.onFieldsChange,g=e.onFinish,v=e.onFinishFailed,m=Object($["a"])(e,qn),y=B["useContext"]($n),b=Un(o),w=Object(W["a"])(b,1)[0],O=w.getInternalHooks(Xt),x=O.useSubscribe,k=O.setInitialValues,C=O.setCallbacks,S=O.setValidateMessages,j=O.setPreserve,E=O.destroyForm;B["useImperativeHandle"](t,(function(){return w})),B["useEffect"]((function(){return y.registerForm(n,w),function(){y.unregisterForm(n)}}),[y,w,n]),S(Object(V["a"])(Object(V["a"])({},y.validateMessages),u)),C({onValuesChange:h,onFieldsChange:function(e){if(y.triggerFormChange(n,e),p){for(var t=arguments.length,r=new Array(t>1?t-1:0),i=1;i<t;i++)r[i-1]=arguments[i];p.apply(void 0,[e].concat(r))}},onFinish:function(e){y.triggerFormFinish(n,e),g&&g(e)},onFinishFailed:v}),j(a);var P,_=B["useRef"](null);k(r,!_.current),_.current||(_.current=!0),B["useEffect"]((function(){return E}),[]);var T='function'==typeof s;T?P=s(w.getFieldsValue(!0),w):P=s;x(!T);var A=B["useRef"]();B["useEffect"]((function(){(function(e,t){if(e===t)return!0;if(!e&&t||e&&!t)return!1;if(!e||!t||'object'!==Object(Y["a"])(e)||'object'!==Object(Y["a"])(t))return!1;var n=Object.keys(e),r=Object.keys(t),i=new Set([].concat(n,r));return Object(Bt["a"])(i).every((function(n){var r=e[n],i=t[n];return'function'==typeof r&&'function'==typeof i||r===i}))})(A.current||[],i||[])||w.setFields(i||[]),A.current=i}),[i,w]);var M=B["useMemo"]((function(){return Object(V["a"])(Object(V["a"])({},w),{},{validateTrigger:d})}),[w,d]),D=B["createElement"](Zt.Provider,{value:M},P);return!1===c?D:B["createElement"](c,Object(I["a"])({},m,{onSubmit:function(e){e.preventDefault(),e.stopPropagation(),w.submit()},onReset:function(e){var t;e.preventDefault(),w.resetFields(),null===(t=m.onReset)||void 0===t||t.call(m,e)}}),D)};function Gn(e){try{return JSON.stringify(e)}catch(e){return Math.random()}}var Yn=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,n=Object(B["useState"])(),r=Object(W["a"])(n,2),i=r[0],o=r[1],a=Object(B["useMemo"])((function(){return Gn(i)}),[i]),s=Object(B["useRef"])(a);s.current=a;var l=Object(B["useContext"])(Zt),c=t||l,u=c&&c._init,f=fn(e),d=Object(B["useRef"])(f);return d.current=f,Object(B["useEffect"])((function(){if(u){var e=c.getFieldsValue,t=(0,(0,c.getInternalHooks)(Xt).registerWatch)((function(e){var t=dn(e,d.current),n=Gn(t);s.current!==n&&(s.current=n,o(t))})),n=dn(e(),d.current);return o(n),t}}),[]),i},Jn=B["forwardRef"](Kn);Jn.FormProvider=Wn,Jn.Field=Ln,Jn.List=Rn,Jn.useForm=Un,Jn.useWatch=Yn;var Xn=n(85),Qn=Number.isNaN||function(e){return'number'==typeof e&&e!=e};function Zn(e,t){if(e.length!==t.length)return!1;for(var n=0;n<e.length;n++)if(r=e[n],i=t[n],!(r===i||Qn(r)&&Qn(i)))return!1;var r,i;return!0}var er={locale:'en_US',today:'Today',now:'Now',backToToday:'Back to today',ok:'OK',clear:'Clear',month:'Month',year:'Year',timeSelect:'select time',dateSelect:'select date',weekSelect:'Choose a week',monthSelect:'Choose a month',yearSelect:'Choose a year',decadeSelect:'Choose a decade',yearFormat:'YYYY',dateFormat:'M/D/YYYY',dayFormat:'D',dateTimeFormat:'M/D/YYYY HH:mm:ss',monthBeforeYear:!0,previousMonth:'Previous month (PageUp)',nextMonth:'Next month (PageDown)',previousYear:'Last year (Control + left)',nextYear:'Next year (Control + right)',previousDecade:'Last decade',nextDecade:'Next decade',previousCentury:'Last century',nextCentury:'Next century'},tr={placeholder:'Select time',rangePlaceholder:['Start time','End time']},nr={lang:Object(I["a"])({placeholder:'Select date',yearPlaceholder:'Select year',quarterPlaceholder:'Select quarter',monthPlaceholder:'Select month',weekPlaceholder:'Select week',rangePlaceholder:['Start date','End date'],rangeYearPlaceholder:['Start year','End year'],rangeQuarterPlaceholder:['Start quarter','End quarter'],rangeMonthPlaceholder:['Start month','End month'],rangeWeekPlaceholder:['Start week','End week']},er),timePickerLocale:Object(I["a"])({},tr)},rr='${label} is not a valid ${type}',ir={locale:'en',Pagination:{items_per_page:'/ page',jump_to:'Go to',jump_to_confirm:'confirm',page:'Page',prev_page:'Previous Page',next_page:'Next Page',prev_5:'Previous 5 Pages',next_5:'Next 5 Pages',prev_3:'Previous 3 Pages',next_3:'Next 3 Pages',page_size:'Page Size'},DatePicker:nr,TimePicker:tr,Calendar:nr,global:{placeholder:'Please select'},Table:{filterTitle:'Filter menu',filterConfirm:'OK',filterReset:'Reset',filterEmptyText:'No filters',filterCheckall:'Select all items',filterSearchPlaceholder:'Search in filters',emptyText:'No data',selectAll:'Select current page',selectInvert:'Invert current page',selectNone:'Clear all data',selectionAll:'Select all data',sortTitle:'Sort',expand:'Expand row',collapse:'Collapse row',triggerDesc:'Click to sort descending',triggerAsc:'Click to sort ascending',cancelSort:'Click to cancel sorting'},Modal:{okText:'OK',cancelText:'Cancel',justOkText:'OK'},Popconfirm:{okText:'OK',cancelText:'Cancel'},Transfer:{titles:['',''],searchPlaceholder:'Search here',itemUnit:'item',itemsUnit:'items',remove:'Remove',selectCurrent:'Select current page',removeCurrent:'Remove current page',selectAll:'Select all data',removeAll:'Remove all data',selectInvert:'Invert current page'},Upload:{uploading:'Uploading...',removeFile:'Remove file',uploadError:'Upload error',previewFile:'Preview file',downloadFile:'Download file'},Empty:{description:'No Data'},Icon:{icon:'icon'},Text:{edit:'Edit',copy:'Copy',copied:'Copied',expand:'Expand'},PageHeader:{back:'Back'},Form:{optional:'(optional)',defaultValidateMessages:{default:'Field validation error for ${label}',required:'Please enter ${label}',enum:'${label} must be one of [${enum}]',whitespace:'${label} cannot be a blank character',date:{format:'${label} date format is invalid',parse:'${label} cannot be converted to a date',invalid:'${label} is an invalid date'},types:{string:rr,method:rr,array:rr,object:rr,number:rr,date:rr,boolean:rr,integer:rr,float:rr,regexp:rr,email:rr,url:rr,hex:rr},string:{len:'${label} must be ${len} characters',min:'${label} must be at least ${min} characters',max:'${label} must be up to ${max} characters',range:'${label} must be between ${min}-${max} characters'},number:{len:'${label} must be equal to ${len}',min:'${label} must be minimum ${min}',max:'${label} must be maximum ${max}',range:'${label} must be between ${min}-${max}'},array:{len:'Must be ${len} ${label}',min:'At least ${min} ${label}',max:'At most ${max} ${label}',range:'The amount of ${label} must be between ${min}-${max}'},pattern:{mismatch:'${label} does not match the pattern ${pattern}'}}},Image:{preview:'Preview'}},or=Object(I["a"])({},ir.Modal);function ar(e){or=e?Object(I["a"])(Object(I["a"])({},or),e):Object(I["a"])({},ir.Modal)}var sr=Object(B["createContext"])(void 0),lr='internalMark',cr=function(e){Object(xt["a"])(n,e);var t=Object(kt["a"])(n);function n(e){var r;return Object(wt["a"])(this,n),(r=t.call(this,e)).getMemoizedContextValue=function(e,t){void 0===t&&(t=Zn);var n=null;function r(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];if(n&&n.lastThis===this&&t(r,n.lastArgs))return n.lastResult;var o=e.apply(this,r);return n={lastResult:o,lastArgs:r,lastThis:this},o}return r.clear=function(){n=null},r}((function(e){return Object(I["a"])(Object(I["a"])({},e),{exist:!0})})),ar(e.locale&&e.locale.Modal),r}return Object(Ot["a"])(n,[{key:"componentDidMount",value:function(){ar(this.props.locale&&this.props.locale.Modal)}},{key:"componentDidUpdate",value:function(e){var t=this.props.locale;e.locale!==t&&ar(t&&t.Modal)}},{key:"componentWillUnmount",value:function(){ar()}},{key:"render",value:function(){var e=this.props,t=e.locale,n=e.children,r=this.getMemoizedContextValue(t);return B["createElement"](sr.Provider,{value:r},n)}}]),n}(B["Component"]);cr.defaultProps={locale:{}};var ur=ir,fr=function(e){Object(xt["a"])(n,e);var t=Object(kt["a"])(n);function n(){return Object(wt["a"])(this,n),t.apply(this,arguments)}return Object(Ot["a"])(n,[{key:"getLocale",value:function(){var e=this.props,t=e.componentName,n=e.defaultLocale||ur[null!=t?t:'global'],r=this.context,i=t&&r?r[t]:{};return Object(I["a"])(Object(I["a"])({},n instanceof Function?n():n),i||{})}},{key:"getLocaleCode",value:function(){var e=this.context,t=e&&e.locale;return e&&e.exist&&!t?ur.locale:t}},{key:"render",value:function(){return this.props.children(this.getLocale(),this.getLocaleCode(),this.context)}}]),n}(B["Component"]);fr.defaultProps={componentName:'global'},fr.contextType=sr;var dr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M699 353h-46.9c-10.2 0-19.9 4.9-25.9 13.3L469 584.3l-71.2-98.8c-6-8.3-15.6-13.3-25.9-13.3H325c-6.5 0-10.3 7.4-6.5 12.7l124.6 172.8a31.8 31.8 0 0051.7 0l210.6-292c3.9-5.3.1-12.7-6.4-12.7z"}},{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"check-circle",theme:"outlined"},hr=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:dr}))};hr.displayName='CheckCircleOutlined';var pr=B["forwardRef"](hr),gr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M685.4 354.8c0-4.4-3.6-8-8-8l-66 .3L512 465.6l-99.3-118.4-66.1-.3c-4.4 0-8 3.5-8 8 0 1.9.7 3.7 1.9 5.2l130.1 155L340.5 670a8.32 8.32 0 00-1.9 5.2c0 4.4 3.6 8 8 8l66.1-.3L512 564.4l99.3 118.4 66 .3c4.4 0 8-3.5 8-8 0-1.9-.7-3.7-1.9-5.2L553.5 515l130.1-155c1.2-1.4 1.8-3.3 1.8-5.2z"}},{tag:"path",attrs:{d:"M512 65C264.6 65 64 265.6 64 513s200.6 448 448 448 448-200.6 448-448S759.4 65 512 65zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}}]},name:"close-circle",theme:"outlined"},vr=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:gr}))};vr.displayName='CloseCircleOutlined';var mr=B["forwardRef"](vr),yr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M563.8 512l262.5-312.9c4.4-5.2.7-13.1-6.1-13.1h-79.8c-4.7 0-9.2 2.1-12.3 5.7L511.6 449.8 295.1 191.7c-3-3.6-7.5-5.7-12.3-5.7H203c-6.8 0-10.5 7.9-6.1 13.1L459.4 512 196.9 824.9A7.95 7.95 0 00203 838h79.8c4.7 0 9.2-2.1 12.3-5.7l216.5-258.1 216.5 258.1c3 3.6 7.5 5.7 12.3 5.7h79.8c6.8 0 10.5-7.9 6.1-13.1L563.8 512z"}}]},name:"close",theme:"outlined"},br=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:yr}))};br.displayName='CloseOutlined';var wr=B["forwardRef"](br),Or={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 688a48 48 0 1096 0 48 48 0 10-96 0zm24-112h48c4.4 0 8-3.6 8-8V296c0-4.4-3.6-8-8-8h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8z"}}]},name:"exclamation-circle",theme:"outlined"},xr=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:Or}))};xr.displayName='ExclamationCircleOutlined';var kr=B["forwardRef"](xr),Cr={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm0 820c-205.4 0-372-166.6-372-372s166.6-372 372-372 372 166.6 372 372-166.6 372-372 372z"}},{tag:"path",attrs:{d:"M464 336a48 48 0 1096 0 48 48 0 10-96 0zm72 112h-48c-4.4 0-8 3.6-8 8v272c0 4.4 3.6 8 8 8h48c4.4 0 8-3.6 8-8V456c0-4.4-3.6-8-8-8z"}}]},name:"info-circle",theme:"outlined"},Sr=function(e,t){return B["createElement"](it,Object(V["a"])(Object(V["a"])({},e),{},{ref:t,icon:Cr}))};Sr.displayName='InfoCircleOutlined';var jr=B["forwardRef"](Sr),Er=B["createContext"]({getPrefixCls:function(e,t){return t||(e?"ant-".concat(e):'ant')}}),Pr=Er.Consumer;void 0&&(void 0).__awaiter;var _r,Tr,Ar,Mr={},Dr=4.5,Lr=24,Nr=24,Rr='',Fr='topRight',Ir=!1;function zr(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Lr,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Nr;switch(e){case'top':t={left:'50%',transform:'translateX(-50%)',right:'auto',top:n,bottom:'auto'};break;case'topLeft':t={left:0,top:n,bottom:'auto'};break;case'topRight':t={right:0,top:n,bottom:'auto'};break;case'bottom':t={left:'50%',transform:'translateX(-50%)',right:'auto',top:'auto',bottom:r};break;case'bottomLeft':t={left:0,top:'auto',bottom:r};break;default:t={right:0,top:'auto',bottom:r}}return t}function Vr(e,t){var n=e.placement,r=void 0===n?Fr:n,i=e.top,o=e.bottom,a=e.getContainer,s=void 0===a?_r:a,l=e.prefixCls,c=li(),u=c.getPrefixCls,f=c.getIconPrefixCls,d=u('notification',l||Rr),h=f(),p="".concat(d,"-").concat(r),g=Mr[p];if(g)Promise.resolve(g).then((function(e){t({prefixCls:"".concat(d,"-notice"),iconPrefixCls:h,instance:e})}));else{var v=K()("".concat(d,"-").concat(r),Object(z["a"])({},"".concat(d,"-rtl"),!0===Ir));Mr[p]=new Promise((function(e){Gt.newInstance({prefixCls:d,className:v,style:zr(r,i,o),getContainer:s,maxCount:Ar},(function(n){e(n),t({prefixCls:"".concat(d,"-notice"),iconPrefixCls:h,instance:n})}))}))}}var Br={success:pr,info:jr,error:mr,warning:kr};function Ur(e,t,n){var r=e.duration,i=e.icon,o=e.type,a=e.description,s=e.message,l=e.btn,c=e.onClose,u=e.onClick,f=e.key,d=e.style,h=e.className,p=e.closeIcon,g=void 0===p?Tr:p,v=void 0===r?Dr:r,m=null;i?m=B["createElement"]("span",{className:"".concat(t,"-icon")},e.icon):o&&(m=B["createElement"](Br[o]||null,{className:"".concat(t,"-icon ").concat(t,"-icon-").concat(o)}));var y=B["createElement"]("span",{className:"".concat(t,"-close-x")},g||B["createElement"](wr,{className:"".concat(t,"-close-icon")})),b=!a&&m?B["createElement"]("span",{className:"".concat(t,"-message-single-line-auto-margin")}):null;return{content:B["createElement"](di,{iconPrefixCls:n},B["createElement"]("div",{className:m?"".concat(t,"-with-icon"):'',role:"alert"},m,B["createElement"]("div",{className:"".concat(t,"-message")},b,s),B["createElement"]("div",{className:"".concat(t,"-description")},a),l?B["createElement"]("span",{className:"".concat(t,"-btn")},l):null)),duration:v,closable:!0,closeIcon:y,onClose:c,onClick:u,key:f,style:d||{},className:K()(h,Object(z["a"])({},"".concat(t,"-").concat(o),!!o))}}var Hr,Wr,$r={open:function(e){Vr(e,(function(t){var n=t.prefixCls,r=t.iconPrefixCls;t.instance.notice(Ur(e,n,r))}))},close:function(e){Object.keys(Mr).forEach((function(t){return Promise.resolve(Mr[t]).then((function(t){t.removeNotice(e)}))}))},config:function(e){var t=e.duration,n=e.placement,r=e.bottom,i=e.top,o=e.getContainer,a=e.closeIcon,s=e.prefixCls;void 0!==s&&(Rr=s),void 0!==t&&(Dr=t),void 0!==n?Fr=n:e.rtl&&(Fr='topLeft'),void 0!==r&&(Nr=r),void 0!==i&&(Lr=i),void 0!==o&&(_r=o),void 0!==a&&(Tr=a),void 0!==e.rtl&&(Ir=e.rtl),void 0!==e.maxCount&&(Ar=e.maxCount)},destroy:function(){Object.keys(Mr).forEach((function(e){Promise.resolve(Mr[e]).then((function(e){e.destroy()})),delete Mr[e]}))}};['success','info','warning','error'].forEach((function(e){$r[e]=function(t){return $r.open(Object(I["a"])(Object(I["a"])({},t),{type:e}))}})),$r.warn=$r.warning,$r.useNotification=(Hr=Vr,Wr=Ur,function(){var e,t=null,n=Ut({add:function(e,n){null==t||t.component.add(e,n)}}),r=Object(W["a"])(n,2),i=r[0],o=r[1],a=B["useRef"]({});return a.current.open=function(n){var r=n.prefixCls,o=e('notification',r);Hr(Object(I["a"])(Object(I["a"])({},n),{prefixCls:o}),(function(e){var r=e.prefixCls,o=e.instance;t=o,i(Wr(n,r))}))},['success','info','warning','error'].forEach((function(e){a.current[e]=function(t){return a.current.open(Object(I["a"])(Object(I["a"])({},t),{type:e}))}})),[a.current,B["createElement"](Pr,{key:"holder"},(function(t){return e=t.getPrefixCls,o}))]});var qr=$r,Kr=function(){function e(t,n){var r;if(void 0===t&&(t=''),void 0===n&&(n={}),t instanceof e)return t;'number'==typeof t&&(t=function(e){return{r:e>>16,g:(65280&e)>>8,b:255&e}}(t)),this.originalInput=t;var i=ce(t);this.originalInput=t,this.r=i.r,this.g=i.g,this.b=i.b,this.a=i.a,this.roundA=Math.round(100*this.a)/100,this.format=null!==(r=n.format)&&void 0!==r?r:i.format,this.gradientType=n.gradientType,this.r<1&&(this.r=Math.round(this.r)),this.g<1&&(this.g=Math.round(this.g)),this.b<1&&(this.b=Math.round(this.b)),this.isValid=i.ok}return e.prototype.isDark=function(){return this.getBrightness()<128},e.prototype.isLight=function(){return!this.isDark()},e.prototype.getBrightness=function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},e.prototype.getLuminance=function(){var e=this.toRgb(),t=e.r/255,n=e.g/255,r=e.b/255;return.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(n<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:Math.pow((r+.055)/1.055,2.4))},e.prototype.getAlpha=function(){return this.a},e.prototype.setAlpha=function(e){return this.a=Q(e),this.roundA=Math.round(100*this.a)/100,this},e.prototype.toHsv=function(){var e=re(this.r,this.g,this.b);return{h:360*e.h,s:e.s,v:e.v,a:this.a}},e.prototype.toHsvString=function(){var e=re(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.v);return 1===this.a?"hsv(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsva(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHsl=function(){var e=te(this.r,this.g,this.b);return{h:360*e.h,s:e.s,l:e.l,a:this.a}},e.prototype.toHslString=function(){var e=te(this.r,this.g,this.b),t=Math.round(360*e.h),n=Math.round(100*e.s),r=Math.round(100*e.l);return 1===this.a?"hsl(".concat(t,", ").concat(n,"%, ").concat(r,"%)"):"hsla(".concat(t,", ").concat(n,"%, ").concat(r,"%, ").concat(this.roundA,")")},e.prototype.toHex=function(e){return void 0===e&&(e=!1),ie(this.r,this.g,this.b,e)},e.prototype.toHexString=function(e){return void 0===e&&(e=!1),'#'+this.toHex(e)},e.prototype.toHex8=function(e){return void 0===e&&(e=!1),function(e,t,n,r,i){var o=[ee(Math.round(e).toString(16)),ee(Math.round(t).toString(16)),ee(Math.round(n).toString(16)),ee(oe(r))];return i&&o[0].startsWith(o[0].charAt(1))&&o[1].startsWith(o[1].charAt(1))&&o[2].startsWith(o[2].charAt(1))&&o[3].startsWith(o[3].charAt(1))?o[0].charAt(0)+o[1].charAt(0)+o[2].charAt(0)+o[3].charAt(0):o.join('')}(this.r,this.g,this.b,this.a,e)},e.prototype.toHex8String=function(e){return void 0===e&&(e=!1),'#'+this.toHex8(e)},e.prototype.toRgb=function(){return{r:Math.round(this.r),g:Math.round(this.g),b:Math.round(this.b),a:this.a}},e.prototype.toRgbString=function(){var e=Math.round(this.r),t=Math.round(this.g),n=Math.round(this.b);return 1===this.a?"rgb(".concat(e,", ").concat(t,", ").concat(n,")"):"rgba(".concat(e,", ").concat(t,", ").concat(n,", ").concat(this.roundA,")")},e.prototype.toPercentageRgb=function(){var e=function(e){return"".concat(Math.round(100*J(e,255)),"%")};return{r:e(this.r),g:e(this.g),b:e(this.b),a:this.a}},e.prototype.toPercentageRgbString=function(){var e=function(e){return Math.round(100*J(e,255))};return 1===this.a?"rgb(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%)"):"rgba(".concat(e(this.r),"%, ").concat(e(this.g),"%, ").concat(e(this.b),"%, ").concat(this.roundA,")")},e.prototype.toName=function(){if(0===this.a)return'transparent';if(this.a<1)return!1;for(var e='#'+ie(this.r,this.g,this.b,!1),t=0,n=Object.entries(le);t<n.length;t++){var r=n[t],i=r[0];if(e===r[1])return i}return!1},e.prototype.toString=function(e){var t=Boolean(e);e=null!=e?e:this.format;var n=!1,r=this.a<1&&this.a>=0;return t||!r||!e.startsWith('hex')&&'name'!==e?('rgb'===e&&(n=this.toRgbString()),'prgb'===e&&(n=this.toPercentageRgbString()),'hex'!==e&&'hex6'!==e||(n=this.toHexString()),'hex3'===e&&(n=this.toHexString(!0)),'hex4'===e&&(n=this.toHex8String(!0)),'hex8'===e&&(n=this.toHex8String()),'name'===e&&(n=this.toName()),'hsl'===e&&(n=this.toHslString()),'hsv'===e&&(n=this.toHsvString()),n||this.toHexString()):'name'===e&&0===this.a?this.toName():this.toRgbString()},e.prototype.toNumber=function(){return(Math.round(this.r)<<16)+(Math.round(this.g)<<8)+Math.round(this.b)},e.prototype.clone=function(){return new e(this.toString())},e.prototype.lighten=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l+=t/100,n.l=X(n.l),new e(n)},e.prototype.brighten=function(t){void 0===t&&(t=10);var n=this.toRgb();return n.r=Math.max(0,Math.min(255,n.r-Math.round(255*(-t/100)))),n.g=Math.max(0,Math.min(255,n.g-Math.round(255*(-t/100)))),n.b=Math.max(0,Math.min(255,n.b-Math.round(255*(-t/100)))),new e(n)},e.prototype.darken=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.l-=t/100,n.l=X(n.l),new e(n)},e.prototype.tint=function(e){return void 0===e&&(e=10),this.mix('white',e)},e.prototype.shade=function(e){return void 0===e&&(e=10),this.mix('black',e)},e.prototype.desaturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s-=t/100,n.s=X(n.s),new e(n)},e.prototype.saturate=function(t){void 0===t&&(t=10);var n=this.toHsl();return n.s+=t/100,n.s=X(n.s),new e(n)},e.prototype.greyscale=function(){return this.desaturate(100)},e.prototype.spin=function(t){var n=this.toHsl(),r=(n.h+t)%360;return n.h=r<0?360+r:r,new e(n)},e.prototype.mix=function(t,n){void 0===n&&(n=50);var r=this.toRgb(),i=new e(t).toRgb(),o=n/100;return new e({r:(i.r-r.r)*o+r.r,g:(i.g-r.g)*o+r.g,b:(i.b-r.b)*o+r.b,a:(i.a-r.a)*o+r.a})},e.prototype.analogous=function(t,n){void 0===t&&(t=6),void 0===n&&(n=30);var r=this.toHsl(),i=360/n,o=[this];for(r.h=(r.h-(i*t>>1)+720)%360;--t;)r.h=(r.h+i)%360,o.push(new e(r));return o},e.prototype.complement=function(){var t=this.toHsl();return t.h=(t.h+180)%360,new e(t)},e.prototype.monochromatic=function(t){void 0===t&&(t=6);for(var n=this.toHsv(),r=n.h,i=n.s,o=n.v,a=[],s=1/t;t--;)a.push(new e({h:r,s:i,v:o})),o=(o+s)%1;return a},e.prototype.splitcomplement=function(){var t=this.toHsl(),n=t.h;return[this,new e({h:(n+72)%360,s:t.s,l:t.l}),new e({h:(n+216)%360,s:t.s,l:t.l})]},e.prototype.onBackground=function(t){var n=this.toRgb(),r=new e(t).toRgb();return new e({r:r.r+(n.r-r.r)*n.a,g:r.g+(n.g-r.g)*n.a,b:r.b+(n.b-r.b)*n.a})},e.prototype.triad=function(){return this.polyad(3)},e.prototype.tetrad=function(){return this.polyad(4)},e.prototype.polyad=function(t){for(var n=this.toHsl(),r=n.h,i=[this],o=360/t,a=1;a<t;a++)i.push(new e({h:(r+a*o)%360,s:n.s,l:n.l}));return i},e.prototype.equals=function(t){return this.toRgbString()===new e(t).toRgbString()},e}();var Gr="-ant-".concat(Date.now(),"-").concat(Math.random());function Yr(e,t){var n=function(e,t){var n={},r=function(e,t){var n=e.clone();return(n=(null==t?void 0:t(n))||n).toRgbString()},i=function(e,t){var i=new Kr(e),o=_e(i.toRgbString());n["".concat(t,"-color")]=r(i),n["".concat(t,"-color-disabled")]=o[1],n["".concat(t,"-color-hover")]=o[4],n["".concat(t,"-color-active")]=o[6],n["".concat(t,"-color-outline")]=i.clone().setAlpha(.2).toRgbString(),n["".concat(t,"-color-deprecated-bg")]=o[0],n["".concat(t,"-color-deprecated-border")]=o[2]};if(t.primaryColor){i(t.primaryColor,'primary');var o=new Kr(t.primaryColor),a=_e(o.toRgbString());a.forEach((function(e,t){n["primary-".concat(t+1)]=e})),n['primary-color-deprecated-l-35']=r(o,(function(e){return e.lighten(35)})),n['primary-color-deprecated-l-20']=r(o,(function(e){return e.lighten(20)})),n['primary-color-deprecated-t-20']=r(o,(function(e){return e.tint(20)})),n['primary-color-deprecated-t-50']=r(o,(function(e){return e.tint(50)})),n['primary-color-deprecated-f-12']=r(o,(function(e){return e.setAlpha(.12*e.getAlpha())}));var s=new Kr(a[0]);n['primary-color-active-deprecated-f-30']=r(s,(function(e){return e.setAlpha(.3*e.getAlpha())})),n['primary-color-active-deprecated-d-02']=r(s,(function(e){return e.darken(2)}))}t.successColor&&i(t.successColor,'success'),t.warningColor&&i(t.warningColor,'warning'),t.errorColor&&i(t.errorColor,'error'),t.infoColor&&i(t.infoColor,'info');var l=Object.keys(n).map((function(t){return"--".concat(e,"-").concat(t,": ").concat(n[t],";")}));return"\n  :root {\n    ".concat(l.join('\n'),"\n  }\n  ").trim()}(e,t);Object(Le["a"])()&&$e(n,"".concat(Gr,"-dynamic-theme"))}var Jr,Xr,Qr=B["createContext"](!1),Zr=function(e){var t=e.children,n=e.disabled,r=B["useContext"](Qr);return B["createElement"](Qr.Provider,{value:n||r},t)},ei=B["createContext"](void 0),ti=function(e){var t=e.children,n=e.size;return B["createElement"](ei.Consumer,null,(function(e){return B["createElement"](ei.Provider,{value:n||e},t)}))},ni=ei,ri=['getTargetContainer','getPopupContainer','renderEmpty','pageHeader','input','pagination','form'],ii='ant',oi='anticon';function ai(){return Jr||ii}function si(){return Xr||oi}var li=function(){return{getPrefixCls:function(e,t){return t||(e?"".concat(ai(),"-").concat(e):ai())},getIconPrefixCls:si,getRootPrefixCls:function(e,t){return e||(Jr||(t&&t.includes('-')?t.replace(/^(.*)-[^-]*$/,'$1'):ai()))}}},ci=function(e){var t,n,r=e.children,i=e.csp,o=e.autoInsertSpaceInButton,a=e.form,s=e.locale,l=e.componentSize,c=e.direction,u=e.space,f=e.virtual,d=e.dropdownMatchSelectWidth,h=e.legacyLocale,p=e.parentContext,g=e.iconPrefixCls,v=e.componentDisabled,m=B["useCallback"]((function(t,n){var r=e.prefixCls;if(n)return n;var i=r||p.getPrefixCls('');return t?"".concat(i,"-").concat(t):i}),[p.getPrefixCls,e.prefixCls]),y=Object(I["a"])(Object(I["a"])({},p),{csp:i,autoInsertSpaceInButton:o,locale:s||h,direction:c,space:u,virtual:f,dropdownMatchSelectWidth:d,getPrefixCls:m});ri.forEach((function(t){var n=e[t];n&&(y[t]=n)}));var b=Object(Xn["a"])((function(){return y}),y,(function(e,t){var n=Object.keys(e),r=Object.keys(t);return n.length!==r.length||n.some((function(n){return e[n]!==t[n]}))})),w=B["useMemo"]((function(){return{prefixCls:g,csp:i}}),[g,i]),O=r,x={};return s&&(x=(null===(t=s.Form)||void 0===t?void 0:t.defaultValidateMessages)||(null===(n=ir.Form)||void 0===n?void 0:n.defaultValidateMessages)||{}),a&&a.validateMessages&&(x=Object(I["a"])(Object(I["a"])({},x),a.validateMessages)),Object.keys(x).length>0&&(O=B["createElement"](Wn,{validateMessages:x},r)),s&&(O=B["createElement"](cr,{locale:s,_ANT_MARK__:lr},O)),(g||i)&&(O=B["createElement"](G.Provider,{value:w},O)),l&&(O=B["createElement"](ti,{size:l},O)),void 0!==v&&(O=B["createElement"](Zr,{disabled:v},O)),B["createElement"](Er.Provider,{value:b},O)},ui=function(e){return B["useEffect"]((function(){e.direction&&(Ti.config({rtl:'rtl'===e.direction}),qr.config({rtl:'rtl'===e.direction}))}),[e.direction]),B["createElement"](fr,null,(function(t,n,r){return B["createElement"](Pr,null,(function(t){return B["createElement"](ci,Object(I["a"])({parentContext:t,legacyLocale:r},e))}))}))};ui.ConfigContext=Er,ui.SizeContext=ni,ui.config=function(e){var t=e.prefixCls,n=e.iconPrefixCls,r=e.theme;void 0!==t&&(Jr=t),void 0!==n&&(Xr=n),r&&Yr(ai(),r)};var fi,di=ui;var hi,pi,gi,vi=3,mi=1,yi='',bi='move-up',wi=!1,Oi=!1;function xi(){return mi++}function ki(e,t){var n=e.prefixCls,r=e.getPopupContainer,i=li(),o=i.getPrefixCls,a=i.getRootPrefixCls,s=i.getIconPrefixCls,l=o('message',n||yi),c=a(e.rootPrefixCls,l),u=s();if(fi)t({prefixCls:l,rootPrefixCls:c,iconPrefixCls:u,instance:fi});else{var f={prefixCls:l,transitionName:wi?bi:"".concat(c,"-").concat(bi),style:{top:hi},getContainer:pi||r,maxCount:gi};Gt.newInstance(f,(function(e){fi?t({prefixCls:l,rootPrefixCls:c,iconPrefixCls:u,instance:fi}):(fi=e,t({prefixCls:l,rootPrefixCls:c,iconPrefixCls:u,instance:e}))}))}}var Ci={info:gt,success:at,error:ct,warning:dt,loading:bt},Si=Object.keys(Ci);function ji(e,t,n){var r,i=void 0!==e.duration?e.duration:vi,o=Ci[e.type],a=K()("".concat(t,"-custom-content"),(r={},Object(z["a"])(r,"".concat(t,"-").concat(e.type),e.type),Object(z["a"])(r,"".concat(t,"-rtl"),!0===Oi),r));return{key:e.key,duration:i,style:e.style||{},className:e.className,content:B["createElement"](di,{iconPrefixCls:n},B["createElement"]("div",{className:a},e.icon||o&&B["createElement"](o,null),B["createElement"]("span",null,e.content))),onClose:e.onClose,onClick:e.onClick}}var Ei={open:function(e){var t=e.key||xi(),n=new Promise((function(n){var r=function(){return'function'==typeof e.onClose&&e.onClose(),n(!0)};ki(e,(function(n){var i=n.prefixCls,o=n.iconPrefixCls;n.instance.notice(ji(Object(I["a"])(Object(I["a"])({},e),{key:t,onClose:r}),i,o))}))})),r=function(){fi&&fi.removeNotice(t)};return r.then=function(e,t){return n.then(e,t)},r.promise=n,r},config:function(e){void 0!==e.top&&(hi=e.top,fi=null),void 0!==e.duration&&(vi=e.duration),void 0!==e.prefixCls&&(yi=e.prefixCls),void 0!==e.getContainer&&(pi=e.getContainer,fi=null),void 0!==e.transitionName&&(bi=e.transitionName,fi=null,wi=!0),void 0!==e.maxCount&&(gi=e.maxCount,fi=null),void 0!==e.rtl&&(Oi=e.rtl)},destroy:function(e){if(fi)if(e){(0,fi.removeNotice)(e)}else{var t=fi.destroy;t(),fi=null}}};function Pi(e,t){e[t]=function(n,r,i){return function(e){return'[object Object]'===Object.prototype.toString.call(e)&&!!e.content}(n)?e.open(Object(I["a"])(Object(I["a"])({},n),{type:t})):('function'==typeof r&&(i=r,r=void 0),e.open({content:n,duration:r,type:t,onClose:i}))}}Si.forEach((function(e){return Pi(Ei,e)})),Ei.warn=Ei.warning,Ei.useMessage=function(e,t){return function(){var n,r,i=null,o=Ut({add:function(e,t){null==i||i.component.add(e,t)}}),a=Object(W["a"])(o,2),s=a[0],l=a[1];var c=B["useRef"]({});return c.current.open=function(o){var a=o.prefixCls,l=n('message',a),c=n(),u=o.key||xi(),f=new Promise((function(n){var a=function(){return'function'==typeof o.onClose&&o.onClose(),n(!0)};e(Object(I["a"])(Object(I["a"])({},o),{prefixCls:l,rootPrefixCls:c,getPopupContainer:r}),(function(e){var n=e.prefixCls,r=e.instance;i=r,s(t(Object(I["a"])(Object(I["a"])({},o),{key:u,onClose:a}),n))}))})),d=function(){i&&i.removeNotice(u)};return d.then=function(e,t){return f.then(e,t)},d.promise=f,d},Si.forEach((function(e){return Pi(c.current,e)})),[c.current,B["createElement"](Pr,{key:"holder"},(function(e){return n=e.getPrefixCls,r=e.getPopupContainer,l}))]}}(ki,ji);var _i,Ti=Ei,Ai=["pfx","ppfx","em"],Mi=c.a.View.extend({events:{submit:'handleSubmit'},template:function(e){var t=e.pfx,n=e.ppfx,r=e.em,i=(F()(e,Ai),'');return this.config.showUrlInput&&(i="\n          <form class=\"".concat(t,"add-asset\">\n            <div class=\"").concat(n,"field ").concat(t,"add-field\">\n              <input placeholder=\"").concat(r&&r.t('assetManager.inputPlh'),"\"/>\n            </div>\n            <button class=\"").concat(n,"btn-prim\">").concat(r&&r.t('assetManager.addButton'),"</button>\n            <div style=\"clear:both\"></div>\n          </form>\n      ")),"\n    <div class=\"".concat(t,"assets-cont\">\n      <div class=\"").concat(t,"assets-header\">\n        ").concat(i,"\n      </div>\n      <div class=\"").concat(t,"assets\" data-el=\"assets\"></div>\n      <div style=\"clear:both\"></div>\n    </div>\n    ")},initialize:function(e){this.options=e,this.config=e.config,this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.em=this.config.em;var t=this.collection;this.listenTo(t,'reset',this.renderAssets),this.listenTo(t,'add',this.addToAsset),this.listenTo(t,'remove',this.removedAsset),this.listenTo(t,'deselectAll',this.deselectAll)},handleFileUpload:function(e){var t=this.config.handleAdd;e&&(this.getAssetsEl().scrollTop=0,t?t.bind(this)(e):this.options.globalCollection.add(e,{at:0}),Ti.destroy(),Ti.success("Success!"))},handleSubmit:function(e){e.preventDefault();var t=this.getAddInput(),n=t&&t.value.trim(),r=this.config.handleAdd;n&&(t.value='',this.getAssetsEl().scrollTop=0,r?r.bind(this)(n):this.options.globalCollection.add(n,{at:0}))},getAssetsEl:function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},getAddInput:function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},removedAsset:function(e){this.collection.length||this.toggleNoAssets()},addToAsset:function(e){1==this.collection.length&&this.toggleNoAssets(1),this.addAsset(e)},addAsset:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=e.attributes.src,r=this.collection.target.ccid,i=t,o=this.collection,a=this.config,s=new e.typeView({model:e,collection:o,config:a}).render().el;if(i)i.appendChild(s);else{var l=this.getAssetsEl();l&&l.insertBefore(s,l.firstChild)}var c={},u={src:n,id:r};return c.opts=u,c.action='set-image-src',M["c"]==M["d"].Synced?(Object(M["h"])(M["d"].ApplyingLocalOp),Object(M["b"])(c)):M["c"]!=M["d"].AwaitingACK&&M["c"]!=M["d"].AwaitingWithBuffer||(Object(M["h"])(M["d"].ApplyingBufferedLocalOp),Object(M["a"])(c)),s},toggleNoAssets:function(e){var t=this.$el.find(".".concat(this.pfx,"assets"));if(e)t.empty();else{var n=this.config.noAssets;n&&t.append(n)}},deselectAll:function(){var e=this.pfx;this.$el.find(".".concat(e,"highlight")).removeClass("".concat(e,"highlight"))},renderAssets:function(){var e=this,t=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(this.collection.length),this.collection.each((function(n){return e.addAsset(n,t)})),n.append(t)},render:function(){var e=this.options.fu.render().el;return this.$el.empty(),this.$el.append(e).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this}}),Di=n(77),Li=n(53),Ni=n.n(Li),Ri=n(57);function Fi(e,t){var n="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!n){if(Array.isArray(e)||(n=function(e,t){if(!e)return;if("string"==typeof e)return Ii(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);"Object"===n&&e.constructor&&(n=e.constructor.name);if("Map"===n||"Set"===n)return Array.from(e);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ii(e,t)}(e))||t&&e&&"number"==typeof e.length){n&&(e=n);var r=0,i=function(){};return{s:i,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){n=n.call(e)},n:function(){var e=n.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==n.return||n.return()}finally{if(s)throw o}}}}function Ii(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var zi=c.a.View.extend({template:function(e){var t=e.pfx,n=e.title,r=e.uploadId,i=e.disabled,o=e.multiUpload;return Object(A["a"])(_i||(_i=_()(["\n        <form>\n          <div id=\"","title\">","</div>\n          <input\n            type=\"file\"\n            id=\"","\"\n            name=\"file\"\n            accept=\"*/*\"\n            ","\n            ","\n          />\n          <div style=\"clear:both;\"></div>\n        </form>\n      "])),t,n,r,i?'disabled':'',o?'multiple':'')},events:{},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.options=e;var t=e.config||{};this.module=e.module,this.config=t,this.em=this.config.em,this.pfx=t.stylePrefix||'',this.ppfx=t.pStylePrefix||'',this.target=this.options.globalCollection||{},this.uploadId=this.pfx+'uploadFile',this.disabled=void 0!==t.disableUpload?t.disableUpload:!t.upload&&!t.embedAsBase64,this.multiUpload=void 0===t.multiUpload||t.multiUpload,this.events['change #'+this.uploadId]='uploadFile';var n=t.uploadFile;n?this.uploadFile=n.bind(this):!t.upload&&t.embedAsBase64&&(this.uploadFile=this.constructor.embedAsBase64),this.delegateEvents()},onUploadStart:function(){var e=this.module;e&&e.__propEv('asset:upload:start')},onUploadEnd:function(e){var t=this.$el,n=this.module;n&&n.__propEv('asset:upload:end',e);var r=t.find('input');r&&r.val('')},onUploadError:function(e){var t=this.module;console.error(e),this.onUploadEnd(e),t&&t.__propEv('asset:upload:error',e)},onUploadResponse:function(e,t){var n,r=this.module,i=this.config,o=this.target;try{n='string'==typeof e?JSON.parse(e):e}catch(t){n=e}r&&r.__propEv('asset:upload:response',n),i.autoAdd&&o&&o.add(n.data,{at:0}),this.onUploadEnd(e),t&&t(n)},uploadFile:function(e,t){var n=this,r=e.dataTransfer?e.dataTransfer.files:e.target.files,i=this.config,o=i.beforeUpload;if(!1!==(o&&o(r))){var a=new FormData,s=i.params,l=i.customFetch;for(var c in s)a.append(c,s[c]);if(this.multiUpload)for(var u=0;u<r.length;u++)a.append("".concat(i.uploadName,"[]"),r[u]);else r.length&&a.append(i.uploadName,r[0]);this.target;var f=i.upload,d=i.headers,h='X-Requested-With';if(void 0===d[h]&&(d[h]='XMLHttpRequest'),f){this.onUploadStart();var p={method:'post',credentials:i.credentials||'include',headers:d,body:a};return(l?l(f,p):Object(Di["a"])(f,p).then((function(e){return 1==(e.status/200|0)?e.text():e.text().then((function(e){return Promise.reject(e)}))}))).then((function(e){return n.onUploadResponse(e,t)})).catch((function(e){return n.onUploadError(e)}))}}},initDrop:function(){var e=this;if(!this.uploadForm&&(this.uploadForm=this.$el.find('form').get(0),'draggable'in this.uploadForm)){this.uploadFile;this.uploadForm.ondragover=function(){return this.className=e.pfx+'hover',!1},this.uploadForm.ondragleave=function(){return this.className='',!1},this.uploadForm.ondrop=function(t){this.className='',t.preventDefault(),e.uploadFile(t)}}},initDropzone:function(e){var t=this,n=0,r=this.config,i=e.model,o=e.el,a=i.get('Editor'),s=(i.get('Config').el,i.get('Canvas').getBody()),l=this.ppfx,c="".concat(l,"dropzone-active"),u="".concat(l,"dropzone"),f=function(){o.className=o.className.replace(c,'').trim(),n=0},d=function(){return n||(o.className+=" ".concat(c),n=1),!1},h=function(){return f(),!1},p=function(e){if(f(),e.preventDefault(),e.stopPropagation(),t.uploadFile(e),r.openAssetsOnDrop&&a){var n=a.getSelected();a.runCommand('open-assets',{target:n,onSelect:function(){a.Modal.close(),a.AssetManager.setTarget(null)}})}return!1};e.$el.append("<div class=\"".concat(u,"\">").concat(r.dropzoneContent,"</div>")),f(),'draggable'in o&&[o,s].forEach((function(e){e.ondragover=d,e.ondragleave=h,e.ondrop=p}))},render:function(){var e=this.$el,t=this.pfx,n=this.em;return e.html(this.template({title:n&&n.t('assetManager.uploadTitle'),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:t})),this.initDrop(),e.attr('class',t+'file-uploader'),this}},{embedAsBase64:function(e,t){var n=this,r=e.dataTransfer?e.dataTransfer.files:e.target.files;if(FileReader){var i,o=[],a=/^(.+)\/(.+)$/,s=new Ri["a"](document.cookie),l=this.em.config.url,c=Fi(r);try{var u=function(){var e=i.value,t=new Promise((function(t,r){var i=new FileReader;i.addEventListener('load',(function(t){e.name;var r=a.exec(e.type);r?r[1]:e.type,Ti.info("Image uploading...",0),Ni.a.put("".concat(l,"picture/imgur"),{base64:i.result.split(',')[1]},{headers:{Authorization:'Bearer '+s.getCookieByName('token')}}).then((function(e){var t=e.data.link;n.module.AssetsView().handleFileUpload(t)})).catch((function(e){console.log(e),Ti.destroy(),Ti.error("Error!")}))})),i.addEventListener('error',(function(e){r(e)})),i.addEventListener('abort',(function(e){r('Aborted')})),i.readAsDataURL(e)}));o.push(t)};for(c.s();!(i=c.n()).done;)u()}catch(e){c.e(e)}finally{c.f()}}else this.onUploadError(new Error('Unsupported platform, FileReader is not defined'))}});function Vi(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Bi(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Vi(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Vi(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ui='asset',Hi="".concat(Ui,":"),Wi="".concat(Hi,"select"),$i="".concat(Hi,"update"),qi="".concat(Hi,"add"),Ki="".concat(Hi,"remove"),Gi="".concat(Ki,":before"),Yi="".concat(Hi,"custom"),Ji="".concat(Hi,"open"),Xi="".concat(Hi,"close"),Qi="".concat(Hi,"upload"),Zi="".concat(Qi,":start"),eo="".concat(Qi,":end"),to="".concat(Qi,":error"),no="".concat(Qi,":response");t["default"]=function(){var e,t,n,r,i={},l='open-assets';return Bi(Bi({},a["a"]),{},{name:'AssetManager',storageKey:'assets',Asset:N,Assets:N,am:n,events:{all:Ui,select:Wi,update:$i,add:qi,remove:Ki,removeBefore:Gi,custom:Yi,open:Ji,close:Xi,uploadStart:Zi,uploadEnd:eo,uploadError:to,uploadResponse:no},init:function(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=(i=Bi(Bi({},s),r)).pStylePrefix,a=i,l=a.em;return this.config=i,this.em=l,o&&(i.stylePrefix=o+i.stylePrefix),e=new N([]),t=new N([]),this.all=e,this.__initListen(),e.on('add',(function(e){return n.getAllVisible().add(e)})),e.on('remove',(function(e){return n.getAllVisible().remove(e)})),this},__propEv:function(e){for(var t,n,r=arguments.length,i=new Array(r>1?r-1:0),o=1;o<r;o++)i[o-1]=arguments[o];(t=this.em).trigger.apply(t,[e].concat(i)),(n=this.getAll()).trigger.apply(n,[e].concat(i))},__onAllEvent:Object(o["debounce"])((function(){this.__trgCustom()})),__trgCustom:function(){(this.__getBehaviour().container||this.getConfig('custom').open)&&this.em.trigger(this.events.custom,this.__customData())},__customData:function(){var e=this,t=this.__getBehaviour();return{am:this,open:this.isOpen(),assets:this.getAll().models,types:t.types||[],container:t.container,close:function(){return e.close()},remove:function(){return e.remove.apply(e,arguments)},select:function(n,r){var i=e.add(n);Object(o["isFunction"])(t.select)&&t.select(i,r)},options:t.options||{}}},open:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.em.get('Commands');t.run(l,Bi({types:['image'],select:function(){}},e))},close:function(){this.em.get('Commands').stop(l)},isOpen:function(){var e=this.em.get('Commands');return!(!e||!e.isActive(l))},add:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return void 0===n.at&&(n.at=0),e.add(t,n)},get:function(t){return e.where({src:t})[0]||null},getAll:function(){return e},getAllVisible:function(){return t},remove:function(e,t){return this.__remove(e,t)},store:function(e){var t={},n=JSON.stringify(this.getAll().toJSON());return t[this.storageKey]=n,!e&&i.stm&&i.stm.store(t),t},load:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.storageKey,n=e[t]||[];if('string'==typeof n)try{n=JSON.parse(e[t])}catch(e){}return n&&n.length&&this.getAll().reset(n),n},getContainer:function(){return this.__getBehaviour().container||n&&n.el},getAssetsEl:function(){return n.el.querySelector('[data-el=assets]')},render:function(e){if(!this.getConfig('custom')){var r=e||this.getAll().models;if(!n){var i=this.__viewParams();i.fu=this.FileUploader();var o=n&&n.el;(n=new Mi(Bi({el:o},i))).render()}return t.reset(r),this.getContainer()}},__viewParams:function(){return{collection:t,globalCollection:e,config:i,module:this}},addType:function(e,t){this.getAll().addType(e,t)},getType:function(e){return this.getAll().getType(e)},getTypes:function(){return this.getAll().getTypes()},AssetsView:function(){return n},FileUploader:function(){return r||(r=new zi(this.__viewParams())),r},onLoad:function(){var e=this;this.getAll().reset(i.assets);var t=this.em,n=this.events;t.on("run:".concat(l),(function(){return e.__propEv(n.open)})),t.on("stop:".concat(l),(function(){return e.__propEv(n.close)}))},postRender:function(e){i.dropzone&&r&&r.initDropzone(e)},setTarget:function(e){t.target=e},onSelect:function(e){t.onSelect=e},onClick:function(e){i.onClick=e},onDblClick:function(e){i.onDblClick=e},__behaviour:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._bhv=Bi(Bi({},this._bhv||{}),e)},__getBehaviour:function(){return this._bhv||{}},destroy:function(){e.stopListening(),t.stopListening(),e.reset(),t.reset(),r&&r.remove(),n&&n.remove(),[e,t,n,r].forEach((function(e){return null})),this._bhv={},this.all={},i={}}})}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(22),a=n.n(o),s=n(0),l={stylePrefix:'comp-',components:[],draggableComponents:1,storeWrapper:0,processor:0,voidElements:['area','base','br','col','embed','hr','img','input','keygen','link','menuitem','meta','param','source','track','wbr']},c=n(13),u=n(32),f=n(17),d=n(87),h=n(1);function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=c["a"].extend({defaults:g(g({},c["a"].prototype.defaults),{},{type:'cell',tagName:'td',draggable:['tr']})},{isComponent:function(e){return['td','th'].indexOf(Object(h["toLowerCase"])(e.tagName))>=0}}),m=f["default"].extend({});function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var w='tr',O=c["a"].extend({defaults:b(b({},c["a"].prototype.defaults),{},{tagName:w,draggable:['thead','tbody','tfoot'],droppable:['th','td']})},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===w}}),x=f["default"].extend({});function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function C(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?k(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var S='table',j=c["a"].extend({defaults:C(C({},c["a"].prototype.defaults),{},{type:S,tagName:S,droppable:['tbody','thead','tfoot']}),initialize:function(e,t){c["a"].prototype.initialize.apply(this,arguments);var n=this.get('components');!n.length&&n.add({type:'tbody'})}},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===S}}),E=f["default"].extend({events:{}});function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T='tbody',A=c["a"].extend({defaults:_(_({},c["a"].prototype.defaults),{},{type:T,tagName:T,draggable:['table'],droppable:['tr'],columns:1,rows:1}),initialize:function(e,t){c["a"].prototype.initialize.apply(this,arguments);var n=this.get('components'),r=this.get('columns'),i=this.get('rows');if(!n.length){for(var o=[];i--;){for(var a=[],s=r;s--;)a.push({type:'cell',classes:['cell']});o.push({type:'row',classes:['row'],components:a})}n.add(o)}}},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===T}});function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L='thead',N=A.extend({defaults:D(D({},A.prototype.defaults),{},{type:L,tagName:L})},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===L}}),R=f["default"].extend({}),F=f["default"].extend({});function I(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function z(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?I(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):I(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var V='tfoot',B=A.extend({defaults:z(z({},A.prototype.defaults),{},{type:V,tagName:V})},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===V}}),U=f["default"].extend({});function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $='xmlns="http://www.w3.org/2000/svg" width="100" viewBox="0 0 24 24" style="fill: rgba(0,0,0,0.15); transform: scale(0.75)"',q=c["a"].extend({defaults:W(W({},c["a"].prototype.defaults),{},{type:'image',tagName:'img',void:!0,droppable:0,editable:1,highlightable:0,resizable:{ratioDefault:1},traits:['alt'],src:"<svg ".concat($,">\n        <path d=\"M8.5 13.5l2.5 3 3.5-4.5 4.5 6H5m16 1V5a2 2 0 0 0-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2z\"></path>\n      </svg>"),fallback:"<svg ".concat($,">\n        <path d=\"M2.28 3L1 4.27l2 2V19c0 1.1.9 2 2 2h12.73l2 2L21 21.72 2.28 3m2.55 0L21 19.17V5a2 2 0 0 0-2-2H4.83M8.5 13.5l2.5 3 1-1.25L14.73 18H5l3.5-4.5z\"></path>\n      </svg>"),file:''}),initialize:function(e,t){c["a"].prototype.initialize.apply(this,arguments);var n=this.get('attributes'),r=n.src;r&&this.set('src',r,{silent:1})},initToolbar:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];c["a"].prototype.initToolbar.apply(this,t);var r=this.em;if(r){var i=r.get('Commands'),o='image-editor';if(i.has(o)){for(var a=!1,s=this.get('toolbar'),l=0;l<s.length;l++)if('image-editor'===s[l].command){a=!0;break}a||(s.push({attributes:{class:'fa fa-pencil'},command:o}),this.set('toolbar',s))}}},getAttrToHTML:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=c["a"].prototype.getAttrToHTML.apply(this,t),i=this.getSrcResult();return i&&(r.src=i),r},getSrcResult:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.get(e.fallback?'fallback':'src')||'',n=t;return t&&'<svg'===t.substr(0,4)&&(n="data:image/svg+xml;base64,".concat(window.btoa(t))),n},isDefaultSrc:function(){return this.get('src')===Object(s["result"])(this,'defaults').src},toJSON:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=c["a"].prototype.toJSON.apply(this,t);return r.attributes&&r.src===r.attributes.src&&delete r.src,r},parseUri:function(e){var t=document.createElement('a');t.href=e;for(var n={},r=t.search.substring(1).split('&'),i=0;i<r.length;i++){var o=r[i].split('='),a=decodeURIComponent(o[0]);a&&(n[a]=decodeURIComponent(o[1]))}return{hostname:t.hostname,pathname:t.pathname,protocol:t.protocol,search:t.search,hash:t.hash,port:t.port,query:n}}},{isComponent:function(e){return'img'===Object(h["toLowerCase"])(e.tagName)}});function K(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function G(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?K(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):K(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Y=q.extend({defaults:G(G({},q.prototype.defaults),{},{type:'map',src:'',void:0,mapUrl:'https://maps.google.com/maps',tagName:'iframe',mapType:'q',address:'',zoom:'1',attributes:{frameborder:0},toolbar:c["a"].prototype.defaults.toolbar,traits:[{label:'Address',name:'address',placeholder:'eg. London, UK',changeProp:1},{type:'select',label:'Map type',name:'mapType',changeProp:1,options:[{value:'q',name:'Roadmap'},{value:'w',name:'Satellite'}]},{label:'Zoom',name:'zoom',type:'range',min:'1',max:'20',changeProp:1}]}),initialize:function(e,t){this.get('src')?this.parseFromSrc():this.updateSrc(),q.prototype.initialize.apply(this,arguments),this.listenTo(this,'change:address change:zoom change:mapType',this.updateSrc)},updateSrc:function(){this.set('src',this.getMapUrl())},getMapUrl:function(){var e=this.get('address'),t=this.get('zoom'),n=this.get('mapType');e=e?'&q='+e:'',t=t?'&z='+t:'',n=n?'&t='+n:'';var r=this.get('mapUrl')+'?'+e+t+n;return r+='&output=embed'},parseFromSrc:function(){var e=this.parseUri(this.get('src')).query;e.q&&this.set('address',e.q),e.z&&this.set('zoom',e.z),e.t&&this.set('mapType',e.t)}},{isComponent:function(e){var t='';return'iframe'==Object(h["toLowerCase"])(e.tagName)&&/maps\.google\.com/.test(e.src)&&(t={type:'map',src:e.src}),t}}),J=(n(4),f["default"].extend({tagName:'img',events:{dblclick:'onActive',click:'initResize',error:'onError',load:'onLoad',dragstart:'noDrag'},initialize:function(e){f["default"].prototype.initialize.apply(this,arguments),this.listenTo(this.model,'change:src',this.updateSrc),this.classEmpty="".concat(this.ppfx,"plh-image"),this.fetchFile()},fetchFile:function(){if(!this.modelOpt.temporary){var e=this.model,t=this.em,n=e.get('file');if(n&&t){var r=t.get('AssetManager').FileUploader();null==r||r.uploadFile({dataTransfer:{files:[n]}},(function(t){var n=t&&t.data&&t.data[0],r=n&&(Object(s["isString"])(n)?n:n.src);r&&e.set({src:r})})),e.set('file','')}}},updateSrc:function(){var e=this.model,t=this.classEmpty,n=this.$el,r=e.getSrcResult(),i=r&&!e.isDefaultSrc();e.addAttributes({src:r}),n[i?'removeClass':'addClass'](t)},onActive:function(e){e&&e.stopPropagation();var t=this.em,n=this.model,r=t&&t.get('AssetManager');r&&n.get('editable')&&r.open({select:function(e,t){n.set({src:e.getSrc()}),t&&r.close()},target:n,types:['image'],accept:'image/*'})},onError:function(){var e=this.model.getSrcResult({fallback:1});e&&(this.el.src=e)},onLoad:function(){this.em.trigger('change:canvasOffset')},noDrag:function(e){return e.preventDefault(),!1},render:function(){if(this.renderAttributes(),this.modelOpt.temporary)return this;this.updateSrc();var e=this.$el,t=this.model,n=e.attr('class')||'';return!t.get('src')&&e.attr('class',"".concat(n," ").concat(this.classEmpty).trim()),this.postRender(),this}})),X=J.extend({tagName:'div',events:{},initialize:function(e){J.prototype.initialize.apply(this,arguments),this.classEmpty=this.ppfx+'plh-map'},updateSrc:function(){this.getIframe().src=this.model.get('src')},getIframe:function(){if(!this.iframe){var e=document.createElement('iframe');e.src=this.model.get('src'),e.frameBorder=0,e.style.height='100%',e.style.width='100%',e.className=this.ppfx+'no-pointer',this.iframe=e}return this.iframe},render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return J.prototype.render.apply(this,t),this.updateClasses(),this.el.appendChild(this.getIframe()),this}}),Q=n(9),Z=n.n(Q),ee=n(8),te=n.n(ee),ne=n(10),re=n.n(ne),ie=n(11),oe=n.n(ie),ae=n(5),se=n.n(ae);function le(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ce(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?le(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):le(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=se()(e);if(t){var i=se()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return oe()(this,n)}}var fe=function(e){re()(n,e);var t=ue(n);function n(){return te()(this,n),t.apply(this,arguments)}return Z()(n)}(c["a"]);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}fe.prototype.defaults=ce(ce({},c["a"].getDefaults()),{},{type:'text',droppable:!1,editable:!0});var pe=fe.extend({defaults:he(he({},fe.prototype.defaults),{},{type:'link',tagName:'a',traits:['title','href','target']}),getAttrToHTML:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=fe.prototype.getAttrToHTML.apply(this,t);return delete r.onmousedown,r}},{isComponent:function(e){var t;if('a'===Object(h["toLowerCase"])(e.tagName)){t={type:'link',editable:0};var n=e.childNodes,r=n.length;r||delete t.editable;for(var i=0;i<r;i++){var o=n[i];if(3==o.nodeType&&''!=o.textContent.trim()){delete t.editable;break}}}return t}}),ge=n(56),ve=n.n(ge),me=n(46),ye=n.n(me),be=n(6);function we(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?we(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):we(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var xe=f["default"].prototype,ke=f["default"].extend({events:{dblclick:'onActive',input:'onInput'},initialize:function(e){xe.initialize.apply(this,arguments),Object(s["bindAll"])(this,'disableEditing','onDisable');var t=this.model,n=this.em;this.listenTo(t,'focus',this.onActive),this.listenTo(t,'change:content',this.updateContentText),this.listenTo(t,'sync:content',this.syncContent),this.rte=n&&n.get('RichTextEditor')},updateContentText:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.fromDisable&&this.disableEditing()},canActivate:function(){var e,t=this.model,n=this.rteEnabled,r=this.em,i=(null==r?void 0:r.getEditing())===t,o=!0,a=!1;if((n||!t.get('editable')||i||(a=t.isChildOf('text')))&&(o=!1,a&&!t.get('textable'))){for(var s=t.parent();s&&!s.isInstanceOf('text');)s=s.parent();e=s}return{result:o,delegate:e}},onActive:function(e){var t=this;return ve()(ye.a.mark((function n(){var r,i,o,a,s,l;return ye.a.wrap((function(n){for(;1;)switch(n.prev=n.next){case 0:if(i=t.rte,o=t.em,a=t.canActivate(),s=a.result,l=a.delegate,s){n.next=5;break}return l&&(o.setSelected(l),l.trigger('active',e)),n.abrupt("return");case 5:if(null==e||null===(r=e.stopPropagation)||void 0===r||r.call(e),t.lastContent=t.getContent(),!i){n.next=17;break}return n.prev=8,n.next=11,i.enable(t,t.activeRte,{event:e});case 11:t.activeRte=n.sent,n.next=17;break;case 14:n.prev=14,n.t0=n["catch"](8),o.logError(n.t0);case 17:t.toggleEvents(1);case 18:case"end":return n.stop()}}),n,null,[[8,14]])})))()},onDisable:function(){this.disableEditing()},disableEditing:function(){var e=arguments,t=this;return ve()(ye.a.mark((function n(){var r,i,o,a,s,l;return ye.a.wrap((function(n){for(;1;)switch(n.prev=n.next){case 0:if(r=e.length>0&&void 0!==e[0]?e[0]:{},i=t.model,o=t.rte,a=t.activeRte,s=t.em,l=i&&i.get('editable'),!o){n.next=13;break}return n.prev=4,n.next=7,o.disable(t,a);case 7:n.next=12;break;case 9:n.prev=9,n.t0=n["catch"](4),s.logError(n.t0);case 12:l&&t.getContent()!==t.lastContent&&(t.syncContent(r),t.lastContent='');case 13:t.toggleEvents();case 14:case"end":return n.stop()}}),n,null,[[4,9]])})))()},getContent:function(){var e=this.activeRte;return e&&'function'==typeof e.getContent?e.getContent():this.getChildrenContainer().innerHTML},syncContent:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.model,n=this.rte,r=this.rteEnabled;if(r||e.force){var i=this.getContent(),o=t.components(),a=Oe({fromDisable:1},e);t.set('content','',a);var s=t.getId(),l={id:s,rteCustomRte:n.customRte,rteEnabled:r,content:i,opts:e};n.customRte?(o.length&&o.reset(null,e),t.set('content',i,a)):o.resetFromString(i,e);var c={action:'update-content',opts:l};be["c"]==be["d"].Synced?(Object(be["h"])(be["d"].ApplyingLocalOp),Object(be["b"])(c)):be["c"]!=be["d"].AwaitingACK&&be["c"]!=be["d"].AwaitingWithBuffer||(Object(be["h"])(be["d"].ApplyingBufferedLocalOp),Object(be["a"])(c))}},insertComponent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model,r=this.el,i=r.ownerDocument,o=i.getSelection();if(null!=o&&o.rangeCount){var a,s=o.getRangeAt(0),l=s.startContainer,c=s.startOffset,u=Object(h["getModel"])(l),f=[];if(u&&null!==(a=u.is)&&void 0!==a&&a.call(u,'textnode')){var d=u.collection;d.forEach((function(t){if(t===u){var n='textnode',r=t.get('content');f.push({type:n,content:r.slice(0,c)}),f.push(e),f.push({type:n,content:r.slice(c)})}else f.push(t)}));var p=f.filter(Boolean),g=p.indexOf(e);return d.reset(p,t),d.at(g)}}return n.append(e,t)},onInput:function(){var e=this.em,t='component',n=["".concat(t,":update"),"".concat(t,":input")].join(' ');e&&e.trigger(n,this.model)},disablePropagation:function(e){e.stopPropagation()},toggleEvents:function(e){var t=this.em,n=this.model,r=this.$el,i={on:h["on"],off:h["off"]},o=e?'on':'off';t.setEditing(e?this:0),this.rteEnabled=!!e;var a=[this.el.ownerDocument,document];if(i.off(a,'mousedown',this.onDisable),i[o](a,'mousedown',this.onDisable),t[o]('toolbar:run:before',this.onDisable),n&&(n[o]('removed',this.onDisable),n.trigger("rte:".concat(e?'enable':'disable'))),r&&r.off('mousedown',this.disablePropagation),r&&r[o]('mousedown',this.disablePropagation),this.config.draggableComponents)for(var s=this.el;s;)s.draggable=!e,(s=s.parentNode)&&'BODY'==s.tagName&&(s=0)}}),Ce=ke.extend({render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return ke.prototype.render.apply(this,t),this.el.addEventListener('click',this.prevDef,!0),this}});function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ee='label',Pe=fe.extend({defaults:je(je({},fe.prototype.defaults),{},{type:Ee,tagName:Ee,traits:['id','title','for']})},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===Ee}}),_e=Ce.extend({tagName:'span'});function Te(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ae(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Te(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Te(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Me='video',De='yt',Le='vi',Ne='ytnc',Re=q.extend({defaults:Ae(Ae({},q.prototype.defaults),{},{type:Me,tagName:Me,videoId:'',void:0,provider:'so',ytUrl:'https://www.youtube.com/embed/',ytncUrl:'https://www.youtube-nocookie.com/embed/',viUrl:'https://player.vimeo.com/video/',loop:0,poster:'',muted:0,autoplay:0,controls:1,color:'',list:'',rel:1,modestbranding:0,sources:[],attributes:{allowfullscreen:'allowfullscreen'}}),initialize:function(e,t){this.em=t.em,this.get('src')&&this.parseFromSrc(),this.updateTraits(),this.listenTo(this,'change:provider',this.updateTraits),this.listenTo(this,'change:videoId change:provider',this.updateSrc),q.prototype.initialize.apply(this,arguments)},updateTraits:function(){var e,t='iframe';switch(this.get('provider')){case De:case Ne:e=this.getYoutubeTraits();break;case Le:e=this.getVimeoTraits();break;default:t='video',e=this.getSourceTraits()}this.set({tagName:t},{silent:1}),this.set({traits:e}),this.em.trigger('component:toggled')},parseFromSrc:function(){var e=this.get('provider'),t=this.parseUri(this.get('src')),n=t.query;switch(e){case De:case Ne:case Le:var r=t.pathname.split('/').pop();this.set('videoId',r),n.list&&this.set('list',n.list),n.autoplay&&this.set('autoplay',1),n.loop&&this.set('loop',1),0===parseInt(n.controls)&&this.set('controls',0),n.color&&this.set('color',n.color),'0'===n.rel&&this.set('rel',0),'1'===n.modestbranding&&this.set('modestbranding',1)}},updateSrc:function(){var e='';switch(this.get('provider')){case De:e=this.getYoutubeSrc();break;case Ne:e=this.getYoutubeNoCookieSrc();break;case Le:e=this.getVimeoSrc()}this.set({src:e})},getAttrToHTML:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=q.prototype.getAttrToHTML.apply(this,t),i=this.get('provider');switch(i){case De:case Ne:case Le:break;default:this.get('loop')&&(r.loop='loop'),this.get('autoplay')&&(r.autoplay='autoplay'),this.get('controls')&&(r.controls='controls')}return r},getProviderTrait:function(){return{type:'select',label:'Provider',name:'provider',changeProp:1,options:[{value:'so',name:'HTML5 Source'},{value:De,name:'Youtube'},{value:Ne,name:'Youtube (no cookie)'},{value:Le,name:'Vimeo'}]}},getSourceTraits:function(){return[this.getProviderTrait(),{label:'Source',name:'src',placeholder:'eg. ./media/video.mp4',changeProp:1},{label:'Poster',name:'poster',placeholder:'eg. ./media/image.jpg'},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait()]},getYoutubeTraits:function(){return[this.getProviderTrait(),{label:'Video ID',name:'videoId',placeholder:'eg. jNQXAC9IVRw',changeProp:1},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait(),{type:'checkbox',label:'Related',name:'rel',changeProp:1},{type:'checkbox',label:'Modest',name:'modestbranding',changeProp:1}]},getVimeoTraits:function(){return[this.getProviderTrait(),{label:'Video ID',name:'videoId',placeholder:'eg. 123456789',changeProp:1},{label:'Color',name:'color',placeholder:'eg. FF0000',changeProp:1},this.getAutoplayTrait(),this.getLoopTrait()]},getAutoplayTrait:function(){return{type:'checkbox',label:'Autoplay',name:'autoplay',changeProp:1}},getLoopTrait:function(){return{type:'checkbox',label:'Loop',name:'loop',changeProp:1}},getControlsTrait:function(){return{type:'checkbox',label:'Controls',name:'controls',changeProp:1}},getYoutubeSrc:function(){var e=this.get('videoId'),t=this.get('ytUrl'),n=this.get('list');return t+=e+(e.indexOf('?')<0?'?':''),t+=n?"&list=".concat(n):'',t+=this.get('autoplay')?'&autoplay=1':'',t+=this.get('controls')?'':'&controls=0&showinfo=0',t+=this.get('loop')?"&loop=1&playlist=".concat(e):'',t+=this.get('rel')?'':'&rel=0',t+=this.get('modestbranding')?'&modestbranding=1':''},getYoutubeNoCookieSrc:function(){var e=this.getYoutubeSrc();return e=e.replace(this.get('ytUrl'),this.get('ytncUrl'))},getVimeoSrc:function(){var e=this.get('viUrl');return e+=this.get('videoId')+'?',e+=this.get('autoplay')?'&autoplay=1':'',e+=this.get('loop')?'&loop=1':'',e+=this.get('controls')?'':'&title=0&portrait=0&badge=0',e+=this.get('color')?'&color='+this.get('color'):''}},{isComponent:function(e){var t='',n=e.tagName,r=e.src,i=/youtube\.com\/embed/.test(r),o=/youtube-nocookie\.com\/embed/.test(r),a=/player\.vimeo\.com\/video/.test(r),s=i||o||a;return(Object(h["toLowerCase"])(n)==Me||'iframe'==Object(h["toLowerCase"])(n)&&s)&&(t={type:'video'},r&&(t.src=r),s&&(i?t.provider=De:o?t.provider=Ne:a&&(t.provider=Le))),t}}),Fe=J.extend({tagName:'div',events:{},initialize:function(e){f["default"].prototype.initialize.apply(this,arguments);var t=this.model,n=['loop','autoplay','controls','color','rel','modestbranding','poster'],r=n.map((function(e){return"change:".concat(e)})).join(' ');this.listenTo(t,'change:provider',this.updateProvider),this.listenTo(t,'change:src',this.updateSrc),this.listenTo(t,r,this.updateVideo)},updateProvider:function(){var e=this.model.get('provider');this.el.innerHTML='',this.el.appendChild(this.renderByProvider(e))},updateSrc:function(){var e=this.model,t=this.videoEl;if(t){var n=e.get('provider'),r=e.get('src');switch(n){case'yt':r=e.getYoutubeSrc();break;case'ytnc':r=e.getYoutubeNoCookieSrc();break;case'vi':r=e.getVimeoSrc()}t.src=r}},updateVideo:function(){var e=this.model.get('provider'),t=this.videoEl,n=this.model;switch(e){case'yt':case'ytnc':case'vi':this.model.trigger('change:videoId');break;default:t.loop=n.get('loop'),t.autoplay=n.get('autoplay'),t.controls=n.get('controls'),t.poster=n.get('poster')}},renderByProvider:function(e){var t;switch(e){case'yt':t=this.renderYoutube();break;case'ytnc':t=this.renderYoutubeNoCookie();break;case'vi':t=this.renderVimeo();break;default:t=this.renderSource()}return this.videoEl=t,t},renderSource:function(){var e=document.createElement('video');return e.src=this.model.get('src'),this.initVideoEl(e),e},renderYoutube:function(){var e=document.createElement('iframe');return e.src=this.model.getYoutubeSrc(),e.frameBorder=0,e.setAttribute('allowfullscreen',!0),this.initVideoEl(e),e},renderYoutubeNoCookie:function(){var e=document.createElement('iframe');return e.src=this.model.getYoutubeNoCookieSrc(),e.frameBorder=0,e.setAttribute('allowfullscreen',!0),this.initVideoEl(e),e},renderVimeo:function(){var e=document.createElement('iframe');return e.src=this.model.getVimeoSrc(),e.frameBorder=0,e.setAttribute('allowfullscreen',!0),this.initVideoEl(e),e},initVideoEl:function(e){e.className=this.ppfx+'no-pointer',e.style.height='100%',e.style.width='100%'},render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];J.prototype.render.apply(this,t),this.updateClasses();var r=this.model.get('provider');return this.el.appendChild(this.renderByProvider(r)),this.updateVideo(),this}});function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ve='script',Be=c["a"].extend({defaults:ze(ze({},c["a"].prototype.defaults),{},{type:Ve,tagName:Ve,droppable:!1,draggable:!1,layerable:!1})},{isComponent:function(e){if(Object(h["toLowerCase"])(e.tagName)==Ve){var t={type:Ve};return e.src&&(t.src=e.src,t.onload=e.onload),t}}}),Ue=J.extend({tagName:'script',events:{},render:function(){var e=this.model,t=this.em,n=e.get('src'),r=t&&t.get('scriptCount'),i=r||0,o='';if(n){var a=e.get('onload'),s="script".concat(i),l="script".concat(i+1),c="".concat(s,"Start"),u="".concat(l,"Start");o="\n        var ".concat(s," = document.createElement('script');\n        ").concat(s,".onload = function() {\n          ").concat(a?"".concat(a,"();\n"):'',"\n          typeof ").concat(u," == 'function' && ").concat(u,"();\n        };\n        ").concat(s,".src = '").concat(n,"';\n        function ").concat(c,"() { document.body.appendChild(").concat(s,"); };\n        ").concat(i?'':"".concat(c,"();"),"\n      "),t&&t.set('scriptCount',i+1)}else o=e.__innerHTML();return this.el.innerHTML=o,this.postRender(),this}});function He(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function We(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?He(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):He(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var $e='svg',qe=c["a"].extend({defaults:We(We({},c["a"].prototype.defaults),{},{type:$e,tagName:$e,highlightable:0,resizable:{ratioDefault:1}}),getName:function(){var e=this.get('tagName'),t=this.get('custom-name');return e=e.charAt(0).toUpperCase()+e.slice(1),t||e}},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===$e}});function Ke(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ge(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ke(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ke(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ye=qe.extend({defaults:Ge(Ge({},qe.prototype.defaults),{},{selectable:!1,hoverable:!1,layerable:!1})},{isComponent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return!!t.inSvg}}),Je=f["default"].extend({_createElement:function(e){return document.createElementNS('http://www.w3.org/2000/svg',e)}});function Xe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Qe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Xe(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Xe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ze=c["a"].extend({defaults:Qe(Qe({},c["a"].prototype.defaults),{},{tagName:'',droppable:!1,layerable:!1,selectable:!1,editable:!0}),toHTML:function(){var e=this.parent(),t=this.get('content');return e&&e.is('script')?t:Object(h["escape"])(t)}},{isComponent:function(e){var t='';return 3===e.nodeType&&(t={type:'textnode',content:e.textContent}),t}});function et(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var tt=Ze.extend({defaults:function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?et(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):et(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({},Ze.prototype.defaults),toHTML:function(){return"\x3c!--".concat(this.get('content'),"--\x3e")}},{isComponent:function(e){if(8==e.nodeType)return{tagName:'NULL',type:'comment',content:e.textContent}}}),nt=f["default"].extend({initialize:function(){f["default"].prototype.initialize.apply(this,arguments)},_setAttributes:function(){},renderAttributes:function(){},updateStatus:function(){},updateClasses:function(){},setAttribute:function(){},updateAttributes:function(){},initClasses:function(){},initComponents:function(){},delegateEvents:function(){},_createElement:function(){return document.createTextNode('')},render:function(){var e=this.model,t=this.el;return e.opt.temporary||(t.textContent=e.get('content')),this}}),rt=nt.extend({_createElement:function(){return document.createComment(this.model.get('content'))}});function it(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ot(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?it(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):it(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var at=c["a"].extend({defaults:ot(ot({},c["a"].prototype.defaults),{},{__wrapper:1,removable:!1,copyable:!1,draggable:!1,components:[],traits:[],stylable:['background','background-color','background-image','background-repeat','background-attachment','background-position','background-size']}),__postAdd:function(){var e=this.em&&this.em.get('UndoManager');return e&&!this.__hasUm&&e.add(this),c["a"].prototype.__postAdd.call(this,arguments)},__postRemove:function(){var e=this.em&&this.em.get('UndoManager');return e&&e.remove(this),c["a"].prototype.__postRemove.call(this,arguments)}},{isComponent:function(){return!1}});function st(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function lt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?st(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):st(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ct='iframe',ut=c["a"].extend({defaults:function(){return lt(lt({},c["a"].prototype.defaults),{},{type:ct,tagName:ct,droppable:!1,resizable:!0,traits:['id','title','src'],attributes:{frameborder:'0'}})}},{isComponent:function(e){return Object(h["toLowerCase"])(e.tagName)===ct}}),ft=n(18),dt=f["default"].extend({tagName:'div',initialize:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];f["default"].prototype.initialize.apply(this,t),this.listenTo(this.model,'change:attributes:src',this.updateSrc)},updateSrc:function(){var e=Object(ft["h"])(this.el,'iframe')[0];e&&Object(ft["d"])(e,{src:this.__getSrc()})},render:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];f["default"].prototype.render.apply(this,t);var r=Object(ft["f"])('iframe',{class:"".concat(this.ppfx,"no-pointer"),style:'width: 100%; height: 100%; border: none',src:this.__getSrc()});return this.el.appendChild(r),this},__getSrc:function(){return this.model.getAttributes().src||''}});function ht(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function pt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ht(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n,r={},i={},o=[{id:'cell',model:v,view:m},{id:'row',model:O,view:x},{id:'table',model:j,view:E},{id:'thead',model:N,view:R},{id:'tbody',model:A,view:F},{id:'tfoot',model:B,view:U},{id:'map',model:Y,view:X},{id:'link',model:pe,view:Ce},{id:'label',model:Pe,view:_e},{id:'video',model:Re,view:Fe},{id:'image',model:q,view:J},{id:'script',model:Be,view:Ue},{id:'svg-in',model:Ye,view:Je},{id:'svg',model:qe,view:Je},{id:'iframe',model:ut,view:dt},{id:'comment',model:tt,view:rt},{id:'textnode',model:Ze,view:nt},{id:'text',model:fe,view:ke},{id:'wrapper',model:at,view:f["default"]},{id:'default',model:c["a"],view:f["default"]}];return{Component:c["a"],Components:u["b"],ComponentsView:d["a"],componentTypes:o,componentsById:i,name:'DomComponents',getConfig:function(){return r},storageKey:function(){var e=[],t=r.stm&&r.stm.getConfig()||{};return t.storeHtml&&e.push('html'),t.storeComponents&&e.push('components'),e},init:function(t){var n=this;for(var i in e=(r=t||{}).em,this.em=e,e&&(r.components=e.config.components||r.components),l)i in r||(r[i]=l[i]);var a=r.pStylePrefix;if(a&&(r.stylePrefix=a+r.stylePrefix),e){r.modal=e.get('Modal')||'',r.am=e.get('AssetManager')||'',e.get('Parser').compTypes=o,e.on('change:componentHovered',this.componentHovered,this);var s=e.get('selected');e.listenTo(s,'add',(function(e,t,r){return n.selectAdd(s.getComponent(e),r)})),e.listenTo(s,'remove',(function(e,t,r){return n.selectRemove(s.getComponent(e),r)}))}return e.get('hasPages')&&(r.components=''),this},onLoad:function(){r.components&&this.setComponents(r.components,{silent:1})},load:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',t=this.em,n='';!e&&r.stm&&(e=r.em.getCacheLoad());var i=e,o=i.components,a=i.html;if(o)if(Object(s["isObject"])(o)||Object(s["isArray"])(o))n=o;else try{n=JSON.parse(o)}catch(e){t&&t.logError(e)}else a&&(n=a);var l=n&&n.constructor===Object;return(n&&n.length||l)&&(this.clear(),l?this.getWrapper().set(n):this.getComponents().add(n)),n},store:function(e){if(!r.stm||this.em.get('hasPages'))return{};var t={},n=this.storageKey();if(n.indexOf('html')>=0&&(t.html=r.em.getHtml()),n.indexOf('components')>=0){var i=r.storeWrapper?this.getWrapper():this.getComponents();t.components=JSON.stringify(i)}return e||r.stm.store(t),t},getComponent:function(){var e=this.em.get('PageManager').getSelected(),t=e&&e.getMainFrame();return t&&t.getComponent()},getWrapper:function(){return this.getComponent()},getComponents:function(){var e=this.getWrapper();return e&&e.get('components')},addComponent:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.getComponents().add(e,t)},render:function(){return n.render().el},clear:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getComponents().map((function(e){return e})).forEach((function(t){return t.remove(e)})),this},setComponents:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.clear(t).addComponent(e,t)},addType:function(e,t){var n=this.em,r=t.model,i=void 0===r?{}:r,l=t.view,c=void 0===l?{}:l,u=t.isComponent,f=t.extend,d=t.extendView,h=t.extendFn,p=void 0===h?[]:h,g=t.extendFnView,v=void 0===g?[]:g,m=this.getType(e),y=this.getType(f),b=this.getType(d),w=y||(m||this.getType('default')),O=w.model,x=b?b.view:w.view,k=function(e,t,n){return e.reduce((function(e,r){var i=t[r],o=n.prototype[r];return i&&o&&(e[r]=function(){o.bind(this).apply(void 0,arguments),i.bind(this).apply(void 0,arguments)}),e}),{})};'object'===a()(i)&&(t.model=O.extend(pt(pt(pt({},i),k(p,i,O)),{},{defaults:pt(pt({},Object(s["result"])(O.prototype,'defaults')||{}),Object(s["result"])(i,'defaults')||{})}),{isComponent:!m||y||u?u||function(){return 0}:O.isComponent})),'object'===a()(c)&&(t.view=x.extend(pt(pt({},c),k(v,c,x)))),m?(m.model=t.model,m.view=t.view):(t.id=e,o.unshift(t));var C="component:type:".concat(m?'update':'add');return n&&n.trigger(C,m||t),this},getType:function(e){for(var t=o,n=0;n<t.length;n++){if(t[n].id==e)return t[n]}},removeType:function(e){var t=o,n=this.getType(e);if(n){var r=t.indexOf(n);return t.splice(r,1),n}},getTypes:function(){return o},selectAdd:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};e&&(e.set({status:'selected'}),['component:selected','component:toggled'].forEach((function(r){return t.em.trigger(r,e,n)})))},selectRemove:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(e){this.em;e.set({status:'',state:''}),['component:deselected','component:toggled'].forEach((function(r){return t.em.trigger(r,e,n)}))}},componentHovered:function(){var e=r.em,t=e.get('componentHovered'),n=e.previous('componentHovered'),i='hovered';n&&n.get('status')==i&&n.set({status:'',state:''}),t&&Object(s["isEmpty"])(t.get('status'))&&t.set('status',i)},getShallowWrapper:function(){var e=this.shallow,t=this.em;if(!e&&t){var n=t.get('shallow');if(!n)return;var r=n.get('DomComponents');if(r.componentTypes=this.componentTypes,e=r.getWrapper()){var i=[c["c"],c["d"]].join(' ');e.on(i,Object(s["debounce"])((function(){return e.components('')}),100))}this.shallow=e}return e},canMove:function(e,t,n){var r=n||0===n?n:null,i={result:!1,reason:0,target:e,source:null};if(!t)return i;var o=null!=t&&t.toHTML?t:null;if(!o){var a=this.getShallowWrapper();o=null==a?void 0:a.append(t)[0]}if(i.source=o,!o)return i;var l=o.get('draggable');if(Object(s["isFunction"])(l))l=!!l(o,e,r);else{var c=e.getEl();l=Object(s["isArray"])(l)?l.join(','):l,l=Object(s["isString"])(l)?null==c?void 0:c.matches(l):l}if(!l)return pt(pt({},i),{},{reason:1});var u=e.get('droppable');if(Object(s["isFunction"])(u))u=!!u(o,e,r);else if(!1===u&&e.isInstanceOf('text')&&o.get('textable'))u=!0;else{var f=o.getEl();u=Object(s["isArray"])(u)?u.join(','):u,u=Object(s["isString"])(u)?null==f?void 0:f.matches(u):u}return pt(pt({},i),{},u?{result:!0}:{reason:2})},allById:function(){return i},getById:function(e){return i[e]||null},destroy:function(){var o=this.allById();Object.keys(o).forEach((function(e){return o[e]&&o[e].remove()})),n&&n.remove(),[r,e,i,t,n].forEach((function(e){return{}})),this.em={}}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"evAll",(function(){return Ct})),n.d(t,"evPfx",(function(){return St})),n.d(t,"evSector",(function(){return jt})),n.d(t,"evSectorAdd",(function(){return Et})),n.d(t,"evSectorRemove",(function(){return Pt})),n.d(t,"evSectorUpdate",(function(){return _t})),n.d(t,"evProp",(function(){return Tt})),n.d(t,"evPropAdd",(function(){return At})),n.d(t,"evPropRemove",(function(){return Mt})),n.d(t,"evPropUp",(function(){return Dt})),n.d(t,"evLayerSelect",(function(){return Lt})),n.d(t,"evTarget",(function(){return Nt})),n.d(t,"evCustom",(function(){return Rt}));var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(0),l=n(1),c=n(47),u=n(4),f=n.n(u),d={sectors:[{name:'General',open:!1,properties:['display','float','position','top','right','left','bottom']},{name:'Flex',open:!1,properties:['flex-direction','flex-wrap','justify-content','align-items','align-content','order','flex-basis','flex-grow','flex-shrink','align-self']},{name:'Dimension',open:!1,properties:['width','height','max-width','min-height','margin','padding']},{name:'Typography',open:!1,properties:['font-family','font-size','font-weight','letter-spacing','color','line-height','text-align','text-shadow']},{name:'Decorations',open:!1,properties:['background-color','border-radius','border','box-shadow','background']},{name:'Extra',open:!1,properties:['opacity','transition']}],appendTo:'',stylePrefix:'sm-',custom:!1,hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!0,avoidComputed:['width','height']},h=n(34),p=n.n(h),g=n(8),v=n.n(g),m=n(9),y=n.n(m),b=n(10),w=n.n(b),O=n(11),x=n.n(O),k=n(5),C=n.n(k),S=n(78),j=["partial"];function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function _(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var T=function(e){w()(n,e);var t=_(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.em=t.em;var r=this.get('id')||'',i=this.get('name')||this.get('label')||'';!this.get('property')&&this.set('property',(i||r).replace(/ /g,'-'));var o=this.get('property');!this.get('id')&&this.set('id',o),!i&&this.set('name',Object(l["capitalize"])(o).replace(/-/g,' ')),this.on('change',this.__upTargets),n.callInit(this,e,t)}},{key:"__getParentProp",value:function(){var e,t;return null===(e=this.collection)||void 0===e||null===(t=e.opts)||void 0===t?void 0:t.parentProp}},{key:"__upTargets",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,o=r.get('StyleManager'),l=this.getName(),c=n.__clear,u=c?'':this.__getFullValue(n),f=this.__getParentProp(),d=this.changedAttributes(),h=Object(s["keys"])(d).reduce((function(e,n){return e[n]=t.previous(n),e}),{}),p=[].concat(i()(Object(s["keys"])(this.__getClearProps())),['__p']),g=Object(s["keys"])(d),v=!n.__up&&!f&&(c||p.some((function(e){return g.indexOf(e)>=0}))),m=this.get('onChange'),y={property:this,from:h,to:d,value:u,opts:n};o.__trgEv(o.events.propertyUpdate,y),m&&m(y),v&&this.__upTargetsStyle(a()({},l,u),n)}},{key:"__upTargetsStyle",value:function(e,t){var n,r=null===(n=this.em)||void 0===n?void 0:n.get('StyleManager');null==r||r.addStyleTargets(P(P({},e),{},{__p:!!t.avoidStore}),t)}},{key:"_up",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.noTarget&&(t.__up=!0);var n=t.partial,r=p()(t,j);return e.__p=!(!r.avoidStore&&!n),this.set(e,P(P({},r),{},{avoidStore:e.__p}))}},{key:"up",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.set(e,P(P({},t),{},{__up:!0}))}},{key:"init",value:function(){}},{key:"getId",value:function(){return this.get('id')}},{key:"getType",value:function(){return this.get('type')}},{key:"getName",value:function(){return this.get('property')}},{key:"getLabel",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.locale,r=void 0===n||n,i=this.getId(),o=this.get('name')||this.get('label');return r&&(null===(e=this.em)||void 0===e?void 0:e.t("styleManager.properties.".concat(i)))||o}},{key:"getValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.noDefault,n=this.get('value');return this.hasValue()||t?n:this.getDefaultValue()}},{key:"hasValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.noParent,n=t&&this.getParentTarget(),r=this.get('value');return!Object(s["isUndefined"])(r)&&''!==r&&!n}},{key:"hasValueParent",value:function(){return this.hasValue()&&!this.hasValue({noParent:!0})}},{key:"getStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getName(),n=e.camelCase?Object(l["camelCase"])(t):t;return a()({},n,this.__getFullValue(e))}},{key:"getDefaultValue",value:function(){var e=this.get('default');return"".concat(Object(s["isUndefined"])(e)?this.get('defaults'):e)}},{key:"upValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=null===e||''===e?this.__getClearProps():this.__parseValue(e,t);return this._up(n,t)}},{key:"isVisible",value:function(){return!!this.get('visible')}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this._up(this.__getClearProps(),P(P({},e),{},{__clear:!0}))}},{key:"canClear",value:function(){var e=this.getParent();return e?e.__canClearProp(this):this.hasValue({noParent:!0})}},{key:"getParent",value:function(){return this.__getParentProp()||null}},{key:"isFull",value:function(){return!!this.get('full')}},{key:"__parseValue",value:function(e,t){return this.parseValue(e,t)}},{key:"__getClearProps",value:function(){return{value:''}}},{key:"setValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parseValue(e),i=!t;!i&&this.set({value:void 0},{avoidStore:i,silent:!0}),this.set(r,P({avoidStore:i},n))}},{key:"setValueFromInput",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.setValue(e,t,P(P({},n),{},{fromInput:1}))}},{key:"parseValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={value:e},r='!important';if(Object(s["isString"])(e)&&-1!==e.indexOf(r)&&(n.value=e.replace(r,'').trim(),n.important=1),!this.get('functionName')&&!t.complete)return n;var i=[],o="".concat(n.value),a=o.indexOf('(')+1,l=o.lastIndexOf(')'),c=o.substring(0,a-1);if(c&&(n.functionName=c),i.push(a),l>=0&&i.push(l),n.value=String.prototype.substring.apply(o,i),t.numeric){var u=parseFloat(n.value);n.unit=n.value.replace(u,''),n.value=u}return n}},{key:"__getFullValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.withDefault;return!this.hasValue()&&t?this.getDefaultValue():this.getFullValue()}},{key:"getFullValue",value:function(e){var t=this.get('functionName'),n=this.getDefaultValue(),r=Object(s["isUndefined"])(e)?this.get('value'):e,i=!Object(s["isUndefined"])(r)&&''!==r;if(r&&n&&r===n)return n;if(t&&i){var o='url'===t?"'".concat(r.replace(/'/g,''),"'"):r;r="".concat(t,"(").concat(o,")")}return i&&this.get('important')&&(r="".concat(r," !important")),r||''}},{key:"__setParentTarget",value:function(e){this.__parentTarget=e}},{key:"getParentTarget",value:function(){return this.__parentTarget||null}},{key:"__parseFn",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',t=e.indexOf('(')+1,n=e.lastIndexOf(')');return{name:e.substring(0,t-1).trim(),value:String.prototype.substring.apply(e,[t,n>=0?n:void 0]).trim()}}},{key:"__checkVisibility",value:function(e){var t=e.target,n=e.component,r=e.sectors,i=n||t;if(!i)return!1;var o=this.getId(),a=this.getName(),c=this.get('toRequire'),u=this.get('requires'),f=this.get('requiresParent'),d=i.get('unstylable'),h=i.get('stylable-require'),p=i.get('stylable');if(Object(s["isArray"])(p)&&(p=p.indexOf(a)>=0),Object(s["isArray"])(d)&&(p=d.indexOf(a)<0),c&&(p=!t||h&&(h.indexOf(o)>=0||h.indexOf(a)>=0)),r&&u){var g=Object(s["keys"])(u);r.forEach((function(e){e.getProperties().forEach((function(e){if(Object(s["includes"])(g,e.id)){var t=u[e.id];p=p&&Object(s["includes"])(t,e.get('value'))}}))}))}if(f){var v=n&&n.parent(),m=v&&v.getEl();if(m){var y=Object(l["hasWin"])()?window.getComputedStyle(m):{};Object(s["each"])(f,(function(e,t){p=p&&y[t]&&Object(s["includes"])(e,y[t])}))}else p=!1}return!!p}}]),n}(u["Model"]);function A(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function M(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?A(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):A(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function D(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}T.callParentInit=function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};e.prototype.initialize.apply(t,[n,P(P({},r),{},{skipInit:1})])},T.callInit=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};!n.skipInit&&e.init(t,n)},T.getDefaults=function(){return Object(s["result"])(this.prototype,'defaults')},T.prototype.defaults={name:'',property:'',type:'',defaults:'',info:'',value:'',icon:'',functionName:'',status:'',visible:!0,fixedValues:['initial','inherit'],onChange:null,full:0,important:0,toRequire:0,requires:null,requiresParent:null};var L=function(e){return'integer'===e||'number'===e},N=function(e){w()(n,e);var t=D(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return M(M({},T.getDefaults()),{},{detached:!1,properties:[],separator:' ',join:null,fromStyle:null,toStyle:null,full:!0})}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};T.callParentInit(T,this,e,t);var n=this.em,r=new Je(this.get('properties')||[],{em:n,parentProp:this});this.set('properties',r,{silent:1}),this.listenTo(r,'change',this.__upProperties),T.callInit(this,e,t)}},{key:"getProperties",value:function(){return i()(this.get('properties').models)}},{key:"getProperty",value:function(e){return this.get('properties').filter((function(t){return t.getId()===e||t.getName()===e}))[0]||null}},{key:"getPropertyAt",value:function(e){return this.get('properties').at(e)}},{key:"isDetached",value:function(){return!!this.get('detached')}},{key:"getValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.byName;return this.getProperties().reduce((function(e,n){return e[t?n.getName():n.getId()]="".concat(n.__getFullValue()),e}),{})}},{key:"getSeparator",value:function(){return this.getSplitSeparator()}},{key:"getJoin",value:function(){return this.__getJoin()}},{key:"getStyleFromProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getName(),n=this.__getJoin(),r=this.get('toStyle'),i=this.getValues(),o={};if(r)o=r(i,{join:n,name:t,property:this});else if(i=this.getValues({byName:!0}),this.isDetached())o=i;else{var s=this.getProperties().map((function(e){return e.__getFullValue({withDefault:1})})).filter(Boolean).join(n);o=a()({},t,s)}return this.isDetached()?o[t]='':(o[t]=o[t]||'',o=M(M({},o),this.getProperties().reduce((function(e,t){return e[t.getName()]='',e}),{}))),e.camelCase?Object.keys(o).reduce((function(e,t){return e[camelCase(t)]=o[t],e}),{}):o}},{key:"getSplitSeparator",value:function(){return new RegExp("".concat(this.get('separator'),"(?![^\\(]*\\))"))}},{key:"__upProperties",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.__up&&!t.__clearIn){var n=this.__getParentProp();if(n)return n.__upProperties(this,t);this.__upTargetsStyleProps(t,e)}}},{key:"__upTargetsStyleProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,n=this.getStyleFromProps();if(this.isDetached()&&t){var r=t.getName();n=a()({},r,n[r])}this.__upTargetsStyle(n,e)}},{key:"_up",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__setProperties(this.__getSplitValue(e.value),t),T.prototype._up.call(this,e,t)}},{key:"getStyle",value:function(e){return this.getStyleFromProps(e)}},{key:"__getFullValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.isDetached()||e.__clear?'':this.getStyleFromProps()[this.getName()]||''}},{key:"__getJoin",value:function(){var e=this.get('join');return Object(s["isString"])(e)?e:this.get('separator')}},{key:"__styleHasProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getName(),n=this.getProperties(),r=n.map((function(e){return e.getName()})),o=[t].concat(i()(r));return o.some((function(t){return!Object(s["isUndefined"])(e[t])&&''!==e[t]}))}},{key:"__splitValue",value:function(e,t){return e.split(t).map((function(e){return e.trim()})).filter(Boolean)}},{key:"__splitStyleName",value:function(e,t,n){return this.__splitValue(e[t]||'',n)}},{key:"__getSplitValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.byName,r=this.getProperties(),i=4===r.length&&r.every((function(e){return L(e.getType())})),o=this.__splitValue(e,this.getSplitSeparator()),a={};return r.forEach((function(e,t){var r=o[t],l=Object(s["isUndefined"])(r)?'':r;if(i){var c=o.length;l=o[t]||o[t%c+(1!=c&&c%2?1:0)]||l}var u=n?e.getName():e.getId();a[u]=l||''})),a}},{key:"__getPropsFromStyle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!this.__styleHasProps(e))return null;var n=t.byName,r=this.getName(),i=this.getProperties(),o=this.getSplitSeparator(),a=this.get('fromStyle'),l=a?a(e,{property:this,name:r,separator:o}):{};return a||(l=this.__getSplitValue(e[r]||'',{byName:n}),i.forEach((function(t){var r=e[t.getName()],i=n?t.getName():t.getId();Object(s["isUndefined"])(r)||''===r||(l[i]=r)}))),l}},{key:"__setProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.getProperties().forEach((function(n){var r=e[n.getId()];n.__getFullValue()!==r&&n.upValue(r,t)}));var n=Object(s["keys"])(e).map((function(t){return e[t]})).join(' ');this.set('value',n,{silent:!0})}},{key:"clear",value:function(){var e=this;return this.getProperties().map((function(t){return t.clear({__clearIn:!e.isDetached()})})),T.prototype.clear.call(this)}},{key:"hasValue",value:function(e){return this.getProperties().some((function(t){return t.hasValue(e)}))}},{key:"getFullValue",value:function(){return this.__getFullValue()}},{key:"__canClearProp",value:function(e){return this.isDetached()&&e.hasValue({noParent:!0})}}]),n}(T);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function I(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var z=function(e){w()(n,e);var t=I(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return{values:{}}}},{key:"initialize",value:function(){var e=this.collection;this.prop=null==e?void 0:e.prop}},{key:"getId",value:function(){return this.cid}},{key:"getIndex",value:function(){var e=this.collection;return e?e.indexOf(this):-1}},{key:"getValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.get('values');return e.camelCase?Object.keys(t).reduce((function(e,n){return e[Object(l["camelCase"])(n)]=t[n],e}),{}):t}},{key:"getLabel",value:function(){var e;return null===(e=this.prop)||void 0===e?void 0:e.getLayerLabel(this)}},{key:"isSelected",value:function(){var e;return(null===(e=this.prop)||void 0===e?void 0:e.getSelectedLayer())===this}},{key:"select",value:function(){var e;return null===(e=this.prop)||void 0===e?void 0:e.selectLayer(this)}},{key:"remove",value:function(){var e;return null===(e=this.prop)||void 0===e?void 0:e.removeLayer(this)}},{key:"move",value:function(e){var t;return null===(t=this.prop)||void 0===t?void 0:t.moveLayer(this,e)}},{key:"getStylePreview",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return null===(e=this.prop)||void 0===e?void 0:e.getStylePreview(this,t)}},{key:"hasPreview",value:function(){var e;return!(null===(e=this.prop)||void 0===e||!e.get('preview'))}},{key:"upValues",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.set('values',F(F({},this.getValues()),e))}}]),n}(u["Model"]);function V(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var B=function(e){w()(n,e);var t=V(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.prop=t.prop}}]),n}(u["Collection"]);B.prototype.model=z;var U=["__layers"];function H(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function W(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?H(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):H(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function $(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var q=/,(?![^\(]*\))/,K=/\s(?![^(]*\))/,G=function(e){w()(n,e);var t=$(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return W(W({},N.getDefaults()),{},{layers:[],layerSeparator:', ',layerJoin:'',prepend:0,preview:!1,layerLabel:null,selectedLayer:null})}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};N.callParentInit(N,this,e,t);var n=this.get('layers'),r=new B(n,{prop:this});r.property=this,r.properties=this.get('properties'),this.set('layers',r,{silent:!0}),this.on('change:selectedLayer',this.__upSelected),this.listenTo(r,'add remove',this.__upLayers),N.callInit(this,e,t)}},{key:"getLayers",value:function(){return this.__getLayers().models}},{key:"__getLayers",value:function(){return this.get('layers')}},{key:"getLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return this.__getLayers().at(e)||null}},{key:"getSelectedLayer",value:function(){var e=this.get('selectedLayer');return e&&e.getIndex()>=0?e:null}},{key:"selectLayer",value:function(e){return this.set('selectedLayer',e,{__select:!0})}},{key:"selectLayerAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.getLayer(e);return t&&this.selectLayer(t)}},{key:"moveLayer",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=e?e.getIndex():-1;n>=0&&Object(s["isNumber"])(t)&&t>=0&&t<this.getLayers().length&&n!==t&&(this.removeLayer(e),this.__getLayers().add(e,{at:t}))}},{key:"addLayer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={};this.getProperties().forEach((function(t){var r=t.getId(),i=e[r];n[r]=Object(s["isUndefined"])(i)?t.getDefaultValue():i}));var r=this.get('layers').push({values:n},t);return r}},{key:"removeLayer",value:function(e){return this.get('layers').remove(e)}},{key:"removeLayerAt",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=this.getLayer(e);return t?this.removeLayer(t):null}},{key:"getLayerLabel",value:function(e){var t='';if(e){var n=this.get('layerLabel'),r=e.getValues(),i=e.getIndex();if(n)t=n(e,{index:i,values:r,property:this});else{var o=[];this.getProperties().map((function(e){o.push(r[e.getId()])})),t=o.filter(Boolean).join(' ')}}return t}},{key:"getStyleFromLayer",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.__getJoin(),i=this.__getJoinLayers(),o=this.get('toStyle'),c=this.getName(),u=e.getValues();if(o)t=o(u,{join:r,joinLayers:i,name:c,layer:e,property:this});else{var f=this.getProperties().map((function(e){var t=e.getName(),r=u[e.getId()],i=Object(s["isUndefined"])(r)?e.getDefaultValue():r;if(n.number&&L(e.getType())){var o=e.parseValue(r,n.number);i="".concat(o.value).concat(o.unit)}return{name:t,value:i}}));t=this.isDetached()?f.reduce((function(e,t){return e[t.name]=t.value,e}),{}):a()({},this.getName(),f.map((function(e){return e.value})).join(r))}return n.camelCase?Object.keys(t).reduce((function(e,n){return e[Object(l["camelCase"])(n)]=t[n],e}),{}):t}},{key:"getStylePreview",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n={},r=this.get('preview');return r&&(n=this.getStyleFromLayer(e,t)),n}},{key:"getLayerSeparator",value:function(){var e=this.get('layerSeparator');return Object(s["isString"])(e)?new RegExp("".concat(e,"(?![^\\(]*\\))")):e}},{key:"__upProperties",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.getSelectedLayer();n&&(n.upValues(a()({},e.getId(),e.__getFullValue())),t.__up||this.__upTargetsStyleProps(t))}},{key:"__upLayers",value:function(e,t,n){this.__upTargetsStyleProps(n||t)}},{key:"__upTargets",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!t.__select)return T.prototype.__upTargets.call(this,e,t)}},{key:"__upTargetsStyleProps",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.__upTargetsStyle(this.getStyleFromLayers(),e)}},{key:"__upTargetsStyle",value:function(e,t){return T.prototype.__upTargetsStyle.call(this,e,t)}},{key:"__upSelected",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.noEvent,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em.get('StyleManager'),i=this.getSelectedLayer(),o=null==i?void 0:i.getValues();o&&this.getProperties().forEach((function(e){var t=o[e.getId()];e.__getFullValue()!==t&&e.upValue(t,W(W({},n),{},{__up:!0}))})),!t&&r.__trgEv(r.events.layerSelect,{property:this})}},{key:"_up",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.__layers,r=void 0===n?[]:n,i=p()(e,U);return!this.isDetached()&&this.__setLayers(r),this.__upSelected({noEvent:!0},t),T.prototype._up.call(this,i,t)}},{key:"__setLayers",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=this.__getLayers(),n=e.map((function(e){return{values:e}}));t.length===n.length?n.map((function(e,n){var r;return null===(r=t.at(n))||void 0===r?void 0:r.upValues(e.values)})):this.__getLayers().reset(n),this.__upSelected({noEvent:!0})}},{key:"__parseValue",value:function(e){var t=this,n=this.parseValue(e);return n.__layers=e.split(q).map((function(e){return e.trim()})).map((function(e){return t.__parseLayer(e)})).filter(Boolean),n}},{key:"__parseLayer",value:function(e){var t=this.get('parseLayer'),n=e.split(K),r=this.getProperties();return t?t({value:e,values:n}):r.reduce((function(e,t,r){var i=n[r];return e[t.getId()]=Object(s["isUndefined"])(i)?t.getDefaultValue():i,e}),{})}},{key:"__getLayersFromStyle",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!this.__styleHasProps(t))return null;var n=this.getName(),r=this.getProperties(),i=this.getLayerSeparator(),o=this.get('fromStyle'),l=o?o(t,{property:this,name:n,separatorLayers:i}):[];if(!o){var c=this.__splitStyleName(t,n,i).map((function(t){return t.split(e.getSplitSeparator())})).map((function(e){var t={};return r.forEach((function(n,r){var i=e[r];t[n.getId()]=Object(s["isUndefined"])(i)?n.getDefaultValue():i})),t}));r.forEach((function(n){var r=n.getId();e.__splitStyleName(t,n.getName(),i).map((function(e){return a()({},r,e||n.getDefaultValue())})).forEach((function(e,t){c[t]=c[t]?W(W({},c[t]),e):e}))})),l=c}return Object(s["isArray"])(l)?l:[l]}},{key:"getStyle",value:function(e){return this.getStyleFromLayers(e)}},{key:"getStyleFromLayers",value:function(e){var t=this,n={},r=this.getName(),i=this.getLayers(),o=this.getProperties();if(i.map((function(n){return t.getStyleFromLayer(n,e)})).forEach((function(e){Object(s["keys"])(e).map((function(t){n[t]||(n[t]=[]),n[t].push(e[t])}))})),Object(s["keys"])(n).map((function(e){n[e]=n[e].join(t.__getJoinLayers())})),this.isDetached())n[r]='',!i.length&&o.map((function(e){n[e.getName()]=''}));else{var a=o.reduce((function(e,t){return e[t.getName()]='',e}),{});n[r]=n[r]||'',n=W(W({},n),a)}return n}},{key:"__getJoinLayers",value:function(){var e=this.get('layerJoin'),t=this.get('layerSeparator');return e||(Object(s["isString"])(t)?t:e)}},{key:"__getFullValue",value:function(){return this.get('detached')?'':this.getStyleFromLayers()[this.getName()]}},{key:"hasValue",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.noParent,n=t&&this.getParentTarget();return this.getLayers().length>0&&!n}},{key:"clear",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.__getLayers().reset(),this.__upTargetsStyleProps(e),T.prototype.clear.call(this)}},{key:"__canClearProp",value:function(){return!1}}]),n}(N),Y=(n(51),["complete","partial"]);function J(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function X(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?J(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):J(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Q(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Z='data-clear-style',ee=function(e){w()(n,e);var t=Q(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"template",value:function(){var e=this.pfx,t=this.ppfx;return"\n      <div class=\"".concat(e,"label\" data-sm-label></div>\n      <div class=\"").concat(t,"fields\" data-sm-fields></div>\n    ")}},{key:"templateLabel",value:function(e){var t=this.pfx,n=this.em,r=e.parent,i=e.attributes,o=i.icon,a=void 0===o?'':o,s=i.info,l=void 0===s?'':s,c=null==n?void 0:n.getConfig('icons'),u=(null==c?void 0:c.close)||'';return"\n      <span class=\"".concat(t,"icon ").concat(a,"\" title=\"").concat(l,"\">\n        ").concat(e.getLabel(),"\n      </span>\n      ").concat(r?'':"<div class=\"".concat(t,"clear\" style=\"display: none\" ").concat(Z,">").concat(u,"</div>"),"\n    ")}},{key:"templateInput",value:function(e){return"\n      <div class=\"".concat(this.ppfx,"field\">\n        <input placeholder=\"").concat(e.getDefaultValue(),"\"/>\n      </div>\n    ")}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s["bindAll"])(this,'__change','__updateStyle');var t=e.config||{},n=t.em;this.config=t,this.em=n,this.pfx=t.stylePrefix||'',this.ppfx=t.pStylePrefix||'',this.__destroyFn=this.destroy?this.destroy.bind(this):function(){};var r=this.model;r.view=this,this.onValueChange=Object(s["debounce"])(this.onValueChange.bind(this),10),this.updateStatus=Object(s["debounce"])(this.updateStatus.bind(this)),this.listenTo(r,'destroy remove',this.remove),this.listenTo(r,'change:visible',this.updateVisibility),this.listenTo(r,'change:name change:className change:full',this.render),this.listenTo(r,'change:value',this.onValueChange),this.listenTo(n,'change:device',this.onValueChange);var i=this.init&&this.init.bind(this);i&&i()}},{key:"remove",value:function(){var e=this;u["View"].prototype.remove.apply(this,arguments),['em','input','$input','view'].forEach((function(t){return e[t]=null})),this.__destroyFn(this._getClbOpts())}},{key:"updateStatus",value:function(){var e,t=this.model,n=this.pfx,r=this.ppfx,i=this.config,o="".concat(r,"four-color"),a="".concat(r,"color-warn"),s=this.$el.children(".".concat(n,"label")),l=this.getClearEl(),c=l?l.style:{};s.removeClass("".concat(o," ").concat(a)),c.display='none',t.hasValue({noParent:!0})&&i.highlightChanged?(s.addClass(o),i.clearProperties&&(c.display='')):t.hasValue()&&i.highlightComputed&&s.addClass(a),null===(e=this.parent)||void 0===e||e.updateStatus()}},{key:"clear",value:function(e){e&&e.stopPropagation(),this.model.clear()}},{key:"getClearEl",value:function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(Z,"]"))),this.clearEl}},{key:"inputValueChanged",value:function(e){e&&e.stopPropagation(),this.emit||this.model.upValue(e.target.value)}},{key:"onValueChange",value:function(e,t){this.setValue(this.model.getFullValue()),this.updateStatus()}},{key:"setValue",value:function(e){var t=this.model,n=Object(s["isUndefined"])(e)||''===e?t.getDefaultValue():e;if(this.update)return this.__update(n);this.__setValueInput(n)}},{key:"__setValueInput",value:function(e){var t=this.getInputEl();t&&(t.value=e)}},{key:"getInputEl",value:function(){return this.input||(this.input=this.el.querySelector('input')),this.input}},{key:"updateVisibility",value:function(){this.el.style.display=this.model.isVisible()?'':'none'}},{key:"clearCached",value:function(){this.clearEl=null,this.input=null,this.$input=null}},{key:"__unset",value:function(){var e=this.unset&&this.unset.bind(this);e&&e(this._getClbOpts())}},{key:"__update",value:function(e){var t=this.update&&this.update.bind(this);t&&t(X(X({},this._getClbOpts()),{},{value:e}))}},{key:"__change",value:function(){for(var e=this.emit&&this.emit.bind(this),t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];e&&e.apply(void 0,[this._getClbOpts()].concat(n))}},{key:"__updateStyle",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.complete,r=t.partial,i=(p()(t,Y),this.model),o=!1!==n&&!0!==r;Object(l["isObject"])(e)?i.__upTargetsStyle(e,{avoidStore:!o}):i.upValue(e,{partial:!o})}},{key:"_getClbOpts",value:function(){var e=this.model;return{el:this.el,createdEl:this.createdEl,property:e,props:e.attributes,change:this.__change,updateStyle:this.__updateStyle}}},{key:"render",value:function(){this.clearCached();var e=this.pfx,t=this.model,n=this.el,r=this.$el,i=t.getName(),o=t.getType(),a=t.get('className')||'',s="".concat(e,"property"),l='number'===o?"".concat(e).concat(o," ").concat(e,"integer"):"".concat(e).concat(o);this.createdEl&&this.__destroyFn(this._getClbOpts()),r.empty().append(this.template(t)),r.find('[data-sm-label]').append(this.templateLabel(t));var c=this.create&&this.create.bind(this);this.createdEl=c&&c(this._getClbOpts()),r.find('[data-sm-fields]').append(this.createdEl||this.templateInput(t)),n.className="".concat(s," ").concat(l," ").concat(s,"__").concat(i," ").concat(a).trim(),n.className+=t.isFull()?" ".concat(s,"--full"):'';var u=this.onRender&&this.onRender.bind(this);u&&u(),this.setValue(t.getValue())}}]),n}(u["View"]);ee.prototype.events=a()({change:'inputValueChanged'},"click [".concat(Z,"]"),'clear');var te=n(18);function ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var re=function(e){w()(n,e);var t=ne(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"initialize",value:function(e){this.config=e.config||{},this.pfx=this.config.stylePrefix||'',this.properties=[],this.parent=e.parent;var t=this.collection;this.listenTo(t,'add',this.addTo),this.listenTo(t,'reset',this.render)}},{key:"addTo",value:function(e,t,n){this.add(e,null,n)}},{key:"add",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.parent,i=this.config,o=t||this.el,a=new e.typeView({model:e,config:i});r&&(a.parent=r),a.render();var s=a.el;this.properties.push(a),Object(te["b"])(o,s,n.at)}},{key:"remove",value:function(){u["View"].prototype.remove.apply(this,arguments),this.clearItems()}},{key:"clearItems",value:function(){this.properties.forEach((function(e){return e.remove()})),this.properties=[]}},{key:"render",value:function(){var e=this,t=this.$el,n=this.pfx;this.clearItems();var r=document.createDocumentFragment();return this.collection.forEach((function(t){return e.add(t,r)})),t.empty(),t.append(r),t.attr('class',"".concat(n,"properties")),this}}]),n}(u["View"]);function ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function oe(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ie(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ae(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var se=function(e){w()(n,e);var t=ae(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"templateInput",value:function(){var e=this.pfx;return"\n      <div class=\"".concat(e,"field ").concat(e,"composite\">\n        <span id=\"").concat(e,"input-holder\"></span>\n      </div>\n    ")}},{key:"remove",value:function(){var e;null===(e=this.props)||void 0===e||e.remove(),ee.prototype.remove.apply(this,arguments)}},{key:"onValueChange",value:function(){}},{key:"onRender",value:function(){var e=this.model,t=this.pfx,n=e.get('properties');if(n.length&&!this.props){var r=e.isDetached(),i=new re({config:oe(oe({},this.config),{},{highlightComputed:r,highlightChanged:r}),collection:n,parent:this});i.render(),this.$el.find("#".concat(t,"input-holder")).append(i.el),this.props=i}}},{key:"clearCached",value:function(){ee.prototype.clearCached.apply(this,arguments),this.props=null}}]),n}(ee);function le(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var ce=function(e){w()(n,e);var t=le(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"events",value:function(){return{click:'select','click [data-close-layer]':'removeItem','mousedown [data-move-layer]':'initSorter','touchstart [data-move-layer]':'initSorter'}}},{key:"template",value:function(){var e=this.pfx,t=this.ppfx,n=this.em,r=null==n?void 0:n.getConfig('icons'),i=(null==r?void 0:r.close)||'',o=(null==r?void 0:r.move)||'';return"\n      <div class=\"".concat(e,"label-wrp\">\n        <div id=\"").concat(e,"move\" class=\"").concat(t,"no-touch-actions\" data-move-layer>\n          ").concat(o,"\n        </div>\n        <div id=\"").concat(e,"label\" data-label></div>\n        <div id=\"").concat(e,"preview-box\" class=\"").concat(e,"layer-preview\" style=\"display: none\" data-preview-box>\n          <div id=\"").concat(e,"preview\" class=\"").concat(e,"layer-preview-cnt\" data-preview></div>\n        </div>\n        <div id=\"").concat(e,"close-layer\" class=\"").concat(e,"btn-close\" data-close-layer>\n          ").concat(i,"\n        </div>\n      </div>\n      <div id=\"").concat(e,"inputs\" data-properties></div>\n    ")}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.model,n=e.config||{};this.em=n.em,this.config=n,this.sorter=e.sorter,this.pfx=n.stylePrefix||'',this.ppfx=n.pStylePrefix||'',this.propertyView=e.propertyView;var r=this.propertyView.model;this.listenTo(t,'destroy remove',this.remove),this.listenTo(t,'change:values',this.updateLabel),this.listenTo(r,'change:selectedLayer',this.updateVisibility),t.view=this,t.set({droppable:0,draggable:1}),this.$el.data('model',t)}},{key:"initSorter",value:function(){var e;null===(e=this.sorter)||void 0===e||e.startSort(this.el)}},{key:"removeItem",value:function(e){e&&e.stopPropagation(),this.model.remove()}},{key:"select",value:function(){this.model.select()}},{key:"getPropertiesWrapper",value:function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector('[data-properties]')),this.propsWrapEl}},{key:"getPreviewEl",value:function(){return this.previewEl||(this.previewEl=this.el.querySelector('[data-preview]')),this.previewEl}},{key:"getLabelEl",value:function(){return this.labelEl||(this.labelEl=this.el.querySelector('[data-label]')),this.labelEl}},{key:"updateLabel",value:function(){var e=this.model,t=e.getLabel();if(this.getLabelEl().innerHTML=t,e.hasPreview()){var n=this.getPreviewEl(),r=e.getStylePreview({number:{min:-3,max:3}}),i=Object(s["keys"])(r).map((function(e){return"".concat(e,":").concat(r[e])})).join(';');n.setAttribute('style',i)}}},{key:"updateVisibility",value:function(){var e=this.pfx,t=this.model,n=this.propertyView,r=this.getPropertiesWrapper(),i=t.isSelected();r.style.display=i?'':'none',this.$el[i?'addClass':'removeClass']("".concat(e,"active")),i&&r.appendChild(n.props.el)}},{key:"render",value:function(){var e=this.el,t=this.pfx,n=this.model;return e.innerHTML=this.template(),e.className="".concat(t,"layer"),n.hasPreview()&&(e.querySelector("[data-preview-box]").style.display=''),this.updateLabel(),this.updateVisibility(),this}}]),n}(u["View"]);function ue(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var fe=function(e){w()(n,e);var t=ue(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"initialize",value:function(e){var t=this.collection,n=e.config||{},r=n.em,i=n.stylePrefix||'',o=n.pStylePrefix||'';this.config=n,this.pfx=i,this.ppfx=o,this.propertyView=e.propertyView,this.className="".concat(i,"layers ").concat(o,"field"),this.listenTo(t,'add',this.addTo),this.listenTo(t,'reset',this.reset),this.items=[];var a=r?r.get('Utils'):'';this.sorter=a?new a.Sorter({container:this.el,ignoreViewChildren:1,containerSel:".".concat(i,"layers"),itemSel:".".concat(i,"layer"),pfx:n.pStylePrefix}):'',t.view=this,this.$el.data('model',t),this.$el.data('collection',t)}},{key:"addTo",value:function(e){var t=this.collection.indexOf(e);this.addToCollection(e,null,t)}},{key:"addToCollection",value:function(e,t,n){var r=t||null,i=this.propertyView,o=this.config,a=this.sorter,s=this.$el,l=new ce({model:e,config:o,sorter:a,propertyView:i}),c=l.render().el;if(this.items.push(l),r)r.appendChild(c);else if(void 0!==n){var u='before';s.children().length===n&&(n--,u='after'),n<0?s.append(c):s.children().eq(n)[u](c)}else s.append(c);return c}},{key:"reset",value:function(e,t){this.clearItems(t),this.render()}},{key:"remove",value:function(){this.clearItems(),u["View"].prototype.remove.apply(this,arguments)}},{key:"clearItems",value:function(){this.items.forEach((function(e){return e.remove()})),this.items=[]}},{key:"render",value:function(){var e=this,t=this.$el,n=this.sorter,r=document.createDocumentFragment();return t.empty(),this.collection.forEach((function(t){return e.addToCollection(t,r)})),t.append(r),t.attr('class',this.className),n&&(n.plh=null),this}}]),n}(u["View"]);function de(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function he(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?de(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):de(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function pe(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var ge=function(e){w()(n,e);var t=pe(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"events",value:function(){return he(he({},se.prototype.events),{},{'click [data-add-layer]':'addLayer',change:''})}},{key:"templateInput",value:function(){var e=this.pfx,t=this.em,n=null==t?void 0:t.getConfig('icons'),r=(null==n?void 0:n.plus)||'+';return"\n      <div class=\"".concat(e,"field ").concat(e,"stack\">\n        <button type=\"button\" id=\"").concat(e,"add\" data-add-layer>\n          ").concat(r,"\n        </button>\n        <div data-layers-wrapper></div>\n      </div>\n    ")}},{key:"init",value:function(){var e=this.model;this.listenTo(e.__getLayers(),'change reset',this.updateStatus)}},{key:"addLayer",value:function(){this.model.addLayer({},{at:0})}},{key:"setValue",value:function(){}},{key:"remove",value:function(){var e;null===(e=this.layersView)||void 0===e||e.remove(),se.prototype.remove.apply(this,arguments)}},{key:"clearCached",value:function(){se.prototype.clearCached.apply(this,arguments),this.layersView=null}},{key:"onRender",value:function(){var e=this.model,t=this.el,n=this.config,r=e.get('properties');if(r.length&&!this.props){var i=new re({config:he(he({},n),{},{highlightComputed:!1,highlightChanged:!1}),collection:r,parent:this});i.render();var o=new fe({collection:e.__getLayers(),config:n,propertyView:this});o.render(),t.querySelector('[data-layers-wrapper]').appendChild(o.el),this.props=i,this.layersView=o}}}]),n}(se);function ve(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ve(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ve(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function ye(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var be=function(e){w()(n,e);var t=ye(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"events",value:function(){return me(me({},ee.prototype.events),{},{'click [data-clear-asset]':'clear','click [data-open-assets]':'openAssetManager'})}},{key:"templateInput",value:function(){var e,t=this.pfx,n=this.em,r=null===(e=this.em)||void 0===e?void 0:e.getConfig('icons'),i=null==r?void 0:r.close;return"\n      <div class=\"".concat(t,"field ").concat(t,"file\">\n        <div id='").concat(t,"input-holder'>\n          <div class=\"").concat(t,"btn-c\">\n            <button class=\"").concat(t,"btn\" id=\"").concat(t,"images\" type=\"button\" data-open-assets>\n              ").concat(n.t('styleManager.fileButton'),"\n            </button>\n          </div>\n          <div style=\"clear:both;\"></div>\n        </div>\n        <div id=\"").concat(t,"preview-box\" class=\"").concat(t,"preview-file\" data-preview-box>\n          <div id=\"").concat(t,"preview-file\" class=\"").concat(t,"preview-file-cnt\" data-preview></div>\n          <div id=\"").concat(t,"close\" class=\"").concat(t,"preview-file-close\" data-clear-asset>").concat(i,"</div>\n        </div>\n      </div>\n    ")}},{key:"__setValueInput",value:function(e){var t=this.model,n=this.el,r=t.getDefaultValue(),i=n.querySelector('[data-preview-box]'),o=n.querySelector('[data-preview]');i.style.display=e&&e!==r?'':'none',o.style.backgroundImage=e||t.getDefaultValue()}},{key:"openAssetManager",value:function(){var e,t=this,n=null===(e=this.em)||void 0===e?void 0:e.get('AssetManager');null==n||n.open({select:function(e,r){var i=Object(s["isString"])(e)?e:e.get('src');t.model.upValue(i,{partial:!r}),r&&n.close()},types:['image'],accept:'image/*'})}}]),n}(ee);function we(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Oe=function(e){w()(n,e);var t=we(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"templateInput",value:function(){return''}},{key:"init",value:function(){var e=this.model;this.listenTo(e,'change:unit',this.onValueChange),this.listenTo(e,'change:units',this.render)}},{key:"setValue",value:function(){}},{key:"onRender",value:function(){var e=this.ppfx,t=this.model,n=this.el;if(!this.inputInst){var r=t.input;r.ppfx=e,r.render(),n.querySelector(".".concat(e,"fields")).appendChild(r.el),this.input=r.inputEl.get(0),this.inputInst=r}}},{key:"clearCached",value:function(){ee.prototype.clearCached.apply(this,arguments),this.inputInst=null}}]),n}(ee),xe=n(90);function ke(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Ce=function(e){w()(n,e);var t=ke(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"setValue",value:function(e){var t;null===(t=this.inputInst)||void 0===t||t.setValue(e,{fromTarget:1,def:this.model.getDefaultValue()})}},{key:"remove",value:function(){var e=this;Oe.prototype.remove.apply(this,arguments);var t=this.inputInst;t&&t.remove&&t.remove(),['inputInst','$color'].forEach((function(t){return e[t]=null}))}},{key:"__handleChange",value:function(e,t){this.model.upValue(e,{partial:t})}},{key:"onRender",value:function(){if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this.ppfx,t=this.model,n=this.em,r=this.el,i=new xe["a"]({target:n,model:t,ppfx:e,onChange:this.__handleChange}).render();r.querySelector(".".concat(e,"fields")).appendChild(i.el),this.input=i.inputEl.get(0),this.inputInst=i}}}]),n}(Oe);function Se(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function je(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Se(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Se(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ee(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Pe=function(e){w()(n,e);var t=Ee(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return je(je({},T.getDefaults()),{},{options:[],full:0})}},{key:"getOptions",value:function(){var e=this.attributes,t=e.options,n=e.list;return(t&&t.length?t:n)||[]}},{key:"getOption",value:function(e){var t=this,n=e||this.getValue();return this.getOptions().filter((function(e){return t.getOptionId(e)===n}))[0]||null}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return this.set('options',e),this}},{key:"addOption",value:function(e){if(e){var t=this.getOptions();this.setOptions([].concat(i()(t),[e]))}return this}},{key:"getOptionId",value:function(e){return Object(l["isDef"])(e.id)?e.id:e.value}},{key:"getOptionLabel",value:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.locale,i=void 0===r||r,o=(Object(s["isString"])(e)?this.getOption(e):e)||{},a=this.getOptionId(o),l=o.label||o.name||a,c=this.getId();return i&&(null===(t=this.em)||void 0===t?void 0:t.t("styleManager.options.".concat(c,".").concat(a)))||l}},{key:"initialize",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];T.prototype.initialize.apply(this,t),this.listenTo(this,'change:options',this.__onOptionChange)}},{key:"__onOptionChange",value:function(){this.set('list',this.get('options'))}}]),n}(T);function _e(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Te=function(e){w()(n,e);var t=_e(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"templateInput",value:function(){var e=this.pfx,t=this.ppfx;return"\n      <div class=\"".concat(t,"field ").concat(t,"select\">\n        <span id=\"").concat(e,"input-holder\"></span>\n        <div class=\"").concat(t,"sel-arrow\">\n          <div class=\"").concat(t,"d-s-arrow\"></div>\n        </div>\n      </div>\n    ")}},{key:"initialize",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];ee.prototype.initialize.apply(this,t),this.listenTo(this.model,'change:options',this.updateOptions)}},{key:"updateOptions",value:function(){this.input=null,this.onRender()}},{key:"onRender",value:function(){var e=this.model,t=this.pfx,n=e.getOptions();if(!this.input){var r=[];n.forEach((function(t){var n=e.getOptionId(t),i=e.getOptionLabel(n),o=t.style?t.style.replace(/"/g,'&quot;'):'',a=o?"style=\"".concat(o,"\""):'',s=n.replace(/"/g,'&quot;');r.push("<option value=\"".concat(s,"\" ").concat(a,">").concat(i,"</option>"))}));var i=this.el.querySelector("#".concat(t,"input-holder"));i.innerHTML="<select>".concat(r.join(''),"</select>"),this.input=i.firstChild}}},{key:"__setValueInput",value:function(e){var t=this.model,n=this.getInputEl(),r=t.getOptions()[0],i=r?t.getOptionId(r):'';n&&(n.value=e||i)}}]),n}(ee);function Ae(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Me(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ae(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ae(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function De(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Le=function(e){w()(n,e);var t=De(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return Me(Me({},Pe.getDefaults()),{},{full:1})}}]),n}(Pe);function Ne(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Re=function(e){w()(n,e);var t=Ne(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"templateInput",value:function(){var e=this.ppfx;return"<div class=\"".concat(e,"field ").concat(e,"field-radio\"></div>")}},{key:"onRender",value:function(){var e=this.pfx,t=this.ppfx,n=this.model,r="".concat(t,"radio-item-label"),i=n.getName(),o=n.getOptions(),a="".concat(e,"radio ").concat(e,"radio-").concat(i),s=n.cid;if(!this.input){var l=[];o.forEach((function(o){var c=o.className?"".concat(o.className," ").concat(e,"icon ").concat(r):'',u=n.getOptionId(o),f="".concat(i,"-").concat(u,"-").concat(s),d=c?'':n.getOptionLabel(u),h=o.title?"title=\"".concat(o.title,"\""):'',p=n.getValue()===u?'checked':'';l.push("\n          <div class=\"".concat(t,"radio-item\">\n            <input type=\"radio\" class=\"").concat(a,"\" id=\"").concat(f,"\" name=\"").concat(i,"-").concat(s,"\" value=\"").concat(u,"\" ").concat(p,"/>\n            <label class=\"").concat(c||r,"\" ").concat(h," for=\"").concat(f,"\">").concat(d,"</label>\n          </div>\n        "))}));var c=this.el.querySelector(".".concat(t,"field"));c.innerHTML="<div class=\"".concat(t,"radio-items\">").concat(l.join(''),"</div>"),this.input=c.firstChild}}},{key:"__setValueInput",value:function(e){var t,n=this.model,r=e||n.getDefaultValue(),i=null===(t=this.getInputEl())||void 0===t?void 0:t.querySelector("[value=\"".concat(r,"\"]"));i&&(i.checked=!0)}}]),n}(Te),Fe=n(79);function Ie(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ie(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ie(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ve(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Be=function(e){w()(n,e);var t=Ve(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return ze(ze({},T.getDefaults()),{},{units:[],unit:'',min:'',max:'',step:1})}},{key:"getUnits",value:function(){return this.get('units')||[]}},{key:"getUnit",value:function(){return this.get('unit')}},{key:"getMin",value:function(){return this.get('min')}},{key:"getMax",value:function(){return this.get('max')}},{key:"getStep",value:function(){return this.get('step')}},{key:"upUnit",value:function(e,t){return this._up({unit:e},t)}},{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};T.callParentInit(T,this,e,t);var n=this.get('unit'),r=this.get('units');this.input=Object(l["hasWin"])()&&new Fe["a"]({model:this}),r.length&&!n&&this.set('unit',r[0],{silent:1}),T.callInit(this,e,t)}},{key:"__getClearProps",value:function(){return ze(ze({},T.prototype.__getClearProps()),{},{unit:''})}},{key:"parseValue",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=T.prototype.parseValue.apply(this,arguments),r=this.input.validateInputValue(n.value,ze({deepCheck:1},t)),i=r.value,o=r.unit;return n.value=i,n.unit=o,n}},{key:"getFullValue",value:function(){var e=this.get('value'),t=this.get('unit');return e=Object(s["isUndefined"])(e)?'':e,t=!Object(s["isUndefined"])(t)&&e?t:'',e="".concat(e).concat(t),T.prototype.getFullValue.apply(this,[e])}}]),n}(T);function Ue(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function He(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Ue(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Ue(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function We(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var $e=function(e){w()(n,e);var t=We(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return He(He({},Be.getDefaults()),{},{showInput:1})}}]),n}(Be);function qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ke(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?qe(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ge(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var Ye=function(e){w()(n,e);var t=Ge(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"events",value:function(){return Ke(Ke({},Oe.prototype.events),{},{'change [type=range]':'inputValueChanged','input [type=range]':'inputValueChangedSoft',change:''})}},{key:"templateInput",value:function(e){var t=this.ppfx;return"\n      <div class=\"".concat(t,"field ").concat(t,"field-range\">\n        <input type=\"range\" min=\"").concat(e.get('min'),"\" max=\"").concat(e.get('max'),"\" step=\"").concat(e.get('step'),"\"/>\n      </div>\n    ")}},{key:"getSliderEl",value:function(){return this.slider||(this.slider=this.el.querySelector('input[type=range]')),this.slider}},{key:"inputValueChanged",value:function(){this.model.upValue(this.getSliderEl().value)}},{key:"inputValueChangedSoft",value:function(){this.model.upValue(this.getSliderEl().value,{partial:!0})}},{key:"setValue",value:function(e){var t=this.model,n=t.parseValue(e);this.getSliderEl().value=''===e?t.getDefaultValue():parseFloat(n.value),Oe.prototype.setValue.apply(this,arguments)}},{key:"onRender",value:function(){Oe.prototype.onRender.apply(this,arguments),this.model.get('showInput')||(this.inputInst.el.style.display='none')}},{key:"clearCached",value:function(){Oe.prototype.clearCached.apply(this,arguments),this.slider=null}}]),n}(Oe),Je=f.a.Collection.extend(S["a"]).extend({extendViewApi:1,init:function(){var e=this.opts,t=this.em,n=e.module||(null==t?void 0:t.get('StyleManager'));n&&(n.__listenAdd(this,n.events.propertyAdd),n.__listenRemove(this,n.events.propertyRemove))},types:[{id:'stack',model:G,view:ge,isType:function(e){if(e&&'stack'==e.type)return e}},{id:'composite',model:N,view:se,isType:function(e){if(e&&'composite'==e.type)return e}},{id:'file',model:T,view:be,isType:function(e){if(e&&'file'==e.type)return e}},{id:'color',model:T,view:Ce,isType:function(e){if(e&&'color'==e.type)return e}},{id:'select',model:Pe,view:Te,isType:function(e){if(e&&'select'==e.type)return e}},{id:'radio',model:Le,view:Re,isType:function(e){if(e&&'radio'==e.type)return e}},{id:'slider',model:$e,view:Ye,isType:function(e){if(e&&'slider'==e.type)return e}},{id:'integer',model:Be,view:Oe,isType:function(e){if(e&&'integer'==e.type)return e}},{id:'number',model:Be,view:Oe,isType:function(e){if(e&&'number'==e.type)return e}},{id:'base',model:T,view:ee,isType:function(e){return e.type='base',e}}]}),Xe=["extend"];function Qe(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Ze(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Qe(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Qe(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function et(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var tt=function(e){w()(n,e);var t=et(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return{id:'',name:'',open:!0,visible:!0,buildProps:'',extendBuilded:1,properties:[]}}},{key:"initialize",value:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.em;this.em=r;var i=e||{},o=this.buildProperties(i.buildProps),a=this.get('name')||'',l=[];!this.get('id')&&this.set('id',a.replace(/ /g,'_').toLowerCase()),l=(l=o?this.extendProperties(o):this.get('properties').map((function(e){return Object(s["isString"])(e)?t.buildProperties(e)[0]:e})).filter(Boolean)).map((function(e){return t.checkExtend(e)}));var c=new Je(l,{em:r});c.sector=this,this.set('properties',c)}},{key:"getId",value:function(){return this.get('id')}},{key:"getName",value:function(){var e,t=this.getId();return(null===(e=this.em)||void 0===e?void 0:e.t("styleManager.sectors.".concat(t)))||this.get('name')}},{key:"setName",value:function(e){return this.set('name',e)}},{key:"isOpen",value:function(){return!!this.get('open')}},{key:"setOpen",value:function(e){return this.set('open',e)}},{key:"isVisible",value:function(){return!!this.get('visible')}},{key:"getProperties",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.get('properties'),n=t.models?i()(t.models):t;return n.filter((function(t){var n=!0;(e.withValue&&(n=t.hasValue({noParent:!0})),e.withParentValue)&&(n=!t.hasValue({noParent:!0})&&t.hasValue());return n}))}},{key:"getProperty",value:function(e){return this.getProperties().filter((function(t){return t.get('id')===e}))[0]||null}},{key:"addProperty",value:function(e,t){return this.get('properties').add(this.checkExtend(e),t)}},{key:"extendProperties",value:function(e,t,n){for(var r=e.length,i=t||this.get('properties'),o=this.get('extendBuilded'),a=[],l=0,c=i.length;l<c;l++){for(var u=i[l],f=0,d=0;d<r;d++){var h=e[d];if(u.property!=h.property&&u.id!=h.property);else{var p=u.properties;p&&p.length&&(u.properties=this.extendProperties(h.properties||[],p,1)),e[d]=o?Object(s["extend"])(h,u):u,a[d]=e[d],f=1}}f||(e.push(u),a.push(u))}return n?a.filter((function(e){return e})):e}},{key:"checkExtend",value:function(e){var t=(Object(s["isString"])(e)?{extend:e}:e)||{},n=t.extend,r=p()(t,Xe);return n?Ze(Ze({},this.buildProperties([n])[0]||{}),r):e}},{key:"buildProperties",value:function(e){var t,n=e||[];if(!n.length)return[];var r=null===(t=this.em)||void 0===t?void 0:t.get('StyleManager').builtIn;return null==r?void 0:r.build(n)}}]),n}(u["Model"]);function nt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function rt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?nt(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):nt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function it(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var ot=function(e){w()(n,e);var t=it(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.module,r=t.em;this.em=r,this.module=n,this.listenTo(this,'reset',this.onReset)}},{key:"model",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.collection.em;return new tt(e,rt(rt({},t),{},{em:n}))}},{key:"onReset",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.previousModels||[];n.forEach((function(e){return e.get('properties').reset()}))}}]),n}(u["Collection"]),at=n(62),st=n.n(at),lt=["extend"];function ct(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function ut(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?ct(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):ct(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var ft,dt=function(e){return e.map((function(e){return{id:e}}))},ht=function(){function e(){v()(this,e),this.typeNumber='number',this.typeColor='color',this.typeRadio='radio',this.typeSelect='select',this.typeFile='file',this.typeSlider='slider',this.typeComposite='composite',this.typeStack='stack',this.unitsSize=['px','%','em','rem','vh','vw'],this.unitsSizeNoPerc=['px','em','rem','vh','vw'],this.unitsTime=['s','ms'],this.unitsAngle=['deg','rad','grad'],this.fixedValues=['initial','inherit','auto'];var t=', sans-serif',n=['flex-start','flex-end','center'],r=[].concat(n,['baseline','stretch']);this.optsBgSize=dt(['auto','cover','contain']),this.optsBgAttach=dt(['scroll','fixed','local']),this.optsBgRepeat=dt(['repeat','repeat-x','repeat-y','no-repeat']),this.optsWrap=dt(['nowrap','wrap','wrap-reverse']),this.optsOverflow=dt(['visible','hidden','scroll','auto']),this.optsDir=dt(['row','row-reverse','column','column-reverse']),this.opstDisplay=dt(['block','inline','inline-block','flex','none']),this.optsTransitFn=dt(['linear','ease','ease-in','ease-out','ease-in-out']),this.optsCursor=dt(['auto','pointer','copy','crosshair','grab','grabbing','help','move','text']),this.optsFloat=dt(['none','left','right']),this.optsPos=dt(['static','relative','absolute','fixed']),this.optsTextAlign=dt(['left','center','right','justify']),this.optsFlexAlign=dt(r),this.optsJustCont=dt([].concat(n,['space-between','space-around','space-evenly'])),this.optsAlignCont=dt([].concat(n,['space-between','space-around','stretch'])),this.optsAlignSelf=dt(['auto'].concat(i()(r))),this.optsTransitProp=dt(['all','width','height','background-color','transform','box-shadow','opacity']),this.optsBorderStyle=dt(['none','solid','dotted','dashed','double','groove','ridge','inset','outset']),this.optsBgPos=dt(['left top','left center','left bottom','right top','right center','right bottom','center top','center center','center bottom']),this.optsWeight=[{id:'100',label:'Thin'},{id:'200',label:'Extra-Light'},{id:'300',label:'Light'},{id:'400',label:'Normal'},{id:'500',label:'Medium'},{id:'600',label:'Semi-Bold'},{id:'700',label:'Bold'},{id:'800',label:'Extra-Bold'},{id:'900',label:'Ultra-Bold'}],this.optsShadowType=[{id:'',label:'Outside'},{id:'inset',label:'Inside'}],this.optsFonts=['Arial, Helvetica'+t,'Arial Black, Gadget'+t,'Brush Script MT'+t,'Comic Sans MS, cursive'+t,'Courier New, Courier, monospace','Georgia, serif','Helvetica'+t,'Impact, Charcoal'+t,'Lucida Sans Unicode, Lucida Grande'+t,'Tahoma, Geneva'+t,'Times New Roman, Times, serif','Trebuchet MS, Helvetica'+t,'Verdana, Geneva'+t].map((function(e){return{id:e,label:e.split(',')[0]}})),this.fixedFontSizes=['medium','xx-small','x-small','small','large','x-large','xx-large','smaller','larger','length','initial','inherit'],this.fixedLetSpace=['normal','initial','inherit'],this.requireFlex={display:['flex']},this.init()}return y()(e,[{key:"__sub",value:function(e){var t=this;return function(){return e.map((function(e){if(Object(s["isString"])(e))return t.get(e);var n=e.extend,r=p()(e,lt);return ut(ut({},t.get(n)),r)}))}}},{key:"init",value:function(){var e=this,t=this.fixedValues,n=this.requireFlex,r=this.typeNumber;return this.props={},[['text-shadow-h',{type:r,default:'0',units:this.unitsSizeNoPerc}],['top',{default:'auto',units:this.unitsSize,fixedValues:t},'text-shadow-h'],['right',{},'top'],['bottom',{},'top'],['left',{},'top'],['margin-top',{default:'0'},'top'],['margin-right',{},'margin-top'],['margin-bottom',{},'margin-top'],['margin-left',{},'margin-top'],['padding-top',{min:0},'margin-top'],['padding-right',{},'padding-top'],['padding-bottom',{},'padding-top'],['padding-left',{},'padding-top'],['width',{min:0},'top'],['min-width',{},'width'],['max-width',{},'width'],['height',{},'width'],['min-height',{},'width'],['max-height',{},'width'],['flex-basis',{requiresParent:n},'width'],['font-size',{default:'medium',fixedValues:this.fixedFontSizes},'width'],['letter-spacing',{default:'normal',fixedValues:this.fixedLetSpace},'top'],['line-height',{},'letter-spacing'],['text-shadow-v',{},'text-shadow-h'],['text-shadow-blur',{min:0},'text-shadow-h'],['border-radius-c',{property:'border-radius',fixedValues:void 0},'padding-top'],['border-top-left-radius',{},'border-radius-c'],['border-top-right-radius',{},'border-radius-c'],['border-bottom-left-radius',{},'border-radius-c'],['border-bottom-right-radius',{},'border-radius-c'],['border-width',{units:this.unitsSizeNoPerc},'border-radius-c'],['box-shadow-h',{},'text-shadow-h'],['box-shadow-v',{},'text-shadow-h'],['box-shadow-blur',{default:'5px'},'text-shadow-blur'],['box-shadow-spread',{},'text-shadow-h'],['transition-duration',{default:'2s',units:this.unitsTime},'border-radius-c'],['perspective',{},'border-radius-c'],['transform-rotate-x',{functionName:'rotateX',units:this.unitsAngle,default:'0',type:r}],['transform-rotate-y',{functionName:'rotateY'},'transform-rotate-x'],['transform-rotate-z',{functionName:'rotateZ'},'transform-rotate-x'],['transform-scale-x',{default:'1',functionName:'scaleX',units:void 0},'transform-rotate-x'],['transform-scale-y',{functionName:'scaleY'},'transform-scale-x'],['transform-scale-z',{functionName:'scaleZ'},'transform-scale-x'],['order',{type:r,default:'0',requiresParent:n}],['flex-grow',{},'order'],['flex-shrink',{default:'1'},'order'],['float',{type:this.typeRadio,default:'none',options:this.optsFloat}],['position',{default:'static',options:this.optsPos},'float'],['text-align',{default:'left',options:this.optsTextAlign},'float'],['color',{type:this.typeColor,default:'black'}],['text-shadow-color',{},'color'],['border-color',{},'color'],['box-shadow-color',{},'color'],['background-color',{default:'none'},'color'],['background-image',{type:this.typeFile,functionName:'url',default:'none',full:!0}],['opacity',{type:this.typeSlider,default:'1',min:0,max:1,step:.01}],['display',{type:this.typeSelect,default:'block',options:this.opstDisplay}],['flex-direction',{default:'row',options:this.optsDir,requires:n},'display'],['flex-wrap',{default:'nowrap',options:this.optsWrap},'flex-direction'],['justify-content',{default:'flex-start',options:this.optsJustCont},'flex-wrap'],['align-items',{default:'stretch',options:this.optsFlexAlign},'flex-wrap'],['align-content',{options:this.optsAlignCont},'align-items'],['align-self',{default:'auto',options:this.optsAlignSelf,requiresParent:n},'display'],['font-family',{default:'Arial, Helvetica, sans-serif',options:this.optsFonts},'display'],['font-weight',{default:'400',options:this.optsWeight},'display'],['border-style',{default:'solid',options:this.optsBorderStyle},'display'],['box-shadow-type',{default:'',options:this.optsShadowType},'display'],['background-repeat',{default:'repeat',options:this.optsBgRepeat},'display'],['background-position',{default:'left top',options:this.optsBgPos},'display'],['background-attachment',{default:'scroll',options:this.optsBgAttach},'display'],['background-size',{default:'auto',options:this.optsBgSize},'display'],['transition-property',{default:'width',options:this.optsTransitProp},'display'],['transition-timing-function',{default:'ease',options:this.optsTransitFn},'display'],['cursor',{default:'auto',options:this.optsCursor},'display'],['overflow',{default:'visible',options:this.optsOverflow},'display'],['overflow-x',{},'overflow'],['overflow-y',{},'overflow'],['margin',{type:this.typeComposite,properties:this.__sub([{extend:'margin-top',id:'margin-top-sub'},{extend:'margin-right',id:'margin-right-sub'},{extend:'margin-bottom',id:'margin-bottom-sub'},{extend:'margin-left',id:'margin-left-sub'}])}],['padding',{properties:this.__sub([{extend:'padding-top',id:'padding-top-sub'},{extend:'padding-right',id:'padding-right-sub'},{extend:'padding-bottom',id:'padding-bottom-sub'},{extend:'padding-left',id:'padding-left-sub'}])},'margin'],['border',{properties:this.__sub([{extend:'border-width',id:'border-width-sub'},{extend:'border-style',id:'border-style-sub'},{extend:'border-color',id:'border-color-sub'}])},'margin'],['border-radius',{properties:this.__sub([{extend:'border-top-left-radius',id:'border-top-left-radius-sub'},{extend:'border-top-right-radius',id:'border-top-right-radius-sub'},{extend:'border-bottom-right-radius',id:'border-bottom-right-radius-sub'},{extend:'border-bottom-left-radius',id:'border-bottom-left-radius-sub'}])},'margin'],['transform',{properties:this.__sub(['transform-rotate-x','transform-rotate-y','transform-rotate-z','transform-scale-x','transform-scale-y','transform-scale-z'])},'margin'],['transition',{type:this.typeStack,properties:this.__sub([{extend:'transition-property',id:'transition-property-sub'},{extend:'transition-duration',id:'transition-duration-sub'},{extend:'transition-timing-function',id:'transition-timing-function-sub'}])}],['box-shadow',{preview:!0,layerLabel:function(e,t){var n=t.values,r=n['box-shadow-h'],i=n['box-shadow-v'],o=n['box-shadow-blur'],a=n['box-shadow-spread'];return"".concat(r," ").concat(i," ").concat(o," ").concat(a)},properties:this.__sub(['box-shadow-h','box-shadow-v','box-shadow-blur','box-shadow-spread','box-shadow-color','box-shadow-type'])},'transition'],['text-shadow',{default:'none',layerLabel:function(e,t){var n=t.values,r=n['text-shadow-h'],i=n['text-shadow-v'],o=n['text-shadow-blur'];return"".concat(r," ").concat(i," ").concat(o)},properties:this.__sub(['text-shadow-h','text-shadow-v','text-shadow-blur','text-shadow-color'])},'box-shadow'],['background',{detached:!0,layerLabel:function(e,t){var n=t.values,r=n['background-repeat-sub'],i=n['background-position-sub'],o=n['background-attachment-sub'],a=n['background-size-sub'];return"".concat(r," ").concat(i," ").concat(o," ").concat(a)},properties:this.__sub([{extend:'background-image',id:'background-image-sub'},{extend:'background-repeat',id:'background-repeat-sub'},{extend:'background-position',id:'background-position-sub'},{extend:'background-attachment',id:'background-attachment-sub'},{extend:'background-size',id:'background-size-sub'}])},'box-shadow']].forEach((function(t){var n=st()(t,3),r=n[0],i=n[1],o=n[2];e.add(r,i||{},{from:o})})),this}},{key:"add",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.from||'',i=this.props[r||e]||{},o=ut(ut({},i),{},{property:e},t);return o.properties&&Object(s["isFunction"])(o.properties)&&(o.properties=o.properties()),this.props[e]=o,o}},{key:"get",value:function(e){return this.props[e]||null}},{key:"build",value:function(e){var t=this,n=[];return(Object(s["isString"])(e)?[e]:e).forEach((function(e){n.push(t.get(e)||{property:e})})),n}}]),e}(),pt=n(30),gt=n.n(pt),vt=n(27);function mt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var yt=function(e){w()(n,e);var t=mt(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"template",value:function(e){var t,n=e.pfx,r=e.label,i=null===(t=this.em)||void 0===t?void 0:t.getConfig('icons'),o=(null==i?void 0:i.caret)||'',a="".concat(n,"sector-");return Object(vt["a"])(ft||(ft=gt()(["\n      <div class=\"","title\" data-sector-title>\n        <div class=\"","caret\">$","</div>\n        <div class=\"","label\">","</div>\n      </div>\n    "])),a,a,o,a,r)}},{key:"events",value:function(){return{'click [data-sector-title]':'toggle'}}},{key:"initialize",value:function(e){var t=e.config||{},n=this.model,r=t.em;this.config=t,this.em=r,this.pfx=t.stylePrefix||'',this.listenTo(n,'destroy remove',this.remove),this.listenTo(n,'change:open',this.updateOpen),this.listenTo(n,'change:visible',this.updateVisibility)}},{key:"updateOpen",value:function(){var e=this.$el,t=this.model,n=this.pfx,r=t.isOpen();e[r?'addClass':'removeClass']("".concat(n,"open")),this.getPropertiesEl().style.display=r?'':'none'}},{key:"updateVisibility",value:function(){this.el.style.display=this.model.isVisible()?'':'none'}},{key:"getPropertiesEl",value:function(){var e=this.$el,t=this.pfx;return e.find(".".concat(t,"properties")).get(0)}},{key:"toggle",value:function(){var e=this.model;e.setOpen(!e.get('open'))}},{key:"renderProperties",value:function(){var e=this.model,t=this.config,n=e.get('properties');if(n){var r=new re({collection:n,config:t});this.$el.append(r.render().el)}}},{key:"render",value:function(){var e=this.pfx,t=this.model,n=this.$el,r=t.getId(),i=t.getName();return n.html(this.template({pfx:e,label:i})),this.renderProperties(),n.attr('class',"".concat(e,"sector ").concat(e,"sector__").concat(r," no-select")),this.updateOpen(),this}}]),n}(u["View"]);function bt(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var wt=function(e){w()(n,e);var t=bt(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"initialize",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.module,n=e.config,r=void 0===n?{}:n,i=this.collection;this.pfx=r.stylePrefix||'',this.ppfx=r.pStylePrefix||'',this.config=r,this.module=t,this.listenTo(i,'add',this.addTo),this.listenTo(i,'reset',this.render)}},{key:"remove",value:function(){var e=this;u["View"].prototype.remove.apply(this,arguments),['config','module','em'].forEach((function(t){return e[t]={}}))}},{key:"addTo",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};this.addToCollection(e,null,n)}},{key:"addToCollection",value:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.config,i=this.el,o=t||i,a=new yt({model:e,config:r}).render().el;return Object(te["b"])(o,a,n.at),a}},{key:"render",value:function(){var e=this,t=this.$el,n=this.pfx,r=this.ppfx;t.empty();var i=document.createDocumentFragment();return this.collection.each((function(t){return e.addToCollection(t,i)})),t.append(i),t.addClass("".concat(n,"sectors ").concat(r,"one-bg ").concat(r,"two-color")),this}}]),n}(u["View"]),Ot=n(6);function xt(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function kt(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?xt(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):xt(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var Ct='style',St="".concat(Ct,":"),jt="".concat(St,"sector"),Et="".concat(jt,":add"),Pt="".concat(jt,":remove"),_t="".concat(jt,":update"),Tt="".concat(St,"property"),At="".concat(Tt,":add"),Mt="".concat(Tt,":remove"),Dt="".concat(Tt,":update"),Lt="".concat(St,"layer:select"),Nt="".concat(St,"target"),Rt="".concat(St,"custom"),Ft=function(e){return e||0===e};t["default"]=function(){var e,t,n;return kt(kt({},c["a"]),{},{Sector:tt,events:{all:Ct,sectorAdd:Et,sectorRemove:Pt,sectorUpdate:_t,propertyAdd:At,propertyRemove:Mt,propertyUpdate:Dt,layerSelect:Lt,target:Nt,custom:Rt},name:'StyleManager',init:function(){var n=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.__initConfig(d,r);var i=this.config,o=i.em,a=i.pStylePrefix;a&&(i.stylePrefix=a+i.stylePrefix),this.builtIn=new ht,e=new Je([],{em:o,module:this}),t=new ot([],kt(kt({},i),{},{module:this}));var l=new u["Model"]({targets:[]});this.model=l,this.__listenAdd(t,Et),this.__listenRemove(t,Pt),this.__listenUpdate(t,_t);var c='component:toggled component:update:classes change:state change:device frame:resized selector:type',f=Object(s["debounce"])((function(){return n.__upSel()}));l.listenTo(o,c,f);var h=Object(s["debounce"])((function(){n.__upProps(),n.__trgCustom()}));l.listenTo(o,'styleable:change undo redo',h);var p=Object(s["debounce"])((function(){return n.__trgCustom()}));return l.listenTo(o,"".concat(Lt," ").concat(Nt),p),l.on('change:lastTarget',(function(){return o.trigger(Nt,n.getSelected())})),this},__upSel:function(){this.select(this.em.getSelectedAll())},__trgCustom:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.__ctn=this.__ctn||e.container,this.em.trigger(this.events.custom,{container:this.__ctn})},__trgEv:function(e){for(var t,n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];(t=this.em).trigger.apply(t,[e].concat(r))},onLoad:function(){t.add(this.config.sectors,{silent:!0})},postRender:function(){this.__appendTo()},addSector:function(e,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.getSector(e);return i||(n.id=e,i=t.add(n,r)),i},getSector:function(e){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=t.where({id:e})[0];return!r&&n.warn&&this._logNoSector(e),r||null},getSectors:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t&&t.models?e.array?i()(t.models):t:[];return e.visible?n.filter((function(e){return e.isVisible()})):n},removeSector:function(e){return this.getSectors().remove(this.getSector(e,{warn:1}))},addProperty:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getSector(e,{warn:1}),i=null;return r&&(i=r.addProperty(t,n)),i},getProperty:function(e,t){var n,r=this.getSector(e,{warn:1});return r&&(n=r.get('properties').filter((function(e){return e.get('property')===t||e.get('id')===t}))[0]),n||null},getProperties:function(e){var t=null,n=this.getSector(e,{warn:1});return n&&(t=n.get('properties')),t},removeProperty:function(e,t){var n=this.getProperties(e);return n?n.remove(this.getProperty(e,t)):null},select:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=Object(s["isArray"])(e)?e:[e],o=n.stylable,a=r.get('CssComposer'),c=[];i.filter(Boolean).forEach((function(e){var t=e;if(Object(s["isString"])(e)){var n=a.getRule(e)||a.setRule(e);!Object(s["isUndefined"])(o)&&n.set({stylable:o}),t=n}c.push(t)}));var u=n.component||c.filter((function(e){return Object(l["isComponent"])(e)})).reverse()[0];c=c.map((function(e){return t.getModelToStyle(e)}));var f=r.getState(),d=c.slice().reverse()[0],h=this.getParentRules(d,{state:f,component:u}),p=this.__getStateTarget();return r.skip((function(){var e;if(f&&null!=d&&null!==(e=d.getState)&&void 0!==e&&e.call(d)){var t=d.getStyle();p?p.setStyle(t):p=a.getAll().add({selectors:'gjs-selected',style:t,important:!0})}else p&&(a.remove(p),p=null)})),this.model.set({targets:c,lastTarget:d,lastTargetParents:h,stateTarget:p,component:u}),this.__upProps(n),c},getSelected:function(){return this.model.get('lastTarget')||null},getSelectedAll:function(){return this.model.get('targets')},getSelectedParents:function(){return this.model.get('lastTargetParents')||[]},__getStateTarget:function(){return this.model.get('stateTarget')||null},applyUpdateStyle:function(e){this.em.get('DomComponents').getById(e.id).addStyle(e.style,e.opts)},addStyleTargets:function(e,t){this.getSelectedAll().map((function(n){return n.addStyle(e,t)}));var n=this.em.getSelected(),r=n.getId();n.setStyle(n.getStyle(),t);var i={action:'update-style',opts:{id:r,style:e,opts:t}};Ot["c"]==Ot["d"].Synced?(Object(Ot["h"])(Ot["d"].ApplyingLocalOp),Object(Ot["b"])(i)):Ot["c"]!=Ot["d"].AwaitingACK&&Ot["c"]!=Ot["d"].AwaitingWithBuffer||(Object(Ot["h"])(Ot["d"].ApplyingBufferedLocalOp),Object(Ot["a"])(i))},getBuiltIn:function(e){return this.builtIn.get(e)},getBuiltInAll:function(){return this.builtIn.props},addBuiltIn:function(e,t){return this.builtIn.add(e,t)},getModelToStyle:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.em,i=n.skipAdd;if(r&&null!==(t=e)&&void 0!==t&&t.toHTML){var o,a=r.getConfig(),s=r.get('UndoManager'),l=r.get('CssComposer'),c=r.get('SelectorManager'),u=c?c.getConfig():{},f=a.devicePreviewMode?'':r.get('state'),d=e.get('classes'),h=d.getStyleable(),p=h.length,g=!u.componentFirst||n.useClasses,v={noCount:1},m={state:f,addOpts:v};if(s.stop(),p&&g){var y=r.getCurrentMedia();(o=l.get(h,f,y))||i||(o=l.add(h,f,y,{},v))}else if(a.avoidInlineStyle){var b=e.getId();!(o=l.getIdRule(b,m))&&!i&&(o=l.setIdRule(b,{},m)),e.is('wrapper')&&o.set('wrapper',1,v)}o&&(e=o),s.start()}return e},getParentRules:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.state,r=t.component,i=this.em,o=[];if(i&&e){var a=r,l=i.get('CssComposer'),c=i.get('CodeManager').getGenerator('css'),u=e.toHTML?e:e.getComponent(),f={combination:!0,array:!0},d=[],h=[],p=[];u?(d=l.getRules("#".concat(u.getId())),p=(h=a?l.getRules(a.getSelectors().getFullName(f)):[]).concat(d)):(d=a?l.getRules("#".concat(a.getId())):[],h=l.getRules(e.getSelectors().getFullName(f)),p=d.concat(h));var g=p.filter((function(e){return Object(s["isUndefined"])(n)?1:e.get('state')===n})).sort(c.sortRules).reverse();o=g.slice(g.indexOf(e)+1)}return o},addType:function(t,n){e.addType(t,n)},getType:function(t){return e.getType(t)},getTypes:function(){return e.getTypes()},createType:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.model,r=void 0===n?{}:n,i=t.view,o=void 0===i?{}:i,a=this.config,s=this.getType(e);if(s)return new s.view(kt({model:new s.model(r),config:a},o))},render:function(){var e=this.config,r=this.em,i=n&&n.el;return(n=new wt({el:i,em:r,config:e,collection:t,module:this})).render().el},_logNoSector:function(e){var t=this.em;t&&t.logWarning("'".concat(e,"' sector not found"))},__upProps:function(e){var n=this,r=this.getSelected();if(r){var i=this.model.get('component'),o=this.getSelectedParents(),a=r.getStyle(),s=o.map((function(e){return{target:e,style:e.getStyle()}}));t.map((function(t){t.getProperties().map((function(t){n.__upProp(t,a,s,e)}))})),t.forEach((function(e){var n=e.getProperties();n.forEach((function(e){var n=e.__checkVisibility({target:r,component:i,sectors:t});e.set('visible',n)}));var o=n.some((function(e){return e.isVisible()}));e.set('visible',o)}))}},__upProp:function(e,t,n,r){var i=this,o=e.getName(),a=t[o],s=Ft(a),l='stack'===e.getType(),c='composite'===e.getType(),u=kt(kt({},r),{},{__up:!0}),f=!c&&!l,d=l?e.__getLayersFromStyle(t):[],h=c?e.__getPropsFromStyle(t):{},p=s?a:null,g=null;if(l&&null===d||c&&null===h){var v=l?'__getLayersFromStyle':'__getPropsFromStyle',m=n.filter((function(t){return null!==e[v](t.style)}))[0];if(m){p=m.style[o],g=m.target;var y=e[v](m.style);l?d=y:h=y}}else if(!s){p=null;var b=n.filter((function(e){return Ft(e.style[o])}))[0];b&&(p=b.style[o],g=b.target)}if(e.__setParentTarget(g),f&&e.__getFullValue()!==p&&e.upValue(p,u),l&&e.__setLayers(d||[]),c){var w=e.getProperties();if(e.isDetached()){var O=e.__getPropsFromStyle(t,{byName:!0})||{},x=n.map((function(t){return kt(kt({},t),{},{style:e.__getPropsFromStyle(t.style,{byName:!0})||{}})}));w.map((function(e){return i.__upProp(e,O,x,r)}))}else e.__setProperties(h||{},u),e.getProperties().map((function(e){return e.__setParentTarget(g)}))}},destroy:function(){[e,t].forEach((function(e){e.reset(),e.stopListening()})),n&&n.remove(),[e,t,n].forEach((function(e){return{}})),this.em={},this.config={},this.builtIn={},this.model={}}})}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(0),a={stylePrefix:'trt-',appendTo:'',optionsTarget:[{value:!1},{value:'_blank'}]},s=n(65),l=n(62),c=n.n(l),u=n(4),f=n.n(u),d=n(1),h=(n(51),n(40),n(6));function p(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function g(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?p(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):p(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var v=f.a.$,m=f.a.View.extend({events:{},eventCapture:['change'],appendInput:1,attributes:function(){return this.model.get('attributes')},templateLabel:function(){var e=this.ppfx,t=this.getLabel();return"<div class=\"".concat(e,"label\" title=\"").concat(t,"\">").concat(t,"</div>")},templateInput:function(){var e=this.clsField;return"<div class=\"".concat(e,"\" data-input></div>")},initialize:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.config,r=void 0===n?{}:n,i=this.model,o=this.eventCapture,a=i.target,s=i.attributes.type;this.config=r,this.em=r.em,this.pfx=r.stylePrefix||'',this.ppfx=r.pStylePrefix||'',this.target=a;var l=this.ppfx;this.clsField="".concat(l,"field ").concat(l,"field-").concat(s),[['change:value',this.onValueChange],['remove',this.removeView]].forEach((function(t){var n=c()(t,2),r=n[0],o=n[1];i.off(r,o),e.listenTo(i,r,o)})),i.view=this,this.listenTo(i,'change:label',this.render),this.listenTo(i,'change:placeholder',this.rerender),this.events={},o.forEach((function(t){return e.events[t]='onChange'})),this.delegateEvents(),this.init()},getClbOpts:function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},removeView:function(){this.remove(),this.removed()},init:function(){},removed:function(){},onRender:function(){},onUpdate:function(){},onEvent:function(){},onChange:function(e){for(var t=this.getInputElem(),n=this.em.getSelected().getId(),r=this.em.get('DomComponents').getById(n).getTraits(),i=this.model.cid,a=0,s=0;s<r.length;s++)if(r[s].cid==i){a=s;break}t&&!Object(o["isUndefined"])(t.value)&&this.model.set('value',t.value),this.onEvent(g(g({},this.getClbOpts()),{},{event:e}));var l={action:'update-trait',opts:{id:n,traitIndex:a,value:t.value}};h["c"]==h["d"].Synced?(Object(h["h"])(h["d"].ApplyingLocalOp),Object(h["b"])(l)):h["c"]!=h["d"].AwaitingACK&&h["c"]!=h["d"].AwaitingWithBuffer||(Object(h["h"])(h["d"].ApplyingBufferedLocalOp),Object(h["a"])(l))},getValueForTarget:function(){return this.model.get('value')},setInputValue:function(e){var t=this.getInputElem();t&&(t.value=e)},onValueChange:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(n.fromTarget)this.setInputValue(e.get('value')),this.postUpdate();else{var r=this.getValueForTarget();e.setTargetValue(r,n)}},renderLabel:function(){var e=this.$el,t=this.target,n=this.getLabel(),r=this.templateLabel(t);this.createLabel&&(r=this.createLabel({label:n,component:t,trait:this})||''),e.find('[data-label]').append(r)},getLabel:function(){var e=this.em,t=this.model.attributes,n=t.label,r=t.name;return e.t("traitManager.traits.labels.".concat(r))||Object(d["capitalize"])(n||r).replace(/-/g,' ')},getComponent:function(){return this.target},getInputEl:function(){if(!this.$input){var e=this.em,t=this.model,n=t,r=t.attributes.name,i=n.get('placeholder')||n.get('default')||'',a=n.get('type')||'text',s=n.get('min'),l=n.get('max'),c=this.getModelValue(),u=v("<input type=\"".concat(a,"\" placeholder=\"").concat(i,"\">")),f=e.t("traitManager.traits.attributes.".concat(r))||{};u.attr(f),Object(o["isUndefined"])(c)||(n.set({value:c},{silent:!0}),u.prop('value',c)),s&&u.prop('min',s),l&&u.prop('max',l),this.$input=u}return this.$input.get(0)},getInputElem:function(){var e=this.input,t=this.$input;return e||t&&t.get&&t.get(0)||this.getElInput()},getModelValue:function(){var e,t=this.model,n=this.target,r=t.get('name');if(t.get('changeProp'))e=n.get(r);else{var i=n.get('attributes');e=t.get('value')||i[r]}return Object(o["isUndefined"])(e)?'':e},getElInput:function(){return this.elInput},renderField:function(){var e=this.$el,t=this.appendInput,n=this.model,r=e.find('[data-input]'),i=r[r.length-1],a=n.el;a||(a=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),Object(o["isString"])(a)?(i.innerHTML=a,this.elInput=i.firstChild):(t?i.appendChild(a):i.insertBefore(a,i.firstChild),this.elInput=a),n.el=this.elInput},hasLabel:function(){var e=this.model.attributes.label;return!this.noLabel&&!1!==e},rerender:function(){this.model.el=null,this.render()},postUpdate:function(){this.onUpdate(this.getClbOpts())},render:function(){var e=this.$el,t=this.pfx,n=this.ppfx,r=this.model.attributes,i=r.type,a=r.id,s=this.hasLabel&&this.hasLabel(),l="".concat(t,"trait");this.$input=null;var c="<div class=\"".concat(l," ").concat(l,"--").concat(i,"\">\n      ").concat(s?"<div class=\"".concat(n,"label-wrp\" data-label></div>"):'',"\n      <div class=\"").concat(n,"field-wrp ").concat(n,"field-wrp--").concat(i,"\" data-input>\n        ").concat(this.templateInput?Object(o["isFunction"])(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:'',"\n      </div>\n    </div>");return e.empty().append(c),s&&this.renderLabel(),this.renderField(),this.el.className="".concat(l,"__wrp ").concat(l,"__wrp-").concat(a),this.postUpdate(),this.onRender(this.getClbOpts()),this}}),y=s["a"].extend({ns:'Traits',itemView:m,reuseView:1,initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.config||{},n=t.stylePrefix||'',r=e.editor;this.config=t,this.em=r,this.pfx=n,this.ppfx=t.pStylePrefix||'',this.className="".concat(n,"traits"),this.listenTo(r,'component:toggled',this.updatedCollection)},updatedCollection:function(){var e=this.ppfx,t=this.className,n=this.em.getSelected();this.el.className="".concat(t," ").concat(e,"one-bg ").concat(e,"two-color"),this.collection=n?n.get('traits'):[],this.render()}}),b=f.a.$,w=m.extend({init:function(){this.listenTo(this.model,'change:options',this.rerender)},templateInput:function(){var e=this.ppfx,t=this.clsField;return"<div class=\"".concat(t,"\">\n      <div data-input></div>\n      <div class=\"").concat(e,"sel-arrow\">\n        <div class=\"").concat(e,"d-s-arrow\"></div>\n      </div>\n    </div>")},getInputEl:function(){if(!this.$input){var e=this.model,t=this.em,n=e.get('name'),r=e.get('options')||[],i=[],a='<select>';r.forEach((function(e){var r,s,l,c='';Object(o["isString"])(e)?(r=e,s=e):(r=e.name||e.label||e.value,s="".concat(Object(o["isUndefined"])(e.value)?e.id:e.value).replace(/"/g,'&quot;'),c+=(l=e.style?e.style.replace(/"/g,'&quot;'):'')?" style=\"".concat(l,"\""):'');var u=t.t("traitManager.traits.options.".concat(n,".").concat(s))||r;a+="<option value=\"".concat(s,"\"").concat(c,">").concat(u,"</option>"),i.push(s)})),a+='</select>',this.$input=b(a);var s=e.getTargetValue(),l=i.indexOf(s)>=0?s:e.get('default');!Object(o["isUndefined"])(l)&&this.$input.val(l)}return this.$input.get(0)}}),O=m.extend({appendInput:0,templateInput:function(){var e=this.ppfx,t=this.clsField;return"<label class=\"".concat(t,"\" data-input>\n    <i class=\"").concat(e,"chk-icon\"></i>\n  </label>")},onChange:function(){var e=this.getInputElem().checked;this.model.set('value',this.getCheckedValue(e))},getCheckedValue:function(e){var t=e,n=this.model.attributes,r=n.valueTrue,i=n.valueFalse;return t&&!Object(o["isUndefined"])(r)&&(t=r),t||Object(o["isUndefined"])(i)||(t=i),t},getInputEl:function(){for(var e=!this.$input,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];var i=m.prototype.getInputEl.apply(this,n);if(e){var a,s,l=this.model,c=this.target,u=l.attributes,f=(u.valueTrue,u.valueFalse),d=l.get('name');l.get('changeProp')?s=a=c.get(d):a=!(!(s=c.get('attributes')[d])&&''!==s),Object(o["isUndefined"])(f)||s!==f||(a=!1),i.checked=a}return i}}),x=n(79),k=m.extend({getValueForTarget:function(){var e=this.model,t=e.attributes,n=t.value,r=t.unit;return Object(o["isUndefined"])(n)||''===n?e.get('default'):n+r},getInputEl:function(){if(!this.input){var e=this.ppfx,t=this.model,n=this.getModelValue(),r=new x["a"]({contClass:"".concat(e,"field-int"),type:'number',model:t,ppfx:e});this.input=r.render(),this.$input=this.input.inputEl,this.$unit=this.input.unitEl,t.set('value',n,{fromTarget:1}),this.$input.val(n),this.input=r.el}return this.input}}),C=n(90),S=m.extend({templateInput:'',getInputEl:function(){if(!this.input){var e=this.model,t=this.getModelValue(),n=new C["a"]({model:e,target:this.config.em,contClass:this.ppfx+'field-color',ppfx:this.ppfx}).render();n.setValue(t,{fromTarget:1}),this.input=n.el}return this.input}}),j=m.extend({eventCapture:['click button'],templateInput:'',onChange:function(){this.handleClick()},handleClick:function(){var e=this.model,t=this.em,n=e.get('command');n&&(Object(o["isString"])(n)?t.get('Commands').run(n):n(t.get('Editor'),e))},renderLabel:function(){this.model.get('label')&&m.prototype.renderLabel.apply(this,arguments)},getInputEl:function(){var e=this.model,t=this.ppfx,n=e.props(),r=n.labelButton,i=n.text,o=n.full,a=r||i,s="".concat(t,"btn");return"<button type=\"button\" class=\"".concat(s,"-prim").concat(o?" ".concat(s,"--full"):'',"\">").concat(a,"</button>")}});function E(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function P(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?E(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):E(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t={},n={text:m,number:k,select:w,checkbox:O,color:S,button:j};return{TraitsView:y,name:'TraitManager',getConfig:function(){return t},init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=e,Object(o["defaults"])(t,a);var r=t.pStylePrefix;return this.types=P({},n),r&&(t.stylePrefix="".concat(r).concat(t.stylePrefix)),this},postRender:function(){var e=this.getConfig().appendTo;e&&(Object(o["isElement"])(e)?e:document.querySelector(e)).appendChild(this.render())},getTraitsViewer:function(){return e},addType:function(e,t){var n=this.getType('text');this.types[e]=n.extend(t)},getType:function(e){return this.getTypes()[e]},getTypes:function(){return this.types},render:function(){var n=e&&e.el;return(e=new y({el:n,collection:[],editor:t.em,config:t})).itemsView=this.getTypes(),e.updatedCollection(),e.el},destroy:function(){e&&e.remove(),[t,e].forEach((function(e){return{}}))}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"evAll",(function(){return B})),n.d(t,"evPfx",(function(){return U})),n.d(t,"evAdd",(function(){return H})),n.d(t,"evUpdate",(function(){return W})),n.d(t,"evRemove",(function(){return $})),n.d(t,"evRemoveBefore",(function(){return q})),n.d(t,"evDrag",(function(){return K})),n.d(t,"evDragStart",(function(){return G})),n.d(t,"evDragStop",(function(){return Y})),n.d(t,"evCustom",(function(){return J}));var r=n(3),i=n.n(r),o=n(0),a=n(47),s={appendTo:'',appendOnClick:!1,blocks:[],custom:!1},l=n(8),c=n.n(l),u=n(9),f=n.n(u),d=n(10),h=n.n(d),p=n(11),g=n.n(p),v=n(5),m=n.n(v),y=n(4),b=n.n(y);function w(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var O=function(e){h()(n,e);var t=w(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"defaults",value:function(){return{label:'',content:'',media:'',category:'',activate:!1,select:null,resetId:!1,disable:!1,onClick:null,attributes:{}}}},{key:"getId",value:function(){return this.id}},{key:"getLabel",value:function(){return this.get('label')}},{key:"getMedia",value:function(){return this.get('media')}},{key:"getContent",value:function(){return this.get('content')}},{key:"getCategoryLabel",value:function(){var e=this.get('category');return Object(o["isFunction"])(e.get)?e.get('label'):e.label?e.label:e}}]),n}(y["Model"]);function x(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var k=function(e){h()(n,e);var t=x(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n)}(y["Collection"]);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}k.prototype.model=O;var S=function(e){h()(n,e);var t=C(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"defaults",value:function(){return{id:'',label:'',open:!0,attributes:{}}}}]),n}(y["Model"]);function j(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var E=function(e){h()(n,e);var t=j(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n)}(y["Collection"]);E.prototype.model=S;var P,_=n(1),T=b.a.View.extend({events:{click:'handleClick',mousedown:'startDrag',dragstart:'handleDragStart',drag:'handleDrag',dragend:'handleDragEnd'},initialize:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.model;this.em=t.em,this.config=t,this.endDrag=this.endDrag.bind(this),this.ppfx=t.pStylePrefix||'',this.listenTo(n,'destroy remove',this.remove),this.listenTo(n,'change',this.render)},__getModule:function(){return this.em.get('BlockManager')},handleClick:function(e){var t=this.config,n=this.model,r=this.em,i=n.get('onClick')||t.appendOnClick;if(r.trigger('block:click',n,e),i){if(Object(o["isFunction"])(i))return i(n,r.getEditor(),{event:e});var a,s=t.getSorter(),l=n.get('content'),c=r.getSelected();if(s.setDropContent(l),c)if(s.validTarget(c.getEl(),l).valid)a=c;else{var u=c.parent();s.validTarget(u.getEl(),l).valid&&(a=u)}if(!a){var f=r.getWrapper();s.validTarget(f.getEl(),l).valid&&(a=f)}var d=a&&a.append(l)[0];d&&r.setSelected(d,{scroll:1})}},startDrag:function(e){var t=this.config,n=this.em,r=this.model.get('disable');if(0===e.button&&t.getSorter&&!this.el.draggable&&!r){n.refreshCanvas();var i=t.getSorter();i.setDragHelper(this.el,e),i.setDropContent(this.model.get('content')),i.startSort(this.el),Object(_["on"])(document,'mouseup',this.endDrag)}},handleDragStart:function(e){this.__getModule().__startDrag(this.model,e)},handleDrag:function(e){this.__getModule().__drag(e)},handleDragEnd:function(){this.__getModule().__endDrag()},endDrag:function(e){Object(_["off"])(document,'mouseup',this.endDrag);var t=this.config.getSorter();t.moved=0,t.endMove()},render:function(){var e=this.em,t=this.el,n=this.$el,r=this.ppfx,i=this.model,o=i.get('disable'),a=i.get('attributes')||{},s=a.class||'',l="".concat(r,"block"),c=e&&e.t("blockManager.labels.".concat(i.id))||i.get('label'),u=i.get('render'),f=i.get('media'),d=o?"".concat(l,"--disable"):"".concat(r,"four-color-h");n.attr(a),t.className="".concat(s," ").concat(l," ").concat(r,"one-bg ").concat(d).trim(),t.innerHTML="\n      ".concat(f?"<div class=\"".concat(l,"__media\">").concat(f,"</div>"):'',"\n      <div class=\"").concat(l,"-label\">").concat(c,"</div>\n    "),t.title=a.title||t.textContent.trim(),t.setAttribute('draggable',!(!Object(_["hasDnd"])(e)||o));var h=u&&u({el:t,model:i,className:l,prefix:r});return h&&(t.innerHTML=h),this}}),A=n(30),M=n.n(A),D=n(27);function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var N=function(e){h()(n,e);var t=L(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"template",value:function(e){var t=e.pfx,n=e.label;return Object(D["a"])(P||(P=M()(["\n      <div class=\"","title\">\n        <i class=\"","caret-icon\"></i>\n        ","\n      </div>\n      <div class=\"","blocks-c\"></div>\n    "])),t,t,n,t)}},{key:"attributes",value:function(){return this.model.get('attributes')}},{key:"initialize",value:function(){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=e;var t=e.pStylePrefix||'';this.em=e.em,this.pfx=t,this.caretR='fa fa-caret-right',this.caretD='fa fa-caret-down',this.iconClass="".concat(t,"caret-icon"),this.activeClass="".concat(t,"open"),this.className="".concat(t,"block-category"),this.events={},this.events["click .".concat(t,"title")]='toggle',this.listenTo(this.model,'change:open',this.updateVisibility),this.delegateEvents(),this.model.view=this}},{key:"updateVisibility",value:function(){this.model.get('open')?this.open():this.close()}},{key:"open",value:function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getBlocksEl().style.display=''}},{key:"close",value:function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getBlocksEl().style.display='none'}},{key:"toggle",value:function(){var e=this.model;e.set('open',!e.get('open'))}},{key:"getIconEl",value:function(){return this.iconEl||(this.iconEl=this.el.querySelector('.'+this.iconClass)),this.iconEl}},{key:"getBlocksEl",value:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector('.'+this.pfx+'blocks-c')),this.blocksEl}},{key:"append",value:function(e){this.getBlocksEl().appendChild(e)}},{key:"render",value:function(){var e=this.em,t=this.el,n=this.$el,r=this.model,i=this.pfx,o=e.t("blockManager.categories.".concat(r.id))||r.get('label');return t.innerHTML=this.template({pfx:i,label:o}),n.addClass(this.className),n.css({order:r.get('order')}),this.updateVisibility(),this}}]),n}(y["View"]);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=b.a.View.extend({initialize:function(e,t){Object(o["bindAll"])(this,'getSorter','onDrag','onDrop','onMove'),this.config=t||{},this.categories=e.categories||'',this.renderedCategories=[];var n=this.config.pStylePrefix||'';this.ppfx=n,this.noCatClass="".concat(n,"blocks-no-cat"),this.blockContClass="".concat(n,"blocks-c"),this.catsClass="".concat(n,"block-categories");var r=this.collection;this.listenTo(r,'add',this.addTo),this.listenTo(r,'reset',this.render),this.em=this.config.em,this.tac='test-tac',this.grabbingCls=this.ppfx+'grabbing',this.em&&(this.config.getSorter=this.getSorter,this.canvas=this.em.get('Canvas'))},updateConfig:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=F(F({},this.config),e)},getSorter:function(){if(this.em){if(!this.sorter){var e=this.em.get('Utils'),t=this.canvas;this.sorter=new e.Sorter({container:t.getBody(),placer:t.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:this.ppfx,onStart:this.onDrag,onEndMove:this.onDrop,onMove:this.onMove,document:t.getFrameEl().contentDocument,direction:'a',wmargin:1,nested:1,em:this.em,canvasRelative:1})}return this.sorter}},onDrag:function(e){this.em.stopDefault(),this.em.trigger('block:drag:start',e)},onMove:function(e){this.em.trigger('block:drag:move',e)},onDrop:function(e){var t=this.em;if(t.runDefault(),e&&e.get){var n='activeOnRender';e.get(n)&&(e.trigger('active'),e.unset(n)),t.trigger('block:drag:stop',e)}},addTo:function(e){this.add(e)},add:function(e,t){var n=this.config,r=t||null,i=new T({model:e,attributes:e.get('attributes')},n).render().el,a=e.get('category');if(a&&this.categories&&!n.ignoreCategories){Object(o["isString"])(a)?a={id:a,label:a}:Object(o["isObject"])(a)&&!a.id&&(a.id=a.label);var s=this.categories.add(a),l=s.get('id'),c=this.renderedCategories[l],u=this.getCategoriesEl();return e.set('category',s,{silent:!0}),!c&&u&&(c=new N({model:s},this.config).render(),this.renderedCategories[l]=c,u.appendChild(c.el)),void(c&&c.append(i))}r?r.appendChild(i):this.append(i)},getCategoriesEl:function(){return this.catsEl||(this.catsEl=this.el.querySelector(".".concat(this.catsClass))),this.catsEl},getBlocksEl:function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.noCatClass," .").concat(this.blockContClass))),this.blocksEl},append:function(e){var t=this.getBlocksEl();t&&t.appendChild(e)},render:function(){var e=this,t=this.ppfx,n=document.createDocumentFragment();this.catsEl=null,this.blocksEl=null,this.renderedCategories=[],this.el.innerHTML="\n      <div class=\"".concat(this.catsClass,"\"></div>\n      <div class=\"").concat(this.noCatClass,"\">\n        <div class=\"").concat(this.blockContClass,"\"></div>\n      </div>\n    "),this.collection.each((function(t){return e.add(t,n)})),this.append(n);var r="".concat(this.blockContClass,"s ").concat(t,"one-bg ").concat(t,"two-color");return this.$el.addClass(r),this.rendered=!0,this}});function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function V(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var B='block',U="".concat(B,":"),H="".concat(U,"add"),W="".concat(U,"update"),$="".concat(U,"remove"),q="".concat($,":before"),K="".concat(U,"drag"),G="".concat(K,":start"),Y="".concat(K,":stop"),J="".concat(U,"custom");t["default"]=function(){var e,t,n,r={},i=[];return V(V({},a["a"]),{},{name:'BlockManager',Block:O,Blocks:k,Category:S,Categories:E,events:{all:B,update:W,add:H,remove:$,removeBefore:q,drag:K,dragStart:G,dragEnd:Y,custom:J},init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},o=r=V(V({},s),n),a=o.em;return this.em=a,e=new k(r.blocks),t=new k(e.models),i=new E,this.all=e,this.__initListen(),e.on('add',(function(e){return t.add(e)})),e.on('remove',(function(e){return t.remove(e)})),e.on('reset',(function(e){return t.reset(e.models)})),this},__trgCustom:function(){this.em.trigger(this.events.custom,this.__customData())},__customData:function(){var e=this,t=this.__getBehaviour();return{bm:this,blocks:this.getAll().models,container:t.container,dragStart:function(t,n){return e.startDrag(t,n)},drag:function(t){return e.__drag(t)},dragStop:function(t){return e.endDrag(t)}}},__startDrag:function(t,n){var r=this.em,i=this.events,o=t.getContent?t.getContent():t;this._dragBlock=t,r.set({dragResult:null,dragContent:o}),[r,e].map((function(e){return e.trigger(i.dragStart,t,n)}))},__drag:function(t){var n=this.em,r=this.events,i=this._dragBlock;[n,e].map((function(e){return e.trigger(r.drag,i,t)}))},__endDrag:function(){var t=this.em,n=this.events,r=this._dragBlock,i=t.get('dragResult');if(this._dragBlock=null,i){var a='activeOnRender',s=i.get&&i.get(a),l=r.get('activate')||s,c=r.get('select'),u=Object(o["isArray"])(i)?i[0]:i;(c||l&&!1!==c)&&t.setSelected(u),l&&(u.trigger('active'),s&&u.unset(a)),r.get('resetId')&&u.onAll((function(e){return e.resetId()}))}t.set({dragResult:null,dragContent:null}),[t,e].map((function(e){return e.trigger(n.dragEnd,i,r)}))},__getFrameViews:function(){return this.em.get('Canvas').getFrames().map((function(e){return e.view}))},__behaviour:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this._bhv=V(V({},this._bhv||{}),e)},__getBehaviour:function(){return this._bhv||{}},startDrag:function(e,t){this.__startDrag(e,t),this.__getFrameViews().forEach((function(e){return e.droppable.startCustom()}))},endDrag:function(e){this.__getFrameViews().forEach((function(t){return t.droppable.endCustom(e)})),this.__endDrag()},getConfig:function(){return r},postRender:function(){n=new I({collection:t,categories:i},r);var e=this.getConfig().appendTo;if(e){var a=Object(o["isElement"])(e)?e:document.querySelector(e);if(!a)return this.__logWarn('"appendTo" element not found');a.appendChild(this.render(t.models))}this.__trgCustom()},add:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n||{};return i.id=t,e.add(i,r)},get:function(t){return e.get(t)},getAll:function(){return e},getAllVisible:function(){return t},remove:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__remove(e,t)},getCategories:function(){return i},getContainer:function(){return n.el},render:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=e||this.getAll().models;if(t.external){var a=new k(o);return new I({collection:a,categories:i},V(V({},r),t)).render().el}return n&&(n.updateConfig(t),n.collection.reset(o),n.rendered||(n.render(),n.rendered=1)),this.getContainer()},destroy:function(){var o=[e,t,i];o.map((function(e){return e.stopListening()})),o.map((function(e){return e.reset()})),n&&n.remove(),r={},e={},t={},n={},i=[],this.all={}}})}},function(e,t,n){"use strict";n.r(t);var r='sw-visibility',i='export-template',o='open-sm',a='open-tm',s='open-layers',l='open-blocks',c='fullscreen',u='preview',f={stylePrefix:'pn-',defaults:[{id:'commands',buttons:[{}]},{id:'options',buttons:[{active:!0,id:r,className:'fa fa-square-o',command:r,context:r,attributes:{title:'View components'}},{id:u,className:'fa fa-eye',command:u,context:u,attributes:{title:'Preview'}},{id:c,className:'fa fa-arrows-alt',command:c,context:c,attributes:{title:'Fullscreen'}},{id:i,className:'fa fa-code',command:i,attributes:{title:'View code'}}]},{id:'views',buttons:[{id:o,className:'fa fa-paint-brush',command:o,active:!0,togglable:0,attributes:{title:'Open Style Manager'}},{id:a,className:'fa fa-cog',command:a,togglable:0,attributes:{title:'Settings'}},{id:s,className:'fa fa-bars',command:s,togglable:0,attributes:{title:'Open Layer Manager'}},{id:l,className:'fa fa-th-large',command:l,togglable:0,attributes:{title:'Open Blocks'}}]}],em:null,delayBtnsShow:300},d=n(4),h=n.n(d),p=n(100),g=h.a.Model.extend({defaults:{id:'',content:'',visible:!0,buttons:[],attributes:{}},initialize:function(e){this.btn=this.get('buttons')||[],this.buttons=new p["default"](this.btn),this.set('buttons',this.buttons)}}),v=h.a.Collection.extend({model:g}),m=n(3),y=n.n(m),b=n(0);function w(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function O(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?w(Object(n),!0).forEach((function(t){y()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}h.a.$;var x=h.a.View.extend({tagName:function(){return this.model.get('tagName')},events:{click:'clicked'},initialize:function(e){var t=this.model,n=t.get('className'),r=t.attributes,i=r.command,o=r.listen,a=e.config||{},s=a.em;this.config=a,this.em=s;var l=this.config.stylePrefix||'',c=this.config.pStylePrefix||'';if(this.pfx=l,this.ppfx=this.config.pStylePrefix||'',this.id=l+t.get('id'),this.activeCls="".concat(l,"active ").concat(c,"four-color"),this.disableCls="".concat(c,"disabled"),this.btnsVisCls="".concat(l,"visible"),this.className=l+'btn'+(n?' '+n:''),this.listenTo(t,'change',this.render),this.listenTo(t,'change:active updateActive',this.updateActive),this.listenTo(t,'checkActive',this.checkActive),this.listenTo(t,'change:bntsVis',this.updateBtnsVis),this.listenTo(t,'change:attributes',this.updateAttributes),this.listenTo(t,'change:className',this.updateClassName),this.listenTo(t,'change:disable',this.updateDisable),s&&Object(b["isString"])(i)&&o){var u={fromListen:1};this.listenTo(s,"run:".concat(i),(function(){return t.set('active',!0,u)})),this.listenTo(s,"stop:".concat(i),(function(){return t.set('active',!1,u)}))}s&&s.get&&(this.commands=s.get('Commands'))},updateClassName:function(){var e=this.model,t=this.pfx,n=e.get('className'),r=e.get('attributes').class,i="".concat(r||''," ").concat(t,"btn ").concat(n||'');this.$el.attr('class',i.trim())},updateAttributes:function(){var e=this.em,t=this.model,n=this.$el,r=t.get('attributes')||{},i=e&&e.t&&e.t("panels.buttons.titles.".concat(t.id));n.attr(r),i&&n.attr({title:i}),this.updateClassName()},updateBtnsVis:function(){this.$buttons&&(this.model.get('bntsVis')?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},updateActive:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.model,i=this.commands,o=this.$el,a=this.activeCls,s=n.fromCollection,l=n.fromListen,c=r.get('context'),u=r.get('options'),f=r.get('command'),d={};f&&(i&&Object(b["isString"])(f)?d=i.get(f)||{}:Object(b["isFunction"])(f)?d=i.create({run:f}):null!==f&&Object(b["isObject"])(f)&&(d=i.create(f)),r.get('active')?(!s&&r.collection.deactivateAll(c,r),r.set('active',!0,{silent:!0}).trigger('checkActive'),!l&&i.runCommand(d,O(O({},u),{},{sender:r})),d.noStop&&r.set('active',!1)):(o.removeClass(a),!l&&i.stopCommand(d,O(O({},u),{},{sender:r,force:1}))))},updateDisable:function(){var e=this.disableCls,t=this.model.get('disable');this.$el[t?'addClass':'removeClass'](e)},checkActive:function(){var e=this.model,t=this.$el,n=this.activeCls;e.get('active')?t.addClass(n):t.removeClass(n)},clicked:function(e){var t=this.model;t.get('bntsVis')||t.get('disable')||!t.get('command')||this.toggleActive()},toggleActive:function(){var e=this.model,t=this.em,n=e.attributes,r=n.active,i=n.togglable;r&&!i||(e.set('active',!r),r?e.get('runDefaultCommand')&&t.runDefault():e.get('stopDefaultCommand')&&t.stopDefault())},render:function(){var e=this.model,t=e.get('label'),n=this.$el;return!e.get('el')&&n.empty(),this.updateAttributes(),t&&n.append(t),this.checkActive(),this.updateDisable(),this}}),k=h.a.View.extend({initialize:function(e){this.opt=e||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||'',this.parentM=this.opt.parentM||null,this.listenTo(this.collection,'add',this.addTo),this.listenTo(this.collection,'reset remove',this.render),this.className=this.pfx+'buttons'},addTo:function(e){this.addToCollection(e)},addToCollection:function(e,t){var n=t||null,r=new x({el:e.get('el'),model:e,config:this.config,parentM:this.parentM}).render().el;return n?n.appendChild(r):this.$el.append(r),r},render:function(){var e=document.createDocumentFragment();return this.$el.empty(),this.collection.each((function(t){this.addToCollection(t,e)}),this),this.$el.append(e),this.$el.attr('class',Object(b["result"])(this,'className')),this}});function C(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}var S=h.a.View.extend({initialize:function(e){var t=e.config||{},n=this.model;this.config=t,this.pfx=t.stylePrefix||'',this.ppfx=t.pStylePrefix||'',this.buttons=n.get('buttons'),this.className=this.pfx+'panel',this.id=this.pfx+n.get('id'),this.listenTo(n,'change:appendContent',this.appendContent),this.listenTo(n,'change:content',this.updateContent),this.listenTo(n,'change:visible',this.toggleVisible),n.view=this},appendContent:function(){this.$el.append(this.model.get('appendContent'))},updateContent:function(){this.$el.html(this.model.get('content'))},toggleVisible:function(){this.model.get('visible')?this.$el.removeClass("".concat(this.ppfx,"hidden")):this.$el.addClass("".concat(this.ppfx,"hidden"))},attributes:function(){return this.model.get('attributes')},initResize:function(){var e=this.config.em,t=e?e.get('Editor'):'',n=this.model.get('resizable');if(t&&n){var r,i,o,a=!0===n?[1,1,1,1]:n,s=a.length,l=0;2==s?(r=a[0],o=a[0],i=a[1],l=a[1]):4==s&&(r=a[0],i=a[1],o=a[2],l=a[3]);var c=t.Utils.Resizer.init(function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?C(Object(n),!0).forEach((function(t){y()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):C(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({tc:r,cr:i,bc:o,cl:l,tl:0,tr:0,bl:0,br:0,appendTo:this.el,silentFrames:1,avoidContainerUpdate:1,prefix:t.getConfig().stylePrefix,onEnd:function(){e&&e.trigger('change:canvasOffset')},posFetcher:function(e,t){var n=t.target,r=e.style,i=c.getConfig(),o=i.keyWidth,a=i.keyHeight,s=e.getBoundingClientRect(),l='container'==n,u=r[o],f=r[a];return{left:0,top:0,width:u&&!l?parseFloat(u):s.width,height:f&&!l?parseFloat(f):s.height}}},n));c.blur=function(){},c.focus(this.el)}},render:function(){var e=this.$el,t=this.ppfx,n="".concat(this.className," ").concat(this.id," ").concat(t,"one-bg ").concat(t,"two-color");if(e.addClass(n),this.toggleVisible(),this.buttons.length){var r=new k({collection:this.buttons,config:this.config});e.append(r.render().el)}return e.append(this.model.get('content')),this}}),j=h.a.View.extend({initialize:function(e){this.opt=e||{},this.config=this.opt.config||{},this.pfx=this.config.stylePrefix||'';var t=this.collection;this.listenTo(t,'add',this.addTo),this.listenTo(t,'reset',this.render),this.listenTo(t,'remove',this.onRemove),this.className=this.pfx+'panels'},onRemove:function(e){var t=e.view;t&&t.remove()},addTo:function(e){this.addToCollection(e)},addToCollection:function(e,t){var n=t||null,r=this.config,i=e.get('el'),o=new S({el:i,model:e,config:r}),a=o.render().el,s=e.get('appendTo');if(i);else if(s){document.querySelector(s).appendChild(a)}else n?n.appendChild(a):this.$el.append(a);return o.initResize(),a},render:function(){var e=this,t=this.$el,n=document.createDocumentFragment();return t.empty(),this.collection.each((function(t){return e.addToCollection(t,n)})),t.append(n),t.attr('class',this.className),this}});t["default"]=function(){var e,t,n={};return{name:'Panels',init:function(t){for(var r in n=t||{},f)r in n||(n[r]=f[r]);var i=n.pStylePrefix;return i&&(n.stylePrefix=i+n.stylePrefix),e=new v(n.defaults),this},getPanels:function(){return e},getPanelsEl:function(){return t&&t.el},addPanel:function(t){return e.add(t)},removePanel:function(t){return e.remove(t)},getPanel:function(t){var n=e.where({id:t});return n.length?n[0]:null},addButton:function(e,t){var n=this.getPanel(e);return n?n.get('buttons').add(t):null},removeButton:function(e,t){var n=this.getPanel(e);return n&&n.get('buttons').remove(t)},getButton:function(e,t){var n=this.getPanel(e);if(n){var r=n.get('buttons').where({id:t});return r.length?r[0]:null}return null},render:function(){return t&&t.remove(),(t=new j({collection:e,config:n})).render().el},active:function(){this.getPanels().each((function(e){e.get('buttons').each((function(e){e.get('active')&&e.trigger('updateActive')}))}))},disableButtons:function(){this.getPanels().each((function(e){e.get('buttons').each((function(e){e.get('disable')&&e.trigger('change:disable')}))}))},destroy:function(){e.reset(),e.stopListening(),t&&t.remove(),[n,e,t].forEach((function(e){return{}}))},Panel:g}}},function(e,t,n){"use strict";n.r(t),n.d(t,"myCanvas",(function(){return H}));var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(0),l=n(1),c={stylePrefix:'cv-',scripts:[],styles:[],customBadgeLabel:'',autoscrollLimit:50,extHl:0,notTextable:['button','a','input[type=checkbox]','input[type=radio]']},u=n(8),f=n.n(u),d=n(9),h=n.n(d),p=n(10),g=n.n(p),v=n(11),m=n.n(v),y=n(5),b=n.n(y),w=n(4),O=n.n(w),x=n(99),k=n(91);function C(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var S=function(e){g()(n,e);var t=C(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"defaults",value:function(){return{frame:'',frames:'',rulers:!1,zoom:100,x:0,y:0,scripts:[],styles:[]}}},{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.em;this.config=t,this.em=n,this.set('frames',new k["a"]),this.listenTo(this,'change:zoom',this.onZoomChange),this.listenTo(n,'change:device',this.updateDevice),this.listenTo(n,x["evPageSelect"],this._pageUpdated)}},{key:"init",value:function(){var e=this.em.get('PageManager').getMain(),t=e.getMainFrame();this.set('frames',e.getFrames()),this.updateDevice({frame:t})}},{key:"_pageUpdated",value:function(e,t){var n=this.em;n.setSelected(),n.get('readyCanvas')&&n.stopDefault(),t&&t.getFrames().map((function(e){return e.disable()})),this.set('frames',e.getFrames())}},{key:"updateDevice",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.em,n=t.getDeviceModel(),r=e.frame||t.getCurrentFrameModel();if(r&&n){var i=n.attributes,o=i.width,a=i.height;r.set({width:o,height:a},{noUndo:1})}}},{key:"onZoomChange",value:function(){this.get('zoom')<1&&this.set('zoom',1)}}]),n}(w["Model"]),j=n(65),E=n(88);n(51);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T=function(){function e(t,n){var r=this;f()(this,e),this.em=t;var i=n||t.get('Canvas').getFrames().map((function(e){return e.getComponent().getEl()})),o=Array.isArray(i)?i:[i];return this.el=i,this.counter=0,Object(s["bindAll"])(this,'handleDragEnter','handleDragOver','handleDrop','handleDragLeave'),o.forEach((function(e){return r.toggleEffects(e,1)})),this}return h()(e,[{key:"toggleEffects",value:function(e,t){var n={on:l["on"],off:l["off"]},r=t?'on':'off';n[r](e,'dragenter',this.handleDragEnter),n[r](e,'dragover',this.handleDragOver),n[r](e,'drop',this.handleDrop),n[r](e,'dragleave',this.handleDragLeave)}},{key:"__customTglEff",value:function(e){var t=e?l["on"]:l["off"],n=this.el.ownerDocument,r=n.defaultView.frameElement;this.sortOpts=e?{onStart:function(e){var t=e.sorter;Object(l["on"])(r,'pointermove',t.onMove)},onEnd:function(e){var t=e.sorter;Object(l["off"])(r,'pointermove',t.onMove)},customTarget:function(e){var t=e.event;return n.elementFromPoint(t.clientX,t.clientY)}}:null,t(r,'pointerenter',this.handleDragEnter),t(r,'pointermove',this.handleDragOver),t(document,'pointerup',this.handleDrop),t(r,'pointerout',this.handleDragLeave)}},{key:"startCustom",value:function(){this.__customTglEff(!0)}},{key:"endCustom",value:function(e){this.over?this.endDrop(e):this.__customTglEff(!1)}},{key:"endDrop",value:function(e,t){var n=this.em,r=this.dragStop;this.counter=0,r&&r(e),this.__customTglEff(!1),n.trigger('canvas:dragend',t)}},{key:"handleDragLeave",value:function(e){this.updateCounter(-1,e)}},{key:"updateCounter",value:function(e,t){this.counter+=e,0===this.counter&&this.endDrop(1,t)}},{key:"handleDragEnter",value:function(e){var t=this,n=this.em,r=e.dataTransfer;if(this.updateCounter(1,e),!this.over){this.over=1;var i,o,a=n.get('Utils'),s=n.get('Canvas'),l=n.get('dragContent')||'<br>';if(n.stopDefault(),n.inAbsoluteMode()){var c=n.get('DomComponents').getWrapper(),u=c.append({})[0],f=n.get('Commands').run('core:component-drag',{event:e,guidesInfo:1,center:1,target:u,onEnd:function(e,n,i){var o;if(!i.cancelled){o=c.append(l)[0];var a=u.getStyle(),s=a.left,f=a.top,d=a.position;o.addStyle({left:s,top:f,position:d})}t.handleDragEnd(o,r),u.remove()}});i=function(t){return f.stop(e,{cancel:t})},o=function(e){return l=e}}else{var d=new a.Sorter(_({em:n,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:this.el,placer:s.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(e){return t.handleDragEnd(e,r)},document:this.el.ownerDocument},this.sortOpts||{}));d.setDropContent(l),d.startSort(),this.sorter=d,i=function(e){e&&(d.moved=0),d.endMove()},o=function(e){return d.setDropContent(e)}}this.dragStop=i,this.dragContent=o,n.trigger('canvas:dragenter',r,l)}}},{key:"handleDragEnd",value:function(e,t){var n=this.em;this.over=0,e&&(n.set('dragResult',e),n.trigger('canvas:drop',t,e)),n.runDefault({preserveSelected:1})}},{key:"handleDragOver",value:function(e){e.preventDefault(),this.em.trigger('canvas:dragover',e)}},{key:"handleDrop",value:function(e){e.preventDefault();var t=this.dragContent,n=e.dataTransfer,r=this.getContentByData(n).content;e.target.style.border='',r&&t&&t(r),this.endDrop(!r,e)}},{key:"getContentByData",value:function(e){var t=this.em,n=e&&e.types,r=e&&e.files||[],i=t.get('dragContent'),o=e&&e.getData('text');if(r.length){o=[];for(var a=0;a<r.length;a++){var l=r[a],c=l.type.split('/')[0];'image'==c&&o.push({type:c,file:l,attributes:{alt:l.name}})}}else if(i)o=i;else if(Object(s["indexOf"])(n,'text/html')>=0)o=e&&e.getData('text/html').replace(/<\/?meta[^>]*>/g,'');else if(Object(s["indexOf"])(n,'text/uri-list')>=0)o={type:'link',attributes:{href:o},content:o};else if(Object(s["indexOf"])(n,'text/json')>=0){var u=e&&e.getData('text/json');u&&(o=JSON.parse(u))}else 1===n.length&&'text/plain'===n[0]&&(o="<div>".concat(o,"</div>"));var f={content:o};return t.trigger('canvas:dragdata',e,f),f}},{key:"applyAppendOrMoveComponent",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=this.em,i=r.get('Utils'),o=r.get('Canvas'),a=new i.Sorter(_({em:r,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:this.el,placer:o.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,null)},document:this.el.ownerDocument},this.sortOpts||{}));a.setDropContent(t.dropContent),a.startSort(),this.sorter=a;var s=new DOMParser,l=s.parseFromString(t.dst,'text/html');t.dst=l.body.firstChild,a.myMove(t,n)}},{key:"applyAppendText",value:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1?arguments[1]:void 0,r=this.em,i=r.get('Utils'),o=r.get('Canvas'),a=new i.Sorter(_({em:r,wmargin:1,nested:1,canvasRelative:1,direction:'a',container:this.el,placer:o.getPlacerEl(),containerSel:'*',itemSel:'*',pfx:'gjs-',onEndMove:function(t){return e.handleDragEnd(t,null)},document:this.el.ownerDocument},this.sortOpts||{}));a.setDropContent(t.dropContent),a.startSort(),this.sorter=a;var s=new DOMParser,l=s.parseFromString(t.dst,'text/html');t.dst=l.body.firstChild,a.myTextMove(t,n)}}]),e}(),A=n(18);function M(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function D(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?M(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):M(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var L=O.a.View.extend({tagName:'iframe',attributes:{allowfullscreen:'allowfullscreen','data-frame-el':!0},initialize:function(e){Object(s["bindAll"])(this,'updateClientY','stopAutoscroll','autoscroll','_emitUpdate');var t=this.model,n=this.el;this.tools={},this.config=D(D({},e.config||{}),{},{frameView:this}),this.ppfx=this.config.pStylePrefix||'',this.em=this.config.em;var r=this.getCanvasModel();this.listenTo(t,'change:head',this.updateHead),this.listenTo(r,'change:styles',this.renderStyles),t.view=this,Object(l["setViewEl"])(n,this)},updateHead:function(){var e=this.model,t=this.getHead(),n=[],r=[],i=e.get('head'),o=e.previous('head'),a=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return Object.keys(e).sort().map((function(t){return"[".concat(t,"=\"").concat(e[t],"\"]")})).join('')},s=function(e,t,n){e.forEach((function(e){var r=e.tag,i=e.attributes;!t.some((function(e){return e.tag===r&&a(e.attributes)===a(i)}))&&n.push(e)}))};s(i,o,r),s(o,i,n),n.forEach((function(e){var n=t.querySelector("".concat(e.tag).concat(a(e.attributes)));n&&n.parentNode.removeChild(n)})),Object(A["c"])(t,r)},getEl:function(){return this.el},getCanvasModel:function(){return this.em.get('Canvas').getModel()},getWindow:function(){return this.getEl().contentWindow},getDoc:function(){return this.getEl().contentDocument},getHead:function(){return this.getDoc().querySelector('head')},getBody:function(){return this.getDoc().querySelector('body')},getWrapper:function(){return this.getBody().querySelector('[data-gjs-type=wrapper]')},getJsContainer:function(){return this.jsContainer||(this.jsContainer=Object(A["f"])('div',{class:"".concat(this.ppfx,"js-cont")})),this.jsContainer},getToolsEl:function(){var e=this.config.frameWrapView;return e&&e.elTools},getGlobalToolsEl:function(){return this.em.get('Canvas').getGlobalToolsEl()},getHighlighter:function(){return this._getTool('[data-hl]')},getBadgeEl:function(){return this._getTool('[data-badge]')},getOffsetViewerEl:function(){return this._getTool('[data-offset]')},getRect:function(){return this.rect||(this.rect=this.el.getBoundingClientRect()),this.rect},getOffsetRect:function(){var e=this.el,t=this.getBody(),n=t.scrollTop,r=t.scrollLeft,i=e.offsetHeight,o=e.offsetWidth;return{top:e.offsetTop,left:e.offsetLeft,height:i,width:o,scrollTop:n,scrollLeft:r,scrollBottom:n+i,scrollRight:r+o}},_getTool:function(e){var t=this.tools,n=this.getToolsEl();return t[e]||(t[e]=n.querySelector(e)),t[e]},remove:function(){var e=this.wrapper;this._toggleEffects(),this.tools={},e&&e.remove(),O.a.View.prototype.remove.apply(this,arguments)},startAutoscroll:function(){var e=this;this.lastMaxHeight=this.getWrapper().offsetHeight-this.el.offsetHeight,setTimeout((function(){e._toggleAutoscrollFx(1),requestAnimationFrame(e.autoscroll)}),0)},autoscroll:function(){if(this.dragging){var e=this.lastClientY,t=this.em.get('Canvas'),n=this.getWindow(),r=this.getBody().scrollTop,i=e||0,o=t.getConfig().autoscrollLimit,a=this.getRect().height-o,l=r;if(i<o&&(l-=o-i),i>a&&(l+=i-a),!Object(s["isUndefined"])(e)&&l!==r&&l>0&&l<this.lastMaxHeight)this.getGlobalToolsEl().style.opacity=0,this.showGlobalTools(),n.scrollTo(0,l);requestAnimationFrame(this.autoscroll)}},updateClientY:function(e){e.preventDefault(),this.lastClientY=Object(l["getPointerEvent"])(e).clientY*this.em.getZoomDecimal()},showGlobalTools:Object(s["debounce"])((function(){this.getGlobalToolsEl().style.opacity=''}),50),stopAutoscroll:function(){this.dragging&&this._toggleAutoscrollFx()},_toggleAutoscrollFx:function(e){this.dragging=e;var t=this.getWindow(),n=e?'on':'off',r={on:l["on"],off:l["off"]};r[n](t,'mousemove dragover',this.updateClientY),r[n](t,'mouseup',this.stopAutoscroll)},render:function(){var e=this.$el,t=this.ppfx;return e.attr({class:"".concat(t,"frame")}),this.renderScripts(),this},renderScripts:function(){var e=this,t=this.el,n=this.model,r=this.em,o='frame:load',a={el:t,model:n,view:this},l=this.getCanvasModel();t.onload=function(){r&&r.trigger("".concat(o,":before"),a),function n(i){if(i.length>0){var l=i.shift(),c=Object(A["f"])('script',D({type:'text/javascript'},Object(s["isString"])(l)?{src:l}:l));c.onerror=c.onload=n.bind(null,i),t.contentDocument.head.appendChild(c)}else e.renderBody(),r&&r.trigger(o,a)}(i()(l.get('scripts')))}},renderStyles:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.getHead(),n=this.getCanvasModel(),r=function(e){return e.map((function(e){return{tag:'link',attributes:D({rel:'stylesheet'},Object(s["isString"])(e)?{href:e}:e)}}))},i=r(e.prev||n.previous('styles')),o=r(n.get('styles')),a=[],l=[],c=function(e,t,n){e.forEach((function(e){var r=e.attributes.href;!t.some((function(e){return e.attributes.href===r}))&&n.push(e)}))};c(o,i,l),c(i,o,a),a.forEach((function(e){var n=t.querySelector("link[href=\"".concat(e.attributes.href,"\"]"));n&&n.parentNode.removeChild(n)})),Object(A["c"])(t,l)},renderBody:function(){var e=this,t=this.config,n=this.model,r=this.ppfx,i=t.em,o=this.getDoc(),a=this.getBody(),s=this.getWindow(),c=i.get('Config');s._isEditor=!0,this.renderStyles({prev:[]});Object(A["a"])(a,"<style>\n      ".concat(c.baseCss||'',"\n\n      .").concat(r,"dashed *[data-gjs-highlightable] {\n        outline: 1px dashed rgba(170,170,170,0.7);\n        outline-offset: -2px;\n      }\n\n      .").concat(r,"selected {\n        outline: 2px solid #3b97e3 !important;\n        outline-offset: -2px;\n      }\n\n      .").concat(r,"selected-parent {\n        outline: 2px solid ").concat('#ffca6f'," !important\n      }\n\n      .").concat(r,"no-select {\n        user-select: none;\n        -webkit-user-select:none;\n        -moz-user-select: none;\n      }\n\n      .").concat(r,"freezed {\n        opacity: 0.5;\n      }\n\n      .").concat(r,"no-pointer {\n        pointer-events: none;\n      }\n\n      .").concat(r,"plh-image {\n        background: #f5f5f5;\n        border: none;\n        height: 100px;\n        width: 100px;\n        display: block;\n        outline: 3px solid #ffca6f;\n        cursor: pointer;\n        outline-offset: -2px\n      }\n\n      .").concat(r,"grabbing {\n        cursor: grabbing;\n        cursor: -webkit-grabbing;\n      }\n\n      .").concat(r,"is__grabbing {\n        overflow-x: hidden;\n      }\n\n      .").concat(r,"is__grabbing,\n      .").concat(r,"is__grabbing * {\n        cursor: grabbing !important;\n      }\n\n      ").concat(c.canvasCss||'',"\n      ").concat(c.protectedCss||'',"\n    </style>"));var u=n.getComponent(),f=i.get('DomComponents').getType('wrapper').view;this.wrapper=new f({model:u,config:D(D({},u.config),{},{frameView:this})}).render(),Object(A["a"])(a,this.wrapper.el),Object(A["a"])(a,new E["a"]({collection:n.getStyles(),config:D(D({},i.get('CssComposer').getConfig()),{},{frameView:this})}).render().el),Object(A["a"])(a,this.getJsContainer()),Object(l["on"])(a,'click',(function(e){return e&&'A'==e.target.tagName&&e.preventDefault()})),Object(l["on"])(a,'submit',(function(e){return e&&e.preventDefault()})),[{event:'keydown keyup keypress',class:'KeyboardEvent'},{event:'mousedown mousemove mouseup',class:'MouseEvent'},{event:'pointerdown pointermove pointerup',class:'PointerEvent'},{event:'wheel',class:'WheelEvent'}].forEach((function(t){return t.event.split(' ').forEach((function(n){o.addEventListener(n,(function(n){return e.el.dispatchEvent(Object(A["e"])(n,t.class))}))}))})),this._toggleEffects(1),this.droppable=Object(l["hasDnd"])(i)&&new T(i,this.wrapper.el),n.trigger('loaded')},_toggleEffects:function(e){var t=e?l["on"]:l["off"],n=this.getWindow();n&&t(n,"".concat(A["k"]," resize"),this._emitUpdate)},_emitUpdate:function(){this.model._emitUpdated()}}),N=n(52);function R(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function F(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?R(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):R(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var I=O.a.View.extend({events:{'click [data-action-remove]':'remove','mousedown [data-action-move]':'startDrag'},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};Object(s["bindAll"])(this,'onScroll','frameLoaded','updateOffset','remove','startDrag');var n=this.model,r=F(F({},e.config||t),{},{frameWrapView:this}),i=r.canvasView,o=r.em;this.cv=i,this.config=r,this.em=o,this.canvas=o&&o.get('Canvas'),this.ppfx=r.pStylePrefix||'',this.frame=new L({model:n,config:r}),this.classAnim="".concat(this.ppfx,"frame-wrapper--anim"),this.updateOffset=Object(s["debounce"])(this.updateOffset.bind(this)),this.updateSize=Object(s["debounce"])(this.updateSize.bind(this)),this.listenTo(n,'loaded',this.frameLoaded),this.listenTo(n,'change:x change:y',this.updatePos),this.listenTo(n,'change:width change:height',this.updateSize),this.listenTo(n,'destroy remove',this.remove),this.updatePos(),this.setupDragger()},setupDragger:function(){var e,t,n,r=this,i=this.canvas,o=this.model,a=function(e){i.toggleFramesEvents(e)};this.dragger=new N["a"]({onStart:function(){var i=o.attributes,s=i.x,l=i.y;n=r.em.getZoomMultiplier(),e=s,t=l,a()},onEnd:function(){return a(1)},setPosition:function(r){o.set({x:e+r.x*n,y:t+r.y*n})}})},startDrag:function(e){e&&this.dragger.start(e)},__clear:function(e){var t=this.frame;t&&t.remove(e),Object(A["l"])(this.elTools)},remove:function(e){var t=this;return this.__clear(e),O.a.View.prototype.remove.apply(this,arguments),['frame','dragger','cv','em','canvas','elTools'].forEach((function(e){return t[e]=0})),this},updateOffset:function(){var e=this.em,t=this.$el,n=this.frame;e&&(e.runDefault({preserveSelected:1}),t.removeClass(this.classAnim),n.model._emitUpdated())},updatePos:function(e){var t=this.model,n=this.el,r=t.attributes,i=r.x,o=r.y,a=n.style;this.frame.rect=0,a.left=isNaN(i)?i:"".concat(i,"px"),a.top=isNaN(o)?o:"".concat(o,"px"),e&&this.updateOffset()},updateSize:function(){this.updateDim()},updateDim:function(){var e=this.em,t=this.el,n=this.$el,r=this.model,i=this.classAnim,o=this.frame;if(o){o.rect=0,n.addClass(i);var a=this.__handleSize(),l=a.noChanges,c=a.width,u=a.height;(Object(s["isNull"])(c)||Object(s["isNull"])(u))&&r.set(F(F({},c?{}:{width:t.offsetWidth}),u?{}:{height:t.offsetHeight}),{silent:1}),e.stopDefault({preserveSelected:1}),l?this.updateOffset():setTimeout(this.updateOffset,350)}},onScroll:function(){var e=this.frame;this.em.trigger('frame:scroll',{frame:e,body:e.getBody(),target:e.getWindow()})},frameLoaded:function(){this.frame.getWindow().onscroll=this.onScroll,this.updateDim()},__handleSize:function(){var e='px',t=this.model,n=this.el.style,r=t.attributes,i=r.width,o=r.height,a=n.width||'',l=n.height||'',c=i||'',u=o||'',f=a==c&&l==u;return n.width=Object(s["isNumber"])(c)?"".concat(c).concat(e):c,n.height=Object(s["isNumber"])(u)?"".concat(u).concat(e):u,{noChanges:f,width:i,height:o,newW:c,newH:u}},render:function(){var e=this.frame,t=this.$el,n=this.ppfx,r=this.cv,i=this.model,o=this.el,a=i.attributes.onRender;this.__clear(),this.__handleSize(),e.render(),t.empty().attr({class:"".concat(n,"frame-wrapper")}).append("\n      <div class=\"".concat(n,"frame-wrapper__top gjs-two-color\" data-frame-top>\n        <div class=\"").concat(n,"frame-wrapper__name\" data-action-move>\n          ").concat(i.get('name')||'',"\n        </div>\n        <div class=\"").concat(n,"frame-wrapper__top-r\">\n          <div class=\"").concat(n,"frame-wrapper__icon\" data-action-remove style=\"display: none\">\n            <svg viewBox=\"0 0 24 24\"><path d=\"M19 4h-3.5l-1-1h-5l-1 1H5v2h14M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V7H6v12z\"></path></svg>\n          </div>\n        </div>\n      </div>\n      <div class=\"").concat(n,"frame-wrapper__right\" data-frame-right></div>\n      <div class=\"").concat(n,"frame-wrapper__left\" data-frame-left></div>\n      <div class=\"").concat(n,"frame-wrapper__bottom\" data-frame-bottom></div>\n      ")).append(e.el);var s=Object(A["f"])('div',{class:"".concat(n,"tools"),style:'pointer-events:none; display: none'},"\n      <div class=\"".concat(n,"highlighter\" data-hl></div>\n      <div class=\"").concat(n,"badge\" data-badge></div>\n      <div class=\"").concat(n,"placeholder\">\n        <div class=\"").concat(n,"placeholder-int\"></div>\n      </div>\n      <div class=\"").concat(n,"ghost\"></div>\n      <div class=\"").concat(n,"toolbar\" style=\"pointer-events:all\"></div>\n      <div class=\"").concat(n,"resizer\"></div>\n      <div class=\"").concat(n,"offset-v\" data-offset>\n        <div class=\"gjs-marginName\" data-offset-m>\n          <div class=\"gjs-margin-v-el gjs-margin-v-top\" data-offset-m-t></div>\n          <div class=\"gjs-margin-v-el gjs-margin-v-bottom\" data-offset-m-b></div>\n          <div class=\"gjs-margin-v-el gjs-margin-v-left\" data-offset-m-l></div>\n          <div class=\"gjs-margin-v-el gjs-margin-v-right\" data-offset-m-r></div>\n        </div>\n        <div class=\"gjs-paddingName\" data-offset-m>\n          <div class=\"gjs-padding-v-el gjs-padding-v-top\" data-offset-p-t></div>\n          <div class=\"gjs-padding-v-el gjs-padding-v-bottom\" data-offset-p-b></div>\n          <div class=\"gjs-padding-v-el gjs-padding-v-left\" data-offset-p-l></div>\n          <div class=\"gjs-padding-v-el gjs-padding-v-right\" data-offset-p-r></div>\n        </div>\n      </div>\n      <div class=\"").concat(n,"offset-fixed-v\"></div>\n    "));this.elTools=s;var l=r.toolsWrapper;return l&&l.appendChild(s),a&&a({el:o,elTop:o.querySelector('[data-frame-top]'),elRight:o.querySelector('[data-frame-right]'),elBottom:o.querySelector('[data-frame-bottom]'),elLeft:o.querySelector('[data-frame-left]'),frame:i,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this}}),z=j["a"].extend({itemView:I,autoAdd:1,init:function(){this.listenTo(this.collection,'reset',this.render)},onRemoveBefore:function(e,t){e.forEach((function(e){return e.remove(t)}))},onRender:function(){var e=this.config,t=this.$el,n=e.em;n&&t.attr({class:"".concat(n.getConfig('stylePrefix'),"frames")})}});n(40);function V(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function B(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?V(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):V(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var U,H,W=O.a.$,$=O.a.View.extend({events:{wheel:'onWheel'},template:function(){var e=this.pfx;return"\n      <div class=\"".concat(e,"canvas__frames\" data-frames></div>\n      <div id=\"").concat(e,"tools\" class=\"").concat(e,"canvas__tools\" data-tools></div>\n    ")},initialize:function(e){Object(s["bindAll"])(this,'clearOff','onKeyPress','onCanvasMove');var t=this.model;this.config=e.config||{},this.em=this.config.em||{},this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.className=this.config.stylePrefix+'canvas';var n=this.em;this._initFrames(),this.listenTo(n,'change:canvasOffset',this.clearOff),this.listenTo(n,'component:selected',this.checkSelected),this.listenTo(t,'change:zoom change:x change:y',this.updateFrames),this.listenTo(t,'change:frames',this._onFramesUpdate),this.toggleListeners(1)},_onFramesUpdate:function(){this._initFrames(),this._renderFrames()},_initFrames:function(){var e=this.frames,t=this.model,n=this.config,r=this.em,i=t.get('frames');r.set('readyCanvas',0),i.once('loaded:all',(function(){return r.set('readyCanvas',1)})),e&&e.remove(),this.frames=new z({collection:i,config:B(B({},n),{},{canvasView:this})})},checkSelected:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.scroll,r=this.em.get('currentFrame');n&&e.views.forEach((function(e){e._getFrame()===r&&e.scrollIntoView(n)}))},remove:function(){this.frames.remove(),this.frames={},O.a.View.prototype.remove.apply(this,arguments),this.toggleListeners()},preventDefault:function(e){e&&(e.preventDefault(),e._parentEvent&&e._parentEvent.preventDefault())},onCanvasMove:function(e){},toggleListeners:function(e){this.el;var t=e?l["on"]:l["off"];t(document,'keypress',this.onKeyPress),t(window,'scroll resize',this.clearOff)},onKeyPress:function(e){var t=this.em;' '!==Object(l["getKeyChar"])(e)||1===t.getZoomDecimal()||t.get('Canvas').isInputFocused()||(this.preventDefault(e),t.get('Editor').runCommand('core:canvas-move'))},onWheel:function(e){if((e.ctrlKey||e.metaKey)&&this.em.getConfig('multiFrames')){this.preventDefault(e);var t=this.model,n=Math.max(-1,Math.min(1,e.wheelDelta||-e.detail)),r=t.get('zoom');t.set('zoom',r+2*n)}},updateFrames:function(e){var t=this.em,n=this.model.attributes,r=n.x,i=n.y,o=this.getZoom(),a={preserveSelected:1},s=o?1/o:1;this.framesArea.style.transform="scale(".concat(o,") translate(").concat(r*s,"px, ").concat(i*s,"px)"),this.clearOff(),t.stopDefault(a),t.trigger('canvas:update',e),U&&clearTimeout(U),U=setTimeout((function(){return t.runDefault(a)}),300)},getZoom:function(){return this.em.getZoomDecimal()},isElInViewport:function(e){var t=Object(l["getElement"])(e),n=Object(l["getElRect"])(t),r=this.getFrameOffset(t),i=n.top,o=n.left;return i>=0&&o>=0&&i<=r.height&&o<=r.width},offset:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l["getElRect"])(e),r=e.ownerDocument.body,i=t.noScroll;return{top:n.top+(i?0:r.scrollTop),left:n.left+(i?0:r.scrollLeft),width:n.width,height:n.height}},clearOff:function(){this.frmOff=null,this.cvsOff=null},getFrameOffset:function(e){if(!this.frmOff||e){var t=this.frame.el,n=e&&e.ownerDocument.defaultView,r=n?n.frameElement:t;this.frmOff=this.offset(r||t)}return this.frmOff},getCanvasOffset:function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},getElementPos:function(e,t){var n=this.getZoom(),r=t||{},i=this.getFrameOffset(e),o=this.getCanvasOffset(),a=this.offset(e,t),s=r.avoidFrameOffset?0:i.top,l=r.avoidFrameOffset?0:i.left;return{top:a.top*n+s-o.top,left:a.left*n+l-o.left,height:a.height*n,width:a.width*n,zoom:n,rect:a}},getElementOffsets:function(e){var t=this;if(!e||Object(l["isTextNode"])(e))return{};var n={},r=window.getComputedStyle(e);return['marginTop','marginRight','marginBottom','marginLeft','paddingTop','paddingRight','paddingBottom','paddingLeft'].forEach((function(e){n[e]=parseFloat(r[e])*t.getZoom()})),n},getPosition:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.frame.el.contentDocument;if(t){var n=t.body,r=this.getZoom(),i=this.getFrameOffset(),o=this.getCanvasOffset(),a=e.noScroll;return{top:i.top+(a?0:n.scrollTop)*r-o.top,left:i.left+(a?0:n.scrollLeft)*r-o.left,width:o.width,height:o.height}}},updateScript:function(e){var t=e.model,n=t.getId();e.scriptContainer||(e.scriptContainer=W("<div data-id=\"".concat(n,"\">")),this.getJsContainer().appendChild(e.scriptContainer.get(0))),e.el.id=n,e.scriptContainer.html('');var r=document.createElement('script'),i=t.getScriptString(),o=t.get('script-props')?i:"function(){\n".concat(i,"\n;}"),a=JSON.stringify(t.__getScriptProps());r.innerHTML="\n      setTimeout(function() {\n        var item = document.getElementById('".concat(n,"');\n        if (!item) return;\n        (").concat(o,".bind(item))(").concat(a,")\n      }, 1);"),setTimeout((function(){var t=e.scriptContainer;t&&t.get(0).appendChild(r)}),0)},getJsContainer:function(e){var t=this.getFrameView(e);return t&&t.getJsContainer()},getFrameView:function(e){return e&&e._getFrame()||this.em.get('currentFrame')},_renderFrames:function(){if(this.ready){var e=this.model,t=this.frames,n=this.em,r=this.framesArea,i=e.get('frames');i.listenToLoad(),t.render();var o=i.at(0),a=o&&o.view;n.setCurrentFrame(a),r&&r.appendChild(t.el),this.frame=a}},render:function(){var e=this.el,t=this.$el,n=this.ppfx,r=this.config,i=this.em;t.html(this.template());var o=t.find('[data-frames]');this.framesArea=o.get(0);var a=t.find('[data-tools]');this.toolsWrapper=a.get(0),a.append("\n      <div class=\"".concat(n,"tools ").concat(n,"tools-gl\" style=\"pointer-events:none\">\n        <div class=\"").concat(n,"placeholder\">\n          <div class=\"").concat(n,"placeholder-int\"></div>\n        </div>\n      </div>\n      <div id=\"").concat(n,"tools\" style=\"pointer-events:none\">\n        ").concat(r.extHl?"<div class=\"".concat(n,"highlighter-sel\"></div>"):'',"\n        <div class=\"").concat(n,"badge\"></div>\n        <div class=\"").concat(n,"ghost\"></div>\n        <div class=\"").concat(n,"toolbar\" style=\"pointer-events:all\"></div>\n        <div class=\"").concat(n,"resizer\"></div>\n        <div class=\"").concat(n,"offset-v\"></div>\n        <div class=\"").concat(n,"offset-fixed-v\"></div>\n      </div>\n    "));var s=e.querySelector("#".concat(n,"tools"));return this.hlEl=e.querySelector(".".concat(n,"highlighter")),this.badgeEl=e.querySelector(".".concat(n,"badge")),this.placerEl=e.querySelector(".".concat(n,"placeholder")),this.ghostEl=e.querySelector(".".concat(n,"ghost")),this.toolbarEl=e.querySelector(".".concat(n,"toolbar")),this.resizerEl=e.querySelector(".".concat(n,"resizer")),this.offsetEl=e.querySelector(".".concat(n,"offset-v")),this.fixedOffsetEl=e.querySelector(".".concat(n,"offset-fixed-v")),this.toolsGlobEl=e.querySelector(".".concat(n,"tools-gl")),this.toolsEl=s,this.el.className=Object(l["getUiClass"])(i,this.className),this.ready=1,this._renderFrames(),this}});function q(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function K(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?q(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):q(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n={};return{getCanvasView:function(){return t},name:'Canvas',init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};n=K(K(K({},c),t),{},{module:this}),this.em=n.em;var r=n,i=r.scripts,o=r.styles,a=n.pStylePrefix;return a&&(n.stylePrefix=a+n.stylePrefix),e=new S({scripts:i,styles:o},t),this.model=e,this.startAutoscroll=this.startAutoscroll.bind(this),this.stopAutoscroll=this.stopAutoscroll.bind(this),H=e,this},onLoad:function(){this.model.init()},getModel:function(){return e},getConfig:function(){return n},getElement:function(){return t.el},getFrame:function(e){return this.getFrames()[e||0]},getFrameEl:function(){var e=(t||{}).frame;return e&&e.el},getFramesEl:function(){return t.framesArea},getWindow:function(){return this.getFrameEl().contentWindow},getDocument:function(){var e=this.getFrameEl();return e&&e.contentDocument},getBody:function(){var e=this.getDocument();return e&&e.body},_getCompFrame:function(e){return e&&e._getFrame()},_getLocalEl:function(e,t,n){var r=e,i=this._getCompFrame(t);return r=i?i[n]():r},getGlobalToolsEl:function(){return t.toolsGlobEl},getToolsEl:function(e){return this._getLocalEl(t.toolsEl,e,'getToolsEl')},getHighlighter:function(e){return this._getLocalEl(t.hlEl,e,'getHighlighter')},getBadgeEl:function(e){return this._getLocalEl(t.badgeEl,e,'getBadgeEl')},getPlacerEl:function(){return t.placerEl},getGhostEl:function(){return t.ghostEl},getToolbarEl:function(){return t.toolbarEl},getResizerEl:function(){return t.resizerEl},getOffsetViewerEl:function(e){return this._getLocalEl(t.offsetEl,e,'getOffsetViewerEl')},getFixedOffsetViewerEl:function(){return t.fixedOffsetEl},render:function(){return t&&t.remove(),(t=new $({model:e,config:n})).render().el},getOffset:function(){var e=this.offset(this.getFrameEl()),t=this.offset(this.getElement());return{top:e.top-t.top,left:e.left-t.left}},offset:function(e){return t.offset(e)},setCustomBadgeLabel:function(e){n.customBadgeLabel=e},getElementPos:function(e,n){return t.getElementPos(e,n)},getElementOffsets:function(e){return t.getElementOffsets(e)},getRect:function(){var e=t.getPosition(),n=e.top,r=e.left;return K(K({},t.getCanvasOffset()),{},{topScroll:n,leftScroll:r})},getTargetToElementDim:function(e,r){var i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=i||{},a=t.getPosition();if(a){var s=o.elPos||t.getElementPos(r),l=i.toRight||0,c=o.targetHeight||e.offsetHeight,u=o.targetWidth||e.offsetWidth,f=o.event||null,d=s.top-c,h=s.left;h+=l?s.width:0;var p=(h=l?h-u:h)<a.left?a.left:h,g=d<a.top?a.top:d,v={top:g=g>s.top+s.height?s.top+s.height:g,left:p,elementTop:s.top,elementLeft:s.left,elementWidth:s.width,elementHeight:s.height,targetWidth:e.offsetWidth,targetHeight:e.offsetHeight,canvasTop:a.top,canvasLeft:a.left,canvasWidth:a.width,canvasHeight:a.height};return f&&n.em&&n.em.trigger(f,v),v}},canvasRectOffset:function(e,t){var n=this,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=function(e){var t=e.defaultView;return t&&t.frameElement},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,o=arguments.length>2?arguments[2]:void 0,a=n.em.getZoomDecimal(),s=t?'top':'left',l=e.ownerDocument,c=r.offset?i(l):{},u=c.offsetTop,f=void 0===u?0:u,d=c.offsetLeft,h=void 0===d?0:d,p=l.body||{},g=p.scrollTop,v=void 0===g?0:g,m=p.scrollLeft,y=void 0===m?0:m,b=t?v:y,w=t?f:h;return o[s]-(b-w)*a};return{top:o(e,1,t),left:o(e,0,t)}},getTargetToElementFixed:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=n.pos||this.getElementPos(e),i=n.canvasOff||this.canvasRectOffset(e,r),o=t.offsetHeight||0,a=t.offsetWidth||0,l=r.left+r.width,c=this.getCanvasView(),u=c.getPosition(),f=c.getFrameOffset(e),d=n.event,h=-o,p=Object(s["isUndefined"])(n.left)?r.width-a:n.left;p=r.left<-p?-r.left:p,p=l>u.width?p-(l-u.width):p;var g=r.height+o,v=g<f.height;i.top<o&&(v?h+=g:h=-i.top<r.height?-i.top:r.height);var m={top:h,left:p,canvasOffsetTop:i.top,canvasOffsetLeft:i.left};return d&&this.em.trigger(d,m),m},getMouseRelativePos:function(e,t){var n=0,r=0,i=(t||{}).subWinOffset,o=e.target.ownerDocument,a=o.defaultView||o.parentWindow,s=a.frameElement,l=i?a.pageYOffset:0,c=i?a.pageXOffset:0;if(s){var u=s.getBoundingClientRect();n=u.top||0,r=u.left||0}return{y:e.clientY+n-l,x:e.clientX+r-c}},getMouseRelativeCanvas:function(e,n){var r=this.getZoomDecimal(),i=t.getPosition(n),o=i.top,a=i.left;return{y:e.clientY*r+o,x:e.clientX*r+a}},hasFocus:function(){return this.getDocument().hasFocus()},isInputFocused:function(){var e=this.getDocument(),t=this.getFrameEl(),n=['body'].concat(i()(this.getConfig().notTextable)),r=t&&document.activeElement===t?e&&e.activeElement:document.activeElement;return r&&!n.some((function(e){return r.matches(e)}))},scrollTo:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(l["getElement"])(e),r=n&&Object(l["getViewEl"])(n);r&&r.scrollIntoView(t)},startAutoscroll:function(e){var t=e&&e.view||this.em.getCurrentFrame();t&&t.startAutoscroll()},stopAutoscroll:function(e){var t=e&&e.view||this.em.getCurrentFrame();t&&t.stopAutoscroll()},setZoom:function(t){return e.set('zoom',parseFloat(t)),this},getZoom:function(){return parseFloat(e.get('zoom'))},setCoords:function(t,n){return e.set({x:parseFloat(t),y:parseFloat(n)}),this},getCoords:function(){var t=e.attributes;return{x:t.x,y:t.y}},getZoomDecimal:function(){return this.getZoom()/100},getZoomMultiplier:function(){var e=this.getZoomDecimal();return e?1/e:1},toggleFramesEvents:function(e){this.getFramesEl().style.pointerEvents=e?'':'none'},getFrames:function(){return e.get('frames').map((function(e){return e}))},addFrame:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return e.get('frames').add(K({},t),K(K({},n),{},{em:this.em}))},destroy:function(){var r=this;e.stopListening(),t&&t.remove(),[n,e,t].forEach((function(e){return{}})),['em','model','droppable'].forEach((function(e){return r[e]={}}))}}}},function(e,t,n){"use strict";n.r(t);var r=n(0),i={stylePrefix:'cm-',inlineCss:!1},o=n(3),a=n.n(o),s=n(8),l=n.n(s),c=n(9),u=n.n(c),f=n(10),d=n.n(f),h=n(11),p=n.n(h),g=n(5),v=n.n(g),m=n(4),y=n.n(m);function b(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?b(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):b(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v()(e);if(t){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p()(this,n)}}var x=function(e){d()(n,e);var t=O(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"build",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.components(),r={},i=t.em;if(t.cleanId&&i){var o=i.get('CssComposer').getAll(),a=o.toJSON().map((function(e){var t=e.selectors,n=t&&1===t.length&&t.models[0];return n&&n.isId()&&n.get('name')})).filter((function(e){return e}));r.attributes=function(e,t){var n=t.id;return n&&'i'===n[0]&&!e.get('script')&&!e.get('attributes').id&&a.indexOf(n)<0&&delete t.id,t}}return t.exportWrapper?e.toHTML(w(w({},r),t.wrapperIsBody&&e.is('wrapper')&&{tag:'body'})):this.buildModels(n,r)}},{key:"buildModels",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n='';return e.forEach((function(e){return n+=e.toHTML(t)})),n}}]),n}(m["Model"]),k=n(80),C=y.a.Model.extend({build:function(e){var t=e.toJSON();return this.beforeEach(t),Object(r["each"])(t,(function(e,n){var r=t[n];if(r instanceof y.a.Model)t[n]=this.build(r);else if(r instanceof y.a.Collection){var i=r;t[n]=[],i.length&&i.each((function(e,r){t[n][r]=this.build(e)}),this)}}),this),t},beforeEach:function(e){delete e.status}});var S,j=y.a.Model.extend({mapModel:function(e){var t='',n=e.get('script-export')||e.get('script'),i=e.get('type'),o=e.get('components'),s=e.getId();if(n){var l=e.get('attributes');l=Object(r["extend"])({},l,{id:s}),e.set('attributes',l,{silent:1});var c=e.getScriptString(n),u=e.get('script-props');if(e.get('scriptUpdated')&&!u)this.mapJs[i+'-'+s]={ids:[s],code:c};else{var f,d=this.mapJs[i];if(u&&(f=e.__getScriptProps()),d)d.ids.push(s),f&&(d.props[s]=f);else{var h={ids:[s],code:c};f&&(h.props=a()({},s,f)),this.mapJs[i]=h}}}return o.each((function(e){t+=this.mapModel(e)}),this),t},build:function(e){this.mapJs={},this.mapModel(e);var t='';for(var n in this.mapJs){var r=this.mapJs[n];if(r.code)if(r.props){if(0===r.code.toString().match(/\{([\s\S]*)\}/m)[1].replace(/^\s*\/\/.*$/gm,'').trim().length)continue;t+="\n          var props = ".concat(JSON.stringify(r.props),";\n          var ids = Object.keys(props).map(function(id) { return '#'+id }).join(',');\n          var els = document.querySelectorAll(ids);\n          for (var i = 0, len = els.length; i < len; i++) {\n            var el = els[i];\n            (").concat(r.code,".bind(el))(props[el.id]);\n          }")}else{var i='#'+r.ids.join(', #');t+="\n          var items = document.querySelectorAll('".concat(i,"');\n          for (var i = 0, len = items.length; i < len; i++) {\n            (function(){\n").concat(r.code,"\n}.bind(items[i]))();\n          }")}}return t}}),E=n(1);function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}Object(E["hasWin"])()&&(S=n(61),n(235),n(131),n(238));var _,T=y.a.Model.extend({CodeMirror:S,defaults:{input:'',label:'',codeName:'',theme:'hopscotch',readOnly:!0,lineNumbers:!0},init:function(e){return Object(r["bindAll"])(this,'onChange'),this.editor=S.fromTextArea(e,function(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}({dragDrop:!1,lineWrapping:!0,mode:this.get('codeName')},this.attributes)),this.element=e,this.editor.on('change',this.onChange),this},onChange:function(){this.trigger('update',this)},getEditor:function(){return this.editor},getElement:function(){return this.element},setElement:function(e){return this.element=e,this},refresh:function(){return this.getEditor().refresh(),this},focus:function(){return this.getEditor().focus(),this},getContent:function(){var e=this.getEditor();return e&&e.getValue()},setContent:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=this.editor;r&&(r.setValue(e),r.autoFormatRange&&(S.commands.selectAll(r),r.autoFormatRange(r.getCursor(!0),r.getCursor(!1)),S.commands.goDocStart(r)),!n.noRefresh&&setTimeout((function(){return t.refresh()})))}}),A=n(30),M=n.n(A),D=n(27);function L(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=v()(e);if(t){var i=v()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return p()(this,n)}}var N=function(e){d()(n,e);var t=L(n);function n(){return l()(this,n),t.apply(this,arguments)}return u()(n,[{key:"template",value:function(e){var t=e.pfx,n=e.codeName,r=e.label;return Object(D["a"])(_||(_=M()(["\n      <div class=\"","editor\" id=\"","","\">\n        <div id=\"","title\">","</div>\n        <div id=\"","code\"></div>\n      </div>\n    "])),t,t,n,t,r,t)}},{key:"initialize",value:function(e){this.config=e.config||{},this.pfx=this.config.stylePrefix}},{key:"render",value:function(){var e=this.model,t=this.pfx,n=this.$el,r=e.toJSON();return r.pfx=t,n.html(this.template(r)),n.attr('class',"".concat(t,"editor-c")),n.find("#".concat(t,"code")).append(e.get('input')),this}}]),n}(m["View"]);t["default"]=function(){var e={},t={},n={},o={},a={},s='CodeMirror';return{getConfig:function(){return e},config:e,EditorView:N,name:'CodeManager',init:function(t){for(var r in e=t||{},i)r in e||(e[r]=i[r]);var o=e.pStylePrefix;return o&&(e.stylePrefix=o+e.stylePrefix),n.html=new x,n.css=new k["a"],n.json=new C,n.js=new j,a.CodeMirror=new T,this.loadDefaultGenerators().loadDefaultViewers(),this},addGenerator:function(e,n){return t[e]=n,this},getGenerator:function(e){return t[e]||null},getGenerators:function(){return t},addViewer:function(e,t){return o[e]=t,this},getViewer:function(e){return o[e]||null},getViewers:function(){return o},createViewer:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Object(r["isUndefined"])(e.type)?s:e.type,n=this.getViewer(t)&&this.getViewer(t).clone(),i=document.createElement('div'),o=document.createElement('textarea');return i.appendChild(o),n.set(e),n.init(o),n.setElement(i),n},updateViewer:function(e,t){e.setContent(t)},getCode:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};r.em=e.em;var i=this.getGenerator(n);return i?i.build(t,r):''},loadDefaultGenerators:function(){for(var e in n)this.addGenerator(e,n[e]);return this},loadDefaultViewers:function(){for(var e in a)this.addViewer(e,a[e]);return this},destroy:function(){[e,t,n,o,a].forEach((function(e){return{}}))}}}},function(e,t,n){"use strict";n.r(t),n.d(t,"evAll",(function(){return A})),n.d(t,"evPfx",(function(){return M})),n.d(t,"evSelect",(function(){return D})),n.d(t,"evSelectBefore",(function(){return L})),n.d(t,"evUpdate",(function(){return N})),n.d(t,"evAdd",(function(){return R})),n.d(t,"evAddBefore",(function(){return F})),n.d(t,"evRemove",(function(){return I})),n.d(t,"evRemoveBefore",(function(){return z}));var r=n(3),i=n.n(r),o=n(0),a=n(47),s={default:null,devices:[{id:'desktop',name:'Desktop',width:''},{id:'tablet',name:'Tablet',width:'770px',widthMedia:'992px'},{id:'mobileLandscape',name:'Mobile landscape',width:'568px',widthMedia:'768px'},{id:'mobilePortrait',name:'Mobile portrait',width:'320px',widthMedia:'480px'}]},l=n(8),c=n.n(l),u=n(9),f=n.n(u),d=n(10),h=n.n(d),p=n(11),g=n.n(p),v=n(5),m=n.n(v),y=n(4);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var w=function(e){h()(n,e);var t=b(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"defaults",value:function(){return{name:'',width:null,height:'',widthMedia:null,priority:null}}},{key:"initialize",value:function(){var e=this;null===this.get('widthMedia')&&this.set('widthMedia',this.get('width')),null===this.get('width')&&this.set('width',this.get('widthMedia')),!this.get('priority')&&this.set('priority',parseFloat(this.get('widthMedia'))||0);['width','height','widthMedia'].forEach((function(t){return e.checkUnit(t)}))}},{key:"checkUnit",value:function(e){var t=this.get(e)||'';(parseFloat(t)||0).toString()===t.toString()&&this.set(e,"".concat(t,"px"))}},{key:"getName",value:function(){return this.get('name')||this.get('id')}},{key:"getWidthMedia",value:function(){return this.get('widthMedia')||''}}]),n}(y["Model"]);function O(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var x=function(e){h()(n,e);var t=O(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"comparator",value:function(e,t){var n=Number.MAX_VALUE;return(t.get('priority')||n)-(e.get('priority')||n)}},{key:"getSorted",value:function(){return this.sort()}}]),n}(y["Collection"]);x.prototype.model=w;var k,C=n(30),S=n.n(C),j=n(27);function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var P=function(e){h()(n,e);var t=E(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"template",value:function(e){var t=e.ppfx,n=e.label;return Object(j["a"])(k||(k=S()(["\n      <div class=\"","device-label\">","</div>\n      <div class=\"","field ","select\">\n        <span id=\"","input-holder\">\n          <select class=\"","devices\"></select>\n        </span>\n        <div class=\"","sel-arrow\">\n          <div class=\"","d-s-arrow\"></div>\n        </div>\n      </div>\n      <button style=\"display:none\" class=\"","add-trasp\">+</button>\n    "])),t,n,t,t,t,t,t,t,t)}},{key:"events",value:function(){return{change:'updateDevice'}}},{key:"initialize",value:function(e){this.config=e.config||{},this.em=this.config.em,this.ppfx=this.config.pStylePrefix||'',this.events['click .'+this.ppfx+'add-trasp']=this.startAdd,this.listenTo(this.em,'change:device',this.updateSelect),this.delegateEvents()}},{key:"startAdd",value:function(){}},{key:"updateDevice",value:function(){var e=this.em;if(e){var t=this.devicesEl,n=t?t.val():'';e.set('device',n)}}},{key:"updateSelect",value:function(){var e=this.em,t=this.devicesEl;if(e&&e.getDeviceModel&&t){var n=e.getDeviceModel(),r=n?n.get('id'):'';t.val(r)}}},{key:"getOptions",value:function(){var e=this.collection,t=this.em,n='';return e.each((function(e){var r=e.attributes,i=r.name,o=r.id,a=t&&t.t&&t.t("deviceManager.devices.".concat(o))||i;n+="<option value=\"".concat(o||i,"\">").concat(a,"</option>")})),n}},{key:"render",value:function(){var e=this.em,t=this.ppfx,n=this.$el,r=this.el,i=e&&e.t&&e.t('deviceManager.device');return n.html(this.template({ppfx:t,label:i})),this.devicesEl=n.find(".".concat(t,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(e.get('device')),r.className="".concat(t,"devices-c"),this}}]),n}(y["View"]);function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var A='device',M="".concat(A,":"),D="".concat(M,"select"),L="".concat(D,":before"),N="".concat(M,"update"),R="".concat(M,"add"),F="".concat(R,":before"),I="".concat(M,"remove"),z="".concat(I,":before"),V='change:device';t["default"]=function(){var e,t,n={};return T(T({},a["a"]),{},{name:'DeviceManager',Device:w,Devices:x,events:{all:A,select:D,update:N,add:R,remove:I,removeBefore:z},init:function(){var t=this,r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},i=n=T(T({},s),r),o=i.em;return e=new x,n.devices.forEach((function(e){return t.add(e)})),this.em=o,this.all=e,this.select(n.default||e.at(0)),this.__initListen(),o.on(V,this._onSelect,this),this},_onSelect:function(e,t,n){var r=this.em,i=this.events,o=e.previous('device'),a=this.get(t),s=i.select;r.trigger(s,a,this.get(o)),this.__catchAllEvent(s,a,n)},add:function(t){var n,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=r;if(Object(o["isString"])(t)){var a=r;n=T(T({},i=arguments[2]||{}),{},{id:t,name:i.name||t,width:a})}else n=t;return n.id||(n.id=n.name||this._createId()),e.add(n,i)},get:function(t){return this.getAll().filter((function(e){return e.get('name')===t}))[0]||e.get(t)||null},remove:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.__remove(e,t)},getDevices:function(){return e.models},select:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Object(o["isString"])(e)?this.get(e):e;return n&&this.em.set('device',n.get('id'),t),this},getSelected:function(){return this.get(this.em.get('device'))},getAll:function(){return e},render:function(){return t&&t.remove(),(t=new P({collection:e,config:n})).render().el},destroy:function(){e.stopListening(),e.reset(),t&&t.remove(),[e,t].forEach((function(e){return null})),n={}}})}},function(e,t,n){"use strict";n.r(t),n.d(t,"evAll",(function(){return B})),n.d(t,"evPfx",(function(){return U})),n.d(t,"evAdd",(function(){return H})),n.d(t,"evUpdate",(function(){return W})),n.d(t,"evRemove",(function(){return $})),n.d(t,"evRemoveBefore",(function(){return q})),n.d(t,"evCustom",(function(){return K})),n.d(t,"evState",(function(){return G}));var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(0),l=n(1),c=n(4),u=n.n(c),f=n(47),d={stylePrefix:'clm-',appendTo:'',selectors:[],states:[{name:'hover'},{name:'active'},{name:'nth-of-type(2n)'}],escapeName:0,selectedName:0,iconAdd:'<svg viewBox="0 0 24 24"><path d="M19 13h-6v6h-2v-6H5v-2h6V5h2v6h6v2z"></path></svg>',iconSync:'<svg viewBox="0 0 24 24"><path d="M12 18c-3.31 0-6-2.69-6-6 0-1 .25-1.97.7-2.8L5.24 7.74A7.93 7.93 0 0 0 4 12c0 4.42 3.58 8 8 8v3l4-4-4-4m0-11V1L8 5l4 4V6c3.31 0 6 2.69 6 6 0 1-.25 1.97-.7 2.8l1.46 1.46A7.93 7.93 0 0 0 20 12c0-4.42-3.58-8-8-8z"></path></svg>',iconTagOn:'<svg viewBox="0 0 24 24"><path d="M19 19H5V5h10V3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-8h-2m-11.09-.92L6.5 11.5 11 16 21 6l-1.41-1.42L11 13.17l-3.09-3.09z"></path></svg>',iconTagOff:'<svg viewBox="0 0 24 24"><path d="M19 3H5c-1.11 0-2 .89-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5a2 2 0 0 0-2-2m0 2v14H5V5h14z"></path></svg>',iconTagRemove:'<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"></path></svg>',render:0,componentFirst:0,custom:!1},h=n(36),p=n(44),g=n(8),v=n.n(g),m=n(9),y=n.n(m),b=n(10),w=n.n(b),O=n(11),x=n.n(O),k=n(5),C=n.n(k);function S(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=C()(e);if(t){var i=C()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return x()(this,n)}}var j=function(e){w()(n,e);var t=S(n);function n(){return v()(this,n),t.apply(this,arguments)}return y()(n,[{key:"defaults",value:function(){return{name:'',label:''}}},{key:"getName",value:function(){return this.get('name')}},{key:"getLabel",value:function(){return this.get('label')||this.getName()}}]),n}(c["Model"]);j.prototype.idAttribute='name';var E,P,_,T,A=n(30),M=n.n(A),D='contentEditable',L=u.a.View.extend({template:function(){var e=this.pfx,t=this.model,n=this.config,r=t.get('label')||'';return"\n      <span id=\"".concat(e,"checkbox\" class=\"").concat(e,"tag-status\" data-tag-status></span>\n      <span id=\"").concat(e,"tag-label\" data-tag-name>").concat(r,"</span>\n      <span id=\"").concat(e,"close\" class=\"").concat(e,"tag-close\" data-tag-remove>\n        ").concat(n.iconTagRemove,"\n      </span>\n    ")},events:{'click [data-tag-remove]':'removeTag','click [data-tag-status]':'changeStatus','dblclick [data-tag-name]':'startEditTag','focusout [data-tag-name]':'endEditTag'},initialize:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.config||{};this.config=t,this.module=e.module,this.coll=e.coll||null,this.pfx=t.stylePrefix||'',this.ppfx=t.pStylePrefix||'',this.em=t.em,this.listenTo(this.model,'change:active',this.updateStatus)},getInputEl:function(){return this.inputEl||(this.inputEl=this.el.querySelector('[data-tag-name]')),this.inputEl},startEditTag:function(){var e=this.em,t=this.getInputEl();t[D]=!0,t.focus(),e&&e.setEditing(1)},endEditTag:function(){var e=this.model,t=this.getInputEl(),n=t.textContent,r=this.em,i=r&&r.get('SelectorManager');if(t[D]=!1,r&&r.setEditing(0),i){var o=i.escapeName(n);i.get(o)?t.innerText=e.get('label'):e.set({name:o,label:n})}},changeStatus:function(){var e=this.model;e.set('active',!e.get('active'))},removeTag:function(){this.module.removeSelected(this.model)},updateStatus:function(){var e=this.model,t=this.$el,n=this.config,r=n.iconTagOn,i=n.iconTagOff,o=t.find('[data-tag-status]');e.get('active')?(o.html(r),t.removeClass('opac50')):(o.html(i),t.addClass('opac50'))},render:function(){var e=this.pfx,t=this.ppfx;return this.$el.html(this.template()),this.$el.attr('class',"".concat(e,"tag ").concat(t,"three-bg")),this.updateStatus(),this}}),N=n(27),R=u.a.View.extend({template:function(e){var t=e.labelInfo,n=e.labelHead,r=e.iconSync,i=e.iconAdd,o=e.pfx,a=e.ppfx;return"\n    <div id=\"".concat(o,"up\" class=\"").concat(o,"header\">\n      <div id=\"").concat(o,"label\" class=\"").concat(o,"header-label\">").concat(n,"</div>\n      <div id=\"").concat(o,"status-c\" class=\"").concat(o,"header-status\">\n        <span id=\"").concat(o,"input-c\" data-states-c>\n          <div class=\"").concat(a,"field ").concat(a,"select\">\n            <span id=\"").concat(a,"input-holder\">\n              <select id=\"").concat(o,"states\" data-states></select>\n            </span>\n            <div class=\"").concat(a,"sel-arrow\">\n              <div class=\"").concat(a,"d-s-arrow\"></div>\n            </div>\n          </div>\n        </span>\n      </div>\n    </div>\n    <div id=\"").concat(o,"tags-field\" class=\"").concat(a,"field\">\n      <div id=\"").concat(o,"tags-c\" data-selectors></div>\n      <input id=\"").concat(o,"new\" data-input/>\n      <span id=\"").concat(o,"add-tag\" class=\"").concat(o,"tags-btn ").concat(o,"tags-btn__add\" data-add>\n        ").concat(i,"\n      </span>\n      <span class=\"").concat(o,"tags-btn ").concat(o,"tags-btn__sync\" style=\"display: none\" data-sync-style>\n        ").concat(r,"\n      </span>\n    </div>\n    <div class=\"").concat(o,"sels-info\">\n      <div class=\"").concat(o,"label-sel\">").concat(t,":</div>\n      <div class=\"").concat(o,"sels\" data-selected></div>\n    </div>")},events:{'change [data-states]':'stateChanged','click [data-add]':'startNewTag','focusout [data-input]':'endNewTag','keyup [data-input]':'onInputKeyUp','click [data-sync-style]':'syncStyle'},initialize:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=t.config||{},this.pfx=this.config.stylePrefix||'',this.ppfx=this.config.pStylePrefix||'',this.className=this.pfx+'tags',this.stateInputId=this.pfx+'states',this.stateInputC=this.pfx+'input-c',this.states=this.config.states||[];var n=this.config.em,r=this.collection;this.target=this.config.em;var i=t.module;this.module=i,this.em=n;var o='component:toggled component:update:classes',a='component:update:classes change:state';this.listenTo(n,o,this.componentChanged),this.listenTo(n,'styleManager:update',this.componentChanged),this.listenTo(n,a,this.__handleStateChange),this.listenTo(n,'styleable:change change:device',this.checkSync),this.listenTo(r,'add',this.addNew),this.listenTo(r,'reset',this.renderClasses),this.listenTo(r,'remove',this.tagRemoved),this.listenTo(i.getAll(),i.events.state,Object(s["debounce"])((function(){return e.renderStates()}))),this.delegateEvents()},syncStyle:function(){var e,t=this.em,n=this.getTarget(),r=t.get('CssComposer'),i=this.getCommonSelectors({opts:{noDisabled:1}}),o=t.get('state'),a=t.getCurrentMedia(),s=[],l=r.get(i,o,a)||r.add(i,o,a);this.getTargets().forEach((function(t){var n=r.getIdRule(t.getId(),{state:o,mediaText:a});e=n.getStyle(),n.setStyle({}),s.push(n)})),e&&l.addStyle(e),t.trigger('component:toggled'),t.trigger('component:sync-style',{component:n,selectors:i,mediaText:a,rule:l,ruleComponents:s,state:o})},tagRemoved:function(e){this.updateStateVis()},addNew:function(e){this.addToClasses(e)},startNewTag:function(){this.$addBtn.css({display:'none'}),this.$input.show().focus()},endNewTag:function(){this.$addBtn.css({display:''}),this.$input.hide().val('')},onInputKeyUp:function(e){13===e.keyCode?this.addNewTag(this.$input.val()):27===e.keyCode&&this.endNewTag()},checkStates:function(){var e=this.em.getState(),t=this.getStates();t&&t.val(e)},componentChanged:Object(s["debounce"])((function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.targets;this.updateSelection(t)})),updateSelection:function(e){var t=e||this.getTargets(),n=[];return(t=Object(s["isArray"])(t)?t:[t])&&t.length&&(n=this.getCommonSelectors({targets:t}),this.checkSync({validSelectors:n})),this.collection.reset(n),this.updateStateVis(t),this.module.__trgCustom(),n},getCommonSelectors:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.targets,n=e.opts,r=void 0===n?{}:n,i=t||this.getTargets();return this.module.__getCommonSelectors(i,r)},_commonSelectors:function(){var e;return(e=this.module).__common.apply(e,arguments)},checkSync:Object(s["debounce"])((function(){var e,t=this.$btnSyncEl,n=this.config,r=this.collection,i=this.getTarget();if(i&&n.componentFirst&&r.length){var o=i.getStyle();e=!Object(s["isEmpty"])(o)}t&&t[e?'show':'hide']()})),getTarget:function(){return this.target.getSelected()},getTargets:function(){return this.target.getSelectedAll()},updateStateVis:function(e){var t=this.em,n=t&&t.getConfig('avoidInlineStyle'),r=this.collection.length||n?'':'none';this.getStatesC().css('display',r),this.updateSelector(e)},__handleStateChange:function(){this.updateSelector(this.getTargets())},updateSelector:function(e){var t=this,n=this.el.querySelector('[data-selected]'),r=[],i=e||this.getTargets();(i=Object(s["isArray"])(i)?i:[i]).forEach((function(e){return r.push(t.__getName(e))})),n&&(n.innerHTML=r.join(', ')),this.checkStates()},__getName:function(e){var t,n=this.pfx,r=this.config,i=this.em,o=r.selectedName,a=r.componentFirst;if(Object(s["isString"])(e))t=Object(N["a"])(E||(E=M()(["<span class=\"","sel-gen\">","</span>"])),n,e);else{var l=e&&e.get&&e.getSelectors();if(!l)return;var c=l.getStyleable(),u=i.get('state'),f=e.getId?Object(N["a"])(P||(P=M()(["<span class=\"","sel-cmp\">","</span>\n            <span class=\"","sel-id\">#","</span>"])),n,e.getName(),n,e.getId()):'';t=(t=this.collection.getFullString(c))?Object(N["a"])(_||(_=M()(["<span class=\"","sel-rule\">","</span>"])),n,t):e.get('selectorsAdd')||f,t=a&&f?f:t,t+=u?Object(N["a"])(T||(T=M()(["<span class=\"","sel-state\">:","</span>"])),n,u):'',t=o?o({result:t,state:u,target:e}):t}return t&&"<span class=\"".concat(n,"sel\">").concat(t,"</span>")},stateChanged:function(e){var t=this.em,n=e.target.value;t.set('state',n)},addNewTag:function(e){var t=e.trim();t&&(this.module.addSelected({label:t}),this.endNewTag())},addToClasses:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t,r=this.getClasses(),i=new L({model:e,config:this.config,coll:this.collection,module:this.module}).render().el;return n?n.appendChild(i):r.append(i),i},renderClasses:function(){var e=this,t=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each((function(n){return e.addToClasses(n,t)})),n.append(t)},getClasses:function(){return this.$el.find('[data-selectors]')},getStates:function(){if(!this.$states){var e=this.$el.find('[data-states]');this.$states=e[0]&&e}return this.$states},getStatesC:function(){return this.$statesC||(this.$statesC=this.$el.find('#'+this.stateInputC)),this.$statesC},renderStates:function(){var e=this.module,t=this.em,n=t.t('selectorManager.emptyState'),r=e.getStates().map((function(e){var n=t.t("selectorManager.states.".concat(e.id))||e.getLabel()||e.id;return"<option value=\"".concat(e.id,"\">").concat(n,"</option>")})).join(''),i=this.getStates();i&&i.html("<option value=\"\">".concat(n,"</option>").concat(r)),this.checkStates()},render:function(){var e=this.em,t=this.pfx,n=this.ppfx,r=this.config,i=this.$el,o=this.el,a=r.render,s={iconSync:r.iconSync,iconAdd:r.iconAdd,labelHead:e.t('selectorManager.label'),labelInfo:e.t('selectorManager.selected'),ppfx:n,pfx:t,el:o};i.html(this.template(s));var l=a&&a(s);return l&&l!==o&&i.empty().append(l),this.$input=i.find('[data-input]'),this.$addBtn=i.find('[data-add]'),this.$classes=i.find('#'+t+'tags-c'),this.$btnSyncEl=i.find('[data-sync-style]'),this.$input.hide(),this.renderStates(),this.renderClasses(),i.attr('class',"".concat(this.className," ").concat(n,"one-bg ").concat(n,"two-color")),this}});function F(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?F(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):F(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var z=function(e){return Object(s["isString"])(e)&&'#'==e[0]},V=function(e){return Object(s["isString"])(e)&&'.'==e[0]},B='selector',U="".concat(B,":"),H="".concat(U,"add"),W="".concat(U,"update"),$="".concat(U,"remove"),q="".concat($,":before"),K="".concat(U,"custom"),G="".concat(U,"state");t["default"]=function(){return I(I({},f["a"]),{},{name:'SelectorManager',Selector:h["a"],Selectors:p["a"],events:{all:B,update:W,add:H,remove:$,removeBefore:q,state:G,custom:K},init:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.__initConfig(d,t);var n=this.getConfig(),r=n.em,i=n.pStylePrefix;i&&(n.stylePrefix=i+n.stylePrefix),this.all=new p["a"](n.selectors),this.selected=new p["a"]([],{em:r,config:n}),this.states=new c["Collection"](n.states,{model:j}),this.model=new c["Model"]({cFirst:n.componentFirst,_undo:!0}),this.__initListen({collections:[this.states,this.selected],propagate:[{entity:this.states,event:this.events.state}]}),r.on('change:state',(function(e,t){return r.trigger(G,t)})),this.model.on('change:cFirst',(function(e,t){return r.trigger('selector:type',t)}));var o='component:toggled component:update:classes change:device styleManager:update selector:state selector:type';return this.model.listenTo(r,o,(function(){return e.__update()})),this},__update:Object(s["debounce"])((function(){this.__trgCustom()})),__trgCustom:function(e){this.em.trigger(this.events.custom,this.__customData(e))},__customData:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.container;return{states:this.getStates(),selected:this.getSelected(),container:t}},postRender:function(){this.__appendTo(),this.__trgCustom()},select:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=Array.isArray(e)?e:[e],r=this.em.get('StyleManager').select(n,t),i=this.selectorTags,o=r.filter((function(e){return e})).map((function(e){return Object(l["isComponent"])(e)||Object(l["isRule"])(e)&&!e.get('selectorsAdd')?e:e.getSelectorsString()}));return i&&i.componentChanged({targets:o}),this},addSelector:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=I({},t);Object(s["isObject"])(e)?r=e:r.name=e,z(r.name)?(r.name=r.name.substr(1),r.type=h["a"].TYPE_ID):V(r.name)&&(r.name=r.name.substr(1)),r.label&&!r.name&&(r.name=this.escapeName(r.label));var i=r.name,o=this.getConfig(),a=this.getAll(),l=i?this.get(i,r.type):a.where(r)[0];return l||a.add(r,I(I({},n),{},{config:o}))},getSelector:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h["a"].TYPE_CLASS;return z(e)?(e=e.substr(1),t=h["a"].TYPE_ID):V(e)&&(e=e.substr(1)),this.getAll().where({name:e,type:t})[0]},add:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=Object(s["isString"])(e)?{}:n;return Object(s["isArray"])(e)?e.map((function(e){return t.addSelector(e,n,r)})):this.addSelector(e,n,r)},addClass:function(e){var t=this,n=[];return Object(s["isString"])(e)&&(e=e.trim().split(' ')),e.forEach((function(e){return n.push(t.addSelector(e))})),n},get:function(e,t){var n=this;if(Object(s["isArray"])(e)){var r=[];return e.map((function(e){return n.getSelector(e)})).filter((function(e){return e})).forEach((function(e){return r.indexOf(e)<0&&r.push(e)})),r}return this.getSelector(e,t)||null},remove:function(e,t){return this.__remove(e,t)},setState:function(e){return this.em.setState(e),this},getState:function(){return this.em.getState()},getStates:function(){return i()(this.states.models)},setStates:function(e,t){return this.states.reset(e,t)},getSelected:function(){return this.__getCommon()},addSelected:function(e){var t=this.add(e);this.em.getSelectedAll().forEach((function(e){e.getSelectors().add(t)}))},removeSelected:function(e){this.em.getSelectedAll().forEach((function(t){!e.get('protected')&&t&&t.getSelectors().remove(e)}))},getSelectedTargets:function(){return this.em.get('StyleManager').getSelectedAll()},setComponentFirst:function(e){this.getConfig().componentFirst=e,this.model.set({cFirst:e})},getComponentFirst:function(){return this.getConfig().componentFirst},escapeName:function(e){var t=this.getConfig().escapeName;return t?t(e):h["a"].escapeName(e)},render:function(e){this.em;var t=this.selectorTags,n=this.getConfig(),r=t&&t.el;return this.selected.reset(e),this.selectorTags=new R({el:r,collection:this.selected,module:this,config:n}),this.selectorTags.render().el},destroy:function(){var e=this.selectorTags;this.model.stopListening(),this.__destroy(),e&&e.remove(),this.selectorTags={}},__getCommon:function(){return this.__getCommonSelectors(this.em.getSelectedAll())},__getCommonSelectors:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e.map((function(e){return e.getSelectors&&e.getSelectors().getValid(t)})).filter(Boolean);return this.__common.apply(this,i()(n))},__common:function(){for(var e=this,t=arguments.length,n=new Array(t),r=0;r<t;r++)n[r]=arguments[r];return n.length?1===n.length?n[0]:2===n.length?n[0].filter((function(e){return n[1].indexOf(e)>=0})):n.slice(1).reduce((function(t,n){return e.__common(t,n)}),n[0]):[]}})}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o={id:'gjs-',autosave:1,autoload:1,type:'local',stepsBeforeSave:1,storeComponents:1,storeStyles:1,storeHtml:1,storeCss:1,checkLocal:1,params:{},headers:{},urlStore:'',urlLoad:'',beforeSend:function(e,t){},onComplete:function(e,t){},contentTypeJson:!0,credentials:'include',fetchOptions:''},a=n(4),s=n.n(a),l=n(1),c=a["Model"].extend({defaults:{checkLocal:!0},store:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){};if(this.hasLocal())for(var n in e)localStorage.setItem(n,e[n]);t&&t()},load:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(){},n={};if(this.hasLocal())for(var r=0,i=e.length;r<i;r++){var o=localStorage.getItem(e[r]);o&&(n[e[r]]=o)}return t&&t(n),n},remove:function(e){if(this.hasLocal())for(var t=0,n=e.length;t<n;t++)localStorage.removeItem(e[t])},hasLocal:function(){var e=Object(l["hasWin"])();return!!(!this.get('checkLocal')||e&&localStorage)||(e&&console.warn("Your browser doesn't support localStorage"),!1)}}),u=n(77),f=(n(0),n(53)),d=n.n(f),h=n(57),p=s.a.Model.extend({fetch:u["a"],defaults:{urlStore:'',urlLoad:'',params:{},beforeSend:function(){},onComplete:function(){},contentTypeJson:!1,credentials:'include',fetchOptions:''},onStart:function(){this.get('em');var e=this.get('beforeSend');e&&e()},onError:function(e,t){if(t)t(e);else{var n=this.get('em');console.error(e),n&&n.trigger('storage:error',e)}},onResponse:function(e,t){var n=this.get('em'),r=this.get('onComplete'),i=this.get('contentTypeJson')&&(e&&'string'==typeof e)?JSON.parse(e):e;r&&r(i),t&&t(i),n&&n.trigger('storage:response',i)},store:function(e,t,n){var r={};for(var i in e)r[i]=e[i];this.request(this.get('urlStore'),{body:r},t,n)},storeVersion:function(e,t,n,r){var i={};for(var o in e)i[o]=e[o];this.request(this.get('urlStore'),{body:i,version:t},n,r)},load:function(e,t,n){this.request(this.get('urlLoad'),{method:'get'},t,n)},request:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,i=n.body||{},o=n.method||'put',a=n.version?n.version.toString():'0',s=new h["a"](document.cookie);this.onStart(),'get'==o?this.fetch(e,{method:o}).then((function(e){return 1==(e.status/200|0)?e.text():e.text().then((function(e){return Promise.reject(e)}))})).then((function(e){var n=JSON.parse(e).res.content[0],i=JSON.stringify(n);t.onResponse(i,r)})).catch((function(e){console.log('error!!!!',e)})):'put'==o&&d.a.get(e+"/".concat(a),{headers:{Authorization:'Bearer '+s.getCookieByName('token')}}).then((function(t){var n=t.data.res;n.content=[i],d.a.put(e+"/".concat(a),n,{headers:{Authorization:'Bearer '+s.getCookieByName('token')}}).then((function(e){})).catch((function(e){console.log('error!!!!',e)}))})).catch((function(e){console.log('error!!!!',e)}))}});function g(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function v(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?g(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):g(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var m='storage:start',y='storage:after',b='storage:end',w='storage:error';t["default"]=function(){var e,t={},n={},r={};return{name:'StorageManager',init:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return t=v(v({},o),n),e=t.em,t._disable&&(t.type=0),r.remote=new p(t),r.local=new c(t),t.currentStorage=t.type,this.loadDefaultProviders().setCurrent(t.type),this},getConfig:function(){return t},isAutosave:function(){return!!t.autosave},setAutosave:function(e){return t.autosave=!!e,this},getStepsBeforeSave:function(){return t.stepsBeforeSave},setStepsBeforeSave:function(e){return t.stepsBeforeSave=e,this},add:function(e,t){return n[e]=t,this},get:function(e){return n[e]||null},getStorages:function(){return n},getCurrent:function(){return t.currentStorage},setCurrent:function(e){return t.currentStorage=e,this},store:function(e,n){var r=this,i=this.get(this.getCurrent()),o={};for(var a in this.onStart('store',e),e)o[t.id+a]=e[a];return i?i.store(o,(function(e){r.onAfter('store',e),n&&n(e),r.onEnd('store',e)}),(function(e){r.onError('store',e)})):null},storeVersion:function(e,n,r){var i=this,o=this.get(this.getCurrent()),a={};for(var s in this.onStart('store',e),e)a[t.id+s]=e[s];return o?o.storeVersion(a,n,(function(e){i.onAfter('store',e),r&&r(e),i.onEnd('store',e)}),(function(e){i.onError('store',e)})):null},load:function(e,n){var r=this,i=this.get(this.getCurrent()),o=[],a={};'string'==typeof e&&(e=[e]),this.onStart('load',e);for(var s=0,l=e.length;s<l;s++)o.push(t.id+e[s]);i?i.load(o,(function(e){a=r.__clearKeys(e),r.onAfter('load',a),n&&n(a),r.onEnd('load',a)}),(function(e){n&&n(a),r.onError('load',e)})):n&&n(a)},__clearKeys:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n={},r=new RegExp('^'+t.id);for(var i in e){var o=i.replace(r,'');n[o]=e[i]}return n},loadDefaultProviders:function(){for(var e in r)this.add(e,r[e]);return this},getCurrentStorage:function(){return this.get(this.getCurrent())},onStart:function(t,n){e&&(e.trigger(m),t&&e.trigger("".concat(m,":").concat(t),n))},onAfter:function(t,n){e&&(e.trigger(y),t&&e.trigger("".concat(y,":").concat(t),n))},onEnd:function(t,n){e&&(e.trigger(b),t&&e.trigger("".concat(b,":").concat(t),n))},onError:function(t,n){e&&(e.trigger(w,n),t&&e.trigger("".concat(w,":").concat(t),n),this.onEnd(t,n))},canAutoload:function(){return this.getCurrentStorage()&&this.getConfig().autoload},destroy:function(){[t,e,n,r].forEach((function(e){return{}}))}}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o={textTags:['br','b','i','u','a','ul','ol'],parserCss:null,parserHtml:null,optionsHtml:{htmlType:null,allowScripts:!1,allowUnsafeAttr:!1}},a=n(0),s={4:'media',5:'font-face',6:'page',7:'keyframes',11:'counter-style',12:'supports',13:'document',14:'font-feature-values',15:'viewport'},l=Object(a["keys"])(s),c=['5','6','11','15'],u=['font-face','page','counter-style','viewport'],f=function(){for(var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:'',t=[],n=[],r=e.split(','),i=0,o=r.length;i<o;i++){var a=r[i].trim();if(/^(\.{1}[\w\-]+)+(:{1,2}[\w\-()]+)?$/gi.test(a)||/^(#{1}[\w\-]+){1}(:{1,2}[\w\-()]+)?$/gi.test(a)){var s=a.split('.').filter(Boolean);n.push(s)}else t.push(a)}return{result:n,add:t}},d=function(e){for(var t=e.style,n={},r=0,i=t.length;r<i;r++){var o=t[r],a=t.getPropertyValue(o),s=t.getPropertyPriority(o);n[o]="".concat(a).concat(s?" !".concat(s):'')}return n},h=function(e){return(e.conditionText||e.media&&e.media.mediaText||e.name||e.selectorText||'').trim()},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r={},i=e.length,o=e[i-1],a=o?o.split(/:(.+)/):[],s=a[1],l=n.atRule,c=n.selectorsAdd,f=n.mediaText,d=u.indexOf(l)>=0;return d&&(r.singleAtRule=1),l&&(r.atRuleType=l),c&&(r.selectorsAdd=c),f&&(r.mediaText=f),s&&(e[i-1]=a[0],r.state=s,a.splice(a.length-1,1)),r.selectors=e,r.style=t,r},g=function(e){var t=document.createElement('style');t.innerHTML=e,document.head.appendChild(t);var n=t.sheet;return document.head.removeChild(t),function e(t){for(var n=[],r=t.cssRules||[],i=0,o=r.length;i<o;i++){var a=r[i],u=a.type.toString(),g=0,v='',m='',y=a.selectorText||a.keyText,b=c.indexOf(u)>=0;if(b)g=1,v=s[u],m=h(a);else if(l.indexOf(u)>=0){var w=e(a);m=h(a);for(var O=0,x=w.length;O<x;O++){var k=w[O];m&&(k.mediaText=m),k.atRuleType=s[u]}n=n.concat(w)}if(y||b){for(var C=d(a),S=f(y),j=S.add,E=void 0,P=0,_=(y=S.result).length;P<_;P++){var T=p(y[P],C,{atRule:s[u]});n.push(T),E=T}if(j.length){var A=j.join(', ');if(E)E.selectorsAdd=A;else{var M={selectors:[],selectorsAdd:A,style:C};g&&(M.singleAtRule=g),v&&(M.atRuleType=v),m&&(M.mediaText=m),n.push(M)}}}}return n}(n)},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{parse:function(t){var n=this,r=[],i=e.parserCss,o=e.em,a=o&&o.get&&o.get('Editor');return(i?i(t,a):g(t)).forEach((function(e){return r=r.concat(n.checkNode(e))})),o&&o.trigger('parse:css',{input:t,output:r}),r},checkNode:function(e){var t=e,n=t.selectors,r=t.style;if(Object(a["isString"])(n)){var i=[],o=f(n),s=o.result,l=o.add.join(', '),c={atRule:e.atRule,mediaText:e.params};if(s.length?s.forEach((function(e){i.push(p(e,r,c))})):i.push(p([],r,c)),l)i[i.length-1].selectorsAdd=l;e=i}return e}}},m=n(89);function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n={};return{compTypes:'',parserCss:null,parserHtml:null,name:'Parser',init:function(){var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(n=b(b({},o),r)).Parser=this,e=new m["a"](n),t=new v(n),this.em=n.em,this.parserCss=t,this.parserHtml=e,this},getConfig:function(){return n},parseHtml:function(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=this.em,o=this.compTypes;return e.compTypes=i?i.get('DomComponents').getTypes():o,e.parse(n,t,r)},parseCss:function(e){return t.parse(e)},destroy:function(){var r=this;[n,e,t].forEach((function(e){return{}})),['em','parserCss','parserHtml'].forEach((function(e){return r[e]={}}))}}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(0),a=n(18),s={stylePrefix:'mdl-',title:'',content:'',backdrop:!0,custom:!1,extend:{}},l=n(8),c=n.n(l),u=n(9),f=n.n(u),d=n(10),h=n.n(d),p=n(11),g=n.n(p),v=n(5),m=n.n(v),y=n(4);function b(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var w=function(e){h()(n,e);var t=b(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"defaults",value:function(){return{title:'',content:'',attributes:{},open:!1}}},{key:"open",value:function(){this.set('open',!0)}},{key:"close",value:function(){this.set('open',!1)}}]),n}(y["Model"]);function O(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function x(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?O(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):O(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function k(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=m()(e);if(t){var i=m()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return g()(this,n)}}var C=function(e){h()(n,e);var t=k(n);function n(){return c()(this,n),t.apply(this,arguments)}return f()(n,[{key:"template",value:function(e){var t=e.pfx,n=e.ppfx,r=e.content,i=e.title;return"<div class=\"".concat(t,"dialog ").concat(n,"one-bg ").concat(n,"two-color\">\n      <div class=\"").concat(t,"header\">\n        <div class=\"").concat(t,"title\">").concat(i,"</div>\n        <div class=\"").concat(t,"btn-close\" data-close-modal>&Cross;</div>\n      </div>\n      <div class=\"").concat(t,"content\">\n        <div id=\"").concat(t,"c\">").concat(r,"</div>\n        <div style=\"clear:both\"></div>\n      </div>\n    </div>\n    <div class=\"").concat(t,"collector\" style=\"display: none\"></div>")}},{key:"events",value:function(){return{click:'onClick','click [data-close-modal]':'hide'}}},{key:"initialize",value:function(e){var t=this.model,n=e.config||{},r=n.stylePrefix||'';this.config=n,this.pfx=r,this.ppfx=n.pStylePrefix||'',this.listenTo(t,'change:open',this.updateOpen),this.listenTo(t,'change:title',this.updateTitle),this.listenTo(t,'change:content',this.updateContent)}},{key:"onClick",value:function(e){this.config.backdrop&&e.target===this.el&&this.hide()}},{key:"getCollector",value:function(){return this.$collector||(this.$collector=this.$el.find('.'+this.pfx+'collector')),this.$collector}},{key:"getContent",value:function(){var e=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(e,"content #").concat(e,"c"))),this.$content}},{key:"getTitle",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.$title||(this.$title=this.$el.find('.'+this.pfx+'title')),e.$?this.$title:this.$title.get(0)}},{key:"updateContent",value:function(){var e=this.getContent(),t=e.children(),n=this.getCollector(),r=this.model.get('content');t.length&&n.append(t),e.empty().append(r)}},{key:"updateTitle",value:function(){var e=this.getTitle({$:!0});e&&e.empty().append(this.model.get('title'))}},{key:"updateOpen",value:function(){this.el.style.display=this.model.get('open')?'':'none'}},{key:"hide",value:function(){this.model.close()}},{key:"show",value:function(){this.model.open()}},{key:"updateAttr",value:function(e){var t=this.pfx,n=this.$el,r=this.el,i=[].slice.call(r.attributes).map((function(e){return e.name}));n.removeAttr(i.join(' ')),n.attr(x(x({},e||{}),{},{class:"".concat(t,"container ").concat(e&&e.class||'').trim()}))}},{key:"render",value:function(){var e=this.$el,t=this.model.toJSON();return t.pfx=this.pfx,t.ppfx=this.ppfx,e.html(this.template(t)),this.updateAttr(),this.updateOpen(),this}}]),n}(y["View"]);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n={},r=function(e,t){t&&t.trigger("modal:".concat(e?'open':'close'))};return{name:'Modal',getConfig:function(){return n},init:function(){var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},a=(n=j(j({},s),i)).em;this.em=a;var l=n.pStylePrefix;return l&&(n.stylePrefix=l+n.stylePrefix),(e=new w(n)).on('change:open',(function(e,t){return r(t,a)})),e.on('change',Object(o["debounce"])((function(){var e=t._evData(),n=t.getConfig().custom;Object(o["isFunction"])(n)&&n(e),a.trigger('modal',e)}))),this},_evData:function(){var t=this,n=this.getTitle(),r=this.getContent(),i=e.attributes;return{open:i.open,attributes:i.attributes,title:Object(o["isString"])(n)?Object(a["g"])(n):n,content:Object(o["isString"])(r)?Object(a["g"])(r):r.get?r.get(0):r,close:function(){return t.close()}}},postRender:function(e){var t=e.model.getConfig().el||e.el,n=this.render();n&&n.appendTo(t)},open:function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},r=n.attributes||{};return n.title&&this.setTitle(n.title),n.content&&this.setContent(n.content),e.set('attributes',r),e.open(),t&&t.updateAttr(r),this},close:function(){return e.close(),this},onceClose:function(e){return this.em.once('modal:close',e),this},onceOpen:function(e){return this.em.once('modal:open',e),this},isOpen:function(){return!!e.get('open')},setTitle:function(t){return e.set('title',t),this},getTitle:function(){return e.get('title')},setContent:function(t){return e.set('content',' '),e.set('content',t),this},getContent:function(){return e.get('content')},getContentEl:function(){return t.getContent().get(0)},getModel:function(){return e},render:function(){if(!this.getConfig().custom){var r=C.extend(n.extend),i=t&&t.el;return(t=new r({el:i,model:e,config:n})).render().$el}},destroy:function(){t&&t.remove(),[n,e,t].forEach((function(e){return{}})),this.em={}}}}},function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(0),l=n(1),c={stylePrefix:'css-',rules:[],onBeforeStyle:null},u=n(8),f=n.n(u),d=n(9),h=n.n(d),p=n(10),g=n.n(p),v=n(11),m=n.n(v),y=n(5),b=n.n(y),w=n(4),O=n.n(w),x=n(67),k=n(44),C=n(80);function S(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function j(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?S(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):S(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function E(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var n,r=b()(e);if(t){var i=b()(this).constructor;n=Reflect.construct(r,arguments,i)}else n=r.apply(this,arguments);return m()(this,n)}}var P=(Object(l["hasWin"])()?window:{}).CSS,_=function(e){g()(n,e);var t=E(n);function n(){return f()(this,n),t.apply(this,arguments)}return h()(n,[{key:"defaults",value:function(){return{selectors:[],selectorsAdd:'',style:{},mediaText:'',state:'',stylable:!0,atRuleType:'',singleAtRule:!1,important:!1,group:'',_undo:!0}}},{key:"initialize",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};this.config=e||{},this.opt=t,this.em=t.em,this.ensureSelectors(),this.on('change',this.__onChange)}},{key:"__onChange",value:function(e,t){var n=this.em,r=this.changedAttributes();!Object(l["isEmptyObj"])(r)&&n&&n.changesUp(t)}},{key:"clone",value:function(){var e=j({},this.opt),t=j({},this.attributes);return t.selectors=this.get('selectors').map((function(e){return e.clone()})),new this.constructor(t,e)}},{key:"ensureSelectors",value:function(e,t,n){var r=this.em,o=r&&r.get('SelectorManager'),a=[this,'change:selectors',this.ensureSelectors],l=this.getSelectors();if(this.stopListening.apply(this,a),l.models&&(l=i()(l.models)),l=Object(s["isString"])(l)?[l]:l,Array.isArray(l)){var c=l.filter((function(e){return e})).map((function(e){return o?o.add(e):e}));l=new k["a"](c)}this.set('selectors',l,n),this.listenTo.apply(this,a)}},{key:"getAtRule",value:function(){var e=this.get('atRuleType'),t=this.get('mediaText'),n=e?"@".concat(e):t?'@media':'';return n+(t&&n?" ".concat(t):'')}},{key:"selectorsToString",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=[],n=this.get('state'),r=this.get('wrapper'),i=this.get('selectorsAdd'),o=r&&e.body,a={escape:function(e){return P&&P.escape?P.escape(e):e}},s=o?'body':this.get('selectors').getFullString(0,a),l=n&&!e.skipState?":".concat(n):'';return s&&t.push("".concat(s).concat(l)),i&&!e.skipAdd&&t.push(i),t.join(', ')}},{key:"getDeclaration",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t='',n=this.selectorsToString(e),r=this.styleToString(e),i=this.get('singleAtRule');return(n||i)&&(r||e.allowEmpty)&&(t=i?r:"".concat(n,"{").concat(r,"}")),t}},{key:"getDevice",value:function(){var e=this.em,t=this.attributes,n=t.atRuleType,r=t.mediaText,i=(null==e?void 0:e.get('DeviceManager').getDevices())||[],o=i.filter((function(e){return''===e.getWidthMedia()}))[0];return'media'===n&&r?i.filter((function(e){return e.getWidthMedia()===Object(C["b"])(r)}))[0]||null:o||null}},{key:"getState",value:function(){var e=this.em,t=this.get('state');return(e.get('SelectorManager').getStates()||[]).filter((function(e){return e.getName()===t}))[0]||null}},{key:"getComponent",value:function(){var e,t=this.getSelectors(),n=1==t.length&&t.at(0),r=n&&n.isId()&&n.get('name');return r&&(null===(e=this.em)||void 0===e?void 0:e.get('DomComponents').getById(r))||null}},{key:"toCSS",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t='',n=this.getAtRule(),r=this.getDeclaration(e);return(r||e.allowEmpty)&&(t=r),n&&t&&(t="".concat(n,"{").concat(t,"}")),t}},{key:"toJSON",value:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];var r=w["Model"].prototype.toJSON.apply(this,t);if(this.em.getConfig('avoidDefaults')){var i=this.defaults();Object(s["forEach"])(i,(function(e,t){r[t]===e&&delete r[t]})),Object(s["isEmpty"])(r.selectors)&&delete r.selectors,Object(s["isEmpty"])(r.style)&&delete r.style}return r}},{key:"compare",value:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=t||'',o=n||'',a=r.selectorsAdd||'',l=r.atRuleType||'',c=Object(s["isArray"])(e)||e.models?e.models||e:[e];o&&!l&&(l='media');var u=c.map((function(e){return e.getFullName()})),f=this.get('selectors').map((function(e){return e.getFullName()})),d=u.slice().sort(),h=f.slice().sort();return!(u.length!==f.length||!d.every((function(e,t){return e===h[t]})))&&(this.get('state')===i&&this.get('mediaText')===o&&this.get('selectorsAdd')===a&&this.get('atRuleType')===l)}}]),n}(w["Model"].extend(x["a"])),T=O.a.Collection,A=T.extend({model:_,initialize:function(e,t){var n=this;t&&t.em&&(this.editor=t.em),setTimeout((function(){n.on('remove',n.onRemove),n.on('add',n.onAdd)}))},toJSON:function(e){return T.prototype.toJSON.call(this,e).filter((function(e){return e.style}))},onAdd:function(e,t,n){e.ensureSelectors(e,t,n)},onRemove:function(e){var t=this.editor;t.stopListening(e),t.get('UndoManager').remove(e)},add:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return'string'==typeof e&&(e=this.editor.get('Parser').parseCss(e)),t.em=this.editor,T.prototype.add.apply(this,[e,t])}}),M=n(88),D=n(36);function L(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function N(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?L(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):L(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n,r={};return{Selectors:k["a"],name:'CssComposer',getConfig:function(){return r},storageKey:function(){var e=[],t=r.stm&&r.stm.getConfig()||{};return t.storeCss&&e.push('css'),t.storeStyles&&e.push('styles'),e},init:function(n){for(var i in r=n||{},c)i in r||(r[i]=c[i]);var o=r.pStylePrefix;o&&(r.stylePrefix=o+r.stylePrefix);var a=r.em&&r.em.config.style||'';return r.rules=a||r.rules,e=r.em,t=new A([],r),this},onLoad:function(){t.add(r.rules,{silent:1})},postLoad:function(){var t=e&&e.get('UndoManager');t&&t.add(this.getAll())},load:function(e){var n=e||'';!n&&r.stm&&(n=r.em.getCacheLoad());var i=n.styles||'';if(n.styles)try{i=JSON.parse(n.styles)}catch(e){}else n.css&&(i=r.em.get('Parser').parseCss(n.css));return Object(s["isArray"])(i)?i.length&&t.reset(i):i&&t.reset(i),i},store:function(n){if(r.stm){var i={},o=this.storageKey(),a=e&&e.get('hasPages');return o.indexOf('css')>=0&&!a&&(i.css=r.em.getCss()),o.indexOf('styles')>=0&&(i.styles=JSON.stringify(t)),n||r.stm.store(i),i}},add:function(e,n,i){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},a=arguments.length>4&&void 0!==arguments[4]?arguments[4]:{},s=n||'',l=i||'',c=N({},o),u=this.get(e,s,l,c);return u&&u.config&&!u.config.singleAtRule||(c.state=s,c.mediaText=l,c.selectors=[],l&&(c.atRuleType='media'),(u=new _(c,r)).get('selectors').add(e,a),t.add(u,a)),u},get:function(n,r,i,o){var a=n;if(Object(s["isString"])(n)){var l=e.get('SelectorManager'),c=n.split(',')[0].trim(),u=e.get('Parser').parserCss.checkNode({selectors:c})[0];a=l.get(u.selectors)}return t.find((function(e){return e.compare(a,r,i,o)}))||null},getAll:function(){return t},addCollection:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=[];Object(s["isString"])(t)&&(t=e.get('Parser').parseCss(t));for(var a=t instanceof Array?t:[t],c=0,u=a.length;c<u;c++){var f=a[c]||{};if(f.selectors){var d=r.em&&r.em.get('SelectorManager');d||console.warn('Selector Manager not found');for(var h=f.selectors,p=h instanceof Array?h:[h],g=[],v=0,m=p.length;v<m;v++){var y=d.add(p[v]);g.push(y)}var b=this.get(g,f.state,f.mediaText,f),w=this.add(g,f.state,f.mediaText,f,n),O=!b||!n.avoidUpdateStyle,x=f.style||{};if(Object(l["isObject"])(i)&&w.set(i,n),O){var k=n.extend?N(N({},w.get('style')),x):x;w.set('style',k,n)}o.push(w)}}return o},addRules:function(e){return this.addCollection(e)},setRule:function(t,n){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.atRuleType,o=r.atRuleParams,a=e.get('Parser').parserCss.checkNode({selectors:t,style:n})[0],s=a.state,l=a.selectorsAdd,c=e.get('SelectorManager'),u=c.add(a.selectors),f=this.add(u,s,o,{selectorsAdd:l,atRule:i});return f.setStyle(n,r),f},getRule:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.get('SelectorManager'),i=e.get('Parser').parserCss.checkNode({selectors:t})[0],o=r.get(i.selectors),a=i.state,s=i.selectorsAdd,l=n.atRuleType,c=n.atRuleParams;return o&&this.get(o,a,c,{selectorsAdd:s,atRule:l})},getRules:function(e){var t=this.getAll();if(!e)return i()(t.models);var n=Object(s["isString"])(e)?e.split(',').map((function(e){return e.trim()})):e;return t.filter((function(e){return n.indexOf(e.getSelectors().getFullString())>=0}))},setIdRule:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.addOpts,o=void 0===i?{}:i,a=r.mediaText,l=r.state||'',c=Object(s["isUndefined"])(a)?e.getCurrentMedia():a,u=e.get('SelectorManager'),f=u.add({name:t,type:D["a"].TYPE_ID},o),d=this.add(f,l,c,{},o);return d.setStyle(n,N(N({},r),o)),d},getIdRule:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.mediaText,i=n.state||'',o=Object(s["isUndefined"])(r)?e.getCurrentMedia():r,a=e.get('SelectorManager').get(t,D["a"].TYPE_ID);return a&&this.get(a,i,o)},setClassRule:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=r.state||'',o=r.mediaText||e.getCurrentMedia(),a=e.get('SelectorManager'),s=a.add({name:t,type:D["a"].TYPE_CLASS}),l=this.add(s,i,o);return l.setStyle(n,r),l},getClassRule:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.state||'',i=n.mediaText||e.getCurrentMedia(),o=e.get('SelectorManager').get(t,D["a"].TYPE_CLASS);return o&&this.get(o,r,i)},remove:function(e,t){var n=Object(s["isString"])(e)?this.getRules(e):e,r=this.getAll().remove(n,t);return Object(s["isArray"])(r)?r:[r]},clear:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.getAll().reset(null,e),this},getComponentRules:function(t){var n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.state,i=n.mediaText,o=n.current;o&&(r=e.get('state')||'',i=e.getCurrentMedia());var a=t.getId(),l=this.getAll().filter((function(e){if((Object(s["isUndefined"])(r)||e.get('state')===r)&&(Object(s["isUndefined"])(i)||e.get('mediaText')===i))return e.getSelectorsString()==="#".concat(a)}));return l},render:function(){return n&&n.remove(),(n=new M["a"]({collection:t,config:r})).render().el},destroy:function(){t.reset(),t.stopListening(),n&&n.remove(),[e,t,n].forEach((function(e){return null})),r={}}}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(52),a=n(4),s=n.n(a),l=n(0),c=n(1),u=n(32),f=n(51),d=n(6);function h(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function p(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?h(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):h(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var g=s.a.$,v=function(){},m=s.a.View.extend({initialize:function(e){this.opt=e||{},Object(l["bindAll"])(this,'startSort','onMove','endMove','rollback','updateOffset','moveDragHelper');var t=e||{};this.elT=0,this.elL=0,this.borderOffset=t.borderOffset||10;var n=t.container;this.el='string'==typeof n?document.querySelector(n):n,this.$el=g(this.el),this.containerSel=t.containerSel||'div',this.itemSel=t.itemSel||'div',this.draggable=t.draggable||!0,this.nested=t.nested||0,this.pfx=t.pfx||'',this.ppfx=t.ppfx||'',this.freezeClass=t.freezeClass||this.pfx+'freezed',this.onStart=t.onStart||v,this.onEndMove=t.onEndMove||'',this.customTarget=t.customTarget,this.onEnd=t.onEnd,this.direction=t.direction||'v',this.onMoveClb=t.onMove||'',this.relative=t.relative||0,this.ignoreViewChildren=t.ignoreViewChildren||0,this.ignoreModels=t.ignoreModels||0,this.plh=t.placer||'',this.wmargin=t.wmargin||0,this.offTop=t.offsetTop||0,this.offLeft=t.offsetLeft||0,this.document=t.document||document,this.$document=g(this.document),this.dropContent=null,this.em=t.em||null,this.dragHelper=null,this.canvasRelative=t.canvasRelative||0,this.selectOnEnd=!t.avoidSelectOnEnd,this.scale=t.scale,this.activeTextModel=null,this.em&&this.em.on&&(this.em.on('change:canvasOffset',this.updateOffset),this.updateOffset())},getScale:function(){return Object(l["result"])(this,scale)||1},getContainerEl:function(e){if(e&&(this.el=e),!this.el){var t=this.opt.container;this.el='string'==typeof t?document.querySelector(t):t,this.$el=g(this.el)}return this.el},getDocuments:function(e){var t=this.em,n=e?e.ownerDocument:t&&t.get('Canvas').getBody().ownerDocument,r=[document];return n&&r.push(n),r},updateOffset:function(){var e,t=(null===(e=this.em)||void 0===e?void 0:e.get('canvasOffset'))||{};this.offTop=t.top,this.offLeft=t.left},setDropContent:function(e){this.dropModel=null,this.dropContent=e},updateTextViewCursorPosition:function(e){var t=this.em;if(t){var n=t.get('Canvas'),r=n.getDocument(),i=null;if(r.caretRangeFromPoint){var o=Object(c["getPointerEvent"])(e);i=r.caretRangeFromPoint(o.clientX,o.clientY)}else e.rangeParent&&(i=r.createRange()).setStart(e.rangeParent,e.rangeOffset);var a=n.getWindow().getSelection();n.getFrameEl().focus(),a.removeAllRanges(),i&&a.addRange(i),this.setContentEditable(this.activeTextModel,!0)}},setContentEditable:function(e,t){if(e){var n=e.getEl();n.contentEditable!=t&&(n.contentEditable=t)}},toggleSortCursor:function(e){var t=this.em,n=t&&t.get('Canvas');n&&(e?n.startAutoscroll():n.stopAutoscroll())},setDragHelper:function(e,t){for(var n=t||'',r=e.cloneNode(1),i=e.getBoundingClientRect(),o=getComputedStyle(e),a='',s=0;s<o.length;s++){var l=o[s];a+="".concat(l,":").concat(o.getPropertyValue(l),";")}document.body.appendChild(r),r.className+=" ".concat(this.pfx,"bdrag"),r.setAttribute('style',a),this.dragHelper=r,r.style.width="".concat(i.width,"px"),r.style.height="".concat(i.height,"px"),n&&this.moveDragHelper(n),this.em&&g(this.em.get('Canvas').getBody().ownerDocument).off('mousemove',this.moveDragHelper).on('mousemove',this.moveDragHelper),g(document).off('mousemove',this.moveDragHelper).on('mousemove',this.moveDragHelper)},moveDragHelper:function(e){var t=e.target.ownerDocument;if(this.dragHelper&&t){var n=e.pageY,r=e.pageX,i=0,o=0,a=(t.defaultView||t.parentWindow).frameElement,s=this.dragHelper.style;if(a){var l=a.getBoundingClientRect();i=l.top+document.documentElement.scrollTop,o=l.left+document.documentElement.scrollLeft,n=e.clientY,r=e.clientX}s.top=n+i+'px',s.left=r+o+'px'}},matches:function(e,t,n){return c["matches"].call(e,t)},closest:function(e,t){if(e){for(var n=e.parentNode;n&&1===n.nodeType;){if(this.matches(n,t))return n;n=n.parentNode}return null}},offset:function(e){var t=e.getBoundingClientRect();return{top:t.top+document.body.scrollTop,left:t.left+document.body.scrollLeft}},createPlaceholder:function(){var e=this.pfx,t=document.createElement('div'),n=document.createElement('div');return t.className=e+'placeholder',t.style.display='none',t.style['pointer-events']='none',n.className=e+'placeholder-int',t.appendChild(n),t},startSort:function(e){var t,n,r,i,o,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},s=this.em,l=this.itemSel,u=this.containerSel,f=this.plh,d=this.getContainerEl(a.container),h=this.getDocuments(e);this.dropModel=null,this.target=null,this.prevTarget=null,this.moved=0,e&&!this.matches(e,"".concat(l,", ").concat(u))&&(e=this.closest(e,l)),this.sourceEl=e,f||(this.plh=this.createPlaceholder(),d.appendChild(this.plh)),e&&((o=this.getSourceModel(e))&&o.set&&o.set('status','freezed'),this.srcModel=o),Object(c["on"])(d,'mousemove dragover',this.onMove),Object(c["on"])(h,'mouseup dragend touchend',this.endMove),Object(c["on"])(h,'keydown',this.rollback),this.onStart({sorter:this,target:o,parent:o&&(null===(t=(n=o).parent)||void 0===t?void 0:t.call(n)),index:o&&(null===(r=(i=o).index)||void 0===r?void 0:r.call(i))}),null==s||s.clearSelection(),this.toggleSortCursor(1),null==s||s.trigger('sorter:drag:start',e,o)},getTargetModel:function(e){var t=e||this.target;return g(t).data('model')},getSourceModel:function(e){var t=this,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=n.target,i=n.avoidChildren,o=void 0===i?1:i,a=this.em,s=this.sourceEl,l=e||s,c=this.dropModel,u=this.dropContent,f=function(e){return e&&r&&e.opt&&e.opt.avoidChildren&&t.isTextableActive(e,r)};if(u&&a){if(f(c)&&(c=null),!c){var d=a.get('DomComponents').getComponents(),h={avoidChildren:o,avoidStore:1,avoidUpdateStyle:1},v=d.add(u,p(p({},h),{},{temporary:1}));if(c=(c=d.remove(v,h))instanceof Array?c[0]:c,this.dropModel=c,f(c))return this.getSourceModel(l,{target:r,avoidChildren:0})}return c}return l&&g(l).data('model')},selectTargetModel:function(e,t){if(!(e instanceof s.a.Collection||t&&t===e)){var n=this.targetModel;n&&n!==this.srcModel&&n.set('status',''),e&&e.set&&(e.set('status','selected-parent'),this.targetModel=e)}},onMove:function(e){var t=e,n=this.em,r=this.onMoveClb,i=this.plh,o=this.customTarget;this.moved=1;var a=i.style.display;a&&'none'!==a||(i.style.display='block');var s=this.offset(this.el);this.elT=this.wmargin?Math.abs(s.top):s.top,this.elL=this.wmargin?Math.abs(s.left):s.left;var c=e.pageY-this.elT+this.el.scrollTop,u=e.pageX-this.elL+this.el.scrollLeft;if(this.canvasRelative&&n){var f=n.get('Canvas').getMouseRelativeCanvas(e,{noScroll:1});u=f.x,c=f.y}this.rX=u,this.rY=c,this.eventMove=e;var d=this.getSourceModel(),h=o?o({sorter:this,event:e}):e.target,p=this.dimsFromTarget(h,u,c),v=this.target,m=v&&this.getTargetModel(v);if(this.selectTargetModel(m,d),m||(i.style.display='none'),v){this.lastDims=p;var y=this.findPosition(p,u,c);this.isTextableActive(d,m)?(this.activeTextModel=m,i.style.display='none',this.lastPos=y,this.updateTextViewCursorPosition(t)):(this.disableTextable(),this.activeTextModel=null,this.lastPos&&this.lastPos.index==y.index&&this.lastPos.method==y.method||(this.movePlaceholder(this.plh,p,y,this.prevTargetDim),this.$plh||(this.$plh=g(this.plh)),this.canvasRelative||(this.offTop&&this.$plh.css('top','+='+this.offTop+'px'),this.offLeft&&this.$plh.css('left','+='+this.offLeft+'px')),this.lastPos=y)),Object(l["isFunction"])(r)&&r({event:e,target:d,parent:m,index:y.index+('after'==y.method?1:0)}),n&&n.trigger('sorter:drag',{target:v,targetModel:m,sourceModel:d,dims:p,pos:y,x:u,y:c})}},isTextableActive:function(e,t){return e&&e.get&&e.get('textable')&&t&&t.is('text')},disableTextable:function(){var e=this.activeTextModel;e&&e.getView().disableEditing(),this.setContentEditable(e,!1)},isInFlow:function(e,t){if(!e)return!1;t=t||document.body;var n=e;return n.offsetHeight,!!this.styleInFlow(n,t)},styleInFlow:function(e,t){if(!Object(c["isTextNode"])(e)){var n=e.style||{},r=g(e),i=t&&g(t);if(!n.overflow||'visible'===n.overflow){var o=r.css('float');if(!(o&&'none'!==o||i&&'flex'==i.css('display')&&'column'!==i.css('flex-direction'))){switch(n.position){case'static':case'relative':case'':break;default:return}switch(e.tagName){case'TR':case'TBODY':case'THEAD':case'TFOOT':return!0}switch(r.css('display')){case'block':case'list-item':case'table':case'flex':return!0}}}}},validTarget:function(e,t){var n=this.getTargetModel(e),r=this.getSourceModel(t,{target:n}),i={valid:!0,src:t=r&&r.view&&r.view.el,srcModel:r,trg:e=n&&n.view&&n.view.el,trgModel:n};if(!t||!e)return i.valid=!1,i;var o=r.get('draggable');if(Object(l["isFunction"])(o)){var a=o(r,n);i.dragInfo=a,i.draggable=a,o=a}else o=o instanceof Array?o.join(', '):o,i.dragInfo=o,o=Object(l["isString"])(o)?this.matches(e,o):o,i.draggable=o;var c=n.get('droppable');if(Object(l["isFunction"])(c)){var u=c(r,n);i.droppable=u,i.dropInfo=u,c=u}else c=(c=c instanceof s.a.Collection?1:c)instanceof Array?c.join(', '):c,i.dropInfo=c,c=Object(l["isString"])(c)?this.matches(t,c):c,c=o&&this.isTextableActive(r,n)?1:c,i.droppable=c;return c&&o||(i.valid=!1),i},dimsFromTarget:function(e,t,n){var r=this.em,i=[];if(!e)return i;if(this.matches(e,"".concat(this.itemSel,", ").concat(this.containerSel))||(e=this.closest(e,this.itemSel)),this.draggable instanceof Array&&(e=this.closest(e,this.draggable.join(','))),!e)return i;if(this.prevTarget&&this.prevTarget!=e&&(this.prevTarget=null),!this.prevTarget){this.targetP=this.closest(e,this.containerSel);var o=this.validTarget(e);if(r&&r.trigger('sorter:drag:validation',o),!o.valid&&this.targetP)return this.dimsFromTarget(this.targetP,t,n);this.prevTarget=e,this.prevTargetDim=this.getDim(e),this.cacheDimsP=this.getChildrenDim(this.targetP),this.cacheDims=this.getChildrenDim(e)}if(this.prevTarget==e&&(i=this.cacheDims),this.target=this.prevTarget,this.nearBorders(this.prevTargetDim,t,n)||!this.nested&&!this.cacheDims.length){var a=this.targetP;a&&this.validTarget(a).valid&&(i=this.cacheDimsP,this.target=a)}return this.lastPos=null,i},getTargetFromEl:function(e){var t,n=e,r=this.targetPrev,i=this.em,o=this.containerSel,a=this.itemSel;if(this.matches(n,"".concat(a,", ").concat(o))||(n=this.closest(n,a)),this.draggable instanceof Array&&(n=this.closest(n,this.draggable.join(','))),r&&r!=n&&(this.targetPrev=''),!this.targetPrev){t=this.closest(n,o);var s=this.validTarget(n);if(i&&i.trigger('sorter:drag:validation',s),!s.valid&&t)return this.getTargetFromEl(t);this.targetPrev=n}return this.nearElBorders(n)&&(t=this.closest(n,o))&&this.validTarget(t).valid&&(n=t),n},nearElBorders:function(e){var t=10,n=e.getBoundingClientRect(),r=e.ownerDocument.body,i=this.getCurrentPos(),o=i.x,a=i.y,s=n.top+r.scrollTop,l=n.left+r.scrollLeft,c=n.width,u=n.height;if(a<s+t||a>s+u-t||o<l+t||o>l+c-t)return 1},getCurrentPos:function(){var e=this.eventMove;return{x:e.pageX||0,y:e.pageY||0}},getDim:function(e){var t,n,r,i,o=this.em,a=this.canvasRelative,s=o&&o.get('Canvas'),l=s?s.getElementOffsets(e):{};if(a&&o){var c=s.getElementPos(e,{noScroll:1});t=c.top,n=c.left,r=c.height,i=c.width}else{var u=this.offset(e);t=this.relative?e.offsetTop:u.top-(this.wmargin?-1:1)*this.elT,n=this.relative?e.offsetLeft:u.left-(this.wmargin?-1:1)*this.elL,r=e.offsetHeight,i=e.offsetWidth}return{top:t,left:n,height:r,width:i,offsets:l}},getChildrenDim:function(e){var t=this,n=[];if(!e)return n;var r=this.getTargetModel(e);if(r&&r.view&&!this.ignoreViewChildren){var i=r.getCurrentView?r.getCurrentView():r.view;e=i.getChildrenContainer()}return Object(l["each"])(e.children,(function(r,i){var o=Object(c["getModel"])(r,g),a=o&&o.index?o.index():i;if(Object(c["isTextNode"])(r)||t.matches(r,t.itemSel)){var s=t.getDim(r),l=t.direction;l='v'==l||'h'!=l&&t.isInFlow(r,e),s.dir=l,s.el=r,s.indexEl=a,n.push(s)}})),n},nearBorders:function(e,t,n){var r=0,i=this.borderOffset,o=t||0,a=n||0,s=e.top,l=e.left,c=e.height,u=e.width;return(s+i>a||a>s+c-i||l+i>o||o>l+u-i)&&(r=1),!!r},findPosition:function(e,t,n){for(var r={index:0,indexEl:0,method:'before'},i=0,o=0,a=0,s=0,l=0,c=0,u=0,f=0,d=e.length;f<d;f++){var h=u=e[f],p=h.top,g=h.left,v=h.height,m=h.width;if(c=p+v,s=g+m/2,l=p+v/2,!(o&&g>o||a&&l>=a||i&&g+m<i))if(r.index=f,r.indexEl=u.indexEl,u.dir){if(n<l){r.method='before';break}r.method='after'}else n<c&&(a=c),t<s?(o=s,r.method='before'):(i=s,r.method='after')}return r},movePlaceholder:function(e,t,n,r){var i=0,o=0,a=0,s=0,l=0,c='px',u=5,f=n.method,d=t[n.index];if(e.classList.remove('vertical'),e.classList.add('horizontal'),d){var h=d.top,p=d.left,g=d.height,v=d.width;d.dir?(s=v+c,l='auto',o='before'==f?h-i:h+g-i,a=p):(s='auto',l=g-2*i+c,o=h+i,a='before'==f?p-i:p+v-i,e.classList.remove('horizontal'),e.classList.add('vertical'))}else{if(!this.nested)return void(e.style.display='none');if(r){var m=r.offsets||{},y=m.paddingTop||u,b=m.paddingLeft||u;o=r.top+y,a=r.left+b,s=parseInt(r.width)-2*b+c,l='auto'}}e.style.top=o+c,e.style.left=a+c,s&&(e.style.width=s),l&&(e.style.height=l)},endMove:function(e){var t,n=this,r=this.sourceEl,i=[],o=this.getDocuments(),a=this.getContainerEl(),s=this.onEndMove,u=this.onEnd,f=this.target,d=this.lastPos;if(Object(c["off"])(a,'mousemove dragover',this.onMove),Object(c["off"])(o,'mouseup dragend touchend',this.endMove),Object(c["off"])(o,'keydown',this.rollback),this.plh.style.display='none',r&&(t=this.getSourceModel(),this.selectOnEnd&&t&&t.set&&(t.set('status',''),t.set('status','selected'))),this.moved&&f){var h=this.toMove;(Object(l["isArray"])(h)?h:h?[h]:[r]).forEach((function(e){i.push(n.move(f,e,d))}))}this.plh&&(this.plh.style.display='none');var g=this.dragHelper;if(g&&(g.parentNode.removeChild(g),this.dragHelper=null),this.disableTextable(),this.selectTargetModel(),this.toggleSortCursor(),this.toMove=null,this.eventMove=0,this.dropModel=null,Object(l["isFunction"])(s)){var v={target:t,parent:t&&t.parent(),index:t&&t.index()};i.length?i.forEach((function(e){return s(e,n,v)})):s(null,this,p(p({},v),{},{cancelled:1}))}Object(l["isFunction"])(u)&&u({sorter:this})},myMove:function(e,t){var n,r,i,o=this.em.get('DomComponents'),a=this.em,s=this.dropContent,f=e.dst,d=e.src,h=e.pos,p=this.getTargetModel(f),v=d?o.getById(e.srcId):null,m=e.draggable,y=e.droppable,b=Object(c["getElement"])(d),w=[],O='after'===h.method?h.indexEl+1:h.indexEl;if(v&&(v.set('status',''),v.set('status','selected')),v||'move-component'!==t){var x=g(this.document.getElementById(e.dstId)).data('collection');if(x&&y&&m){var k={at:O,action:'move-component'},C=this.isTextableActive(v,p);if(s)r=Object(l["isFunction"])(s)?s():s,k.avoidUpdateStyle=!0,k.action='add-component';else{var S=v.collection.indexOf(v),j=x===v.collection;(!j||!(S===O||S===O-1)||C)&&(r=v.collection.remove(v,{temporary:!0}),j&&O>S&&(k.at=O-1))}r&&(C?(delete k.at,i=p.getView().insertComponent(r,k)):i=x.add(r,k)),i&&e.idArray&&Object(u["e"])(i,e.idArray),this.dropContent=null,this.prevTarget=null}else if(a){var E=e.dropInfo||(null==p?void 0:p.get('droppable')),P=e.dragInfo||(null==v?void 0:v.get('draggable'));!x&&w.push('Target collection not found'),!y&&E&&w.push("Target is not droppable, accepts [".concat(E,"]")),!m&&P&&w.push("Component not draggable, acceptable by [".concat(P,"]")),a.logWarning('Invalid target position',{errors:w,model:v,context:'sorter',target:p})}return null==a||a.trigger('sorter:drag:end',{targetCollection:x,modelToDrop:r,warns:w,validResult:n,dst:f,srcEl:b}),i}},myTextMove:function(e,t){var n,r,i,o=this.em.get('DomComponents'),a=this.em,s=this.dropContent,f=e.dst,h=e.src,p=e.pos,v=this.getTargetModel(f),m=h?o.getById(e.srcId):null,y=e.draggable,b=e.droppable,w=Object(c["getElement"])(h),O=[],x='after'===p.method?p.indexEl+1:p.indexEl;if(m&&(m.set('status',''),m.set('status','selected')),m||'move-component'!==t){var k=g(this.document.getElementById(e.dstId)).data('collection');if(k&&b&&y){var C={at:x,action:'move-component'},S=this.isTextableActive(m,v);if(s)r=Object(l["isFunction"])(s)?s():s,C.avoidUpdateStyle=!0,C.action='add-component';else{var j=m.collection.indexOf(m),E=k===m.collection;(!E||!(j===x||j===x-1)||S)&&(r=m.collection.remove(m,{temporary:!0}),E&&x>j&&(C.at=x-1))}r&&(S?(delete C.at,i=v.getView().insertComponent(r,C)):i=k.add(r,C)),i&&e.idArray&&Object(u["e"])(i,e.idArray),this.dropContent=null,this.prevTarget=null}else if(a){var P=e.dropInfo||(null==v?void 0:v.get('droppable')),_=e.dragInfo||(null==m?void 0:m.get('draggable'));!k&&O.push('Target collection not found'),!b&&P&&O.push("Target is not droppable, accepts [".concat(P,"]")),!y&&_&&O.push("Component not draggable, acceptable by [".concat(_,"]")),a.logWarning('Invalid target position',{errors:O,model:m,context:'sorter',target:v})}null==a||a.trigger('sorter:drag:end',{targetCollection:k,modelToDrop:r,warns:O,validResult:n,dst:f,srcEl:w});var T={},A=document.createElement('div');A.appendChild(f.cloneNode());var M=A.innerHTML;return e.idArray=[],e.dst=M,T.opts=e,T.action='add-component','add-component'!=T.action||e.dropContent?(d["c"]==d["d"].Synced?(Object(d["h"])(d["d"].ApplyingLocalOp),Object(d["b"])(T)):d["c"]!=d["d"].AwaitingACK&&d["c"]!=d["d"].AwaitingWithBuffer||(Object(d["h"])(d["d"].ApplyingBufferedLocalOp),Object(d["a"])(T)),i):null}},move:function(e,t,n){var r,i,o=this.em,a=this.dropContent,h=Object(c["getElement"])(t),p=[],v='after'===n.method?n.indexEl+1:n.indexEl,m=this.validTarget(e,h),y=m.trgModel,b=m.srcModel,w=m.draggable,O=g(e).data('collection'),x=y instanceof s.a.Collection?1:m.droppable,k=document.createElement('div');k.appendChild(e.cloneNode());var C,S={},j={dst:k.innerHTML,dstId:e.id,src:t,srcId:t?t.getId():null,srcParentId:t?t.parent().getId():null,srcIndex:t?t.collection.indexOf(t):null,pos:n,dropContent:Object(f["a"])(Object(f["b"])(a)),draggable:w,droppable:x,dragInfo:m.dragInfo,dropInfo:m.dropInfo};if(O&&x&&w){var E={at:v,action:'move-component'},P=this.isTextableActive(b,y);if(a)r=Object(l["isFunction"])(a)?a():a,E.avoidUpdateStyle=!0,E.action='add-component';else{var _=b.collection.indexOf(b),T=O===b.collection;(!T||!(_===v||_===v-1)||P)&&(r=b.collection.remove(b,{temporary:!0}),T&&v>_&&(E.at=v-1))}if(r&&(P?(delete E.at,i=y.getView().insertComponent(r,E)):i=O.add(r,E)),i&&(Object(u["d"])(i),C=Object(u["c"])(i)),this.dropContent=null,this.prevTarget=null,j.idArray=C,S.opts=j,S.action=t?'move-component':'add-component','add-component'==S.action&&!j.dropContent)return null;d["c"]==d["d"].Synced?(Object(d["h"])(d["d"].ApplyingLocalOp),Object(d["b"])(S)):d["c"]!=d["d"].AwaitingACK&&d["c"]!=d["d"].AwaitingWithBuffer||(Object(d["h"])(d["d"].ApplyingBufferedLocalOp),Object(d["a"])(S))}else if(o){var A=m.dropInfo||(null==y?void 0:y.get('droppable')),M=m.dragInfo||(null==b?void 0:b.get('draggable'));!O&&p.push('Target collection not found'),!x&&A&&p.push("Target is not droppable, accepts [".concat(A,"]")),!w&&M&&p.push("Component not draggable, acceptable by [".concat(M,"]")),o.logWarning('Invalid target position',{errors:p,model:b,context:'sorter',target:y})}return null==o||o.trigger('sorter:drag:end',{targetCollection:O,modelToDrop:r,warns:p,validResult:m,dst:e,srcEl:h}),i},rollback:function(e){Object(c["off"])(this.getDocuments(),'keydown',this.rollback),27==(e.which||e.keyCode)&&(this.moved=0,this.endMove())}}),y=n(8),b=n.n(y),w=n(9),O=n.n(w);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function k(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?x(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var C={mousePosFetcher:null,updateTarget:null,ratioDefault:0,posFetcher:null,onStart:null,onMove:null,onEnd:null,onUpdateContainer:function(){},step:1,minDim:10,maxDim:'',unitHeight:'px',unitWidth:'px',keyHeight:'height',keyWidth:'width',currentUnit:1,silentFrames:0,avoidContainerUpdate:0,keepAutoHeight:!1,keepAutoWidth:!1,autoHeight:!1,autoWidth:!1,tl:1,tc:1,tr:1,cl:1,cr:1,bl:1,bc:1,br:1},S=function(e,t){var n=t||window,r=e.getBoundingClientRect();return{left:r.left+n.pageXOffset,top:r.top+n.pageYOffset,width:r.width,height:r.height}},j=function(){function e(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return b()(this,e),this.setOptions(t),Object(l["bindAll"])(this,'handleKeyDown','handleMouseDown','move','stop'),this}return O()(e,[{key:"getConfig",value:function(){return this.opts}},{key:"setOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.opts=Object(l["defaults"])(e,C),this.setup()}},{key:"setup",value:function(){var e=this.opts,t=e.prefix||'',n=e.appendTo||document.body,r=this.container;for(r||((r=document.createElement('div')).className="".concat(t,"resizer-c"),n.appendChild(r),this.container=r);r.firstChild;)r.removeChild(r.firstChild);var i={};for(var o in['tl','tc','tr','cl','cr','bl','bc','br'].forEach((function(t){return i[t]=e[t]?function(e,t){var n=t.prefix||'',r=document.createElement('i');return r.className=n+'resizer-h '+n+'resizer-h-'+e,r.setAttribute('data-'+n+'handler',e),r}(t,e):''})),i){var a=i[o];a&&r.appendChild(a)}this.handlers=i,this.mousePosFetcher=e.mousePosFetcher,this.updateTarget=e.updateTarget,this.posFetcher=e.posFetcher,this.onStart=e.onStart,this.onMove=e.onMove,this.onEnd=e.onEnd,this.onUpdateContainer=e.onUpdateContainer}},{key:"toggleFrames",value:function(e){if(this.opts.silentFrames){var t=document.querySelectorAll('iframe');Object(l["each"])(t,(function(t){return t.style.pointerEvents=e?'none':''}))}}},{key:"isHandler",value:function(e){var t=this.handlers;for(var n in t)if(t[n]===e)return!0;return!1}},{key:"getFocusedEl",value:function(){return this.el}},{key:"getParentEl",value:function(){return this.el.parentElement}},{key:"getDocumentEl",value:function(){return[this.el.ownerDocument,document]}},{key:"getElementPos",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.posFetcher||'';return n?n(e,t):S(e)}},{key:"focus",value:function(e){e&&e===this.el||(this.el=e,this.updateContainer({forceShow:1}),Object(c["on"])(this.getDocumentEl(),'mousedown',this.handleMouseDown))}},{key:"blur",value:function(){this.container.style.display='none',this.el&&(Object(c["off"])(this.getDocumentEl(),'mousedown',this.handleMouseDown),this.el=null)}},{key:"start",value:function(e){if(0===e.button){e.preventDefault(),e.stopPropagation();var t=this.el,n=this.getParentEl(),r=this.opts||{},i='data-'+r.prefix+'handler',o=this.getElementPos(t,{target:'el'}),a=this.getElementPos(n);this.handlerAttr=e.target.getAttribute(i),this.clickedHandler=e.target,this.startDim={t:o.top,l:o.left,w:o.width,h:o.height},this.rectDim={t:o.top,l:o.left,w:o.width,h:o.height},this.startPos={x:e.clientX,y:e.clientY},this.parentDim={t:a.top,l:a.left,w:a.width,h:a.height};var s=this.getDocumentEl();Object(c["on"])(s,'mousemove',this.move),Object(c["on"])(s,'keydown',this.handleKeyDown),Object(c["on"])(s,'mouseup',this.stop),Object(l["isFunction"])(this.onStart)&&this.onStart(e,{docs:s,config:r,el:t,resizer:this}),this.toggleFrames(1),this.move(e)}}},{key:"move",value:function(e){var t=this.onMove,n=this.mousePosFetcher,r=n?n(e):{x:e.clientX,y:e.clientY};this.currentPos=r,this.delta={x:r.x-this.startPos.x,y:r.y-this.startPos.y},this.keys={shift:e.shiftKey,ctrl:e.ctrlKey,alt:e.altKey},this.rectDim=this.calc(this),this.updateRect(0),t&&t(e),0===e.which&&this.stop(e)}},{key:"stop",value:function(e){var t=this.opts,n=this.getDocumentEl();Object(c["off"])(n,'mousemove',this.move),Object(c["off"])(n,'keydown',this.handleKeyDown),Object(c["off"])(n,'mouseup',this.stop),this.updateRect(1),this.toggleFrames(),Object(l["isFunction"])(this.onEnd)&&this.onEnd(e,{docs:n,config:t})}},{key:"updateRect",value:function(e){var t=this.el,n=this.opts,r=this.rectDim,i=this.updateTarget,o=this.getSelectedHandler(),a=n.unitHeight,s=n.unitWidth,c=n.keyWidth,u=n.keyHeight,f=t.getAttribute('id');if(Object(l["isFunction"])(i))i(t,r,{store:e,selectedHandler:o,resizer:this,config:n,id:f});else{var d=t.style;d[c]=r.w+s,d[u]=r.h+a}this.updateContainer()}},{key:"updateContainer",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=this.opts,n=this.container,r=this.el,i=n.style;!t.avoidContainerUpdate&&r&&e.forceShow&&(i.display='block'),this.onUpdateContainer({el:n,resizer:this,opts:k(k({},t),e)})}},{key:"getSelectedHandler",value:function(){var e=this.handlers;if(this.selectedHandler)for(var t in e)if(e[t]===this.selectedHandler)return t}},{key:"handleKeyDown",value:function(e){27===e.keyCode&&(this.rectDim=this.startDim,this.stop(e))}},{key:"handleMouseDown",value:function(e){var t=e.target;this.isHandler(t)?(this.selectedHandler=t,this.start(e)):t!==this.el&&(this.selectedHandler='',this.blur())}},{key:"calc",value:function(e){var t,n=this.opts||{},r=n.step,i=this.startDim,o=n.minDim,a=n.maxDim,s=e.delta.x,l=e.delta.y,u=this.parentDim.w,f=this.parentDim.h,d=this.opts.unitWidth,h=this.opts.unitHeight,p='%'===d?i.w/100*u:i.w,g='%'===h?i.h/100*f:i.h,v={t:0,l:0,w:p,h:g};if(e){var m=e.handlerAttr;~m.indexOf('r')&&(t='%'===d?Object(c["normalizeFloat"])((p+s*r)/u*100,.01):Object(c["normalizeFloat"])(p+s*r,r),t=Math.max(o,t),a&&(t=Math.min(a,t)),v.w=t),~m.indexOf('b')&&(t='%'===h?Object(c["normalizeFloat"])((g+l*r)/f*100,.01):Object(c["normalizeFloat"])(g+l*r,r),t=Math.max(o,t),a&&(t=Math.min(a,t)),v.h=t),~m.indexOf('l')&&(t='%'===d?Object(c["normalizeFloat"])((p-s*r)/u*100,.01):Object(c["normalizeFloat"])(p-s*r,r),t=Math.max(o,t),a&&(t=Math.min(a,t)),v.w=t),~m.indexOf('t')&&(t='%'===h?Object(c["normalizeFloat"])((g-l*r)/f*100,.01):Object(c["normalizeFloat"])(g-l*r,r),t=Math.max(o,t),a&&(t=Math.min(a,t)),v.h=t);var y=n.ratioDefault?!e.keys.shift:e.keys.shift;if(m.indexOf('c')<0&&y){var b=i.w/i.h;v.w/v.h>b?v.h=Math.round(v.w/b):v.w=Math.round(v.h*b)}return~m.indexOf('l')&&(v.l=i.w-v.w),~m.indexOf('t')&&(v.t=i.h-v.h),v}}}]),e}(),E={init:function(e){return new j(e)}};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){return{name:'Utils',init:function(){return this},destroy:function(){},Sorter:m,Resizer:E,Dragger:o["a"],helpers:_({},c)}}},function(e,t,n){"use strict";n.r(t);var r=n(3),i=n.n(r),o=n(22),a=n.n(o),s=n(0),l=n(1),c={placeholder:'eg. Text here'},u={locale:'en',localeFallback:'en',detectLocale:!0,debug:!1,messages:{en:{assetManager:{addButton:'Add image',inputPlh:'http://path/to/the/image.jpg',modalTitle:'Select Image',uploadTitle:'Drop files here or click to upload'},blockManager:{labels:{},categories:{}},domComponents:{names:{'':'Box',wrapper:'Body',text:'Text',comment:'Comment',image:'Image',video:'Video',label:'Label',link:'Link',map:'Map',tfoot:'Table foot',tbody:'Table body',thead:'Table head',table:'Table',row:'Table row',cell:'Table cell'}},deviceManager:{device:'Device',devices:{desktop:'Desktop',tablet:'Tablet',mobileLandscape:'Mobile Landscape',mobilePortrait:'Mobile Portrait'}},panels:{buttons:{titles:{preview:'Preview',fullscreen:'Fullscreen','sw-visibility':'View components','export-template':'View code','open-sm':'Open Style Manager','open-tm':'Settings','open-layers':'Open Layer Manager','open-blocks':'Open Blocks'}}},selectorManager:{label:'Classes',selected:'Selected',emptyState:'- State -',states:{hover:'Hover',active:'Click','nth-of-type(2n)':'Even/Odd'}},styleManager:{empty:'Select an element before using Style Manager',layer:'Layer',fileButton:'Images',sectors:{general:'General',layout:'Layout',typography:'Typography',decorations:'Decorations',extra:'Extra',flex:'Flex',dimension:'Dimension'},properties:{'text-shadow-h':'X','text-shadow-v':'Y','text-shadow-blur':'Blur','text-shadow-color':'Color','box-shadow-h':'X','box-shadow-v':'Y','box-shadow-blur':'Blur','box-shadow-spread':'Spread','box-shadow-color':'Color','box-shadow-type':'Type','margin-top-sub':'Top','margin-right-sub':'Right','margin-bottom-sub':'Bottom','margin-left-sub':'Left','padding-top-sub':'Top','padding-right-sub':'Right','padding-bottom-sub':'Bottom','padding-left-sub':'Left','border-width-sub':'Width','border-style-sub':'Style','border-color-sub':'Color','border-top-left-radius-sub':'Top Left','border-top-right-radius-sub':'Top Right','border-bottom-right-radius-sub':'Bottom Right','border-bottom-left-radius-sub':'Bottom Left','transform-rotate-x':'Rotate X','transform-rotate-y':'Rotate Y','transform-rotate-z':'Rotate Z','transform-scale-x':'Scale X','transform-scale-y':'Scale Y','transform-scale-z':'Scale Z','transition-property-sub':'Property','transition-duration-sub':'Duration','transition-timing-function-sub':'Timing','background-image-sub':'Image','background-repeat-sub':'Repeat','background-position-sub':'Position','background-attachment-sub':'Attachment','background-size-sub':'Size'}},traitManager:{empty:'Select an element before using Trait Manager',label:'Component settings',traits:{labels:{},attributes:{id:c,alt:c,title:c,href:{placeholder:'eg. https://google.com'}},options:{target:{false:'This window',_blank:'New window'}}}}}},messagesAdd:null};function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){i()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=function(e){return!Array.isArray(e)&&null!==e&&'object'===a()(e)};t["default"]=function(){return{name:'I18n',config:u,init:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.config=d(d(d({},u),e),{},{messages:d(d({},u.messages),e.messages||{})});var t=this.config.messagesAdd;return t&&this.addMessages(t),this.config.detectLocale&&(this.config.locale=this._localLang()),this.em=e.em,this},getConfig:function(){return this.config},setLocale:function(e){var t=this.em,n=this.config,r={value:e,valuePrev:n.locale};return t&&t.trigger('i18n:locale',r),n.locale=e,this},getLocale:function(){return this.config.locale},getMessages:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config.messages;return e&&!n[e]&&this._debug("'".concat(e,"' i18n lang not found"),t),e?n[e]:n},setMessages:function(e){var t=this.em;return this.config.messages=e,t&&t.trigger('i18n:update',e),this},addMessages:function(e){var t=this.em,n=this.config.messages;return t&&t.trigger('i18n:add',e),this.setMessages(function e(){for(var t=d({},arguments.length<=0?void 0:arguments[0]),n=1;n<arguments.length;n++){var r=d({},n<0||arguments.length<=n?void 0:arguments[n]);for(var i in r){var o=t[i],a=r[i];h(o)&&h(a)?t[i]=e(o,a):t[i]=a}}return t}(n,e)),this},t:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.config,r=t.params||{},i=t.l||this.getLocale(),o=t.lFlb||n.localeFallback,a=this._getMsg(e,i,t);return a||(a=this._getMsg(e,o,t)),!a&&this._debug("'".concat(e,"' i18n key not found in '").concat(i,"' lang"),t),a=a&&Object(s["isString"])(a)?this._addParams(a,r):a},_localLang:function(){var e=Object(l["hasWin"])()&&window.navigator||{},t=e.language||e.userLanguage;return t?t.split('-')[0]:'en'},_addParams:function(e,t){var n=new RegExp("{([\\w\\d-]*)}",'g');return e.replace(n,(function(e,n){return t[n]||''})).trim()},_getMsg:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.getMessages(t,n);if(r){var i=r[e];return!i&&e.indexOf('.')>0&&(i=e.split('.').reduce((function(e,t){if(!Object(s["isUndefined"])(e))return e[t]}),r)),i}},_debug:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.em,r=this.config;(t.debug||r.debug)&&n&&n.logWarning(e)},destroy:function(){this.config=u,this.em={}}}}},function(e,t,n){"use strict";n.r(t);var r=n(56),i=n.n(r),o=n(14),a=n.n(o),s=n(3),l=n.n(s),c=n(46),u=n.n(c),f=n(8),d=n.n(f),h=n(9),p=n.n(h),g=n(0),v=n(1);function m(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function y(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?m(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):m(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var b='_rte',w=1,O=0,x=-1,k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:'A',n=e.selection(),r=n.anchorNode,i=n.focusNode,o=null==r?void 0:r.parentNode,a=null==i?void 0:i.parentNode;return(null==o?void 0:o.nodeName)==t||(null==a?void 0:a.nodeName)==t},C='data-selectme',S={bold:{name:'bold',icon:'<b>B</b>',attributes:{title:'Bold'},result:function(e){return e.exec('bold')}},italic:{name:'italic',icon:'<i>I</i>',attributes:{title:'Italic'},result:function(e){return e.exec('italic')}},underline:{name:'underline',icon:'<u>U</u>',attributes:{title:'Underline'},result:function(e){return e.exec('underline')}},strikethrough:{name:'strikethrough',icon:'<s>S</s>',attributes:{title:'Strike-through'},result:function(e){return e.exec('strikeThrough')}},link:{icon:"<svg viewBox=\"0 0 24 24\">\n          <path fill=\"currentColor\" d=\"M3.9,12C3.9,10.29 5.29,8.9 7,8.9H11V7H7A5,5 0 0,0 2,12A5,5 0 0,0 7,17H11V15.1H7C5.29,15.1 3.9,13.71 3.9,12M8,13H16V11H8V13M17,7H13V8.9H17C18.71,8.9 20.1,10.29 20.1,12C20.1,13.71 18.71,15.1 17,15.1H13V17H17A5,5 0 0,0 22,12A5,5 0 0,0 17,7Z\" />\n        </svg>",name:'link',attributes:{style:'font-size:1.4rem;padding:0 4px 2px;',title:'Link'},state:function(e){return e&&e.selection()&&k(e)?w:O},result:function(e){k(e)?e.exec('unlink'):e.insertHTML("<a href=\"\" ".concat(C,">").concat(e.selection(),"</a>"),{select:!0})}},wrap:{icon:"<svg viewBox=\"0 0 24 24\">\n            <path fill=\"currentColor\" d=\"M20.71,4.63L19.37,3.29C19,2.9 18.35,2.9 17.96,3.29L9,12.25L11.75,15L20.71,6.04C21.1,5.65 21.1,5 20.71,4.63M7,14A3,3 0 0,0 4,17C4,18.31 2.84,19 2,19C2.92,20.22 4.5,21 6,21A4,4 0 0,0 10,17A3,3 0 0,0 7,14Z\" />\n        </svg>",attributes:{title:'Wrap for style'},state:function(e){return null!=e&&e.selection()&&k(e,'SPAN')?x:O},result:function(e){!k(e,'SPAN')&&e.insertHTML("<span ".concat(C,">").concat(e.selection(),"</span>"),{select:!0})}}},j=function(){function e(){var t=this,n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};d()(this,e);var r=n.el,i=n.em;if(this.em=i,r[b])return r[b];r[b]=this,this.setEl(r),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this);var o=(n.actions||[]).map((function(e){var t=e;return'string'==typeof e?t=y({},S[e]):S[e.name]&&(t=y(y({},S[e.name]),e)),t})),a=o.length?o:Object.keys(S).map((function(e){return S[e]}));n.classes=y(y({},{actionbar:'actionbar',button:'action',active:'active',disabled:'disabled',inactive:'inactive'}),n.classes);var s=n.classes,l=n.actionbar;if(this.actionbar=l,this.settings=n,this.classes=s,this.actions=a,!l){var c=n.actionbarContainer;(l=document.createElement('div')).className=s.actionbar,c.appendChild(l),this.actionbar=l,a.forEach((function(e){return t.addAction(e)}))}return n.styleWithCSS&&this.exec('styleWithCSS'),this}return p()(e,[{key:"destroy",value:function(){this.el=0,this.doc=0,this.actionbar=0,this.settings={},this.classes={},this.actions=[]}},{key:"setEl",value:function(e){this.el=e,this.doc=e.ownerDocument}},{key:"updateActiveActions",value:function(){var e=this;this.getActions().forEach((function(t){var n=t.btn,r=t.update,i=y({},e.classes),o=i.active,a=i.inactive,s=i.disabled,l=t.state,c=t.name,u=e.doc;if(n.className=n.className.replace(o,'').trim(),n.className=n.className.replace(a,'').trim(),n.className=n.className.replace(s,'').trim(),l)switch(l(e,u)){case w:n.className+=" ".concat(o);break;case O:n.className+=" ".concat(a);break;case x:n.className+=" ".concat(s)}else u.queryCommandSupported(c)&&u.queryCommandState(c)&&(n.className+=" ".concat(o));r&&r(e,t)}))}},{key:"enable",value:function(e){return this.enabled?this:this.__toggleEffects(!0,e)}},{key:"disable",value:function(){return this.__toggleEffects(!1)}},{key:"__toggleEffects",value:function(){var e=arguments.length>0&&void 0!==arguments[0]&&arguments[0],t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=e?v["on"]:v["off"],r=this.el,i=this.doc;if(this.actionbarEl().style.display=e?'':'none',r.contentEditable=!!e,n(r,'mouseup keyup',this.updateActiveActions),n(i,'keydown',this.__onKeydown),this.enabled=e,e){var o=t.event;if(this.syncActions(),this.updateActiveActions(),o){var a=null;if(i.caretRangeFromPoint){var s=Object(v["getPointerEvent"])(o);a=i.caretRangeFromPoint(s.clientX,s.clientY)}else o.rangeParent&&(a=i.createRange()).setStart(o.rangeParent,o.rangeOffset);var l=i.getSelection();l.removeAllRanges(),a&&l.addRange(a)}r.focus()}return this}},{key:"__onKeydown",value:function(e){'Enter'===e.key&&(this.doc.execCommand('insertLineBreak'),e.preventDefault())}},{key:"syncActions",value:function(){var e=this;this.getActions().forEach((function(t){if(e.actionbar&&(!t.state||t.state&&t.state(e,e.doc)>=0)){var n=t.event||'click';t.btn["on".concat(n)]=function(n){t.result(e,t),e.updateActiveActions()}}}))}},{key:"addAction",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.sync,r=document.createElement('span'),i=e.icon,o=e.attributes||{};for(var a in r.className=this.classes.button,e.btn=r,o)r.setAttribute(a,o[a]);'string'==typeof i?r.innerHTML=i:r.appendChild(i),this.actionbarEl().appendChild(r),n&&(this.actions.push(e),this.syncActions())}},{key:"getActions",value:function(){return this.actions}},{key:"selection",value:function(){return this.doc.getSelection()}},{key:"exec",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.doc.execCommand(e,!1,t)}},{key:"actionbarEl",value:function(){return this.actionbar}},{key:"insertHTML",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=t.select,r=this.em,i=this.doc,o=this.el,a=i.getSelection();if(a&&a.rangeCount){var s=Object(v["getModel"])(o),l=i.createElement('div'),c=a.getRangeAt(0);c.deleteContents(),Object(g["isString"])(e)?l.innerHTML=e:e&&l.appendChild(e),Array.prototype.slice.call(l.childNodes).forEach((function(e){c.insertNode(e)})),a.removeAllRanges(),a.addRange(c),o.focus(),n&&s&&(s.once('rte:disable',(function(){var e=s.find("[".concat(C,"]"))[0];e&&(r.setSelected(e),e.removeAttributes(C))})),s.trigger('disable'))}}}]),e}(),E={stylePrefix:'rte-',adjustToolbar:1,actions:['bold','italic','underline','strikethrough','link','wrap']};function P(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function _(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?P(Object(n),!0).forEach((function(t){l()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):P(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var T='change:canvasOffset frame:scroll component:update';t["default"]=function(){var e,t=function(){var t=e.style,n='-1000px';t.top=n,t.left=n,t.display='none'};return{customRte:null,name:'RichTextEditor',getConfig:function(){return this.config},init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=_(_({},E),t),r=n.pStylePrefix;return r&&(n.stylePrefix=r+n.stylePrefix),this.config=n,this.pfx=n.stylePrefix,this.em=n.em,this.actions=n.actions||[],Object(v["hasWin"])()?((e=document.createElement('div')).className="".concat(r,"rte-toolbar ").concat(r,"one-bg"),this.initRte(document.createElement('div')),Object(v["on"])(e,'mousedown',(function(e){return e.stopPropagation()})),this):this},destroy:function(){var t,n,r,i=this;null===(t=this.globalRte)||void 0===t||t.destroy(),null===(n=this.customRte)||void 0===n||null===(r=n.destroy)||void 0===r||r.call(n),e=0,['actionbar','actions','em','config','globalRte','lastEl'].map((function(e){delete i[e]}))},postRender:function(n){var r=n.model.get('Canvas');e.style.pointerEvents='all',t(),r.getToolsEl().appendChild(e)},initRte:function(t){var n=this.globalRte,r=this.em,i=this.pfx,o=this.actionbar,s=this.config,l=e,c=this.actions||a()(s.actions),u={actionbar:"".concat(i,"actionbar"),button:"".concat(i,"action"),active:"".concat(i,"active"),inactive:"".concat(i,"inactive"),disabled:"".concat(i,"disabled")};return n?(n.em=r,n.setEl(t)):(n=new j({em:r,el:t,classes:u,actions:c,actionbar:o,actionbarContainer:l}),this.globalRte=n),n.actionbar&&(this.actionbar=n.actionbar),n.actions&&(this.actions=n.actions),n},add:function(e){var t,n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.name=e,null===(t=this.globalRte)||void 0===t||t.addAction(n,{sync:1})},get:function(e){var t,n;return null===(t=this.globalRte)||void 0===t||t.getActions().forEach((function(t){t.name==e&&(n=t)})),n},getAll:function(){var e;return null===(e=this.globalRte)||void 0===e?void 0:e.getActions()},remove:function(e){var t=this.getAll(),n=this.get(e);if(n){var r=n.btn,i=t.indexOf(n);r.parentNode.removeChild(r),t.splice(i,1)}return n},getToolbarEl:function(){return e},updatePosition:function(){var t='px',n=this.em.get('Canvas'),r=e.style,i=n.getTargetToElementFixed(this.lastEl,e,{event:'rteToolbarPosUpdate',left:0});r.top=(i.top||0)+t,r.left=(i.left||0)+t},enable:function(t,n,r){var o=this;return i()(u.a.mark((function i(){var a,s,l,c;return u.a.wrap((function(i){for(;1;)switch(i.prev=i.next){case 0:return o.lastEl=t.el,a=o.customRte,s=o.em,l=t.getChildrenContainer(),e.style.display='',i.next=6,a?a.enable(l,n):o.initRte(l).enable(r);case 6:return c=i.sent,s&&(setTimeout(o.updatePosition.bind(o),0),s.off(T,o.updatePosition,o),s.on(T,o.updatePosition,o),s.trigger('rte:enable',t,c)),i.abrupt("return",c);case 9:case"end":return i.stop()}}),i)})))()},disable:function(e,n){var r=this.em,i=this.customRte,o=e.getChildrenContainer();i?i.disable(o,n):n&&n.disable(),t(),r&&(r.off(T,this.updatePosition,this),r.trigger('rte:disable',e,n))}}}},function(e,t,n){"use strict";n.r(t);var r,i=n(3),o=n.n(i),a={stylePrefix:'',appendTo:'',sortable:1,hidable:1,hideTextnode:1,root:'',showWrapper:1,showHover:1,scrollCanvas:{behavior:'smooth',block:'nearest'},scrollLayers:{behavior:'auto',block:'nearest'},highlightHover:1,onInit:function(){},onRender:function(){},extend:{}},s=n(0),l=n(1),c=n(4),u=n.n(c),f=n(17),d=n(13),h='contentEditable',p={mediaText:''},g=u.a.$,v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return 0===(e.display||'').trim().indexOf('none')},m=u.a.View.extend({events:{'mousedown [data-toggle-move]':'startSort','touchstart [data-toggle-move]':'startSort','click [data-toggle-visible]':'toggleVisibility','click [data-toggle-open]':'toggleOpening','click [data-toggle-select]':'handleSelect','mouseover [data-toggle-select]':'handleHover','mouseout [data-toggle-select]':'handleHoverOut','dblclick [data-name]':'handleEdit','keydown [data-name]':'handleEditKey','focusout [data-name]':'handleEditEnd'},template:function(e){var t=this.pfx,n=this.ppfx,r=this.config,i=this.clsNoEdit,o=r.hidable,a=this.countChildren(e),s=a?'':this.clsNoChild,l="".concat(this.clsTitle," ").concat(s),c="".concat(this.clsTitleC," ").concat(n,"one-bg"),u="".concat(this.clsCaret," fa fa-chevron-right"),f="".concat(this.inputNameCls," ").concat(i," ").concat(n,"no-app"),d=this.level+1,h="".concat(30+10*d,"px"),p=e.getName(),g=e.getIcon(),v="".concat(t,"layer");return"\n      ".concat(o?"<i class=\"".concat(t,"layer-vis fa fa-eye ").concat(this.isVisible()?'':'fa-eye-slash',"\" data-toggle-visible></i>"):'',"\n      <div class=\"").concat(c,"\">\n        <div class=\"").concat(l,"\" style=\"padding-left: ").concat(h,"\" data-toggle-select>\n          <div class=\"").concat(t,"layer-title-inn\" title=\"").concat(p,"\">\n            <i class=\"").concat(u,"\" data-toggle-open></i>\n            ").concat(g?"<span class=\"".concat(v,"__icon\">").concat(g,"</span>"):'',"\n            <span class=\"").concat(f,"\" data-name>").concat(p,"</span>\n          </div>\n        </div>\n      </div>\n      <div class=\"").concat(this.clsCount,"\" data-count>").concat(a||'',"</div>\n      <div class=\"").concat(this.clsMove,"\" data-toggle-move>\n        <i class=\"fa fa-arrows\"></i>\n      </div>\n      <div class=\"").concat(this.clsChildren,"\"></div>")},initialize:function(){var e=this,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};Object(s["bindAll"])(this,'__render'),this.opt=t,this.level=t.level;var n=t.config||{},r=n.onInit;this.config=n,this.em=t.config.em,this.ppfx=this.em.get('Config').stylePrefix,this.sorter=t.sorter||'',this.pfx=this.config.stylePrefix,this.parentView=t.parentView;var i=this.pfx,o=this.ppfx,a=this.model,l=a.get('components'),c=a.get('type')||'default';a.set('open',!1),this.listenTo(l,'remove add reset',this.checkChildren),[['change:status',this.updateStatus],['change:open',this.updateOpening],['change:layerable',this.updateLayerable],['change:style:display',this.updateVisibility],['rerender:layer',this.render],['change:name change:custom-name',this.updateName]].forEach((function(t){return e.listenTo(a,t[0],t[1])})),this.className="".concat(i,"layer ").concat(i,"layer__t-").concat(c," no-select ").concat(o,"two-color"),this.inputNameCls="".concat(o,"layer-name"),this.clsTitleC="".concat(i,"layer-title-c"),this.clsTitle="".concat(i,"layer-title"),this.clsCaret="".concat(i,"layer-caret"),this.clsCount="".concat(i,"layer-count"),this.clsMove="".concat(i,"layer-move"),this.clsChildren="".concat(i,"layer-children"),this.clsNoChild="".concat(i,"layer-no-chld"),this.clsEdit="".concat(this.inputNameCls,"--edit"),this.clsNoEdit="".concat(this.inputNameCls,"--no-edit"),this.$el.data('model',a),this.$el.data('collection',l),a.viewLayer=this,r.bind(this)({component:a,render:this.__render,listenTo:this.listenTo})},updateName:function(){this.getInputName().innerText=this.model.getName()},getVisibilityEl:function(){return this.eyeEl||(this.eyeEl=this.$el.children(".".concat(this.pfx,"layer-vis"))),this.eyeEl},updateVisibility:function(){var e=this.pfx,t=this.model,n="".concat(e,"layer-hidden"),r=v(t.getStyle(p))?'addClass':'removeClass';this.$el[r](n),this.getVisibilityEl()[r]('fa-eye-slash')},toggleVisibility:function(e){e&&e.stopPropagation();var t=this.model,n=this.em,r='__prev-display',i=t.get(r),o=t.getStyle(p),a=o.display;v(o)?(delete o.display,i&&(o.display=i,t.unset(r))):(a&&t.set(r,a),o.display='none'),t.setStyle(o,p),n&&n.trigger('component:toggled')},handleEdit:function(e){e&&e.stopPropagation();var t=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName();o[h]=!0,o.focus(),document.execCommand('selectAll',!1,null),t&&t.setEditing(1),n.find(".".concat(this.inputNameCls)).removeClass(r).addClass(i)},handleEditKey:function(e){e.stopPropagation(),(Object(l["isEscKey"])(e)||Object(l["isEnterKey"])(e))&&this.handleEditEnd(e)},handleEditEnd:function(e){e&&e.stopPropagation();var t=this.em,n=this.$el,r=this.clsNoEdit,i=this.clsEdit,o=this.getInputName(),a=o.textContent;o.scrollLeft=0,o[h]=!1,this.setName(a,{component:this.model,propName:'custom-name'}),t&&t.setEditing(0),n.find(".".concat(this.inputNameCls)).addClass(r).removeClass(i)},setName:function(e,t){var n=t.propName;this.model.set(n,e)},getInputName:function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},updateOpening:function(){var e=this.opt.opened||{},t=this.model,n='fa-chevron-down';t.get('open')?(this.$el.addClass('open'),this.getCaret().addClass(n),e[t.cid]=t):(this.$el.removeClass('open'),this.getCaret().removeClass(n),delete e[t.cid])},toggleOpening:function(e){var t=this.model;e.stopImmediatePropagation(),t.get('components').length&&t.set('open',!t.get('open'))},handleSelect:function(e){e.stopPropagation();var t=this.em,n=this.config,r=this.model;if(t){t.setSelected(r,{fromLayers:1,event:e});var i=n.scrollCanvas;i&&r.views.forEach((function(e){return e.scrollIntoView(i)}))}},handleHover:function(e){e.stopPropagation();var t=this.em,n=this.config,r=this.model;t&&n.showHover&&t.setHovered(r,{fromLayers:1})},handleHoverOut:function(e){e.stopPropagation();var t=this.em,n=this.config;t&&n.showHover&&t.setHovered(0,{fromLayers:1})},startSort:function(e){e.stopPropagation();var t=this.em,n=this.sorter;e.button&&0!==e.button||n&&(n.onStart=function(e){return t.trigger("".concat(d["b"],":start"),e)},n.onMoveClb=function(e){return t.trigger(d["b"],e)},n.startSort(e.target))},freeze:function(){this.$el.addClass(this.pfx+'opac50'),this.model.set('open',0)},unfreeze:function(){this.$el.removeClass(this.pfx+'opac50')},updateStatus:function(e){f["default"].prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:1}])},isVisible:function(){return!v(this.model.getStyle())},checkChildren:function(){var e=this.model,t=this.clsNoChild,n=this.countChildren(e),r=this.$el.children(".".concat(this.clsTitleC)).children(".".concat(this.clsTitle)),i=this.cnt;i||(i=this.$el.children('[data-count]').get(0),this.cnt=i),r[n?'removeClass':'addClass'](t),i&&(i.innerHTML=n||''),!n&&e.set('open',0)},countChildren:function(e){var t=0;return e.get('components').each((function(e){var n=this.opt.isCountable,r=this.config.hideTextnode;n&&!n(e,r)||t++}),this),t},getCaret:function(){if(!this.caret||!this.caret.length){this.pfx;this.caret=this.$el.children(".".concat(this.clsTitleC)).find(".".concat(this.clsCaret))}return this.caret},setRoot:function(e){e=Object(s["isString"])(e)?this.em.getWrapper().find(e)[0]:e;var t=Object(l["getModel"])(e,g);t&&(this.stopListening(),this.model=t,this.initialize(this.opt),this._rendered&&this.render())},updateLayerable:function(){(this.parentView||this).render()},__clearItems:function(){var e=this.items;e&&e.remove()},remove:function(){u.a.View.prototype.remove.apply(this,arguments),this.__clearItems()},render:function(){var e=this.model,t=this.config,i=this.pfx,o=this.ppfx,a=this.opt;this.__clearItems();var l=a.isCountable,c=l&&!l(e,t.hideTextnode),u=this.isVisible(),f=this.$el.empty(),d=this.level+1;this.inputName=0,Object(s["isUndefined"])(r)&&(r=n(244).default),this.items=new r({ItemView:a.ItemView,collection:e.get('components'),config:this.config,sorter:this.sorter,opened:this.opt.opened,parentView:this,parent:e,level:d});var h=this.items.render().$el;return this.config.showWrapper||1!==d?(f.html(this.template(e)),f.find(".".concat(this.clsChildren)).append(h)):f.append(h),e.get('draggable')&&this.config.sortable||f.children(".".concat(this.clsMove)).remove(),!u&&(this.className+=" ".concat(i,"hide")),c&&(this.className+=" ".concat(o,"hidden")),f.attr('class',this.className),this.updateOpening(),this.updateStatus(),this.updateVisibility(),this.__render(),this._rendered=1,this},__render:function(){var e=this.model,t=this.config,n={component:e,el:this.el};t.onRender.bind(this)(n),this.em.trigger('layer:render',n)}});function y(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function b(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?y(Object(n),!0).forEach((function(t){o()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):y(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}t["default"]=function(){var e,t,n={};return{name:'LayerManager',init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return(n=b(b({},a),t)).stylePrefix=t.pStylePrefix,e=n.em,this},getConfig:function(){return n},onLoad:function(){e&&e.on('component:selected',this.componentChanged),this.componentChanged()},postRender:function(){var e=n.appendTo,t=n.root;(t&&this.setRoot(t),e)&&(Object(s["isElement"])(e)?e:document.querySelector(e)).appendChild(this.render())},setRoot:function(e){return t&&t.setRoot(e),this},getRoot:function(){return t&&t.model},getAll:function(){return t},componentChanged:function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(!r.fromLayers){var i=e.get('opened'),o=e.getSelected(),a=n.scrollLayers,s=o&&o.collection?o.collection.parent:null;for(var l in i)i[l].set('open',0);for(;s;)s.set('open',1),i[s.cid]=s,s=s.collection?s.collection.parent:null;if(o&&a){var c=o.viewLayer&&o.viewLayer.el;c&&c.scrollIntoView(a)}}},render:function(){var r=m.extend(n.extend);return t&&t.remove(),(t=new r({ItemView:r,level:0,config:n,opened:n.opened||{},model:e.get('DomComponents').getWrapper()})).render().el},destroy:function(){t&&t.remove(),[e,t,n].forEach((function(e){return{}}))}}}},function(e,t,n){"use strict";n.r(t);var r,i=n(22),o=n.n(i),a=n(3),s=n.n(a),l=n(0),c=n(1),u={},f={16:!1,18:!1,17:!1,91:!1},d='all',h={'⇧':16,shift:16,'⌥':18,alt:18,option:18,'⌃':17,ctrl:17,control:17,'⌘':91,command:91},p={backspace:8,tab:9,clear:12,enter:13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,del:46,delete:46,home:36,end:35,pageup:33,pagedown:34,',':188,'.':190,'/':191,'`':192,'-':189,'=':187,';':186,"'":222,'[':219,']':221,'\\':220},g=function(e){return p[e]||e.toUpperCase().charCodeAt(0)},v=[];for(r=1;r<20;r++)p['f'+r]=111+r;function m(e,t){for(var n=e.length;n--;)if(e[n]===t)return n;return-1}function y(e,t){if(e.length!=t.length)return!1;for(var n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}var b={16:'shiftKey',18:'altKey',17:'ctrlKey',91:'metaKey'};function w(e){var t,n,i,o,a,s;if(t=e.keyCode,-1==m(v,t)&&v.push(t),93!=t&&224!=t||(t=91),t in f)for(i in f[t]=!0,h)h[i]==t&&(k[i]=!0);else if(function(e){for(r in f)f[r]=e[b[r]]}(e),k.filter.call(this,e)&&t in u)for(s=C(),o=0;o<u[t].length;o++)if((n=u[t][o]).scope==s||'all'==n.scope){for(i in a=n.mods.length>0,f)(!f[i]&&m(n.mods,+i)>-1||f[i]&&-1==m(n.mods,+i))&&(a=!1);(0!=n.mods.length||f[16]||f[18]||f[17]||f[91])&&!a||!1===n.method(e,n)&&(e.preventDefault?e.preventDefault():e.returnValue=!1,e.stopPropagation&&e.stopPropagation(),e.cancelBubble&&(e.cancelBubble=!0))}}function O(e){var t,n=e.keyCode,r=m(v,n);if(r>=0&&v.splice(r,1),93!=n&&224!=n||(n=91),n in f)for(t in f[n]=!1,h)h[t]==n&&(k[t]=!1)}function x(){for(r in f)f[r]=!1;for(r in h)k[r]=!1}function k(e,t,n){var r,i;r=S(e),void 0===n&&(n=t,t='all');for(var o=0;o<r.length;o++)i=[],(e=r[o].split('+')).length>1&&(i=j(e),e=[e[e.length-1]]),e=e[0],(e=g(e))in u||(u[e]=[]),u[e].push({shortcut:r[o],scope:t,method:n,key:r[o],mods:i})}for(r in h)k[r]=!1;function C(){return d||'all'}function S(e){var t;return''==(t=(e=e.replace(/\s/g,'')).split(','))[t.length-1]&&(t[t.length-2]+=','),t}function j(e){for(var t=e.slice(0,e.length-1),n=0;n<t.length;n++)t[n]=h[t[n]];return t}function E(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent&&e.attachEvent('on'+t,(function(){n(window.event)}))}k.setScope=function(e){d=e||'all'},k.getScope=C,k.deleteScope=function(e){var t,n,r;for(t in u)for(n=u[t],r=0;r<n.length;)n[r].scope===e?n.splice(r,1):r++},k.filter=function(e){var t=(e.target||e.srcElement).tagName;return!('INPUT'==t||'SELECT'==t||'TEXTAREA'==t)},k.isPressed=function(e){return'string'==typeof e&&(e=g(e)),-1!=m(v,e)},k.getPressedKeyCodes=function(){return v.slice(0)},k.unbind=function(e,t){var n,r,i,o,a,s=[];for(n=S(e),o=0;o<n.length;o++){if((r=n[o].split('+')).length>1&&(s=j(r)),e=r[r.length-1],e=g(e),void 0===t&&(t=C()),!u[e])return;for(i=0;i<u[e].length;i++)(a=u[e][i]).scope===t&&y(a.mods,s)&&(u[e][i]={})}},k.handlers=u,k.init=function(e){E(e.document,'keydown',(function(e){w(e)})),E(e.document,'keyup',O),E(e,'focus',x)};var P=k;function _(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function T(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?_(Object(n),!0).forEach((function(t){s()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):_(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}Object(c["hasWin"])()&&P.init(window);t["default"]=function(){var e={defaults:{'core:undo':{keys:'⌘+z, ctrl+z',handler:'core:undo'},'core:redo':{keys:'⌘+shift+z, ctrl+shift+z',handler:'core:redo'},'core:copy':{keys:'⌘+c, ctrl+c',handler:'core:copy'},'core:paste':{keys:'⌘+v, ctrl+v',handler:'core:paste'},'core:component-next':{keys:'s',handler:'core:component-next'},'core:component-prev':{keys:'w',handler:'core:component-prev'},'core:component-enter':{keys:'d',handler:'core:component-enter'},'core:component-exit':{keys:'a',handler:'core:component-exit'},'core:component-delete':{keys:'backspace, delete',handler:'core:component-delete',opts:{prevent:1}}}};return{keymaster:P,name:'Keymaps',getConfig:function(){return this.config},init:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return this.config=T(T({},e),t),this.em=this.config.em,this.keymaps={},this},onLoad:function(){var e=this.config.defaults;for(var t in e){var n=e[t];this.add(t,n.keys,n.handler,n.opts||{})}},add:function(e,t,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},i=this.em,a=i.get('Commands'),s=i.getEditor(),c=i.get('Canvas'),u={id:e,keys:t,handler:n},f=this.keymaps[e];return f&&this.remove(e),this.keymaps[e]=u,P(t,(function(t,u){var f={event:t,h:u};if(n=Object(l["isString"])(n)?a.get(n):n,!i.isEditing()&&!s.Canvas.isInputFocused()||r.force){r.prevent&&c.getCanvasView().preventDefault(t),'object'==o()(n)?a.runCommand(n,f):n(s,0,f);var d=[e,u.shortcut,t];i.trigger.apply(i,['keymap:emit'].concat(d)),i.trigger.apply(i,["keymap:emit:".concat(e)].concat(d))}})),i.trigger('keymap:add',u),u},get:function(e){return this.keymaps[e]},getAll:function(){return this.keymaps},remove:function(e){var t=this.em,n=this.get(e);if(n)return delete this.keymaps[e],n.keys.split(', ').forEach((function(e){return P.unbind(e.trim())})),t&&t.trigger('keymap:remove',n),n},removeAll:function(){var e=this;return Object.keys(this.keymaps).forEach((function(t){return e.remove(t)})),P.handlers={},this},destroy:function(){this.removeAll(),this.keymaps={},this.em={}}}}},function(e,t,n){"use strict";n.r(t);var r=n(14),i=n.n(r),o=n(3),a=n.n(o),s=n(0),l=n(66),c={stylePrefix:'com-',defaults:[],strict:1},u=n(13);function f(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function d(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?f(Object(n),!0).forEach((function(t){a()(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):f(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}var h=[['preview','Preview','preview'],['resize','Resize','resize'],['fullscreen','Fullscreen','fullscreen'],['copy','CopyComponent'],['paste','PasteComponent'],['canvas-move','CanvasMove'],['canvas-clear','CanvasClear'],['open-code','ExportTemplate','export-template'],['open-layers','OpenLayers','open-layers'],['open-styles','OpenStyleManager','open-sm'],['open-traits','OpenTraitManager','open-tm'],['open-blocks','OpenBlocks','open-blocks'],['open-assets','OpenAssets','open-assets'],['component-select','SelectComponent','select-comp'],['component-outline','SwitchVisibility','sw-visibility'],['component-offset','ShowOffset','show-offset'],['component-move','MoveComponent','move-comp'],['component-next','ComponentNext'],['component-prev','ComponentPrev'],['component-enter','ComponentEnter'],['component-exit','ComponentExit','select-parent'],['component-delete','ComponentDelete'],['component-style-clear','ComponentStyleClear'],['component-drag','ComponentDrag']];t["default"]=function(){var e,t={},r={},o={},a={};return{CommandAbstract:l["default"],name:'Commands',init:function(){var r=this,a=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};t=d(d({},c),a),e=t.em;var l=t.pStylePrefix;return l&&(t.stylePrefix=l+t.stylePrefix),Object.keys(t.defaults).forEach((function(e){var n=t.defaults[e];n.id&&r.add(n.id,n)})),o['tlb-delete']={run:function(e){return e.runCommand('core:component-delete')}},o['tlb-clone']={run:function(e){e.runCommand('core:copy'),e.runCommand('core:paste',{action:'clone-component'})}},o['tlb-move']={run:function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=e.getModel(),o=n&&n.event,a=n.target,l=a||e.getSelected(),c=a?[a]:i()(e.getSelectedAll()),f=o&&'dragstart'==o.type,d={preserveSelected:1},h=['absolute','translate'];if(!l||!l.get('draggable'))return r.logWarning('The element is not draggable');var p=l.get('dmode')||r.get('dmode'),g=function(){return r.stopDefault(d)},v=Object(s["includes"])(h,p);c.forEach((function(e){return e.trigger('disable')})),f?setTimeout(g,0):g();var m=function(e){r.trigger("".concat(u["b"],":start"),e)},y=function(e){r.trigger(u["b"],e)},b=function(t,n,i){c.forEach((function(e){return e.set('status','selected')})),e.select(c),l.emitUpdate(),r.trigger("".concat(u["b"],":end"),i),setTimeout((function(){return r.runDefault(d)})),(v||i.cancelled)&&r.set('_cmpDrag',1)};if(v)e.runCommand('core:component-drag',{guidesInfo:1,mode:p,target:l,onStart:m,onDrag:y,onEnd:b,event:o});else{f&&o.dataTransfer.setDragImage(l.view.el,0,0);var w=e.Commands.get('move-comp');w.onStart=m,w.onDrag=y,w.onEndMoveFromModel=b,w.initSorterFromModels(c)}c.forEach((function(e){return e.set('status','freezed-selected')}))}},o['core:undo']=function(e){return e.UndoManager.undo()},o['core:redo']=function(e){return e.UndoManager.redo()},h.forEach((function(t){var r=t[2],i=n(245)("./".concat(t[1])).default,a="core:".concat(t[0]);o[a]=i,r&&(o[r]=i,['run','stop'].forEach((function(t){e.on("".concat(t,":").concat(r),(function(){for(var n,r=arguments.length,i=new Array(r),o=0;o<r;o++)i[o]=arguments[o];return(n=e).trigger.apply(n,["".concat(t,":").concat(a)].concat(i))}))})))})),t.em&&(t.model=t.em.get('Canvas')),this.loadDefaultCommands(),this},add:function(e,t){return Object(s["isFunction"])(t)&&(t={run:t}),t.stop||(t.noStop=1),delete t.initialize,t.id=e,r[e]=l["default"].extend(t),this},get:function(n){var i=r[n];return Object(s["isFunction"])(i)?(i=new i(t),r[n]=i):i||e.logWarning("'".concat(n,"' command not found")),i},extend:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=this.get(e);if(n){var r=d(d({},n.constructor.prototype),t);this.add(e,r);var i=h.filter((function(t){return"core:".concat(t[0])===e&&t[2]}))[0];i&&this.add(i[2],r)}return this},has:function(e){return!!r[e]},getAll:function(){return r},run:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.runCommand(this.get(e),t)},stop:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.stopCommand(this.get(e),t)},isActive:function(e){return this.getActive().hasOwnProperty(e)},getActive:function(){return a},loadDefaultCommands:function(){for(var e in o)this.add(e,o[e]);return this},runCommand:function(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&n.run){var o=n.id,s=e.get('Editor');this.isActive(o)&&!i.force&&t.strict||(r=s&&n.callRun(s,i),o&&n.stop&&!n.noStop&&!i.abort&&(a[o]=r))}return r},stopCommand:function(n){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(n&&n.run){var o=n.id,s=e.get('Editor');(this.isActive(o)||i.force||!t.strict)&&(o&&delete a[o],r=n.callStop(s,i))}return r},create:function(e){return e.stop||(e.noStop=1),new(l["default"].extend(e))(t)},destroy:function(){[e,t,r,o,a].forEach((function(e){return{}}))}}}}])["default"]}));
//# sourceMappingURL=grapes.min.js.map