1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[2729],{52280:(t,e,n)=>{n.r(e),n.d(e,{default:()=>gT,grapesjs:()=>gP,usePlugin:()=>gE});var o,r,i,a,s,l,c,u,p,f,d=n(15376).Buffer,h={729:(t,e,n)=>{var o,r,i;i=function(t,e){var n,o,r=Array.prototype.slice;function i(t,e,n){return n.length<=4?t.call(e,n[0],n[1],n[2],n[3]):t.apply(e,n)}function a(t,e){return r.call(t,e)}function s(e,n){return null!=e&&(t.isArray(n)||(n=a(arguments,1)),t.all(n,function(t){return t in e}))}var l=(n=!1,o=-1,function(){return n||(o++,n=!0,t.defer(function(){n=!1})),o});function c(){this.registeredObjects=[],this.cidIndexes=[]}function u(e,n,o,r){for(var i,a=0,s=n.length;a<s;a++)if(i=n[a]){if("on"===e){if(!r.objectRegistry.register(i))continue}else if(!r.objectRegistry.unregister(i))continue;t.isFunction(i[e])&&i[e]("all",o,r)}}function p(e,n){var o=n.type,r=n.undoTypes,i=!r[o]||r[o][e];t.isFunction(i)&&i(n.object,n.before,n.after,n.options)}function f(e,n,o,i,a){if(!o.isCurrentlyUndoRedoing&&("undo"!==e||-1!==o.pointer)&&("redo"!==e||o.pointer!==o.length-1)){o.isCurrentlyUndoRedoing=!0;var s,l,c="undo"===e;for(a?l=c&&o.pointer===o.length-1||!c&&-1===o.pointer?t.clone(o.models):r.apply(o.models,c?[0,o.pointer]:[o.pointer,o.length-1]):(s=o.at(c?o.pointer:o.pointer+1),l=i?o.where({magicFusionIndex:s.get("magicFusionIndex")}):[s]),o.pointer+=(c?-1:1)*l.length;s=c?l.pop():l.shift();)s[e]();o.isCurrentlyUndoRedoing=!1,n.trigger(e,n)}}c.prototype={isRegistered:function(e){return e&&e.cid?this.registeredObjects[e.cid]:t.contains(this.registeredObjects,e)},register:function(t){return!this.isRegistered(t)&&(t&&t.cid?(this.registeredObjects[t.cid]=t,this.cidIndexes.push(t.cid)):this.registeredObjects.push(t),!0)},unregister:function(e){if(this.isRegistered(e)){if(e&&e.cid)delete this.registeredObjects[e.cid],this.cidIndexes.splice(t.indexOf(this.cidIndexes,e.cid),1);else{var n=t.indexOf(this.registeredObjects,e);this.registeredObjects.splice(n,1)}return!0}return!1},get:function(){return t.map(this.cidIndexes,function(t){return this.registeredObjects[t]},this).concat(this.registeredObjects)}};var d={add:{undo:function(t,e,n,o){t.remove(n,o)},redo:function(t,e,n,o){o.index&&(o.at=o.index),t.add(n,o)},on:function(e,n,o){return{object:n,before:void 0,after:e,options:t.clone(o)}}},remove:{undo:function(t,e,n,o){"index"in o&&(o.at=o.index),t.add(e,o)},redo:function(t,e,n,o){t.remove(e,o)},on:function(e,n,o){return{object:n,before:e,after:void 0,options:t.clone(o)}}},change:{undo:function(e,n,o,r){t.isEmpty(n)?t.each(t.keys(o),e.unset,e):(e.set(n),r&&r.unsetData&&r.unsetData.before&&r.unsetData.before.length&&t.each(r.unsetData.before,e.unset,e))},redo:function(e,n,o,r){t.isEmpty(o)?t.each(t.keys(n),e.unset,e):(e.set(o),r&&r.unsetData&&r.unsetData.after&&r.unsetData.after.length&&t.each(r.unsetData.after,e.unset,e))},on:function(e,n){var o=e.changedAttributes(),r=t.keys(o),i=t.pick(e.previousAttributes(),r),a=t.keys(i),s=(n||(n={})).unsetData={after:[],before:[]};return r.length!=a.length&&(r.length>a.length?t.each(r,function(t){t in i||s.before.push(t)},this):t.each(a,function(t){t in o||s.after.push(t)})),{object:e,before:i,after:o,options:t.clone(n)}}},reset:{undo:function(t,e,n){t.reset(e)},redo:function(t,e,n){t.reset(n)},on:function(e,n){return{object:e,before:n.previousModels,after:t.clone(e.models)}}}};function h(){}function g(e,n,o,r){if("object"==typeof n)return t.each(n,function(t,n){2===e?g(e,t,o,r):g(e,n,t,o)});switch(e){case 0:s(o,"undo","redo","on")&&t.all(t.pick(o,"undo","redo","on"),t.isFunction)&&(r[n]=o);break;case 1:r[n]&&t.isObject(o)&&(r[n]=t.extend({},r[n],o));break;case 2:delete r[n]}return this}h.prototype=d;var v=e.Model.extend({defaults:{type:null,object:null,before:null,after:null,magicFusionIndex:null},undo:function(t){p("undo",this.attributes)},redo:function(t){p("redo",this.attributes)}}),y=e.Collection.extend({model:v,pointer:-1,track:!1,isCurrentlyUndoRedoing:!1,maximumStackLength:1/0,setMaxLength:function(t){this.maximumStackLength=t}}),m=e.Model.extend({defaults:{maximumStackLength:1/0,track:!1},initialize:function(e){this.stack=new y,this.objectRegistry=new c,this.undoTypes=new h,this.stack.setMaxLength(this.get("maximumStackLength")),this.on("change:maximumStackLength",function(t,e){this.stack.setMaxLength(e)},this),e&&e.track&&this.startTracking(),e&&e.register&&(t.isArray(e.register)||t.isArguments(e.register)?i(this.register,this,e.register):this.register(e.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(t){!function(t,e,n,o){if(t.track&&!t.isCurrentlyUndoRedoing&&e in o&&(r=o[e],"function"==(c=typeof(a=r.condition))?!!i(a,r,n
vendor: 29,946 bytes, line 1
1):"boolean"!==c||a)){var r,a,c,u,p=i(o[e].on,o[e],n);if(s(p,"object","before","after")){if(p.type=e,p.magicFusionIndex=l(),p.undoTypes=o,t.pointer<t.length-1)for(var u=t.length-t.pointer-1;u--;)t.pop();t.pointer=t.length,t.add(p),t.length>t.maximumStackLength&&(t.shift(),t.pointer--)}}}(this.stack,t,a(arguments,1),this.undoTypes)},register:function(){u("on",arguments,this._addToStack,this)},unregister:function(){u("off",arguments,this._addToStack,this)},unregisterAll:function(){i(this.unregister,this,this.objectRegistry.get())},undo:function(t){f("undo",this,this.stack,t)},undoAll:function(){f("undo",this,this.stack,!1,!0)},redo:function(t){f("redo",this,this.stack,t)},redoAll:function(){f("redo",this,this.stack,!1,!0)},isAvailable:function(t){var e=this.stack,n=e.length;switch(t){case"undo":return n>0&&e.pointer>-1;case"redo":return n>0&&e.pointer<n-1;default:return!1}},merge:function(e){for(var n,o=t.isArray(e)?e:a(arguments);n=o.pop();)n instanceof m&&n.stack instanceof y&&(n.stack=this.stack)},addUndoType:function(t,e){g(0,t,e,this.undoTypes)},changeUndoType:function(t,e){g(1,t,e,this.undoTypes)},removeUndoType:function(t){g(2,t,void 0,this.undoTypes)},clear:function(){this.stack.reset(),this.stack.pointer=-1}});return t.extend(m,{defaults:function(e){t.extend(m.prototype.defaults,e)},addUndoType:function(t,e){g(0,t,e,d)},changeUndoType:function(t,e){g(1,t,e,d)},removeUndoType:function(t){g(2,t,void 0,d)}}),e.UndoManager=m},o=[n(39),n(193)],void 0===(r=i.apply(e,o))||(t.exports=r)},193:(t,e,n)=>{var o,r;!function(i){var a="object"==typeof self&&self.self===self&&self||"object"==typeof n.g&&n.g.global===n.g&&n.g;o=[n(39),n(774),e],void 0===(r=(function(t,e,n){a.Backbone=i(a,n,t,e)}).apply(e,o))||(t.exports=r)}(function(t,e,n,o){var r,i=t.Backbone,a=Array.prototype.slice;e.VERSION="1.4.1",e.$=o,e.noConflict=function(){return t.Backbone=i,this},e.emulateHTTP=!1,e.emulateJSON=!1;var s=e.Events={},l=/\s+/,c=function(t,e,o,r,i){var a,s=0;if(o&&"object"==typeof o)for(void 0!==r&&("context"in i)&&void 0===i.context&&(i.context=r),a=n.keys(o);s<a.length;s++)e=c(t,e,a[s],o[a[s]],i);else if(o&&l.test(o))for(a=o.split(l);s<a.length;s++)e=t(e,a[s],r,i);else e=t(e,o,r,i);return e};s.on=function(t,e,n){return this._events=c(u,this._events||{},t,e,{context:n,ctx:this,listening:r}),r&&((this._listeners||(this._listeners={}))[r.id]=r,r.interop=!1),this},s.listenTo=function(t,e,o){if(!t)return this;var i=t._listenId||(t._listenId=n.uniqueId("l")),a=this._listeningTo||(this._listeningTo={}),s=r=a[i];s||(this._listenId||(this._listenId=n.uniqueId("l")),s=r=a[i]=new v(this,t));var l=p(t,e,o,this);if(r=void 0,l)throw l;return s.interop&&s.on(e,o),this};var u=function(t,e,n,o){if(n){var r=t[e]||(t[e]=[]),i=o.context,a=o.ctx,s=o.listening;s&&s.count++,r.push({callback:n,context:i,ctx:i||a,listening:s})}return t},p=function(t,e,n,o){try{t.on(e,n,o)}catch(t){return t}};s.off=function(t,e,n){return this._events&&(this._events=c(f,this._events,t,e,{context:n,listeners:this._listeners})),this},s.stopListening=function(t,e,o){var r=this._listeningTo;if(!r)return this;for(var i=t?[t._listenId]:n.keys(r),a=0;a<i.length;a++){var s=r[i[a]];if(!s)break;s.obj.off(e,o,this),s.interop&&s.off(e,o)}return n.isEmpty(r)&&(this._listeningTo=void 0),this};var f=function(t,e,o,r){if(t){var i,a=r.context,s=r.listeners,l=0;if(!e&&!a&&!o){for(i=n.keys(s);l<i.length;l++)s[i[l]].cleanup();return}for(i=e?[e]:n.keys(t);l<i.length;l++){var c=t[e=i[l]];if(!c)break;for(var u=[],p=0;p<c.length;p++){var f=c[p];if(o&&o!==f.callback&&o!==f.callback._callback||a&&a!==f.context)u.push(f);else{var d=f.listening;d&&d.off(e,o)}}u.length?t[e]=u:delete t[e]}return t}};s.once=function(t,e,n){var o=c(d,{},t,e,this.off.bind(this));return"string"==typeof t&&null==n&&(e=void 0),this.on(o,e,n)},s.listenToOnce=function(t,e,n){var o=c(d,{},e,n,this.stopListening.bind(this,t));return this.listenTo(t,o)};var d=function(t,e,o,r){if(o){var i=t[e]=n.once(function(){r(e,i),o.apply(this,arguments)});i._callback=o}return t};s.trigger=function(t){if(!this._events)return this;for(var e=Math.max(0,arguments.length-1),n=Array(e),o=0;o<e;o++)n[o]=arguments[o+1];return c(h,this._events,t,void 0,n),this};var h=function(t,e,n,o){if(t){var r=t[e],i=t.all;r&&i&&(i=i.slice()),r&&g(r,o),i&&g(i,[e].concat(o))}return t},g=function(t,e){var n,o=-1,r=t.length,i=e[0],a=e[1],s=e[2];switch(e.length){case 0:for(;++o<r;)(n=t[o]).callback.call(n.ctx);return;case 1:for(;++o<r;)(n=t[o]).callback.call(n.ctx,i);return;case 2:for(;++o<r;)(n=t[o]).callback.call(n.ctx,i,a);return;case 3:for(;++o<r;)(n=t[o]).callback.call(n.ctx,i,a,s);return;default:for(;++o<r;)(n=t[o]).callback.apply(n.ctx,e);return}},v=function(t,e){this.id=t._listenId,this.listener=t,this.obj=e,this.interop=!0,this.count=0,this._events=void 0};v.prototype.on=s.on,v.prototype.off=function(t,e){var n;this.interop?(this._events=c(f,this._events,t,e,{context:void 0,listeners:void 0}),n=!this._events):(this.count--,n=0===this.count),n&&this.cleanup()},v.prototype.cleanup=function(){delete this.listener._listeningTo[this.obj._listenId],this.interop||delete this.obj._listeners[this.id]},s.bind=s.on,s.unbind=s.off,n.extend(e,s);var y=e.Model=function(t,e){var o=t||{};e||(e={}),this.preinitialize.apply(this,arguments),this.cid=n.uniqueId(this.cidPrefix),this.attributes={},e.collection&&(this.collection=e.collection),e.parse&&(o=this.parse(o,e)||{});var r=n.result(this,"defaults");o=n.defaults(n.extend({},r,o),r),this.set(o,e),this.changed={},this.initialize.apply(this,arguments)};n.extend(y.prototype,s,{changed:null,validationError:null,idAttribute:"id",cidPrefix:"c",preinitialize:function(){},initialize:function(){},toJSON:function(t){return n.clone(this.attributes)},sync:function(){return e.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return n.escape(this.get(t))},has:function(t){return null!=this.get(t)},matches:function(t){return!!n.iteratee(t,this)(this.attributes)},set:function(t,e,o){if(null==t)return this;if("object"==typeof t?(r=t,o=e):(r={})[t]=e,o||(o={}),!this._validate(r,o))return!1;var r,i=o.unset,a=o.silent,s=[],l=this._changing;this._changing=!0,l||(this._previousAttributes=n.clone(this.attributes),this.changed={});var c=this.attributes,u=this.changed,p=this._previousAttributes;for(var f in r)e=r[f],n.isEqual(c[f],e)||s.push(f),n.isEqual(p[f],e)?delete u[f]:u[f]=e,i?delete c[f]:c[f]=e;if(this.idAttribute in r){var d=this.id;this.id=this.get(this.idAttribute),this.trigger("changeId",this,d,o)}if(!a){s.length&&(this._pending=o);for(var h=0;h<s.length;h++)this.trigger("change:"+s[h],this,c[s[h]],o)}if(l)return this;if(!a)for(;this._pending;)o=this._pending,this._pending=!1,this.trigger("change",this,o);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,n.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var o in this.attributes)e[o]=void 0;return this.set(e,n.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!n.isEmpty(this.changed):n.has(this.changed,t)},changedAttributes:function(t){if(!t)return!!this.hasChanged()&&n.clone(this.changed);var e,o=this._changing?this._previousAttributes:this.attributes,r={};for(var i in t){var a=t[i];n.isEqual(o[i],a)||(r[i]=a,e=!0)}return!!e&&r},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return n.clone(this._previousAttributes)},fetch:function(t){t=n.extend({parse:!0},t);var e=this,o=t.success;return t.success=function(n){var r=t.parse?e.parse(n,t):n;if(!e.set(r,t))return!1;o&&o.call(t.context,e,n,t),e.trigger("sync",e,n,t)},$(this,t),this.sync("read",this,t)},save:function(t,e,o){null==t||"object"==typeof t?(r=t,o=e):(r={})[t]=e;var r,i=(o=n.extend({validate:!0,parse:!0},o)).wait;if(r&&!i){if(!this.set(r,o))return!1}else if(!this._validate(r,o))return!1;var a=this,s=o.success,l=this.attributes;o.success=function(t){a.attributes=l;var e=o.parse?a.parse(t,o):t;if(i&&(e=n.extend({},r,e)),e&&!a.set(e,o))return!1;s&&s.call(o.context,a,t,o),a.trigger("sync",a,t,o)},$(this,o),r&&i&&(this.attributes=n.extend({},l,r));var c=this.isNew()?"create":o.patch?"patch":"update";"patch"!==c||o.attrs||(o.attrs=r);var u=this.sync(c,this,o);return this.attributes=l,u},destroy:function(t){t=t?n.clone(t):{};var e=this,o=t.success,r=t.wait,i=function(){e.stopListening(),e.trigger("destroy",e,e.collection,t)};t.success=function(n){r&&i(),o&&o.call(t.context,e,n,t),e.isNew()||e.trigger("sync",e,n,t)};var a=!1;return this.isNew()?n.defer(t.success):($(this,t),a=this.sync("delete",this,t)),r||i(),a},url:function(){var t=n.result(this,"urlRoot")||n.result(this.collection,"url")||W();if(this.isNew())return t;var e=this.get(this.idAttribute);return t.replace(/[^\/]$/,"$&/")+encodeURIComponent(e)},parse:function(t,e){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return!this.has(this.idAttribute)},isValid:function(t){return this._validate({},n.extend({},t,{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=n.extend({},this.attributes,t);var o=this.validationError=this.validate(t,e)||null;return!o||(this.trigger("invalid",this,o,n.extend(e,{validationError:o})),!1)}});var m=e.Collection=function(t,e){e||(e={}),this.preinitialize.apply(this,arguments),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,n.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},w={add:!0,remove:!1},_=function(t,e,n){n=Math.min(Math.max(n,0),t.length);var o,r=Array(t.length-n),i=e.length;for(o=0;o<r.length;o++)r[o]=t[o+n];for(o=0;o<i;o++)t[o+n]=e[o];for(o=0;o<r.length;o++)t[o+i+n]=r[o]};n.extend(m.prototype,s,{model:y,preinitialize:function(){},initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return e.sync.apply(this,arguments)},add:function(t,e){return this.set(t,n.extend({merge:!1},e,w))},remove:function(t,e){e=n.extend({},e);var o=!n.isArray(t);t=o?[t]:t.slice();var r=this._removeModels(t,e);return!e.silent&&r.length&&(e.changes={added:[],merged:[],removed:r},this.trigger("update",this,e)),o?r[0]:r},set:function(t,e){if(null!=t){(e=n.extend({},b,e)).parse&&!this._isModel(t)&&(t=this.parse(t,e)||[]);var o,r,i=!n.isArray(t);t=i?[t]:t.slice();var a=e.at;null!=a&&(a*=1),a>this.length&&(a=this.length),a<0&&(a+=this.length+1);var s=[],l=[],c=[],u=[],p={},f=e.add,d=e.merge,h=e.remove,g=!1,v=this.comparator&&null==a&&!1!==e.sort,y=n.isString(this.comparator)?this.comparator:null;for(r=0;r<t.length;r++){o=t[r];var m=this.get(o);if(m){if(d&&o!==m){var w=this._isModel(o)?o.attributes:o;e.parse&&(w=m.parse(w,e)),m.set(w,e),c.push(m),v&&!g&&(g=m.hasChanged(y))}p[m.cid]||(p[m.cid]=!0,s.push(m)),t[r]=m}else f&&(o=t[r]=this._prepareModel(o,e))&&(l.push(o),this._addReference(o,e),p[o.cid]=!0,s.push(o))}if(h){for(r=0;r<this.length;r++)p[(o=this.models[r]).cid]||u.push(o);u.length&&this._removeModels(u,e)}var C=!1;if(s.length&&!v&&f&&h?(C=this.length!==s.length||n.some(this.models,function(t,e){return t!==s[e]}),this.models.length=0,_(this.models,s,0),this.length=this.models.length):l.length&&(v&&(g=!0),_(this.models,l,null==a?this.length:a),this.length=this.models.length),g&&this.sort({silent:!0}),!e.silent){for(r=0;r<l.length;r++)null!=a&&(e.index=a+r),(o=l[r]).trigger("add",o,this,e);(g||C)&&this.trigger("sort",this,e),(l.length||u.length||c.length)&&(e.changes={added:l,removed:u,merged:c},this.trigger("update",this,e))}return i?t[0]:t}},reset:function(t,e){e=e?n.clone(e):{};for(var o=0;o<this.models.length;o++)this._removeReference(this.models[o],e);return e.previousModels=this.models,this._reset(),t=this.add(t,n.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),t},push:function(t,e){return this.add(t,n.extend({at:this.length},e))},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t)},unshift:function(t,e){return this.add(t,n.extend({at:0},e))},shift:function(t){var e=this.at(0);return this.remove(e,t)},slice:function(){return a.apply(this.models,arguments)},get:function(t){if(null!=t)return this._byId[t]||this._byId[this.modelId(this._isModel(t)?t.attributes:t,t.idAttribute)]||t.cid&&this._byId[t.cid]},has:function(t){return null!=this.get(t)},at:function(t){return t<0&&(t+=this.length),this.models[t]},where:function(t,e){return this[e?"find":"filter"](t)},findWhere:function(t){return this.where(t,!0)},sort:function(t){var e=this.comparator;if(!e)throw Error("Cannot sort a set without a comparator");t||(t={});var o=e.length;return n.isFunction(e)&&(e=e.bind(this)),1===o||n.isString(e)?this.models=this.sortBy(e):this.models.sort(e),t.silent||this.trigger("sort",this,t),this},pluck:function(t){return this.map(t+"")},fetch:function(t){var e=(t=n.extend({parse:!0},t)).success,o=this;return t.success=function(n){o[t.reset?"reset":"set"](n,t),e&&e.call(t.context,o,n,t),o.trigger("sync",o,n,t)},$(this,t),this.sync("read",this,t)},create:function(t,e){var o=(e=e?n.clone(e):{}).wait;if(!(t=this._prepareModel(t,e)))return!1;o||this.add(t,e);var r=this,i=e.success;return e.success=function(t,e,n){o&&r.add(t,n),i&&i.call(n.context,t,e,n)},t.save(null,e),t},parse:function(t,e){return t},clone:function(){return new this.constructor(this.models,{model:this.model,comparator:this.comparator})},modelId:function(t,e){return t[e||this.model.prototype.idAttribute||"id"]},values:function(){return new x(this,O)},keys:function(){return new x(this,S)},entries:function(){return new x(this,T)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){var o;return this._isModel(t)?(t.collection||(t.collection=this),t):((e=e?n.clone(e):{}).collection=this,(o=this.model.prototype?new this.model(t,e):this.model(t,e)).validationError)?(this.trigger("invalid",this,o.validationError,e),!1):o},_removeModels:function(t,e){for(var n=[],o=0;o<t.length;o++){var r=this.get(t[o]);if(r){var i=this.indexOf(r);this.models.splice(i,1),this.length--,delete this._byId[r.cid];var a=this.modelId(r.attributes,r.idAttribute);null!=a&&delete this._byId[a],e.silent||(e.index=i,r.trigger("remove",r,this,e)),n.push(r),this._removeReference(r,e)}}return n},_isModel:function(t){return t instanceof y},_addReference:function(t,e){this._byId[t.cid]=t;var n=this.modelId(t.attributes,t.idAttribute);null!=n&&(this._byId[n]=t),t.on("all",this._onModelEvent,this)},_removeReference:function(t,e){delete this._byId[t.cid];var n=this.modelId(t.attributes,t.idAttribute);null!=n&&delete this._byId[n],this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,o){if(e){if(("add"===t||"remove"===t)&&n!==this)return;if("destroy"===t&&this.remove(e,o),"changeId"===t){var r=this.modelId(e.previousAttributes(),e.idAttribute),i=this.modelId(e.attributes,e.idAttribute);null!=r&&delete this._byId[r],null!=i&&(this._byId[i]=e)}}this.trigger.apply(this,arguments)}});var C="function"==typeof Symbol&&Symbol.iterator;C&&(m.prototype[C]=m.prototype.values);var x=function(t,e){this._collection=t,this._kind=e,this._index=0},O=1,S=2,T=3;C&&(x.prototype[C]=function(){return this}),x.prototype.next=function(){if(this._collection){if(this._index<this._collection.length){var t,e=this._collection.at(this._index);if(this._index++,this._kind===O)t=e;else{var n=this._collection.modelId(e.attributes,e.idAttribute);t=this._kind===S?n:[n,e]}return{value:t,done:!1}}this._collection=void 0}return{value:void 0,done:!0}};var P=e.View=function(t){this.cid=n.uniqueId("view"),this.preinitialize.apply(this,arguments),n.extend(this,n.pick(t,k)),this._ensureElement(),this.initialize.apply(this,arguments)},E=/^(\S+)\s*(.*)$/,k=["model","collection","el","id","attributes","className","tagName","events"];n.extend(P.prototype,s,{tagName:"div",$:function(t){return this.$el.find(t)},preinitialize:function(){},initialize:function(){},render:function(){return this},remove:function(){return this._removeElement(),this.stopListening(),this},_removeElement:function(){this.$el.remove()},setElement:function(t){return this.undelegateEvents(),this._setElement(t),this.delegateEvents(),this},_setElement:function(t){this.$el=t instanceof e.$?t:e.$(t),this.el=this.$el[0]},delegateEvents:function(t){if(t||(t=n.result(this,"events")),!t)return this;for(var e in this.undelegateEvents(),t){var o=t[e];if(n.isFunction(o)||(o=this[o]),o){var r=e.match(E);this.delegate(r[1],r[2],o.bind(this))}}return this},delegate:function(t,e,n){return this.$el.on(t+".delegateEvents"+this.cid,e,n),this},undelegateEvents:function(){return this.$el&&this.$el.off(".delegateEvents"+this.cid),this},undelegate:function(t,e,n){return this.$el.off(t+".delegateEvents"+this.cid,e,n),this},_createElement:function(t){return document.createElement(t)},_ensureElement:function(){if(this.el)this.setElement(n.result(this,"el"));else{var t=n.extend({},n.result(this,"attributes"));this.id&&(t.id=n.result(this,"id")),this.className&&(t.class=n.result(this,"className")),this.setElement(this._createElement(n.result(this,"tagName"))),this._setAttributes(t)}},_setAttributes:function(t){this.$el.attr(t)}});var j=function(t,e,n,o){switch(e){case 1:return function(){return t[n](this[o])};case 2:return function(e){return t[n](this[o],e)};case 3:return function(e,r){return t[n](this[o],M(e,this),r)};case 4:return function(e,r,i){return t[n](this[o],M(e,this),r,i)};default:return function(){var e=a.call(arguments);return e.unshift(this[o]),t[n].apply(t,e)}}},A=function(t,e,o,r){n.each(o,function(n,o){e[o]&&(t.prototype[o]=j(e,n,o,r))})},M=function(t,e){return n.isFunction(t)?t:n.isObject(t)&&!e._isModel(t)?D(t):n.isString(t)?function(e){return e.get(t)}:t},D=function(t){var e=n.matches(t);return function(t){return e(t.attributes)}};n.each([[m,{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"],[y,{keys:1,values:1,pairs:1,invert:1,pick:0,omit:0,chain:1,isEmpty:1},"attributes"]],function(t){var e=t[0],o=t[1],r=t[2];e.mixin=function(t){var o=n.reduce(n.functions(t),function(t,e){return t[e]=0,t},{});A(e,t,o,r)},A(e,n,o,r)}),e.sync=function(t,o,r){var i=L[t];n.defaults(r||(r={}),{emulateHTTP:e.emulateHTTP,emulateJSON:e.emulateJSON});var a={type:i,dataType:"json"};if(r.url||(a.url=n.result(o,"url")||W()),null==r.data&&o&&("create"===t||"update"===t||"patch"===t)&&(a.contentType="application/json",a.data=JSON.stringify(r.attrs||o.toJSON(r))),r.emulateJSON&&(a.contentType="application/x-www-form-urlencoded",a.data=a.data?{model:a.data}:{}),r.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){a.type="POST",r.emulateJSON&&(a.data._method=i);var s=r.beforeSend;r.beforeSend=function(t){if(t.setRequestHeader("X-HTTP-Method-Override",i),s)return s.apply(this,arguments)}}"GET"===a.type||r.emulateJSON||(a.processData=!1);var l=r.error;r.error=function(t,e,n){r.textStatus=e,r.errorThrown=n,l&&l.call(r.context,t,e,n)};var c=r.xhr=e.ajax(n.extend(a,r));return o.trigger("request",o,c,r),c};var L={create:"POST",update:"PUT",patch:"PATCH",delete:"DELETE",read:"GET"};e.ajax=function(){return e.$.ajax.apply(e.$,arguments)};var I=e.Router=function(t){t||(t={}),this.preinitialize.apply(this,arguments),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},N=/\((.*?)\)/g,R=/(\(\?)?:\w+/g,V=/\*\w+/g,F=/[\-{}\[\]+?.,\\\^$|#\s]/g;n.extend(I.prototype,s,{preinitialize:function(){},initialize:function(){},route:function(t,o,r){n.isRegExp(t)||(t=this._routeToRegExp(t)),n.isFunction(o)&&(r=o,o=""),r||(r=this[o]);var i=this;return e.history.route(t,function(n){var a=i._extractParameters(t,n);!1!==i.execute(r,a,o)&&(i.trigger.apply(i,["route:"+o].concat(a)),i.trigger("route",o,a),e.history.trigger("route",i,o,a))}),this},execute:function(t,e,n){t&&t.apply(this,e)},navigate:function(t,n){return e.history.navigate(t,n),this},_bindRoutes:function(){if(this.routes){this.routes=n.result(this,"routes");for(var t,e=n.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return RegExp("^"+(t=t.replace(F,"\\$&").replace(N,"(?:$1)?").replace(R,function(t,e){return e?t:"([^/?]+)"}).replace(V,"([^?]*?)"))+"(?:\\?([\\s\\S]*))?$")},_extractParameters:function(t,e){var o=t.exec(e).slice(1);return n.map(o,function(t,e){return e===o.length-1?t||null:t?decodeURIComponent(t):null})}});var H=e.History=function(){this.handlers=[],this.checkUrl=this.checkUrl.bind(this),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},U=/^[#\/]|\s+$/g,B=/^\/+|\/+$/g,z=/#.*$/;H.started=!1,n.extend(H.prototype,s,{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(t){return decodeURI(t.replace(/%25/g,"%2525"))},getSearch:function(){var t=this.location.href.replace(/#.*/,"").match(/\?.+/);return t?t[0]:""},getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getPath:function(){var t=this.decodeFragment(this.location.pathname+this.getSearch()).slice(this.root.length-1);return"/"===t.charAt(0)?t.slice(1):t},getFragment:function(t){return null==t&&(t=this._usePushState||!this._wantsHashChange?this.getPath():this.getHash()),t.replace(U,"")},start:function(t){if(H.started)throw Error("Backbone.history has already been started");if(H.started=!0,this.options=n.extend({root:"/"},this.options,t),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(B,"/"),this._wantsHashChange&&this._wantsPushState)if(this._hasPushState||this.atRoot())this._hasPushState&&this.atRoot()&&this.navigate(this.getHash(),{replace:!0});else{var e=this.root.slice(0,-1)||"/";return this.location.replace(e+"#"+this.getPath()),!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 o=document.body,r=o.insertBefore(this.iframe,o.firstChild).contentWindow;r.document.open(),r.document.close(),r.location.hash="#"+this.fragment}var i=window.addEventListener||function(t,e){return attachEvent("on"+t,e)};if(this._usePushState?i("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe?i("hashchange",this.checkUrl,!1):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),!this.options.silent)return this.loadUrl()},stop:function(){var t=window.removeEventListener||function(t,e){return detachEvent("on"+t,e)};this._usePushState?t("popstate",this.checkUrl,!1):this._useHashChange&&!this.iframe&&t("hashchange",this.checkUrl,!1),this.iframe&&(document.body.removeChild(this.iframe),this.iframe=null),this._checkUrlInterval&&clearInterval(this._checkUrlInterval),H.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(t){var e=this.getFragment();if(e===this.fragment&&this.iframe&&(e=this.getHash(this.iframe.contentWindow)),e===this.fragment)return!1;this.iframe&&this.navigate(e),this.loadUrl()},loadUrl:function(t){return!!this.matchRoot()&&(t=this.fragment=this.getFragment(t),n.some(this.handlers,function(e){if(e.route.test(t))return e.callback(t),!0}))},navigate:function(t,e){if(!H.started)return!1;e&&!0!==e||(e={trigger:!!e}),t=this.getFragment(t||"");var n=this.root;(""===t||"?"===t.charAt(0))&&(n=n.slice(0,-1)||"/");var o=n+t;t=t.replace(z,"");var r=this.decodeFragment(t);if(this.fragment!==r){if(this.fragment=r,this._usePushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,o);else if(!this._wantsHashChange)return this.location.assign(o);else if(this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getHash(this.iframe.contentWindow)){var i=this.iframe.contentWindow;e.replace||(i.document.open(),i.document.close()),this._updateHash(i.location,t,e.replace)}if(e.trigger)return this.loadUrl(t)}},_updateHash:function(t,e,n){if(n){var o=t.href.replace(/(javascript:|#).*$/,"");t.replace(o+"#"+e)}else t.hash="#"+e}}),e.history=new H,y.extend=m.extend=I.extend=P.extend=H.extend=function(t,e){var o,r=this;return o=t&&n.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},n.extend(o,r,e),o.prototype=n.create(r.prototype,t),o.prototype.constructor=o,o.__super__=r.prototype,o};var W=function(){throw Error('A "url" property or function must be specified')},$=function(t,e){var n=e.error;e.error=function(o){n&&n.call(e.context,t,o,e),t.trigger("error",t,o,e)}};return e})},640:(t,e,n)=>{!function(t){t.extendMode("css",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e){return/^[;{}]$/.test(e)}}),t.extendMode("javascript",{commentStart:"/*",commentEnd:"*/",newlineAfterToken:function(t,e,n,o){return this.jsonMode?/^[\[,{]$/.test(e)||/^}/.test(n):(";"!=e||!o.lexical||")"!=o.lexical.type)&&/^[;{}]$/.test(e)&&!/^;/.test(n)}});var e=/^(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)$/;t.extendMode("xml",{commentStart:"\x3c!--",commentEnd:"--\x3e",newlineAfterToken:function(t,n,o,r){var i=!1;return"html"==this.configuration&&(i=!!r.context&&e.test(r.context.tagName)),!i&&("tag"==t&&/>$/.test(n)&&r.context||/^</.test(o))}}),t.defineExtension("commentRange",function(e,n,o){var r=this,i=t.innerMode(r.getMode(),r.getTokenAt(n).state).mode;r.operation(function(){if(e)r.replaceRange(i.commentEnd,o),r.replaceRange(i.commentStart,n),n.line==o.line&&n.ch==o.ch&&r.setCursor(n.line,n.ch+i.commentStart.length);else{var t=r.getRange(n,o),a=t.indexOf(i.commentStart),s=t.lastIndexOf(i.commentEnd);a>-1&&s>-1&&s>a&&(t=t.substr(0,a)+t.substring(a+i.commentStart.length,s)+t.substr(s+i.commentEnd.length)),r.replaceRange(t,n,o)}})}),t.defineExtension("autoIndentRange",function(t,e){var n=this;this.operation(function(){for(var o=t.line;o<=e.line;o++)n.indentLine(o,"smart")})}),t.defineExtension("autoFormatRange",function(e,n){var o=this,r=o.getMode(),i=o.getRange(e,n).split("\n"),a=t.copyState(r,o.getTokenAt(e).state),s=o.getOption("tabSize"),l="",c=0,u=0===e.ch;function p(){l+="\n",u=!0,++c}for(var f=0;f<i.length;++f){for(var d=new t.StringStream(i[f],s);!d.eol();){var h=t.innerMode(r,a),g=r.token(d,a),v=d.current();d.start=d.pos,(!u||/\S/.test(v))&&(l+=v,u=!1),!u&&h.mode.newlineAfterToken&&h.mode.newlineAfterToken(g,v,d.string.slice(d.pos)||i[f+1]||"",h.state)&&p()}!d.pos&&r.blankLine&&r.blankLine(a),!u&&f<i.length-1&&p()}o.operation(function(){o.replaceRange(l,e,n);for(var t=e.line+1,r=e.line+c;t<=r;++t)o.indentLine(t,"smart");o.setSelection(e,o.getCursor(!1))})})}(n(408))},408:function(t){t.exports=function(){var t,e,n,o,r,i,a,s,l,c=navigator.userAgent,u=navigator.platform,p=/gecko\/\d/i.test(c),f=/MSIE \d/.test(c),d=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(c),h=/Edge\/(\d+)/.exec(c),g=f||d||h,v=g&&(f?document.documentMode||6:+(h||d)[1]),y=!h&&/WebKit\//.test(c),m=y&&/Qt\/\d+\.\d+/.test(c),b=!h&&/Chrome\//.test(c),w=/Opera\//.test(c),_=/Apple Computer/.test(navigator.vendor),C=/Mac OS X 1\d\D([8-9]|\d\d)\D/.test(c),x=/PhantomJS/.test(c),O=_&&(/Mobile\/\w+/.test(c)||navigator.maxTouchPoints>2),S=/Android/.test(c),T=O||S||/webOS|BlackBerry|Opera Mini|Opera Mobi|IEMobile/i.test(c),P=O||/Mac/.test(u),E=/\bCrOS\b/.test(c),k=/win/i.test(u),j=w&&c.match(/Version\/(\d*\.\d*)/);j&&(j=Number(j[1])),j&&j>=15&&(w=!1,y=!0);var A=P&&(m||w&&(null==j||j<12.11)),M=p||g&&v>=9;function D(t){return RegExp("(^|\\s)"+t+"(?:$|\\s)\\s*")}var L=function(t,e){var n=t.className,o=D(e).exec(n);if(o){var r=n.slice(o.index+o[0].length);t.className=n.slice(0,o.index)+(r?o[1]+r:"")}};function I(t){for(var e=t.childNodes.length;e>0;--e)t.removeChild(t.firstChild);return t}function N(t,e){return I(t).appendChild(e)}function R(t,e,n,o){var r=document.createElement(t);if(n&&(r.className=n),o&&(r.style.cssText=o),"string"==typeof e)r.appendChild(document.createTextNode(e));else if(e)for(var i=0;i<e.length;++i)r.appendChild(e[i]);return r}function V(t,e,n,o){var r=R(t,e,n,o);return r.setAttribute("role","presentation"),r}function F(t,e){if(3==e.nodeType&&(e=e.parentNode),t.contains)return t.contains(e);do if(11==e.nodeType&&(e=e.host),e==t)return!0;while(e=e.parentNode)}function H(){var t;try{t=document.activeElement}catch(e){t=document.body||null}for(;t&&t.shadowRoot&&t.shadowRoot.activeElement;)t=t.shadowRoot.activeElement;return t}function U(t,e){var n=t.className;D(e).test(n)||(t.className+=(n?" ":"")+e)}function B(t,e){for(var n=t.split(" "),o=0;o<n.length;o++)n[o]&&!D(n[o]).test(e)&&(e+=" "+n[o]);return e}o=document.createRange?function(t,e,n,o){var r=document.createRange();return r.setEnd(o||t,n),r.setStart(t,e),r}:function(t,e,n){var o=document.body.createTextRange();try{o.moveToElementText(t.parentNode)}catch(t){return o}return o.collapse(!0),o.moveEnd("character",n),o.moveStart("character",e),o};var z=function(t){t.select()};
vendor: 4,183 bytes, line 1
1function W(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e)}}function $(t,e,n){for(var o in e||(e={}),t)t.hasOwnProperty(o)&&(!1!==n||!e.hasOwnProperty(o))&&(e[o]=t[o]);return e}function q(t,e,n,o,r){null==e&&-1==(e=t.search(/[^\s\u00a0]/))&&(e=t.length);for(var i=o||0,a=r||0;;){var s=t.indexOf(" ",i);if(s<0||s>=e)return a+(e-i);a+=s-i,a+=n-a%n,i=s+1}}O?z=function(t){t.selectionStart=0,t.selectionEnd=t.value.length}:g&&(z=function(t){try{t.select()}catch(t){}});var G=function(){this.id=null,this.f=null,this.time=0,this.handler=W(this.onTimeout,this)};function K(t,e){for(var n=0;n<t.length;++n)if(t[n]==e)return n;return -1}G.prototype.onTimeout=function(t){t.id=0,t.time<=+new Date?t.f():setTimeout(t.handler,t.time-new Date)},G.prototype.set=function(t,e){this.f=e;var n=+new Date+t;(!this.id||n<this.time)&&(clearTimeout(this.id),this.id=setTimeout(this.handler,t),this.time=n)};var Y={toString:function(){return"CodeMirror.Pass"}},J={scroll:!1},X={origin:"*mouse"},Z={origin:"+move"};function Q(t,e,n){for(var o=0,r=0;;){var i=t.indexOf(" ",o);-1==i&&(i=t.length);var a=i-o;if(i==t.length||r+a>=e)return o+Math.min(a,e-r);if(r+=i-o,r+=n-r%n,o=i+1,r>=e)return o}}var tt=[""];function te(t){for(;tt.length<=t;)tt.push(tn(tt)+" ");return tt[t]}function tn(t){return t[t.length-1]}function to(t,e){for(var n=[],o=0;o<t.length;o++)n[o]=e(t[o],o);return n}function tr(){}function ti(t,e){var n;return Object.create?n=Object.create(t):(tr.prototype=t,n=new tr),e&&$(e,n),n}var ta=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;function ts(t){return/\w/.test(t)||t>"\x80"&&(t.toUpperCase()!=t.toLowerCase()||ta.test(t))}function tl(t,e){return e?!!(e.source.indexOf("\\w")>-1&&ts(t))||e.test(t):ts(t)}function tc(t){for(var e in t)if(t.hasOwnProperty(e)&&t[e])return!1;return!0}var tu=/[\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 tp(t){return t.charCodeAt(0)>=768&&tu.test(t)}function tf(t,e,n){for(;(n<0?e>0:e<t.length)&&tp(t.charAt(e));)e+=n;return e}function td(t,e,n){for(var o=e>n?-1:1;;){if(e==n)return e;var r=(e+n)/2,i=o<0?Math.ceil(r):Math.floor(r);if(i==e)return t(i)?e:n;t(i)?n=i:e=i+o}}var th=null;function tg(t,e,n){var o;th=null;for(var r=0;r<t.length;++r){var i=t[r];
vendor: 4,828 bytes, line 1
1if(i.from<e&&i.to>e)return r;i.to==e&&(i.from!=i.to&&"before"==n?o=r:th=r),i.from==e&&(i.from!=i.to&&"before"!=n?o=r:th=r)}return null!=o?o:th}var tv=function(){var t=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac]/,e=/[stwN]/,n=/[LRr]/,o=/[Lb1n]/,r=/[1n]/;function i(t,e,n){this.level=t,this.from=e,this.to=n}return function(a,s){var l="ltr"==s?"L":"R";if(0==a.length||"ltr"==s&&!t.test(a))return!1;for(var c=a.length,u=[],p=0;p<c;++p)u.push(function(t){if(t<=247)return"bbbbbbbbbtstwsbbbbbbbbbbbbbbssstwNN%%%NNNNNN,N,N1111111111NNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNNNLLLLLLLLLLLLLLLLLLLLLLLLLLNNNNbbbbbbsbbbbbbbbbbbbbbbbbbbbbbbbbb,N%%%%NNNNLNNNNN%%11NLNNN1LNNNNNLLLLLLLLLLLLLLLLLLLLLLLNLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLLN".charAt(t);if(1424<=t&&t<=1524)return"R";if(1536<=t&&t<=1785)return"nnnnnnNNr%%r,rNNmmmmmmmmmmmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmmmmmmmmmmmmmmmnnnnnnnnnn%nnrrrmrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrmmmmmmmnNmmmmmmrrmmNmmmmrr1111111111".charAt(t-1536);if(1774<=t&&t<=2220)return"r";if(8192<=t&&t<=8203)return"w";else if(8204==t)return"b";else return"L"}(a.charCodeAt(p)));for(var f=0,d=l;f<c;++f){var h=u[f];"m"==h?u[f]=d:d=h}for(var g=0,v=l;g<c;++g){var y=u[g];"1"==y&&"r"==v?u[g]="n":n.test(y)&&(v=y,"r"==y&&(u[g]="R"))}for(var m=1,b=u[0];m<c-1;++m){var w=u[m];"+"==w&&"1"==b&&"1"==u[m+1]?u[m]="1":","==w&&b==u[m+1]&&("1"==b||"n"==b)&&(u[m]=b),b=w}for(var _=0;_<c;++_){var C=u[_];if(","==C)u[_]="N";else if("%"==C){var x=void 0;for(x=_+1;x<c&&"%"==u[x];++x);for(var O=_&&"!"==u[_-1]||x<c&&"1"==u[x]?"1":"N",S=_;S<x;++S)u[S]=O;_=x-1}}for(var T=0,P=l;T<c;++T){var E=u[T];"L"==P&&"1"==E?u[T]="L":n.test(E)&&(P=E)}for(var k=0;k<c;++k)if(e.test(u[k])){var j=void 0;for(j=k+1;j<c&&e.test(u[j]);++j);for(var A=(k?u[k-1]:l)=="L",M=A==((j<c?u[j]:l)=="L")?A?"L":"R":l,D=k;D<j;++D)u[D]=M;k=j-1}for(var L,I=[],N=0;N<c;)if(o.test(u[N])){var R=N;for(++N;N<c&&o.test(u[N]);++N);I.push(new i(0,R,N))}else{var V=N,F=I.length,H=+("rtl"==s);for(++N;N<c&&"L"!=u[N];++N);for(var U=V;U<N;)if(r.test(u[U])){V<U&&(I.splice(F,0,new i(1,V,U)),F+=H);var B=U;for(++U;U<N&&r.test(u[U]);++U);I.splice(F,0,new i(2,B,U)),F+=H,V=U}else++U;V<N&&I.splice(F,0,new i(1,V,N))}return"ltr"==s&&(1==I[0].level&&(L=a.match(/^\s+/))&&(I[0].from=L[0].length,I.unshift(new i(0,0,L[0].length))),1==tn(I).level&&(L=a.match(/\s+$/))&&(tn(I).to-=L[0].length,I.push(new i(0,c-L[0].length,c)))),"rtl"==s?I.reverse():I}}();function ty(t,e){var n=t.order;return null==n&&(n=t.order=tv(t.text,e)),n}var tm=[],tb=function(t,e,n){if(t.addEventListener)t.addEventListener(e,n,!1);else if(t.attachEvent)t.attachEvent("on"+e,n);else{var o=t._handlers||(t._handlers={});o[e]=(o[e]||tm).concat(n)}};function tw(t,e){return t._handlers&&t._handlers[e]||tm}function t_(t,e,n){if(t.removeEventListener)t.removeEventListener(e,n,!1);else if(t.detachEvent)t.detachEvent("on"+e,n);else{var o=t._handlers,r=o&&o[e];if(r){var i=K(r,n);i>-1&&(o[e]=r.slice(0,i).concat(r.slice(i+1)))}}}function tC(t,e){var n=tw(t,e);if(n.length)for(var o=Array.prototype.slice.call(arguments,2),r=0;r<n.length;++r)n[r].apply(null,o)}function tx(t,e,n){return"string"==typeof e&&(e={type:e,preventDefault:function(){this.defaultPrevented=!0}}),tC(t,n||e.type,t,e),tk(e)||e.codemirrorIgnore}function tO(t){var e=t._handlers&&t._handlers.cursorActivity;if(e)for(var n=t.curOp.cursorActivityHandlers||(t.curOp.cursorActivityHandlers=[]),o=0;o<e.length;++o)-1==K(n,e[o])&&n.push(e[o])}function tS(t,e){return tw(t,e).length>0}function tT(t){t.prototype.on=function(t,e){tb(this,t,e)},t.prototype.off=function(t,e){t_(this,t,e)}}function tP(t){t.preventDefault?t.preventDefault():t.returnValue=!1}function tE(t){t.stopPropagation?t.stopPropagation():t.cancelBubble=!0}function tk(t){return null!=t.defaultPrevented?t.defaultPrevented:!1==t.returnValue}function tj(t){tP(t),tE(t)}function tA(t){return t.target||t.srcElement}function tM(t){var e=t.which;return null==e&&(1&t.button?e=1:2&t.button?e=3:4&t.button&&(e=2)),P&&t.ctrlKey&&1==e&&(e=3),e}var tD=function(){if(g&&v<9)return!1;var t=R("div");return"draggable"in t||"dragDrop"in t}(),tL=3!="\n\nb".split(/\n/).length?function(t){for(var e=0,n=[],o=t.length;e<=o;){var r=t.indexOf("\n",e);-1==r&&(r=t.length);var i=t.slice(e,"\r"==t.charAt(r-1)?r-1:r),a=i.indexOf("\r");-1!=a?(n.push(i.slice(0,a)),e+=a+1):(n.push(i),e=r+1)}return n}:function(t){return t.split(/\r\n?|\n/)},tI=window.getSelection?function(t){try{return t.selectionStart!=t.selectionEnd}catch(t){return!1}}:function(t){var e;try{e=t.ownerDocument.selection.createRange()}catch(t){}return!!e&&e.parentElement()==t&&0!=e.compareEndPoints("StartToEnd",e)},tN="oncopy"in(t=R("div"))||(t.setAttribute("oncopy","return;"),"function"==typeof t.oncopy),tR=null,tV={},tF={};function tH(t,e){arguments.length>
vendor: 4,720 bytes, line 1
12&&(e.dependencies=Array.prototype.slice.call(arguments,2)),tV[t]=e}function tU(t){if("string"==typeof t&&tF.hasOwnProperty(t))t=tF[t];else if(t&&"string"==typeof t.name&&tF.hasOwnProperty(t.name)){var e=tF[t.name];"string"==typeof e&&(e={name:e}),(t=ti(e,t)).name=e.name}else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+xml$/.test(t))return tU("application/xml");else if("string"==typeof t&&/^[\w\-]+\/[\w\-]+\+json$/.test(t))return tU("application/json");return"string"==typeof t?{name:t}:t||{name:"null"}}function tB(t,e){var n=tV[(e=tU(e)).name];if(!n)return tB(t,"text/plain");var o=n(t,e);if(tz.hasOwnProperty(e.name)){var r=tz[e.name];for(var i in r)r.hasOwnProperty(i)&&(o.hasOwnProperty(i)&&(o["_"+i]=o[i]),o[i]=r[i])}if(o.name=e.name,e.helperType&&(o.helperType=e.helperType),e.modeProps)for(var a in e.modeProps)o[a]=e.modeProps[a];return o}var tz={};function tW(t,e){if(!0===e)return e;if(t.copyState)return t.copyState(e);var n={};for(var o in e){var r=e[o];r instanceof Array&&(r=r.concat([])),n[o]=r}return n}function t$(t,e){for(var n;t.innerMode&&(n=t.innerMode(e))&&n.mode!=t;)e=n.state,t=n.mode;return n||{mode:t,state:e}}function tq(t,e,n){return!t.startState||t.startState(e,n)}var tG=function(t,e,n){this.pos=this.start=0,this.string=t,this.tabSize=e||8,this.lastColumnPos=this.lastColumnValue=0,this.lineStart=0,this.lineOracle=n};function tK(t,e){if((e-=t.first)<0||e>=t.size)throw Error("There is no line "+(e+t.first)+" in the document.");for(var n=t;!n.lines;)for(var o=0;;++o){var r=n.children[o],i=r.chunkSize();if(e<i){n=r;break}e-=i}return n.lines[e]}function tY(t,e,n){var o=[],r=e.line;return t.iter(e.line,n.line+1,function(t){var i=t.text;r==n.line&&(i=i.slice(0,n.ch)),r==e.line&&(i=i.slice(e.ch)),o.push(i),++r}),o}function tJ(t,e,n){var o=[];return t.iter(e,n,function(t){o.push(t.text)}),o}function tX(t,e){var n=e-t.height;if(n)for(var o=t;o;o=o.parent)o.height+=n}function tZ(t){if(null==t.parent)return null;for(var e=t.parent,n=K(e.lines,t),o=e.parent;o;e=o,o=o.parent)for(var r=0;o.children[r]!=e;++r)n+=o.children[r].chunkSize();return n+e.first}function tQ(t,e){var n=t.first;t:do{for(var o=0;o<t.children.length;++o){var r=t.children[o],i=r.height;if(e<i){t=r;continue t}e-=i,n+=r.chunkSize()}return n}while(!t.lines);for(var a=0;a<t.lines.length;++a){var s=t.lines[a].height;if(e<s)break;e-=s}return n+a}function t0(t,e){return e>=t.first&&e<t.first+t.size}function t1(t,e){return String(t.lineNumberFormatter(e+t.firstLineNumber))}function t2(t,e,n){if(void 0===n&&(n=null),!(this instanceof t2))return new t2(t,e,n);this.line=t,this.ch=e,this.sticky=n}function t3(t,e){return t.line-e.line||t.ch-e.ch}function t5(t,e){return t.sticky==e.sticky&&0==t3(t,e)}function t4(t){return t2(t.line,t.ch)}function t9(t,e){return 0>t3(t,e)?e:t}function t6(t,e){return 0>t3(t,e)?t:e}function t7(t,e){return Math.max(t.first,Math.min(e,t.first+t.size-1))}function t8(t,e){if(e.line<t.first)return t2(t.first,0);var n,o,r,i=t.first+t.size-1;return e.line>i?t2(i,tK(t,i).text.length):(n=e,o=tK(t,e.line).text.length,null==(r=n.ch)||r>o?t2(n.line,o):r<0?t2(n.line,0):n)}function et(t,e){for(var n=[],o=0;o<e.length;o++)n[o]=t8(t,e[o]);return n}tG.prototype.eol=function(){return this.pos>=this.string.length},tG.prototype.sol=function(){return this.pos==this.lineStart},tG.prototype.peek=function(){return this.string.charAt(this.pos)||void 0},tG.prototype.next=function(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)},tG.prototype.eat=function(t){var e=this.string.charAt(this.pos);if("string"==typeof t?e==t:e&&(t.test?t.test(e):t(e)))return++this.pos,e},tG.prototype.eatWhile=function(t){for(var e=this.pos;this.eat(t););return this.pos>e},tG.prototype.eatSpace=function(){for(var t=this.pos;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>t},tG.prototype.skipToEnd=function(){this.pos=this.string.length},tG.prototype.skipTo=function(t){var e=this.string.indexOf(t,this.pos);if(e>-1)return this.pos=e,!0},tG.prototype.backUp=function(t){this.pos-=t},tG.prototype.column=function(){return this.lastColumnPos<this.start&&(this.lastColumnValue=q(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue-(this.lineStart?q(this.string,this.lineStart,this.tabSize):0)},tG.prototype.indentation=function(){return q(this.string,null,this.tabSize)-(this.lineStart?q(this.string,this.lineStart,this.tabSize):0)},tG.prototype.match=function(t,e,n){if("string"==typeof t){var o=function(t){return n?t.toLowerCase():t};if(o(this.string.substr(this.pos,t.length))==o(t))return!1!==e&&(this.pos+=t.length),!0}else{var r=this.string.slice(this.pos).match(t);return r&&r.index>
vendor: 23,094 bytes, line 1
10?null:(r&&!1!==e&&(this.pos+=r[0].length),r)}},tG.prototype.current=function(){return this.string.slice(this.start,this.pos)},tG.prototype.hideFirstChars=function(t,e){this.lineStart+=t;try{return e()}finally{this.lineStart-=t}},tG.prototype.lookAhead=function(t){var e=this.lineOracle;return e&&e.lookAhead(t)},tG.prototype.baseToken=function(){var t=this.lineOracle;return t&&t.baseToken(this.pos)};var ee=function(t,e){this.state=t,this.lookAhead=e},en=function(t,e,n,o){this.state=e,this.doc=t,this.line=n,this.maxLookAhead=o||0,this.baseTokens=null,this.baseTokenPos=1};function eo(t,e,n,o){var r=[t.state.modeGen],i={};ef(t,e.text,t.doc.mode,n,function(t,e){return r.push(t,e)},i,o);for(var a=n.state,s=0;s<t.state.overlays.length;++s)!function(o){n.baseTokens=r;var s=t.state.overlays[o],l=1,c=0;n.state=!0,ef(t,e.text,s.mode,n,function(t,e){for(var n=l;c<t;){var o=r[l];o>t&&r.splice(l,1,t,r[l+1],o),l+=2,c=Math.min(t,o)}if(e)if(s.opaque)r.splice(n,l-n,t,"overlay "+e),l=n+2;else for(;n<l;n+=2){var i=r[n+1];r[n+1]=(i?i+" ":"")+"overlay "+e}},i),n.state=a,n.baseTokens=null,n.baseTokenPos=1}(s);return{styles:r,classes:i.bgClass||i.textClass?i:null}}function er(t,e,n){if(!e.styles||e.styles[0]!=t.state.modeGen){var o=ei(t,tZ(e)),r=e.text.length>t.options.maxHighlightLength&&tW(t.doc.mode,o.state),i=eo(t,e,o);r&&(o.state=r),e.stateAfter=o.save(!r),e.styles=i.styles,i.classes?e.styleClasses=i.classes:e.styleClasses&&(e.styleClasses=null),n===t.doc.highlightFrontier&&(t.doc.modeFrontier=Math.max(t.doc.modeFrontier,++t.doc.highlightFrontier))}return e.styles}function ei(t,e,n){var o=t.doc,r=t.display;if(!o.mode.startState)return new en(o,!0,e);var i=function(t,e,n){for(var o,r,i=t.doc,a=n?-1:e-(t.doc.mode.innerMode?1e3:100),s=e;s>a;--s){if(s<=i.first)return i.first;var l=tK(i,s-1),c=l.stateAfter;if(c&&(!n||s+(c instanceof ee?c.lookAhead:0)<=i.modeFrontier))return s;var u=q(l.text,null,t.options.tabSize);(null==r||o>u)&&(r=s-1,o=u)}return r}(t,e,n),a=i>o.first&&tK(o,i-1).stateAfter,s=a?en.fromSaved(o,a,i):new en(o,tq(o.mode),i);return o.iter(i,e,function(n){ea(t,n.text,s);var o=s.line;n.stateAfter=o==e-1||o%5==0||o>=r.viewFrom&&o<r.viewTo?s.save():null,s.nextLine()}),n&&(o.modeFrontier=s.line),s}function ea(t,e,n,o){var r=t.doc.mode,i=new tG(e,t.options.tabSize,n);for(i.start=i.pos=o||0,""==e&&es(r,n.state);!i.eol();)el(r,i,n.state),i.start=i.pos}function es(t,e){if(t.blankLine)return t.blankLine(e);if(t.innerMode){var n=t$(t,e);if(n.mode.blankLine)return n.mode.blankLine(n.state)}}function el(t,e,n,o){for(var r=0;r<10;r++){o&&(o[0]=t$(t,n).mode);var i=t.token(e,n);if(e.pos>e.start)return i}throw Error("Mode "+t.name+" failed to advance stream.")}en.prototype.lookAhead=function(t){var e=this.doc.getLine(this.line+t);return null!=e&&t>this.maxLookAhead&&(this.maxLookAhead=t),e},en.prototype.baseToken=function(t){if(!this.baseTokens)return null;for(;this.baseTokens[this.baseTokenPos]<=t;)this.baseTokenPos+=2;var e=this.baseTokens[this.baseTokenPos+1];return{type:e&&e.replace(/( |^)overlay .*/,""),size:this.baseTokens[this.baseTokenPos]-t}},en.prototype.nextLine=function(){this.line++,this.maxLookAhead>0&&this.maxLookAhead--},en.fromSaved=function(t,e,n){return e instanceof ee?new en(t,tW(t.mode,e.state),n,e.lookAhead):new en(t,tW(t.mode,e),n)},en.prototype.save=function(t){var e=!1!==t?tW(this.doc.mode,this.state):this.state;return this.maxLookAhead>0?new ee(e,this.maxLookAhead):e};var ec=function(t,e,n){this.start=t.start,this.end=t.pos,this.string=t.current(),this.type=e||null,this.state=n};function eu(t,e,n,o){var r,i=t.doc,a=i.mode;e=t8(i,e);var s,l=tK(i,e.line),c=ei(t,e.line,n),u=new tG(l.text,t.options.tabSize,c);for(o&&(s=[]);(o||u.pos<e.ch)&&!u.eol();)u.start=u.pos,r=el(a,u,c.state),o&&s.push(new ec(u,r,tW(i.mode,c.state)));return o?s:new ec(u,r,c.state)}function ep(t,e){if(t)for(;;){var n=t.match(/(?:^|\s+)line-(background-)?(\S+)/);if(!n)break;t=t.slice(0,n.index)+t.slice(n.index+n[0].length);var o=n[1]?"bgClass":"textClass";null==e[o]?e[o]=n[2]:RegExp("(?:^|\\s)"+n[2]+"(?:$|\\s)").test(e[o])||(e[o]+=" "+n[2])}return t}function ef(t,e,n,o,r,i,a){var s=n.flattenSpans;null==s&&(s=t.options.flattenSpans);var l,c=0,u=null,p=new tG(e,t.options.tabSize,o),f=t.options.addModeClass&&[null];for(""==e&&ep(es(n,o.state),i);!p.eol();){if(p.pos>t.options.maxHighlightLength?(s=!1,a&&ea(t,e,o,p.pos),p.pos=e.length,l=null):l=ep(el(n,p,o.state,f),i),f){var d=f[0].name;d&&(l="m-"+(l?d+" "+l:d))}if(!s||u!=l){for(;c<p.start;)r(c=Math.min(p.start,c+5e3),u);u=l}p.start=p.pos}for(;c<p.pos;){var h=Math.min(p.pos,c+5e3);r(h,u),c=h}}var ed=!1,eh=!1;function eg(t,e,n){this.marker=t,this.from=e,this.to=n}function ev(t,e){if(t)for(var n=0;n<t.length;++n){var o=t[n];if(o.marker==e)return o}}function ey(t,e){if(e.full)return null;var n=t0(t,e.from.line)&&tK(t,e.from.line).markedSpans,o=t0(t,e.to.line)&&tK(t,e.to.line).markedSpans;if(!n&&!o)return null;var r=e.from.ch,i=e.to.ch,a=0==t3(e.from,e.to),s=function(t,e,n){var o;if(t)for(var r=0;r<t.length;++r){var i=t[r],a=i.marker;if(null==i.from||(a.inclusiveLeft?i.from<=e:i.from<e)||i.from==e&&"bookmark"==a.type&&(!n||!i.marker.insertLeft)){var s=null==i.to||(a.inclusiveRight?i.to>=e:i.to>e);(o||(o=[])).push(new eg(a,i.from,s?null:i.to))}}return o}(n,r,a),l=function(t,e,n){var o;if(t)for(var r=0;r<t.length;++r){var i=t[r],a=i.marker;if(null==i.to||(a.inclusiveRight?i.to>=e:i.to>e)||i.from==e&&"bookmark"==a.type&&(!n||i.marker.insertLeft)){var s=null==i.from||(a.inclusiveLeft?i.from<=e:i.from<e);(o||(o=[])).push(new eg(a,s?null:i.from-e,null==i.to?null:i.to-e))}}return o}(o,i,a),c=1==e.text.length,u=tn(e.text).length+(c?r:0);if(s)for(var p=0;p<s.length;++p){var f=s[p];if(null==f.to){var d=ev(l,f.marker);d?c&&(f.to=null==d.to?null:d.to+u):f.to=r}}if(l)for(var h=0;h<l.length;++h){var g=l[h];null!=g.to&&(g.to+=u),null==g.from?!ev(s,g.marker)&&(g.from=u,c&&(s||(s=[])).push(g)):(g.from+=u,c&&(s||(s=[])).push(g))}s&&(s=em(s)),l&&l!=s&&(l=em(l));var v=[s];if(!c){var y,m=e.text.length-2;if(m>0&&s)for(var b=0;b<s.length;++b)null==s[b].to&&(y||(y=[])).push(new eg(s[b].marker,null,null));for(var w=0;w<m;++w)v.push(y);v.push(l)}return v}function em(t){for(var e=0;e<t.length;++e){var n=t[e];null!=n.from&&n.from==n.to&&!1!==n.marker.clearWhenEmpty&&t.splice(e--,1)}return t.length?t:null}function eb(t){var e=t.markedSpans;if(e){for(var n=0;n<e.length;++n)e[n].marker.detachLine(t);t.markedSpans=null}}function ew(t,e){if(e){for(var n=0;n<e.length;++n)e[n].marker.attachLine(t);t.markedSpans=e}}function e_(t){return t.inclusiveLeft?-1:0}function eC(t){return+!!t.inclusiveRight}function ex(t,e){var n=t.lines.length-e.lines.length;if(0!=n)return n;var o=t.find(),r=e.find(),i=t3(o.from,r.from)||e_(t)-e_(e);if(i)return-i;var a=t3(o.to,r.to)||eC(t)-eC(e);return a||e.id-t.id}function eO(t,e){var n,o=eh&&t.markedSpans;if(o)for(var r=void 0,i=0;i<o.length;++i)(r=o[i]).marker.collapsed&&(e?r.from:r.to)==null&&(!n||0>ex(n,r.marker))&&(n=r.marker);return n}function eS(t,e,n,o,r){var i=tK(t,e),a=eh&&i.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=t3(c.from,n)||e_(l.marker)-e_(r),p=t3(c.to,o)||eC(l.marker)-eC(r);if((!(u>=0)||!(p<=0))&&(!(u<=0)||!(p>=0))&&(u<=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?t3(c.to,n)>=0:t3(c.to,n)>0)||u>=0&&(l.marker.inclusiveRight&&r.inclusiveLeft?0>=t3(c.from,o):0>t3(c.from,o))))return!0}}}function eT(t){for(var e;e=eO(t,!0);)t=e.find(-1,!0).line;return t}function eP(t,e){var n=tK(t,e),o=eT(n);return n==o?e:tZ(o)}function eE(t,e){if(e>t.lastLine())return e;var n,o=tK(t,e);if(!ek(t,o))return e;for(;n=eO(o,!1);)o=n.find(1,!0).line;return tZ(o)+1}function ek(t,e){var n=eh&&e.markedSpans;if(n){for(var o=void 0,r=0;r<n.length;++r)if((o=n[r]).marker.collapsed&&(null==o.from||!o.marker.widgetNode&&0==o.from&&o.marker.inclusiveLeft&&function t(e,n,o){if(null==o.to){var r=o.marker.find(1,!0);return t(e,r.line,ev(r.line.markedSpans,o.marker))}if(o.marker.inclusiveRight&&o.to==n.text.length)return!0;for(var i=void 0,a=0;a<n.markedSpans.length;++a)if((i=n.markedSpans[a]).marker.collapsed&&!i.marker.widgetNode&&i.from==o.to&&(null==i.to||i.to!=o.from)&&(i.marker.inclusiveLeft||o.marker.inclusiveRight)&&t(e,n,i))return!0}(t,e,o)))return!0}}function ej(t){t=eT(t);for(var e=0,n=t.parent,o=0;o<n.lines.length;++o){var r=n.lines[o];if(r==t)break;e+=r.height}for(var i=n.parent;i;i=(n=i).parent)for(var a=0;a<i.children.length;++a){var s=i.children[a];if(s==n)break;e+=s.height}return e}function eA(t){if(0==t.height)return 0;for(var e,n=t.text.length,o=t;e=eO(o,!0);){var r=e.find(0,!0);o=r.from.line,n+=r.from.ch-r.to.ch}for(o=t;e=eO(o,!1);){var i=e.find(0,!0);n-=o.text.length-i.from.ch,n+=(o=i.to.line).text.length-i.to.ch}return n}function eM(t){var e=t.display,n=t.doc;e.maxLine=tK(n,n.first),e.maxLineLength=eA(e.maxLine),e.maxLineChanged=!0,n.iter(function(t){var n=eA(t);n>e.maxLineLength&&(e.maxLineLength=n,e.maxLine=t)})}var eD=function(t,e,n){this.text=t,ew(this,e),this.height=n?n(this):1};eD.prototype.lineNo=function(){return tZ(this)},tT(eD);var eL={},eI={};function eN(t,e){if(!t||/^\s*$/.test(t))return null;var n=e.addModeClass?eI:eL;return n[t]||(n[t]=t.replace(/\S+/g,"cm-$&"))}function eR(t,e){var n=V("span",null,null,y?"padding-right: .1px":null),a={pre:V("pre",[n],"CodeMirror-line"),content:n,col:0,pos:0,cm:t,trailingSpace:!1,splitSpaces:t.getOption("lineWrapping")};e.measure={};for(var s=0;s<=(e.rest?e.rest.length:0);s++){var l=s?e.rest[s-1]:e.line,c=void 0;a.pos=0,a.addToken=eV,function(t){if(null!=i)return i;var e=N(t,document.createTextNode("AØ®A")),n=o(e,0,1).getBoundingClientRect(),r=o(e,1,2).getBoundingClientRect();return I(t),!!n&&n.left!=n.right&&(i=r.right-n.right<3)}(t.display.measure)&&(c=ty(l,t.doc.direction))&&(a.addToken=function(t,e){return function(n,o,r,i,a,s,l){r=r?r+" cm-force-border":"cm-force-border";for(var c=n.pos,u=c+o.length;;){for(var p=void 0,f=0;f<e.length&&(!((p=e[f]).to>c)||!(p.from<=c));f++);if(p.to>=u)return t(n,o,r,i,a,s,l);t(n,o.slice(0,p.to-c),r,i,null,s,l),i=null,o=o.slice(p.to-c),c=p.to}}}(a.addToken,c)),a.map=[];var u=e!=t.display.externalMeasured&&tZ(l);(function(t,e,n){var o=t.markedSpans,r=t.text,i=0;if(!o){for(var a=1;a<n.length;a+=2)e.addToken(e,r.slice(i,i=n[a]),eN(n[a+1],e.cm.options));return}for(var s,l,c,u,p,f,d,h=r.length,g=0,v=1,y="",m=0;;){if(m==g){c=u=p=l="",d=null,f=null,m=1/0;for(var b=[],w=void 0,_=0;_<o.length;++_){var C=o[_],x=C.marker;if("bookmark"==x.type&&C.from==g&&x.widgetNode)b.push(x);else if(C.from<=g&&(null==C.to||C.to>g||x.collapsed&&C.to==g&&C.from==g)){if(null!=C.to&&C.to!=g&&m>C.to&&(m=C.to,u=""),x.className&&(c+=" "+x.className),x.css&&(l=(l?l+";":"")+x.css),x.startStyle&&C.from==g&&(p+=" "+x.startStyle),x.endStyle&&C.to==m&&(w||(w=[])).push(x.endStyle,C.to),x.title&&((d||(d={})).title=x.title),x.attributes)for(var O in x.attributes)(d||(d={}))[O]=x.attributes[O];x.collapsed&&(!f||0>ex(f.marker,x))&&(f=C)}else C.from>g&&m>C.from&&(m=C.from)}if(w)for(var S=0;S<w.length;S+=2)w[S+1]==m&&(u+=" "+w[S]);if(!f||f.from==g)for(var T=0;T<b.length;++T)eF(e,0,b[T]);if(f&&(f.from||0)==g){if(eF(e,(null==f.to?h+1:f.to)-g,f.marker,null==f.from),null==f.to)return;f.to==g&&(f=!1)}}if(g>=h)break;for(var P=Math.min(h,m);;){if(y){var E=g+y.length;if(!f){var k=E>P?y.slice(0,P-g):y;e.addToken(e,k,s?s+c:c,p,g+k.length==m?u:"",l,d)}if(E>=P){y=y.slice(P-g),g=P;break}g=E,p=""}y=r.slice(i,i=n[v++]),s=eN(n[v++],e.cm.options)}}})(l,a,er(t,l,u)),l.styleClasses&&(l.styleClasses.bgClass&&(a.bgClass=B(l.styleClasses.bgClass,a.bgClass||"")),l.styleClasses.textClass&&(a.textClass=B(l.styleClasses.textClass,a.textClass||""))),0==a.map.length&&a.map.push(0,0,a.content.appendChild(function(t){if(null==r){var e=R("span","â");N(t,R("span",[e,document.createTextNode("x")])),0!=t.firstChild.offsetHeight&&(r=e.offsetWidth<=1&&e.offsetHeight>2&&!(g&&v<8))}var n=r?R("span","â"):R("span","\xa0",null,"display: inline-block; width: 1px; margin-right: -1px");return n.setAttribute("cm-text",""),n}(t.display.measure))),0==s?(e.measure.map=a.map,e.measure.cache={}):((e.measure.maps||(e.measure.maps=[])).push(a.map),(e.measure.caches||(e.measure.caches=[])).push({}))}if(y){var p=a.content.lastChild;(/\bcm-tab\b/.test(p.className)||p.querySelector&&p.querySelector(".cm-tab"))&&(a.content.className="cm-tab-wrap-hack")}return tC(t,"renderLine",t,e.line,a.pre),a.pre.className&&(a.textClass=B(a.pre.className,a.textClass||"")),a}function eV(t,e,n,o,r,i,a){if(e){var s,l=t.splitSpaces?function(t,e){if(t.length>1&&!/ /.test(t))return t;for(var n=e,o="",r=0;r<t.length;r++){var i=t.charAt(r);" "==i&&n&&(r==t.length-1||32==t.charCodeAt(r+1))&&(i="\xa0"),o+=i,n=" "==i}return o}(e,t.trailingSpace):e,c=t.cm.state.specialChars,u=!1;if(c.test(e)){s=document.createDocumentFragment();for(var p=0;;){c.lastIndex=p;var f=c.exec(e),d=f?f.index-p:e.length-p;if(d){var h=document.createTextNode(l.slice(p,p+d));g&&v<9?s.appendChild(R("span",[h])):s.appendChild(h),t.map.push(t.pos,t.pos+d,h),t.col+=d,t.pos+=d}if(!f)break;p+=d+1;var y=void 0;if(" "==f[0]){var m=t.cm.options.tabSize,b=m-t.col%m;(y=s.appendChild(R("span",te(b),"cm-tab"))).setAttribute("role","presentation"),y.setAttribute("cm-text"," "),t.col+=b}else"\r"==f[0]||"\n"==f[0]?(y=s.appendChild(R("span","\r"==f[0]?"â":"â¤","cm-invalidchar"))).setAttribute("cm-text",f[0]):((y=t.cm.options.specialCharPlaceholder(f[0])).setAttribute("cm-text",f[0]),g&&v<9?s.appendChild(R("span",[y])):s.appendChild(y)),t.col+=1;t.map.push(t.pos,t.pos+1,y),t.pos++}}else t.col+=e.length,s=document.createTextNode(l),t.map.push(t.pos,t.pos+e.length,s),g&&v<9&&(u=!0),t.pos+=e.length;if(t.trailingSpace=32==l.charCodeAt(e.length-1),n||o||r||u||i||a){var w=n||"";o&&(w+=o),r&&(w+=r);var _=R("span",[s],w,i);if(a)for(var C in a)a.hasOwnProperty(C)&&"style"!=C&&"class"!=C&&_.setAttribute(C,a[C]);return t.content.appendChild(_)}t.content.appendChild(s)}}function eF(t,e,n,o){var r=!o&&n.widgetNode;r&&t.map.push(t.pos,t.pos+e,r),!o&&t.cm.display.input.needsContentAttribute&&(r||(r=t.content.appendChild(document.createElement("span"))),r.setAttribute("cm-marker",n.id)),r&&(t.cm.display.input.setUneditable(r),t.content.appendChild(r)),t.pos+=e,t.trailingSpace=!1}function eH(t,e,n){this.line=e,this.rest=function(t){for(var e,n;e=eO(t,!1);)t=e.find(1,!0).line,(n||(n=[])).push(t);return n}(e),this.size=this.rest?tZ(tn(this.rest))-n+1:1,this.node=this.text=null,this.hidden=ek(t,e)}function eU(t,e,n){for(var o,r=[],i=e;i<n;i=o){var a=new eH(t.doc,tK(t.doc,i),i);o=i+a.size,r.push(a)}return r}var eB=null,ez=null;function eW(t,e){var n=tw(t,e);if(n.length){var o,r=Array.prototype.slice.call(arguments,2);eB?o=eB.delayedCallbacks:ez?o=ez:(o=ez=[],setTimeout(e$,0));for(var i=function(t){o.push(function(){return n[t].apply(null,r)})},a=0;a<n.length;++a)i(a)}}function e$(){var t=ez;ez=null;for(var e=0;e<t.length;++e)t[e]()}function eq(t,e,n,o){for(var r=0;r<e.changes.length;r++){var i=e.changes[r];"text"==i?function(t,e){var n=e.text.className,o=eK(t,e);e.text==e.node&&(e.node=o.pre),e.text.parentNode.replaceChild(o.pre,e.text),e.text=o.pre,o.bgClass!=e.bgClass||o.textClass!=e.textClass?(e.bgClass=o.bgClass,e.textClass=o.textClass,eY(t,e)):n&&(e.text.className=n)}(t,e):"gutter"==i?eJ(t,e,n,o):"class"==i?eY(t,e):"widget"==i&&function(t,e,n){e.alignable&&(e.alignable=null);for(var o=D("CodeMirror-linewidget"),r=e.node.firstChild,i=void 0;r;r=i)i=r.nextSibling,o.test(r.className)&&e.node.removeChild(r);eX(t,e,n)}(t,e,o)}e.changes=null}function eG(t){return t.node==t.text&&(t.node=R("div",null,null,"position: relative"),t.text.parentNode&&t.text.parentNode.replaceChild(t.node,t.text),t.node.appendChild(t.text),g&&v<8&&(t.node.style.zIndex=2)),t.node}function eK(t,e){var n=t.display.externalMeasured;return n&&n.line==e.line?(t.display.externalMeasured=null,e.measure=n.measure,n.built):eR(t,e)}function eY(t,e){var n=e.bgClass?e.bgClass+" "+(e.line.bgClass||""):e.line.bgClass;if(n&&(n+=" CodeMirror-linebackground"),e.background)n?e.background.className=n:(e.background.parentNode.removeChild(e.background),e.background=null);else if(n){var o=eG(e);e.background=o.insertBefore(R("div",null,n),o.firstChild),t.display.input.setUneditable(e.background)}e.line.wrapClass?eG(e).className=e.line.wrapClass:e.node!=e.text&&(e.node.className="");var r=e.textClass?e.textClass+" "+(e.line.textClass||""):e.line.textClass;e.text.className=r||""}function eJ(t,e,n,o){if(e.gutter&&(e.node.removeChild(e.gutter),e.gutter=null),e.gutterBackground&&(e.node.removeChild(e.gutterBackground),e.gutterBackground=null),e.line.gutterClass){var r=eG(e);e.gutterBackground=R("div",null,"CodeMirror-gutter-background "+e.line.gutterClass,"left: "+(t.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px; width: "+o.gutterTotalWidth+"px"),t.display.input.setUneditable(e.gutterBackground),r.insertBefore(e.gutterBackground,e.text)}var i=e.line.gutterMarkers;if(t.options.lineNumbers||i){var a=eG(e),s=e.gutter=R("div",null,"CodeMirror-gutter-wrapper","left: "+(t.options.fixedGutter?o.fixedPos:-o.gutterTotalWidth)+"px");if(s.setAttribute("aria-hidden","true"),t.display.input.setUneditable(s),a.insertBefore(s,e.text),e.line.gutterClass&&(s.className+=" "+e.line.gutterClass),!t.options.lineNumbers||i&&i["CodeMirror-linenumbers"]||(e.lineNumber=s.appendChild(R("div",t1(t.options,n),"CodeMirror-linenumber CodeMirror-gutter-elt","left: "+o.gutterLeft["CodeMirror-linenumbers"]+"px; width: "+t.display.lineNumInnerWidth+"px"))),i)for(var l=0;l<t.display.gutterSpecs.length;++l){var c=t.display.gutterSpecs[l].className,u=i.hasOwnProperty(c)&&i[c];u&&s.appendChild(R("div",[u],"CodeMirror-gutter-elt","left: "+o.gutterLeft[c]+"px; width: "+o.gutterWidth[c]+"px"))}}}function eX(t,e,n){if(eZ(t,e.line,e,n,!0),e.rest)for(var o=0;o<e.rest.length;o++)eZ(t,e.rest[o],e,n,!1)}function eZ(t,e,n,o,r){if(e.widgets)for(var i=eG(n),a=0,s=e.widgets;a<s.length;++a){var l=s[a],c=R("div",[l.node],"CodeMirror-linewidget"+(l.className?" "+l.className:""));l.handleMouseEvents||c.setAttribute("cm-ignore-events","true"),function(t,e,n,o){if(t.noHScroll){(n.alignable||(n.alignable=[])).push(e);var r=o.wrapperWidth;e.style.left=o.fixedPos+"px",t.coverGutter||(r-=o.gutterTotalWidth,e.style.paddingLeft=o.gutterTotalWidth+"px"),e.style.width=r+"px"}t.coverGutter&&(e.style.zIndex=5,e.style.position="relative",t.noHScroll||(e.style.marginLeft=-o.gutterTotalWidth+"px"))}(l,c,n,o),t.display.input.setUneditable(c),r&&l.above?i.insertBefore(c,n.gutter||n.text):i.appendChild(c),eW(l,"redraw")}}function eQ(t){if(null!=t.height)return t.height;var e=t.doc.cm;if(!e)return 0;if(!F(document.body,t.node)){var n="position: relative;";t.coverGutter&&(n+="margin-left: -"+e.display.gutters.offsetWidth+"px;"),t.noHScroll&&(n+="width: "+e.display.wrapper.clientWidth+"px;"),N(e.display.measure,R("div",[t.node],null,n))}return t.height=t.node.parentNode.offsetHeight}function e0(t,e){for(var n=tA(e);n!=t.wrapper;n=n.parentNode)if(!n||1==n.nodeType&&"true"==n.getAttribute("cm-ignore-events")||n.parentNode==t.sizer&&n!=t.mover)return!0}function e1(t){return t.lineSpace.offsetTop}function e2(t){return t.mover.offsetHeight-t.lineSpace.offsetHeight}function e3(t){if(t.cachedPaddingH)return t.cachedPaddingH;var e=N(t.measure,R("pre","x","CodeMirror-line-like")),n=window.getComputedStyle?window.getComputedStyle(e):e.currentStyle,o={left:parseInt(n.paddingLeft),right:parseInt(n.paddingRight)};return isNaN(o.left)||isNaN(o.right)||(t.cachedPaddingH=o),o}function e5(t){return 50-t.display.nativeBarWidth}function e4(t){return t.display.scroller.clientWidth-e5(t)-t.display.barWidth}function e9(t){return t.display.scroller.clientHeight-e5(t)-t.display.barHeight}function e6(t,e,n){if(t.line==e)return{map:t.measure.map,cache:t.measure.cache};for(var o=0;o<t.rest.length;o++)if(t.rest[o]==e)return{map:t.measure.maps[o],cache:t.measure.caches[o]};for(var r=0;r<t.rest.length;r++)if(tZ(t.rest[r])>n)return{map:t.measure.maps[r],cache:t.measure.caches[r],before:!0}}function e7(t,e){if(e>=t.display.viewFrom&&e<t.display.viewTo)return t.display.view[nT(t,e)];var n=t.display.externalMeasured;if(n&&e>=n.lineN&&e<n.lineN+n.size)return n}function e8(t,e){var n,o,r,i,a=tZ(e),s=e7(t,a);s&&!s.text?s=null:s&&s.changes&&(eq(t,s,a,n_(t)),t.curOp.forceUpdate=!0),s||(o=tZ(n=eT(n=e)),(r=t.display.externalMeasured=new eH(t.doc,n,o)).lineN=o,i=r.built=eR(t,r),r.text=i.pre,N(t.display.lineMeasure,i.pre),s=r);var l=e6(s,e,a);return{line:e,view:s,rect:null,map:l.map,cache:l.cache,before:l.before,hasHeights:!1}}function nt(t,e,n,r,i){e.before&&(n=-1);var a,s=n+(r||"");return e.cache.hasOwnProperty(s)?a=e.cache[s]:(e.rect||(e.rect=e.view.text.getBoundingClientRect()),e.hasHeights||(!function(t,e,n){var o=t.options.lineWrapping,r=o&&e4(t);if(!e.measure.heights||o&&e.measure.width!=r){var i=e.measure.heights=[];if(o){e.measure.width=r;for(var a=e.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&&i.push((l.bottom+c.top)/2-n.top)}}i.push(n.bottom-n.top)}}(t,e.view,e.rect),e.hasHeights=!0),(a=function(t,e,n,r){var i,a,s=nn(e.map,n,r),l=s.node,c=s.start,u=s.end,p=s.collapse;if(3==l.nodeType){for(var f=0;f<4;f++){for(;c&&tp(e.line.text.charAt(s.coverStart+c));)--c;for(;s.coverStart+u<s.coverEnd&&tp(e.line.text.charAt(s.coverStart+u));)++u;if((i=g&&v<9&&0==c&&u==s.coverEnd-s.coverStart?l.parentNode.getBoundingClientRect():function(t,e){var n=ne;if("left"==e)for(var o=0;o<t.length&&(n=t[o]).left==n.right;o++);else for(var r=t.length-1;r>=0&&(n=t[r]).left==n.right;r--);return n}(o(l,c,u).getClientRects(),r)).left||i.right||0==c)break;u=c,c-=1,p="right"}g&&v<11&&(i=function(t,e){if(!window.screen||null==screen.logicalXDPI||screen.logicalXDPI==screen.deviceXDPI||!function(t){if(null!=tR)return tR;var e=N(t,R("span","x")),n=e.getBoundingClientRect(),r=o(e,0,1).getBoundingClientRect();return tR=Math.abs(n.left-r.left)>1}(t))return e;var n=screen.logicalXDPI/screen.deviceXDPI,r=screen.logicalYDPI/screen.deviceYDPI;return{left:e.left*n,right:e.right*n,top:e.top*r,bottom:e.bottom*r}}(t.display.measure,i))}else c>0&&(p=r="right"),i=t.options.lineWrapping&&(a=l.getClientRects()).length>1?a["right"==r?a.length-1:0]:l.getBoundingClientRect();if(g&&v<9&&!c&&(!i||!i.left&&!i.right)){var d=l.parentNode.getClientRects()[0];i=d?{left:d.left,right:d.left+nw(t.display),top:d.top,bottom:d.bottom}:ne}for(var h=i.top-e.rect.top,y=i.bottom-e.rect.top,m=(h+y)/2,b=e.view.measure.heights,w=0;w<b.length-1&&!(m<b[w]);w++);var _=w?b[w-1]:0,C=b[w],x={left:("right"==p?i.right:i.left)-e.rect.left,right:("left"==p?i.left:i.right)-e.rect.left,top:_,bottom:C};return i.left||i.right||(x.bogus=!0),t.options.singleCursorHeightPerLine||(x.rtop=h,x.rbottom=y),x}(t,e,n,r)).bogus||(e.cache[s]=a)),{left:a.left,right:a.right,top:i?a.rtop:a.top,bottom:i?a.rbottom:a.bottom}}var ne={left:0,right:0,top:0,bottom:0};function nn(t,e,n){for(var o,r,i,a,s,l,c=0;c<t.length;c+=3)if(s=t[c],l=t[c+1],e<s?(r=0,i=1,a="left"):e<l?i=(r=e-s)+1:(c==t.length-3||e==l&&t[c+3]>e)&&(r=(i=l-s)-1,e>=l&&(a="right")),null!=r){if(o=t[c+2],s==l&&n==(o.insertLeft?"left"
vendor: 5,811 bytes, line 1
1:"right")&&(a=n),"left"==n&&0==r)for(;c&&t[c-2]==t[c-3]&&t[c-1].insertLeft;)o=t[(c-=3)+2],a="left";if("right"==n&&r==l-s)for(;c<t.length-3&&t[c+3]==t[c+4]&&!t[c+5].insertLeft;)o=t[(c+=3)+2],a="right";break}return{node:o,start:r,end:i,collapse:a,coverStart:s,coverEnd:l}}function no(t){if(t.measure&&(t.measure.cache={},t.measure.heights=null,t.rest))for(var e=0;e<t.rest.length;e++)t.measure.caches[e]={}}function nr(t){t.display.externalMeasure=null,I(t.display.lineMeasure);for(var e=0;e<t.display.view.length;e++)no(t.display.view[e])}function ni(t){nr(t),t.display.cachedCharWidth=t.display.cachedTextHeight=t.display.cachedPaddingH=null,t.options.lineWrapping||(t.display.maxLineChanged=!0),t.display.lineNumChars=null}function na(){return b&&S?-(document.body.getBoundingClientRect().left-parseInt(getComputedStyle(document.body).marginLeft)):window.pageXOffset||(document.documentElement||document.body).scrollLeft}function ns(){return b&&S?-(document.body.getBoundingClientRect().top-parseInt(getComputedStyle(document.body).marginTop)):window.pageYOffset||(document.documentElement||document.body).scrollTop}function nl(t){var e=0;if(t.widgets)for(var n=0;n<t.widgets.length;++n)t.widgets[n].above&&(e+=eQ(t.widgets[n]));return e}function nc(t,e,n,o,r){if(!r){var i=nl(e);n.top+=i,n.bottom+=i}if("line"==o)return n;o||(o="local");var a=ej(e);if("local"==o?a+=e1(t.display):a-=t.display.viewOffset,"page"==o||"window"==o){var s=t.display.lineSpace.getBoundingClientRect();a+=s.top+("window"==o?0:ns());var l=s.left+("window"==o?0:na());n.left+=l,n.right+=l}return n.top+=a,n.bottom+=a,n}function nu(t,e,n){if("div"==n)return e;var o=e.left,r=e.top;if("page"==n)o-=na(),r-=ns();else if("local"==n||!n){var i=t.display.sizer.getBoundingClientRect();o+=i.left,r+=i.top}var a=t.display.lineSpace.getBoundingClientRect();return{left:o-a.left,top:r-a.top}}function np(t,e,n,o,r){var i,a;return o||(o=tK(t.doc,e.line)),nc(t,o,(i=o,a=e.ch,nt(t,e8(t,i),a,r)),n)}function nf(t,e,n,o,r,i){function a(e,a){var s=nt(t,r,e,a?"right":"left",i);return a?s.left=s.right:s.right=s.left,nc(t,o,s,n)}o=o||tK(t.doc,e.line),r||(r=e8(t,o));var s=ty(o,t.doc.direction),l=e.ch,c=e.sticky;if(l>=o.text.length?(l=o.text.length,c="before"):l<=0&&(l=0,c="after"),!s)return a("before"==c?l-1:l,"before"==c);function u(t,e,n){return a(n?t-1:t,1==s[e].level!=n)}var p=tg(s,l,c),f=th,d=u(l,p,"before"==c);return null!=f&&(d.other=u(l,f,"before"!=c)),d}function nd(t,e){var n=0;e=t8(t.doc,e),t.options.lineWrapping||(n=nw(t.display)*e.ch);var o=tK(t.doc,e.line),r=ej(o)+e1(t.display);return{left:n,right:n,top:r,bottom:r+o.height}}function nh(t,e,n,o,r){var i=t2(t,e,n);return i.xRel=r,o&&(i.outside=o),i}function ng(t,e,n){var o=t.doc;if((n+=t.display.viewOffset)<0)return nh(o.first,0,null,-1,-1);var r=tQ(o,n),i=o.first+o.size-1;if(r>i)return nh(o.first+o.size-1,tK(o,i).text.length,null,1,1);e<0&&(e=0);for(var a=tK(o,r);;){var s=function(t,e,n,o,r){r-=ej(e);var i=e8(t,e),a=nl(e),s=0,l=e.text.length,c=!0,u=ty(e,t.doc.direction);if(u){var p=(t.options.lineWrapping?function(t,e,n,o,r,i,a){var s=nv(t,e,o,a),l=s.begin,c=s.end;/\s/.test(e.text.charAt(c-1))&&c--;for(var u=null,p=null,f=0;f<r.length;f++){var d=r[f];if(!(d.from>=c)&&!(d.to<=l)){var h=nt(t,o,1!=d.level?Math.min(c,d.to)-1:Math.max(l,d.from)).right,g=h<i?i-h+1e9:h-i;(!u||p>g)&&(u=d,p=g)}}return u||(u=r[r.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(t,e,n,o,r,i,a){var s=td(function(s){var l=r[s],c=1!=l.level;return nm(nf(t,t2(n,c?l.to:l.from,c?"before":"after"),"line",e,o),i,a,!0)},0,r.length-1),l=r[s];if(s>0){var c=1!=l.level,u=nf(t,t2(n,c?l.from:l.to,c?"after":"before"),"line",e,o);nm(u,i,a,!0)&&u.top>a&&(l=r[s-1])}return l})(t,e,n,i,u,o,r);s=(c=1!=p.level)?p.from:p.to-1,l=c?p.to:p.from-1}var f,d,h=null,g=null,v=td(function(e){var n=nt(t,i,e);return n.top+=a,n.bottom+=a,!!nm(n,o,r,!1)&&(n.top<=r&&n.left<=o&&(h=e,g=n),!0)},s,l),y=!1;if(g){var m=o-g.left<g.right-o,b=m==c;v=h+ +!b,d=b?"after":"before",f=m?g.left:g.right}else{!c&&(v==l||v==s)&&v++,d=0==v?"after":v==e.text.length?"before":nt(t,i,v-!!c).bottom+a<=r==c?"after":"before";var w=nf(t,t2(n,v,d),"line",e,i);f=w.left,y=r<w.top?-1:+(r>=w.bottom)}return nh(n,v=tf(e.text,v,1),d,y,o-f)}(t,a,r,e,n),l=function(t,e){var n,o=eh&&t.markedSpans;if(o)for(var r=0;r<o.length;++r){var i=o[r];i.marker.collapsed&&(null==i.from||i.from<e)&&(null==i.to||i.to>e)&&(!n||0>ex(n,i.marker))&&(n=i.marker)}return n}(a,s.ch+ +(s.xRel>0||s.outside>0));if(!l)return s;var c=l.find(1);if(c.line==r)return c;a=tK(o,r=c.line)}}function nv(t,e,n,o){o-=nl(e);var r=e.text.length,i=td(function(e){return nt(t,n,e-1).bottom<=o},r,0);return r=td(function(e){return nt(t,n,e).top>o},i,r),{begin:i,end:r}}function ny(t,e,n,o){n||(n=e8(t,e));var r=nc(t,e,nt(t,n,o),"line").top;return nv(t,e,n,r)}function nm(t,e,n,o){return!(t.bottom<=n)&&(t.top>n||(o?t.left:t.right)>e)}function nb(t){if(null!=t.cachedTextHeight)return t.cachedTextHeight;if(null==a){a=R("pre",null,"CodeMirror-line-like");for(var e=0;e<49;++e)a.appendChild(document.createTextNode("x")),a.appendChild(R("br"));a.appendChild(document.createTextNode("x"))}N(t.measure,a);var n=a.offsetHeight/50;return n>3&&(t.cachedTextHeight=n),I(t.measure),n||1}function nw(t){if(null!=t.cachedCharWidth)return t.cachedCharWidth;var e=R("span","xxxxxxxxxx"),n=R("pre",[e],"CodeMirror-line-like");N(t.measure,n);var o=e.getBoundingClientRect(),r=(o.right-o.left)/10;return r>2&&(t.cachedCharWidth=r),r||10}function n_(t){for(var e=t.display,n={},o={},r=e.gutters.clientLeft,i=e.gutters.firstChild,a=0;i;i=i.nextSibling,++a){var s=t.display.gutterSpecs[a].className;n[s]=i.offsetLeft+i.clientLeft+r,o[s]=i.clientWidth}return{fixedPos:nC(e),gutterTotalWidth:e.gutters.offsetWidth,gutterLeft:n,gutterWidth:o,wrapperW
vendor: 5,073 bytes, line 1
1idth:e.wrapper.clientWidth}}function nC(t){return t.scroller.getBoundingClientRect().left-t.sizer.getBoundingClientRect().left}function nx(t){var e=nb(t.display),n=t.options.lineWrapping,o=n&&Math.max(5,t.display.scroller.clientWidth/nw(t.display)-3);return function(r){if(ek(t.doc,r))return 0;var i=0;if(r.widgets)for(var a=0;a<r.widgets.length;a++)r.widgets[a].height&&(i+=r.widgets[a].height);return n?i+(Math.ceil(r.text.length/o)||1)*e:i+e}}function nO(t){var e=t.doc,n=nx(t);e.iter(function(t){var e=n(t);e!=t.height&&tX(t,e)})}function nS(t,e,n,o){var r=t.display;if(!n&&"true"==tA(e).getAttribute("cm-not-content"))return null;var i,a,s=r.lineSpace.getBoundingClientRect();try{i=e.clientX-s.left,a=e.clientY-s.top}catch(t){return null}var l,c=ng(t,i,a);if(o&&c.xRel>0&&(l=tK(t.doc,c.line).text).length==c.ch){var u=q(l,l.length,t.options.tabSize)-l.length;c=t2(c.line,Math.max(0,Math.round((i-e3(t.display).left)/nw(t.display))-u))}return c}function nT(t,e){if(e>=t.display.viewTo||(e-=t.display.viewFrom)<0)return null;for(var n=t.display.view,o=0;o<n.length;o++)if((e-=n[o].size)<0)return o}function nP(t,e,n,o){null==e&&(e=t.doc.first),null==n&&(n=t.doc.first+t.doc.size),o||(o=0);var r=t.display;if(o&&n<r.viewTo&&(null==r.updateLineNumbers||r.updateLineNumbers>e)&&(r.updateLineNumbers=e),t.curOp.viewChanged=!0,e>=r.viewTo)eh&&eP(t.doc,e)<r.viewTo&&nk(t);else if(n<=r.viewFrom)eh&&eE(t.doc,n+o)>r.viewFrom?nk(t):(r.viewFrom+=o,r.viewTo+=o);else if(e<=r.viewFrom&&n>=r.viewTo)nk(t);else if(e<=r.viewFrom){var i=nj(t,n,n+o,1);i?(r.view=r.view.slice(i.index),r.viewFrom=i.lineN,r.viewTo+=o):nk(t)}else if(n>=r.viewTo){var a=nj(t,e,e,-1);a?(r.view=r.view.slice(0,a.index),r.viewTo=a.lineN):nk(t)}else{var s=nj(t,e,e,-1),l=nj(t,n,n+o,1);s&&l?(r.view=r.view.slice(0,s.index).concat(eU(t,s.lineN,l.lineN)).concat(r.view.slice(l.index)),r.viewTo+=o):nk(t)}var c=r.externalMeasured;c&&(n<c.lineN?c.lineN+=o:e<c.lineN+c.size&&(r.externalMeasured=null))}function nE(t,e,n){t.curOp.viewChanged=!0;var o=t.display,r=t.display.externalMeasured;if(r&&e>=r.lineN&&e<r.lineN+r.size&&(o.externalMeasured=null),!(e<o.viewFrom)&&!(e>=o.viewTo)){var i=o.view[nT(t,e)];if(null!=i.node){var a=i.changes||(i.changes=[]);-1==K(a,n)&&a.push(n)}}}function nk(t){t.display.viewFrom=t.display.viewTo=t.doc.first,t.display.view=[],t.display.viewOffset=0}function nj(t,e,n,o){var r,i=nT(t,e),a=t.display.view;if(!eh||n==t.doc.first+t.doc.size)return{index:i,lineN:n};for(var s=t.display.viewFrom,l=0;l<i;l++)s+=a[l].size;if(s!=e){if(o>0){if(i==a.length-1)return null;r=s+a[i].size-e,i++}else r=s-e;e+=r,n+=r}for(;eP(t.doc,n)!=n;){if(i==(o<0?0:a.length-1))return null;n+=o*a[i-(o<0)].size,i+=o}return{index:i,lineN:n}}function nA(t){for(var e=t.display.view,n=0,o=0;o<e.length;o++){var r=e[o];!r.hidden&&(!r.node||r.changes)&&++n}return n}function nM(t){t.display.input.showSelection(t.display.input.prepareSelection())}function nD(t,e){void 0===e&&(e=!0);for(var n=t.doc,o={},r=o.cursors=document.createDocumentFragment(),i=o.selection=document.createDocumentFragment(),a=0;a<n.sel.ranges.length;a++)if(e||a!=n.sel.primIndex){var s=n.sel.ranges[a];if(!(s.from().line>=t.display.viewTo)&&!(s.to().line<t.display.viewFrom)){var l=s.empty();(l||t.options.showCursorWhenSelecting)&&nL(t,s.head,r),l||function(t,e,n){var o=t.display,r=t.doc,i=document.createDocumentFragment(),a=e3(t.display),s=a.left,l=Math.max(o.sizerWidth,e4(t)-o.sizer.offsetLeft)-a.right,c="ltr"==r.direction;function u(t,e,n,o){e<0&&(e=0),e=Math.round(e),o=Math.round(o),i.appendChild(R("div",null,"CodeMirror-selected","position: absolute; left: "+t+"px;\n top: "+e+"px; width: "+(null==n?l-t:n)+"px;\n height: "+(o-e)+"px"))}function p(e,n,o){var i,a,p=tK(r,e),f=p.text.length;function d(n,o){return np(t,t2(e,n),"div",p,o)}function h(e,n,o){var r=ny(t,p,null,e),i="ltr"==n==("after"==o)?"left":"right";return d("after"==o?r.begin:r.end-(/\s/.test(p.text.charAt(r.end-1))?2:1),i)[i]}var g=ty(p,r.direction);return!function(t,e,n,o){if(!t)return o(e,n,"ltr",0);for(var r=!1,i=0;i<t.length;++i){var a=t[i];(a.from<n&&a.to>e||e==n&&a.to==e)&&(o(Math.max(a.from,e),Math.min(a.to,n),1==a.level?"rtl":"ltr",i),r=!0)}r||o(e,n,"ltr")}(g,n||0,null==o?f:o,function(t,e,r,p){var v,y,m,b,w="ltr"==r,_=d(t,w?"left":"right"),C=d(e-1,w?"right":"left"),x=null==n&&0==t,O=null==o&&e==f,S=0==p,T=!g||p==g.length-1;if(C.top-_.top<=3){var P=(c?x:O)&&S,E=(c?O:x)&&T,k=P?s:(w?_:C).left,j=E?l:(w?C:_).right;u(k,_.top,j-k,_.bottom)}else w?(v=c&&x&&S?s:_.left,y=c?l:h(t,r,"before"),m=c?s:h(e,r,"after"),b=c&&O&&T?l:C.right):(v=c?h(t,r,"before"):s,y=!c&&x&&S?l:_.right,m=!c&&O&&T?s:C.left,b=c?h(e,r,"after"):l),u(v,_.top,y-v,_.bottom),_.bottom<C.top&&u(s,_.bottom,null,C.top),u(m,C.top,b-m,C.bottom);(!i||0>nI(_,i))&&(i=_),0>nI(C,i)&&(i=C),(!a||0>nI(_,a))&&(a=_),0>nI(C,a)&&(a=C)}),{start:i,end:a}}var f=e.from(),d=e.to();if(f.line==d.line)p(f.line,f.ch,d.ch);else{var h=tK(r,f.line),g=tK(r,d.line),v=eT(h)==eT(g),y=p(f.line,f.ch,v?h.text.length+1:null).end,m=p(d.line,v?0:null,d.ch).start;
vendor: 2,597 bytes, line 1
1v&&(y.top<m.top-2?(u(y.right,y.top,null,y.bottom),u(s,m.top,m.left,m.bottom)):u(y.right,y.top,m.left-y.right,y.bottom)),y.bottom<m.top&&u(s,y.bottom,null,m.top)}n.appendChild(i)}(t,s,i)}}return o}function nL(t,e,n){var o=nf(t,e,"div",null,null,!t.options.singleCursorHeightPerLine),r=n.appendChild(R("div","\xa0","CodeMirror-cursor"));if(r.style.left=o.left+"px",r.style.top=o.top+"px",r.style.height=Math.max(0,o.bottom-o.top)*t.options.cursorHeight+"px",/\bcm-fat-cursor\b/.test(t.getWrapperElement().className)){var i=np(t,e,"div",null,null);i.right-i.left>0&&(r.style.width=i.right-i.left+"px")}if(o.other){var a=n.appendChild(R("div","\xa0","CodeMirror-cursor CodeMirror-secondarycursor"));a.style.display="",a.style.left=o.other.left+"px",a.style.top=o.other.top+"px",a.style.height=(o.other.bottom-o.other.top)*.85+"px"}}function nI(t,e){return t.top-e.top||t.left-e.left}function nN(t){if(t.state.focused){var e=t.display;clearInterval(e.blinker);var n=!0;e.cursorDiv.style.visibility="",t.options.cursorBlinkRate>0?e.blinker=setInterval(function(){t.hasFocus()||nH(t),e.cursorDiv.style.visibility=(n=!n)?"":"hidden"},t.options.cursorBlinkRate):t.options.cursorBlinkRate<0&&(e.cursorDiv.style.visibility="hidden")}}function nR(t){!t.hasFocus()&&(t.display.input.focus(),t.state.focused||nF(t))}function nV(t){t.state.delayingBlurEvent=!0,setTimeout(function(){t.state.delayingBlurEvent&&(t.state.delayingBlurEvent=!1,t.state.focused&&nH(t))},100)}function nF(t,e){t.state.delayingBlurEvent&&!t.state.draggingText&&(t.state.delayingBlurEvent=!1),"nocursor"!=t.options.readOnly&&(t.state.focused||(tC(t,"focus",t,e),t.state.focused=!0,U(t.display.wrapper,"CodeMirror-focused"),!t.curOp&&t.display.selForContextMenu!=t.doc.sel&&(t.display.input.reset(),y&&setTimeout(function(){return t.display.input.reset(!0)},20)),t.display.input.receivedFocus()),nN(t))}function nH(t,e){t.state.delayingBlurEvent||(t.state.focused&&(tC(t,"blur",t,e),t.state.focused=!1,L(t.display.wrapper,"CodeMirror-focused")),clearInterval(t.display.blinker),setTimeout(function(){t.state.focused||(t.display.shift=!1)},150))}function nU(t){for(var e=t.display,n=e.lineDiv.offsetTop,o=Math.max(0,e.scroller.getBoundingClientRect().top),r=e.lineDiv.getBoundingClientRect().top,i=0,a=0;a<e.view.length;a++){var s=e.view[a],l=t.options.lineWrapping,c=void 0,u=0;if(!s.hidden){if(r+=s.line.height,g&&v<8){var p=s.node.offsetTop+s.node.offsetHeight;c=p-n,n=p}else{var f=s.node.getBoundingClientRect();c=f.bottom-f.top,!l&&s.text.firstChild&&(u=s.text.firstChild.getBoundingClientRect().right-f.left-1)}var d=s.line.height-c;
vendor: 4,072 bytes, line 1
1if((d>.005||d<-.005)&&(r<o&&(i-=d),tX(s.line,c),nB(s.line),s.rest))for(var h=0;h<s.rest.length;h++)nB(s.rest[h]);if(u>t.display.sizerWidth){var y=Math.ceil(u/nw(t.display));y>t.display.maxLineLength&&(t.display.maxLineLength=y,t.display.maxLine=s.line,t.display.maxLineChanged=!0)}}}Math.abs(i)>2&&(e.scroller.scrollTop+=i)}function nB(t){if(t.widgets)for(var e=0;e<t.widgets.length;++e){var n=t.widgets[e],o=n.node.parentNode;o&&(n.height=o.offsetHeight)}}function nz(t,e,n){var o=n&&null!=n.top?Math.max(0,n.top):t.scroller.scrollTop;o=Math.floor(o-e1(t));var r=n&&null!=n.bottom?n.bottom:o+t.wrapper.clientHeight,i=tQ(e,o),a=tQ(e,r);if(n&&n.ensure){var s=n.ensure.from.line,l=n.ensure.to.line;s<i?(i=s,a=tQ(e,ej(tK(e,s))+t.wrapper.clientHeight)):Math.min(l,e.lastLine())>=a&&(i=tQ(e,ej(tK(e,l))-t.wrapper.clientHeight),a=l)}return{from:i,to:Math.max(a,i+1)}}function nW(t,e){var n=t.display,o=nb(t.display);e.top<0&&(e.top=0);var r=t.curOp&&null!=t.curOp.scrollTop?t.curOp.scrollTop:n.scroller.scrollTop,i=e9(t),a={};e.bottom-e.top>i&&(e.bottom=e.top+i);var s=t.doc.height+e2(n),l=e.top<o,c=e.bottom>s-o;if(e.top<r)a.scrollTop=l?0:e.top;else if(e.bottom>r+i){var u=Math.min(e.top,(c?s:e.bottom)-i);u!=r&&(a.scrollTop=u)}var p=t.options.fixedGutter?0:n.gutters.offsetWidth,f=t.curOp&&null!=t.curOp.scrollLeft?t.curOp.scrollLeft:n.scroller.scrollLeft-p,d=e4(t)-n.gutters.offsetWidth,h=e.right-e.left>d;return h&&(e.right=e.left+d),e.left<10?a.scrollLeft=0:e.left<f?a.scrollLeft=Math.max(0,e.left+p-10*!h):e.right>d+f-3&&(a.scrollLeft=e.right+10*!h-d),a}function n$(t,e){null!=e&&(nK(t),t.curOp.scrollTop=(null==t.curOp.scrollTop?t.doc.scrollTop:t.curOp.scrollTop)+e)}function nq(t){nK(t);var e=t.getCursor();t.curOp.scrollToPos={from:e,to:e,margin:t.options.cursorScrollMargin}}function nG(t,e,n){(null!=e||null!=n)&&nK(t),null!=e&&(t.curOp.scrollLeft=e),null!=n&&(t.curOp.scrollTop=n)}function nK(t){var e=t.curOp.scrollToPos;if(e){t.curOp.scrollToPos=null;var n=nd(t,e.from),o=nd(t,e.to);nY(t,n,o,e.margin)}}function nY(t,e,n,o){var r=nW(t,{left:Math.min(e.left,n.left),top:Math.min(e.top,n.top)-o,right:Math.max(e.right,n.right),bottom:Math.max(e.bottom,n.bottom)+o});nG(t,r.scrollLeft,r.scrollTop)}function nJ(t,e){2>Math.abs(t.doc.scrollTop-e)||(p||ol(t,{top:e}),nX(t,e,!0),p&&ol(t),oo(t,100))}function nX(t,e,n){e=Math.max(0,Math.min(t.display.scroller.scrollHeight-t.display.scroller.clientHeight,e)),(t.display.scroller.scrollTop!=e||n)&&(t.doc.scrollTop=e,t.display.scrollbars.setScrollTop(e),t.display.scroller.scrollTop!=e&&(t.display.scroller.scrollTop=e))}function nZ(t,e,n,o){e=Math.max(0,Math.min(e,t.display.scroller.scrollWidth-t.display.scroller.clientWidth)),((n?e!=t.doc.scrollLeft:!(2>Math.abs(t.doc.scrollLeft-e)))||o)&&(t.doc.scrollLeft=e,op(t),t.display.scroller.scrollLeft!=e&&(t.display.scroller.scrollLeft=e),t.display.scrollbars.setScrollLeft(e))}function nQ(t){var e=t.display,n=e.gutters.offsetWidth,o=Math.round(t.doc.height+e2(t.display));return{clientHeight:e.scroller.clientHeight,viewHeight:e.wrapper.clientHeight,scrollWidth:e.scroller.scrollWidth,clientWidth:e.scroller.clientWidth,viewWidth:e.wrapper.clientWidth,barLeft:t.options.fixedGutter?n:0,docHeight:o,scrollHeight:o+e5(t)+e.barHeight,nativeBarWidth:e.nativeBarWidth,gutterWidth:n}}var n0=function(t,e,n){this.cm=n;var o=this.vert=R("div",[R("div",null,null,"min-width: 1px")],"CodeMirror-vscrollbar"),r=this.horiz=R("div",[R("div",null,null,"height: 100%; min-height: 1px")],"CodeMirror-hscrollbar");o.tabIndex=r.tabIndex=-1,t(o),t(r),tb(o,"scroll",function(){o.clientHeight&&e(o.scrollTop,"vertical")}),tb(r,"scroll",function(){r.clientWidth&&e(r.scrollLeft,"horizontal")}),this.checkedZeroWidth=!1,g&&v<8&&(this.horiz.style.minHeight=this.vert.style.minWidth="18px")};n0.prototype.update=function(t){var e=t.scrollWidth>t.clientWidth+1,n=t.scrollHeight>t.clientHeight+1,o=t.nativeBarWidth;if(n){this.vert.style.display="block",this.vert.style.bottom=e?o+"px":"0";var r=t.viewHeight-(e?o:0);this.vert.firstChild.style.height=Math.max(0,t.scrollHeight-t.clientHeight+r)+"px"}
vendor: 4,650 bytes, line 1
1else this.vert.style.display="",this.vert.firstChild.style.height="0";if(e){this.horiz.style.display="block",this.horiz.style.right=n?o+"px":"0",this.horiz.style.left=t.barLeft+"px";var i=t.viewWidth-t.barLeft-(n?o:0);this.horiz.firstChild.style.width=Math.max(0,t.scrollWidth-t.clientWidth+i)+"px"}else this.horiz.style.display="",this.horiz.firstChild.style.width="0";return!this.checkedZeroWidth&&t.clientHeight>0&&(0==o&&this.zeroWidthHack(),this.checkedZeroWidth=!0),{right:n?o:0,bottom:e?o:0}},n0.prototype.setScrollLeft=function(t){this.horiz.scrollLeft!=t&&(this.horiz.scrollLeft=t),this.disableHoriz&&this.enableZeroWidthBar(this.horiz,this.disableHoriz,"horiz")},n0.prototype.setScrollTop=function(t){this.vert.scrollTop!=t&&(this.vert.scrollTop=t),this.disableVert&&this.enableZeroWidthBar(this.vert,this.disableVert,"vert")},n0.prototype.zeroWidthHack=function(){this.horiz.style.height=this.vert.style.width=P&&!C?"12px":"18px",this.horiz.style.pointerEvents=this.vert.style.pointerEvents="none",this.disableHoriz=new G,this.disableVert=new G},n0.prototype.enableZeroWidthBar=function(t,e,n){t.style.pointerEvents="auto",e.set(1e3,function o(){var r=t.getBoundingClientRect();("vert"==n?document.elementFromPoint(r.right-1,(r.top+r.bottom)/2):document.elementFromPoint((r.right+r.left)/2,r.bottom-1))!=t?t.style.pointerEvents="none":e.set(1e3,o)})},n0.prototype.clear=function(){var t=this.horiz.parentNode;t.removeChild(this.horiz),t.removeChild(this.vert)};var n1=function(){};function n2(t,e){e||(e=nQ(t));var n=t.display.barWidth,o=t.display.barHeight;n3(t,e);for(var r=0;r<4&&n!=t.display.barWidth||o!=t.display.barHeight;r++)n!=t.display.barWidth&&t.options.lineWrapping&&nU(t),n3(t,nQ(t)),n=t.display.barWidth,o=t.display.barHeight}function n3(t,e){var n=t.display,o=n.scrollbars.update(e);n.sizer.style.paddingRight=(n.barWidth=o.right)+"px",n.sizer.style.paddingBottom=(n.barHeight=o.bottom)+"px",n.heightForcer.style.borderBottom=o.bottom+"px solid transparent",o.right&&o.bottom?(n.scrollbarFiller.style.display="block",n.scrollbarFiller.style.height=o.bottom+"px",n.scrollbarFiller.style.width=o.right+"px"):n.scrollbarFiller.style.display="",o.bottom&&t.options.coverGutterNextToScrollbar&&t.options.fixedGutter?(n.gutterFiller.style.display="block",n.gutterFiller.style.height=o.bottom+"px",n.gutterFiller.style.width=e.gutterWidth+"px"):n.gutterFiller.style.display=""}n1.prototype.update=function(){return{bottom:0,right:0}},n1.prototype.setScrollLeft=function(){},n1.prototype.setScrollTop=function(){},n1.prototype.clear=function(){};var n5={native:n0,null:n1};function n4(t){t.display.scrollbars&&(t.display.scrollbars.clear(),t.display.scrollbars.addClass&&L(t.display.wrapper,t.display.scrollbars.addClass)),t.display.scrollbars=new n5[t.options.scrollbarStyle](function(e){t.display.wrapper.insertBefore(e,t.display.scrollbarFiller),tb(e,"mousedown",function(){t.state.focused&&setTimeout(function(){return t.display.input.focus()},0)}),e.setAttribute("cm-not-content","true")},function(e,n){"horizontal"==n?nZ(t,e):nJ(t,e)},t),t.display.scrollbars.addClass&&U(t.display.wrapper,t.display.scrollbars.addClass)}var n9=0;function n6(t){var e;t.curOp={cm:t,viewChanged:!1,startHeight:t.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:++n9,markArrays:null},e=t.curOp,eB?eB.ops.push(e):e.ownsGroup=eB={ops:[e],delayedCallbacks:[]}}function n7(t){var e=t.curOp;e&&function(t,e){var n=t.ownsGroup;if(n)try{var o=n.delayedCallbacks,r=0;do{for(;r<o.length;r++)o[r].call(null);for(var i=0;i<n.ops.length;i++){var a=n.ops[i];if(a.cursorActivityHandlers)for(;a.cursorActivityCalled<a.cursorActivityHandlers.length;)a.cursorActivityHandlers[a.cursorActivityCalled++].call(null,a.cm)}}while(r<o.length)}finally{eB=null,e(n)}}(e,function(t){for(var e=0;e<t.ops.length;e++)t.ops[e].cm.curOp=null;!function(t){for(var e,n=t.ops,o=0;o<n.length;o++)!function(t){var e=t.cm,n=e.display;(function(t){var e=t.display;!e.scrollbarsClipped&&e.scroller.offsetWidth&&(e.nativeBarWidth=e.scroller.offsetWidth-e.scroller.clientWidth,e.heightForcer.style.height=e5(t)+"px",e.sizer.style.marginBottom=-e.nativeBarWidth+"px",e.sizer.style.borderRightWidth=e5(t)+"px",e.scrollbarsClipped=!0)})(e),t.updateMaxLine&&eM(e),t.mustUpdate=t.viewChanged||t.forceUpdate||null!=t.scrollTop||t.scrollToPos&&(t.scrollToPos.from.line<n.viewFrom||t.scrollToPos.to.line>=n.viewTo)||n.maxLineChanged&&e.options.lineWrapping,t.update=t.mustUpdate&&new oi(e,t.mustUpdate&&{top:t.scrollTop,ensure:t.
1scrollToPos},t.forceUpdate)}(n[o]);for(var r=0;r<n.length;r++){(e=n[r]).updatedDisplay=e.mustUpdate&&oa(e.cm,e.update)}for(var i=0;i<n.length;i++)!function(t){var e,n,o=t.cm,r=o.display;t.updatedDisplay&&nU(o),t.barMeasure=nQ(o),r.maxLineChanged&&!o.options.lineWrapping&&(t.adjustWidthTo=(e=r.maxLine,n=r.maxLine.text.length,nt(o,e8(o,e),n,void 0)).left+3,o.display.sizerWidth=t.adjustWidthTo,t.barMeasure.scrollWidth=Math.max(r.scroller.clientWidth,r.sizer.offsetLeft+t.adjustWidthTo+e5(o)+o.display.barWidth),t.maxScrollLeft=Math.max(0,r.sizer.offsetLeft+t.adjustWidthTo-e4(o))),(t.updatedDisplay||t.selectionChanged)&&(t.preparedSelection=r.input.prepareSelection())}(n[i]);for(var a=0;a<n.length;a++)!function(t){var e=t.cm;null!=t.adjustWidthTo&&(e.display.sizer.style.minWidth=t.adjustWidthTo+"px",t.maxScrollLeft<e.doc.scrollLeft&&nZ(e,Math.min(e.display.scroller.scrollLeft,t.maxScrollLeft),!0),e.display.maxLineChanged=!1);var n=t.focus&&t.focus==H();t.preparedSelection&&e.display.input.showSelection(t.preparedSelection,n),(t.updatedDisplay||t.startHeight!=e.doc.height)&&n2(e,t.barMeasure),t.updatedDisplay&&ou(e,t.barMeasure),t.selectionChanged&&nN(e),e.state.focused&&t.updateInput&&e.display.input.reset(t.typing),n&&nR(t.cm)}(n[a]);for(var s=0;s<n.length;s++)!function(t){var e=t.cm,n=e.display,o=e.doc;if(t.updatedDisplay&&os(e,t.update),null!=n.wheelStartX&&(null!=t.scrollTop||null!=t.scrollLeft||t.scrollToPos)&&(n.wheelStartX=n.wheelStartY=null),null!=t.scrollTop&&nX(e,t.scrollTop,t.forceScroll),null!=t.scrollLeft&&nZ(e,t.scrollLeft,!0,!0),t.scrollToPos){var r=function(t,e,n,o){null==o&&(o=0),t.options.lineWrapping||e!=n||(n="before"==e.sticky?t2(e.line,e.ch+1,"before"):e,e=e.ch?t2(e.line,"before"==e.sticky?e.ch-1:e.ch,"after"):e);for(var r,i=0;i<5;i++){var a=!1,s=nf(t,e),l=n&&n!=e?nf(t,n):s,c=nW(t,r={left:Math.min(s.left,l.left),top:Math.min(s.top,l.top)-o,right:Math.max(s.left,l.left),bottom:Math.max(s.bottom,l.bottom)+o}),u=t.doc.scrollTop,p=t.doc.scrollLeft;if(null!=c.scrollTop&&(nJ(t,c.scrollTop),Math.abs(t.doc.scrollTop-u)>1&&(a=!0)),null!=c.scrollLeft&&(nZ(t,c.scrollLeft),Math.abs(t.doc.scrollLeft-p)>1&&(a=!0)),!a)break}return r}(e,t8(o,t.scrollToPos.from),t8(o,t.scrollToPos.to),t.scrollToPos.margin);if(!tx(e,"scrollCursorIntoView")){var i=e.display,a=i.sizer.getBoundingClientRect(),s=null;if(r.top+a.top<0?s=!0:r.bottom+a.top>(window.innerHeight||document.documentElement.clientHeight)&&(s=!1),null!=s&&!x){var l=R("div","â",null,"position: absolute;\n top: "+(r.top-i.viewOffset-e1(e.display))+"px;\n height: "+(r.bottom-r.top+e5(e)+i.barHeight)+"px;\n left: "+r.left+"px; width: "+Math.max(2,r.right-r.left)+"px;");e.display.lineSpace.appendChild(l),l.scrollIntoView(s),e.display.lineSpace.removeChild(l)}}}var c=t.maybeHiddenMarkers,u=t.maybeUnhiddenMarkers;if(c)for(var p=0;p<c.length;++p)c[p].lines.length||tC(c[p],"hide");if(u)for(var f=0;f<u.length;++f)u[f].lines.length&&tC(u[f],"unhide");n.wrapper.offsetHeight&&(o.scrollTop=e.display.scroller.scrollTop),t.changeObjs&&tC(e,"changes",e,t.changeOb
vendor: 4,846 bytes, line 1
1js),t.update&&t.update.finish()}(n[s])}(t)})}function n8(t,e){if(t.curOp)return e();n6(t);try{return e()}finally{n7(t)}}function ot(t,e){return function(){if(t.curOp)return e.apply(t,arguments);n6(t);try{return e.apply(t,arguments)}finally{n7(t)}}}function oe(t){return function(){if(this.curOp)return t.apply(this,arguments);n6(this);try{return t.apply(this,arguments)}finally{n7(this)}}}function on(t){return function(){var e=this.cm;if(!e||e.curOp)return t.apply(this,arguments);n6(e);try{return t.apply(this,arguments)}finally{n7(e)}}}function oo(t,e){t.doc.highlightFrontier<t.display.viewTo&&t.state.highlight.set(e,W(or,t))}function or(t){var e=t.doc;if(!(e.highlightFrontier>=t.display.viewTo)){var n=+new Date+t.options.workTime,o=ei(t,e.highlightFrontier),r=[];e.iter(o.line,Math.min(e.first+e.size,t.display.viewTo+500),function(i){if(o.line>=t.display.viewFrom){var a=i.styles,s=i.text.length>t.options.maxHighlightLength?tW(e.mode,o.state):null,l=eo(t,i,o,!0);s&&(o.state=s),i.styles=l.styles;var c=i.styleClasses,u=l.classes;u?i.styleClasses=u:c&&(i.styleClasses=null);for(var p=!a||a.length!=i.styles.length||c!=u&&(!c||!u||c.bgClass!=u.bgClass||c.textClass!=u.textClass),f=0;!p&&f<a.length;++f)p=a[f]!=i.styles[f];p&&r.push(o.line),i.stateAfter=o.save(),o.nextLine()}else i.text.length<=t.options.maxHighlightLength&&ea(t,i.text,o),i.stateAfter=o.line%5==0?o.save():null,o.nextLine();if(+new Date>n)return oo(t,t.options.workDelay),!0}),e.highlightFrontier=o.line,e.modeFrontier=Math.max(e.modeFrontier,o.line),r.length&&n8(t,function(){for(var e=0;e<r.length;e++)nE(t,r[e],"text")})}}var oi=function(t,e,n){var o=t.display;this.viewport=e,this.visible=nz(o,t.doc,e),this.editorIsHidden=!o.wrapper.offsetWidth,this.wrapperHeight=o.wrapper.clientHeight,this.wrapperWidth=o.wrapper.clientWidth,this.oldDisplayWidth=e4(t),this.force=n,this.dims=n_(t),this.events=[]};function oa(t,e){var n,o,r,i=t.display,a=t.doc;if(e.editorIsHidden)return nk(t),!1;if(!e.force&&e.visible.from>=i.viewFrom&&e.visible.to<=i.viewTo&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo)&&i.renderedView==i.view&&0==nA(t))return!1;of(t)&&(nk(t),e.dims=n_(t));var s=a.first+a.size,l=Math.max(e.visible.from-t.options.viewportMargin,a.first),c=Math.min(s,e.visible.to+t.options.viewportMargin);i.viewFrom<l&&l-i.viewFrom<20&&(l=Math.max(a.first,i.viewFrom)),i.viewTo>c&&i.viewTo-c<20&&(c=Math.min(s,i.viewTo)),eh&&(l=eP(t.doc,l),c=eE(t.doc,c));var u=l!=i.viewFrom||c!=i.viewTo||i.lastWrapHeight!=e.wrapperHeight||i.lastWrapWidth!=e.wrapperWidth;n=l,o=c,0==(r=t.display).view.length||n>=r.viewTo||o<=r.viewFrom?(r.view=eU(t,n,o),r.viewFrom=n):(r.viewFrom>n?r.view=eU(t,n,r.viewFrom).concat(r.view):r.viewFrom<n&&(r.view=r.view.slice(nT(t,n))),r.viewFrom=n,r.viewTo<o?r.view=r.view.concat(eU(t,r.viewTo,o)):r.viewTo>o&&(r.view=r.view.slice(0,nT(t,o)))),r.viewTo=o,i.viewOffset=ej(tK(t.doc,i.viewFrom)),t.display.mover.style.top=i.viewOffset+"px";var p=nA(t);if(!u&&0==p&&!e.force&&i.renderedView==i.view&&(null==i.updateLineNumbers||i.updateLineNumbers>=i.viewTo))return!1;var f=function(t){if(t.hasFocus())return null;var e=H();if(!e||!F(t.display.lineDiv,e))return null;var n={activeElt:e};if(window.getSelection){var o=window.getSelection();o.anchorNode&&o.extend&&F(t.display.lineDiv,o.anchorNode)&&(n.anchorNode=o.anchorNode,n.anchorOffset=o.anchorOffset,n.focusNode=o.focusNode,n.focusOffset=o.focusOffset)}return n}(t);p>4&&(i.lineDiv.style.display="none"),function(t,e,n){var o=t.display,r=t.options.lineNumbers,i=o.lineDiv,a=i.firstChild;function s(e){var n=e.nextSibling;return y&&P&&t.display.currentWheelTarget==e?e.style.display="none":e.parentNode.removeChild(e),n}for(var l=o.view,c=o.viewFrom,u=0;u<l.length;u++){var p=l[u];if(p.hidden);else if(p.node&&p.node.parentNode==i){for(;a!=p.node;)a=s(a);var f=r&&null!=e&&e<=c&&p.lineNumber;p.changes&&(K(p.changes,"gutter")>-1&&(f=!1),eq(t,p,c,n)),f&&(I(p.lineNumber),p.lineNumber.appendChild(document.createTextNode(t1(t.options,c)))),a=p.node.nextSibling}else{var d=function(t,e,n,o){var r=eK(t,e);return e.text=e.node=r.pre,r.bgClass&&(e.bgClass=r.bgClass),r.textClass&&(e.textClass=r.textClass),eY(t,e),eJ(t,e,n,o),eX(t,e,o),e.node}(t,p,c,n);i.insertBefore(d,a)}c+=p.size}for(;a;)a=s(a)}(t,i.updateLineNumbers,e.dims),p>4&&(i.lineDiv.style.display=""),i.renderedView=i.view;if(f&&f.activeElt&&f.activeElt!=H()&&(f.activeElt.focus(),!/^(INPUT|TEXTAREA)$/.test(f.activeElt.nodeName)&&f.anchorNode&&F(document.body,f.anchorNode)&&F(document.body,f.focusNode))){var d=window.getSelection(),h=document.createRange();h.setEnd(f.anchorNode,f.anchorOffset),h.collapse(!1),d.removeAllRanges(),d.addRange(h),d.extend(f.focusNode,f.focusOffset)}return I(i.cursorDiv),I(i.selectionDiv),i.gutters.style.height=i.sizer.style.minHeight=0,u&&(i.lastWrapHeight=e.wrapperHeight,i.lastWrapWidth=e.wrapperW
1idth,oo(t,400)),i.updateLineNumbers=null,!0}function os(t,e){for(var n=e.viewport,o=!0;;o=!1){if(o&&t.options.lineWrapping&&e.oldDisplayWidth!=e4(t))o&&(e.visible=nz(t.display,t.doc,n));else if(n&&null!=n.top&&(n={top:Math.min(t.doc.height+e2(t.display)-e9(t),n.top)}),e.visible=nz(t.display,t.doc,n),e.visible.from>=t.display.viewFrom&&e.visible.to<=t.display.viewTo)break;if(!oa(t,e))break;nU(t);var r=nQ(t);nM(t),n2(t,r),ou(t,r),e.force=!1}e.signal(t,"update",t),(t.display.viewFrom!=t.display.reportedViewFrom||t.display.viewTo!=t.display.reportedViewTo)&&(e.signal(t,"viewportChange",t,t.display.viewFrom,t.display.viewTo),t.display.reportedViewFrom=t.display.viewFrom,t.display.reportedViewTo=t.display.viewTo)}function ol(t,e){var n=new oi(t,e);if(oa(t,n)){nU(t),os(t,n);var o=nQ(t);nM(t),n2(t,o),ou(t,o),n.finish()}}function oc(t){var e=t.gutters.offsetWidth;t.sizer.style.marginLeft=e+"px",eW(t,"gutterChanged",t)}function ou(t,e){t.display.sizer.style.minHeight=e.docHeight+"px",t.display.heightForcer.style.top=e.docHeight+"px",t.display.gutters.style.height=e.docHeight+t.display.barHeight+e5(t)+"px"}function op(t){var e=t.display,n=e.view;if(e.alignWidgets||e.gutters.firstChild&&t.options.fixedGutter){for(var o=nC(e)-e.scroller.scrollLeft+t.doc.scrollLeft,r=e.gutters.offsetWidth,i=o+"px",a=0;a<n.length;a++)if(!n[a].hidden){t.options.fixedGutter&&(n[a].gutter&&(n[a].gutter.style.left=i),n[a].gutterBackground&&(n[a].gutterBackground.style.left=i));var s=n[a].alignable;if(s)for(var l=0;l<s.length;l++)s[l].style.left=i}t.options.fixedGutter&&(e.gutters.style.left=o+r+"px")}}function of(t){if(!t.options.lineNumbers)return!1;var e=t.doc,n=t1(t.options,e.first+e.size-1),o=t.display;if(n.length!=o.lineNumChars){var r=o.measure.appendChild(R("div",[R("div",n)],"CodeMirror-linenumber CodeMirror-gutter-elt")),i=r.firstChild.offsetWidth,a=r.offsetWidth-i;return o.lineGutter.style.width="",o.lineNumInnerWidth=Math.max(i,o.lineGutter.offsetWidth-a)+1,o.lineNumWidth=o.lineNumInnerWidth+a,o.lineNumChars=o.lineNumInnerWidth?n.length:-1,o.lineGutter.style.width=o.lineNumWidth+"px",oc(t.display),!0}return!1}function od(t,e){for(var n=[],o=!1,r=0;r<t.length;r++){var i=t[r],a=null;if("string"!=typeof i&&(a=i.style,i=i.className),"CodeMirror-linenumbers"==i)if(!e)continue;else o=!0;n.push({className:i,style:a})}return e&&!o&&n.push({className:"CodeMirror-linenumbers",style:null}),n}function oh(t){var e=t.gutters,n=t.gutterSpecs;I(e),t.lineGutter=null;for(var o=0;o<n.length;++o){var r=n[o],i=r.className,a=r.style,s=e.appendChild(R("div",null,"CodeMirror-gutter "+i));a&&(s.style.cssText=a),"CodeMirror-linenumbers"==i&&(t.lineGutter=s,s.style.width=(t.lineNumWidth||1)+"px")}e.style.display=n.length?"":"none",oc(t)}function og(t){oh(t.display),nP(t),op(t)}function ov(t,e,n,o){this.input=n,this.scrollbarFiller=R("div",null,"CodeMirror-scrollbar-filler"),this.scrollbarFiller.setAttribute("cm-not-content","true"),this.gutterFiller=R("div",null,"CodeMirror-gutter-filler"),this.gutterFiller.setAttribute("cm-not-content","true"),this.lineDiv=V("div",null,"CodeMirror-code"),this.selectionDiv=R("div",null,null,"position: relative; z-index: 1"),this.cursorDiv=R("div",null,"CodeMirror-cursors"),this.measure=R("div",null,"CodeMirror-measure"),this.lineMeasure=R("div",null,"CodeMirror-measure"),this.lineSpace=V("div",[this.measure,this.lineMeasure,this.selectionDiv,this.cursorDiv,this.lineDiv],null,"position: relative; outline: none");var r=V("div",[this.lineSpace],"CodeMirror-lines");this.mover=R("div",[r],null,"position: relative"),this.sizer=R("div",[this.mover],"CodeMirror-sizer"),this.sizerWidth=null,this.heightForcer=R("div",null,null,"position: absolute; height: 50px; width: 1px;"),this.gutters=R("div",null,"CodeMirror-gutters"),this.lineGutter=null,this.scroller=R("div",[this.sizer,this.heightForcer,this.gutters],"CodeMirror-scroll"),this.scroller.setAttribute("tabIndex","-1"),this.wrapper=R("div",[this.scrollbarFiller,this.gutterFiller,this.scroller],"CodeMirror"),this.wrapper.setAttribute("translate","no"),g&&v<8&&(this.gutters.style.zIndex=-1,this.scroller.style.paddingRight=0),y||p&&T||(this.scroller.draggable=!0),t&&(t.appendChild?t.appendChild(this.wrapper):t(this.wrapper)),this.viewFrom=this.viewTo=e.first,this.reportedViewFrom=this.reportedViewTo=e.first,this.view=[],this.renderedView=null,this.externalMeasured=null,this.viewOffset=0,this.lastWrapHeight=this.lastWrapWidth=0,this.updateLineNumbers=null,this.nativeBarWidth=this.barHeight=this.barWidth=0,this.scrollbarsClipped=!1,this.lineNumWidth=this.lineNumInnerWidth=this.lineNumChars=null,this.alignWidgets=!1,this.cachedCharWidth=this.cachedTextHeight=this.cachedPaddingH=null,this.maxLine=null,this.maxLineLength=0,this.maxLineChanged=!1,this.wheelDX=this.wheelDY=this.wheelStartX=this.wheelStartY=null,this.shift=!1,this.selForContextMenu=null,this.activeTouch=null,this.gutterSpecs=od(o.gutters,o.lineNumbers),oh(this),n.init(this)}oi.prototype.signal=function(t,e){tS(t,e)&&this.events.push(arguments)},oi.prototype.finish=function(){for(var t=0;t<this.events.length;t++)tC.apply(null,this.events[t])};var oy=0,om=null;function ob(t){var e=t.wheelDeltaX,n=t.wheelDeltaY;return null==e&&t.detail&&t.axis==t.HORIZONTAL_AXIS&&(e=t.detail),null==n&&t.detail&&t.axis==t.VERTICAL_AXIS?n=t.detail
vendor: 6,986 bytes, line 1
1:null==n&&(n=t.wheelDelta),{x:e,y:n}}function ow(t,e){var n=ob(e),o=n.x,r=n.y,i=t.display,a=i.scroller,s=a.scrollWidth>a.clientWidth,l=a.scrollHeight>a.clientHeight;if(o&&s||r&&l){if(r&&P&&y){t:for(var c=e.target,u=i.view;c!=a;c=c.parentNode)for(var f=0;f<u.length;f++)if(u[f].node==c){t.display.currentWheelTarget=c;break t}}if(o&&!p&&!w&&null!=om){r&&l&&nJ(t,Math.max(0,a.scrollTop+r*om)),nZ(t,Math.max(0,a.scrollLeft+o*om)),(!r||r&&l)&&tP(e),i.wheelStartX=null;return}if(r&&null!=om){var d=r*om,h=t.doc.scrollTop,g=h+i.wrapper.clientHeight;d<0?h=Math.max(0,h+d-50):g=Math.min(t.doc.height,g+d+50),ol(t,{top:h,bottom:g})}oy<20&&(null==i.wheelStartX?(i.wheelStartX=a.scrollLeft,i.wheelStartY=a.scrollTop,i.wheelDX=o,i.wheelDY=r,setTimeout(function(){if(null!=i.wheelStartX){var t=a.scrollLeft-i.wheelStartX,e=a.scrollTop-i.wheelStartY,n=e&&i.wheelDY&&e/i.wheelDY||t&&i.wheelDX&&t/i.wheelDX;i.wheelStartX=i.wheelStartY=null,n&&(om=(om*oy+n)/(oy+1),++oy)}},200)):(i.wheelDX+=o,i.wheelDY+=r))}}g?om=-.53:p?om=15:b?om=-.7:_&&(om=-1/3);var o_=function(t,e){this.ranges=t,this.primIndex=e};o_.prototype.primary=function(){return this.ranges[this.primIndex]},o_.prototype.equals=function(t){if(t==this)return!0;if(t.primIndex!=this.primIndex||t.ranges.length!=this.ranges.length)return!1;for(var e=0;e<this.ranges.length;e++){var n=this.ranges[e],o=t.ranges[e];if(!t5(n.anchor,o.anchor)||!t5(n.head,o.head))return!1}return!0},o_.prototype.deepCopy=function(){for(var t=[],e=0;e<this.ranges.length;e++)t[e]=new oC(t4(this.ranges[e].anchor),t4(this.ranges[e].head));return new o_(t,this.primIndex)},o_.prototype.somethingSelected=function(){for(var t=0;t<this.ranges.length;t++)if(!this.ranges[t].empty())return!0;return!1},o_.prototype.contains=function(t,e){e||(e=t);for(var n=0;n<this.ranges.length;n++){var o=this.ranges[n];if(t3(e,o.from())>=0&&0>=t3(t,o.to()))return n}return -1};var oC=function(t,e){this.anchor=t,this.head=e};function ox(t,e,n){var o=t&&t.options.selectionsMayTouch,r=e[n];e.sort(function(t,e){return t3(t.from(),e.from())}),n=K(e,r);for(var i=1;i<e.length;i++){var a=e[i],s=e[i-1],l=t3(s.to(),a.from());if(o&&!a.empty()?l>0:l>=0){var c=t6(s.from(),a.from()),u=t9(s.to(),a.to()),p=s.empty()?a.from()==a.head:s.from()==s.head;i<=n&&--n,e.splice(--i,2,new oC(p?u:c,p?c:u))}}return new o_(e,n)}function oO(t,e){return new o_([new oC(t,e||t)],0)}function oS(t){return t.text?t2(t.from.line+t.text.length-1,tn(t.text).length+(1==t.text.length?t.from.ch:0)):t.to}function oT(t,e){if(0>t3(t,e.from))return t;if(0>=t3(t,e.to))return oS(e);var n=t.line+e.text.length-(e.to.line-e.from.line)-1,o=t.ch;return t.line==e.to.line&&(o+=oS(e).ch-e.to.ch),t2(n,o)}function oP(t,e){for(var n=[],o=0;o<t.sel.ranges.length;o++){var r=t.sel.ranges[o];n.push(new oC(oT(r.anchor,e),oT(r.head,e)))}return ox(t.cm,n,t.sel.primIndex)}function oE(t,e,n){return t.line==e.line?t2(n.line,t.ch-e.ch+n.ch):t2(n.line+(t.line-e.line),t.ch)}function ok(t){t.doc.mode=tB(t.options,t.doc.modeOption),oj(t)}function oj(t){t.doc.iter(function(t){t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null)}),t.doc.modeFrontier=t.doc.highlightFrontier=t.doc.first,oo(t,100),t.state.modeGen++,t.curOp&&nP(t)}function oA(t,e){return 0==e.from.ch&&0==e.to.ch&&""==tn(e.text)&&(!t.cm||t.cm.options.wholeLineUpdateBefore)}function oM(t,e,n,o){function r(t){return n?n[t]:null}function i(t,n,r){var i;t.text=n,t.stateAfter&&(t.stateAfter=null),t.styles&&(t.styles=null),null!=t.order&&(t.order=null),eb(t),ew(t,r),(i=o?o(t):1)!=t.height&&tX(t,i),eW(t,"change",t,e)}function a(t,e){for(var n=[],i=t;i<e;++i)n.push(new eD(c[i],r(i),o));return n}var s=e.from,l=e.to,c=e.text,u=tK(t,s.line),p=tK(t,l.line),f=tn(c),d=r(c.length-1),h=l.line-s.line;if(e.full)t.insert(0,a(0,c.length)),t.remove(c.length,t.size-c.length);else if(oA(t,e)){var g=a(0,c.length-1);i(p,p.text,d),h&&t.remove(s.line,h),g.length&&t.insert(s.line,g)}else if(u==p)if(1==c.length)i(u,u.text.slice(0,s.ch)+f+u.text.slice(l.ch),d);else{var v=a(1,c.length-1);v.push(new eD(f+u.text.slice(l.ch),d,o)),i(u,u.text.slice(0,s.ch)+c[0],r(0)),t.insert(s.line+1,v)}else if(1==c.length)i(u,u.text.slice(0,s.ch)+c[0]+p.text.slice(l.ch),r(0)),t.remove(s.line+1,h);else{i(u,u.text.slice(0,s.ch)+c[0],r(0)),i(p,f+p.text.slice(l.ch),d);var y=a(1,c.length-1);h>1&&t.remove(s.line+1,h-1),t.insert(s.line+1,y)}eW(t,"change",t,e)}function oD(t,e,n){!function t(o,r,i){if(o.linked)for(var a=0;a<o.linked.length;++a){var s=o.linked[a];if(s.doc!=r){var l=i&&s.sharedHist;(!n||l)&&(e(s.doc,l),t(s.doc,o,l))}}}(t,null,!0)}function oL(t,e){if(e.cm)throw Error("This document is already in use.");t.doc=e,e.cm=t,nO(t),ok(t),oI(t),t.options.direction=e.direction,t.options.lineWrapping||eM(t),t.options.mode=e.modeOption,nP(t)}function oI(t){("rtl"==t.doc.direction?U:L)(t.display.lineDiv,"CodeMirror-rtl")}function oN(t){this.done=[],this.undone=[],this.undoDepth=t?t.undoDepth:1/0,this.lastModTime=this.lastSelTime=0,this.lastOp=this.lastSelOp=null,this.lastOrigin=this.lastSelOrigin=null,this.generation=this.maxGeneration=t?t.maxGeneration:1}function oR(t,e){var n={from:t4(e.from),to:oS(e),text:tY(t,e.from,e.to)};return oU(t,n,e.from.line,e.to.line+1),oD(t,function(t){return oU(t,n,e.from.line,e.to.line+1)},!0),n}function oV(t){for(;t.length;)if(tn(t).ranges)t.pop();else break}function oF(t,e,n,o){var r,i,a=t.history;a.undone.length=0;var s,l=+new Date;if((a.lastOp==o||a.lastOrigin==e.origin&&e.origin&&("+"==e.origin.charAt(0)&&a.lastModTime>l-(t.cm?t.cm.options.historyEventDelay:500)||"*"==e.origin.charAt(0)))&&(r=a,s=a.lastOp==o?(oV(r.done),tn(r.done)):r.done.length&&!tn(r.done).ranges?tn(r.done):r.done.length>1&&!r.done[r.done.length-2].ranges?(r.done.pop(),tn(r.done)):void 0))i=tn(s.changes),0==t3(e.from,e.to)&&0==t3(e.from,i.to)?i.to=oS(e):s.changes.push(oR(t,e));else{var c=tn(a.done);for(c&&c.ranges||oH(t.sel,a.done),s={changes:[oR(t,e)],generation:a.generation},a.done.push(s);a.done.length>a.undoDepth;)a.done.shift(),a.done[0].ranges||a.done.shift()}a.done.push(n),a.generation=++a.maxGeneration,a.lastModTime=a.lastSelTime=l,a.lastOp=a.lastSelOp=o,a.lastOrigin=a.lastSelOrigin=e.origin,i||tC(t,"historyAdded")}function oH(t,e){var n=tn(e);n&&n.ranges&&n.equals(t)||e.push(t)}function oU(t,e,n,o){var r=e["spans_"+t.id],i=0;t.iter(Math.max(t.first,n),Math.min(t.first+t.size,o),function(n){n.markedSpans&&((r||(r=e["spans_"+t.id]={}))[i]=n.markedSpans),++i})}function oB(t,e){var n=function(t,e){var n=e["spans_"+t.id];if(!n)return null;for(var o=[],r=0;r<e.text.length;++r)o.push(function(t){if(!t)return null;for(var e,n=0;n<t.length;++n)t[n].marker.explicitlyCleared?e||(e=t.slice(0,n)):e&&e.push(t[n]);return e?e.length?e:null:t}(n[r]));return o}(t,e),o=ey(t,e);if(!n)return o;if(!o)return n;for(var r=0;r<n.length;++r){var i=n[r],a=o[r];if(i&&a)e:for(var s=0;s<a.length;++s){for(var l=a[s],c=0;c<i.length;++c)if(i[c].marker==l.marker)continue e;i.push(l)}else a&&(n[r]=a)}return n}function oz(t,e,n){for(var o=[],r=0;r<t.length;++r){var i=t[r];
1if(i.ranges){o.push(n?o_.prototype.deepCopy.call(i):i);continue}var a=i.changes,s=[];o.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}),e)for(var p in c)(u=p.match(/^spans_(\d+)$/))&&K(e,Number(u[1]))>-1&&(tn(s)[p]=c[p],delete c[p])}}return o}function oW(t,e,n,o){if(!o)return new oC(n||e,e);var r=t.anchor;if(n){var i=0>t3(e,r);i!=0>t3(n,r)?(r=e,e=n):i!=0>t3(e,n)&&(e=n)}return new oC(r,e)}function o$(t,e,n,o,r){null==r&&(r=t.cm&&(t.cm.display.shift||t.extend)),oY(t,new o_([oW(t.sel.primary(),e,n,r)],0),o)}function oq(t,e,n){for(var o=[],r=t.cm&&(t.cm.display.shift||t.extend),i=0;i<t.sel.ranges.length;i++)o[i]=oW(t.sel.ranges[i],e[i],null,r);var a=ox(t.cm,o,t.sel.primIndex);oY(t,a,n)}function oG(t,e,n,o){var r=t.sel.ranges.slice(0);r[e]=n,oY(t,ox(t.cm,r,t.sel.primIndex),o)}oC.prototype.from=function(){return t6(this.anchor,this.head)},oC.prototype.to=function(){return t9(this.anchor,this.head)},oC.prototype.empty=function(){return this.head.line==this.anchor.line&&this.head.ch==this.anchor.ch};function oK(t,e,n){var o=t.history.done,r=tn(o);r&&r.ranges?(o[o.length-1]=e,oJ(t,e,n)):oY(t,e,n)}function oY(t,e,n){oJ(t,e,n),function(t,e,n,o){var r,i,a=t.history,s=o&&o.origin;n==a.lastSelOp||s&&a.lastSelOrigin==s&&(a.lastModTime==a.lastSelTime&&a.lastOrigin==s||(r=tn(a.done),"*"==(i=s.charAt(0))||"+"==i&&r.ranges.length==e.ranges.length&&r.somethingSelected()==e.somethingSelected()&&new Date-t.history.lastSelTime<=(t.cm?t.cm.options.historyEventDelay:500)))?a.done[a.done.length-1]=e:oH(e,a.done),a.lastSelTime=+new Date,a.lastSelOrigin=s,a.lastSelOp=n,o&&!1!==o.clearRedo&&oV(a.undone)}(t,t.sel,t.cm?t.cm.curOp.id:NaN,n)}function oJ(t,e,n){(tS(t,"beforeSelectionChange")||t.cm&&tS(t.cm,"beforeSelectionChange"))&&(r={ranges:(o=e).ranges,update:function(e){this.ranges=[];for(var n=0;n<e.length;n++)this.ranges[n]=new oC(t8(t,e[n].anchor),t8(t,e[n].head))},origin:n&&n.origin},tC(t,"beforeSelectionChange",t,r),t.cm&&tC(t.cm,"beforeSelectionChange",t.cm,r),e=r.ranges!=o.ranges?ox(t.cm,r.ranges,r.ranges.length-1):o);var o,r,i=n&&n.bias||(0>t3(e.primary().head,t.sel.primary().head)?-1:1);oX(t,oQ(t,e,i,!0)),!(n&&!1===n.scroll)&&t.cm&&"nocursor"!=t.cm.getOption("readOnly")&&nq(t.cm)}function oX(t,e){e.equals(t.sel)||(t.sel=e,t.cm&&(t.cm.curOp.updateInput=1,t.cm.curOp.selectionChanged=!0,tO(t.cm)),eW(t,"cursorActivity",t))}function oZ(t){oX(t,oQ(t,t.sel,null,!1))}function oQ(t,e,n,o){for(var r,i=0;i<e.ranges.length;i++){var a=e.ranges[i],s=e.ranges.length==t.sel.ranges.length&&t.sel.ranges[i],l=o1(t,a.anchor,s&&s.anchor,n,o),c=o1(t,a.head,s&&s.head,n,o);(r||l!=a.anchor||c!=a.head)&&(r||(r=e.ranges.slice(0,i)),r[i]=new oC(l,c))}return r?ox(t.cm,r,e.primIndex):e}function o0(t,e,n,o,r){var i=tK(t,e.line);if(i.markedSpans)for(var a=0;a<i.markedSpans.length;++a){var s=i.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<=e.ch:s.from<e.ch))&&(null==s.to||(u?s.to>=e.ch:s.to>e.ch))){if(r&&(tC(l,"beforeCursorEnter"),l.explicitlyCleared))if(i.markedSpans){--a;continue}else break;if(!l.atomic)continue;if(n){var p=l.find(o<0?1:-1),f=void 0;if((o<0?u:c)&&(p=o2(t,p,-o,p&&p.line==e.line?i:null)),p&&p.line==e.line&&(f=t3(p,n))&&(o<0?f<0:f>0))return o0(t,p,e,o,r)}var d=l.find(o<0?-1:1);return(o<0?c:u)&&(d=o2(t,d,o,d.line==e.line?i:null)),d?o0(t,d,e,o,r):null}}return e}function o1(t,e,n,o,r){var i=o||1,a=o0(t,e,n,i,r)||!r&&o0(t,e,n,i,!0)||o0(t,e,n,-i,r)||!r&&o0(t,e,n,-i,!0);return a||(t.cantEdit=!0,t2(t.first,0))}function o2(t,e,n,o){if(n<0&&0==e.ch)if(e.line>t.first)return t8(t,t2(e.line-1));else return null;return n>0&&e.ch==(o||tK(t,e.line)).text.length?e.line<t.first+t.size-1?t2(e.line+1,0):null:new t2(e.line,e.ch+n)}function o3(t){t.setSelection(t2(t.firstLine(),0),t2(t.lastLine()),J)}function o5(t,e,n){var o={canceled:!1,from:e.from,to:e.to,text:e.text,origin:e.origin,cancel:function(){return o.canceled=!0}};return(n&&(o.update=function(e,n,r,i){e&&(o.from=t8(t,e)),n&&(o.to=t8(t,n)),r&&(o.text=r),void 0!==i&&(o.origin=i)}),tC(t,"beforeChange",t,o),t.cm&&tC(t.cm,"beforeChange",t.cm,o),o.canceled)?(t.cm&&(t.cm.curOp.updateInput=2),null):{from:o.from,to:o.to,text:o.text,origin:o.origin}}function o4(t,e,n){if(t.cm){if(!t.cm.curOp)return ot(t.cm,o4)(t,e,n);if(t.cm.state.suppressEdits)return}if(!(tS(t,"beforeChange")||t.cm&&tS(t.cm,"beforeChange"))||(e=o5(t,e,!0))){var o=ed&&!n&&function(t,e,n){var o=null;if(t.iter(e.line,n.line+1,function(t){if(t.markedSpans)for(var e=0;e<t.markedSpans.length;++e){var n=t.markedSpans[e].marker;n.readOnly&&(!o||-1==K(o,n))&&(o||(o=[])).push(n)}}),!o)return null;for(var r=[{from:e,to:n}],i=0;i<o.length;++i)for(var a=o[i],s=a.find(0),l=0;l<r.length;++l){var c=r[l];if(!(0>t3(c.to,s.from)||t3(c.from,s.to)>0)){var u=[l,1],p=t3(c.from,s.from),f=t3(c.to,s.to);!(p<0)&&(a.inclusiveLeft||p)||u.push({from:c.from,to:s.from}),!(f>0)&&(a.inclusiveRight||f)||u.push({from:s.to,to:c.to}),r.splice.apply(r,u),l+=u.length-3}}return r}(t,e.from,e.to);if(o)for(var r=o.length-1;r>=0;--r)o9(t,{from:o[r].from,to:o[r].to,text:r?[""]:e.text,origin:e.origin});else o9(t,e)}}function o9(t,e){if(1!=e.text.length||""!=e.text[0]||0!=t3(e.from,e.to)){var n=oP(t,e);oF(t,e,n,t.cm?t.cm.curOp.id:NaN),o8(t,e,n,ey(t,e));var o=[];oD(t,function(t,n){n||-1!=K(o,t.history)||(ro(t.history,e),o.push(t.history)),o8(t,e,null,ey(t,e))})}}function o6(t,e,n){var o=t.cm&&t.cm.state.suppressEdits;if(!o||n){for(var r,i=t.history,a=t.sel,s="undo"==e?i.done:i.undone,l="undo"==e?i.undone:i.done,c=0;c<s.length&&(r=s[c],n?!r.ranges||r.equals(t.sel):r.ranges);c++);if(c!=s.length){for(i.lastOrigin=i.lastSelOrigin=null;;
vendor: 5,386 bytes, line 1
1)if((r=s.pop()).ranges){if(oH(r,l),n&&!r.equals(t.sel))return void oY(t,r,{clearRedo:!1});a=r}else if(o)return void s.push(r);else break;var u=[];oH(a,l),l.push({changes:u,generation:i.generation}),i.generation=r.generation||++i.maxGeneration;for(var p=tS(t,"beforeChange")||t.cm&&tS(t.cm,"beforeChange"),f=r.changes.length-1;f>=0;--f){var d=function(n){var o=r.changes[n];if(o.origin=e,p&&!o5(t,o,!1))return s.length=0,{};u.push(oR(t,o));var i=n?oP(t,o):tn(s);o8(t,o,i,oB(t,o)),!n&&t.cm&&t.cm.scrollIntoView({from:o.from,to:oS(o)});var a=[];oD(t,function(t,e){e||-1!=K(a,t.history)||(ro(t.history,o),a.push(t.history)),o8(t,o,null,oB(t,o))})}(f);if(d)return d.v}}}}function o7(t,e){if(0!=e&&(t.first+=e,t.sel=new o_(to(t.sel.ranges,function(t){return new oC(t2(t.anchor.line+e,t.anchor.ch),t2(t.head.line+e,t.head.ch))}),t.sel.primIndex),t.cm)){nP(t.cm,t.first,t.first-e,e);for(var n=t.cm.display,o=n.viewFrom;o<n.viewTo;o++)nE(t.cm,o,"gutter")}}function o8(t,e,n,o){if(t.cm&&!t.cm.curOp)return ot(t.cm,o8)(t,e,n,o);if(e.to.line<t.first)return void o7(t,e.text.length-1-(e.to.line-e.from.line));if(!(e.from.line>t.lastLine())){if(e.from.line<t.first){var r=e.text.length-1-(t.first-e.from.line);o7(t,r),e={from:t2(t.first,0),to:t2(e.to.line+r,e.to.ch),text:[tn(e.text)],origin:e.origin}}var i=t.lastLine();e.to.line>i&&(e={from:e.from,to:t2(i,tK(t,i).text.length),text:[e.text[0]],origin:e.origin}),e.removed=tY(t,e.from,e.to),n||(n=oP(t,e)),t.cm?function(t,e,n){var o=t.doc,r=t.display,i=e.from,a=e.to,s=!1,l=i.line;t.options.lineWrapping||(l=tZ(eT(tK(o,i.line))),o.iter(l,a.line+1,function(t){if(t==r.maxLine)return s=!0,!0})),o.sel.contains(e.from,e.to)>-1&&tO(t),oM(o,e,n,nx(t)),!t.options.lineWrapping&&(o.iter(l,i.line+e.text.length,function(t){var e=eA(t);e>r.maxLineLength&&(r.maxLine=t,r.maxLineLength=e,r.maxLineChanged=!0,s=!1)}),s&&(t.curOp.updateMaxLine=!0)),function(t,e){if(t.modeFrontier=Math.min(t.modeFrontier,e),!(t.highlightFrontier<e-10)){for(var n=t.first,o=e-1;o>n;o--){var r=tK(t,o).stateAfter;if(r&&(!(r instanceof ee)||o+r.lookAhead<e)){n=o+1;break}}t.highlightFrontier=Math.min(t.highlightFrontier,n)}}(o,i.line),oo(t,400);var c=e.text.length-(a.line-i.line)-1;e.full?nP(t):i.line!=a.line||1!=e.text.length||oA(t.doc,e)?nP(t,i.line,a.line+1,c):nE(t,i.line,"text");var u=tS(t,"changes"),p=tS(t,"change");if(p||u){var f={from:i,to:a,text:e.text,removed:e.removed,origin:e.origin};p&&eW(t,"change",t,f),u&&(t.curOp.changeObjs||(t.curOp.changeObjs=[])).push(f)}t.display.selForContextMenu=null}(t.cm,e,o):oM(t,e,o),oJ(t,n,J),t.cantEdit&&o1(t,t2(t.firstLine(),0))&&(t.cantEdit=!1)}}function rt(t,e,n,o,r){var i;o||(o=n),0>t3(o,n)&&(n=(i=[o,n])[0],o=i[1]),"string"==typeof e&&(e=t.splitLines(e)),o4(t,{from:n,to:o,text:e,origin:r})}function re(t,e,n,o){n<t.line?t.line+=o:e<t.line&&(t.line=e,t.ch=0)}function rn(t,e,n,o){for(var r=0;r<t.length;++r){var i=t[r],a=!0;if(i.ranges){i.copied||((i=t[r]=i.deepCopy()).copied=!0);for(var s=0;s<i.ranges.length;s++)re(i.ranges[s].anchor,e,n,o),re(i.ranges[s].head,e,n,o);continue}for(var l=0;l<i.changes.length;++l){var c=i.changes[l];if(n<c.from.line)c.from=t2(c.from.line+o,c.from.ch),c.to=t2(c.to.line+o,c.to.ch);else if(e<=c.to.line){a=!1;break}}a||(t.splice(0,r+1),r=0)}}function ro(t,e){var n=e.from.line,o=e.to.line,r=e.text.length-(o-n)-1;rn(t.done,n,o,r),rn(t.undone,n,o,r)}function rr(t,e,n,o){var r=e,i=e;return("number"==typeof e?i=tK(t,t7(t,e)):r=tZ(e),null==r)?null:(o(i,r)&&t.cm&&nE(t.cm,r,n),i)}function ri(t){this.lines=t,this.parent=null;for(var e=0,n=0;n<t.length;++n)t[n].parent=this,e+=t[n].height;this.height=e}function ra(t){this.children=t;for(var e=0,n=0,o=0;o<t.length;++o){var r=t[o];e+=r.chunkSize(),n+=r.height,r.parent=this}this.size=e,this.height=n,this.parent=null}ri.prototype={chunkSize:function(){return this.lines.length},removeInner:function(t,e){for(var n=t,o=t+e;n<o;++n){var r=this.lines[n];this.height-=r.height,r.parent=null,eb(r),eW(r,"delete")}this.lines.splice(t,e)},collapse:function(t){t.push.apply(t,this.lines)},insertInner:function(t,e,n){this.height+=n,this.lines=this.lines.slice(0,t).concat(e).concat(this.lines.slice(t));for(var o=0;o<e.length;++o)e[o].parent=this},iterN:function(t,e,n){for(var o=t+e;t<o;++t)if(n(this.lines[t]))return!0}},ra.prototype={chunkSize:function(){return this.size},removeInner:function(t,e){this.size-=e;for(var n=0;n<this.children.length;++n){var o=this.children[n],r=o.chunkSize();if(t<r){var i=Math.min(e,r-t),a=o.height;if(o.removeInner(t,i),this.height-=a-o.height,r==i&&(this.children.splice(n--,1),o.parent=null),0==(e-=i))break;t=0}else t-=r}if(this.size-e<25&&(this.children.length>1||!(this.children[0]instanceof ri))){var s=[];this.collapse(s),this.children=[new ri(s)],this.children[0].parent=this}},collapse:function(t){for(var e=0;e<this.children.length;++e)this.children[e].collapse(t)},insertInner:function(t,e,n){this.size+=e.length,this.height+=n;for(var o=0;o<this.children.length;++o){var r=this.children[o],i=r.chunkSize();if(t<=i){if(r.insertInner(t,e,n),r.lines&&r.lines.length>50){for(var a=r.lines.length%25+25,s=a;s<r.lines.length;){var l=new ri(r.lines.slice(s,s+=25));r.height-=l.height,this.children.splice(++o,0,l),l.parent=this}r.lines=r.lines.slice(0,a),this.maybeSpill()}break}t-=i}},maybeSpill:function(){if(!(this.children.length<=10)){var t=this;do{var e=new ra(t.children.splice(t.children.length-5,5));
vendor: 5,366 bytes, line 1
1if(t.parent){t.size-=e.size,t.height-=e.height;var n=K(t.parent.children,t);t.parent.children.splice(n+1,0,e)}else{var o=new ra(t.children);o.parent=t,t.children=[o,e],t=o}e.parent=t.parent}while(t.children.length>10);t.parent.maybeSpill()}},iterN:function(t,e,n){for(var o=0;o<this.children.length;++o){var r=this.children[o],i=r.chunkSize();if(t<i){var a=Math.min(e,i-t);if(r.iterN(t,a,n))return!0;if(0==(e-=a))break;t=0}else t-=i}}};var rs=function(t,e,n){if(n)for(var o in n)n.hasOwnProperty(o)&&(this[o]=n[o]);this.doc=t,this.node=e};function rl(t,e,n){ej(e)<(t.curOp&&t.curOp.scrollTop||t.doc.scrollTop)&&n$(t,n)}rs.prototype.clear=function(){var t=this.doc.cm,e=this.line.widgets,n=this.line,o=tZ(n);if(null!=o&&e){for(var r=0;r<e.length;++r)e[r]==this&&e.splice(r--,1);e.length||(n.widgets=null);var i=eQ(this);tX(n,Math.max(0,n.height-i)),t&&(n8(t,function(){rl(t,n,-i),nE(t,o,"widget")}),eW(t,"lineWidgetCleared",t,this,o))}},rs.prototype.changed=function(){var t=this,e=this.height,n=this.doc.cm,o=this.line;this.height=null;var r=eQ(this)-e;r&&(ek(this.doc,o)||tX(o,o.height+r),n&&n8(n,function(){n.curOp.forceUpdate=!0,rl(n,o,r),eW(n,"lineWidgetChanged",n,t,tZ(o))}))},tT(rs);var rc=0,ru=function(t,e){this.lines=[],this.type=e,this.doc=t,this.id=++rc};function rp(t,e,n,o,r){if(o&&o.shared){var i,a,s,l,c,u,p,f;return i=t,a=e,s=n,l=o,c=r,(l=$(l)).shared=!1,p=(u=[rp(i,a,s,l,c)])[0],f=l.widgetNode,oD(i,function(t){f&&(l.widgetNode=f.cloneNode(!0)),u.push(rp(t,t8(t,a),t8(t,s),l,c));for(var e=0;e<t.linked.length;++e)if(t.linked[e].isParent)return;p=tn(u)}),new rf(u,p)}if(t.cm&&!t.cm.curOp)return ot(t.cm,rp)(t,e,n,o,r);var d=new ru(t,r),h=t3(e,n);if(o&&$(o,d,!1),h>0||0==h&&!1!==d.clearWhenEmpty)return d;if(d.replacedWith&&(d.collapsed=!0,d.widgetNode=V("span",[d.replacedWith],"CodeMirror-widget"),o.handleMouseEvents||d.widgetNode.setAttribute("cm-ignore-events","true"),o.insertLeft&&(d.widgetNode.insertLeft=!0)),d.collapsed){if(eS(t,e.line,e,n,d)||e.line!=n.line&&eS(t,n.line,e,n,d))throw Error("Inserting collapsed marker partially overlapping an existing one");eh=!0}d.addToHistory&&oF(t,{from:e,to:n,origin:"markText"},t.sel,NaN);var g,v=e.line,y=t.cm;if(t.iter(v,n.line+1,function(o){var r,i,a;y&&d.collapsed&&!y.options.lineWrapping&&eT(o)==y.display.maxLine&&(g=!0),d.collapsed&&v!=e.line&&tX(o,0),r=new eg(d,v==e.line?e.ch:null,v==n.line?n.ch:null),(a=(i=t.cm&&t.cm.curOp)&&window.WeakSet&&(i.markedSpans||(i.markedSpans=new WeakSet)))&&a.has(o.markedSpans)?o.markedSpans.push(r):(o.markedSpans=o.markedSpans?o.markedSpans.concat([r]):[r],a&&a.add(o.markedSpans)),r.marker.attachLine(o),++v}),d.collapsed&&t.iter(e.line,n.line+1,function(e){ek(t,e)&&tX(e,0)}),d.clearOnEnter&&tb(d,"beforeCursorEnter",function(){return d.clear()}),d.readOnly&&(ed=!0,(t.history.done.length||t.history.undone.length)&&t.clearHistory()),d.collapsed&&(d.id=++rc,d.atomic=!0),y){if(g&&(y.curOp.updateMaxLine=!0),d.collapsed)nP(y,e.line,n.line+1);else if(d.className||d.startStyle||d.endStyle||d.css||d.attributes||d.title)for(var m=e.line;m<=n.line;m++)nE(y,m,"text");d.atomic&&oZ(y.doc),eW(y,"markerAdded",y,d)}return d}ru.prototype.clear=function(){if(!this.explicitlyCleared){var t=this.doc.cm,e=t&&!t.curOp;if(e&&n6(t),tS(this,"clear")){var n=this.find();n&&eW(this,"clear",n.from,n.to)}for(var o=null,r=null,i=0;i<this.lines.length;++i){var a=this.lines[i],s=ev(a.markedSpans,this);t&&!this.collapsed?nE(t,tZ(a),"text"):t&&(null!=s.to&&(r=tZ(a)),null!=s.from&&(o=tZ(a))),a.markedSpans=function(t,e){for(var n,o=0;o<t.length;++o)t[o]!=e&&(n||(n=[])).push(t[o]);return n}(a.markedSpans,s),null==s.from&&this.collapsed&&!ek(this.doc,a)&&t&&tX(a,nb(t.display))}if(t&&this.collapsed&&!t.options.lineWrapping)for(var l=0;l<this.lines.length;++l){var c=eT(this.lines[l]),u=eA(c);u>t.display.maxLineLength&&(t.display.maxLine=c,t.display.maxLineLength=u,t.display.maxLineChanged=!0)}null!=o&&t&&this.collapsed&&nP(t,o,r+1),this.lines.length=0,this.explicitlyCleared=!0,this.atomic&&this.doc.cantEdit&&(this.doc.cantEdit=!1,t&&oZ(t.doc)),t&&eW(t,"markerCleared",t,this,o,r),e&&n7(t),this.parent&&this.parent.clear()}},ru.prototype.find=function(t,e){null==t&&"bookmark"==this.type&&(t=1);for(var n,o,r=0;r<this.lines.length;++r){var i=this.lines[r],a=ev(i.markedSpans,this);if(null!=a.from&&(n=t2(e?i:tZ(i),a.from),-1==t))return n;if(null!=a.to&&(o=t2(e?i:tZ(i),a.to),1==t))return o}return n&&{from:n,to:o}},ru.prototype.changed=function(){var t=this,e=this.find(-1,!0),n=this,o=this.doc.cm;e&&o&&n8(o,function(){var r=e.line,i=e7(o,tZ(e.line));if(i&&(no(i),o.curOp.selectionChanged=o.curOp.forceUpdate=!0),o.curOp.updateMaxLine=!0,!ek(n.doc,r)&&null!=n.height){var a=n.height;n.height=null;var s=eQ(n)-a;s&&tX(r,r.height+s)}eW(o,"markerChanged",o,t)})},ru.prototype.attachLine=function(t){if(!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;e.maybeHiddenMarkers&&-1!=K(e.maybeHiddenMarkers,this)||(e.maybeUnhiddenMarkers||(e.maybeUnhiddenMarkers=[])).push(this)}this.lines.push(t)},ru.prototype.detachLine=function(t){if(this.lines.splice(K(this.lines,t),1),!this.lines.length&&this.doc.cm){var e=this.doc.cm.curOp;(e.maybeHiddenMarkers||(e.maybeHiddenMarkers=[])).push(this)}},tT(ru);var rf=function(t,e){this.markers=t,this.primary=e;for(var n=0;n<t.length;++n)t[n].parent=this};function rd(t){return t.findMarks(t2(t.first,0),t.clipPos(t2(t.lastLine()
1)),function(t){return t.parent})}rf.prototype.clear=function(){if(!this.explicitlyCleared){this.explicitlyCleared=!0;for(var t=0;t<this.markers.length;++t)this.markers[t].clear();eW(this,"clear")}},rf.prototype.find=function(t,e){return this.primary.find(t,e)},tT(rf);var rh=0,rg=function(t,e,n,o,r){if(!(this instanceof rg))return new rg(t,e,n,o,r);null==n&&(n=0),ra.call(this,[new ri([new eD("",null)])]),this.first=n,this.scrollTop=this.scrollLeft=0,this.cantEdit=!1,this.cleanGeneration=1,this.modeFrontier=this.highlightFrontier=n;var i=t2(n,0);this.sel=oO(i),this.history=new oN(null),this.id=++rh,this.modeOption=e,this.lineSep=o,this.direction="rtl"==r?"rtl":"ltr",this.extend=!1,"string"==typeof t&&(t=this.splitLines(t)),oM(this,{from:i,to:i,text:t}),oY(this,oO(i),J)};rg.prototype=ti(ra.prototype,{constructor:rg,iter:function(t,e,n){n?this.iterN(t-this.first,e-t,n):this.iterN(this.first,this.first+this.size,t)},insert:function(t,e){for(var n=0,o=0;o<e.length;++o)n+=e[o].height;this.insertInner(t-this.first,e,n)},remove:function(t,e){this.removeInner(t-this.first,e)},getValue:function(t){var e=tJ(this,this.first,this.first+this.size);return!1===t?e:e.join(t||this.lineSeparator())},setValue:on(function(t){var e=t2(this.first,0),n=this.first+this.size-1;o4(this,{from:e,to:t2(n,tK(this,n).text.length),text:this.splitLines(t),origin:"setValue",full:!0},!0),this.cm&&nG(this.cm,0,0),oY(this,oO(e),J)}),replaceRange:function(t,e,n,o){e=t8(this,e),n=n?t8(this,n):e,rt(this,t,e,n,o)},getRange:function(t,e,n){var o=tY(this,t8(this,t),t8(this,e));return!1===n?o:""===n?o.join(""):o.join(n||this.lineSeparator())},getLine:function(t){var e=this.getLineHandle(t);return e&&e.text},getLineHandle:function(t){if(t0(this,t))return tK(this,t)},getLineNumber:function(t){return tZ(t)},getLineHandleVisualStart:function(t){return"number"==typeof t&&(t=tK(this,t)),eT(t)},lineCount:function(){return this.size},firstLine:function(){return this.first},lastLine:function(){return this.first+this.size-1},clipPos:function(t){return t8(this,t)},getCursor:function(t){var e=this.sel.primary();return null==t||"head"==t?e.head:"anchor"==t?e.anchor:"end"==t||"to"==t||!1===t?e.to():e.from()},listSelections:function(){return this.sel.ranges},somethingSelected:function(){return this.sel.somethingSelected()},setCursor:on(function(t,e,n){var o;o=t8(this,"number"==typeof t?t2(t,e||0):t),oY(this,oO(o,null),n)}),setSelection:on(function(t,e,n){var o,r;o=t8(this,t),r=t8(this,e||t),oY(this,oO(o,r),n)}),extendSelection:on(function(t,e,n){o$(this,t8(this,t),e&&t8(this,e),n)}),extendSelections:on(function(t,e){oq(this,et(this,t),e)}),extendSelectionsBy:on(function(t,e){oq(this,et(this,to(this.sel.ranges,t)),e)}),setSelections:on(function(t,e,n){if(t.length){for(var o=[],r=0;r<t.length;
1r++)o[r]=new oC(t8(this,t[r].anchor),t8(this,t[r].head||t[r].anchor));null==e&&(e=Math.min(t.length-1,this.sel.primIndex)),oY(this,ox(this.cm,o,e),n)}}),addSelection:on(function(t,e,n){var o=this.sel.ranges.slice(0);o.push(new oC(t8(this,t),t8(this,e||t))),oY(this,ox(this.cm,o,o.length-1),n)}),getSelection:function(t){for(var e,n=this.sel.ranges,o=0;o<n.length;o++){var r=tY(this,n[o].from(),n[o].to());e=e?e.concat(r):r}return!1===t?e:e.join(t||this.lineSeparator())},getSelections:function(t){for(var e=[],n=this.sel.ranges,o=0;o<n.length;o++){var r=tY(this,n[o].from(),n[o].to());!1!==t&&(r=r.join(t||this.lineSeparator())),e[o]=r}return e},replaceSelection:function(t,e,n){for(var o=[],r=0;r<this.sel.ranges.length;r++)o[r]=t;this.replaceSelections(o,e,n||"+input")},replaceSelections:on(function(t,e,n){for(var o=[],r=this.sel,i=0;i<r.ranges.length;i++){var a=r.ranges[i];o[i]={from:a.from(),to:a.to(),text:this.splitLines(t[i]),origin:n}}for(var s=e&&"end"!=e&&function(t,e,n){for(var o=[],r=t2(t.first,0),i=r,a=0;a<e.length;a++){var s=e[a],l=oE(s.from,r,i),c=oE(oS(s),r,i);if(r=s.to,i=c,"around"==n){var u=t.sel.ranges[a],p=0>t3(u.head,u.anchor);o[a]=new oC(p?c:l,p?l:c)}else o[a]=new oC(l,l)}return new o_(o,t.sel.primIndex)}(this,o,e),l=o.length-1;l>=0;l--)o4(this,o[l]);s?oK(this,s):this.cm&&nq(this.cm)}),undo:on(function(){o6(this,"undo")}),redo:on(function(){o6(this,"redo")}),undoSelection:on(function(){o6(this,"undo",!0)}),redoSelection:on(function(){o6(this,"redo",!0)}),setExtending:function(t){this.extend=t},getExtending:function(){return this.extend},historySize:function(){for(var t=this.history,e=0,n=0,o=0;o<t.done.length;o++)!t.done[o].ranges&&++e;for(var r=0;r<t.undone.length;r++)!t.undone[r].ranges&&++n;return{undo:e,redo:n}},clearHistory:function(){var t=this;this.history=new oN(this.history),oD(this,function(e){return e.history=t.history},!0)},markClean:function(){this.cleanGeneration=this.changeGeneration(!0)},changeGeneration:function(t){return t&&(this.history.lastOp=this.history.lastSelOp=this.history.lastOrigin=null),this.history.generation},isClean:function(t){return this.history.generation==(t||this.cleanGeneration)},getHistory:function(){return{done:oz(this.history.done),undone:oz(this.history.undone)}},setHistory:function(t){var e=this.history=new oN(this.history);e.done=oz(t.done.slice(0),null,!0),e.undone=oz(t.undone.slice(0),null,!0)},setGutterMarker:on(function(t,e,n){return rr(this,t,"gutter",function(t){var o=t.gutterMarkers||(t.gutterMarkers={});return o[e]=n,!n&&tc(o)&&(t.gutterMarkers=null),!0})}),clearGutter:on(function(t){var e=this;this.iter(function(n){n.gutterMarkers&&n.gutterMarkers[t]&&rr(e,n,"gutter",function(){return n.gutterMarkers[t]=null,tc(n.gutterMarkers)&&(n.gutterMarkers=null),!0})})}),lineInfo:function(t){var e;if("number"==typeof t){if(!t0(this,t)||(e=t,!(t=tK(this,t))))return null}else if(null==(e=tZ(t)))return null;return{line:e,handle:t,text:t.text,gutterMarkers:t.gutterMarkers,textClass:t.textClass,bgClass:t.bgClass,wrapClass:t.wrapClass,widgets:t.widgets}},addLineClass:on(function(t,e,n){return rr(this,t,"gutter"==e?"gutter":"class",function(t){var o="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass";if(t[o]){if(D(n).test(t[o]))return!1;t[o]+=" "+n}else t[o]=n;return!0})}),removeLineClass:on(function(t,e,n){return rr(this,t,"gutter"==e?"gutter":"class",function(t){var o="text"==e?"textClass":"background"==e?"bgClass":"gutter"==e?"gutterClass":"wrapClass",r=t[o];if(!r)return!1;if(null==n)t[o]=null;else{var i=r.match(D(n));if(!i)return!1;var a=i.index+i[0].length;t[o]=r.slice(0,i.index)+(i.index&&a!=r.length?" ":"")+r.slice(a)||null}return!0})}),addLineWidget:on(function(t,e,n){var o,r,i;return o=this,r=new rs(o,e,n),(i=o.cm)&&r.noHScroll&&(i.display.alignWidgets=!0),rr(o,t,"widget",function(t){var e=t.widgets||(t.widgets=[]);if(null==r.insertAt?e.push(r):e.splice(Math.min(e.length,Math.max(0,r.insertAt)),0,r),r.line=t,i&&!ek(o,t)){var n=ej(t)<o.scrollTop;tX(t,t.height+eQ(r)),n&&n$(i,r.height),i.curOp.forceUpdate=!0}return!0}),i&&eW(i,"lineWidgetAdded",i,r,"number"==typeof t?t:tZ(t)),r}),removeLineWidget:function(t){t.clear()},markText:function(t,e,n){return rp(this,t8(this,t),t8(this,e),n,n&&n.type||"range")},setBookmark:function(t,e){var n={replacedWith:e&&(null==e.nodeType?e.widget:e),insertLeft:e&&e.insertLeft,clearWhenEmpty:!1,shared:e&&e.shared,handleMouseEvents:e&&e.handleMouseEvents};return rp(this,t=t8(this,t),t,n,"bookmark")},findMarksAt:function(t){t=t8(this,t);var e=[],n=tK(this,t.line).markedSpans;if(n)for(var o=0;o<n.length;++o){var r=n[o];(null==r.from||r.from<=t.ch)&&(null==r.to||r.to>=t.ch)&&e.push(r.marker.parent||r.marker)}return e},findMarks:function(t,e,n){t=t8(this,t),e=t8(this,e);var o=[],r=t.line;return this.iter(t.line,e.line+1,function(i){var a=i.markedSpans;if(a)for(var s=0;s<a.length;s++){var l=a[s];!(null!=l.to&&r==t.line&&t.ch>=l.to||null==l.from&&r!=t.line||null!=l.from&&r==e.line&&l.from>=e.ch)&&(!n||n(l.marker))&&o.push(l.marker.parent||l.marker)}++r}),o},getAllMarks:function(){var t=[];return this.iter(function(e){var n=e.markedSpans;if(n)for(var o=0;o<n.length;++o)null!=n[o].from&&t.push(n[o].marker)}),t},posFromIndex:function(t){var e,n=this.first,o=this.lineSeparator().length;return this.iter(function(r){var i=r.text.length+o;if(i>t)return e=t,!0;t-=i,++n}),t8(this,t2(n,e))},indexFromPos:function(t){var e=(t=t8(this,t)).ch;if(t.line<this.first||t.ch<0)return 0;var n=this.lineSeparator().length;return this.iter(this.first,t.line,function(t){e+=t.text.length+n}),e},copy:function(t){var e=new rg(tJ(this,this.first,this.first+this.size),this.modeOption,this.first,this.lineSep,this.direction);return e.scrollTop=this.scrollTop,e.scrollLeft=this.scrollLeft,e.sel=this.sel,e.extend=!1,t&&(e.history.undoDepth=this.history.undoDepth,e.setHistory(this.getHistory())),e},linkedDoc:function(t){t||(t={});var e=this.first,n=this.first+this.size;null!=t.from&&t.from>e&&(e=t.from),null!=t.to&&t.to<n&&(n=t.to);var o=new rg(tJ(this,e,n),t.mode||this.modeOption,e,this.lineSep,this.direction);return t.sharedHist&&(o.history=this.history),(this.linked||(this.linked=[])).push({doc:o,sharedHist:t.sharedHist}),o.linked=[{doc:this,isParent:!0,sharedHist:t.sharedHist}],!function(t,e){for(var n=0;n<e.length;n++){var o=e[n],r=o.find(),i=t.clipPos(r.from),a=t.clipPos(r.to);if(t3(i,a)){var s=rp(t,i,a,o.primary,o.primary.type);o.markers.push(s),s.parent=o}}}(o,rd(this)),o},unlinkDoc:function(t){if(t instanceof r4&&(t=t.doc),this.linked){for(var e=0;e<this.linked.length;++e)if(this.linked[e].doc==t){this.linked.splice(e,1),t.unlinkDoc(this),function(t){for(var e=0;e<t.length;e++)!function(e){var n=t[e],o=[n.primary.doc];oD(n.primary.doc,function(t){return o.push(t)});for(var r=0;r<n.markers.length;r++){var i=n.markers[r];-1==K(o,i.doc)&&(i.parent=null,n.markers.splice(r--,1))}}(e)}(rd(this));break}}if(t.history==this.history){var n=[t.id];oD(t,function(t){return n.push(t.id)},!0),t.history=new oN(null),t.history.done=oz(this.history.done,n),t.history.undone=oz
1(this.history.undone,n)}},iterLinkedDocs:function(t){oD(this,t)},getMode:function(){return this.mode},getEditor:function(){return this.cm},splitLines:function(t){return this.lineSep?t.split(this.lineSep):tL(t)},lineSeparator:function(){return this.lineSep||"\n"},setDirection:on(function(t){if("rtl"!=t&&(t="ltr"),t!=this.direction){var e;this.direction=t,this.iter(function(t){return t.order=null}),this.cm&&n8(e=this.cm,function(){oI(e),nP(e)})}})}),rg.prototype.eachLine=rg.prototype.iter;var rv=0;function ry(t){var e=this;if(rm(e),!(tx(e,t)||e0(e.display,t))){tP(t),g&&(rv=+new Date);var n=nS(e,t,!0),o=t.dataTransfer.files;if(!(!n||e.isReadOnly()))if(o&&o.length&&window.FileReader&&window.File)for(var r=o.length,i=Array(r),a=0,s=function(){++a==r&&ot(e,function(){var t={from:n=t8(e.doc,n),to:n,text:e.doc.splitLines(i.filter(function(t){return null!=t}).join(e.doc.lineSeparator())),origin:"paste"};o4(e.doc,t),oK(e.doc,oO(t8(e.doc,n),t8(e.doc,oS(t))))})()},l=function(t,n){if(e.options.allowDropFileTypes&&-1==K(e.options.allowDropFileTypes,t.type))return void s();var o=new FileReader;o.onerror=function(){return s()},o.onload=function(){var t=o.result;if(/[\x00-\x08\x0e-\x1f]{2}/.test(t))return void s();i[n]=t,s()},o.readAsText(t)},c=0;c<o.length;c++)l(o[c],c);else{if(e.state.draggingText&&e.doc.sel.contains(n)>-1){e.state.draggingText(t),setTimeout(function(){return e.display.input.focus()},20);return}try{var u,p=t.dataTransfer.getData("Text");if(p){if(e.state.draggingText&&!e.state.draggingText.copy&&(u=e.listSelections()),oJ(e.doc,oO(n,n)),u)for(var f=0;f<u.length;++f)rt(e.doc,"",u[f].anchor,u[f].head,"drag");e.replaceSelection(p,"around","paste"),e.display.input.focus()}}catch(t){}}}}function rm(t){t.display.dragCursor&&(t.display.lineSpace.removeChild(t.display.dragCursor),t.display.dragCursor=null)}function rb(t){if(document.getElementsByClassName){for(var e=document.getElementsByClassName("CodeMirror"),n=[],o=0;o<e.length;o++){var r=e[o].CodeMirror;r&&n.push(r)}n.length&&n[0].operation(function(){for(var e=0;e<n.length;e++)t(n[e])})}}var rw=!1;function r_(t){var e=t.display;e.cachedCharWidth=e.cachedTextHeight=e.cachedPaddingH=null,e.scrollbarsClipped=!1,t.setSize()}for(var rC={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"},rx=0;rx<10;rx++)rC[rx+48]=rC[rx+96]=String(rx);for(var rO=65;rO<=90;rO++)rC[rO]=String.fromCharCode(rO);for(var rS=1;rS<=12;rS++)rC[rS+111]=rC[rS+63235]="F"+rS;var rT={};function rP(t){var e,n,o,r,i=t.split(/-(?!$)/);t=i[i.length-1];for(var a=0;a<i.length-1;a++){var s=i[a];if(/^(cmd|meta|m)$/i.test(s))r=!0;else if(/^a(lt)?$/i.test(s))e=!0;else if(/^(c|ctrl|control)$/i.test(s))n=!0;else if(/^s(hift)?$/i.test(s))o=!0;else throw Error("Unrecognized modifier name: "+s)}return e&&(t="Alt-"+t),n&&(t="Ctrl-"+t),r&&(t="Cmd-"+t),o&&(t="Shift-"+t),t}function rE(t,e,n,o){var r=(e=rM(e)).call?e.call(t,o):e[t];if(!1===r)return"nothing";if("..."===r)return"multi";if(null!=r&&n(r))return"handled";if(e.fallthrough){if("[object Array]"!=Object.prototype.toString.call(e.fallthrough))return rE(t,e.fallthrough,n,o);for(var i=0;i<e.fallthrough.length;i++){var a=rE(t,e.fallthrough[i],n,o);if(a)return a}}}function rk(t){var e="string"==typeof t?t:rC[t.keyCode];return"Ctrl"==e||"Alt"==e||"Shift"==e||"Mod"==e}function rj(t,e,n){var o=t;return e.altKey&&"Alt"!=o&&(t="Alt-"+t),(A?e.metaKey:e.ctrlKey)&&"Ctrl"!=o&&(t="Ctrl-"+t),(A?e.ctrlKey:e.metaKey)&&"Mod"!=o&&(t="Cmd-"+t),!n&&e.shiftKey&&"Shift"!=o&&(t="Shift-"+t),t}function rA(t,e){if(w&&34==t.keyCode&&t.char)return!1;var n=rC[t.keyCode];return null!=n&&!t.altGraphKey&&(3==t.keyCode&&t.code&&(n=t.code),rj(n,t,e))}function rM(t){return"string"==typeof t?rT[t]:t}function rD(t,e){for(var n=t.doc.sel.ranges,o=[],r=0;r<n.length;r++){for(var i=e(n[r]);o.length&&0>=t3(i.from,tn(o).to);){var a=o.pop();if(0>
vendor: 4,094 bytes, line 1
1t3(a.from,i.from)){i.from=a.from;break}}o.push(i)}n8(t,function(){for(var e=o.length-1;e>=0;e--)rt(t.doc,"",o[e].from,o[e].to,"+delete");nq(t)})}function rL(t,e,n){var o=tf(t.text,e+n,n);return o<0||o>t.text.length?null:o}function rI(t,e,n){var o=rL(t,e.ch,n);return null==o?null:new t2(e.line,o,n<0?"after":"before")}function rN(t,e,n,o,r){if(t){"rtl"==e.doc.direction&&(r=-r);var i=ty(n,e.doc.direction);if(i){var a,s=r<0?tn(i):i[0],l=r<0==(1==s.level)?"after":"before";if(s.level>0||"rtl"==e.doc.direction){var c=e8(e,n),u=nt(e,c,a=r<0?n.text.length-1:0).top;a=td(function(t){return nt(e,c,t).top==u},r<0==(1==s.level)?s.from:s.to-1,a),"before"==l&&(a=rL(n,a,1))}else a=r<0?s.to:s.from;return new t2(o,a,l)}}return new t2(o,r<0?n.text.length:0,r<0?"before":"after")}rT.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"},rT.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"},rT.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"},rT.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"]},rT.default=P?rT.macDefault:rT.pcDefault;var rR={selectAll:o3,singleSelection:function(t){return t.setSelection(t.getCursor("anchor"),t.getCursor("head"),J)},killLine:function(t){return rD(t,function(e){if(!e.empty())return{from:e.from(),to:e.to()};var n=tK(t.doc,e.head.line).text.length;return e.head.ch==n&&e.head.line<t.lastLine()?{from:e.head,to:t2(e.head.line+1,0)}:{from:e.head,to:t2(e.head.line,n)}})},deleteLine:function(t){return rD(t,function(e){return{from:t2(e.from().line,0),to:t8(t.doc,t2(e.to().line+1,0))}})},delLineLeft:function(t){return rD(t,function(t){return{from:t2(t.from().line,0),to:t.from()}})},delWrappedLineLeft:function(t){return rD(t,function(e){var n=t.charCoords(e.head,"div").top+5;return{from:t.coordsChar({left:0,top:n},"div"),to:e.from()}})},delWrappedLineRight:function(t){return rD(t,function(e){var n=t.charCoords(e.head,"div").top+5,o=t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div");return{from:e.from(),to:o}})},undo:function(t){return t.undo()},redo:function(t){return t.redo()},undoSelection:function(t){return t.undoSelection()},redoSelection:function(t){return t.redoSelection()},goDocStart:function(t){return t.extendSelection(t2(t.firstLine(),0))}
vendor: 4,420 bytes, line 1
1,goDocEnd:function(t){return t.extendSelection(t2(t.lastLine()))},goLineStart:function(t){return t.extendSelectionsBy(function(e){return rV(t,e.head.line)},{origin:"+move",bias:1})},goLineStartSmart:function(t){return t.extendSelectionsBy(function(e){return rF(t,e.head)},{origin:"+move",bias:1})},goLineEnd:function(t){return t.extendSelectionsBy(function(e){var n,o,r,i;return n=t,o=e.head.line,(i=function(t){for(var e;e=eO(t,!1);)t=e.find(1,!0).line;return t}(r=tK(n.doc,o)))!=r&&(o=tZ(i)),rN(!0,n,r,o,-1)},{origin:"+move",bias:-1})},goLineRight:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:t.display.lineDiv.offsetWidth+100,top:n},"div")},Z)},goLineLeft:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5;return t.coordsChar({left:0,top:n},"div")},Z)},goLineLeftSmart:function(t){return t.extendSelectionsBy(function(e){var n=t.cursorCoords(e.head,"div").top+5,o=t.coordsChar({left:0,top:n},"div");return o.ch<t.getLine(o.line).search(/\S/)?rF(t,e.head):o},Z)},goLineUp:function(t){return t.moveV(-1,"line")},goLineDown:function(t){return t.moveV(1,"line")},goPageUp:function(t){return t.moveV(-1,"page")},goPageDown:function(t){return t.moveV(1,"page")},goCharLeft:function(t){return t.moveH(-1,"char")},goCharRight:function(t){return t.moveH(1,"char")},goColumnLeft:function(t){return t.moveH(-1,"column")},goColumnRight:function(t){return t.moveH(1,"column")},goWordLeft:function(t){return t.moveH(-1,"word")},goGroupRight:function(t){return t.moveH(1,"group")},goGroupLeft:function(t){return t.moveH(-1,"group")},goWordRight:function(t){return t.moveH(1,"word")},delCharBefore:function(t){return t.deleteH(-1,"codepoint")},delCharAfter:function(t){return t.deleteH(1,"char")},delWordBefore:function(t){return t.deleteH(-1,"word")},delWordAfter:function(t){return t.deleteH(1,"word")},delGroupBefore:function(t){return t.deleteH(-1,"group")},delGroupAfter:function(t){return t.deleteH(1,"group")},indentAuto:function(t){return t.indentSelection("smart")},indentMore:function(t){return t.indentSelection("add")},indentLess:function(t){return t.indentSelection("subtract")},insertTab:function(t){return t.replaceSelection(" ")},insertSoftTab:function(t){for(var e=[],n=t.listSelections(),o=t.options.tabSize,r=0;r<n.length;r++){var i=n[r].from(),a=q(t.getLine(i.line),i.ch,o);e.push(te(o-a%o))}t.replaceSelections(e)},defaultTab:function(t){t.somethingSelected()?t.indentSelection("add"):t.execCommand("insertTab")},transposeChars:function(t){return n8(t,function(){for(var e=t.listSelections(),n=[],o=0;o<e.length;o++)if(e[o].empty()){var r=e[o].head,i=tK(t.doc,r.line).text;if(i){if(r.ch==i.length&&(r=new t2(r.line,r.ch-1)),r.ch>0)r=new t2(r.line,r.ch+1),t.replaceRange(i.charAt(r.ch-1)+i.charAt(r.ch-2),t2(r.line,r.ch-2),r,"+transpose");else if(r.line>t.doc.first){var a=tK(t.doc,r.line-1).text;a&&(r=new t2(r.line,1),t.replaceRange(i.charAt(0)+t.doc.lineSeparator()+a.charAt(a.length-1),t2(r.line-1,a.length-1),r,"+transpose"))}}n.push(new oC(r,r))}t.setSelections(n)})},newlineAndIndent:function(t){return n8(t,function(){for(var e=t.listSelections(),n=e.length-1;n>=0;n--)t.replaceRange(t.doc.lineSeparator(),e[n].anchor,e[n].head,"+input");e=t.listSelections();for(var o=0;o<e.length;o++)t.indentLine(e[o].from().line,null,!0);nq(t)})},openLine:function(t){return t.replaceSelection("\n","start")},toggleOverwrite:function(t){return t.toggleOverwrite()}};function rV(t,e){var n=tK(t.doc,e),o=eT(n);return o!=n&&(e=tZ(o)),rN(!0,t,o,e,1)}function rF(t,e){var n=rV(t,e.line),o=tK(t.doc,n.line),r=ty(o,t.doc.direction);if(!r||0==r[0].level){var i=Math.max(n.ch,o.text.search(/\S/)),a=e.line==n.line&&e.ch<=i&&e.ch;return t2(n.line,a?0:i,n.sticky)}return n}function rH(t,e,n){if("string"==typeof e&&!(e=rR[e]))return!1;t.display.input.ensurePolled();var o=t.display.shift,r=!1;try{t.isReadOnly()&&(t.state.suppressEdits=!0),n&&(t.display.shift=!1),r=e(t)!=Y}finally{t.display.shift=o,t.state.suppressEdits=!1}return r}var rU=new G;function rB(t,e,n,o){var r=t.state.keySeq;if(r){if(rk(e))return"handled";if(/\'$/.test(e)?t.state.keySeq=null:rU.set(50,function(){t.state.keySeq==r&&(t.state.keySeq=null,t.display.input.reset())}),rz(t,r+" "+e,n,o))return!0}return rz(t,e,n,o)}function rz(t,e,n,o){var r=function(t,e,n){for(var o=0;o<t.state.keyMaps.length;o++){var r=rE(e,t.state.keyMaps[o],n,t);
1if(r)return r}return t.options.extraKeys&&rE(e,t.options.extraKeys,n,t)||rE(e,t.options.keyMap,n,t)}(t,e,o);return"multi"==r&&(t.state.keySeq=e),"handled"==r&&eW(t,"keyHandled",t,e,n),("handled"==r||"multi"==r)&&(tP(n),nN(t)),!!r}function rW(t,e){var n=rA(e,!0);return!!n&&(e.shiftKey&&!t.state.keySeq?rB(t,"Shift-"+n,e,function(e){return rH(t,e,!0)})||rB(t,n,e,function(e){if("string"==typeof e?/^go[A-Z]/.test(e):e.motion)return rH(t,e)}):rB(t,n,e,function(e){return rH(t,e)}))}var r$=null;function rq(t){if((!t.target||t.target==this.display.input.getField())&&(this.curOp.focus=H(),!tx(this,t))){g&&v<11&&27==t.keyCode&&(t.returnValue=!1);var e=t.keyCode;this.display.shift=16==e||t.shiftKey;var n=rW(this,t);w&&(r$=n?e:null,!n&&88==e&&!tN&&(P?t.metaKey:t.ctrlKey)&&this.replaceSelection("",null,"cut")),p&&!P&&!n&&46==e&&t.shiftKey&&!t.ctrlKey&&document.execCommand&&document.execCommand("cut"),18!=e||/\bCodeMirror-crosshair\b/.test(this.display.lineDiv.className)||function(t){var e=t.display.lineDiv;function n(t){18!=t.keyCode&&t.altKey||(L(e,"CodeMirror-crosshair"),t_(document,"keyup",n),t_(document,"mouseover",n))}U(e,"CodeMirror-crosshair"),tb(document,"keyup",n),tb(document,"mouseover",n)}(this)}}function rG(t){16==t.keyCode&&(this.doc.sel.shift=!1),tx(this,t)}function rK(t){if(t.target&&t.target!=this.display.input.getField()||e0(this.display,t)||tx(this,t)||t.ctrlKey&&!t.altKey||P&&t.metaKey)return;var e,n=t.keyCode,o=t.charCode;if(w&&n==r$){r$=null,tP(t);return}if(!(w&&(!t.which||t.which<10)&&rW(this,t))){var r=String.fromCharCode(null==o?n:o);"\b"!=r&&(e=this,rB(e,"'"+r+"'",t,function(t){return rH(e,t,!0)})||this.display.input.onKeyPress(t))}}var rY=function(t,e,n){this.time=t,this.pos=e,this.button=n};function rJ(t){var e,n=this.display;if(!(tx(this,t)||n.activeTouch&&n.input.supportsTouch())){if(n.input.ensurePolled(),n.shift=t.shiftKey,e0(n,t)){y||(n.scroller.draggable=!1,setTimeout(function(){return n.scroller.draggable=!0},100));return}if(!rQ(this,t)){var o,r,i,a,c,u,p=nS(this,t),f=tM(t),d=p?(e=+new Date,l&&l.compare(e,p,f)?(s=l=null,"triple"):s&&s.compare(e,p,f)?(l=new rY(e,p,f),s=null,"double"):(s=new rY(e,p,f),l=null,"single")):"single";window.focus(),1==f&&this.state.selectingText&&this.state.selectingText(t),p&&(o=this,r=f,i=p,a=d,c=t,u="Click","double"==a?u="Double"+u:"triple"==a&&(u="Triple"+u),rB(o,rj(u=(1==r?"Left":2==r?"Middle":"Right")+u,c),c,function(t){if("string"==typeof t&&(t=rR[t]),!t)return!1;var e=!1;try{o.isReadOnly()&&(o.state.suppressEdits=!0),e=t(o,i)!=Y}finally{o.state.suppressEdits=!1}return e}))||(1==f?p?function(t,e,n,o){g?setTimeout(W(nR,t),0):t.curOp.focus=H();var r,i,a,s,l,c,u,p,f,d,h,m,b=(null==(h=(d=t.getOption("configureMouse"))?d(t,n,o):{}).unit&&(h.unit=(E?o.shiftKey&&o.metaKey:o.altKey)?"rectangle":"single"==n?"char":"double"==n?"word":"line"),(null==h.extend||t.doc.extend)&&(h.extend=t.doc.extend||o.shiftKey),null==h.addNew&&(h.addNew=P?o.metaKey:o.ctrlKey),null==h.moveOnDrag&&(h.moveOnDrag=!(P?o.altKey:o.ctrlKey)),h),w=t.doc.sel;t.options.dragDrop&&tD&&!t.isReadOnly()&&"single"==n&&(m=w.contains(e))>-1&&(0>t3((m=w.ranges[m]).from(),e)||e.xRel>0)&&(t3(m.to(),e)>0||e.xRel<0)?(r=t,i=o,a=e,s=b,l=r.display,c=!1,u=ot(r,function(t){y&&(l.scroller.draggable=!1),r.state.draggingText=!1,r.state.delayingBlurEvent&&(r.hasFocus()?r.state.delayingBlurEvent=!1:nV(r)),t_(l.wrapper.ownerDocument,"mouseup",u),t_(l.wrapper.ownerDocument,"mousemove",p),t_(l.scroller,"dragstart",f),t_(l.scroller,"drop",u),c||(tP(t),s.addNew||o$(r.doc,a,null,null,s.extend),y&&!_||g&&9==v?setTimeout(function(){l.wrapper.ownerDocument.body.focus({preventScroll:!0}),l.input.focus()},20):l.input.focus())}),p=function(t){c=c||Math.abs(i.clientX-t.clientX)+Math.abs(i.clientY-t.clientY)>=10},f=function(){return c=!0},y&&(l.scroller.draggable=!0),r.state.draggingText=u,u.copy=!s.moveOnDrag,tb(l.wrapper.ownerDocument,"mouseup",u),tb(l.wrapper.ownerDocument,"mousemove",p),tb(l.scroller,"dragstart",f),tb(l.scroller,"drop",u),r.state.delayingBlurEvent=!0,setTimeout(function(){return l.input.focus()},20),l.scroller.dragDrop&&l.scroller.dragDrop()):function(t,e,n,o){g&&nV(t);var r=t.display,i=t.doc;tP(e);var a,s,l=i.sel,c=l.ranges;if(o.addNew&&!o.extend?a=(s=i.sel.contains(n))>-1?c[s]:new oC(n,n):(a=i.sel.primary(),s=i.sel.primIndex),"rectangle"==o.unit)o.addNew||(a=new oC(n,n)),n=nS(t,e,!0,!0),s=-1;else{var u=rX(t,n,o.unit);a=o.extend?oW(a,u.anchor,u.head,o.extend):u}o.addNew?-1==s?(s=c.length,oY(i,ox(t,c.concat([a]),s),{scroll:!1,origin:"*mouse"})):c.length>1&&c[s].empty()&&"char"==o.unit&&!o.extend?(oY(i,ox(t,c.slice(0,s).concat(c.slice(s+1)),0),{scroll:!1,origin:"*mouse"}),l=i.sel):oG(i,s,a,X):(s=0,oY(i,new o_([a],0),X),l=i.sel);var p=n,f=r.wrapper.getBoundingClientRect(),d=0;function h(e){t.state.selectingText=!1,d=1/0,e&&(tP(e),r.input.focus()),t_(r.wrapper.ownerDocument,"mousemove",v),t_(r.wrapper.ownerDocument,"mouseup",y),i.history.lastSelOrigin=null}var v=ot(t,function(e){0!==e.buttons&&tM(e)?function e(c){var u=++d,h=nS(t,c,!0,"rectangle"==o.unit);if(h)if(0!=t3(h,p)){t.curOp.focus=H(),function(e){if(0!=t3(p,e))if(p=e,"rectangle"==o.unit){for(var r=[],c=t.options.tabSize,u=q(tK(i,n.line).text,n.ch,c
1),f=q(tK(i,e.line).text,e.ch,c),d=Math.min(u,f),h=Math.max(u,f),g=Math.min(n.line,e.line),v=Math.min(t.lastLine(),Math.max(n.line,e.line));g<=v;g++){var y=tK(i,g).text,m=Q(y,d,c);d==h?r.push(new oC(t2(g,m),t2(g,m))):y.length>m&&r.push(new oC(t2(g,m),t2(g,Q(y,h,c))))}r.length||r.push(new oC(n,n)),oY(i,ox(t,l.ranges.slice(0,s).concat(r),s),{origin:"*mouse",scroll:!1}),t.scrollIntoView(e)}else{var b,w=a,_=rX(t,e,o.unit),C=w.anchor;t3(_.anchor,C)>0?(b=_.head,C=t6(w.from(),_.anchor)):(b=_.anchor,C=t9(w.to(),_.head));var x=l.ranges.slice(0);x[s]=function(t,e){var n,o=e.anchor,r=e.head,i=tK(t.doc,o.line);if(0==t3(o,r)&&o.sticky==r.sticky)return e;var a=ty(i);if(!a)return e;var s=tg(a,o.ch,o.sticky),l=a[s];if(l.from!=o.ch&&l.to!=o.ch)return e;var c=s+ +(l.from==o.ch!=(1!=l.level));if(0==c||c==a.length)return e;if(r.line!=o.line)n=(r.line-o.line)*("ltr"==t.doc.direction?1:-1)>0;else{var u=tg(a,r.ch,r.sticky),p=u-s||(r.ch-o.ch)*(1==l.level?-1:1);n=u==c-1||u==c?p<0:p>0}var f=a[c+(n?-1:0)],d=n==(1==f.level),h=d?f.from:f.to,g=d?"after":"before";return o.ch==h&&o.sticky==g?e:new oC(new t2(o.line,h,g),r)}(t,new oC(t8(i,C),b)),oY(i,ox(t,x,s),X)}}(h);var g=nz(r,i);(h.line>=g.to||h.line<g.from)&&setTimeout(ot(t,function(){d==u&&e(c)}),150)}else{var v=c.clientY<f.top?-20:20*(c.clientY>f.bottom);v&&setTimeout(ot(t,function(){d==u&&(r.scroller.scrollTop+=v,e(c))}),50)}}(e):h(e)}),y=ot(t,h);t.state.selectingText=y,tb(r.wrapper.ownerDocument,"mousemove",v),tb(r.wrapper.ownerDocument,"mouseup",y)}(t,o,e,b)}(this,p,d,t):tA(t)==n.scroller&&tP(t):2==f?(p&&o$(this.doc,p),setTimeout(function(){return n.input.focus()},20)):3==f&&(M?this.display.input.onContextMenu(t):nV(this)))}}}function rX(t,e,n){if("char"==n)return new oC(e,e);if("word"==n)return t.findWordAt(e);if("line"==n)return new oC(t2(e.line,0),t8(t.doc,t2(e.line+1,0)));var o=n(t,e);return new oC(o.from,o.to)}function rZ(t,e,n,o){if(e.touches)r=e.touches[0].clientX,i=e.touches[0].clientY;else try{r=e.clientX,i=e.clientY}catch(t){return!1}if(r>=Math.floor(t.display.gutters.getBoundingClientRect().right))return!1;o&&tP(e);var r,i,a=t.display,s=a.lineDiv.getBoundingClientRect();if(i>s.bottom||!tS(t,n))return tk(e);i-=s.top-a.viewOffset;for(var l=0;l<t.display.gutterSpecs.length;++l){var c=a.gutters.childNodes[l];if(c&&c.getBoundingClientRect().right>=r){var u=tQ(t.doc,i),p=t.display.gutterSpecs[l];return tC(t,n,t,u,p.className,e),tk(e)}}}function rQ(t,e){return rZ(t,e,"gutterClick",!0)}function r0(t,e){var n,o;!(e0(t.display,e)||(n=t,o=e,tS(n,"gutterContextMenu")&&rZ(n,o,"gutterContextMenu",!1)))&&!tx(t,e,"contextmenu")&&(M||t.display.input.onContextMenu(e))}function r1(t){t.display.wrapper.className=t.display.wrapper.className.replace(/\s*cm-s-\S+/g,"")+t.options.theme.replace(/(^|\s)\s*/g," cm-s-"),ni(t)}rY.prototype.compare=function(t,e,n){return this.time+400>t&&0==t3(e,this.pos)&&n==this.button};var r2={toString:function(){return"CodeMirror.Init"}},r3={},r5={};function r4(t,e){var n,o=this;if(!(this instanceof r4))return new r4(t,e);this.options=e=e?$(e):{},$(r3,e,!1);var r=e.value;"string"==typeof r?r=new rg(r,e.mode,null,e.lineSeparator,e.direction):e.mode&&(r.modeOption=e.mode),this.doc=r;var i=new r4.inputStyles[e.inputStyle](this),a=this.display=new ov(t,r,i,e);for(var s in a.wrapper.CodeMirror=this,r1(this),e.lineWrapping&&(this.display.wrapper.className+=" CodeMirror-wrap"),n4(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 G,keySeq:null,specialChars:null},e.autofocus&&!T&&a.input.focus(),g&&v<11&&setTimeout(function(){return o.display.input.reset(!0)},20),function(t){var e=t.display;tb(e.scroller,"mousedown",ot(t,rJ)),g&&v<11?tb(e.scroller,"dblclick",ot(t,function(e){if(!tx(t,e)){var n=nS(t,e);if(!(!n||rQ(t,e)||e0(t.display,e))){tP(e);var o=t.findWordAt(n);o$(t.doc,o.anchor,o.head)}}})):tb(e.scroller,"dblclick",function(e){return tx(t,e)||tP(e)}),tb(e.scroller,"contextmenu",function(e){return r0(t,e)}
1),tb(e.input.getField(),"contextmenu",function(n){e.scroller.contains(n.target)||r0(t,n)});var n,o={end:0};function r(){e.activeTouch&&(n=setTimeout(function(){return e.activeTouch=null},1e3),(o=e.activeTouch).end=+new Date)}function i(t,e){if(null==e.left)return!0;var n=e.left-t.left,o=e.top-t.top;return n*n+o*o>400}tb(e.scroller,"touchstart",function(r){if(!tx(t,r)&&!function(t){if(1!=t.touches.length)return!1;var e=t.touches[0];return e.radiusX<=1&&e.radiusY<=1}(r)&&!rQ(t,r)){e.input.ensurePolled(),clearTimeout(n);var i=+new Date;e.activeTouch={start:i,moved:!1,prev:i-o.end<=300?o:null},1==r.touches.length&&(e.activeTouch.left=r.touches[0].pageX,e.activeTouch.top=r.touches[0].pageY)}}),tb(e.scroller,"touchmove",function(){e.activeTouch&&(e.activeTouch.moved=!0)}),tb(e.scroller,"touchend",function(n){var o=e.activeTouch;if(o&&!e0(e,n)&&null!=o.left&&!o.moved&&new Date-o.start<300){var a,s=t.coordsChar(e.activeTouch,"page");a=!o.prev||i(o,o.prev)?new oC(s,s):!o.prev.prev||i(o,o.prev.prev)?t.findWordAt(s):new oC(t2(s.line,0),t8(t.doc,t2(s.line+1,0))),t.setSelection(a.anchor,a.head),t.focus(),tP(n)}r()}),tb(e.scroller,"touchcancel",r),tb(e.scroller,"scroll",function(){e.scroller.clientHeight&&(nJ(t,e.scroller.scrollTop),nZ(t,e.scroller.scrollLeft,!0),tC(t,"scroll",t))}),tb(e.scroller,"mousewheel",function(e){return ow(t,e)}),tb(e.scroller,"DOMMouseScroll",function(e){return ow(t,e)}),tb(e.wrapper,"scroll",function(){return e.wrapper.scrollTop=e.wrapper.scrollLeft=0}),e.dragFunctions={enter:function(e){tx(t,e)||tj(e)},over:function(e){if(!tx(t,e)){var n=t,o=e,r=nS(n,o);if(r){var i=document.createDocumentFragment();nL(n,r,i),n.display.dragCursor||(n.display.dragCursor=R("div",null,"CodeMirror-cursors CodeMirror-dragcursors"),n.display.lineSpace.insertBefore(n.display.dragCursor,n.display.cursorDiv)),N(n.display.dragCursor,i)}tj(e)}},start:function(e){var n=t,o=e;if(g&&(!n.state.draggingText||new Date-rv<100))return void tj(o);if(!(tx(n,o)||e0(n.display,o))&&(o.dataTransfer.setData("Text",n.getSelection()),o.dataTransfer.effectAllowed="copyMove",o.dataTransfer.setDragImage&&!_)){var r=R("img",null,null,"position: fixed; left: 0; top: 0;");r.src="data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==",w&&(r.width=r.height=1,n.display.wrapper.appendChild(r),r._top=r.offsetTop),o.dataTransfer.setDragImage(r,0,0),w&&r.parentNode.removeChild(r)}},drop:ot(t,ry),leave:function(e){tx(t,e)||rm(t)}};var a=e.input.getField();tb(a,"keyup",function(e){return rG.call(t,e)}),tb(a,"keydown",ot(t,rq)),tb(a,"keypress",ot(t,rK)),tb(a,"focus",function(e){return nF(t,e)}),tb(a,"blur",function(e){return nH(t,e)})}(this),rw||(tb(window,"resize",function(){null==n&&(n=setTimeout(function(){n=null,rb(r_)},100))}),tb(window,"blur",function(){return rb(nH)}),rw=!0),n6(this),this.curOp.forceUpdate=!0,oL(this,r),e.autofocus&&!T||this.hasFocus()?setTimeout(function(){o.hasFocus()&&!o.state.focused&&nF(o)},20):nH(this),r5)r5.hasOwnProperty(s)&&r5[s](this,e[s],r2);of(this),e.finishInit&&e.finishInit(this);for(var l=0;l<r9.length;++l)r9[l](this);n7(this),y&&e.lineWrapping&&"optimizelegibility"==getComputedStyle(a.lineDiv).textRendering&&(a.lineDiv.style.textRendering="auto")}r4.defaults=r3,r4.optionHandlers=r5;var r9=[];function r6(t,e,n,o){var r,i=t.doc;null==n&&(n="add"),"smart"==n&&(i.mode.indent?r=ei(t,e).state:n="prev");var a=t.options.tabSize,s=tK(i,e),l=q(s.text,null,a);s.stateAfter&&(s.stateAfter=null);var c,u=s.text.match(/^\s*/)[0];if(o||/\S/.test(s.text)){if("smart"==n&&((c=i.mode.indent(r,s.text.slice(u.length),s.text))==Y||c>150)){if(!o)return;n="prev"}}else c=0,n="not";"prev"==n?c=e>i.first?q(tK(i,e-1).text,null,a):0:"add"==n?c=l+t.options.indentUnit:"subtract"==n?c=l-t.options.indentUnit:"number"==typeof n&&(c=l+n),c=Math.max(0,c);var p="",f=0;if(t.options.indentWithTabs)for(var d=Math.floor(c/a);d;--d)f+=a,p+=" ";if(f<c&&(p+=te(c-f)),p!=u)return rt(i,p,t2(e,0),t2(e,u.length),"+input"),s.stateAfter=null,!0;for(var h=0;h<i.sel.ranges.length;h++){var g=i.sel.ranges[h];if(g.head.line==e&&g.head.ch<u.length){var v=t2(e,u.length);oG(i,h,new oC(v,v));break}}}r4.defineInitHook=function(t){return r9.push(t)};var r7=null;function r8(t,e,n,o,r){var i=t.doc;t.display.shift=!1,o||(o=i.sel);var a=new Date-200,s="paste"==r||t.state.pasteIncoming>a,l=tL(e),c=null;if(s&&o.ranges.length>1)if(r7&&r7.text.join("\n")==e){if(o.ranges.length%r7.text.length==0){c=[];for(var u=0;u<r7.text.length;u++)c.push(i.splitLines(r7.text[u]))}}else l.length==o.ranges.length&&t.options.pasteLinesPerSelection&&(c=to(l,function(t){return[t]}));for(var p=t.curOp.updateInput,f=o.ranges.length-1;f>=0;f--){var d=o.ranges[f],h=d.from(),g=d.to();d.empty()&&(n&&n>0?h=t2(h.line,h.ch-n):t.state.overwrite&&!s?g=t2(g.line,Math.min(tK(i,g.line).text.length,g.ch+tn(l).length)):s&&r7&&r7.lineWise&&r7.text.join("\n")==l.join("\n")&&(h=g=t2(h.line,0)));var v={from:h,to:g,text:c?c[f%c.length]:l,origin:r||(s?"paste":t.state.cutIncoming>a?"cut":"+input")};o4(t.doc,v),eW(t,"inputRead",t,v)}e&&!s&&ie(t,e),nq(t),t.curOp.updateInput<2&&(t.curOp.updateInput=p),t.curOp.typing=!0,t.state.pasteIncoming=t.state.cutIncoming=-1}function it(t,e){var n=t.clipboardData&&t.clipboardData.getData("Text");if(n)return t.preventDefault(),e.isReadOnly()||e.options.disableInput||n8(e,function(){return r8(e,n,0,null,"paste")}),!0}function ie(t,e){if(t.options.electricChars&&t.options.smartIndent)for(var n=t.doc.sel,o=n.ranges.length-1;o>=0;o--){var r=n.ranges[o];if(!(r.head.ch>100)&&(!o||n.ranges[o-1].head.line!=r.head.line)){var i=t.getModeAt(r.head),a=!1;if(i.electricChars){for(var s=0;s<i.electricChars.length;s++)if(e.indexOf(i.electricChars.charAt(s))>-1){a=r6(t,r.head.line,"smart");break}}else i.electricInput&&i.electricInput.test(tK(t.doc,r.head.line).text.slice(0,r.head.ch))&&(a=r6(t,r.head.line,"smart"));a&&eW(t,"electricInput",t,r.head.line)}}}function io(t){for(var e=[],n=[],o=0;o<t.doc.sel.ranges.length;o++){var r=t.doc.sel.ranges[o].head.line,i={anchor:t2(r,0),head:t2(r+1,0)};n.push(i),e.push(t.getRange(i.anchor,i.head))}return{text:e,ranges:n}}function ir(t,e,n,o){t.setAttribute("autocorrect",n?"":"off"),t.setAttribute("autocapitalize",o?""
vendor: 4,606 bytes, line 1
1:"off"),t.setAttribute("spellcheck",!!e)}function ii(){var t=R("textarea",null,null,"position: absolute; bottom: -1em; padding: 0; width: 1px; height: 1em; outline: none"),e=R("div",[t],null,"overflow: hidden; position: relative; width: 3px; height: 0px;");return y?t.style.width="1000px":t.setAttribute("wrap","off"),O&&(t.style.border="1px solid black"),ir(t),e}function ia(t,e,n,o,r){var i=e,a=n,s=tK(t,e.line),l=r&&"rtl"==t.direction?-n:n;function c(i){if("codepoint"==o){var a,c,u=s.text.charCodeAt(e.ch+(n>0?0:-1));if(isNaN(u))a=null;else{var p=n>0?u>=55296&&u<56320:u>=56320&&u<57343;a=new t2(e.line,Math.max(0,Math.min(s.text.length,e.ch+n*(p?2:1))),-n)}}else a=r?function(t,e,n,o){var r,i=ty(e,t.doc.direction);if(!i)return rI(e,n,o);n.ch>=e.text.length?(n.ch=e.text.length,n.sticky="before"):n.ch<=0&&(n.ch=0,n.sticky="after");var a=tg(i,n.ch,n.sticky),s=i[a];if("ltr"==t.doc.direction&&s.level%2==0&&(o>0?s.to>n.ch:s.from<n.ch))return rI(e,n,o);var l=function(t,n){return rL(e,t instanceof t2?t.ch:t,n)},c=function(n){return t.options.lineWrapping?(r=r||e8(t,e),ny(t,e,r,n)):{begin:0,end:e.text.length}},u=c("before"==n.sticky?l(n,-1):n.ch);if("rtl"==t.doc.direction||1==s.level){var p=1==s.level==o<0,f=l(n,p?1:-1);if(null!=f&&(p?f<=s.to&&f<=u.end:f>=s.from&&f>=u.begin))return new t2(n.line,f,p?"before":"after")}var d=function(t,e,o){for(var r=function(t,e){return e?new t2(n.line,l(t,1),"before"):new t2(n.line,t,"after")};t>=0&&t<i.length;t+=e){var a=i[t],s=e>0==(1!=a.level),c=s?o.begin:l(o.end,-1);if(a.from<=c&&c<a.to||(c=s?a.from:l(a.to,-1),o.begin<=c&&c<o.end))return r(c,s)}},h=d(a+o,o,u);if(h)return h;var g=o>0?u.end:l(u.begin,-1);return null!=g&&!(o>0&&g==e.text.length)&&(h=d(o>0?0:i.length-1,o,c(g)))?h:null}(t.cm,s,e,n):rI(s,e,n);if(null==a){if(!(!i&&!((c=e.line+l)<t.first)&&!(c>=t.first+t.size)&&(e=new t2(c,e.ch,e.sticky),s=tK(t,c))))return!1;e=rN(r,t.cm,s,e.line,l)}else e=a;return!0}if("char"==o||"codepoint"==o)c();else if("column"==o)c(!0);else if("word"==o||"group"==o)for(var u=null,p="group"==o,f=t.cm&&t.cm.getHelper(e,"wordChars"),d=!0;!(n<0)||c(!d);d=!1){var h=s.text.charAt(e.ch)||"\n",g=tl(h,f)?"w":p&&"\n"==h?"n":!p||/\s/.test(h)?null:"p";if(!p||d||g||(g="s"),u&&u!=g){n<0&&(n=1,c(),e.sticky="after");break}if(g&&(u=g),n>0&&!c(!d))break}var v=o1(t,e,i,a,!0);return t5(i,v)&&(v.hitSide=!0),v}function is(t,e,n,o){var r,i,a=t.doc,s=e.left;if("page"==o){var l=Math.max(Math.min(t.display.wrapper.clientHeight,window.innerHeight||document.documentElement.clientHeight)-.5*nb(t.display),3);i=(n>0?e.bottom:e.top)+n*l}else"line"==o&&(i=n>0?e.bottom+3:e.top-3);for(;(r=ng(t,s,i)).outside;){if(n<0?i<=0:i>=a.height){r.hitSide=!0;break}i+=5*n}return r}var il=function(t){this.cm=t,this.lastAnchorNode=this.lastAnchorOffset=this.lastFocusNode=this.lastFocusOffset=null,this.polling=new G,this.composing=null,this.gracePeriod=!1,this.readDOMTimeout=null};function ic(t,e){var n=e7(t,e.line);if(!n||n.hidden)return null;var o=tK(t.doc,e.line),r=e6(n,o,e.line),i=ty(o,t.doc.direction),a="left";i&&(a=tg(i,e.ch)%2?"right":"left");var s=nn(r.map,e.ch,a);return s.offset="right"==s.collapse?s.end:s.start,s}function iu(t,e){return e&&(t.bad=!0),t}function ip(t,e,n){var o;if(e==t.display.lineDiv){if(!(o=t.display.lineDiv.childNodes[n]))return iu(t.clipPos(t2(t.display.viewTo-1)),!0);e=null,n=0}else for(o=e;;o=o.parentNode){if(!o||o==t.display.lineDiv)return null;if(o.parentNode&&o.parentNode==t.display.lineDiv)break}for(var r=0;r<t.display.view.length;r++){var i=t.display.view[r];if(i.node==o)return function(t,e,n){var o=t.text.firstChild,r=!1;if(!e||!F(o,e))return iu(t2(tZ(t.line),0),!0);if(e==o&&(r=!0,e=o.childNodes[n],n=0,!e)){var i=t.rest?tn(t.rest):t.line;return iu(t2(tZ(i),i.text.length),r)}var a=3==e.nodeType?e:null,s=e;for(!a&&1==e.childNodes.length&&3==e.firstChild.nodeType&&(a=e.firstChild,n&&(n=a.nodeValue.length));s.parentNode!=o;)s=s.parentNode;var l=t.measure,c=l.maps;function u(e,n,o){for(var r=-1;r<(c?c.length:0);r++)for(var i=r<0?l.map:c[r],a=0;a<i.length;a+=3){var s=i[a+2];if(s==e||s==n){var u=tZ(r<0?t.line:t.rest[r]),p=i[a]+o;return(o<0||s!=e)&&(p=i[a+ +!!o]),t2(u,p)}}}var p=u(a,s,n);if(p)return iu(p,r);for(var f=s.nextSibling,d=a?a.nodeValue.length-n:0;f;f=f.nextSibling){if(p=u(f,f.firstChild,0))return iu(t2(p.line,p.ch-d),r);d+=f.textContent.length}for(var h=s.previousSibling,g=n;h;h=h.previousSibling){if(p=u(h,h.firstChild,-1))return iu(t2(p.line,p.ch+g),r);g+=h.textContent.length}}(i,e,n)}}il.prototype.init=function(t){var e=this,n=this,o=n.cm,r=n.div=t.lineDiv;function i(t){for(var e=t.target;e;e=e.parentNode){if(e==r)return!0;
1if(/\bCodeMirror-(?:line)?widget\b/.test(e.className))break}return!1}function a(t){if(!(!i(t)||tx(o,t))){if(o.somethingSelected())r7={lineWise:!1,text:o.getSelections()},"cut"==t.type&&o.replaceSelection("",null,"cut");else{if(!o.options.lineWiseCopyCut)return;var e=io(o);r7={lineWise:!0,text:e.text},"cut"==t.type&&o.operation(function(){o.setSelections(e.ranges,0,J),o.replaceSelection("",null,"cut")})}if(t.clipboardData){t.clipboardData.clearData();var a=r7.text.join("\n");if(t.clipboardData.setData("Text",a),t.clipboardData.getData("Text")==a)return void t.preventDefault()}var s=ii(),l=s.firstChild;o.display.lineSpace.insertBefore(s,o.display.lineSpace.firstChild),l.value=r7.text.join("\n");var c=H();z(l),setTimeout(function(){o.display.lineSpace.removeChild(s),c.focus(),c==r&&n.showPrimarySelection()},50)}}r.contentEditable=!0,ir(r,o.options.spellcheck,o.options.autocorrect,o.options.autocapitalize),tb(r,"paste",function(t){!(!i(t)||tx(o,t)||it(t,o))&&v<=11&&setTimeout(ot(o,function(){return e.updateFromDOM()}),20)}),tb(r,"compositionstart",function(t){e.composing={data:t.data,done:!1}}),tb(r,"compositionupdate",function(t){e.composing||(e.composing={data:t.data,done:!1})}),tb(r,"compositionend",function(t){e.composing&&(t.data!=e.composing.data&&e.readFromDOMSoon(),e.composing.done=!0)}),tb(r,"touchstart",function(){return n.forceCompositionEnd()}),tb(r,"input",function(){e.composing||e.readFromDOMSoon()}),tb(r,"copy",a),tb(r,"cut",a)},il.prototype.screenReaderLabelChanged=function(t){t?this.div.setAttribute("aria-label",t):this.div.removeAttribute("aria-label")},il.prototype.prepareSelection=function(){var t=nD(this.cm,!1);return t.focus=H()==this.div,t},il.prototype.showSelection=function(t,e){t&&this.cm.display.view.length&&((t.focus||e)&&this.showPrimarySelection(),this.showMultipleSelections(t))},il.prototype.getSelection=function(){return this.cm.display.wrapper.ownerDocument.getSelection()},il.prototype.showPrimarySelection=function(){var t=this.getSelection(),e=this.cm,n=e.doc.sel.primary(),r=n.from(),i=n.to();if(e.display.viewTo==e.display.viewFrom||r.line>=e.display.viewTo||i.line<e.display.viewFrom)return void t.removeAllRanges();var a=ip(e,t.anchorNode,t.anchorOffset),s=ip(e,t.focusNode,t.focusOffset);if(!a||a.bad||!s||s.bad||0!=t3(t6(a,s),r)||0!=t3(t9(a,s),i)){var l=e.display.view,c=r.line>=e.display.viewFrom&&ic(e,r)||{node:l[0].measure.map[2],offset:0},u=i.line<e.display.viewTo&&ic(e,i);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)return void t.removeAllRanges();var h,g=t.rangeCount&&t.getRangeAt(0);try{h=o(c.node,c.offset,u.offset,u.node)}catch(t){}h&&(!p&&e.state.focused?(t.collapse(c.node,c.offset),h.collapsed||(t.removeAllRanges(),t.addRange(h))):(t.removeAllRanges(),t.addRange(h)),g&&null==t.anchorNode?t.addRange(g):p&&this.startGracePeriod()),this.rememberSelection()}},il.prototype.startGracePeriod=function(){var t=this;clearTimeout(this.gracePeriod),this.gracePeriod=setTimeout(function(){t.gracePeriod=!1,t.selectionChanged()&&t.cm.operation(function(){return t.cm.curOp.selectionChanged=!0})},20)},il.prototype.showMultipleSelections=function(t){N(this.cm.display.cursorDiv,t.cursors),N(this.cm.display.selectionDiv,t.selection)},il.prototype.rememberSelection=function(){var t=this.getSelection();this.lastAnchorNode=t.anchorNode,this.lastAnchorOffset=t.anchorOffset,this.lastFocusNode=t.focusNode,this.lastFocusOffset=t.focusOffset},il.prototype.selectionInEditor=function(){var t=this.getSelection();if(!t.rangeCount)return!1;var e=t.getRangeAt(0).commonAncestorContainer;return F(this.div,e)},il.prototype.focus=function(){"nocursor"!=this.cm.options.readOnly&&(this.selectionInEditor()&&H()==this.div||this.showSelection(this.prepareSelection(),!0),this.div.focus())},il.prototype.blur=function(){this.div.blur()},il.prototype.getField=function(){return this.div},il.prototype.supportsTouch=function(){return!0},il.prototype.receivedFocus=function(){var t=this,e=this;this.selectionInEditor()?setTimeout(function(){return t.pollSelection()},20):n8(this.cm,function(){return e.cm.curOp.selectionChanged=!0}),this.polling.set(this.cm.options.pollInterval,function t(){e.cm.state.focused&&(e.pollSelection(),e.polling.set(e.cm.options.pollInterval,t))})},il.prototype.selectionChanged=function(){var t=this.getSelection();return t.anchorNode!=this.lastAnchorNode||t.anchorOffset!=this.lastAnchorOffset||t.focusNode!=this.lastFocusNode||t.focusOffset!=this.lastFocusOffset},il.prototype.pollSelection=function(){if(null==this.readDOMTimeout&&!this.gracePeriod&&this.selectionChanged()){var t=this.getSelection(),e=this.cm;if(S&&b&&this.cm.display.gutterSpecs.length&&function(t){for(var e=t;e;e=e.parentNode)if(/CodeMirror-gutter-wrapper/.test(e.className))return!0;return!1}(t.anchorNode)){this.cm.triggerOnKeyDown({type:"keydown",keyCode:8,preventDefault:Math.abs}),this.blur(),this.focus();return}if(!this.composing){this.rememberSelection();var n=ip(e,t.anchorNode,t.anchorOffset),o=ip(e,t.focusNode,t.focusOffset);n&&o&&n8(e,function(){oY(e.doc,oO(n,o),J),(n.bad||o.bad)&&(e.curOp.selectionChanged=!0)})}}},il.prototype.pollContent=function(){null!=this.readDOMTimeout&&(clearTimeout(this.readDOMTimeout),this.readDOMTimeout=null);var t,e,n,o,r,i=this.cm,a=i.display,s=i.doc.sel.primary(),l=s.from(),c=s.to();if(0==l.ch&&l.line>i.firstLine()&&(l=t2(l.line-1,tK(i.doc,l.line-1).length)),c.ch==tK(i.doc,c.line).text.length&&c.line<i.lastLine()&&(c=t2(c.line+1,0)),l.line<a.viewFrom||c.line>a.viewTo-1)return!1;l.line==a.viewFrom||0==(t=nT(i,l.line))?(e=tZ(a.view[0].line),n=a.view[0].node):(e=tZ(a.view[t].line),n=a.view[t-1].node.nextSibling);var u=nT(i,c.line);
1if(u==a.view.length-1?(o=a.viewTo-1,r=a.lineDiv.lastChild):(o=tZ(a.view[u+1].line)-1,r=a.view[u+1].node.previousSibling),!n)return!1;for(var p=i.doc.splitLines(function(t,e,n,o,r){var i="",a=!1,s=t.doc.lineSeparator(),l=!1;function c(){a&&(i+=s,l&&(i+=s),a=l=!1)}function u(t){t&&(c(),i+=t)}for(;!function e(n){if(1==n.nodeType){var i=n.getAttribute("cm-text");if(i)return void u(i);var p,f=n.getAttribute("cm-marker");if(f){var d,h=t.findMarks(t2(o,0),t2(r+1,0),(d=+f,function(t){return t.id==d}));h.length&&(p=h[0].find(0))&&u(tY(t.doc,p.from,p.to).join(s));return}if("false"!=n.getAttribute("contenteditable")){var g=/^(pre|div|p|li|table|br)$/i.test(n.nodeName);if(/^br$/i.test(n.nodeName)||0!=n.textContent.length){g&&c();for(var v=0;v<n.childNodes.length;v++)e(n.childNodes[v]);/^(pre|p)$/i.test(n.nodeName)&&(l=!0),g&&(a=!0)}}}else 3==n.nodeType&&u(n.nodeValue.replace(/\u200b/g,"").replace(/\u00a0/g," "))}(e),e!=n;)e=e.nextSibling,l=!1;return i}(i,n,r,e,o)),f=tY(i.doc,t2(e,0),t2(o,tK(i.doc,o).text.length));p.length>1&&f.length>1;)if(tn(p)==tn(f))p.pop(),f.pop(),o--;else if(p[0]==f[0])p.shift(),f.shift(),e++;else break;for(var d=0,h=0,g=p[0],v=f[0],y=Math.min(g.length,v.length);d<y&&g.charCodeAt(d)==v.charCodeAt(d);)++d;for(var m=tn(p),b=tn(f),w=Math.min(m.length-(1==p.length?d:0),b.length-(1==f.length?d:0));h<w&&m.charCodeAt(m.length-h-1)==b.charCodeAt(b.length-h-1);)++h;if(1==p.length&&1==f.length&&e==l.line)for(;d&&d>l.ch&&m.charCodeAt(m.length-h-1)==b.charCodeAt(b.length-h-1);)d--,h++;p[p.length-1]=m.slice(0,m.length-h).replace(/^\u200b+/,""),p[0]=p[0].slice(d).replace(/\u200b+$/,"");var _=t2(e,d),C=t2(o,f.length?tn(f).length-h:0);if(p.length>1||p[0]||t3(_,C))return rt(i.doc,p,_,C,"+input"),!0},il.prototype.ensurePolled=function(){this.forceCompositionEnd()},il.prototype.reset=function(){this.forceCompositionEnd()},il.prototype.forceCompositionEnd=function(){this.composing&&(clearTimeout(this.readDOMTimeout),this.composing=null,this.updateFromDOM(),this.div.blur(),this.div.focus())},il.prototype.readFromDOMSoon=function(){var t=this;null==this.readDOMTimeout&&(this.readDOMTimeout=setTimeout(function(){if(t.readDOMTimeout=null,t.composing)if(!t.composing.done)return;else t.composing=null;t.updateFromDOM()},80))},il.prototype.updateFromDOM=function(){var t=this;(this.cm.isReadOnly()||!this.pollContent())&&n8(this.cm,function(){return nP(t.cm)})},il.prototype.setUneditable=function(t){t.contentEditable="false"},il.prototype.onKeyPress=function(t){0!=t.charCode&&!this.composing&&(t.preventDefault(),this.cm.isReadOnly()||ot(this.cm,r8)(this.cm,String.fromCharCode(null==t.charCode?t.keyCode:t.charCode),0))},il.prototype.readOnlyChanged=function(t){this.div.contentEditable=String("nocursor"!=t)},il.prototype.onContextMenu=function(){},il.prototype.resetPosition=function(){},il.prototype.needsContentAttribute=!0;var id=function(t){this.cm=t,this.prevInput="",this.pollingFast=!1,this.polling=new G,this.hasSelection=!1,this.composing=null};id.prototype.init=function(t){var e=this,n=this,o=this.cm;this.createField(t);var r=this.textarea;function i(t){if(!tx(o,t)){if(o.somethingSelected())r7={lineWise:!1,text:o.getSelections()};else{if(!o.options.lineWiseCopyCut)return;var e=io(o);r7={lineWise:!0,text:e.text},"cut"==t.type?o.setSelections(e.ranges,null,J):(n.prevInput="",r.value=e.text.join("\n"),z(r))}"cut"==t.type&&(o.state.cutIncoming=+new Date)}}t.wrapper.insertBefore(this.wrapper,t.wrapper.firstChild),O&&(r.style.width="0px"),tb(r,"input",function(){g&&v>=9&&e.hasSelection&&(e.hasSelection=null),n.poll()}),tb(r,"paste",function(t){tx(o,t)||it(t,o)||(o.state.pasteIncoming=+new Date,n.fastPoll())}),tb(r,"cut",i),tb(r,"copy",i),tb(t.scroller,"paste",function(e){if(!(e0(t,e)||tx(o,e))){if(!r.dispatchEvent){o.state.pasteIncoming=+new Date,n.focus();return}var i=new Event("paste");i.clipboardData=e.clipboardData,r.dispatchEvent(i)}}),tb(t.lineSpace,"selectstart",function(e){e0(t,e)||tP(e)}),tb(r,"compositionstart",function(){var t=o.getCursor("from");n.composing&&n.composing.range.clear(),n.composing={start:t,range:o.markText(t,o.getCursor("to"),{className:"CodeMirror-composing"})}}),tb(r,"compositionend",function(){n.composing&&(n.poll(),n.composing.range.clear(),n.composing=null)})},id.prototype.createField=function(t){this.wrapper=ii(),this.textarea=this.wrapper.firstChild},id.prototype.screenReaderLabelChanged=function(t){t?this.textarea.setAttribute("aria-label",t):this.textarea.removeAttribute("aria-label")},id.prototype.prepareSelection=function(){var t=this.cm,e=t.display,n=t.doc,o=nD(t);if(t.options.moveInputWithCursor){var r=nf(t,n.sel.primary().head,"div"),i=e.wrapper.getBoundingClientRect(),a=e.lineDiv.getBoundingClientRect();o.teTop=Math.max(0,Math.min(e.wrapper.clientHeight-10,r.top+a.top-i.top)),o.teLeft=Math.max(0,Math.min(e.wrapper.clientWidth-10,r.left+a.left-i.left))}return o},id.prototype.showSelection=function(t){var e=this.cm.display;
vendor: 4,825 bytes, line 1
1N(e.cursorDiv,t.cursors),N(e.selectionDiv,t.selection),null!=t.teTop&&(this.wrapper.style.top=t.teTop+"px",this.wrapper.style.left=t.teLeft+"px")},id.prototype.reset=function(t){if(!this.contextMenuPending&&!this.composing){var e=this.cm;if(e.somethingSelected()){this.prevInput="";var n=e.getSelection();this.textarea.value=n,e.state.focused&&z(this.textarea),g&&v>=9&&(this.hasSelection=n)}else!t&&(this.prevInput=this.textarea.value="",g&&v>=9&&(this.hasSelection=null))}},id.prototype.getField=function(){return this.textarea},id.prototype.supportsTouch=function(){return!1},id.prototype.focus=function(){if("nocursor"!=this.cm.options.readOnly&&(!T||H()!=this.textarea))try{this.textarea.focus()}catch(t){}},id.prototype.blur=function(){this.textarea.blur()},id.prototype.resetPosition=function(){this.wrapper.style.top=this.wrapper.style.left=0},id.prototype.receivedFocus=function(){this.slowPoll()},id.prototype.slowPoll=function(){var t=this;this.pollingFast||this.polling.set(this.cm.options.pollInterval,function(){t.poll(),t.cm.state.focused&&t.slowPoll()})},id.prototype.fastPoll=function(){var t=!1,e=this;e.pollingFast=!0,e.polling.set(20,function n(){e.poll()||t?(e.pollingFast=!1,e.slowPoll()):(t=!0,e.polling.set(60,n))})},id.prototype.poll=function(){var t=this,e=this.cm,n=this.textarea,o=this.prevInput;if(this.contextMenuPending||!e.state.focused||tI(n)&&!o&&!this.composing||e.isReadOnly()||e.options.disableInput||e.state.keySeq)return!1;var r=n.value;if(r==o&&!e.somethingSelected())return!1;if(g&&v>=9&&this.hasSelection===r||P&&/[\uf700-\uf7ff]/.test(r))return e.display.input.reset(),!1;if(e.doc.sel==e.display.selForContextMenu){var i=r.charCodeAt(0);if(8203!=i||o||(o="â"),8666==i)return this.reset(),this.cm.execCommand("undo")}for(var a=0,s=Math.min(o.length,r.length);a<s&&o.charCodeAt(a)==r.charCodeAt(a);)++a;return n8(e,function(){r8(e,r.slice(a),o.length-a,null,t.composing?"*compose":null),r.length>1e3||r.indexOf("\n")>-1?n.value=t.prevInput="":t.prevInput=r,t.composing&&(t.composing.range.clear(),t.composing.range=e.markText(t.composing.start,e.getCursor("to"),{className:"CodeMirror-composing"}))}),!0},id.prototype.ensurePolled=function(){this.pollingFast&&this.poll()&&(this.pollingFast=!1)},id.prototype.onKeyPress=function(){g&&v>=9&&(this.hasSelection=null),this.fastPoll()},id.prototype.onContextMenu=function(t){var e,n=this,o=n.cm,r=o.display,i=n.textarea;n.contextMenuPending&&n.contextMenuPending();var a=nS(o,t),s=r.scroller.scrollTop;if(a&&!w){o.options.resetSelectionOnContextMenu&&-1==o.doc.sel.contains(a)&&ot(o,oY)(o.doc,oO(a),J);var l=i.style.cssText,c=n.wrapper.style.cssText,u=n.wrapper.offsetParent.getBoundingClientRect();if(n.wrapper.style.cssText="position: static",i.style.cssText="position: absolute; width: 30px; height: 30px;\n top: "+(t.clientY-u.top-5)+"px; left: "+(t.clientX-u.left-5)+"px;\n z-index: 1000; background: "+(g?"rgba(255, 255, 255, .05)":"transparent")+";\n outline: none; border-width: 0; outline: none; overflow: hidden; opacity: .05; filter: alpha(opacity=5);",y&&(e=window.scrollY),r.input.focus(),y&&window.scrollTo(null,e),r.input.reset(),o.somethingSelected()||(i.value=n.prevInput=" "),n.contextMenuPending=d,r.selForContextMenu=o.doc.sel,clearTimeout(r.detectingSelectAll),g&&v>=9&&f(),M){tj(t);var p=function(){t_(window,"mouseup",p),setTimeout(d,20)};tb(window,"mouseup",p)}else setTimeout(d,50)}function f(){if(null!=i.selectionStart){var t=o.somethingSelected(),e="â"+(t?i.value:"");i.value="â",i.value=e,n.prevInput=t?"":"â",i.selectionStart=1,i.selectionEnd=e.length,r.selForContextMenu=o.doc.sel}}function d(){if(n.contextMenuPending==d&&(n.contextMenuPending=!1,n.wrapper.style.cssText=c,i.style.cssText=l,g&&v<9&&r.scrollbars.setScrollTop(r.scroller.scrollTop=s),null!=i.selectionStart)){(!g||g&&v<9)&&f();var t=0,e=function(){r.selForContextMenu==o.doc.sel&&0==i.selectionStart&&i.selectionEnd>0&&"â"==n.prevInput?ot(o,o3)(o):t++<10?r.detectingSelectAll=setTimeout(e,500):(r.selForContextMenu=null,r.input.reset())};r.detectingSelectAll=setTimeout(e,200)}}},id.prototype.readOnlyChanged=function(t){t||this.reset(),this.textarea.disabled="nocursor"==t,this.textarea.readOnly=!!t},id.prototype.setUneditable=function(){},id.prototype.needsContentAttribute=!1;var ih=r4.optionHandlers;function ig(t,e,n,o){r4.defaults[t]=e,n&&(ih[t]=o?function(t,e,o){o!=r2&&n(t,e,o)}:n)}r4.defineOption=ig,r4.Init=r2,ig("value","",function(t,e){return t.setValue(e)},!0),ig("mode",null,function(t,e){t.doc.modeOption=e,ok(t)},!0),ig("indentUnit",2,ok,!0),ig("indentWithTabs",!1),ig("smartIndent",!0),ig("tabSize",4,function(t){oj(t),ni(t),nP(t)},!0),ig("lineSeparator",null,function(t,e){if(t.doc.lineSep=e,e){var n=[],o=t.doc.first;t.doc.iter(function(t){for(var r=0;;){var i=t.text.indexOf(e,r);if(-1==i)break;
1r=i+e.length,n.push(t2(o,i))}o++});for(var r=n.length-1;r>=0;r--)rt(t.doc,e,n[r],t2(n[r].line,n[r].ch+e.length))}}),ig("specialChars",/[\u0000-\u001f\u007f-\u009f\u00ad\u061c\u200b\u200e\u200f\u2028\u2029\ufeff\ufff9-\ufffc]/g,function(t,e,n){t.state.specialChars=RegExp(e.source+(e.test(" ")?"":"| "),"g"),n!=r2&&t.refresh()}),ig("specialCharPlaceholder",function(t){var e=R("span","â¢","cm-invalidchar");return e.title="\\u"+t.charCodeAt(0).toString(16),e.setAttribute("aria-label",e.title),e},function(t){return t.refresh()},!0),ig("electricChars",!0),ig("inputStyle",T?"contenteditable":"textarea",function(){throw Error("inputStyle can not (yet) be changed in a running editor")},!0),ig("spellcheck",!1,function(t,e){return t.getInputField().spellcheck=e},!0),ig("autocorrect",!1,function(t,e){return t.getInputField().autocorrect=e},!0),ig("autocapitalize",!1,function(t,e){return t.getInputField().autocapitalize=e},!0),ig("rtlMoveVisually",!k),ig("wholeLineUpdateBefore",!0),ig("theme","default",function(t){r1(t),og(t)},!0),ig("keyMap","default",function(t,e,n){var o=rM(e),r=n!=r2&&rM(n);r&&r.detach&&r.detach(t,o),o.attach&&o.attach(t,r||null)}),ig("extraKeys",null),ig("configureMouse",null),ig("lineWrapping",!1,function(t){t.options.lineWrapping?(U(t.display.wrapper,"CodeMirror-wrap"),t.display.sizer.style.minWidth="",t.display.sizerWidth=null):(L(t.display.wrapper,"CodeMirror-wrap"),eM(t)),nO(t),nP(t),ni(t),setTimeout(function(){return n2(t)},100)},!0),ig("gutters",[],function(t,e){t.display.gutterSpecs=od(e,t.options.lineNumbers),og(t)},!0),ig("fixedGutter",!0,function(t,e){t.display.gutters.style.left=e?nC(t.display)+"px":"0",t.refresh()},!0),ig("coverGutterNextToScrollbar",!1,function(t){return n2(t)},!0),ig("scrollbarStyle","native",function(t){n4(t),n2(t),t.display.scrollbars.setScrollTop(t.doc.scrollTop),t.display.scrollbars.setScrollLeft(t.doc.scrollLeft)},!0),ig("lineNumbers",!1,function(t,e){t.display.gutterSpecs=od(t.options.gutters,e),og(t)},!0),ig("firstLineNumber",1,og,!0),ig("lineNumberFormatter",function(t){return t},og,!0),ig("showCursorWhenSelecting",!1,nM,!0),ig("resetSelectionOnContextMenu",!0),ig("lineWiseCopyCut",!0),ig("pasteLinesPerSelection",!0),ig("selectionsMayTouch",!1),ig("readOnly",!1,function(t,e){"nocursor"==e&&(nH(t),t.display.input.blur()),t.display.input.readOnlyChanged(e)}),ig("screenReaderLabel",null,function(t,e){e=""===e?null:e,t.display.input.screenReaderLabelChanged(e)}),ig("disableInput",!1,function(t,e){e||t.display.input.reset()},!0),ig("dragDrop",!0,function(t,e,n){if(!e!=!(n&&n!=r2)){var o=t.display.dragFunctions,r=e?tb:t_;r(t.display.scroller,"dragstart",o.start),r(t.display.scroller,"dragenter",o.enter),r(t.display.scroller,"dragover",o.over),r(t.display.scroller,"dragleave",o.leave),r(t.display.scroller,"drop",o.drop)}}),ig("allowDropFileTypes",null),ig("cursorBlinkRate",530),ig("cursorScrollMargin",0),ig("cursorHeight",1,nM,!0),ig("singleCursorHeightPerLine",!0,nM,!0),ig("workTime",100),ig("workDelay",100),ig("flattenSpans",!0,oj,!0),ig("addModeClass",!1,oj,!0),ig("pollInterval",100),ig("undoDepth",200,function(t,e){return t.doc.history.undoDepth=e}),ig("historyEventDelay",1250),ig("viewportMargin",10,function(t){return t.refresh()},!0),ig("maxHighlightLength",1e4,oj,!0),ig("moveInputWithCursor",!0,function(t,e){e||t.display.input.resetPosition()}),ig("tabindex",null,function(t,e){return t.display.input.getField().tabIndex=e||""}),ig("autofocus",null),ig("direction","ltr",function(t,e){return t.doc.setDirection(e)},!0),ig("phrases",null),e=r4.optionHandlers,n=r4.helpers={},r4.prototype={constructor:r4,focus:function(){window.focus(),this.display.input.focus()},setOption:function(t,n){var o=this.options,r=o[t];(o[t]!=n||"mode"==t)&&(o[t]=n,e.hasOwnProperty(t)&&ot(this,e[t])(this,n,r),tC(this,"optionChange",this,t))},getOption:function(t){return this.options[t]},getDoc:function(){return this.doc},addKeyMap:function(t,e){this.state.keyMaps[e?"push":"unshift"](rM(t))},removeKeyMap:function(t){for(var e=this.state.keyMaps,n=0;n<e.length;++n)if(e[n]==t||e[n].name==t)return e.splice(n,1),!0},addOverlay:oe(function(t,e){var n=t.token?t:r4.getMode(this.options,t);if(n.startState)throw Error("Overlays may not be stateful.");!function(t,e,n){for(var o=0,r=n(e);o<t.length&&n(t[o])<=r;)o++;t.splice(o,0,e)}(this.state.overlays,{mode:n,modeSpec:t,opaque:e&&e.opaque,priority:e&&e.priority||0},function(t){return t.priority}),this.state.modeGen++,nP(this)}),removeOverlay:oe(function(t){for(var e=this.state.overlays,n=0;n<e.length;++n){var o=e[n].modeSpec;if(o==t||"string"==typeof t&&o.name==t){e.splice(n,1),this.state.modeGen++,nP(this);return}}}),indentLine:oe(function(t,e,n){"string"!=typeof e&&"number"!=typeof e&&(e=null==e?this.options.smartIndent?"smart":"prev":e?"add":"subtract"),t0(this.doc,t)&&r6(this,t,e,n)}),indentSelection:oe(function(t){for(var e=this.doc.sel.ranges,n=-1,o=0;o<e.length;o++){var r=e[o];if(r.empty())r.head.line>n&&(r6(this,r.head.line,t,!0),n=r.head.line,o==this.doc.sel.primIndex&&nq(this));else{var i=r.from(),a=r.to(),s=Math.max(n,i.line);n=Math.min(this.lastLine(),a.line-!a.ch)+1;for(var l=s;l<n;++l)r6(this,l,t);var c=this.doc.sel.ranges;0==i.ch&&e.length==c.length&&c[o].from().ch>0&&oG(this.doc,o,new oC(i,c[o].to()),J)}}}),getTokenAt:function(t,e){return eu(this,t,e)},getLineTokens:function(t,e){return eu(this,t2(t),e,!0)},getTokenTypeAt:function(t){t=t8(this.doc,t);var e,n=er(this,tK(this.doc,t.line)),o=0,r=(n.length-1)/2,i=t.ch;if(0==i)e=n[2];else for(;;){var a=o+r>>1;if((a?n[2*a-1]:0)>=i)r=a;else if(n[2*a+1]<i)o=a+1;else{e=n[2*a+2];break}}var s=e?e.indexOf("overlay "):-1;return s<0?e:0==s?null:e.slice(0,s-1)},getModeAt:function(t){var e=this.doc.mode;return e.innerMode?r4.innerMode(e,this.getTokenAt(t).state).mode:e},getHelper:function(t,e){return this.getHelpers(t,e)[0]},getHelpers:function(t,e){var o=[];if(!n.hasOwnProperty(e))return o;var r=n[e],i=this.getModeAt(t);if("string"==typeof i[e])r[i[e]]&&o.push(r[i[e]]);else if(i[e])for(var a=0;a<i[e].length;a++){var s=r[i[e][a]];s&&o.push(s)}else i.helperType&&r[i.helperType]?o.push(r[i.helperType]):r[i.name]&&o.push(r[i.name]);for(var l=0;l<r._global.length;l++){var c=r._global[l];c.pred(i,this)&&-1==K(o,c.val)&&o.push(c.val)}return o},getStateAfter:function(t,e){var n=this.doc;return ei(this,(t=t7(n,null==t?n.first+n.size-1:t))+1,e).state},cursorCoords:function(t,e){var n=this.doc.sel.primary();return nf(this,null==t?n.head:"object"==typeof t?t8(this.doc,t):t?n.from():n.to(),e||"page")},charCoords:function(t,e){return np(this,t8(this.doc,t),e||"page")},coordsChar:function(t,e){return ng(this,(t=nu(this,t,e||"page")).left,t.top)},lineAtHeight:function(t,e){return t=nu(this,{top:t,left:0},e||"page").top,tQ(this.doc,t+this.display.viewOffset)},heightAtLine:function(t,e,n){var o,r=!1;if("number"==typeof t){var i=this.doc.first+this.doc.size-1;t<this.doc.first?t=this.doc.first:t>i&&(t=i,r=!0),o=tK(this.doc,t)}else o=t;return nc(this,o,{top:0,left:0},e||"page",n||r).top+(r?this.doc.height-ej(o):0)},defaultTextHeight:function(){return nb(this.display)},defaultCharWidth:function(){return nw(this.display)},getViewport:function(){return{from:this.display.viewFrom,to:this.display.viewTo}},addWidget:function(t,e,n,o,r){var i,a=this.display,s=(t=nf(this,t8(this.doc,t))).bottom,l=t.left;if(e.style.position="absolute",e.setAttribute("cm-ignore-events","true"),this.display.input.setUneditable(e),a.sizer.appendChild(e),"over"==o)s=t.to
1p;else if("above"==o||"near"==o){var c=Math.max(a.wrapper.clientHeight,this.doc.height),u=Math.max(a.sizer.clientWidth,a.lineSpace.clientWidth);("above"==o||t.bottom+e.offsetHeight>c)&&t.top>e.offsetHeight?s=t.top-e.offsetHeight:t.bottom+e.offsetHeight<=c&&(s=t.bottom),l+e.offsetWidth>u&&(l=u-e.offsetWidth)}e.style.top=s+"px",e.style.left=e.style.right="","right"==r?(l=a.sizer.clientWidth-e.offsetWidth,e.style.right="0px"):("left"==r?l=0:"middle"==r&&(l=(a.sizer.clientWidth-e.offsetWidth)/2),e.style.left=l+"px"),n&&(null!=(i=nW(this,{left:l,top:s,right:l+e.offsetWidth,bottom:s+e.offsetHeight})).scrollTop&&nJ(this,i.scrollTop),null!=i.scrollLeft&&nZ(this,i.scrollLeft))},triggerOnKeyDown:oe(rq),triggerOnKeyPress:oe(rK),triggerOnKeyUp:rG,triggerOnMouseDown:oe(rJ),execCommand:function(t){if(rR.hasOwnProperty(t))return rR[t].call(null,this)},triggerElectric:oe(function(t){ie(this,t)}),findPosH:function(t,e,n,o){var r=1;e<0&&(r=-1,e=-e);for(var i=t8(this.doc,t),a=0;a<e&&!(i=ia(this.doc,i,r,n,o)).hitSide;++a);return i},moveH:oe(function(t,e){var n=this;this.extendSelectionsBy(function(o){return n.display.shift||n.doc.extend||o.empty()?ia(n.doc,o.head,t,e,n.options.rtlMoveVisually):t<0?o.from():o.to()},Z)}),deleteH:oe(function(t,e){var n=this.doc.sel,o=this.doc;n.somethingSelected()?o.replaceSelection("",null,"+delete"):rD(this,function(n){var r=ia(o,n.head,t,e,!1);return t<0?{from:r,to:n.head}:{from:n.head,to:r}})}),findPosV:function(t,e,n,o){var r=1,i=o;e<0&&(r=-1,e=-e);for(var a=t8(this.doc,t),s=0;s<e;++s){var l=nf(this,a,"div");if(null==i?i=l.left:l.left=i,(a=is(this,l,r,n)).hitSide)break}return a},moveV:oe(function(t,e){var n=this,o=this.doc,r=[],i=!this.display.shift&&!o.extend&&o.sel.somethingSelected();if(o.extendSelectionsBy(function(a){if(i)return t<0?a.from():a.to();var s=nf(n,a.head,"div");null!=a.goalColumn&&(s.left=a.goalColumn),r.push(s.left);var l=is(n,s,t,e);return"page"==e&&a==o.sel.primary()&&n$(n,np(n,l,"div").top-s.top),l},Z),r.length)for(var a=0;a<o.sel.ranges.length;a++)o.sel.ranges[a].goalColumn=r[a]}),findWordAt:function(t){var e=tK(this.doc,t.line).text,n=t.ch,o=t.ch;if(e){var r=this.getHelper(t,"wordChars");("before"==t.sticky||o==e.length)&&n?--n:++o;for(var i=e.charAt(n),a=tl(i,r)?function(t){return tl(t,r)}:/\s/.test(i)?function(t){return/\s/.test(t)}:function(t){return!/\s/.test(t)&&!tl(t)};n>0&&a(e.charAt(n-1));)--n;for(;o<e.length&&a(e.charAt(o));)++o}return new oC(t2(t.line,n),t2(t.line,o))},toggleOverwrite:function(t){(null==t||t!=this.state.overwrite)&&((this.state.overwrite=!this.state.overwrite)?U(this.display.cursorDiv,"CodeMirror-overwrite"):L(this.display.cursorDiv,"CodeMirror-overwrite"),tC(this,"overwriteToggle",this,this.state.overwrite))},hasFocus:function(){return this.display.input.getField()==H()},isReadOnly:function(){return!!(this.options.readOnly||this.doc.cantEdit)},scrollTo:oe(function(t,e){nG(this,t,e)}),getScrollInfo:function(){var t=this.display.scroller;return{left:t.scrollLeft,top:t.scrollTop,height:t.scrollHeight-e5(this)-this.display.barHeight,width:t.scrollWidth-e5(this)-this.display.barWidth,clientHeight:e9(this),clientWidth:e4(this)}},scrollIntoView:oe(function(t,e){if(null==t?(t={from:this.doc.sel.primary().head,to:null},null==e&&(e=this.options.cursorScrollMargin)):"number"==typeof t?t={from:t2(t,0),to:null}:null==t.from&&(t={from:t,to:null}),t.to||(t.to=t.from),t.margin=e||0,null!=t.from.line){var n;n=t,nK(this),this.curOp.scrollToPos=n}else nY(this,t.from,t.to,t.margin)}),setSize:oe(function(t,e){var n=this,o=function(t){return"number"==typeof t||/^\d+$/.test(String(t))?t+"px":t};null!=t&&(this.display.wrapper.style.width=o(t)),null!=e&&(this.display.wrapper.style.height=o(e)),this.options.lineWrapping&&nr(this);var r=this.display.viewFrom;this.doc.iter(r,this.display.viewTo,function(t){if(t.widgets){for(var e=0;e<t.widgets.length;e++)if(t.widgets[e].noHScroll){nE(n,r,"widget");break}}++r}),this.curOp.forceUpdate=!0,tC(this,"refresh",this)}),operation:function(t){return n8(this,t)},startOperation:function(){return n6(this)},endOperation:function(){return n7(this)},refresh:oe(function(){var t=this.display.cachedTextHeight;nP(this),this.curOp.forceUpdate=!0,ni(this),nG(this,this.doc.scrollLeft,this.doc.scrollTop),oc(this.display),(null==t||Math.abs(t-nb(this.display))>.5||this.options.lineWrapping)&&nO(this),tC(this,"refresh",this)}),swapDoc:oe(function(t){var e=this.doc;return e.cm=null,this.state.selectingText&&this.state.selectingText(),oL(this,t),ni(this),this.display.input.reset(),nG(this,t.scrollLeft,t.scrollTop),this.curOp.forceScroll=!0,eW(this,"swapDoc",this,e),e}),phrase:function(t){var e=this.options.phrases;return e&&Object.prototype.hasOwnProperty.call(e,t)?e[t]:t},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}},tT(r4),r4.registerHelper=function(t,e,o){n.hasOwnProperty(t)||(n[t]=r4[t]={_global:[]}),n[t][e]=o},r4.registerGlobalHelper=function(t,e,o,r){r4.registerHelper(t,e,r),n[t]._global.push({pred:o,val:r})};var iv="iter insert remove copy getEditor constructor".split(" ");for(var iy in rg.prototype)rg.prototype.hasOwnProperty(iy)&&0>K(iv,iy)&&(r4.prototype[iy]=function(t){return function(){return t.apply(this.doc,arguments)}}(rg.prototype[iy]));return tT(rg),r4.inputStyles={textarea:id,contenteditable:il},r4.defineMode=function(t){r4.defaults.mode||"null"==t||(r4.defaults.mode=t),tH.apply(this,arguments)},r4.defineMIME=function(t,e){tF[t]=e},r4.defineMode("null",function(){return{token:function(t){return t.skipToEnd()}}}
1),r4.defineMIME("text/plain","null"),r4.defineExtension=function(t,e){r4.prototype[t]=e},r4.defineDocExtension=function(t,e){rg.prototype[t]=e},r4.fromTextArea=function(t,e){if((e=e?$(e):{}).value=t.value,!e.tabindex&&t.tabIndex&&(e.tabindex=t.tabIndex),!e.placeholder&&t.placeholder&&(e.placeholder=t.placeholder),null==e.autofocus){var n,o=H();e.autofocus=o==t||null!=t.getAttribute("autofocus")&&o==document.body}function r(){t.value=s.getValue()}if(t.form&&(tb(t.form,"submit",r),!e.leaveSubmitMethodAlone)){var i=t.form;n=i.submit;try{var a=i.submit=function(){r(),i.submit=n,i.submit(),i.submit=a}}catch(t){}}e.finishInit=function(o){o.save=r,o.getTextArea=function(){return t},o.toTextArea=function(){o.toTextArea=isNaN,r(),t.parentNode.removeChild(o.getWrapperElement()),t.style.display="",t.form&&(t_(t.form,"submit",r),e.leaveSubmitMethodAlone||"function"!=typeof t.form.submit||(t.form.submit=n))}},t.style.display="none";var s=r4(function(e){return t.parentNode.insertBefore(e,t.nextSibling)},e);return s},r4.off=t_,r4.on=tb,r4.wheelEventPixels=function(t){var e=ob(t);return e.x*=om,e.y*=om,e},r4.Doc=rg,r4.splitLines=tL,r4.countColumn=q,r4.findColumn=Q,r4.isWordChar=ts,r4.Pass=Y,r4.signal=tC,r4.Line=eD,r4.changeEnd=oS,r4.scrollbarModel=n5,r4.Pos=t2,r4.cmpPos=t3,r4.modes=tV,r4.mimeModes=tF,r4.resolveMode=tU,r4.getMode=tB,r4.modeExtensions=tz,r4.extendMode=function(t,e){$(e,tz.hasOwnProperty(t)?tz[t]:tz[t]={})},r4.copyState=tW,r4.startState=tq,r4.innerMode=t$,r4.commands=rR,r4.keyMap=rT,r4.keyName=rA,r4.isModifierKey=rk,r4.lookupKey=rE,r4.normalizeKeyMap=function(t){var e={};for(var n in t)if(t.hasOwnProperty(n)){var o=t[n];if(/^(name|fallthrough|(de|at)tach)$/.test(n))continue;if("..."==o){delete t[n];continue}for(var r=to(n.split(" "),rP),i=0;i<r.length;i++){var a=void 0,s=void 0;i==r.length-1?(s=r.join(" "),a=o):(s=r.slice(0,i+1).join(" "),a="...");var l=e[s];if(l){if(l!=a)throw Error("Inconsistent bindings for "+s)}else e[s]=a}delete t[n]}for(var c in e)t[c]=e[c];return t},r4.StringStream=tG,r4.SharedTextMarker=rf,r4.TextMarker=ru,r4.LineWidget=rs,r4.e_preventDefault=tP,r4.e_stopPropagation=tE,r4.e_stop=tj,r4.addClass=U,r4.contains=F,r4.rmClass=L,r4.keyNames=rC,r4.version="5.63.0",r4}()},389:(t,e,n)=>{!function(t){function e(t){for(var e={},n=0;n<t.length;++n)e[t[n].toLowerCase()]=!0;return e}t.defineMode("css",function(e,n){var o,r,i=n.inline;n.propertyKeywords||(n=t.resolveMode("text/css"));var a=e.indentUnit,s=n.tokenHooks,l=n.documentTypes||{},c=n.mediaTypes||{},u=n.mediaFeatures||{},p=n.mediaValueKeywords||{},f=n.propertyKeywords||{},d=n.nonStandardPropertyKeywords||{},h=n.fontProperties||{},g=n.counterDescriptors||{},v=n.colorKeywords||{},y=n.valueKeywords||{},m=n.allowNested,b=n.lineComment,w=!0===n.supportsAtComponent,_=!1!==e.highlightNonStandardPropertyKeywords;function C(t){return function(e,n){for(var r,i=!1;null!=(r=e.next());){if(r==t&&!i){")"==t&&e.backUp(1);break}i=!i&&"\\"==r}return r!=t&&(i||")"==t)||(n.tokenize=null),o="string","string"}}function x(t,e){return t.next(),t.match(/^\s*[\"\')]/,!1)?e.tokenize=null:e.tokenize=C(")"),o="(",null}function O(t,e,n){this.type=t,this.indent=e,this.prev=n}function S(t,e,n,o){return t.context=new O(n,e.indentation()+(!1===o?0:a),t.context),n}function T(t){return t.context.prev&&(t.context=t.context.prev),t.context.type}function P(t,e,n){return j[n.context.type](t,e,n)}function E(t,e,n,o){for(var r=o||1;r>0;r--)n.context=n.context.prev;return P(t,e,n)}function k(t){var e=t.current().toLowerCase();r=y.hasOwnProperty(e)?"atom":v.hasOwnProperty(e)?"keyword":"variable"}var j={};return j.top=function(t,e,n){if("{"==t)return S(n,e,"block");if("}"==t&&n.context.prev)return T(n);if(w&&/@component/i.test(t))return S(n,e,"atComponentBlock");if(/^@(-moz-)?document$/i.test(t))return S(n,e,"documentTypes");if(/^@(media|supports|(-moz-)?document|import)$/i.test(t))return S(n,e,"atBlock");else if(/^@(font-face|counter-style)/i.test(t))return n.stateArg=t,"restricted_atBlock_before";else if(/^@(-(moz|ms|o|webkit)-)?keyframes$/i.test(t))return"keyframes";else if(t&&"@"==t.charAt(0))return S(n,e,"at");else if("hash"==t)r="builtin";else if("word"==t)r="tag";else if("variable-definition"==t)return"maybeprop";else if("interpolation"==t)return S(n,e,"interpolation");else if(":"==t)return"pseudo";else if(m&&"("==t)return S(n,e,"parens");return n.context.type},j.block=function(t,e,n){if("word"==t){var o=e.current().toLowerCase();return f.hasOwnProperty(o)?(r="property","maybeprop"):d.hasOwnProperty(o)?(r=_?"string-2":"property","maybeprop"):m?(r=e.match(/^\s*:(?:\s|$)/,!1)?"property":"tag","block"):(r+=" error","maybeprop")}return"meta"==t?"block":m||"hash"!=t&&"qualifier"!=t?j.top(t,e,n):(r="error","block")},j.maybeprop=function(t,e,n){return":"==t?S(n,e,"prop"):P(t,e,n)},j.prop=function(t,e,n){if(";"==t)return T(n);if("{"==t&&m)return S(n,e,"propBlock");if("}"==t||"{"==t)return E(t,e,n);
1if("("==t)return S(n,e,"parens");if("hash"!=t||/^#([0-9a-fA-f]{3,4}|[0-9a-fA-f]{6}|[0-9a-fA-f]{8})$/.test(e.current())){if("word"==t)k(e);else if("interpolation"==t)return S(n,e,"interpolation")}else r+=" error";return"prop"},j.propBlock=function(t,e,n){return"}"==t?T(n):"word"==t?(r="property","maybeprop"):n.context.type},j.parens=function(t,e,n){return"{"==t||"}"==t?E(t,e,n):")"==t?T(n):"("==t?S(n,e,"parens"):"interpolation"==t?S(n,e,"interpolation"):("word"==t&&k(e),"parens")},j.pseudo=function(t,e,n){return"meta"==t?"pseudo":"word"==t?(r="variable-3",n.context.type):P(t,e,n)},j.documentTypes=function(t,e,n){return"word"==t&&l.hasOwnProperty(e.current())?(r="tag",n.context.type):j.atBlock(t,e,n)},j.atBlock=function(t,e,n){if("("==t)return S(n,e,"atBlock_parens");if("}"==t||";"==t)return E(t,e,n);if("{"==t)return T(n)&&S(n,e,m?"block":"top");if("interpolation"==t)return S(n,e,"interpolation");if("word"==t){var o=e.current().toLowerCase();r="only"==o||"not"==o||"and"==o||"or"==o?"keyword":c.hasOwnProperty(o)?"attribute":u.hasOwnProperty(o)?"property":p.hasOwnProperty(o)?"keyword":f.hasOwnProperty(o)?"property":d.hasOwnProperty(o)?_?"string-2":"property":y.hasOwnProperty(o)?"atom":v.hasOwnProperty(o)?"keyword":"error"}return n.context.type},j.atComponentBlock=function(t,e,n){return"}"==t?E(t,e,n):"{"==t?T(n)&&S(n,e,m?"block":"top",!1):("word"==t&&(r="error"),n.context.type)},j.atBlock_parens=function(t,e,n){return")"==t?T(n):"{"==t||"}"==t?E(t,e,n,2):j.atBlock(t,e,n)},j.restricted_atBlock_before=function(t,e,n){return"{"==t?S(n,e,"restricted_atBlock"):"word"==t&&"@counter-style"==n.stateArg?(r="variable","restricted_atBlock_before"):P(t,e,n)},j.restricted_atBlock=function(t,e,n){return"}"==t?(n.stateArg=null,T(n)):"word"==t?(r=("@font-face"!=n.stateArg||h.hasOwnProperty(e.current().toLowerCase()))&&("@counter-style"!=n.stateArg||g.hasOwnProperty(e.current().toLowerCase()))?"property":"error","maybeprop"):"restricted_atBlock"},j.keyframes=function(t,e,n){return"word"==t?(r="variable","keyframes"):"{"==t?S(n,e,"top"):P(t,e,n)},j.at=function(t,e,n){return";"==t?T(n):"{"==t||"}"==t?E(t,e,n):("word"==t?r="tag":"hash"==t&&(r="builtin"),"at")},j.interpolation=function(t,e,n){return"}"==t?T(n):"{"==t||";"==t?E(t,e,n):("word"==t?r="variable":"variable"!=t&&"("!=t&&")"!=t&&(r="error"),"interpolation")},{startState:function(t){return{tokenize:null,state:i?"block":"top",stateArg:null,context:new O(i?"block":"top",t||0,null)}},token:function(t,e){if(!e.tokenize&&t.eatSpace())return null;var n=(e.tokenize||function(t,e){var n=t.next();if(s[n]){var r=s[n](t,e);if(!1!==r)return r}if("@"==n)return t.eatWhile(/[\w\\\-]/),o=t.current(),"def";if("="==n||("~"==n||"|"==n)&&t.eat("="))return o="compare",null;if('"'==n||"'"==n)return e.tokenize=C(n),e.tokenize(t,e);if("#"==n)return t.eatWhile(/[\w\\\-]/),o="hash","atom";if("!"==n)return t.match(/^\s*\w*/),o="important","keyword";else if(/\d/.test(n)||"."==n&&t.eat(/\d/))return t.eatWhile(/[\w.%]/),o="unit","number";else if("-"===n){if(/[\d.]/.test(t.peek()))return t.eatWhile(/[\w.%]/),o="unit","number";else if(t.match(/^-[\w\\\-]*/))return(t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1))?o="variable-definition":o="variable","variable-2";else if(t.match(/^\w+-/))return o="meta","meta"}else if(/[,+>*\/]/.test(n))return o="select-op",null;else if("."==n&&t.match(/^-?[_a-z][_a-z0-9-]*/i))return o="qualifier","qualifier";else if(/[:;{}\[\]\(\)]/.test(n))return o=n,null;else return t.match(/^[\w-.]+(?=\()/)?(/^(url(-prefix)?|domain|regexp)$/i.test(t.current())&&(e.tokenize=x),o="variable","variable callee"):/[\w\\\-]/.test(n)?(t.eatWhile(/[\w\\\-]/),o="word","property"):(o=null,null)})(t,e);return n&&"object"==typeof n&&(o=n[1],n=n[0]),r=n,"comment"!=o&&(e.state=j[e.state](o,t,e)),r},indent:function(t,e){var n=t.context,o=e&&e.charAt(0),r=n.indent;return"prop"==n.type&&("}"==o||")"==o)&&(n=n.prev),n.prev&&("}"==o&&("block"==n.type||"top"==n.type||"interpolation"==n.type||"restricted_atBlock"==n.type)?r=(n=n.prev).indent:(")"==o&&("parens"==n.type||"atBlock_parens"==n.type)||"{"==o&&("at"==n.type||"atBlock"==n.type))&&(r=Math.max(0,n.indent-a))),r},electricChars:"}",blockCommentStart:"/*",blockCommentEnd:"*/",blockCommentContinue:" * ",lineComment:b,fold:"brace"}});var n=["domain","regexp","url","url-prefix"],o=e(n),r=["all","aural","braille","handheld","print","projection","screen","tty","tv","embossed"],i=e(r),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=e(a),l=["landscape","portrait","none","coarse","fine","on-demand","hover","interlace","progressive","dark","light"],c=e(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","
1nav-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"],p=e(u),f=["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"],d=e(f),h=e(["font-display","font-family","src","unicode
1-range","font-variant","font-feature-settings","font-stretch","font-weight","font-style"]),g=e(["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"],y=e(v),m=["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","
1initial","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=e(m),w=n.concat(r).concat(a).concat(l).concat(u).
1concat(f).concat(v).concat(m);function _(t,e){for(var n,o=!1;null!=(n=t.next());){if(o&&"/"==n){e.tokenize=null;break}o="*"==n}return["comment","comment"]}t.registerHelper("hintWords","css",w),t.defineMIME("text/css",{documentTypes:o,mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:g,colorKeywords:y,valueKeywords:b,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=_,_(t,e))}},name:"css"}),t.defineMIME("text/x-scss",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:d,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=_,_(t,e)):["operator","operator"]},":":function(t){return!!t.match(/^\s*\{/,!1)&&[null,null]},$:function(t){return(t.match(/^[\w-]+/),t.match(/^\s*:/,!1))?["variable-2","variable-definition"]:["variable-2","variable"]},"#":function(t){return!!t.eat("{")&&[null,"interpolation"]}},name:"css",helperType:"scss"}),t.defineMIME("text/x-less",{mediaTypes:i,mediaFeatures:s,mediaValueKeywords:c,propertyKeywords:p,nonStandardPropertyKeywords:d,colorKeywords:y,valueKeywords:b,fontProperties:h,allowNested:!0,lineComment:"//",tokenHooks:{"/":function(t,e){return t.eat("/")?(t.skipToEnd(),["comment","comment"]):t.eat("*")?(e.tokenize=_,_(t,e)):["operator","operator"]},"@":function(t){return t.eat("{")?[null,"interpolation"]:!t.match(/^(charset|document|font-face|import|(-(moz|ms|o|webkit)-)?keyframes|media|namespace|page|supports)\b/i,!1)&&((t.eatWhile(/[\w\\\-]/),t.match(/^\s*:/,!1))?["variable-2","variable-definition"]:["variable-2","variable"])},"&":function(){return["atom","atom"]}},name:"css",helperType:"less"}),t.defineMIME("text/x-gss",{documentTypes:o,mediaTypes:i,mediaFeatures:s,propertyKeywords:p,nonStandardPropertyKeywords:d,fontProperties:h,counterDescriptors:g,colorKeywords:y,valueKeywords:b,supportsAtComponent:!0,tokenHooks:{"/":function(t,e){return!!t.eat("*")&&(e.tokenize=_,_(t,e))}},name:"css",helperType:"gss"})}(n(408))},253:(t,e,n)=>{!function(t){var e={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 o(t,e){return RegExp((e?"^":"")+"</s*"+t+"s*>","i")}function r(t,e){for(var n in t)for(var o=e[n]||(e[n]=[]),r=t[n],i=r.length-1;i>=0;i--)o.unshift(r[i])}t.defineMode("htmlmixed",function(i,a){var s=t.getMode(i,{name:"xml",htmlMode:!0,multilineTagIndentFactor:a.multilineTagIndentFactor,multilineTagIndentPastTag:a.multilineTagIndentPastTag,allowMissingTagName:a.allowMissingTagName}),l={},c=a&&a.tags,u=a&&a.scriptTypes;if(r(e,l),c&&r(c,l),u)for(var p=u.length-1;p>=0;p--)l.script.unshift(["type",u[p].matches,u[p].mode]);function f(e,r){var a,c=s.token(e,r.htmlState),u=/\btag\b/.test(c);if(u&&!/[<>\s\/]/.test(e.current())&&(a=r.htmlState.tagName&&r.htmlState.tagName.toLowerCase())&&l.hasOwnProperty(a))r.inTag=a+" ";else if(r.inTag&&u&&/>$/.test(e.current())){var p=/^([\S]+) (.*)/.exec(r.inTag);r.inTag=null;var d=">"==e.current()&&function(t,e){for(var o=0;o<t.length;o++){var r=t[o];if(!r[0]||r[1].test(function(t,e){var o,r=t.match((o=n[e])?o:n[e]=RegExp("\\s+"+e+"\\s*=\\s*('|\")?([^'\"]+)('|\")?\\s*"));return r?/^\s*(.*?)\s*$/.exec(r[2])[1]:""}(e,r[0])))return r[2]}}(l[p[1]],p[2]),h=t.getMode(i,d),g=o(p[1],!0),v=o(p[1],!1);r.token=function(t,e){var n,o,r;return t.match(g,!1)?(e.token=f,e.localState=e.localMode=null,null):(n=e.localMode.token(t,e.localState),(r=(o=t.current()).search(v))>-1?t.backUp(o.length-r):o.match(/<\/?$/)&&(t.backUp(o.length),t.match(v,!1)||t.match(o)),n)},r.localMode=h,r.localState=t.startState(h,s.indent(r.htmlState,"",""))}else r.inTag&&(r.inTag+=e.current(),e.eol()&&(r.inTag+=" "));return c}return{startState:function(){return{token:f,inTag:null,localMode:null,localState:null,htmlState:t.startState(s)}},copyState:function(e){var n;return e.localState&&(n=t.copyState(e.localMode,e.localState)),{token:e.token,inTag:e.inTag,localMode:e.localMode,localState:n,htmlState:t.copyState(s,e.htmlState)}},token:function(t,e){return e.token(t,e)},indent:function(e,n,o){return!e.localMode||/^\s*<\//.test(n)?s.indent(e.htmlState,n,o):e.localMode.indent?e.localMode.indent(e.localState,n,o):t.Pass},innerMode:function(t){return{state:t.localState||t.htmlState,mode:t.localMode||s}}}},"xml","javascript","css"),t.defineMIME("text/html","htmlmixed")}(n(408),n(701),n(61),n(389))},61:(t,e,n)=>{!function(t){t.defineMode("javascript",function(e,n){var o,r,i=e.indentUnit,a=n.statementIndent,s=n.jsonld,l=n.json||s,c=!1!==n.trackScope,u=n.typescript,p=n.wordCharacters||/[\w$\xa1-\uffff]/,f=function(){function t(t){return{type:t,style:"keyword"}}
1var e=t("keyword a"),n=t("keyword b"),o=t("keyword c"),r=t("keyword d"),i=t("operator"),a={type:"atom",style:"atom"};return{if:t("if"),while:e,with:e,else:n,do:n,try:n,finally:n,return:r,break:r,continue:r,new:t("new"),delete:o,void:o,throw:o,debugger:t("debugger"),var:t("var"),const:t("var"),let:t("var"),function:t("function"),catch:t("catch"),for:t("for"),switch:t("switch"),case:t("case"),default:t("default"),in:i,typeof:i,instanceof:i,true:a,false:a,null:a,undefined:a,NaN:a,Infinity:a,this:t("this"),class:t("class"),super:t("atom"),yield:o,export:t("export"),import:t("import"),extends:o,await:o}}(),d=/[+\-*&%=<>!?|~^@]/,h=/^@(context|id|value|language|type|container|list|set|reverse|index|base|vocab|graph)"/;function g(t,e,n){return o=t,r=n,e}function v(t,e){var n,o=t.next();if('"'==o||"'"==o){return n=o,e.tokenize=function(t,e){var o,r=!1;if(s&&"@"==t.peek()&&t.match(h))return e.tokenize=v,g("jsonld-keyword","meta");for(;null!=(o=t.next())&&(o!=n||r);)r=!r&&"\\"==o;return r||(e.tokenize=v),g("string","string")},e.tokenize(t,e)}if("."==o&&t.match(/^\d[\d_]*(?:[eE][+\-]?[\d_]+)?/))return g("number","number");if("."==o&&t.match(".."))return g("spread","meta");if(/[\[\]{}\(\),;\:\.]/.test(o))return g(o);if("="==o&&t.eat(">"))return g("=>","operator");else if("0"==o&&t.match(/^(?:x[\dA-Fa-f_]+|o[0-7_]+|b[01_]+)n?/))return g("number","number");else if(/\d/.test(o))return t.match(/^[\d_]*(?:n|(?:\.[\d_]*)?(?:[eE][+\-]?[\d_]+)?)?/),g("number","number");else if("/"==o)if(t.eat("*"))return e.tokenize=y,y(t,e);else if(t.eat("/"))return t.skipToEnd(),g("comment","comment");else if(tX(t,e,1))return!function(t){for(var e,n=!1,o=!1;null!=(e=t.next());
1){if(!n){if("/"==e&&!o)return;"["==e?o=!0:o&&"]"==e&&(o=!1)}n=!n&&"\\"==e}}(t),t.match(/^\b(([gimyus])(?![gimyus]*\2))+\b/),g("regexp","string-2");else return t.eat("="),g("operator","operator",t.current());else if("`"==o)return e.tokenize=m,m(t,e);else if("#"==o&&"!"==t.peek())return t.skipToEnd(),g("meta","meta");else if("#"==o&&t.eatWhile(p))return g("variable","property");else if("<"==o&&t.match("!--")||"-"==o&&t.match("->")&&!/\S/.test(t.string.slice(0,t.start)))return t.skipToEnd(),g("comment","comment");else if(d.test(o))return((">"!=o||!e.lexical||">"!=e.lexical.type)&&(t.eat("=")?("!"==o||"="==o)&&t.eat("="):/[<>*+\-|&?]/.test(o)&&(t.eat(o),">"==o&&t.eat(o))),"?"==o&&t.eat("."))?g("."):g("operator","operator",t.current());else if(p.test(o)){t.eatWhile(p);var r=t.current();if("."!=e.lastType){if(f.propertyIsEnumerable(r)){var i=f[r];return g(i.type,i.style,r)}if("async"==r&&t.match(/^(\s|\/\*([^*]|\*(?!\/))*?\*\/)*[\[\(\w]/,!1))return g("async","keyword",r)}return g("variable","variable",r)}}function y(t,e){for(var n,o=!1;n=t.next();){if("/"==n&&o){e.tokenize=v;break}o="*"==n}return g("comment","comment")}function m(t,e){for(var n,o=!1;null!=(n=t.next());){if(!o&&("`"==n||"$"==n&&t.eat("{"))){e.tokenize=v;break}o=!o&&"\\"==n}return g("quasi","string-2",t.current())}function b(t,e){e.fatArrowAt&&(e.fatArrowAt=null);var n=t.string.indexOf("=>",t.start);if(!(n<0)){if(u){var o=/:\s*(?:\w+(?:<[^>]*>|\[\])?|\{[^}]*\})\s*$/.exec(t.string.slice(t.start,n));o&&(n=o.index)}for(var r=0,i=!1,a=n-1;a>=0;--a){var s=t.string.charAt(a),l="([{}])".indexOf(s);if(l>=0&&l<3){if(!r){++a;break}if(0==--r){"("==s&&(i=!0);break}}else if(l>=3&&l<6)++r;else if(p.test(s))i=!0;else if(/["'\/`]/.test(s))for(;;--a){if(0==a)return;if(t.string.charAt(a-1)==s&&"\\"!=t.string.charAt(a-2)){a--;break}}else if(i&&!r){++a;break}}i&&!r&&(e.fatArrowAt=a)}}var w={atom:!0,number:!0,variable:!0,string:!0,regexp:!0,this:!0,import:!0,"jsonld-keyword":!0};function _(t,e,n,o,r,i){this.indented=t,this.column=e,this.type=n,this.prev=r,this.info=i,null!=o&&(this.align=o)}function C(t,e,n,o,r){var i=t.cc;for(x.state=t,x.stream=r,x.marked=null,x.cc=i,x.style=e,t.lexical.hasOwnProperty("align")||(t.lexical.align=!0);;)if((i.length?i.pop():l?H:V)(n,o)){for(;i.length&&i[i.length-1].lex;)i.pop()();if(x.marked)return x.marked;if("variable"==n&&function(t,e){if(!c)return!1;for(var n=t.localVars;n;n=n.next)if(n.name==e)return!0;for(var o=t.context;o;o=o.prev)for(var n=o.vars;n;n=n.next)if(n.name==e)return!0}(t,o))return"variable-2";return e}}var x={state:null,column:null,marked:null,cc:null};function O(){for(var t=arguments.length-1;t>=0;t--)x.cc.push(arguments[t])}function S(){return O.apply(null,arguments),!0}function T(t,e){for(var n=e;n;n=n.next)if(n.name==t)return!0;return!1}function P(t){var e=x.state;if(x.marked="def",c){if(e.context){if("var"==e.lexical.info&&e.context&&e.context.block){var o=function t(e,n){if(!n)return null;if(n.block){var o=t(e,n.prev);return o?o==n.prev?n:new k(o,n.vars,!0):null}return T(e,n.vars)?n:new k(n.prev,new j(e,n.vars),!1)}(t,e.context);if(null!=o){e.context=o;return}}else if(!T(t,e.localVars)){e.localVars=new j(t,e.localVars);return}}n.globalVars&&!T(t,e.globalVars)&&(e.globalVars=new j(t,e.globalVars))}}function E(t){return"public"==t||"private"==t||"protected"==t||"abstract"==t||"readonly"==t}function k(t,e,n){this.prev=t,this.vars=e,this.block=n}function j(t,e){this.name=t,this.next=e}var A=new j("this",new j("arguments",null));function M(){x.state.context=new k(x.state.context,x.state.localVars,!1),x.state.localVars=A}function D(){x.state.context=new k(x.state.context,x.state.localVars,!0),x.state.localVars=null}function L(){x.state.localVars=x.state.context.vars,x.state.context=x.state.context.prev}function I(t,e){var n=function(){var n=x.state,o=n.indented;if("stat"==n.lexical.type)o=n.lexical.indented;else for(var r=n.lexical;r&&")"==r.type&&r.align;r=r.prev)o=r.indented;n.lexical=new _(o,x.stream.column(),t,null,n.lexical,e)};return n.lex=!0,n}function N(){var t=x.state;t.lexical.prev&&(")"==t.lexical.type&&(t.indented=t.lexical.indented),t.lexical=t.lexical.prev)}function R(t){return function e(n){return n==t?S():";"==t||"}"==n||")"==n||"]"==n?O():S(e)}}function V(t,e){if("var"==t)return S(I("vardef",e),tC,R(";"),N);if("keyword a"==t)return S(I("form"),B,V,N);if("keyword b"==t)return S(I("form"),V,N);
1if("keyword d"==t)return x.stream.match(/^\s*$/,!1)?S():S(I("stat"),W,R(";"),N);if("debugger"==t)return S(R(";"));if("{"==t)return S(I("}"),D,ta,N,L);if(";"==t)return S();if("if"==t)return"else"==x.state.lexical.info&&x.state.cc[x.state.cc.length-1]==N&&x.state.cc.pop()(),S(I("form"),B,V,N,tE);if("function"==t)return S(tM);if("for"==t)return S(I("form"),D,tk,V,L,N);if("class"==t||u&&"interface"==e)return x.marked="keyword",S(I("form","class"==t?t:e),tR,N);if("variable"==t)if(u&&"declare"==e)return x.marked="keyword",S(V);else if(u&&("module"==e||"enum"==e||"type"==e)&&x.stream.match(/^\s*\w/,!1))return(x.marked="keyword","enum"==e)?S(tY):"type"==e?S(tL,R("operator"),tp,R(";")):S(I("form"),tx,R("{"),I("}"),ta,N,N);else if(u&&"namespace"==e)return x.marked="keyword",S(I("form"),H,V,N);else if(u&&"abstract"==e)return x.marked="keyword",S(V);else return S(I("stat"),Q);return"switch"==t?S(I("form"),B,R("{"),I("}","switch"),D,ta,N,N,L):"case"==t?S(H,R(":")):"default"==t?S(R(":")):"catch"==t?S(I("form"),M,F,V,N,L):"export"==t?S(I("stat"),tU,N):"import"==t?S(I("stat"),tz,N):"async"==t?S(V):"@"==e?S(H,V):O(I("stat"),H,R(";"),N)}function F(t){if("("==t)return S(tI,R(")"))}function H(t,e){return z(t,e,!1)}function U(t,e){return z(t,e,!0)}function B(t){return"("!=t?O():S(I(")"),W,R(")"),N)}function z(t,e,n){if(x.state.fatArrowAt==x.stream.start){var o,r=n?J:Y;if("("==t)return S(M,I(")"),tr(tI,")"),N,R("=>"),r,L);if("variable"==t)return O(M,tx,R("=>"),r,L)}var i=n?q:$;return w.hasOwnProperty(t)?S(i):"function"==t?S(tM,i):"class"==t||u&&"interface"==e?(x.marked="keyword",S(I("form"),tN,N)):"keyword c"==t||"async"==t?S(n?U:H):"("==t?S(I(")"),W,R(")"),N,i):"operator"==t||"spread"==t?S(n?U:H):"["==t?S(I("]"),tK,N,i):"{"==t?ti(te,"}",null,i):"quasi"==t?O(G,i):"new"==t?S((o=n,function(t){return"."==t?S(o?Z:X):"variable"==t&&u?S(tb,o?q:$):O(o?U:H)})):S()}function W(t){return t.match(/[;\}\)\],]/)?O():O(H)}function $(t,e){return","==t?S(W):q(t,e,!1)}function q(t,e,n){var o=!1==n?$:q,r=!1==n?H:U;if("=>
1"==t)return S(M,n?J:Y,L);if("operator"==t)return/\+\+|--/.test(e)||u&&"!"==e?S(o):u&&"<"==e&&x.stream.match(/^([^<>]|<[^<>]*>)*>\s*\(/,!1)?S(I(">"),tr(tp,">"),N,o):"?"==e?S(H,R(":"),r):S(r);if("quasi"==t)return O(G,o);if(";"!=t){if("("==t)return ti(U,")","call",o);if("."==t)return S(tt,o);if("["==t)return S(I("]"),W,R("]"),N,o);if(u&&"as"==e)return x.marked="keyword",S(tp,o);if("regexp"==t)return x.state.lastType=x.marked="operator",x.stream.backUp(x.stream.pos-x.stream.start-1),S(r)}}function G(t,e){return"quasi"!=t?O():"${"!=e.slice(e.length-2)?S(G):S(W,K)}function K(t){if("}"==t)return x.marked="string-2",x.state.tokenize=m,S(G)}function Y(t){return b(x.stream,x.state),O("{"==t?V:H)}function J(t){return b(x.stream,x.state),O("{"==t?V:U)}function X(t,e){if("target"==e)return x.marked="keyword",S($)}function Z(t,e){if("target"==e)return x.marked="keyword",S(q)}function Q(t){return":"==t?S(N,V):O($,R(";"),N)}function tt(t){if("variable"==t)return x.marked="property",S()}function te(t,e){if("async"==t)return x.marked="property",S(te);if("variable"==t||"keyword"==x.style){var n;return(x.marked="property","get"==e||"set"==e)?S(tn):(u&&x.state.fatArrowAt==x.stream.start&&(n=x.stream.match(/^\s*:\s*/,!1))&&(x.state.fatArrowAt=x.stream.pos+n[0].length),S(to))}if("number"==t||"string"==t)return x.marked=s?"property":x.style+" property",S(to);if("jsonld-keyword"==t)return S(to);if(u&&E(e))return x.marked="keyword",S(te);else if("["==t)return S(H,ts,R("]"),to);else if("spread"==t)return S(U,to);else if("*"==e)return x.marked="keyword",S(te);else if(":"==t)return O(to)}function tn(t){return"variable"!=t?O(to):(x.marked="property",S(tM))}function to(t){return":"==t?S(U):"("==t?O(tM):void 0}function tr(t,e,n){function o(r,i){if(n?n.indexOf(r)>-1:","==r){var a=x.state.lexical;return"call"==a.info&&(a.pos=(a.pos||0)+1),S(function(n,o){return n==e||o==e?O():O(t)},o)}return r==e||i==e?S():n&&n.indexOf(";")>-1?O(t):S(R(e))}return function(n,r){return n==e||r==e?S():O(t,o)}}function ti(t,e,n){for(var o=3;o<arguments.length;o++)x.cc.push(arguments[o]);return S(I(e,n),tr(t,e),N)}function ta(t){return"}"==t?S():O(V,ta)}function ts(t,e){if(u){if(":"==t)return S(tp);if("?"==e)return S(ts)}}function tl(t,e){if(u&&(":"==t||"in"==e))return S(tp)}function tc(t){if(u&&":"==t)if(x.stream.match(/^\s*\w+\s+is\b/,!1))return S(H,tu,tp);else return S(tp)}function tu(t,e){if("is"==e)return x.marked="keyword",S()}function tp(t,e){return"keyof"==e||"typeof"==e||"infer"==e||"readonly"==e?(x.marked="keyword",S("typeof"==e?U:tp)):"variable"==t||"void"==e?(x.marked="type",S(tm)):"|"==e||"&"==e?S(tp):"string"==t||"number"==t||"atom"==t?S(tm):"["==t?S(I("]"),tr(tp,"]",","),N,tm):"{"==t?S(I("}"),td,N,tm):"("==t?S(tr(ty,")"),tf,tm):"<"==t?S(tr(tp,">"),tp):"quasi"==t?O(tg,tm):void 0}function tf(t){if("=>"==t)return S(tp)}function td(t){return t.match(/[\}\)\]]/)?S():","==t||";"==t?S(td):O(th,td)}function th(t,e){if("variable"==t||"keyword"==x.style)return x.marked="property",S(th);if("?"==e||"number"==t||"string"==t)return S(th);if(":"==t)return S(tp);if("["==t)return S(R("variable"),tl,R("]"),th);if("("==t)return O(tD,th);else if(!t.match(/[;\}\)\],]/))return S()}function tg(t,e){return"quasi"!=t?O():"${"!=e.slice(e.length-2)?S(tg):S(tp,tv)}function tv(t){if("}"==t)return x.marked="string-2",x.state.tokenize=m,S(tg)}function ty(t,e){return"variable"==t&&x.stream.match(/^\s*[?:]/,!1)||"?"==e?S(ty):":"==t?S(tp):"spread"==t?S(ty):O(tp)}function tm(t,e){return"<"==e?S(I(">"),tr(tp,">"),N,tm):"|"==e||"."==t||"&"==e?S(tp):"["==t?S(tp,R("]"),tm):"extends"==e||"implements"==e?(x.marked="keyword",S(tp)):"?"==e?S(tp,R(":"),tp):void 0}function tb(t,e){if("<"==e)return S(I(">"),tr(tp,">"),N,tm)}function tw(){return O(tp,t_)}function t_(t,e){if("="==e)return S(tp)}function tC(t,e){return"enum"==e?(x.marked="keyword",S(tY)):O(tx,ts,tT,tP)}function tx(t,e){return u&&E(e)?(x.marked="keyword",S(tx)):"variable"==t?(P(e),S()):"spread"==t?S(tx):"["==t?ti(tS,"]"):"{"==t?ti(tO,"}"):void 0}function tO(t,e){return"variable"!=t||x.stream.match(/^\s*:/,!1)?("variable"==t&&(x.marked="property"),"spread"==t)?S(tx):"}"==t?O():"["==t?S(H,R("]"),R(":"),tO):S(R(":"),tx,tT):(P(e),S(tT))}function tS(){return O(tx,tT)}function tT(t,e){if("="==e)return S(U)}function tP(t){if(","==t)return S(tC)}function tE(t,e){if("keyword b"==t&&"else"==e)return S(I("form","else"),V,N)}function tk(t,e){return"await"==e?S(tk):"("==t?S(I(")"),tj,N):void 0}function tj(t){return"var"==t?S(tC,tA):"variable"==t?S(tA):O(tA)}function tA(t,e){return")"==t?S():";"==t?S(tA):"in"==e||"of"==e?(x.marked="keyword",S(H,tA)):O(H,tA)}function tM(t,e){return"*"==e?(x.marked="keyword",S(tM)):"variable"==t?(P(e),S(tM)):"("==t?S(M,I(")"),tr(tI,")"),N,tc,V,L):u&&"<"==e?S(I(">"),tr(tw,">"),N,tM):void 0}function tD(t,e){return"*"==e?(x.marked="keyword",S(tD)):"variable"==t?(P(e),S(tD)):"("==t?S(M,I(")"),tr(tI,")"),N,tc,L):u&&"<"==e?S(I(">"),tr(tw,">"),N,tD):void 0}function tL(t,e){return"keyword"==t||"variable"==t?(x.marked="type",S(tL)):"<"==e?S(I(">"),tr(tw,">"),N):void 0}function tI(t,e){return("@"==e&&S(H,tI),"spread"==t)?S(tI):u&&E(e)?(x.marked="keyword",S(tI)):u&&"this"==t?S(ts,tT):O(tx,ts,tT)}function tN(t,e){return"variable"==t?tR(t,e):tV(t,e)}function tR(t,e){if("variable"==t)return P(e),S(tV)}function tV(t,e){return"<"==e?S(I(">"),tr(tw,">"),N,tV):"extends"==e||"implements"==e||u&&","==t?("implements"==e&&(x.marked="keyword"),S(u?tp:H,tV)):"{"==t?S(I("}"),tF,N):void 0}function tF(t,e){return"async"==t||"variable"==t&&("static"==e||"get"==e||"set"==e||u&&E(e))&&x.stream.match(/^\s+[\w$\xa1-\uffff]/,!1)?(x.marked="keyword",S(tF)):"variable"==t||"keyword"==x.style?(x.marked="property",S(tH,tF)):"number"==t||"string"==t?S(tH,tF):"["==t?S(H,ts,R("]"),tH,tF):"*"==e?(x.marked="keyword",S(tF)):u&&"("==t?O(tD,tF):";"==t||","==t?S(tF):"}"==t?S():"@"==e?S(H,tF):void 0}function tH(t,e){if("!"==e||"?"==e)return S(tH);if(":"==t)return S(tp,tT);if("="==e)return S(U);var n=x.state.lexical.prev;return O(n&&"interface"==n.info?tD:tM)}function tU(t,e){return"*"==e?(x.marked="keyword",S(tG,R(";"))):"default"==e?(x.marked="keyword",S(H,R(";"))):"{"==t?S(tr(tB,"}"),tG,R(";")):O(V)}function tB(t,e){return"as"==e?(x.marked="keyword",S(R("variable"))):"variable"==t?O(U,tB):void 0}function tz(t){return"string"==t?S():"("==t?O(H):"."==t?O($):O(tW,t$,tG)}function tW(t,e){return"{"==t?ti(tW,"}"):("variable"==t&&P(e),"*"==e&&(x.marked="keyword"),S(tq))}function t$(t){if(","==t)return S(tW,t$)}function tq(t,e){if("as"==e)return x.marked="keyword",S(tW)}function tG(t,e){if("from"==e)return x.marked="keyword",S(H)}function tK(t){return"]"==t?S():O(tr(U,"]"))}function tY(){return O(I("form"),tx,R("{"),I("}"),tr(tJ,"}"),N,N)}function tJ(){return O(tx,tT)}function tX(t,e,n){return e.tokenize==v&&/^(?:operator|sof|keyword [bcd]|case|new|export|default|spread|[\[{}\(,;:]|=>)$/.test(e.lastType)||"quasi"==e.lastType&&/\{\s*$/.test(t.string.slice(0,t.pos-(n||0)))}return L.lex=!0,N.lex=!0,{startState:function(t){var e={tokenize:v,lastType:"sof",cc:[],lexical:new _((t||0)-i,0,"block",!1),localVars:n.localVars,context:n.localVars&&new k(null,null,!1),indented:t||0};return n.globalVars&&"object"==typeof n.globalVars&&(e.globalVars=n.globalVars),e},token:function(t,e){if(t.sol()&&(e.lexical.hasOwnProperty("align")||(e.lexical.align=!1),e.indented=t.indentation(),b(t,e)),e.tokenize!=y&&t.eatSpace())return null;var n=e.tokenize(t,e);return"comment"==o?n:(e.lastType="operator"==o&&("++"==r||"--"==r)?"incdec":o,C(e,n,o,r,t))},indent:function(e,o){if(e.tokenize==y||e.tokenize==m)return t.Pass;if(e.tokenize!=v)return 0;var r,s=o&&o.charAt(0),l=e.lexical;if(!/^\s*else\b/.test(o))for(var c=e.cc.length-1;c>=0;--c){var u=e.cc[c];if(u==N)l=l.prev;else if(u!=tE&&u!=L)break}for(;("stat"==l.type||"form"==l.type)&&("}"==s||(r=e.cc[e.cc.length-1])&&(r==$||r==q)&&!/^[,\.=+\-*:?[\(]/.test(o));)l=l.prev;a&&")"==l.type&&"stat"==l.prev.type&&(l=l.prev);var p=l.type,f=s==p;if("vardef"==p)return l.indented+("operator"==e.lastType||","==e.lastType?l.info.length+1:0);if("form"==p&&"{"==s)return l.indented;if("form"==p)return l.indented+i;if("stat"==p)return l.indented+("operator"==e.lastType||","==e.lastType||d.test(o.charAt(0))||/[,.]/.test(o.charAt(0))?a||i:0);if("switch"==l.info&&!f&&!1!=n.doubleIndentSwitch)return l.indented+(/^(?:case|default)\b/.test(o)?i:2*i);else if(l.align)return l.column+ +!f;else return l.indented+(f?0:i)},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:tX,skipExpression:function(e){C(e,"atom","atom","true",new t.StringStream("",2,null))}}}),t.registerHelper("wordChars","javascript",/[\w$]/),t.defineMIME("text/javascript","javascript"),t.defineMIME("text/ecmascript","javascript"),t.defineMIME("application/javascript","javascript"),t.defineMIME("application/x-javascript","javascript"),t.defineMIME("application/ecmascript","javascript"),t.defineMIME("application/json",{name:"javascript",json:!0}),t.defineMIME("application/x-json",{name:"javascript",json:!0}),t.defineMIME("application/manifest+json",{name:"javascript",json:!0}),t.defineMIME("application/ld+json",{name:"javascript",jsonld:!0}),t.defineMIME("text/typescript",{name:"javascript",typescript:!0}),t.defineMIME("application/typescript",{name:"javascript",typescript:!0})}(n(408))},701:(t,e,n)=>{!function(t){var e={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}
1,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};t.defineMode("xml",function(o,r){var i,a,s=o.indentUnit,l={},c=r.htmlMode?e:n;for(var u in c)l[u]=c[u];for(var u in r)l[u]=r[u];function p(t,e){function n(n){return e.tokenize=n,n(t,e)}var o=t.next();if("<"==o)if(t.eat("!"))if(t.eat("["))if(t.match("CDATA["))return n(d("atom","]]>"));else return null;else if(t.match("--"))return n(d("comment","--\x3e"));else if(t.match("DOCTYPE",!0,!0))return t.eatWhile(/[\w\._\-]/),n(function t(e){return function(n,o){for(var r;null!=(r=n.next());)if("<"==r)return o.tokenize=t(e+1),o.tokenize(n,o);else if(">"==r)if(1!=e)return o.tokenize=t(e-1),o.tokenize(n,o);else{o.tokenize=p;break}return"meta"}}(1));else return null;else if(t.eat("?"))return t.eatWhile(/[\w\._\-]/),e.tokenize=d("meta","?>"),"meta";else return i=t.eat("/")?"closeTag":"openTag",e.tokenize=f,"tag bracket";return"&"==o?(t.eat("#")?t.eat("x")?t.eatWhile(/[a-fA-F\d]/)&&t.eat(";"):t.eatWhile(/[\d]/)&&t.eat(";"):t.eatWhile(/[\w\.\-:]/)&&t.eat(";"))?"atom":"error":(t.eatWhile(/[^&<]/),null)}function f(t,e){var n,o,r=t.next();if(">"==r||"/"==r&&t.eat(">"))return e.tokenize=p,i=">"==r?"endTag":"selfcloseTag","tag bracket";if("="==r)return i="equals",null;if("<"==r){e.tokenize=p,e.state=m,e.tagName=e.tagStart=null;var a=e.tokenize(t,e);return a?a+" tag error":"tag error"}if(!/[\'\"]/.test(r))return t.match(/^[^\s\u00a0=<>\"\']*[^\s\u00a0=<>\"\'\/]/),"word";return n=r,(o=function(t,e){for(;!t.eol();)if(t.next()==n){e.tokenize=f;break}return"string"}).isInAttribute=!0,e.tokenize=o,e.stringStartCol=t.column(),e.tokenize(t,e)}function d(t,e){return function(n,o){for(;!n.eol();){if(n.match(e)){o.tokenize=p;break}n.next()}return t}}function h(t){return t&&t.toLowerCase()}function g(t,e,n){this.prev=t.context,this.tagName=e||"",this.indent=t.indented,this.startOfLine=n,(l.doNotIndent.hasOwnProperty(e)||t.context&&t.context.noIndent)&&(this.noIndent=!0)}function v(t){t.context&&(t.context=t.context.prev)}function y(t,e){for(var n;;){if(!t.context||(n=t.context.tagName,!l.contextGrabbers.hasOwnProperty(h(n))||!l.contextGrabbers[h(n)].hasOwnProperty(h(e))))return;v(t)}}function m(t,e,n){return"openTag"==t?(n.tagStart=e.column(),b):"closeTag"==t?w:m}function b(t,e,n){return"word"==t?(n.tagName=e.current(),a="tag",x):l.allowMissingTagName&&"endTag"==t?(a="tag bracket",x(t,e,n)):(a="error",b)}function w(t,e,n){if("word"==t){var o=e.current();return(n.context&&n.context.tagName!=o&&l.implicitlyClosed.hasOwnProperty(h(n.context.tagName))&&v(n),n.context&&n.context.tagName==o||!1===l.matchClosing)?(a="tag",_):(a="tag error",C)}return l.allowMissingTagName&&"endTag"==t?(a="tag bracket",_(t,e,n)):(a="error",C)}function _(t,e,n){return"endTag"!=t?(a="error",_):(v(n),m)}function C(t,e,n){return a="error",_(t,e,n)}function x(t,e,n){if("word"==t)return a="attribute",O;if("endTag"==t||"selfcloseTag"==t){var o=n.tagName,r=n.tagStart;return n.tagName=n.tagStart=null,"selfcloseTag"==t||l.autoSelfClosers.hasOwnProperty(h(o))?y(n,o):(y(n,o),n.context=new g(n,o,r==n.indented)),m}return a="error",x}function O(t,e,n){return"equals"==t?S:(l.allowMissing||(a="error"),x(t,e,n))}function S(t,e,n){return"string"==t?T:"word"==t&&l.allowUnquoted?(a="string",x):(a="error",x(t,e,n))}function T(t,e,n){return"string"==t?T:x(t,e,n)}return p.isInText=!0,{startState:function(t){var e={tokenize:p,state:m,indented:t||0,tagName:null,tagStart:null,context:null};return null!=t&&(e.baseIndent=t),e},token:function(t,e){if(!e.tagName&&t.sol()&&(e.indented=t.indentation()),t.eatSpace())return null;i=null;var n=e.tokenize(t,e);return(n||i)&&"comment"!=n&&(a=null,e.state=e.state(i||n,t,e),a&&(n="error"==a?n+" error":a)),n},indent:function(e,n,o){var r=e.context;
1if(e.tokenize.isInAttribute)if(e.tagStart==e.indented)return e.stringStartCol+1;else return e.indented+s;if(r&&r.noIndent)return t.Pass;if(e.tokenize!=f&&e.tokenize!=p)return o?o.match(/^(\s*)/)[0].length:0;if(e.tagName)if(!1!==l.multilineTagIndentPastTag)return e.tagStart+e.tagName.length+2;else return e.tagStart+s*(l.multilineTagIndentFactor||1);if(l.alignCDATA&&/<!\[CDATA\[/.test(n))return 0;var i=n&&/^<(\/)?([\w_:\.-]*)/.exec(n);if(i&&i[1])for(;r;)if(r.tagName==i[2]){r=r.prev;break}else if(l.implicitlyClosed.hasOwnProperty(h(r.tagName)))r=r.prev;else break;else if(i)for(;r;){var a=l.contextGrabbers[h(r.tagName)];if(a&&a.hasOwnProperty(h(i[2])))r=r.prev;else break}for(;r&&r.prev&&!r.startOfLine;)r=r.prev;return r?r.indent+s:e.baseIndent||0},electricInput:/<\/[\s\w:]+>$/,blockCommentStart:"\x3c!--",blockCommentEnd:"--\x3e",configuration:l.htmlMode?"html":"xml",helperType:l.htmlMode?"html":"xml",skipAttribute:function(t){t.state==S&&(t.state=x)},xmlCurrentTag:function(t){return t.tagName?{name:t.tagName,close:"closeTag"==t.type}:null},xmlCurrentContext:function(t){for(var e=[],n=t.context;n;n=n.prev)e.push(n.tagName);return e.reverse()}}}),t.defineMIME("text/xml","xml"),t.defineMIME("application/xml","xml"),t.mimeModes.hasOwnProperty("text/html")||t.defineMIME("text/html",{name:"xml",htmlMode:!0})}(n(408))},774:(t,e,n)=>{n.r(e),n.d(e,{default:()=>th});var o,r="undefined"!=typeof document?document:null,i="undefined"!=typeof window?window:null,a=Array.prototype,s=a.filter,l=a.indexOf,c=a.map,u=a.push,p=a.reverse,f=a.slice,d=a.splice,h=/^#[\w-]*$/,g=/^\.[\w-]*$/,v=/<.+>/,y=/^\w+$/;function m(t,e){return void 0===e&&(e=r),g.test(t)?e.getElementsByClassName(t.slice(1)):y.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t)}function b(t,e){if(void 0===e&&(e=r),t){if(t.__cash)return t;var n=t;if(k(t)){if(e.__cash&&(e=e[0]),!(n=h.test(t)?e.getElementById(t.slice(1)):v.test(t)?tp(t):m(t,e)))return}else if(E(t))return this.ready(t);(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 w(t,e){return new b(t,e)}var _=w.fn=w.prototype=b.prototype={constructor:w,__cash:!0,length:0,splice:d};_.get=function(t){return void 0===t?f.call(this):this[t<0?t+this.length:t]},_.eq=function(t){return w(this.get(t))},_.first=function(){return this.eq(0)},_.last=function(){return this.eq(-1)},_.map=function(t){return w(c.call(this,function(e,n){return t.call(e,n,e)}))},_.slice=function(){return w(f.apply(this,arguments))};var C=/(?:^\w|[A-Z]|\b\w)/g,x=/[\s-_]+/g;function O(t){return t.replace(C,function(t,e){return t[!e?"toLowerCase":"toUpperCase"]()}).replace(x,"")}function S(t,e){for(var n=0,o=t.length;n<o&&!1!==e.call(t[n],t[n],n,t);n++);}w.camelCase=O,w.each=S,_.each=function(t){return S(this,function(e,n){return t.call(e,n,e)}),this},_.removeProp=function(t){return this.each(function(e,n){delete n[t]})},w.extend=_.extend=function(t){void 0===t&&(t=this);for(var e=arguments,n=e.length,o=n<2?0:1;o<n;o++)for(var r in e[o])t[r]=e[o][r];return t};var T=1;function P(t,e){var n=t&&(t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector);return!!n&&n.call(t,e)}function E(t){return"function"==typeof t}function k(t){return"string"==typeof t}function j(t){return!isNaN(parseFloat(t))&&isFinite(t)}w.guid=1,w.matches=P,w.isFunction=E,w.isString=k,w.isNumeric=j;var A=Array.isArray;function M(t){return k(t)?function(e,n){return P(n,t)}:t.__cash?function(e,n){return t.is(n)}:function(t,e,n){return e===n}}w.isArray=A,_.prop=function(t,e){if(t){if(k(t))return arguments.length<2?this[0]&&this[0][t]:this.each(function(n,o){o[t]=e});for(var n in t)this.prop(n,t[n]);return this}},_.filter=function(t){if(!t)return w();var e=E(t)?t:M(t);return w(s.call(this,function(n,o){return e.call(n,o,n,t)}))};var D=/\S+/g;function L(t){return k(t)&&t.match(D)||[]}function I(t){return t.filter(function(t,e,n){return n.indexOf(t)===e})}function N(t,e,n){if(1===t.nodeType){var o=i.getComputedStyle(t,null);return e?n?o.getPropertyValue(e):o[e]:o}}function R(t,e){return parseInt(N(t,e),10)||0}_.hasClass=function(t){var e=L(t),n=!1;return e.length&&this.each(function(t,o){return!(n=o.classList.contains(e[0]))}),n},_.removeAttr=function(t){var e=L(t);return e.length?this.each(function(t,n){S(e,function(t){n.removeAttribute(t)})}):this},_.attr=function(t,e){if(t){if(k(t)){if(arguments.length<2){if(!this[0])return;var n=this[0].getAttribute(t);return null===n?void 0:n}return null===e?this.removeAttr(t):this.each(function(n,o){o.setAttribute(t,e)})}for(var o in t)this.attr(o,t[o]);return this}},_.toggleClass=function(t,e){var n=L(t),o=void 0!==e;return n.length?this.each(function(t,r){S(n,function(t){o?e?r.classList.add(t):r.classList.remove(t):r.classList.toggle(t)})}):this},_.addClass=function(t){return this.toggleClass(t,!0)},_.removeClass=function(t){return arguments.length?this.toggleClass(t,!1):this.attr("class","")},w.unique=I,_.add=function(t,e){return w(I(this.get().concat(w(t,e).get())))};var V=/^--/;function F(t){return V.test(t)}var H={},U=r&&r.createElement("div"),B=U?U.style:{},z=["webkit","moz","ms","o"];function W(t,e){if(void 0===e&&(e=F(t)),e)return t;if(!H[t]){var n=O(t),o=""+n.charAt(0).toUpperCase()+n.slice(1);S((n+" "+z.join(o+" ")+o).split(" "),function(e){if(e in B)return H[t]=e,!1})}return H[t]}w.prefixedProp=W;var $={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function q(t,e,n){return void 0===n&&(n=F(t)),!n&&!$[t]&&j(e)?e+"px":e}_.css=function(t,e){if(k(t)){var n=F(t);return(t=W(t,n),arguments.length<2)?this[0]&&N(this[0],t,n):t?(e=q(t,e,n),this.each(function(o,r){1===r.nodeType&&(n?r.style.setProperty(t,e):r.style[t]=e)})):this}for(var o in t)this.css(o,t[o]);return this};var G="__cashData",K=/^data-(.*)/;function Y(t){return t[G]=t[G]||{}}function J(t,e){var n=Y(t);if(e){if(!(e in n)){var o=t.dataset?t.dataset[e]||t.dataset[O(e)]:w(t).attr("data-"+e);
1if(void 0!==o){try{o=JSON.parse(o)}catch(t){}n[e]=o}}return n[e]}return n}function X(t,e){return R(t,"border"+(e?"Left":"Top")+"Width")+R(t,"padding"+(e?"Left":"Top"))+R(t,"padding"+(e?"Right":"Bottom"))+R(t,"border"+(e?"Right":"Bottom")+"Width")}function Z(t,e){for(var n=0,o=e.length;n<o;n++)if(0>t.indexOf(e[n]))return!1;return!0}w.hasData=function(t){return G in t},_.data=function(t,e){var n=this;if(!t){if(!this[0])return;return S(this[0].attributes,function(t){var e=t.name.match(K);e&&n.data(e[1])}),J(this[0])}if(k(t))return void 0===e?this[0]&&J(this[0],t):this.each(function(n,o){Y(o)[t]=e});for(var o in t)this.data(o,t[o]);return this},_.removeData=function(t){return this.each(function(e,n){void 0===t?delete n[G]:delete Y(n)[t]})},S(["Width","Height"],function(t){_["inner"+t]=function(){if(this[0])return this[0]===i?i["inner"+t]:this[0]["client"+t]}}),S(["width","height"],function(t,e){_[t]=function(n){return this[0]?arguments.length?(n=parseInt(n,10),this.each(function(o,r){if(1===r.nodeType){var i=N(r,"boxSizing");r.style[t]=q(t,n+("border-box"===i?X(r,!e):0))}})):this[0]===i?this[0][O("outer-"+t)]:this[0].getBoundingClientRect()[t]-X(this[0],!e):void 0===n?void 0:this}}),S(["Width","Height"],function(t,e){_["outer"+t]=function(n){if(this[0])return this[0]===i?i["outer"+t]:this[0]["offset"+t]+(n?R(this[0],"margin"+(e?"Top":"Left"))+R(this[0],"margin"+(e?"Bottom":"Right")):0)}});var Q="__cashEvents";function tt(t){return t[Q]=t[Q]||{}}function te(t){var e=t.split(".");return[e[0],e.slice(1).sort()]}function tn(t,e,n,o){var r=tt(t);if(e){var i=r[e];if(!i)return;o&&(o.guid=o.guid||T++),r[e]=i.filter(function(r){var i=r[0],a=r[1];if(o&&a.guid!==o.guid||!Z(i,n))return!0;t.removeEventListener(e,a)})}else if(n&&n.length)for(e in r)tn(t,e,n,o);else for(e in r)!function(t,e,n){S(t[n],function(t){t[0];var o=t[1];e.removeEventListener(n,o)}),delete t[n]}(r,t,e)}_.off=function(t,e){var n=this;return void 0===t?this.each(function(t,e){return tn(e)}):S(L(t),function(t){var o=te(t),r=o[0],i=o[1];n.each(function(t,n){return tn(n,r,i,e)})}),this},_.on=function(t,e,n,o){var r=this;if(!k(t)){for(var i in t)this.on(i,e,t[i]);return this}return E(e)&&(n=e,e=!1),S(L(t),function(t){var i=te(t),a=i[0],s=i[1];r.each(function(t,r){var i,l=function t(i){if(!i.namespace||Z(s,i.namespace.split("."))){var l=r;if(e){for(var c=i.target;!P(c,e);)if(c===r||!(c=c.parentNode))return;l=c}i.namespace=i.namespace||"";var u=n.call(l,i,i.data);o&&tn(r,a,s,t),!1===u&&(i.preventDefault(),i.stopPropagation())}};l.guid=n.guid=n.guid||T++,l.guid=l.guid||T++,(i=tt(r))[a]=i[a]||[],i[a].push([s,l]),r.addEventListener(a,l)})}),this},_.one=function(t,e,n){return this.on(t,e,n,!0)},_.ready=function(t){var e=function(){return t(w)};return"loading"!==r.readyState?setTimeout(e):r.addEventListener("DOMContentLoaded",e),this},_.trigger=function(t,e){var n=t;if(k(t)){var o=te(t),i=o[0],a=o[1];(n=r.createEvent("HTMLEvents")).initEvent(i,!0,!0),n.namespace=a.join(".")}return n.data=e,this.each(function(t,e){e.dispatchEvent(n)})};var to=/select-one/i,tr=/select-multiple/i;function ti(t){var e,n=t.type;return to.test(n)?t.selectedIndex<0?null:t.options[t.selectedIndex].value:tr.test(n)?(e=[],S(t.options,function(t){!t.selected||t.disabled||t.parentNode.disabled||e.push(t.value)}),e):t.value}var ta=/%20/g,ts=/file|reset|submit|button|image/i,tl=/radio|checkbox/i;_.serialize=function(){var t="";return this.each(function(e,n){S(n.elements||[n],function(e){if(!(e.disabled||!e.name||"FIELDSET"===e.tagName||ts.test(e.type)||tl.test(e.type)&&!e.checked)){var n=ti(e);void 0!==n&&S(A(n)?n:[n],function(n){var o;t+=(o=e.name,"&"+encodeURIComponent(o)+"="+encodeURIComponent(n).replace(ta,"+"))})}})}),t.substr(1)},_.val=function(t){return void 0===t?this[0]&&ti(this[0]):this.each(function(e,n){var o=tr.test(n.type),r=null===t?o?[]:"":t;o&&A(r)?S(n.options,function(t){t.selected=r.indexOf(t.value)>=0}):n.value=r})},_.clone=function(){return this.map(function(t,e){return e.cloneNode(!0)})},_.detach=function(){return this.each(function(t,e){e.parentNode&&e.parentNode.removeChild(e)})};var tc=/^\s*<(\w+)[^>]*>/,tu=/^\s*<(\w+)\s*\/?>(?:<\/\1>)?\s*$/;function tp(t){if(!o){var e=r.createElement("table"),n=r.createElement("tr");o={"*":r.createElement("div"),tr:r.createElement("tbody"),td:n,th:n,thead:e,tbody:e,tfoot:e}}if(!k(t))return[];if(tu.test(t))return[r.createElement(RegExp.$1)];var i=o[tc.test(t)&&RegExp.$1]||o["*"];return i.innerHTML=t,w(i.childNodes).detach().get()}function tf(t,e,n){if(void 0!==e){var o=k(e);!o&&e.length?S(e,function(e){return tf(t,e,n)}):S(t,o?function(t){t.insertAdjacentHTML(n?"afterbegin":"beforeend",e)}:function(t,o){var r;return r=o?e.cloneNode(!0):e,void(n?t.insertBefore(r,t.childNodes[0]):t.appendChild(r))})}}w.parseHTML=tp,_.empty=function(){var t=this[0];if(t)for(;t.firstChild;)t.removeChild(t.firstChild);return this},_.append=function(){var t=this;return S(arguments,function(e){tf(t,e)}),this},_.appendTo=function(t){return tf(w(t),this),this},_.html=function(t){if(void 0===t)return this[0]&&this[0].innerHTML;var e=t.nodeType?t[0].outerHTML:t;return this.each(function(t,n){n.innerHTML=e})},_.insertAfter=function(t){var e=this;return w(t).each(function(t,n){var o=n.parentNode;e.each(function(e,r){o.insertBefore(t?r.cloneNode(!0):r,n.nextSibling)})}),this},_.after=function(){var t=this;return S(p.apply(arguments),function(e){p.apply(w(e).slice()).insertAfter(t)}),this},_.insertBefore=function(t){var e=this;return w(t).each(function(t,n){var o=n.parentNode;e.each(function(e,r){o.insertBefore(t?r.cloneNode(!0):r,n)})}),this},_.before=function(){var t=this;return S(arguments,function(e){w(e).insertBefore(t)}),this},_.prepend=function(){var t=this;return S(arguments,function(e){tf(t,e,!0)}),this},_.prependTo=function(t){return tf(w(t),p.apply(this.slice()),!0),this},_.remove=function(){return this.detach().off()},_.replaceWith=function(t){var e=this;return this.each(function(n,o){var r=o.parentNode;if(r){var i=n?w(t).clone():w(t);if(!i[0])return e.remove(),!1;r.replaceChild(i[0],o),w(i[0]).after(i.slice(1))}})},_.replaceAll=function(t){return w(t).replaceWith(this),this},_.text=function(t){return void 0===t?this[0]?this[0].textContent:"":this.each(function(e,n){
1n.textContent=t})};var td=r&&r.documentElement;_.offset=function(){var t=this[0];if(t){var e=t.getBoundingClientRect();return{top:e.top+i.pageYOffset-td.clientTop,left:e.left+i.pageXOffset-td.clientLeft}}},_.offsetParent=function(){return w(this[0]&&this[0].offsetParent)},_.position=function(){var t=this[0];if(t)return{left:t.offsetLeft,top:t.offsetTop}},_.children=function(t){var e=[];return(this.each(function(t,n){u.apply(e,n.children)}),e=w(I(e)),t)?e.filter(function(e,n){return P(n,t)}):e},_.contents=function(){var t=[];return this.each(function(e,n){u.apply(t,"IFRAME"===n.tagName?[n.contentDocument]:n.childNodes)}),w(t.length&&I(t))},_.find=function(t){for(var e=[],n=0,o=this.length;n<o;n++){var r=m(t,this[n]);r.length&&u.apply(e,r)}return w(e.length&&I(e))},_.has=function(t){var e=k(t)?function(e,n){return!!m(t,n).length}:function(e,n){return n.contains(t)};return this.filter(e)},_.is=function(t){if(!t||!this[0])return!1;var e=M(t),n=!1;return this.each(function(o,r){return!(n=e(o,r,t))}),n},_.next=function(){return w(this[0]&&this[0].nextElementSibling)},_.not=function(t){if(!t||!this[0])return this;var e=M(t);return this.filter(function(n,o){return!e(n,o,t)})},_.parent=function(){var t=[];
1return this.each(function(e,n){n&&n.parentNode&&t.push(n.parentNode)}),w(I(t))},_.index=function(t){var e=t?w(t)[0]:this[0],n=t?this:w(e).parent().children();return l.call(n,e)},_.closest=function(t){return t&&this[0]?this.is(t)?this.filter(t):this.parent().closest(t):w()},_.parents=function(t){var e,n=[];return this.each(function(o,i){for(e=i;e&&e.parentNode&&e!==r.body.parentNode;)e=e.parentNode,(!t||t&&P(e,t))&&n.push(e)}),w(I(n))},_.prev=function(){return w(this[0]&&this[0].previousElementSibling)},_.siblings=function(){var t=this[0];return this.parent().children().filter(function(e,n){return n!==t})};let th=w},39:(t,e,n)=>{n.r(e),n.d(e,{VERSION:()=>r,after:()=>e_,all:()=>eU,allKeys:()=>td,any:()=>eB,assign:()=>tA,before:()=>eC,bind:()=>ec,bindAll:()=>ef,chain:()=>ei,chunk:()=>nh,clone:()=>tI,collect:()=>eI,compact:()=>no,compose:()=>ew,constant:()=>X,contains:()=>ez,countBy:()=>e3,create:()=>tL,debounce:()=>ey,default:()=>nb,defaults:()=>tM,defer:()=>eg,delay:()=>eh,detect:()=>eM,difference:()=>ni,drop:()=>ne,each:()=>eL,escape:()=>t3,every:()=>eU,extend:()=>tj,extendOwn:()=>tA,filter:()=>eF,find:()=>eM,findIndex:()=>eT,findKey:()=>eO,findLastIndex:()=>eP,findWhere:()=>eD,first:()=>nt,flatten:()=>nr,foldl:()=>eR,foldr:()=>eV,forEach:()=>eL,functions:()=>tE,get:()=>tH,groupBy:()=>e1,has:()=>tU,head:()=>nt,identity:()=>tB,include:()=>ez,includes:()=>ez,indexBy:()=>e2,indexOf:()=>ej,initial:()=>e8,inject:()=>eR,intersection:()=>nc,invert:()=>tP,invoke:()=>eW,isArguments:()=>K,isArray:()=>$,isArrayBuffer:()=>N,isBoolean:()=>P,isDataView:()=>W,isDate:()=>M,isElement:()=>E,isEmpty:()=>ts,isEqual:()=>tf,isError:()=>L,isFinite:()=>Y,isFunction:()=>F,isMap:()=>t_,isMatch:()=>tl,isNaN:()=>J,isNull:()=>S,isNumber:()=>A,isObject:()=>O,isRegExp:()=>D,isSet:()=>tx,isString:()=>j,isSymbol:()=>I,isTypedArray:()=>to,isUndefined:()=>T,isWeakMap:()=>tC,isWeakSet:()=>tO,iteratee:()=>tG,keys:()=>ta,last:()=>nn,lastIndexOf:()=>eA,map:()=>eI,mapObject:()=>tY,matcher:()=>tz,matches:()=>tz,max:()=>eG,memoize:()=>ed,methods:()=>tE,min:()=>eK,mixin:()=>nv,negate:()=>eb,noop:()=>tJ,now:()=>t0,object:()=>nf,omit:()=>e7,once:()=>ex,pairs:()=>tT,partial:()=>el,partition:()=>e5,pick:()=>e6,pluck:()=>e$,property:()=>tW,propertyOf:()=>tX,random:()=>tQ,range:()=>nd,reduce:()=>eR,reduceRight:()=>eV,reject:()=>eH,rest:()=>ne,restArguments:()=>x,result:()=>en,sample:()=>eX,select:()=>eF,shuffle:()=>eZ,size:()=>e4,some:()=>eB,sortBy:()=>eQ,sortedIndex:()=>eE,tail:()=>ne,take:()=>nt,tap:()=>tN,template:()=>ee,templateSettings:()=>t4,throttle:()=>ev,times:()=>tZ,toArray:()=>eJ,toPath:()=>tR,transpose:()=>nu,unescape:()=>t5,union:()=>nl,uniq:()=>ns,unique:()=>ns,uniqueId:()=>er,unzip:()=>nu,values:()=>tS,where:()=>eq,without:()=>na,wrap:()=>em,zip:()=>np});var o={};n.r(o),n.d(o,{VERSION:()=>r,after:()=>e_,all:()=>eU,allKeys:()=>td,any:()=>eB,assign:()=>tA,before:()=>eC,bind:()=>ec,bindAll:()=>ef,chain:()=>ei,chunk:()=>nh,clone:()=>tI,collect:()=>eI,compact:()=>no,compose:()=>ew,constant:()=>X,contains:()=>ez,countBy:()=>e3,create:()=>tL,debounce:()=>ey,default:()=>ny,defaults:()=>tM,defer:()=>eg,delay:()=>eh,detect:()=>eM,difference:()=>ni,drop:()=>ne,each:()=>eL,escape:()=>t3,every:()=>eU,extend:()=>tj,extendOwn:()=>tA,filter:()=>eF,find:()=>eM,findIndex:()=>eT,findKey:()=>eO,findLastIndex:()=>eP,findWhere:()=>eD,first:()=>nt,flatten:()=>nr,foldl:()=>eR,foldr:()=>eV,forEach:()=>eL,functions:()=>tE,get:()=>tH,groupBy:()=>e1,has:()=>tU,head:()=>nt,identity:()=>tB,include:()=>ez,includes:()=>ez,indexBy:()=>e2,indexOf:()=>ej,initial:()=>e8,inject:()=>eR,intersection:()=>nc,invert:()=>tP,invoke:()=>eW,isArguments:()=>K,isArray:()=>$,isArrayBuffer:()=>N,isBoolean:()=>P,isDataView:()=>W,isDate:()=>M,isElement:()=>E,isEmpty:()=>ts,isEqual:()=>tf,isError:()=>L,isFinite:()=>Y,isFunction:()=>F,isMap:()=>t_,isMatch:()=>tl,isNaN:()=>J,isNull:()=>S,isNumber:()=>A,isObject:()=>O,isRegExp:()=>D,isSet:()=>tx,isString:()=>j,isSymbol:()=>I,isTypedArray:()=>to,isUndefined:()=>T,isWeakMap:()=>tC,isWeakSet:()=>tO,iteratee:()=>tG,keys:()=>ta,last:()=>nn,lastIndexOf:()=>eA,map:()=>eI,mapObject:()=>tY,matcher:()=>tz,matches:()=>tz,max:()=>eG,memoize:()=>ed,methods:()=>tE,min:()=>eK,mixin:()=>nv,negate:()=>eb,noop:()=>tJ,now:()=>t0,object:()=>
vendor: 4,706 bytes, line 1
1nf,omit:()=>e7,once:()=>ex,pairs:()=>tT,partial:()=>el,partition:()=>e5,pick:()=>e6,pluck:()=>e$,property:()=>tW,propertyOf:()=>tX,random:()=>tQ,range:()=>nd,reduce:()=>eR,reduceRight:()=>eV,reject:()=>eH,rest:()=>ne,restArguments:()=>x,result:()=>en,sample:()=>eX,select:()=>eF,shuffle:()=>eZ,size:()=>e4,some:()=>eB,sortBy:()=>eQ,sortedIndex:()=>eE,tail:()=>ne,take:()=>nt,tap:()=>tN,template:()=>ee,templateSettings:()=>t4,throttle:()=>ev,times:()=>tZ,toArray:()=>eJ,toPath:()=>tR,transpose:()=>nu,unescape:()=>t5,union:()=>nl,uniq:()=>ns,unique:()=>ns,uniqueId:()=>er,unzip:()=>nu,values:()=>tS,where:()=>eq,without:()=>na,wrap:()=>em,zip:()=>np});var r="1.13.8",i="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},a=Array.prototype,s=Object.prototype,l="undefined"!=typeof Symbol?Symbol.prototype:null,c=a.push,u=a.slice,p=s.toString,f=s.hasOwnProperty,d="undefined"!=typeof ArrayBuffer,h="undefined"!=typeof DataView,g=Array.isArray,v=Object.keys,y=Object.create,m=d&&ArrayBuffer.isView,b=isNaN,w=isFinite,_=!({toString:null}).propertyIsEnumerable("toString"),C=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"];function x(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),o=Array(n),r=0;r<n;r++)o[r]=arguments[r+e];switch(e){case 0:return t.call(this,o);case 1:return t.call(this,arguments[0],o);case 2:return t.call(this,arguments[0],arguments[1],o)}var i=Array(e+1);for(r=0;r<e;r++)i[r]=arguments[r];return i[e]=o,t.apply(this,i)}}function O(t){var e=typeof t;return"function"===e||"object"===e&&!!t}function S(t){return null===t}function T(t){return void 0===t}function P(t){return!0===t||!1===t||"[object Boolean]"===p.call(t)}function E(t){return!!(t&&1===t.nodeType)}function k(t){var e="[object "+t+"]";return function(t){return p.call(t)===e}}let j=k("String"),A=k("Number"),M=k("Date"),D=k("RegExp"),L=k("Error"),I=k("Symbol"),N=k("ArrayBuffer");var R=k("Function"),V=i.document&&i.document.childNodes;"object"!=typeof Int8Array&&"function"!=typeof V&&(R=function(t){return"function"==typeof t});let F=R,H=k("Object");var U=h&&(!/\[native code\]/.test(String(DataView))||H(new DataView(new ArrayBuffer(8)))),B="undefined"!=typeof Map&&H(new Map),z=k("DataView");let W=U?function(t){return null!=t&&F(t.getInt8)&&N(t.buffer)}:z,$=g||k("Array");function q(t,e){return null!=t&&f.call(t,e)}var G=k("Arguments");!function(){G(arguments)||(G=function(t){return q(t,"callee")})}();let K=G;function Y(t){return!I(t)&&w(t)&&!isNaN(parseFloat(t))}function J(t){return A(t)&&b(t)}function X(t){return function(){return t}}function Z(t){return function(e){var n=t(e);return"number"==typeof n&&n>=0&&n<=0x1fffffffffffff}}function Q(t){return function(e){return null==e?void 0:e[t]}}let tt=Q("byteLength"),te=Z(tt);var tn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;let to=d?function(t){return m?m(t)&&!W(t):te(t)&&tn.test(p.call(t))}:X(!1),tr=Q("length");function ti(t,e){e=function(t){for(var e={},n=t.length,o=0;o<n;++o)e[t[o]]=!0;return{contains:function(t){return!0===e[t]},push:function(n){return e[n]=!0,t.push(n)}}}(e);var n=C.length,o=t.constructor,r=F(o)&&o.prototype||s,i="constructor";for(q(t,i)&&!e.contains(i)&&e.push(i);n--;)(i=C[n])in t&&t[i]!==r[i]&&!e.contains(i)&&e.push(i)}function ta(t){if(!O(t))return[];if(v)return v(t);var e=[];for(var n in t)q(t,n)&&e.push(n);return _&&ti(t,e),e}function ts(t){if(null==t)return!0;var e=tr(t);return"number"==typeof e&&($(t)||j(t)||K(t))?0===e:0===tr(ta(t))}function tl(t,e){var n=ta(e),o=n.length;if(null==t)return!o;for(var r=Object(t),i=0;i<o;i++){var a=n[i];if(e[a]!==r[a]||!(a in r))return!1}return!0}function tc(t){return t instanceof tc?t:this instanceof tc?void(this._wrapped=t):new tc(t)}function tu(t){return new Uint8Array(t.buffer||t,t.byteOffset||0,tt(t))}tc.VERSION=r,tc.prototype.value=function(){return this._wrapped},tc.prototype.valueOf=tc.prototype.toJSON=tc.prototype.value,tc.prototype.toString=function(){return String(this._wrapped)};var tp="[object DataView]";function tf(t,e){for(var n=[{a:t,b:e}],o=[],r=[];n.length;){var i=n.pop();if(!0===i){o.pop(),r.pop();continue}if((t=i.a)===(e=i.b)){if(0!==t||1/t==1/e)continue;return!1}if(null==t||null==e)return!1;if(t!=t){if(e!=e)continue;return!1}var a=typeof t;if("function"!==a&&"object"!==a&&"object"!=typeof e)return!1;t instanceof tc&&(t=t._wrapped),e instanceof tc&&(e=e._wrapped);var s=p.call(t);if(s!==p.call(e))return!1;if(U&&"[object Object]"==s&&W(t)){if(!W(e))return!1;s=tp}switch(s){case"[object RegExp]":case"[object String]":if(""+t==""+e)continue;return!1;
vendor: 4,182 bytes, line 1
1case"[object Number]":n.push({a:+t,b:+e});continue;case"[object Date]":case"[object Boolean]":if(+t==+e)continue;return!1;case"[object Symbol]":if(l.valueOf.call(t)===l.valueOf.call(e))continue;return!1;case"[object ArrayBuffer]":case tp:n.push({a:tu(t),b:tu(e)});continue}var c="[object Array]"===s;if(!c&&to(t)){if(tt(t)!==tt(e))return!1;if(t.buffer===e.buffer&&t.byteOffset===e.byteOffset)continue;c=!0}if(!c){if("object"!=typeof t||"object"!=typeof e)return!1;var u=t.constructor,f=e.constructor;if(u!==f&&!(F(u)&&u instanceof u&&F(f)&&f instanceof f)&&"constructor"in t&&"constructor"in e)return!1}for(var d=o.length;d--;)if(o[d]===t){if(r[d]===e)break;return!1}if(!(d>=0))if(o.push(t),r.push(e),n.push(!0),c){if((d=t.length)!==e.length)return!1;for(;d--;)n.push({a:t[d],b:e[d]})}else{var h,g=ta(t);if(d=g.length,ta(e).length!==d)return!1;for(;d--;){if(!q(e,h=g[d]))return!1;n.push({a:t[h],b:e[h]})}}}return!0}function td(t){if(!O(t))return[];var e=[];for(var n in t)e.push(n);return _&&ti(t,e),e}function th(t){var e=tr(t);return function(n){if(null==n||tr(td(n)))return!1;for(var o=0;o<e;o++)if(!F(n[t[o]]))return!1;return t!==tb||!F(n[tg])}}var tg="forEach",tv=["clear","delete"],ty=["get","has","set"],tm=tv.concat(tg,ty),tb=tv.concat(ty),tw=["add"].concat(tv,tg,"has");let t_=B?th(tm):k("Map"),tC=B?th(tb):k("WeakMap"),tx=B?th(tw):k("Set"),tO=k("WeakSet");function tS(t){for(var e=ta(t),n=e.length,o=Array(n),r=0;r<n;r++)o[r]=t[e[r]];return o}function tT(t){for(var e=ta(t),n=e.length,o=Array(n),r=0;r<n;r++)o[r]=[e[r],t[e[r]]];return o}function tP(t){for(var e={},n=ta(t),o=0,r=n.length;o<r;o++)e[t[n[o]]]=n[o];return e}function tE(t){var e=[];for(var n in t)F(t[n])&&e.push(n);return e.sort()}function tk(t,e){return function(n){var o=arguments.length;if(e&&(n=Object(n)),o<2||null==n)return n;for(var r=1;r<o;r++)for(var i=arguments[r],a=t(i),s=a.length,l=0;l<s;l++){var c=a[l];e&&void 0!==n[c]||(n[c]=i[c])}return n}}let tj=tk(td),tA=tk(ta),tM=tk(td,!0);function tD(t){if(!O(t))return{};if(y)return y(t);var e=function(){};e.prototype=t;var n=new e;return e.prototype=null,n}function tL(t,e){var n=tD(t);return e&&tA(n,e),n}function tI(t){return O(t)?$(t)?t.slice():tj({},t):t}function tN(t,e){return e(t),t}function tR(t){return $(t)?t:[t]}function tV(t){return tc.toPath(t)}function tF(t,e){for(var n=e.length,o=0;o<n;o++){if(null==t)return;t=t[e[o]]}return n?t:void 0}function tH(t,e,n){var o=tF(t,tV(e));return T(o)?n:o}function tU(t,e){for(var n=(e=tV(e)).length,o=0;o<n;o++){var r=e[o];if(!q(t,r))return!1;t=t[r]}return!!n}function tB(t){return t}function tz(t){return t=tA({},t),function(e){return tl(e,t)}}function tW(t){return t=tV(t),function(e){return tF(e,t)}}function t$(t,e,n){if(void 0===e)return t;switch(null==n?3:n){case 1:return function(n){return t.call(e,n)};case 3:return function(n,o,r){return t.call(e,n,o,r)};case 4:return function(n,o,r,i){return t.call(e,n,o,r,i)}}return function(){return t.apply(e,arguments)}}function tq(t,e,n){return null==t?tB:F(t)?t$(t,e,n):O(t)&&!$(t)?tz(t):tW(t)}function tG(t,e){return tq(t,e,1/0)}function tK(t,e,n){return tc.iteratee!==tG?tc.iteratee(t,e):tq(t,e,n)}function tY(t,e,n){e=tK(e,n);for(var o=ta(t),r=o.length,i={},a=0;a<r;a++){var s=o[a];i[s]=e(t[s],s,t)}return i}function tJ(){}function tX(t){return null==t?tJ:function(e){return tH(t,e)}}function tZ(t,e,n){var o=Array(Math.max(0,t));e=t$(e,n,1);for(var r=0;r<t;r++)o[r]=e(r);return o}function tQ(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))}tc.toPath=tR,tc.iteratee=tG;let t0=Date.now||function(){return new Date().getTime()};function t1(t){var e=function(e){return t[e]},n="(?:"+ta(t).join("|")+")",o=RegExp(n),r=RegExp(n,"g");return function(t){return t=null==t?"":""+t,o.test(t)?t.replace(r,e):t}}let t2={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},t3=t1(t2),t5=t1(tP(t2)),t4=tc.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var t9=/(.)^/,t6={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},t7=/\\|'|\r|\n|\u2028|\u2029/g;function t8(t){return"\\"+t6[t]}var et=/^\s*(\w|\$)+\s*$/;function ee(t,e,n){!e&&n&&(e=n);
vendor: 1,377 bytes, line 1
1var o,r=RegExp([((e=tM({},e,tc.templateSettings)).escape||t9).source,(e.interpolate||t9).source,(e.evaluate||t9).source].join("|")+"|$","g"),i=0,a="__p+='";t.replace(r,function(e,n,o,r,s){return a+=t.slice(i,s).replace(t7,t8),i=s+e.length,n?a+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":o?a+="'+\n((__t=("+o+"))==null?'':__t)+\n'":r&&(a+="';\n"+r+"\n__p+='"),e}),a+="';\n";var s=e.variable;if(s){if(!et.test(s))throw Error("variable is not a bare identifier: "+s)}else a="with(obj||{}){\n"+a+"}\n",s="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{o=Function(s,"_",a)}catch(t){throw t.source=a,t}var l=function(t){return o.call(this,t,tc)};return l.source="function("+s+"){\n"+a+"}",l}function en(t,e,n){var o=(e=tV(e)).length;if(!o)return F(n)?n.call(t):n;for(var r=0;r<o;r++){var i=null==t?void 0:t[e[r]];void 0===i&&(i=n,r=o),t=F(i)?i.call(t):i}return t}var eo=0;function er(t){var e=++eo+"";return t?t+e:e}function ei(t){var e=tc(t);return e._chain=!0,e}function ea(t,e,n,o,r){if(!(o instanceof e))return t.apply(n,r);var i=tD(t.prototype),a=t.apply(i,r);return O(a)?a:i}var es=x(function(t,e){var n=es.placeholder,o=function(){for(var r=0,i=e.length,a=Array(i),s=0;s<i;s++)a[s]=e[s]===n?arguments[r++]:e[s];for(;r<arguments.length;)a.push(arguments[r++]);return ea(t,o,this,this,a)};return o}
1);es.placeholder=tc;let el=es,ec=x(function(t,e,n){if(!F(t))throw TypeError("Bind must be called on a function");var o=x(function(r){return ea(t,o,e,this,n.concat(r))});return o}),eu=Z(tr);function ep(t,e,n){e||0===e||(e=1/0);for(var o=[],r=0,i=0,a=tr(t)||0,s=[];;){if(i>=a){if(!s.length)break;var l=s.pop();i=l.i,a=tr(t=l.v);continue}var c=t[i++];s.length>=e?o[r++]=c:eu(c)&&($(c)||K(c))?(s.push({i:i,v:t}),i=0,a=tr(t=c)):n||(o[r++]=c)}return o}let ef=x(function(t,e){var n=(e=ep(e,!1,!1)).length;if(n<1)throw Error("bindAll must be passed function names");for(;n--;){var o=e[n];t[o]=ec(t[o],t)}return t});function ed(t,e){var n=function(o){var r=n.cache,i=""+(e?e.apply(this,arguments):o);return q(r,i)||(r[i]=t.apply(this,arguments)),r[i]};return n.cache={},n}let eh=x(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),eg=el(eh,tc,1);function ev(t,e,n){var o,r,i,a,s=0;n||(n={});var l=function(){s=!1===n.leading?0:t0(),o=null,a=t.apply(r,i),o||(r=i=null)},c=function(){var c=t0();s||!1!==n.leading||(s=c);var u=e-(c-s);return r=this,i=arguments,u<=0||u>e?(o&&(clearTimeout(o),o=null),s=c,a=t.apply(r,i),o||(r=i=null)):o||!1===n.trailing||(o=setTimeout(l,u)),a};return c.cancel=function(){clearTimeout(o),s=0,o=r=i=null},c}function ey(t,e,n){var o,r,i,a,s,l=function(){var c=t0()-r;e>c?o=setTimeout(l,e-c):(o=null,n||(a=t.apply(s,i)),o||(i=s=null))},c=x(function(c){return s=this,i=c,r=t0(),!o&&(o=setTimeout(l,e),n&&(a=t.apply(s,i))),a});return c.cancel=function(){clearTimeout(o),o=i=s=null},c}function em(t,e){return el(e,t)}function eb(t){return function(){return!t.apply(this,arguments)}}function ew(){var t=arguments,e=t.length-1;return function(){for(var n=e,o=t[e].apply(this,arguments);n--;)o=t[n].call(this,o);return o}}function e_(t,e){return function(){if(--t<1)return e.apply(this,arguments)}}function eC(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}let ex=el(eC,2);function eO(t,e,n){e=tK(e,n);for(var o,r=ta(t),i=0,a=r.length;i<a;i++)if(e(t[o=r[i]],o,t))return o}function eS(t){return function(e,n,o){n=tK(n,o);for(var r=tr(e),i=t>0?0:r-1;i>=0&&i<r;i+=t)if(n(e[i],i,e))return i;return -1}}let eT=eS(1),eP=eS(-1);function eE(t,e,n,o){for(var r=(n=tK(n,o,1))(e),i=0,a=tr(t);i<a;){var s=Math.floor((i+a)/2);n(t[s])<r?i=s+1:a=s}return i}function ek(t,e,n){return function(o,r,i){var a=0,s=tr(o);if("number"==typeof i)t>0?a=i>=0?i:Math.max(i+s,a):s=i>=0?Math.min(i+1,s):i+s+1;else if(n&&i&&s)return i=n(o,r),o[i]===r?i:-1;if(r!=r)return(i=e(u.call(o,a,s),J))>=0?i+a:-1;for(i=t>0?a:s-1;i>=0&&i<s;i+=t)if(o[i]===r)return i;return -1}}let ej=ek(1,eT,eE),eA=ek(-1,eP);function eM(t,e,n){var o=(eu(t)?eT:eO)(t,e,n);if(void 0!==o&&-1!==o)return t[o]}function eD(t,e){return eM(t,tz(e))}function eL(t,e,n){if(e=t$(e,n),eu(t))for(o=0,r=t.length;o<r;o++)e(t[o],o,t);else{var o,r,i=ta(t);for(o=0,r=i.length;o<r;o++)e(t[i[o]],i[o],t)}return t}function eI(t,e,n){e=tK(e,n);for(var o=!eu(t)&&ta(t),r=(o||t).length,i=Array(r),a=0;a<r;a++){var s=o?o[a]:a;i[a]=e(t[s],s,t)}return i}function eN(t){var e=function(e,n,o,r){var i=!eu(e)&&ta(e),a=(i||e).length,s=t>0?0:a-1;for(r||(o=e[i?i[s]:s],s+=t);s>=0&&s<a;s+=t){var l=i?i[s]:s;o=n(o,e[l],l,e)}return o};return function(t,n,o,r){var i=arguments.length>=3;return e(t,t$(n,r,4),o,i)}}let eR=eN(1),eV=eN(-1);function eF(t,e,n){var o=[];return e=tK(e,n),eL(t,function(t,n,r){e(t,n,r)&&o.push(t)}),o}function eH(t,e,n){return eF(t,eb(tK(e)),n)}function eU(t,e,n){e=tK(e,n);for(var o=!eu(t)&&ta(t),r=(o||t).length,i=0;i<r;i++){var a=o?o[i]:i;if(!e(t[a],a,t))return!1}return!0}function eB(t,e,n){e=tK(e,n);for(var o=!eu(t)&&ta(t),r=(o||t).length,i=0;i<r;i++){var a=o?o[i]:i;if(e(t[a],a,t))return!0}return!1}function ez(t,e,n,o){return eu(t)||(t=tS(t)),("number"!=typeof n||o)&&(n=0),ej(t,e,n)>=0}let eW=x(function(t,e,n){var o,r;return F(e)?r=e:(o=(e=tV(e)).slice(0,-1),e=e[e.length-1]),eI(t,function(t){var i=r;if(!i){if(o&&o.length&&(t=tF(t,o)),null==t)return;i=t[e]}return null==i?i:i.apply(t,n)})});function e$(t,e){return eI(t,tW(e))}function eq(t,e){return eF(t,tz(e))}function eG(t,e,n){var o,r,i=-1/0,a=-1/0;
vendor: 4,442 bytes, line 1
1if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=eu(t)?t:tS(t);for(var s=0,l=t.length;s<l;s++)null!=(o=t[s])&&o>i&&(i=o)}else e=tK(e,n),eL(t,function(t,n,o){((r=e(t,n,o))>a||r===-1/0&&i===-1/0)&&(i=t,a=r)});return i}function eK(t,e,n){var o,r,i=1/0,a=1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t){t=eu(t)?t:tS(t);for(var s=0,l=t.length;s<l;s++)null!=(o=t[s])&&o<i&&(i=o)}else e=tK(e,n),eL(t,function(t,n,o){((r=e(t,n,o))<a||r===1/0&&i===1/0)&&(i=t,a=r)});return i}var eY=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function eJ(t){return t?$(t)?u.call(t):j(t)?t.match(eY):eu(t)?eI(t,tB):tS(t):[]}function eX(t,e,n){if(null==e||n)return eu(t)||(t=tS(t)),t[tQ(t.length-1)];var o=eJ(t),r=tr(o);e=Math.max(Math.min(e,r),0);for(var i=r-1,a=0;a<e;a++){var s=tQ(a,i),l=o[a];o[a]=o[s],o[s]=l}return o.slice(0,e)}function eZ(t){return eX(t,1/0)}function eQ(t,e,n){var o=0;return e=tK(e,n),e$(eI(t,function(t,n,r){return{value:t,index:o++,criteria:e(t,n,r)}}).sort(function(t,e){var n=t.criteria,o=e.criteria;if(n!==o){if(n>o||void 0===n)return 1;if(n<o||void 0===o)return -1}return t.index-e.index}),"value")}function e0(t,e){return function(n,o,r){var i=e?[[],[]]:{};return o=tK(o,r),eL(n,function(e,r){var a=o(e,r,n);t(i,e,a)}),i}}let e1=e0(function(t,e,n){q(t,n)?t[n].push(e):t[n]=[e]}),e2=e0(function(t,e,n){t[n]=e}),e3=e0(function(t,e,n){q(t,n)?t[n]++:t[n]=1}),e5=e0(function(t,e,n){t[+!n].push(e)},!0);function e4(t){return null==t?0:eu(t)?t.length:ta(t).length}function e9(t,e,n){return e in n}let e6=x(function(t,e){var n={},o=e[0];if(null==t)return n;F(o)?(e.length>1&&(o=t$(o,e[1])),e=td(t)):(o=e9,e=ep(e,!1,!1),t=Object(t));for(var r=0,i=e.length;r<i;r++){var a=e[r],s=t[a];o(s,a,t)&&(n[a]=s)}return n}),e7=x(function(t,e){var n,o=e[0];return F(o)?(o=eb(o),e.length>1&&(n=e[1])):(e=eI(ep(e,!1,!1),String),o=function(t,n){return!ez(e,n)}),e6(t,o,n)});function e8(t,e,n){return u.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function nt(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:e8(t,t.length-e)}function ne(t,e,n){return u.call(t,null==e||n?1:e)}function nn(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[t.length-1]:ne(t,Math.max(0,t.length-e))}function no(t){return eF(t,Boolean)}function nr(t,e){return ep(t,e,!1)}let ni=x(function(t,e){return e=ep(e,!0,!0),eF(t,function(t){return!ez(e,t)})}),na=x(function(t,e){return ni(t,e)});function ns(t,e,n,o){P(e)||(o=n,n=e,e=!1),null!=n&&(n=tK(n,o));for(var r=[],i=[],a=0,s=tr(t);a<s;a++){var l=t[a],c=n?n(l,a,t):l;e&&!n?(a&&i===c||r.push(l),i=c):n?ez(i,c)||(i.push(c),r.push(l)):ez(r,l)||r.push(l)}return r}let nl=x(function(t){return ns(ep(t,!0,!0))});function nc(t){for(var e=[],n=arguments.length,o=0,r=tr(t);o<r;o++){var i,a=t[o];if(!ez(e,a)){for(i=1;i<n&&ez(arguments[i],a);i++);i===n&&e.push(a)}}return e}function nu(t){for(var e=t&&eG(t,tr).length||0,n=Array(e),o=0;o<e;o++)n[o]=e$(t,o);return n}let np=x(nu);function nf(t,e){for(var n={},o=0,r=tr(t);o<r;o++)e?n[t[o]]=e[o]:n[t[o][0]]=t[o][1];return n}function nd(t,e,n){null==e&&(e=t||0,t=0),n||(n=e<t?-1:1);for(var o=Math.max(Math.ceil((e-t)/n),0),r=Array(o),i=0;i<o;i++,t+=n)r[i]=t;return r}function nh(t,e){if(null==e||e<1)return[];for(var n=[],o=0,r=t.length;o<r;)n.push(u.call(t,o,o+=e));return n}function ng(t,e){return t._chain?tc(e).chain():e}function nv(t){return eL(tE(t),function(e){var n=tc[e]=t[e];tc.prototype[e]=function(){var t=[this._wrapped];return c.apply(t,arguments),ng(this,n.apply(tc,t))}}),tc}eL(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=a[t];tc.prototype[t]=function(){var n=this._wrapped;return null!=n&&(e.apply(n,arguments),("shift"===t||"splice"===t)&&0===n.length&&delete n[0]),ng(this,n)}}),eL(["concat","join","slice"],function(t){var e=a[t];tc.prototype[t]=function(){var t=this._wrapped;return null!=t&&(t=e.apply(t,arguments)),ng(this,t)}});let ny=tc;var nm=nv(o);nm._=nm;let nb=nm}},g={};function v(t){var e=g[t];if(void 0!==e)return e.exports;var n=g[t]={exports:{}};return h[t].call(n.exports,n,n.exports,v),n.exports}v.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return v.d(e,{a:e}),e},v.d=(t,e)=>{for(var n in e)v.o(e,n)&&!v.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},v.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||Function("return this")()}catch(t){if("object"==typeof window)return window}
1}(),v.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),v.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var y={};v.d(y,{Ay:()=>gS,I0:()=>gO,nu:()=>gx});var m={};v.r(m),v.d(m,{appendStyles:()=>ts,buildBase64UrlFromSvg:()=>tM,camelCase:()=>tp,capitalize:()=>tO,createId:()=>tA,deepMerge:()=>tw,escape:()=>tv,escapeAltQuoteAttrValue:()=>tb,escapeAttrValue:()=>tm,escapeNodeContent:()=>ty,find:()=>tg,get:()=>J,getComponentModel:()=>tk,getComponentView:()=>tE,getElement:()=>th,getGlobal:()=>tr,getModel:()=>t_,getUiClass:()=>ta,getUnitFromValue:()=>tc,getViewEl:()=>tT,hasDnd:()=>td,hasWin:()=>to,isBultInMethod:()=>Q,isComponent:()=>tP,isDef:()=>tn,isEmptyObj:()=>tx,isObject:()=>tC,isRule:()=>tS,normalizeFloat:()=>tf,normalizeKey:()=>tt,serialize:()=>Z,set:()=>X,setViewEl:()=>tj,shallowDiff:()=>tl,stringToPath:()=>K,toLowerCase:()=>ti,upFirst:()=>tu,wait:()=>te});var b=v(39),w=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},_=function(t){return(null==t?void 0:t.nodeType)===Node.DOCUMENT_NODE},C=function(t){var e=t&&t.parentNode;e&&e.removeChild(t)},x=function(t){var e;return t&&!!(t.offsetWidth||t.offsetHeight||(null==(e=t.getClientRects)?void 0:e.call(t).length))},O=function(t,e){var n;null==(n=t.parentNode)||n.replaceChild(e,t)},S=function(t,e,n){var o=t.childNodes,r=o.length,i=(0,b.isUndefined)(n)?r:n;(0,b.isString)(e)&&(t.insertAdjacentHTML("beforeEnd",e),e=t.lastChild,t.removeChild(e)),i>=r?t.appendChild(e):t.insertBefore(e,o[i])},T=function(t,e){return S(t,e)},P=function(t,e,n){void 0===e&&(e={});var o=document.createElement(t);return e&&(0,b.each)(e,function(t,e){return o.setAttribute(e,t)}),n&&((0,b.isString)(n)?o.innerHTML=n:o.appendChild(n)),o},E=function(t){return document.createTextNode(t)},k=function(t,e){var n,o=t.type;try{n=new window[e](o,t)}catch(t){(n=document.createEvent(e)).initEvent(o,!0,!0)}return n._parentEvent=t,0===o.indexOf("key")&&(n.keyCodeVal=t.keyCode,["keyCode","which"].forEach(function(t){Object.defineProperty(n,t,{get:function(){return this.keyCodeVal}})})),n},j=function(t,e){void 0===e&&(e=[]),(Array.isArray(e)?e:[e]).forEach(function(e){var n=e.tag||"div",o=e.attributes||{},r=document.createElement(n);(0,b.each)(o,function(t,e){r.setAttribute(e,t)}),t.appendChild(r)})},A=function(t){return(null==t?void 0:t.nodeType)===Node.TEXT_NODE},M=function(t){return t&&!A(t)&&(null==t?void 0:t.nodeType)!==Node.COMMENT_NODE},D=function(t){var e,n={top:0,left:0,width:0,height:0};if(!t)return n;if(A(t)){if(!t.parentNode)return n;var o=t.ownerDocument.createRange();o.selectNode(t),e=o.getBoundingClientRect(),o.detach()}return e||(t.getBoundingClientRect?t.getBoundingClientRect():n)},L=function(t){var e=(null==t?void 0:t.ownerDocument)||document,n=e.documentElement,o=e.defaultView||window;return{x:(o.pageXOffset||n.scrollLeft||0)-(n.clientLeft||0),y:(o.pageYOffset||n.scrollTop||0)-(n.clientTop||0)}},I=function(t){return t.which||t.keyCode},N=function(t){return String.fromCharCode(I(t))},R=function(t){return t.touches&&t.touches[0]?t.touches[0]:t},V=function(t){return 27===I(t)},F=function(t){if(!t)return"";var e=t.name,n=t.publicId,o=t.systemId;return"<!DOCTYPE ".concat(e).concat(n?' PUBLIC "'.concat(n,'"'):"").concat(!n&&o?' SYSTEM "'.concat(o,'"'):"",">")},H=function(t){void 0===t&&(t={});var e=[];return(0,b.each)(t,function(t,n){return e.push("".concat(n,'="').concat(t,'"'))}),e.join(" ")},U=function(t,e,n,o){var r=e.split(/\s+/),i=(0,b.isArray)(t)?t:[t];r.forEach(function(t){i.forEach(function(e){return null==e?void 0:e.addEventListener(t,n,o)})})},B=function(t,e,n,o){var r=e.split(/\s+/),i=(0,b.isArray)(t)?t:[t];r.forEach(function(t){i.forEach(function(e){return null==e?void 0:e.removeEventListener(t,n,o)})})},z=function(){return(z=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},W=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},$={},q=/\\(\\)?/g,G=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K=function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(G,function(t,n,o,r){return e.push(o?r.replace(q,"$1"):n||t),""}),e};function Y(t,e){return(0,b.isArray)(t)?t:e.hasOwnProperty(t)?[t]:K(t)}var J=function(t,e,n){for(var o,r=Y(e,t),i=r.length,a=0;null!=t&&a<i;
vendor: 4,083 bytes, line 1
1)t=t["".concat(r[a++])];return null!=(o=a&&a==i?t:void 0)?o:n},X=function(t,e,n){if(!tC(t))return!1;var o=Y(e,t),r=o.length;if(0===r)return!1;if(1===r)return t[o[0]]=n,!0;var i=o.slice(0,-1),a=o[r-1],s=J(t,i);if(s){if(Array.isArray(s)){var l=+a;if(!isNaN(l))return s[l]=n,!0}else if(tC(s))return s[a]=n,!0}return!1},Z=function(t){return JSON.parse(JSON.stringify(t))},Q=function(t){return(0,b.isFunction)($[t])},tt=function(t){return Q(t)?"_".concat(t):t},te=function(t){return void 0===t&&(t=0),new Promise(function(e){return setTimeout(e,t)})},tn=function(t){return void 0!==t},to=function(){return"undefined"!=typeof window},tr=function(){return"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:v.g},ti=function(t){return(t||"").toLowerCase()},ta=function(t,e){var n=t.getConfig(),o=n.stylePrefix;return[n.customUI&&"".concat(o,"cui"),e].filter(function(t){return t}).join(" ")},ts=function(t,e){void 0===e&&(e={});var n=(0,b.isArray)(t)?W([],t,!0):[t];if(n.length){var o=n.shift();if(o&&(!e.unique||!document.querySelector('link[href="'.concat(o,'"]')))){var r=document.head,i=document.createElement("link");i.href=o,i.rel="stylesheet",e.prepand?r.insertBefore(i,r.firstChild):r.appendChild(i)}ts(n)}},tl=function(t,e){var n={},o=(0,b.keys)(e);for(var r in t)if(t.hasOwnProperty(r)){var i=t[r],a=e[r];o.indexOf(r)>=0?i!==a&&(n[r]=a):n[r]=null}for(var r in e)e.hasOwnProperty(r)&&(0,b.isUndefined)(t[r])&&(n[r]=e[r]);return n},tc=function(t){return t.replace(parseFloat(t),"")},tu=function(t){return t[0].toUpperCase()+t.toLowerCase().slice(1)},tp=function(t){return t.replace(/-./g,function(t){return t[1].toUpperCase()})},tf=function(t,e,n){void 0===e&&(e=1),void 0===n&&(n=0);var o=0;if(isNaN(t))return n;if(Math.floor(t=parseFloat(t))!==t){var r=e.toString().split(".")[1];o=r?r.length:0}return o?parseFloat(t.toFixed(o)):t},td=function(t){return"draggable"in document.createElement("i")&&(!t||t.config.nativeDnD)},th=function(t){return(0,b.isElement)(t)||A(t)?t:t&&t.getEl?t.getEl():void 0},tg=function(t,e){var n=null;return t.some(function(o,r){return e(o,r,t)?(n=o,1):0}),n},tv=function(t){return void 0===t&&(t=""),"".concat(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'").replace(/`/g,"`")},ty=function(t){return void 0===t&&(t=""),"".concat(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")},tm=function(t){return void 0===t&&(t=""),"".concat(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},tb=function(t){return void 0===t&&(t=""),"".concat(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/'/g,"'")},tw=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];for(var n=z({},t[0]),o=1;o<t.length;o++){var r=z({},t[o]);for(var i in r){var a=n[i],s=r[i];tC(a)&&tC(s)?n[i]=tw(a,s):n[i]=s}}return n},t_=function(t,e){var n;return!e&&t&&t.__cashData?n=t.__cashData.model:e&&(0,b.isElement)(t)&&(n=e(t).data("model")),n},tC=function(t){return t&&!Array.isArray(t)&&"object"==typeof t},tx=function(t){return Object.keys(t).length<=0},tO=function(t){return void 0===t&&(t=""),t&&t.charAt(0).toUpperCase()+t.substring(1)},tS=function(t){return t&&t.toCSS},tT=function(t){return null==t?void 0:t.__gjsv},tP=function(t){return!!(null==t?void 0:t.toHTML)},tE=function(t){return tT(t)},tk=function(t){var e;return null==(e=tE(t))?void 0:e.model},tj=function(t,e){t.__gjsv=e},tA=function(t){void 0===t&&(t=16);for(var e="",n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",o=n.length,r=0;r<t;r++)e+=n.charAt(Math.floor(Math.random()*o));return e},tM=function(t){if(t&&"<svg"===t.substr(0,4)){var e="";return to()?e=window.btoa(t):void 0!==d&&(e=d.from(t,"utf8").toString("base64")),e?"data:image/svg+xml;base64,".concat(e):t}return t};function tD(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];var o=t.raw;return o.reduce(function(t,n,r){var i=e[r-1],a=o[r-1];return Array.isArray(i)?i=i.join(""):a&&"$"===a.slice(-1)?t=t.slice(0,-1):i=tv(i),t+i+n})}
1var tL=v(193),tI=v.n(tL),tN=v(774),tR=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),tV=function(){return(tV=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},tF="add remove reset change",tH=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tR(e,t),e}(tI().Model),tU=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tR(e,t),e}(tI().Collection),tB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tR(e,t),e}(tI().View);!function(t){t.Screen="screen",t.World="world"}(u8||(u8={}));var tz={x:0,y:0};tV(tV({},tz),{width:0,height:0});var tW=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),t$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tW(e,t),e}(tH),tq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return tW(e,t),e.prototype.getByComponent=function(t){var e=this;return this.filter(function(n){return e.getComponent(n)===t})[0]},e.prototype.addComponent=function(t,e){var n=this,o=((0,b.isArray)(t)?t:[t]).filter(function(t){return!n.hasComponent(t)}).map(function(t){return new t$({component:t})})[0];return this.push(o,e)},e.prototype.getComponent=function(t){return t.get("component")},e.prototype.hasComponent=function(t){var e=this.getByComponent(t);return e&&this.contains(e)},e.prototype.lastComponent=function(){var t=this.last();return t?this.getComponent(t):void 0},e.prototype.allComponents=function(){var t=this;return this.map(function(e){return t.getComponent(e)}).filter(function(t){return t})},e.prototype.removeComponent=function(t,e){var n=this,o=((0,b.isArray)(t)?t:[t]).map(function(t){return n.getByComponent(t)});return this.remove(o,e)},e}(tU),tG=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),tK=function(){return(tK=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},tY=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},tJ=function(){function t(t,e,n){this.debounced=[],this.collections=[],this.cls=[],this.events={},this._em=t,this._name=e;var o=this.name.charAt(0).toLowerCase()+this.name.slice(1),r=(0,b.isUndefined)(t.config[o])?t.config[this.name]:t.config[o],i=!0===r?{}:r||{};i.pStylePrefix=t.config.pStylePrefix||"",(0,b.isUndefined)(r)||r||(i._disable=1),i.em=t,this._config=tw(n||{},i)}return Object.defineProperty(t.prototype,"em",{get:function(){return this._em},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this._config}
1,enumerable:!1,configurable:!0}),t.prototype.render=function(t){},t.prototype.postLoad=function(t){},t.prototype.onInit=function(){},Object.defineProperty(t.prototype,"name",{get:function(){return this._name},enumerable:!1,configurable:!0}),t.prototype.getConfig=function(t){return t?this.config[t]:this.config},t.prototype.__logWarn=function(t,e){void 0===e&&(e={}),this.em.logWarning("[".concat(this.name,"]: ").concat(t),e)},t.prototype.destroy=function(){this.__destroy()},t.prototype.__destroy=function(){var t,e,n;null==(t=this.view)||t.remove(),null==(e=this.state)||e.stopListening(),null==(n=this.state)||n.clear(),this.debounced.forEach(function(t){return t.cancel()}),this.collections.forEach(function(t){t.stopListening(),t.reset()})},t.prototype.__appendTo=function(){var t=this.getConfig().appendTo;if(t){var e=(0,b.isElement)(t)?t:document.querySelector(t);if(!e)return this.__logWarn('"appendTo" element not found');e.appendChild(this.render())}},t}(),tX=function(t){function e(e,n,o,r,i,a){void 0===a&&(a={});var s=t.call(this,e,n,i)||this;return s.cls=[],s._itemCache=new Map,s.private=!1,s.all=o,r&&(s.events=r),a.skipListen||s.__initListen(),s}return tG(e,t),e.prototype.postLoad=function(t){},e.prototype.render=function(t){},e.prototype.getProjectData=function(t){var e={},n=this.storageKey;return n&&(e[n]=t||this.getAll()),e},e.prototype.loadProjectData=function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n=e.all,o=e.onResult,r=e.reset,i=this.storageKey,a={action:"load"},s=n||this.all,l=t[i];if("string"==typeof l)try{l=JSON.parse(l)}catch(t){this.__logWarn("Data parsing failed",{input:l})}return r&&l&&s.reset(void 0,a),o?l&&o(l,a):l&&tn(l.length)&&s.reset(l,a),l},e.prototype.clear=function(t){void 0===t&&(t={});var e=this.all;return e&&e.reset(void 0,t),this},e.prototype.getAll=function(){return tY([],this.all.models,!0)},e.prototype.getAllMap=function(){return this.getAll().reduce(function(t,e){return t[e.get(e.idAttribute)]=e,t},{})},e.prototype._makeCacheKey=function(t){return""},e.prototype._cacheItem=function(t){var e=this._makeCacheKey(t);e&&this._itemCache.set(e,t)},e.prototype._uncacheItem=function(t){var e=this._makeCacheKey(t);e&&this._itemCache.delete(e)},e.prototype._clearItemCache=function(){this._itemCache.clear()},e.prototype._onItemsResetCache=function(t){var e=this;this._clearItemCache(),t.each(function(t){return e._cacheItem(t)})},e.prototype._onItemKeyChange=function(t){for(var e,n=0,o=this._itemCache.entries();n<o.length;n++){var r=o[n],i=r[0];if(r[1]===t){e=i;break}}e&&this._itemCache.delete(e),this._cacheItem(t)},e.prototype._setupCacheListeners=function(){this.em.listenTo(this.all,"add",this._cacheItem.bind(this)),this.em.listenTo(this.all,"remove",this._uncacheItem.bind(this)),this.em.listenTo(this.all,"reset",this._onItemsResetCache.bind(this))},e.prototype.__initListen=function(t){void 0===t&&(t={});var e=this.all,n=this.em,o=this.events;e&&n&&e.on("add",function(t,e,r){return n.trigger(o.add,t,r)}).on("remove",function(t,e,r){return n.trigger(o.remove,t,r)}).on("change",function(t,e){return n.trigger(o.update,t,t.changedAttributes(),e)}).on("all",this.__catchAllEvent,this),this.cls=[e].concat(t.collections||[]),(t.propagate||[]).forEach(function(t){var o=t.entity,r=t.event;o.on("all",function(t,o,i,a){var s=tK({event:t},a||i);[n,e].map(function(t){return t.trigger(r,o,s)})})})},e.prototype.__remove=function(t,e){var n=this;void 0===e&&(e={});var o=this.em,r=(0,b.isString)(t)?this.get(t):t,i=function(){return r&&n.all.remove(r,e),r};return e.silent||null==o||o.trigger(this.events.removeBefore,r,i,e),!e.abort&&i()},e.prototype.__catchAllEvent=function(t,e,n,o){var r=this.em,i=this.events;r&&i.all&&r.trigger(i.all,{event:t,model:e,options:o||n}),this.__onAllEvent()},e.prototype.__appendTo=function(t){var e=this.config.appendTo;if(e){var n=(0,b.isElement)(e)?e:document.querySelector(e);if(!n)return this.__logWarn('"appendTo" element not found');n.appendChild(this.render(t))}},e.prototype.__onAllEvent=function(){},e.prototype._createId=function(t,e){void 0===t&&(t=16);var n,o=this.getAll(),r=(null!=e?e:o.length)+t,i=this.getAllMap();do n=tA(r);while(i[n]);return n},e.prototype.__listenAdd=function(t,e){var n=this;t.on("add",function(t,o,r){return n.em.trigger(e,t,r)})},e.prototype.__listenRemove=function(t,e){var n=this;t.on("remove",function(t,o,r){return n.em.trigger(e,t,r)})},e.prototype.__listenUpdate=function(t,e){var n=this;t.on("change",function(t,o){return n.em.trigger(e,t,t.changedAttributes(),o)})},e.prototype.__destroy=function(){var t;
1this.cls.forEach(function(t){t.stopListening(),t.reset()}),null==(t=this.view)||t.remove(),this.view=void 0},e}(tJ),tZ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),tQ=function(t){function e(e,n,o){var r=t.call(this,n,o)||this;return r._module=e,r}return tZ(e,t),Object.defineProperty(e.prototype,"module",{get:function(){return this._module},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this._module.config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this._module.em},enumerable:!1,configurable:!0}),e}(tH);!function(t){t.add="device:add",t.addBefore="device:add:before",t.remove="device:remove",t.removeBefore="device:remove:before",t.select="device:select",t.selectBefore="device:select:before",t.update="device:update",t.all="device"}(pt||(pt={}));let t0=pt;!function(t){t.add="page:add",t.addBefore="page:add:before",t.remove="page:remove",t.removeBefore="page:remove:before",t.select="page:select",t.selectBefore="page:select:before",t.update="page:update",t.all="page"}(pe||(pe={}));let t1=pe;var t2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),t3=function(t){function e(e,n,o){return t.call(this,n,{module:e,modelConstructor:o})||this}return t2(e,t),e.prototype.add=function(e,n){var o,r=this,i=(0,b.isArray)(e)?e:(0,b.isUndefined)(e)?void 0:[e];return i=null!=(o=null==i?void 0:i.map(function(t){return t instanceof r.newModel?t:new r.newModel(r.module,t)}))?o:[void 0],t.prototype.add.call(this,(0,b.isArray)(e)?i:i[0],n)},e.prototype.preinitialize=function(t,e){this.newModel=e.modelConstructor,this.module=e.module},e}(tU);!function(t){t.dragEnter="canvas:dragenter",t.dragOver="canvas:dragover",t.dragEnd="canvas:dragend",t.dragData="canvas:dragdata",t.drop="canvas:drop",t.spot="canvas:spot",t.spotAdd="canvas:spot:add",t.spotUpdate="canvas:spot:update",t.spotRemove="canvas:spot:remove",t.coords="canvas:coords",t.zoom="canvas:zoom",t.pointer="canvas:pointer",t.refresh="canvas:refresh",t.update="canvas:update",t.updateTools="canvas:updateTools",t.toolsUpdate="canvas:tools:update",t.moveStart="canvas:move:start",t.move="canvas:move",t.moveEnd="canvas:move:end",t.frameLoad="canvas:frame:load",t.frameLoadHead="canvas:frame:load:head",t.frameLoadBody="canvas:frame:load:body",t.frameUnload="canvas:frame:unload"}(pn||(pn={}));let t5=pn;var t4=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),t9=function(){return(t9=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},t6=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},t7="__aw",t8="__ah",et=function(t,e){var n,o=t.get(e),r=null==(n=t.view)?void 0:n.el["width"===e?"offsetWidth":"offsetHeight"];return(0,b.isNumber)(o)?o:(0,b.isString)(o)&&o.endsWith("px")?parseFloat(o):r?r:0},ee=function(t){function e(e,n){var o=t.call(this,e,n)||this,r=o.em,i=o.attributes,a=i.styles,s=i.component,l=r.Components,c=l.getConfig(),u=r.Css.getAll(),p={};if(!tP(s)){var f=tC(s)?s:{components:s};f.type||(f.type="wrapper");var d=l.getType("wrapper").model;o.set("component",new d(f,{em:r,config:c,frame:o,idMap:p}))}if(a){if(!tC(a)){var h=a;(0,b.keys)(p).length&&(h=(0,b.isString)(h)?r.Parser.parseCss(h):h,r.Css.checkId(h,{idMap:p})),u.add(h),o.set("styles",u)}}else o.set("styles",u);return n.width||o.set(t7,1),n.height||o.set(t8,1),o.id||o.set("id",tA()),o}return t4(e,t),e.prototype.defaults=function(){return{x:0,y:0,changesCount:0,attributes:{},width:null,height:null,head:[],component:"",styles:"",refFrame:null,_undo:!0,_und
1oexc:["changesCount"]}},Object.defineProperty(e.prototype,"width",{get:function(){return et(this,"width")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"height",{get:function(){return et(this,"height")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"head",{get:function(){return this.get("head")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"refFrame",{get:function(){return this.get("refFrame")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"root",{get:function(){var t=this.refFrame;return(null==t?void 0:t.getComponent())||this.getComponent()},enumerable:!1,configurable:!0}),e.prototype.initRefs=function(){var t=this.refFrame;if((0,b.isString)(t)){var e=this.module.framesById[t];e&&this.set({refFrame:e},{silent:!0})}},e.prototype.getBoxRect=function(){var t=this.attributes;return{x:t.x,y:t.y,width:this.width,height:this.height}},e.prototype.onRemove=function(){this.refFrame||this.getComponent().remove({root:1})},e.prototype.changesUp=function(t){void 0===t&&(t={}),t.temporary||t.noCount||t.avoidStore||this.set("changesCount",this.get("changesCount")+1)},e.prototype.getComponent=function(){return this.get("component")},e.prototype.getStyles=function(){return this.get("styles")},e.prototype.disable=function(){this.trigger("disable")},e.prototype.remove=function(){null==(t=this.view)||t.remove(),this.view=void 0;var t,e=this.collection;return e&&e.remove(this)},e.prototype.getHead=function(){return t6([],this.head,!0)},e.prototype.setHead=function(t){return this.set("head",t6([],t,!0))},e.prototype.addHeadItem=function(t){this.head.push(t)},e.prototype.getHeadByAttr=function(t,e,n){return this.head.filter(function(o){return o.attributes&&o.attributes[t]==e&&(!n||n===o.tag)})[0]},e.prototype.removeHeadByAttr=function(t,e,n){var o=this.getHeadByAttr(t,e,n),r=this.head.indexOf(o);r>=0&&this.head.splice(r,1)},e.prototype.addLink=function(t){var e="link";this.getHeadByAttr("href",t,e)||this.addHeadItem({tag:e,attributes:{href:t,rel:"stylesheet"}})},e.prototype.removeLink=function(t){this.removeHeadByAttr("href",t,"link")},e.prototype.addScript=function(t){var e="script";this.getHeadByAttr("src",t,e)||this.addHeadItem({tag:e,attributes:{src:t}})},e.prototype.removeScript=function(t){this.removeHeadByAttr("src",t,"script")},e.prototype.getPage=function(){var t;return null==(t=this.collection)?void 0:t.page},e.prototype._emitUpdated=function(t){void 0===t&&(t={}),this.em.trigger("frame:updated",t9({frame:this},t))},e.prototype._emitUnload=function(){this._emitWithEditor(t5.frameUnload,{frame:this})},e.prototype._emitWithEditor=function(t,e){[this.em,this].forEach(function(n){return null==n?void 0:n.trigger(t,e)})},e.prototype.hasAutoHeight=function(){return"auto"===this.attributes.height||!!this.config.infiniteCanvas},e.prototype.toJSON=function(t){void 0===t&&(t={});var e=tQ.prototype.toJSON.call(this,t),n=(0,b.result)(this,"defaults");return t.fromUndo&&delete e.component,delete e.styles,delete e.changesCount,e[t7]&&delete e.width,e[t8]&&delete e.height,e.refFrame&&(e.refFrame=e.refFrame.i
1d,delete e.component),(0,b.forEach)(e,function(t,n){0===n.indexOf("_")&&delete e[n]}),(0,b.forEach)(n,function(t,n){e[n]===t&&delete e[n]}),(0,b.forEach)(["attributes","head"],function(t){(0,b.isEmpty)(e[t])&&delete e[t]}),e},e}(tQ),en=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),eo=function(t){function e(e,n){void 0===n&&(n=[]);var o=t.call(this,e,n,ee)||this;return o.loadedItems=0,o.itemsToLoad=0,(0,b.bindAll)(o,"itemLoaded"),o.on("add",o.onAdd),o.on("reset",o.onReset),o.on("remove",o.onRemove),o.forEach(function(t){return o.onAdd(t)}),o}return en(e,t),e.prototype.onAdd=function(t){this.module.framesById[t.id]=t},e.prototype.onReset=function(t,e){var n=this;((null==e?void 0:e.previousModels)||[]).map(function(t){return n.onRemove(t)})},e.prototype.onRemove=function(t){t.onRemove(),delete this.module.framesById[t.id]},e.prototype.initRefs=function(){this.forEach(function(t){return t.initRefs()})},e.prototype.itemLoaded=function(){this.loadedItems++,this.loadedItems>=this.itemsToLoad&&(this.trigger("loaded:all"),this.listenToLoadItems(!1))},e.prototype.listenToLoad=function(){this.loadedItems=0,this.itemsToLoad=this.length,this.listenToLoadItems(!0)},e.prototype.listenToLoadItems=function(t){var e=this;this.forEach(function(n){return n[t?"on":"off"]("loaded",e.itemLoaded)})},e}(t3),er=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ei=function(t){function e(e){var n=this,o=e.em,r=e.config,i=r.scripts,a=r.styles;return(n=t.call(this,e,{scripts:i,styles:a})||this).set("frames",new eo(e)),n.on("change:zoom",n.onZoomChange),n.on("change:x change:y",n.onCoordsChange),n.on("change:pointer change:pointerScreen",n.onPointerChange),n.listenTo(o,"change:device ".concat(t0.update),n.updateDevice),n.listenTo(o,t1.select,n._pageUpdated),n}return er(e,t),e.prototype.defaults=function(){return{frame:"",frames:[],rulers:!1,zoom:100,x:0,y:0,scripts:[],styles:[],pointer:tz,pointerScreen:tz}},Object.defineProperty(e.prototype,"frames",{get:function(){return this.get("frames")},enumerable:!1,configurable:!0}),e.prototype.init=function(){var t=this.em.Pages._initPage();this.set("frames",t.getFrames()),this.updateDevice({frame:t.getMainFrame()})},e.prototype._pageUpdated=function(t,e){var n=this.em;n.setSelected(),n.get("readyCanvas")&&n.stopDefault(),null==e||e.getFrames().map(function(t){t.disable(),t._emitUnload()}),this.set("frames",t.getFrames()),this.updateDevice({frame:t.getMainFrame()})},e.prototype.updateDevice=function(t){void 0===t&&(t={});var e=this.em,n=e.getDeviceModel(),o=t.frame||e.getCurrentFrameModel();if(o&&n){var r=n.attributes,i=r.width,a=r.height,s=r.minHeight;o.set({width:i,height:a,minHeight:s},{noUndo:1})}},e.prototype.onZoomChange=function(t,e,n){var o=this.em,r=this.module;1>this.get("zoom")&&this.set("zoom",1),o.trigger(r.events.zoom,{options:n})},e.prototype.onCoordsChange=function(){var t=this.em,e=this.module;t.trigger(e.events.coords)},e.prototype.onPointerChange=function(){var t=this.em,e=this.module;t.trigger(e.events.pointer)},e.prototype.getPointerCoords=function(t){void 0===t&&(t=u8.World);var e=this.attributes,n=e.pointer,o=e.pointerScreen;return t===u8.World?n:o},e}(tQ),ea=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t.Select="select",t.Hover="hover",t.Spacing="spacing",t.Target="target",t.Resize="resize"}(po||(po={}));var es=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ea(e,t),e.prototype.defaults=function(){return{id:"",type:""}},Object.defineProperty(e.prototype,"type",{get:function(){return this.get("type")||""}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){var t;return this.get("component")||(null==(t=this.get("componentView"))?void 0:t.model)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"componentView",{get:function(){var t;return this.get("componentView")||(null==(t=this.get("component"))?void 0:t.getView())},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"el",{get:function(){var t;return null==(t=this.componentView)?void 0:t.el},enumerable:!1,configurable:!0}),e.prototype.getBoxRect=function(t){var e=this.el,n=this.em.Canvas.getCanvasView(),o=this.attributes.boxRect;return o?(0,b.isFunction)(o)?o():o:e&&n?n.getElBoxRect(e,t):{x:0,y:0,width:0,height:0}},e.prototype.getStyle=function(t){void 0===t&&(t={});var e=t.boxRect||this.getBoxRect(t),n=e.width,o=e.height,r=e.x,i=e.y;return{width:"".concat(n,"px"),height:"".concat(o,"px"),top:"0",left:"0",position:"absolute",translate:"".concat(r,"px ").concat(i,"px")}},e.prototype.isType=function(t){return this.type===t},e}(tQ);!function(t){t.remove="component:remove",t.add="component:add",t.move="component:move"}(pr||(pr={})),function(t){t.add="component:add",t.remove="component:remove",t.removeBefore="component:remove:before",t.removed="component:removed",t.clone="component:clone",t.create="component:create",t.update="component:update",t.updateProperty="component:update:",t.updateInside="component:update-inside",t.styleUpdate="component:styleUpdate",t.styleUpdateProperty="component:styleUpdate:",t.select="component:select",t.selectBefore="component:select:before",t.selected="component:selected",t.deselected="component:deselected",t.toggled="component:toggled",t.hover="component:hover",t.hoverBefore="component:hover:before",t.hovered="component:hovered",t.unhovered="component:unhovered",t.paste="component:paste",t.syncStyle="component:sync-style",t.typeAdd="component:type:add",t.typeUpdate="component:type:update",t.dragStart="component:drag:start",t.drag="component:drag",t.dragEnd="component:drag:end",t.mount="component:mount",t.scriptMount="component:script:mount",t.scriptMountBefore="component:script:mount:before",t.scriptUnmount="component:script:unmount",t.render="component:render",t.input
1="component:input",t.content="component:content",t.resize="component:resize",t.resizeStart="component:resize:start",t.resizeMove="component:resize:move",t.resizeEnd="component:resize:end",t.resizeUpdate="component:resize:update",t.resizeInit="component:resize:init",t.symbolMainAdd="symbol:main:add",t.symbolMainUpdate="symbol:main:update",t.symbolMainUpdateDeep="symbol:main:update-deep",t.symbolMainRemove="symbol:main:remove",t.symbolMain="symbol:main",t.symbolInstanceAdd="symbol:instance:add",t.symbolInstanceRemove="symbol:instance:remove",t.symbolInstance="symbol:instance",t.symbol="symbol"}(pi||(pi={}));var el=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ec=function(t){function e(e,n){void 0===n&&(n=[]);var o=t.call(this,e,n,es)||this;o.on("add",o.onAdd),o.on("change",o.onChange),o.on("remove",o.onRemove);var r=o.em;o.refreshDbn=(0,b.debounce)(function(){return o.refresh()},0);var i="".concat(pi.resize," styleable:change ").concat(pi.input," ").concat(pi.update," frame:updated undo redo");return o.listenTo(r,i,function(){return o.refreshDbn()}),o}return el(e,t),Object.defineProperty(e.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"events",{get:function(){return this.module.events},enumerable:!1,configurable:!0}),e.prototype.refresh=function(){var t=this.em,e=this.events;t.trigger(e.spot)},e.prototype.onAdd=function(t){this.__trgEvent(this.events.spotAdd,{spot:t})},e.prototype.onChange=function(t){this.__trgEvent(this.events.spotUpdate,{spot:t})},e.prototype.onRemove=function(t){this.__trgEvent(this.events.spotRemove,{spot:t})},e.prototype.__trgEvent=function(t,e){this.module.em.trigger(t,e),this.refreshDbn()},e}(t3),eu=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ep=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return eu(e,t),Object.defineProperty(e.prototype,"pfx",{get:function(){return this.ppfx+this.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ppfx",{get:function(){return this.em.config.stylePrefix||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"module",{get:function(){var t,e;return null!=(e=null==(t=this.model)?void 0:t.module)?e:this.collection.module},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"config",{get:function(){return this.module.config},enumerable:!1,configurable:!0}),e.prototype.preinitialize=function(t){this.className=""},e}(tB),ef=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ed=function(t){function e(e,n){void 0===e&&(e={}),void 0===n&&(n=!1);var o=t.call(this,e)||this;return o.itemsView="",o.itemType="type",o.reuseView=!1,o.viewCollection=[],n&&o.listenTo(o.collection,"add",o.addTo),o}return ef(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){},e.prototype.add=function(t,e){var n,o=this.reuseView,r=this.viewCollection,i=e||null,a=t.get(this.itemType);n=t.view&&o?t.view:this.renderView(t,a),r.push(n);var s=n.render().el;i?i.appendChild(s):this.$el.append(s)},e.prototype.render=function(){var t=this,e=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(n){return t.add(n,e)}),this.$el.append(e),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(t){void 0===t&&(t={});var e=this.viewCollection;return this.onRemoveBefore(e,t),this.clearItems(),tB.prototype.remove.apply(this,t),this.onRemove(e,t),this},e.prototype.clearItems=function(){this.viewCollection},e}(ep);!function(t){t.mount="css:mount",t.mountBefore="css:mount:before"}(pa||(pa={}));var eh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
vendor: 5,413 bytes, line 1
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),eg=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.config=e.config||{};var o=n.model;return n.listenTo(o,"change",n.render),n.listenTo(o,"destroy remove",n.remove),n.listenTo(o.get("selectors"),"change",n.render),o.setView(n),n}return eh(e,t),Object.defineProperty(e.prototype,"frameView",{get:function(){return this.config.frameView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this.model.em},enumerable:!1,configurable:!0}),e.prototype.remove=function(){return t.prototype.remove.call(this),this.model.removeView(this),this},e.prototype.updateStyles=function(){this.render()},e.prototype.tagName=function(){return"style"},e.prototype.render=function(){var t=this.model,e=this.el,n=this.em,o=t.get("important"),r=t.toCSS({important:o}),i={rule:t,ruleView:this,css:r};return null==n||n.trigger(pa.mountBefore,i),e.innerHTML=i.css,null==n||n.trigger(pa.mount,i),this},e}(tB),ev=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ey=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ev(e,t),e.prototype._createElement=function(){return document.createTextNode("")},e.prototype.render=function(){var t=this.model,e=t.get("important");return this.el.textContent=t.getDeclaration({important:e}),this},e}(eg),em=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),eb=function(t,e){return"".concat(t).concat(e?"-".concat(parseFloat(e)):"")},ew=function(t){function e(e){var n=t.call(this,e)||this;(0,b.bindAll)(n,"sortRules");var o=e.config||{};n.atRules={},n.config=o,n.em=o.em,n.pfx=o.stylePrefix||"",n.className=n.pfx+"rules";var r=n.collection;return n.listenTo(r,"add",n.addTo),n.listenTo(r,"reset",n.render),n}return em(e,t),e.prototype.addTo=function(t){this.addToCollection(t)},e.prototype.addToCollection=function(t,e){if(this.renderStarted){var n,o,r={model:t,config:this.config};if("keyframes"===t.get("atRuleType")){var i=t.getAtRule(),a=this.atRules[i];if(!a){var s=document.createElement("style");a=document.createTextNode(""),s.appendChild(document.createTextNode("".concat(i,"{"))),s.appendChild(a),s.appendChild(document.createTextNode("}")),this.atRules[i]=a,n=s}o=new ey(r),a.appendData(o.render().el.textContent)}else n=(o=new eg(r)).render().el;var l=this.className,c=t.get("mediaText"),u=eb(l),p=u;if(c&&(p=eb(l,this.getMediaWidth(c))),n){var f=e||this.el,d=void 0;try{d=f.querySelector("#".concat(p))}catch(t){}d||(d=f.querySelector("#".concat(u))),null==d||d.appendChild(n)}return n}},e.prototype.getMediaWidth=function(t){return t&&t.replace("(".concat(this.em.getConfig().mediaCondition,": "),"").replace(")","")},e.prototype.sortRules=function(t,e){var n=-1!==(this.em.getConfig().mediaCondition||"").indexOf("min-width");return n?(n?t:e)-(n?e:t):0},e.prototype.render=function(){var t=this;this.renderStarted=!0,this.atRules={};var e=this.em,n=this.$el,o=this.collection,r=this.className,i=document.createDocumentFragment();n.empty();var a=e.Devices.getAll().pluck("priority").sort(this.sortRules);return a.every(function(t){return t})&&a.unshift(0),a.forEach(function(t){return i.appendChild(P("div",{id:eb(r,t)}))}),o.each(function(e){return t.addToCollection(e,i)}),n.append(i),n.attr("class",r),this},e}(tB);!function(t){t.variable="data-variable",t.condition="data-condition",t.conditionTrue="data-condition-true-content",t.conditionFalse="data-condition-false-content",t.collection="data-collection",t.collectionItem="data-collection-item"}(ps||(ps={})),(pl||(pl={})).rootData="__rootData",function(t){t.string="string",t.number="number",t.boolean="boolean",t.date="date",t.json="json",t.relation="relation"}(pc||(pc={})),function(t){t.add="data:add",t.addBefore="data:add:before",t.remove="data:remove",t.removeBefore="data:remove:before",t.update="data:update",t.path="data:path",t.pathSource="data:pathSource:",t.providerLoad="data:provider:load",t.providerLoadBefore="data:provider:load:before",t.providerLoadError="data:provider:load:error",t.providerLoadAll="data:provider:loadAll",t.providerLoadAllBefore="data:provider:loadAll:before",t.all="data"}(pu||(pu={}));var e_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),eC=function(){return(eC=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ex=ps.variable,eO=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.em=n.em,o.collectionsStateMap=n.collectionsStateMap,o}return e_(e,t),e.prototype.defaults=function(){return{type:ex,defaultValue:"",path:"",collectionId:void 0,variableType:void 0,asPlainText:void 0}},Object.defineProperty(e.prototype,"path",{get:function(){var t;return null!=(t=this.get("path"))?t:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"defaultValue",{get:function(){var t;return null!=(t=this.get("defaultValue"))?t:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"collectionId",{get:function(){return this.get("collectionId")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"variableType",{get:function(){return this.get("variableType")},enumerable:!1,configurable:!0}),e.prototype.resolvesFromCollection=function(){return!!this.collectionId},e.prototype.updateCollectionsStateMap=function(t){this.collectionsStateMap=t,this.trigger("change")},e.prototype.getResolverPath=function(){var t;if(this.resolvesFromCollection()){var e=this.resolveCollectionVariable();return!!nn(e)&&(null!=(t=e.path)?t:"")}return this.path},e.prototype.toJSON=function(e){var n=this.defaults(),o=Object.fromEntries(Object.entries(t.prototype.toJSON.call(this,e)).filter(function(t){var e=t[0];return t[1]!==n[e]}));return eC(eC({},o),{type:ex})},e.prototype.getDataValue=function(){var t={em:this.em,collectionsStateMap:this.collectionsStateMap};return e.resolveDataResolver({path:this.path,defaultValue:this.defaultValue,collectionId:this.collectionId,variableType:this.variableType},t)},e.resolveDataSourceVariable=function(t,e){var n,o;return e.em.DataSources.getValue(null!=(n=t.path)?n:"",null!=(o=t.defaultValue)?o:"")},e.resolveDataResolver=function(t,n){var o,r,i,a;if(t.collectionId){var s=e.resolveCollectionVariable(t,n);return nn(s)?e.resolveDataSourceVariable({path:null!=(o=s.path)?o:"",defaultValue:null!=(r=t.defaultValue)?r:""},{em:n.em}):s}return e.resolveDataSourceVariable({path:null!=(i=t.path)?i:"",defaultValue:null!=(a=t.defaultValue)?a:""},{em:n.em})},e.prototype.resolveCollectionVariable=function(){var t=this.em,n=this.collectionsStateMap;return e.resolveCollectionVariable(this.attributes,{em:t,collectionsStateMap:n})},e.resolveCollectionVariable=function(t,e){var n=t.collectionId,o=t.variableType,r=t.path,i=t.defaultValue,a=void 0===i?"":i,s=e.collectionsStateMap,l=e.em,c=null==s?void 0:s[void 0===n?"":n];return c&&o?l.DataSources.getValue("".concat(o).concat(r?".".concat(r):""),a,{context:c}):a},e}(tH),eS=function(){function t(t){var e=this;this.listeners=[],this.model=new tH,this.onChange=function(){var t=e.resolver.getDataValue();e.onUpdate(t)},this.em=t.em,this.resolver=t.resolver,this.onUpdate=t.onUpdate,this.listenToResolver()}return t.prototype.createListener=function(t,e,n){return void 0===n&&(n=this.onChange),{obj:t,event:e,callback:n}},t.prototype.listenToResolver=function(){var t=this.resolver,e=this.model;this.removeListeners();var n=[];switch(t.attributes.type){case ex:n=this.listenToDataVariable(t);break;case eF:n=this.listenToConditionalVariable(t)}n.forEach(function(t){return e.listenTo(t.obj,t.event,t.callback)}),this.listeners=n},t.prototype.listenToConditionalVariable=function(t){return[{obj:t,event:eH,callback:this.onChange}]},t.prototype.listenToDataVariable=function(t){var e=this,n=this.em,o=[],r=function(){e.listenToResolver(),e.onChange()};o.push(this.createListener(t,"change",r));var i=t.getResolverPath();if(!i)return o;var a=K(i||"").join("."),s=n.DataSources.fromPath(i),l=s[0],c=s[1];return l&&o.push(this.createListener(l.records,"add remove reset",r)),c&&o.push(this.createListener(c,"change")),o.push(this.createListener(n.DataSources.all,"add remove reset",r),this.createListener(n,"".concat(pu.path,":").concat(a)),this.createListener(n,pu.path,function(t){var n=t.path;n!==i&&n.startsWith(i)&&e.onChange()})),o},t.prototype.removeListeners=function(){var t=this;
1this.listeners.forEach(function(e){return t.model.stopListening(e.obj,e.event,e.callback)}),this.listeners=[]},t.prototype.destroy=function(){this.removeListeners()},t}(),eT=function(){function t(t,e,n){this.operator=t,this.statements=e,this.opts=n}return t.prototype.evaluate=function(){var t=this,e=this.statements.map(function(e){return new eR({condition:e},t.opts).evaluate()});return this.operator.evaluate(e)},t}(),eP=function(){function t(t,e){this.operationString=t,this.em=e.em}return t.prototype.getOperations=function(){var t;return Object.keys(t=this.operationsEnum).filter(function(t){return isNaN(Number(t))}).map(function(e){return t[e]})},t}(),eE=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t.equals="equals",t.isTruthy="isTruthy",t.isFalsy="isFalsy",t.isDefined="isDefined",t.isNull="isNull",t.isUndefined="isUndefined",t.isArray="isArray",t.isObject="isObject",t.isString="isString",t.isNumber="isNumber",t.isBoolean="isBoolean",t.isDefaultValue="isDefaultValue"}(pp||(pp={}));var ek=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operationsEnum=pp,e}return eE(e,t),e.prototype.evaluate=function(t,e){var n;switch(this.operationString){case"equals":return t===e;case"isTruthy":return!!t;case"isFalsy":return!t;case"isDefined":return null!=t;case"isNull":return null===t;case"isUndefined":return void 0===t;case"isArray":return Array.isArray(t);case"isObject":return"object"==typeof t&&null!==t;case"isString":return"string"==typeof t;case"isNumber":return"number"==typeof t;case"isBoolean":return"boolean"==typeof t;case"isDefaultValue":return t instanceof eO&&t.get("defaultValue")===e;default:return null==(n=this.em)||n.logWarning("Unsupported generic operation: ".concat(this.operationString)),!1}},e}(eP),ej=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t.and="and",t.or="or",t.xor="xor"}(pf||(pf={}));var eA=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operationsEnum=pf,e}return ej(e,t),e.prototype.evaluate=function(t){if(!(null==t?void 0:t.length))return!1;switch(this.operationString){case pf.and:return t.every(Boolean);case pf.or:return t.some(Boolean);case pf.xor:return 1===t.filter(Boolean).length;default:return this.em.logWarning("Unsupported boolean operation: ".concat(this.operationString)),!1}},e}(eP),eM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t.greaterThan=">",t.lessThan="<",t.greaterThanOrEqual=">=",t.lessThanOrEqual="<=",t.equals="=",t.notEquals="!="}(pd||(pd={}));var eD=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operationsEnum=pd,e}return eM(e,t),e.prototype.evaluate=function(t,e){if("number"!=typeof t)return!1;switch(this.operationString){case pd.greaterThan:return t>e;case pd.lessThan:return t<e;case pd.greaterThanOrEqual:return t>=e;case pd.lessThanOrEqual:return t<=e;case pd.equals:return t===e;case pd.notEquals:return t!==e;default:return this.em.logWarning("Unsupported number operation: ".concat(this.operationString)),!1}},e}(eP),eL=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
vendor: 6,647 bytes, line 1
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}();!function(t){t.contains="contains",t.startsWith="startsWith",t.endsWith="endsWith",t.matchesRegex="matchesRegex",t.equalsIgnoreCase="equalsIgnoreCase",t.trimEquals="trimEquals"}(ph||(ph={}));var eI=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.operationsEnum=ph,e}return eL(e,t),e.prototype.evaluate=function(t,e){if("string"!=typeof t)return!1;switch(this.operationString){case ph.contains:return t.includes(e);case ph.startsWith:return t.startsWith(e);case ph.endsWith:return t.endsWith(e);case ph.matchesRegex:return e||this.em.logWarning("Regex pattern must be provided."),new RegExp(null!=e?e:"").test(t);case ph.equalsIgnoreCase:return t.toLowerCase()===e.toLowerCase();case ph.trimEquals:return t.trim()===e.trim();default:return this.em.logWarning("Unsupported string operation: ".concat(this.operationString)),!1}},e}(eP),eN=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),eR=function(t){function e(e,n){var o,r=t.call(this,e)||this;return r.collectionsStateMap={},r.em=n.em,r.collectionsStateMap=null!=(o=n.collectionsStateMap)?o:{},r}return eN(e,t),e.prototype.evaluate=function(){var t=this.get("condition");if(!t||(0,b.isBoolean)(t))return!!t;var e=this.getOperator();return!!e&&e.evaluate(this.getResolvedLeftValue(),this.getResolvedRightValue())},e.prototype.getDependentDataVariables=function(){var t=this.get("condition");return t?this.extractDataVariables(t):[]},e.prototype.getOperations=function(){var t=this.getOperator();return!t||t instanceof eT?[]:t.getOperations()},e.prototype.updateCollectionStateMap=function(t){this.collectionsStateMap=t},e.prototype.getOperator=function(){var t,e={em:this.em,collectionsStateMap:this.collectionsStateMap},n=this.get("condition");if(!(!n||(0,b.isBoolean)(n))){if(this.isLogicGroup(n)){var o=n.logicalOperator,r=n.statements,i=new eA(o,e);t=new eT(i,r,e)}if(this.isExpression(n)){var a=n.left,i=n.operator,s=no(a,e);t=this.resolveOperator(s,i)}return t}},e.prototype.resolveOperator=function(t,e){var n=this.em;return this.isOperatorInEnum(e,pp)?new ek(e,{em:n}):"number"==typeof t?new eD(e,{em:n}):"string"==typeof t?new eI(e,{em:n}):void 0},e.prototype.extractDataVariables=function(t){var e=this,n=[];return this.isExpression(t)?(nn(t.left)&&n.push(t.left),nn(t.right)&&n.push(t.right)):this.isLogicGroup(t)&&t.statements.forEach(function(t){return n.push.apply(n,e.extractDataVariables(t))}),n},e.prototype.isLogicGroup=function(t){return t&&void 0!==t.logicalOperator&&Array.isArray(t.statements)},e.prototype.isExpression=function(t){return t&&void 0!==t.left&&"string"==typeof t.operator},e.prototype.isOperatorInEnum=function(t,e){return Object.values(e).includes(t)},e.prototype.resolveExpressionSide=function(t){var e=this.get("condition"),n=this.em,o=this.collectionsStateMap;return e&&"boolean"!=typeof e?e&&"object"==typeof e&&t in e?no(e[t],{em:n,collectionsStateMap:o}):void 0:e},e.prototype.getResolvedLeftValue=function(){return this.resolveExpressionSide("left")},e.prototype.getResolvedRightValue=function(){return this.resolveExpressionSide("right")},e.prototype.toJSON=function(t){var e=this.get("condition");return"object"==typeof e?JSON.parse(JSON.stringify(e)):e},e}(tH),eV=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),eF="data-condition",eH="data-condition-output-changed",eU=function(t){function e(e,n){var o,r=t.call(this,e,n)||this;r.collectionsStateMap={},r.resolverListeners=[],r._previousEvaluationResult=null,r.em=n.em,r.collectionsStateMap=null!=(o=n.collectionsStateMap)?o:{};var i=e.condition,a=new eR({condition:void 0===i?{}:i},{em:r.em});return r._conditionEvaluator=a,r.listenToDataVariables(),r.listenToPropsChange(),r}return eV(e,t),e.prototype.defaults=function(){return{type:eF,condition:{left:"",operator:ph.equalsIgnoreCase,right:""},ifTrue:{},ifFalse:{}}},e.prototype.getCondition=function(){return this._conditionEvaluator.get("condition")},e.prototype.getIfTrue=function(){return this.get("ifTrue")},e.prototype.getIfFalse=function(){return this.get("ifFalse")},e.prototype.getOperations=function(){return this._conditionEvaluator.getOperations()},e.prototype.setCondition=function(t){this.set("condition",t),this._conditionEvaluator.set("condition",t),this.trigger(eH,this.getDataValue())},e.prototype.setIfTrue=function(t){this.set("ifTrue",t)},e.prototype.setIfFalse=function(t){this.set("ifFalse",t)},e.prototype.isTrue=function(){return this._conditionEvaluator.evaluate()},e.prototype.getDataValue=function(t){void 0===t&&(t=!1);var e={em:this.em,collectionsStateMap:this.collectionsStateMap},n=this.getIfTrue(),o=this.getIfFalse(),r=this.isTrue();return t?r?n:o:r?no(n,e):no(o,e)},e.prototype.resolvesFromCollection=function(){return!1},e.prototype.updateCollectionsStateMap=function(t){this.collectionsStateMap=t,this._conditionEvaluator.updateCollectionStateMap(t),this.listenToDataVariables(),this.emitConditionEvaluationChange()},e.prototype.listenToPropsChange=function(){var t=this;this.on("change:condition",this.handleConditionChange.bind(this)),this.on("change:condition change:ifTrue change:ifFalse",function(){t.listenToDataVariables()})},e.prototype.handleConditionChange=function(){this.setCondition(this.get("condition"))},e.prototype.listenToDataVariables=function(){this.cleanupListeners(),this.setupConditionDataVariableListeners(),this.setupOutputDataVariableListeners()},e.prototype.setupConditionDataVariableListeners=function(){var t=this;
1this._conditionEvaluator.getDependentDataVariables().forEach(function(e){t.addListener(e,function(){t.emitConditionEvaluationChange()})})},e.prototype.setupOutputDataVariableListeners=function(){var t=this.isTrue();this.setupOutputVariableListener(this.getIfTrue(),t),this.setupOutputVariableListener(this.getIfFalse(),!t)},e.prototype.setupOutputVariableListener=function(t,e){var n=this;nn(t)&&this.addListener(t,function(){e&&n.trigger(eH,t)})},e.prototype.addListener=function(t,e){var n=new eS({em:this.em,resolver:new eO(t,{em:this.em,collectionsStateMap:this.collectionsStateMap}),onUpdate:e});this.resolverListeners.push(n)},e.prototype.emitConditionEvaluationChange=function(){var t=this.isTrue();this._previousEvaluationResult!==t&&(this._previousEvaluationResult=t,this.trigger("data-condition-evaluation-changed",t),this.emitOutputValueChange())},e.prototype.emitOutputValueChange=function(){var t=this.getDataValue();this.trigger(eH,t)},e.prototype.cleanupListeners=function(){this.resolverListeners.forEach(function(t){return t.destroy()}),this.resolverListeners=[]},e.prototype.toJSON=function(){var t=this.getIfTrue(),e=this.getIfFalse();return{type:eF,condition:this._conditionEvaluator.toJSON(),ifTrue:t,ifFalse:e}},e}(tH),eB="dataResolver",ez=function(){return(ez=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},eW=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},e$=function(t){return(0,b.isArray)(t.get(od))},eq=function(t){return!!t.get(oh)},eG=function(t){return!!(e$(t)||eq(t))},eK=function(t){var e=t.parent();return eG(t)&&(!e||!eG(e))},eY=function(t){t.__symbReady||(t.on("change",t.__upSymbProps),t.__symbReady=!0)},eJ=function(t){var e=t.get(oh);if(e&&(0,b.isString)(e)){var n=t.__getAllById()[e];n?(e=n,t.set(oh,n)):e=0}return e||void 0},eX=function(t){var e=null==t?void 0:t.get(od);return e&&(0,b.isArray)(e)&&(e.forEach(function(n,o){n&&(0,b.isString)(n)&&(e[o]=t.__getAllById()[n])}),e=e.filter(function(t){return t&&!(0,b.isString)(t)})),e||void 0},eZ=function(t,e){void 0===e&&(e="");var n=null==t?void 0:t.get(og),o=e.split(":")[0],r=e!==o?[e,o]:[e];return!0===n||(0,b.isArray)(n)&&r.some(function(t){return n.indexOf(t)>=0})},eQ=function(t,e){void 0===e&&(e={});var n=[],o=e.changed;if(e.fromInstance||e.noPropagate||e.fromUndo||o&&eZ(t,o))return n;var r=eX(t)||[],i=eJ(t);return(i?eW([i],eX(i)||[],!0):r).filter(function(e){return e!==t}).filter(function(t){return!(o&&eZ(t,o))})},e0=function(t,e){for(var n=t,o=t.parent(e);o&&eG(o);)n=o,o=o.parent(e);return n},e1=function(t,e){void 0===e&&(e={});var n=eJ(t),o=n&&eX(n);!e.skipRefs&&o&&n.set(od,o.filter(function(e){return e!==t})),t.set(oh,0),t.components().forEach(function(t){return e1(t,e)})},e2=function(t,e,n,o){void 0===o&&(o={});var r=eJ(t),i=eX(t);(r||i)&&t.em.log(e,{model:t,toUp:n,context:"symbols",opts:o})},e3=function(t,e){void 0===e&&(e={});var n=t.changedAttributes();if(n){var o=t.dataResolverWatchers.getProps(n);if(e5(o),!tx(o)){var r=eQ(t,e);o=e4(o,t),e2(t,"props",r,{opts:e,changed:o}),r.forEach(function(n){var r=e4(o,n);n.set(r,ez({fromInstance:t},e))})}}},e5=function(t){var e,n;["status","open",od,oh,og].forEach(function(e){return delete t[e]}),null==(e=t.attributes)||delete e.id,tx(null!=(n=t.attributes)?n:{})&&delete t.attributes},e4=function(t,e){var n=ez({},t);return(0,b.keys)(t).forEach(function(o){e6(t,o,e)||delete n[o]}),n},e9=function(t,e){var n,o;switch(e){case"attributes":case"style":return!!(o=t[e])&&Object.values(o).some(function(t){return!!(null==t?void 0:t.collectionId)});default:return!!(null==(n=t[e])?void 0:n.collectionId)}},e6=function(t,e,n){var o=e9(t,e);return!eZ(n,e)||o},e7=function(t,e){void 0===e&&(e={});var n=eQ(t,e);e2(t,"classes",n,{opts:e}),n.forEach(function(e){e.set("classes",t.get("classes"),{fromInstance:t})}),t.__changesUp(e)},e8=function(t,e,n,o){var r=o||n||{},i={fromInstance:r.fromInstance,fromUndo:r.fromUndo},a=e.opt.temporary;if(o)if(o.add){var s=[],l=!!eX(t),c=eQ(t,ez(ez({},i),{changed:"components:add"}));if(c.length){var u=eJ(e);(s=eW([],s=(u?eX(u):eX(e))||[],!0)).push(u||e)}a||e2(t,"add",c,{opts:o,addedInstances:s.map(function(t){return t.cid}),added:e.cid}
1),c.forEach(function(n){var r=e0(n),i=s.filter(function(t){var e=e0(t,{prev:1});return r&&e&&e===r})[0]||e.clone({symbol:!0,symbolInv:l});n.append(i,ez({fromInstance:t},o))})}else{var p=eJ(e);if(p&&!o.temporary&&p.set(od,eX(p).filter(function(t){return t!==e})),!eK(e)&&!o.skipRefsUp){var f="components:remove",d=o.index,h=e.parent(),g=ez({fromInstance:e},o),v=eK(e),y=function(t){var e=t.parent();e&&!eZ(e,f)&&t.remove(g)},c=eZ(h,f)?[]:eQ(e,i);v&&(c=h&&eQ(h,ez(ez({},i),{changed:f})),y=function(t){var e=t.components().at(d);e&&e.remove(ez({fromInstance:h},g))}),a||e2(t,"remove",c,{opts:o,removed:e.cid,isSymbNested:v}),c.forEach(y)}}else{var c=eQ(t,ez(ez({},i),{changed:"components:reset"})),m=e.models,b=new Set;e2(t,"reset",c,{components:m}),c.forEach(function(e){var o=e.components(),r=m.map(function(e,n){return t.get(eB)?e.clone({symbol:eG(e)}):!eG(e)||b.has(e)?(b.add(e),e.clone({symbol:!0})):o.at(n)});o.reset(r,ez({fromInstance:t},n))})}t.__changesUp(r)},nt=function(t){return"object"==typeof t&&null!==t};function ne(t){return nt(t)&&(t.type===ex||t.type===eF)}function nn(t){return nt(t)&&t.type===ex}function no(t,e){return ne(t)?(nn(t)&&eO.resolveDataResolver(t,e),ni(t,e)):t}function nr(t,e){var n,o,r=t.type;switch(r){case ex:o=new eO(t,e);break;case eF:o=new eU(t,e);break;default:null==(n=e.em)||n.logWarning("Unsupported resolver type: ".concat(r));return}return o}function ni(t,e){var n=nr(t,e);return null==n?void 0:n.getDataValue()}!function(t){t[t.element=1]="element",t[t.text=3]="text",t[t.comment=8]="comment",t[t.document=9]="document",t[t.fragment=11]="fragment"}(pg||(pg={})),(pv||(pv={})).html="http://www.w3.org/1999/xhtml",function(t){t.html="parse:html",t.htmlRoot="parse:html:root",t.htmlBefore="parse:html:before",t.css="parse:css",t.cssBefore="parse:css:before",t.all="parse"}(py||(py={}));var na="text/html";let ns=function(t,e){void 0===e&&(e={});var n,o=new DOMParser,r=e.htmlType||na,i=r===na,a=o.parseFromString(i?t:"<div>".concat(t,"</div>"),r);if(i){if(e.asDocument)return a;var s=a.head,l=a.body,c=s.querySelectorAll("script");(0,b.each)(c,function(t){return l.appendChild(t)});var u=[];(0,b.each)(s.children,function(t){return u.push(t)}),(0,b.each)(u,function(t,e){return l.insertBefore(t,l.children[e])}),n=l}else n=a.firstChild;return n};var nl=function(t){var e=t.tagName||"";return e&&(!t.namespaceURI||t.namespaceURI===pv.html)?e.toUpperCase():e},nc=function(t){var e,n;return t.nodeType===pg.text||t.nodeType===pg.comment?null!=(e=t.textContent)?e:"":!t.textContent||(null==(n=t.childNodes)?void 0:n.length)?(t.childNodes||[]).map(nc).join(""):t.textContent},nu=function(t){var e,n=(null==(e=t.attributes)?void 0:e.class)||"",o=n.split(/\s+/).filter(Boolean);return{value:n,length:o.length,contains:function(t){return o.includes(t)},item:function(t){return o[t]||null},toString:function(){return n}}},np=function(){function t(t,e){this.node=t,this.parent=e}return Object.defineProperty(t.prototype,"nodeType",{get:function(){return this.node.nodeType},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"tagName",{get:function(){return nl(this.node)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nodeName",{get:function(){return this.tagName},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"namespaceURI",{get:function(){return this.node.namespaceURI},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"parentNode",{get:function(){return this.parent},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"childNodes",{get:function(){var t=this;return(this.node.childNodes||[]).map(function(e){return new t.constructor(e,t)})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"children",{get:function(){return this.childNodes.filter(function(t){return 1===t.nodeType})},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"textContent",{get:function(){return nc(this.node)},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"nodeValue",{get:function(){return this.nodeType===pg.text||this.nodeType===pg.comment?this.textContent:null}
1,enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"className",{get:function(){return this.getAttribute("class")||""},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"classList",{get:function(){return nu(this.node)},enumerable:!1,configurable:!0}),t.prototype.getAttribute=function(t){var e;return null==(e=this.node.attributes)?void 0:e[t]},t.prototype.hasAttribute=function(t){return Object.prototype.hasOwnProperty.call(this.node.attributes||{},t)},t}(),nf=function(t){return t?t(np):np},nd=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nh=function(t){return t.childNodes||[]},ng=function(t){return"".concat(t.tagName||"").toLowerCase()},nv=function(t){return t.__domNode||t},ny=function(t){var e;return Array.from((null==(e=t.content)?void 0:e.childNodes)||t.childNodes||[])},nm=function(t,e){return void 0===e&&(e=[]),{nodeType:pg.element,tagName:t,namespaceURI:pv.html,childNodes:e}},nb=function(t,e){var n=nm(e);return t.childNodes=nd(nd([],nh(t),!0),[n],!1),n},nw=function(t,e){return nh(t).find(function(t){return ng(t)===e})},n_=function(t){var e,n;return t.nodeType===pg.text||t.nodeType===pg.comment?null!=(e=t.textContent)?e:"":!t.textContent||(null==(n=t.childNodes)?void 0:n.length)?nh(t).map(function(t){return n_(t)}).join(""):t.textContent},nC=function(t,e){var n=[],o=function(t){if(null==(r=t.childNodes)?void 0:r.length){var r,i=[];t.childNodes.forEach(function(t){if(ng(t)===e)return void n.push(t);o(t),i.push(t)}),t.childNodes=i}};return o(t),n},nx=function(t,e){var n=t.attributes||{},o={};(0,b.each)(n,function(t,n){var r="".concat(t),i=!e.allowUnsafeAttr&&n.startsWith("on"),a=!e.allowUnsafeAttrValue&&r.startsWith("javascript:");i||a||(o[n]=r)}),Object.keys(o).length?t.attributes=o:delete t.attributes,nh(t).forEach(function(t){return nx(t,e)})},nO=function(t){return{nodeType:pg.document,__domNode:t,__doctype:F(t.doctype),childNodes:t.documentElement?[nS(t.documentElement)]:[]}},nS=function(t){var e,n=t.nodeType;if(n===pg.document)return nO(t);var o={nodeType:n,tagName:t.tagName||"",namespaceURI:t.namespaceURI||void 0,__domNode:t};if((n===pg.text||n===pg.comment)&&(o.textContent=null!=(e=t.textContent)?e:""),n===pg.element){var r=t.attributes||[];r.length&&(o.attributes={});for(var i=[],a=0;a<r.length;a++){var s=r[a];o.attributes[s.nodeName]=s.nodeValue||"",""===s.nodeValue&&!0===t[s.nodeName]&&i.push(s.nodeName)}i.length&&(o.__boolAttributes=i);var l=ny(t);l.length&&(o.childNodes=l.map(function(t){return nS(t)})),o.__selfClosing="/>"==="".concat(t.outerHTML||"").slice(-2)}return o},nT=function(t){var e=t.flatMap(function(t){return t.nodeType===pg.fragment?nh(t):[t]}),n=e.find(function(t){return t.nodeType===pg.document});if(n)return n;var o=e.find(function(t){return"html"===ng(t)}),r={nodeType:pg.document,childNodes:[]};if(o){var i=e.filter(function(t){return t!==o});if(i.length){var a=nw(o,"body")||nb(o,"body");a.childNodes=nd(nd([],nh(a),!0),i,!0)}return r.childNodes=[o],r}var s=nd([],e,!0),l=s.findIndex(function(t){return"head"===ng(t)}),c=s.findIndex(function(t){return"body"===ng(t)}),u=l>=0?s.splice(l,1)[0]:void 0,p=c>=0?s.splice(c>l&&l>=0?c-1:c,1)[0]:void 0,f=nm("html"),d=[];u&&d.push(u);var h=p||nm("body");return h.childNodes=nd(nd([],nh(h),!0),s,!0),d.push(h),f.childNodes=d,r.childNodes=[f],r},nP=function(){return(nP=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},nE=function(){function t(t,e){void 0===e&&(e={}),this.em=t,this.config=e,this.compTypes=[],this.modelAttrStart="data-gjs-"}return t.prototype.parseAttributeValue=function(t){if("string"!=typeof t)return t;var e=(null==t?void 0:t.length)||0,n=null==t?void 0:t.substring(0,1),o=null==t?void 0:t.substring(e-1),r="true"===t||"false"!==t&&t;try{r="{"==n&&"}"==o||"["==n&&"]"==o?JSON.parse(r):r}catch(t){}return r},t.prototype.getPropAttribute=function(t,e){return{name:t.replace(this.modelAttrStart,""),value:this.parseAttributeValue(e)}},t.prototype.shouldConvertAttributeValue=function(t,e,n,o){if(o){if(!0===o)return!0;else if((0,b.isArray)(o))return o.includes(t);
vendor: 4,460 bytes, line 1
1else if((0,b.isFunction)(o))return!!o({attribute:t,value:e,node:n})}return!1},t.prototype.splitPropsFromAttr=function(t){var e=this;void 0===t&&(t={});var n={},o={};return(0,b.each)(t,function(t,r){if(0===r.indexOf(e.modelAttrStart)){var i=e.getPropAttribute(r,t);n[i.name]=i.value}else o[r]=t}),{props:n,attrs:o}},t.prototype.parseStyle=function(t){for(var e={};t.indexOf("/*")>=0;){var n=t.indexOf("/*"),o=t.indexOf("*/"),r=o>-1?o+2:void 0;t=t.replace(t.slice(n,r),"")}for(var i=t.split(";"),a=0,s=i.length;a<s;a++){var l=i[a].trim();if(l){var c=l.split(":"),u=c[0].trim(),p=c.slice(1).join(":").trim();e[u]?((0,b.isArray)(e[u])||(e[u]=[e[u]]),e[u].push(p)):e[u]=p}}return e},t.prototype.parseClass=function(t){for(var e=[],n=t.split(" "),o=0,r=n.length;o<r;o++){var i=n[o].trim();i&&e.push(i)}return e},t.prototype.parseNodeAttr=function(t,e,n){var o,r,i=this;void 0===n&&(n=this.config.optionsHtml||{});var a=e||{},s=t.attributes||{},l=!!n.convertDataGjsAttributesHyphens,c=n.convertAttributeValues,u=l&&!!a.type&&(0,b.result)(null==(r=null==(o=this.em)?void 0:o.Components.getType(a.type))?void 0:r.model.prototype,"defaults")||{},p=nv(t);return(0,b.each)(s,function(e,n){var o,r,s=e;if("style"==n)a.style=i.parseStyle("".concat(s));else if("class"==n)a.classes=i.parseClass("".concat(s));else if("contenteditable"==n)return;else if(0===n.indexOf(i.modelAttrStart)){var f=i.getPropAttribute(n,"".concat(s)),d=f.name;if(l&&!(d in u)){var h=d.replace(/-([a-zA-Z0-9])/g,function(t,e){return e.toUpperCase()});d=h in u?h:d}a[d]=f.value}else""===s&&((null==(o=t.__domNode)?void 0:o[n])===!0||(null==(r=t.__boolAttributes)?void 0:r.includes(n)))&&(s=!0),i.shouldConvertAttributeValue(n,s,p,c)&&(s=i.parseAttributeValue(s)),a.attributes||(a.attributes={}),a.attributes[n]=s}),a},t.prototype.detectNode=function(t,e){void 0===e&&(e={});var n,o=this.compTypes,r={};if(o){var i=null==(n=t.attributes)?void 0:n["".concat(this.modelAttrStart,"type")];if(i)r={type:i};else for(var a=0;a<o.length;a++){var s=o[a],l=s.model,c=l.isParsedNode?l.isParsedNode(t,e):void 0;if(l.isParsedNode||(c=e.__parsedMode?l.isComponent(this.__getSyntheticNode(t,e),e):l.isComponent(nv(t),e)),c){"object"!=typeof c&&(c={type:s.id}),r=c;break}}}return r},t.prototype.parseNode=function(t,e){void 0===e&&(e={});var n=nh(t),o=n.length,r=this.detectNode(t,e);if(!r.tagName&&""!==r.tagName){var i=t.tagName||"",a=t.namespaceURI||"";r.tagName=i&&a===pv.html?i.toLowerCase():i}if(r=this.parseNodeAttr(t,r,e),!o&&t.__selfClosing&&(r.void=!0),o&&!r.components&&!e.skipChildren){var s=n[0];1===o&&s.nodeType===pg.text?(r.type||(r.type="text"),r.components={type:"textnode",content:s.textContent}):r.components=this.parseNodes(t,nP(nP({},e),{inSvg:e.inSvg||"svg"===r.type}))}var l=r.components;if(!r.type&&(null==l?void 0:l.length)){for(var c=this.config,u=c.textTypes,p=void 0===u?[]:u,f=c.textTags,d=void 0===f?[]:f,h=!0,g=!1,v=0;v<l.length;v++){var y=l[v],m=y.type;if(!p.includes(m)&&!d.includes(y.tagName)){h=!1;break}"textnode"===m&&(g=!0)}h&&g&&(r.type="text")}return r},t.prototype.parseNodes=function(t,e){void 0===e&&(e={});for(var n=[],o=nh(t),r=o.length,i=0;i<r;i++){var a=o[i],s=n[n.length-1],l=this.parseNode(a,e);if("textnode"===l.type){if((null==s?void 0:s.type)==="textnode"){s.content+=l.content;continue}if(!e.keepEmptyTextNodes){var c=a.textContent||"",u=0===i||i===r-1,p=c.includes("\n");if(" "!=c&&!c.trim()&&(u||p))continue}}!l.tagName&&(0,b.isUndefined)(l.content)||n.push(l)}return n},t.prototype.parse=function(t,e,n){void 0===n&&(n={});var o,r=this.config,i=this.em,a=(null==i?void 0:i.get("Config"))||{},s=null==i?void 0:i.Parser,l={html:[]},c=this.__getParserCodeId(n),u=nP(nP(nP({},r.optionsHtml),{htmlType:(null==(o=r.optionsHtml)?void 0:o.htmlType)||r.htmlType}),n),p=nP(nP({},u),{parserCode:c,asDocument:this.__checkAsDocument(t,u)}),f=nP(nP({},r),p),d=p.preParser,h=p.asDocument,g={input:(0,b.isFunction)(d)?d(t,{editor:null==i?void 0:i.getEditor()}):t};null==s||s.__emitEvent(py.htmlBefore,g);var v=g.input,y=this.__parseInput(v,p,f,c),m=y.root,w=y.isParsedMode,_=(null==s?void 0:s.getConfig())||r,C=nP(nP({},f),{__parsedMode:w,__syntheticElementCtor:nf(_.customSyntheticElement)});if(((0,b.isUndefined)(a.allowScripts)?p.allowScripts:a.allowScripts)||nC(m,"script"),p.allowUnsafeAttr&&p.allowUnsafeAttrValue||nx(m,p),e){var x=nC(m,"style").map(function(t){return n_(t)}).join("");x&&(l.css=e.parse(x))}null==s||s.__emitEvent(py.htmlRoot,{input:v,root:m});var O=[];
1if(h){var S=m.nodeType===pg.document?m:nT(nh(m)),T=nw(S,"html"),P=T&&nw(T,"head"),E=T&&nw(T,"body")||nm("body");l.doctype=S.__doctype,P&&(l.head=this.parseNode(P,C)),T&&(l.root=this.parseNodeAttr(T,void 0,C)),O=this.parseNode(E,C)}else{var k=this.parseNodes(m,C);O=1!==k.length||f.returnArray?k:k[0]}return l.html=O,null==s||s.__emitEvent(py.html,{input:v,output:l,options:p}),l},t.prototype.__getSyntheticNode=function(t,e){var n,o,r=(null==(o=null==(n=this.em)?void 0:n.Parser)?void 0:o.getConfig())||this.config;return new(e.__syntheticElementCtor||nf(r.customSyntheticElement))(t)},t.prototype.__parseInput=function(t,e,n,o){var r,i,a,s=o?null==(i=null==(r=this.em)?void 0:r.Parser)?void 0:i.getParserCode(o):void 0,l=e.asDocument;if(o){if(!s)throw Error('Parser code "'.concat(o,'" not found'));var c=s.parse(t,{editor:null==(a=this.em)?void 0:a.getEditor(),options:e}),u=(0,b.isArray)(c)?c:[c];return{root:l?nT(u):{nodeType:pg.fragment,childNodes:u},isParsedMode:!0}}var p=(0,b.isFunction)(n.parserHtml)?n.parserHtml(t,e):ns(t,e);return{root:l?nO(p):{nodeType:pg.fragment,__domNode:p,childNodes:ny(p).map(function(t){return nS(t)})},isParsedMode:!1}},t.prototype.__getParserCodeId=function(t){var e,n;return Object.prototype.hasOwnProperty.call(t,"parserCode")?t.parserCode||"":(null==(n=null==(e=this.em)?void 0:e.Parser)?void 0:n.parserCode)||this.config.parserCode||""},t.prototype.__checkAsDocument=function(t,e){return tn(e.asDocument)?e.asDocument:(0,b.isFunction)(e.detectDocument)?!!e.detectDocument(t):e.detectDocument?t.toLowerCase().trim().startsWith("<!doctype"):void 0},t}(),nk=function(){return(nk=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},nj=function(){function t(t,e,n,o){this.model=t,this.updateFn=e,this.kind=n,this.resolverListeners={},this.em=o.em}return t.prototype.bindModel=function(t){this.model=t},t.prototype.setDataValues=function(t,e){return void 0===e&&(e={}),t=this.applyImportPolicy(t,e),e.skipWatcherUpdates||e.fromDataSource||this.removeListeners(),this.addDataValues(t,e)},t.prototype.addDataValues=function(t,e){if(void 0===e&&(e={}),!t)return{};var n=this.applyImportPolicy(t,e);if(!n)return{};var o=this.evaluateValues(n);return e.skipWatcherUpdates||e.fromDataSource||this.updateListeners(n),o},t.prototype.onCollectionsStateMapUpdate=function(){var t=this,e=this.getValuesResolvingFromCollections();e.length&&Object.entries(this.addDataValues(this.getValuesOrResolver(Object.fromEntries(e.map(function(t){return[t,""]}))))).forEach(function(e){var n=e[0],o=e[1];return t.updateFn(t.model,n,o)})},Object.defineProperty(t.prototype,"collectionsStateMap",{get:function(){var t,e=this.model;return null!=(t=null==e?void 0:e.collectionsStateMap)?t:{}},enumerable:!1,configurable:!0}),t.prototype.updateListeners=function(t){var e=this,n=this.em,o=this.collectionsStateMap;this.removeListeners(Object.keys(t));for(var r=Object.keys(t),i=this,a=0;a<r.length;a++)!function(a){var s=r[a],l=t[s];if(ne(l)){var c=nr(l,{em:n,collectionsStateMap:o});i.resolverListeners[s]=new eS({em:n,resolver:c,onUpdate:function(t){return e.updateFn(e.model,s,t)}})}}(a)},t.prototype.evaluateValues=function(t){for(var e=this.em,n=this.collectionsStateMap,o=nk({},t),r=Object.keys(t),i=0;i<r.length;i++){var a=r[i],s=t[a];ne(s)&&(o[a]=ni(s,{em:e,collectionsStateMap:n}))}return o},t.prototype.applyImportPolicy=function(t,e){var n,o,r=this;void 0===e&&(e={});var i=e.parsedImportSource,a=null!=(n=e.dataBindingImportPolicy)?n:null==(o=this.em)?void 0:o.DataSources.config.dataBindingImportPolicy;if(!t||!i||"overwrite"===a)return t;var s=nk({},t);return Object.keys(s).forEach(function(t){var e=r.resolverListeners[t],n=s[t];if(!(!e||ne(n))){var o=e.resolver.toJSON(),l="path"in o?o.path:void 0,c={target:r.model,kind:r.kind,source:i,key:t,value:n,resolvedValue:e.resolver.getDataValue(),resolver:o,path:l},u=r.resolveImportAction(a,c);"overwrite"!==u&&("update"===u&&(r.tryUpdateDataSource(l,n)||r.warnImportFallback(t,i,l)),s[t]=o)}}),s},t.prototype.resolveImportAction=function(t,e){var n=(0,b.isFunction)(t)?t(e):t;
vendor: 4,403 bytes, line 1
1return"skip"===n||"update"===n||"overwrite"===n?n:"overwrite"},t.prototype.tryUpdateDataSource=function(t,e){if(!t)return!1;try{return this.em.DataSources.setValue(t,e)}catch(t){return!1}},t.prototype.warnImportFallback=function(t,e,n){this.em.logWarning('[DataSources]: Failed to update the data source bound to "'.concat(t,'" during ').concat(e," import; keeping the existing binding."),{key:t,source:e,path:n})},t.prototype.removeListeners=function(t){var e=this,n=t||Object.keys(this.resolverListeners);return n.forEach(function(t){var n,o;e.resolverListeners[t]&&(null==(o=(n=e.resolverListeners[t]).destroy)||o.call(n),delete e.resolverListeners[t])}),n},t.prototype.getValuesOrResolver=function(t){if(!t)return{};for(var e=nk({},t),n=Object.keys(e),o=0;o<n.length;o++){var r=n[o],i=this.resolverListeners[r];i&&(e[r]=i.resolver.toJSON())}return e},t.prototype.getAllDataResolvers=function(){for(var t={},e=Object.keys(this.resolverListeners),n=0;n<e.length;n++){var o=e[n];t[o]=this.resolverListeners[o].resolver.toJSON()}return t},t.prototype.hasDataResolvers=function(){return Object.keys(this.resolverListeners).length>0},t.prototype.getValuesResolvingFromCollections=function(){var t=this;return Object.keys(this.resolverListeners).filter(function(e){return t.resolverListeners[e].resolver.resolvesFromCollection()})},t.prototype.destroy=function(){this.removeListeners()},t}(),nA=function(){return(nA=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},nM=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nD={fromDataSource:!0,avoidStore:!0},nL="__data_values",nI=function(){function t(t,e){var n=this;this.model=t,this.options=e,this.onPropertyUpdate=function(t,e,n){null==t||t.set(e,n,nD)},this.onAttributeUpdate=function(t,e,o){var r;n.isComponent(t)&&(null==t||t.addAttributes(((r={})[e]=o,r),nD))},this.onStyleUpdate=function(t,e,n){var o;null==t||t.addStyle(((o={})[e]=n,o),nA(nA({},nD),{partial:!0,avoidStore:!0}))},this.propertyWatcher=new nj(t,this.onPropertyUpdate,"property",e),this.attributeWatcher=new nj(t,this.onAttributeUpdate,"attribute",e),this.styleWatcher=new nj(t,this.onStyleUpdate,"style",e)}return t.prototype.bindModel=function(t){this.model=t,this.watchers.forEach(function(e){return e.bindModel(t)}),this.updateSymbolOverride()},t.prototype.addProps=function(t,e){void 0===e&&(e={});var n,o=null!=(n=t[nL])?n:{},r=this.filterProps(t),i=nA(nA({},t),this.propertyWatcher.addDataValues(nA(nA({},r),o.props),e));return this.shouldProcessProp("attributes",t,o)&&(i.attributes=this.processAttributes(t,o,e)),this.shouldProcessProp("style",t,o)&&(i.style=this.processStyles(t,o,e)),e.skipWatcherUpdates||e.fromDataSource||(this.updateSymbolOverride(),i[nL]={props:this.propertyWatcher.getAllDataResolvers(),style:this.styleWatcher.getAllDataResolvers(),attributes:this.attributeWatcher.getAllDataResolvers()}),i},t.prototype.shouldResolveProps=function(t){if(this.hasDataResolvers()||this.hasDataValues(t[nL])||this.hasResolverValue(t.attributes)||this.hasResolverValue(t.style))return!0;for(var e=this.excludedFromEvaluation,n=Object.keys(t),o=0;o<n.length;o++){var r=n[o];if(!e.includes(r)&&ne(t[r]))return!0}return!1},t.prototype.getProps=function(t){var e=this.getValueOrResolver("props",t),n=nA({},e);return delete n[nL],(0,b.isEmpty)(t.attributes)||(n.attributes=this.getValueOrResolver("attributes",t.attributes)),(0,b.isObject)(t.style)&&!(0,b.isEmpty)(t.style)&&(n.style=this.getValueOrResolver("styles",t.style)),n},t.prototype.getValueOrResolver=function(t,e){var n;switch(t){case"props":n=this.propertyWatcher;break;case"styles":n=this.styleWatcher;break;case"attributes":n=this.attributeWatcher;break;default:var o=this.options.em;return null==o||o.logError("Invalid target '".concat(t,"'. Must be 'props', 'styles', or 'attributes'.")),{}}return e?n.getValuesOrResolver(e):n.getAllDataResolvers()},t.prototype.removeAttributes=function(t){this.attributeWatcher.removeListeners(t),this.updateSymbolOverride()},t.prototype.disableStyles=function(){this.styleWatcher.removeListeners(),this.styleWatcher.destroy()},t.prototype.onCollectionsStateMapUpdate=function(){this.watchers.forEac
1h(function(t){return t.onCollectionsStateMapUpdate()})},t.prototype.destroy=function(){this.watchers.forEach(function(t){return t.destroy()})},Object.defineProperty(t.prototype,"watchers",{get:function(){return[this.propertyWatcher,this.styleWatcher,this.attributeWatcher]},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"excludedFromEvaluation",{get:function(){return["components","dataResolver","status","state","open",og,nL]},enumerable:!1,configurable:!0}),t.prototype.hasDataResolvers=function(){return this.watchers.some(function(t){return t.hasDataResolvers()})},t.prototype.hasDataValues=function(t){return Object.values(t||{}).some(function(t){return(0,b.isObject)(t)&&!(0,b.isEmpty)(t)})},t.prototype.hasResolverValue=function(t){return!!(0,b.isObject)(t)&&Object.values(t).some(ne)},t.prototype.isComponent=function(t){return t instanceof ob},t.prototype.shouldProcessProp=function(t,e,n){var o="attributes"===t?this.attributeWatcher:this.styleWatcher,r=n[t],i=!!e[t],a=r&&Object.keys(r).length>0,s=r&&Object.keys(o.getAllDataResolvers()).length>0;return i||a||s},t.prototype.updateSymbolOverride=function(){var t,e=this.model;if(this.isComponent(e)&&eG(e)&&Object.keys(null!=(t=null==e?void 0:e.collectionsStateMap)?t:{}).length){var n=this.propertyWatcher.getValuesResolvingFromCollections(),o=this.attributeWatcher.getValuesResolvingFromCollections(),r=nM(["locked","layerable"],n,!0);Object.keys(o).length&&r.push("attributes"),eQ(e).forEach(function(t){t.setSymbolOverride(r,{fromDataSource:!0})}),e.setSymbolOverride(r,{fromDataSource:!0})}},t.prototype.filterProps=function(t){var e=this.excludedFromEvaluation;return Object.fromEntries(Object.entries(t).filter(function(t){var n=t[0];return!e.includes(n)}))},t.prototype.processAttributes=function(t,e,n){var o;return void 0===n&&(n={}),this.attributeWatcher.setDataValues(nA(nA({},t.attributes),null!=(o=e.attributes)?o:{}),n)},t.prototype.processStyles=function(t,e,n){var o;return(void 0===n&&(n={}),"string"==typeof t)?(this.styleWatcher.removeListeners(),t):this.styleWatcher.setDataValues(nA(nA({},t.style),null!=(o=e.style)?o:{}),n)},t}(),nN=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nR=function(){return(nR=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},nV=new nE,nF=function(t){return(0,b.isArray)(t)?t[t.length-1]:t},nH=function(t){function e(e,n){void 0===n&&(n={});var o=this,r=new nI(void 0,{em:n.em});return(o=t.call(this,e,nR(nR({},n),{dataResolverWatchers:r}))||this).views=[],o.collectionsStateMap={},r.bindModel(o),o.dataResolverWatchers=r,o.em=n.em,o.opt=n,o}return nN(e,t),e.prototype.get=function(e,n){return(null==n?void 0:n.skipResolve)?this.dataResolverWatchers.getValueOrResolver("props")[e]:t.prototype.get.call(this,e)},e.prototype.set=function(e,n,o){var r,i,a,s,l={skipWatcherUpdates:!1,fromDataSource:!1};"object"==typeof e?(a=e,s=n||l):"string"==typeof e?((r={})[e]=n,a=r,s=o||l):(a={},s=l),this.dataResolverWatchers=null!=(i=this.dataResolverWatchers)?i:s.dataResolverWatchers;var c=this.dataResolverWatchers.shouldResolveProps(a)?this.dataResolverWatchers.addProps(a,s):a;return t.prototype.set.call(this,c,s)},e.prototype.parseStyle=function(t){return nV.parseStyle(t)},e.prototype.extendStyle=function(t){return nR(nR({},this.__getStyleForExtend()),t)},e.prototype.__getStyleForExtend=function(){return this.getStyle("",{skipResolve:!0})},e.prototype.__getStyleForUpdate=function(t){return void 0===t&&(t={}
1),this.getStyle("",{skipResolve:!0})},e.prototype.__normalizeStyle=function(t,e){return void 0===e&&(e={}),t},e.prototype.__onStyleUpdate=function(t,e){void 0===e&&(e={})},e.prototype.__getStyleResult=function(t,e,n){return void 0===n&&(n={}),e&&""!==e?t[e]:t},e.prototype.getStyle=function(t,e){void 0===e&&(e={});var n=(0,b.isObject)(t),o=n?"":t,r=n?t:e,i=this.get("style"),a=(0,b.isString)(i)?this.parseStyle(i):(0,b.isObject)(i)?nR({},i):{};if(delete a.__p,!r.skipResolve)return this.__getStyleResult(a,o,r);var s=this.dataResolverWatchers.getValueOrResolver("styles",a);return this.__getStyleResult(s,o,r)},e.prototype.setStyle=function(t,e){var n=this;void 0===t&&(t={}),void 0===e&&(e={}),(0,b.isString)(t)&&(t=this.parseStyle(t)),t=this.__normalizeStyle(t,e);var o=this.__getStyleForUpdate(e);e.partial||e.avoidStore?(e.avoidStore=!0,t.__p=!0):delete t.__p;var r=nR({},t),i=nR({},r);(0,b.keys)(i).forEach(function(t){if(""===i[t])return void delete i[t]}),this.set({style:i},e),i=this.attributes.style;var a=Object.keys(tl(o,r)).reduce(function(t,e){var n;return nR(nR({},t),((n={})[e]=i[e],n))},{});return delete a.__p,(0,b.keys)(a).forEach(function(t){var o=n.em;!e.noEvent&&(n.trigger("change:style:".concat(t)),o&&(o.trigger("styleable:change",n,t,e),o.trigger("styleable:change:".concat(t),n,t,e)))}),this.__onStyleUpdate(o,e),i},e.prototype.getView=function(t){var e=this.em,n=this.view,o=this.views||[],r=t||(null==e?void 0:e.getCurrentFrameModel());return r?o.find(function(t){return t.frameView===r.view}):o[0]||n},e.prototype.setView=function(t){var e=this.views;e.includes(t)||e.push(t)},e.prototype.removeView=function(t){var e=this.views;e.splice(e.indexOf(t),1)},e.prototype.updateView=function(){this.views.forEach(function(t){return t.updateStyles()})},e.prototype.addStyle=function(t,e,n){var o;void 0===e&&(e=""),void 0===n&&(n={}),"string"==typeof t?((o={})[t]=e,t=o):n=e||{},n.addStyle=t,t=this.extendStyle(t),this.setStyle(t,n)},e.prototype.removeStyle=function(t){var e=this.getStyle();delete e[t],this.setStyle(e)},e.prototype.styleToString=function(t){void 0===t&&(t={});var e=t.style||this.getStyle("",t);return this.__styleToString(e,t)},e.prototype.__styleToString=function(t,e){void 0===e&&(e={});var n=[];for(var o in t)if("__"!==o.substring(0,2)){var r=this.__stylePropToString(o,t[o],e);r&&n.push(r)}return n.join("")},e.prototype.__stylePropToString=function(t,e,n){void 0===n&&(n={});var o=[],r=n.important,i=(0,b.isArray)(r)?r.indexOf(t)>=0:r;return((0,b.isArray)(e)?e:[e]).forEach(function(e){var n="".concat(e).concat(i?" !important":"");n&&o.push("".concat(t,":").concat(n,";"))}),o.join("")},e.prototype.getSelectors=function(){return this.get("selectors")||this.get("classes")},e.prototype.getSelectorsString=function(t){return this.selectorsToString?this.selectorsToString(t):this.getSelectors().getFullString()},e.prototype.onCollectionsStateMapUpdate=function(t){this.collectionsStateMap=t,this.dataResolverWatchers.onCollectionsStateMapUpdate()},e.prototype.clone=function(t,e){var n=this.dataResolverWatchers.getProps(this.attributes),o=nR(nR({},n),t),r=nR(nR({},this.opt),e);return new this.constructor(o,r)},e.prototype.toJSON=function(e,n){if(null==e?void 0:e.fromUndo)return nR({},t.prototype.toJSON.call(this,e));var o=nR(nR({},this.attributes),n);return this.dataResolverWatchers.getProps(o)},e}(tH),nU=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nB=function(t){function e(n,o){void 0===o&&(o={});var r=t.call(this,n,o)||this,i=o.config,a=r.get("name"),s=r.get("label");a?s||r.set("label",a):r.set("name",s);var l=r.get("name"),c=(void 0===i?{}:i).escapeName,u=c?c(l):e.escapeName(l);return r.set("name",u),r.em=o.em,r}return nU(e,t),e.prototype.defaults=function(){return{name:"",label:"",type:1,active:!0,private:!1,protected:!1,_und
1o:!0}},e.prototype.isId=function(){return 2===this.get("type")},e.prototype.isClass=function(){return 1===this.get("type")},e.prototype.getFullName=function(t){void 0===t&&(t={});var e=t.escape,n=this.get("name"),o="";switch(this.get("type")){case 1:o=".";break;case 2:o="#"}return o+(e?e(n):n)},e.prototype.toString=function(){return this.getFullName()},e.prototype.getName=function(){return this.get("name")||""},e.prototype.getLabel=function(){return this.get("label")||""},e.prototype.setLabel=function(t){return this.set("label",t)},e.prototype.getActive=function(){return!!this.get("active")},e.prototype.setActive=function(t){return this.set("active",t)},e.prototype.toJSON=function(t){void 0===t&&(t={});var e=this.em,n=tH.prototype.toJSON.call(this,[t]),o=(0,b.result)(this,"defaults");if(null==e?void 0:e.getConfig().avoidDefaults){(0,b.forEach)(o,function(t,e){n[e]===t&&delete n[e]}),n.label===n.name&&delete n.label;var r=(0,b.keys)(n).length;1===r&&n.name&&(n=n.name),2===r&&n.name&&n.type&&(n=this.getFullName())}return n},e.escapeName=function(t){return"".concat(t).trim().replace(/\s+/g,"-")},e.TYPE_CLASS=1,e.TYPE_ID=2,e}(tH);nB.prototype.idAttribute="name";var nz=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nW=function(t,e){return t.reduce(function(n,o,r){return n.concat(nW(t.slice(r+1),"".concat(e).concat(o)))},[e])},n$=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nz(e,t),e.prototype.modelId=function(t){return"".concat(t.name,"_").concat(t.type||nB.TYPE_CLASS)},e.prototype.getStyleable=function(){return(0,b.filter)(this.models,function(t){return t.getActive()&&!t.get("private")})},e.prototype.getValid=function(t){var e=(void 0===t?{}:t).noDisabled;return(0,b.filter)(this.models,function(t){return!t.get("private")}).filter(function(t){return e?t.get("active"):1})},e.prototype.getFullString=function(t,e){void 0===e&&(e={});var n=[];return(t||this).forEach(function(t){return n.push(t.getFullName(e))}),e.sort&&n.sort(),n.join("").trim()},e.prototype.getFullName=function(t){void 0===t&&(t={});var e=t.combination,n=t.array,o=[],r=this.map(function(e){return e.getFullName(t)}).sort();return e?r.forEach(function(t,e){o=o.concat(nW(r.slice(e+1),t))}):o=r,n?o:e?o.join(","):o.join("")},e}(tU);n$.prototype.model=nB;var nq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nG=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},nK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nq(e,t),e.prototype.defaults=function(){return{id:"",label:"",open:!0,attributes:{}}},e.prototype.getId=function(){return this.get("id")},e.prototype.getLabel=function(){return this.get("label")},e}(tH);function nY(t){var e=new Set,n=new Map,o={items:[]};return t.forEach(function(t){var r=t.category;if(r){e.add(r);var i=n.get(r);i?i.push(t):n.set(r,[t])}else o.items.push(t)}),nG(nG([],Array.from(e).map(function(t){return{category:t,items:n.get(t)||[]}}),!0),[o],!1)}var nJ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),nX="category",nZ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return nJ(e,t),e.prototype.initCategory=function(t){var e=t.get(nX),n=e instanceof nK;if(e&&!n){(0,b.isString)(e)?e={id:e,label:e}:tC(e)&&!e.id&&(e.id=e.label);var o=this.getCategories().add(e);return t.set(nX,o,{silent:!0}),o}if(n){var o=e;return this.getCategories().add(o),o}},e}(tU),nQ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),n0=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this,r=n.events,i=n.em,a=null==r?void 0:r.update;return i&&a&&o.on("change",function(t,e){return i.trigger(a,{category:t,changes:t.changedAttributes(),options:e})}),o}return nQ(e,t),e.prototype.add=function(e,n){return((0,b.isArray)(e)?e:[e]).forEach(function(t){return t&&(t.id=tt("".concat(t.id)))}),t.prototype.add.call(this,e,n)},e.prototype.get=function(e){return t.prototype.get.call(this,(0,b.isString)(e)?tt(e):e)},e}(tU);n0.prototype.model=nK,function(t){t.select="trait:select",t.value="trait:value",t.update="trait:update",t.categoryUpdate="trait:category:update",t.custom="trait:custom",t.all="trait"}(pm||(pm={}));let n1=pm;var n2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),n3=function(){return(n3=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},n5=function(t){function e(e,n){var o=t.call(this,e)||this,r=o.attributes,i=r.target,a=r.name;return o.get("id")||o.set("id",a),i&&o.setTarget(i),o.em=n,o}return n2(e,t),e.prototype.defaults=function(){return{type:"text",label:"",name:"",unit:"",step:1,value:"",default:"",placeholder:"",category:"",changeProp:!1,options:[]}},Object.defineProperty(e.prototype,"parent",{get:function(){return this.collection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"category",{get:function(){var t=this.get("category");return t instanceof nK?t:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"component",{get:function(){return this.target},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"changeProp",{get:function(){return!!this.get("changeProp")},enumerable:!1,configurable:!0}),e.prototype.setTarget=function(t){if(t){var e=this.attributes,n=e.name,o=e.changeProp,r=e.value,i=e.getValue;this.target=t,this.unset("target"),this.listenTo(t,o?"change:".concat(n):"change:attributes:".concat(n),this.targetUpdated);var a=r||(i?void 0:this.getValue());(0,b.isUndefined)(a)||this.set({value:a},{silent:!0})}},e.prototype.getId=function(){return this.get("id")},e.prototype.getType=function(){return this.get("type")},e.prototype.getName=function(){return this.get("name")},e.prototype.getLabel=function(t){void 0===t&&(t={});var e,n=t.locale,o=this.getId(),r=this.get("label")||this.getName();return(void 0===n||n)&&(null==(e=this.em)?void 0:e.t("traitManager.traits.labels.".concat(o)))||r},e.prototype.getValue=function(t){return this.getTargetValue(t)},e.prototype.setValue=function(t,e){var n=this;void 0===e&&(e={});var o=this.component,r=this.em,i=e.partial,a={},s=this.attributes.setValue;if(s)return void s({value:t,component:o,editor:null==r?void 0:r.getEditor(),trait:this,partial:!!i,options:e,emitUpdate:function(){return n.targetUpdated()}});i&&(a.avoidStore=!0),this.setTargetValue(t,a)},e.prototype.getDefault=function(){return this.get("default")},e.prototype.getOptions=function(){return this.get("options")||[]},e.prototype.getOption=function(t){var e=this,n=tn(t)?t:this.getValue();return this.getOptions().filter(function(t){return e.getOptionId(t)===n})[0]},e.prototype.getOptionId=function(t){return t.id||t.value},e.prototype.getOptionLabel=function(t,e){void 0===e&&(e={});var n,o=e.locale,r=(0,b.isString)(t)?this.getOption(t):t,i=this.getOptionId(r),a=r.label||r.name||i,s=this.getName();return(void 0===o||o)&&(null==(n=this.em)?void 0:n.t("traitManager.traits.options.".concat(s,".").concat(i)))||a},e.prototype.getCategoryLabel=function(t){void 0===t&&(t={});var e=this.em,n=this.category,o=t.locale,r=null==n?void 0:n.getId(),i=null==n?void 0:n.getLabel();return(void 0===o||o)&&(null==e?void 0:e.t("traitManager.categories.".concat(r)))||i||""},e.prototype.runCommand=function(){var t=this.em,e=this.attributes.command;if(e&&t)if((0,b.isString)(e))return t.Commands.run(e);else return e(t.Editor,this)},e.prototype.props=function(){return this.attributes},e.prototype.targetUpdated=function(){var t=this.component,e=this.em,n=this.getTargetValue({useType:!0});this.set({value:n},{fromTarget:1});var o={trait:this,component:t,value:n};t.trigger(n1.value,o),null==e||e.trigger(n1.value,o),null==e||e.trigger(n1.update,o)},e.prototype.getTargetValue=function(t){void 0===t&&(t={});var e,n,o=this.component,r=this.em,i=this.getName(),a=this.get("getValue"),s=t.skipResolve;if(a?n=a({editor:null==r?void 0:r.getEditor(),trait:this,component:o}):this.changeProp?(n=o.get(i),s&&(n=o.dataResolverWatchers.getValueOrResolver("props",((e={}
1)[i]=n,e))[i])):n=o.getAttributes({skipResolve:s})[i],t.useType&&"checkbox"===this.getType()){var l=this.attributes,c=l.valueTrue,u=l.valueFalse;(0,b.isUndefined)(c)||c!==n?(0,b.isUndefined)(u)||u!==n||(n=!1):n=!0}return(0,b.isUndefined)(n)?"":n},e.prototype.setTargetValue=function(t,e){void 0===e&&(e={});var n,o=this.component,r=this.attributes,i=this.getName();if(!(0,b.isUndefined)(t)){var a=t;if("false"===t?a=!1:"true"===t&&(a=!0),"checkbox"===this.getType()){var s=r.valueTrue,l=r.valueFalse;a&&!(0,b.isUndefined)(s)&&(a=s),a||(0,b.isUndefined)(l)||(a=l)}var c=((n={})[i]=a,n);c.__p=e.avoidStore?null:void 0,this.changeProp?o.set(c,e):o.addAttributes(c,e)}},e.prototype.setValueFromInput=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var o={value:t};this.set(o,n3(n3({},n),{avoidStore:1})),e&&(this.set("value","",n),this.set(o,n))},e.prototype.getInitValue=function(){var t,e=this.component,n=this.getName();if(e){var o=e.get("attributes");t=this.changeProp?e.get(n):o[n]}return t||this.get("value")||this.get("default")},e}(tH),n4=function(){function t(t){void 0===t&&(t={}),this.config=t}return t.prototype.build=function(t,e){return(0,b.isString)(t)?this.buildFromString(t,e):new n5(t,e)},t.prototype.buildFromString=function(t,e){var n={name:t,type:"text"};return"target"===t&&(n.type="select",n.default=!1,n.options=this.config.optionsTarget),new n5(n,e)},t}(),n9=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),n6=function(t){function e(e,n){var o=t.call(this,e)||this;o.categories=new n0;var r=n.em;o.em=r,o.categories=new n0([],{em:r,events:{update:n1.categoryUpdate}}),o.on("add",o.handleAdd),o.on("reset",o.handleReset);var i=o.module;return o.tf=new n4(null==i?void 0:i.getConfig()),o}return n9(e,t),Object.defineProperty(e.prototype,"module",{get:function(){return this.em.Traits},enumerable:!1,configurable:!0}),e.prototype.getCategories=function(){return this.categories},e.prototype.handleReset=function(t,e){var n=(void 0===e?{}:e).previousModels;(void 0===n?[]:n).forEach(function(t){return t.trigger("remove")})},e.prototype.handleAdd=function(t){t.em=this.em;var e=this.target;e&&(t.target=e),this.initCategory(t)},e.prototype.setTarget=function(t){this.target=t,this.models.forEach(function(e){return e.setTarget(t)})},e.prototype.add=function(e,n){if(void 0!=e){var o=this.target,r=this.em;if((0,b.isArray)(e)){for(var i=[],a=0,s=e.length;a<s;a++){var l=e[a];i[a]=l instanceof n5?l:this.tf.build(l,r),i[a].setTarget(o)}return t.prototype.add.call(this,i,n)}var c=e instanceof n5?e:this.tf.build(e,r);return c.setTarget(o),t.prototype.add.call(this,c,n)}},e}(nZ),n7=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),n8=function(){return(n8=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ot=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},oe=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},on=function(t,e){return(void 0===e&&(e=[]),t)?(((0,b.isArray)(t)||(0,b.isFunction)(t.map)?t:[t]).map(function(t){e.push(t.getId()),on(t.components().models,e)}),e):[]},oo=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={}),n.visitedCmps=n.visitedCmps||{};var o=n.visitedCmps,r=n.updateOptions||{};return((0,b.isArray)(t)?t:[t]).map(function(t){var i=t.attributes,a=void 0===i?{}:i,s=t.components,l=t.tagName,c=t.style,u=a.id,p=(a.draggable,ot(a,["id","draggable"])),f=t;if(u){if(o[u])o[u].push(f),u=ob.getNewId(e),f.attributes.id=u;else if(o[u]=[],e[u]){f=e[u];var d=r.onAttributes,h=r.onStyle,g=f,v=n8(n8({},n),{parsedImportSource:"html"});l&&g.set({tagName:l},n8(n8({},v),{silent:!0})),d?d({item:t,component:g,attributes:p,options:v}):(0,b.keys)(p).length&&g.addAttributes(p,v),h?h({item:t,component:g,style:c,options:v}):(0,b.keys)(c).length&&g.addStyle(c,v)}}var y=(0,b.isFunction)(f.components)?f:null;if(s){var m=oo(s,e,n);y?y.components().reset(m,n):f.components=m}else y&&y.components().reset([],n);return f})},or=function(t){function e(e,n){var o=t.call(this,e,n)||this;o.opt=n,o.listenTo(o,"add",o.onAdd),o.listenTo(o,"remove",o.removeChildren),o.listenTo(o,"reset",o.resetChildren);var r=n.em;return o.config=n.config,o.em=r,o.domc=n.domc||(null==r?void 0:r.Components),o}return n7(e,t),Object.defineProperty(e.prototype,"events",{get:function(){var t;return null==(t=this.domc)?void 0:t.events}
1,enumerable:!1,configurable:!0}),e.prototype.resetChildren=function(t,e){var n=this;void 0===e&&(e={});var o=this,r=e.previousModels||[],i=r.filter(function(e){return!t.get(e.cid)}),a=on(t),s=on(r).filter(function(t){return a.indexOf(t)>=0});e.keepIds=(e.keepIds||[]).concat(s),i.forEach(function(t){return n.removeChildren(t,o,e)}),t.each(function(t){return n.onAdd(t)})},e.prototype.resetFromString=function(t,n){void 0===t&&(t=""),void 0===n&&(n={}),n.keepIds=on(this);var o,r=this.domc,i=this.em,a=this.parent,s=(null==r?void 0:r.allById())||{},l=this.parseString(t,n8(n8({},n),{cloneRules:!0})),c=n8({skipViewUpdate:!0},n),u=oo(l,s,c);e.cloneCssRules(i,c.visitedCmps),this.reset(u,n),null==i||i.trigger(pi.content,a,n,t),null==(o=a.__checkInnerChilds)||o.call(a)},e.prototype.removeChildren=function(t,e,n){var o=this;if(void 0===n&&(n={}),t){var r=this.domc,i=this.em,a=n.temporary||n.fromUndo;if(t.prevColl=this,!a){var s=t.getId(),l=i.Selectors.getAll(),c=i.Css.getAll(),u=0>(n.keepIds||[]).indexOf(s),p=r?r.allById():{};delete p[s];var f=u?c.remove(c.filter(function(t){return t.getSelectors().getFullString()==="#".concat(s)}),n):[];l.remove(f.map(function(t){return t.getSelectors().at(0)})),!t.opt.temporary&&(i.Commands.run("core:component-style-clear",{target:t}),t.views.forEach(function(e){e.scriptContainer&&t.emitWithEditor(pi.scriptUnmount,{component:t,view:e,el:e.el})}),t.removed(),t.trigger("removed"),i.trigger(pi.remove,t),r&&eq(t)&&eK(t)&&r.symbols.__trgEvent(r.events.symbolInstanceRemove,{component:t},!0));var d=t.components();d.forEach(function(t){e8(t,t,d,n8(n8({},n),{skipRefsUp:!0})),o.removeChildren(t,e,n)})}var h=t.components();if(i.stopListening(h),i.stopListening(t),i.stopListening(t.get("classes")),t.__postRemove(),!t.opt.temporary){var g=function(t){t.emitWithEditor(pi.removed,t,{removeOptions:n}),t.components().forEach(function(t){return g(t)})};g(t)}}},e.prototype.model=function(t,e){var n,o=e.collection.opt,r=o.em,i=r.Components.componentTypes;e.em=r,e.config=o.config,e.componentTypes=i,e.domc=o.domc;for(var a=0;a<i.length;a++)if(i[a].id==t.type){n=i[a].model;break}return!n&&(n=i[i.length-1].model,r&&t.type&&r.logWarning("Component type '".concat(t.type,"' not found"),{attrs:t,options:e})),new n(t,e)},e.prototype.parseString=function(t,n){void 0===n&&(n={});var o=this.em,r=this.domc,i=this.parent,a=null==i?void 0:i.is("wrapper"),s=n.asDocument&&a,l=o.Css,c=o.Parser.parseHtml(t,n8({asDocument:s},n.parserOptions)),u=c.html;if(a&&c.doctype){var p=c.html||{},f=p.components,d=ot(p,["components"]),h=c.head||{},g=h.components,v=ot(h,["components"]);u=void 0===f?[]:f;var y=n8(n8({},n),{parsedImportSource:"html"});i.set(d,y),i.head.set(v,y),i.head.components(g,y),i.docEl.set(c.root,y),i.set({doctype:c.doctype},y)}var m=ob.checkId(u,c.css,r.componentsById,n);if(n.cloneRules&&e.cloneCssRules(o,m.updatedIds),c.css&&l&&!n.temporary){n.at;var b=ot(n,["at"]);l.addCollection(c.css,n8(n8({},b),{extend:1,parsedImportSource:"css"}))}return u},e.prototype.add=function(e,n){var o=this;if(void 0===n&&(n={}),void 0!=e){n.keepIds=oe(oe([],n.keepIds||[],!0),on(n.previousModels),!0),(0,b.isString)(e)?e=this.parseString(e,n):(0,b.isArray)(e)&&(e=oe([],e,!0)).forEach(function(t,r){if((0,b.isString)(t)){var i=o.parseString(t,n);e[r]=(0,b.isArray)(i)&&!i.length?null:i}});var r=((0,b.isArray)(e)?e:[e]).filter(Boolean).map(function(t){return o.processDef(t)});return e=(0,b.isArray)(e)?(0,b.flatten)(r,1):r[0],t.prototype.add.call(this,e,n)}},e.prototype.processDef=function(t){if(t.cid&&t.ccid)return t;var e=this.em,n=this.config,o=(void 0===n?{}:n).processor,r=t;if(o){var i=o(r=n8({},r));i&&((0,b.each)(r,function(t,e){return delete r[e]}),(0,b.extend)(r,i))}if(r.$$typeof&&"object"==typeof r.props){(r=n8({},r)).props=n8({},r.props);var a=e.Components,s=e.Parser.parserHtml;(0,b.each)(r,function(t,e){(0,b.includes)(["props","type"],e)||delete r[e]});var l=r.props,c=l.children;delete l.children,delete r.props;var u=s.splitPropsFromAttr(l);r.attributes=u.attrs,c&&(r.components=c),r.type?a.getType(r.type)||(r.tagName=r.type,delete r.type):r.type="textnode",(0,b.extend)(r,u.props)}return r},e.prototype.onAdd=function(t,e,n){void 0===n&&(n={});var o=this.domc,r=this.em,i=r.config.avoidInlineStyle,a=null==o?void 0:o.allById();if((null==a?void 0:a[t.getId()])!==t&&(null==o||o.Component.ensureInList(t)),!i&&r.config.forceClass&&!n.temporary){var s=t.getStyle();if(!(0,b.isEmpty)(s)){var l=t.cid;r.Css.setClassRule(l,s),t.setStyle({}),t.addClass(l)}}if(t.__postAdd({recursive:!0}),r&&!n.temporary){var c=function(t){r.trigger(pi.add,t,n),t.components().forEac
1h(function(t){return c(t)})};c(t),o&&eq(t)&&eK(t)&&o.symbols.__trgEvent(o.events.symbolInstanceAdd,{component:t},!0)}},e.cloneCssRules=function(t,e){void 0===e&&(e={});var n=t.Css;Object.keys(e).forEach(function(t){var o=e[t];if(o.length){var r=(n.getRules("#".concat(t))||[]).filter(function(t){return!(0,b.isEmpty)(t.attributes.style)});if(r.length){var i=n.getAll();o.forEach(function(t){r.forEach(function(e){var n=e.clone();n.set("selectors",["#".concat(t.attributes.id)]),i.add(n)})})}}})},e}(tU),oi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oa=function(){return(oa=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},os=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},ol=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},oc=function(t){return(0,b.isString)(t)?function(e){return e.is(t)}:t},ou=function(t){var e=(void 0===t?{}:t).max;return"number"==typeof e&&isFinite(e)&&e>0?Math.max(1,Math.floor(e)):void 0},op=function(t){return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&")},of=function(t){return!!(null==t?void 0:t.getConfig().avoidInlineStyle)};pi.drag;var od="__symbols",oh="__symbol",og="__symbol_ovrd",ov=pi.update,oy=pi.updateInside,om=Symbol("idsMapCounter");let ob=function(t){function e(n,o){void 0===n&&(n={});var r=this,i=o.em;r=t.call(this,n,o)||this,(0,b.bindAll)(r,"__upSymbProps","__upSymbCls","__upSymbComps","syncOnComponentChange");var a=r.parent(),s=null==a?void 0:a.attributes,l=r.get("propagate");if(l&&r.set("propagate",(0,b.isArray)(l)?l:[l]),s&&s.propagate&&!l){var c={},u=s.propagate;u.forEach(function(t){return c[t]=a.get(t)}),c.propagate=u,r.set(oa(oa({},c),n))}o&&o.config&&o.config.voidElements.indexOf(r.get("tagName"))>=0&&r.set("void",!0),o.em=i,r.opt=o,r.em=i,r.config=o.config||{};var p=oa(oa({},(0,b.result)(r,"defaults").attributes||{}),r.get("attributes")||{}),f=r.dataResolverWatchers.getValueOrResolver("attributes",p);if(r.setAttributes(f),r.ccid=e.createId(r,o),r.preInit(),r.initClasses(),r.initComponents(),r.initTraits(),r.initToolbar(),r.initScriptProps(),r.listenTo(r,"change:script",r.scriptUpdated),r.listenTo(r,"change:tagName",r.tagUpdated),r.listenTo(r,"change:attributes",r.attrUpdated),r.listenTo(r,"change:attributes:id",r._idUpdated),r.on("change:toolbar",r.__emitUpdateTlb),r.on("change",r.__onChange),r.on(oy,r.__propToParent),r.set("status",""),r.views=[],["classes","traits","components"].forEach(function(t){var e="add remove reset ".concat("components"!==t?"change":"");r.listenTo(r.get(t),e.trim(),function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return r.emitUpdate.apply(r,ol([t],e,!1))})}),!o.temporary){var d=i&&i.Css,h=r.attributes,g=h.styles,v=h.type;g&&d&&d.addCollection(g,{avoidUpdateStyle:!0},{group:"cmp:".concat(v)}),r._moveInlineStyleToRule(),r.__postAdd(),r.init(),eG(r)&&eY(r),null==i||i.trigger(pi.create,r,o)}return of(i)&&r.dataResolverWatchers.disableStyles(),r}return oi(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){var t;return(t={tagName:"div",type:"",name:"",removable:!0,draggable:!0,droppable:!0,badgable:!0,stylable:!0,"stylable-require":"","style-signature":"",unstylable:"",highlightable:!0,copyable:!0,resizable:!1,editable:!1,layerable:!0,selectable:!0,hoverable:!0,void:!1,state:"",status:"",content:"",icon:"",style:"",styles:"",classes:"",script:"","script-props":"","script-export":"",attributes:{},traits:["id","title"],propagate:"",dmode:"",toolbar:null,delegate:null})[oh]=0,t[od]=0,t[og]=0,t._undo=!0,t._undoexc=["status","open"],t}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"tagName",{get:function(){return this.get("tagName")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"classes",{get:function(){return this.get("classes")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"traits",{get:function(){return this.get("traits")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"content",{get:function(){var t;return null!=(t=this.get("content"))?t:""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toolbar",{get:function(){return this.get("toolbar")||[]},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"resizable",{get:function(){return this.get("resizable")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"delegate",{get:function(){return this.get("delegate")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"locked",{get:function(){return this.get("locked")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frame",{get:function(){return this.opt.frame},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"page",{get:function(){var t;return null==(t=this.frame)?void 0:t.getPage()},enumerable:!1,configurable:!0}),e.prototype.getType=function(){return this.get("type")||"default"},e.prototype.preInit=function(){},e.prototype.init=function(){},e.prototype.updated=function(t,e,n){},e.prototype.removed=function(){},e.prototype.onCollectionsStateMapUpdate=function(e){var n;t.prototype.onCollectionsStateMapUpdate.call(this,e),null==(n=this._getStyleRule())||n.onCollectionsStateMapUpdate(e),this.components().forEach(function(t){return t.onCollectionsStateMapUpdate(e)})},e.prototype.syncComponentsCollectionState=function(){this.stopListening(this.components(),"add remove reset",this.syncOnComponentChange),this.listenTo(this.components(),"add remove reset",this.syncOnComponentChange),this.components().forEach(function(t){return t.syncComponentsCollectionState()})},e.prototype.stopSyncComponentCollectionState=function(){this.stopListening(this.components(),"add remove reset",this.syncOnComponentChange),this.collectionsStateMap={},this.components().forEach(function(t){return t.stopSyncComponentCollectionState()})},e.prototype.syncOnComponentChange=function(t,e,n){var o=this;if(this.collectionsStateMap&&Object.keys(this.collectionsStateMap).length){var r=n||e||{};n?r.add?(t.syncComponentsCollectionState(),t.onCollectionsStateMapUpdate(this.collectionsStateMap)):t.stopSyncComponentCollectionState():((r.previousModels||[]).forEach(function(t){return t.stopSyncComponentCollectionState()}),this.components().forEach(function(t){t.syncComponentsCollectionState(),t.onCollectionsStateMapUpdate(o.collectionsStateMap)}))}},e.prototype.__postAdd=function(t){void 0===t&&(t={});var e=this.em,n=null==e?void 0:e.UndoManager,o=this.components();n&&!this.__hasUm&&(n&&(n.add(o),n.add(this.getSelectors()),this.__hasUm=!0),t.recursive&&o.map(function(e){return e.__postAdd(t)}))},e.prototype.__postRemove=function(){var t=this.em,e=null==t?void 0:t.UndoManager;e&&(e.remove(this.components()),e.remove(this.getSelectors()),delete this.__hasUm)},e.prototype.__onChange=function(t,e){var n=this,o=this.changedAttributes()||{};(0,b.keys)(o).forEach(function(t){return n.emitUpdate(t)}),["status","open","toolbar","traits"].forEach(function(t){return delete o[t]}),tx(o)||(this.__changesUp(e,{changed:o}),this.__propSelfToParent({component:this,changed:o,options:e}))},e.prototype.__onStyleChange=function(t,e){var n=this,o=this.collectionsStateMap;if(this.em&&(null==e?!void 0:!e.noEvent)){var r=(0,b.keys)(t),i={style:t};this.emitWithEditor(pi.styleUpdate,this,i),r.forEach(function(t){return n.emitWithEditor("".concat(pi.styleUpdateProperty).concat(t),n,i)});var a=Object.keys(o).filter(function(t){return t!==pl.rootData});0!==a.length&&a.every(function(t){var e=o[t];return e.currentIndex===e.startIndex})&&eQ(this).forEach(function(e){Object.keys(e.collectionsStateMap).every(function(t){return a.includes(t)})&&e.addStyle(oa({},t),{noEvent:!0})})}},e.prototype.__changesUp=function(t,e){var n=this;void 0===e&&(e={});var o=this.em;
1[this.frame,o].forEach(function(o){null==o||o.changesUp(t,oa({component:n,options:t},e))})},e.prototype.__propSelfToParent=function(t){this.trigger(ov,t),this.__propToParent(t)},e.prototype.__propToParent=function(t){var e=this.parent();e&&e.trigger(oy,t)},e.prototype.__emitUpdateTlb=function(){this.emitUpdate("toolbar")},e.prototype.__getAllById=function(){var t=this.em;return t?t.Components.allById():{}},e.prototype.__upSymbProps=function(t,e){void 0===e&&(e={}),e3(this,e)},e.prototype.__upSymbCls=function(t,e,n){void 0===n&&(n={}),e7(this,n)},e.prototype.__upSymbComps=function(t,e,n){e8(this,t,e,n)},e.prototype.__onDestroy=function(){},e.prototype.is=function(t){return this.get("type")==t},e.prototype.props=function(){return this.attributes},e.prototype.index=function(){var t=this.collection;return t?t.indexOf(this):0},e.prototype.setDragMode=function(t){return this.set("dmode",t)},e.prototype.getDragMode=function(){return this.get("dmode")||""},e.prototype.setSymbolOverride=function(t,e){var n,o;void 0===e&&(e={}),this.set(((n={})[og]=null!=(o=(0,b.isString)(t)?[t]:t)?o:0,n),e)},e.prototype.getSymbolOverride=function(){return this.get(og)},e.prototype.find=function(t){var e,n=[],o=null==(e=this.view)?void 0:e.$el.find(t);return null==o||o.each(function(t){var e=o.eq(t).data("model");e&&n.push(e)}),n},e.prototype.findType=function(t,e){void 0===e&&(e={});var n=[],o=oc(t),r=ou(e),i=function(t){for(var e=t.models,a=0;a<e.length;a++){var s=e[a];if(o(s)&&(n.push(s),r&&n.length>=r)||i(s.components()))return!0}return!1};return i(this.components()),n},e.prototype.findFirstType=function(t){return this.findType(t,{max:1}).at(0)},e.prototype.closest=function(t){var e,n=null==(e=this.view)?void 0:e.$el.closest(t);return(null==n?void 0:n.length)?n.data("model"):void 0},e.prototype.closestType=function(t){for(var e=oc(t),n=this.parent();n&&!e(n);)n=n.parent();return n},e.prototype.contains=function(t){var e=!1;if(!t)return e;var n=function(o){e||o.forEach(function(o){o===t&&(e=!0),e||n(o.components())})};return n(this.components()),e},e.prototype.tagUpdated=function(){this.trigger("rerender")},e.prototype.replaceWith=function(t,e){void 0===e&&(e={});var n=this.collection,o=n.indexOf(this);n.remove(this);var r=n.add(t,oa(oa({},e),{at:o}));return(0,b.isArray)(r)?r:[r]},e.prototype.attrUpdated=function(t,e,n){var o=this;void 0===n&&(n={});var r=this.get("attributes"),i=r.class;i&&this.setClass(i),delete r.class;var a=r.style;a&&this.setStyle(a,n),delete r.style;var s=tl(oa({},this.previous("attributes")),this.get("attributes"));(0,b.keys)(s).forEach(function(t){var e,r="attributes:".concat(t);o.trigger("change:".concat(r),o,s[t],n),null==(e=o.em)||e.trigger("".concat(ov,":").concat(r),o,s[t],n)})},e.prototype.setAttributes=function(t,e){return void 0===e&&(e={skipWatcherUpdates:!1,fromDataSource:!1}),this.set("attributes",oa({},t),e),this},e.prototype.addAttributes=function(t,e){void 0===e&&(e={});var n=this.dataResolverWatchers.getValueOrResolver("attributes",this.getAttributes({noClass:!0,noStyle:!0}));return this.setAttributes(oa(oa({},n),t),e)},e.prototype.removeAttributes=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var n=Array.isArray(t)?t:[t],o=this.getAttributes();return n.map(function(t){return delete o[t]}),this.setAttributes(o,e)},e.prototype.getStyle=function(e,n){var o=this.em,r=(0,b.isString)(e),i=r?e:"",a=r?n:e,s=!!(null==a?void 0:a.skipResolve);if(of(o)&&!(null==a?void 0:a.inline)){var l=o.get("state"),c=o.Css.getIdRule(this.getId(),oa({state:l},a));return(this.rule=c,c)?c.getStyle(i,{skipResolve:s}):{}}return t.prototype.getStyle.call(this,i,{skipResolve:s})},e.prototype.setStyle=function(e,n){var o=this;void 0===e&&(e={}),void 0===n&&(n={});var r=this.opt,i=this.em;if(!of(i)||r.temporary||n.inline)e=t.prototype.setStyle.apply(this,arguments);else{var a=this.get("style")||{};e=(0,b.isString)(e)?this.parseStyle(e):e,e=oa(oa({},a),e);var s=i.get("state"),l=i.Css,c=this.getStyle(oa(oa({},n),{skipResolve:!0}));this.rule=l.setIdRule(this.getId(),e,oa({state:s},n));var u=tl(c,e);this.set("style","",{silent:!0}),(0,b.keys)(u).forEach(function(t){return o.trigger("change:style:".concat(t))})}return r.temporary||this.__onStyleChange(n.addStyle||e,n),e},e.prototype.getAttributes=function(t){void 0===t&&(t={});var e=this.em,n=[],o=oa({},this.get("attributes")),r=(null==t?void 0:t.skipResolve)?this.dataResolverWatchers.getValueOrResolver("attributes",o):o,i=null==e?void 0:e.Selectors,a=this.getId();
vendor: 5,789 bytes, line 1
1if(t.noClass?delete r.class:(this.classes.forEach(function(t){return n.push((0,b.isString)(t)?t:t.getName())}),n.length&&(r.class=n.join(" "))),!t.noStyle){var s=this.getStyle({inline:!0});tC(s)&&!tx(s)&&(r.style=this.styleToString({inline:!0}))}if(!(0,b.has)(r,"id")){var l=!1;(of(e)||!(0,b.isEmpty)(this.getStyle()))&&(l=!!(null==i?void 0:i.get(a,i.Selector.TYPE_ID))),(eG(this)||this.get("script-export")||this.get("script"))&&(l=!0),l&&(r.id=a)}return r},e.prototype.addClass=function(t){var e=this.em.Selectors.addClass(t);return this.classes.add(e)},e.prototype.setClass=function(t){return this.classes.reset(),this.addClass(t)},e.prototype.removeClass=function(t){var e=[];t=(0,b.isArray)(t)?t:[t];var n=this.classes,o=nB.TYPE_CLASS;return t.forEach(function(t){t.split(" ").forEach(function(t){var r=n.where({name:t,type:o})[0];r&&e.push(n.remove(r))})}),e},e.prototype.getClasses=function(){var t=this.getAttributes().class;return t?t.split(" "):[]},e.prototype.initClasses=function(t,e,n){void 0===n&&(n={});var o=this.get("attributes")||{},r=o.class,i=os(o,["class"]),a=[this,"change:classes",this.initClasses],s=this.get("classes")||r||[],l=(0,b.isString)(s)?s.split(" "):s;this.stopListening.apply(this,a);var c=this.normalizeClasses(l),u=new n$([]);return this.set("classes",u,n),u.add(c),u.on("add remove reset",this.__upSymbCls),r&&c.length&&this.set("attributes",i),this.listenTo.apply(this,a),this},e.prototype.initComponents=function(){var t=[this,"change:components",this.initComponents];this.stopListening.apply(this,t);var e=new or([],this.opt);e.parent=this;var n=this.get("components"),o=!this.opt.avoidChildren;return this.set("components",e),o&&n&&e.add((0,b.isFunction)(n)?n(this):n,this.opt),e.on("add remove reset",this.__upSymbComps),this.listenTo.apply(this,t),this},e.prototype.initTraits=function(t){var e=this,n=this.em,o="change:traits";this.off(o,this.initTraits),this.__loadTraits();var r=oa({},this.get("attributes")),i=this.traits;i.each(function(t){var n=t.getName(),o=t.getInitValue();t.changeProp?(0,b.isUndefined)(e.get(n))&&e.set(n,o):n&&o&&(r[n]=o)});var a=this.dataResolverWatchers.getValueOrResolver("attributes",r);return i.length&&this.setAttributes(a),this.on(o,this.initTraits),t&&n&&n.trigger(pi.toggled),this},e.prototype.initScriptProps=function(){if(!this.opt.temporary){var t="script-props",e=["change:".concat(t),this.initScriptProps];this.off.apply(this,e);var n=this.previous(t)||[],o=this.get(t)||[],r=n.map(function(t){return"change:".concat(t)}).join(" "),i=o.map(function(t){return"change:".concat(t)}).join(" ");r&&this.off(r,this.__scriptPropsChange),i&&this.on(i,this.__scriptPropsChange),this.on.apply(this,e)}},e.prototype.__scriptPropsChange=function(t,e,n){void 0===n&&(n={}),n.avoidStore||this.trigger("rerender")},e.prototype.append=function(t,e){void 0===e&&(e={});var n=((0,b.isArray)(t)?ol([],t,!0):[t]).map(function(t){return(0,b.isString)(t)||t.collection&&t.collection.remove(t,{temporary:!0}),t});return this.components().add(n,oa({action:pr.add},e))},e.prototype.components=function(t,e){void 0===e&&(e={});var n=this.get("components");return(0,b.isUndefined)(t)?n:(n.reset(void 0,e),t?this.append(t,e):[])},e.prototype.getChildAt=function(t){return this.components().at(t||0)||void 0},e.prototype.getLastChild=function(){var t=this.components();return t.at(t.length-1)||null},e.prototype.empty=function(t){return void 0===t&&(t={}),this.components().reset(void 0,t),this},e.prototype.parent=function(t){void 0===t&&(t={});var e=this.collection||t.prev&&this.prevColl;return e?e.parent:void 0},e.prototype.parents=function(){var t=this.parent();return t?[t].concat(t.parents()):[]},e.prototype.scriptUpdated=function(){this.set("scriptUpdated",1)},e.prototype.initToolbar=function(){var t=this.em,e=t&&t.getConfig().stylePrefix||"";if(!this.get("toolbar")&&t){var n=[];this.collection&&n.push({label:t.getIcon("arrowUp"),command:function(t){return t.runCommand("core:component-exit",{force:1})}}),this.get("draggable")&&n.push({attributes:{class:"".concat(e,"no-touch-actions"),draggable:!0},label:t.getIcon("move"),command:"tlb-move"}),this.get("copyable")&&n.push({label:t.getIcon("copy"),command:"tlb-clone"}),this.get("removable")&&n.push({label:t.getIcon("delete"),command:"tlb-delete"}),this.set("toolbar",n)}},e.prototype.__loadTraits=function(t,e){void 0===e&&(e={});var n=t||this.traits;if(!(n instanceof n6)){n=(0,b.isFunction)(n)?n(this):n;var o=new n6([],this.opt);o.setTarget(this),n.length&&o.add(n),this.set({traits:o},e)}return this},e.prototype.getTraits=function(){return this.__loadTraits(),ol([],this.traits.models,!0)},e.prototype.setTraits=function(t){var e=(0,b.isArray)(t)?t:[t];return this.set({traits:e}),this.getTraits()},e.prototype.getTrait=function(t){return this.getTraits().filter(function(e){return e.get("id")===t||e.get("name")===t})[0]||null},e.prototype.updateTrait=function(t,e){var n,o=this.getTrait(t);return o&&o.set(e),null==(n=this.em)||n.trigger(pi.toggled),this},e.prototype.getTraitIndex=function(t){var e=this.getTrait(t);return e?this.traits.indexOf(e):-1},e.prototype.removeTrait=function(t){var e,n=this,o=((0,b.isArray)(t)?t:[t]).map(function(t){return n.getTrait(t)}),r=this.traits,i=o.length?r.remove(o):[];return null==(e=this.em)||e.trigger(pi.toggled),(0,b.isArray)(i)?i:[i]},e.prototype.addTrait=function(t,e){void 0===e&&(e={}),this.__loadTraits();var n,o=this.traits.add(t,e);return null==(n=this.em)||n.trigger(pi.toggled),(0,b.isArray)(o)?o:[o]},e.prototype.normalizeClasses=function(t){var e=[],n=this.em,o=null==n?void 0:n.Selectors;return o?t.models?ol([],t.models,!0):(t.forEach(function(t){return e.push(o.add(t))}),e):[]},e.prototype.clone=function(t){void 0===t&&(t={});var e,n=this.em,o=this.dataResolverWatchers.getProps(this.attributes),r
1=oa({},this.opt),i=this.getId(),a=null==n?void 0:n.Css;o.components=[],o.classes=[],o.traits=[],eK(this)&&(t.symbol=!0),this.get("components").each(function(e,n){o.components[n]=e.clone(oa(oa({},t),{_inner:1}))}),this.get("traits").each(function(t,e){o.traits[e]=t.clone()}),this.get("classes").each(function(t,e){o.classes[e]=t.get("name")}),o.status="",r.collection=null,r.forCloning=!0;var s=new this.constructor(o,r),l="#".concat(s.getId());(a?a.getRules("#".concat(i)):[]).forEach(function(t){var e=t.clone();e.set("selectors",[l]),a.getAll().add(e)}),s.set(od,0);var c=eJ(this),u=eX(this);if(!t.symbol&&(c||u))s.set(oh,0),s.set(od,0);else if(c){var p=null!=(e=eX(c))?e:[];c.set(od,ol(ol([],p,!0),[s],!1)),eY(s)}else t.symbol&&(e$(this)?(this.set(od,ol(ol([],u,!0),[s],!1)),s.set(oh,this),eY(s)):t.symbolInv?(this.set(od,[s]),s.set(oh,this),[this,s].map(function(t){return eY(t)})):(s.set(od,[this]),[this,s].map(function(t){return eY(t)}),this.set(oh,s)));var f=pi.clone;return n&&n.trigger(f,s),this.trigger(f,s),s},e.prototype.getName=function(t){void 0===t&&(t={});var e=this.em,n=this.attributes,o=n.type,r=n.tagName,i=n.name,a=o||r,s=o?"":r,l="domComponents.names.",c=i&&(null==e?void 0:e.t("".concat(l).concat(i))),u=s&&(null==e?void 0:e.t("".concat(l).concat(s))),p=e&&(e.t("".concat(l).concat(o))||e.t("".concat(l).concat(r))),f=this.get("custom-name");return(t.noCustom?"":f)||c||i||u||tO(s)||p||tO(a)},e.prototype.setName=function(t,e){void 0===e&&(e={}),this.set("custom-name",t,e)},e.prototype.getIcon=function(){var t=this.get("icon");return t?t+" ":""},e.prototype.toHTML=function(t){void 0===t&&(t={});var e=t.tag||this.get("tagName");delete t.tag;var n=this.__attrToString(t),o=this.getInnerHTML(t),r=!o&&this.get("void"),i="<".concat(e).concat(n?" ".concat(n):"").concat(r?"/":"",">").concat(o);return r||(i+="</".concat(e,">")),i},e.prototype.getInnerHTML=function(t){return this.__innerHTML(t)},e.prototype.__innerHTML=function(t){void 0===t&&(t={});var e=this.components();return e.length?e.map(function(e){return e.toHTML(t)}).join(""):this.content},e.prototype.__attrToString=function(t){void 0===t&&(t={});var e=[],n=t.attributes,o=this.getAttrToHTML(t);if(n&&((0,b.isFunction)(n)?o=n(this,o)||{}:tC(n)&&(o=n)),t.withProps){var r=this.toJSON();(0,b.forEach)(r,function(t,e){"_"!==e[0]&&0>["classes","attributes","components"].indexOf(e)&&(o["data-gjs-".concat(e)]=(0,b.isArray)(t)||tC(t)?JSON.stringify(t):(0,b.isBoolean)(t)?"".concat(t):t)})}for(var i in o){var a=o[i];if(!(0,b.isUndefined)(a)&&null!==a)if((0,b.isBoolean)(a))a&&e.push(i);else{var s="";if(t.altQuoteAttr&&(0,b.isString)(a)&&a.indexOf('"')>=0)s="'".concat(tb(a),"'");else{var l=(0,b.isString)(a)?tm(a):a;s='"'.concat(l,'"')}e.push("".concat(i,"=").concat(s))}}return e.join(" ")},e.prototype.getAttrToHTML=function(t){var e=this.getAttributes();return of(this.em)&&(null==t?void 0:t.keepInlineStyle)!==!0&&delete e.style,e},e.prototype.toJSON=function(e){void 0===e&&(e={});var n=t.prototype.toJSON.call(this,e,{attributes:this.getAttributes()});if(delete n.dataResolverWatchers,delete n.attributes.class,delete n.toolbar,delete n.traits,delete n.status,delete n.open,delete n._undoexc,delete n.delegate,this.collectionsStateMap&&Object.getOwnPropertyNames(this.collectionsStateMap).length>0&&(delete n[oh],delete n[og],delete n[od]),!e.fromUndo){var o=n[oh],r=n[od];r&&(0,b.isArray)(r)&&(n[od]=r.filter(function(t){return t}).map(function(t){return t.getId?t.getId():t})),o&&!(0,b.isString)(o)&&(n[oh]=o.getId())}return this.em.getConfig().avoidDefaults&&this.getChangedProps(n),n},e.prototype.getChangedProps=function(t){var e=t||tL.Model.prototype.toJSON.apply(this),n=(0,b.result)(this,"defaults");return(0,b.forEach)(n,function(t,n){-1===["type"].indexOf(n)&&e[n]===t&&delete e[n]}),(0,b.isEmpty)(e.type)&&delete e.type,(0,b.forEach)(["attributes","style"],function(t){(0,b.isEmpty)(n[t])&&(0,b.isEmpty)(e[t])&&delete e[t]}),(0,b.forEach)(["classes","components"],function(t){(!e[t]||(0,b.isEmpty)(n[t])&&!e[t].length)&&delete e[t]}),e},e.prototype.getId=function(){var t,e,n,o,r=this.get("attributes")||{},i=(t=this,o=(n=function(t){var e=t.collectionsStateMap;if(!e)return!1;var n=Object.keys(e);if(!n.length)return!1;var o=eJ(t);return!!o&&o!==t&&Object.keys(o.collectionsStateMap).every(function(t){return n.includes(t)})}(t))?(e=eJ(t))?e.getId():"":null,{shouldSync:n,itemId:o}),a=i.shouldSync,s=i.itemId;return a&&(r.id=s),r.id||this.ccid||this.cid},e.prototype.setId=function(t,e){return this.addAttributes({id:t},e),this},e.prototype.getEl=function(t){var e=this.getView(t);return e&&e.el},e.prototype.getView=function(e){return t.prototype.getView.call(this,e)},e.prototype.getCurrentView=function(){var t=this.em.getCurrentFrame(),e=null==t?void 0:t.model;return this.getView(e)},e.prototype.__getScriptProps=function(){var t=this.props();return(this.get("script-props")||[]).reduce(function(e,n){return e[n]=t[n],e},{})},e.prototype.getScriptString=function(t){var e=this,n=t||this.get("script")||"";if(!n)return n;if(this.get("script-props"))n=n.toString().trim();else{if((0,b.isFunction)(n)){var o=n.toString().trim();n=(o=o.slice(o.indexOf("{")+1,o.lastIndexOf("}"))).trim()}var r=this.em.getConfig(),i=op(r.tagVarStart||"{[ "),a=op(r.tagVarEnd||" ]}"),s=RegExp("".concat(i,"([\\w\\d-]*)").concat(a),"g");n=n.replace(s,function(t,n){e.scriptUpdated();var o=e.attributes[n]||"";return(0,b.isArray)(o)||"object"==typeof o?JSON.stringify(o):o})}return n},e.prototype.emitUpdate=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];var r=this.em,i=ov+(t?":".concat(t):""),a=t&&this.get(t);t&&this.updated.apply(this,ol([t,a,t&&this.previous(t)],n,!1)),this.trigger.apply(this,ol([i],n,!1)),r&&r.trigger.apply(r,ol([i,this],n,!1)),["components","classes"].indexOf(t)>=0&&this.__propSelfToParent({component:this,changed:((e={})[t]=a,e),options:n[2]||n[1]||{}})},e.prototype.emitWithEditor=function(t,e,n){[this.em,this].forEac
1h(function(o){return null==o?void 0:o.trigger(t,e,n)})},e.prototype.onAll=function(t){return(0,b.isFunction)(t)&&(t(this),this.components().forEach(function(e){return e.onAll(t)})),this},e.prototype.forEachChild=function(t){(0,b.isFunction)(t)&&this.components().forEach(function(e){t(e),e.forEachChild(t)})},e.prototype.remove=function(t){var e=this;void 0===t&&(t={});var n=this.em,o=this.collection,r=function(){o&&o.remove(e,oa({action:pr.remove},t)),o||(e.components("",t),e.components().removeChildren(e,void 0,t))},i=oa({},t);return[this,n].map(function(t){return t.trigger(pi.removeBefore,e,r,i)}),i.abort||r(),this},e.prototype.destroy=function(e){return this.stopListening(this.components(),"add remove reset",this.syncOnComponentChange),this.dataResolverWatchers.destroy(),this.__onDestroy(),t.prototype.destroy.call(this,e)},e.prototype.move=function(t,e){if(void 0===e&&(e={}),t){var n=e.at,o=this.index(),r=t===this.parent();if(!r||o!==n&&o!==n-1){r&&n&&n>o&&(e.at=n-1);var i=pr.move;this.remove({action:i,temporary:1}),t.append(this,oa({action:i},e)),this.emitUpdate()}}return this},e.prototype.isInstanceOf=function(t){var e,n,o=null==(n=null==(e=this.em)?void 0:e.Components.getType(t))?void 0:n.model;if(!o)return!1;var r=this.constructor.typeExtends;return this instanceof o||r.has(t)},e.prototype.isChildOf=function(t){for(var e=(0,b.isString)(t),n=this.parent();n;){if(e){if(n.isInstanceOf(t))return!0}else if(n===t)return!0;n=n.parent()}return!1},e.prototype.resetId=function(t){void 0===t&&(t={});var n=this.em,o=this.getId();if(!o)return this;var r=e.createId(this);this.setId(r);var i=null==n?void 0:n.Css.getIdRule(o),a=null==i?void 0:i.get("selectors").at(0);return null==a||a.set("name",r),this},e.prototype._getStyleRule=function(t){var e=(void 0===t?{}:t).id,n=this.em,o=e||this.getId();return null==n?void 0:n.Css.getIdRule(o)},e.prototype._getStyleSelector=function(t){var e=this._getStyleRule(t);return null==e?void 0:e.get("selectors").at(0)},e.prototype._moveInlineStyleToRule=function(){var t=this.get("style"),e=(0,b.isString)(t)&&t.length>0||tC(t)&&Object.keys(t).length>0;of(this.em)&&e&&this.addStyle(tC(t)?this.dataResolverWatchers.getValueOrResolver("styles",t):t,{avoidStore:!0,noUndo:!0})},e.prototype._idUpdated=function(t,n,o){if(void 0===o&&(o={}),!o.idUpdate){var r=this.ccid,i=(this.get("attributes")||{}).id,a=(this.previous("attributes")||{}).id||r,s=e.getList(this);if(s[i]||!i&&a)return this.setId(a,{idUpdate:!0});delete s[a],s[i]=this,this.ccid=i;var l=this._getStyleSelector({id:a});l&&l.set({name:i,label:i})}},e.getDefaults=function(){return(0,b.result)(this.prototype,"defaults")},e.isComponent=function(t,e){return{tagName:ti(t.tagName)}},e.ensureInList=function(t){var n,o=e.getList(t),r=t.id||t.getId(),i=o[r];if(i){if(i!==t){var a=null==(n=t.em)?void 0:n.Components.config.keepAttributeIdsCrossPages,s=i.page,l=t.page,c=e.getIncrementId(r,o);s&&l&&s===l||!a?t.setId(c):t.set({id:c}),o[c]=t}}else e.setListId(o,r,t);t.components().forEach(function(t){return e.ensureInList(t)})},e.createId=function(t,n){void 0===n&&(n={});var o,r,i=e.getList(t),a=null==(o=t.em)?void 0:o.Components.config.keepAttributeIdsCrossPages,s=n.idMap,l=(t.get("attributes")||{}).id,c=t.id,u=null!=c?c:l;if(c)(r=e.getIncrementId(c,i,n))!==c&&t.set({id:r});else if(l){var p=i[l];if(p&&p!==t){var f=p.page,d=t.page;r=e.getIncrementId(l,i,n),f&&d&&f===d||!a?t.setId(r):t.set({id:r})}else r=l}else r=e.getNewId(i);return u&&u!==r&&((void 0===s?{}:s)[u]=r),e.setListId(i,r,t),r},e.getNewId=function(t){for(var n=e.getListCount(t).toString().length+2,o=(Math.random()+1.1).toString(36).slice(-n),r="i".concat(o);t[r];)r=e.getNewId(t);return r},e.getListCount=function(t){var e=t[om];return(0,b.isUndefined)(e)&&(e=Object.keys(t).length,Object.defineProperty(t,om,{configurable:!0,writable:!0,value:e})),e},e.setListId=function(t,n,o){t[n]||(t[om]=e.getListCount(t)+1),t[n]=o},e.getIncrementId=function(t,e,n){void 0===n&&(n={});var o=n.keepIds,r=1,i=t;if(0>(void 0===o?[]:o).indexOf(t))for(;e[i];)r++,i="".concat(t,"-").concat(r);return i},e.getList=function(t){var e,n,o;return null!=(o=null==(n=null==(e=t.em)?void 0:e.Components)?void 0:n.componentsById)?o:{}},e.checkId=function(t,n,o,r){void 0===n&&(n=[]),void 0===o&&(o={}),void 0===r&&(r={}),r.updatedIds=r.updatedIds||{};var i=(0,b.isArray)(t)?t:[t],a=r.keepIds,s=void 0===a?[]:a,l=r.idM
1ap,c=void 0===l?{}:l,u=r.updatedIds;return i.forEach(function(t){t.attributes;var i=t.attributes,a=void 0===i?{}:i,l=t.components,p=a.id;if(p&&o[p]&&0>s.indexOf(p)){var f=e.getIncrementId(p,o);u[p]=u[p]?ol(ol([],u[p],!0),[t],!1):[t],c[p]=f,a.id=f,(0,b.isArray)(n)&&n.forEach(function(t){var e=t.selectors;e.forEach(function(t,n){t==="#".concat(p)&&(e[n]="#".concat(f))})})}l&&e.checkId(l,n,o,r)}),{updatedIds:r.updatedIds}},e.typeExtends=new Set,e}(nH);var ow=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),o_=function(){return(o_=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oC="head",ox=["title","style","base","link","meta","script","noscript"],oO=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ow(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return o_(o_({},t.prototype.defaults),{type:oC,tagName:oC,draggable:!1,highlightable:!1,droppable:function(t){var e=t.tagName;return!e||ox.includes(ti(e))}})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===oC},e}(ob),oS=function(){function t(t,e){var n;void 0===t&&(t=50),this.dragging=!1,this.lastMaxHeight=0,this.zoom=1,this.rectIsInScrollIframe=!1,this.autoscrollLimit=t,this.lastMaxHeight=null!=(n=null==e?void 0:e.lastMaxHeight)?n:0,this.onScroll=null==e?void 0:e.onScroll,this.rectIsInScrollIframe=!!(null==e?void 0:e.rectIsInScrollIframe),(0,b.bindAll)(this,"start","autoscroll","updateClientY","stop")}return t.prototype.start=function(t,e,n){var o=this;this.eventEl=t,this.scrollEl=e,this.lastMaxHeight=(null==n?void 0:n.lastMaxHeight)||1/0,this.zoom=(null==n?void 0:n.zoom)||1,this.ignoredElement=null==n?void 0:n.ignoredElement,setTimeout(function(){o.toggleAutoscrollFx(!0),requestAnimationFrame(o.autoscroll)},0)},t.prototype.autoscroll=function(){var t,e,n=this,o=this.scrollEl;if(this.dragging&&o){if(void 0===this.lastClientY)return void setTimeout(function(){requestAnimationFrame(n.autoscroll)},50);var r=null!=(t=this.lastClientY)?t:0,i=this.autoscrollLimit,a=this.getEventElHeight()-i,s=0;r<i&&(s+=r-i),r>a&&(s+=r-a);var l=this.getElScrollTop(o);0!==(s=Math.max(s=Math.min(s,this.lastMaxHeight-l),-l))&&(o.scrollBy({top:s,behavior:"auto"}),null==(e=this.onScroll)||e.call(this)),requestAnimationFrame(this.autoscroll)}},t.prototype.getEventElHeight=function(){var t=this.eventEl;return t?t.getBoundingClientRect().height:0},t.prototype.updateClientY=function(t){var e=t.target;if(!(this.ignoredElement&&this.ignoredElement.contains(e))){var n=this.scrollEl;t.preventDefault();var o=this.rectIsInScrollIframe?0:this.getElScrollTop(n);this.lastClientY=R(t).clientY*this.zoom-o}},t.prototype.getElScrollTop=function(t){return(t instanceof HTMLElement?t.scrollTop:null==t?void 0:t.scrollY)||0},t.prototype.toggleAutoscrollFx=function(t){this.dragging=t;var e=this.eventEl;if(e){var n=t?"on":"off",o={on:U,off:B};o[n](e,"mousemove dragover",this.updateClientY),o[n](e,"mouseup",this.stop)}},t.prototype.stop=function(){this.toggleAutoscrollFx(!1),this.lastClientY=void 0,this.ignoredElement=void 0},t}(),oT=function(){function t(t,e){void 0===e&&(e={}),this._dropAreaConfig={ratio:1,minUndroppableDimension:0,maxUndroppableDimension:0},this._model=t,this._dragSource=e}return Object.defineProperty(t.prototype,"model",{get:function(){return this._model},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dragSource",{get:function(){return this._dragSource},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"dropArea",{get:function(){var t,e;return this.getParent()?null==(e=this.nodeDimensions)?void 0:e.getDropArea(this._dropAreaConfig):null==(t=this.nodeDimensions)?void 0:t.clone()}
1,enumerable:!1,configurable:!0}),t.prototype.isWithinDropBounds=function(t,e){return!!this.dropArea&&this.dropArea.isWithinBounds(t,e)},t.prototype.equals=function(t){return!!(null==t?void 0:t._model)&&this._model===t._model},t.prototype.adjustDimensions=function(t){var e,n;(0!==t.topDifference||0!==t.leftDifference)&&(null==(e=this.nodeDimensions)||e.adjustDimensions(t),null==(n=this.childrenDimensions)||n.forEach(function(e){return e.adjustDimensions(t)}))},t}(),oP=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oE=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.displayCache=new Map,e}return oP(e,t),e.prototype.getChildren=function(){var t=this;return this.model.components().map(function(e){return new t.constructor(e)})},e.prototype.getParent=function(){var t=this.model.parent();return t?new this.constructor(t):null},e.prototype.addChildAt=function(t,e,n){if(void 0===n&&(n={action:"add-component"}),(null==(r=null==(o=this.model)?void 0:o.isInstanceOf)?void 0:r.call(o,"text"))&&(null==(a=null==(i=null==t?void 0:t.model)?void 0:i.get)?void 0:a.call(i,"textable")))return null==(u=null==(c=null==(l=null==(s=this.model)?void 0:s.getView)?void 0:l.call(s))?void 0:c.insertComponent)?void 0:u.call(c,null==t?void 0:t.model,{action:n.action});var o,r,i,a,s,l,c,u,p=this.model.components().add(t.model,{at:e,action:n.action});return new this.constructor(p)},e.prototype.removeChildAt=function(t,e){void 0===e&&(e={temporary:!1});var n=this.model.components().at(t);n&&this.model.components().remove(n,e)},e.prototype.indexOfChild=function(t){return this.getIndex(t)},e.prototype.getIndex=function(t){var e=this.getChildren();return e?e.findIndex(function(e){return e.model===t.model}):-1},e.prototype.canMove=function(t,e){return this.model.em.Components.canMove(this.model,t.model,e).result},e.prototype.equals=function(t){return!!(null==t?void 0:t._model)&&this._model.getId()===t._model.getId()},e.prototype.restNodeState=function(){this.clearState();var t=this.model;this.setContentEditable(!1),t.em.getEditing()===t&&this.disableEditing()},e.prototype.setContentEditable=function(t){this.element&&this.isTextNode()&&(this.element.contentEditable=t?"true":"false")},e.prototype.disableEditing=function(){var t,e;null==(e=null==(t=this.view)?void 0:t.disableEditing)||e.call(t)},e.prototype.clearState=function(){var t,e;null==(e=(t=this.model).set)||e.call(t,"status","")},e.prototype.setSelectedParentState=function(){var t,e;null==(e=(t=this.model).set)||e.call(t,"status","selected-parent")},e.prototype.isTextNode=function(){var t,e;return null==(e=(t=this.model).isInstanceOf)?void 0:e.call(t,"text")},e.prototype.isTextable=function(){var t,e;return null==(e=(t=this.model).get)?void 0:e.call(t,"textable")},e}(oT),ok=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oj=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._dropAreaConfig={ratio:.8,minUndroppableDimension:1,maxUndroppableDimension:15},e}return ok(e,t),Object.defineProperty(e.prototype,"view",{get:function(){var t,e;return null==(e=(t=this.model).getView)?void 0:e.call(t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){var t,e;return null==(e=(t=this.model).getEl)?void 0:e.call(t)}
1,enumerable:!1,configurable:!0}),e}(oE),oA=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oM=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return oA(e,t),e.prototype.canMove=function(t,e){var n=this,o=t._dragSource,r=o.model,i=o.content,a=o.dragDef,s=!r||!this.isSourceSameSymbol(r),l=((0,b.isFunction)(i)?a:i)||t.model;return Array.isArray(l)?s&&l.every(function(t,o){return n.canMoveSingleContent(t,e+o)}):s&&this.canMoveSingleContent(l,e)},e.prototype.canMoveSingleContent=function(t,e){return this.model.em.Components.canMove(this.model,t,e).result},e.prototype.addChildAt=function(t,e){var n=t._dragSource.content,o=this.isTextNode()&&t.isTextable(),r=(0,b.isFunction)(n)?n():n;return Array.isArray(r)?this.addMultipleChildren(r,e,o):this.addSingleChild(r,e,o)},e.prototype.addSingleChild=function(t,e,n){var o,r,i,a,s;return s=n?null==(a=null==(i=null==(r=null==(o=this.model)?void 0:o.getView)?void 0:r.call(o))?void 0:i.insertComponent)?void 0:a.call(i,t,{action:"add-component"}):this.model.components().add(t,{at:e,action:"add-component"}),new this.constructor(s)},e.prototype.addMultipleChildren=function(t,e,n){var o,r=this;return t.forEach(function(t,i){o=r.addSingleChild(t,e+i,n)}),o},e.prototype.isSourceSameSymbol=function(t){if(eG(this.model)){var e=e0(this.model);if((e$(e)?e:eJ(e))===t)return!0}return!1},Object.defineProperty(e.prototype,"content",{set:function(t){this._dragSource.content=t},enumerable:!1,configurable:!0}),e}(oj);!function(t){t.Vertical="Vertical",t.Horizontal="Horizontal",t.BothDirections="BothDirections"}(pb||(pb={}));var oD=function(){return(oD=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oL=function(){function t(t,e){var n=this;this.em=t,this.canvas=t.Canvas;var o=e||this.canvas.getFrames().map(function(t){return t.getComponent().getEl()}),r=Array.isArray(o)?o:[o];this.el=r[0],this.counter=0,(0,b.bindAll)(this,"handleDragEnter","handleDragOver","handleDrop","handleDragLeave","handleDragEnd"),r.forEach(function(t){return n.toggleEffects(t,!0)})}return t.prototype.toggleEffects=function(t,e){var n={on:U,off:B},o=e?"on":"off";n[o](t,"dragenter",this.handleDragEnter),n[o](t,"dragover",this.handleDragOver),n[o](t,"drop",this.handleDrop),n[o](t,"dragleave",this.handleDragLeave)},t.prototype.__customTglEff=function(t){var e,n=t?U:B,o=this.el.ownerDocument,r=null==(e=o.defaultView)?void 0:e.frameElement;this.getSorterOptions=t?function(t){return{legacyOnStartSort:function(){U(r,"pointermove",t.onMove)},legacyOnEnd:function(){B(r,"pointermove",t.onMove)},customTarget:function(t){var e=t.event;return o.elementFromPoint(e.clientX,e.clientY)}}}:void 0,n(r,"pointerenter",this.handleDragEnter),n(r,"pointermove",this.handleDragOver),n(document,"pointerup",this.handleDrop),n(r,"pointerout",this.handleDragLeave)},t.prototype.startCustom=function(){this.__customTglEff(!0)},t.prototype.endCustom=function(t){this.over?this.endDrop(t):this.__customTglEff(!1)},t.prototype.endDrop=function(t,e){var n=this.em,o=this.dragStop;this.counter=0,o&&o(t||!this.over),this.__customTglEff(!1),n.trigger(t5.dragEnd,e)},t.prototype.handleDragLeave=function(t){this.updateCounter(-1,t)},t.prototype.updateCounter=function(t,e){this.counter+=t,0===this.counter&&this.endDrop(!0,e)},t.prototype.handleDragEnter=function(t){var e,n,o,r=this,i=this.em,a=this.canvas,s=t.dataTransfer,l=i.get("dragSource");if(((null==l?void 0:l.content)||a.getConfig().allowExternalDrop)&&(this.updateCounter(1,t),!this.over)){this.over=!0;var c=i.Utils,u=(null==l?void 0:l.content)||"<br>";if(i.stopDefault(),i.inAbsoluteMode()){var p=i.Components.getWrapper(),f=p.append({})[0],d=i.Commands.run("core:component-drag",{event:t,guidesInfo:1,center:1,target:f,onEnd:function(t,e,n){var o;if(!n.cancelled&&u){o=p.append(u)[0];var i=a.getOffset(),l=f.getStyle(),c=l.top,d=l.left,h=l.position,g=L(t.target),v=parseInt("".concat(parseFloat(d)+g.x-i.left),10),y=parseInt("".concat(parseFloat(c)+g.y-i.top),10);
vendor: 4,112 bytes, line 1
1o.addStyle({left:v+"px",top:y+"px",position:h})}r.handleDragEnd(o,s),f.remove()}});o=function(e){return d.stop(t,{cancel:e})},this.setAbsoluteDragContent=function(t){return u=t}}else{var h=new c.ComponentSorter({em:i,treeClass:oM,containerContext:{container:this.el,containerSel:"*",itemSel:"*",pfx:"gjs-",placeholderElement:a.getPlacerEl(),document:this.el.ownerDocument},dragBehavior:{dragDirection:pb.BothDirections,nested:!0},positionOptions:{windowMargin:1,canvasRelative:!0},eventHandlers:{legacyOnEndMove:this.handleDragEnd}}),g=null==(e=this.getSorterOptions)?void 0:e.call(this,h);g&&(h.eventHandlers.legacyOnStartSort=g.legacyOnStart,h.eventHandlers.legacyOnEnd=g.legacyOnEnd,h.containerContext.customTarget=g.customTarget);var v=i.Components.getShallowWrapper(),y=null==v?void 0:v.append(u,{temporary:!0})[0],m=[{element:null==y?void 0:y.getEl(),dragSource:oD({model:y},l)}];h.startSort(m),this.sorter=h,this.draggedNode=null==(n=h.sourceNodes)?void 0:n[0],o=function(t){t?h.cancelDrag():h.endDrag()}}this.dragStop=o,i.trigger(t5.dragEnter,s,u)}},t.prototype.handleDragEnd=function(t,e){var n=this.em;this.over=!1,t&&(n.set("dragResult",t),n.trigger(t5.drop,e,t)),n.runDefault({preserveSelected:1})},t.prototype.handleDragOver=function(t){t.preventDefault(),this.em.trigger(t5.dragOver,t)},t.prototype.handleDrop=function(t){t.preventDefault();var e,n=t.dataTransfer,o=this.getContentByData(n).content||"";this.draggedNode&&(this.draggedNode.content=o),null==(e=this.setAbsoluteDragContent)||e.call(this,o),this.endDrop(!o,t)},t.prototype.getContentByData=function(t){var e=this.em,n=(null==t?void 0:t.types)||[],o=(null==t?void 0:t.files)||[],r=e.get("dragSource"),i=(null==t?void 0:t.getData("text"))||"";if(o.length){i=[];for(var a=0;a<o.length;a++){var s=o[a],l=s.type.split("/")[0];"image"==l&&i.push({type:l,file:s,attributes:{alt:s.name}})}}else if(null==r?void 0:r.content)i=r.content;else if((0,b.indexOf)(n,"text/html")>=0)i=t&&t.getData("text/html").replace(/<\/?meta[^>]*>/g,"");else if((0,b.indexOf)(n,"text/uri-list")>=0)i={type:"link",attributes:{href:i},content:i};else if((0,b.indexOf)(n,"text/json")>=0){var c=t&&t.getData("text/json");c&&(i=JSON.parse(c))}else 1===n.length&&"text/plain"===n[0]&&(i="<div>".concat(i,"</div>"));var u={content:i,setContent:function(t){u.content=t}};return e.trigger(t5.dragData,t,u),u},t}(),oI=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oN=function(){return(oN=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oR=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},oV=function(t){function e(e,n){var o=t.call(this,{model:e})||this;o.dragging=!1,o.loaded=!1,o.lastMaxHeight=0,o.tools={},(0,b.bindAll)(o,"startAutoscroll","stopAutoscroll","_emitUpdate");var r=o.el;o.module._config=oN(oN({},o.config||{}),{frameView:o}),o.frameWrapView=n,o.showGlobalTools=(0,b.debounce)(o.showGlobalTools.bind(o),50);var i=o.getCanvasModel();return o.listenTo(e,"change:head",o.updateHead),o.listenTo(i,"change:styles",o.renderStyles),e.view=o,tj(r,o),o.autoScroller=new oS(o.config.autoscrollLimit,{rectIsInScrollIframe:!0,onScroll:function(){o.getGlobalToolsEl().style.opacity="0",o.showGlobalTools(),o.em.Canvas.spots.refreshDbn()}}),o}return oI(e,t),Object.defineProperty(e.prototype,"tagName",{get:function(){return"iframe"},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"attributes",{get:function(){return{allowfullscreen:"allowfullscreen"}}
1,enumerable:!1,configurable:!0}),e.prototype.getBoxRect=function(){var t=this.el,e=this.module,n=e.getCanvasView(),o=e.getCoords(),r=t.getBoundingClientRect(),i=n.getCanvasOffset(),a=n.getViewportDelta(),s=e.getZoomMultiplier();return{x:(r.x-i.left-a.x-o.x)*s,y:(r.y-i.top-a.y-o.y)*s,width:r.width*s,height:r.height*s}},e.prototype.updateHead=function(){var t=this.model,e=this.getHead(),n=[],o=[],r=t.head,i=t.previous("head"),a=function(t){return void 0===t&&(t={}),Object.keys(t).sort().map(function(e){return"[".concat(e,'="').concat(t[e],'"]')}).join("")},s=function(t,e,n){t.forEach(function(t){var o=t.tag,r=t.attributes;e.some(function(t){return t.tag===o&&a(t.attributes)===a(r)})||n.push(t)})};s(r,i,o),s(i,r,n),n.forEach(function(t){var n,o=e.querySelector("".concat(t.tag).concat(a(t.attributes)));null==(n=null==o?void 0:o.parentNode)||n.removeChild(o)}),j(e,o)},e.prototype.getEl=function(){return this.el},e.prototype.getCanvasModel=function(){var t;return null==(t=this===null||void 0===this?void 0:this.em.Canvas)?void 0:t.getModel()},e.prototype.getWindow=function(){return this.getEl().contentWindow},e.prototype.getDoc=function(){return this.getEl().contentDocument},e.prototype.getHead=function(){return this.getDoc().querySelector("head")},e.prototype.getBody=function(){return this.getDoc().querySelector("body")},e.prototype.getWrapper=function(){return this.getBody().querySelector("[data-gjs-type=wrapper]")},e.prototype.getJsContainer=function(){return this.jsContainer||(this.jsContainer=P("div",{class:"".concat(this.ppfx,"js-cont")})),this.jsContainer},e.prototype.getToolsEl=function(){var t;return null==(t=this.frameWrapView)?void 0:t.elTools},e.prototype.getGlobalToolsEl=function(){return this.em.Canvas.getGlobalToolsEl()},e.prototype.getHighlighter=function(){return this._getTool("[data-hl]")},e.prototype.getBadgeEl=function(){return this._getTool("[data-badge]")},e.prototype.getOffsetViewerEl=function(){return this._getTool("[data-offset]")},e.prototype.getRect=function(){return this.rect||(this.rect=this.el.getBoundingClientRect()),this.rect},e.prototype.getOffsetRect=function(){var t=this.el,e=this.getBody(),n=e.scrollTop,o=e.scrollLeft,r=t.offsetHeight,i=t.offsetWidth;return{top:t.offsetTop,left:t.offsetLeft,height:r,width:i,scrollTop:n,scrollLeft:o,scrollBottom:n+r,scrollRight:o+i}},e.prototype._getTool=function(t){var e=this.tools,n=this.getToolsEl();return e[t]||(e[t]=n.querySelector(t)),e[t]},e.prototype.remove=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return this._toggleEffects(!1),this.tools={},null==(t=this.wrapper)||t.remove(),ep.prototype.remove.apply(this,e),this},e.prototype.startAutoscroll=function(){this.autoScroller.start(this.el,this.getWindow(),{lastMaxHeight:this.getWrapper().offsetHeight-this.el.offsetHeight,zoom:this.em.getZoomDecimal(),ignoredElement:this.em.Canvas.getSpotsEl()})},e.prototype.stopAutoscroll=function(){this.autoScroller.stop()},e.prototype.showGlobalTools=function(){this.getGlobalToolsEl().style.opacity=""},e.prototype.render=function(){var t=this.$el,e=this.ppfx,n=this.em;return t.attr({class:"".concat(e,"frame")}),this.renderScripts(),n.trigger("frame:render",this),this},e.prototype.renderScripts=function(){var t=this,e=this.el,n=this.model,o=this.em,r="frame:load",i={el:e,model:n,view:this},a=this.getCanvasModel(),s=function(n){var a;if(n.length>0){var l=n.shift(),c=P("script",oN({type:"text/javascript"},(0,b.isString)(l)?{src:l}:l));null==(a=e.contentDocument)||a.head.appendChild(c),c.hasAttribute("nomodule")&&"noModule"in HTMLScriptElement.prototype?s(n):c.onerror=c.onload=s.bind(null,n)}else null==o||o.trigger(t5.frameLoadHead,i),t.renderBody(),null==o||o.trigger(t5.frameLoadBody,i),null==o||o.trigger(r,i)};e.onload=function(){var e=t.config.frameContent;if(e){var n=t.getDoc();n.open(),n.write(e),n.close()}i.window=t.getWindow(),null==o||o.trigger("".concat(r,":before"),i),null==o||o.trigger(t5.frameLoad,i),t.renderHead(),s(oR([],a.get("scripts"),!0))}},e.prototype.renderStyles=function(t){void 0===t&&(t={});var e=this.getHead(),n=this.getCanvasModel(),o=function(t){return void 0===t&&(t=[]),t.map(function(t){return{tag:"link",attributes:oN({rel:"stylesheet"},(0,b.isString)(t)?{href:t}:t)}})},r=o(t.prev||n.previous("styles")),i=o(null==n?void 0:n.get("styles")),a=[],s=[],l=function(t,e,n){t.forEach(function(t){var o=t.attributes.href;e.some(function(t){return t.attributes.href===o})||n.push(t)})};l(i,r,s),l(r,i,a),a.forEach(function(t){var n,o=e.querySelector('link[href="'.concat(t.attributes.href,'"]'));null==(n=null==o?void 0:o.parentNode)||n.removeChild(o)}),j(e,s)},e.prototype.renderHead=function(){var t,e=this.model,n=this.em,o=e.root,r=null==(t=null==n?void 0:n.Components)?void 0:t.getType(oC).view;r&&(this.headView=new r({el:this.getHead(),model:o.head,config:oN(oN({},o.config),{frameView:this})}).render())},e.prototype.renderBody=function(){var t,e=this,n=this.config,o=this.em,r=this.model,i=this.ppfx,a=this.getBody(),s=this.getWindow(),l=r.hasAutoHeight(),c=o.config;s._isEditor=!0,this.renderStyles({prev:[]}),T(a,"<style>\n ".concat(c.baseCss||n.frameStyle||"","\n\n ").concat(l?"body { overflow: hidden }":"",'\n\n [data-gjs-type="wrapper"] {\n ').concat(!l?"min-height: 100vh;":"","\n padding-top: 0.001em;\n }\n\n .").concat(i,"dashed *[data-gjs-highlightable] {\n outline: 1px dashed rgba(170,170,170,0.7);\n outline-offset: -2px;\n }\n\n .").concat(i,"selected {\n outline: 2px solid #3b97e3 !important;\n outline-offset: -2px;\n }\n\n .").concat(i,"selected-parent {\n outline: 2px solid ").concat("#ffca6f","
1!important\n }\n\n .").concat(i,"no-select {\n user-select: none;\n -webkit-user-select:none;\n -moz-user-select: none;\n }\n\n .").concat(i,"freezed {\n opacity: 0.5;\n pointer-events: none;\n }\n\n .").concat(i,"no-pointer {\n pointer-events: none;\n }\n\n .").concat(i,"pointer-init {\n pointer-events: initial;\n }\n\n .").concat(i,"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(i,"grabbing {\n cursor: grabbing;\n cursor: -webkit-grabbing;\n }\n\n .").concat(i,"is__grabbing {\n overflow-x: hidden;\n }\n\n .").concat(i,"is__grabbing,\n .").concat(i,"is__grabbing * {\n cursor: grabbing !important;\n }\n\n ").concat(c.canvasCss||"","\n ").concat(c.protectedCss||"","\n </style>"));var u=r.root,p=((null==(t=null==o?void 0:o.Components)?void 0:t.getType("wrapper"))||{}).view;p&&((0,b.isFunction)(n.customRenderer)?n.customRenderer({editor:o.Editor,frame:r,window:s,frameView:this,onMount:function(t){e.wrapper=t,e._onRootMount(t)}}):(this.wrapper=new p({model:u,config:oN(oN({},u.config),{em:o,frameView:this})}).render(),this._onRootMount(this.wrapper)))},e.prototype._onRootMount=function(t){var e,n=this,o=this.config,r=this.em,i=this.model,a=this.getDoc(),s=a.body;T(s,t.el),T(s,new ew({collection:i.getStyles(),config:oN(oN({},r.Css.getConfig()),{frameView:this})}).render().el),T(s,this.getJsContainer()),U(s,"click",function(t){var e;return t&&(null==(e=t.target)?void 0:e.tagName)=="A"&&t.preventDefault()}),U(s,"submit",function(t){return t&&t.preventDefault()}),[{event:"keydown keyup keypress",class:"KeyboardEvent"},{event:"mousedown mousemove mouseup",class:"MouseEvent"},{event:"pointerdown pointermove pointerup",class:"PointerEvent"},{event:"wheel",class:"WheelEvent",opts:{passive:!o.infiniteCanvas}}].forEach(function(t){return t.event.split(" ").forEach(function(e){a.addEventListener(e,function(e){return n.el.dispatchEvent(k(e,t.class))},t.opts)})}),this._toggleEffects(!0),td(r)&&(this.droppable=new oL(r,null==(e=this.wrapper)?void 0:e.el)),this.loaded=!0,i.trigger("loaded")},e.prototype._toggleEffects=function(t){var e=this.getWindow();e&&(t?U:B)(e,"".concat("transitionend oTransitionEnd transitionend webkitTransitionEnd"," resize"),this._emitUpdate)},e.prototype._emitUpdate=function(){this.model._emitUpdated()},e}(ep),oF=function(){return(oF=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oH=function(){return{x:0,y:0}},oU=["x","y"],oB=function(){function t(t){return void 0===t&&(t={}),this.opts={snapGuides:{x:5,y:5},snapOffset:5,scale:1},(0,b.bindAll)(this,"drag","stop","keyHandle","handleScroll"),this.setOptions(t),this.delta=oH(),this.lastScroll=oH(),this.lastScrollDiff=oH(),this.startPointer=oH(),this.startPosition=oH(),this.globScrollDiff=oH(),this.currentPointer=oH(),this.position=oH(),this.guidesStatic=[],this.guidesTarget=[],this.docs=[],this}return t.prototype.setOptions=function(t){void 0===t&&(t={}),this.opts=oF(oF({},this.opts),t)},t.prototype.toggleDrag=function(t){var e=this.getDocumentEl(),n=this.getContainerEl(),o=this.getWindowEl(),r=t?"on":"off",i={on:U,off:B};i[r](n,"mousemove dragover",this.drag),i[r](e,"mouseup dragend touchend",this.stop),i[r](e,"keydown",this.keyHandle),i[r](o,"scroll",this.handleScroll)},t.prototype.handleScroll=function(){var t=this.lastScroll,e=this.delta,n=this.getScrollInfo(),o={x:n.x-t.x,y:n.y-t.y};this.move(e.x+o.x,e.y+o.y),this.lastScrollDiff=o},t.prototype.start=function(t){var e=this.opts,n=e.onStart;this.toggleDrag(!0),this.startPointer=this.getPointerPos(t),this.guidesStatic=(0,b.result)(e,"guidesStatic")||[],this.guidesTarget=(0,b.result)(e,"guidesTarget")||[],(0,b.isFunction)(n)&&n(t,this),this.startPosition=this.getStartPosition(),this.lastScrollDiff=oH(),this.globScrollDiff=oH(),this.drag(t)},t.prototype.drag=function(t){var e=this,n=this.opts,o=this.lastScrollDiff,r=this.globScrollDiff,i=n.onDrag,a=this.startPointer,s=this.getPointerPos(t),l={x:r.x+o.x,y:r.y+o.y};this.globScrollDiff=l;var c={x:s.x-a.x+l.x,y:s.y-a.y+l.y};this.lastScrollDiff=oH();var u=function(o){oU.forEach(function(t){return o[t]=o[t]*(0,b.result)(n,"scale")}),e.delta=o,e.move(o.x,o.y),(0,b.isFunction)(i)&&i(t,e)},p=oF({},c);if(this.currentPointer=s,this.lastScroll=this.getScrollInfo(),u(c),this.guidesTarget.length){var f=this.snapGuides(p),d=f.newDelta,h=f.trgX,g=f.trgY;(h||g)&&u(d)}0===t.which&&this.stop(t)},t.prototype.snapGuides=function(t){var e=this,n=oF({},t),o=this.trgX,r=this.trgY;return this.guidesTarget.forEach(function(n){n.x&&e.trgX||n.y&&e.trgY||(n.active=!1,e.guidesStatic.forEach(function(i){if((!n.y||!i.x)&&(!n.x||!i.y)){var a=n.y&&i.y,s=a?"y":"x",l=n[s],c=i[s],u=t[s],p=a?r:o;e.isPointIn(l,c,{axis:s})&&(0,b.isUndefined)(p)&&e.setGuideLock(n,u-(l-c))}}))}),o=this.trgX,r=this.trgY,oU.forEach(function(o){var r=o.toUpperCase(),i=e["trg".concat(r)];i&&!e.isPointIn(t[o],i.lock,{axis:o})&&(e.setGuideLock(i,null),i=null),i&&!(0,b.isUndefined)(i.lock)&&(n[o]=i.lock)}),{newDelta:n,trgX:this.trgX,trgY:this.trgY}},t.prototype.isPointIn=function(t,e,n){var o,r=void 0===n?{}:n,i=r.offset,a=r.axis,s=this.opts,l=s.snapGuides,c=void 0===l?{}:l,u=s.snapOffset,p="x"===a?c.x:"y"===a?c.y:void 0,f=0===p?0:null!=(o=null!=i?i:p)?o:void 0===u?0:u;return 0!==f&&(t>=e&&t<=e+f||t<=e&&t>=e-f)},t.prototype.setGuideLock=function(t,e){var n=(0,b.isUndefined)(t.x)?"Y":"X",o="trg".concat(n);return null!==e?(t.active=!0,t.lock=e,this[o]=t):(delete t.active,delete t.lock,delete this[o]),t},t.prototype.stop=function(t,e){void 0===e&&(e={});var n=this.delta,o=!!e.cancel,r=o?0:n.x,i=o?0:n.y;this.toggleDrag(),this.move(r,i,!0);var a=this.opts.onEnd;(0,b.isFunction)(a)&&a(t,this,{cancelled:o})},t.prototype.keyHandle=function(t){V(t)&&this.stop(t,{cancel:!0})},t.prototype.move=function(t,e,n){var o=this.el,r=this.opts,i=this.startPosition;if(i){var a=r.setPosition,s=i.x+t,l=i.y+e;this.position={x:s,y:l,end:n},(0,b.isFunction)(a)&&a(this.position),o&&(o.style.left="".concat(s,"px"),o.style.top="".concat(l,"px"))}},t.prototype.getContainerEl=function(){var t=this.opts.container;return t?[t]:this.getDocumentEl()},t.prototype.getWindowEl=function(){return this.getContainerEl().map(function(t){var e=t.ownerDocument||t;return e.defaultView||e.parentWindow})},t.prototype.getDocumentEl=function(t){var e=this.opts.doc;
1if(t=t||this.el,!this.docs.length){var n=[document];t&&n.push(t.ownerDocument),e&&n.push(e),this.docs=n}return this.docs},t.prototype.getPointerPos=function(t){var e=this.opts.getPointerPosition,n=R(t);return e?e(t):{x:n.clientX,y:n.clientY}},t.prototype.getStartPosition=function(){var t=this.el,e=this.opts.getPosition,n=oH();return(0,b.isFunction)(e)?n=e():t&&(n={x:parseFloat(t.style.left),y:parseFloat(t.style.top)}),n},t.prototype.getScrollInfo=function(){var t=this.opts.doc,e=t&&t.body;return{y:e?e.scrollTop:0,x:e?e.scrollLeft:0}},t.prototype.detectAxisLock=function(t,e){var n=Math.abs(t),o=Math.abs(e);return e>=n||e<=-n?"x":t>o||t<-o?"y":void 0},t}(),oz=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oW=function(){return(oW=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o$=function(t){function e(e,n){var o=t.call(this,{model:e})||this;return(0,b.bindAll)(o,"onScroll","frameLoaded","updateOffset","remove","startDrag"),oW(oW({},e.config),{frameWrapView:o}),o.cv=n,o.frame=new oV(e,o),o.classAnim="".concat(o.ppfx,"frame-wrapper--anim"),o.updateOffset=(0,b.debounce)(o.updateOffset.bind(o),0),o.updateSize=(0,b.debounce)(o.updateSize.bind(o),0),o.listenTo(e,"loaded",o.frameLoaded),o.listenTo(e,"change:x change:y",o.updatePos),o.listenTo(e,"change:width change:height",o.updateSize),o.listenTo(e,"destroy remove",o.remove),o.updatePos(),o.setupDragger(),o}return oz(e,t),e.prototype.events=function(){return{"click [data-action-remove]":"remove","mousedown [data-action-move]":"startDrag"}},e.prototype.setupDragger=function(){var t,e,n,o=this,r=this.module,i=this.model,a=function(t){r.toggleFramesEvents(t)};this.dragger=new oB({onStart:function(){var r=i.attributes,s=r.x,l=r.y;n=o.em.getZoomMultiplier(),t=s,e=l,a(!1)},onEnd:function(){return a(!0)},setPosition:function(o){i.set({x:t+o.x*n,y:e+o.y*n})}})},e.prototype.startDrag=function(t){var e;t&&(null==(e=this.dragger)||e.start(t))},e.prototype.__clear=function(t){var e=this.frame;e&&e.remove(t),C(this.elTools)},e.prototype.remove=function(t){var e,n=this;return null==(e=this.sizeObserver)||e.disconnect(),this.__clear(t),ep.prototype.remove.apply(this,t),["frame","dragger","cv","elTools"].forEach(function(t){return n[t]=0}),this},e.prototype.updateOffset=function(){var t,e=this.em,n=this.$el,o=this.frame;e&&!e.destroyed&&(e.runDefault({preserveSelected:1}),n.removeClass(this.classAnim),null==(t=null==o?void 0:o.model)||t._emitUpdated())},e.prototype.updatePos=function(t){var e=this.model,n=this.el,o=e.attributes,r=o.x,i=o.y,a=n.style;this.frame.rect=void 0,a.left=isNaN(r)?r:"".concat(r,"px"),a.top=isNaN(i)?i:"".concat(i,"px"),t&&this.updateOffset()},e.prototype.updateSize=function(){this.updateDim()},e.prototype.updateDim=function(){var t=this.em,e=this.el,n=this.$el,o=this.model,r=this.classAnim,i=this.frame;if(i){i.rect=void 0,n.addClass(r);var a=this.__handleSize(),s=a.noChanges,l=a.width,c=a.height;((0,b.isNull)(l)||(0,b.isNull)(c))&&o.set(oW(oW({},l?{}:{width:e.offsetWidth}),c?{}:{height:e.offsetHeight}),{silent:1}),t.stopDefault({preserveSelected:1}),s?this.updateOffset():setTimeout(this.updateOffset,350)}},e.prototype.onScroll=function(){var t=this.frame;this.em.trigger("frame:scroll",{frame:t,body:t.getBody(),target:t.getWindow()})},e.prototype.frameLoaded=function(){var t=this.frame;this.config,t.getWindow().onscroll=this.onScroll,this.updateDim()},e.prototype.__handleSize=function(){var t,e=this.model,n=this.el.style,o=e.attributes,r=o.width,i=o.height,a=n.width||"",s=n.height||"",l=r||"",c=i||"",u=a==l&&s==c,p=(0,b.isNumber)(l)?"".concat(l).concat("px"):l,f=(0,b.isNumber)(c)?"".concat(c).concat("px"):c;if(n.width=p,null==(t=this.sizeObserver)||t.disconnect(),e.hasAutoHeight()){var d=this.frame.el.contentDocument;if(d){var h=new ResizeObserver(function(){requestAnimationFrame(function(){var t=parseFloat(e.get("minHeight"))||0,o=Math.max(d.body.scrollHeight,t);n.height="".concat(o,"px")})});h.observe(d.body),this.sizeObserver=h}}else n.height=f,delete this.sizeObserver;return{noChanges:u,width:r,height:i,newW:l,newH:c}},e.prototype.render=function(){var t=this.frame,e=this.$el,n=this.ppfx,o=this.cv,r=this.model,i=this.el,a=r.attributes.onRender;this.__clear(),this.__handleSize(),t.render(),e.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(r.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">
1<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(t.el);var s=P("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=null==o?void 0:o.toolsWrapper;return l&&l.appendChild(s),a&&a({el:i,elTop:i.querySelector("[data-frame-top]"),elRight:i.querySelector("[data-frame-right]"),elBottom:i.querySelector("[data-frame-bottom]"),elLeft:i.querySelector("[data-frame-left]"),frame:r,frameWrapperView:this,remove:this.remove,startDrag:this.startDrag}),this},e}(ep),oq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oG=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,!0)||this;return o.listenTo(o.collection,"reset",o.render),o.canvasView=n.canvasView,o._module=n.module,o}return oq(e,t),e.prototype.onRemoveBefore=function(t,e){void 0===e&&(e={}),t.forEach(function(t){return t.remove(e)})},e.prototype.onRender=function(){var t=this.$el,e=this.ppfx;t.attr({class:"".concat(e,"frames")})},e.prototype.clearItems=function(){(this.viewCollection||[]).forEach(function(t){return t.remove()}),this.viewCollection=[]},e.prototype.renderView=function(t,e){return new o$(t,this.canvasView)},e}(ed),oK=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oY=function(){return(oY=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oJ=function(t){function e(e){var n=t.call(this,{model:e})||this;n.ready=!1,(0,b.bindAll)(n,"clearOff","onKeyPress","onWheel","onPointer");var o=n.em,r=n.pfx,i=n.ppfx,a=n.module.events;return n.className="".concat(r,"canvas ").concat(i,"no-touch-actions").concat(o.config.customUI?"":" ".concat(r,"canvas-bg")),n.clsUnscale="".concat(r,"unscale"),n._initFrames(),n.listenTo(o,a.refresh,n.clearOff),n.listenTo(o,pi.selected,n.checkSelected),n.listenTo(o,"".concat(a.coords," ").concat(a.zoom),n.updateFrames),n.listenTo(e,"change:frames",n._onFramesUpdate),n.toggleListeners(!0),n}return oK(e,t),e.prototype.template=function(){var t=this.pfx;return'\n <div class="'.concat(t,'canvas__frames" data-frames>\n <div class="').concat(t,'canvas__spots" data-spots></div>\n </div>\n <div id="').concat(t,'tools" class="').concat(t,'canvas__tools" data-tools></div>\n <style data-canvas-style></style>\n ')},e.prototype._onFramesUpdate=function(){this._initFrames(),this._renderFrames()},e.prototype._initFrames=function(){var t=this.frames,e=this.model,n=this.config,o=this.em,r=e.frames;o.set("readyCanvas",0),r.once("loaded:all",function(){return o.set("readyCanvas",1)}),null==t||t.remove(),this.frames=new oG({collection:r},oY(oY({},n),{canvasView:this}))},e.prototype.checkSelected=function(t,e){void 0===e&&(e={});var n,o=e.scroll,r=this.em.getCurrentFrame();
1o&&(null==(n=t.views)||n.forEach(function(t){t.frameView===r&&t.scrollIntoView(o)}))},e.prototype.remove=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return clearTimeout(this.timerZoom),null==(t=this.frames)||t.remove(),this.frames=void 0,ep.prototype.remove.apply(this,e),this.toggleListeners(!1),this},e.prototype.preventDefault=function(t){var e;t&&(t.preventDefault(),null==(e=t._parentEvent)||e.preventDefault())},e.prototype.toggleListeners=function(t){var e=this.el,n=this.config,o=t?U:B;o(document,"keypress",this.onKeyPress),o(window,"scroll resize",this.clearOff),o(e,"wheel",this.onWheel,{passive:!n.infiniteCanvas}),o(e,"pointermove",this.onPointer)},e.prototype.screenToWorld=function(t,e){var n=this.module,o=n.getCoords(),r=n.getZoomMultiplier(),i=this.getViewportDelta();return{x:(t-o.x-i.x)*r,y:(e-o.y-i.y)*r}},e.prototype.onPointer=function(t){if(this.config.infiniteCanvas){var e=this.getCanvasOffset(),n=L(),o={x:t.clientX-e.left+n.x,y:t.clientY-e.top+n.y};if(t._parentEvent){var r=t.target.getBoundingClientRect(),i=this.module.getZoomDecimal();o.x=r.left-e.left+n.x+t.clientX*i,o.y=r.top-e.top+n.y+t.clientY*i}this.model.set({pointerScreen:o,pointer:this.screenToWorld(o.x,o.y)})}},e.prototype.onKeyPress=function(t){var e=this.em;" "!==N(t)||1===e.getZoomDecimal()||e.Canvas.isInputFocused()||(this.preventDefault(t),e.Editor.runCommand("core:canvas-move"))},e.prototype.onWheel=function(t){var e=this.module;if(this.config.infiniteCanvas){this.preventDefault(t);var n,o=t.deltaX,r=t.deltaY,i=e.getZoomDecimal(),a=(n=t).ctrlKey||n.metaKey,s=e.getCoords();if(a){var l=i-r*i*.01;e.setZoom(100*l);var c=this.model.getPointerCoords(u8.Screen),u=this.getCanvasOffset(),p=c.x-u.width/2,f=c.y-u.height/2,d=l/i,h=p-(p-s.x)*d,g=f-(f-s.y)*d;e.setCoords(h,g)}else this.onPointer(t),e.setCoords(s.x-o,s.y-r)}},e.prototype.updateFrames=function(t){var e=this.em,n=this.toolsWrapper,o={preserveSelected:1};this.updateFramesArea(),this.clearOff(),n.style.display="none",e.trigger(pn.update,t),clearTimeout(this.timerZoom),this.timerZoom=setTimeout(function(){e.stopDefault(o),e.runDefault(o),n.style.display=""},300)},e.prototype.updateFramesArea=function(){var t=this.framesArea,e=this.model,n=this.module,o=this.cvStyle,r=this.clsUnscale,i=n.getZoomMultiplier();if(t){var a=e.attributes,s=a.x,l=a.y,c=n.getZoomDecimal();t.style.transform="scale(".concat(c,") translate(").concat(s*i,"px, ").concat(l*i,"px)")}o&&(o.innerHTML="\n .".concat(r," { scale: ").concat(i," }\n "))},e.prototype.fitViewport=function(t){void 0===t&&(t={});var e,n,o,r=this.em,i=this.module,a=this.model;this.clearOff();var s=this.getCanvasOffset(),l=t.el,c=l&&(null==(e=tE(l))?void 0:e.frameView),u=c?c.model:t.frame||r.getCurrentFrameModel()||a.frames.at(0),p=u.attributes,f=p.x,d=p.y,h={x:null!=f?f:0,y:null!=d?d:0,width:u.width,height:u.height};if(l){var g=this.getElBoxRect(l);h.x=h.x+g.x,h.y=h.y+g.y,h.width=g.width,h.height=g.height}var v=t.ignoreHeight,y=null!=(n=t.gap)?n:0,m=(0,b.isNumber)(y),w=m?y:y.x,_=m?y:y.y,C=h.width+2*w,x=h.height+2*_,O=s.width,S=s.height,T=O/C,P=100*(v?T:Math.min(T,S/x)),E=null!=(o=(0,b.isFunction)(t.zoom)?t.zoom(P):t.zoom)?o:P;i.setZoom(E,{from:"fitViewport"});var k=-h.x+(u.width>=O?O/2-C/2:-w),j=-h.y+S/2-x/2,A=i.getZoomDecimal(),M={x:(k+w)*A,y:(j+_)*A};if(v){var D=i.getZoomMultiplier();M.y=(-h.y+_)*A-(S*D-S)/2/D}i.setCoords(M.x,M.y)},e.prototype.isElInViewport=function(t){var e=th(t),n=D(e),o=this.getFrameOffset(e),r=n.top,i=n.left;return r>=0&&i>=0&&r<=o.height&&i<=o.width},e.prototype.offset=function(t,e){void 0===e&&(e={});var n=e.noScroll,o=D(t),r=n?{x:0,y:0}:L(t);return{top:o.top+r.y,left:o.left+r.x,width:o.width,height:o.height}},e.prototype.getRectToScreen=function(t){var e,n,o,r,i=this.getCanvasScroll(),a=this.module.getZoomDecimal(),s=this.module.getCoords(),l=this.getViewportDelta();return{x:(null!=(e=t.x)?e:0)*a-i.scrollLeft+s.x+l.x||0,y:(null!=(n=t.y)?n:0)*a-i.scrollTop+s.y+l.y||0,width:(null!=(o=t.width)?o:0)*a,height:(null!=(r=t.height)?r:0)*a}},e.prototype.getElBoxRect=function(t,e){void 0===e&&(e={});var n,o,r,i=this.module,a=D(t),s=a.width,l=a.height,c=a.left,u=a.top,p=null==(n=tE(t))?void 0:n.frameView,f=null==p?void 0:p.getBoxRect(),d=i.getZoomMultiplier(),h=null!=(o=null==f?void 0:f.x)?o:0,g=null!=(r=null==f?void 0:f.y)?r:0,v=this.el,y=L(),m={x:c+h+(v.scrollLeft+y.x)*d,y:u+g+(v.scrollTop+y.y)*d,width:s,height:l};return e.local&&(m.x=c,m.y=u),e.toScreen?this.getRectToScreen(m):m},e.prototype.getViewportRect=function(t){void 0===t&&(t={});
vendor: 5,480 bytes, line 1
1var e=this.getCanvasOffset(),n=e.top,o=e.left,r=e.width,i=e.height,a=this.module;if(!t.toWorld)return{x:o,y:n,width:r,height:i};var s=a.getZoomMultiplier(),l=a.getCoords(),c=this.getViewportDelta();return{x:(-l.x-c.x||0)*s,y:(-l.y-c.y||0)*s,width:r*s,height:i*s}},e.prototype.getViewportDelta=function(t){void 0===t&&(t={});var e=this.module.getZoomMultiplier(),n=this.getCanvasOffset(),o=n.width,r=n.height;return{x:(o*e-o)/2/e,y:(r*e-r)/2/e}},e.prototype.clearOff=function(){this.frmOff=void 0,this.cvsOff=void 0},e.prototype.getFrameOffset=function(t){var e;if(!this.frmOff||t){var n=null==(e=this.frame)?void 0:e.el,o=null==t?void 0:t.ownerDocument.defaultView,r=o?o.frameElement:n;this.frmOff=this.offset(r||n)}return this.frmOff},e.prototype.getCanvasOffset=function(){return this.cvsOff||(this.cvsOff=this.offset(this.el)),this.cvsOff},e.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.module.getZoomDecimal(),o=this.getFrameOffset(t),r=this.el,i=this.getCanvasOffset(),a=this.offset(t,e),s=e.avoidFrameOffset?0:o.top,l=e.avoidFrameOffset?0:o.left,c=e.avoidFrameZoom?a.top:a.top*n,u=e.avoidFrameZoom?a.left:a.left*n;return{top:e.avoidFrameOffset?c:c+s-i.top+r.scrollTop,left:e.avoidFrameOffset?u:u+l-i.left+r.scrollLeft,height:e.avoidFrameZoom?a.height:a.height*n,width:e.avoidFrameZoom?a.width:a.width*n,zoom:n,rect:a}},e.prototype.getElementOffsets=function(t){if(!t||A(t))return{};var e={},n=window.getComputedStyle(t),o=this.module.getZoomDecimal();return["marginTop","marginRight","marginBottom","marginLeft","paddingTop","paddingRight","paddingBottom","paddingLeft","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth"].forEach(function(t){e[t]=parseFloat(n[t])*o}),e},e.prototype.getPosition=function(t){void 0===t&&(t={});var e,n=null==(e=this.frame)?void 0:e.el.contentDocument;if(!n)return{top:0,left:0,width:0,height:0};var o=n.body,r=this.module.getZoomDecimal(),i=this.getFrameOffset(),a=this.getCanvasOffset(),s=t.noScroll;return{top:i.top+(s?0:o.scrollTop)*r-a.top,left:i.left+(s?0:o.scrollLeft)*r-a.left,width:a.width,height:a.height}},e.prototype.getCanvasScroll=function(){return this.config.scrollableCanvas?{scrollTop:this.el.scrollTop,scrollLeft:this.el.scrollLeft}:{scrollTop:0,scrollLeft:0}},e.prototype.updateScript=function(t){var e=t.model,n=e.getId(),o={component:e,view:t,el:t.el};if(!t.scriptContainer){t.scriptContainer=P("div",{"data-id":n});var r=this.getJsContainer();null==r||r.appendChild(t.scriptContainer)}t.el.id=n,t.scriptContainer.innerHTML="";var i=document.createElement("script"),a=e.getScriptString(),s=e.get("script-props")?a:"function(){\n".concat(a,"\n;}"),l=JSON.stringify(e.__getScriptProps());i.innerHTML="\n setTimeout(function() {\n var item = document.getElementById('".concat(n,"');\n if (!item) return;\n var script = (").concat(s,").bind(item);\n script(").concat(l,", { el: item });\n }, 1);"),setTimeout(function(){e.emitWithEditor(pi.scriptMountBefore,o);var n=t.scriptContainer;null==n||n.appendChild(i),e.emitWithEditor(pi.scriptMount,o)},0)},e.prototype.getJsContainer=function(t){var e=this.getFrameView(t);return null==e?void 0:e.getJsContainer()},e.prototype.getFrameView=function(t){return(null==t?void 0:t.frameView)||this.em.getCurrentFrame()},e.prototype._renderFrames=function(){if(this.ready){var t=this.model,e=this.frames,n=this.em,o=this.framesArea,r=t.frames;r.listenToLoad(),e.render();var i=r.at(0),a=null==i?void 0:i.view;n.setCurrentFrame(a),null==o||o.appendChild(e.el),this.frame=a,this.updateFramesArea()}},e.prototype.renderFrames=function(){this._renderFrames()},e.prototype.render=function(){var t=this.el,e=this.$el,n=this.ppfx,o=this.config,r=this.em;e.html(this.template());var i=e.find("[data-frames]");this.framesArea=i.get(0);var a=e.find("[data-tools]");return 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(o.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 ')),this.toolsEl=t.querySelector("#".concat(n,"tools")),this.hlEl=t.querySelector(".".concat(n,"highlighter")),this.badgeEl=t.querySelector(".".concat(n,"badge")),this.placerEl=t.querySelector(".".concat(n,"placeholder")),this.ghostEl=t.querySelector(".".concat(n,"ghost")),this.toolbarEl=t.querySelector(".".concat(n,"toolbar")),this.resizerEl=t.querySelector(".".concat(n,"resizer")),this.offsetEl=t.querySelector(".".concat(n,"offset-v")),this.fixedOffsetEl=t.querySelector(".".concat(n,"offset-fixed-v")),this.toolsGlobEl=t.querySelector(".".concat(n,"tools-gl")),this.spotsEl=t.querySelector("[data-spots]"),this.cvStyle=t.querySelector("[data-canvas-style]"),t.className=ta(r,this.className),!0===o.scrollableCanvas&&(t.style.overflow="auto"),this.ready=!0,this._renderFrames(),this},e}(ep),oX=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),oZ=function(){return(oZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},oQ=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},o0=function(t){function e(e){var n=t.call(this,e,"Canvas",{stylePrefix:"cv-",scripts:[],styles:[],customBadgeLabel:void 0,autoscrollLimit:50,extHl:!1,frameContent:"<!DOCTYPE html>",frameStyle:"\n body { background-color: #fff }\n * ::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.1) }\n * ::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2) }\n * ::-webkit-scrollbar { width: 10px }\n ",notTextable:["button","a","input[type=checkbox]","input[type=radio]"],allowExternalDrop:!0})||this;return n.events=pn,n.framesById={},n.canvas=new ei(n),n.spots=new ec(n),n.model=n.canvas,n.startAutoscroll=n.startAutoscroll.bind(n),n.stopAutoscroll=n.stopAutoscroll.bind(n),n.autoScroller=new oS,n}return oX(e,t),e.prototype.getCanvasView=function(){return this.canvasView},e.prototype.postLoad=function(){this.model.init()},e.prototype.getModel=function(){return this.canvas},e.prototype.getElement=function(){return this.getCanvasView().el},e.prototype.getFrame=function(t){return this.getFrames()[t||0]},e.prototype.getFrameEl=function(){var t=(this.canvasView||{}).frame;return null==t?void 0:t.el},e.prototype.getFramesEl=function(){var t;return null==(t=this.canvasView)?void 0:t.framesArea},e.prototype.getWindow=function(){var t=(this.canvasView||{}).frame;return null==t?void 0:t.getWindow()},e.prototype.getDocument=function(){var t=this.getFrameEl();return null==t?void 0:t.contentDocument},e.prototype.getBody=function(){var t=this.getDocument();return null==t?void 0:t.body},e.prototype._getLocalEl=function(t,e,n){var o=t,r=null==e?void 0:e.frameView;return r?r[n]():o},e.prototype.getGlobalToolsEl=function(){var t;return null==(t=this.canvasView)?void 0:t.toolsGlobEl},e.prototype.getToolsEl=function(t){return this._getLocalEl(this.getCanvasView().toolsEl,t,"getToolsEl")},e.prototype.getHighlighter=function(t){return this._getLocalEl(this.getCanvasView().hlEl,t,"getHighlighter")},e.prototype.getBadgeEl=function(t){return this._getLocalEl(this.getCanvasView().badgeEl,t,"getBadgeEl")},e.prototype.getPlacerEl=function(){return this.getCanvasView().placerEl},e.prototype.getGhostEl=function(){return this.getCanvasView().ghostEl},e.prototype.getToolbarEl=function(){return this.getCanvasView().toolbarEl},e.prototype.getResizerEl=function(){return this.getCanvasView().resizerEl},e.prototype.getOffsetViewerEl=function(t){return this._getLocalEl(this.getCanvasView().offsetEl,t,"getOffsetViewerEl")},e.prototype.getFixedOffsetViewerEl=function(){return this.getCanvasView().fixedOffsetEl},e.prototype.getSpotsEl=function(){var t;return null==(t=this.canvasView)?void 0:t.spotsEl},e.prototype.render=function(){var t;return null==(t=this.canvasView)||t.remove(),this.canvasView=new oJ(this.canvas),this.canvasView.render().el},e.prototype.getOffset=function(){var t=this.offset(this.getFrameEl()),e=this.offset(this.getElement());return{top:t.top-e.top,left:t.left-e.left}},e.prototype.offset=function(t){return this.getCanvasView().offset(t)},e.prototype.setCustomBadgeLabel=function(t){this.config.customBadgeLabel=t},e.prototype.getElementPos=function(t,e){return this.getCanvasView().getElementPos(t,e)},e.prototype.getElementOffsets=function(t){return this.getCanvasView().getElementOffsets(t)},e.prototype.getRect=function(){var t,e=null!=(t=this.getCanvasView().getPosition())?t:{},n=e.top,o=e.left;return oZ(oZ({},this.getCanvasView().getCanvasOffset()),{topScroll:void 0===n?0:n,leftScroll:void 0===o?0:o})},e.prototype.getTargetToElementDim=function(t,e,n){void 0===n&&(n={});var o=n||{},r=this.getCanvasView().getPosition();if(r){var i=o.elPos||this.getCanvasView().getElementPos(e),a=n.toRight||0,s=o.targetHeight||t.offsetHeight,l=o.targetWidth||t.offsetWidth,c=o.event||null,u=i.top-s,p=i.left;p+=a?i.width:0;var f=(p=a?p-l:p)<r.left?r.left:p,d=u<r.top?r.top:u,h={top:d=d>i.top+i.height?i.top+i.height:d,left:f,elementTop:i.top,elementLeft:i.left,elementWidth:i.width,elementHeight:i.height,targetWidth:t.offsetWidth,targetHeight:t.offsetHeight,canvasTop:r.top,canvasLeft:r.left,canvasWidth:r.width,canvasHeight:r.height};return c&&this.em&&this.em.trigger(c,h),h}},e.prototype.canvasRectOffset=function(t,e,n){var o=this;void 0===n&&(n={});var r=function(t){var e=t.defaultView;return null==e?void 0:e.frameElement}
1,i=function(t,e,i){void 0===e&&(e=1);var a=o.em.getZoomDecimal(),s=e?"top":"left",l=t.ownerDocument,c=n.offset?r(l):{},u=c.offsetTop,p=c.offsetLeft,f=l.body||{},d=f.scrollTop,h=f.scrollLeft,g=e?void 0===d?0:d:void 0===h?0:h,v=e?void 0===u?0:u:void 0===p?0:p;return i[s]-(g-v)*a};return{top:i(t,1,e),left:i(t,0,e)}},e.prototype.getTargetToElementFixed=function(t,e,n){void 0===n&&(n={});var o=n.pos||this.getElementPos(t,{noScroll:!0}),r=n.canvasOff||this.canvasRectOffset(t,o),i=e.offsetHeight||0,a=e.offsetWidth||0,s=this.getCanvasView(),l=s.getCanvasScroll(),c=l.scrollTop,u=l.scrollLeft,p=s.getPosition(),f=n.event,d=o.width-a,h=-i,g=(0,b.isUndefined)(n.left)?d:n.left;g=Math.min(g=Math.min(g=Math.max(g,Math.max(-o.left+u,0)),o.width-a),p.width+u-a-o.left);var v=r.top<i+c,y=h;if(v){var m=o.height+i;if(m<p.height)y+=m;else{var w=-r.top+c;y=w<o.height?w:o.height}}var _={top:y,left:g,canvasOffsetTop:r.top,canvasOffsetLeft:r.left,elRect:o,canvasOffset:r,canvasRect:p,targetWidth:a,targetHeight:i};return f&&this.em.trigger(f,_),_},e.prototype.getMouseRelativePos=function(t,e){void 0===e&&(e={});var n=e.subWinOffset,o=t.target,r=o.nodeType===Node.DOCUMENT_NODE?o:o.ownerDocument,i=r.defaultView||r.parentWindow,a=i.frameElement,s=n?i.pageYOffset:0,l=n?i.pageXOffset:0,c=this.getZoomMultiplier(),u=0,p=0;if(a){var f=a.getBoundingClientRect();u=f.top||0,p=f.left||0}return{y:(t.clientY+u-s)*c,x:(t.clientX+p-l)*c}},e.prototype.getMouseRelativeCanvas=function(t,e){var n,o=this.getZoomDecimal(),r=this.getCanvasView(),i=null!=(n=r.getPosition(e))?n:{top:0,left:0},a=r.getCanvasScroll(),s={top:i.top+a.scrollTop,left:i.left+a.scrollLeft},l=s.top,c=s.left;return{y:t.clientY*o+l,x:t.clientX*o+c}},e.prototype.startDrag=function(t){this.em.set("dragSource",t)},e.prototype.endDrag=function(){this.em.set({dragResult:null,dragSource:void 0})},e.prototype.hasFocus=function(){var t,e;return!!(null==(e=null==(t=this.getDocument())?void 0:t.hasFocus)?void 0:e.call(t))},e.prototype.isInputFocused=function(){var t=this.getDocument(),e=this.getFrameEl(),n=oQ(["body"],this.config.notTextable,!0),o=e&&document.activeElement===e?t&&t.activeElement:document.activeElement;return o&&!n.some(function(t){return o.matches(t)})},e.prototype.scrollTo=function(t,e){void 0===e&&(e={});var n=th(t),o=n&&tT(n);o&&o.scrollIntoView(e)},e.prototype.startAutoscroll=function(t){var e=t&&t.view||this.em.getCurrentFrame();if(e&&e.startAutoscroll(),this.config.scrollableCanvas){var n=this.getCanvasView().el;this.autoScroller.start(n,n,{zoom:this.em.getZoomDecimal(),ignoredElement:this.getSpotsEl()})}},e.prototype.stopAutoscroll=function(t){var e=t&&t.view||this.em.getCurrentFrame();e&&e.stopAutoscroll(),this.config.scrollableCanvas&&this.autoScroller.stop()},e.prototype.setZoom=function(t,e){return void 0===e&&(e={}),this.canvas.set("zoom","string"==typeof t?parseFloat(t):t,e),this},e.prototype.getZoom=function(){return parseFloat(this.canvas.get("zoom"))},e.prototype.setCoords=function(t,e,n){void 0===n&&(n={});var o,r=t||0===t,i=e||0===e,a={x:this.canvas.get("x"),y:this.canvas.get("y")};if(r&&(a.x=parseFloat("".concat(t))),i&&(a.y=parseFloat("".concat(e))),n.toWorld){var s=null==(o=this.canvasView)?void 0:o.getViewportDelta();s&&(r&&(a.x=a.x-s.x),i&&(a.y=a.y-s.y))}return this.canvas.set(a),this},e.prototype.getCoords=function(){var t=this.canvas.attributes;return{x:t.x,y:t.y}},e.prototype.getPointer=function(t){var e=this.canvas.attributes,n=e.pointer,o=e.pointerScreen;return t?o:n},e.prototype.getZoomDecimal=function(){return this.getZoom()/100},e.prototype.getZoomMultiplier=function(){var t=this.getZoomDecimal();return t?1/t:1},e.prototype.fitViewport=function(t){var e;null==(e=this.canvasView)||e.fitViewport(t)},e.prototype.toggleFramesEvents=function(t){this.getFramesEl().style.pointerEvents=t?"":"none"},e.prototype.getFrames=function(){return this.canvas.frames.map(function(t){return t})},e.prototype.addFrame=function(t,e){return void 0===t&&(t={}),void 0===e&&(e={}),this.canvas.frames.add(new ee(this,oZ({},t)),e)},e.prototype.getLastDragResult=function(){return this.em.get("dragResult")},e.prototype.addSpot=function(t,e){void 0===e&&(e={});var n,o=this.getSpots(t);if(o.length){var r=o[0];return r.set(t),r}var i=t.componentView||(null==(n=t.component)?void 0:n.view),a=new es(this,oZ(oZ({},t),{id:t.id||"cs_".concat(t.type,"_").concat(null==i?void 0:i.cid),type:t.type||""}));return this.spots.add(a,e),a},e.prototype.getSpots=function(t){return void 0===t&&(t={}),this.spots.where(t.id?{id:t.id}:t)},e.prototype.removeSpots=function(t){void 0===t&&(t={});var e=(0,b.isArray)(t)?t:this.getSpots(t);return this.spots.remove(e)}
1,e.prototype.hasCustomSpot=function(t){var e=this.config.customSpots;return!0===e||!!e&&!!t&&!!e[t]},e.prototype.getWorldRectToScreen=function(t){var e;return null==(e=this.canvasView)?void 0:e.getRectToScreen(t)},e.prototype.refresh=function(t){void 0===t&&(t={});var e=this.em,n=this.events,o=this.canvasView;null==o||o.clearOff(),(t.spots||t.all)&&(this.refreshSpots(),e.trigger(pn.updateTools)),e.set("canvasOffset",this.getOffset()),e.trigger(n.refresh,t)},e.prototype.refreshSpots=function(){this.spots.refresh()},e.prototype.destroy=function(){var t,e=this;this.canvas.stopListening(),null==(t=this.canvasView)||t.remove(),["model","droppable"].forEach(function(t){return e[t]={}})},e}(tJ),o1=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),o2=function(){return(o2=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o3=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.dataResolver=o.initializeDataResolver(e,n),o.listenToPropsChange(),o}return o1(e,t),e.prototype.initializeDataResolver=function(t,e){var n,o=null!=(n=t.dataResolver)?n:{type:t.type};return this.createResolverInstance(o,o2(o2({},e),{collectionsStateMap:this.collectionsStateMap}))},e.prototype.getDataResolver=function(){return this.get("dataResolver")},e.prototype.setDataResolver=function(t){return this.set("dataResolver",t)},e.prototype.onCollectionsStateMapUpdate=function(e){this.dataResolver.updateCollectionsStateMap(e),t.prototype.onCollectionsStateMapUpdate.call(this,e)},e.prototype.listenToPropsChange=function(){var t=this;this.on("change:dataResolver",function(){t.dataResolver.set(t.get("dataResolver"))})},e.prototype.removePropsListeners=function(){this.stopListening(this.dataResolver),this.off("change:dataResolver"),this.off("change:".concat(this.collectionsStateMap))},e.prototype.destroy=function(e){return this.removePropsListeners(),t.prototype.destroy.call(this,e)},e.prototype.toJSON=function(e){var n=t.prototype.toJSON.call(this,e),o=this.dataResolver.toJSON();return delete o.type,o2(o2({},n),{dataResolver:o})},e}(ob),o5=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),o4=function(){return(o4=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o9=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o5(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return o4(o4({},t.prototype.defaults),{type:ex,dataResolver:{},droppable:!1})},enumerable:!1,configurable:!0}),e.prototype.getPath=function(){return this.dataResolver.get("path")},e.prototype.getCollectionId=function(){return this.dataResolver.get("collectionId")},e.prototype.getVariableType=function(){return this.dataResolver.get("variableType")},e.prototype.getDefaultValue=function(){return this.dataResolver.get("defaultValue")},e.prototype.getDataValue=function(){return this.dataResolver.getDataValue()},e.prototype.resolvesFromCollection=function(){return this.dataResolver.resolvesFromCollection()},e.prototype.getInnerHTML=function(){return this.getDataValue()},e.prototype.setPath=function(t){this.dataResolver.set("path",t)},e.prototype.setDefaultValue=function(t){this.dataResolver.set("defaultValue",t)},e.prototype.resetDataSourcePath=function(t){this.set("dataResolver",{path:t,collectionId:void 0,variableType:void 0})},e.prototype.createResolverInstance=function(t,e){return new eO(t,e)},e.isComponent=function(t){return ti(t.tagName)===ex},e}(o3),o6=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),o7=function(){return(o7=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},o8=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o6(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return o7(o7({},t.prototype.defaults),{droppable:!1,type:ps.condition,dataResolver:{condition:{left:"",operator:ph.equalsIgnoreCase,right:""}},components:[{type:ps.conditionTrue},{type:ps.conditionFalse}]})},enumerable:!1,configurable:!0}),e.prototype.isTrue=function(){return this.dataResolver.isTrue()},e.prototype.getCondition=function(){return this.dataResolver.getCondition()},e.prototype.getIfTrueContent=function(){return this.components().at(0)},e.prototype.getIfFalseContent=function(){return this.components().at(1)},e.prototype.getOutputContent=function(){return this.isTrue()?this.getIfTrueContent():this.getIfFalseContent()},e.prototype.setCondition=function(t){this.dataResolver.setCondition(t)},e.prototype.setIfTrueComponents=function(t){this.setComponentsAtIndex(0,t)},e.prototype.setIfFalseComponents=function(t){this.setComponentsAtIndex(1,t)},e.prototype.getInnerHTML=function(t){var e,n;return null!=(n=null==(e=this.getOutputContent())?void 0:e.getInnerHTML(t))?n:""},e.prototype.createResolverInstance=function(t,e){return new eU(t,e)},e.prototype.setComponentsAtIndex=function(t,e){var n=this.components().at(t);null==n||n.components(e)},e.isComponent=function(t){return ti(t.tagName)===eF},e}(o3),rt=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),re=function(){return(re=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rt(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return re(re({},t.prototype.defaults),{removable:!1,draggable:!1})},enumerable:!1,configurable:!0}),e.isComponent=function(t){var e;return!!(e=ti(t.tagName))&&[ps.collectionItem,ps.conditionTrue,ps.conditionFalse].includes(e)},e}(ob),ro=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rr=function(){return(rr=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ri=function(t){function e(e,n){void 0===n&&(n={});var o,r=t.call(this,e,n)||this;return r.mutable=null==(o=e.mutable)||o,r.on("change",r.handleChange),r}return ro(e,t),Object.defineProperty(e.prototype,"cl",{get:function(){return this.collection},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataSource",{get:function(){return this.cl.dataSource}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this.dataSource.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"index",{get:function(){return this.cl.indexOf(this)},enumerable:!1,configurable:!0}),e.prototype.handleChange=function(t,e){var n=this,o=this.changedAttributes();(0,b.keys)(o).forEach(function(t){return n.triggerChange(t,e)})},e.prototype.getPath=function(t,e){void 0===e&&(e={});var n=this.dataSource,o=this.id,r=this.index,i=n.id;return"".concat(i,".").concat(e.useIndex?r:o).concat(t?".".concat(t):"")},e.prototype.getPaths=function(t){return[this.getPath(t),this.getPath(t,{useIndex:!0})]},e.prototype.triggerChange=function(t,e){void 0===e&&(e={});var n=this.dataSource,o=this.em,r=this.getPaths(t),i={dataSource:n,dataRecord:this,path:r[0],options:e};o.trigger(pu.path,i),o.trigger("".concat(pu.pathSource,":").concat(n.id),i),r.forEach(function(t){return o.trigger("".concat(pu.path,":").concat(t),rr(rr({},i),{path:t}))})},e.prototype.set=function(e,n,o){var r,i,a=this;if(!this.isNew()&&!1===this.attributes.mutable)throw Error("Cannot modify immutable record");var s=null==(i=null==(r=this.dataSource)?void 0:r.transformers)?void 0:i.onRecordSetValue,l=function(e,n,o){void 0===o&&(o={});var r=(null==o?void 0:o.avoidTransformers)||!s?n:s({id:a.id,key:e,value:n});t.prototype.set.call(a,e,r,o),t.prototype.set.call(a,{__p:!!o.partial||void 0},o)};if("object"==typeof e&&null!==e)for(var c=0,u=Object.entries(e);c<u.length;c++){var p=u[c];l(p[0],p[1],n)}else l(e,n,o);return this},e}(tH),ra=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rs=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.dataSource=n.dataSource,o}return ra(e,t),e}(tU);rs.prototype.model=ri;var rl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rc=function(){return(rc=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ru=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},rp=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},rf=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},rd=function(t){function e(e,n){var o=t.call(this,rc(rc({schema:{}},e),{records:[]}),n)||this,r=e.records;return o.transformers=e.transformers||{},r instanceof rs||o.set({records:new rs(r,{dataSource:o})}),o.listenTo(o.records,"add",o.onAdd),o.listenTo(o.records,tF,o.handleChanges),o}return rl(e,t),e.prototype.defaults=function(){return{records:[],transformers:{}}},Object.defineProperty(e.prototype,"records",{get:function(){return this.attributes.records}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"schema",{get:function(){return this.attributes.schema},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"em",{get:function(){return this.collection.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"hasProvider",{get:function(){return!!this.attributes.provider},enumerable:!1,configurable:!0}),e.prototype.onAdd=function(t){t.triggerChange()},e.prototype.addRecord=function(t,e){return this.records.add(t,e)},e.prototype.getRecord=function(t){return this.records.get(t)},e.prototype.getRecords=function(){var t=this;return rf([],this.records.models,!0).map(function(e){return t.getRecord(e.id)})},e.prototype.getResolvedRecords=function(){var t=this,e=Object.entries(this.schema);return this.getRecords().map(function(n){var o=rc({},n.attributes);return 0===e.length||e.forEach(function(e){var n=e[0],r=e[1];if((null==r?void 0:r.type)===pc.relation&&r.target){var i=o[n];if(i){var a=t.em.DataSources.get(r.target);if(a){var s=a.records,l=r.targetField||"id";if(r.isMany){var c=Array.isArray(i)?i:[i],u=s.filter(function(t){return c.includes(t.attributes[l])});o[n]=u.map(function(t){return rc({},t.attributes)})}else{var p=a.records.find(function(t){return t.attributes[l]===i});p&&(o[n]=rc({},p.attributes))}}}}}),o})},e.prototype.loadProvider=function(){return ru(this,void 0,void 0,function(){var t,e,n,o,r,i,a,s,l,c=this;return rp(this,function(u){switch(u.label){case 0:if(t=this,e=t.attributes,n=t.em,!(o=e.provider)||(0,b.isString)(o))return[2];return i=(r=(0,b.isString)(o.get)?{url:o.get}:o.get).url,a=r.method,s=r.headers,l=r.body,[4,ru(c,void 0,void 0,function(){var t,e,o,r,c;return rp(this,function(u){switch(u.label){case 0:t=this,u.label=1;case 1:return u.trys.push([1,6,,7]),n.trigger(n.DataSources.events.providerLoadBefore,{dataSource:t}),[4,fetch(i,{method:a,headers:s,body:l})];case 2:if((e=u.sent()).ok)return[3,4];return o=Error.bind,[4,e.text()];case 3:throw new(o.apply(Error,[void 0,u.sent()]));case 4:return[4,e.json()];case 5:return(null==(r=u.sent())?void 0:r.records)&&this.setRecords(r.records),(null==r?void 0:r.schema)&&this.upSchema(r.schema),n.trigger(n.DataSources.events.providerLoad,{result:r,dataSource:t}),[3,7];case 6:return c=u.sent(),n.logError(c.message),n.trigger(n.DataSources.events.providerLoadError,{dataSource:t,error:c}),[3,7];case 7:return[2]}})})];case 1:return u.sent(),[2]}})})},e.prototype.removeRecord=function(t,e){var n=this.getRecord(t);if((null==n?void 0:n.mutable)===!1&&!(null==e?void 0:e.dangerously))throw Error("Cannot remove immutable record");return this.records.remove(t,e)},e.prototype.setRecords=function(t){var e=this;this.records.reset([],{silent:!0}),t.forEach(function(t){e.records.add(t)})},e.prototype.upSchema=function(t,e){this.set("schema",rc(rc({},this.schema),t),e)},e.prototype.getSchemaField=function(t){return this.schema[t]},e.prototype.handleChanges=function(t,e,n){var o=n||e;this.em.changesUp(o,{dataRecord:t,options:o})},e}(tH),rh=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rg=function(){return(rg=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rv=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.collectionsStateMap={},o.listenToPropsChange(),o}return rh(e,t),e.prototype.onCollectionsStateMapUpdate=function(t){var e,n;this.collectionsStateMap=t,null==(n=null==(e=this.dataResolverWatchers)?void 0:e.onCollectionsStateMapUpdate)||n.call(e),this.components().forEach(function(e){var n;null==(n=e.onCollectionsStateMapUpdate)||n.call(e,t)})},e.prototype.syncOnComponentChange=function(e,n,o){var r=this.collectionsStateMap;this.collectionsStateMap={},t.prototype.syncOnComponentChange.call(this,e,n,o),this.collectionsStateMap=r,this.onCollectionsStateMapUpdate(r)},e.prototype.setDataResolver=function(t){return this.set("dataResolver",t)},e.prototype.getDataResolver=function(){return this.dataResolverProps},Object.defineProperty(e.prototype,"dataResolverProps",{get:function(){return this.get("dataResolver")}
1,enumerable:!1,configurable:!0}),e.prototype.listenToDataSource=function(){var t,e=this,n=this.dataResolverPath;if(n){var o=this.em,r=this.collectionsStateMap;null==(t=this.dataSourceWatcher)||t.destroy(),this.dataSourceWatcher=new eS({em:o,resolver:new eO({type:ex,path:n},{em:o,collectionsStateMap:r}),onUpdate:function(){return e.onDataSourceChange()}})}},e.prototype.listenToPropsChange=function(){var t=this;this.on("change:dataResolver",function(){t.listenToDataSource()}),this.listenToDataSource()},Object.defineProperty(e.prototype,"dataSourceProps",{get:function(){return this.get("dataResolver")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataResolverPath",{get:function(){var t;return null==(t=this.dataSourceProps)?void 0:t.path},enumerable:!1,configurable:!0}),e.prototype.onDataSourceChange=function(){this.onCollectionsStateMapUpdate(this.collectionsStateMap)},e.prototype.getDataSourceItems=function(){var t=this.dataSourceProps;if(!t)return[];var e=this.listDataSourceItems(t);return e&&(0,b.isArray)(e)?e:rg({},e)},e.prototype.listDataSourceItems=function(t){var e=t instanceof rd?t.get("id"):t.path;if(!e)return[];var n=this.em.DataSources.getValue(e,[]);return 1===e.split(".").length&&(n=Object.entries(n).map(function(t){return t[0],t[1]})),n},e.prototype.getItemKey=function(t,e){return(0,b.isArray)(t)?e:Object.keys(t)[e]},e.prototype.removePropsListeners=function(){var t;this.off("change:dataResolver"),null==(t=this.dataSourceWatcher)||t.destroy(),this.dataSourceWatcher=void 0},e.prototype.destroy=function(e){return this.removePropsListeners(),t.prototype.destroy.call(this,e)},e}(ob),ry=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rm=function(){return(rm=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rb={avoidStore:!0,partial:!0},rw=function(t){function e(e,n){var o=this;if(n.forCloning)return t.call(this,e,n)||this;var r=rm(rm({},e),{droppable:!1}),i=o=t.call(this,r,n)||this;return o.rebuildChildrenFromCollection=o.rebuildChildrenFromCollection.bind(o),o.listenToPropsChange(),o.rebuildChildrenFromCollection(),i}return ry(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rm(rm({},t.prototype.defaults),{droppable:!1,dataResolver:{},type:ps.collection,components:[{type:ps.collectionItem}]})},enumerable:!1,configurable:!0}),e.prototype.getItemsCount=function(){var t,e,n,o=(t=this.getDataSourceItems(),(0,b.isArray)(t)?t.length:Object.keys(t).length),r=Math.max(0,null!=(e=this.getConfigStartIndex())?e:0);return Math.max(0,Math.min(o-1,null!=(n=this.getConfigEndIndex())?n:Number.MAX_VALUE)-r+1)},e.prototype.getConfigStartIndex=function(){return this.dataResolver.startIndex},e.prototype.getConfigEndIndex=function(){return this.dataResolver.endIndex},e.prototype.getDataSource=function(){var t;return null==(t=this.dataResolver)?void 0:t.dataSource},e.prototype.getCollectionId=function(){var t;return null==(t=this.dataResolver)?void 0:t.collectionId},e.prototype.getCollectionItemComponents=function(){return this.firstChild.components()},e.prototype.setCollectionId=function(t){this.updateCollectionConfig({collectionId:t})},e.prototype.setStartIndex=function(t){if(t<0)return void this.em.logError("Start index should be greater than or equal to 0");this.updateCollectionConfig({startIndex:t})},e.prototype.setEndIndex=function(t){this.updateCollectionConfig({endIndex:t})},e.prototype.setDataSource=function(t){this.set(eB,rm(rm({},this.dataResolver),{dataSource:t}))},e.prototype.setCollectionItemComponents=function(t){this.firstChild.components(t)},e.prototype.onCollectionsStateMapUpdate=function(e){var n=this;t.prototype.onCollectionsStateMapUpdate.call(this,e);var o=this.getDataSourceItems(),r=this.resolveCollectionConfig(o).startIndex;
1this.components().forEach(function(t,e){var i=n.getItemKey(o,r+e),a=n.getCollectionsStateMapForItem(o,i);t.onCollectionsStateMapUpdate(a)})},e.prototype.stopSyncComponentCollectionState=function(){this.stopListening(this.components(),"add remove reset",this.syncOnComponentChange),this.onCollectionsStateMapUpdate({})},e.prototype.setCollectionStateMapAndPropagate=function(t,e){t.setSymbolOverride(["locked","layerable",nL]),t.syncComponentsCollectionState(),t.onCollectionsStateMapUpdate(e)},e.prototype.onDataSourceChange=function(){this.rebuildChildrenFromCollection()},e.prototype.listenToPropsChange=function(){var t=this;this.on("change:".concat(eB),function(){t.rebuildChildrenFromCollection(),t.listenToDataSource()}),this.listenToDataSource()},Object.defineProperty(e.prototype,"dataSourceProps",{get:function(){return this.dataResolver.dataSource},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"dataResolver",{get:function(){return this.get(eB)||{}},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"firstChild",{get:function(){return this.components().at(0)},enumerable:!1,configurable:!0}),e.prototype.updateCollectionConfig=function(t){this.set(eB,rm(rm({},this.dataResolver),t))},e.prototype.rebuildChildrenFromCollection=function(){var t=this.getDataSourceItems();if(this.resolveCollectionConfig(t).totalItems===this.components().length)return void this.onCollectionsStateMapUpdate(this.collectionsStateMap);var e=this.getCollectionItems(t);this.components().reset(e,nD)},e.prototype.getCollectionItems=function(t){var e,n=this.ensureFirstChild(),o=n.getStyle().display,r=o&&"none"!==o?o:"";n.addStyle({display:"none"},rb);var i=[n];if(!function(t,e){for(var n=[{property:null==t?void 0:t.collectionId,propertyPath:"dataResolver.collectionId"},{property:null==t?void 0:t.dataSource,propertyPath:"dataResolver.dataSource"}],o=0;o<n.length;o++){var r=n[o].propertyPath;if(!t&&(e.logError('The "'.concat(r,'" property is required in the collection definition.')),1))return[]}var i=null==t?void 0:t.startIndex;return void 0!==i&&(i<0||!Number.isInteger(i))&&e.logError("Invalid startIndex: ".concat(i,". It must be a non-negative integer.")),!0}(this.dataResolver,this.em))return i;var a=this.collectionId,s=null!=t?t:this.getDataSourceItems(),l=this.resolveCollectionConfig(s),c=l.startIndex,u=l.endIndex;if(this.hasDuplicateCollectionId())return this.em.logError('The collection ID "'.concat(a,'" already exists in the parent collection state. Overriding it is not allowed.')),i;for(var p=c;p<=u;p++){var f=p===c,d=this.getItemKey(s,p),h=this.getCollectionsStateMapForItem(s,d);if(f){null==(e=eX(n))||e.forEach(function(t){return e1(t)}),this.setCollectionStateMapAndPropagate(n,h),n.addStyle({display:r},rb);continue}var g=n.clone({symbol:!0,symbolInv:!0});g.set({locked:!0,layerable:!1},rb),this.setCollectionStateMapAndPropagate(g,h),i.push(g)}return i},e.prototype.getCollectionsStateMapForItem=function(t,e){var n,o=this.resolveCollectionConfig(t),r=o.startIndex,i=o.endIndex,a=o.totalItems,s=this.collectionId,l=t[e],c=this.collectionsStateMap,u="string"==typeof e?Object.keys(t).indexOf(e):e;return rm(rm({},c),((n={})[s]={collectionId:s,currentIndex:u,currentItem:l,currentKey:e,startIndex:r,endIndex:i,totalItems:a,remainingItems:a-(1+(u-r))},n))},e.prototype.hasDuplicateCollectionId=function(){var t=this.collectionId;return!!this.collectionsStateMap[t]},e.prototype.resolveCollectionConfig=function(t){var e,n,o=Array.isArray(t),r=o?t.length:Object.keys(t).length,i=null!=(e=this.getConfigStartIndex())?e:0,a=Math.min(r-1,null!=(n=this.getConfigEndIndex())?n:Number.MAX_VALUE),s=0;return r>0&&(s=Math.max(0,a-i+1)),{startIndex:i,endIndex:a,totalItems:s,isArray:o}},e.prototype.ensureFirstChild=function(){var t=this.em.Components.getType(ps.collectionItem).model;return this.firstChild||new t({type:ps.collectionItem},this.opt)},Object.defineProperty(e.prototype,"collectionId",{get:function(){var t,e;return null!=(e=null==(t=this.dataResolverProps)?void 0:t.collectionId)?e:""},enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===ps.collection},e.prototype.toJSON=function(e){var n=t.prototype.toJSON.call(this,e);delete n.droppable,delete n[oh];var o=this.firstChild;return rm(rm({},n),{components:[o]})},e}(rv),r_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rC=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.compView=rS,e}return r_(e,t),e.prototype.initialize=function(t){this.opts=t||{},this.config=t.config||{},this.em=this.config.em;var e=this.collection;this.listenTo(e,"add",this.addTo),this.listenTo(e,"reset",this.resetChildren),this.listenTo(e,"remove",this.removeChildren)},e.prototype.removeChildren=function(t,e,n){var o=this;void 0===n&&(n={}),t.views.forEach(function(t){if(t){var e=t.childrenView,n=t.scriptContainer;e&&e.stopListening(),C(n),t.remove.apply(t)}}),t.components().forEach(function(t){return o.removeChildren(t,e,n)})},e.prototype.addTo=function(t){this.addToCollection(t,null,this.collection.indexOf(t))},e.prototype.addToCollection=function(t,e,n){for(var o,r=this.config,i=this.opts,a=this.em,s=r.frameView,l=(null==s?void 0:s.model)&&t.getView(s.model),c=i.componentTypes||(null==a?void 0:a.Components.getTypes()),u=t.get("type")||"default",p=this.compView,f=0;f<c.length;f++)if(c[f].id==u){p=c[f].view;break}var d=l||new p({model:t,config:r,componentTypes:c});try{o=d.render().el}catch(t){o=document.createTextNode(""),a.logError(t)}if(e)e.appendChild(o);else{var h=this.parentEl,g=h.childNodes;if((0,b.isUndefined)(n))h.appendChild(o);else{var v=g.length==n;v&&n--,v||!g.length?h.appendChild(o):h.insertBefore(o,g[n])}}return t.opt.temporary||null==a||a.trigger(pi.mount,t),o},e.prototype.resetChildren=function(t,e){var n=this;if(void 0===e&&(e={}),!e.skipViewUpdate){var o=e.previousModels;e.skipDomReset||(this.parentEl.innerHTML=""),null==o||o.forEach(function(t){return n.removeChildren(t,n.collection)}),t.each(function(t){return n.addToCollection(t)})}},e.prototype.render=function(t){var e=this,n=this.el,o=document.createDocumentFragment();return this.parentEl=t||this.el,this.collection.each(function(t){return e.addToCollection(t,o)}),n.innerHTML="",n.appendChild(o),this},e}(tB),rx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rO=function(){return(rO=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};let rS=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.rendered=!1,e}return rx(e,t),e.prototype.className=function(){return this.getClasses()},e.prototype.tagName=function(){return this.model.get("tagName")},e.prototype.preinitialize=function(t){void 0===t&&(t={}),this.opts=t},e.prototype.initialize=function(t){void 0===t&&(t={});var e=this.model,n=t.config||{},o=n.em,r=e.opt||{},i=this.$el,a=this.el;this.opts=t,this.modelOpt=r,this.config=n,this.em=o,this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.attr=e.get("attributes"),this.classe=this.attr.class||[],this.listenTo(e,"change:style",this.updateStyle),this.listenTo(e,"change:attributes",this.renderAttributes),this.listenTo(e,"change:highlightable",this.updateHighlight),this.listenTo(e,"change:status change:locked",this.updateStatus),this.listenTo(e,"change:script rerender",this.reset),this.listenTo(e,"change:content",this.updateContent),this.listenTo(e,"change",this.handleChange),this.listenTo(e,"active",this.onActive),this.listenTo(e,"disable",this.onDisable),i.data("model",e),tj(a,this),e.view=this,this.frameView&&e.views.push(this),this.initClasses(),this.initComponents({avoidRender:!0}),this.events=rO(rO({},this.constructor.getEvents()),{dragstart:"handleDragStart"}),this.delegateEvents(),r.temporary||this.init(this._clbObj())},Object.defineProperty(e.prototype,"__cmpStyleOpts",{get:function(){return{state:"",mediaText:""}}
vendor: 9,405 bytes, line 1
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"frameView",{get:function(){return this.opts.config.frameView},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"createDoc",{get:function(){var t,e,n=(null==(t=this.frameView)?void 0:t.getDoc())||document;return(null==(e=this.opts.config)?void 0:e.useFrameDoc)?n:document},enumerable:!1,configurable:!0}),e.prototype.__isDraggable=function(){var t=this.model,e=this.config,n=t.attributes.draggable;return e.draggableComponents&&n},e.prototype._clbObj=function(){var t=this.em,e=this.model,n=this.el;return{editor:null==t?void 0:t.getEditor(),model:e,el:n}},e.prototype.init=function(t){},e.prototype.removed=function(t){},e.prototype.onRender=function(t){},e.prototype.onActive=function(t){},e.prototype.onDisable=function(t){},e.prototype.remove=function(){t.prototype.remove.call(this);var e,n=this.model,o=this.$el,r=n.views,i=this.frameView||{};return n.components().forEach(function(t){var e=t.getView(i.model);null==e||e.remove()}),null==(e=this.childrenView)||e.remove(),r.splice(r.indexOf(this),1),this.removed(this._clbObj()),o.data({model:"",collection:"",view:""}),this},e.prototype.handleDragStart=function(t){if(!this.__isDraggable())return!1;t.stopPropagation(),t.preventDefault();var e=this.em.getSelectedAll(),n=e.includes(this.model)?e:[this.model];this.em.Commands.run("tlb-move",{target:n,event:t})},e.prototype.initClasses=function(){var t=this.model,e=t.classes,n="change:classes";e instanceof n$&&(this.stopListening(t,n,this.initClasses),this.listenTo(t,n,this.initClasses),this.listenTo(e,"add remove change reset",this.updateClasses),e.length&&this.importClasses())},e.prototype.initComponents=function(t){void 0===t&&(t={});var e=this.model,n=this.$el,o=this.childrenView,r=e.get("components"),i=[e,"change:components",this.initComponents];r instanceof or&&(n.data("collection",r),o&&o.remove(),this.stopListening.apply(this,i),t.avoidRender||this.renderChildren(),this.listenTo.apply(this,i))},e.prototype.handleChange=function(){var t=this.model,e=(0,b.keys)(t.changed);if(1!==e.length||"status"!==e[0])for(var n in t.emitUpdate(),t.changed)t.emitUpdate(n)},e.prototype.importClasses=function(){var t=this.em,e=this.model,n=t.Selectors;n&&e.classes.forEach(function(t){return n.add(t.getName())})},e.prototype.updateStatus=function(t){void 0===t&&(t={});var e=this.em,n=this.el,o=this.ppfx,r=this.model,i=null==e?void 0:e.Canvas,a=null==i?void 0:i.config.extHl,s=r.get("status"),l="".concat(o,"selected"),c="".concat(l,"-parent"),u="".concat(o,"freezed"),p="".concat(o,"hovered"),f="".concat(o,"no-pointer"),d="".concat(o,"pointer-init"),h=[l,c,u,p,f,d],g=a&&!t.noExtHl?"":l;this.$el.removeClass(h.join(" "));var v=[n.getAttribute("class")||""],y=!(null==i?void 0:i.hasCustomSpot(po.Select)),m=!(null==i?void 0:i.hasCustomSpot(po.Target));switch(s){case"selected":y&&v.push(g);break;case"selected-parent":m&&v.push(c);break;case"freezed":v.push(u);break;case"freezed-selected":v.push(u),y&&v.push(g);break;case"hovered":t.avoidHover||v.push(p)}(0,b.isBoolean)(r.locked)&&v.push(r.locked?f:d);var w=v.filter(Boolean).join(" ");w&&n.setAttribute("class",w)},e.prototype.updateHighlight=function(){var t=this.model,e=t.get("textable"),n=t.get("highlightable")&&(e||!t.isChildOf("text"));this.setAttribute("data-gjs-highlightable",!!n||"")},e.prototype.updateStyle=function(t,e,n){void 0===n&&(n={});var o=this.model;if(of(this.em)&&!n.inline){var r=this.__cmpStyleOpts,i=o.getStyle(rO({inline:!0},r));(0,b.isEmpty)(i)||o.setStyle(i,r)}else this.setAttribute("style",o.styleToString(n))},e.prototype.updateStyles=function(){this.updateStyle()},e.prototype.updateClasses=function(){var t,e,n=(null==(e=(t=this.model.classes).pluck)?void 0:e.call(t,"name").join(" "))||"";this.setAttribute("class",n),this.updateStatus(),this.onAttrUpdate()},e.prototype.setAttribute=function(t,e){var n=this.$el;e?n.attr(t,e):n.removeAttr(t)},e.prototype.getClasses=function(){return this.model.getClasses().join(" ")},e.prototype.updateAttributes=function(){var t=this.model,e=this.$el;this.el;var n=t.attributes,o=n.textable,r=n.type,i=rO(rO({id:t.getId(),"data-gjs-type":r||"default"},this.__isDraggable()&&{draggable:!0}),o&&{contenteditable:"false"});this.__clearAttributes(),this.updateStyle(),this.updateHighlight();var a=rO(rO({},i),t.getAttributes());(0,b.keys)(a).forEach(function(t){return!1===a[t]&&delete a[t]}),e.attr(a)},e.prototype.__clearAttributes=function(){var t=this.el,e=this.$el,n=[];(0,b.each)(t.attributes,function(t){return n.push(t.nodeName)}),n.forEach(function(t){return e.removeAttr(t)})},e.prototype.updateContent=function(){var t=this.model.content,e=this.model.components().length;this.getChildrenContainer().innerHTML=e?"":t},e.prototype.prevDef=function(t){t.preventDefault()},e.prototype.updateScript=function(){var t=this.model,e=this.em;t.get("script")&&(null==e||e.Canvas.getCanvasView().updateScript(this))},e.prototype.getChildrenContainer=function(){var t=this.el;return"function"==typeof this.getChildrenSelector?t=this.el.querySelector(this.getChildrenSelector()):this.getTemplate,t},e.prototype.getOffsetRect=function(){var t={top:0,left:0,bottom:0,right:0},e=this.el,n=0,o=0,r=function(i){var a=i.offsetParent;a?(n+=a.offsetTop,o+=a.offsetLeft,r(a)):(t.top=e.offsetTop+n,t.left=e.offsetLeft+o,t.bottom=t.top+e.offsetHeight,t.right=t.left+e.offsetWidth)};return r(e),t},e.prototype.isInViewport=function(){var t=this.el,e=this.em,n=this.frameView,o=e.Canvas.getCanvasView().getElBoxRect(t,{local:!0}),r=n.el,i=r.clientHeight,a=r.clientWidth,s=o.y,l=o.x,c=s+o.height,u=l+o.width;return(s>=0&&s<i||c>0&&c<i)&&(u>=0&&u<a||l>0&&l<=a)},e.prototype.scrollIntoView=function(t){var e;if(void 0===t&&(t={}),!this.isInViewport()||t.force){var n=this.el;if("smooth"!==t.behavior){var o=this.getOffsetRect();null==(e=n.ownerDocument.defaultView)||e.scrollTo(0,o.top)}else n.scrollIntoView(rO({behavior:"smooth",block:"nearest"},t))}},e.prototype.reset=function(){var t=this.el,e=this.model;this.scriptContainer&&e.emitWithEditor(pi.scriptUnmount,{component:e,view:this,el:t}),this.el="",this._ensureElement(),this._setData(),O(t,this.el),this.render()},e.prototype._setData=function(){var t=this.model,e=this.el,n=t.components();this.$el.data({model:t,collection:n,view:this}),tj(e,this)},e.prototype._createElement=function(t){return this.createDoc.createElement(t)},e.prototype.renderChildren=function(){this.updateContent();var t=this.getChildrenContainer(),e=this.childrenView||new rC({collection:this.model.get("components"),config:this.config,componentTypes:this.opts.componentTypes});e.render(t),this.childrenView=e;for(var n=Array.prototype.slice.call(e.el.childNodes),o=0,r=n.length;o<r;o++)t.appendChild(n.shift())},e.prototype.renderAttributes=function(t,e,n){void 0===n&&(n={}),n.skipViewUpdate||(this.updateAttributes(),this.updateClasses())},e.prototype.onAttrUpdate=function(){},e.prototype.render=function(){return this.renderAttributes(),this.modelOpt.temporary||(this.renderChildren(),this.updateScript(),tj(this.el,this),this.postRender()),this},e.prototype.postRender=function(){if(!this.modelOpt.temporary){var t=this.model,e=this.el;this.onRender(this._clbObj()),t.emitWithEditor(pi.render,{component:t,view:this,el:e}),this.rendered=!0}},e.getEvents=function(){return(0,b.result)(this.prototype,"events")},e}(tB);var rT=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rT(e,t),e}(rS),rE=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rk=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rE(e,t),e.prototype.initialize=function(e){void 0===e&&(e={}),t.prototype.initialize.call(this,e),this.postRender=this.postRender.bind(this),this.listenTo(this.model.components(),"reset",this.postRender),this.dataResolverListener=new eS({em:this.em,resolver:this.model.dataResolver,onUpdate:this.postRender})},e.prototype.renderDataResolver=function(){var t=this.model.getIfTrueContent(),e=this.model.getIfFalseContent(),n=null==t?void 0:t.getEl(),o=null==e?void 0:e.getEl(),r=this.model.isTrue();n&&(n.style.display=r?"":"none"),o&&(o.style.display=r?"none":"")},e.prototype.postRender=function(){this.renderDataResolver(),t.prototype.postRender.call(this)},e.prototype.remove=function(){return this.stopListening(this.model.components(),"reset",this.postRender),this.dataResolverListener.destroy(),t.prototype.remove.call(this)},e}(rS),rj=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rj(e,t),e.prototype.initialize=function(e){var n=this;void 0===e&&(e={}),t.prototype.initialize.call(this,e),this.dataResolverListener=new eS({em:this.em,resolver:this.model.dataResolver,onUpdate:function(){return n.postRender()}})},e.prototype.remove=function(){return this.dataResolverListener.destroy(),t.prototype.remove.call(this)},e.prototype.postRender=function(){var e=this.model;e.getDataResolver().asPlainText?this.el.textContent=e.getDataValue():this.el.innerHTML=e.getDataValue(),t.prototype.postRender.call(this)},e}(rS),rM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rD=function(){return(rD=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rM(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rD(rD({},t.prototype.defaults),{tagName:"",droppable:!1,layerable:!1,selectable:!1,editable:!0})},enumerable:!1,configurable:!0}),e.prototype.toHTML=function(){var t=this.content,e=this.parent();return(null==e?void 0:e.is("script"))?t:this.__escapeContent(t)},e.prototype.__escapeContent=function(t){return ty(t)},e.isComponent=function(t){var e;if(3===t.nodeType)return{type:"textnode",content:null!=(e=t.textContent)?e:""}},e}(ob),rI=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rN=function(){return(rN=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rR=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rI(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rN({},t.prototype.defaults)},enumerable:!1,configurable:!0}),e.prototype.toHTML=function(){return"\x3c!--".concat(this.content,"--\x3e")}
1,e.isComponent=function(t){var e;if(8==t.nodeType)return{type:"comment",content:null!=(e=t.textContent)?e:""}},e}(rL),rV=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rF=function(){return(rF=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rH="iframe",rU=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rV(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rF(rF({},t.prototype.defaults),{type:rH,tagName:rH,droppable:!1,resizable:!0,traits:["id","title","src"],attributes:{frameborder:"0"}})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===rH},e}(ob),rB=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}
vendor: 4,764 bytes, line 1
1(),rz=function(){return(rz=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rW='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)"',r$=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this,r=o.get("attributes").src;return r&&tM((0,b.result)(o,"defaults").src)!==r&&o.set("src",r,{silent:!0}),o}return rB(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rz(rz({},t.prototype.defaults),{type:"image",tagName:"img",void:!0,droppable:0,editable:1,highlightable:0,resizable:{ratioDefault:1},traits:["alt"],src:"<svg ".concat(rW,'>\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(rW,'>\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:""})},enumerable:!1,configurable:!0}),e.prototype.initToolbar=function(){t.prototype.initToolbar.call(this);var e=this.em;if(e){var n=e.Commands,o="image-editor";if(n.has(o)){for(var r=!1,i=this.get("toolbar"),a=0;a<i.length;a++)if("image-editor"===i[a].command){r=!0;break}r||(i.push({attributes:{class:"fa fa-pencil"},command:o}),this.set("toolbar",i))}}},e.prototype.getAttrToHTML=function(){var e=t.prototype.getAttrToHTML.call(this),n=this.getSrcResult();return n&&(e.src=n),e},e.prototype.getSrcResult=function(t){void 0===t&&(t={});var e=this.get(t.fallback?"fallback":"src")||"",n=e;return e&&"<svg"===e.substr(0,4)&&(n=tM(e)),n},e.prototype.isDefaultSrc=function(){var t=this.get("src"),e=(0,b.result)(this,"defaults").src;return t===e||t===tM(e)},e.prototype.toJSON=function(e){var n=t.prototype.toJSON.call(this,e),o=n.attributes;return o&&n.src===o.src&&delete n.src,n},e.prototype.parseUri=function(t){var e={};if(to())(e=document.createElement("a")).href=t;else if("undefined"!=typeof URL)try{e=new URL(t)}catch(t){}return{hostname:e.hostname||"",pathname:e.pathname||"",protocol:e.protocol||"",search:e.search||"",hash:e.hash||"",port:e.port||"",query:function(t){void 0===t&&(t="");for(var e={},n=t.substring(1).split("&"),o=0;o<n.length;o++){var r=n[o].split("="),i=decodeURIComponent(r[0]);i&&(e[i]=decodeURIComponent(r[1]||""))}return e}(e.search)}},e.isComponent=function(t){return"img"===ti(t.tagName)},e}(ob),rq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rG=function(){return(rG=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rK=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this;return o.__checkInnerChilds(),o}return rq(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rG(rG({},t.prototype.defaults),{type:"text",droppable:!1,editable:!0})},enumerable:!1,configurable:!0}),e.prototype.__checkInnerChilds=function(){var t=this.em.Components.config.disableTextInnerChilds;if(t){var e=function(t){t.isInstanceOf("textnode")||t.set({locked:!0,layerable:!1})};(0,b.isFunction)(t)?this.forEachChild(function(n){t(n)&&e(n)}):this.forEachChild(e)}},e}(ob),rY=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),rJ=function(){return(rJ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},rX="label",rZ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rY(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return rJ(rJ({},t.prototype.defaults),{type:rX,tagName:rX,traits:["id","title","for"]})}
1,enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===rX},e}(rK),rQ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r0=function(){return(r0=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r1="link",r2=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return rQ(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return r0(r0({},t.prototype.defaults),{type:r1,tagName:"a",traits:["title","href","target"]})},enumerable:!1,configurable:!0}),e.isComponent=function(t,e){if(void 0===e&&(e={}),"a"===ti(t.tagName)){var n,o=e.textTags||[];n={type:r1,editable:!1};var r=t.childNodes;r.length||delete n.editable,(0,b.forEach)(r,function(t){var e=t.tagName;(3==t.nodeType&&""!==t.textContent.trim()||e&&o.indexOf(ti(e))>=0)&&delete n.editable})}return n},e}(rK),r3=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r5=function(){return(r5=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r4=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this;return o.get("src")?o.parseFromSrc():o.updateSrc(),o.listenTo(o,"change:address change:zoom change:mapType",o.updateSrc),o}return r3(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){var e=t.prototype.defaults;return r5(r5({},e),{type:"map",src:"",void:!1,mapUrl:"https://maps.google.com/maps",tagName:"iframe",mapType:"q",address:"",zoom:"1",attributes:{frameborder:0},toolbar:e.toolbar,traits:[{label:"Address",name:"address",placeholder:"eg. London, UK",changeProp:!0},{type:"select",label:"Map type",name:"mapType",changeProp:!0,options:[{id:"q",label:"Roadmap"},{id:"w",label:"Satellite"}]},{label:"Zoom",name:"zoom",type:"range",min:1,max:20,changeProp:!0}]})},enumerable:!1,configurable:!0}),e.prototype.updateSrc=function(){this.set("src",this.getMapUrl())},e.prototype.getMapUrl=function(){var t=this.get("address"),e=this.get("zoom"),n=this.get("mapType");t=t?"&q="+t:"",e=e?"&z="+e:"",n=n?"&t="+n:"";var o=this.get("mapUrl")+"?"+t+e+n;return o+"&output=embed"},e.prototype.parseFromSrc=function(){var t=this.parseUri(this.get("src")).query;t.q&&this.set("address",t.q),t.z&&this.set("zoom",t.z),t.t&&this.set("mapType",t.t)},e.isComponent=function(t){var e,n=(null==(e=t.getAttribute)?void 0:e.call(t,"src"))||"";if("iframe"==ti(t.tagName)&&/maps\.google\.com/.test(n))return{type:"map",src:n}},e}(r$),r9=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),r6=function(){return(r6=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},r7="script",r8=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r9(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return r6(r6({},t.prototype.defaults),{type:r7,tagName:r7,droppable:!1,draggable:!1,layerable:!1,highlightable:!1})}
1,enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===r7},e}(ob),it=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ie=function(){return(ie=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},io=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return it(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return ie(ie({},t.prototype.defaults),{type:"svg",tagName:"svg",highlightable:!1,resizable:{ratioDefault:!0}})},enumerable:!1,configurable:!0}),e.prototype.getName=function(){var t=this.get("tagName"),e=this.get("custom-name");return t=t.charAt(0).toUpperCase()+t.slice(1),e||t},e.isComponent=function(t){return"svg"===ti(t.tagName)},e}(ob),ir=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ii=function(){return(ii=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ia=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ir(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return ii(ii({},t.prototype.defaults),{selectable:!1,hoverable:!1,layerable:!1})},enumerable:!1,configurable:!0}),e.isComponent=function(t,e){return void 0===e&&(e={}),!!e.inSvg},e}(io),is=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),il=function(){return(il=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ic="table",iu=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this,r=o.get("components");return r.length||r.add({type:"tbody"}),o}return is(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return il(il({},t.prototype.defaults),{type:ic,tagName:ic,droppable:["tbody","thead","tfoot"]})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===ic},e}(ob),ip=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),id=function(){return(id=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ih="tbody",ig=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this,r=o.get("components"),i=o.get("columns"),a=o.get("rows");if(!r.length){for(var s=[];a--;){for(var l=[],c=i;c--;)l.push({type:"cell",classes:["cell"]});s.push({type:"row",classes:["row"],components:l})}r.add(s)}return o}return ip(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return id(id({},t.prototype.defaults),{type:ih,tagName:ih,draggable:["table"],droppable:["tr"],columns:1,rows:1})}
1,enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===ih},e}(ob),iv=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iy=function(){return(iy=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},im=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iv(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return iy(iy({},t.prototype.defaults),{type:"cell",tagName:"td",draggable:["tr"]})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return["td","th"].indexOf(ti(t.tagName))>=0},e}(ob),ib=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iw=function(){return(iw=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},i_="tfoot",iC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ib(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return iw(iw({},t.prototype.defaults),{type:i_,tagName:i_})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===i_},e}(ig),ix=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iO=function(){return(iO=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},iS="thead",iT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ix(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return iO(iO({},t.prototype.defaults),{type:iS,tagName:iS})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return ti(t.tagName)===iS},e}(ig),iP=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iE=function(){return(iE=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ik=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iP(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return iE(iE({},t.prototype.defaults),{tagName:"tr",draggable:["thead","tbody","tfoot"],droppable:["th","td"]})},enumerable:!1,configurable:!0}),e.isComponent=function(t){return"tr"===ti(t.tagName)},e}(ob),ij=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iA=function(){return(iA=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},iM="video",iD="ytnc",iL="strict-origin-when-cross-origin",iI=function(t){return t&&"0"!==t},iN=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this;return o.get("src")&&o.parseFromSrc(),o.updatePropsFromAttr(),o.updateTraits(),o.on("change:provider",o.updateTraits),o.on("change:videoId change:provider",o.updateSrc),o}return ij(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return iA(iA({},t.prototype.defaults),{type:iM,tagName:iM,videoId:"",void:!1,provider:"so",ytUrl:"https://www.youtube.com/embed/",ytncUrl:"https://www.youtube-nocookie.com/embed/",viUrl:"https://player.vimeo.com/video/",loop:!1,poster:"",muted:!1,autoplay:!1,controls:!0,color:"",list:"",src:"",rel:1,modestbranding:0,sources:[],attributes:{allowfullscreen:"allowfullscreen"}})},enumerable:!1,configurable:!0}),e.prototype.updatePropsFromAttr=function(){if("so"===this.get("provider")){var t=this.get("attributes"),e=t.controls,n=t.autoplay,o=t.loop,r=t.muted,i={};tn(e)&&(i.controls=!!e),tn(n)&&(i.autoplay=!!n),tn(o)&&(i.loop=!!o),tn(r)&&(i.muted=!!r),tx(i)||this.set(i)}},e.prototype.updateProviderAttributes=function(){var t=this.attributes,e=t.provider,n=t.attributes,o=iA({},void 0===n?{}:n),r=!1;"yt"===e||e===iD?tn(o.referrerpolicy)||(o.referrerpolicy=iL,r=!0):o.referrerpolicy===iL&&(delete o.referrerpolicy,r=!0),r&&this.setAttributes(o)},e.prototype.updateTraits=function(){var t,e=this.em,n=this.get("provider"),o="iframe";switch(n){case"yt":case iD:t=this.getYoutubeTraits();break;case"vi":t=this.getVimeoTraits();break;default:o="video",t=this.getSourceTraits()}this.updateProviderAttributes(),this.set({tagName:o},{silent:!0}),this.set({traits:t}),e.get("ready")&&e.trigger(pi.toggled)},e.prototype.parseFromSrc=function(){var t=this.get("provider"),e=this.parseUri(this.get("src")),n=e.query;switch(t){case"yt":case iD:case"vi":this.set("videoId",e.pathname.split("/").pop()),n.list&&this.set("list",n.list),iI(n.autoplay)&&this.set("autoplay",!0),iI(n.loop)&&this.set("loop",!0),0===parseInt(n.controls)&&this.set("controls",!1),iI(n.color)&&this.set("color",n.color),"0"===n.rel&&this.set("rel",0),"1"===n.modestbranding&&this.set("modestbranding",1),"1"===n.muted&&this.set("muted",!0)}},e.prototype.updateSrc=function(){var t=this.get("provider"),e="";switch(t){case"yt":e=this.getYoutubeSrc();break;case iD:e=this.getYoutubeNoCookieSrc();break;case"vi":e=this.getVimeoSrc()}this.set({src:e})},e.prototype.getAttrToHTML=function(){var e=t.prototype.getAttrToHTML.call(this);switch(this.get("provider")){case"yt":case iD:case"vi":break;default:e.loop=!!this.get("loop"),e.autoplay=!!this.get("autoplay"),e.controls=!!this.get("controls"),e.muted=!!this.get("muted")}return e},e.prototype.getProviderTrait=function(){return{type:"select",label:"Provider",name:"provider",changeProp:!0,options:[{value:"so",name:"HTML5 Source"},{value:"yt",name:"Youtube"},{value:iD,name:"Youtube (no cookie)"},{value:"vi",name:"Vimeo"}]}},e.prototype.getSourceTraits=function(){return[this.getProviderTrait(),{label:"Source",name:"src",placeholder:"eg. ./media/video.mp4",changeProp:!0},{label:"Poster",name:"poster",placeholder:"eg. ./media/image.jpg"},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait(),this.getMutedTrait()]},e.prototype.getYoutubeTraits=function(){return[this.getProviderTrait(),{label:"Video ID",name:"videoId",placeholder:"eg. jNQXAC9IVRw",changeProp:!0},this.getAutoplayTrait(),this.getLoopTrait(),this.getControlsTrait(),{type:"checkbox",label:"Related",name:"rel",changeProp:!0},{type:"checkbox",label:"Modest",name:"modestbranding",changeProp:!0},this.getMutedTrait()]},e.prototype.getVimeoTraits=function(){return[this.getProviderTrait(),{label:"Video ID",name:"videoId",placeholder:"eg. 123456789",changeProp:!0},{label:"Color",name:"color",placeholder:"eg. FF0000",changeProp:!0},this.getAutoplayTrait(),this.getLoopTrait(),this.getMutedTrait()]},e.prototype.getAutoplayTrait=function(){return{type:"checkbox",label:"Autoplay",name:"autoplay",changeProp:!0}},e.prototype.getLoopTrait=function(){return{type:"checkbox",label:"Loop",name:"loop",changeProp:!0}},e.prototype.getControlsTrait=function(){return{type:"checkbox",label:"Controls",name:"controls",changeProp:!0}},e.prototype.getMutedTrait=function(){return{type:"checkbox",label:"Muted",name:"muted",changeProp:!0}},e.prototype.getYoutubeSrc=function(){var t=this.get("videoId"),e=this.get("ytUrl"),n=this.get("list");return e+=t+(0>t.indexOf("?")?"?":""),e+=n?"&list=".concat(n):"",e+=this.get("autoplay")?"&autoplay=1":"",e+=this.get("muted")?"&mute=1":"",e+=this.get("controls")?"":"&controls=0&showinfo=0",e+=this.get("loop")?"&loop=1&playlist=".concat(t):"",e+=this.get("rel")?"":"&rel=0",e+=this.get("modestbranding")?"&modestbranding=1":""},e.prototype.getYoutubeNoCookieSrc=function(){var t=this.getYoutubeSrc();return t.replace(this.get("ytUrl"),this.get("ytncUrl"))},e.prototype.getVimeoSrc=function(){var t=this.get("viUrl");return t+=this.get("videoId")+"?",t+=this.get("autoplay")?"&autoplay=1":"",t+=this.get("muted")?"&muted=1":"",t+=this.get("loop")?"&loop=1":"",t+=this.get("controls")?"":"&title=0&portrait=0&badge=0",t+=this.get("color")?"&color="+this.get("color"):""},e.isComponent=function(t){var e,n=t.tagName,o=(null==(e=t.getAttribute)?void 0:e.call(t,"src"))||"",r=/youtube\.com\/embed/.test(o),i=/youtube-nocookie\.com\/embed/.test(o),a=/player\.vimeo\.com\/video/.test(o),s=r||i||a;if(ti(n)==iM||"iframe"==ti(n)&&s){var l={type:"video"};return o&&(l.src=o),s&&(r?l.provider="yt":i?l.provider=iD:a&&(l.provider="vi")),l}},e}(r$);!function(t){t.currentIndex="currentIndex",t.startIndex="startIndex",t.prevItem="prevItem",t.currentItem="currentItem",t.nextItem="nextItem",t.currentKey="currentKey",t.endIndex="endIndex",t.collectionId="collectionId",t.totalItems="totalItems",t.remainingItems="remainingItems"}(pw||(pw={}));var iR=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iV=function(){return(iV=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},iF=function(t){function e(e,n){void 0===e&&(e={});var o=t.call(this,e,n)||this;return o._resolverCurrentItem=0,o._isWatchingCollectionStateMap=!1,o.dataResolverProps&&(o.onDataSourceChange(),o.syncComponentsCollectionState()),o}return iR(e,t),Object.defineProperty(e.prototype,"defaults",{get:function(){return iV(iV({},t.prototype.defaults),{dataResolver:null,tagName:"body",removable:!1,copyable:!1,draggable:!1,components:[],traits:[],doctype:"",head:null,docEl:null,stylable:["background","background-color","background-image","background-repeat","background-attachment","background-position","background-size"]})},enumerable:!1,configurable:!0}),e.prototype.preInit=function(){var t,e,n=this.opt,o=this.attributes,r=null==(t=this.em)?void 0:t.Components,i=null==(e=null==r?void 0:r.getType(oC))?void 0:e.model,a=null==r?void 0:r.getType("default").model;if(i){var s=o.head,l=o.docEl;this.set({head:s&&s instanceof ob?s:new i(iV({},s),n),docEl:l&&l instanceof ob?l:new a(iV({tagName:"html"},l),n)},{silent:!0})}},Object.defineProperty(e.prototype,"head",{get:function(){return this.get("head")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"docEl",{get:function(){return this.get("docEl")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"doctype",{get:function(){return this.attributes.doctype||""},enumerable:!1,configurable:!0}),e.prototype.clone=function(e){var n=t.prototype.clone.call(this,e);return n.set("head",this.get("head").clone(e)),n.set("docEl",this.get("docEl").clone(e)),n},e.prototype.toHTML=function(e){void 0===e&&(e={});var n=this.doctype,o=(0,b.isUndefined)(e.asDocument)?!!n:e.asDocument,r=this.head,i=this.docEl,a=t.prototype.toHTML.call(this,e),s=o&&(null==r?void 0:r.toHTML(e))||"",l=o&&H(null==i?void 0:i.getAttrToHTML())||"";return o?"".concat(n,"<html").concat(l?" ".concat(l):"",">").concat(s).concat(a,"</html>"):a},e.prototype.onCollectionsStateMapUpdate=function(e){var n=this.head;t.prototype.onCollectionsStateMapUpdate.call(this,e),n.onCollectionsStateMapUpdate(e)},e.prototype.syncComponentsCollectionState=function(){t.prototype.syncComponentsCollectionState.call(this),this.head.syncComponentsCollectionState()},e.prototype.syncOnComponentChange=function(e,n,o){var r=this.getCollectionsStateMap();this.collectionsStateMap=r,t.prototype.syncOnComponentChange.call(this,e,n,o),this.onCollectionsStateMapUpdate(r)},Object.defineProperty(e.prototype,"resolverCurrentItem",{get:function(){return this._resolverCurrentItem},set:function(t){this._resolverCurrentItem=t,this.onCollectionsStateMapUpdate(this.getCollectionsStateMap())},enumerable:!1,configurable:!0}),e.prototype.setResolverCurrentItem=function(t){this.resolverCurrentItem=t},e.prototype.getCollectionsState=function(){var t,e,n,o,r="".concat(pl.rootData),i=this.dataResolverPath,a=this.resolverCurrentItem,s={collectionId:r};if(!i)return s;var l=this.getDataSourceItems(),c=(0,b.isArray)(l)?l:Object.values(l||{}),u=a;if((0,b.isNumber)(a))n=c[a],e=c[a-1],o=c[a+1];else{var p=Object.entries(l).map(function(t){var e=t[0],n=t[1];return iV({id:e},n)}).findIndex(function(t){return(null==t?void 0:t.id)===a});u=p,n=c[p],e=c[p-1],o=c[p+1]}return iV(iV({},s),((t={prevItem:e,nextItem:o})[pw.currentItem]=n,t[pw.currentIndex]=u,t[pw.totalItems]=c.length,t))},e.prototype.onDataSourceChange=function(){this.onCollectionsStateMapUpdate(this.getCollectionsStateMap())},e.prototype.listenToPropsChange=function(){var t=this;this.on("change:dataResolver",function(e,n){var o=!(0,b.isUndefined)(n);o&&!t._isWatchingCollectionStateMap?(t._isWatchingCollectionStateMap=!0,t.syncComponentsCollectionState(),t.onCollectionsStateMapUpdate(t.getCollectionsStateMap()),t.listenToDataSource()):!o&&t._isWatchingCollectionStateMap&&(t._isWatchingCollectionStateMap=!1,t.stopSyncComponentCollectionState())}),this.listenToDataSource()},e.prototype.getCollectionsStateMap=function(){var t;return this.dataResolverPath?((t={})[pl.rootData]=this.getCollectionsState(),t):{}},e.prototype.__postAdd=function(){var e,n=null==(e=this.em)?void 0:e.UndoManager;return this.__hasUm||null==n||n.add(this),t.prototype.__postAdd.call(this)},e.prototype.__postRemove=function(){var e,n=null==(e=this.em)?void 0:e.UndoManager;return null==n||n.remove(this),t.prototype.__postRemove.call(this)},e.isComponent=function(){return!1},e}(rv),iH=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iU=function(){return(iU=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},iB=function(t){function e(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=t.apply(this,e)||this;o.refreshDbn=(0,b.debounce)(function(){return o.refresh()},0);var r=o.events;return o.on(r.update,o.onUpdate),o.on(r.updateInside,o.onUpdateDeep),o}return iH(e,t),e.prototype.removeChildren=function(e,n,o){var r;void 0===o&&(o={}),t.prototype.removeChildren.call(this,e,n,o),null==(r=eX(e))||r.forEach(function(t){return e1(t,{skipRefs:!0})}),this.__trgEvent(this.events.symbolMainRemove,{component:e})},e.prototype.onAdd=function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];t.prototype.onAdd.apply(this,e);var o=e[0];this.__trgEvent(this.events.symbolMainAdd,{component:o})},e.prototype.onUpdate=function(t){this.__trgEvent(this.events.symbolMainUpdate,t)},e.prototype.onUpdateDeep=function(t){this.__trgEvent(this.events.symbolMainUpdateDeep,t)},e.prototype.refresh=function(){var t=this.em,e=this.events;t.trigger(e.symbol)},e.prototype.__trgEvent=function(t,e,n){void 0===n&&(n=!1);var o=this.em,r=this.events,i=n?r.symbolInstance:r.symbolMain;o.trigger(t,e),o.trigger(i,iU(iU({},e),{event:t})),this.refreshDbn()},e}(or),iz=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iW=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iz(e,t),e.prototype._setAttributes=function(){},e.prototype.renderAttributes=function(){},e.prototype.updateStatus=function(){},e.prototype.updateClasses=function(){},e.prototype.setAttribute=function(){},e.prototype.updateAttributes=function(){},e.prototype.initClasses=function(){},e.prototype.initComponents=function(){},e.prototype.delegateEvents=function(){return this},e.prototype._createElement=function(){return document.createTextNode("")},e.prototype.render=function(){var t=this.model,e=this.el;return t.opt.temporary||(e.textContent=t.content),this},e}(rS),i$=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i$(e,t),e.prototype._createElement=function(){return document.createComment(this.model.content)},e}(iW),iG=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iG(e,t),e.prototype.tagName=function(){return"div"},e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.listenTo(this.model,"change:attributes:src",this.updateSrc)},e.prototype.updateSrc=function(){var t,e,n=(t=this.el,t.querySelectorAll("iframe"))[0];n&&(e={src:this.__getSrc()},n&&n.setAttribute&&(0,b.each)(e,function(t,e){return n.setAttribute(e,t)}))},e.prototype.render=function(){t.prototype.render.call(this);var e=P("iframe",{class:"".concat(this.ppfx,"no-pointer"),style:"width: 100%; height: 100%; border: none",src:this.__getSrc()});return this.el.appendChild(e),this},e.prototype.__getSrc=function(){return this.model.getAttributes().src||""},e}(rS),iY=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iY(e,t),e.prototype.tagName=function(){return"img"},e.prototype.events=function(){return{dblclick:"onActive",click:"initResize",error:"onError",load:"onLoad",dragstart:"noDrag"}},e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.listenTo(this.model,"change:src",this.updateSrc),this.classEmpty="".concat(this.ppfx,"plh-image"),this.fetchFile()},e.prototype.fetchFile=function(){if(!this.modelOpt.temporary){var t=this.model,e=this.em,n=t.get("file");if(n&&e){var o=e.Assets.FileUploader();null==o||o.uploadFile({dataTransfer:{files:[n]}},function(e){var n=e&&e.data&&e.data[0],o=n&&((0,b.isString)(n)?n:n.src);o&&t.set({src:o})},{componentView:this,file:n}),t.set("file","")}}},e.prototype.updateSrc=function(){var t=this.model;t.addAttributes({src:t.getSrcResult()}),this.updateClasses()},e.prototype.updateClasses=function(){t.prototype.updateClasses.call(this);var e=this.el,n=this.classEmpty,o=this.model,r=o.getSrcResult()&&!o.isDefaultSrc();e.classList[r?"remove":"add"](n)},e.prototype.onActive=function(t){null==t||t.stopPropagation();var e=this.em,n=this.model,o=null==e?void 0:e.Assets;o&&n.get("editable")&&o.open({select:function(t,e){n.set({src:t.getSrc()}),e&&o.close()},target:n,types:["image"],accept:"image/*"})},e.prototype.onError=function(){var t=this.model,e=this.el,n=t.getSrcResult({fallback:!0});n&&(e.srcset&&(e.srcset=""),e.src=n)},e.prototype.onLoad=function(){this.em.Canvas.refresh({all:!0})},e.prototype.noDrag=function(t){return t.preventDefault(),!1},e.prototype.render=function(){if(this.renderAttributes(),this.modelOpt.temporary)return this;this.updateSrc();var t=this.$el,e=this.model,n=t.attr("class")||"";return e.get("src")||t.attr("class","".concat(n," ").concat(this.classEmpty).trim()),this.postRender(),this},e}(rS),iX=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),iZ=function(){return(iZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},iQ=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},i0=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},i1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return iX(e,t),e.prototype.events=function(){return{dblclick:"onActive",input:"onInput"}},e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),(0,b.bindAll)(this,"disableEditing","onDisable");var n=this.model,o=this.em;this.listenTo(n,"focus",this.onActive),this.listenTo(n,"change:content",this.updateContentText),this.listenTo(n,"sync:content",this.syncContent),this.rte=null==o?void 0:o.RichTextEditor},e.prototype.updateContentText=function(t,e,n){void 0===n&&(n={}),n.fromDisable||this.disableEditing()},e.prototype.canActivate=function(){var t,e=this.model,n=this.rteEnabled,o=this.em,r=(null==o?void 0:o.getEditing())===e,i=!0,a=!1;if((n||!e.get("editable")||r||(a=e.isChildOf("text")))&&(i=!1,a&&!e.get("textable"))){for(var s=e.parent();s&&!s.isInstanceOf("text");)s=s.parent();s&&s.get("editable")?t=s:i=!0}return{result:i,delegate:t}},e.prototype.onActive=function(t){return iQ(this,void 0,void 0,function(){var e,n,o,r,i,a,s,l,c,u,p,f;return i0(this,function(d){switch(d.label){case 0:if(e=this,n=e.rte,o=e.em,i=(r=this.canActivate()).result,a=r.delegate,!i)return a&&(null==(p=null==t?void 0:t.stopPropagation)||p.call(t),o.setSelected(a),a.trigger("active",t)),[2];return null==(f=null==t?void 0:t.stopPropagation)||f.call(t),s=this,[4,this.getContent()];case 1:if(s.lastContent=d.sent(),!n)return[3,5];d.label=2;case 2:return d.trys.push([2,4,,5]),l=this,c=this,[4,n.enable(l,this.activeRte,{event:t,view:l})];case 3:return c.activeRte=d.sent(),[3,5];case 4:return u=d.sent(),o.logError(u),[3,5];case 5:return this.toggleEvents(!0),[2]}})})},e.prototype.onDisable=function(t){this.disableEditing(t)},e.prototype.disableEditing=function(){return iQ(this,arguments,void 0,function(t){var e,n,o,r,i,a,s,l,c;return void 0===t&&(t={}),i0(this,function(u){switch(u.label){case 0:if(e=this,n=e.model,o=e.rte,r=e.activeRte,i=e.em,a=n&&n.get("editable"),!o)return[3,7];return s={},[4,this.getContent()];case 1:l=u.sent(),u.label=2;case 2:return u.trys.push([2,4,,5]),[4,o.disable(this,r,t)];case 3:return s=u.sent(),[3,5];case 4:return c=u.sent(),i.logError(c),[3,5];case 5:if(!(a&&(l!==this.lastContent||s.forceSync)))return[3,7];return[4,this.syncContent(iZ(iZ({},t),{content:l}))];case 6:u.sent(),this.lastContent="",u.label=7;case 7:return this.toggleEvents(),[2]}})})},e.prototype.getContent=function(){return iQ(this,void 0,void 0,function(){var t,e,n,o;return i0(this,function(r){switch(r.label){case 0:if(t=this,e=t.rte,n=t.activeRte,o="",!e)return[3,2];return[4,e.getContent(this,n)];case 1:o=r.sent(),r.label=2;case 2:return[2,o]}})})},e.prototype.syncContent=function(){return iQ(this,arguments,void 0,function(t){var e,n,o,r,i,a,s,l;return void 0===t&&(t={}),i0(this,function(c){switch(c.label){case 0:if(e=this,n=e.model,o=e.rte,!e.rteEnabled&&!t.force)return[2];if(null==(l=t.content))return[3,1];return i=l,[3,3];case 1:return[4,this.getContent()];case 2:i=c.sent(),c.label=3;case 3:return r=i,a=n.components(),s=iZ({fromDisable:1},t),n.set("content","",s),(null==o?void 0:o.customRte)&&!o.customRte.parseContent?(a.length&&a.reset(void 0,iZ(iZ({},t),{keepIds:on(a)})),n.set("content",r,s)):a.resetFromString(r,t),[2]}})})},e.prototype.insertComponent=function(t,e){void 0===e&&(e={});var n,o=this.model,r=this.el.ownerDocument.getSelection();if(null==r?void 0:r.rangeCount){var i=r.getRangeAt(0),a=i.startContainer,s=i.startOffset,l=tk(a),c=[];if(l&&(null==(n=l.is)?void 0:n.call(l,"textnode"))){var u=l.collection;u.forEach(function(n){if(n===l){var o="textnode",r=e.useDomContent?a.textContent||"":n.content;c.push({type:o,content:r.slice(0,s)}),c.push(t),c.push({type:o,content:r.slice(s)})}else c.push(n)});
vendor: 4,109 bytes, line 1
1var p=c.filter(Boolean),f=p.indexOf(t);return u.reset(p,e),u.at(f)}}return o.append(t,e)},e.prototype.onInput=function(){var t=this.model;[pi.update,pi.input].forEach(function(e){return t.emitWithEditor(e,t)})},e.prototype.disablePropagation=function(t){t.stopPropagation()},e.prototype.toggleEvents=function(t){var e=this.em,n=this.model,o=this.$el,r={on:U,off:B},i=t?"on":"off";e.setEditing(!!t&&this),this.rteEnabled=!!t;var a=[this.el.ownerDocument,document];if(r.off(a,"mousedown",this.onDisable),r[i](a,"mousedown",this.onDisable),e[i]("toolbar:run:before",this.onDisable),n){var s=e.RichTextEditor.events;n[i]("removed",this.onDisable),n.trigger(t?s.enable:s.disable)}if(null==o||o.off("mousedown",this.disablePropagation),o&&o[i]("mousedown",this.disablePropagation),this.config.draggableComponents)for(var l=this.el;l;)l.draggable=!t,(l=l.parentNode)&&"BODY"==l.tagName&&(l=0)},e}(rS),i2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i3=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i2(e,t),e.prototype.render=function(){return t.prototype.render.call(this),this.el.addEventListener("click",this.prevDef,!0),this},e}(i1),i5=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i4=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i5(e,t),e}(i3),i9=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i6=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i9(e,t),e.prototype.tagName=function(){return"div"},e.prototype.events=function(){return{}},e.prototype.initialize=function(e){t.prototype.initialize.call(this,e),this.classEmpty=this.ppfx+"plh-map"},e.prototype.updateSrc=function(){this.getIframe().src=this.model.get("src")},e.prototype.getIframe=function(){if(!this.iframe){var t=document.createElement("iframe");t.src=this.model.get("src"),t.frameBorder="0",t.style.height="100%",t.style.width="100%",t.className=this.ppfx+"no-pointer",this.iframe=t}return this.iframe},e.prototype.render=function(){return t.prototype.render.call(this),this.updateClasses(),this.el.appendChild(this.getIframe()),this},e}(iJ),i7=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),i8=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i7(e,t),e.prototype.tagName=function(){return"script"},e.prototype.events=function(){return{}},e}(rS),at=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ae=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return at(e,t),e.prototype._createElement=function(t){return document.createElementNS("http://www.w3.org/2000/svg",t)},e}(rS),an=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ao=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return an(e,t),e}(rS),ar=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ai=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ar(e,t),e}(rS),aa=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),as=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return aa(e,t),e}(rS),al=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ac=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return al(e,t),e}(rS),au=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ap=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return au(e,t),e}(rS),af=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ad=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return af(e,t),e.prototype.events=function(){return{}},e}(rS),ah=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ag=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ah(e,t),e.prototype.tagName=function(){return"div"},e.prototype.events=function(){return{}},e.prototype.initialize=function(){rS.prototype.initialize.apply(this,arguments);var t=this.model,e=["loop","autoplay","controls","color","rel","modestbranding","poster","muted"].map(function(t){return"change:".concat(t)}).join(" ");this.listenTo(t,"change:provider",this.updateProvider),this.listenTo(t,"change:src",this.updateSrc),this.listenTo(t,e,this.updateVideo)},e.prototype.updateProvider=function(){var t=this.model.get("provider");this.el.innerHTML="",this.el.appendChild(this.renderByProvider(t))},e.prototype.updateSrc=function(){var t=this.model,e=this.videoEl;if(e){var n=t.get("provider"),o=t.get("src");switch(n){case"yt":o=t.getYoutubeSrc();break;case"ytnc":o=t.getYoutubeNoCookieSrc();break;case"vi":o=t.getVimeoSrc()}e.src=o}},e.prototype.updateVideo=function(){var t=this.model,e=this.videoEl;switch(t.get("provider")){case"yt":case"ytnc":case"vi":t.trigger("change:videoId");break;default:e&&(e.loop=t.get("loop"),e.autoplay=t.get("autoplay"),e.controls=t.get("controls"),e.poster=t.get("poster"),e.muted=t.get("muted"))}},e.prototype.renderByProvider=function(t){var e;switch(t){case"yt":e=this.renderYoutube();break;case"ytnc":e=this.renderYoutubeNoCookie();break;case"vi":e=this.renderVimeo();break;default:e=this.renderSource()}return this.videoEl=e,e},e.prototype.renderSource=function(){var t=document.createElement("video");return t.src=this.model.get("src"),this.initVideoEl(t),t},e.prototype.renderYoutube=function(){var t=document.createElement("iframe");return t.src=this.model.getYoutubeSrc(),this.updateYoutubeAttributes(t),this.initVideoEl(t),t},e.prototype.renderYoutubeNoCookie=function(){var t=document.createElement("iframe");return t.src=this.model.getYoutubeNoCookieSrc(),this.updateYoutubeAttributes(t),this.initVideoEl(t),t},e.prototype.renderVimeo=function(){var t=document.createElement("iframe");return t.src=this.model.getVimeoSrc(),t.frameBorder="0",t.setAttribute("allowfullscreen","true"),this.initVideoEl(t),t},e.prototype.updateYoutubeAttributes=function(t){t.frameBorder="0",t.setAttribute("allowfullscreen","true"),t.setAttribute("referrerpolicy",iL)},e.prototype.initVideoEl=function(t){t.className=this.ppfx+"no-pointer",t.style.height="100%",t.style.width="100%"},e.prototype.render=function(){rS.prototype.render.apply(this),this.updateClasses();var t=this.model.get("provider");return this.el.appendChild(this.renderByProvider(t)),this.updateVideo(),this},e}(iJ),av=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ay=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return av(e,t),e.prototype.tagName=function(){return"div"},e}(rS),am=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ab=function(){return(ab=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},aw=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>
1e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},a_=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};!function(t){t[t.InvalidSource=0]="InvalidSource",t[t.SourceReject=1]="SourceReject",t[t.TargetReject=2]="TargetReject"}(p_||(p_={}));var aC=function(t){function e(e){var n=t.call(this,e,"DomComponents",new or(void 0,{em:e}),pi,{stylePrefix:"comp-",components:[],draggableComponents:!0,disableTextInnerChilds:!1,processor:void 0,useFrameDoc:!1,voidElements:["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"]})||this;n.componentTypes=[{id:ps.collectionItem,model:rn,view:rS},{id:ps.conditionTrue,model:rn,view:rS},{id:ps.conditionFalse,model:rn,view:rS},{id:ps.collection,model:rw,view:rP},{id:ps.condition,model:o8,view:rk},{id:ps.variable,model:o9,view:rA},{id:"cell",model:im,view:ai},{id:"row",model:ik,view:ap},{id:"table",model:iu,view:ad},{id:"thead",model:iT,view:ac},{id:"tbody",model:ig,view:ao},{id:"tfoot",model:iC,view:as},{id:"map",model:r4,view:i6},{id:"link",model:r2,view:i3},{id:"label",model:rZ,view:i4},{id:"video",model:iN,view:ag},{id:"image",model:r$,view:iJ},{id:"script",model:r8,view:i8},{id:"svg-in",model:ia,view:ae},{id:"svg",model:io,view:ae},{id:"iframe",model:rU,view:iK},{id:"comment",model:rR,view:iq},{id:"textnode",model:rL,view:iW},{id:oC,model:oO,view:rS},{id:"wrapper",model:iF,view:ay},{id:"text",model:rK,view:i1},{id:"default",model:ob,view:rS}],n.componentsById={},n.Component=ob,n.Components=or,n.ComponentView=rS,n.ComponentsView=rC,n.storageKey="components",n.keySymbols="symbols",n.events=pi;var o=n.config;n.symbols=new iB([],{em:e,config:o,domc:n}),e&&(n.config.components=e.config.components||n.config.components);var r=n.config.pStylePrefix;if(r&&(n.config.stylePrefix=r+n.config.stylePrefix),e){e.get("Parser").compTypes=n.componentTypes,e.on("change:componentHovered",n.componentHovered,n);var i=e.get("selected");e.listenTo(i,"add",function(t,e,o){return n.selectAdd(i.getComponent(t),o)}),e.listenTo(i,"remove",function(t,e,o){return n.selectRemove(i.getComponent(t),o)})}return n}return am(e,t),e.prototype.postLoad=function(){var t=this.em,e=this.symbols;t.UndoManager.add(e)},e.prototype.load=function(t){var e=this,n=this.loadProjectData(t,{onResult:function(t){var n=e.getWrapper();if(n||(e.em.Pages.add({},{select:!0}),n=e.getWrapper()),(0,b.isArray)(t))t.length&&n.components(t);else{var o=t.components,r=aw(t,["components"]);
1n.set(r),n.components(void 0===o?[]:o)}}});return this.symbols.reset(t[this.keySymbols]||[]),n},e.prototype.store=function(){var t;return(t={})[this.keySymbols]=this.symbols,t},e.prototype.getComponent=function(){var t=this.em.Pages.getSelected(),e=null==t?void 0:t.getMainFrame();return null==e?void 0:e.getComponent()},e.prototype.getWrapper=function(){return this.getComponent()},e.prototype.getComponents=function(){var t=this.getWrapper();return null==t?void 0:t.components()},e.prototype.addComponent=function(t,e){return void 0===e&&(e={}),this.getComponents().add(t,e)},e.prototype.render=function(){var t;return null==(t=this.componentView)?void 0:t.render().el},e.prototype.clear=function(t){void 0===t&&(t={});var e=this.getComponents();return null==e||e.filter(Boolean).forEach(function(e){return e.remove(t)}),this},e.prototype.setComponents=function(t,e){void 0===e&&(e={}),this.clear(e).addComponent(t,e)},e.prototype.addType=function(t,e){var n=this.em,o=e.model,r=void 0===o?{}:o,i=e.view,a=void 0===i?{}:i,s=e.isComponent,l=e.isParsedNode,c=e.extend,u=e.extendView,p=e.extendFn,f=e.extendFnView,d=e.block,h=this.getType(t),g=this.getType(c),v=this.getType(u),y=g||h||this.getType("default"),m=y.model,w=v?v.view:y.view,_=function(t,e,n){return t.reduce(function(t,o){var r=e[o],i=n.prototype[o];return r&&i&&(t[o]=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];i.bind(this).apply(void 0,t),r.bind(this).apply(void 0,t)}),t},{})};if("object"==typeof r){var C={defaults:r.defaults};delete r.defaults;var x=new Set(m.typeExtends);x.add(m.getDefaults().type),e.model=m.extend(ab(ab({},r),_(void 0===p?[]:p,r,m)),{typeExtends:x,isComponent:!h||g||s?s||function(){return 0}:m.isComponent,isParsedNode:!h||g||l?l||void 0:m.isParsedNode}),Object.defineProperty(e.model.prototype,"defaults",{get:function(){return ab(ab({},(0,b.result)(m.prototype,"defaults")||{}),(0,b.result)(C,"defaults")||{})}})}if("object"==typeof a&&(e.view=w.extend(ab(ab({},a),_(void 0===f?[]:f,a,w)))),h?(h.model=e.model,h.view=e.view):(e.id=t,this.componentTypes.unshift(e)),d){var O={id:t,label:t,content:{type:t}},S=!0===d?O:ab(ab({},O),d);n.Blocks.add(S.id||t,S)}var T=h?pi.typeUpdate:pi.typeAdd;return null==n||n.trigger(T,h||e),this},e.prototype.getType=function(t){for(var e=this.componentTypes,n=0;n<e.length;n++)if(e[n].id==t)return e[n]},e.prototype.removeType=function(t){var e=this.componentTypes,n=this.getType(t);if(n){var o=e.indexOf(n);return e.splice(o,1),n}},e.prototype.getTypes=function(){return this.componentTypes},e.prototype.selectAdd=function(t,e){var n=this;void 0===e&&(e={}),t&&(t.set({status:"selected"}),[pi.selected,pi.toggled].forEach(function(o){return n.em.trigger(o,t,e)}))},e.prototype.selectRemove=function(t,e){var n=this;void 0===e&&(e={}),t&&(this.em,t.set({status:"",state:""}),[pi.deselected,pi.toggled].forEach(function(o){return n.em.trigger(o,t,e)}))},e.prototype.componentHovered=function(){var t=this.em,e=t.get("componentHovered"),n=t.previous("componentHovered"),o="hovered";n&&n.get("status")==o&&n.set({status:"",state:""}),e&&(0,b.isEmpty)(e.get("status"))&&e.set("status",o)},e.prototype.getShallowWrapper=function(){var t=this.shallow,e=this.em;if(!t&&e){var n=e.shallow;if(!n)return;var o=n.Components;if(o.componentTypes=this.componentTypes,t=o.getWrapper()){var r=[ov,oy].join(" ");t.on(r,(0,b.debounce)(function(){return null==t?void 0:t.components("")},100))}this.shallow=t}return t},e.prototype.isComponent=function(t){return tP(t)},e.prototype.addSymbol=function(t){if(!(0,b.isSymbol)(t)||eK(t)){var e=t.clone({symbol:!0});return e$(e)&&this.symbols.add(e),this.em.trigger(pi.toggled),e}},e.prototype.getSymbols=function(){return a_([],this.symbols.models,!0)},e.prototype.detachSymbol=function(t){eq(t)&&e1(t)},e.prototype.getSymbolInfo=function(t,e){void 0===e&&(e={});var n=e$(t),o=eJ(t),r=!!o,i=(n?eX(t):eX(o))||[],a=o||(n?t:void 0),s=eQ(t,{changed:e.withChanges}),l=n||r,c=l&&eK(t);return{isSymbol:l,isMain:n,isInstance:r,isRoot:c,main:a,instances:i,relatives:s||[]}},e.prototype.canMove=function(t,e,n){var o={result:!1,reason:p_.InvalidSource,target:t,source:null};if(!e||!t)return o;
1if(eG(t)&&e instanceof ob&&eG(e)){var r=e0(t),i=e$(r)?r:eJ(r),a=e0(e),s=e$(a)?a:eJ(a),l=r!==a;if(i===s&&l)return ab(ab({},o),{reason:p_.TargetReject})}var c=tP(e)?e:null;if(!c){var u=this.getShallowWrapper();c=(null==u?void 0:u.append(e,{temporary:!0})[0])||null}if(o.source=c,!c)return o;var p=c.get("draggable");if((0,b.isFunction)(p))p=!!p(c,t,n);else{var f=t.getEl();p=(0,b.isArray)(p)?p.join(","):p,p=(0,b.isString)(p)?null==f?void 0:f.matches(p):p}if(!p)return ab(ab({},o),{reason:p_.SourceReject});var d=t.get("droppable");if((0,b.isFunction)(d))d=!!d(c,t,n);else if(!1===d&&t.isInstanceOf("text")&&c.get("textable"))d=!0;else{var f=c.getEl();d=(0,b.isArray)(d)?d.join(","):d,d=(0,b.isString)(d)?null==f?void 0:f.matches(d):d}var h=[t].concat(t.parents()).indexOf(c)>-1;return!d||h?ab(ab({},o),{reason:p_.TargetReject}):ab(ab({},o),{result:!0})},e.prototype.allById=function(){return this.componentsById},e.prototype.getById=function(t){return this.componentsById[t]||null},e.prototype.destroy=function(){var t,e=this.allById();Object.keys(e).forEach(function(t){return e[t]&&e[t].remove()}),null==(t=this.componentView)||t.remove(),[this.em,this.componentsById,this.componentView].forEach(function(t){return{}})},e}(tX),ax=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aO=Number.MAX_VALUE,aS=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?e[0]:""},aT=function(t){function e(){var e=t.call(this)||this;return(0,b.bindAll)(e,"sortRules"),e.compCls=[],e.ids=[],e}return ax(e,t),e.prototype.buildFromModel=function(t,e){var n=this;void 0===e&&(e={});var o="",r=this.em,i=r&&r.getConfig().avoidInlineStyle,a=t.styleToString(),s=t.classes;return this.ids.push("#".concat(t.getId())),s.forEach(function(t){return n.compCls.push(t.getFullName())}),!i&&a&&(o="#".concat(t.getId(),"{").concat(a,"}")),t.components().forEach(function(t){return o+=n.buildFromModel(t,e)}),o},e.prototype.build=function(t,e){var n=this;void 0===e&&(e={});var o=e.json,r=e.em,i=e.cssc||(null==r?void 0:r.Css);this.em=r,this.compCls=[],this.ids=[],this.model=t;var a=[],s=t?this.buildFromModel(t,e):"",l=(0,b.isUndefined)(e.clearStyles)&&r?r.getConfig().clearStyles:e.clearStyles;if(i){var c=e.rules||i.getAll(),u={},p=[];e.onlyMatched&&t&&to()&&(c=this.matchedRules(t,c)),c.forEach(function(t){if(!t.isNested()){var r=t.getAtRule();if(r){var i=u[r];i?i.push(t):u[r]=[t];return}var l=n.buildFromRule(t,p,e);o?a.push(l):s+=l}}),this.sortMediaObject(u).forEach(function(t){var r="",i=t.key;t.value.forEach(function(t){if(!t.isNested()){var l=n.buildFromRule(t,p,e);t.get("singleAtRule")?s+="".concat(i,"{").concat(l,"}"):r+=l,o&&a.push(l)}}),r&&(s+="".concat(i,"{").concat(r,"}"))}),r&&l&&c.remove&&c.remove(p)}return o?a.filter(function(t){return t}):s},e.prototype.buildFromRule=function(t,e,n){var o,r,i=this;void 0===n&&(n={});var a="",s=this.model,l=t.selectorsToString({skipAdd:1}),c=t.get("selectorsAdd"),u=t.get("singleAtRule");if(null==(o=t.get("selectors"))||o.forEach(function(t){var e=t.getFullName();(i.compCls.indexOf(e)>=0||i.ids.indexOf(e)>=0||n.keepUnusedStyles)&&(r=1)}),l&&r||c||u||!s){var p=t.getDeclaration({allowEmpty:n.allowEmpty,withNested:n.withNested});p&&(n.json?a=t:a+=p)}else e.push(t);return a},e.prototype.matchedRules=function(t,e){var n=this,o=t.getEl(),r=[];return e.forEach(function(t){try{t.selectorsToString().split(",").some(function(t){return null==o?void 0:o.matches(n.__cleanSelector(t))})&&r.push(t)}catch(t){}}),t.components().forEach(function(t){r=r.concat(n.matchedRules(t,e))}),r=r.filter(function(t,e){return r.indexOf(t)===e})},e.prototype.getQueryLength=function(t){var e=/(-?\d*\.?\d+)\w{0,}/.exec(t);return e?parseFloat(e[1]):aO},e.prototype.sortMediaObject=function(t){var e=this;void 0===t&&(t={});var n=[];return(0,b.each)(t,function(t,e){return n.push({key:e,value:t})}),n.sort(function(t,n){var o=[t.key,n.key].every(function(t){return -1!==t.indexOf("min-width")}),r=o?t.key:n.key,i=o?n.key:t.key;return e.getQueryLength(r)-e.getQueryLength(i)})},e.prototype.sortRules=function(t,e){var n=function(t){return t.get("mediaText")||""},o=[n(t),n(e)].every(function(t){return -1!==t.indexOf("min-width")}),r=n(o?t:e),i=n(o?e:t);return this.getQueryLength(r)-this.getQueryLength(i)},e.prototype.__cleanSelector=function(t){return t.split(" ").map(function(t){return t.split(":")[0]}).join(" ")},e}(tH),aP=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aE=function(){return(aE=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ak=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},aj=(to()?window:{}).CSS,aA=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,{em:n.em})||this;return o.views=[],o.config=e||{},o.opt=n,o.em=n.em,o.ensureSelectors(null,null,{}),o.setStyle(o.get("style"),{skipWatcherUpdates:!0}),o.on("change",o.__onChange),o}return aP(e,t),e.prototype.defaults=function(){return{selectors:[],selectorsAdd:"",style:{},mediaText:"",state:"",stylable:!0,atRuleType:"",singleAtRule:!1,important:!1,group:"",shallow:!1,_undo:!0}},e.prototype.__onChange=function(t,e){var n=this.em,o=this.changedAttributes();o&&!tx(o)&&(null==n||n.changesUp(e,{rule:t,changed:o,options:e}))},e.prototype.isNested=function(){return!!this.parentRule},e.prototype.__isNestedStyleValue=function(t){return t instanceof e&&t.parentRule===this},e.prototype.__attachNestedRule=function(t,e,n){void 0===n&&(n={}),t.parentRule=this,t.nestedStyleKey=e,t.em=t.em||this.em;var o,r=null==(o=this.em)?void 0:o.Css.getAll();return r&&!r.get(t)&&r.add(t,n),t},e.prototype.__detachNestedRule=function(t,e){var n;void 0===e&&(e={}),t.parentRule===this&&(t.parentRule=void 0,t.nestedStyleKey=void 0,null==(n=this.em)||n.Css.getAll().remove(t,e))},e.prototype.__createNestedRule=function(t,n,o){void 0===o&&(o={});var r=n instanceof e?n:new e({style:n},{em:this.em});return this.__attachNestedRule(r,t,o)},e.prototype.__normalizeStyle=function(t,n){var o=this;void 0===n&&(n={});var r=aE({},t);return Object.keys(r).forEach(function(t){var i=r[t];/^(@|&|[.#:[>+~*])/.test(t)&&(i instanceof e||(0,b.isObject)(i)&&!(0,b.isArray)(i))&&(r[t]=o.__createNestedRule(t,i,n))}),r},e.prototype.__getStyleForExtend=function(){return this.getStyle("",{skipResolve:!0,withNested:!0})},e.prototype.__getStyleForUpdate=function(t){return void 0===t&&(t={}
1),this.getStyle("",{skipResolve:!0,withNested:!0})},e.prototype.__onStyleUpdate=function(t,e){var n=this;void 0===e&&(e={});var o=this.getStyle("",{withNested:!0,skipResolve:!0});Object.keys(t).forEach(function(r){var i=t[r];n.__isNestedStyleValue(i)&&o[r]!==i&&n.__detachNestedRule(i,e)})},e.prototype.__getStyleResult=function(e,n,o){var r=this;if(void 0===o&&(o={}),o.withNested)return t.prototype.__getStyleResult.call(this,e,n,o);var i=t.prototype.__getStyleResult.call(this,e,n,o);if(n&&""!==n)return this.__isNestedStyleValue(i)?void 0:i;var a=aE({},i);return Object.keys(a).forEach(function(t){r.__isNestedStyleValue(a[t])&&delete a[t]}),a},e.prototype.__stylePropToString=function(e,n,o){void 0===o&&(o={});var r=this.__isNestedStyleValue(n)&&n;return r?o.withNested?r.getDeclaration(aE(aE({},o),{nested:!0})):"":t.prototype.__stylePropToString.call(this,e,n,o)},e.prototype.clone=function(){var e=this.get("selectors").map(function(t){return t.clone()});return t.prototype.clone.call(this,{selectors:e})},e.prototype.ensureSelectors=function(t,e,n){var o=this.em,r=null==o?void 0:o.Selectors,i=[this,"change:selectors",this.ensureSelectors],a=this.getSelectors();this.stopListening.apply(this,i),a.models&&(a=ak([],a.models,!0)),Array.isArray(a=(0,b.isString)(a)?[a]:a)&&(a=new n$(a.filter(function(t){return t}).map(function(t){return r?r.add(t):t}))),this.set("selectors",a,n),this.listenTo.apply(this,i)},e.prototype.getAtRule=function(){return e.getAtRuleFromProps(this.attributes)},e.getAtRuleFromProps=function(t){var e=t.atRuleType,n=t.mediaText,o=e?"@".concat(e):n?"@media":"";return o+(n&&o?" ".concat(n):"")},e.prototype.selectorsToString=function(t){void 0===t&&(t={});var e=[],n=this.get("state"),o=this.get("selectorsAdd"),r=this.getSelectors().getFullString(0,{escape:function(t){return aj&&aj.escape?aj.escape(t):t}}),i=n&&!t.skipState?":".concat(n):"";return r&&e.push("".concat(r).concat(i)),o&&!t.skipAdd&&e.push(o),e.join(", ")},e.prototype.getDeclaration=function(t){void 0===t&&(t={});var e="",n=t,o=this.attributes.important,r=this.selectorsToString(t),i=this.styleToString(aE({important:o},t)),a=this.get("singleAtRule"),s=n.nested&&this.nestedStyleKey,l=i||t.allowEmpty;return s&&l?e="".concat(s,"{").concat(i,"}"):(r||a)&&l&&(e=a?i:"".concat(r,"{").concat(i,"}")),e},e.prototype.getDevice=function(){var t=this.em,e=this.attributes,n=e.atRuleType,o=e.mediaText,r=(null==t?void 0:t.Devices.getDevices())||[],i=r.filter(function(t){return""===t.getWidthMedia()})[0];return"media"===n&&o?r.filter(function(t){return t.getWidthMedia()===aS(o)})[0]||null:i||null},e.prototype.getState=function(){var t=this.em,e=this.get("state");return((null==t?void 0:t.Selectors.getStates())||[]).filter(function(t){return t.getName()===e})[0]||null},e.prototype.getComponent=function(){var t,e=this.getSelectors(),n=1==e.length&&e.at(0),o=n&&n.isId()&&n.get("name");return o&&(null==(t=this.em)?void 0:t.Components.getById(o))||null},e.prototype.toCSS=function(t){void 0===t&&(t={});var e="",n=this.getAtRule(),o=this.getDeclaration(t);return(o||t.allowEmpty)&&(e=o),n&&e&&(e="".concat(n,"{").concat(e,"}")),e},e.prototype.toJSON=function(e){var n,o=this,r=t.prototype.toJSON.call(this,e),i=this.getStyle("",{withNested:!0,skipResolve:!0}),a=aE({},i);if(Object.keys(a).forEach(function(t){var n=a[t];o.__isNestedStyleValue(n)&&(a[t]=n.toJSON(aE(aE({},e),{nested:!0})).style||{})}),r.style=a,null==(n=this.em)?void 0:n.getConfig().avoidDefaults){var s=this.defaults();(0,b.forEach)(s,function(t,e){r[e]===t&&delete r[e]}),delete r.style.__p,(0,b.isEmpty)(r.selectors)&&delete r.selectors,(0,b.isEmpty)(r.style)&&delete r.style}return r},e.prototype.compare=function(t,e,n,o){void 0===o&&(o={});var r,i=n||"",a=o.selectorsAdd||"",s=o.atRuleType||"",l=(0,b.isArray)(t)||t.models?t.models||t:[t];i&&!s&&(s="media");var c=l.map(function(t){return t.getFullName()}),u=null==(r=this.get("selectors"))?void 0:r.map(function(t){return t.getFullName()}),p=c.slice().sort(),f=u.slice().sort();return c.length===u.length&&!!p.every(function(t,e){return t===f[e]})&&this.get("state")===(e||"")&&this.get("mediaText")===i&&this.get("selectorsAdd")===a&&this.get("atRuleType")===s},e}(nH),aM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aD=function(t){function e(e,n){var o=t.call(this,e)||this;return o.editor=null==n?void 0:n.em,setTimeout(function(){o.on("remove",o.onRemove),o.on("add",o.onAdd)}),o}return aM(e,t),e.prototype.toJSON=function(t){return this.models.filter(function(t){return!t.isNested()}).map(function(e){return e.toJSON(t)}).filter(function(t){return t.style&&!t.shallow})},e.prototype.onAdd=function(t,e,n){t.ensureSelectors(t,e,n)},e.prototype.onRemove=function(t){var e=this.editor;e.stopListening(t),e.UndoManager.remove(t)},e.prototype.add=function(t,e){return void 0===e&&(e={}),"string"==typeof t&&(t=this.editor.get("Parser").parseCss(t)),e.em=this.editor,tU.prototype.add.apply(this,[t,e])},e}(tU);aD.prototype.model=aA;var aL=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aI=function(){return(aI=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},aN=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},aR=function(t){function e(e){var n=t.call(this,e,"CssComposer",null,pa,{stylePrefix:"css-",rules:[]})||this;n.classes={CssRule:aA,CssRules:aD,CssRuleView:eg,CssRulesView:ew},n.events=pa,n.Selectors=n$,n.storageKey="styles",n._itemCache=new Map;var o=n.config,r=o.pStylePrefix;return r&&(o.stylePrefix=r+o.stylePrefix),o.rules=n.em.config.style||o.rules||"",n.rules=new aD([],o),n.all=n.rules,n._setupCacheListeners(),n}return aL(e,t),e.prototype._setupCacheListeners=function(){t.prototype._setupCacheListeners.call(this),this.em.listenTo(this.rules,"change:selectors change:state change:mediaText",this._onItemKeyChange.bind(this))},e.prototype._makeCacheKey=function(t){var e=t.getAtRule(),n=t.selectorsToString();return"".concat(e,"__").concat(n)},e.prototype._makeCacheKeyFromProps=function(t){var e=t.atRuleType,n=void 0===e?"":e,o=t.mediaText,r=void 0===o?"":o,i=t.state,a=void 0===i?"":i,s=t.selectorsAdd,l=void 0===s?"":s,c=t.selectors,u=(void 0===c?[]:c).map(function(t){return(0,b.isString)(t)?t:t.toString()}).join(""),p=[];u&&p.push("".concat(u).concat(a?":".concat(a):"")),l&&p.push(l);var f=p.join(", "),d=n?"@".concat(n):r?"@media":"";return"".concat(d+(r&&d?" ".concat(r):""),"__").concat(f)},e.prototype.onLoad=function(){this.rules.add(this.config.rules,{silent:!0}),this._onItemsResetCache(this.rules)},e.prototype.postLoad=function(){this.em.UndoManager.add(this.getAll())},e.prototype.store=function(){return this.getProjectData()},e.prototype.load=function(t){return this.loadProjectData(t,{all:this.rules})},e.prototype._findRule=function(t,e,n,o){var r=t;if((0,b.isString)(t)){var i=this.em.Selectors,a=t.split(",")[0].trim(),s=this.em.Parser.parserCss.checkNode({selectors:a})[0];r=i.get(s.selectors)}return this.rules.find(function(t){return t.compare(r,e,n,o)})||null},e.prototype.add=function(t,e,n,o,r){void 0===o&&(o={}),void 0===r&&(r={});var i=e||"",a=n||"",s=aI({},o),l=this._makeCacheKeyFromProps(aI(aI({state:i,mediaText:a},s),{selectors:Array.isArray(t)?t:[t]})),c=this._itemCache.get(l);if(c&&c.config&&!c.config.singleAtRule)return c;var u=this._findRule(t,i,a,s);return u&&u.config&&!u.config.singleAtRule||(s.state=i,s.mediaText=a,s.selectors=[],a&&!s.atRuleType&&(s.atRuleType="media"),(u=new aA(s,this.config)).get("selectors").add(t,r),this.rules.add(u,r)),this._cacheItem(u),u},e.prototype.get=function(t,e,n,o){var r=this._makeCacheKeyFromProps(aI(a
1I({},o),{selectors:Array.isArray(t)?t:[t],state:e,width:n,mediaText:n})),i=this._itemCache.get(r);if(i)return i;var a=this._findRule(t,e,n,o);return a&&this._cacheItem(a),a},e.prototype.getAll=function(){return this.rules},e.prototype.addCollection=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=this.em,r=[],i=aI(aI({},e),{parsedImportSource:"css"});(0,b.isString)(t)&&(t=o.Parser.parseCss(t),e=i);for(var a=t instanceof Array?t:[t],s=0,l=a.length;s<l;s++){var c=a[s]||{};if(c.selectors){var u=null==o?void 0:o.Selectors;u||console.warn("Selector Manager not found");for(var p=c.selectors,f=p instanceof Array?p:[p],d=[],h=0,g=f.length;h<g;h++){var v=u.add(f[h]);d.push(v)}var y=this.get(d,c.state,c.mediaText,c),m=this.add(d,c.state,c.mediaText,c,e),w=!y||!e.avoidUpdateStyle,_=c.style||{};if(tC(n)&&m.set(n,e),w){var C=e.extend?aI(aI({},m.getStyle("",{skipResolve:!0})),_):_;m.setStyle(C,e)}r.push(m)}}return r},e.prototype.addRules=function(t){return this.addCollection(t)},e.prototype.setRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.atRuleType,r=n.atRuleParams,i=this.em.Parser.parserCss.checkNode({selectors:t,style:e})[0],a=i.state,s=i.selectorsAdd,l=this.em.Selectors.add(i.selectors),c=this.add(l,a,r,{selectorsAdd:s,atRule:o});return n.addStyles?c.addStyle(e,n):c.setStyle(e,n),c},e.prototype.getRule=function(t,e){void 0===e&&(e={});var n=this.em,o=n.Selectors,r=n.Parser.parserCss.checkNode({selectors:t})[0],i=o.get(r.selectors),a=r.state,s=r.selectorsAdd,l=e.atRuleType,c=e.atRuleParams;return i?this.get(i,a,c,{selectorsAdd:s,atRuleType:l}):void 0},e.prototype.getRules=function(t){var e=this.getAll();if(!t)return aN([],e.models,!0);var n={sort:!0},o=(0,b.isString)(t)?t.split(",").map(function(t){return t.trim()}):t;return e.filter(function(t){return o.indexOf(t.getSelectors().getFullString(null,n))>=0})},e.prototype.setIdRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.addOpts,r=void 0===o?{}:o,i=n.mediaText,a=n.state||"",s=(0,b.isUndefined)(i)?this.em.getCurrentMedia():i,l=this.em.Selectors.add({name:t,type:nB.TYPE_ID},r),c=this.add(l,a,s,{},r);return c.setStyle(e,aI(aI({},n),r)),c},e.prototype.getIdRule=function(t,e){void 0===e&&(e={});var n=e.mediaText,o=e.state||"",r=(0,b.isUndefined)(n)?this.em.getCurrentMedia():n,i=this.em.Selectors.get(t,nB.TYPE_ID);return i&&this.get(i,o,r)},e.prototype.setClassRule=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.state||"",r=n.mediaText||this.em.getCurrentMedia(),i=this.em.Selectors.add({name:t,type:nB.TYPE_CLASS}),a=this.add(i,o,r);return a.setStyle(e,n),a},e.prototype.getClassRule=function(t,e){void 0===e&&(e={});var n=e.state||"",o=e.mediaText||this.em.getCurrentMedia(),r=this.em.Selectors.get(t,nB.TYPE_CLASS);return r&&this.get(r,n,o)},e.prototype.remove=function(t,e){var n=(0,b.isString)(t)?this.getRules(t):t,o=Array.isArray(n)?n:[n],r=this.getAll().remove(o,e);return Array.isArray(r)?r:[r]},e.prototype.clear=function(t){return void 0===t&&(t={}),this._clearItemCache(),this.getAll().reset([],t),this},e.prototype.getComponentRules=function(t,e){void 0===e&&(e={});var n=e.state,o=e.mediaText;e.current&&(n=this.em.get("state")||"",o=this.em.getCurrentMedia());var r=t.getId();return this.getAll().filter(function(t){return(!!(0,b.isUndefined)(n)||t.get("state")===n)&&(!!(0,b.isUndefined)(o)||t.get("mediaText")===o)&&t.getSelectorsString()==="#".concat(r)})},e.prototype.render=function(){var t;return null==(t=this.rulesView)||t.remove(),this.rulesView=new ew({collection:this.rules,config:this.config}),this.rulesView.render().el},e.prototype.checkId=function(t,e){void 0===e&&(e={});var n=e.idMap,o=void 0===n?{}:n,r=[];return Object.keys(o).length&&(Array.isArray(t)?t:[t]).forEach(function(t){var e=t.selectors;if(e&&1==e.length){var n=e[0];if((0,b.isString)(n)){if("#"===n[0]){var i=n.substring(1),a=o[i];i&&a&&(e[0]="#".concat(a),r.push(t))}}else if(n.name&&n.type===nB.TYPE_ID){var a=o[n.name];a&&(n.name=a,r.push(t))}}}),r},e.prototype.destroy=function(){var t;this.rules.reset(),this.rules.stopListening(),null==(t=this.rulesView)||t.remove()},e}(tX),aV=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aF=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return aV(e,t),e.prototype.defaults=function(){return{label:"",content:"",media:"",category:"",activate:!1,select:void 0,resetId:!1,disable:!1,onClick:void 0,attributes:{},dragDef:{}}},Object.defineProperty(e.prototype,"category",{get:function(){var t=this.get("category");return t instanceof nK?t:void 0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parent",{get:function(){return this.collection},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.id},e.prototype.getLabel=function(){return this.get("label")},e.prototype.getMedia=function(){return this.get("media")},e.prototype.getContent=function(){return this.get("content")},e.prototype.getDragDef=function(){return this.get("dragDef")},e.prototype.getCategoryLabel=function(){var t=this.get("category");return(0,b.isFunction)(null==t?void 0:t.get)?t.get("label"):(null==t?void 0:t.label)?null==t?void 0:t.label:t},e}(tH),aH=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aU=function(t){function e(e,n){var o=t.call(this,e)||this;return o.em=n.em,o.on("add",o.handleAdd),o}return aH(e,t),e.prototype.getCategories=function(){return this.em.Blocks.getCategories()},e.prototype.handleAdd=function(t){this.initCategory(t)},e}(nZ);aU.prototype.model=aF,function(t){t.add="block:add",t.remove="block:remove",t.removeBefore="block:remove:before",t.update="block:update",t.dragStart="block:drag:start",t.drag="block:drag",t.dragEnd="block:drag:stop",t.categoryUpdate="block:category:update",t.custom="block:custom",t.all="block"}(pC||(pC={}));let aB=pC;var az=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aW=function(){return(aW=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},a$=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e)||this,r=o.model;return o.em=n.em,o.config=n,o.endDrag=o.endDrag.bind(o),o.ppfx=n.pStylePrefix||"",o.listenTo(r,"destroy remove",o.remove),o.listenTo(r,"change",o.render),o}return az(e,t),e.prototype.events=function(){return{click:"handleClick",mousedown:"startDrag",dragstart:"handleDragStart",drag:"handleDrag",dragend:"handleDragEnd"}},e.prototype.__getModule=function(){return this.em.Blocks},e.prototype.handleClick=function(t){var e=this.config,n=this.model,o=this.em,r=n.get("onClick")||e.appendOnClick;if(o.trigger("block:click",n,t),r){if((0,b.isFunction)(r))return r(n,null==o?void 0:o.getEditor(),{event:t});var i=null==(a=e.getSorter)?void 0:a.call(e);if(i){var a,s,l,c,u=n.get("content"),p=null==(s=this.getTempDropModel(u).view)?void 0:s.el,f=p?[{element:p,dragSource:{content:u}}]:[],d=o.getSelected();if(d)if(i.validTarget(d.getEl(),f,0))l=d;else{var h=d.parent();h&&i.validTarget(h.getEl(),f,0)&&(l=h,c=h.components().indexOf(d)+1)}if(!l){var g=o.getWrapper();i.validTarget(g.getEl(),f,0)&&(l=g)}var v=l&&l.append(u,{at:c})[0];v&&o.setSelected(v,{scroll:!0})}}},e.prototype.startDrag=function(t){var e,n=this.config,o=this.em,r=this.model,i=r.get("disable");if(0===t.button&&n.getSorter&&!this.el.draggable&&!i){o.refreshCanvas();
1var a=n.getSorter();a.__currentBlock=r;var s=this.model.get("content"),l=null==(e=this.getTempDropModel(s).view)?void 0:e.el,c=l?[{element:l,dragSource:{content:s}}]:[];a.startSort(c),U(document,"mouseup",this.endDrag)}},e.prototype.handleDragStart=function(t){this.__getModule().__startDrag(this.model,t)},e.prototype.handleDrag=function(t){this.__getModule().__drag(t)},e.prototype.handleDragEnd=function(){this.__getModule().__endDrag()},e.prototype.endDrag=function(){B(document,"mouseup",this.endDrag);var t,e,n=null==(e=(t=this.config).getSorter)?void 0:e.call(t);n&&n.endDrag()},e.prototype.getTempDropModel=function(t){var e,n=this.em.Components.getComponents(),o={avoidChildren:1,avoidStore:1,avoidUpdateStyle:1},r=n.add(t,aW(aW({},o),{temporary:!0})),i=n.remove(r,aW(aW({},o),{temporary:!0}));return null==(e=(i=i instanceof Array?i[0]:i).view)||e.$el.data("model",i),i},e.prototype.render=function(){var t,e=this.em,n=this.el,o=this.$el,r=this.ppfx,i=this.model,a=i.get("disable"),s=i.get("attributes")||{},l=s.class||"",c="".concat(r,"block"),u=e&&e.t("blockManager.labels.".concat(i.id))||i.get("label"),p=i.get("render"),f=i.get("media"),d=a?"".concat(c,"--disable"):"".concat(r,"four-color-h");o.attr(s),n.className="".concat(l," ").concat(c," ").concat(r,"one-bg ").concat(d).trim(),n.innerHTML="\n ".concat(f?'<div class="'.concat(c,'__media">').concat(f,"</div>"):"",'\n <div class="').concat(c,'-label">').concat(u,"</div>\n "),n.title=s.title||(null==(t=n.textContent)?void 0:t.trim()),n.setAttribute("draggable","".concat(!!td(e)&&!a));var h=p&&p({el:n,model:i,className:c,prefix:r});return h&&(n.innerHTML=h),this},e}(tB),aq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aG=function(t){function e(e,n,o){var r=t.call(this,e)||this;r.config=n;var i=n.pStylePrefix||"";return r.em=n.em,r.catName=o,r.pfx=i,r.caretR="fa fa-caret-right",r.caretD="fa fa-caret-down",r.iconClass="".concat(i,"caret-icon"),r.activeClass="".concat(i,"open"),r.className="".concat(i).concat(o,"-category"),r.listenTo(r.model,"change:open",r.updateVisibility),r.model.view=r,r}return aq(e,t),e.prototype.events=function(){return{"click [data-title]":"toggle"}},e.prototype.template=function(t){var e,n,o=t.pfx,r=t.label,i=t.catName;return tD(px||(e=['\n <div class="','title" data-title>\n <i class="','caret-icon"></i>\n ','\n </div>\n <div class="',"",'s-c"></div>\n '],n=['\n <div class="','title" data-title>\n <i class="','caret-icon"></i>\n ','\n </div>\n <div class="',"",'s-c"></div>\n '],Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,px=e),o,o,r,o,i)},e.prototype.attributes=function(){return this.model.get("attributes")||{}},e.prototype.updateVisibility=function(){this.model.get("open")?this.open():this.close()},e.prototype.open=function(){this.$el.addClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretD),this.getTypeEl().style.display=""},e.prototype.close=function(){this.$el.removeClass(this.activeClass),this.getIconEl().className="".concat(this.iconClass," ").concat(this.caretR),this.getTypeEl().style.display="none"},e.prototype.toggle=function(){var t=this.model;t.set("open",!t.get("open"))},e.prototype.getIconEl=function(){return this.iconEl||(this.iconEl=this.el.querySelector(".".concat(this.iconClass))),this.iconEl},e.prototype.getTypeEl=function(){return this.typeEl||(this.typeEl=this.el.querySelector(".".concat(this.pfx).concat(this.catName,"s-c"))),this.typeEl},e.prototype.append=function(t){this.getTypeEl().appendChild(t)},e.prototype.render=function(){var t=this.em,e=this.el,n=this.$el,o=this.model,r=this.pfx,i=this.catName,a=t.t("".concat(i,"Manager.categories.").concat(o.id))||o.get("label");return e.innerHTML=this.template({pfx:r,label:a,catName:i}),n.addClass(this.className),n.css({order:o.get("order")}),this.updateVisibility(),this},e}(tB),aK=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aY=function(){return(aY=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},aJ=function(t){function e(e,n){var o=t.call(this,e)||this;o.renderedCategories=new Map,(0,b.bindAll)(o,"getSorter","onDrag","onDrop","onMove"),o.config=n||{},o.categories=e.categories||"";var r=o.config.pStylePrefix||"";o.ppfx=r,o.noCatClass="".concat(r,"blocks-no-cat"),o.blockContClass="".concat(r,"blocks-c"),o.catsClass="".concat(r,"block-categories");var i=o.collection;return o.listenTo(i,"add",o.addTo),o.listenTo(i,"reset",o.render),o.em=o.config.em,o.em&&(o.config.getSorter=o.getSorter),o}return aK(e,t),e.prototype.__getModule=function(){return this.em.Blocks},e.prototype.updateConfig=function(t){void 0===t&&(t={}),this.config=aY(aY({},this.config),t)},e.prototype.getSorter=function(){var t=this.em;if(t){if(!this.sorter){var e=t.Utils,n=t.Canvas;this.sorter=new e.ComponentSorter({em:t,treeClass:oM,containerContext:{container:n.getBody(),containerSel:"*",itemSel:"*",pfx:this.ppfx,placeholderElement:n.getPlacerEl(),document:n.getBody().ownerDocument},dragBehavior:{dragDirection:pb.BothDirections,nested:!0},positionOptions:{windowMargin:1,canvasRelative:!0},eventHandlers:{legacyOnStartSort:this.onDrag,legacyOnEndMove:this.onDrop,legacyOnMoveClb:this.onMove}})}return this.sorter}},e.prototype.onDrag=function(t){this.em.stopDefault(),this.__getModule().__startDrag(this.sorter.__currentBlock,t)},e.prototype.onMove=function(t){this.__getModule().__drag(t)},e.prototype.onDrop=function(t){this.em.runDefault(),this.__getModule().__endDrag({component:t}),delete this.sorter.__currentBlock},e.prototype.addTo=function(t){this.add(t)},e.prototype.add=function(t,e){var n=this.config,o=this.renderedCategories,r=t.get("attributes"),i=new a$({model:t,attributes:r},n).render().el,a=t.parent.initCategory(t);if(a&&this.categories&&!n.ignoreCategories){var s=a.getId(),l=this.getCategoriesEl(),c=o.get(s);!c&&l&&(c=new aG({model:a},n,"block").render(),o.set(s,c),l.appendChild(c.el)),null==c||c.append(i);return}e?e.appendChild(i):this.append(i)},e.prototype.getCategoriesEl=function(){return this.catsEl||(this.catsEl=this.el.querySelector(".".concat(this.catsClass))),this.catsEl},e.prototype.getBlocksEl=function(){return this.blocksEl||(this.blocksEl=this.el.querySelector(".".concat(this.noCatClass," .").concat(this.blockContClass))),this.blocksEl},e.prototype.append=function(t){var e=this.getBlocksEl();e&&e.appendChild(t)},e.prototype.render=function(){var t=this,e=this.ppfx,n=document.createDocumentFragment();delete this.catsEl,delete this.blocksEl,this.renderedCategories=new Map,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(e){return t.add(e,n)}),this.append(n);var o="".concat(this.blockContClass,"s ").concat(e,"one-bg ").concat(e,"two-color");return this.$el.addClass(o),this.rendered=!0,this},e}(tB),aX=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),aZ=function(){return(aZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},aQ=function(t){function e(e){var n=t.call(this,e,"BlockManager",new aU([],{em:e}),pC,{appendTo:"",blocks:[],appendOnClick:!1,custom:!1})||this;return n.events=pC,n.Block=aF,n.Blocks=aU,n.Category=nK,n.Categories=n0,n.storageKey="",n.blocks=n.all,n.blocksVisible=new aU(n.blocks.models,{em:e}),n.categories=new n0([],{em:e,events:{update:pC.categoryUpdate}}),n.__onAllEvent=(0,b.debounce)(function(){return n.__trgCustom()},0),n}return aX(e,t),e.prototype.onInit=function(){var t=this.config,e=this.blocks,n=this.blocksVisible;e.on("add",function(t){return n.add(t)}),e.on("remove",function(t){return n.remove(t)}),e.on("reset",function(t){return n.reset(t.models)}),e.add(t.blocks||[])},e.prototype.__trgCustom=function(){this.em.trigger(this.events.custom,this.__customData())},e.prototype.__customData=function(){var t=this,e=this.__getBehaviour();return{bm:this,blocks:this.getAll().models,container:e.container,dragStart:function(e,n){return t.startDrag(e,n)},drag:function(e){return t.__drag(e)},dragStop:function(e){return t.endDrag(e)}}},e.prototype.__startDrag=function(t,e){var n=this.em,o=this.events,r=this.blocks,i=t.getContent?t.getContent():t;this._dragBlock=t,n.set({dragResult:null,dragSource:{content:i,dragDef:t.getDragDef()}}),[n,r].map(function(n){return n.trigger(o.dragStart,t,e)})},e.prototype.__drag=function(t){var e=this.em,n=this.events,o=this.blocks,r=this._dragBlock;[e,o].map(function(e){return e.trigger(n.drag,r,t)})},e.prototype.__endDrag=function(t){void 0===t&&(t={});var e=this.em,n=this.events,o=this.blocks,r=this._dragBlock,i=t.component||e.get("dragResult");if(delete this._dragBlock,i&&r){var a="activeOnRender",s=i.get&&i.get(a),l=r.get("activate")||s,c=r.get("select"),u=(0,b.isArray)(i)?i[0]:i;
1c||l&&!1!==c?e.setSelected(u,{activate:l}):l&&u.trigger("active"),l&&s&&u.unset(a),r.get("resetId")&&u.onAll(function(t){return t.resetId()})}e.set({dragResult:null,dragSource:void 0}),r&&[e,o].map(function(t){return t.trigger(n.dragEnd,i,r)})},e.prototype.__getFrameViews=function(){return this.em.Canvas.getFrames().map(function(t){return t.view}).filter(Boolean)},e.prototype.__behaviour=function(t){return void 0===t&&(t={}),this._bhv=aZ(aZ({},this._bhv||{}),t)},e.prototype.__getBehaviour=function(){return this._bhv||{}},e.prototype.startDrag=function(t,e){this.__startDrag(t,e),this.__getFrameViews().forEach(function(t){var e;return null==(e=t.droppable)?void 0:e.startCustom()})},e.prototype.endDrag=function(t){this.__getFrameViews().forEach(function(e){var n;return null==(n=e.droppable)?void 0:n.endCustom(t)}),this.__endDrag()},e.prototype.postRender=function(){var t=this.categories,e=this.config,n=this.em,o=this.blocksVisible;this.blocksView=new aJ({collection:o,categories:t},aZ(aZ({},e),{em:n})),this.__appendTo(o.models),this.__trgCustom()},e.prototype.add=function(t,e,n){void 0===n&&(n={});var o=e||{};return o.id=t,this.blocks.add(o,n)},e.prototype.get=function(t){return this.blocks.get(t)},e.prototype.getAll=function(){return this.blocks},e.prototype.getAllVisible=function(){return this.blocksVisible},e.prototype.remove=function(t,e){return void 0===e&&(e={}),this.__remove(t,e)},e.prototype.getCategories=function(){return this.categories},e.prototype.getContainer=function(){var t;return null==(t=this.blocksView)?void 0:t.el},e.prototype.getDragBlock=function(){return this._dragBlock},e.prototype.getBlocksByCategory=function(t){return nY(t||this.getAll().models)},e.prototype.render=function(t,e){void 0===e&&(e={});var n=this.categories,o=this.config,r=this.em,i=t||this.getAll().models;return e.external?new aJ({collection:new aU(i,{em:r}),categories:n},aZ(aZ({em:r},o),e)).render().el:(this.blocksView&&(this.blocksView.updateConfig(e),this.blocksView.collection.reset(i),this.blocksView.rendered||(this.blocksView.render(),this.blocksView.rendered=!0)),this.getContainer())},e.prototype.destroy=function(){var t,e=[this.blocks,this.blocksVisible,this.categories];e.map(function(t){return t.stopListening()}),e.map(function(t){return t.reset()}),null==(t=this.blocksView)||t.remove()},e}(tX),a0=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return a0(e,t),e.prototype.defaults=function(){return{name:"",label:""}},e.prototype.getName=function(){return this.get("name")},e.prototype.getLabel=function(){return this.get("label")||this.getName()},e}(tH);a1.prototype.idAttribute="name",function(t){t.add="selector:add",t.remove="selector:remove",t.removeBefore="selector:remove:before",t.update="selector:update",t.state="selector:state",t.custom="selector:custom",t.all="selector"}(pO||(pO={}));var a2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a3="contentEditable",a5=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.config||{};return n.config=o,n.module=e.module,n.coll=e.coll||null,n.pfx=o.stylePrefix||"",n.ppfx=o.pStylePrefix||"",n.em=o.em,n.listenTo(n.model,"change:active",n.updateStatus),n}return a2(e,t),e.prototype.template=function(){var t,e,n=this.pfx,o=this.model,r=this.config,i=o.get("label")||"";
vendor: 3,614 bytes, line 1
1return tD(pS||(t=['\n <span id="','checkbox" class="','tag-status" data-tag-status></span>\n <span id="','tag-label" data-tag-name>','</span>\n <span id="','close" class="','tag-close" data-tag-remove> $'," </span>\n "],e=['\n <span id="','checkbox" class="','tag-status" data-tag-status></span>\n <span id="','tag-label" data-tag-name>','</span>\n <span id="','close" class="','tag-close" data-tag-remove> $'," </span>\n "],Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,pS=t),n,n,n,i,n,n,r.iconTagRemove)},e.prototype.events=function(){return{"click [data-tag-remove]":"removeTag","click [data-tag-status]":"changeStatus","dblclick [data-tag-name]":"startEditTag","focusout [data-tag-name]":"endEditTag"}},e.prototype.getInputEl=function(){return this.inputEl||(this.inputEl=this.el.querySelector("[data-tag-name]")),this.inputEl},e.prototype.startEditTag=function(){var t=this.em,e=this.getInputEl();e[a3]="true",e.focus(),null==t||t.setEditing(!0)},e.prototype.endEditTag=function(){var t=this.model,e=this.em,n=this.getInputEl(),o=n.textContent||"",r=null==e?void 0:e.Selectors;n[a3]="false",null==e||e.setEditing(!1),r&&r.rename(t,o)!==t&&(n.innerText=t.getLabel())},e.prototype.changeStatus=function(){var t=this.model;t.set("active",!t.getActive())},e.prototype.removeTag=function(){this.module.removeSelected(this.model)},e.prototype.updateStatus=function(){var t=this.model,e=this.$el,n=this.config,o=n.iconTagOn,r=n.iconTagOff,i=e.find("[data-tag-status]");t.get("active")?(i.html(o),e.removeClass("opac50")):(i.html(r),e.addClass("opac50"))},e.prototype.render=function(){var t=this.pfx,e=this.ppfx,n=this.$el,o=this.model,r="".concat(t,"tag"),i=["".concat(r," ").concat(e,"three-bg")];return o.get("protected")&&i.push("".concat(r,"-protected")),n.html(this.template()),n.attr("class",i.join(" ")),this.updateStatus(),this},e}(tB),a4=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a9=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},a6=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.config=e.config||{},n.pfx=n.config.stylePrefix||"",n.ppfx=n.config.pStylePrefix||"",n.className=n.pfx+"tags",n.stateInputId=n.pfx+"states",n.stateInputC=n.pfx+"input-c",n.states=n.config.states||[];var o=n.config.em,r=n.collection;n.target=o;var i=o.Selectors;n.module=i,n.em=o,n.componentChanged=(0,b.debounce)(n.componentChanged.bind(n),0),n.checkSync=(0,b.debounce)(n.checkSync.bind(n),0);var a=pi.update,s="".concat(a,":classes"),l="".concat(pi.toggled," ").concat(s),c="".concat(s," ").concat(a,":attributes:id change:state");return n.listenTo(o,l,n.componentChanged),n.listenTo(o,"styleManager:update",n.componentChanged),n.listenTo(o,c,n.__handleStateChange),n.listenTo(o,"styleable:change change:device",n.checkSync),n.listenTo(r,"add",n.addNew),n.listenTo(r,"reset",n.renderClasses),n.listenTo(r,"remove",n.tagRemoved),n.listenTo(i.getAll(),i.events.state,(0,b.debounce)(function(){return n.renderStates()},0)),n.delegateEvents(),n}return a4(e,t),e.prototype.template=function(t){var e=t.labelInfo,n=t.labelHead,o=t.iconSync,r=t.iconAdd,i=t.pfx,a=t.ppfx;
1return tD(pT||(pT=a9([' <div id="','up" class="','header">\n <div id="','label" class="','header-label">','</div>\n <div id="','status-c" class="','header-status">\n <span id="','input-c" data-states-c>\n <div class="',"field ",'select">\n <span id="','input-holder">\n <select id="','states" data-states></select>\n </span>\n <div class="','sel-arrow">\n <div class="','d-s-arrow"></div>\n </div>\n </div>\n </span>\n </div>\n </div>\n <div id="','tags-field" class="','field">\n <div id="','tags-c" data-selectors></div>\n <input id="','new" data-input />\n <span id="','add-tag" class="',"tags-btn ",'tags-btn__add" data-add> $',' </span>\n <span class="',"tags-btn ",'tags-btn__sync" style="display: none" data-sync-style> $',' </span>\n </div>\n <div class="','sels-info">\n <div class="','label-sel">',':</div>\n <div class="','sels" data-selected></div>\n </div>'],[' <div id="','up" class="','header">\n <div id="','label" class="','header-label">','</div>\n <div id="','status-c" class="','header-status">\n <span id="','input-c" data-states-c>\n <div class="',"field ",'select">\n <span id="','input-holder">\n <select id="','states" data-states></select>\n </span>\n <div class="','sel-arrow">\n <div class="','d-s-arrow"></div>\n </div>\n </div>\n </span>\n </div>\n </div>\n <div id="','tags-field" class="','field">\n <div id="','tags-c" data-selectors></div>\n <input id="','new" data-input />\n <span id="','add-tag" class="',"tags-btn ",'tags-btn__add" data-add> $',' </span>\n <span class="',"tags-btn ",'tags-btn__sync" style="display: none" data-sync-style> $',' </span>\n </div>\n <div class="','sels-info">\n <div class="','label-sel">',':</div>\n <div class="','sels" data-selected></div>\n </div>'])),i,i,i,i,n,i,i,i,a,a,a,i,a,a,i,a,i,i,i,i,i,r,i,i,o,i,i,e,i)},e.prototype.events=function(){return{"change [data-states]":"stateChanged","click [data-add]":"startNewTag","focusout [data-input]":"endNewTag","keyup [data-input]":"onInputKeyUp","click [data-sync-style]":"syncStyle"}},e.prototype.syncStyle=function(){var t,e=this.em,n=this.getTarget(),o=e.Css,r=this.getCommonSelectors({opts:{noDisabled:1}}),i=e.get("state"),a=e.getCurrentMedia(),s=[],l=o.get(r,i,a)||o.add(r,i,a);this.getTargets().forEach(function(e){var n=o.getIdRule(e.getId(),{state:i,mediaText:a});t=n.getStyle(),n.setStyle({}),s.push(n)}),t&&l.addStyle(t),e.trigger(pi.toggled),e.trigger(pi.syncStyle,{component:n,selectors:r,mediaText:a,rule:l,ruleComponents:s,state:i})},e.prototype.tagRemoved=function(t){this.updateStateVis()},e.prototype.addNew=function(t){this.addToClasses(t)},e.prototype.startNewTag=function(){var t,e;null==(t=this.$addBtn)||t.css({display:"none"}),null==(e=this.$input)||e.show().focus()},e.prototype.endNewTag=function(){var t,e;null==(t=this.$addBtn)||t.css({display:""}),null==(e=this.$input)||e.hide().val("")},e.prototype.onInputKeyUp=function(t){var e;13===t.keyCode?(t.preventDefault(),this.addNewTag(null==(e=this.$input)?void 0:e.val())):27===t.keyCode&&this.endNewTag()},e.prototype.checkStates=function(){var t=this.em.getState(),e=this.getStates();e&&e.val(t)},e.prototype.componentChanged=function(t){var e=(void 0===t?{}:t).targets;this.updateSelection(e)},e.prototype.updateSelection=function(t){var e=t||this.getTargets();e=(0,b.isArray)(e)?e:[e];var n=[];return e&&e.length&&(n=this.getCommonSelectors({targets:e}),this.checkSync({validSelectors:n})),this.collection.reset(n),this.updateStateVis(e),this.module.__trgCustom(),n},e.prototype.getCommonSelectors=function(t){var e=void 0===t?{}:t,n=e.targets,o=e.opts,r=n||this.getTargets();return this.module.__getCommonSelectors(r,void 0===o?{}:o)},e.prototype._commonSelectors=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.module).__common.apply(t,e)},e.prototype.checkSync=function(){var t,e=this.$btnSyncEl,n=this.config,o=this.collection,r=this.getTarget();if(r&&n.componentFirst&&o.length){var i=r.getStyle();t=!(0,b.isEmpty)(i)}e&&e[t?"show":"hide"]()},e.prototype.getTarget=function(){return this.target.getSelected()},e.prototype.getTargets=function(){return this.target.getSelectedAll()},e.prototype.updateStateVis=function(t){var e=this.em,n=e&&e.getConfig().avoidInlineStyle,o=this.collection.length||n?"":"none";
1this.getStatesC().css("display",o),this.updateSelector(t)},e.prototype.__handleStateChange=function(){this.updateSelector(this.getTargets())},e.prototype.updateSelector=function(t){var e=this,n=this.el.querySelector("[data-selected]"),o=[],r=t||this.getTargets();(r=(0,b.isArray)(r)?r:[r]).forEach(function(t){return o.push(e.__getName(t))}),n&&(n.innerHTML=o.join(", ")),this.checkStates()},e.prototype.__getName=function(t){var e,n=this.pfx,o=this.config,r=this.em,i=o.selectedName,a=o.componentFirst;if((0,b.isString)(t))e=tD(pP||(pP=a9(['<span class="','sel-gen">',"</span>"],['<span class="','sel-gen">',"</span>"])),n,t);else{var s=null==t?void 0:t.getSelectors();if(!s)return"";var l=s.getStyleable(),c=r.get("state"),u=t.getId?tD(pE||(pE=a9(['<span class="','sel-cmp">','</span>\n <span class="','sel-id">#',"</span>"],['<span class="','sel-cmp">','</span>\n <span class="','sel-id">#',"</span>"])),n,t.getName(),n,t.getId()):"";e=(e=this.collection.getFullString(l))?tD(pk||(pk=a9(['<span class="','sel-rule">',"</span>"],['<span class="','sel-rule">',"</span>"])),n,e):t.get("selectorsAdd")||u,e=(a&&u?u:e)+(c?tD(pj||(pj=a9(['<span class="','sel-state">:',"</span>"],['<span class="','sel-state">:',"</span>"])),n,c):""),e=i?i({result:e,state:c,target:t}):e}return e&&'<span class="'.concat(n,'sel">').concat(e,"</span>")},e.prototype.stateChanged=function(t){var e=this.em,n=t.target.value;e.set("state",n)},e.prototype.addNewTag=function(t){var e=t.trim();e&&(this.module.addSelected({label:e}),this.endNewTag())},e.prototype.addToClasses=function(t,e){var n=this.getClasses(),o=new a5({model:t,config:this.config,coll:this.collection,module:this.module}).render().el;return e?e.appendChild(o):n.append(o),o},e.prototype.renderClasses=function(){var t=this,e=document.createDocumentFragment(),n=this.getClasses();n.empty(),this.collection.each(function(n){return t.addToClasses(n,e)}),n.append(e)},e.prototype.getClasses=function(){return this.$el.find("[data-selectors]")},e.prototype.getStates=function(){if(!this.$states){var t=this.$el.find("[data-states]");this.$states=t[0]&&t}return this.$states},e.prototype.getStatesC=function(){return this.$statesC||(this.$statesC=this.$el.find("#"+this.stateInputC)),this.$statesC},e.prototype.renderStates=function(){var t=this.module,e=this.em,n=e.t("selectorManager.emptyState"),o=t.getStates().map(function(t){var n=e.t("selectorManager.states.".concat(t.id))||t.getLabel()||t.id;return'<option value="'.concat(t.id,'">').concat(n,"</option>")}).join(""),r=this.getStates();r&&r.html('<option value="">'.concat(n,"</option>").concat(o)),this.checkStates()},e.prototype.render=function(){var t=this.em,e=this.pfx,n=this.ppfx,o=this.config,r=this.$el,i=this.el,a=o.render,s={iconSync:o.iconSync,iconAdd:o.iconAdd,labelHead:t.t("selectorManager.label"),labelInfo:t.t("selectorManager.selected"),ppfx:n,pfx:e,el:i};r.html(this.template(s));var l=a&&a(s);return l&&l!==i&&r.empty().append(l),this.$input=r.find("[data-input]"),this.$addBtn=r.find("[data-add]"),this.$classes=r.find("#"+e+"tags-c"),this.$btnSyncEl=r.find("[data-sync-style]"),this.$input.hide(),this.renderStates(),this.renderClasses(),r.attr("class","".concat(this.className," ").concat(n,"one-bg ").concat(n,"two-color")),this},e}(tB),a7=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),a8=function(){return(a8=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},st=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},se=function(t){return(0,b.isString)(t)&&"#"==t[0]},sn=function(t){return(0,b.isString)(t)&&"."==t[0]},so=function(t){function e(e){var n=t.call(this,e,"SelectorManager",new n$([]),pO,{stylePrefix:"clm-",appendTo:"",selectors:[],states:[{name:"hover"},{name:"active"},{name:"nth-of-type(2n)"}],iconAdd:'<svg viewBox="0 0 24 24">
1<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>',componentFirst:!1,custom:!1},{skipListen:!0})||this;n.Selector=nB,n.Selectors=n$,n.events=pO,n.storageKey="",(0,b.bindAll)(n,"__updateSelectedByComponents");var o=n.config,r=n.events,i=o.pStylePrefix;i&&(o.stylePrefix=i+o.stylePrefix),n.all=new n$(o.selectors),n.selected=new n$([],{em:e,config:o}),n.states=new tU(o.states.map(function(t){return new a1(t)}),{model:a1}),n.model=new tH({cFirst:o.componentFirst,_undo:!0}),n.__update=(0,b.debounce)(function(){return n.__trgCustom()},0),n.__initListen({collections:[n.states,n.selected],propagate:[{entity:n.states,event:r.state}]}),e.on("change:state",function(t,n){return e.trigger(r.state,n)}),n.model.on("change:cFirst",function(t,n){return e.trigger("selector:type",n)});var a="".concat(pi.update,":classes");e.on("".concat(pi.toggled," ").concat(a),n.__updateSelectedByComponents);var s="".concat(pi.toggled," ").concat(a," change:device styleManager:update selector:state selector:type style:target");return n.model.listenTo(e,s,function(){return n.__update()}),n}return a7(e,t),e.prototype.__trgCustom=function(t){this.em.trigger(this.events.custom,this.__customData(t))},e.prototype.getAll=function(t){return void 0===t&&(t={}),this.all?t.array?st([],this.all.models,!0):this.all:[]},e.prototype.__customData=function(t){return void 0===t&&(t={}),this.__ctn=this.__ctn||t.container,{states:this.getStates(),selected:this.getSelected(),container:this.__ctn}},e.prototype.postRender=function(){this.__appendTo(),this.__trgCustom()},e.prototype.select=function(t,e){void 0===e&&(e={});var n=Array.isArray(t)?t:[t],o=this.em.Styles.select(n,e);this.selected.reset(this.__getCommonSelectors(o));var r=this.selectorTags,i=o.filter(function(t){return t}).map(function(t){return tP(t)||tS(t)&&!t.get("selectorsAdd")?t:t.getSelectorsString()});return r&&r.componentChanged({targets:i}),this},e.prototype.addSelector=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=a8({},e);(0,b.isObject)(t)?o=t:o.name=t,se(o.name)?(o.name=o.name.substr(1),o.type=nB.TYPE_ID):sn(o.name)&&(o.name=o.name.substr(1)),o.label&&!o.name&&(o.name=this.escapeName(o.label));var r=this.all,i=this.em,a=this.config,s=r.get(o);if(!s){var l=o instanceof nB?o:new nB(o,a8(a8({},n),{config:a,em:i}));return r.add(l,n)}return s},e.prototype.getSelector=function(t,e){return void 0===e&&(e=nB.TYPE_CLASS),se(t)?(t=t.substr(1),e=nB.TYPE_ID):sn(t)&&(t=t.substr(1)),this.all.get({name:t,type:e})},e.prototype.add=function(t,e){var n=this;void 0===e&&(e={});var o=(0,b.isString)(t)?{}:e;return(0,b.isArray)(t)?t.map(function(t){return n.addSelector(t,e,o)}):this.addSelector(t,e,o)},e.prototype.addClass=function(t){var e=this,n=[];return(0,b.isString)(t)&&(t=t.trim().split(" ").filter(Boolean)),t.forEach(function(t){return n.push(e.addSelector(t))}),n},e.prototype.get=function(t,e){var n=this;if(!(0,b.isArray)(t))return this.getSelector(t,e);var o=[];return t.map(function(t){return n.getSelector(t)}).filter(Boolean).forEach(function(t){return 0>o.indexOf(t)&&o.push(t)}),o},e.prototype.remove=function(t,e){return this.__remove(t,e)},e.prototype.rename=function(t,e,n){var o=this.escapeName(e);return this.get(o)||t.set({name:o,label:e},n)},e.prototype.setState=function(t){return this.em.setState(t),this},e.prototype.getState=function(){return this.em.getState()},e.prototype.getStates=function(){return st([],this.states.models,!0)},e.prototype.setStates=function(t,e){return this.states.reset(t.map(function(t){return new a1(t)}),e)},e.prototype.getSelected=function(){return this.__getCommon()},e.prototype.getSelectedAll=function(){return st([],this.selected.models,!0)},e.prototype.addSelected=function(t){var e=this.add(t);
1this.em.getSelectedAll().forEach(function(t){t.getSelectors().add(e)})},e.prototype.removeSelected=function(t){this.em.getSelectedAll().forEach(function(e){!t.get("protected")&&e&&e.getSelectors().remove(t)})},e.prototype.duplicateSelected=function(t,e){var n=this;void 0===e&&(e={});var o=this.em,r=this.getSelected();if(!(0>r.indexOf(t))){var i=this.getState(),a=o.getCurrentMedia(),s=o.Css.get(r,i,a),l=null==s?void 0:s.getStyle();o.getSelectedAll().forEach(function(o){var r=o.getSelectors();if(r.includes(t)){var i=e.suffix||" copy",a=t.getLabel(),s=n.addSelector("".concat(a).concat(i)),l=r.indexOf(t);r.remove(t),r.add(s,{at:l})}}),l&&o.Css.add(this.getSelected(),i,a).setStyle(l)}},e.prototype.getSelectedTargets=function(){return this.em.Styles.getSelectedAll()},e.prototype.setComponentFirst=function(t){this.getConfig().componentFirst=t,this.model.set({cFirst:t})},e.prototype.getComponentFirst=function(){return this.getConfig().componentFirst},e.prototype.escapeName=function(t){var e=this.getConfig().escapeName;return e?e(t):nB.escapeName(t)},e.prototype.render=function(t){var e=this.selectorTags,n=this.getConfig(),o=null==e?void 0:e.el;return this.selected.reset(t),this.selectorTags=new a6({el:o,collection:this.selected,module:this,config:n}),this.selectorTags.render().el},e.prototype.destroy=function(){var t=this.selectorTags;this.model.stopListening(),this.__update.cancel(),this.__destroy(),null==t||t.remove(),this.selectorTags=void 0},e.prototype.load=function(){},e.prototype.store=function(){},e.prototype.__getCommon=function(){return this.__getCommonSelectors(this.em.getSelectedAll())},e.prototype.__getCommonSelectors=function(t,e){void 0===e&&(e={});var n=t.map(function(t){return t.getSelectors&&t.getSelectors().getValid(e)}).filter(Boolean);return this.__common.apply(this,n)},e.prototype.__common=function(){for(var t=this,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return e.length?1===e.length?e[0]:2===e.length?e[0].filter(function(t){return e[1].indexOf(t)>=0}):e.slice(1).reduce(function(e,n){return t.__common(e,n)},e[0]):[]},e.prototype.__updateSelectedByComponents=function(){this.selected.reset(this.__getCommon())},e}(tX),sr={MEDIA_RULE:4,FONT_FACE_RULE:5,PAGE_RULE:6,KEYFRAMES_RULE:7,COUNTER_STYLE_RULE:11,SUPPORTS_RULE:12,DOCUMENT_RULE:13,FONT_FEATURE_VALUES_RULE:14,VIEWPORT_RULE:15},si=((pA={})[sr.MEDIA_RULE]="media",pA[sr.FONT_FACE_RULE]="font-face",pA[sr.PAGE_RULE]="page",pA[sr.KEYFRAMES_RULE]="keyframes",pA[sr.COUNTER_STYLE_RULE]="counter-style",pA[sr.SUPPORTS_RULE]="supports",pA[sr.DOCUMENT_RULE]="document",pA[sr.FONT_FEATURE_VALUES_RULE]="font-feature-values",pA[sr.VIEWPORT_RULE]="viewport",pA),sa=(0,b.keys)(si),ss=[sr.FONT_FACE_RULE,sr.PAGE_RULE,sr.COUNTER_STYLE_RULE,sr.VIEWPORT_RULE],sl=sa.filter(function(t){return 0>ss.indexOf(Number(t))}).map(function(t){return si[t]}).concat(["container","layer"]),sc=ss.map(function(t){return si[t]}),su=function(t){void 0===t&&(t="");for(var e=[],n=[],o=t.split(","),r=/^(\.[\w\-]+)+((:{1,2}[\w\-]+)(\([^)]*\))?)*$/,i=/^#[\w\-]+((:{1,2}[\w\-]+)(\([^)]*\))?)*$/,a=0;a<o.length;a++){var s=o[a].trim();if(r.test(s)||i.test(s)){var l=s.split(/\.(?![^()]*\))/).filter(Boolean);n.push(l)}else e.push(s)}return{result:n,add:e}},sp=function(t){for(var e=t.style,n={},o=0,r=e.length;o<r;o++){var i=e[o],a=e.getPropertyValue(i),s=e.getPropertyPriority(i);n[i]="".concat(a).concat(s?" !".concat(s):"")}return n},sf=function(t){var e,n=null==(e=t.selectorText)?void 0:e.trim();if(n)return n.replace(/^&(?:\s+)?/,"").trim();var o=t.cssText,r=void 0===o?"":o,i=r.indexOf("{");return i>=0?r.slice(0,i).trim():""},sd=function(t){for(var e=sp(t),n=t.cssRules||[],o=0,r=n.length;o<r;o++){var i=n[o],a=sf(i);a&&(e[a]=sd(i))}return e},sh=function(t){return(t.conditionText||t.media&&t.media.mediaText||t.name||t.selectorText||"").trim()},sg=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o={},r=t.length,i=t[r-1],a=i?i.split(/:(.+)/):[],s=a[1],l=n.atRule,c=n.selectorsAdd,u=n.mediaText;return sc.indexOf(l)>=0&&(o.singleAtRule=!0),l&&(o.atRuleType=l),c&&(o.selectorsAdd=c),u&&(o.mediaText=u),s&&(t[r-1]=a[0],o.state=s,a.splice(a.length-1,1)),o.selectors=t,o.style=e,o},sv=function(t){var e=t.cssText,n=void 0===e?"":e;return sl.find(function(t){return 0===n.indexOf("@".concat(t))})},sy=function(t){for(var e=[],n=t.cssRules||[],o=0,r=n.length;o<r;
1o++){var i=n[o],a=i.type,s=!1,l="",c="",u=i.selectorText||i.keyText||"",p=ss.indexOf(a)>=0;if(p)s=!0,l=si[a],c=sh(i);else if(sa.indexOf("".concat(a))>=0||!a&&sv(i)){var f=sy(i),d=si[a]||sv(i);c=sh(i);for(var h=0,g=f.length;h<g;h++){var v=f[h];c&&(v.mediaText=c),v.atRuleType=d}e=e.concat(f)}if(u||p){for(var y=sd(i),m=su(u),b=m.add,w=m.result,_=void 0,C=0,x=w.length;C<x;C++){var O=sg(w[C],y,{atRule:si[a]});e.push(O),_=O}if(b.length){var S=b.join(", ");if(_)_.selectorsAdd=S;else{var O={selectors:[],selectorsAdd:S,style:y};s&&(O.singleAtRule=s),l&&(O.atRuleType=l),c&&(O.mediaText=c),e.push(O)}}}}return e};let sm=function(t){var e=document.createElement("style");e.innerHTML=t,document.head.appendChild(e);var n=e.sheet;return document.head.removeChild(e),n?sy(n):[]};var sb=function(){function t(t,e){void 0===e&&(e={}),this.em=t,this.config=e}return t.prototype.parse=function(t,e){var n,o,r,i=this;void 0===e&&(e={});var a=[],s=this.config.parserCss,l=null==(n=this.em)?void 0:n.Editor,c=[],u=null==(o=this.em)?void 0:o.Parser,p={input:t};null==u||u.__emitEvent(py.cssBefore,p);var f=p.input;try{c=s?s(f,l):sm(f)}catch(t){if(r=t,e.throwOnError)throw t}return c.forEach(function(t){return a=a.concat(i.checkNode(t))}),null==u||u.__emitEvent(py.css,{input:f,output:a,nodes:c,error:r}),a},t.prototype.checkNode=function(t){var e=t.selectors,n=t.style,o=[t];if((0,b.isString)(e)){var r=[],i=su(e),a=i.result,s=i.add.join(", "),l={atRule:t.atRule,mediaText:t.params};a.length?a.forEach(function(t){r.push(sg(t,n,l))}):r.push(sg([],n,l)),s&&(r[r.length-1].selectorsAdd=s),o=r}return o},t}(),sw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s_=function(){return(s_=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},sC=function(t){function e(e){var n=t.call(this,e,"Parser",{textTags:["br","b","i","u","a","ul","ol"],textTypes:["text","textnode","comment"],parserCss:void 0,parserHtml:void 0,parsersCode:{},parserCode:void 0,customSyntheticElement:void 0,optionsHtml:{parserCode:void 0,htmlType:"text/html",allowScripts:!1,allowUnsafeAttr:!1,allowUnsafeAttrValue:!1,keepEmptyTextNodes:!1,convertDataGjsAttributesHyphens:!1,convertAttributeValues:!1}})||this;n.parsersCode=new Map,n.events=py,n._parserCode="";var o=n.config;n.parserCss=new sb(e,o),n.parserHtml=new nE(e,o);var r=o.parserCode;return Object.entries(o.parsersCode||{}).forEach(function(t){var e=t[0],o=t[1];return n.addParserCode(e,o)}),void 0!==r&&(n.parserCode=r),n}return sw(e,t),Object.defineProperty(e.prototype,"parserCode",{get:function(){return this._parserCode},set:function(t){this._parserCode=t||"",this.getConfig().parserCode=this._parserCode},enumerable:!1,configurable:!0}),e.prototype.parseHtml=function(t,e){void 0===e&&(e={});var n=this.em,o=this.parserHtml;return o.compTypes=n.Components.getTypes()||[],o.parse(t,this.parserCss,e)},e.prototype.parseCss=function(t){return this.parserCss.parse(t)},e.prototype.addParserCode=function(t,e,n){void 0===n&&(n={});var o={id:t,parse:e};return this.parsersCode.set(t,o),n.skipSelect||(this.parserCode=t),o},e.prototype.getParserCode=function(t){return this.parsersCode.get(t)},e.prototype.removeParserCode=function(t){var e=this.parsersCode.get(t);if(e)return this.parsersCode.delete(t),this.parserCode===t&&(this.parserCode=""),e},e.prototype.__emitEvent=function(t,e){var n=this.em,o=this.events;n.trigger(t,e),n.trigger(o.all,s_({event:t},e))},e.prototype.destroy=function(){},e}(tJ),sx=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},sO=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
1,trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},sS=function(){function t(){}return t.prototype.store=function(t){return sx(this,arguments,void 0,function(t,e){return void 0===e&&(e={}),sO(this,function(n){return this.hasLocal(e,!0)&&localStorage.setItem(e.key,JSON.stringify(t)),[2,t]})})},t.prototype.load=function(){return sx(this,arguments,void 0,function(t){var e;return void 0===t&&(t={}),sO(this,function(n){return e={},this.hasLocal(t,!0)&&(e=JSON.parse(localStorage.getItem(t.key)||"{}")),[2,e]})})},t.prototype.hasLocal=function(t,e){if(void 0===t&&(t={}),t.checkLocal&&(!to()||!localStorage)){if(e)throw Error("localStorage not available");return!1}return!0},t}();function sT(t,e){this.name="AggregateError",this.errors=t,this.message=e||""}sT.prototype=Error.prototype;var sP=setTimeout;function sE(t){return!!(t&&void 0!==t.length)}function sk(){}function sj(t){if(!(this instanceof sj))throw TypeError("Promises must be constructed via new");if("function"!=typeof t)throw TypeError("not a function");this._state=0,this._handled=!1,this._value=void 0,this._deferreds=[],sN(t,this)}function sA(t,e){for(;3===t._state;)t=t._value;if(0===t._state)return void t._deferreds.push(e);t._handled=!0,sj._immediateFn(function(){var n,o=1===t._state?e.onFulfilled:e.onRejected;if(null===o)return void(1===t._state?sM:sD)(e.promise,t._value);try{n=o(t._value)}catch(t){sD(e.promise,t);return}sM(e.promise,n)})}function sM(t,e){try{if(e===t)throw TypeError("A promise cannot be resolved with itself.");if(e&&("object"==typeof e||"function"==typeof e)){var n=e.then;if(e instanceof sj){t._state=3,t._value=e,sL(t);return}if("function"==typeof n)return void sN(function(){n.apply(e,arguments)},t)}t._state=1,t._value=e,sL(t)}catch(e){sD(t,e)}}function sD(t,e){t._state=2,t._value=e,sL(t)}function sL(t){2===t._state&&0===t._deferreds.length&&sj._immediateFn(function(){t._handled||sj._unhandledRejectionFn(t._value)});for(var e=0,n=t._deferreds.length;e<n;e++)sA(t,t._deferreds[e]);t._deferreds=null}function sI(t,e,n){this.onFulfilled="function"==typeof t?t:null,this.onRejected="function"==typeof e?e:null,this.promise=n}function sN(t,e){var n=!1;try{t(function(t){n||(n=!0,sM(e,t))},function(t){n||(n=!0,sD(e,t))})}catch(t){if(n)return;n=!0,sD(e,t)}}sj.prototype.catch=function(t){return this.then(null,t)},sj.prototype.then=function(t,e){var n=new this.constructor(sk);return sA(this,new sI(t,e,n)),n},sj.prototype.finally=function(t){var e=this.constructor;return this.then(function(n){return e.resolve(t()).then(function(){return n})},function(n){return e.resolve(t()).then(function(){return e.reject(n)})})},sj.all=function(t){return new sj(function(e,n){if(!sE(t))return n(TypeError("Promise.all accepts an array"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);for(var r=o.length,i=0;i<o.length;i++)!function t(i,a){try{if(a&&("object"==typeof a||"function"==typeof a)){var s=a.then;if("function"==typeof s)return void s.call(a,function(e){t(i,e)},n)}o[i]=a,0==--r&&e(o)}catch(t){n(t)}}(i,o[i])})},sj.any=function(t){var e=this;return new e(function(n,o){if(!(t&&void 0!==t.length))return o(TypeError("Promise.any accepts an array"));var r=Array.prototype.slice.call(t);if(0===r.length)return o();for(var i=[],a=0;a<r.length;a++)try{e.resolve(r[a]).then(n).catch(function(t){i.push(t),i.length===r.length&&o(new sT(i,"All promises were rejected"))})}catch(t){o(t)}})},sj.allSettled=function(t){return new this(function(e,n){if(!(t&&void 0!==t.length))return n(TypeError(typeof t+" "+t+" is not iterable(cannot read property Symbol(Symbol.iterator))"));var o=Array.prototype.slice.call(t);if(0===o.length)return e([]);for(var r=o.length,i=0;i<o.length;i++)!function t(n,i){if(i&&("object"==typeof i||"function"==typeof i)){var a=i.then;if("function"==typeof a)return void a.call(i,function(e){t(n,e)},function(t){o[n]={status:"rejected",reason:t},0==--r&&e(o)})}o[n]={status:"fulfilled",value:i},0==--r&&e(o)}(i,o[i])})},sj.resolve=function(t){return t&&"object"==typeof t&&t.constructor===sj?t:new sj(function(e){e(t)})}
1,sj.reject=function(t){return new sj(function(e,n){n(t)})},sj.race=function(t){return new sj(function(e,n){if(!sE(t))return n(TypeError("Promise.race accepts an array"));for(var o=0,r=t.length;o<r;o++)sj.resolve(t[o]).then(e,n)})},sj._immediateFn="function"==typeof setImmediate&&function(t){setImmediate(t)}||function(t){sP(t,0)},sj._unhandledRejectionFn=function(t){"undefined"!=typeof console&&console&&console.warn("Possible Unhandled Promise Rejection:",t)},to()&&(window.Promise=window.Promise||sj);let sR="function"==typeof fetch?fetch.bind():function(t,e){return new sj(function(n,o){var r=new XMLHttpRequest;for(var i in r.open(e.method||"get",t),r.withCredentials="include"==e.credentials,e.headers||{})r.setRequestHeader(i,e.headers[i]);r.onload=function(t){return n({status:r.status,statusText:r.statusText,text:function(){return sj.resolve(r.responseText)}})},r.onerror=o,r.upload&&e.onProgress&&(r.upload.onprogress=e.onProgress),e.body?r.send(e.body):r.send()})};var sV=function(){return(sV=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},sF=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},sH=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},sU=function(){function t(){}return t.prototype.store=function(t){return sF(this,arguments,void 0,function(t,e){return void 0===e&&(e={}),sH(this,function(n){switch(n.label){case 0:return[4,this.request(e.urlStore,this.__props(e,t),e)];case 1:return[2,n.sent()]}})})},t.prototype.load=function(){return sF(this,arguments,void 0,function(t){return void 0===t&&(t={}),sH(this,function(e){switch(e.label){case 0:return[4,this.request(t.urlLoad,this.__props(t),t)];case 1:return[2,e.sent()]}})})},t.prototype.request=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),sR(t,e).then(function(t){var e=t.text();return(t.status/200|0)==1?e:e.then(Promise.reject)}).then(function(t){var e=t&&(0,b.isString)(t);return n.contentTypeJson&&e?JSON.parse(t):t})},t.prototype.__props=function(t,e){void 0===t&&(t={});var n,o=t.contentTypeJson,r=t.headers||{},i=t.fetchOptions||{},a="X-Requested-With",s="Content-Type";if((0,b.isUndefined)(r[a])&&(r[a]="XMLHttpRequest"),(0,b.isUndefined)(r[s])&&o&&(r[s]="application/json; charset=utf-8"),e)if(o)n=JSON.stringify(e);else for(var l in n=new FormData,e)n.append(l,e[l]);var c={method:n?"POST":"GET",credentials:t.credentials,headers:r,body:n};return sV(sV({},c),(0,b.isFunction)(i)?i(c):i)},t}();!function(t){t.start="storage:start",t.startStore="storage:start:store",t.startLoad="storage:start:load",t.load="storage:load",t.store="storage:store",t.after="storage:after",t.afterStore="storage:after:store",t.afterLoad="storage:after:load",t.end="storage:end",t.endStore="storage:end:store",t.endLoad="storage:end:load",t.error="storage:error",t.errorStore="storage:error:store",t.errorLoad="storage:error:load"}(pM||(pM={}));let sB=pM;var sz=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),sW=function(){return(sW=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},s$=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},sq=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},sG="local",sK="remote",sY=function(t){function e(e){var n=t.call(this,e,"StorageManager",{id:"gjs-",type:"local",autosave:!0,autoload:!0,stepsBeforeSave:1,recovery:!1,onStore:function(t){return t},onLoad:function(t){return t},options:{local:{key:"gjsProject",checkLocal:!0},remote:{headers:{},urlStore:"",urlLoad:"",contentTypeJson:!0,fetchOptions:"",credentials:"include",onStore:function(t){return t},onLoad:function(t){return t}}}})||this;n.storages={},n.events=sB;var o=n.config;return o._disable&&(o.type=void 0),n.storages={},n.add(sG,new sS),n.add(sK,new sU),n.setCurrent(o.type),n}return sz(e,t),e.prototype.isAutosave=function(){return!!this.config.autosave},e.prototype.setAutosave=function(t){return this.config.autosave=!!t,this},e.prototype.getStepsBeforeSave=function(){return this.config.stepsBeforeSave},e.prototype.setStepsBeforeSave=function(t){return this.config.stepsBeforeSave=t,this},e.prototype.add=function(t,e){return this.storages[t]=e,this},e.prototype.get=function(t){return this.storages[t]},e.prototype.getStorages=function(){return this.storages},e.prototype.getCurrent=function(){return this.config.currentStorage},e.prototype.setCurrent=function(t){return this.getConfig().currentStorage=t,this},e.prototype.getCurrentStorage=function(){return this.get(this.getCurrent())},e.prototype.getStorageOptions=function(t){return this.getCurrentOptions(t)},e.prototype.store=function(t){return s$(this,arguments,void 0,function(t,e){var n,o,r,i,a;return void 0===e&&(e={}),sq(this,function(s){switch(s.label){case 0:n=this.getCurrentStorage(),o=sW(sW({},this.getCurrentOptions()),e),r=this.getRecoveryStorage(),i=this.getCurrentOptions(sG),s.label=1;case 1:return s.trys.push([1,5,,9]),[4,this.__exec(n,o,t)];case 2:if(s.sent(),!r)return[3,4];return[4,this.__exec(r,i,{})];case 3:s.sent(),s.label=4;case 4:case 8:return[3,9];case 5:if(a=s.sent(),!r)return[3,7];return[4,this.__exec(r,i,t)];case 6:return s.sent(),[3,8];case 7:throw a;case 9:return[2,t]}})})},e.prototype.load=function(){return s$(this,arguments,void 0,function(t){var e,n,o,r,i;return void 0===t&&(t={}),sq(this,function(a){switch(a.label){case 0:if(e=this.getCurrentStorage(),n=sW(sW({},this.getCurrentOptions()),t),!(o=this.getRecoveryStorage()))return[3,5];return[4,this.__exec(o,this.getCurrentOptions(sG))];case 1:if(i=a.sent(),(0,b.isEmpty)(i))return[3,5];a.label=2;case 2:return a.trys.push([2,4,,5]),[4,this.__askRecovery()];case 3:return a.sent(),r=i,[3,5];case 4:return a.sent(),[3,5];case 5:if(r)return[3,7];return[4,this.__exec(e,n)];case 6:r=a.sent(),a.label=7;case 7:return[2,r||{}]}})})},e.prototype.__askRecovery=function(){var t=this.em,e=this.getRecovery();return new Promise(function(n,o){(0,b.isFunction)(e)?e(n,o,null==t?void 0:t.getEditor()):confirm(null==t?void 0:t.t("storageManager.recover"))?n(null):o()})},e.prototype.getRecovery=function(){return this.config.recovery},e.prototype.getRecoveryStorage=function(){return this.getRecovery()&&this.getCurrent()===sK&&this.get(sG)},e.prototype.__exec=function(t,e,n){return s$(this,void 0,void 0,function(){var o,r,i,a,s,l,c,u,p,f,d,h,g,v;return sq(this,function(y){switch(y.label){case 0:if(o=n?"store":"load",i=(r=this.getConfig()).onStore,a=r.onLoad,!t)return[2,n||{}];this.onStart(o,n),y.label=1;case 1:if(y.trys.push([1,14,,15]),l=null==(v=this.em)?void 0:v.getEditor(),c=void 0,!n)return[3,7];if(!(p=i))return[3,3];return[4,i(n,l)];case 2:p=y.sent(),y.label=3;case 3:if(u=p||n,!(f=e.onStore))return[3,5];return[4,e.onStore(u,l)];case 4:f=y.sent(),y.label=5;case 5:return u=f||u,[4,t.store(u,e)];case 6:return c=y.sent(),s=n,[3,13];case 7:return[4,t.load(e)];case 8:if(c=y.sent(),s=this.__clearKeys(c),!(d=e.onLoad))return[3,10];return[4,e.onLoad(s,l)];case 9:d=y.sent(),y.label=10;case 10:if(s=d||s,!(h=a))return[3,12];return[4,a(s,l)];case 11:h=y.sent(),y.label=12;case 12:s=h||s,y.label=13;case 13:return this.onAfter(o,s,c),this.onEnd(o,s,c),[3,15];case 14:throw g=y.sent(),this.onError(o,g),g;case 15:return[2,s]}})})},e.prototype.__clearKeys=function(t){void 0===t&&(t={});var e=this.getConfig(),n=new RegExp("^".concat(e.id)),o={};for(var r in t)o[r.replace(n,"")]=t[r];return o},e.prototype.getCurrentOptions=function(t){var e=this.getConfig(),n=t||this.getCurrent();return e.options[n]||{}},e.prototype.onStart=function(t,e){var n=this.em;if(n){var o="load"===t?sB.startLoad:sB.startStore;n.trigger(sB.start,t,e),n.trigger(o,e)}},e.prototype.onAfter=function(t,e,n){var o=this.em;if(o){var r="load"===t?sB.afterLoad:sB.afterStore;o.trigger(sB.after),o.trigger(r,e,n);var i="load"===t?sB.load:sB.store;o.trigger(i,e,n)}},e.prototype.onEnd=function(t,e,n){var o=this.em;if(o){var r="load"===t?sB.endLoad:sB.endStore;o.trigger(sB.end,t,e,n),o.trigger(r,e,n)}},e.prototype.onError=function(t,e){var n=this.em;if(n){var o="load"===t?sB.errorLoad:sB.errorStore;n.trigger(sB.error,e,t),n.trigger(o,e),this.onEnd(t,e)}},e.prototype.canAutoload=function(){return!!this.getCurrentStorage()&&!!this.config.autoload},e.prototype.destroy=function(){this.storages={}},e}(tJ),sJ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
vendor: 5,181 bytes, line 1
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),sX=function(){return(sX=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},sZ=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.events={},n.appendInput=!0;var o=e.config,r=void 0===o?{}:o,i=n.model,a=n.eventCapture,s=i.target,l=i.attributes.type;return n.config=r,n.em=r.em,n.pfx=r.stylePrefix||"",n.ppfx=r.pStylePrefix||"",n.target=s,n.className=n.pfx+"trait",n.clsField="".concat(n.ppfx,"field ").concat(n.ppfx,"field-").concat(l),[["change:value",n.onValueChange],["remove",n.removeView]].forEach(function(t){var e=t[0],o=t[1];i.off(e,o),n.listenTo(i,e,o)}),i.view=n,n.listenTo(i,"change:label",n.render),n.listenTo(i,"change:placeholder",n.rerender),n.events={},a.forEach(function(t){return n.events[t]="onChange"}),n.delegateEvents(),n.init(),n}return sJ(e,t),e.prototype.attributes=function(){return this.model.get("attributes")||{}},e.prototype.templateLabel=function(t){var e=this.ppfx,n=this.getLabel();return'<div class="'.concat(e,'label" title="').concat(n,'">').concat(n,"</div>")},e.prototype.templateInput=function(t){var e=this.clsField;return'<div class="'.concat(e,'" data-input></div>')},e.prototype.getClbOpts=function(){return{component:this.target,trait:this.model,elInput:this.getInputElem()}},e.prototype.removeView=function(){this.remove(),this.removed()},e.prototype.init=function(){},e.prototype.removed=function(){},e.prototype.onRender=function(t){},e.prototype.onUpdate=function(t){},e.prototype.onEvent=function(t){},e.prototype.onChange=function(t){var e=this.getInputElem();e&&!(0,b.isUndefined)(e.value)&&this.model.set("value",e.value),this.onEvent(sX(sX({},this.getClbOpts()),{event:t}))},e.prototype.getValueForTarget=function(){return this.model.get("value")},e.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.value=t)},e.prototype.onValueChange=function(t,e,n){void 0===n&&(n={});var o=this.model,r=this.getValueForTarget();n.fromTarget?(this.setInputValue(r),this.postUpdate()):o.setValue(r,n)},e.prototype.renderLabel=function(){var t=this.$el,e=this.target,n=this.getLabel(),o=this.templateLabel(e);this.createLabel&&(o=this.createLabel({label:n,component:e,trait:this})||""),t.find("[data-label]").append(o)},e.prototype.getLabel=function(){var t=this.em,e=this.model.attributes,n=e.label,o=e.name;return t.t("traitManager.traits.labels.".concat(o))||tO(n||o).replace(/-/g," ")},e.prototype.getComponent=function(){return this.target},e.prototype.getInputEl=function(){if(!this.$input){var t=this.em,e=this.model,n=e.attributes.name,o=e.get("placeholder")||e.get("default")||"",r=e.get("type")||"text",i=e.get("min"),a=e.get("max"),s=this.getModelValue(),l=(0,tN.default)('<input type="'.concat(r,'">')),c=t.t("traitManager.traits.attributes.".concat(n))||{};l.attr(sX({placeholder:o},c)),(0,b.isUndefined)(s)||(e.set({value:s},{silent:!0}),l.prop("value",s)),i&&l.prop("min",i),a&&l.prop("max",a),this.$input=l}return this.$input.get(0)},e.prototype.getInputElem=function(){var t=this.input,e=this.$input;return t||e&&e.get&&e.get(0)||this.getElInput()},e.prototype.getModelValue=function(){return this.model.getValue()},e.prototype.getElInput=function(){return this.elInput},e.prototype.renderField=function(){var t=this.$el,e=this.appendInput,n=this.model,o=t.find("[data-input]"),r=o[o.length-1],i=n.el;i||(i=this.createInput?this.createInput(this.getClbOpts()):this.getInputEl()),(0,b.isString)(i)?(r.innerHTML=i,this.elInput=r.firstChild):(e?r.appendChild(i):r.insertBefore(i,r.firstChild),this.elInput=i),n.el=this.elInput},e.prototype.hasLabel=function(){var t=this.model.attributes.label;return!this.noLabel&&!1!==t},e.prototype.rerender=function(){delete this.model.el,this.render()},e.prototype.postUpdate=function(){this.onUpdate(this.getClbOpts())},e.prototype.render=function(){var t=this.$el,e=this.pfx,n=this.ppfx,o=this.model.attributes,r=o.type,i=o.id,a=this.hasLabel&&this.hasLabel(),s="".concat(e,"trait");delete this.$input;var l='<div class="'.concat(s," ").concat(s,"--").concat(r,'">\n ').concat(a?'<div class="'.concat(n,'label-wrp" data-label></div>'):"",'\n <div class="').concat(n,"field-wrp ").concat(n,"field-wrp--").concat(r,'" data-input>\n ').concat(this.templateInput?(0,b.isFunction)(this.templateInput)?this.templateInput(this.getClbOpts()):this.templateInput:"","\n </div>\n </div>");return t.empty().append(l),a&&this.renderLabel(),this.renderField(),this.el.className="".concat(s,"__wrp ").concat(s,"__wrp-").concat(i),this.postUpdate(),this.onRender(this.getClbOpts()),this},e}(tB);sZ.prototype.eventCapture=["change"];var sQ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s0=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return sQ(e,t),e.prototype.templateInput=function(){return""},e.prototype.onChange=function(){this.handleClick()},e.prototype.handleClick=function(){this.model.runCommand()},e.prototype.renderLabel=function(){this.model.get("label")&&sZ.prototype.renderLabel.apply(this)},e.prototype.getInputEl=function(){var t=this.model,e=this.ppfx,n=t.props(),o=n.labelButton,r=n.text,i=n.full,a="".concat(e,"btn");return'<button type="button" class="'.concat(a,"-prim").concat(i?" ".concat(a,"--full"):"",'">').concat(o||r,"</button>")},e}(sZ);s0.prototype.eventCapture=["click button"];var s1=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s2=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.appendInput=!1,e}return s1(e,t),e.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return'<label class="'.concat(e,'" data-input>\n <i class="').concat(t,'chk-icon"></i>\n </label>')},e.prototype.onChange=function(){this.model.set("value",this.getInputElem().checked)},e.prototype.setInputValue=function(t){var e=this.getInputElem();e&&(e.checked=!!t)},e.prototype.getInputEl=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=!this.$input,o=sZ.prototype.getInputEl.apply(this,t);if(n){var r=void 0,i=void 0,a=this.model,s=this.target,l=a.attributes.valueFalse,c=a.getName();a.changeProp?i=r=s.get(c):r=!!(i=s.get("attributes")[c])||""===i,(0,b.isUndefined)(l)||i!==l||(r=!1),o.checked=r}return o},e}(sZ),s3=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s5=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.ppfx||"";return n.opts=e,n.ppfx=o,n.em=e.target||{},e.onChange||n.listenTo(n.model,"change:value",n.handleModelChange),n}return s3(e,t),e.prototype.template=function(){return'<span class="'.concat(this.holderClass(),'"></span>')},e.prototype.inputClass=function(){return"".concat(this.ppfx,"field")},e.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},e.prototype.elementUpdated=function(){this.model.trigger("el:change")},e.prototype.setValue=function(t,e){var n=this.model,o=t||n.get("defaults"),r=this.getInputEl();r&&(r.value=o)},e.prototype.handleModelChange=function(t,e,n){this.setValue(e,n)},e.prototype.handleChange=function(t){t.stopPropagation();var e=this.getInputEl().value;this.__onInputChange(e),this.elementUpdated()},e.prototype.__onInputChange=function(t){this.model.set({value:t},{fromInput:1})},e.prototype.getInputEl=function(){if(!this.inputEl){var t=this.model,e=this.opts.type||"text",n=t.get("placeholder")||t.get("defaults")||t.get("default")||"";this.inputEl=(0,tN.default)('<input type="'.concat(e,'" placeholder="').concat(n,'">'))}return this.inputEl.get(0)},e.prototype.render=function(){this.inputEl=null;var t=this.$el;return t.addClass(this.inputClass()),t.html(this.template()),t.find(".".concat(this.holderClass())).append(this.getInputEl()),this},e}(tB);s5.prototype.events={change:"handleChange"};var s4=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),s9=function(){return(s9=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};tN.default&&function(t,e){if(to()){var n,o,r,i={beforeShow:O,move:O,change:O,show:O,hide:O,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},a=[],s=!!/msie/i.exec(window.navigator.userAgent),l=function(){function t(t,e){return!!~(""+t).indexOf(e)}var e=document.createElement("div").style;return e.cssText="background-color:rgba(0,0,0,.5)",t(e.backgroundColor,"rgba")||t(e.backgroundColor,"hsla")}(),c=function(){var t="";if(s)for(var e=1;e<=6;e++)t+="<div class='sp-"+e+"'></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>"+t+"</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>"}(),u="spectrum.id";t.fn.spectrum=function(n,o){if("string"==typeof n){var r=this,p=Array.prototype.slice.call(arguments,1);return this.each(function(){var e=a[t(this).data(u)];if(e){var o=e[n];if(!o)throw Error("Spectrum: no such method: '"+n+"'");"get"==n?r=e.get():"container"==n?r=e.container:"option"==n?r=e.option.apply(e,p):"destroy"==n?(e.destroy(),t(this).removeData(u)):o.apply(e,p)}}),r}return this.spectrum("destroy").each(function(){var o=function(n,o){var r,u,p,f,d=((f=t.extend({},i,o)).callbacks={move:T(f.move,n),change:T(f.change,n),show:T(f.show,n),hide:T(f.hide,n),beforeShow:T(f.beforeShow,n)},f),h=d.flat,g=d.showSelectionPalette,v=d.localStorageKey,y=d.theme,m=d.callbacks,w=(r=tz,function(){var t=this,e=arguments;u&&clearTimeout(p),(u||!p)&&(p=setTimeout(function(){p=null,r.apply(t,e)},10))}),_=!1,C=!1,O=!0,k=0,j=0,A=0,M=0,D=0,L=0,I=0,N=0,R=0,V=0,F=1,H=[],U=[],B={},z=d.selectionPalette.slice(0),W=d.maxSelectionSize,$="sp-dragging",q=null,G=n.ownerDocument,K=(G.body,t(n)),Y=!1,J=t(c,G).addClass(y),X=J.find(".sp-picker-container"),Z=J.find(".sp-color"),Q=J.find(".sp-dragger"),tt=J.find(".sp-hue"),te=J.find(".sp-slider"),tn=J.find(".sp-alpha-inner"),to=J.find(".sp-alpha"),tr=J.find(".sp-alpha-handle"),ti=J.find(".sp-input"),ta=J.find(".sp-palette"),ts=J.find(".sp-initial"),tl=J.find(".sp-cancel"),tc=J.find(".sp-clear"),tu=J.find(".sp-choose"),tp=J.find(".sp-palette-toggle"),tf=K.is("input"),td=tf&&"color"===K.attr("type")&&E(),th=tf&&!h,tg=th?t("<div class='sp-replacer'><div class='sp-preview'><div class='sp-preview-inner'></div></div><div class='sp-dd'>▼</div></div>").addClass(y).addClass(d.className).addClass(d.replacerClassName):t([]),tv=th?tg:K,ty=tg.find(".sp-preview-inner"),tm=d.color||tf&&K.val(),tb=!1,tw=d.preferredFormat,t_=!d.showButtons||d.clickoutFiresChange,tC=!tm,tx=d.allowEmpty&&!td;function tO(){if(d.showPaletteOnly&&(d.showPalette=!0),tp.text(d.showPaletteOnly?d.togglePaletteMoreText:d.togglePaletteLessText),d.palette){H=d.palette.slice(0),U=t.isArray(H[0])?H:[H],B={};for(var e=0;e<U.length;e++)for(var n=0;n<U[e].length;n++)B[b(U[e][n]).toRgbString()]=!0}J.toggleClass("sp-flat",h),J.toggleClass("sp-input-disabled",!d.showInput),J.toggleClass("sp-alpha-enabled",d.showAlpha),J.toggleClass("sp-clear-enabled",tx),J.toggleClass("sp-buttons-disabled",!d.showButtons),J.toggleClass("sp-palette-buttons-disabled",!d.togglePaletteOnly),J.toggleClass("sp-palette-disabled",!d.showPalette),J.toggleClass("sp-palette-only",d.showPaletteOnly),J.toggleClass("sp-initial-disabled",!d.showInitial),J.addClass(d.className).addClass(d.c
1ontainerClassName),tz()}function tS(){if(v&&window.localStorage){try{var e=window.localStorage[v].split(",#");e.length>1&&(delete window.localStorage[v],t.each(e,function(t,e){tT(e)}))}catch(t){}try{z=window.localStorage[v].split(";")}catch(t){}}}function tT(e){if(g){var n=b(e).toRgbString();if(!B[n]&&-1===t.inArray(n,z))for(z.push(n);z.length>W;)z.shift();if(v&&window.localStorage)try{window.localStorage[v]=z.join(";")}catch(t){}}}function tP(){var e=tV(),n=t.map(U,function(t,n){return x(t,e,"sp-palette-row sp-palette-row-"+n,d)});tS(),z&&n.push(x(function(){var t=[];if(d.showPalette)for(var e=0;e<z.length;e++)B[b(z[e]).toRgbString()]||t.push(z[e]);return t.reverse().slice(0,d.maxSelectionSize)}(),e,"sp-palette-row sp-palette-row-selection",d)),ta.html(n.join(""))}function tE(){if(d.showInitial){var t=tb,e=tV();ts.html(x([t,e],e,"sp-palette-row-initial",d))}}function tk(){(j<=0||k<=0||M<=0)&&tz(),C=!0,J.addClass($),q=null,K.trigger("dragstart.spectrum",[tV()])}function tj(){C=!1,J.removeClass($),K.trigger("dragstop.spectrum",[tV()])}function tA(){var t=ti.val();if((null===t||""===t)&&tx)tR(null),tB(!0);else{var e=b(t);e.isValid()?(tR(e),tB(!0)):ti.addClass("sp-validation-error")}}function tM(){_?tN():tD()}function tD(){var e=t.Event("beforeShow.spectrum");if(_)return void tz();if(K.trigger("beforeShow.spectrum",[tV()]),!(!1===m.beforeShow(tV())||e.isDefaultPrevented())){for(var n=0;n<a.length;n++)a[n]&&a[n].hide();_=!0;var o=t(G);o.bind("keydown.spectrum",tL),o.bind("click.spectrum",tI),t(window).bind("resize.spectrum",w),tg.addClass("sp-active"),J.removeClass("sp-hidden"),tz(),tH(),tb=tV(),tE(),m.show(tb),K.trigger("show.spectrum",[tb])}}function tL(t){27===t.keyCode&&tN()}function tI(t){2!=t.button&&(C||(t_?tB(!0):tR(tb,!0),tN()))}function tN(){_&&!h&&(_=!1,t(G).unbind("keydown.spectrum",tL),t(G).unbind("click.spectrum",tI),t(window).unbind("resize.spectrum",w),tg.removeClass("sp-active"),J.addClass("sp-hidden"),m.hide(tV()),K.trigger("hide.spectrum",[tV()]))}function tR(t,e){var n,o;if(b.equals(t,tV()))return void tH();!t&&tx?tC=!0:(tC=!1,O=!t,N=(o=(n=b(t)).toHsv()).h%360/360,R=o.s,V=o.v,F=o.a),tH(),n&&n.isValid()&&!e&&(tw=d.preferredFormat||n.getFormat())}function tV(t){return(t=t||{},tx&&tC)?null:b.fromRatio({h:N,s:R,v:V,a:Math.round(100*F)/100},{format:t.format||tw})}function tF(){tH(),m.move(tV()),K.trigger("move.spectrum",[tV()])}function tH(){ti.removeClass("sp-validation-error"),tU();var t=b.fromRatio({h:N,s:1,v:1});Z.css("background-color",t.toHexString());var e=tw;F<1&&(0!==F||"name"!==e)&&("hex"===e||"hex3"===e||"hex6"===e||"name"===e)&&(e="rgb");var n=tV({format:e}),o="";if(ty.removeClass("sp-clear-display"),ty.css("background-color","transparent"),!n&&tx)ty.addClass("sp-clear-display");else{var r=n.toHexString(),i=n.toRgbString();if(l||1===n.alpha?ty.css("background-color",i):(ty.css("background-color","transparent"),ty.css("filter",n.toFilter())),d.showAlpha){var a=n.toRgb();a.a=0;var c=b(a).toRgbString(),u="linear-gradient(left, "+c+", "+r+")";s?tn.css("filter",b(c).toFilter({gradientType:1},r)):(tn.css("background","-webkit-"+u),tn.css("background","-moz-"+u),tn.css("background","-ms-"+u),tn.css("background","linear-gradient(to right, "+c+", "+r+")"))}o=n.toString(e)}d.showInput&&ti.val(o),d.showPalette&&tP(),tE()}function tU(){var t=R,e=V;if(tx&&tC)tr.hide(),te.hide(),Q.hide();else{tr.show(),te.show(),Q.show();var n=t*k,o=j-e*j;n=Math.max(-A,Math.min(k-A,n-A)),o=Math.max(-A,Math.min(j-A,o-A)),Q.css({top:o+"px",left:n+"px"});var r=F*D;tr.css({left:r-L/2+"px"});var i=N*M;te.css({top:i-I+"px"})}}function tB(t){var e=tV(),n="",o=!!O||!b.equals(e,tb);e&&(n=e.toString(tw),_||tT(e)),tf&&K.val(n),t&&o&&(m.change(e),K.trigger("change",[e]))}function tz(){_&&(k=Z.width(),j=Z.height(),A=Q.height(),tt.width(),M=tt.height(),I=te.height(),D=to.width(),L=tr.width(),h||(J.css("position","absolute"),d.offset?J.offset(d.offset):J.offset(function(t,e){for(var n=e[0],o=t[0],r=o.parentElement,i=n.getBoundingClientRect(),a=o.offsetWidth,s=o.offsetHeight,l={top:0,left:0,width:n.offsetWidth,height:n.offsetHeight};n&&(l.top+=n.offsetTop-n.scrollTop,l.left+=n.offsetLeft-n.scrollLeft,n!==r&&r.contains(n.offsetParent));)n=n.offsetParent;return i.right+a>window.innerWidth-window.scrollX&&i.right-a>0&&(l.left-=a-l.width),i.bottom+s<window.innerHeight-window.scrollY?l.top+=l.height:l.top-=s,l}(J,tv))),tU(),d.showPalette&&tP(),K.trigger("reflow.spectrum"))}function tW(){tN(),Y=!0,K.attr("disabled",!0),tv.addClass("sp-disabled")}if(s&&J.find("*:not(input)").attr("unselectable","on"),tO(),th&&K.after(tg).hide(),tx||tc.hide(),h)K.after(J).hide();else{var t$="parent"===d.appendTo?K.parent():t(d.appendTo);1!==t$.length&&(t$=t("body")),t$.append(J)}function tq(e){return e.data&&e.data.ignore?(tR(t(e.target).closest(".sp-thumb-el").data("c
1olor")),tF()):(tR(t(e.target).closest(".sp-thumb-el").data("color")),tF(),d.hideAfterPaletteSelect&&(tB(!0),tN())),!1}tS(),tv.bind("click.spectrum touchstart.spectrum",function(e){Y||tM(),e.stopPropagation(),t(e.target).is("input")||e.preventDefault()}),(K.is(":disabled")||!0===d.disabled)&&tW(),J.click(S),ti.change(tA),ti.bind("paste",function(){setTimeout(tA,1)}),ti.keydown(function(t){13==t.keyCode&&tA()}),tl.text(d.cancelText),tl.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),tR(tb,!0),tN()}),tc.attr("title",d.clearText),tc.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),tC=!0,tF(),h&&tB(!0)}),tu.text(d.chooseText),tu.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),s&&ti.is(":focus")&&ti.trigger("change"),ti.hasClass("sp-validation-error")||(tB(!0),tN())}),tp.text(d.showPaletteOnly?d.togglePaletteMoreText:d.togglePaletteLessText),tp.bind("click.spectrum",function(t){t.stopPropagation(),t.preventDefault(),d.showPaletteOnly=!d.showPaletteOnly,d.showPaletteOnly||h||J.css("left","-="+(X.outerWidth(!0)+5)),tO()}),P(to,function(t,e,n){F=t/D,tC=!1,n.shiftKey&&(F=Math.round(10*F)/10),tF()},tk,tj),P(tt,function(t,e){N=parseFloat(e/M),tC=!1,d.showAlpha||(F=1),tF()},tk,tj),P(Z,function(t,e,n){n.shiftKey?q||(q=Math.abs(t-R*k)>Math.abs(e-(j-V*j))?"x":"y"):q=null;var o=!q||"x"===q,r=!q||"y"===q;o&&(R=parseFloat(t/k)),r&&(V=parseFloat((j-e)/j)),tC=!1,d.showAlpha||(F=1),tF()},tk,tj),tm?(tR(tm),tH(),tw=d.preferredFormat||b(tm).getFormat(),tT(tm)):tH(),h&&tD();var tG=s?"mousedown.spectrum":"click.spectrum touchstart.spectrum";ta.delegate(".sp-thumb-el",tG,tq),ts.delegate(".sp-thumb-el:nth-child(1)",tG,{ignore:!0},tq);var tK={show:tD,hide:tN,toggle:tM,reflow:tz,option:function(n,o){return e===n?t.extend({},d):e===o?d[n]:void(d[n]=o,"preferredFormat"===n&&(tw=d.preferredFormat),tO())},enable:function(){Y=!1,K.attr("disabled",!1),tv.removeClass("sp-disabled")},disable:tW,offset:function(t){d.offset=t,tz()},set:function(t){tR(t),tB()},get:tV,destroy:function(){K.show(),tv.unbind("click.spectrum touchstart.spectrum"),J.remove(),tg.remove(),a[tK.id]=null},container:J};return tK.id=a.push(tK)-1,tK}(this,t.extend({},n,t(this).data()));t(this).data(u,o.id)})},t.fn.spectrum.load=!0,t.fn.spectrum.loadOpts={},t.fn.spectrum.draggable=P,t.fn.spectrum.defaults=i,t.fn.spectrum.inputTypeColorSupport=function e(){if(void 0===e._cachedResult){var n=t("<input type='color'/>")[0];e._cachedResult="color"===n.type&&""!==n.value}return e._cachedResult},t.spectrum={},t.spectrum.localization={},t.spectrum.palettes={},t.fn.spectrum.processNativeColorInputs=function(){var e=t("input[type=color]");e.length&&!E()&&e.spectrum({preferredFormat:"hex6"})};var p=/^[\s,#]+/,f=/\s+$/,d=0,h=Math,g=h.round,v=h.min,y=h.max,m=h.random,b=function(t,e){if(e=e||{},(t=t||"")instanceof b)return t;if(!(this instanceof b))return new b(t,e);var n,o,r,i,a,s,l,c,u,m,_,x,O,S,T,P,E,k=(o={r:0,g:0,b:0},r=1,i=!1,a=!1,"string"==typeof(n=t)&&(n=function(t){t=t.replace(p,"").replace(f,"").toLowerCase();var e,n=!1;if(w[t])t=w[t],n=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=C.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=C.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=C.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=C.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=C.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=C.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=C.hex8.exec(t))?{r:Y(e[1]),g:Y(e[2]),b:Y(e[3]),a:Y(e[4])/255,format:n?"name":"hex8"}:(e=C.hex6.exec(t))?{r:Y(e[1]),g:Y(e[2]),b:Y(e[3]),format:n?"name":"hex"}:!!(e=C.hex3.exec(t))&&{r:Y(e[1]+""+e[1]),g:Y(e[2]+""+e[2]),b:Y(e[3]+""+e[3]),format:n?"name":"hex"}}(n)),"object"==typeof n&&(n.hasOwnProperty("r")&&n.hasOwnProperty("g")&&n.hasOwnProperty("b")?(s=n.r,l=n.g,c=n.b,o={r:255*G(s,255),g:255*G(l,255),b:255*G(c,255)},i=!0,a="%"===String(n.r).substr(-1)?"prgb":"rgb"):n.hasOwnProperty("h")&&n.hasOwnProperty("s")&&n.hasOwnProperty("v")?(n.s=X(n.s),n.v=X(n.v),u=n.h,m=n.s,_=n.v,u=6*G(u,360),m=G(m,100),_=G(_,100),x=h.floor(u),O=u-x,S=_*(1-m),T=_*(1-O*m),P=_*(1-(1-O)*m),o={r:255*[_,T,S,S,P,_][E=x%6],g:255*[P,_,_,T,S,S][E],b:255*[S,S,P,_,_,T][E]},i=!0,a="hsv"):n.hasOwnProperty("h")&&n.hasOwnProperty("s")&&n.hasOwnProperty("l")&&(n.s=X(n.s),n.l=X(n.l),o=function(t,e,n){var o,r,i;function a(t,e,n){return(n<0&&(n+=1),n>1&&(n-=1),n<1/6)?t+(e-t)*6*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}if(t=G(t,360),e=G(e,100),n=G(n,100),0===e)o=r=i=n;else{var s=n<.5?n*(1+e):n+e-n*e,l=2*n-s;o=a(l,s,t+1/3),r=a(l,s,t),i=a(l,s,t-1/3)}return{r:255*o,g:255*r,b:255*i}}
1(n.h,n.s,n.l),i=!0,a="hsl"),n.hasOwnProperty("a")&&(r=n.a)),r=q(r),{ok:i,format:n.format||a,r:v(255,y(o.r,0)),g:v(255,y(o.g,0)),b:v(255,y(o.b,0)),a:r});this._originalInput=t,this._r=k.r,this._g=k.g,this._b=k.b,this._a=k.a,this._roundA=g(100*this._a)/100,this._format=e.format||k.format,this._gradientType=e.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=k.ok,this._tc_id=d++};b.prototype={isDark:function(){return 128>this.getBrightness()},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 t=this.toRgb();return(299*t.r+587*t.g+114*t.b)/1e3},getLuminance:function(){var t,e,n,o=this.toRgb();return t=o.r/255,e=o.g/255,.2126*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.0722*((n=o.b/255)<=.03928?n/12.92:Math.pow((n+.055)/1.055,2.4))},setAlpha:function(t){return this._a=q(t),this._roundA=g(100*this._a)/100,this},toHsv:function(){var t=j(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=j(this._r,this._g,this._b),e=g(360*t.h),n=g(100*t.s),o=g(100*t.v);return 1==this._a?"hsv("+e+", "+n+"%, "+o+"%)":"hsva("+e+", "+n+"%, "+o+"%, "+this._roundA+")"},toHsl:function(){var t=k(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=k(this._r,this._g,this._b),e=g(360*t.h),n=g(100*t.s),o=g(100*t.l);return 1==this._a?"hsl("+e+", "+n+"%, "+o+"%)":"hsla("+e+", "+n+"%, "+o+"%, "+this._roundA+")"},toHex:function(t){return A(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(){return M(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*G(this._r,255))+"%",g:g(100*G(this._g,255))+"%",b:g(100*G(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+g(100*G(this._r,255))+"%, "+g(100*G(this._g,255))+"%, "+g(100*G(this._b,255))+"%)":"rgba("+g(100*G(this._r,255))+"%, "+g(100*G(this._g,255))+"%, "+g(100*G(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(_[A(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+M(this._r,this._g,this._b,this._a),n=e,o=this._gradientType?"GradientType = 1, ":"";return t&&(n=b(t).toHex8String()),"progid:DXImageTransform.Microsoft.gradient("+o+"startColorstr="+e+",endColorstr="+n+")"},toString:function(t){var e=!!t;t=t||this._format;var n=!1,o=this._a<1&&this._a>=0;return!e&&o&&("hex"===t||"hex6"===t||"hex3"===t||"name"===t)?"name"===t&&0===this._a?this.toName():this.toRgbString():("rgb"===t&&(n=this.toRgbString()),"prgb"===t&&(n=this.toPercentageRgbString()),("hex"===t||"hex6"===t)&&(n=this.toHexString()),"hex3"===t&&(n=this.toHexString(!0)),"hex8"===t&&(n=this.toHex8String()),"name"===t&&(n=this.toName()),"hsl"===t&&(n=this.toHslString()),"hsv"===t&&(n=this.toHsvString()),n||this.toHexString())},_applyModification:function(t,e){var n=t.apply(null,[this].concat([].slice.call(e)));return this._r=n._r,this._g=n._g,this._b=n._b,this.setAlpha(n._a),this},lighten:function(){return this._applyModification(N,arguments)},brighten:function(){return this._applyModification(R,arguments)},darken:function(){return this._applyModification(V,arguments)},desaturate:function(){return this._applyModification(D,arguments)},saturate:function(){return this._applyModification(L,arguments)},greyscale:function(){return this._applyModification(I,arguments)},spin:function(){return this._applyModification(F,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(W,arguments)},complement:function(){return this._applyCombination(H,arguments)},monochromatic:function(){return this._applyCombination($,arguments)},splitcomplement:function(){return this._applyCombination(z,arguments)},triad:function(){return this._applyCombination(U,arguments)},tetrad:function(){return this._applyCombination(B,arguments)}},b.fromRatio=function(t,e){if("object"==typeof t){var n={};for(var o in t)t.hasOwnProperty(o)&&("a"===o?n[o]=t[o]:n[o]=X(t[o]));t=n}return b(t,e)},b.equals=function(t,e){return!!t&&!!e&&b(t).toRgbString()==b(e).toRgbString()},b.random=function(){return b.fromRatio({r:m(),g:m(),b:m()})},b.mix=function(t,e,n){n=0===n?0:n||50;var o,r=b(t).toRgb(),i=b(e).toRgb(),a=n/100,s=2*a-1,l=i.a-r.a,c=1-(o=((o=s*l==-1?s:(s+l)/(1+s*l))+1)/2),u={r:i.r*o+r.r*c,g:i.g*o+r.g*c,b:i.b*o+r.b*c,a:i.a*a+r.a*(1-a)};return b(u)},b.readability=function(t,e){var n=b(t),o=b(e);return(Math.max(n.getLuminance(),o.getLuminance())+.05)/(Math.min(n.getLuminance(),o.getLuminance())+.05)},b.isReadable=function(t,e,n){var o,r,i,a,s,l=b.readability(t,e);switch(s=!1,(r=((o=(o=n)||{level:"AA",size:"small"}).level||"AA").toUpperCase(),i=(o.size||"small").toLowerCase(),"AA"!==r&&"AAA"!==r&&(r="AA"),"small"!==i&&"large"!==i&&(i="small"),a={level:r,size:i}).level+a.size){case"AAsmall":case"AAAlarge":s=l>=4.5;break;case"AAlarge":s=l>=3;break;case"AAAsmall":s=l>=7}return s},b.mostReadable=function(t,e,n){var o,r,i,a,s=null,l=0;r=(n=n||{}).includeFallbackColors,i=n.level,a=n.size;
vendor: 1,583 bytes, line 1
1for(var c=0;c<e.length;c++)(o=b.readability(t,e[c]))>l&&(l=o,s=b(e[c]));return b.isReadable(t,s,{level:i,size:a})||!r?s:(n.includeFallbackColors=!1,b.mostReadable(t,["#fff","#000"],n))};var w=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:"90ee9
10",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"},_=b.hexNames=function(t){var e={};for(var n in t)t.hasOwnProperty(n)&&(e[t[n]]=n);return e}(w),C=(o="[\\s|\\(]+("+(n="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",r="[\\s|\\(]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")[,|\\s]+("+n+")\\s*\\)?",{rgb:RegExp("rgb"+o),rgba:RegExp("rgba"+r),hsl:RegExp("hsl"+o),hsla:RegExp("hsla"+r),hsv:RegExp("hsv"+o),hsva:RegExp("hsva"
1+r),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,t(function(){t.fn.spectrum.load&&t.fn.spectrum.processNativeColorInputs()})}function x(e,n,o,r){for(var i=[],a=0;a<e.length;a++){var s=e[a];if(s){var c=b(s),u=c.toHsl().l<.5?"sp-thumb-el sp-thumb-dark":"sp-thumb-el sp-thumb-light";u+=b.equals(n,s)?" sp-thumb-active":"";var p=c.toString(r.preferredFormat||"rgb"),f=l?"background-color:"+c.toRgbString():"filter:"+c.toFilter();i.push('<span title="'+p+'" data-color="'+c.toRgbString()+'" class="'+u+'"><span class="sp-thumb-inner" style="'+f+';"></span></span>')}else i.push(t("<div />").append(t('<span data-color="" style="background-color:transparent;" class="sp-clear-display"></span>').attr("title",r.noColorSelectedText)).html())}return"<div class='sp-cf "+o+"'>"+i.join("")+"</div>"}function O(){}function S(t){t.stopPropagation()}function T(t,e){var n=Array.prototype.slice,o=n.call(arguments,2);return function(){return t.apply(e,o.concat(n.call(arguments)))}}function P(e,n,o,r){n=n||function(){},o=o||function(){},r=r||function(){};var i=document,a=!1,l={},c=0,u=0,p="ontouchstart"in window,f={};function d(t){t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),t.returnValue=!1}function h(t){if(a){if(s&&i.documentMode<9&&!t.button)return g();var o=t&&t.touches&&t.touches[0],r=o&&o.pageX||t.pageX,f=o&&o.pageY||t.pageY,h=Math.max(0,Math.min(r-l.left,u)),v=Math.max(0,Math.min(f-l.top,c));p&&d(t),n.apply(e,[h,v,t])}}function g(){a&&(t(i).unbind(f),t(i.body).removeClass("sp-dragging"),setTimeout(function(){r.apply(e,arguments)},0)),a=!1}f.selectstart=d,f.dragstart=d,f["touchmove mousemove"]=h,f["touchend mouseup"]=g,t(e).bind("touchstart mousedown",function(n){(n.which?3==n.which:2==n.button)||a||!1===o.apply(e,arguments)||(a=!0,c=t(e).height(),u=t(e).width(),l=t(e).offset(),t(i).bind(f),t(i.body).addClass("sp-dragging"),h(n),d(n))})}function E(){return t.fn.spectrum.inputTypeColorSupport()}function k(t,e,n){t=G(t,255),e=G(e,255),n=G(n,255);var o,r,i=y(t,e,n),a=v(t,e,n),s=(i+a)/2;if(i==a)o=r=0;else{var l=i-a;switch(r=s>.5?l/(2-i-a):l/(i+a),i){case t:o=(e-n)/l+6*(e<n);break;case e:o=(n-t)/l+2;break;case n:o=(t-e)/l+4}o/=6}return{h:o,s:r,l:s}}function j(t,e,n){t=G(t,255),e=G(e,255),n=G(n,255);var o,r=y(t,e,n),i=v(t,e,n),a=r-i;if(r==i)o=0;else{switch(r){case t:o=(e-n)/a+6*(e<n);break;case e:o=(n-t)/a+2;break;case n:o=(t-e)/a+4}o/=6}return{h:o,s:0===r?0:a/r,v:r}}function A(t,e,n,o){var r=[J(g(t).toString(16)),J(g(e).toString(16)),J(g(n).toString(16))];return o&&r[0].charAt(0)==r[0].charAt(1)&&r[1].charAt(0)==r[1].charAt(1)&&r[2].charAt(0)==r[2].charAt(1)?r[0].charAt(0)+r[1].charAt(0)+r[2].charAt(0):r.join("")}function M(t,e,n,o){return[J(g(t).toString(16)),J(g(e).toString(16)),J(g(n).toString(16)),J(Math.round(255*parseFloat(o)).toString(16))].join("")}function D(t,e){e=0===e?0:e||10;var n=b(t).toHsl();return n.s-=e/100,n.s=K(n.s),b(n)}function L(t,e){e=0===e?0:e||10;var n=b(t).toHsl();return n.s+=e/100,n.s=K(n.s),b(n)}function I(t){return b(t).desaturate(100)}function N(t,e){e=0===e?0:e||10;var n=b(t).toHsl();return n.l+=e/100,n.l=K(n.l),b(n)}function R(t,e){e=0===e?0:e||10;var n=b(t).toRgb();return n.r=y(0,v(255,n.r-g(-(e/100*255)))),n.g=y(0,v(255,n.g-g(-(e/100*255)))),n.b=y(0,v(255,n.b-g(-(e/100*255)))),b(n)}function V(t,e){e=0===e?0:e||10;var n=b(t).toHsl();return n.l-=e/100,n.l=K(n.l),b(n)}function F(t,e){var n=b(t).toHsl(),o=(g(n.h)+e)%360;return n.h=o<0?360+o:o,b(n)}function H(t){var e=b(t).toHsl();return e.h=(e.h+180)%360,b(e)}function U(t){var e=b(t).toHsl(),n=e.h;return[b(t),b({h:(n+120)%360,s:e.s,l:e.l}),b({h:(n+240)%360,s:e.s,l:e.l})]}function B(t){var e=b(t).toHsl(),n=e.h;return[b(t),b({h:(n+90)%360,s:e.s,l:e.l}),b({h:(n+180)%360,s:e.s,l:e.l}),b({h:(n+270)%360,s:e.s,l:e.l})]}function z(t){var e=b(t).toHsl(),n=e.h;return[b(t),b({h:(n+72)%360,s:e.s,l:e.l}),b({h:(n+216)%360,s:e.s,l:e.l})]}function W(t,e,n){e=e||6,n=n||30;var o=b(t).toHsl(),r=360/n,i=[b(t)];for(o.h=(o.h-(r*e>>1)+720)%360;--e;)o.h=(o.h+r)%360,i.push(b(o));return i}function $(t,e){e=e||6;for(var n=b(t).toHsv(),o=n.h,r=n.s,i=n.v,a=[],s=1/e;e--;)a.push(b({h:o,s:r,v:i})),i=(i+s)%1;return a}function q(t){return(isNaN(t=parseFloat(t))||t<0||t>1)&&(t=1),t}function G(t,e){"string"==typeof(n=t)&&-1!=n.indexOf(".")&&1===parseFloat(n)&&(t="100%");var n,o,r="string"==typeof(o=t)&&-1!=o.indexOf("%");return(t=v(e,y(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),1e-6>h.abs(t-e))?1:t%e/parseFloat(e)}function K(t){return v(1,y(0,t))}function Y(t){return parseInt(t,16)}function J(t){return 1==t.length?"0"+t:""+t}function X(t){return t<=1&&(t=100*t+"%"),t}}(tN.default);var s6=function(t){var e="name"===t.getFormat()&&t.toName(),n=1==t.getAlpha()?t.toHexString():t.toRgbString();return e||n.replace(/ /g,"")},s7=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s4(e,t),e.prototype.template=function(){var t=this.ppfx;return'\n <div class="'.concat(this.holderClass(),'"></div>\n <div class="').concat(t,'field-colorp">\n <div class="').concat(t,'field-colorp-c" data-colorp-c>\n <div class="').concat(t,'checker-bg"></div>\n </div>\n </div>\n ')},e.prototype.inputClass=function(){var t=this.ppfx;return"".concat(t,"field ").concat(t,"field-color")},e.prototype.holderClass=function(){return"".concat(this.ppfx,"input-holder")},e.prototype.remove=function(){return t.prototype.remove.call(this),this.colorEl.spectrum("destroy"),this},e.prototype.handleChange=function(t){t.stopPropagation();var e=t.target.value;(0,b.isUndefined)(e)||this.__onInputChange(e)},e.prototype.__onInputChange=function(t){var e=this.model,n=this.opts.onChange,o=t,r=this.getColorEl();if(r){r.spectrum("set",o);var i=r.spectrum("get"),a=o&&s6(i);a&&(o=a)}n?n(o):e.set({value:o},{fromInput:1})},e.prototype.setValue=function(t,e){void 0===e&&(e={});var n=this.model,o=(0,b.isUndefined)(e.def)?n.get("defaults"):e.def,r=(0,b.isUndefined)(t)?(0,b.isUndefined)(o)?"":o:t,i=this.getInputEl(),a=this.getColorEl(),s="none"!=r?r:"";i.value=r,a.get(0).style.backgroundColor=s,(e.fromTarget||e.fromInput&&!e.avoidStore)&&(a.spectrum("set",s
vendor: 5,697 bytes, line 1
1),this.noneColor="none"==r,this.movedColor=s)},e.prototype.getColorEl=function(){var t=this;if(!this.colorEl){var e,n=this.em,o=this.model,r=this.opts,i=this.ppfx,a=r.onChange,s=(0,tN.default)('<div class="'.concat(this.ppfx,'field-color-picker"></div>')),l=s.get(0).style,c=n&&n.getConfig&&n.getConfig().colorPicker||{};this.movedColor="";var u=!1;this.$el.find("[data-colorp-c]").append(s);var p=function(t,e){void 0===e&&(e=!0),a?a(t,!e):(e&&o.setValueFromInput(0,!1),o.setValueFromInput(t,e))};s.spectrum(s9(s9(s9({color:o.getValue()||!1,containerClassName:"".concat(i,"one-bg ").concat(i,"two-color ").concat(i,"editor-sp"),maxSelectionSize:8,showPalette:!0,showAlpha:!0,chooseText:"Ok",cancelText:"⨯",palette:[]},c),o.get("colorPicker")||{}),{move:function(e){var n=s6(e);t.movedColor=n,l.backgroundColor=n,p(n,!1)},change:function(e){u=!0;var n=s6(e);l.backgroundColor=n,p(n),t.noneColor=!1},show:function(n){u=!1,t.movedColor="",e=a?o.getValue({noDefault:!0}):s6(n)},hide:function(){!u&&(e||a)&&(t.noneColor&&(e=""),l.backgroundColor=e,s.spectrum("set",e),p(e,!1))}})),n&&n.on&&this.listenTo(n,pi.selected,function(){t.movedColor&&p(t.movedColor),u=!0,t.movedColor="",s.spectrum("hide")}),this.colorEl=s}return this.colorEl},e.prototype.render=function(){return s5.prototype.render.call(this),this.getColorEl(),this},e}(s5),s8=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lt=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s8(e,t),e.prototype.templateInput=function(){return""},e.prototype.getInputEl=function(){if(!this.input){var t=this.model,e=this.getModelValue(),n=new s7({model:t,target:this.config.em,contClass:this.ppfx+"field-color",ppfx:this.ppfx}).render();n.setValue(e,{fromTarget:1}),this.input=n.el}return this.input},e}(sZ),le=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ln=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return(0,b.bindAll)(n,"moveIncrement","upIncrement"),n.doc=document,n.listenTo(n.model,"change:unit",n.handleModelChange),n}return le(e,t),e.prototype.template=function(){var t=this.ppfx;return'\n <span class="'.concat(t,'input-holder"></span>\n <span class="').concat(t,'field-units"></span>\n <div class="').concat(t,'field-arrows" data-arrows>\n <div class="').concat(t,'field-arrow-u" data-arrow-up></div>\n <div class="').concat(t,'field-arrow-d" data-arrow-down></div>\n </div>\n ')},e.prototype.inputClass=function(){var t=this.ppfx;return this.opts.contClass||"".concat(t,"field ").concat(t,"field-integer")},e.prototype.setValue=function(t,e){var n=e||{},o=this.validateInputValue(t,{deepCheck:1}),r={value:o.value,unit:""};(o.unit||o.force)&&(r.unit=o.unit),this.model.set(r,n),n.silent&&this.handleModelChange()},e.prototype.handleChange=function(t){t.stopPropagation(),this.setValue(this.getInputEl().value),this.elementUpdated()},e.prototype.handleUnitChange=function(t){t.stopPropagation();var e=this.getUnitEl().value;this.model.set("unit",e),this.elementUpdated()},e.prototype.handleKeyDown=function(t){"ArrowUp"===t.key&&(t.preventDefault(),this.upArrowClick()),"ArrowDown"===t.key&&(t.preventDefault(),this.downArrowClick())},e.prototype.elementUpdated=function(){this.model.trigger("el:change")},e.prototype.handleModelChange=function(){var t=this.model;this.getInputEl().value=t.get("value");var e=this.getUnitEl();e&&(e.value=t.get("unit")||"")},e.prototype.getUnitEl=function(){if(!this.unitEl){var t=this.model,e=t.get("units")||[];if(e.length){var n=['<option value="" disabled hidden>-</option>'];e.forEach(function(e){var o=e==t.get("unit")?"selected":"";n.push("<option ".concat(o,">").concat(e,"</option>"))});var o=document.createElement("div");o.innerHTML='<select class="'.concat(this.ppfx,'input-unit">').concat(n.join(""),"</select>"),this.unitEl=o.firstChild}}return this.unitEl},e.prototype.upArrowClick=function(){var t=this.model.get("step"),e=parseFloat(this.getInputEl().value);this.setValue(this.normalizeValue(e+t)),this.elementUpdated()},e.prototype.downArrowClick=function(){var t=this.model.get("step"),e=parseFloat(this.getInputEl().value);this.setValue(this.normalizeValue(e-t)),this.elementUpdated()},e.prototype.downIncrement=function(t){t.preventDefault(),this.moved=!1;var e=this.model.get("value")||0;e=this.normalizeValue(e),this.current={y:t.pageY,val:e},U(this.doc,"mousemove",this.moveIncrement),U(this.doc,"mouseup",this.upIncrement)},e.prototype.moveIncrement=function(t){this.moved=!0;var e=this.model,n=e.get("step"),o=this.current,r=this.normalizeValue(o.val+(o.y-t.pageY)*n),i=this.validateInputValue(r),a=i.value,s=i.unit;return this.prValue=a,e.set({value:a,unit:s},{avoidStore:1}),!1},e.prototype.upIncrement=function(){var t=this.model,e=t.get("step");if(B(this.doc,"mouseup",this.upIncrement),B(this.doc,"mousemove",this.moveIncrement),this.pr
1Value&&this.moved){var n=this.prValue-e;t.set("value",n,{avoidStore:1}).set("value",n+e),this.elementUpdated()}},e.prototype.normalizeValue=function(t,e){void 0===e&&(e=0);var n=this.model.get("step"),o=0;if(isNaN(t))return e;if(Math.floor(t=parseFloat(t))!==t){var r=n.toString().split(".")[1];o=r?r.length:0}return o?parseFloat(t.toFixed(o)):t},e.prototype.validateInputValue=function(t,e){void 0===e&&(e={});var n=0,o=e||{},r=this.model,i=(0,b.isUndefined)(t)?"":t,a=e.units||r.get("units")||[],s=r.get("unit")||a.length&&a[0]||"",l=(0,b.isUndefined)(e.max)?r.get("max"):e.max,c=(0,b.isUndefined)(e.min)?r.get("min"):e.min,u=!!r.get("limitlessMax"),p=!!r.get("limitlessMin");if(o.deepCheck){var f=r.get("fixedValues")||[];if(""===i&&(s=""),i){var d=RegExp("^"+f.join("|"),"g");if(f.length&&d.test(i))i=i.match(d)[0],s="",n=1;else{var h=i+"";i+="",i=isNaN(i=parseFloat(i.replace(",",".")))?"":i;var g=h.replace(i,"");(0,b.indexOf)(a,g)>=0&&(s=g)}}}return!isNaN(i)&&""!==i&&(u||(0,b.isUndefined)(l)||""===l||(i=i>l?l:i),p||(0,b.isUndefined)(c)||""===c||(i=i<c?c:i)),{force:n,value:i,unit:s}},e.prototype.render=function(){s5.prototype.render.call(this),this.unitEl=null;var t=this.getUnitEl();return t&&this.$el.find(".".concat(this.ppfx,"field-units")).get(0).appendChild(t),this},e}(s5);ln.prototype.events={"change input":"handleChange","change select":"handleUnitChange","click [data-arrow-up]":"upArrowClick","click [data-arrow-down]":"downArrowClick","mousedown [data-arrows]":"downIncrement",keydown:"handleKeyDown"};var lo=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lr=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lo(e,t),e.prototype.getValueForTarget=function(){var t=this.model,e=t.attributes,n=e.value,o=e.unit;return(0,b.isUndefined)(n)||""===n?t.get("default"):n+o},e.prototype.getInputEl=function(){if(!this.input){var t=this.ppfx,e=this.model,n=this.getModelValue(),o=new ln({contClass:"".concat(t,"field-int"),type:"number",model:e,ppfx:t});o.render(),this.$input=o.inputEl,this.$unit=o.unitEl,e.set("value",n,{fromTarget:!0}),this.$input.val(n),this.input=o.el}return this.input},e}(sZ),li=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),la=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;return n.listenTo(n.model,"change:options",n.rerender),n}return li(e,t),e.prototype.templateInput=function(){var t=this.ppfx,e=this.clsField;return'<div class="'.concat(e,'">\n <div data-input></div>\n <div class="').concat(t,'sel-arrow">\n <div class="').concat(t,'d-s-arrow"></div>\n </div>\n </div>')},e.prototype.getInputEl=function(){if(!this.$input){var t=this.model,e=this.em,n=t.get("name"),o=t.get("options")||[],r=[],i="<select>";o.forEach(function(t){var o,a,s,l="";(0,b.isString)(t)?(o=t,a=t):(o=t.name||t.label||t.value,a="".concat((0,b.isUndefined)(t.value)?t.id:t.value).replace(/"/g,"""),l+=(s=t.style?t.style.replace(/"/g,"""):"")?' style="'.concat(s,'"'):"");var c=e.t("traitManager.traits.options.".concat(n,".").concat(a))||o;i+='<option value="'.concat(a,'"').concat(l,">").concat(c,"</option>"),r.push(a)}),i+="</select>",this.$input=(0,tN.default)(i);var a=t.getTargetValue(),s=r.indexOf(a)>=0?a:t.get("default");(0,b.isUndefined)(s)||this.$input.val(s)}return this.$input.get(0)},e}(sZ),ls=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
vendor: 4,755 bytes, line 1
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ll=function(t){function e(e,n,o){void 0===e&&(e={}),void 0===o&&(o=!1);var r=t.call(this,e)||this;return r.itemsView="",r.itemType="type",r.reuseView=!1,r.config=n||e.config||{},o&&r.listenTo(r.collection,"add",r.addTo),r.items=[],r}return ls(e,t),e.prototype.addTo=function(t){this.add(t)},e.prototype.itemViewNotFound=function(t){var e=this.config,n=this.ns,o=e.em,r="".concat(n?"[".concat(n,"]: "):"","'").concat(t,"' type not found");o&&o.logWarning(r)},e.prototype.add=function(t,e){var n,o=this.config,r=this.reuseView,i=this.items,a=this.itemsView||{},s=e||null,l=this.itemView,c=t.get(this.itemType);a[c]?l=a[c]:!c||a[c]||(0,b.includes)(["button","checkbox","color","date","datetime-local","email","file","hidden","image","month","number","password","radio","range","reset","search","submit","tel","text","time","url","week"],c)||this.itemViewNotFound(c),n=t.view&&r?t.view:new l({model:t,config:o},o),i&&i.push(n);var u=n.render().el;s?s.appendChild(u):this.$el.append(u)},e.prototype.render=function(){var t=document.createDocumentFragment();return this.clearItems(),this.$el.empty(),this.collection.length&&this.collection.each(function(e){this.add(e,t)},this),this.$el.append(t),this.onRender(),this},e.prototype.onRender=function(){},e.prototype.onRemoveBefore=function(t,e){},e.prototype.onRemove=function(t,e){},e.prototype.remove=function(e){void 0===e&&(e={});var n=this.items;return this.onRemoveBefore(n,e),this.clearItems(),t.prototype.remove.call(this),this.onRemove(n,e),this},e.prototype.clearItems=function(){this.items},e}(tB);ll.prototype.itemView="";var lc=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lu="data-categories",lp="data-no-categories",lf=function(t){function e(e,n){var o=t.call(this,e)||this;o.reuseView=!0,o.renderedCategories=new Map,o.itemsView=n;var r=e.config||{};o.config=r;var i=e.editor;o.em=i;var a=r.pStylePrefix||"";return o.ppfx=a,o.pfx=a+r.stylePrefix||"",o.className="".concat(o.pfx,"traits"),o.traitContClass="".concat(a,"traits-c"),o.classNoCat="".concat(a,"traits-empty-c"),o.catsClass="".concat(a,"trait-categories"),o.collection=new n6([],{em:i}),o.listenTo(i,pi.toggled,o.updatedCollection),o.updatedCollection(),o}return lc(e,t),e.prototype.updatedCollection=function(){var t=this.ppfx,e=this.em,n=e.getSelected();this.el.className="".concat(this.traitContClass,"s ").concat(t,"one-bg ").concat(t,"two-color"),this.collection=(null==n?void 0:n.traits)||new n6([],{em:e}),this.render()},e.prototype.add=function(t,e){var n=this.config,o=this.renderedCategories,r=this.itemView,i=t.get(this.itemType);this.itemsView&&this.itemsView[i]&&(r=this.itemsView[i]);var a=new r({config:n,model:t,attributes:t.get("attributes")}).render().el,s=t.parent.initCategory(t);if(s){var l=s.getId(),c=this.getCategoriesEl(),u=o.get(l);!u&&c&&(u=new aG({model:s},n,"trait").render(),o.set(l,u),c.appendChild(u.el)),null==u||u.append(a);return}e?e.appendChild(a):this.append(a)},e.prototype.getCategoriesEl=function(){return this.catsEl||(this.catsEl=this.el.querySelector("[".concat(lu,"]"))),this.catsEl},e.prototype.getTraitsEl=function(){return this.traitsEl||(this.traitsEl=this.el.querySelector("[".concat(lp,"]"))),this.traitsEl},e.prototype.append=function(t){var e=this.getTraitsEl();null==e||e.appendChild(t)},e.prototype.render=function(){var t=this,e=this.el,n=this.ppfx,o=this.catsClass,r=this.traitContClass,i=this.classNoCat,a=document.createDocumentFragment();delete this.catsEl,delete this.traitsEl,this.renderedCategories=new Map,e.innerHTML='\n <div class="'.concat(o,'" ').concat(lu,'></div>\n <div class="').concat(i," ").concat(r,'" ').concat(lp,"></div>\n "),this.collection.forEach(function(e){return t.add(e,a)}),this.append(a);var s="".concat(r,"s ").concat(n,"one-bg ").concat(n,"two-color");return this.$el.addClass(s),this.rendered=!0,this},e}(ll);lf.prototype.itemView=sZ;var ld=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lh=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},lg=function(t){function e(e){var n=t.call(this,e,"TraitManager",{stylePrefix:"trt-",appendTo:"",optionsTarget:[{value:!1},{value:"_blank"}],custom:!1})||this;n.TraitsView=lf,n.events=pm,n.state=new tH({traits:[]}),n.types={text:sZ,number:lr,select:la,checkbox:s2,color:lt,button:s0};var o=n.state,r=n.config,i=n.events,a=r.pStylePrefix;a&&(r.stylePrefix="".concat(a).concat(r.stylePrefix)),(0,b.bindAll)(n,"__onSelect");var s=(0,b.debounce)(function(){return n.__upSel()},0),l=(0,b.debounce)(function(){return n.__onUp()},0);return o.listenTo(e,pi.toggled,s),o.listenTo(e,i.value,l),o.on("change:traits",n.__onSelect),n.debounced=[s,l],n}return ld(e,t),e.prototype.select=function(t){var e=(null==t?void 0:t.getTraits())||[];this.state.set({component:t,traits:e}),this.__trgCustom()},e.prototype.getCategories=function(){var t,e=this.getComponent();return lh([],(null==(t=null==e?void 0:e.traits.categories)?void 0:t.models)||[],!0)},e.prototype.getTraits=function(){return this.getCurrent()},e.prototype.getTraitsByCategory=function(t){return nY(t||this.getTraits())},e.prototype.getComponent=function(){return this.state.attributes.component},e.prototype.addType=function(t,e){var n=this.getType("text");this.types[t]=n.extend(e)},e.prototype.removeType=function(t){var e=this.getType(t);if(e)return delete this.types[t],e},e.prototype.getType=function(t){return this.getTypes()[t]},e.prototype.getTypes=function(){return this.types},e.prototype.getTraitsViewer=function(){return this.view},e.prototype.getCurrent=function(){return this.state.get("traits")||[]},e.prototype.render=function(){var t=this.view,e=this.em;return t=new lf({el:null==t?void 0:t.el,collection:[],editor:e,config:this.getConfig()},this.getTypes()),this.view=t,t.el},e.prototype.postRender=function(){this.__appendTo()},e.prototype.__onSelect=function(){var t=this.em,e=this.events,n=this.state.attributes,o=n.component,r=n.traits;t.trigger(e.select,{component:o,traits:r})},e.prototype.__trgCustom=function(t){void 0===t&&(t={});var e=this.em,n=this.events,o=this.__ctn;this.__ctn=o||t.container,e.trigger(n.custom,this.__customData())},e.prototype.__customData=function(){return{container:this.__ctn}},e.prototype.__upSel=function(){this.select(this.em.getSelected())},e.prototype.__onUp=function(){this.select(this.getComponent())},e}(tJ);!function(t){t.root="layer:root",t.component="layer:component",t.custom="layer:custom",t.render="layer:render"}(pD||(pD={}));var lv=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ly=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e._dropAreaConfig={ratio:.4,minUndroppableDimension:3,maxUndroppableDimension:20},e}return lv(e,t),Object.defineProperty(e.prototype,"view",{get:function(){return this.model.viewLayer},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){var t;return null==(t=this.model.viewLayer)?void 0:t.el},enumerable:!1,configurable:!0}),e}(oE),lm=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lb=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.items=[],n.opt=e;var o=e.config||{};n.config=o,n.module=e.module,n.parentView=e.parentView;var r=o.stylePrefix||"";o.pStylePrefix;var i=n.collection;n.listenTo(i,"add",n.addTo),n.listenTo(i,"reset resetNavigator",n.render),n.listenTo(i,"remove",n.removeChildren),n.className="".concat(r,"layers");var a=o.em;if(o.sortable&&!n.opt.sorter){var s=a.Utils,l=o.sortContainer||n.el,c=n.createPlaceholder(r);n.opt.sorter=new s.ComponentSorter({em:a,treeClass:ly,containerContext:{container:l,containerSel:".".concat(n.className),itemSel:".".concat(r,"layer"),pfx:o.pStylePrefix,document:document,placeholderElement:c},dragBehavior:{dragDirection:pb.Vertical,nested:!0}})}return n.$el.data("collection",i),e.parent&&n.$el.data("model",e.parent),n}return lm(e,t),e.prototype.createPlaceholder=function(t){var e=document.createElement("div"),n=document.createElement("div");return this.el.parentNode,e.className=t+"placeholder",e.style.display="none",e.style.pointerEvents="none",n.className=t+"placeholder-int",e.appendChild(n),e},e.prototype.removeChildren=function(t){var e=t.viewLayer;e&&(e.remove(),delete t.viewLayer)},e.prototype.addTo=function(t){this.addToCollection(t,null,this.collection.indexOf(t))},e.prototype.addToCollection=function(t,e,n){var o=this.parentView,r=this.opt,i=this.config,a=this.el,s=r.ItemView,l=r.opened,c=r.module,u=r.level,p=r.sorter,f=t.viewLayer||new s({ItemView:s,level:u,model:t,parentView:o,config:i,sorter:p,opened:l,module:c}),d=f.render().el;if(e)e.appendChild(d);else{var h=a.childNodes;if((0,b.isUndefined)(n))a.appendChild(d);else{var g=h.length==n;g&&n--,g||!h.length?a.appendChild(d):a.insertBefore(d,h[n])}}return this.items.push(f),d},e.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tB.prototype.remove.apply(this,t),this.items.map(function(t){return t.remove()}),this},e.prototype.render=function(){var t=this,e=this.el,n=this.module,o=document.createDocumentFragment();return e.innerHTML="",this.collection.map(function(t){return n.__getLayerFromComponent(t)}
1).forEach(function(e){return t.addToCollection(e,o)}),e.appendChild(o),e.className=this.className,this},e}(tB);!function(t){t.run="command:run",t.runCommand="command:run:",t.runBeforeCommand="command:run:before:",t.abort="command:abort:",t.stop="command:stop",t.stopCommand="command:stop:",t.stopBeforeCommand="command:stop:before:",t.call="command:call",t.callCommand="command:call:"}(pL||(pL={}));let lw=pL;var l_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lC=function(){return(lC=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},lx=function(t){function e(e){var n=t.call(this,0)||this;n.config=e||{},n.em=n.config.em||{};var o=n.config.stylePrefix;return n.pfx=o,n.ppfx=n.config.pStylePrefix,n.hoverClass="".concat(o,"hover"),n.badgeClass="".concat(o,"badge"),n.plhClass="".concat(o,"placeholder"),n.freezClass="".concat(n.ppfx,"freezed"),n.canvas=n.em.Canvas,n.init(n.config),n}return l_(e,t),e.prototype.onFrameScroll=function(t){},e.prototype.getCanvas=function(){return this.canvas.getElement()},e.prototype.getCanvasBody=function(){return this.canvas.getBody()},e.prototype.getCanvasTools=function(){return this.canvas.getToolsEl()},e.prototype.offset=function(t){var e=t.getBoundingClientRect();return{top:e.top+t.ownerDocument.body.scrollTop,left:e.left+t.ownerDocument.body.scrollLeft}},e.prototype.init=function(t){},e.prototype.callRun=function(t,e){void 0===e&&(e={});var n=this.id,o=e;if(t.trigger("".concat(lw.runBeforeCommand).concat(n),{options:o}),o.abort)return void t.trigger("".concat(lw.abort).concat(n),{options:o});var r=o.sender||t,i=this.run(t,r,o),a={id:n,result:i,options:o},s=lC(lC({},a),{type:"run"});return this.noStop||(t.Commands.active[n]=i),t.trigger("".concat(lw.runCommand).concat(n),a),t.trigger("".concat(lw.callCommand).concat(n),s),t.trigger(lw.run,a),t.trigger(lw.call,s),i},e.prototype.callStop=function(t,e){void 0===e&&(e={});var n=this.id,o=e,r=o.sender||t;t.trigger("".concat(lw.stopBeforeCommand).concat(n),{options:o});var i=this.stop(t,r,o),a={id:n,result:i,options:o},s=lC(lC({},a),{type:"stop"});return delete t.Commands.active[n],t.trigger("".concat(lw.stopCommand).concat(n),a),t.trigger("".concat(lw.callCommand).concat(n),s),t.trigger(lw.stop,a),t.trigger(lw.call,s),i},e.prototype.stopCommand=function(t){var e,n,o;null==(o=null==(n=null==(e=this.em)?void 0:e.Commands)?void 0:n.stop)||o.call(n,this.id,t)},e.prototype.run=function(t,e,n){},e.prototype.stop=function(t,e,n){},e}(tH),lO=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lO(e,t),e.prototype.run=function(t){t.Components.clear(),t.Css.clear()},e}(lx),lT=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lP=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lT(e,t),e.prototype.run=function(t){(0,b.bindAll)(this,"onKeyUp","enableDragger","disableDragger"),this.editor=t,this.canvasModel=this.canvas.getCanvasView().model,this.toggleMove(!0)},e.prototype.stop=function(){this.toggleMove(),this.disableDragger(new MouseEvent("mouseup"))},e.prototype.onKeyUp=function(t){" "===N(t)&&this.editor.stopCommand(this.id)},e.prototype.enableDragger=function(t){this.toggleDragger(!0,t)},e.prototype.disableDragger=function(t){this.toggleDragger(!1,t)},e.prototype.toggleDragger=function(t,e){var n=this.canvasModel,o=this.em,r=this.dragger;this.getCanvas().classList[t?"add":"remove"]("".concat(this.ppfx,"is__grabbing")),r||(r=new oB({getPosition:function(){return{x:n.get("x"),y:n.get("y")}},setPosition:function(t){var e=t.x,o=t.y;n.set({x:e,y:o})},onStart:function(t,e){o.trigger(pn.moveStart,e)},onDrag:function(t,e){o.trigger(pn.move,e)},onEnd:function(t,e){o.trigger(pn.moveEnd,e)}}),this.dragger=r),t?r.start(e):r.stop(e)},e.prototype.toggleMove=function(t){void 0===t&&(t=!1);var e=this.ppfx,n=t?"add":"remove",o=t?"on":"off",r={on:U,off:B},i=this.getCanvas(),a=["".concat(e,"is__grab")];t||a.push("".concat(e,"is__grabbing")),a.forEach(function(t){return i.classList[n](t)}),r[o](document,"keyup",this.onKeyUp),r[o](i,"mousedown",this.enableDragger),r[o](document,"mouseup",this.disableDragger)},e}(lx),lE=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lk=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},lj=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lE(e,t),e.prototype.run=function(t,e,n){var o=this;void 0===n&&(n={});var r=[],i=n.component||t.getSelectedAll();return(i=(0,b.isArray)(i)?lk([],i,!0):[i]).filter(Boolean).forEach(function(t){var e,n;if(!t.get("removable"))return o.em.logWarning("The element is not removable",{component:t});r.push(t),((null==(n=null==(e=t.delegate)?void 0:e.remove)?void 0:n.call(e,t))||t).remove()}),t.selectRemove(r),r},e}(lx),lA=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lM=function(){return(lM=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},lD="dmode",lL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lA(e,t),e.prototype.run=function(t,e,n){var o,r,i=this;if(void 0===n&&(n={}),(0,b.bindAll)(this,"setPosition","onStart","onDrag","onEnd","getPosition","getGuidesStatic","renderGuide","getGuidesTarget"),!n.target)throw Error("Target option is required");var a=lM({doc:null==(o=n.target.getEl())?void 0:o.ownerDocument,onStart:this.onStart,onEnd:this.onEnd,onDrag:this.onDrag,getPosition:this.getPosition,setPosition:this.setPosition,guidesStatic:function(){var t;return null!=(t=i.guidesStatic)?t:[]},guidesTarget:function(){var t;return null!=(t=i.guidesTarget)?t:[]}},null!=(r=n.dragger)?r:{});this.setupGuides(),this.opts=n,this.editor=t,this.em=t.getModel(),this.target=n.target,this.isTran="translate"==n.mode,this.guidesContainer=this.getGuidesContainer(),this.guidesTarget=this.getGuidesTarget(),this.guidesStatic=this.getGuidesStatic();var s=this.dragger;return s?s.setOptions(a):(s=new oB(a),this.dragger=s),n.event&&s.start(n.event),this.toggleDrag(!0),this.em.trigger("".concat(lD,":start"),this.getEventOpts()),s},e.prototype.getEventOpts=function(){var t,e,n,o,r=null!=(e=null==(t=this.guidesTarget)?void 0:t.filter(function(t){return t.active}))?e:[];return{mode:this.opts.mode,component:this.target,target:this.target,guidesTarget:null!=(n=this.guidesTarget)?n:[],guidesStatic:null!=(o=this.guidesStatic)?o:[],guidesMatched:this.getGuidesMatched(r),command:this}},e.prototype.stop=function(){this.toggleDrag()},e.prototype.setupGuides=function(){var t;(null!=(t=this.guides)?t:[]).forEach(function(t){var e,n=t.guide;null==(e=null==n?void 0:n.parentNode)||e.removeChild(n)}),this.guides=[]},e.prototype.getGuidesContainer=function(){var t,e,n,o,r=this,i=this.guidesEl;if(!i){var a=this.editor,s=this.em,l=this.opts,c=null!=(t=a.getConfig().stylePrefix)?t:"",u=document.createElement("div"),p=document.createElement("div"),f='<div class="'.concat(c,"guide-info__line ").concat(c,'danger-bg">\n <div class="').concat(c,"guide-info__content ").concat(c,'danger-color"></div>\n </div>');(i=document.createElement("div")).className="".concat(c,"guides"),u.className="".concat(c,"guide-info ").concat(c,"guide-info__x"),p.className="".concat(c,"guide-info ").concat(c,"guide-info__y"),u.innerHTML=f,p.innerHTML=f,i.appendChild(u),i.appendChild(p),null==(e=a.Canvas.getGlobalToolsEl())||e.appendChild(i),this.guidesEl=i,this.elGuideInfoX=u,this.elGuideInfoY=p,this.elGuideInfoContentX=null!=(n=u.querySelector(".".concat(c,"guide-info__content")))?n:void 0,this.elGuideInfoContentY=null!=(o=p.querySelector(".".concat(c,"guide-info__content")))?o:void 0,s.on("".concat(pn.update," frame:scroll"),(0,b.debounce)(function(){var t;r.updateGuides(),l.debug&&(null==(t=r.guides)||t.forEach(function(t){return r.renderGuide(t)}))},200))}return i},e.prototype.getGuidesStatic=function(){var t=this,e=[],n=this.target.getEl(),o=null==n?void 0:n.parentElement;return o?((0,b.each)(o.children,function(o){return e=e.concat(n!==o?t.getElementGuides(o):[])}),e.concat(this.getElementGuides(o))):[]},e.prototype.getGuidesTarget=function(){return this.getElementGuides(this.target.getEl())},e.prototype.updateGuides=function(t){var e,n,o,r=this;
1(null!=(e=null!=t?t:this.guides)?e:[]).forEach(function(t){var e=t.origin,i=n===e?o:r.getElementPos(e);n=e,o=i,(0,b.each)(r.getGuidePosUpdate(t,i),function(e,n){t[n]=e}),t.originRect=i})},e.prototype.getGuidePosUpdate=function(t,e){var n={},o=e.top,r=e.height,i=e.left,a=e.width;switch(t.type){case"t":n.y=o;break;case"b":n.y=o+r;break;case"l":n.x=i;break;case"r":n.x=i+a;break;case"x":n.x=i+a/2;break;case"y":n.y=o+r/2}return n},e.prototype.renderGuide=function(t){if(!this.opts.skipGuidesRender){var e,n,o=null!=(e=t.guide)?e:document.createElement("div"),r=t.active?2:1;if(o.style.cssText="position: absolute; background-color: ".concat(t.active?"green":"red",";"),!o.children.length){var i=document.createElement("div");i.style.cssText="position: absolute; color: red; padding: 5px; top: 0; left: 0;",o.appendChild(i)}return t.y?(o.style.width="100%",o.style.height="".concat(r).concat("px"),o.style.top="".concat(t.y).concat("px"),o.style.left="0"):(o.style.width="".concat(r).concat("px"),o.style.height="100%",o.style.left="".concat(t.x).concat("px"),o.style.top="0".concat("px")),t.guide||null==(n=this.guidesContainer)||n.appendChild(o),o}},e.prototype.getElementPos=function(t){return this.editor.Canvas.getElementPos(t,{noScroll:1})},e.prototype.getElementGuides=function(t){var e=this,n=this.opts,o=this.getElementPos(t),r=tk(t),i=tE(t),a=o.top,s=o.height,l=o.left,c=o.width,u=[{type:"t",y:a},{type:"b",y:a+s},{type:"l",x:l},{type:"r",x:l+c},{type:"x",x:l+c/2},{type:"y",y:a+s/2}].map(function(a){var s=n.debug?e.renderGuide(a):void 0;return lM(lM({},a),{component:r,componentView:i,componentEl:t,origin:t,componentElRect:o,originRect:o,guideEl:s,guide:s})});return u.forEach(function(t){var n;return null==(n=e.guides)?void 0:n.push(t)}),u},e.prototype.getTranslate=function(t,e){void 0===e&&(e="x");var n=0;return(t||"").split(" ").forEach(function(t){var o=t.trim(),r="translate".concat(e.toUpperCase(),"(");0===o.indexOf(r)&&(n=parseFloat(o.replace(r,"")))}),n},e.prototype.setTranslate=function(t,e,n){var o="translate".concat(e.toUpperCase(),"("),r="".concat(o).concat(n,")"),i=(t||"").split(" ").map(function(t){return 0===t.trim().indexOf(o)&&(t=r),t}).join(" ");return 0>i.indexOf(o)&&(i+=" ".concat(r)),i},e.prototype.getPosition=function(){var t=this.target,e=this.isTran,n=t.getStyle(),o=n.transform,r=n.left,i=n.top,a=0,s=0;return e&&o?(a=this.getTranslate(o),s=this.getTranslate(o,"y")):(a=parseFloat(null!=r?r:"0"),s=parseFloat(null!=i?i:"0")),{x:a,y:s}},e.prototype.setPosition=function(t){var e,n,o=t.x,r=t.y,i=t.end,a=t.position,s=t.width,l=t.height,c=this.target,u=this.isTran,p=this.em,f=this.opts,d=!i,h="".concat(parseInt("".concat(o),10)).concat("px"),g="".concat(parseInt("".concat(r),10)).concat("px"),v={};
1if(u){var y=null!=(n=null==(e=c.getStyle())?void 0:e.transform)?n:"";y=this.setTranslate(y,"x",h),v={transform:y=this.setTranslate(y,"y",g),__p:d}}else{var m={position:a,width:s,height:l},w={left:h,top:g,__p:d};(0,b.keys)(m).forEach(function(t){var e=m[t];e&&(w[t]=e)}),v=w}f.addStyle?f.addStyle({component:c,styles:v,partial:!i}):c.addStyle(v,{avoidStore:!i}),p.Styles.__emitCmpStyleUpdate(v,{components:p.getSelected()})},e.prototype._getDragData=function(){var t=this.target;return{target:t,parent:t.parent(),index:t.index()}},e.prototype.onStart=function(t){var e,n=this.target,o=this.editor,r=this.isTran,i=this.opts,a=o.Canvas,s=n.getStyle(),l="absolute",c=[l,"relative"];if(null==(e=i.onStart)||e.call(i,this._getDragData()),!r){if(s.position!==l){var u=a.offset(n.getEl()),p=u.left,f=u.top,d=u.width,h=u.height,g=n.parent(),v=null;do{var y=null==g?void 0:g.getStyle(),m=null==y?void 0:y.position;m&&(v=c.indexOf(m)>=0?g:null),g=null==g?void 0:g.parent()}while(g&&!v);if(i.center){var b=a.getMouseRelativeCanvas(t),w=b.x,_=b.y;p=w,f=_}else if(v){var C=a.offset(v.getEl());p-=C.left,f-=C.top}this.setPosition({x:p,y:f,width:"".concat(d,"px"),height:"".concat(h,"px"),position:l})}this.guidesStatic=this.getGuidesStatic()}},e.prototype.onDrag=function(t){var e,n,o=this,r=this.guidesTarget,i=this.opts;this.updateGuides(r),i.debug&&(null==r||r.forEach(function(t){return o.renderGuide(t)})),i.guidesInfo&&this.renderGuideInfo(null!=(e=null==r?void 0:r.filter(function(t){return t.active}))?e:[]),null==(n=i.onDrag)||n.call(i,this._getDragData()),this.opts.event=t,this.em.trigger("".concat(lD,":move"),this.getEventOpts())},e.prototype.onEnd=function(t,e,n){var o,r=this.editor,i=this.opts,a=this.id;null==(o=i.onEnd)||o.call(i,t,n,lM(lM({event:t},n),this._getDragData())),r.stopCommand("".concat(a)),this.hideGuidesInfo(),this.em.trigger("".concat(lD,":end"),this.getEventOpts())},e.prototype.hideGuidesInfo=function(){var t=this;["X","Y"].forEach(function(e){var n=t["elGuideInfo".concat(e)];n&&(n.style.display="none")})},e.prototype.renderGuideInfo=function(t){var e=this;void 0===t&&(t=[]),this.hideGuidesInfo(),this.getGuidesMatched(t).forEach(function(t){e.opts.skipGuidesRender||e.renderSingleGuideInfo(t),e.em.trigger("".concat(lD,":active"),lM(lM({},e.getEventOpts()),t))})},e.prototype.renderSingleGuideInfo=function(t){var e=t.posFirst,n=t.posSecond,o=t.size,r=t.sizeRaw,i=t.guide,a=t.elGuideInfo,s=t.elGuideInfoCnt,l="y"==((0,b.isUndefined)(i.x)?"y":"x"),c=a.style;c.display="",c[l?"top":"left"]="".concat(e,"px"),c[l?"left":"top"]="".concat(n,"px"),c[l?"width":"height"]="".concat(o,"px"),s.innerHTML="".concat(Math.round(r),"px")},e.prototype.getGuidesMatched=function(t){var e=this;void 0===t&&(t=[]);var n=this.guidesStatic,o=void 0===n?[]:n;return t.map(function(t){var n=t.origin,r=t.x,i=e.getElementPos(n),a=(0,b.isUndefined)(r)?"y":"x",s="y"===a,l=i[s?"left":"top"],c=i.rect[s?"left":"top"],u=s?l+i.width:l+i.height,p=s?c+i.rect.width:c+i.rect.height,f=o.filter(function(e){var n;return e.type===t.type||(null==(n=({l:["r","x"],r:["l","x"],x:["l","r"],t:["b","y"],b:["t","y"],y:["t","b"]})[t.type])?void 0:n.includes(e.type))}).map(function(t){var e=t.originRect,n=e.left,o=e.width,r=e.top,i=e.height,a=s?n+o:r+i;return{gap:a<l?l-a:(s?n:r)-u,guide:t}}).filter(function(t){return t.gap>0}).sort(function(t,e){return t.gap-e.gap}).map(function(t){return t.guide}).filter(function(e){switch(t.type){case"l":case"r":case"x":return 1>Math.abs(e.x-t.x);case"t":case"b":case"y":return 1>Math.abs(e.y-t.y);default:return!1}})[0];if(!f)return null;var d=f.originRect,h=d.left,g=d.width,v=d.top,y=d.height,m=d.rect,w=s?h<i.left:v<i.top,_=s?m.left:m.top,C=s?h+g:v+y,x=s?m.left+m.width:m.top+m.height,O=s?t.y:t.x;return{guide:t,guidesStatic:o,matched:f,posFirst:O,posSecond:w?C:u,size:w?l-C:(s?h:v)-u,sizeRaw:w?c-x:_-p,elGuideInfo:e["elGuideInfo".concat(a.toUpperCase())],elGuideInfoCnt:e["elGuideInfoContent".concat(a.toUpperCase())]}}).filter(Boolean)},e.prototype.toggleDrag=function(t){var e=this.ppfx,n=this.editor,o=t?"add":"remove",r=n.Canvas,i=r.getBody();
1["".concat(e,"is__grabbing")].forEach(function(t){return i.classList[o](t)}),r[t?"startAutoscroll":"stopAutoscroll"]()},e}(lx),lI=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lN=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lI(e,t),e.prototype.run=function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.components(),o=n&&n.filter(function(t){return!!t.get("selectable")})[0];o&&e.push(o)}),e.length&&t.select(e)}},e}(lx),lR=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lV=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lR(e,t),e.prototype.run=function(t,e,n){if(void 0===n&&(n={}),t.Canvas.hasFocus()||n.force){var o=[];t.getSelectedAll().forEach(function(t){for(var e=t.parent();e&&!e.get("selectable");)e=e.parent();e&&o.push(e)}),o.length&&t.select(o)}},e}(lx),lF=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lH=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lF(e,t),e.prototype.run=function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();if(n){var o=n.components().length,r=0,i=0,a=null;do r++,a=(i=t.index()+r)<=o?n.getChildAt(i):null;while(a&&!a.get("selectable"));e.push(a||t)}}),e.length&&t.select(e)}},e}(lx),lU=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lU(e,t),e.prototype.run=function(t){if(t.Canvas.hasFocus()){var e=[];t.getSelectedAll().forEach(function(t){var n=t.parent();if(n){var o=0,r=0,i=null;do o++,i=(r=t.index()-o)>=0?n.getChildAt(r):null;while(i&&!i.get("selectable"));e.push(i||t)}}),e.length&&t.select(e)}},e}(lx),lz=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lW=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lz(e,t),e.prototype.run=function(t,e,n){var o=n.target,r=[];if(!o.get("styles"))return r;var i=o.get("type"),a=t.Pages.getAllWrappers();if(!(0,b.flatten)(a.map(function(t){return t.findType(i)})).length){var s=t.CssComposer.getAll();r=s.filter(function(t){return t.get("group")==="cmp:".concat(i)}),s.remove(r)}return r},e}(lx),l$=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lq=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},lG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l$(e,t),e.prototype.run=function(t){var e=t.getModel(),n=lq([],t.getSelectedAll(),!0).map(function(t){var e,n;return(null==(n=null==(e=t.delegate)?void 0:e.copy)?void 0:n.call(e,t))||t}).filter(Boolean);n.length&&e.set("clipboard",n)},e}(lx),lK=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lY=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.cm=null,e}return lK(e,t),e.prototype.run=function(t,e,n){var o,r,i=this;void 0===n&&(n={}),e&&e.set&&e.set("active",0);var a=t.getConfig(),s=t.Modal,l=a.stylePrefix;if(this.cm=t.CodeManager||null,!this.editors){var c=this.buildEditor("htmlmixed","hopscotch","HTML"),u=this.buildEditor("css","hopscotch","CSS");this.htmlEditor=c.model,this.cssEditor=u.model;var p=P("div",{class:"".concat(l,"export-dl")});p.appendChild(c.el),p.appendChild(u.el),this.editors=p}s.open({title:a.textViewCode,content:this.editors}).getModel().once("change:open",function(){return t.stopCommand("".concat(i.id))}),null==(o=this.htmlEditor)||o.setContent(t.getHtml(n.optsHtml)),null==(r=this.cssEditor)||r.setContent(t.getCss(n.optsCss))},e.prototype.stop=function(t){var e=t.Modal;e&&e.close()},e.prototype.buildEditor=function(t,e,n){var o=this.em.CodeManager,r=o.createViewer({label:n,codeName:t,theme:e}),i=new o.EditorView({model:r,config:o.getConfig()}).render().el;return{model:r,el:i}},e}(lx),lJ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lX=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lJ(e,t),e.prototype.isEnabled=function(){var t=document;return!!(t.fullscreenElement||t.webkitFullscreenElement||t.mozFullScreenElement)},e.prototype.enable=function(t){var e="";return t&&(t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?(e="webkit",t.webkitRequestFullscreen()):t.mozRequestFullScreen?(e="moz",t.mozRequestFullScreen()):t.msRequestFullscreen&&t.msRequestFullscreen()),e},e.prototype.disable=function(){var t=document;this.isEnabled()&&(t.exitFullscreen?t.exitFullscreen():t.webkitExitFullscreen?t.webkitExitFullscreen():t.mozCancelFullScreen?t.mozCancelFullScreen():t.msExitFullscreen&&t.msExitFullscreen())},e.prototype.onFullscreenChange=function(){this.isEnabled()||this.stopCommand({sender:this.sender})},e.prototype.run=function(t,e,n){void 0===n&&(n={}),this.sender=e;var o=n.target,r=(0,b.isElement)(o)?o:"string"==typeof o?document.querySelector(o):void 0,i=this.enable(r||t.getContainer());this.fullscreenChangeEvent="".concat(i,"fullscreenchange"),this.fullscreenChangeHandler=this.onFullscreenChange.bind(this),document.addEventListener(this.fullscreenChangeEvent,this.fullscreenChangeHandler)},e.prototype.stop=function(t,e,n){void 0===n&&(n={}),e&&e.set&&e.set("active",!1),this.fullscreenChangeEvent&&this.fullscreenChangeHandler&&(document.removeEventListener(this.fullscreenChangeEvent,this.fullscreenChangeHandler),this.fullscreenChangeEvent=void 0,this.fullscreenChangeHandler=void 0),this.disable()},e}(lx),lZ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),lQ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return lZ(e,t),e.prototype.defaults=function(){return{command:"",attributes:{}}},e}(tH),l0=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),l1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l0(e,t),e}(tU);l1.prototype.model=lQ;var l2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),l3=function(){return(l3=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},l5=function(t){function e(e){var n=t.call(this,e)||this;return n.em=e.config.em,n}return l2(e,t),e.prototype.events=function(){return this.model.get("events")||{mousedown:"handleClick"}},e.prototype.attributes=function(){return this.model.get("attributes")},e.prototype.handleClick=function(t){t.preventDefault(),t.stopPropagation();var e=this.em,n=e.Canvas.getFrameEl().getBoundingClientRect(),o=n.left,r=n.top,i=l3(l3({},t),{clientX:t.clientX-o,clientY:t.clientY-r});e.trigger("toolbar:run:before",{event:i}),this.execCommand(i)},e.prototype.execCommand=function(t){var e=this.em,n=this.model,o={event:t},r=n.get("command"),i=e.Editor;(0,b.isFunction)(r)&&r(i,null,o),(0,b.isString)(r)&&i.runCommand(r,o)},e.prototype.render=function(){var t=this.em,e=this.$el,n=this.model,o=n.get("id"),r=n.get("label"),i=t.getConfig().stylePrefix;return e.addClass("".concat(i,"toolbar-item")),o&&e.addClass("".concat(i,"toolbar-item__").concat(o)),r&&e.append(r),this},e}(tB),l4=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),l9=function(t){function e(e){var n=t.call(this,e)||this,o=e.em;return n.em=o,n.config={em:o},n.listenTo(n.collection,"reset",n.render),n}return l4(e,t),e.prototype.onRender=function(){var t=this.em.config.stylePrefix;this.el.className="".concat(t,"toolbar-items")},e}(ll);l9.prototype.itemView=l5;var l6=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),l7=function(){return(l7=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},l8=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.activeResizer=!1,e}return l6(e,t),e.prototype.init=function(){var t=this;this._upToolbar=(0,b.debounce)(function(){t.updateToolsGlobal({force:1})},0),this.updateAttached=(0,b.debounce)(function(){t.updateGlobalPos()},0),this.onContainerChange=(0,b.debounce)(function(){t.em.refreshCanvas()},150),this.onSelect=(0,b.debounce)(this.onSelect,0),(0,b.bindAll)(this,"onHover","onOut","onClick","onCanvasScroll","onFrameScroll","onFrameResize","onFrameUpdated","onContainerChange")},e.prototype.enable=function(){this.frameOff=this.canvasOff=this.adjScroll=null,this.startSelectComponent(),pI=!0},e.prototype.startSelectComponent=function(){this.toggleSelectComponent(!0),this.em.getSelected()&&this.onSelect()},e.prototype.stopSelectComponent=function(){var t,e,n,o,r,i,a,s;this.toggleSelectComponent(),null==(e=(t=this.onContainerChange).cancel)||e.call(t),null==(o=(n=this.onSelect).cancel)||o.call(n),null==(i=(r=this.updateAttached).cancel)||i.call(r),null==(s=(a=this._upToolbar).cancel)||s.call(a)},e.prototype.toggleSelectComponent=function(t){var e=this,n=this.em,o=this.canvas.getCanvasView().el,r=n.getConfig().listenToEl,i=n.getContainer().parentNode,a=t?"on":"off",s={on:U,off:B},l=pi.update;!r.length&&i&&r.push(i);var c=function(t,n,o){s[a](o,"scroll",e.onCanvasScroll,!0),s[a](n,"mouseover",e.onHover),s[a](n,"mouseleave",e.onOut),s[a](n,"click",e.onClick),s[a](t,"scroll",e.onFrameScroll,!0),s[a](t,"resize",e.onFrameResize)};s[a](window,"resize",this.onFrameUpdated),s[a](r,"scroll",this.onContainerChange),n[a]("".concat(pi.toggled," ").concat(l," undo redo"),this.onSelect,this),n[a]("change:componentHovered",this.onHovered,this),n[a]("".concat(pi.resize," styleable:change ").concat(pi.input),this.updateGlobalPos,this),n[a]("".concat(l,":toolbar"),this._upToolbar,this),n[a]("frame:updated",this.onFrameUpdated,this),n[a](pn.updateTools,this.onFrameUpdated,this),n[a](n.Canvas.events.refresh,this.updateAttached,this),n.Canvas.getFrames().forEac
1h(function(t){var e=t.view,n=null==e?void 0:e.getWindow();n&&c(n,null==e?void 0:e.getBody(),o)})},e.prototype.onHover=function(t){t.stopPropagation();var e=this.em,n=t.target,o=tE(n),r=null==o?void 0:o.frameView,i=null==o?void 0:o.model;if(!i)for(var a=n.parentNode;!i&&a&&!_(a);)i=tk(a),a=a.parentNode;this.currentDoc=n.ownerDocument,e.setHovered(i,{useValid:!0}),r&&e.setCurrentFrame(r)},e.prototype.onFrameUpdated=function(){this.updateLocalPos(),this.updateGlobalPos()},e.prototype.onHovered=function(t,e){var n,o=this,r={};e?null==(n=e.views)||n.forEach(function(t){var n=t.el,i=o.getElementPos(n);r={el:n,pos:i,component:e,view:t},n.ownerDocument===o.currentDoc&&(o.elHovered=r),o.updateToolsLocal(r)}):(this.currentDoc=null,this.elHovered=0,this.updateToolsLocal(),this.canvas.getFrames().forEach(function(t){var e=t.view,n=e&&e.getToolsEl();n&&o.toggleToolsEl(!1,0,{el:n})}))},e.prototype.onSelect=function(){var t=this.em,e=t.getSelected(),n=t.getCurrentFrame(),o=e&&e.getView(null==n?void 0:n.model),r=null==o?void 0:o.el,i={};if(r&&x(r)){var a=this.getElementPos(r);i={el:r,pos:a,component:e,view:o}}this.elSelected=i,this.updateToolsGlobal(),this.updateLocalPos(i),this.initResize(e)},e.prototype.updateGlobalPos=function(){var t=this.getElSelected();t.el&&(t.pos=this.getElementPos(t.el),this.updateToolsGlobal())},e.prototype.updateLocalPos=function(t){var e=this.getElHovered();e.el&&(e.pos=this.getElementPos(e.el),this.updateToolsLocal(t))},e.prototype.getElHovered=function(){return this.elHovered||{}},e.prototype.getElSelected=function(){return this.elSelected||{}},e.prototype.onOut=function(){this.em.setHovered()},e.prototype.toggleToolsEl=function(t,e,n){void 0===n&&(n={});var o=n.el||this.canvas.getToolsEl(e);return o&&(o.style.display=t?"":"none"),o||{}},e.prototype.showElementOffset=function(t,e,n){void 0===n&&(n={}),pI&&this.editor.runCommand("show-offset",{el:t,elPos:e,view:n.view,force:1,top:0,left:0})},e.prototype.hideElementOffset=function(t){this.editor.stopCommand("show-offset",{view:t})},e.prototype.showFixedElementOffset=function(t,e){this.editor.runCommand("show-offset",{el:t,elPos:e,state:"Fixed"})},e.prototype.hideFixedElementOffset=function(){this.editor&&this.editor.stopCommand("show-offset",{state:"Fixed"})},e.prototype.hideHighlighter=function(t){this.canvas.getHighlighter(t).style.opacity=0},e.prototype.onClick=function(t){t.stopPropagation(),t.preventDefault();var e=this.em;if(e.get("_cmpDrag"))return void e.set("_cmpDrag");var n=t.target,o=tk(n);if(!o)for(var r=n.parentNode;!o&&r&&!_(r);)o=tk(r),r=r.parentNode;if(o){if(e.isEditing()&&(!o.get("textable")&&o.isChildOf("text")||e.getEditing()!==o))return;this.select(o,t)}},e.prototype.select=function(t,e){if(t){var n=this.em;n.setSelected(t,{event:e,useValid:!0}),this.initResize(n.getSelected())}},e.prototype.updateBadge=function(t,e,n){void 0===n&&(n={});var o=this.canvas,r=tk(t),i=this.getBadge(n),a=i.style;if(!r||!r.get("badgable")){a.display="none";return}if(!n.posOnly){var s=this.canvas.getConfig(),l=r.getIcon(),c=s.pStylePrefix||"",u="".concat(c,"badge"),p=s.customBadgeLabel,f="".concat(l?'<div class="'.concat(u,'__icon">').concat(l,"</div>"):"",'\n <div class="').concat(u,'__name">').concat(r.getName(),"</div>");i.innerHTML=p?p(r):f}a.display="block";var d=o.getTargetToElementFixed(t,i,{pos:e}).top,h=n.leftOff<0?-n.leftOff:0;a.top=d+"px",a.left=h+"px"},e.prototype.showHighlighter=function(t){this.canvas.getHighlighter(t).style.opacity=""},e.prototype.initResize=function(t){var e,n=this,o=this.em,r=this.canvas,i=o.Editor,a=!(0,b.isElement)(t)&&M(t)?t:o.getSelected(),s=null==(e=null==a?void 0:a.get)?void 0:e.call(a,"resizable"),l=po.Resize,c=r.hasCustomSpot(l);r.removeSpots({type:l});var u={component:a,hasCustomResize:c,resizable:s};a&&o.trigger(pi.resizeInit,u);var p=u.resizable;if(a&&p){r.addSpot({type:l,component:a});var f=(0,b.isElement)(t)?t:a.getEl(),d=tC(p)?p:{};if(c||!f||this.activeResizer)return;this.resizer=i.runCommand("resize",l7(l7({},d),{el:f,component:a,force:!0,afterStart:function(){pI=!1,n.activeResizer=!0},afterEnd:function(){pI=!0,n.activeResizer=!1}}
1))}else{if(c)return;i.stopCommand("resize"),this.resizer=null}},e.prototype.updateToolbar=function(t){var e=this.canvas,n=this.config.em,o=t===n?n.getSelected():t,r=e.getToolbarEl(),i=r.style,a=o.get("toolbar"),s=n.config.showToolbar,l=!e.hasCustomSpot(po.Select);if(o&&s&&a&&a.length&&l){if(i.display="",!this.toolbar){r.innerHTML="",this.toolbar=new l1(a);var c=new l9({collection:this.toolbar,em:n});r.appendChild(c.render().el)}this.toolbar.reset(a),i.top="-100px",i.left="0"}else i.display="none"},e.prototype.updateToolbarPos=function(t){var e=this.canvas.getToolbarEl().style;e.top="".concat(t.top).concat("px"),e.left="".concat(t.left).concat("px"),e.opacity=""},e.prototype.getCanvasPosition=function(){return this.canvas.getCanvasView().getPosition()},e.prototype.getBadge=function(t){return void 0===t&&(t={}),this.canvas.getBadgeEl(t.view)},e.prototype.onCanvasScroll=function(t){this.onFrameScroll(t),this.onContainerChange()},e.prototype.onFrameScroll=function(t){this.updateTools(),this.canvas.refreshSpots()},e.prototype.onFrameResize=function(){this.canvas.refresh({all:!0})},e.prototype.updateTools=function(){this.updateLocalPos(),this.updateGlobalPos()},e.prototype.isCompSelected=function(t){return t&&"selected"===t.get("status")},e.prototype.updateToolsLocal=function(t){var e=this.em.getConfig(),n=t||this.getElHovered(),o=n.el,r=n.pos,i=n.view,a=n.component;if(!o){this.lastHovered=0;return}var s=a.get("hoverable"),l=this.lastHovered!==o,c=this.canvas.hasCustomSpot(po.Hover);l&&s&&(this.lastHovered=o,c?this.hideHighlighter(i):this.showHighlighter(i),this.showElementOffset(o,r,{view:i})),this.isCompSelected(a)&&(this.hideHighlighter(i),e.showOffsetsSelected||this.hideElementOffset(i));var u=this.toggleToolsEl(!0,i),p=u.style,f=this.canvas.canvasRectOffset(o,r),d=f.top,h=f.left;c||this.updateBadge(o,r,l7(l7({},l?{}:{posOnly:1}),{view:i,topOff:d,leftOff:h})),p.top=d+"px",p.left=h+"px",p.width=r.width+"px",p.height=r.height+"px",this._trgToolUp("local",{component:a,el:u,top:d,left:h,width:r.width,height:r.height})},e.prototype._upToolbar=function(){},e.prototype._trgToolUp=function(t,e){void 0===e&&(e={}),this.em.trigger(pn.toolsUpdate,l7({type:t},e))},e.prototype.updateToolsGlobal=function(t){void 0===t&&(t={});var e=this.getElSelected(),n=e.el,o=e.pos,r=e.component;if(!n){this.toggleToolsEl(),this.lastSelected=0;return}var i=this.canvas;(this.lastSelected!==n||t.force)&&(this.lastSelected=n,this.updateToolbar(r));var a=this.toggleToolsEl(!0),s=a.style,l=i.getTargetToElementFixed(n,i.getToolbarEl(),{pos:o}),c=l.canvasOffsetTop,u=l.canvasOffsetLeft;s.top=c+"px",s.left=u+"px",s.width=o.width+"px",s.height=o.height+"px",this.updateToolbarPos({top:l.top,left:l.left}),this._trgToolUp("global",{component:r,el:a,top:c,left:u,width:o.width,height:o.height})},e.prototype.updateAttached=function(){},e.prototype.onContainerChange=function(){},e.prototype.getElementPos=function(t){return this.canvas.getCanvasView().getElementPos(t,{noScroll:!0})},e.prototype.hideBadge=function(){this.getBadge().style.display="none"},e.prototype.cleanPrevious=function(t){t&&t.set({status:"",state:""})},e.prototype.getContentWindow=function(){return this.canvas.getWindow()},e.prototype.run=function(t){to()&&(this.editor=t&&t.get("Editor"),this.enable())},e.prototype.stop=function(t,e,n){if(void 0===n&&(n={}),to()){var o=this.em,r=this.editor;this.onHovered(),this.stopSelectComponent(),n.preserveSelected||o.setSelected(),this.toggleToolsEl(),null==r||r.stopCommand("resize")}},e}(lx),ct=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ce=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ct(e,t),e.prototype.startSelectPosition=function(t,e,n){if(void 0===t&&(t=[]),void 0===n&&(n={}
1),this.isPointed=!1,t.length&&e){var o=this.em.Utils,r=t[0].ownerDocument.body;o&&(this.sorter=new o.ComponentSorter({em:this.em,treeClass:oj,containerContext:{container:r,containerSel:"*",itemSel:"*",pfx:this.ppfx,document:e,placeholderElement:this.canvas.getPlacerEl()},positionOptions:{windowMargin:1,canvasRelative:!0},dragBehavior:{dragDirection:pb.BothDirections,nested:!0}})),n.onStart&&(this.sorter.eventHandlers.legacyOnStartSort=n.onStart),t&&t.length>0&&this.sorter.startSort(t.map(function(t){return{element:t}}))}},e.prototype.getOffsetDim=function(){var t=this.offset(this.canvas.getFrameEl()),e=this.offset(this.canvas.getElement());return{top:t.top-e.top,left:t.left-e.left}},e.prototype.stopSelectPosition=function(){this.posTargetCollection=null,this.posIndex="after"==this.posMethod&&0!==this.cDim.length?this.posIndex+1:this.posIndex,this.sorter&&this.sorter.cancelDrag(),this.cDim&&(this.posIsLastEl=0!==this.cDim.length&&"after"==this.posMethod&&this.posIndex==this.cDim.length,this.posTargetEl=0===this.cDim.length?(0,tN.default)(this.outsideElem):!this.posIsLastEl&&this.cDim[this.posIndex]?(0,tN.default)(this.cDim[this.posIndex][5]).parent():(0,tN.default)(this.outsideElem),this.posTargetModel=this.posTargetEl.data("model"),this.posTargetCollection=this.posTargetEl.data("model-comp"))},e.prototype.enable=function(){this.startSelectPosition()},e.prototype.nearFloat=function(t,e,n){var o=t||0,r=n.length,i=0!==r&&"after"==(e||"before")&&o==r;return 0===r||(i||n[o][4])&&(!n[o-1]||n[o-1][4])&&(!i||n[o-1][4])?0:1},e.prototype.run=function(){this.enable()},e.prototype.stop=function(){this.stopSelectPosition(),this.$wrapper.css("cursor",""),this.$wrapper.unbind()},e}(lx),cn=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),co=l8.prototype,cr=ce.prototype,ci=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cn(e,t),e.prototype.init=function(t){co.init.apply(this,arguments),(0,b.bindAll)(this,"initSorter","rollback","onEndMove"),this.opt=t,this.hoverClass="".concat(this.ppfx,"highlighter-warning"),this.badgeClass="".concat(this.ppfx,"badge-warning"),this.noSelClass="".concat(this.ppfx,"no-select")},e.prototype.run=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return cr.run.apply(this,t)},e.prototype.enable=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];co.enable.apply(this,t),this.getBadgeEl().addClass(this.badgeClass),this.getHighlighterEl().addClass(this.hoverClass);var n=this.$wrapper;n.css("cursor","move"),n.on("mousedown",this.initSorter),n.addClass(this.noSelClass)},e.prototype.toggleClipboard=function(){},e.prototype.initSorter=function(t){var e=(0,tN.default)(t.target).data("model").get("draggable");e&&(this.cacheEl=null,this.startSelectPosition(t.target,this.frameEl.contentDocument),this.sorter.draggable=e,this.sorter.eventHandlers.legacyOnEndMove=this.onEndMove.bind(this),this.stopSelectComponent(),this.$wrapper.off("mousedown",this.initSorter),U(this.getContentWindow(),"keydown",this.rollback))},e.prototype.initSorterFromModel=function(t){var e,n=t.get("draggable");if(n){this.cacheEl=null;var o=null==(e=t.view)?void 0:e.el;o&&(this.startSelectPosition(o,this.frameEl.contentDocument),this.sorter.draggable=n,this.sorter.eventHandlers.legacyOnEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),U(this.getContentWindow(),"keydown",this.rollback))}},e.prototype.initSorterFromModels=function(t){this.cacheEl=null;var e=t[t.length-1],n=this.em.getCurrentFrame(),o=e.getEl(null==n?void 0:n.model).ownerDocument,r=t.map(function(t){var e;return null==(e=null==t?void 0:t.view)?void 0:e.el});this.startSelectPosition(r,o,{onStart:this.onStart}),this.sorter.eventHandlers.legacyOnMoveClb=this.onDrag,this.sorter.eventHandlers.legacyOnEndMove=this.onEndMoveFromModel.bind(this),this.stopSelectComponent(),U(this.getContentWindow(),"keydown",this.rollback)},e.prototype.onEndMoveFromModel=function(){B(this.getContentWindow(),"keydown",this.rollback)},e.prototype.onEndMove=function(){this.enable(),B(this.getContentWindow(),"keydown",this.rollback)},e.prototype.onSelect=function(t,e){},e.prototype.rollback=function(t,e){(27==(t.which||t.keyCode)||e)&&this.sorter.cancelDrag()},e.prototype.getBadgeEl=function(){return this.$badge||(this.$badge=(0,tN.default)(this.getBadge())),this.$badge},e.prototype.getHighlighterEl=function(){return this.$hl||(this.$hl=(0,tN.default)(this.canvas.getHighlighter())),this.$hl},e.prototype.stop=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];co.stop.apply(this,t),this.getBadgeEl().removeClass(this.badgeClass),this.getHighlighterEl().removeClass(this.hoverClass),this.$wrapper.css("cursor","").unbind().removeClass(this.noSelClass)},e}(lx);
1[cr,co].forEach(function(t){Object.getOwnPropertyNames(t).forEach(function(e){"constructor"!==e&&(e in ci.prototype||(ci.prototype[e]=t[e]))})});var ca=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cs=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.title="",e}return ca(e,t),e.prototype.open=function(t){var e=this,n=this.editor,o=this.title,r=this.config,i=this.am;if(n&&r&&i){var a=r.custom;if((0,b.isFunction)(a.open))return a.open(i.__customData());n.Modal.open({title:o,content:t}).onceClose(function(){return n.stopCommand(e.id)})}},e.prototype.close=function(){var t=this.config,e=this.am,n=this.editor;if(t&&e&&n){var o=t.custom;if((0,b.isFunction)(o.close))return o.close(e.__customData());
vendor: 4,445 bytes, line 1
1var r=n.Modal;r&&r.close()}},e.prototype.run=function(t,e,n){void 0===n&&(n={});var o=t.AssetManager,r=o.getConfig(),i=n.types,a=void 0===i?[]:i,s=n.accept,l=n.select;if(this.title=n.modalTitle||t.t("assetManager.modalTitle")||"",this.editor=t,this.config=r,this.am=o,o.setTarget(n.target),o.onClick(n.onClick),o.onDblClick(n.onDblClick),o.onSelect(n.onSelect),o.__behaviour({select:l,types:a,options:n}),r.custom)this.rendered=this.rendered||P("div"),this.rendered.className="".concat(r.stylePrefix,"custom-wrp"),o.__behaviour({container:this.rendered}),o.__trgCustom();else{if(!this.rendered||a){var c=o.getAll().filter(function(t){return t});a&&a.length&&(c=c.filter(function(t){return -1!==a.indexOf(t.get("type"))})),o.render(c),this.rendered=o.getContainer()}var u=this.rendered;if(s&&u){var p=u.querySelector("input#".concat(r.stylePrefix,"uploadFile"));p&&p.setAttribute("accept",s)}}var f=this.rendered;return f&&this.open(f),this},e.prototype.stop=function(t){this.editor=t,this.close()},e}(lx),cl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cl(e,t),e.prototype.open=function(){var t=this.container,e=this.editor,n=this.bm,o=this.config;if(t&&e&&n&&o){var r=o.custom,i=o.appendTo;if((0,b.isFunction)(r.open))return r.open(n.__customData());if(this.firstRender&&!i){var a="views-container",s=e.Panels;(s.getPanel(a)||s.addPanel({id:a})).set("appendContent",t).trigger("change:appendContent"),r||t.appendChild(n.render())}t.style.display="block"}},e.prototype.close=function(){var t=this.container,e=this.config,n=this.bm;if(e&&n){var o=e.custom;if((0,b.isFunction)(o.close))return o.close(n.__customData());t&&(t.style.display="none")}},e.prototype.run=function(t){var e=t.Blocks;this.config=e.getConfig(),this.firstRender=!this.container,this.container=this.container||P("div"),this.editor=t,this.bm=e;var n=this.container;e.__behaviour({container:n}),this.config.custom&&e.__trgCustom(),this.open()},e.prototype.stop=function(){this.close()},e}(lx),cu=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cp=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cu(e,t),e.prototype.run=function(t){var e=t.LayerManager,n=t.Panels,o=e.getConfig();if(!o.appendTo){if(!this.layers){var r="views-container",i=document.createElement("div"),a=n.getPanel(r)||n.addPanel({id:r});o.custom?e.__trgCustom({container:i}):i.appendChild(e.render()),a.set("appendContent",i).trigger("change:appendContent"),this.layers=i}this.layers.style.display="block"}},e.prototype.stop=function(){var t=this.layers;t&&(t.style.display="none")},e}(lx),cf=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cd=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cf(e,t),e.prototype.run=function(t,e){if(this.sender=e,!this.$cnt){var n=t.getConfig(),o=t.Panels,r=t.DeviceManager,i=t.SelectorManager,a=t.StyleManager,s="change:appendContent",l=(0,tN.default)("<div></div>"),c=(0,tN.default)("<div></div>"),u=(0,tN.default)("<div></div>"),p=(0,tN.default)("<div></div>");if(this.$cnt=l,this.$cntInner=c,c.append(u),c.append(p),l.append(c),r&&n.showDevices){var f=o.addPanel
1({id:"devices-c"}),d=r.render();f.set("appendContent",d).trigger(s)}var h=i.getConfig();h.custom?i.__trgCustom({container:u.get(0)}):h.appendTo||u.append(i.render([])),this.sm=a;var g=a.getConfig(),v=g.stylePrefix;this.$header=(0,tN.default)('<div class="'.concat(v,'header">').concat(t.t("styleManager.empty"),"</div>")),l.append(this.$header),g.custom?a.__trgCustom({container:p.get(0)}):g.appendTo||p.append(a.render());var y="views-container";(o.getPanel(y)||o.addPanel({id:y})).set("appendContent",l).trigger(s);var m=t.getModel();this.listenTo(m,a.events.target,this.toggleSm)}this.toggleSm()},e.prototype.toggleSm=function(){var t=this.sender,e=this.sm,n=this.$cntInner,o=this.$header;(!t||!t.get||t.get("active"))&&e&&(e.getSelected()?(null==n||n.show(),null==o||o.hide()):(null==n||n.hide(),null==o||o.show()))},e.prototype.stop=function(){var t,e;null==(t=this.$cntInner)||t.hide(),null==(e=this.$header)||e.hide()},e}(lx),ch=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cg=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ch(e,t),e.prototype.run=function(t,e){this.sender=e;var n=t.getModel(),o=t.Config.stylePrefix,r=t.TraitManager,i=r.getConfig();if(!i.appendTo){if(!this.$cn){var a=(0,tN.default)("<div></div>"),s=(0,tN.default)("<div></div>");this.$cn=a,this.$cn2=s,a.append(s),this.$header=(0,tN.default)("<div>").append('<div class="'.concat(i.stylePrefix,'header">').concat(n.t("traitManager.empty"),"</div>")),a.append(this.$header),i.custom?r.__trgCustom({container:s.get(0)}):(s.append('<div class="'.concat(o,'traits-label">').concat(n.t("traitManager.label"),"</div>")),s.append(r.render()));var l=t.Panels,c=l.getPanel("views-container")||l.addPanel({id:"views-container"});null==c||c.set("appendContent",a.get(0)).trigger("change:appendContent"),this.target=n,this.listenTo(this.target,pi.toggled,this.toggleTm)}this.toggleTm()}},e.prototype.toggleTm=function(){var t=this.sender,e=this.target,n=this.$cn2,o=this.$header;(!t||!t.get||t.get("active"))&&e&&(1===e.getSelectedAll().length?(null==n||n.show(),null==o||o.hide()):(null==n||n.hide(),null==o||o.show()))},e.prototype.stop=function(){var t,e;null==(t=this.$cn2)||t.hide(),null==(e=this.$header)||e.hide()},e}(lx),cv=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cy=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cv(e,t),e.prototype.run=function(t,e,n){void 0===n&&(n={});var o=t.getModel(),r=o.get("clipboard"),i=t.getSelected();(null==r?void 0:r.length)&&i&&(t.getSelectedAll().forEach(function(e){var i,a,s,l,c=(null==(a=null==(i=e.delegate)?void 0:i.copy)?void 0:a.call(i,e))||e,u=c.collection;if(u){var p={at:c.index()+1,action:n.action||"paste-component"};l=(0,b.contains)(r,c)&&c.get("copyable")?u.add(c.clone(),p):cm(t,r,c.parent(),p)}else{var f=null==(s=o.Pages.getSelected())?void 0:s.getMainComponent(),p={at:(null==f?void 0:f.components().length)||0,action:n.action||"paste-component"};l=cm(t,r,f,p)}(l=(0,b.isArray)(l)?l:[l]).forEach(function(e){return t.trigger(pi.paste,e)})}),i.emitUpdate())},e}(lx);function cm(t,e,n,o){var r=e.filter(function(t){return t.get("copyable")}).filter(function(e){return t.Components.canMove(n,e).result});return n.components().add(r.map(function(t){return t.clone()}),o)}var cb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cw=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},c_="core:component-outline",cC=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cb(e,t),e.prototype.getPanels=function(t){return this.panels||(this.panels=t.Panels.getPanels()),this.panels},e.prototype.preventDrag=function(t){t.abort=1},e.prototype.tglEffects=function(t){void 0===t&&(t=!1);var e=this.em,n=t?"on":"off";if(e){var o=e.Canvas,r=o.getBody(),i=o.getToolbarEl();i&&(i.style.display=t?"none":"");var a=r.querySelectorAll(".".concat(this.ppfx,"no-pointer"));(0,b.each)(a,function(e){return e.style.pointerEvents=t?"all":""}),e[n]("run:tlb-move:before",this.preventDrag)}},e.prototype.run=function(t,e){var n=this;this.sender=e,this.selected=cw([],t.getSelectedAll(),!0),t.select(),this.shouldRunSwVisibility||(this.shouldRunSwVisibility=t.Commands.isActive(c_)),this.shouldRunSwVisibility&&t.stopCommand(c_),t.getModel().stopDefault();var o=this.getPanels(t),r=t.Canvas.getElement(),i=t.getEl(),a=t.Config.stylePrefix;if(!this.helper){var s=document.createElement("span");s.className="".concat(a,"off-prv fa fa-eye-slash"),i.appendChild(s),s.onclick=function(){return n.stopCommand()},this.helper=s}this.helper.style.display="inline-block",o.forEach(function(t){return t.set("visible",!1)});var l=r.style;l.width="100%",l.height="100%",l.top="0",l.left="0",l.padding="0",l.margin="0",t.refresh(),this.tglEffects(!0)},e.prototype.stop=function(t){var e=this.sender,n=void 0===e?{}:e,o=this.selected;n.set&&n.set("active",0);var r=this.getPanels(t);this.shouldRunSwVisibility&&(t.runCommand(c_),this.shouldRunSwVisibility=!1),t.getModel().runDefault(),r.forEach(function(t){return t.set("visible",!0)}),t.Canvas.getElement().setAttribute("style",""),o&&t.select(o),delete this.selected,this.helper&&(this.helper.style.display="none"),t.refresh(),this.tglEffects()},e}(lx),cx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cO=function(){return(cO=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},cS=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n};!function(t){t.pt="pt",t.pc="pc",t.in="in",t.cm="cm",t.mm="mm",t.vw="vw",t.vh="vh",t.vmin="vmin",t.vmax="vmax",t.svw="svw",t.lvw="lvw",t.dvw="dvw",t.svh="svh",t.lvh="lvh",t.dvh="dvh",t.perc="%"}(pN||(pN={}));var cT=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cx(e,t),e.prototype.run=function(t,e,n){var o,r,i=this,a=t.Canvas,s=t.Utils,l=t.em,c=a.getCanvasView(),u=l.config.stylePrefix||"",p="".concat(u,"resizing"),f=n.onStart,d=void 0===f?function(){}:f,h=n.onMove,g=void 0===h?function(){}:h,v=n.onEnd,y=void 0===v?function(){}:v,m=n.updateTarget,b=void 0===m?function(){}:m,w=n.el,_=n.componentView,C=n.component,x=n.skipPositionUpdate,O=cS(n,["onStart","onMove","onEnd","updateTarget","el","componentView","component","skipPositionUpdate"]),S=w||(null==_?void 0:_.el)||C.getEl(),T={component:C,el:S},P=function(t,e,n){var o=n.docs;o&&o.forEach(function(e){var n=e.body,o=n.className||"";n.className=("add"==t?"".concat(o," ").concat(p):o.replace(p,"")).trim()})},E=cO(cO({appendTo:a.getResizerEl(),prefix:t.getConfig().stylePrefix,posFetcher:c.getElementPos.bind(c),mousePosFetcher:a.getMouseRelativePos.bind(a),docs:[document],updateOnMove:!0,skipUnitAdjustments:!0,onStart:function(e,i){d(e,i);var a,s=i.el,c=i.config,u=i.resizer,p=c.keyHeight,f=c.keyWidth,h=c.currentUnit,g=c.keepAutoHeight,v=c.keepAutoWidth;P("add",e,i),o=l.Styles.getModelToStyle(C),r=getComputedStyle(s);var y=o.getStyle(),m=cO({},u.startDim),b=y[f];c.autoWidth=v&&"auto"===b,isNaN(parseFloat(b))&&(b=r[f]);var w=y[p];c.autoHeight=g&&"auto"===w,isNaN(parseFloat(w))&&(w=r[p]);var _=parseFloat(b),x=parseFloat(w),O=tc(b),S=tc(w);h&&(c.unitWidth=O,c.unitHeight=S);var E=cO(cO({},T),{event:e,rect:m,model:o,modelWidth:{value:b,property:f,number:_,unit:O},modelHeight:{value:w,property:p,number:x,unit:S}});t.trigger(pi.resizeStart,E),t.trigger(pi.resize,cO(cO({},E),{type:"start"})),null==(a=n.afterStart)||a.call(n)},onMove:function(e,n){g(e,n);var o=n.resizer,r=cO(cO({},T),{event:e,delta:o.delta,pointer:o.currentPos,rect:o.rectDim});t.trigger(pi.resizeStart,r),t.trigger(pi.resize,cO(cO({},r),{type:"move"}))},onEnd:function(e,o){y(e,o),P("remove",e,o);var r,i=o.resizer,a=cO(cO({},T),{event:e,rect:i.rectDim,moved:i.moved});t.trigger(pi.resizeEnd,a),t.trigger(pi.resize,cO(cO({},T),{type:"end"})),null==(r=n.afterEnd)||r.call(n)},updateTarget:function(e,n,s){if(b(e,n,s),o){var c,u=s.store,p=s.selectedHandler,f=s.config,d=s.resizer,h=s.event,g=f.keyHeight,v=f.keyWidth,y=f.autoHeight,m=f.autoWidth,w=f.unitWidth,_=f.unitHeight,O=["tc","bc"].indexOf(p)>=0,P=["cl","cr"].indexOf(p)>=0,E=!u,k={};if(!O){var j=(null==(c=a.getBody())?void 0:c.offsetWidth)||0,A=n.w<j?n.w:j;k[v]=m?"auto":i.convertPxToUnit({el:S,elComputedStyle:r,valuePx:A,unit:w})}P||(k[g]=y?"auto":i.convertPxToUnit({el:S,elComputedStyle:r,valuePx:n.h,unit:_,isHeight:!0})),!x&&l.getDragMode(C)&&(k.top="".concat(n.t,"px"),k.left="".concat(n.l,"px"));var M=!1,D=function(t){M=!0;var e=cO(cO({},t||k),{__p:E});o.addStyle(e,{avoidStore:E}),l.Styles.__emitCmpStyleUpdate(e,{components:C})},L=cO(cO({},T),{rect:n,partial:E,event:h,style:k,updateStyle:D,convertPxToUnit:function(t){return i.convertPxToUnit(cO({el:S,elComputedStyle:r},t))},delta:d.delta,pointer:d.currentPos});t.trigger(pi.resizeUpdate,L),M||D()}}},O),n.options),k=this.canvasResizer;return k||(this.canvasResizer=new s.Resizer(E),k=this.canvasResizer),k.setOptions(E,!0),k.blur(),k.focus(S),k},e.prototype.stop=function(){var t;null==(t=this.canvasResizer)||t.blur()},e.prototype.convertPxToUnit=function(t){var e=t.el,n=t.valuePx,o=t.unit,r=t.dpi,i=void 0===r?96:r,a=t.roundDecimals,s=t.isHeight,l=t.elComputedStyle,c=e.ownerDocument.defaultView,u=(null==c?void 0:c.innerWidth)||1,p=window.innerHeight||1,f=n,d=o;switch(o){case pN.pt:f=72/i*n;break;case pN.pc:f=6/i*n;break;case pN.in:f=n/i;break;case pN.cm:f=n/(i/2.54);break;case pN.mm:f=n/(i/25.4);break;case pN.vw:f=n/u*100;break;case pN.vh:f=n/p*100;break;case pN.vmin:f=n/Math.min(u,p)*100;break;case pN.vmax:f=n/Math.max(u,p)*100;break;case pN.perc:var h=e.parentElement,g=e.offsetParent,v=(null==l?void 0:l.position)==="absolute"?g:h,y=(null==v?void 0:v.offsetWidth)||1,m=(null==v?void 0:v.offsetHeight)||1;f=n/(s?m:y)*100;break;case pN.svw:case pN.lvw:case pN.dvw:f=n/u*100;break;case pN.svh:case pN.lvh:case pN.dvh:f=n/p*100;break;default:d="px"}return"".concat(+f.toFixed(void 0===a?3:a)).concat(d)},e}(lx),cP=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cE=function(){return(cE=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ck=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cP(e,t),e.prototype.getOffsetMethod=function(t){return"get".concat(t||"","OffsetViewerEl")},e.prototype.run=function(t,e,n){var o=this.canvas,r=n||{},i=r.state||"",a=t.getConfig(),s=this.em.getZoomDecimal(),l=r.el;if(!a.showOffsets||!(l instanceof HTMLElement)||!a.showOffsetsSelected&&"Fixed"==i)return void t.stopCommand("".concat(this.id),n);if(!o.hasCustomSpot(po.Spacing)){var c=cE({},r.elPos||o.getElementPos(l));(0,b.isUndefined)(r.top)||(c.top=r.top),(0,b.isUndefined)(r.left)||(c.left=r.left);var u=window.getComputedStyle(l),p=this.ppfx,f="".concat(i,"State"),d=o[this.getOffsetMethod(i)](n.view);d.style.opacity="";var h=this["marginT".concat(i)],g=this["marginB".concat(i)],v=this["marginL".concat(i)],y=this["marginR".concat(i)],m=this["padT".concat(i)],w=this["padB".concat(i)],_=this["padL".concat(i)],C=this["padR".concat(i)];if(d.childNodes.length&&(this[f]="1",h=d.querySelector("[data-offset-m-t]"),g=d.querySelector("[data-offset-m-b]"),v=d.querySelector("[data-offset-m-l]"),y=d.querySelector("[data-offset-m-r]"),m=d.querySelector("[data-offset-p-t]"),w=d.querySelector("[data-offset-p-b]"),_=d.querySelector("[data-offset-p-l]"),C=d.querySelector("[data-offset-p-r]")),!this[f]){var x=i.toLowerCase(),O="".concat(x,"margin-v"),S="".concat(x,"padding-v"),T=(0,tN.default)('<div class="'.concat(p,'marginName">')).get(0),P=(0,tN.default)('<div class="'.concat(p,'paddingName">')).get(0),E="".concat(p).concat(O,"-el"),k="".concat(p).concat(S,"-el"),j="".concat(E," ").concat(p).concat(O),A="".concat(k," ").concat(p).concat(S);h=(0,tN.default)('<div class="'.concat(j,'-top"></div>')).get(0),g=(0,tN.default)('<div class="'.concat(j,'-bottom"></div>')).get(0),v=(0,tN.default)('<div class="'.concat(j,'-left"></div>')).get(0),y=(0,tN.default)('<div class="'.concat(j,'-right"></div>')).get(0),m=(0,tN.default)('<div class="'.concat(A,'-top"></div>')).get(0),w=(0,tN.default)('<div class="'.concat(A,'-bottom"></div>')).get(0),_=(0,tN.default)('<div class="'.concat(A,'-left"></div>')).get(0),C=(0,tN.default)('<div class="'.concat(A,'-right"></div>')).get(0),this["marginT".concat(i)]=h,this["marginB".concat(i)]=g,this["marginL".concat(i)]=v,this["marginR".concat(i)]=y,this["padT".concat(i)]=m,this["padB".concat(i)]=w,this["padL".concat(i)]=_,this["padR".concat(i)]=C,T.appendChild(h),T.appendChild(g),T.appendChild(v),T.appendChild(y),P.appendChild(m),P.appendChild(w),P.appendChild(_),P.appendChild(C),d.appendChild(T),d.appendChild(P),this[f]="1"}var M=parseFloat(u.marginLeft.replace("px",""))*s,D=parseFloat(u.marginRight.replace("px",""))*s,L=parseFloat(u.marginTop.replace("px",""))*s,I=parseFloat(u.marginBottom.replace("px",""))*s,N=h.style,R=g.style,V=v.style,F=y.style,H=m.style,U=w.style,B=_.style,z=C.style,W=parseFloat(c.left),$=parseFloat(u.width)*s+"px";N.height=L+"px",N.width=$,N.top=c.top-L+"px",N.left=W+"px",R.height=I+"px",R.width=$,R.top=c.top+c.height+"px",R.left=W+"px";var q=c.height+L+I+"px",G=c.top-L+"px";V.height=q,V.width=M+"px",V.top=G,V.left=W-M+"px",F.height=q,F.width=D+"px",F.top=G,F.left=W+c.width+"px";var K=parseFloat(u.paddingTop)*s;H.height=K+"px";var Y=parseFloat(u.paddingBottom)*s;U.height=Y+"px";var J=c.height-Y-K+"px",X=c.top+K+"px";B.height=J,B.width=parseFloat(u.paddingLeft)*s+"px",B.top=X;var Z=parseFloat(u.paddingRight)*s;z.height=J,z.width=Z+"px",z.top=X}},e.prototype.stop=function(t,e,n){void 0===n&&(n={});var o=(n||{}).state||"",r=this.getOffsetMethod(o),i=n.view;this.canvas[r](i).style.opacity=0},e}(lx),cj=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cj(e,t),e.prototype.init=function(){(0,b.bindAll)(this,"_onFramesChange")},e.prototype.run=function(t){this.toggleVis(t,!0)},e.prototype.stop=function(t){this.toggleVis(t,!1)},e.prototype.toggleVis=function(t,e){if(void 0===e&&(e=!0),!t.Commands.isActive("preview")){var n=t.Canvas,o=e?"on":"off";n.getModel()[o]("change:frames",this._onFramesChange),this.handleFrames(n.getFrames(),e)}},e.prototype.handleFrames=function(t,e){var n=this;t.forEach(function(t){var o;(null==(o=t.view)?void 0:o.loaded)&&n._upFrame(t,e),t.__ol||(t.on("loaded",function(){return n._upFrame(t)}),t.__ol=!0)})},e.prototype._onFramesChange=function(t,e){this.handleFrames(e)},e.prototype._upFrame=function(t,e){var n,o=this.ppfx,r=this.em,i=this.id,a=tn(e)?e:r.Commands.isActive(i);null==(n=t.view)||n.getBody().classList[a?"add":"remove"]("".concat(o,"dashed"))},e}(lx),cM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cD=function(){return(cD=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},cL=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},cI=[["preview",cC,"preview"],["resize",cT,"resize"],["fullscreen",lX,"fullscreen"],["copy",lG],["paste",cy],["canvas-move",lP],["canvas-clear",lS],["open-code",lY,"export-template"],["open-layers",cp,"open-layers"],["open-styles",cd,"open-sm"],["open-traits",cg,"open-tm"],["open-blocks",cc,"open-blocks"],["open-assets",cs,"open-assets"],["component-select",l8,"select-comp"],["component-outline",cA,"sw-visibility"],["component-offset",ck,"show-offset"],["component-move",ci,"move-comp"],["component-next",lH],["component-prev",lB],["component-enter",lN],["component-exit",lV,"select-parent"],["component-delete",lj],["component-style-clear",lW],["component-drag",lL]],cN={preserveSelected:1},cR=function(t){return function(e){return t.trigger(pi.dragStart,e)}},cV=function(t){return function(e){return t.trigger(pi.drag,e)}},cF=function(t,e,n){return void 0===n&&(n={}),function(o,r,i){setTimeout(function(){e.forEach(function(t){return t.set("status",t.get("selectable")?"selected":"")}),t.setSelected(e),e[0].emitUpdate()}),t.trigger(pi.dragEnd,i),setTimeout(function(){return t.runDefault(cN)}),(n.altMode||i.cancelled)&&t.set("_cmpDrag",1)}},cH=function(t){function e(e){var n=t.call(this,e,"Commands",{stylePrefix:"com-",defaults:{},strict:!0,defaultOptions:{}})||this;n.CommandAbstract=lx,n.defaultCommands={},n.commands={},n.active={},n.events=lw;var o=n.config,r=o.pStylePrefix,i=n.defaultCommands;for(var a in r&&(o.stylePrefix=r+o.stylePrefix),Object.keys(o.defaults).forEach(function(t){var e=o.defaults[t];e.id&&n.add(e.id,e)}),i["tlb-delete"]={run:function(t){return t.runCommand("core:component-delete")}},i["tlb-clone"]={run:function(t){t.runCommand("core:copy"),t.runCommand("core:paste",{action:"clone-component"})}},i["tlb-move"]={run:function(t,e,n){void 0===n&&(n={});var o,r,i=t.getModel(),a=n.event,s=n.target,l=(Array.isArray(s)?s:s?[s]:cL([],t.getSelectedAll(),!0)).map(function(t){var e,n;return(null==(n=null==(e=t.delegate)?void 0:e.move)?void 0:n.call(e,t))||t}
1).filter(Boolean),c=l[l.length-1],u=(null==a?void 0:a.type)==="dragstart";if(!(null==c?void 0:c.get("draggable")))return i.logWarning("The element is not draggable");var p=n.mode||c.get("dmode")||i.get("dmode"),f=function(){return i.stopDefault(cN)},d=(0,b.includes)(["absolute","translate"],p);l.forEach(function(t){return t.trigger("disable",{fromMove:!0})}),u?setTimeout(f,0):f();var h=cR(i),g=cV(i),v=cF(i,l,{altMode:d});if(d)t.runCommand("core:component-drag",{guidesInfo:1,mode:p,target:c,onStart:h,onDrag:g,onEnd:v,event:a});else{u&&(null==(o=null==a?void 0:a.dataTransfer)||o.setDragImage(null==(r=c.view)?void 0:r.el,0,0));var y=t.Commands.get("move-comp");y.onStart=h,y.onDrag=g,y.onEndMoveFromModel=v,y.initSorterFromModels(l)}l.filter(function(t){return t.get("selectable")}).forEach(function(t){return t.set("status","freezed-selected")})}},i["core:undo"]=function(t){return t.UndoManager.undo()},i["core:redo"]=function(t){return t.UndoManager.redo()},cI.forEach(function(t){var n=t[2],o=t[1],r="core:".concat(t[0]);i[r]=o,n&&(i[n]=o,["run","stop"].forEach(function(t){e.on("".concat(t,":").concat(n),function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];return e.trigger.apply(e,cL(["".concat(t,":").concat(r)],n,!1))})}))}),o.model=e.Canvas,i)n.add(a,i[a]);return n}return cM(e,t),e.prototype.add=function(t,e){if((0,b.isFunction)(e)&&(e===lx||e.prototype instanceof lx)){var n=e.prototype,o=n.stop===lx.prototype.stop;return n.noStop=o,this.commands[t]=e,this}var r=(0,b.isFunction)(e)?{run:e}:e;return r.stop||(r.noStop=!0),delete r.initialize,r.id=t,this.commands[t]=lx.extend(r),this},e.prototype.remove=function(t){return this.isActive(t)&&this.stopCommand(this.get(t),{force:!0}),delete this.active[t],delete this.commands[t],this},e.prototype.get=function(t){var e=this.commands[t];return(0,b.isFunction)(e)&&(e=new e(this.config),this.commands[t]=e),e?e.id=t:this.em.logWarning("'".concat(t,"' command not found")),e},e.prototype.extend=function(t,e){void 0===e&&(e={});var n=this.get(t);if(n){var o=cD(cD({},n.constructor.prototype),e);this.add(t,o);var r=cI.filter(function(e){return"core:".concat(e[0])===t&&e[2]})[0],i=null==r?void 0:r[2];i&&this.add(i,o)}return this},e.prototype.has=function(t){return!!this.commands[t]},e.prototype.getAll=function(){return this.commands},e.prototype.run=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.runCommand(this.get(t),e[0])},e.prototype.stop=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.stopCommand(this.get(t),e[0])},e.prototype.isActive=function(t){return this.getActive().hasOwnProperty(t)},e.prototype.getActive=function(){return this.active},e.prototype.runCommand=function(t,e){if(void 0===e&&(e={}),null==t?void 0:t.run){var n,o,r,i=this.em,a=this.config,s=t.id,l=i.Editor;if(!this.isActive(s)||e.force||!a.strict){var c=null==(o=null==(n=a.defaultOptions)?void 0:n[s])?void 0:o.run;(0,b.isFunction)(c)&&(e=c(e)),r=l&&t.callRun(l,e)}}return r},e.prototype.stopCommand=function(t,e){if(void 0===e&&(e={}),null==t?void 0:t.run){var n,o,r,i=this.em,a=this.config,s=t.id,l=i.Editor;if(this.isActive(s)||e.force||!a.strict){var c=null==(o=null==(n=a.defaultOptions)?void 0:n[s])?void 0:o.stop;(0,b.isFunction)(c)&&(e=c(e)),r=t.callStop(l,e)}}return r},e.prototype.create=function(t){return t.stop||(t.noStop=!0),new(lx.extend(t))(this.config)},e.prototype.__onRun=function(t,e){var n=this.em,o=this.events;n.on("".concat(o.runCommand).concat(t),e)},e.prototype.__onStop=function(t,e){var n=this.em,o=this.events;n.on("".concat(o.stopCommand).concat(t),e)},e.prototype.destroy=function(){this.defaultCommands={},this.commands={},this.active={}},e}(tJ),cU=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cB=function(){return(cB=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},cz="contentEditable",cW="data-toggle-move",c$=function(t){function e(e){var n=t.call(this,e)||this;(0,b.bindAll)(n,"__render"),n.opt=e,n.module=e.module,n.config=e.config||{},n.sorter=e.sorter||"",n.parentView=e.parentView;var o=n.model,r=n.pfx,i=n.ppfx,a=o.get("type")||"default";return n.className="".concat(r,"layer ").concat(r,"layer__t-").concat(a," no-select ").concat(i,"two-color"),n.inputNameCls="".concat(i,"layer-name"),n.clsTitleC="".concat(r,"layer-title-c"),n.clsTitle="".concat(r,"layer-title"),n.clsCaret="".concat(r,"layer-caret"),n.clsCount="".concat(r,"layer-count"),n.clsMove="".concat(r,"layer-move"),n.clsChildren="".concat(r,"layer-children"),n.clsNoChild="".concat(r,"layer-no-chld"),n.clsEdit="".concat(n.inputNameCls,"--edit"),n.clsNoEdit="".concat(n.inputNameCls,"--no-edit"),n.initComponent(),n}return cU(e,t),e.prototype.events=function(){var t;return(t={})["mousedown [".concat(cW,"]")]="startSort",t["touchstart [".concat(cW,"]")]="startSort",t["click [data-toggle-visible]"]="toggleVisibility",t["click [data-toggle-open]"]="toggleOpening",t["click [data-toggle-select]"]="handleSelect",t["mouseover [data-toggle-select]"]="handleHover",t["mouseout [data-toggle-select]"]="handleHoverOut",t["dblclick [data-name]"]="handleEdit",t["keydown [data-name]"]="handleEditKey",t["focusout [data-name]"]="handleEditEnd",t},e.prototype.template=function(t){var e=this.pfx,n=this.ppfx,o=this.config,r=this.clsNoEdit,i=this.module,a=this.opt,s=this.em,l=o.hidable,c=i.getComponents(t).length,u=c?""
vendor: 7,514 bytes, line 1
1:this.clsNoChild,p="".concat(this.clsTitle," ").concat(u),f="".concat(this.clsTitleC),d="".concat(this.inputNameCls," ").concat(r," ").concat(n,"no-app"),h=a.level||0,g=t.getName(),v=t.getIcon(),y="".concat(e,"layer"),m=(null==s?void 0:s.getConfig()).icons,b=m.move,w=m.eye,_=m.eyeOff,C=m.chevron;return'\n <div class="'.concat(e,"layer-item ").concat(n,'one-bg" data-toggle-select>\n <div class="').concat(e,'layer-item-left">\n ').concat(l?'<i class="'.concat(e,'layer-vis" data-toggle-visible>\n <i class="').concat(e,'layer-vis-on">').concat(w,'</i>\n <i class="').concat(e,'layer-vis-off">').concat(_,"</i>\n </i>"):"",'\n <div class="').concat(f,'">\n <div class="').concat(p,'" style="padding-left: ').concat("".concat(10*h,"px"),'">\n <div class="').concat(e,'layer-title-inn" title="').concat(g,'">\n <i class="').concat(this.clsCaret,'" data-toggle-open>').concat(C,"</i>\n ").concat(v?'<span class="'.concat(y,'__icon">').concat(v,"</span>"):"",'\n <span class="').concat(d,'" data-name>').concat(g,'</span>\n </div>\n </div>\n </div>\n </div>\n <div class="').concat(e,'layer-item-right">\n <div class="').concat(this.clsCount,'" data-count>').concat(c||"",'</div>\n <div class="').concat(this.clsMove,'" ').concat(cW,">").concat(b||"",'</div>\n </div>\n </div>\n <div class="').concat(this.clsChildren,'"></div>\n ')},Object.defineProperty(e.prototype,"em",{get:function(){return this.module.em},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"ppfx",{get:function(){return this.em.getConfig().stylePrefix},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"pfx",{get:function(){return this.config.stylePrefix},enumerable:!1,configurable:!0}),e.prototype.initComponent=function(){var t=this,e=this.model,n=this.config.onInit,o=e.components();this.listenTo(o,"remove add reset",this.checkChildren),[["change:status",this.updateStatus],["change:open",this.updateOpening],["change:layerable",this.updateLayerable],["change:style:display",this.updateVisibility],["change:draggable",this.updateMove],["rerender:layer",this.render],["change:name change:custom-name",this.updateName]].forEach(function(n){return t.listenTo(e,n[0],n[1])}),this.$el.data("model",e),this.$el.data("collection",o),e.viewLayer=this,n.bind(this)({component:e,render:this.__render,listenTo:this.listenTo})},e.prototype.updateName=function(){this.getInputName().innerText=this.model.getName()},e.prototype.getVisibilityEl=function(){return this.getItemContainer().find("[data-toggle-visible]")},e.prototype.updateVisibility=function(){var t=this.pfx,e=this.model,n=this.module.isVisible(e)?"removeClass":"addClass";this.$el[n]("".concat(t,"layer-hidden")),this.getVisibilityEl()[n]("".concat(t,"layer-off"))},e.prototype.updateMove=function(){var t=this.model,e=this.config,n=this.getItemContainer().find("[".concat(cW,"]"))[0];if(n){var o=t.get("draggable")&&e.sortable;n.style.display=o?"":"none"}},e.prototype.toggleVisibility=function(t){null==t||t.stopImmediatePropagation();var e=this.module,n=this.model;e.setVisible(n,!e.isVisible(n))},e.prototype.handleEdit=function(t){null==t||t.stopPropagation();var e=this.em,n=this.$el,o=this.clsNoEdit,r=this.clsEdit,i=this.getInputName();i[cz]="true",i.focus(),document.execCommand("selectAll",!1),e.setEditing(!0),n.find(".".concat(this.inputNameCls)).removeClass(o).addClass(r)},e.prototype.handleEditKey=function(t){t.stopPropagation(),(V(t)||13===I(t))&&this.handleEditEnd(t)},e.prototype.handleEditEnd=function(t){null==t||t.stopPropagation();var e=this.em,n=this.$el,o=this.clsNoEdit,r=this.clsEdit,i=this.model,a=this.getInputName(),s=a.textContent;a.scrollLeft=0,a[cz]="false",i.setName(s),e.setEditing(!1),n.find(".".concat(this.inputNameCls)).addClass(o).removeClass(r),this.updateName()},e.prototype.getInputName=function(){return this.inputName||(this.inputName=this.el.querySelector(".".concat(this.inputNameCls))),this.inputName},e.prototype.updateOpening=function(){var t=this.$el,e=this.model,n=this.pfx,o="open",r="".concat(n,"layer-open"),i=this.getCaret();this.module.isOpen(e)?(t.addClass(o),i.addClass(r)):(t.removeClass(o),i.removeClass(r))},e.prototype.toggleOpening=function(t){var e=this.model,n=this.module;null==t||t.stopImmediatePropagation(),e.get("components").length&&n.setOpen(e,!n.isOpen(e))},e.prototype.handleSelect=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{selected:!0},{event:t})},e.prototype.handleHover=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!0})},e.prototype.handleHoverOut=function(t){null==t||t.stopPropagation();var e=this.module,n=this.model;e.setLayerData(n,{hovered:!1})},e.prototype.startSort=function(t){t.stopPropagation();var e,n,o,r=this.em,i=this.sorter,a=this.model;if((!t.button||0===t.button)&&i){var s=(null==(n=null==(e=a.delegate)?void 0:e.move)?void 0:n.call(e,a))||a;i.eventHandlers=cB({legacyOnStartSort:cR(r),legacyOnMoveClb:cV(r),legacyOnEndMove:cF(r,[s])},i.eventHandlers);var l=(null==(o=s.viewLayer)?void 0:o.el)||t.target;i.startSort([{element:l}])}},e.prototype.updateStatus=function(){rS.prototype.updateStatus.apply(this,[{avoidHover:!this.config.highlightHover,noExtHl:!0}])},e.prototype.getItemContainer=function(){return this.$el.children("[data-toggle-select]")},e.prototype.checkChildren=function(){var t=this.model,e=this.clsNoChild,n=this.module,o=n.getComponents(t).length,r=this.getItemContainer(),i=r.find(".".concat(this.clsTitle)),a=r.find("[data-count]");i[o?"removeClass":"addClass"](e),a.html("".concat(o||"")),o||n.setOpen(t,!1)},e.prototype.getCaret=function(){return this.caret&&this.caret.length||(this.caret=this.getItemContainer().find(".".concat(this.clsCaret))),this.caret},e.prototype.setRoot=function(t){var e,n=(0,b.isString)(t)?null==(e=this.em.getWrapper())?void 0:e.find(t)[0]:t;n&&(this.stopListening(),this.model=n,this.initComponent(),this._rendered&&this.render())},e.prototype.updateLayerable=function(){(this.parentView||this).render()},e.prototype.__clearItems=function(){var t;null==(t=this.items)||t.remove()},e.prototype.remove=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return tB.prototype.remove.apply(this,t),delete this.model.viewLayer,this.__clearItems(),this},e.prototype.render=function(){var t=this.model,e=this.config,n=this.pfx,o=this.ppfx,r=this.opt,i=this.sorter;this.__clearItems();var a=r.opened,s=r.module,l=r.ItemView,c=!s.__isLayerable(t),u=this.$el.empty(),p=r.level+1;delete this.inputName,this.items=new lb({ItemView:l,collection:t.get("components"),config:e,sorter:i,opened:a,parentView:this,parent:t,level:p,module:s});var f=this.items.render().$el;return e.showWrapper||1!==p?(u.html(this.template(t)),u.find(".".concat(this.clsChildren)).append(f)):u.append(f),s.isVisible(t)||(this.className+=" ".concat(n,"hide")),c&&(this.className+=" ".concat(o,"hidden")),u.attr("class",this.className),this.updateStatus(),this.updateOpening(),this.updateVisibility(),this.updateMove(),this.__render(),this._rendered=!0,this},e.prototype.__render=function(){var t=this.model,e=this.config,n=this.el,o=e.onRender,r={component:t,el:n};o.bind(this)(r),this.em.trigger(pD.render,r)},e}(tB),cq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cG=function(){return(cG=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},cK={mediaText:""},cY=["open","status","locked","custom-name","components","classes"].map(function(t){return"".concat(pi.update,":").concat(t)}).join(" "),cJ=function(t){function e(e){var n=t.call(this,e,"LayerManager",{stylePrefix:"",appendTo:"",sortable:!0,hidable:!0,hideTextnode:!0,root:"",showWrapper:!0,showHover:!0,scrollCanvas:{behavior:"smooth",block:"nearest"},scrollLayers:{behavior:"auto",block:"nearest"},highlightHover:!0,custom:!1,onInit:function(){},onRender:function(){},extend:{}})||this;return n.events=pD,(0,b.bindAll)(n,"componentChanged","__onRootChange","__onComponent"),n.model=new tQ(n,{opened:{}}),n.config.stylePrefix=n.config.pStylePrefix,n}return cq(e,t),e.prototype.onLoad=function(){var t=this,e=this.em,n=this.config,o=this.model;o.listenTo(e,pi.selected,this.componentChanged),o.on("change:root",this.__onRootChange),o.listenTo(e,cY,this.__onComponent),this.componentChanged(),o.listenToOnce(e,"load",function(){t.setRoot(n.root),t.__appendTo()})},e.prototype.setRoot=function(t){var e=this.em.getWrapper(),n=tP(t)?t:e;t&&(0,b.isString)(t)&&to()&&(n=e.find(t)[0]||e);var o=this.__getLayerFromComponent(n);return this.model.set("root",o),o},e.prototype.getRoot=function(){return this.model.get("root")},e.prototype.getComponents=function(t){var e=this;return t.components().map(function(t){return e.__getLayerFromComponent(t)}).filter(function(t){return e.__isLayerable(t)})},e.prototype.setOpen=function(t,e){t.set("open",e)},e.prototype.isOpen=function(t){return!!t.get("open")},e.prototype.setVisible=function(t,e){var n="__prev-display",o=t.getStyle(cK),r=o.display;if(e){var i=t.get(n);delete o.display,i&&(o.display=i,t.unset(n))}else r&&t.set(n,r),o.display="none";t.setStyle(o,cK),this.updateLayer(t),this.em.trigger(pi.toggled)},e.prototype.isVisible=function(t){var e;return void 0===(e=t.getStyle(cK))&&(e={}),0!==(e.display||"").trim().indexOf("none")},e.prototype.setLocked=function(t,e){t.set("locked",e)},e.prototype.isLocked=function(t){return!!t.get("locked")},e.prototype.setName=function(t,e){t.set("custom-name",e)},e.prototype.getName=function(t){return t.getName()},e.prototype.getLayerData=function(t){var e=t.get("status");return{name:t.getName(),open:this.isOpen(t),selected:"selected"===e,hovered:"hovered"===e,visible:this.isVisible(t),locked:this.isLocked(t),components:this.getComponents(t)}},e.prototype.setLayerData=function(t,e,n){void 0===n&&(n={});var o,r=this.em,i=this.config,a=e.open,s=e.selected,l=e.hovered,c=e.visible,u=e.locked,p=e.name,f=cG({fromLayers:!0},n);if(tn(a)&&this.setOpen(t,a),tn(s))if(s){r.setSelected(t,f);var d=i.scrollCanvas;d&&(null==(o=t.views)||o.forEach(function(t){return t.scrollIntoView(d)}))}else r.removeSelected(t,f);tn(l)&&i.showHover&&(l?r.setHovered(t,f):r.setHovered(null,f)),tn(c)&&c!==this.isVisible(t)&&this.setVisible(t,c),tn(u)&&this.setLocked(t,u),tn(p)&&this.setName(t,p)},e.prototype.componentChanged=function(t,e){if(void 0===e&&(e={}),!e.fromLayers){var n,o=this.em,r=this.config.scrollLayers,i=this.model.get("opened"),a=o.getSelected(),s=null==a?void 0:a.parent();for(var l in i)i[l].set("open",!1),delete i[l];for(;s;)s.set("open",!0),i[s.cid]=s,s=s.parent();if(a&&r){var c=null==(n=a.viewLayer)?void 0:n.el;null==c||c.scrollIntoView(r)}}},e.prototype.getAll=function(){return this.view},e.prototype.render=function(){var t,e,n=this.config,o=this.model,r=c$.extend(n.extend);return this.view=new r({el:null==(t=this.view)?void 0:t.el,ItemView:r,level:0,config:n,opened:o.get("opened"),model:this.getRoot(),module:this}),null==(e=this.view)?void 0:e.render().el},e.prototype.destroy=function(){var t;null==(t=this.view)||t.remove()},e.prototype.__onRootChange=function(){var t,e=this.em,n=this.events,o=this.getRoot();null==(t=this.view)||t.setRoot(o),e.trigger(n.root,o),this.__trgCustom()},e.prototype.__getLayerFromComponent=function(t){var e,n;return(null==(n=null==(e=t.delegate)?void 0:e.layer)?void 0:n.call(e,t))||t},e.prototype.__onComponent=function(t){this.updateLayer(t)},e.prototype.__isLayerable=function(t){var e=t.tagName;return(!this.config.hideTextnode||!t.isInstanceOf("textnode")&&"br"!==e)&&t.get("layerable")},e.prototype.__trgCustom=function(t){var e=this.__ctn,n=this.em,o=this.events;this.__ctn=e||(null==t?void 0:t.container),n.trigger(o.custom,{container:this.__ctn,root:this.getRoot()})},e.prototype.updateLayer=function(t,e){var n=this.em,o=this.events;n.trigger(o.component,t,e)},e}(tJ),cX=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
vendor: 14,906 bytes, line 1
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),cZ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cX(e,t),e.getDefaults=function(){return(0,b.result)(this.prototype,"defaults")},e.prototype.defaults=function(){return{type:"",src:""}},e.prototype.getType=function(){return this.get("type")},e.prototype.getSrc=function(){return this.get("src")||""},e.prototype.getFilename=function(){return this.getSrc().split("/").pop().split("?").shift()},e.prototype.getExtension=function(){return this.getFilename().split(".").pop()},e}(tH);cZ.prototype.idAttribute="src";var cQ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),c0=function(){return(c0=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},c1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return cQ(e,t),e.prototype.defaults=function(){return c0(c0({},cZ.getDefaults()),{type:"image",unitDim:"px",height:0,width:0})},e}(cZ),c2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),c3=function(t){function e(e){var n=t.call(this,e)||this;n.options=e,n.collection=e.collection;var o=e.config||{};n.config=o,n.pfx=o.stylePrefix||"",n.ppfx=o.pStylePrefix||"",n.em=o.em,n.className=n.pfx+"asset",n.listenTo(n.model,"destroy remove",n.remove),n.model.view=n;var r=n.init&&n.init.bind(n);return r&&r(e),n}return c2(e,t),e.prototype.__getBhv=function(){var t=this.em,e=null==t?void 0:t.Assets;return(null==e?void 0:e.__getBehaviour())||{}},e.prototype.template=function(t,e){var n=this.pfx;return'\n <div class="'.concat(n,'preview-cont">\n ').concat(this.getPreview(),'\n </div>\n <div class="').concat(n,'meta">\n ').concat(this.getInfo(),'\n </div>\n <div class="').concat(n,'close" data-toggle="asset-remove">\n ⨯\n </div>\n ')},e.prototype.updateTarget=function(t){t&&t.set&&(t.set("attributes",(0,b.clone)(t.get("attributes"))),t.set("src",this.model.get("src")))},e.prototype.getPreview=function(){return""},e.prototype.getInfo=function(){return""},e.prototype.render=function(){var t=this.el;return t.innerHTML=this.template(this,this.model),t.className=this.className,this},e}(tB),c5=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),c4=function(t,e){return Object.defineProperty?Object.defineProperty(t,"raw",{value:e}):t.raw=e,t},c9=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c5(e,t),e.prototype.getPreview=function(){var t=this.pfx,e=this.ppfx,n=this.model.get("src");return tD(pR||(pR=c4(['\n <div class="','preview" style="background-image: url(\'','\');"></div>\n <div class="',"preview-bg ",'checker-bg"></div>\n '],['\n <div class="','preview" style="background-image: url(\'','\');"></div>\n <div class="',"preview-bg ",'checker-bg"></div>\n '])),t,n,t,e)},e.prototype.getInfo=function(){var t=this.pfx,e=this.model,n=e.get("name"),o=e.get("width"),r=e.get("height"),i=e.get("unitDim"),a=o&&r?"".concat(o,"x").concat(r).concat(i):"";return n=n||e.getFilename(),tD(pV||(pV=c4(['\n <div class="','name">','</div>\n <div class="','dimensions">',"</div>\n "],['\n <div class="','name">','</div>\n <div class="','dimensions">',"</div>\n "])),t,n,t,a)},e.prototype.init=function(t){var e=this.pfx;this.className+=" ".concat(e,"asset-image")},e.prototype.onClick=function(){var t=this.model,e=this.pfx,n=this.__getBhv().select,o=this.config.onClick,r=this.collection;r.trigger("deselectAll"),this.$el.addClass(e+"highlight"),(0,b.isFunction)(n)?n(t,!1):(0,b.isFunction)(o)?o(t):this.updateTarget(r.target)},e.prototype.onDblClick=function(){var t=this.em,e=this.model,n=this.__getBhv().select,o=this.config.onDblClick,r=this.collection,i=r.target,a=r.onSelect;(0,b.isFunction)(n)?n(e,!0):(0,b.isFunction)(o)?o(e):(this.updateTarget(i),null==t||t.Modal.close()),(0,b.isFunction)(a)&&a(e)},e.prototype.onRemove=function(t){t.stopImmediatePropagation(),this.model.collection.remove(this.model)},e}(c3);c9.prototype.events={"click [data-toggle=asset-remove]":"onRemove",click:"onClick",dblclick:"onDblClick"};var c6=function(){return(c6=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};let c7={types:[],initialize:function(t,e){var n=this;void 0===e&&(e={});var o=e.em;this.em=o,this.opts=e,this.model=function(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),t&&t.type){var r,i,a,s=n.getBaseType();r=(a=n.getType(t.type))?a.model:s.model,i=a?a.view:s.view}else{var l=n.recognizeType(t);r=(a=l.type).model,i=a.view,t=l.attributes}var c=new r(t,c6(c6({},e),{em:o}));return c.typeView=i,n.model.prototype=r.prototype,c};var r=this.init&&this.init.bind(this);r&&r()},recognizeType:function(t){for(var e=this.getTypes(),n=0;n<e.length;n++){var o=e[n],r=o.isType(t);if(r="boolean"==typeof r&&r?{type:o.id}:r)return{type:o,attributes:r}}return{type:this.getBaseType(),attributes:t}},getBaseType:function(){var t=this.getTypes();return t[t.length-1]},getTypes:function(){return this.types},getType:function(t){for(var e=this.getTypes(),n=0;n<e.length;n++){var o=e[n];if(o.id===t)return o}},addType:function(t,e){var n=this.getType(t),o=this.getBaseType(),r=n?n.model:o.model,i=n?n.view:o.view,a=e.model,s=e.view,l=e.isType;a=a instanceof tH||(0,b.isFunction)(a)?a:r.extend(a||{}),s=s instanceof tB||(0,b.isFunction)(s)?s:i.extend(s||{}),!this.extendViewApi||e.model||e.view||(s=s.extend(e)),n?(n.model=a,n.view=s,n.isType=l||n.isType):(e.id=t,e.model=a,e.view=s,e.isType=l||function(e){if(e&&e.type==t)return!0},this.getTypes().unshift(e))},removeType:function(t){var e=this.getType(t);if(e){var n=this.getTypes().indexOf(e);return n>=0&&this.getTypes().splice(n,1),e}}};var c8=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ut=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c8(e,t),e}(tU.extend(c7));ut.prototype.types=[{id:"image",model:c1,view:c9,isType:function(t){return"string"==typeof t?{type:"image",src:t}:t}}],function(t){t.add="asset:add",t.remove="asset:remove",t.removeBefore="asset:remove:before",t.update="asset:update",t.open="asset:open",t.close="asset:close",t.uploadStart="asset:upload:start",t.uploadEnd="asset:upload:end",t.uploadError="asset:upload:error",t.uploadResponse="asset:upload:response",t.custom="asset:custom",t.all="asset"}(pF||(pF={}));let ue=pF;var un=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uo=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;n.options=e,n.config=e.config,n.pfx=n.config.stylePrefix||"",n.ppfx=n.config.pStylePrefix||"",n.em=n.config.em;var o=n.collection;return n.listenTo(o,"reset",n.renderAssets),n.listenTo(o,"add",n.addToAsset),n.listenTo(o,"remove",n.removedAsset),n.listenTo(o,"deselectAll",n.deselectAll),n}return un(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.ppfx,o=t.em,r="";return this.config.showUrlInput&&(r='\n <form class="'.concat(e,'add-asset">\n <div class="').concat(n,"field ").concat(e,'add-field">\n <input placeholder="').concat(null==o?void 0:o.t("assetManager.inputPlh"),'"/>\n </div>\n <button class="').concat(n,'btn-prim">').concat(null==o?void 0:o.t("assetManager.addButton"),'</button>\n <div style="clear:both"></div>\n </form>\n ')),'\n <div class="'.concat(e,'assets-cont">\n <div class="').concat(e,'assets-header">\n ').concat(r,'\n </div>\n <div class="').concat(e,'assets" data-el="assets"></div>\n <div style="clear:both"></div>\n </div>\n ')},e.prototype.handleSubmit=function(t){t.preventDefault();var e=this.getAddInput(),n=e&&e.value.trim(),o=this.config.handleAdd;if(n){e.value="";var r=this.getAssetsEl();r&&(r.scrollTop=0),o?o.bind(this)(n):this.options.globalCollection.add(n,{at:0})}},e.prototype.getAssetsEl=function(){return this.el.querySelector(".".concat(this.pfx,"assets"))},e.prototype.getAddInput=function(){return this.inputUrl&&this.inputUrl.value||(this.inputUrl=this.el.querySelector(".".concat(this.pfx,"add-asset input"))),this.inputUrl},e.prototype.removedAsset=function(t){this.collection.length||this.toggleNoAssets()},e.prototype.addToAsset=function(t){1==this.collection.length&&this.toggleNoAssets(!0),this.addAsset(t)},e.prototype.addAsset=function(t,e){void 0===e&&(e=null);var n=e,o=this.collection,r=this.config,i=new t.typeView({model:t,collection:o,config:r}).render().el;if(n)n.appendChild(i);else{var a=this.getAssetsEl();a&&a.insertBefore(i,a.firstChild)}return i},e.prototype.toggleNoAssets=function(t){void 0===t&&(t=!1);var e=this.$el.find(".".concat(this.pfx,"assets"));if(t)e.empty();else{var n=this.config.noAssets;n&&e.append(n)}},e.prototype.deselectAll=function(){var t=this.pfx;this.$el.find(".".concat(t,"highlight")).removeClass("".concat(t,"highlight"))},e.prototype.renderAssets=function(){var t=this,e=document.createDocumentFragment(),n=this.$el.find(".".concat(this.pfx,"assets"));n.empty(),this.toggleNoAssets(!!this.collection.length),this.collection.each(function(n){return t.addAsset(n,e)}),n.append(e)},e.prototype.render=function(){var t=this.options.fu.render().el;return this.$el.empty(),this.$el.append(t).append(this.template(this)),this.el.className="".concat(this.ppfx,"asset-manager"),this.renderAssets(),this},e}(tB);uo.prototype.events={submit:"handleSubmit"};var ur=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ui=function(t){function e(n){void 0===n&&(n={});var o=t.call(this,n)||this;o.options=n;var r=n.config||{};o.module=n.module,o.config=r,o.em=o.config.em,o.pfx=r.stylePrefix||"",o.ppfx=r.pStylePrefix||"",o.target=o.options.globalCollection||{},o.uploadId=o.pfx+"uploadFile",o.disabled=void 0!==r.disableUpload?r.disableUpload:!r.upload&&!r.embedAsBase64,o.multiUpload=void 0===r.multiUpload||r.multiUpload;var i=r.uploadFile;return i?o.uploadFile=i.bind(o):!r.upload&&r.embedAsBase64&&(o.uploadFile=e.embedAsBase64),o.delegateEvents(),o}return ur(e,t),e.prototype.template=function(t){var e,n,o=t.pfx,r=t.title,i=t.uploadId,a=t.disabled,s=t.multiUpload;return tD(pH||(e=['\n <form>\n <div id="','title">','</div>\n <input\n data-input\n type="file"\n id="','"\n name="file"\n accept="*/*"\n ',"\n ",'\n />\n <div style="clear:both;"></div>\n </form>\n '],n=['\n <form>\n <div id="','title">','</div>\n <input\n data-input\n type="file"\n id="','"\n name="file"\n accept="*/*"\n ',"\n ",'\n />\n <div style="clear:both;"></div>\n </form>\n '],Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,pH=e),o,r,i,a?"disabled":"",s?"multiple":"")},e.prototype.events=function(){return{"change [data-input]":"uploadFile"}},e.prototype.onUploadStart=function(){var t=this.module;null==t||t.__propEv(t.events.uploadStart)},e.prototype.onUploadEnd=function(t){var e=this.$el,n=this.module;null==n||n.__propEv(n.events.uploadEnd,t);var o=e.find("input");o&&o.val("")},e.prototype.onUploadError=function(t){var e=this.module;console.error(t),this.onUploadEnd(t),null==e||e.__propEv(e.events.uploadError,t)},e.prototype.onUploadResponse=function(t,e){var n,o=this.module,r=this.config,i=this.target;try{n="string"==typeof t?JSON.parse(t):t}catch(e){n=t}null==o||o.__propEv(o.events.uploadResponse,n),r.autoAdd&&i&&i.add(n.data,{at:0}),this.onUploadEnd(t),null==e||e(n)},e.prototype.uploadFile=function(t,e,n){var o,r=this,i=t.dataTransfer?t.dataTransfer.files:null==(o=t.target)?void 0:o.files,a=this.config,s=a.beforeUpload;if(!1!==(s&&s(i))){var l=new FormData,c=a.params,u=a.customFetch,p=a.fetchOptions;for(var f in c)l.append(f,c[f]);if(this.multiUpload)for(var d=0;d<i.length;d++)l.append("".concat(a.uploadName).concat(a.multiUploadSuffix),i[d]);
1else i.length&&l.append(a.uploadName,i[0]);var h=a.upload,g=a.headers,v="X-Requested-With";if(void 0===g[v]&&(g[v]="XMLHttpRequest"),h){this.onUploadStart();var y={method:"post",credentials:a.credentials||"include",headers:g,body:l},m=(null==p?void 0:p(y))||y;return(u?u(h,m):sR(h,m).then(function(t){return(t.status/200|0)==1?t.text():t.text().then(function(t){return Promise.reject(t)})})).then(function(t){return r.onUploadResponse(t,e)}).catch(function(t){return r.onUploadError(t)})}}},e.prototype.initDrop=function(){var t=this;if(!this.uploadForm){this.uploadForm=this.$el.find("form").get(0);var e=this.uploadForm;"draggable"in e&&(this.uploadForm.ondragover=function(){return e.className=t.pfx+"hover",!1},this.uploadForm.ondragleave=function(){return e.className="",!1},this.uploadForm.ondrop=function(n){e.className="",n.preventDefault(),t.uploadFile(n)})}},e.prototype.initDropzone=function(t){var e=this,n=0,o=this.config,r=t.model,i=t.el,a=r.Editor,s=r.Canvas.getBody(),l=this.ppfx,c="".concat(l,"dropzone-active"),u=function(){i.className=i.className.replace(c,"").trim(),n=0},p=function(){return n||(i.className+=" ".concat(c),n=1),!1},f=function(){return u(),!1},d=function(t){if(u(),t.preventDefault(),t.stopPropagation(),e.uploadFile(t),o.openAssetsOnDrop&&a){var n=a.getSelected();a.runCommand("open-assets",{target:n,onSelect:function(){a.Modal.close(),a.AssetManager.setTarget(null)}})}return!1};t.$el.append('<div class="'.concat("".concat(l,"dropzone"),'">').concat(o.dropzoneContent,"</div>")),u(),"draggable"in i&&[i,s].forEach(function(t){t.ondragover=p,t.ondragleave=f,t.ondrop=d})},e.prototype.render=function(){var t=this.$el,e=this.pfx,n=this.em;return t.html(this.template({title:n&&n.t("assetManager.uploadTitle"),uploadId:this.uploadId,disabled:this.disabled,multiUpload:this.multiUpload,pfx:e})),this.initDrop(),t.attr("class",e+"file-uploader"),this},e.embedAsBase64=function(t,e){var n=this,o=t.dataTransfer?t.dataTransfer.files:t.target.files,r={data:[]};if(!FileReader)return void this.onUploadError(Error("Unsupported platform, FileReader is not defined"));for(var i=[],a=/^(.+)\/(.+)$/,s=function(t){var e=new Promise(function(e,n){var o=new FileReader;o.addEventListener("load",function(r){var i,s=t.name,l=a.exec(t.type);if("image"===(i=l?l[1]:t.type)){var c={src:o.result,name:s,type:i,height:0,width:0},u=new Image;u.addEventListener("error",function(t){n(t)}),u.addEventListener("load",function(){c.height=u.height,c.width=u.width,e(c)}),u.src=c.src}else i?e({src:o.result,name:s,type:i}):e(o.result)}),o.addEventListener("error",function(t){n(t)}),o.addEventListener("abort",function(t){n("Aborted")}),o.readAsDataURL(t)});i.push(e)},l=0;l<o.length;l++)s(o[l]);return Promise.all(i).then(function(t){r.data=t,n.onUploadResponse(r,e)},function(t){n.onUploadError(t)})},e}(tB),ua=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),us=function(){return(us=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ul=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},uc="open-assets",uu=function(t){function e(e){var n=t.call(this,e,"AssetManager",new ut([],e),ue,{assets:[],noAssets:"",stylePrefix:"am-",upload:"",uploadName:"files",headers:{},params:{},credentials:"include",multiUpload:!0,multiUploadSuffix:"[]",autoAdd:!0,customFetch:void 0,uploadFile:void 0,embedAsBase64:!0,handleAdd:void 0,beforeUpload:void 0,showUrlInput:!0,custom:!1,dropzone:!1,openAssetsOnDrop:!0,dropzoneContent:""})||this;n.storageKey="assets",n.Asset=cZ,n.Assets=ut,n.events=ue;var o=n.all,r=n.config;n.assetsVis=new ut([]);var i=r.pStylePrefix;
1return i&&(r.stylePrefix="".concat(i).concat(r.stylePrefix)),o.on("add",function(t){return n.getAllVisible().add(t)}),o.on("remove",function(t){return n.getAllVisible().remove(t)}),n.__onAllEvent=(0,b.debounce)(function(){return n.__trgCustom()},0),n}return ua(e,t),e.prototype.open=function(t){void 0===t&&(t={}),this.em.Commands.run(uc,us({types:["image"],select:function(){}},t))},e.prototype.close=function(){this.em.Commands.stop(uc)},e.prototype.isOpen=function(){var t=this.em.Commands;return!!(null==t?void 0:t.isActive(uc))},e.prototype.add=function(t,e){return void 0===e&&(e={}),void 0===e.at&&(e.at=0),this.all.add(t,e)},e.prototype.get=function(t){return this.all.where({src:t})[0]||null},e.prototype.getAll=function(){return this.all},e.prototype.getAllVisible=function(){return this.assetsVis},e.prototype.remove=function(t,e){return this.__remove(t,e)},e.prototype.store=function(){return this.getProjectData()},e.prototype.load=function(t){return this.loadProjectData(t)},e.prototype.getContainer=function(){var t;return this.__getBehaviour().container||(null==(t=this.am)?void 0:t.el)},e.prototype.getAssetsEl=function(){var t;return null==(t=this.am)?void 0:t.el.querySelector("[data-el=assets]")},e.prototype.render=function(t){if(!this.getConfig().custom){var e=t||this.getAll().models;if(!this.am){var n=this.__viewParams();n.fu=this.FileUploader(),this.am=new uo(us({},n)),this.am.render()}return this.assetsVis.reset(e),this.getContainer()}},e.prototype.__viewParams=function(){return{collection:this.assetsVis,globalCollection:this.all,config:this.config,module:this,fu:void 0}},e.prototype.addType=function(t,e){this.getAll().addType(t,e)},e.prototype.removeType=function(t){return this.getAll().removeType(t)},e.prototype.getType=function(t){return this.getAll().getType(t)},e.prototype.getTypes=function(){return this.getAll().getTypes()},e.prototype.AssetsView=function(){return this.am},e.prototype.FileUploader=function(){return this.fu||(this.fu=new ui(this.__viewParams())),this.fu},e.prototype.onLoad=function(){var t=this;this.getAll().reset(this.config.assets);var e=this.em,n=this.events;e.Commands.__onRun(uc,function(){return t.__propEv(n.open)}),e.Commands.__onStop(uc,function(){return t.__propEv(n.close)})},e.prototype.postRender=function(t){var e;this.config.dropzone&&(null==(e=this.fu)||e.initDropzone(t))},e.prototype.setTarget=function(t){this.assetsVis.target=t},e.prototype.onSelect=function(t){this.assetsVis.onSelect=t},e.prototype.onClick=function(t){this.config.onClick=t},e.prototype.onDblClick=function(t){this.config.onDblClick=t},e.prototype.__propEv=function(t){for(var e,n,o=[],r=1;r<arguments.length;r++)o[r-1]=arguments[r];(e=this.em).trigger.apply(e,ul([t],o,!1)),(n=this.getAll()).trigger.apply(n,ul([t],o,!1))},e.prototype.__trgCustom=function(){var t=this.__getBehaviour(),e=this.getConfig().custom;(t.container||e.open)&&this.em.trigger(this.events.custom,this.__customData())},e.prototype.__customData=function(){var t=this,e=this.__getBehaviour();return{am:this,open:this.isOpen(),assets:this.getAll().models,types:e.types||[],container:e.container,close:function(){return t.close()},remove:function(e,n){return t.remove(e,n)},select:function(n,o){var r=t.add(n);(0,b.isFunction)(e.select)&&e.select(r,o)},options:e.options||{}}},e.prototype.__behaviour=function(t){return void 0===t&&(t={}),this._bhv=us(us({},this._bhv||{}),t)},e.prototype.__getBehaviour=function(t){return void 0===t&&(t={}),this._bhv||{}},e.prototype.destroy=function(){var t,e;this.all.stopListening(),this.all.reset(),this.assetsVis.stopListening(),this.assetsVis.reset(),null==(t=this.fu)||t.remove(),null==(e=this.am)||e.remove(),this._bhv={}},e}(tX),up=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return up(e,t),e.prototype.defaults=function(){return{name:"",width:null,height:"",widthMedia:null,priority:null}},e.prototype.initialize=function(){var t=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(e){return t.checkUnit(e)})},e.prototype.checkUnit=function(t){var e=this.get(t)||"";(parseFloat(e)||0).toString()===e.toString()&&this.set(t,"".concat(e,"px"))},e.prototype.getName=function(){return this.get("name")||this.get("id")},e.prototype.getWidthMedia=function(){return this.get("widthMedia")||""},e}(tH),ud=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return ud(e,t),e}(tU);uh.prototype.model=uf;var ug=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uv=function(t){function e(e){var n=t.call(this,e)||this;return n.config=e.config||{},n.em=n.config.em,n.ppfx=n.config.pStylePrefix||"",n.listenTo(n.em,"change:device",n.updateSelect),n}return ug(e,t),e.prototype.template=function(t){var e,n,o=t.ppfx,r=t.label;return tD(pU||(e=['\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" data-add-trasp>+</button>\n '],n=['\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" data-add-trasp>+</button>\n '],Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,pU=e),o,r,o,o,o,o,o,o,o)},e.prototype.events=function(){return{change:"updateDevice","click [data-add-trasp]":"startAdd"}},e.prototype.startAdd=function(){},e.prototype.updateDevice=function(){var t=this.em;if(t){var e=this.devicesEl;t.set("device",e?e.val():"")}},e.prototype.updateSelect=function(){var t=this.em,e=this.devicesEl;if(t&&t.getDeviceModel&&e){var n=t.getDeviceModel();e.val(n?n.get("id"):"")}},e.prototype.getOptions=function(){var t=this.collection,e=this.em,n="";return t.forEach(function(t){var o=t.attributes,r=o.name,i=o.id,a=e&&e.t&&e.t("deviceManager.devices.".concat(i))||r;n+='<option value="'.concat(i||r,'">').concat(a,"</option>")}),n},e.prototype.render=function(){var t=this.em,e=this.ppfx,n=this.$el,o=this.el,r=t&&t.t&&t.t("deviceManager.device");return n.html(this.template({ppfx:e,label:r})),this.devicesEl=n.find(".".concat(e,"devices")),this.devicesEl.append(this.getOptions()),this.devicesEl.val(t.get("device")),o.className="".concat(e,"devices-c"),this},e}(tB),uy=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),um=function(){return(um=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ub=function(t){function e(e){var n,o=t.call(this,e,"DeviceManager",new uh,t0,{default:"",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"}]})||this;return o.Device=uf,o.Devices=uh,o.storageKey="",o.devices=o.all,null==(n=o.config.devices)||n.forEac
1h(function(t){return o.add(t,{silent:!0})}),o.select(o.config.default||o.devices.at(0)),e.on("change:device",o._onSelect,o),o}return uy(e,t),e.prototype._onSelect=function(t,e,n){var o=this.em,r=this.events,i=t.previous("device"),a=this.get(e),s=r.select;o.trigger(s,a,this.get(i)),this.__catchAllEvent(s,a,n)},e.prototype.add=function(t,e){void 0===e&&(e={});var n,o=e;if((0,b.isString)(t)){var r=e;o=arguments[2]||{},n=um(um({},o),{id:t,name:o.name||t,width:r})}else n=t;return n.id||(n.id=n.name||this._createId()),this.devices.add(n,o)},e.prototype.get=function(t){return this.getAll().filter(function(e){return e.get("name")===t})[0]||this.devices.get(t)||null},e.prototype.remove=function(t,e){return void 0===e&&(e={}),this.__remove(t,e)},e.prototype.getDevices=function(){return this.devices.models},e.prototype.select=function(t,e){void 0===e&&(e={});var n=(0,b.isString)(t)?this.get(t):t;return n&&this.em.set("device",n.get("id"),e),this},e.prototype.getSelected=function(){return this.get(this.em.get("device"))},e.prototype.getAll=function(){return this.devices},e.prototype.render=function(){var t,e=this.em;return null==(t=this.view)||t.remove(),this.view=new uv({collection:this.devices,config:um({em:e},this.config)}),this.view.render().el},e.prototype.destroy=function(){this.__destroy()},e}(tX),uw=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u_=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e,n)||this,r=n.em,i={};o.em=r,e.frames||(i.component=e.component,i.styles=e.styles,["component","styles"].map(function(t){return o.unset(t)}));var a=e.frames||[i],s=new eo(r.Canvas,a);return s.page=o,o.set("frames",s),o.getId()||o.set("id",null==r?void 0:r.Pages._createId()),null==r||r.UndoManager.add(s),o}return uw(e,t),e.prototype.defaults=function(){return{name:"",frames:[],_undo:!0}},e.prototype.onRemove=function(){this.getFrames().reset()},e.prototype.getFrames=function(){return this.get("frames")},e.prototype.getId=function(){return this.id},e.prototype.getName=function(){return this.get("name")},e.prototype.setName=function(t){return this.set({name:t})},e.prototype.getAllFrames=function(){return this.getFrames().models||[]},e.prototype.getMainFrame=function(){return this.getFrames().at(0)},e.prototype.getMainComponent=function(){var t=this.getMainFrame();return null==t?void 0:t.getComponent()},e.prototype.toJSON=function(t){void 0===t&&(t={});var e=tH.prototype.toJSON.call(this,t),n=(0,b.result)(this,"defaults");return(0,b.forEach)(e,function(t,n){0===n.indexOf("_")&&delete e[n]}),(0,b.forEach)(n,function(t,n){e[n]===t&&delete e[n]}),e},e}(tH),uC=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ux=function(){return(ux=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},uO=function(t){function e(e,n){var o=t.call(this,e)||this;return o.on("reset",o.onReset),o.on("remove",o.onRemove),o.model=function(t,e){return void 0===e&&(e={}),new u_(t,ux(ux({},e),{em:n}))},o}return uC(e,t),e.prototype.onReset=function(t,e){var n,o=this;null==(n=null==e?void 0:e.previousModels)||n.map(function(t){return o.onRemove(t,o,e)})},e.prototype.onRemove=function(t,e,n){void 0===n&&(n={}),n.fromUndo||n.temporary||null==t||t.onRemove()},e}(tU),uS=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uT=function(){return(uT=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},uP=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},uE=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},uk="change:selected",uj="main",uA=function(t){function e(e){var n=t.call(this,e,"PageManager",new uO([],e),t1)||this;n.events=t1,n.storageKey="pages",(0,b.bindAll)(n,"_onPageChange");var o=new tQ(n,{_undo:!0});return n.model=o,n.pages.on("reset",n.__onReset,n),n.pages.on("all",n.__onChange,n),o.on(uk,n._onPageChange),n}return uS(e,t),Object.defineProperty(e.prototype,"pages",{get:function(){return this.all},enumerable:!1,configurable:!0}),e.prototype.getAll=function(){return uE([],this.all.models,!0)},e.prototype.__onChange=function(t,e,n,o){var r=this.em,i=this.events;r.trigger(i.all,{event:t,page:e,options:o||n})},e.prototype.__onReset=function(){var t=this.pages.at(0);t&&this.select(t)},e.prototype.onLoad=function(){var t,e=this.pages,n=this.config,o=this.em,r={silent:!0},i=(null==(t=n.pages)?void 0:t.map(function(t){return new u_(t,{em:o,config:n})}))||[];e.add(i,r);var a=e.length?this._initPage():this.add({type:uj},r);a&&this.select(a,r)},e.prototype._onPageChange=function(t,e,n){var o=this.em,r=this.events,i=o.Layers,a=e.getMainComponent();i&&a&&i.setRoot(a),o.trigger(r.select,e,t.previous("selected")),this.__onChange(uk,e,n)},e.prototype.postLoad=function(){var t=this.em,e=this.model,n=this.pages,o=t.UndoManager;o.add(e),o.add(n),n.on("add remove reset change",function(e,n,o){var r=o||n;t.changesUp(o||n,{page:e,options:r})})},e.prototype.add=function(t,e){var n=this;void 0===e&&(e={});var o=this.em,r=this.events;t.id=t.id||this._createId();var i=function(){var o=n.pages.add(new u_(t,{em:n.em,config:n.config}),e);return e.select&&n.select(o),o};return e.silent||o.trigger(r.addBefore,t,i,e),e.abort?void 0:i()},e.prototype.remove=function(t,e){var n=this;void 0===e&&(e={});var o=this.em,r=this.events,i=(0,b.isString)(t)?this.get(t):t,a=function(){return i&&n.pages.remove(i,e),i};return e.silent||o.trigger(r.removeBefore,i,a,e),!e.abort&&a()},e.prototype.move=function(t,e){void 0===e&&(e={});var n=this.pages,o=(0,b.isString)(t)?this.get(t):t,r=e.at,i=void 0===r?0:r,a=uP(e,["at"]);if(o){var s=n.indexOf(o)===i;if(!(i<0)&&!(i>=n.length)&&!s)return this.remove(o,uT(uT({},a),{temporary:!0})),n.add(o,uT(uT({},a),{at:i})),o}},e.prototype.get=function(t){return this.pages.filter(function(e){return e.get(e.idAttribute)===t})[0]},e.prototype.getMain=function(){var t=this.pages;return t.filter(function(t){return t.get("type")===uj})[0]||t.at(0)},e.prototype.getAllWrappers=function(){var t=this.getAll();return(0,b.unique)((0,b.flatten)(t.map(function(t){return t.getAllFrames().map(function(t){return t.getComponent()})})))},e.prototype.select=function(t,e){void 0===e&&(e={});var n=this.em,o=this.model,r=this.events,i=(0,b.isString)(t)?this.get(t):t;return i&&(n.trigger(r.selectBefore,i,e),o.set("selected",i,e)),this},e.prototype.getSelected=function(){return this.model.get("selected")},e.prototype.destroy=function(){var t=this;this.pages.off().reset(),this.model.stopListening(),this.model.clear({silent:!0}),["selected","model"].map(function(e){return t[e]=0})},e.prototype.store=function(){return this.getProjectData()},e.prototype.load=function(t){var e=this,n=this.loadProjectData(t,{all:this.pages,reset:!0,onResult:function(t,n){t.forEach(function(t){return e.add(t,n)}),e.__onReset()}});
1return this.pages.forEach(function(t){return t.getFrames().initRefs()}),n},e.prototype._initPage=function(){return this.get(this.config.selected)||this.getMain()},e.prototype._createId=function(){var t,e=this.getAll().length+16,n=this.getAllMap();do t=tA(e);while(n[t]);return t},e}(tX);let uM={placeholder:"eg. Text here"},uD={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",categories:{},traits:{labels:{},attributes:{id:uM,alt:uM,title:uM,href:{placeholder:"eg. https://google.com"}},options:{target:{false:"This window",_blank:"New window"}}}},storageManager:{recover:"Do you want to recover unsaved changes?"}};!function(t){t.add="i18n:add",t.update="i18n:update",t.locale="i18n:locale"}(pB||(pB={}));let uL=pB;var uI=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uN=function(t){function e(e){var n=t.call(this,e,"I18n",{locale:"en",localeFallback:"en",detectLocale:!0,debug:!1,messages:{en:uD},messagesAdd:void 0})||this;n.events=uL;var o=n.config.messagesAdd;return o&&n.addMessages(o),n.config.detectLocale&&(n.config.locale=n._localLang()),n}return uI(e,t),e.prototype.setLocale=function(t){var e=this.em,n=this.config,o=this.events;return e.trigger(o.locale,{value:t,valuePrev:n.locale}),n.locale=t,this},e.prototype.getLocale=function(){return this.config.locale},e.prototype.getMessages=function(t,e){void 0===e&&(e={});var n=this.config.messages;return t&&!n[t]&&this._debug("'".concat(t,"' i18n lang not found"),e),t?n[t]:n},e.prototype.setMessages=function(t){var e=this.em,n=this.config,o=this.events;return n.messages=t,e.trigger(o.update,t),this},e.prototype.addMessages=function(t){var e=this.em,n=this.events,o=this.config.messages;return e.trigger(n.add,t),this.setMessages(tw(o,t)),this},e.prototype.t=function(t,e){void 0===e&&(e={});var n=this.config,o=e.params||{},r=e.l||this.getLocale(),i=e.lFlb||n.localeFallback,a=this._getMsg(t,r,e);return a||(a=this._getMsg(t,i,e)),a||this._debug("'".concat(t,"' i18n key not found in '").concat(r,"' lang"),e),a=a&&(0,b.isString)(a)?this._addParams(a,o):a},e.prototype._localLang=function(){var t=to()&&window.navigator||{},e=t.language||t.userLanguage;return e?e.split("-")[0]:"en"},e.prototype._addParams=function(t,e){var n=RegExp("{([\\w\\d-]*)}","g");return t.replace(n,function(t,n){return e[n]||""}).trim()},e.prototype._getMsg=function(t,e,n){void 0===n&&(n={});
1var o=this.getMessages(e,n);if(o){var r=o[t];return!r&&t.indexOf(".")>0&&(r=t.split(".").reduce(function(t,e){if(!(0,b.isUndefined)(t))return t[e]},o)),r}},e.prototype._debug=function(t,e){void 0===e&&(e={});var n=this.em,o=this.config;(e.debug||o.debug)&&n&&n.logWarning(t)},e.prototype.destroy=function(){},e}(tJ),uR=function(){return(uR=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},uV=function(t,e){void 0===e&&(e={});var n=e.prefix||"",o=document.createElement("i");return o.className=n+"resizer-h "+n+"resizer-h-"+t,o.setAttribute("data-"+n+"handler",t),o},uF=function(t,e){var n=e||window,o=t.getBoundingClientRect();return{left:o.left+n.pageXOffset,top:o.top+n.pageYOffset,width:o.width,height:o.height}},uH=function(){function t(t){void 0===t&&(t={}),this.moved=!1,this.defOpts={ratioDefault:!1,onUpdateContainer:function(){},step:1,minDim:10,maxDim:1/0,unitHeight:"px",unitWidth:"px",keyHeight:"height",keyWidth:"width",currentUnit:!0,silentFrames:!1,avoidContainerUpdate:!1,keepAutoHeight:!1,keepAutoWidth:!1,autoHeight:!1,autoWidth:!1,tl:!0,tc:!0,tr:!0,cl:!0,cr:!0,bl:!0,bc:!0,br:!0},this.opts=uR({},this.defOpts),this.setOptions(t),(0,b.bindAll)(this,"handleKeyDown","handleMouseDown","move","stop")}return t.prototype.getConfig=function(){return this.opts},t.prototype.setOptions=function(t,e){void 0===t&&(t={}),this.opts=uR(uR({},e?this.defOpts:this.opts),t),this.setup()},t.prototype.setup=function(){var t=this.opts,e=t.prefix||"",n=t.appendTo||document.body,o=this.container;for(o||((o=document.createElement("div")).className="".concat(e,"resizer-c"),n.appendChild(o),this.container=o);o.firstChild;)o.removeChild(o.firstChild);var r={};for(var i in["tl","tc","tr","cl","cr","bl","bc","br"].forEach(function(e){return r[e]=t[e]?uV(e,t):null}),r){var a=r[i];a&&o.appendChild(a)}this.handlers=r,this.mousePosFetcher=t.mousePosFetcher,this.updateTarget=t.updateTarget,this.posFetcher=t.posFetcher,this.onStart=t.onStart,this.onMove=t.onMove,this.onEnd=t.onEnd,this.onUpdateContainer=t.onUpdateContainer},t.prototype.toggleFrames=function(t){if(this.opts.silentFrames){var e=document.querySelectorAll("iframe");(0,b.each)(e,function(e){return e.style.pointerEvents=t?"none":""})}},t.prototype.isHandler=function(t){var e=this.handlers;for(var n in e)if(e[n]===t)return!0;return!1},t.prototype.getFocusedEl=function(){return this.el},t.prototype.getParentEl=function(){var t;return null==(t=this.el)?void 0:t.parentElement},t.prototype.getDocumentEl=function(){return this.opts.docs||[this.el.ownerDocument,document]},t.prototype.getElementPos=function(t,e){void 0===e&&(e={});var n=this.posFetcher;return n?n(t,e):uF(t)},t.prototype.focus=function(t){t&&t===this.el||(this.el=t,this.updateContainer({forceShow:!0}),U(this.getDocumentEl(),"pointerdown",this.handleMouseDown))},t.prototype.blur=function(){this.container.style.display="none",this.el&&(B(this.getDocumentEl(),"pointerdown",this.handleMouseDown),delete this.el)},t.prototype.start=function(t){var e,n=this.el,o=this.opts;if(this.moved=!1,0===t.button&&n){t.preventDefault(),t.stopPropagation(),null==(e=this.selectedHandler)||e.setPointerCapture(t.pointerId);var r=this.getParentEl(),i=void 0===o?{}:o,a=this.mousePosFetcher,s="data-"+i.prefix+"handler",l=this.getElementPos(n,{avoidFrameZoom:!0,avoidFrameOffset:!0}),c=this.getElementPos(r),u=t.target;this.handlerAttr=u.getAttribute(s),this.clickedHandler=u,this.startDim={t:l.top,l:l.left,w:l.width,h:l.height},this.rectDim={t:l.top,l:l.left,w:l.width,h:l.height},this.startPos=a?a(t):{x:t.clientX,y:t.clientY},this.parentDim={t:c.top,l:c.left,w:c.width,h:c.height};var p=this.getDocumentEl();this.docs=p,U(p,"pointermove",this.move),U(p,"keydown",this.handleKeyDown),U(p,"pointerup",this.stop),(0,b.isFunction)(this.onStart)&&this.onStart(t,{docs:p,config:i,el:n,resizer:this}),this.toggleFrames(!0),i.updateOnMove||this.move(t)}},t.prototype.move=function(t){this.moved=!0;var e,n,o=this.el,r=this.opts,i=this.docs||this.getDocumentEl(),a=(null==(e=this.mousePosFetcher)?void 0:e.call(this,t))||{x:t.clientX,y:t.clientY};this.currentPos=a,this.delta={x:a.x-this.startPos.x,y:a.y-this.startPos.y},this.keys={shift:t.shiftKey,ctrl:t.ctrlKey,alt:t.altKey},this.rectDim=this.calc(this),this.updateRect(!1,t),null==(n=this.onMove)||n.call(this,t,{docs:i,config:r,el:o,resizer:this})},t.prototype.stop=function(t){var e,n,o=this.el,r=this.opts,i=this.docs||this.getDocumentEl();B(i,"pointermove",this.move),B(i,"keydown",this.handleKeyDown),B(i,"pointerup",this.stop),(this.moved||!r.updateOnMove)&&this.updateRect(!0,t),t.pointerId&&(null==(e=this.selectedHandler)||e.releasePointerCapture(t.pointerId)),this.toggleFrames(),null==(n=this.onEnd)||n.call(this,t,{docs:i,config:r,el:o,resizer:this}),this.moved=!1,delete this.docs},t.prototype.updateRect=function(t,e){var n=this.el,o=this.opts,r=this.rectDim,i=this.updateTarget,a=this.getSelectedHandler(),s=o.unitHeight,l=o.unitWidth,c=o.keyWidth,u=o.keyHeight;if((0,b.isFunction)(i))i(n,r,{store:t,selectedHandler:a,resizer:this,config:o,event:e});else{var p=n.style;p[c]=r.w+l,p[u]=r.h+s}this.updateContainer()},t.prototype.updateContainer=function(t){void 0===t&&(t={});var e,n=this.opts,o=this.container,r=this.el,i=o.style;!n.avoidContainerUpdate&&r&&t.forceShow&&(i.display="block"),null==(e=this.onUpdateContainer)||e.call(this,{el:o,resizer:this,opts:uR(uR({},n),t)})},t.prototype.getSelectedHandler=function(){var t=this.handlers;if(this.selectedHandler){for(var e in t)if(t[e]===this.selectedHandler)return e}},t.prototype.handleKeyDown=function(t){27===t.keyCode&&(this.rectDim=this.startDim,this.stop(t))},t.prototype.handleMouseDown=function(t){var e=t.target;this.isHandler(e)?(this.selectedHandler=e,this.start(t)):e!==this.el&&(delete this.selectedHandler,this.blur()
1)},t.prototype.calc=function(t){var e,n=this.opts||{},o=n.step,r=this.startDim,i=n.minDim,a=n.maxDim,s=t.delta.x,l=t.delta.y,c=this.parentDim.w,u=this.parentDim.h,p=n.unitWidth,f=n.unitHeight,d=n.skipUnitAdjustments,h=this.getParentRect(),g="%"===p&&!d,v="%"===f&&!d,y=g?r.w/100*c:r.w,m=v?r.h/100*u:r.h,b={t:r.t-h.top,l:r.l-h.left,w:y,h:m};if(t){var w=t.handlerAttr;~w.indexOf("r")&&(e=Math.max(i,e=g?tf((y+s*o)/c*100,.01):tf(y+s*o,o)),a&&(e=Math.min(a,e)),b.w=e),~w.indexOf("b")&&(e=Math.max(i,e=v?tf((m+l*o)/u*100,.01):tf(m+l*o,o)),a&&(e=Math.min(a,e)),b.h=e),~w.indexOf("l")&&(e=Math.max(i,e=g?tf((y-s*o)/c*100,.01):tf(y-s*o,o)),a&&(e=Math.min(a,e)),b.w=e),~w.indexOf("t")&&(e=Math.max(i,e=v?tf((m-l*o)/u*100,.01):tf(m-l*o,o)),a&&(e=Math.min(a,e)),b.h=e);var _=n.ratioDefault?!t.keys.shift:t.keys.shift;if(0>w.indexOf("c")&&_){var C=r.w/r.h;b.w/b.h>C?b.h=Math.round(b.w/C):b.w=Math.round(b.h*C)}for(var x in~w.indexOf("l")&&(b.l+=r.w-b.w),~w.indexOf("t")&&(b.t+=r.h-b.h),b)b[x]=parseInt("".concat(b[x]),10);return b}},t.prototype.getParentRect=function(){var t={left:0,top:0,width:0,height:0},e=this.el;if(!e)return t;var n=e.offsetParent;return n&&"BODY"!==n.tagName&&(t=this.getElementPos(n)),t},t}(),uU=function(){return(uU=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};function uB(t){var e=t.getBoundingClientRect();return{top:e.top+document.body.scrollTop,left:e.left+document.body.scrollLeft}}function uz(t,e){var n;return!!(null==(n=null==t?void 0:t.matches)?void 0:n.call(t,e))}function uW(t){return t?[t].concat(uW(t.parent())):[]}var u$=function(){function t(t){this.timeout=null,this.threshold=t}return t.prototype.updateArgs=function(t){this.lastArgs=t},t.prototype.execute=function(t){var e=this;this.timeout||(this.timeout=setTimeout(function(){e.lastArgs&&t(e.lastArgs),e.timeout=null},this.threshold))},t.prototype.clearTimeout=function(){this.timeout&&(clearTimeout(this.timeout),this.timeout=null),delete this.lastArgs},t}(),uq=function(){return(uq=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},uG=function(){function t(t){this.top=t.top,this.left=t.left,this.height=t.height,this.width=t.width,this.offsets=t.offsets,this.dir=t.dir}return t.prototype.calculateDimensionDifference=function(t){return{topDifference:t.top-this.top,leftDifference:t.left-this.left}},t.prototype.adjustDimensions=function(t){return this.top+=t.topDifference,this.left+=t.leftDifference,this},t.prototype.determinePlacement=function(t,e){var n=this.left+this.width/2,o=this.top+this.height/2;return this.dir?e<o?"before":"after":t<n?"before":"after"},t.prototype.equals=function(t){return!!t&&this.top===t.top&&this.left===t.left&&this.height===t.height&&this.width===t.width&&this.dir===t.dir&&JSON.stringify(this.offsets)===JSON.stringify(t.offsets)}
1,t.prototype.clone=function(){return new t({top:this.top,left:this.left,height:this.height,width:this.width,offsets:uq({},this.offsets),dir:this.dir})},t.prototype.getDropArea=function(t){var e=this.clone(),n=this.adjustDropDimension(this.width,this.left,t),o=n.newSize,r=n.newPosition;e.width=o,e.left=r;var i=this.adjustDropDimension(this.height,this.top,t),a=i.newSize,s=i.newPosition;return e.height=a,e.top=s,e},t.prototype.adjustDropDimension=function(t,e,n){var o=n.ratio,r=n.minUndroppableDimension,i=n.maxUndroppableDimension,a=t*(1-o)/2;return{newSize:t-2*(a=Math.min(a=Math.max(a,r),i)),newPosition:e+a}},t.prototype.isWithinBounds=function(t,e){return t>=this.left&&t<=this.left+this.width&&e>=this.top&&e<=this.top+this.height},t}(),uK=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uY=function(t){function e(e){var n=t.call(this)||this;return n.sourceNodes=[],n.containerOffset={top:0,left:0},n.moveThreshold=20,n.treeClass=e.treeClass,n.em=e.em,n.containerContext=e.containerContext,n.positionOptions=e.positionOptions,n.dragDirection=e.dragDirection,n.eventHandlers=e.eventHandlers,(0,b.bindAll)(n,"endDrag","cancelDrag","recalculateTargetOnScroll","startSort","onDragStart","onMove"),n.restLastMoveData(),n.rateLimiter=new u$(n.moveThreshold),n}return uK(e,t),e.prototype.startSort=function(t){this.sourceNodes=t,this.bindDragEventHandlers()},e.prototype.bindDragEventHandlers=function(){U(this.containerContext.container,"dragstart",this.onDragStart),U(this.containerContext.container,"mousemove dragover",this.onMove),U(this.containerContext.document,"mouseup dragend touchend",this.endDrag)},e.prototype.recalculateTargetOnScroll=function(){var t=this.lastMoveData.mouseEvent;t&&this.onMove(t)},e.prototype.onMove=function(t){this.rateLimiter.updateArgs(t),this.rateLimiter.execute(this.handleMove.bind(this))},e.prototype.handleMove=function(t){this.adjustForScroll();var e,n,o,r,i,a,s,l=this.lastMoveData.targetNode;null==(n=(e=this.eventHandlers).onMouseMove)||n.call(e,t),this.cacheContainerPosition();var c=this.getMousePositionRelativeToContainer(t.clientX,t.clientY),u=c.mouseXRelative,p=c.mouseYRelative,f=this.getMouseTargetElement(t),d=this.getFirstElementWithAModel(f),h=d?null==(o=(0,tN.default)(d))?void 0:o.data("model"):void 0,g=h?this.getOrCreateHoveredNode(h):void 0,v=g?this.getIndexInParent(g,g.nodeDimensions,u,p):0,y=g?this.getValidParent(g,0,u,p):void 0;if((null==y?void 0:y.equals(l))||null==(i=(r=this.eventHandlers).onTargetChange)||i.call(r,l,y),!y||!g){this.triggerLegacyOnMoveCallback(t,0),this.triggerMoveEvent(u,p),this.restLastMoveData();return}var m=this.getDropPosition(y,u,p),b=m.index,w=m.placement,_=m.placeholderDimensions;_.equals(this.lastMoveData.placeholderDimensions)&&w===this.lastMoveData.placement||null==(s=(a=this.eventHandlers).onPlaceholderPositionChange)||s.call(a,_,w),this.lastMoveData={targetNode:y,hoveredNode:g,mouseEvent:t,index:b,hoveredIndex:v,placement:w,placeholderDimensions:_},this.triggerMoveEvent(u,p),this.triggerLegacyOnMoveCallback(t,b)},e.prototype.adjustForScroll=function(){var t,e,n=this.lastMoveData.targetNode;if(null==n?void 0:n.element){var o=this.getDim(null==n?void 0:n.element),r=null==(t=n.nodeDimensions)?void 0:t.calculateDimensionDifference(o);r&&n.adjustDimensions(r)}var i=this.lastMoveData.hoveredNode;if(null==i?void 0:i.element){var o=this.getDim(null==i?void 0:i.element),r=null==(e=i.nodeDimensions)?void 0:e.calculateDimensionDifference(o);r&&i.adjustDimensions(r)}},e.prototype.restLastMoveData=function(){this.lastMoveData={targetNode:void 0,index:void 0,placement:void 0,mouseEvent:void 0}},e.prototype.triggerLegacyOnMoveCallback=function(t,e){var n,o,r,i,a=null==(n=this.sourceNodes[0])?void 0:n.model;null==(r=(o=this.eventHandlers).legacyOnMoveClb)||r.call(o,{event:t,target:a,parent:null==(i=this.lastMoveData.targetNode)?void 0:i.model,index:e})},e.prototype.triggerMoveEvent=function(t,e){var n,o=this.lastMoveData,r=o.targetNode,i=o.placement,a=o.index,s=a?a+("after"===i?-1:0):0;this.em.trigger("sorter:drag",{target:(null==r?void 0:r.element)||null,targetModel:null==(n=this.lastMoveData.targetNode)?void 0:n.model,sourceModel:this.sourceNodes[0].model,dims:(null==r?void 0:r.childrenDimensions)||[],pos:{index:s,indexEl:s,placement:i},x:t,y:e})},e.prototype.getDropPosition=function(t,e,n){var o,r=t.nodeDimensions,i=t.childrenDimensions,a=t.getChildren(),s=a&&a.length>0;r=r||this.getDim(t.element),t.nodeDimensions=r,i=i||this.getChildrenDim(t),t.childrenDimensions=i;var l=r.clone(),c=0,u="inside";return s&&(c=(o=function(t,e,n){for(var o,r={index:0,placement:"before"},i=0,a=0,s=0,l=0,c=0,u=0,p=0,f=0,d=t.length;f<d;f++){var h=(o=t[f]).top,g=o.left,v=o.height,y=o.width;
1if(s=g+y,p=h+v,c=g+y/2,u=h+v/2,(!a||!(g>a))&&(!l||!(u>=l))&&(!i||!(s<i)))if(r.index=f,o.dir)if(n<u){r.placement="before";break}else r.placement="after";else n<p&&(l=p),e<c?(a=c,r.placement="before"):(i=c,r.placement="after")}return r}(i,e,n)).index,u=o.placement,l=i[c].clone(),c+=+("after"==u)),{index:c,placement:u,placeholderDimensions:l}},e.prototype.getOrCreateHoveredNode=function(t){var e=this.lastMoveData.hoveredNode,n=new this.treeClass(t),o=n.equals(e),r=o?e:n;return r.nodeDimensions=o?e.nodeDimensions:this.getDim(n.element),r},e.prototype.getMouseTargetElement=function(t){var e=this.containerContext.customTarget,n=this.containerContext.document.elementFromPoint(t.clientX,t.clientY);return e?e({event:t}):n},e.prototype.onDragStart=function(t){this.eventHandlers.onDragStart&&this.eventHandlers.onDragStart(t)},e.prototype.endDrag=function(){this.dropDragged()},e.prototype.cancelDrag=function(){var t,e,n=this.lastMoveData.targetNode;null==(e=(t=this.eventHandlers).onTargetChange)||e.call(t,n,void 0),this.finalizeMove()},e.prototype.finalizeMove=function(){var t,e,n,o;this.cleanupEventListeners(),this.triggerOnDragEndEvent(),null==(e=(t=this.eventHandlers).onEnd)||e.call(t),null==(o=(n=this.eventHandlers).legacyOnEnd)||o.call(n),this.restLastMoveData(),this.rateLimiter.clearTimeout()},e.prototype.dropDragged=function(){var t,e,n=this.lastMoveData,o=n.targetNode,r=n.index;null==(e=(t=this.eventHandlers).onDrop)||e.call(t,o,this.sourceNodes,r),this.finalizeMove()},e.prototype.triggerOnDragEndEvent=function(){var t=this.lastMoveData.targetNode,e=this.sourceNodes[0];this.em.trigger("sorter:drag:end",{targetCollection:t?t.getChildren():null,modelToDrop:null==e?void 0:e.model,warns:[""],validResult:{result:!0,src:this.sourceNodes.map(function(t){return t.element}),srcModel:null==e?void 0:e.model,trg:null==t?void 0:t.element,trgModel:null==t?void 0:t.model,draggable:!0,droppable:!0},dst:null==t?void 0:t.element,srcEl:null==e?void 0:e.element})},e.prototype.getFirstElementWithAModel=function(t){for(;t&&this.containerContext.container.contains(t);){var e;if(e=t,void 0!==(0,tN.default)(e).data("model"))return t;t=t.parentElement}return null},e.prototype.getValidParent=function(t,e,n,o){if(t){var r,i,a=this.lastMoveData,s=a.targetNode,l=a.hoveredNode,c=a.hoveredIndex,u=a.mouseEvent,p=t.equals(l);t.nodeDimensions=p?l.nodeDimensions:this.getDim(t.element);var f=this.getIndexInParent(t,t.nodeDimensions,n,o),d=t.isWithinDropBounds(n,o);if(p&&f===c&&d===t.isWithinDropBounds(null!=(r=null==u?void 0:u.clientX)?r:0,null!=(i=null==u?void 0:u.clientY)?i:0)&&s)return s;if(!d)return this.handleParentTraversal(t,n,o);var h=this.sourceNodes.some(function(n){return t.canMove(n,e)});return(this.triggerDragValidation(h,t),h)?t:this.handleParentTraversal(t,n,o)}},e.prototype.handleParentTraversal=function(t,e,n){var o=t.getParent();if(o){var r=this.getIndexInParent(t,t.nodeDimensions,e,n);if(void 0!==r)return this.getValidParent(o,r,e,n)}},e.prototype.getIndexInParent=function(t,e,n,o){var r=t.getParent();if(r){var i=null==r?void 0:r.indexOfChild(t);return e.dir=this.getDirection(t.element,r.element),i+=+("after"==e.determinePlacement(n,o))}},e.prototype.triggerDragValidation=function(t,e){var n=this.sourceNodes[0];return this.em.trigger("sorter:drag:validation",{valid:t,src:null==n?void 0:n.element,srcModel:null==n?void 0:n.model,trg:e.element,trgModel:e.model}),n},e.prototype.cleanupEventListeners=function(){var t=this.containerContext.container;B(t,"dragstart",this.onDragStart),B(t,"mousemove dragover",this.onMove),B(this.containerContext.document,"mouseup dragend touchend",this.endDrag)},e.prototype.getDirection=function(t,e){return this.dragDirection===pb.Vertical||this.dragDirection!==pb.Horizontal&&function(t,e){if(A(t))return!1;var n=t.style||{},o=(0,tN.default)(t),r=(0,tN.default)(e);if(n.overflow&&"visible"!==n.overflow)return!1;var i=o.css("float");return(!i||"none"===i)&&("flex"!==r.css("display")||"column"===r.css("flex-direction"))&&!!function(t){switch(t){case"static":case"relative":case"":return!0;default:return!1}}(n.position)&&(["TR","TBODY","THEAD","TFOOT"].includes(t.tagName)||["block","list-item","table","flex","grid"].includes(o.css("display")))}(t,e)},e.prototype.getChildrenDim=function(t){var e=this,n=[],o=t.element;if(!o)return[];var r=t.getChildren();return r&&0!==r.length?((0,b.each)(r,function(t,r){var i=t.element;
1if(i&&(A(i)||uz(i,e.containerContext.itemSel))){var a=e.getDim(i);a.dir=e.getDirection(i,o),n.push(a)}}),n):[]},e.prototype.getMousePositionRelativeToContainer=function(t,e){var n=e-this.containerOffset.top+this.containerContext.container.scrollTop,o=t-this.containerOffset.left+this.containerContext.container.scrollLeft;if(this.positionOptions.canvasRelative){var r=this.em.Canvas.getMouseRelativeCanvas({clientX:t,clientY:e},{noScroll:1});o=r.x,n=r.y}return{mouseXRelative:o,mouseYRelative:n}},e.prototype.cacheContainerPosition=function(){var t=uB(this.containerContext.container),e=this.positionOptions.windowMargin?Math.abs(t.top):t.top,n=this.positionOptions.windowMargin?Math.abs(t.left):t.left;this.containerOffset={top:e,left:n}},e.prototype.getDim=function(t){var e,n,o,r,i=this.em,a=this.positionOptions.relative,s=this.positionOptions.windowMargin,l=null==i?void 0:i.Canvas,c=l?l.getElementOffsets(t):{};if(this.positionOptions.canvasRelative&&this.em){var u=l.getElementPos(t,{noScroll:1});e=u.top,n=u.left,o=u.height,r=u.width}else{var p=uB(t);e=a?t.offsetTop:p.top-(s?-1:1)*this.containerOffset.top,n=a?t.offsetLeft:p.left-(s?-1:1)*this.containerOffset.left,o=t.offsetHeight,r=t.offsetWidth}return new uG({top:e,left:n,height:o,width:r,offsets:c})},e}(tB),uJ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),uX=function(t){function e(e){var n=t.call(this)||this;return n.pfx=e.pfx||"",n.allowNesting=e.allowNesting||!1,n.container=e.container,n.setElement(e.el),n.offset={top:e.offset.top||0,left:e.offset.left||0},n.moveLimiter=new u$(100),n}return uJ(e,t),e.prototype.show=function(){this.el.style.display="block"},e.prototype.hide=function(){this.moveLimiter.clearTimeout(),this.el.style.display="none"},e.prototype.move=function(t,e){var n=this;this.moveLimiter.updateArgs({elementDimension:t,placement:e}),this.moveLimiter.execute(function(t){var e=t.elementDimension,o=t.placement;n._move(e,o)})},e.prototype._move=function(t,e){var n=0,o=0,r="",i="";this.setOrientationForDimension(t);var a=t.top,s=t.left,l=t.height,c=t.width,u=t.dir,p=t.offsets;if("inside"===e){if(this.setOrientation("horizontal"),!this.allowNesting)return void this.hide();var f=(null==p?void 0:p.paddingTop)||5,d=(null==p?void 0:p.paddingLeft)||5,h=(null==p?void 0:p.borderTopWidth)||0,g=(null==p?void 0:p.borderLeftWidth)||0,v=(null==p?void 0:p.borderRightWidth)||0;n=a+f+h,o=s+d+g,r=Math.max(c-2*d-(g+v),1)+"px",i="auto"}else u?(r=c+"px",i="auto",n="before"===e?a-0:a+l-0,o=s):(r="auto",i=l-0+"px",n=a+0,o="before"===e?s-0:s+c-0,this.setOrientation("vertical"));this.updateStyles(n,o,r,i),this.adjustOffset()},e.prototype.setOrientationForDimension=function(t){this.el.classList.remove("vertical"),this.el.classList.add("horizontal"),t&&!t.dir&&this.setOrientation("vertical")},e.prototype.setOrientation=function(t){this.el.classList.remove("horizontal"),this.el.classList.remove("vertical"),this.el.classList.add(t)},e.prototype.updateStyles=function(t,e,n,o){this.el.style.top=t+"px",this.el.style.left=e+"px",n&&(this.el.style.width=n),o&&(this.el.style.height=o)},e.prototype.adjustOffset=function(){this.$el.css("top","+="+this.offset.top+"px"),this.$el.css("left","+="+this.offset.left+"px")},e}(tB),uZ=function(){return(uZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},uQ=function(){function t(t){var e,n=(e={containerContext:{container:"",placeholderElement:"",containerSel:"*",itemSel:"*",pfx:"",document:document},positionOptions:{borderOffset:10,relative:!1,windowMargin:0,offsetTop:0,offsetLeft:0,scale:1,canvasRelative:!1},dragBehavior:{dragDirection:pb.Vertical,nested:!1,selectOnEnd:!0},eventHandlers:{}},uU(uU(uU({},e),t),{containerContext:uU(uU({},e.containerContext),t.containerContext),positionOptions:uU(uU({},e.positionOptions),t.positionOptions),dragBehavior:uU(uU({},e.dragBehavior),t.dragBehavior),eventHandlers:uU(uU({},e.eventHandlers),t.eventHandlers)}));(0,b.bindAll)(this,"startSort","cancelDrag","recalculateTargetOnScroll","rollback","updateOffset","handlePlaceholderMove","finalizeMove"),this.containerContext=n.containerContext,this.positionOptions=n.positionOptions,this.dragBehavior=n.dragBehavior,this.eventHandlers=uZ(uZ({},n.eventHandlers),{onPlaceholderPositionChange:this.handlePlaceholderMove,onEnd:this.finalizeMove}
1),this.em=t.em,this.treeClass=t.treeClass,this.updateOffset(),this.em.on(this.em.Canvas.events.refresh,this.updateOffset),this.placeholder=this.createPlaceholder(),this.dropLocationDeterminer=new uY({em:this.em,treeClass:this.treeClass,containerContext:this.containerContext,positionOptions:this.positionOptions,dragDirection:this.dragBehavior.dragDirection,eventHandlers:this.eventHandlers})}return t.prototype.startSort=function(t){var e,n,o,r,i,a,s,l=this.getSourceNodes(t),c=l.sourceNodes,u=l.sourcesWithModel;this.sourceNodes=c,this.dropLocationDeterminer.startSort(c),this.bindDragEventHandlers(),null==(n=(e=this.eventHandlers).onStartSort)||n.call(e,this.sourceNodes,this.containerContext.container);var p=null==(o=this.sourceNodes[0])?void 0:o.model;null==(i=(r=this.eventHandlers).legacyOnStartSort)||i.call(r,{sorter:this,target:p,parent:p&&(null==(a=p.parent)?void 0:a.call(p)),index:p&&(null==(s=p.index)?void 0:s.call(p))}),this.em.trigger("sorter:drag:start",t[0],u[0])},t.prototype.validTarget=function(t,e,n){if(!t)return!1;var o=(0,tN.default)(t).data("model");if(!o)return!1;var r=new this.treeClass(o);return this.getSourceNodes(e).sourceNodes.some(function(t){return r.canMove(t,n)})},t.prototype.getSourceNodes=function(t){var e=this,n=t.filter(function(t){return!!t.dragSource||e.findValidSourceElement(t.element)}).map(function(t){var e,n;return{model:(null==(e=t.dragSource)?void 0:e.model)||(null==(n=(0,tN.default)(t.element))?void 0:n.data("model")),content:t.dragSource}});return{sourceNodes:n.sort(function(t,e){return function(t,e){var n=uW(t),o=uW(e),r=o.filter(function(t){return n.includes(t)})[0];if(!r)return t.model.index()-e.model.index();var i=o[o.indexOf(r)-1];return n[n.indexOf(r)-1].index()-i.index()}(t.model,e.model)}).map(function(t){return new e.treeClass(t.model,t.content)}),sourcesWithModel:n}},t.prototype.recalculateTargetOnScroll=function(){this.dropLocationDeterminer.recalculateTargetOnScroll()},t.prototype.cancelDrag=function(){this.triggerNullOnEndMove(!0),this.dropLocationDeterminer.cancelDrag()},t.prototype.endDrag=function(){this.dropLocationDeterminer.endDrag()},t.prototype.handlePlaceholderMove=function(t,e){this.ensurePlaceholderElement(),this.updatePlaceholderPosition(t,e)},t.prototype.createPlaceholder=function(){return new uX({container:this.containerContext.container,allowNesting:this.dragBehavior.nested,pfx:this.containerContext.pfx,el:this.containerContext.placeholderElement,offset:{top:this.positionOptions.offsetTop,left:this.positionOptions.offsetLeft}})},t.prototype.ensurePlaceholderElement=function(){var t=this.placeholder.el,e=this.containerContext.container;t.ownerDocument.contains(t)||e.append(this.placeholder.el)},t.prototype.updateOffset=function(){var t,e=(null==(t=this.em)?void 0:t.get("canvasOffset"))||{};this.positionOptions.offsetTop=e.top,this.positionOptions.offsetLeft=e.left},t.prototype.findValidSourceElement=function(t){return t&&!uz(t,"".concat(this.containerContext.itemSel,", ").concat(this.containerContext.containerSel))&&(t=function(t,e){if(t)for(var n=t.parentNode;n&&1===n.nodeType;){if(uz(n,e))return n;n=n.parentNode}}(t,this.containerContext.itemSel)),t},t.prototype.bindDragEventHandlers=function(){U(this.containerContext.document,"keydown",this.rollback)},t.prototype.updatePlaceholderPosition=function(t,e){this.placeholder.move(t,e)},t.prototype.cleanupEventListeners=function(){B(this.containerContext.document,"keydown",this.rollback)},t.prototype.finalizeMove=function(){this.cleanupEventListeners(),this.placeholder.hide(),delete this.sourceNodes},t.prototype.rollback=function(t){B(this.containerContext.document,"keydown",this.rollback),"Escape"===t.key&&this.cancelDrag()},t.prototype.triggerNullOnEndMove=function(t){var e,n,o,r,i,a=null==(e=this.sourceNodes)?void 0:e[0].model,s={target:a,parent:a&&(null==(n=a.parent)?void 0:n.call(a)),index:a&&(null==(o=a.index)?void 0:o.call(a))};null==(i=(r=this.eventHandlers).legacyOnEndMove)||i.call(r,null,this,uZ(uZ({},s),{cancelled:t}))},t}(),u0=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u1=function(){return(u1=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},u2={id:"sorter-target",type:po.Target},u3=function(t){function e(e){var n=e.em,o=e.treeClass,r=e.containerContext,i=e.dragBehavior,a=e.positionOptions,s=e.eventHandlers,l=void 0===s?{}:s,c=t.call(this,{em:n,treeClass:o,containerContext:r,positionOptions:void 0===a?{}:a,dragBehavior:i,eventHandlers:u1(u1({},l),{onStartSort:function(t,e){var n;null==(n=l.onStartSort)||n.call(l,t,e),c.onStartSort()},onDrop:function(t,e,n){var o;null==(o=l.onDrop)||o.call(l,t,e,n),c.onDrop(t,e,n)},onTargetChange:function(t,e){var n;null==(n=l.onTargetChange)||n.call(l,t,e),c.onTargetChange(t,e)},onMouseMove:function(t){var e;null==(e=l.onMouseMove)||e.call(l,t),c.onMouseMove(t)}})})||this;return c.targetIsText=!1,c.onMouseMove=function(t){var e;c.targetIsText&&(null==(e=c.sourceNodes)?void 0:e.some(function(t){return t.isTextable()}))&&c.updateTextViewCursorPosition(t)},c.onDrop=function(t,e,n){t&&e.length>0?0===c.handleNodeAddition(t,e,"number"==typeof n?n:-1).length&&c.triggerNullOnEndMove(!1):c.triggerNullOnEndMove(!0),null==t||t.restNodeState(),c.placeholder.hide()},c.onTargetChange=function(t,e){null==t||t.restNodeState();var n,o=c.em.Canvas;if(!e){c.placeholder.hide(),o.removeSpots(u2);return}null==e||e.setSelectedParentState(),c.targetIsText=e.isTextNode(),c.targetIsText&&(null==(n=c.sourceNodes)?void 0:n.some(function(t){return t.isTextable()}))?(e.setContentEditable(!0),c.placeholder.hide()):c.placeholder.show(),[po.Select,po.Hover,po.Spacing].forEach(function(t){return o.removeSpots({type:t})}),o.addSpot(u1(u1({},u2),{component:e.model}))},(0,b.bindAll)(c,"handleScrollEvent"),c}return u0(e,t),e.prototype.onStartSort=function(){this.em.clearSelection(),this.setAutoCanvasScroll(!0)},e.prototype.bindDragEventHandlers=function(){this.em.on("frame:scroll",this.handleScrollEvent),t.prototype.bindDragEventHandlers.call(this)},e.prototype.cleanupEventListeners=function(){this.em.off("frame:scroll",this.handleScrollEvent),t.prototype.cleanupEventListeners.call(this)},e.prototype.handleScrollEvent=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];var o=null==(t=null==e?void 0:e[0])?void 0:t.frame;this.em.Canvas.getCanvasView().frame===o&&this.recalculateTargetOnScroll()},e.prototype.handleNodeAddition=function(t,e,n){var o=this;return e.reduce(function(e,r){if(!t.canMove(r,n))return e;if(o.isPositionChanged(t,r,n)){var i=o.moveNode(t,r,n),a=i.index,s=i.addedNode;e.push(s),n=a}return n++,e},[])},e.prototype.isPositionChanged=function(t,e,n){var o=e.getParent(),r=o?o.indexOfChild(e):-1;(null==o?void 0:o.model.cid)===t.model.cid&&r<n&&n--;var i=(null==o?void 0:o.model.cid)===t.model.cid,a=r===n,s=this.targetIsText&&e.isTextable();return!(i&&a&&!s)},e.prototype.moveNode=function(t,e,n){var o=e.getParent();if(o){var r=o.indexOfChild(e);o.removeChildAt(r,{temporary:!0}),o.model.cid===t.model.cid&&r<n&&n--}var i=t.addChildAt(e,n,{action:"move-component"});return i&&this.triggerEndMoveEvent(i),{addedNode:i,index:n}},e.prototype.triggerEndMoveEvent=function(t){var e,n,o,r,i,a;null==(n=(e=this.eventHandlers).legacyOnEndMove)||n.call(e,t.model,this,{target:t.model,parent:t.model&&(null==(r=(o=t.model).parent)?void 0:r.call(o)),index:t.model&&(null==(a=(i=t.model).index)?void 0:a.call(i))})},e.prototype.finalizeMove=function(){var e,n;null==(e=this.em)||e.Canvas.removeSpots(u2),null==(n=this.sourceNodes)||n.forEach(function(t){return t.restNodeState()}),this.setAutoCanvasScroll(!1),t.prototype.finalizeMove.call(this)},e.prototype.updateTextViewCursorPosition=function(t){var e=this.em;if(e){var n=e.Canvas,o=n.getDocument(),r=null;if(o){var i=R(t);
1if(o.caretPositionFromPoint){var a=o.caretPositionFromPoint(i.clientX,i.clientY);a&&(r=o.createRange()).setStart(a.offsetNode,a.offset)}else o.caretRangeFromPoint?r=o.caretRangeFromPoint(i.clientX,i.clientY):t.rangeParent&&(r=o.createRange()).setStart(t.rangeParent,t.rangeOffset);var s=n.getWindow().getSelection();n.getFrameEl().focus(),null==s||s.removeAllRanges(),r&&(null==s||s.addRange(r))}}},e.prototype.setAutoCanvasScroll=function(t){var e=this.em,n=null==e?void 0:e.Canvas;n&&(t?n.startAutoscroll():n.stopAutoscroll())},e}(uQ),u5=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u4=function(){return(u4=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},u9=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u5(e,t),e.prototype.defaults=function(){return{values:{}}},e.prototype.initialize=function(){var t=this.collection;this.prop=null==t?void 0:t.prop},e.prototype.getId=function(){return this.cid},e.prototype.getIndex=function(){var t=this.collection;return t?t.indexOf(this):-1},e.prototype.getValues=function(t){void 0===t&&(t={});var e=this.get("values");return t.camelCase?Object.keys(e).reduce(function(t,n){return t[tp(n)]=e[n],t},{}):e},e.prototype.getLabel=function(){var t;return null==(t=this.prop)?void 0:t.getLayerLabel(this)},e.prototype.isSelected=function(){var t;return(null==(t=this.prop)?void 0:t.getSelectedLayer())===this},e.prototype.select=function(){var t;return null==(t=this.prop)?void 0:t.selectLayer(this)},e.prototype.remove=function(){var t;return null==(t=this.prop)?void 0:t.removeLayer(this)},e.prototype.move=function(t){var e;return null==(e=this.prop)?void 0:e.moveLayer(this,t)},e.prototype.getStylePreview=function(t){var e;return void 0===t&&(t={}),null==(e=this.prop)?void 0:e.getStylePreview(this,t)},e.prototype.hasPreview=function(){var t;return!!(null==(t=this.prop)?void 0:t.get("preview"))},e.prototype.upValues=function(t){return void 0===t&&(t={}),this.set("values",u4(u4({},this.getValues()),t))},e}(tH),u6=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),u7=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return u6(e,t),e.prototype.initialize=function(t,e){void 0===e&&(e={}),this.prop=e.prop},e}(tU);u7.prototype.model=u9;var u8,pt,pe,pn,po,pr,pi,pa,ps,pl,pc,pu,pp,pf,pd,ph,pg,pv,py,pm,pb,pw,p_,pC,px,pO,pS,pT,pP,pE,pk,pj,pA,pM,pD,pL,pI,pN,pR,pV,pF,pH,pU,pB,pz,pW=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),p$=function(t){function e(e){return t.call(this,e)||this}return pW(e,t),e.prototype.getChildren=function(){return this.model instanceof u7?this.model.models.map(function(t){return new e(t)}):null},e.prototype.getParent=function(){var t=this.model instanceof u9?this.model.collection:null;return t?new e(t):null},e.prototype.addChildAt=function(t,n){if(this.model instanceof u9)throw Error("Cannot add a layer model to another layer model");return new e(this.model.add(t.model,{at:n}))},e.prototype.removeChildAt=function(t){if(this.model instanceof u9)throw Error("Cannot remove a layer model from another layer model");var e=this.model.at(t);e&&this.model.remove(e)},e.prototype.indexOfChild=function(t){return t.model instanceof u9&&this.model instanceof u7?this.model.indexOf(t.model):-1},e.prototype.canMove=function(t,e){return this.model instanceof u7&&!!t.model},Object.defineProperty(e.prototype,"view",{get:function(){return this.model.view}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"element",{get:function(){var t;return null==(t=this.view)?void 0:t.el},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"model",{get:function(){return this._model},enumerable:!1,configurable:!0}),e}(oT),pq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pG=function(){return(pG=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},pK=function(t){function e(e){var n=e.em,o=e.containerContext,r=e.dragBehavior,i=e.positionOptions,a=e.eventHandlers,s=void 0===a?{}:a,l=t.call(this,{em:n,treeClass:p$,containerContext:o,positionOptions:void 0===i?{}:i,dragBehavior:r,eventHandlers:pG({onStartSort:function(t,e){var n;null==(n=s.onStartSort)||n.call(s,t,e),l.onLayerStartSort(t)},onDrop:function(t,e,n){var o;null==(o=s.onDrop)||o.call(s,t,e,n),l.onLayerDrop(t,e,n)},onEnd:function(){l.placeholder.hide()}},s)})||this;return l.onLayerStartSort=function(t){l.em.clearSelection();var e=t[0];l.em.trigger("sorter:drag:start",null==e?void 0:e.element,null==e?void 0:e.model),l.placeholder.show()},l.onLayerDrop=function(t,e,n){if(t){n="number"==typeof n?n:-1;for(var o=0;o<e.length;o++){var r=e[o];if(t.canMove(r,o)){var i=r.getParent(),a=-1;i&&(a=i.indexOfChild(r),i.removeChildAt(a)),n=a<n?n-1:n,t.addChildAt(r,n)}}l.placeholder.hide()}},l}return pq(e,t),e}(uQ),pY=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),pJ=function(){return(pJ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},pX=function(t){function e(e){var n=t.call(this,e,"Utils")||this;return n.Sorter=u3,n.Resizer=uH,n.Dragger=oB,n.ComponentSorter=u3,n.StyleManagerSorter=pK,n.helpers=pJ({},m),n}return pY(e,t),e.prototype.destroy=function(){},e}(tJ),pZ={},pQ={16:!1,18:!1,17:!1,91:!1},p0="all",p1={"â§":16,shift:16,"â¥":18,alt:18,option:18,"â":17,ctrl:17,control:17,"â":91,command:91},p2={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},p3=function(t){return p2[t]||t.toUpperCase().charCodeAt(0)},p5=[];for(pz=1;pz<20;pz++)p2["f"+pz]=111+pz;function p4(t,e){for(var n=t.length;n--;)if(t[n]===e)return n;return -1}var p9={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey"};function p6(t){var e,n=t.keyCode,o=p4(p5,n);if(o>=0&&p5.splice(o,1),(93==n||224==n)&&(n=91),n in pQ)for(e in pQ[n]=!1,p1)p1[e]==n&&(p8[e]=!1)}function p7(){for(pz in pQ)pQ[pz]=!1;for(pz in p1)p8[pz]=!1}function p8(t,e,n){var o,r;o=fe(t),void 0===n&&(n=e,e="all");for(var i=0;i<o.length;i++)r=[],(t=o[i].split("+")).length>1&&(r=fn(t),t=[t[t.length-1]]),(t=p3(t=t[0]))in pZ||(pZ[t]=[]),pZ[t].push({shortcut:o[i],scope:e,method:n,key:o[i],mods:r})}for(pz in p1)p8[pz]=!1;function ft(){return p0||"all"}function fe(t){var e;return""==(e=(t=t.replace(/\s/g,"")).split(","))[e.length-1]&&(e[e.length-2]+=","),e}function fn(t){for(var e=t.slice(0,t.length-1),n=0;n<e.length;n++)e[n]=p1[e[n]];return e}function fo(t,e,n){t.addEventListener?t.addEventListener(e,n,!1):t.attachEvent&&t.attachEvent("on"+e,function(){n(window.event)})}p8.setScope=function(t){p0=t||"all"},p8.getScope=ft,p8.deleteScope=function(t){var e,n,o;for(e in pZ)for(o=0,n=pZ[e];o<n.length;)n[o].scope===t?n.splice(o,1):o++},p8.filter=function(t){var e=(t.target||t.srcElement).tagName;return"INPUT"!=e&&"SELECT"!=e&&"TEXTAREA"!=e},p8.isPressed=function(t){return"string"==typeof t&&(t=p3(t)),-1!=p4(p5,t)},p8.getPressedKeyCodes=function(){return p5.slice(0)},p8.unbind=function(t,e){var n,o,r,i,a,s=[];for(i=0,n=fe(t);i<n.length;i++){if((o=n[i].split("+")).length>1&&(s=fn(o)),t=p3(t=o[o.length-1]),void 0===e&&(e=ft()),!pZ[t])return;for(r=0;r<pZ[t].length;r++)(a=pZ[t][r]).scope===e&&function(t,e){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}(a.mods,s)&&(pZ[t][r]={})}},p8.handlers=pZ,p8.init=function(t){fo(t.document,"keydown",function(t){!function(t){var e,n,o,r,i,a;if(-1==p4(p5,e=t.keyCode)&&p5.push(e),(93==e||224==e)&&(e=91),e in pQ){for(o in pQ[e]=!0,p1)p1[o]==e&&(p8[o]=!0);return}for(pz in pQ)pQ[pz]=t[p9[pz]];if(p8.filter.call(this,t)&&e in pZ){for(r=0,a=ft();r<pZ[e].length;r++)if((n=pZ[e][r]).scope==a||"all"==n.scope){for(o in i=n.mods.length>0,pQ)(!pQ[o]&&p4(n.mods,+o)>-1||pQ[o]&&-1==p4(n.mods,+o))&&(i=!1);
1(0!=n.mods.length||pQ[16]||pQ[18]||pQ[17]||pQ[91])&&!i||!1!==n.method(t,n)||(t.preventDefault?t.preventDefault():t.returnValue=!1,t.stopPropagation&&t.stopPropagation(),t.cancelBubble&&(t.cancelBubble=!0))}}}(t)}),fo(t.document,"keyup",p6),fo(t,"focus",p7)};let fr=p8;!function(t){t.add="keymap:add",t.remove="keymap:remove",t.emit="keymap:emit",t.emitId="keymap:emit:"}(o||(o={}));var fi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fa=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};to()&&fr.init(window);var fs=function(t){function e(e){var n=t.call(this,e,"Keymaps",{defaults:{"core:undo":{keys:"â+z, ctrl+z",handler:"core:undo",opts:{prevent:!0}},"core:redo":{keys:"â+shift+z, ctrl+shift+z",handler:"core:redo",opts:{prevent:!0}},"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:!0}}}})||this;return n.keymaster=fr,n.events=o,n.keymaps={},n}return fi(e,t),e.prototype.onLoad=function(){if(!this.em.isHeadless){var t=this.config.defaults;for(var e in t){var n=t[e];this.add(e,n.keys,n.handler,n.opts||{})}}},e.prototype.add=function(t,e,n,o){void 0===o&&(o={});var r=this.em,i=this.events,a=r.Commands,s=r.getEditor(),l=r.Canvas,c={id:t,keys:e,handler:n};return this.keymaps[t]&&this.remove(t),this.keymaps[t]=c,fr(e,function(e,c){var u,p={event:e,h:c},f=(0,b.isString)(n)?a.get(n):n;if(!r.isEditing()&&!s.Canvas.isInputFocused()||o.force){o.prevent&&(null==(u=l.getCanvasView())||u.preventDefault(e)),(0,b.isFunction)(f)?f(s,0,p):a.runCommand(f,p);var d=[t,c.shortcut,e];r.trigger.apply(r,fa([i.emit],d,!1)),r.trigger.apply(r,fa(["".concat(i.emitId).concat(t)],d,!1))}},void 0),r.trigger(i.add,c),c},e.prototype.get=function(t){return this.keymaps[t]},e.prototype.getAll=function(){return this.keymaps},e.prototype.remove=function(t){var e=this.em,n=this.events,o=this.get(t);if(o)return delete this.keymaps[t],o.keys.split(", ").forEach(function(t){fr.unbind(t.trim())}),null==e||e.trigger(n.remove,o),o},e.prototype.removeAll=function(){var t=this;return Object.keys(this.keymaps).forEach(function(e){return t.remove(e)}),fr.handlers={},this},e.prototype.destroy=function(){this.removeAll(),this.keymaps={}},e}(tJ),fl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fc=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fl(e,t),e.prototype.defaults=function(){return{title:"",content:"",attributes:{},open:!1}},e.prototype.open=function(){this.set("open",!0)},e.prototype.close=function(){this.set("open",!1)},e}(tQ);!function(t){t.open="modal:open",t.close="modal:close",t.all="modal"}(r||(r={}));var fu=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fp=function(){return(fp=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ff=function(t){function e(e){var n=t.call(this,e)||this,o=n.model;return n.listenTo(o,"change:open",n.updateOpen),n.listenTo(o,"change:title",n.updateTitle),n.listenTo(o,"change:content",n.updateContent),n}return fu(e,t),e.prototype.template=function(t){var e=t.pfx,n=t.ppfx,o=t.content,r=t.title;return'<div class="'.concat(e,"dialog ").concat(n,"one-bg ").concat(n,'two-color">\n <div class="').concat(e,'header">\n <div class="').concat(e,'title">').concat(r,'</div>\n <div class="').concat(e,'btn-close" data-close-modal>⨯</div>\n </div>\n <div class="').concat(e,'content">\n <div id="').concat(e,'c">').concat(o,'</div>\n <div style="clear:both"></div>\n </div>\n </div>\n <div class="').concat(e,'collector" style="display: none"></div>')},e.prototype.events=function(){return{click:"onClick","click [data-close-modal]":"hide"}},e.prototype.onClick=function(t){this.config.backdrop&&t.target===this.el&&this.hide()},e.prototype.getCollector=function(){return this.$collector||(this.$collector=this.$el.find("."+this.pfx+"collector")),this.$collector},e.prototype.getContent=function(){var t=this.pfx;return this.$content||(this.$content=this.$el.find(".".concat(t,"content #").concat(t,"c"))),this.$content},e.prototype.getTitle=function(t){return void 0===t&&(t={}),this.$title||(this.$title=this.$el.find("."+this.pfx+"title")),t.$?this.$title:this.$title.get(0)},e.prototype.updateContent=function(){var t=this.getContent(),e=t.children(),n=this.getCollector(),o=this.model.get("content");e.length&&n.append(e),t.empty().append(o)},e.prototype.updateTitle=function(){var t=this.getTitle({$:!0});t&&t.empty().append(this.model.get("title"))},e.prototype.updateOpen=function(){this.el.style.display=this.model.get("open")?"":"none"},e.prototype.hide=function(){this.model.close()},e.prototype.show=function(){this.model.open()},e.prototype.updateAttr=function(t){var e=this.pfx,n=this.$el,o=this.el,r=[].slice.call(o.attributes).map(function(t){return t.name});n.removeAttr(r.join(" ")),n.attr(fp(fp({},t||{}),{class:"".concat(e,"container ").concat(t&&t.class||"").trim()}))},e.prototype.render=function(){var t=this.$el,e=this.model.toJSON();return e.pfx=this.pfx,e.ppfx=this.ppfx,t.html(this.template(e)),this.updateAttr(),this.updateOpen(),this},e}(ep),fd=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fh=function(t){function e(e){var n=t.call(this,e,"Modal",{stylePrefix:"mdl-",title:"",content:"",backdrop:!0,custom:!1,extend:{}})||this;n.events=r;var o=n.events;return n.model=new fc(n),n.model.on("change:open",function(t,n){e.trigger(n?o.open:o.close)}),n.model.on("change",(0,b.debounce)(function(){var t=n._evData(),r=n.config.custom;(0,b.isFunction)(r)&&r(t),e.trigger(o.all,t)},0)),n}return fd(e,t),e.prototype._evData=function(){var t=this,e=this.getTitle(),n=this.getContent(),o=this.model.attributes;return{open:o.open,attributes:o.attributes,title:(0,b.isString)(e)?E(e):e,content:(0,b.isString)(n)?E(n):n.get?n.get(0):n,close:function(){t.close()}}},e.prototype.postRender=function(t){var e=t.model.config.el||t.el,n=this.render();n&&(null==e||e.appendChild(n))},e.prototype.open=function(t){void 0===t&&(t={});var e=t.attributes||{};return t.title&&this.setTitle(t.title),t.content&&this.setContent(t.content),this.model.set("attributes",e),this.model.open(),this.modal&&this.modal.updateAttr(e),this},e.prototype.close=function(){return this.model.close(),this},e.prototype.onceClose=function(t){var e=this.em,n=this.events;return e.once(n.close,t),this},e.prototype.onceOpen=function(t){var e=this.em,n=this.events;return e.once(n.open,t),this},e.prototype.isOpen=function(){return!!this.model.get("open")},e.prototype.setTitle=function(t){return this.model.set("title",t),this},e.prototype.getTitle=function(){return this.model.get("title")},e.prototype.setContent=function(t){return this.model.set("content"," "),this.model.set("content",t),this},e.prototype.getContent=function(){return this.model.get("content")},e.prototype.getContentEl=function(){var t;return null==(t=this.modal)?void 0:t.getContent().get(0)},e.prototype.getModel=function(){return this.model},e.prototype.render=function(){if(!this.config.custom){var t,e=ff.extend(this.config.extend),n=this.modal&&this.modal.el;return this.modal=new e({el:n,model:this.model,config:this.config}),null==(t=this.modal)?void 0:t.render().el}},e.prototype.destroy=function(){var t;null==(t=this.modal)||t.remove()},e}(tJ),fg="sw-visibility",fv="export-template",fy="open-sm",fm="open-tm",fb="open-layers",fw="open-blocks",f_="fullscreen",fC="preview",fx=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fO=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.get("buttons").length&&o.set("buttons",new fP(o.module,o.get("buttons"))),o}return fx(e,t),e.prototype.defaults=function(){return{id:"",label:"",tagName:"span",className:"",command:"",context:"",buttons:[],attributes:{},options:{},active:!1,dragDrop:!1,togglable:!0,runDefaultCommand:!0,stopDefaultCommand:!1,disable:!1}},Object.defineProperty(e.prototype,"className",{get:function(){return this.get("className")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"command",{get:function(){return this.get("command")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"active",{get:function(){return this.get("active")},set:function(t){this.set("active",t)},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"togglable",{get:function(){return this.get("togglable")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"runDefaultCommand",{get:function(){return this.get("runDefaultCommand")}
1,enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"stopDefaultCommand",{get:function(){return this.get("stopDefaultCommand")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"disable",{get:function(){return this.get("disable")},enumerable:!1,configurable:!0}),e}(tQ),fS=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fT=function(t){function e(e,n){return t.call(this,e,n,fO)||this}return fS(e,t),e.prototype.deactivateAllExceptOne=function(t,e){this.forEach(function(n,o){n!==t&&(n.set("active",!1),e&&n.get("buttons").length&&n.get("buttons").deactivateAllExceptOne(t,e))})},e.prototype.deactivateAll=function(t,e){var n=t||"";this.forEach(function(t){t.get("context")==n&&t!==e&&t.set("active",!1,{fromCollection:!0}
1)})},e.prototype.disableAllButtons=function(t){var e=t||"";this.forEach(function(t,n){t.get("context")==e&&t.set("disable",!0)})},e.prototype.disableAllButtonsExceptOne=function(t,e){this.forEach(function(n,o){n!==t&&(n.set("disable",!0),e&&n.get("buttons").length&&n.get("buttons").disableAllButtonsExceptOne(t,e))})},e}(t3);let fP=fT;fT.prototype.model=fO;var fE=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fk=function(t){function e(e,n){var o=t.call(this,e,n)||this,r=o.get("buttons")||[];return o.buttons=new fP(e,r),o}return fE(e,t),e.prototype.defaults=function(){return{id:"",content:"",visible:!0,buttons:[],attributes:{}}},Object.defineProperty(e.prototype,"buttons",{get:function(){return this.get("buttons")},set:function(t){this.set("buttons",t)},enumerable:!1,configurable:!0}),e}(tQ),fj=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fA=function(t){function e(e,n){return t.call(this,e,n,fk)||this}return fj(e,t),e}(t3);fA.prototype.model=fk;var fM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fD=function(){return(fD=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},fL=function(t){function e(e){var n=t.call(this,e)||this,o=n.model,r=n.em,i=n.pfx,a=n.ppfx,s=o.className,l=o.attributes,c=l.command,u=l.listen;if(n.id=i+o.get("id"),n.activeCls="".concat(i,"active ").concat(a,"four-color"),n.disableCls="".concat(a,"disabled"),n.btnsVisCls="".concat(i,"visible"),n.className=i+"btn"+(s?" "+s:""),n.listenTo(o,"change",n.render),n.listenTo(o,"change:active updateActive",n.updateActive),n.listenTo(o,"checkActive",n.checkActive),n.listenTo(o,"change:bntsVis",n.updateBtnsVis),n.listenTo(o,"change:attributes",n.updateAttributes),n.listenTo(o,"change:className",n.updateClassName),n.listenTo(o,"change:disable",n.updateDisable),r&&(0,b.isString)(c)&&u){var p={fromListen:!0};n.listenTo(r,"run:".concat(c),function(){return o.set("active",!0,p)}),n.listenTo(r,"stop:".concat(c),function(){return o.set("active",!1,p)})}return r&&r.get&&(n.commands=r.get("Commands")),n}return fM(e,t),e.prototype.tagName=function(){return this.model.get("tagName")},e.prototype.events=function(){return{click:"clicked"}},e.prototype.updateClassName=function(){var t=this.model,e=this.pfx,n=t.className,o=t.get("attributes").class,r="".concat(o||""," ").concat(e,"btn ").concat(n||"");this.$el.attr("class",r.trim())},e.prototype.updateAttributes=function(){var t=this.em,e=this.model,n=this.$el,o=e.get("attributes")||{},r=t&&t.t&&t.t("panels.buttons.titles.".concat(e.id));n.attr(o),r&&n.attr({title:r}),this.updateClassName()},e.prototype.updateBtnsVis=function(){this.$buttons&&(this.model.get("bntsVis")?this.$buttons.addClass(this.btnsVisCls):this.$buttons.removeClass(this.btnsVisCls))},e.prototype.updateActive=function(t,e,n){void 0===n&&(n={});var o,r=this.model,i=this.commands,a=this.$el,s=this.activeCls,l=n.fromCollection,c=n.fromListen,u=r.get("context"),p=r.get("options"),f=r.command,d={};f&&(i&&(0,b.isString)(f)?d=i.get(f)||{}:(0,b.isFunction)(f)?d=i.create({run:f}):null!==f&&(0,b.isObject)(f)&&(d=i.create(f)),r.active?(l||null==(o=r.collection)||o.deactivateAll(u,r),r.set("active",!0,{silent:!0}).trigger("checkActive"),c||i.runCommand(d,fD(fD({},p),{sender:r})),d.noStop&&r.set("active",!1)):(a.removeClass(s),c||i.stopCommand(d,fD(fD({},p),{sender:r,force:1}))))},e.prototype.updateDisable=function(){var t=this.disableCls,e=this.model.disable;this.$el[e?"addClass":"removeClass"](t)},e.prototype.checkActive=function(){var t=this.model,e=this.$el,n=this.activeCls;t.active?e.addClass(n):e.removeClass(n)},e.prototype.clicked=function(){var t=this.model;t.get("bntsVis")||t.disable||!t.command||this.toggleActive()},e.prototype.toggleActive=function(){var t=this.model,e=this.em,n=t.active,o=t.togglable;(!n||o)&&(t.active=!n,n?t.runDefaultCommand&&e.runDefault():t.stopDefaultCommand&&e.stopDefault())},e.prototype.render=function(){var t=this.model,e=t.get("label"),n=this.$el;return t.get("el")||n.empty(),this.updateAttributes(),e&&n.append(e),this.checkActive(),this.updateDisable(),this},e}(ep),fI=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fN=function(t){function e(e){var n=t.call(this,{collection:e})||this;return n.listenTo(n.collection,"add",n.addTo),n.listenTo(n.collection,"reset remove",n.render),n.className=n.pfx+"buttons",n}return fI(e,t),e.prototype.addTo=function(t){this.addToCollection(t)},e.prototype.addToCollection=function(t,e){var n=e||null,o=new fL({el:t.get("el"),model:t}).render().el;return n?n.appendChild(o):this.$el.append(o),o},e.prototype.render=function(){var t=this,e=document.createDocumentFragment();return this.$el.empty(),this.collection.each(function(n){return t.addToCollection(n,e)}),this.$el.append(e),this.$el.attr("class",(0,b.result)(this,"className")),this},e}(ep),fR=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fV=function(){return(fV=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},fF=function(t){function e(e){var n=t.call(this,{model:e,el:e.get("el")})||this;return n.className=n.pfx+"panel",n.id=n.pfx+e.get("id"),n.listenTo(e,"change:appendContent",n.appendContent),n.listenTo(e,"change:content",n.updateContent),n.listenTo(e,"change:visible",n.toggleVisible),e.view=n,n}return fR(e,t),e.prototype.appendContent=function(){this.$el.append(this.model.get("appendContent"))},e.prototype.updateContent=function(){this.$el.html(this.model.get("content"))},e.prototype.toggleVisible=function(){if(!this.model.get("visible"))return void this.$el.addClass("".concat(this.ppfx,"hidden"));this.$el.removeClass("".concat(this.ppfx,"hidden"))},e.prototype.attributes=function(){return this.model.get("attributes")},e.prototype.initResize=function(){var t=this.em,e=null==t?void 0:t.Editor,n=this.model.get("resizable");if(e&&n){var o=!0===n?[!0,!0,!0,!0]:n,r=o.length,i=void 0,a=void 0,s=void 0,l=!1;if(2==r){var c=o;i=c[0],s=c[0],a=c[1],l=c[1]}else if(4==r){var c=o;i=c[0],a=c[1],s=c[2],l=c[3]}var u=new e.Utils.Resizer(fV({tc:i,cr:a,bc:s,cl:l,tl:!1,tr:!1,bl:!1,br:!1,appendTo:this.el,silentFrames:!0,avoidContainerUpdate:!0,prefix:e.getConfig().stylePrefix,onEnd:function(){t.Canvas.refresh({all:!0})},posFetcher:function(t,e){var n=e.target,o=t.style,r=u.getConfig(),i=r.keyWidth,a=r.keyHeight,s=t.getBoundingClientRect(),l="container"==n,c=o[i],p=o[a];return{left:0,top:0,width:c&&!l?parseFloat(c):s.width,height:p&&!l?parseFloat(p):s.height}}},n&&"boolean"!=typeof n?n:{}));u.blur=function(){},u.focus(this.el)}},e.prototype.render=function(){var t=this.model.buttons,e=this.$el,n=this.ppfx,o="".concat(this.className," ").concat(this.id," ").concat(n,"one-bg ").concat(n,"two-color");if(e.addClass(o),this.toggleVisible(),t.length){var r=new fN(t);e.append(r.render().el)}return e.append(this.model.get("content")),this},e}(ep),fH=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fU=function(t){function e(e){var n=t.call(this,{collection:e})||this;return n.listenTo(e,"add",n.addTo),n.listenTo(e,"reset",n.render),n.listenTo(e,"remove",n.onRemove),n.className=n.pfx+"panels",n}return fH(e,t),e.prototype.onRemove=function(t){var e=t.view;e&&e.remove()},e.prototype.addTo=function(t){this.addToCollection(t)},e.prototype.addToCollection=function(t,e){var n=e||null,o=t.get("el"),r=new fF(t),i=r.render().el,a=t.get("appendTo");
1if(o);else if(a){var s=document.querySelector(a);null==s||s.appendChild(i)}else n?n.appendChild(i):this.$el.append(i);return r.initResize(),i},e.prototype.render=function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.each(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this},e}(ep),fB=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fz=function(t){function e(e){var n=t.call(this,e,"Panels",{stylePrefix:"pn-",defaults:[{id:"commands",buttons:[{}]},{id:"options",buttons:[{active:!0,id:fg,className:"fa fa-square-o",command:"core:component-outline",context:fg,attributes:{title:"View components"}},{id:fC,className:"fa fa-eye",command:fC,context:fC,attributes:{title:"Preview"}},{id:f_,className:"fa fa-arrows-alt",command:f_,context:f_,attributes:{title:"Fullscreen"}},{id:fv,className:"fa fa-code",command:fv,attributes:{title:"View code"}}]},{id:"views",buttons:[{id:fy,className:"fa fa-paint-brush",command:fy,active:!0,togglable:!1,attributes:{title:"Open Style Manager"}},{id:fm,className:"fa fa-cog",command:fm,togglable:!1,attributes:{title:"Settings"}},{id:fb,className:"fa fa-bars",command:fb,togglable:!1,attributes:{title:"Open Layer Manager"}},{id:fw,className:"fa fa-th-large",command:fw,togglable:!1,attributes:{title:"Open Blocks"}}]}]})||this;return n.panels=new fA(n,n.config.defaults),n}return fB(e,t),e.prototype.getPanels=function(){return this.panels},e.prototype.getPanelsEl=function(){var t;return null==(t=this.PanelsViewObj)?void 0:t.el},e.prototype.addPanel=function(t){return this.panels.add(t)},e.prototype.removePanel=function(t){return this.panels.remove(t)},e.prototype.getPanel=function(t){var e=this.panels.where({id:t});return e.length?e[0]:null},e.prototype.addButton=function(t,e){var n=this.getPanel(t);return n?n.buttons.add(e):null},e.prototype.removeButton=function(t,e){var n=this.getPanel(t);return n&&n.buttons.remove(e)},e.prototype.getButton=function(t,e){var n=this.getPanel(t);if(n){var o=n.buttons.where({id:e});return o.length?o[0]:null}return null},e.prototype.render=function(){var t;return null==(t=this.PanelsViewObj)||t.remove(),this.PanelsViewObj=new fU(this.panels),this.PanelsViewObj.render().el},e.prototype.active=function(){this.getPanels().each(function(t){t.buttons.each(function(t){t.get("active")&&t.trigger("updateActive")})})},e.prototype.disableButtons=function(){this.getPanels().each(function(t){t.buttons.each(function(t){t.get("disable")&&t.trigger("change:disable")})})},e.prototype.destroy=function(){this.panels.reset(),this.panels.stopListening(),this.PanelsViewObj&&this.PanelsViewObj.remove()},e}(tJ),fW=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),f$=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},fq=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fW(e,t),e.prototype.build=function(t,e){void 0===e&&(e={});var n=e.em,o=f$(e,["em"]);if(e.cleanId&&n){var r=n.Css.getAll().toJSON().map(function(t){var e=t.selectors,n=e&&1===e.length&&e.models[0];return n&&n.isId()&&n.get("name")}
1).filter(Boolean),i=o.attributes;o.attributes=function(t,e){var n=(e="function"==typeof i?i(t,e):e).id;return n&&"i"===n[0]&&!t.get("script")&&!t.get("script-export")&&!t.get("attributes").id&&0>r.indexOf(n)&&delete e.id,e}}return t.toHTML(o)},e}(tH),fG=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fG(e,t),e.prototype.build=function(t){var e=this,n=t.toJSON();return this.beforeEach(n),(0,b.each)(n,function(t,o){var r=n[o];r instanceof tH?n[o]=e.build(r):r instanceof tU&&(n[o]=[],r.length&&r.forEach(function(t,r){n[o][r]=e.build(t)}))}),n},e.prototype.beforeEach=function(t){delete t.status},e}(tH),fY=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fJ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fY(e,t),e.prototype.mapModel=function(t){var e,n=this,o="",r=t.get("script-export")||t.get("script"),i=t.get("type"),a=t.get("components"),s=t.getId();if(r){var l=t.get("attributes");l=(0,b.extend)({},l,{id:s}),t.set("attributes",l,{silent:!0});var c=t.getScriptString(r),u=t.get("script-props");if(t.get("scriptUpdated")&&!u)this.mapJs[i+"-"+s]={ids:[s],code:c};else{var p=void 0,f=this.mapJs[i];if(u&&(p=t.__getScriptProps()),f)f.ids.push(s),p&&(f.props[s]=p);else{var d={ids:[s],code:c};p&&((e={})[s]=p,d.props=e),this.mapJs[i]=d}}}return a.forEach(function(t){o+=n.mapModel(t)}),o},e.prototype.build=function(t){this.mapJs={},this.mapModel(t);var e="";for(var n in this.mapJs){var o=this.mapJs[n];
1if(o.code)if(o.props){if(function(t){var e;return 0===((null==(e=t.toString().match(/\{([\s\S]*)\}/m))?void 0:e[1])||"").replace(/^\s*\/\/.*$/gm,"").trim().length}(o.code))continue;e+="\n var props = ".concat(JSON.stringify(o.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(o.code,".bind(el))(props[el.id]);\n }")}else{var r="#"+o.ids.join(", #");e+="\n var items = document.querySelectorAll('".concat(r,"');\n for (var i = 0, len = items.length; i < len; i++) {\n (function(){\n").concat(o.code,"\n}.bind(items[i]))();\n }")}}return e},e}(tH),fX=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),fZ=function(){return(fZ=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};to()&&(i=v(408),v(253),v(389),v(640));var fQ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return fX(e,t),e.prototype.defaults=function(){return{input:"",label:"",codeName:"",theme:"hopscotch",readOnly:!0,lineNumbers:!0,autoFormat:!0}},e.prototype.init=function(t){return(0,b.bindAll)(this,"onChange"),this.editor=i.fromTextArea(t,fZ({dragDrop:!1,lineWrapping:!0,mode:this.get("codeName")},this.attributes)),this.element=t,this.editor.on("change",this.onChange),this},e.prototype.onChange=function(){this.trigger("update",this)},e.prototype.getEditor=function(){return this.editor},e.prototype.getElement=function(){return this.element},e.prototype.setElement=function(t){return this.element=t,this},e.prototype.refresh=function(){return this.getEditor().refresh(),this},e.prototype.focus=function(){return this.getEditor().focus(),this},e.prototype.getContent=function(){var t=this.getEditor();return t&&t.getValue()},e.prototype.setContent=function(t,e){var n=this;void 0===e&&(e={});var o=this.editor;if(o){o.setValue(t);var r=this.get("autoFormat");o.autoFormatRange&&(!0===r||Array.isArray(r)&&r.includes(this.get("codeName")))&&(i.commands.selectAll(o),o.autoFormatRange(o.getCursor(!0),o.getCursor(!1)),i.commands.goDocStart(o)),e.noRefresh||setTimeout(function(){return n.refresh()})}},e}(tH);fQ.prototype.CodeMirror=i;var f0=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),f1=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return f0(e,t),e.prototype.template=function(t){var e,n,o=t.pfx,r=t.codeName,i=t.label;return tD(a||(e=['\n <div class="','editor" id="',"",'">\n <div id="','title">','</div>\n <div id="','code"></div>\n </div>\n '],n=['\n <div class="','editor" id="',"",'">\n <div id="','title">','</div>\n <div id="','code"></div>\n </div>\n '],Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,a=e),o,o,r,o,i,o)},e.prototype.initialize=function(t){this.config=t.config||{},this.pfx=this.config.stylePrefix},e.prototype.render=function(){var t,e=this.model,n=this.pfx,o=this.$el,r=e.toJSON(),i=e.get("input")||(null==(t=e.getElement)?void 0:t.call(e));return r.pfx=n,o.html(this.template(r)),o.attr("class","".concat(n,"editor-c")),o.find("#".concat(n,"code")).append(i),this},e}(tB),f2=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),f3=function(){return(f3=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},f5=function(t){function e(e){var n=t.call(this,e,"CodeManager",{stylePrefix:"cm-",optsCodeViewer:{}})||this;n.EditorView=f1;var o=n.config,r=o.pStylePrefix;return r&&(o.stylePrefix=r+o.stylePrefix),n.generators={},n.viewers={},n.defGenerators={html:new fq,css:new aT,json:new fK,js:new fJ},n.defViewers={CodeMirror:new fQ},n.loadDefaultGenerators().loadDefaultViewers(),n}return f2(e,t),e.prototype.addGenerator=function(t,e){return this.generators[t]=e,this},e.prototype.getGenerator=function(t){return this.generators[t]},e.prototype.getGenerators=function(){return this.generators},e.prototype.addViewer=function(t,e){return this.viewers[t]=e,this},e.prototype.getViewer=function(t){return this.viewers[t]},e.prototype.getViewers=function(){return this.viewers},e.prototype.createViewer=function(t){void 0===t&&(t={});var e=(0,b.isUndefined)(t.type)?"CodeMirror":t.type,n=this.getViewer(e)&&this.getViewer(e).clone(),o=document.createElement("div"),r=document.createElement("textarea");return o.appendChild(r),n.set(f3(f3({},this.config.optsCodeViewer),t)),n.init(r),n.setElement(o),n},e.prototype.updateViewer=function(t,e){t.setContent(e)},e.prototype.getCode=function(t,e,n){void 0===n&&(n={}),n.em=this.em;var o=this.getGenerator(e);return o?o.build(t,n):""},e.prototype.loadDefaultGenerators=function(){for(var t in this.defGenerators)this.addGenerator(t,this.defGenerators[t]);return this},e.prototype.loadDefaultViewers=function(){for(var t in this.defViewers)this.addViewer(t,this.defViewers[t]);return this},e.prototype.destroy=function(){},e}(tJ),f4=v(729),f9=v.n(f4);!function(t){t.update="update",t.updateBefore="updateBefore",t.undo="undo",t.redo="redo",t.load="load",t.projectLoad="project:load",t.projectLoaded="project:loaded",t.projectGet="project:get",t.log="log",t.telemetryInit="telemetry:init",t.destroy="destroy",t.destroyed="destroyed"}(s||(s={}));var f6=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),f7=function(){return(f7=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},f8=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dt=function(t){return t.avoidStore||t.noUndo||t.partial},de=function(t){return Object.keys(t.changedAttributes())},dn=new WeakMap,dr=function(t){function e(e){var n=t.call(this,e,"UndoManager",{maximumStackLength:500,trackSelection:!0})||this;return n.config._disable&&(n.config.maximumStackLength=0),n.um=new(f9())(f7({track:!0,register:[]},n.config)),n.um.changeUndoType("change",{condition:function(t){var e=t.get("_undo");if(e){var n=t.get("_undoexc");if((0,b.isArray)(n)&&de(t).some(function(t){return n.indexOf(t)>=0}))return!1;if((0,b.isBoolean)(e)||(0,b.isArray)(e)&&de(t).some(function(t){return e.indexOf(t)>=0}))return!0}return!1},on:function(t,e,n){var o=dn.get(t);o||(o=t.previousAttributes(),dn.set(t,o));var r=n||e||{};if(r.noUndo&&setTimeout(function(){dn.delete(t)}),!dt(r)){var i=t.toJSON({fromUndo:!0}),a={object:t,before:o,after:i};if(dn.delete(t),!(0,b.isEmpty)(i))return a}}}
1),n.um.changeUndoType("add",{on:function(t,e,o){if(void 0===o&&(o={}),!dt(o)&&n.isRegistered(e))return{object:e,before:void 0,after:t,options:f7(f7({},o),{fromUndo:!0})}}}),n.um.changeUndoType("remove",{on:function(t,e,o){if(void 0===o&&(o={}),!dt(o)&&n.isRegistered(e))return{object:e,before:t,after:void 0,options:f7(f7({},o),{fromUndo:!0})}}}),n.um.changeUndoType("reset",{undo:function(t,e){t.reset(e,{fromUndo:!0})},redo:function(t,e,n){t.reset(n,{fromUndo:!0})},on:function(t,e){if(void 0===e&&(e={}),!dt(e)&&n.isRegistered(t))return{object:t,before:e.previousModels,after:f8([],t.models,!0),options:f7(f7({},e),{fromUndo:!0})}}}),n.um.on("undo redo",function(){e.getSelectedAll().map(function(t){return t.trigger("rerender:layer")})}),[s.undo,s.redo].forEach(function(t){return n.um.on(t,function(){return e.trigger(t)})}),n}return f6(e,t),Object.defineProperty(e.prototype,"isDisabled",{get:function(){return!!this.config._disable},enumerable:!1,configurable:!0}),e.prototype.postLoad=function(){var t=this.config,e=this.em;t.trackSelection&&!this.isDisabled&&e&&this.add(e.get("selected"))},e.prototype.add=function(t){return this.isDisabled||this.um.register(t),this},e.prototype.remove=function(t){return this.isDisabled||this.um.unregister(t),this},e.prototype.removeAll=function(){return this.isDisabled||this.um.unregisterAll(),this},e.prototype.start=function(){return this.um.startTracking(),this},e.prototype.stop=function(){return this.um.stopTracking(),this},e.prototype.undo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return e.isEditing()||n.undo(t),this},e.prototype.undoAll=function(){return this.um.undoAll(),this},e.prototype.redo=function(t){void 0===t&&(t=!0);var e=this.em,n=this.um;return e.isEditing()||n.redo(t),this},e.prototype.redoAll=function(){return this.um.redoAll(),this},e.prototype.hasUndo=function(){return!!this.um.isAvailable("undo")},e.prototype.hasRedo=function(){return!!this.um.isAvailable("redo")},e.prototype.isRegistered=function(t){return!!this.getInstance().objectRegistry.isRegistered(t)},e.prototype.getStack=function(){return this.um.stack},e.prototype.getStackGroup=function(){var t=[],e=[];return this.getStack().forEach(function(n){var o=n.get("magicFusionIndex");0>e.indexOf(o)&&(e.push(o),t.push(n))}),t},e.prototype.skip=function(t){var e=!!this.um.isTracking();e&&this.stop(),t(),e&&this.start()},e.prototype.getGroupedStack=function(){var t={},e=this.getStack(),n=function(t,e){var n=t.attributes,o=n.type,r=n.after,i=n.before,a=n.object,s=n.options;return{index:e,type:o,after:r,before:i,object:a,options:void 0===s?{}:s}};return e.forEach(function(e,o){var r=e.get("magicFusionIndex"),i=n(e,o);t[r]?t[r].push(i):t[r]=[i]}),Object.keys(t).map(function(e){var n=t[e];return{index:n[n.length-1].index,actions:n,labels:(0,b.unique)(n.reduce(function(t,e){var n,o=null==(n=e.options)?void 0:n.action;return o&&t.push(o),t},[]))}})},e.prototype.goToGroup=function(t){var e=this;if(t){var n=this.getPointer(),o=t.index-n;(0,b.times)(Math.abs(o),function(){e[o<0?"undo":"redo"](!1)})}},e.prototype.getPointer=function(){return this.getStack().pointer},e.prototype.clear=function(){return this.um.clear(),this},e.prototype.getInstance=function(){return this.um},e.prototype.destroy=function(){this.clear().removeAll()},e}(tJ),di=function(){return(di=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};!function(t){t[t.ACTIVE=1]="ACTIVE",t[t.INACTIVE=0]="INACTIVE",t[t.DISABLED=-1]="DISABLED"}(l||(l={}));var da="_rte",ds={ACTIVE:1,INACTIVE:0,DISABLED:-1},dl=function(t,e){void 0===e&&(e="A");var n=t.selection()||{},o=n.anchorNode,r=n.focusNode,i=null==o?void 0:o.parentNode,a=null==r?void 0:r.parentNode;return(null==i?void 0:i.nodeName)==e||(null==a?void 0:a.nodeName)==e},dc="data-selectme",du={bold:{name:"bold",icon:"<b>B</b>",attributes:{title:"Bold"},result:function(t){return t.exec("bold")}},italic:{name:"italic",icon:"<i>I</i>",attributes:{title:"Italic"},result:function(t){return t.exec("italic")}},underline:{name:"underline",icon:"<u>U</u>",attributes:{title:"Underline"},result:function(t){return t.exec("underline")}},strikethrough:{name:"strikethrough",icon:"<s>S</s>
1",attributes:{title:"Strike-through"},result:function(t){return t.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(t){return t&&t.selection()&&dl(t)?ds.ACTIVE:ds.INACTIVE},result:function(t){dl(t)?t.exec("unlink"):t.insertHTML('<a href="" '.concat(dc,">").concat(t.selection(),"</a>"),{select:!0})}},wrap:{name:"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(t){return(null==t?void 0:t.selection())&&dl(t,"SPAN")?ds.DISABLED:ds.INACTIVE},result:function(t){dl(t,"SPAN")||t.insertHTML("<span ".concat(dc,">").concat(t.selection(),"</span>"),{select:!0})}}},dp=function(){function t(t,e,n){void 0===n&&(n={});var o=this;if(this.em=t,this.settings=n,e[da])return e[da];e[da]=this,this.setEl(e),this.updateActiveActions=this.updateActiveActions.bind(this),this.__onKeydown=this.__onKeydown.bind(this),this.__onPaste=this.__onPaste.bind(this);var r=(n.actions||[]).map(function(t){var e=t;return(0,b.isString)(t)?e=di({},du[t]):du[t.name]&&(e=di(di({},du[t.name]),t)),e}),i=r.length?r:Object.keys(du).map(function(t){return du[t]});n.classes=di({actionbar:"actionbar",button:"action",active:"active",disabled:"disabled",inactive:"inactive"},n.classes);var a=n.classes,s=n.actionbar;if(this.actionbar=s,this.classes=a,this.actions=i,!s){if(!this.isCustom(n.module)){var l=n.actionbarContainer;(s=document.createElement("div")).className=a.actionbar,null==l||l.appendChild(s),this.actionbar=s}i.forEach(function(t){return o.addAction(t)})}return n.styleWithCSS&&this.exec("styleWithCSS"),this}return t.prototype.isCustom=function(t){var e=t||this.em.RichTextEditor;return!!((null==e?void 0:e.config.custom)||(null==e?void 0:e.customRte))},t.prototype.destroy=function(){},t.prototype.setEl=function(t){this.el=t,this.doc=t.ownerDocument},t.prototype.updateActiveActions=function(){var t=this,e=this.getActions();e.forEach(function(e){var n=e.update,o=e.btn,r=t.classes,i=r.active,a=r.inactive,s=r.disabled,c=e.state,u=e.name,p=t.doc,f=l.INACTIVE;if(o&&(o.className=o.className.replace(i,"").trim(),o.className=o.className.replace(a,"").trim(),o.className=o.className.replace(s,"").trim()),c){var d=c(t,p);if(f=d,o)switch(d){case ds.ACTIVE:o.className+=" ".concat(i);break;case ds.INACTIVE:o.className+=" ".concat(a);break;case ds.DISABLED:o.className+=" ".concat(s)}}else p.queryCommandSupported(u)&&p.queryCommandState(u)&&(o&&(o.className+=" ".concat(i)),f=l.ACTIVE);e.currentState=f,null==n||n(t,e)}),e.length&&this.em.RichTextEditor.__dbdTrgCustom()},t.prototype.enable=function(t){return this.enabled?this:this.__toggleEffects(!0,t)},t.prototype.disable=function(){return this.__toggleEffects(!1)},t.prototype.__toggleEffects=function(t,e){void 0===t&&(t=!1),void 0===e&&(e={});var n=t?U:B,o=this.el,r=this.doc,i=this.actionbarEl();if(i&&(i.style.display=t?"":"none"),o.contentEditable="".concat(!!t),n(o,"mouseup keyup",this.updateActiveActions),n(r,"keydown",this.__onKeydown),n(r,"paste",this.__onPaste),this.enabled=t,t){var a=e.event;if(this.syncActions(),this.updateActiveActions(),a){var s=null;if(r.caretRangeFromPoint){var l=R(a);s=r.caretRangeFromPoint(l.clientX,l.clientY)}else a.rangeParent&&(s=r.createRange()).setStart(a.rangeParent,a.rangeOffset);var c=r.getSelection();null==c||c.removeAllRanges(),s&&(null==c||c.addRange(s))}o.focus()}return this},t.prototype.__onKeydown=function(t){var e=this.em,n=e.RichTextEditor.getConfig().onKeydown;if(n)return n({ev:t,rte:this,editor:e.getEditor()});var o=this.doc;"Enter"!==t.key||["insertOrderedList","insertUnorderedList"].some(function(t){return o.queryCommandState(t)})||(o.execCommand("insertLineBreak"),t.preventDefault())},t.prototype.__onPaste=function(t){var e=this.em,n=e.RichTextEditor.getConfig().onPaste;if(n)return n({ev:t,rte:this,editor:e.getEditor()});var o=t.clipboardData,r=o.getData("text"),i=o.getData("text/html");if(r&&!i){t.preventDefault();var a=r.replace(/(?:\r\n|\r|\n)/g,"<br/>");this.doc.execCommand("insertHTML",!1,a)}},t.prototype.syncActions=function(){var t=this;
1this.getActions().forEach(function(e){if(t.actionbar&&(!e.state||e.state&&e.state(t,t.doc)>=0)){var n=e.event||"click",o=e.btn;o&&(o["on".concat(n)]=function(){e.result(t,e),t.updateActiveActions()})}})},t.prototype.addAction=function(t,e){void 0===e&&(e={});var n=e.sync,o=this.actionbarEl();if(o){var r=t.icon,i=t.attributes,a=void 0===i?{}:i,s=document.createElement("span");for(var l in s.className=this.classes.button,t.btn=s,a)s.setAttribute(l,a[l]);"string"==typeof r?s.innerHTML=r:s.appendChild(r),o.appendChild(s)}n&&(this.actions.push(t),this.syncActions())},t.prototype.getActions=function(){return this.actions},t.prototype.selection=function(){return this.doc.getSelection()},t.prototype.exec=function(t,e){this.doc.execCommand(t,!1,e)},t.prototype.actionbarEl=function(){return this.actionbar},t.prototype.insertHTML=function(t,e){var n=(void 0===e?{}:e).select,o=this.em,r=this.doc,i=this.el,a=r.getSelection();if(a&&a.rangeCount){var s=tk(i)||o.getSelected(),l=r.createElement("div"),c=a.getRangeAt(0);c.deleteContents(),(0,b.isString)(t)?l.innerHTML=t:t&&l.appendChild(t),Array.prototype.slice.call(l.childNodes).forEach(function(t){c.insertNode(t)}),a.removeAllRanges(),a.addRange(c),i.focus(),n&&s&&(s.once("rte:disable",function(){var t=s.find("[".concat(dc,"]"))[0];t&&(o.setSelected(t),t.removeAttributes(dc))}),s.trigger("disable"))}},t}();!function(t){t.enable="rte:enable",t.disable="rte:disable",t.custom="rte:custom"}(c||(c={}));var df=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dd=function(){return(dd=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},dh=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},dg=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},dv=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dy="".concat(t5.refresh," frame:scroll ").concat(pi.update),dm=function(t){function e(e){var n=t.call(this,e,"RichTextEditor",{stylePrefix:"rte-",adjustToolbar:!0,actions:["bold","italic","underline","strikethrough","link","wrap"],custom:!1})||this;n.events=c;var o=n.config,r=o.pStylePrefix;r&&(o.stylePrefix=r+o.stylePrefix),n.pfx=o.stylePrefix,n.actions=o.actions||[];var i=new tH;return n.model=i,i.on("change:currentView",n.__trgCustom,n),n.__dbdTrgCustom=(0,b.debounce)(function(){return n.__trgCustom()},0),n}return df(e,t),e.prototype.onLoad=function(){if(to()){var t=this.config,e=t.pStylePrefix,n=t.custom,o=P("div",{class:function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];
1return(Array.isArray(t[0])?t[0]:w([],t,!0)).filter(Boolean).join(" ")}("".concat(e,"rte-toolbar"),!n&&"".concat(e,"one-bg ").concat(e,"rte-toolbar-ui"))});this.toolbar=o,this.initRte(P("div")),U(o,"mousedown",function(t){return t.stopPropagation()})}},e.prototype.__trgCustom=function(){var t=this.model,e=this.em,n=this.events;e.trigger(n.custom,{enabled:!!t.get("currentView"),container:this.getToolbarEl(),actions:this.getAll()})},e.prototype.destroy=function(){var t,e,n;null==(t=this.globalRte)||t.destroy(),null==(n=null==(e=this.customRte)?void 0:e.destroy)||n.call(e),this.model.stopListening().clear({silent:!0}),this.__dbdTrgCustom.cancel(),C(this.toolbar)},e.prototype.postRender=function(t){var e=t.model.get("Canvas");this.toolbar.style.pointerEvents="all",this.hideToolbar(),e.getToolsEl().appendChild(this.toolbar)},e.prototype.initRte=function(t){var e=this.globalRte,n=this.em,o=this.pfx,r=this.actionbar,i=this.config,a=this.actions||dv([],i.actions,!0);return e?(e.em=n,e.setEl(t)):(e=new dp(n,t,{classes:{actionbar:"".concat(o,"actionbar"),button:"".concat(o,"action"),active:"".concat(o,"active"),inactive:"".concat(o,"inactive"),disabled:"".concat(o,"disabled")},actions:a,actionbar:r,actionbarContainer:this.toolbar,module:this}),this.globalRte=e),e.actionbar&&(this.actionbar=e.actionbar),e.actions&&(this.actions=e.actions),e},e.prototype.add=function(t,e){var n;void 0===e&&(e={}),e.name=t,null==(n=this.globalRte)||n.addAction(e,{sync:!0})},e.prototype.get=function(t){var e,n;return null==(e=this.globalRte)||e.getActions().forEach(function(e){e.name==t&&(n=e)}),n},e.prototype.getAll=function(){var t;return(null==(t=this.globalRte)?void 0:t.getActions())||[]},e.prototype.remove=function(t){var e,n=this.getAll(),o=this.get(t);if(o){var r=o.btn,i=n.indexOf(o);null==(e=null==r?void 0:r.parentNode)||e.removeChild(r),n.splice(i,1)}return o},e.prototype.run=function(t){var e=this.globalRte,n=(0,b.isString)(t)?this.get(t):t;e&&n&&(n.result(e,n),e.updateActiveActions())},e.prototype.getToolbarEl=function(){return this.toolbar},e.prototype.updatePosition=function(){var t=this.em,e=this.toolbar,n=t.Canvas,o=e.style,r=n.getTargetToElementFixed(this.lastEl,e,{event:"rteToolbarPosUpdate",left:0});["top","left","bottom","right"].forEach(function(t){var e=r[t];tn(e)&&(o[t]=(0,b.isString)(e)?e:(e||0)+"px")})},e.prototype.enable=function(t,e,n){return dh(this,void 0,void 0,function(){var o,r,i,a,s,l;return dg(this,function(c){switch(c.label){case 0:return this.lastEl=t.el,o=this,r=o.customRte,i=o.em,a=o.events,s=t.getChildrenContainer(),this.toolbar.style.display="",[4,r?r.enable(s,e,n):this.initRte(s).enable(n)];case 1:return l=c.sent(),i&&(setTimeout(this.updatePosition.bind(this),0),i.off(dy,this.updatePosition,this),i.on(dy,this.updatePosition,this),i.trigger(a.enable,t,l)),this.model.set({currentView:t}),[2,l]}})})},e.prototype.getContent=function(t,e){return dh(this,void 0,void 0,function(){var n,o;return dg(this,function(r){switch(r.label){case 0:if(n=this.customRte,o=t.getChildrenContainer(),!(n&&e&&(0,b.isFunction)(n.getContent)))return[3,2];return[4,n.getContent(o,e,{view:t})];case 1:return[2,r.sent()];case 2:return[2,o.innerHTML]}})})},e.prototype.hideToolbar=function(){var t=this.toolbar.style,e="-1000px";t.top=e,t.left=e,t.display="none"},e.prototype.disable=function(t,e){return dh(this,arguments,void 0,function(t,e,n){var o,r,i,a,s,l;return void 0===n&&(n={}),dg(this,function(c){switch(c.label){case 0:if(o={},r=this,i=r.em,a=r.events,!(s=this.customRte))return[3,2];return[4,s.disable(t.getChildrenContainer(),e,dd(dd({},n),{view:t}))];case 1:return(l=c.sent())&&(o=l),[3,3];case 2:e&&e.disable(),c.label=3;case 3:return this.hideToolbar(),i&&(i.off(dy,this.updatePosition,this),n.fromMove||i.trigger(a.disable,t,e)),this.model.unset("currentView"),[2,o]}})})},e}(tJ);!function(t){t.sectorAdd="style:sector:add",t.sectorRemove="style:sector:remove",t.sectorUpdate="style:sector:update",t.propertyAdd="style:property:add",t.propertyRemove="style:property:remove",t.propertyUpdate="style:property:update",t.target="style:target",t.layerSelect="style:layer:select",t.custom="style:custom",t.all="style"}(u||(u={}));var db=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dw=function(){return{blocks:[],commands:[],keymaps:[],componentTypes:[],devices:[],traitTypes:[],styleTypes:[],assetTypes:[],styleSectors:[]}},d_=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return db(e,t),e.prototype.defaults=function(){return{id:"",plugin:function(){},options:{},added:dw(),cleanup:function(){}}},e}(tH),dC=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dC(e,t),e}(tU);dx.prototype.model=d_,function(t){t.add="plugin:add",t.remove="plugin:remove",t.removeBefore="plugin:remove:before",t.update="plugin:update",t.all="plugin"}(p||(p={}));var dO=new Map,dS=function(t){return(0,b.isFunction)(t)},dT=function(t){for(var e,n=t,o={};dS(n)&&n.__gjsPluginMeta;){var r=n.__gjsPluginMeta;n=r.plugin,Object.assign(o,r.options||{}),e=e||r.id}return{plugin:n,options:o,id:e}},dP=function(t){return dO.get(t)},dE=function(t){var e="";return dO.forEach(function(n,o){e||n!==t||(e=o)}),e||void 0},dk=function(t){var e=tr();return Object.keys(e).find(function(n){try{var o=e[n];return o===t||(null==o?void 0:o.default)===t}catch(t){return!1}})},dj=function(t){return t.__gjsPluginId||dE(t)||dk(t)},dA=function(t){var e=dP(t);if(e)return e;var n=tr()[t];return(null==n?void 0:n.default)||n},dM=function(t){var e=dT(t).plugin;return(0,b.isString)(e)?dA(e):(null==e?void 0:e.default)||e},dD=function(t,e){t.getModel().logWarning("Plugin ".concat(e," not found"),{context:"plugins",plugin:e})},dL=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dI=function(){return(dI=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},dN=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dR=function(t){function e(e){var n=t.call(this,e,"PluginManager",new dx,p,{})||this;return n.events=p,n.storageKey="",n}return dL(e,t),Object.defineProperty(e.prototype,"editor",{get:function(){return this.em.getEditor()},enumerable:!1,configurable:!0}),e.prototype.getConfigPluginOptions=function(t,e){var n=this.editor.getConfig().pluginsOpts||{},o=(0,b.isFunction)(e)?e.toString():"";return n[t]||o&&n[o]||{}},e.prototype.generatePluginId=function(){return"gjs-plugin:".concat(this._createId(16,0))},e.prototype.resolvePluginId=function(t,e,n){return n||((0,b.isString)(t)?t:"")||dj(e)||this.generatePluginId()},e.prototype.resolvePluginTarget=function(t){if(t instanceof d_)return t;if((0,b.isString)(t))return this.get(t);var e=dT(t).plugin;if(dS(e))return this.getAll().find(function(t){return t.get("plugin")===e})},e.prototype.normalizePlugin=function(t,e){void 0===e&&(e={});var n,o=t&&"object"==typeof t&&!(0,b.isFunction)(t)&&"plugin"in t?t:void 0,r=o?o.plugin:t,i=(null==o?void 0:o.id)||"",a=dT(r),s=dM(a.plugin);if(s&&dS(s)){var l=i||this.resolvePluginId(r,s);n={id:l,plugin:s,options:dI(dI(dI({},this.getConfigPluginOptions(l,r)),a.options),e)}}else{var c=(0,b.isString)(a.plugin)?a.plugin:dj(a.plugin)||i;if(i)throw Error("Plugin ".concat(i," not found"));dD(this.editor,c||"unknown")}return n},e.prototype.createAddedTracker=function(){var t=dw(),e=[],n=this.editor,r=[],i=function(t,e){n.on(t,e),r.push([t,e])};return i(aB.add,function(o){var r=o.get("id");!r||t.blocks.includes(r)||(t.blocks.push(r),e.push(function(){return n.Blocks.remove(r)}))}),i(o.add,function(o){var r=o.id;!r||t.keymaps.includes(r)||(t.keymaps.push(r),e.push(function(){return n.Keymaps.remove(r)}))}),i(pi.typeAdd,function(o){var r=o.id;!r||t.componentTypes.includes(r)||(t.componentTypes.push(r),e.push(function(){return n.Components.removeType(r)}))}),i(t0.add,function(o){var r=o.get("id");!r||t.devices.includes(r)||(t.devices.push(r),e.push(function(){return n.Devices.remove(r)}))}),i(u.sectorAdd,function(o){var r=o.get("id");!r||t.styleSectors.includes(r)||(t.styleSectors.push(r),e.push(function(){return n.StyleManager.removeSector(r)}))}),{added:t,stop:function(){return r.forEach(function(t){var e=t[0],o=t[1];return n.off(e,o)})}
1,cleanup:function(){e.slice().reverse().forEach(function(t){return t()})}}},e.prototype.add=function(t,e){var n,o=this;void 0===e&&(e={});var r=this.normalizePlugin(t,e);if(r){var i=this.get(r.id);if(i)return i;var a=this.createAddedTracker();try{n=r.plugin(this.editor,r.options)}catch(t){throw a.stop(),a.cleanup(),t}a.stop();var s=new d_({id:r.id,plugin:r.plugin,options:r.options,added:a.added,cleanup:function(){}}),l=!1,c=function(){l||(l=!0,a.cleanup())};return s.set("cleanup",function(){if(!l){var t=(0,b.isFunction)(n)?n:null;t?t({cleanup:c,editor:o.editor,plugin:s}):c()}}),this.all.add(s),s}},e.prototype.get=function(t){return this.all.get(t)},e.prototype.getAll=function(){return dN([],this.all.models,!0)},e.prototype.remove=function(t,e){var n=this;void 0===e&&(e={});var o=this.resolvePluginTarget(t);if(o){var r=this.em,i=this.events,a=function(){var t;return null==(t=o.get("cleanup"))||t(),n.all.remove(o,e),o};return e.silent||r.trigger(i.removeBefore,o,a,e),e.abort?void 0:a()}},e.prototype.destroy=function(){this.__destroy()},e}(tX),dV=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dF=function(){return(dF=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},dH=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},dU=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dB=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dV(e,t),e.getDefaults=function(){return(0,b.result)(this.prototype,"defaults")},e.prototype.defaults=function(){return{name:"",property:"",type:"",defaults:"",info:"",value:"",icon:"",functionName:"",status:"",visible:!0,fixedValues:["initial","inherit"],full:!1,important:!1,toRequire:!1,requires:void 0,requiresParent:null,parentTarget:null}},e.prototype.initialize=function(t,n){void 0===t&&(t={}),void 0===n&&(n={}),this.em=n.em;var o=this.getId()||"",r=this.get("name")||this.get("label")||"";this.get("property")||this.set("property",(r||o).replace(/ /g,"-"));var i=this.get("property");this.get("id")||this.set("id",i),r||this.set("name",tO(i).replace(/-/g," ")),this.on("change",this.__upTargets),e.callInit(this,t,n)},e.prototype.__getParentProp=function(){var t,e;return null==(e=null==(t=this.collection)?void 0:t.opts)?void 0:e.parentProp},e.prototype.__upTargets=function(t,e){var n,o=this;void 0===e&&(e={});var r=this.em.Styles,i=this.getName(),a=e.__clear,s=a?"":this.__getFullValue(e),l=this.__getParentProp(),c=this.changedAttributes(),u=(0,b.keys)(c).reduce(function(t,e){return t[e]=o.previous(e),t},{}),p=dU(dU([],(0,b.keys)(this.__getClearProps()),!0),["__p"],!1),f=(0,b.keys)(c),d=!e.__up&&!l&&(a||p.some(function(t){return f.indexOf(t)>=0})),h=this.get("onChange"),g={property:this,from:u,to:c,value:s,opts:e};r.__trgEv(r.events.propertyUpdate,g),h&&h(g),d&&this.__upTargetsStyle(((n={})[i]=s,n),e)},e.prototype.__upTargetsStyle=function(t,e){var n,o=null==(n=this.em)?void 0:n.get("StyleManager");null==o||o.addStyleTargets(dF(dF({},t),{__p:!!e.avoidStore}),e)},e.prototype._up=function(t,e){void 0===e&&(e={}),e.noTarget&&(e.__up=!0);var n=e.partial,o=dH(e,["partial"]);return t.__p=!!(o.avoidStore||n),this.set(t,dF(dF({},o),{avoidStore:t.__p}))},e.prototype.up=function(t,e){void 0===e&&(e={}),this.set(t,dF(dF({},e),{__up:!0}))},e.prototype.init=function(){},e.prototype.getId=function(){return this.get("id")},e.prototype.getType=function(){return this.get("type")},e.prototype.getName=function(){return this.get("property")},e.prototype.getLabel=function(t){void 0===t&&(t={});var e,n=t.locale,o=this.getId(),r=this.get("name")||this.get("label");return(void 0===n||n)&&(null==(e=this.em)?void 0:e.t("styleManager.properties.".concat(o)))||r},e.prototype.getValue=function(t){void 0===t&&(t={});var e=t.noDefault,n=this.get("value");return this.hasValue()||e?n:this.getDefaultValue()},e.prototype.hasValue=function(t){void 0===t&&(t={});var e=t.noParent&&this.getParentTarget(),n=this.get("value");return!(0,b.isUndefined)(n)&&""!==n&&!e},e.prototype.hasValueParent=function(){return this.hasValue()&&!this.hasValue({noParent:!0})},e.prototype.getStyle=function(t){void 0===t&&(t={});var e,n=this.getName(),o=t.camelCase?tp(n):n;return(e={})[o]=this.__getFullValue(t),e},e.prototype.getDefaultValue=function(){var t=this.get("default");return"".concat((0,b.isUndefined)(t)?this.get("defaults"):t)},e.prototype.upValue=function(t,e){void 0===e&&(e={});var n=null===t||""===t?this.__getClearProps():this.__parseValue(t,e);return this._up(n,e)},e.prototype.isVisible=function(){return!!this.get("visible")},e.prototype.clear=function(t){return void 0===t&&(t={}),this._up(this.__getClearProps(),dF(dF({},t),{__clear:!0})),this},e.prototype.canClear=function(){var t=this.getParent();return t?t.__canClearProp(this):this.hasValue({noParent:!0})},e.prototype.getParent=function(){return this.__getParentProp()},e.prototype.isFull=function(){return!!this.get("full")},e.prototype.__parseValue=function(t,e){return this.parseValue(t,e)},e.prototype.__getClearProps=function(){return{value:"",important:!1}},e.prototype.setValue=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n={});var o=this.parseValue(t),r=!e;r||this.set({value:void 0},{avoidStore:r,silent:!0}),this.set(o,dF({avoidStore:r},n))},e.prototype.setValueFromInput=function(t,e,n){void 0===n&&(n={}),this.setValue(t,e,dF(dF({},n),{fromInput:1}))},e.prototype.parseValue=function(t,e){void 0===e&&(e={});var n={value:t},o="!important",r=this.get("functionName")||"";if((0,b.isString)(t)&&-1!==t.indexOf(o)&&(n.value=t.replace(o,"").trim(),n.important=!0),!r&&!e.complete)return n;var i=[],a="".concat(n.value).trim(),s=a.indexOf("(")+1,l=r||a.substring(0,s-1);if(l&&(n.functionName=l),!r||0===a.indexOf("".concat(r,"("))){var c=a.lastIndexOf(")");i.push(s),c>=0&&i.push(c),n.value=String.prototype.substring.apply(a,i)}if(e.numeric){var u=parseFloat(n.value);n.unit=n.value.replace(u,""),n.value=u}return n},e.prototype.__getFullValue=function(t){var e=(void 0===t?{}:t).withDefault;return!this.hasValue()&&e?this.getDefaultValue():this.getFullValue()},e.prototype.getFullValue=function(t,e){void 0===e&&(e={});var n=this.get("functionName"),o=this.getDefaultValue(),r=(0,b.isUndefined)(t)?this.get("value"):t,i=this.hasValue();if(r&&o&&r===o)return o;if(n&&i){var a="url"===n?"'".concat(r.replace(/'|"/g,""),"'"):r;r="".concat(n,"(").concat(a,")")}return i&&this.get("important")&&!e.skipImportant&&(r="".concat(r," !important")),r||""},e.prototype.__setParentTarget=function(t){this.up({parentTarget:t})},e.prototype.getParentTarget=function(){return this.get("parentTarget")||null},e.prototype.__parseFn=function(t){void 0===t&&(t="");var e=t.indexOf("(")+1,n=t.lastIndexOf(")");return{name:t.substring(0,e-1).trim(),value:String.prototype.substring.apply(t,[e,n>=0?n:void 0]).trim()}},e.prototype.__checkVisibility=function(t){var e=t.target,n=t.component,o=t.sector,r=t.sectors,i=n||e;if(!i)return!1;var a=this.getId(),s=this.getName(),l=this.attributes,c=l.requires,u=l.requiresParent,p=l.toRequire,f=l.isVisible,d=i.get("unstylable"),h=i.get("stylable-require"),g=i.get("stylable");if((0,b.isFunction)(f))return!!f({property:this,sector:o,target:e,component:n});if((0,b.isArray)(g)&&(g=g.indexOf(s)>=0),(0,b.isArray)(d)&&(g=0>d.indexOf(s)),p&&(g=!e||h&&(h.indexOf(a)>=0||h.indexOf(s)>=0)),r&&c){var v=(0,b.keys)(c);
1r.forEach(function(t){t.getProperties().forEach(function(t){if((0,b.includes)(v,t.id)){var e=c[t.id];g=g&&(0,b.includes)(e,t.get("value"))}})})}if(u){var y=n&&n.parent(),m=y&&y.getEl();if(m){var w=to()?window.getComputedStyle(m):{};(0,b.each)(u,function(t,e){g=g&&w[e]&&(0,b.includes)(t,w[e])})}else g=!1}return!!g},e}(tH);dB.callParentInit=function(t,e,n,o){void 0===o&&(o={}),t.prototype.initialize.apply(e,[n,dF(dF({},o),{skipInit:1})])},dB.callInit=function(t,e,n){void 0===n&&(n={}),n.skipInit||t.init(e,n)};var dz=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dW=function(){return(dW=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},d$=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},dq=function(t){return"integer"===t||"number"===t},dG=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dz(e,t),e.prototype.defaults=function(){return dW(dW({},dB.getDefaults()),{detached:!1,properties:[],separator:" ",join:null,fromStyle:null,toStyle:null,full:!0})},e.prototype.initialize=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),dB.callParentInit(dB,this,t,e);var n=this.em,o=new hI(this.get("properties")||[],{em:n,parentProp:this});this.set("properties",o,{silent:!0}),this.listenTo(o,"change",this.__upProperties),dB.callInit(this,t,e)},Object.defineProperty(e.prototype,"properties",{get:function(){return this.get("properties")||[]},enumerable:!1,configurable:!0}),e.prototype.getProperties=function(){return d$([],this.get("properties").models,!0)},e.prototype.getProperty=function(t){return this.properties.filter(function(e){return e.getId()===t||e.getName()===t})[0]},e.prototype.getPropertyAt=function(t){return this.get("properties").at(t)},e.prototype.isDetached=function(){return!!this.get("detached")},e.prototype.getValues=function(t){var e=(void 0===t?{}:t).byName;return this.getProperties().reduce(function(t,n){return t[e?n.getName():n.getId()]="".concat(n.__getFullValue()),t},{})},e.prototype.getSeparator=function(){return this.getSplitSeparator()},e.prototype.getJoin=function(){return this.__getJoin()},e.prototype.getStyleFromProps=function(t){void 0===t&&(t={});var e,n=this.getName(),o=this.__getJoin(),r=this.get("toStyle"),i=this.getValues(),a={};if(r)a=r(i,{join:o,name:n,property:this});else if(i=this.getValues({byName:!0}),this.isDetached())a=i;else{var s=this.getProperties().map(function(t){return t.__getFullValue({withDefault:1})}).filter(Boolean).join(o);(e={})[n]=s,a=e}return this.isDetached()?a[n]="":(a[n]=a[n]||"",a=dW(dW({},a),this.getProperties().reduce(function(t,e){return t[e.getName()]="",t},{}))),t.camelCase?Object.keys(a).reduce(function(t,e){return t[tp(e)]=a[e],t},{}):a},e.prototype.getSplitSeparator=function(){return new RegExp("".concat(this.get("separator"),"(?![^\\(]*\\))"))},e.prototype.__upProperties=function(t,e){if(void 0===e&&(e={}),!e.__up&&!e.__clearIn){var n=this.__getParentProp();if(n)return n.__upProperties(this,e);this.__upTargetsStyleProps(e,t)}},e.prototype.__upTargetsStyleProps=function(t,e){void 0===t&&(t={});var n,o=this.getStyleFromProps();if(this.isDetached()&&e){var r=e.getName();(n={})[r]=o[r],o=n}this.__upTargetsStyle(o,t)},e.prototype._up=function(t,e){return void 0===e&&(e={}),this.__setProperties(this.__getSplitValue(t.value),e),dB.prototype._up.call(this,t,e),this},e.prototype.getStyle=function(t){return this.getStyleFromProps(t)},e.prototype.__getFullValue=function(t){return(void 0===t&&(t={}),this.isDetached()||t.__clear)?"":nF(this.getStyleFromProps()[this.getName()]||"")},e.prototype.__getJoin=function(){var t=this.get("join");return(0,b.isString)(t)?t:this.get("separator")},e.prototype.__styleHasProps=function(t){return void 0===t&&(t={}),d$([this.getName()],this.getProperties().map(function(t){return t.getName()}),!0).some(function(e){return!(0,b.isUndefined)(t[e])&&""!==t[e]})},e.prototype.__splitValue=function(t,e){return nF(t).split(e).map(function(t){return t.trim()}
1).filter(Boolean)},e.prototype.__splitStyleName=function(t,e,n){var o=t[e];return this.__splitValue(o||"",n)},e.prototype.__getSplitValue=function(t,e){void 0===t&&(t="");var n=(void 0===e?{}:e).byName,o=this.getProperties(),r=4===o.length&&o.every(function(t){return dq(t.getType())}),i=this.__splitValue(t,this.getSplitSeparator()),a={};return o.forEach(function(t,e){var o=i[e],s=(0,b.isUndefined)(o)?"":o;if(r){var l=i.length;s=i[e]||i[e%l+(1!=l&&l%2?1:0)]||s}a[n?t.getName():t.getId()]=s||""}),a},e.prototype.__getPropsFromStyle=function(t,e){if(void 0===t&&(t={}),void 0===e&&(e={}),!this.__styleHasProps(t))return null;var n=e.byName,o=this.getName(),r=this.getProperties(),i=this.getSplitSeparator(),a=this.get("fromStyle"),s=a?a(t,{property:this,name:o,separator:i}):{};if(!a){var l=t[o];s=this.__getSplitValue(l||"",{byName:n}),r.forEach(function(e){var o=t[e.getName()],r=n?e.getName():e.getId();(0,b.isUndefined)(o)||""===o||(s[r]=o)})}return s},e.prototype.__setProperties=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.getProperties().forEach(function(n){var o=t[n.getId()];n.__getFullValue()!==o&&n.upValue(o,e)});var n=(0,b.keys)(t).map(function(e){return t[e]}).join(" ");this.set("value",n,{silent:!0})},e.prototype.clear=function(){var t=this;return this.getProperties().map(function(e){return e.clear({__clearIn:!t.isDetached()})}),dB.prototype.clear.call(this),this},e.prototype.hasValue=function(t){return this.getProperties().some(function(e){return e.hasValue(t)})},e.prototype.getFullValue=function(){return this.__getFullValue()},e.prototype.__canClearProp=function(t){return this.isDetached()&&t.hasValue({noParent:!0})},e}(dB),dK=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),dY=function(){return(dY=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},dJ=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},dX=/,(?![^\(]*\))/,dZ=/\s(?![^(]*\))/,dQ=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return dK(e,t),e.prototype.defaults=function(){return dY(dY({},dG.getDefaults()),{layers:[],emptyValue:"unset",layerSeparator:", ",layerJoin:"",prepend:0,preview:!1,layerLabel:null,selectedLayer:null})},e.prototype.initialize=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),dG.callParentInit(dG,this,t,e);var n=new u7(this.get("layers"),{prop:this});n.property=this,n.properties=this.get("properties"),this.set("layers",n,{silent:!0}),this.on("change:selectedLayer",this.__upSelected),this.listenTo(n,"add remove",this.__upLayers),dG.callInit(this,t,e)},Object.defineProperty(e.prototype,"layers",{get:function(){return this.get("layers")},enumerable:!1,configurable:!0}),e.prototype.getLayers=function(){return this.layers.models},e.prototype.hasLayers=function(){return this.getLayers().length>0},e.prototype.getLayer=function(t){return void 0===t&&(t=0),this.layers.at(t)||void 0},e.prototype.getSelectedLayer=function(){var t=this.get("selectedLayer");return t&&t.getIndex()>=0?t:void 0},e.prototype.selectLayer=function(t){return this.set("selectedLayer",t,{__select:!0})},e.prototype.selectLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e&&this.selectLayer(e)},e.prototype.moveLayer=function(t,e){void 0===e&&(e=0);var n=this.layers,o=t?t.getIndex():-1;o>=0&&(0,b.isNumber)(e)&&e>=0&&e<n.length&&o!==e&&(this.removeLayer(t),n.add(t,{at:e}))},e.prototype.addLayer=function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n={};
1return this.getProperties().forEach(function(e){var o=e.getId(),r=t[o];n[o]=(0,b.isUndefined)(r)?e.getDefaultValue():r}),this.layers.push({values:n},e)},e.prototype.removeLayer=function(t){return this.layers.remove(t)},e.prototype.removeLayerAt=function(t){void 0===t&&(t=0);var e=this.getLayer(t);return e?this.removeLayer(e):null},e.prototype.getLayerLabel=function(t){var e="";if(t){var n=this.get("layerLabel"),o=t.getValues(),r=t.getIndex();if(n)e=n(t,{index:r,values:o,property:this});else{var i=[];this.getProperties().map(function(t){i.push(o[t.getId()])}),e=i.filter(Boolean).join(" ")}}return e},e.prototype.getStyleFromLayer=function(t,e){void 0===e&&(e={});var n,o,r=this.__getJoin(),i=this.__getJoinLayers(),a=this.get("toStyle"),s=this.getName(),l=t.getValues();if(a)o=a(l,{join:r,joinLayers:i,name:s,layer:t,property:this});else{var c=this.getProperties().map(function(t){var n=t.getName(),o=l[t.getId()],r=(0,b.isUndefined)(o)?t.getDefaultValue():o;if(e.number&&dq(t.getType())){var i=t.parseValue(o,e.number);r="".concat(i.value).concat(i.unit)}return{name:n,value:r}});o=this.isDetached()?c.reduce(function(t,e){return t[e.name]=e.value,t},{}):((n={})[this.getName()]=c.map(function(t){return t.value}).join(r),n)}return e.camelCase?Object.keys(o).reduce(function(t,e){return t[tp(e)]=o[e],t},{}):o},e.prototype.getStylePreview=function(t,e){void 0===e&&(e={});var n={};return this.get("preview")&&(n=this.getStyleFromLayer(t,e)),n},e.prototype.getLayerSeparator=function(){var t=this.get("layerSeparator");return(0,b.isString)(t)?new RegExp("".concat(t,"(?![^\\(]*\\))")):t},e.prototype.hasEmptyValue=function(){return!this.hasLayers()&&!!this.attributes.isEmptyValue},e.prototype.__upProperties=function(t,e){void 0===e&&(e={});var n,o=this.getSelectedLayer();o&&(o.upValues(((n={})[t.getId()]=t.__getFullValue(),n)),e.__up||this.__upTargetsStyleProps(e))},e.prototype.__upLayers=function(t,e,n){this.__upTargetsStyleProps(n||e)},e.prototype.__upTargets=function(t,e){if(void 0===e&&(e={}),!e.__select)return dB.prototype.__upTargets.call(this,t,e)},e.prototype.__upTargetsStyleProps=function(t){void 0===t&&(t={}),this.__upTargetsStyle(this.getStyleFromLayers(t),t)},e.prototype.__upTargetsStyle=function(t,e){return dB.prototype.__upTargetsStyle.call(this,t,e)},e.prototype.__upSelected=function(t,e){var n=(void 0===t?{}:t).noEvent;void 0===e&&(e={});var o=this.em.Styles,r=this.getSelectedLayer(),i=null==r?void 0:r.getValues();i&&this.getProperties().forEach(function(t){var n,o=null!=(n=i[t.getId()])?n:"";t.__getFullValue()!==o&&t.upValue(o,dY(dY({},e),{__up:!0}))}),n||o.__trgEv(o.events.layerSelect,{property:this})},e.prototype._up=function(t,e){void 0===e&&(e={});var n=t.__layers,o=dJ(t,["__layers"]);return this.isDetached()||this.__setLayers(void 0===n?[]:n),this.__upSelected({noEvent:!0},e),dB.prototype._up.call(this,o,e),this},e.prototype.__setLayers=function(t,e){void 0===t&&(t=[]),void 0===e&&(e={});var n=this.layers,o=t.map(function(t){return{values:t}});n.length===o.length?o.map(function(t,e){var o;return null==(o=n.at(e))?void 0:o.upValues(t.values)}):n.reset(o),this.set({isEmptyValue:!!e.isEmptyValue}),this.__upSelected({noEvent:!0})},e.prototype.__parseValue=function(t){var e=this,n=this.parseValue(t);return n.__layers=t.split(dX).map(function(t){return t.trim()}).map(function(t){return e.__parseLayer(t)}).filter(Boolean),n},e.prototype.__parseLayer=function(t){var e=this.get("parseLayer"),n=t.split(dZ),o=this.getProperties();return e?e({value:t,values:n}):o.reduce(function(t,e,o){var r=n[o];return t[e.getId()]=(0,b.isUndefined)(r)?e.getDefaultValue():r,t},{})},e.prototype.__getLayersFromStyle=function(t){var e=this;if(void 0===t&&(t={}),!this.__styleHasProps(t))return null;if(this.isEmptyValueStyle(t))return[];var n=this.getName(),o=this.getProperties(),r=this.getLayerSeparator(),i=this.attributes.fromStyle,a=i?i(t,{property:this,name:n,separatorLayers:r}):[];if(!i){var s=this.__splitStyleName(t,n,r).map(function(t){return t.split(e.getSplitSeparator())}).map(function(t){var e={};return o.forEach(function(n,o){var r=t[o];e[n.getId()]=(0,b.isUndefined)(r)?n.getDefaultValue():r}),e});o.forEach(function(n){var o=n.getId();e.__splitStyleName(t,n.getName(),r).map(function(t){var e;return(e={})[o]=t||n.getDefaultValue(),e}
1).forEach(function(t,e){s[e]=s[e]?dY(dY({},s[e]),t):t})}),a=s}return(0,b.isArray)(a)?a:[a]},e.prototype.getStyle=function(t){return void 0===t&&(t={}),this.getStyleFromLayers(t)},e.prototype.getStyleFromLayers=function(t){var e=this;void 0===t&&(t={});var n={},o=this.getName(),r=this.getLayers(),i=this.getProperties();if(r.map(function(n){return e.getStyleFromLayer(n,t)}).forEach(function(t){(0,b.keys)(t).map(function(e){n[e]||(n[e]=[]),n[e].push(t[e])})}),(0,b.keys)(n).map(function(t){n[t]=n[t].join(e.__getJoinLayers())}),this.isDetached())n[o]="",r.length||i.map(function(t){n[t.getName()]=""});else{var a=i.reduce(function(t,e){return t[e.getName()]="",t},{});n[o]=n[o]||"",n=dY(dY({},n),a)}return dY(dY({},n),t.__clear?{}:this.getEmptyValueStyle())},e.prototype.isEmptyValueStyle=function(t){void 0===t&&(t={});var e=this.getEmptyValueStyle({force:!0}),n=(0,b.keys)(e);return!!n.length&&n.every(function(n){return e[n]===t[n]})},e.prototype.getEmptyValueStyle=function(t){void 0===t&&(t={});var e=this.attributes.emptyValue;if(!e||this.hasLayers()&&!t.force)return{};var n=this.getName(),o=this.getProperties(),r=(0,b.isString)(e)?e:e({property:this});if(!(0,b.isString)(r))return r;var i={};return this.isDetached()?o.map(function(t){i[t.getName()]=r}):i[n]=r,i},e.prototype.__getJoinLayers=function(){var t=this.get("layerJoin"),e=this.get("layerSeparator");return t||((0,b.isString)(e)?e:t)},e.prototype.__getFullValue=function(){return this.get("detached")?"":nF(this.getStyleFromLayers()[this.getName()])},e.prototype.hasValue=function(t){void 0===t&&(t={});var e=t.noParent&&this.getParentTarget();return(this.hasLayers()||this.hasEmptyValue())&&!e},e.prototype.clear=function(t){return void 0===t&&(t={}),this.layers.reset(),this.__upTargetsStyleProps(dY(dY({},t),{__clear:!0})),dB.prototype.clear.call(this),this},e.prototype.__canClearProp=function(){return!1},e.prototype.__getLayers=function(){return this.layers},e}(dG),d0=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),d1=function(){return(d1=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},d2=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},d3=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},d5="data-clear-style",d4=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this;(0,b.bindAll)(n,"__change","__updateStyle");var o=e.config||{},r=o.em;n.config=o,n.em=r,n.pfx=o.stylePrefix||"",n.ppfx=o.pStylePrefix||"",n.__destroyFn=n.destroy?n.destroy.bind(n):function(){};var i=n.model;i.view=n,n.onValueChange=(0,b.debounce)(n.onValueChange.bind(n),10),n.updateStatus=(0,b.debounce)(n.updateStatus.bind(n),0),n.listenTo(i,"destroy remove",n.remove),n.listenTo(i,"change:visible",n.updateVisibility),n.listenTo(i,"change:name change:className change:full",n.render),n.listenTo(i,"change:value",n.onValueChange),n.listenTo(i,"change:parentTarget",n.updateStatus),n.listenTo(r,"change:device",n.onValueChange);var a=n.init&&n.init.bind(n);return a&&a(),n}return d0(e,t),e.prototype.events=function(){var t;return(t={change:"inputValueChanged"})["click [".concat(d5,"]")]="clear",t},e.prototype.template=function(t){var e=this.pfx,n=this.ppfx;return'\n <div class="'.concat(e,'label" data-sm-label></div>\n <div class="').concat(n,'fields" data-sm-fields></div>\n ')},e.prototype.templateLabel=function(t){var e=this.pfx,n=this.em,o=t.parent,r=t.attributes,i=r.icon,a=r.info,s=null==n?void 0:n.getConfig().icons,l=(null==s?void 0:s.close)||"";
vendor: 4,856 bytes, line 1
1return'\n <span class="'.concat(e,"icon ").concat(void 0===i?"":i,'" title="').concat(void 0===a?"":a,'">\n ').concat(t.getLabel(),"\n </span>\n ").concat(o?"":'<div class="'.concat(e,'clear" style="display: none" ').concat(d5,">").concat(l,"</div>"),"\n ")},e.prototype.templateInput=function(t){return'\n <div class="'.concat(this.ppfx,'field">\n <input placeholder="').concat(t.getDefaultValue(),'"/>\n </div>\n ')},e.prototype.remove=function(){var t=this;return tB.prototype.remove.apply(this,arguments),["em","input","$input","view"].forEach(function(e){return t[e]=null}),this.__destroyFn(this._getClbOpts()),this},e.prototype.updateStatus=function(){var t,e=this.model,n=this.pfx,o=this.ppfx,r=this.config,i="".concat(o,"four-color"),a="".concat(o,"color-warn"),s=this.$el.children(".".concat(n,"label")),l=this.getClearEl(),c=l?l.style:{};s.removeClass("".concat(i," ").concat(a)),c.display="none",e.hasValue({noParent:!0})&&r.highlightChanged?(s.addClass(i),r.clearProperties&&(c.display="")):e.hasValue()&&r.highlightComputed&&s.addClass(a),null==(t=this.parent)||t.updateStatus()},e.prototype.clear=function(t){t&&t.stopPropagation(),this.model.clear()},e.prototype.getClearEl=function(){return this.clearEl||(this.clearEl=this.el.querySelector("[".concat(d5,"]"))),this.clearEl},e.prototype.inputValueChanged=function(t){t&&t.stopPropagation(),this.emit||this.model.upValue(t.target.value)},e.prototype.onValueChange=function(t,e,n){void 0===n&&(n={}),this.setValue(this.model.getFullValue(void 0,{skipImportant:!0})),this.updateStatus()},e.prototype.setValue=function(t){var e=this.model,n=(0,b.isUndefined)(t)||""===t?e.getDefaultValue():t;if(this.update)return this.__update(n);this.__setValueInput(n)},e.prototype.__setValueInput=function(t){var e=this.getInputEl();e&&(e.value=t)},e.prototype.getInputEl=function(){return this.input||(this.input=this.el.querySelector("input")),this.input},e.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?"":"none"},e.prototype.clearCached=function(){delete this.clearEl,delete this.input,delete this.$input},e.prototype.__unset=function(){var t=this.unset&&this.unset.bind(this);t&&t(this._getClbOpts())},e.prototype.__update=function(t){var e=this.update&&this.update.bind(this);e&&e(d1(d1({},this._getClbOpts()),{value:t}))},e.prototype.__change=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.emit&&this.emit.bind(this);n&&n.apply(void 0,d3([this._getClbOpts()],t,!1))},e.prototype.__updateStyle=function(t,e){void 0===e&&(e={});var n=e.complete,o=e.partial;d2(e,["complete","partial"]);var r=this.model,i=!1!==n&&!0!==o;tC(t)?r.__upTargetsStyle(t,{avoidStore:!i}):r.upValue(t,{partial:!i})},e.prototype._getClbOpts=function(){var t=this.model;return{el:this.el,createdEl:this.createdEl,property:t,props:t.attributes,change:this.__change,updateStyle:this.__updateStyle}},e.prototype.render=function(){this.clearCached();var t=this.pfx,e=this.model,n=this.el,o=this.$el,r=e.getName(),i=e.getType(),a=e.get("className")||"",s="".concat(t,"property"),l="number"===i?"".concat(t).concat(i," ").concat(t,"integer"):"".concat(t).concat(i);this.createdEl&&this.__destroyFn(this._getClbOpts()),o.empty().append(this.template(e)),o.find("[data-sm-label]").append(this.templateLabel(e));var c=this.create&&this.create.bind(this);this.createdEl=c&&c(this._getClbOpts()),o.find("[data-sm-fields]").append(this.createdEl||this.templateInput(e)),n.className="".concat(s," ").concat(l," ").concat(s,"__").concat(r," ").concat(a).trim(),n.className+=e.isFull()?" ".concat(s,"--full"):"";var u=this.onRender&&this.onRender.bind(this);return u&&u(),this.setValue(e.getValue()),this},e.prototype.onRender=function(){},e}(tB),d9=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),d6=function(t){function e(e){var n=t.call(this,e)||this;n.config=e.config||{},n.pfx=n.config.stylePrefix||"",n.properties=[],n.parent=e.parent;var o=n.collection;return n.listenTo(o,"add",n.addTo),n.listenTo(o,"reset",n.render),n}return d9(e,t),e.prototype.addTo=function(t,e,n){this.add(t,null,n)},e.prototype.add=function(t,e,n){void 0===n&&(n={});var o=this.parent,r=this.config,i=e||this.el,a=new t.typeView({model:t,config:r});o&&(a.parent=o),a.render();var s=a.el;this.properties.push(a),S(i,s,n.at)},e.prototype.remove=function(){return tB.prototype.remove.apply(this,arguments),this.clearItems(),this}
1,e.prototype.clearItems=function(){this.properties.forEach(function(t){return t.remove()}),this.properties=[]},e.prototype.render=function(){var t=this,e=this.$el,n=this.pfx;this.clearItems();var o=document.createDocumentFragment();return this.collection.forEach(function(e){return t.add(e,o)}),e.empty(),e.append(o),e.attr("class","".concat(n,"properties")),this},e}(tB),d7=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),d8=function(){return(d8=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},ht=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return d7(e,t),e.prototype.templateInput=function(){var t=this.pfx;return'\n <div class="'.concat(t,"field ").concat(t,'composite">\n <span id="').concat(t,'input-holder"></span>\n </div>\n ')},e.prototype.remove=function(){var t;return null==(t=this.props)||t.remove(),d4.prototype.remove.apply(this,arguments),this},e.prototype.onValueChange=function(){},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.get("properties");if(n.length&&!this.props){var o=e.isDetached(),r=new d6({config:d8(d8({},this.config),{highlightComputed:o,highlightChanged:o}),collection:n,parent:this});r.render(),this.$el.find("#".concat(t,"input-holder")).append(r.el),this.props=r}},e.prototype.clearCached=function(){d4.prototype.clearCached.apply(this,arguments),delete this.props},e}(d4),he=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hn=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return he(e,t),e.prototype.events=function(){return{click:"select","click [data-close-layer]":"removeItem","mousedown [data-move-layer]":"initSorter","touchstart [data-move-layer]":"initSorter"}},e.prototype.template=function(){var t=this.pfx,e=this.ppfx,n=this.em,o=null==n?void 0:n.getConfig().icons,r=(null==o?void 0:o.close)||"",i=(null==o?void 0:o.move)||"";return'\n <div class="'.concat(t,'label-wrp">\n <div id="').concat(t,'move" class="').concat(e,'no-touch-actions" data-move-layer>\n ').concat(i,'\n </div>\n <div id="').concat(t,'label" data-label></div>\n <div id="').concat(t,'preview-box" class="').concat(t,'layer-preview" style="display: none" data-preview-box>\n <div id="').concat(t,'preview" class="').concat(t,'layer-preview-cnt" data-preview></div>\n </div>\n <div id="').concat(t,'close-layer" class="').concat(t,'btn-close" data-close-layer>\n ').concat(r,'\n </div>\n </div>\n <div id="').concat(t,'inputs" data-properties></div>\n ')},e.prototype.initialize=function(t){void 0===t&&(t={});var e=this.model,n=t.config||{};this.em=n.em,this.config=n,this.sorter=t.sorter,this.pfx=n.stylePrefix||"",this.ppfx=n.pStylePrefix||"",this.propertyView=t.propertyView;var o=this.propertyView.model;this.listenTo(e,"destroy remove",this.remove),this.listenTo(e,"change:values",this.updateLabel),this.listenTo(o,"change:selectedLayer",this.updateVisibility),e.view=this,e.set({droppable:0,draggable:1}),this.$el.data("model",e)},e.prototype.initSorter=function(){var t;null==(t=this.sorter)||t.startSort([{element:this.el}])},e.prototype.removeItem=function(t){t&&t.stopPropagation(),this.model.remove()},e.prototype.select=function(){this.model.select()},e.prototype.getPropertiesWrapper=function(){return this.propsWrapEl||(this.propsWrapEl=this.el.querySelector("[data-properties]")),this.propsWrapEl},e.prototype.getPreviewEl=function(){return this.previewEl||(this.previewEl=this.el.querySelector("[data-preview]")),this.previewEl},e.prototype.getLabelEl=function(){return this.labelEl||(this.labelEl=this.el.querySelector("[data-label]")),this.labelEl},e.prototype.updateLabel=function(){var t=this.model,e=t.getLabel();if(this.getLabelEl().innerHTML=e,t.hasPreview()){var n=this.getPreviewEl(),o=t.getStylePreview({number:{min:-3,max:3}}),r=(0,b.keys)(o).map(function(t){return"".concat(t,":").concat(o[t])}).join(";");n.setAttribute("style",r)}},e.prototype.updateVisibility=function(){var t,e=this.pfx,n=this.model,o=this.propertyView,r=this.getPropertiesWrapper(),i=n.isSelected();r.style.display=i?"":"none",this.$el[i?"addClass":"removeClass"]("".concat(e,"active")),i&&r.appendChild(null==(t=o.props)?void 0:t.el)},e.prototype.render=function(){var t=this.el,e=this.pfx,n=this.model;return t.innerHTML=this.template(),t.className="".concat(e,"layer"),n.hasPreview()&&(t.querySelector("[data-preview-box]").style.display=""),this.updateLabel(),this.updateVisibility(),this},e}(tB),ho=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
vendor: 4,357 bytes, line 1
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hr=function(t){function e(e){var n=t.call(this,e)||this,o=n.collection,r=e.config||{},i=r.em,a=r.stylePrefix||"",s=r.pStylePrefix||"";n.config=r,n.pfx=a,n.ppfx=s,n.propertyView=e.propertyView,n.className="".concat(a,"layers ").concat(s,"field"),n.listenTo(o,"add",n.addTo),n.listenTo(o,"reset",n.reset),n.items=[];var l=n.createPlaceholder(r.pStylePrefix);n.$el.append(l);var c=null==i?void 0:i.Utils;return n.sorter=c?new c.StyleManagerSorter({em:i,containerContext:{container:n.el,containerSel:".".concat(a,"layers"),itemSel:".".concat(a,"layer"),pfx:r.pStylePrefix,document:document,placeholderElement:l},dragBehavior:{dragDirection:pb.Vertical,nested:!1}}):void 0,o.view=n,n.$el.data("model",o),n.$el.data("collection",o),n}return ho(e,t),e.prototype.addTo=function(t){var e=this.collection.indexOf(t);this.addToCollection(t,null,e)},e.prototype.addToCollection=function(t,e,n){var o=e||null,r=this.propertyView,i=this.config,a=this.sorter,s=this.$el,l=new hn({model:t,config:i,sorter:a,propertyView:r}),c=l.render().el;if(this.items.push(l),o)o.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},e.prototype.reset=function(t,e){this.clearItems(),this.render()},e.prototype.remove=function(){return this.clearItems(),tB.prototype.remove.apply(this,arguments),this},e.prototype.clearItems=function(){this.items.forEach(function(t){return t.remove()}),this.items=[]},e.prototype.render=function(){var t=this,e=this.$el,n=document.createDocumentFragment();return e.empty(),this.collection.forEach(function(e){return t.addToCollection(e,n)}),e.append(n),e.attr("class",this.className),this},e.prototype.createPlaceholder=function(t){var e=document.createElement("div"),n=document.createElement("div");return this.el.parentNode,e.className=t+"placeholder",e.style.display="none",e.style.pointerEvents="none",n.className=t+"placeholder-int",e.appendChild(n),e},e}(tB),hi=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),ha=function(){return(ha=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hs=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hi(e,t),e.prototype.events=function(){return ha(ha({},ht.prototype.events()),{"click [data-add-layer]":"addLayer",change:""})},e.prototype.templateInput=function(){var t=this.pfx,e=this.em,n=null==e?void 0:e.getConfig().icons,o=(null==n?void 0:n.plus)||"+";return'\n <div class="'.concat(t,"field ").concat(t,'stack">\n <button type="button" id="').concat(t,'add" data-add-layer>\n ').concat(o,"\n </button>\n <div data-layers-wrapper></div>\n </div>\n ")},e.prototype.init=function(){var t=this.model;this.listenTo(t.layers,"change reset",this.updateStatus),this.listenTo(t,"change:isEmptyValue",this.updateStatus)},e.prototype.addLayer=function(){this.model.addLayer({},{at:0})},e.prototype.setValue=function(){},e.prototype.remove=function(){var t;return null==(t=this.layersView)||t.remove(),ht.prototype.remove.apply(this,arguments),this},e.prototype.clearCached=function(){ht.prototype.clearCached.apply(this,arguments),delete this.layersView},e.prototype.onRender=function(){var t=this.model,e=this.el,n=this.config,o=t.get("properties");if(o.length&&!this.props){var r=new d6({config:ha(ha({},n),{highlightComputed:!1,highlightChanged:!1}),collection:o,parent:this});r.render();
1var i=new hr({collection:t.layers,config:n,propertyView:this});i.render(),e.querySelector("[data-layers-wrapper]").appendChild(i.el),this.props=r,this.layersView=i}},e}(ht),hl=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hc=function(){return(hc=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hu=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hl(e,t),e.prototype.events=function(){return hc(hc({},d4.prototype.events()),{"click [data-clear-asset]":"clear","click [data-open-assets]":"openAssetManager"})},e.prototype.templateInput=function(){var t,e=this.pfx,n=this.em,o=null==(t=this.em)?void 0:t.getConfig().icons,r=null==o?void 0:o.close;return'\n <div class="'.concat(e,"field ").concat(e,"file\">\n <div id='").concat(e,"input-holder'>\n <div class=\"").concat(e,'btn-c">\n <button class="').concat(e,'btn" id="').concat(e,'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(e,'preview-box" class="').concat(e,'preview-file" data-preview-box>\n <div id="').concat(e,'preview-file" class="').concat(e,'preview-file-cnt" data-preview></div>\n <div id="').concat(e,'close" class="').concat(e,'preview-file-close" data-clear-asset>').concat(r,"</div>\n </div>\n </div>\n ")},e.prototype.__setValueInput=function(t){var e=this.model,n=this.el,o=e.getDefaultValue(),r=n.querySelector("[data-preview-box]"),i=n.querySelector("[data-preview]");r.style.display=t&&t!==o?"":"none",i.style.backgroundImage=t||e.getDefaultValue()},e.prototype.openAssetManager=function(){var t,e=this,n=null==(t=this.em)?void 0:t.Assets;null==n||n.open({select:function(t,o){var r=(0,b.isString)(t)?t:t.get("src");e.model.upValue(r,{partial:!o}),o&&n.close()},types:["image"],accept:"image/*"})},e}(d4),hp=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hf=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hp(e,t),e.prototype.templateInput=function(t){return""},e.prototype.init=function(){var t=this.model;this.listenTo(t,"change:unit",this.onValueChange),this.listenTo(t,"change:units",this.render)},e.prototype.setValue=function(t){},e.prototype.onRender=function(){var t=this.ppfx,e=this.model,n=this.el;if(!this.inputInst){var o=e.input;o.ppfx=t,o.render(),n.querySelector(".".concat(t,"fields")).appendChild(o.el),this.input=o.inputEl.get(0),this.inputInst=o}},e.prototype.clearCached=function(){d4.prototype.clearCached.apply(this,arguments),this.inputInst=null},e}(d4),hd=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hh=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hd(e,t),e.prototype.setValue=function(t){var e;null==(e=this.inputInst)||e.setValue(t,{fromTarget:1,def:this.model.getDefaultValue()})},e.prototype.remove=function(){var t=this;hf.prototype.remove.apply(this,arguments);var e=this.inputInst;return e&&e.remove&&e.remove(),["inputInst","$color"].forEach(function(e){return t[e]=null}),this},e.prototype.__handleChange=function(t,e){this.model.upValue(t,{partial:e})},e.prototype.onRender=function(){var t;if(!this.inputInst){this.__handleChange=this.__handleChange.bind(this);var e=this.ppfx,n=this.model,o=this.em,r=this.el,i=new s7({target:o,model:n,ppfx:e,onChange:this.__handleChange}).render();r.querySelector(".".concat(e,"fields")).appendChild(i.el),this.input=null==(t=i.inputEl)?void 0:t.get(0),this.inputInst=i}},e}(hf),hg=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hv=function(){return(hv=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hy=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},hm=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hg(e,t),e.prototype.defaults=function(){return hv(hv({},dB.getDefaults()),{options:[],full:0})},e.prototype.getOptions=function(){var t=this.attributes,e=t.options,n=t.list;return(e&&e.length?e:n)||[]},e.prototype.getOption=function(t){var e=this,n=tn(t)?t:this.getValue();return this.getOptions().filter(function(t){return e.getOptionId(t)===n})[0]||null},e.prototype.setOptions=function(t){return void 0===t&&(t=[]),this.set("options",t),this},e.prototype.addOption=function(t){if(t){var e=this.getOptions();this.setOptions(hy(hy([],e,!0),[t],!1))}return this},e.prototype.getOptionId=function(t){return tn(t.id)?t.id:t.value},e.prototype.getOptionLabel=function(t,e){void 0===e&&(e={});var n,o=e.locale,r=((0,b.isString)(t)?this.getOption(t):t)||{},i=this.getOptionId(r),a=r.label||r.name||i,s=e.property||this.getId();return(void 0===o||o)&&(null==(n=this.em)?void 0:n.t("styleManager.options.".concat(s,".").concat(i)))||a},e.prototype.initialize=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];dB.prototype.initialize.apply(this,t),this.listenTo(this,"change:options",this.__onOptionChange)},e.prototype.__onOptionChange=function(){this.set("list",this.get("options"))},e}(dB),hb=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hw=function(t){function e(e){var n=t.call(this,e)||this;return n.listenTo(n.model,"change:options",n.updateOptions),n}return hb(e,t),e.prototype.templateInput=function(){var t=this.pfx,e=this.ppfx;return'\n <div class="'.concat(e,"field ").concat(e,'select">\n <span id="').concat(t,'input-holder"></span>\n <div class="').concat(e,'sel-arrow">\n <div class="').concat(e,'d-s-arrow"></div>\n </div>\n </div>\n ')},e.prototype.updateOptions=function(){delete this.input,this.onRender()},e.prototype.onRender=function(){var t=this.pfx,e=this.model,n=e.getOptions();if(!this.input){var o=[];n.forEach(function(t){var n=e.getOptionId(t),r=e.getOptionLabel(n),i=t.style?t.style.replace(/"/g,"""):"",a=n.replace(/"/g,""");o.push('<option value="'.concat(a,'" ').concat(i?'style="'.concat(i,'"'):"",">").concat(r,"</option>"))});var r=this.el.querySelector("#".concat(t,"input-holder"));r.innerHTML="<select>".concat(o.join(""),"</select>"),this.input=r.firstChild}},e.prototype.__setValueInput=function(t){var e=this.model,n=this.getInputEl(),o=e.getOptions()[0],r=o?e.getOptionId(o):"";n&&(n.value=t||r)},e}(d4),h_=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}
1(),hC=function(){return(hC=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hx=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h_(e,t),e.prototype.defaults=function(){return hC(hC({},hm.getDefaults()),{full:1})},e}(hm),hO=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hS=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hO(e,t),e.prototype.templateInput=function(){var t=this.ppfx;return'<div class="'.concat(t,"field ").concat(t,'field-radio"></div>')},e.prototype.onRender=function(){var t=this.pfx,e=this.ppfx,n=this.model,o="".concat(e,"radio-item-label"),r=n.getName(),i=n.getOptions(),a="".concat(t,"radio ").concat(t,"radio-").concat(r),s=n.cid;if(!this.input){var l=[];i.forEach(function(i){var c=i.className?"".concat(i.className," ").concat(t,"icon ").concat(o):"",u=n.getOptionId(i),p="".concat(r,"-").concat(u,"-").concat(s),f=c?"":n.getOptionLabel(u),d=i.title?'title="'.concat(i.title,'"'):"",h=n.getValue()===u?"checked":"";l.push('\n <div class="'.concat(e,'radio-item">\n <input type="radio" class="').concat(a,'" id="').concat(p,'" name="').concat(r,"-").concat(s,'" value="').concat(u,'" ').concat(h,'/>\n <label class="').concat(c||o,'" ').concat(d,' for="').
vendor: 15,043 bytes, line 1
1concat(p,'">').concat(f,"</label>\n </div>\n "))});var c=this.el.querySelector(".".concat(e,"field"));c.innerHTML='<div class="'.concat(e,'radio-items">').concat(l.join(""),"</div>"),this.input=c.firstChild}},e.prototype.__setValueInput=function(t){var e,n=this.model,o=t||n.getDefaultValue(),r=null==(e=this.getInputEl())?void 0:e.querySelector('[value="'.concat(o,'"]'));r&&(r.checked=!0)},e}(hw),hT=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hP=function(){return(hP=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hE=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hT(e,t),e.prototype.defaults=function(){return hP(hP({},dB.getDefaults()),{units:[],unit:"",min:"",max:"",step:1})},e.prototype.getUnits=function(){return this.get("units")||[]},e.prototype.getUnit=function(){return this.get("unit")},e.prototype.getMin=function(){return this.get("min")},e.prototype.getMax=function(){return this.get("max")},e.prototype.getStep=function(){return this.get("step")},e.prototype.upUnit=function(t,e){return void 0===e&&(e={}),this._up({unit:t},e)},e.prototype.initialize=function(t,e){void 0===t&&(t={}),void 0===e&&(e={}),dB.callParentInit(dB,this,t,e);var n=this.get("unit"),o=this.getUnits();this.input=to()?new ln({model:this}):void 0,o.length&&!n&&this.set("unit",o[0],{silent:!0}),dB.callInit(this,t,e)},e.prototype.__getClearProps=function(){return hP(hP({},dB.prototype.__getClearProps()),{unit:""})},e.prototype.parseValue=function(t,e){void 0===e&&(e={});var n=dB.prototype.parseValue.apply(this,arguments),o=this.input.validateInputValue(n.value,hP({deepCheck:1},e)),r=o.value,i=o.unit;return n.value=r,n.unit=i,n},e.prototype.getFullValue=function(){var t=this.get("value"),e=this.get("unit"),n=(0,b.isUndefined)(t)?"":"".concat(t),o=!(0,b.isUndefined)(e)&&n?e:"",r="".concat(n).concat(o);return dB.prototype.getFullValue.apply(this,[r])},e}(dB),hk=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hj=function(){return(hj=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hA=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hk(e,t),e.prototype.defaults=function(){return hj(hj({},hE.getDefaults()),{showInput:1})},e}(hE),hM=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hD=function(){return(hD=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hL=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hM(e,t),e.prototype.events=function(){return hD(hD({},hf.prototype.events()),{"change [type=range]":"inputValueChanged","input [type=range]":"inputValueChangedSoft",change:""})},e.prototype.templateInput=function(t){var e=this.ppfx;return'\n <div class="'.concat(e,"field ").concat(e,'field-range">\n <input type="range" min="').concat(t.get("min"),'" max="').concat(t.get("max"),'" step="').concat(t.get("step"),'"/>\n </div>\n ')},e.prototype.getSliderEl=function(){return this.slider||(this.slider=this.el.querySelector("input[type=range]")),this.slider},e.prototype.inputValueChanged=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value)},e.prototype.inputValueChangedSoft=function(t){t.stopPropagation(),this.model.upValue(this.getSliderEl().value,{partial:!0})},e.prototype.setValue=function(t){var e=this.model,n=e.parseValue(t);this.getSliderEl().value=""===t?e.getDefaultValue():parseFloat(n.value),hf.prototype.setValue.apply(this,arguments)},e.prototype.onRender=function(){hf.prototype.onRender.apply(this,arguments),this.model.get("showInput")||(this.inputInst.el.style.display="none")},e.prototype.clearCached=function(){hf.prototype.clearCached.apply(this,arguments),delete this.slider},e}(hf);let hI=tU.extend(c7).extend({extendViewApi:1,init:function(){var t=this.opts,e=this.em,n=t.module||(null==e?void 0:e.get("StyleManager"));n&&(n.__listenAdd(this,n.events.propertyAdd),n.__listenRemove(this,n.events.propertyRemove))},types:[{id:"stack",model:dQ,view:hs,isType:function(t){if(t&&"stack"==t.type)return t}},{id:"composite",model:dG,view:ht,isType:function(t){if(t&&"composite"==t.type)return t}},{id:"file",model:dB,view:hu,isType:function(t){if(t&&"file"==t.type)return t}},{id:"color",model:dB,view:hh,isType:function(t){if(t&&"color"==t.type)return t}},{id:"select",model:hm,view:hw,isType:function(t){if(t&&"select"==t.type)return t}},{id:"radio",model:hx,view:hS,isType:function(t){if(t&&"radio"==t.type)return t}},{id:"slider",model:hA,view:hL,isType:function(t){if(t&&"slider"==t.type)return t}},{id:"integer",model:hE,view:hf,isType:function(t){if(t&&"integer"==t.type)return t}},{id:"number",model:hE,view:hf,isType:function(t){if(t&&"number"==t.type)return t}},{id:"base",model:dB,view:d4,isType:function(t){return t.type="base",t}}]});var hN=function(){return(hN=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hR=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},hV=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},hF=function(t){return t.map(function(t){return{id:t}})},hH=function(){function t(){this.props={},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",e=["flex-start","flex-end","center"],n=hV(hV([],e,!0),["baseline","stretch"],!1);this.optsBgSize=hF(["auto","cover","contain"]),this.optsBgAttach=hF(["scroll","fixed","local"]),this.optsBgRepeat=hF(["repeat","repeat-x","repeat-y","no-repeat"]),this.optsWrap=hF(["nowrap","wrap","wrap-reverse"]),this.optsOverflow=hF(["visible","hidden","scroll","auto"]),this.optsDir=hF(["row","row-reverse","column","column-reverse"]),this.opstDisplay=hF(["block","inline","inline-block","flex","none"]),this.optsTransitFn=hF(["linear","ease","ease-in","ease-out","ease-in-out"]),this.optsCursor=hF(["auto","pointer","copy","crosshair","grab","grabbing","help","move","text"]),this.optsFloat=hF(["none","left","right"]),this.optsPos=hF(["static","relative","absolute","fixed"]),this.optsTextAlign=hF(["left","center","right","justify"]),this.optsFlexAlign=hF(n),this.optsJustCont=hF(hV(hV([],e,!0),["space-between","space-around","space-evenly"],!1)),this.optsAlignCont=hF(hV(hV([],e,!0),["space-between","space-around","stretch"],!1)),this.optsAlignSelf=hF(hV(["auto"],n,!0)),this.optsTransitProp=hF(["all","width","height","background-color","transform","box-shadow","opacity"]),this.optsBorderStyle=hF(["none","solid","dotted","dashed","double","groove","ridge","inset","outset"]),this.optsBgPos=hF(["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(t){return{id:t,label:t.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 t.prototype.__sub=function(t){var e=this;return function(){return t.map(function(t){if((0,b.isString)(t))return e.get(t);var n=t.extend,o=hR(t,["extend"]);return hN(hN({},e.get(n)),o)})}},t.prototype.init=function(){var t=this,e=this.fixedValues,n=this.requireFlex,o=this.typeNumber;return this.props={},[["text-shadow-h",{type:o,default:"0",units:this.unitsSizeNoPerc}],["top",{default:"auto",units:this.unitsSize,fixedValues:e},"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"],["order",{type:o,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",full:!0}],["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,full:!0}],["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"}])}
1,"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(t,e){var n=e.values,o=n["box-shadow-h"],r=n["box-shadow-v"],i=n["box-shadow-blur"],a=n["box-shadow-spread"];return"".concat(o," ").concat(r," ").concat(i," ").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(t,e){var n=e.values,o=n["text-shadow-h"],r=n["text-shadow-v"],i=n["text-shadow-blur"];return"".concat(o," ").concat(r," ").concat(i)},properties:this.__sub(["text-shadow-h","text-shadow-v","text-shadow-blur","text-shadow-color"])},"box-shadow"],["background",{detached:!0,layerLabel:function(t,e){var n=e.values;return[n["background-repeat-sub"]||"",n["background-position-sub"]||"",n["background-attachment-sub"]||"",n["background-size-sub"]||""].join(" ")},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"],["transform",{type:"stack",layerSeparator:" ",fromStyle:function(t,e){var n=e.property,o=t[e.name]||"",r=n.getLayerSeparator();return o?o.split(r).map(function(t){var e=n.__parseFn(t);return{"transform-type":e.name,"transform-value":e.value}}):[]},toStyle:function(t,e){var n,o=e.name;return(n={})[o]="".concat(t["transform-type"],"(").concat(t["transform-value"],")"),n},properties:[{property:"transform-type",name:"Type",type:this.typeSelect,default:"rotateZ",full:!0,options:[{id:"scaleX",propValue:{units:[""],step:.01}},{id:"scaleY",propValue:{units:[""],step:.01}},{id:"scaleZ",propValue:{units:[""],step:.01}},{id:"rotateX",propValue:{units:this.unitsAngle,step:1}},{id:"rotateY",propValue:{units:this.unitsAngle,step:1}},{id:"rotateZ",propValue:{units:this.unitsAngle,step:1}},{id:"translateX",propValue:{units:this.unitsSize,step:1}},{id:"translateY",propValue:{units:this.unitsSize,step:1}}],onChange:function(t){var e=t.property;if(t.to.value){var n=e.getOption(),o=hN({},n.propValue||{}),r=e.getParent().getProperty("transform-value"),i=r.getUnit();(!i||(null==o?void 0:o.units.indexOf(i))<0)&&(o.unit=(null==o?void 0:o.units[0])||""),r.up(o)}}},{property:"transform-value",type:this.typeNumber,default:"0",full:!0}]}]].forEach(function(e){var n=e[0],o=e[1],r=e[2];t.add(n,o||{},{from:r})}),this},t.prototype.add=function(t,e,n){void 0===e&&(e={}),void 0===n&&(n={});var o=n.from||"",r=this.props[o||t]||{},i=hN(hN(hN({},r),{property:t}),e);return i.properties&&(0,b.isFunction)(i.properties)&&(i.properties=i.properties()),this.props[t]=i,i},t.prototype.get=function(t){return this.props[t]},t.prototype.build=function(t){var e=this,n=[];return((0,b.isString)(t)?[t]:t).forEach(function(t){n.push(e.get(t)||{property:t})}),n},t}(),hU=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hB=function(){return(hB=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hz=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},hW=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},h$=function(t){function e(e,n){void 0===n&&(n={});var o=t.call(this,e)||this,r=n.em;o.em=r;var i=e||{},a=o.buildProperties(i.buildProps),s=o.get("name")||"";o.get("id")||o.set("id",s.replace(/ /g,"_").toLowerCase());var l=new hI((a?o.extendProperties(a):o.get("properties").map(function(t){return(0,b.isString)(t)?o.buildProperties(t)[0]:t}
1).filter(Boolean)).map(function(t){return o.checkExtend(t)}),{em:r});return l.sector=o,o.set("properties",l),o}return hU(e,t),e.prototype.defaults=function(){return{id:"",name:"",open:!0,visible:!0,extendBuilded:!0,properties:[]}},Object.defineProperty(e.prototype,"properties",{get:function(){return this.get("properties")},enumerable:!1,configurable:!0}),e.prototype.getId=function(){return this.get("id")},e.prototype.getName=function(){var t,e=this.getId();return(null==(t=this.em)?void 0:t.t("styleManager.sectors.".concat(e)))||this.get("name")},e.prototype.setName=function(t){return this.set("name",t)},e.prototype.isOpen=function(){return!!this.get("open")},e.prototype.setOpen=function(t){return this.set("open",t)},e.prototype.isVisible=function(){return!!this.get("visible")},e.prototype.getProperties=function(t){void 0===t&&(t={});var e=this.properties;return(e.models?hW([],e.models,!0):e).filter(function(e){var n=!0;return t.withValue&&(n=e.hasValue({noParent:!0})),t.withParentValue&&(n=!e.hasValue({noParent:!0})&&e.hasValue()),n})},e.prototype.getProperty=function(t){return this.getProperties().filter(function(e){return e.get("id")===t})[0]||void 0},e.prototype.addProperty=function(t,e){return this.properties.add(this.checkExtend(t),e)},e.prototype.extendProperties=function(t,e,n){void 0===n&&(n=!1);for(var o=t.length,r=e||this.get("properties"),i=this.get("extendBuilded"),a=[],s=0,l=r.length;s<l;s++){for(var c=r[s],u=0,p=0;p<o;p++){var f=t[p];if(c.property==f.property||c.id==f.property){var d=c.properties;d&&d.length&&(c.properties=this.extendProperties(f.properties||[],d,1)),t[p]=i?(0,b.extend)(f,c):c,a[p]=t[p],u=1;continue}}u||(t.push(c),a.push(c))}return n?a.filter(function(t){return t}):t},e.prototype.checkExtend=function(t){var e=((0,b.isString)(t)?{extend:t}:t)||{},n=e.extend,o=hz(e,["extend"]);return n?hB(hB({},this.buildProperties([n])[0]||{}),o):t},e.prototype.buildProperties=function(t){var e,n=t||[];if(!n.length)return[];var o=null==(e=this.em)?void 0:e.Styles.builtIn;return null==o?void 0:o.build(n)},e}(tH),hq=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hG=function(){return(hG=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},hK=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return hq(e,t),e.prototype.initialize=function(t,e){void 0===e&&(e={});var n=e.module,o=e.em;this.em=o,this.module=n,this.listenTo(this,"reset",this.onReset)},e.prototype.model=function(t,e){void 0===e&&(e={});var n=e.collection.em;return new h$(t,hG(hG({},e),{em:n}))},e.prototype.onReset=function(t,e){void 0===e&&(e={}),(e.previousModels||[]).forEach(function(t){return t.get("properties").reset()})},e}(tU),hY=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hJ=function(t){function e(e){var n=t.call(this,e)||this,o=e.config||{},r=n.model,i=o.em;return n.config=o,n.em=i,n.pfx=o.stylePrefix||"",n.listenTo(r,"destroy remove",n.remove),n.listenTo(r,"change:open",n.updateOpen),n.listenTo(r,"change:visible",n.updateVisibility),n}return hY(e,t),e.prototype.template=function(t){var e,n,o,r=t.pfx,i=t.label,a=null==(o=this.em)?void 0:o.getConfig().icons,s=(null==a?void 0:a.caret)||"",l="".concat(r,"sector-");return tD(f||(e=['\n <div class="','title" data-sector-title>\n <div class="','caret">$','</div>\n <div class="','label">',"</div>\n </div>\n "],n=['\n <div class="','title" data-sector-title>\n <div class="','caret">$','</div>\n <div class="','label">',"</div>\n </div>\n "],Object.defineProperty?Object.defineProperty(e,"raw",{value:n}):e.raw=n,f=e),l,l,s,l,i)},e.prototype.events=function(){return{"click [data-sector-title]":"toggle"}},e.prototype.updateOpen=function(){var t=this.$el,e=this.model,n=this.pfx,o=e.isOpen();t[o?"addClass":"removeClass"]("".concat(n,"open")),this.getPropertiesEl().style.display=o?"":"none"},e.prototype.updateVisibility=function(){this.el.style.display=this.model.isVisible()?"":"none"},e.prototype.getPropertiesEl=function(){var t=this.$el,e=this.pfx;return t.find(".".concat(e,"properties")).get(0)},e.prototype.toggle=function(){var t=this.model;t.setOpen(!t.get("open"))},e.prototype.renderProperties=function(){var t=this.model,e=this.config,n=t.get("properties");if(n){var o=new d6({collection:n,config:e});this.$el.append(o.render().el)}},e.prototype.render=function(){var t=this.pfx,e=this.model,n=this.$el,o=e.getId(),r=e.getName();return n.html(this.template({pfx:t,label:r})),this.renderProperties(),n.attr("class","".concat(t,"sector ").concat(t,"sector__").concat(o," no-select")),this.updateOpen(),this},e}(tB),hX=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),hZ=function(t){function e(e){void 0===e&&(e={});var n=t.call(this,e)||this,o=e.module,r=e.config,i=n.collection;return n.pfx=(null==r?void 0:r.stylePrefix)||"",n.ppfx=(null==r?void 0:r.pStylePrefix)||"",n.config=r,n.module=o,n.listenTo(i,"add",n.addTo),n.listenTo(i,"reset",n.render),n}return hX(e,t),e.prototype.remove=function(){var t=this;return tB.prototype.remove.apply(this,arguments),["config","module","em"].forEach(function(e){return t[e]={}}),this},e.prototype.addTo=function(t,e,n){void 0===n&&(n={}),this.addToCollection(t,null,n)},e.prototype.addToCollection=function(t,e,n){void 0===n&&(n={});var o=this.config,r=this.el,i=new hJ({model:t,config:o}).render().el;return S(e||r,i,n.at),i},e.prototype.render=function(){var t=this,e=this.$el,n=this.pfx,o=this.ppfx;e.empty();var r=document.createDocumentFragment();return this.collection.each(function(e){return t.addToCollection(e,r)}),e.append(r),e.addClass("".concat(n,"sectors ").concat(o,"one-bg ").concat(o,"two-color")),this},e}(tB),hQ=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),h0=function(){return(h0=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},h1=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},h2=function(t){return t||0===t},h3=function(t){function e(e){var n=t.call(this,e,"StyleManager",new hK([],{em:e}),u,{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","transform"]}],appendTo:"",stylePrefix:"sm-",custom:!1,hideNotStylable:!0,highlightChanged:!0,highlightComputed:!0,showComputed:!0,clearProperties:!0,avoidComputed:["width","height"]})||this;n.events=u,n.Sector=h$,n.storageKey="",(0,b.bindAll)(n,"__clearStateTarget");var o=n.events,r=n.config,i=r.pStylePrefix;i&&(r.stylePrefix=i+r.stylePrefix),n.builtIn=new hH,n.properties=new hI([],{em:e,module:n}),n.sectors=n.all;var a=new tH({targets:[]});n.model=a;var s=pi.update,l="".concat(pi.toggled," ").concat(s,":classes change:state change:device frame:resized selector:type");n.upAll=(0,b.debounce)(function(){return n.__upSel()},0),a.listenTo(e,l,n.upAll),a.listenTo(e,pi.toggled,n.__clearStateTarget);var c=(0,b.debounce)(function(){n.__upProps(),n.__trgCustom()},0);a.listenTo(e,"styleable:change undo redo",c);var p=(0,b.debounce)(function(){return n.__trgCustom()},0);return a.listenTo(e,"".concat(o.layerSelect," ").concat(o.target),p),a.on("change:lastTarget",function(){return e.trigger(o.target,n.getSelected())}),n}return hQ(e,t),e.prototype.__upSel=function(){this.select(this.em.getSelectedAll())},e.prototype.__trgCustom=function(t){void 0===t&&(t={}),this.__ctn=this.__ctn||t.container,this.em.trigger(this.events.custom,{container:this.__ctn})},e.prototype.__trgEv=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];(e=this.em).trigger.apply(e,h1([t],n,!1))},e.prototype.__clearStateTarget=function(){var t=this,e=this.em,n=this.__getStateTarget();n&&(null==e||e.skip(function(){e.Css.remove(n),t.model.set({stateTarget:null})}))},e.prototype.onLoad=function(){this.sectors.add(this.config.sectors,{silent:!0})},e.prototype.postRender=function(){this.__appendTo()},e.prototype.addSector=function(t,e,n){void 0===n&&(n={});var o=this.getSector(t);return o||(e.id=t,o=this.sectors.add(e,n)),o},e.prototype.getSector=function(t,e){void 0===e&&(e={});var n=this.sectors.where({id:t})[0];return!n&&e.warn&&this._logNoSector(t),n||null},e.prototype.getSectors=function(t){void 0===t&&(t={});var e=this.sectors,n=e&&e.models?t.array?h1([],e.models,!0):e:[];return t.visible?n.filter(function(t){return t.isVisible()}):n}
1,e.prototype.removeSector=function(t){return this.getSectors().remove(this.getSector(t,{warn:!0}))},e.prototype.addProperty=function(t,e,n){void 0===n&&(n={});var o,r=this.getSector(t,{warn:!0});return r&&(o=r.addProperty(e,n)),o},e.prototype.getProperty=function(t,e){var n,o=this.getSector(t,{warn:!0});return o&&(n=o.properties.filter(function(t){return t.get("property")===e||t.get("id")===e})[0]),n},e.prototype.getProperties=function(t){var e,n=this.getSector(t,{warn:!0});return n&&(e=n.properties),e},e.prototype.removeProperty=function(t,e){var n=this.getProperties(t);return n?n.remove(this.getProperty(t,e)):null},e.prototype.select=function(t,e){var n=this;void 0===e&&(e={});var o=this.em,r=(0,b.isArray)(t)?t:[t],i=e.stylable,a=o.Css,s=[];r.filter(Boolean).forEach(function(t){var e=t;if((0,b.isString)(t)){var n=a.getRule(t)||a.setRule(t);(0,b.isUndefined)(i)||n.set({stylable:i}),e=n}s.push(e)});var l=e.component||s.filter(function(t){return tP(t)}).reverse()[0];s=s.map(function(t){return n.getModelToStyle(t)});var c=o.getState(),u=s.slice().reverse()[0],p=this.getParentRules(u,{state:c,component:l}),f=this.__getStateTarget();return o.skip(function(){var t;if(c&&(null==(t=null==u?void 0:u.getState)?void 0:t.call(u))){var e=u.getStyle();f?f.setStyle(e):f=a.getAll().add({selectors:"gjs-selected",style:e,shallow:!0,important:!0})}else f&&(a.remove(f),f=void 0)}),this.model.set({targets:s,lastTarget:u,lastTargetParents:p,stateTarget:f,component:l}),this.__upProps(e),s},e.prototype.getSelected=function(){return this.model.get("lastTarget")},e.prototype.getSelectedAll=function(){return this.model.get("targets")},e.prototype.getSelectedParents=function(){return this.model.get("lastTargetParents")||[]},e.prototype.__getStateTarget=function(){return this.model.get("stateTarget")},e.prototype.addStyleTargets=function(t,e){this.getSelectedAll().map(function(n){return n.addStyle(t,e)});var n=this.getSelected();n&&this.__emitCmpStyleUpdate(t);var o=this.__getStateTarget();n&&(null==o||o.setStyle(n.getStyle(),e))},e.prototype.getBuiltIn=function(t){return this.builtIn.get(t)},e.prototype.getBuiltInAll=function(){return this.builtIn.props},e.prototype.addBuiltIn=function(t,e){return this.builtIn.add(t,e)},e.prototype.getModelToStyle=function(t,e){void 0===e&&(e={});var n=this.em,o=e.skipAdd;if(n&&(null==t?void 0:t.toHTML)){var r=n.getConfig(),i=n.UndoManager,a=n.Css,s=n.Selectors,l=s?s.getConfig():{},c=r.devicePreviewMode?"":n.get("state"),u=t.get("classes").getStyleable(),p=u.length,f=!l.componentFirst||e.useClasses,d={noCount:1},h={state:c,addOpts:d};i.skip(function(){var e;if(p&&f){var i=n.getCurrentMedia();(e=a.get(u,c,i))||o||(e=a.add(u,c,i,{},d))}else if(r.avoidInlineStyle){var s=t.getId();(e=a.getIdRule(s,h))||o||(e=a.setIdRule(s,{},h)),t.is("wrapper")&&e.set("wrapper",1,d)}e&&(t=e)})}return t},e.prototype.getParentRules=function(t,e){var n=void 0===e?{}:e,o=n.state,r=n.component,i=this.em,a=[];if(i&&t){var s=i.Css,l=i.CodeManager.getGenerator("css"),c=t.toHTML?t:t.getComponent(),u={array:!0},p=[],f=[],d=[],h=[],g=function(t){return t.length?s.getRules().filter(function(e){var n=e.getSelectors().map(function(t){return t.getFullName()});return 0!==n.length&&n.every(function(e){return t.indexOf(e)>=0})}):[]},v=function(t){return t?s.getRules().filter(function(e){return e.selectorsToString()===t}):[]};c?(p=s.getRules("#".concat(c.getId())),f=v(c.get("tagName")),h=(r?g(r.getSelectors().getFullName(u)):[]).concat(f).concat(p)):(p=r?s.getRules("#".concat(r.getId())):[],f=v((null==r?void 0:r.get("tagName"))||""),d=g(((null==r?void 0:r.getSelectors().getFullName(u))||[]).filter(function(e){return -1===t.getSelectors().getFullName(u).findIndex(function(t){return t===e})}).concat(t.getSelectors().getFullName(u))),h=f.concat(p).concat(d));var y=h.filter(function(t){return(0,b.isUndefined)(o)?1:t.get("state")===o}).sort(l.sortRules).reverse();a=y.slice(y.indexOf(t)+1)}return a},e.prototype.addType=function(t,e){this.properties.addType(t,e)},e.prototype.removeType=function(t){return this.properties.removeType(t)},e.prototype.getType=function(t){return this.properties.getType(t)},e.prototype.getTypes=function(){return this.properties.getTypes()},e.prototype.createType=function(t,e){var n=void 0===e?{}:e,o=n.model,r=n.view,i=this.config,a=this.getType(t);if(a)return new a.view(h0({model:new a.model(void 0===o?{}:o),config:i},void 0===r?{}:r))},e.prototype.render=function(){var t=this.config,e=this.em,n=this.SectView,o=n&&n.el;return this.SectView=new hZ({el:o,em:e,config:t,module:this,collection:this.sectors}),this.SectView.render().el},e.prototype._logNoSector=function(t){var e=this.em;e&&e.logWarning("'".concat(t,"' sector not found"))},e.prototype.__emitCmpStyleUpdate=function(t,e){void 0===e&&(e={});var n=this.em;if(!t.__p){var o=this.getSelectedAll(),r=e.components||n.getSelectedAll(),i=Array.isArray(r)?r:[r],a=h0({},t);
1delete a.__p,i.forEach(function(t){return!o.includes(t)&&t.__onStyleChange(a)})}},e.prototype.__upProps=function(t){var e=this;void 0===t&&(t={});var n=this.getSelected();if(n){var o=this.sectors,r=this.model.get("component"),i=this.getSelectedParents(),a=n.getStyle(),s=i.map(function(t){return{target:t,style:t.getStyle()}});o.map(function(n){n.getProperties().map(function(n){e.__upProp(n,a,s,t)})}),o.forEach(function(t){var e=t.getProperties();e.forEach(function(e){var i=e.__checkVisibility({target:n,sector:t,component:r,sectors:o.models});e.set("visible",i)});var i=e.some(function(t){return t.isVisible()});t.set("visible",i)})}},e.prototype.__upProp=function(t,e,n,o){var r=this,i=t.getName(),a=e[i],s=h2(a),l="stack"===t.getType(),c="composite"===t.getType(),u=h0(h0({},o),{__up:!0}),p=l?t.__getLayersFromStyle(e):[],f=c?t.__getPropsFromStyle(e):{},d=s?a:null,h=null;if(l&&null===p||c&&null===f){var g=l?"__getLayersFromStyle":"__getPropsFromStyle",v=n.filter(function(e){return null!==t[g](e.style)})[0];if(v){d=v.style[i],h=v.target;var y=t[g](v.style);l?p=y:f=y}}else if(!s){d=null;var v=n.filter(function(t){return h2(t.style[i])})[0];v&&(d=v.style[i],h=v.target)}if(t.__setParentTarget(h),c||l||t.__getFullValue()===d||t.upValue(d,u),l&&t.__setLayers(p||[],{isEmptyValue:t.isEmptyValueStyle(e)}),c){var m=t.getProperties();if(t.isDetached()){var b=t.__getPropsFromStyle(e,{byName:!0})||{},w=n.map(function(e){return h0(h0({},e),{style:t.__getPropsFromStyle(e.style,{byName:!0})||{}})});m.map(function(t){return r.__upProp(t,b,w,o)})}else t.__setProperties(f||{},u),t.getProperties().map(function(t){return t.__setParentTarget(h)})}},e.prototype.destroy=function(){var t;[this.properties,this.sectors].forEach(function(t){t.reset(),t.stopListening()}),null==(t=this.SectView)||t.remove(),this.model.stopListening(),this.upAll.cancel()},e}(tX),h5=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),h4=function(){return(h4=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},h9=function(t){function e(e,n){var o=t.call(this,e,n)||this;return o.em=n,o.model=function(t,e){return void 0===e&&(e={}),new rd(t,h4(h4({},e),{em:n}))},o}return h5(e,t),e}(tU),h6=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),h7=function(){return(h7=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},h8=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},gt=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>
1e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},ge=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},gn=function(t){function e(e){var n=t.call(this,e,"DataSources",new h9([],e),pu,{autoloadProviders:!1,dataBindingImportPolicy:"overwrite"})||this;return n.storageKey="dataSources",n.events=pu,n.dataComponentTypes=ps,n.dataCollectionKeys=pl,n.dataCollectionStateTypes=pw,n.dataFieldPrimitiveType=pc,n.dataOperationTypes={any:pp,boolean:pf,number:pd,string:ph},Object.assign(n,tL.Events),n}return h6(e,t),e.prototype.destroy=function(){},e.prototype.add=function(t,e){void 0===e&&(e={});var n=this.all;return t.id=t.id||this._createId(),n.add(t,e)},e.prototype.get=function(t){return this.all.get(t)},e.prototype.getAll=function(){return ge([],this.all.models,!0)},e.prototype.getValue=function(t,e,n){return J((null==n?void 0:n.context)||this.getContext(),t,e)},e.prototype.setValue=function(t,e){var n=this.fromPath(t),o=(n[0],n[1]),r=n[2];if(o&&(r||""===r)){var i=h7({},o.attributes);if(X(i,r||"",e))return o.set(i),!0}return!1},e.prototype.getContext=function(){return this.all.reduce(function(t,e){return t[e.id]=e.records.reduce(function(t,e,n){var o=h7({},e.attributes);return delete o.__p,t[e.id||n]=o,t},{}),t},{})},e.prototype.remove=function(t,e){return this.__remove(t,e)},e.prototype.fromPath=function(t){var e=[],n=K(t||""),o=n[0],r=n[1],i=n.slice(2),a=this.get(o),s=null==a?void 0:a.records.get(r);return a&&e.push(a),s&&(e.push(s),i.length&&e.push(i.join("."))),e},e.prototype.store=function(){var t,e=[];return this.all.forEach(function(t){var n=t.attributes,o=n.skipFromStorage,r=(n.transformers,n.records),i=n.schema,a=gt(n,["skipFromStorage","transformers","records","schema"]);o||e.push(h7(h7({},a),{id:a.id,schema:(0,b.isEmpty)(i)?void 0:i,records:a.provider?void 0:r}))}),(t={})[this.storageKey]=e,t},e.prototype.load=function(t){var e=this.config,n=this.all,o=this.events,r=this.em,i=this.loadProjectData(t);if(e.autoloadProviders){var a,s,l,c,u=n.filter(function(t){return t.hasProvider});u.length&&(a=this,s=void 0,l=void 0,c=function(){return h8(this,function(t){switch(t.label){case 0:return r.trigger(o.providerLoadAllBefore),[4,Promise.all(u.map(function(t){return t.loadProvider()}))];case 1:return t.sent(),r.trigger(o.providerLoadAll),[2]}})},new(l||(l=Promise))(function(t,e){function n(t){try{r(c.next(t))}catch(t){e(t)}}function o(t){try{r(c.throw(t))}catch(t){e(t)}}function r(e){var r;e.done?t(e.value):((r=e.value)instanceof l?r:new l(function(t){t(r)})).then(n,o)}r((c=c.apply(a,s||[])).next())}))}return i},e.prototype.postLoad=function(){var t=this.em,e=this.all;t.listenTo(e,tF,function(e,n,o){var r=o||n;t.changesUp(r,{dataSource:e,options:r})}),this.em.UndoManager.add(e)},e}(tX),go=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]})instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gr=function(){return(gr=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},gi=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},ga=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
1,trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},gs=function(t,e){var n={};for(var o in t)Object.prototype.hasOwnProperty.call(t,o)&&0>e.indexOf(o)&&(n[o]=t[o]);if(null!=t&&"function"==typeof Object.getOwnPropertySymbols)for(var r=0,o=Object.getOwnPropertySymbols(t);r<o.length;r++)0>e.indexOf(o[r])&&Object.prototype.propertyIsEnumerable.call(t,o[r])&&(n[o[r]]=t[o[r]]);return n},gl=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))};tI().$=tN.default;var gc=[pX,uN,fs,dr,sY,ub,sC,h3,so,fh,f5,fz,dm,lg,cJ,o0,cH,dR,aQ,gn],gu=[gn,uu,aR,uA,aC,so];!function(t){var e=t.$;if(e&&e.prototype&&"jQuery"!==e.prototype.constructor.name){var n=e.fn;n.hide=function(){return this.css("display","none")},n.show=function(){return this.css("display","block")},n.focus=function(){var t=this.get(0);return t&&t.focus(),this},n.bind=function(t,e){return this.on(t,e)},n.unbind=function(t,e){if(!(0,b.isObject)(t))return this.off(t,e);for(var n in t)t.hasOwnProperty(n)&&this.off(n,t[n]);return this},n.click=function(t){return t?this.on("click",t):this.trigger("click")},n.change=function(t){return t?this.on("change",t):this.trigger("change")},n.keydown=function(t){return t?this.on("keydown",t):this.trigger("keydown")},n.delegate=function(t,e,n,o){return o||(o=n),this.on(e,t,function(t){t.data=n,o(t)})},n.scrollLeft=function(){var t=this.get(0),e=(t=9==t.nodeType?t.defaultView:t)instanceof Window?t:null;return e?e.pageXOffset:t.scrollLeft||0},n.scrollTop=function(){var t=this.get(0),e=(t=9==t.nodeType?t.defaultView:t)instanceof Window?t:null;return e?e.pageYOffset:t.scrollTop||0};var o=e.prototype.offset;n.offset=function(t){var e,n;return t&&(e=t.top,n=t.left),void 0!==e&&this.css("top","".concat(e,"px")),void 0!==n&&this.css("left","".concat(n,"px")),o.call(this)},e.map=function(t,e){for(var n=[],o=0;o<t.length;o++)n.push(e(t[o],o));return n};var r=Array.prototype.indexOf;e.inArray=function(t,e,n){return null==e?-1:r.call(e,t,n)},e.Event=function(t,n){if(!(this instanceof e.Event))return new e.Event(t,n);this.type=t,this.isDefaultPrevented=function(){return!1}}}}({$:tN.default});var gp={debug:console.log,info:console.info,warning:console.warn,error:console.error},gf=function(t){function e(e){void 0===e&&(e={});var n=t.call(this)||this;n.Model=tH,n.Collection=tU,n.events=s,n.__skip=!1,n.defaultRunning=!1,n.loadTriggered=!1,n.destroyed=!1,n._isStoring=!1,n._config=e;var o=n.config;n.set("Config",e),n.set("modules",[]),n.set("toLoad",[]),n.set("storables",[]),n.set("selected",new tq),n.set("dmode",o.dragMode);var r=o.el,i=o.log,a=!0===i?(0,b.keys)(gp):(0,b.isArray)(i)?i:[];return(0,b.bindAll)(n,"initBaseColorPicker"),r&&o.fromElement&&(o.components=r.innerHTML),n.attrsOrig=r?(0,b.toArray)(r.attributes).reduce(function(t,e){return t[e.nodeName]=e.nodeValue,t},{}):"",o.components&&!o.pageManager&&(o.pageManager={pages:[{component:o.components}]}),gc.forEach(function(t){return n.loadModule(t)}),gu.forEach(function(t){return n.loadStorableModule(t)}),n.on("change:componentHovered",n.componentHovered,n),n.on("change:changesCount",n.updateChanges,n),n.on("change:readyLoad change:readyCanvas",n._checkReady,n),a.forEach(function(t){return n.listenLog(t)}),[{from:"change:selectedComponent",to:pi.toggled}
1].forEach(function(t){var e=t.from,o=t.to;n.listenTo(n,e,function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];n.trigger.apply(n,gl([o],t,!1)),n.logWarning("The event '".concat(e,"' is deprecated, replace it with '").concat(o,"'"))})}),n}return go(e,t),e.prototype.defaults=function(){return{editing:0,selected:0,clipboard:null,dmode:0,componentHovered:null,previousModel:null,changesCount:0,storables:[],modules:[],toLoad:[],opened:{},device:""}},Object.defineProperty(e.prototype,"storables",{get:function(){return this.get("storables")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"modules",{get:function(){return this.get("modules")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"toLoad",{get:function(){return this.get("toLoad")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"selected",{get:function(){return this.get("selected")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"shallow",{get:function(){return this.get("shallow")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"I18n",{get:function(){return this.get("I18n")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Utils",{get:function(){return this.get("Utils")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Commands",{get:function(){return this.get("Commands")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Plugins",{get:function(){return this.get("PluginManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Keymaps",{get:function(){return this.get("Keymaps")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Modal",{get:function(){return this.get("Modal")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Panels",{get:function(){return this.get("Panels")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"CodeManager",{get:function(){return this.get("CodeManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"UndoManager",{get:function(){return this.get("UndoManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"RichTextEditor",{get:function(){return this.get("RichTextEditor")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Canvas",{get:function(){return this.get("Canvas")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Editor",{get:function(){return this.get("Editor")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Components",{get:function(){return this.get("DomComponents")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Css",{get:function(){return this.get("CssComposer")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Blocks",{get:function(){return this.get("BlockManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Selectors",{get:function(){return this.get("SelectorManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Storage",{get:function(){return this.get("StorageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Traits",{get:function(){return this.get("TraitManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Parser",{get:function(){return this.get("Parser")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Layers",{get:function(){return this.get("LayerManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Assets",{get:function(){return this.get("AssetManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Devices",{get:function(){return this.get("DeviceManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Pages",{get:function(){return this.get("PageManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"Styles",{get:function(){return this.get("StyleManager")},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"DataSources",{get:function(){return this.get("DataSources")}
1,enumerable:!1,configurable:!0}),e.prototype.on=function(e,n,o){return t.prototype.on.call(this,e,n,o)},e.prototype.once=function(e,n,o){return t.prototype.once.call(this,e,n,o)},e.prototype.off=function(e,n,o){return t.prototype.off.call(this,e,n,o)},e.prototype.trigger=function(e){for(var n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return t.prototype.trigger.apply(this,gl([e],n,!1))},e.prototype._checkReady=function(){this.get("readyLoad")&&this.get("readyCanvas")&&!this.get("ready")&&this.set("ready",!0)},e.prototype.getContainer=function(){return this.config.el},e.prototype.listenLog=function(t){var e=this;this.listenTo(this,"log:".concat(t),function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(e.config.log){var r=gp[t];null==r||r.apply(void 0,n)}})},Object.defineProperty(e.prototype,"config",{get:function(){return this._config},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"version",{get:function(){var t;return(null==(t=this.config.grapesjs)?void 0:t.version)||""},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isHeadless",{get:function(){return!!this.config.headless},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"isShallow",{get:function(){return!!this.get("isShallow")},enumerable:!1,configurable:!0}),e.prototype.initModules=function(){this.modules.forEach(function(t){return t.onInit()})},e.prototype.getConfig=function(t){var e=this.config;return(0,b.isUndefined)(t)?e:e[t]},e.prototype.loadOnStart=function(){var t=this,n=this.config,o=n.projectData,r=n.headless,i={initial:!0},a=this.Storage;this.toLoad.reverse().forEach(function(t){return t.onLoad()});var s=function(){t.modules.forEach(function(e){return e.postLoad&&e.postLoad(t)}),t.set("readyLoad",1)};r?(o&&this.loadData(o,i),s()):this._storageTimeout=setTimeout(function(){return gi(t,void 0,void 0,function(){var t;return ga(this,function(e){switch(e.label){case 0:if(!o)return[3,1];return this.loadData(o,i),[3,5];case 1:if(!(null==a?void 0:a.canAutoload()))return[3,5];e.label=2;case 2:return e.trys.push([2,4,,5]),[4,this.load({},i)];case 3:return e.sent(),[3,5];case 4:return t=e.sent(),this.logError(t),[3,5];case 5:return s(),[2]}})})});var l=new e({noticeOnUnload:!1,storageManager:!1,undoManager:!1});l.set({isShallow:!0}),l.Pages.onLoad(),l.Canvas.postLoad(),this.set("shallow",l)},e.prototype.updateChanges=function(t,e,n){var o=this,r=this.Storage,i=this.getDirtyCount();n.isClear||(this.updateItr&&clearTimeout(this.updateItr),this.updateItr=setTimeout(function(){return o.trigger(s.update)})),this.config.noticeOnUnload&&(window.onbeforeunload=i?function(){return!0}:null),r.isAutosave()&&i>=r.getStepsBeforeSave()&&this.store().catch(function(t){return o.logError(t)})},e.prototype.loadModule=function(t){var e=new t(this);return this.set(e.name,e),e.onLoad&&this.toLoad.push(e),this.modules.push(e),e},e.prototype.loadStorableModule=function(t){var e=this.loadModule(t);return this.storables.push(e),e},e.prototype.init=function(t,e){void 0===e&&(e={}),this.destroyed&&(this.initialize(e),this.destroyed=!1),this.set("Editor",t)},e.prototype.getEditor=function(){return this.get("Editor")},e.prototype.handleUpdates=function(t,e){var n=this;void 0===t&&(t={}),this.__skip||!this.loadTriggered||t.temporary||t.noCount||t.avoidStore||t.partial||(this.trigger(this.events.updateBefore,e),this.timedInterval&&clearTimeout(this.timedInterval),this.timedInterval=setTimeout(function(){var e=n.getDirtyCount()||0;t.unset;var o=gs(t,["unset"]);n.set("changesCount",e+1,o)},0))},e.prototype.changesUp=function(t,e){this.handleUpdates(t,e)},e.prototype.componentHovered=function(t,e,n){var o=this.previous("componentHovered");o&&this.trigger(pi.unhovered,o,n),e&&this.trigger(pi.hovered,e,n)},e.prototype.getSelected=function(){return this.selected.lastComponent()},e.prototype.getSelectedAll=function(){return this.selected.allComponents()},e.prototype.setSelected=function(t,e){var n=this;void 0===e&&(e={});var o=e.event,r=o&&(o.ctrlKey||o.metaKey),i=(o||{}).shiftKey,a=((0,b.isArray)(t)?t:[t]).map(function(t){var e,n;return(null==(n=null==(e=null==t?void 0:t.delegate)?void 0:e.select)?void 0:n.call(e,t))||t}
1).filter(Boolean),s=this.getSelectedAll(),l=this.getConfig().multipleSelection,c=(0,b.isArray)(t);(c||!t)&&this.removeSelected(s.filter(function(t){return!(0,b.contains)(a,t)})),a.forEach(function(t){if(t&&(n.trigger(pi.selectBefore,t,e),!t.get("selectable")||e.abort))if(!e.useValid)return;else{for(var o=t.parent();o&&!o.get("selectable");)o=o.parent();t=o}if(r&&l)return n.toggleSelected(t);if(i&&l){if(n.isEditing())return;n.clearSelection(n.Canvas.getWindow());var a,u,p=t.collection,f=t.index();if(n.getSelectedAll().forEach(function(t){var e=t.collection,n=t.index();e===p&&(n<f?a=(0,b.isUndefined)(a)?n:Math.max(a,n):n>f&&(u=(0,b.isUndefined)(u)?n:Math.min(u,n)))}),!(0,b.isUndefined)(a))for(;a!==f;)n.addSelected(p.at(a),e),a++;if(!(0,b.isUndefined)(u))for(;u!==f;)n.addSelected(p.at(u),e),u--;return n.addSelected(t,e)}c||n.removeSelected(s.filter(function(e){return e!==t})),n.addSelected(t,e)})},e.prototype.addSelected=function(t,e){var n=this;void 0===e&&(e={}),((0,b.isArray)(t)?t:[t]).forEach(function(t){var o=n.selected;if(!(!t||!t.get("selectable")||t.parents().some(function(t){return o.hasComponent(t)}))&&(e.forceChange&&n.removeSelected(t,e),o.allComponents().filter(function(e){return(0,b.contains)(e.parents(),t)}).forEach(function(t){return n.removeSelected(t,e)}),o.addComponent(t,e),n.trigger(pi.select,t,e),n.Canvas.addSpot({type:po.Select,component:t}),e.activate)){var r=t.getView();(null==r?void 0:r.rendered)?r.onActive(e.event):t.once(pi.render,function(t){return t.view.onActive(e.event)})}})},e.prototype.removeSelected=function(t,e){var n=this;void 0===e&&(e={}),this.selected.removeComponent(t,e),((0,b.isArray)(t)?t:[t]).forEach(function(t){return n.Canvas.removeSpots({type:po.Select,component:t})})},e.prototype.toggleSelected=function(t,e){var n=this;void 0===e&&(e={}),((0,b.isArray)(t)?t:[t]).forEach(function(t){n.selected.hasComponent(t)?n.removeSelected(t,e):n.addSelected(t,e)})},e.prototype.setHovered=function(t,e){var n=this;void 0===e&&(e={});var o=function(t,e){var o=n.config,r=n.Canvas,i=n.getHovered(),a=n.getSelectedAll(),s=po.Hover,l=po.Spacing;n.set("componentHovered",t||null,e),i&&(r.removeSpots({type:s,component:i}),r.removeSpots({type:l,component:i})),t&&(r.addSpot({type:s,component:t}),(!a.includes(t)||o.showOffsetsSelected)&&r.addSpot({type:l,component:t}))};if(!t)return o();if(e.forceChange&&o(),this.trigger(pi.hoverBefore,t,e),!t.get("hoverable"))if(!e.useValid||e.abort)return;else{for(var r=t.parent();r&&!r.get("hoverable");)r=r.parent();t=r}e.abort||(o(t,e),this.trigger(pi.hover,t,e))},e.prototype.getHovered=function(){return this.get("componentHovered")},e.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.Components.setComponents(t,e)},e.prototype.getComponents=function(){var t=this.Components,e=this.CodeManager;if(t&&e){var n=t.getComponents();return e.getCode(n,"json")}},e.prototype.setStyle=function(t,e){void 0===e&&(e={});var n=this.Css;return n.clear(e),n.getAll().add(t,e),this},e.prototype.addStyle=function(t,e){void 0===e&&(e={});var n=this.getStyle().add(t,e);return(0,b.isArray)(n)?n:[n]},e.prototype.getStyle=function(){return this.Css.getAll()},e.prototype.setState=function(t){return this.set("state",t),this},e.prototype.getState=function(){return this.get("state")||""},e.prototype.getHtml=function(t){void 0===t&&(t={});var e=this.config,n=e.optsHtml,o=e.jsInHtml?this.getJs(t):"",r=t.component||this.Components.getComponent(),i=r?this.CodeManager.getCode(r,"html",gr(gr({},n),t)):"";return i+(o?"<script>".concat(o,"<\/script>"):"")},e.prototype.getCss=function(t){void 0===t&&(t={});var e=this.config,n=e.optsCss,o=t.avoidProtected,r=(0,b.isUndefined)(t.keepUnusedStyles)?e.keepUnusedStyles:t.keepUnusedStyles,i=this.Css,a=t.component||this.Components.getComponent(),s=!o&&e.protectedCss||"",l=a&&this.CodeManager.getCode(a,"css",gr(gr({cssc:i,keepUnusedStyles:r},n),t));return a?t.json?l:s+l:""},e.prototype.getJs=function(t){void 0===t&&(t={});var e=t.component||this.Components.getWrapper();return e?this.CodeManager.getCode(e,"js").trim():""},e.prototype.store=function(t){return gi(this,void 0,void 0,function(){var e,n=this;return ga(this,function(o){switch(o.label){case 0:if(this._isStoring)return[2];return this._isStoring=!0,setTimeout(function(){n.clearDirtyCount()},1),e=this.storeData(),[4,this.Storage.store(e,t)];case 1:return o.sent(),setTimeout(function(){n._isStoring=!1},1),[2,e]}})})},e.prototype.load=function(t){return gi(this,arguments,void 0,function(t,e){var n;return void 0===e&&(e={}),ga(this,function(o){switch(o.label){case 0:return[4,this.Storage.load(t)];case 1:return n=o.sent(),this.loadData(n,e),[4,te()];case 2:return o.sent(),e.clear&&(this.UndoManager.clear(),this.clearDirtyCount()),[2,n]}})})},e.prototype.storeData=function(){var t={},e=this.getEditing();e&&e.trigger("sync:content",{noCount:!0}
1),this.storables.forEach(function(e){t=gr(gr({},t),e.store(1))});var n=JSON.parse(JSON.stringify(t));return this.trigger(s.projectGet,{project:n}),n},e.prototype.loadData=function(t,e){void 0===t&&(t={}),void 0===e&&(e={});var n={project:t,options:e,initial:!!e.initial},o=!1;return tx(t)||(this.storables.forEach(function(t){return t.clear()}),this.storables.forEach(function(e){return e.load(t)}),o=!0),this.trigger(s.projectLoad,gr(gr({},n),{loaded:o})),o&&this.trigger(s.projectLoaded,n),t},e.prototype.getDeviceModel=function(){var t=this.get("device");return this.Devices.get(t)},e.prototype.runDefault=function(t){void 0===t&&(t={});var e=this.Commands.get(this.config.defaultCommand);e&&!this.defaultRunning&&(e.stop(this,this,t),e.run(this,this,t),this.defaultRunning=!0)},e.prototype.stopDefault=function(t){void 0===t&&(t={});var e=this.Commands;if(e){var n=e.get(this.config.defaultCommand);n&&this.defaultRunning&&(n.stop(this,this,t),this.defaultRunning=!1)}},e.prototype.refreshCanvas=function(t){void 0===t&&(t={}),this.Canvas.refresh({spots:t.tools})},e.prototype.clearSelection=function(t){var e;null==(e=(t||window).getSelection())||e.removeAllRanges()},e.prototype.getCurrentMedia=function(){var t=this.config,e=this.getDeviceModel(),n=t.mediaCondition,o=t.devicePreviewMode,r=e&&e.get("widthMedia");return e&&r&&!o?"(".concat(n,": ").concat(r,")"):""},e.prototype.getWrapper=function(){return this.Components.getWrapper()},e.prototype.setCurrentFrame=function(t){return this.set("currentFrame",t)},e.prototype.getCurrentFrame=function(){return this.get("currentFrame")},e.prototype.getCurrentFrameModel=function(){var t;return null==(t=this.getCurrentFrame()||{})?void 0:t.model},e.prototype.getIcon=function(t){return(this.config.icons||{})[t]||""},e.prototype.getDirtyCount=function(){return this.get("changesCount")},e.prototype.clearDirtyCount=function(){return this.set({changesCount:0},{isClear:!0})},e.prototype.getZoomDecimal=function(){return this.Canvas.getZoomDecimal()},e.prototype.getZoomMultiplier=function(){return this.Canvas.getZoomMultiplier()},e.prototype.setDragMode=function(t){return this.set("dmode",t)},e.prototype.getDragMode=function(t){return(null==t?void 0:t.getDragMode())||this.get("dmode")||""},e.prototype.t=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=this.get("I18n");return null==n?void 0:n.t.apply(n,t)},e.prototype.inAbsoluteMode=function(t){return"absolute"===this.getDragMode(t)},e.prototype.destroyAll=function(){var t=this,e=this.config,n=this.view;this.trigger(s.destroy);var o=this.getEditor(),r=(e.grapesjs||{}).editors,i=void 0===r?[]:r,a=this.get("shallow");this._storageTimeout&&clearTimeout(this._storageTimeout),null==a||a.destroyAll(),this.stopListening(),this.stopDefault(),(this.modules||[]).slice().reverse().forEach(function(t){return t.destroy()}),(null==n?void 0:n.remove)&&n.remove(),this.clear({silent:!0}),this.destroyed=!0,["_config","view","_previousAttributes","_events","_listeners"].forEach(function(e){return t[e]={}}),i.splice(i.indexOf(o),1),to()&&(0,tN.default)(e.el).empty().attr(this.attrsOrig),this.trigger(s.destroyed)},e.prototype.getEditing=function(){var t=this.get("editing");return t&&t.model||void 0},e.prototype.setEditing=function(t){return this.set("editing",t),this},e.prototype.isEditing=function(){return!!this.get("editing")},e.prototype.log=function(t,e){void 0===e&&(e={});var n=s.log,o=e.ns,r=e.level,i=void 0===r?"debug":r;if(this.trigger(n,t,e),i&&this.trigger("".concat(n,":").concat(i),t,e),o){var a="".concat(n,"-").concat(o);this.trigger(a,t,e),i&&this.trigger("".concat(a,":").concat(i),t,e)}},e.prototype.logInfo=function(t,e){this.log(t,gr(gr({},e),{level:"info"}))},e.prototype.logWarning=function(t,e){this.log(t,gr(gr({},e),{level:"warning"}))},e.prototype.logError=function(t,e){this.log(t,gr(gr({},e),{level:"error"}))},e.prototype.initBaseColorPicker=function(t,e){void 0===e&&(e={});var n=this.config,o=n.colorPicker,r=n.el,i=n.stylePrefix;return(0,tN.default)(t).spectrum(gr(gr({containerClassName:"".concat(i,"one-bg ").concat(i,"two-color"),appendTo:r||"body",maxSelectionSize:8,showPalette:!0,palette:[],showAlpha:!0,chooseText:"Ok",cancelText:"⨯"},e),void 0===o?{}:o))},e.prototype.skip=function(t){this.__skip=!0;var e=this.UndoManager;e?e.skip(t):t(),this.__skip=!1},e.prototype.data=function(t,e,n){var o="_gjs-data";if(t[o]||(t[o]={}),(0,b.isUndefined)(n))return t[o][e];t[o][e]=n},e}(tH),gd=function(){var t=function(e,n){return(t=Object.setPrototypeOf||({__proto__:[]}
1)instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&(t[n]=e[n])})(e,n)};return function(e,n){if("function"!=typeof n&&null!==n)throw TypeError("Class extends value "+String(n)+" is not a constructor or null");function o(){this.constructor=e}t(e,n),e.prototype=null===n?Object.create(n):(o.prototype=n.prototype,new o)}}(),gh=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]},trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},gg=function(t){function e(e){var n=t.call(this,{model:e})||this,o=e.Panels,r=e.UndoManager;return e.view=n,e.once("change:ready",function(){o.active(),o.disableButtons(),e.getConfig().telemetry&&n.sendTelemetryData().catch(function(){}),setTimeout(function(){e.trigger(s.load,e.Editor),e.loadTriggered=!0,r.clear(),e.clearDirtyCount()})}),n}return gd(e,t),e.prototype.render=function(){var t=this,e=this.$el,n=this.model,o=n.Panels,r=n.Canvas,i=n.config,a=n.modules,s=i.stylePrefix,l=["".concat(s,"editor")];i.customUI||l.push("".concat(s,"one-bg ").concat(s,"two-color"));var c=(0,tN.default)(i.el||"body ".concat(i.container));i.cssIcons&&ts(i.cssIcons,{unique:!0,prepand:!0}),e.empty(),i.width&&c.css("width",i.width),i.height&&c.css("height",i.height),e.append(r.render()),e.append(o.render());var u=n.shallow.Canvas.render();return u.style.display="none",e.append(u),e.attr("class",l.join(" ")),c.addClass("".concat(s,"editor-cont")).empty().append(e),a.forEach(function(e){var n;return null==(n=e.postRender)?void 0:n.call(e,t)}),this},e.prototype.sendTelemetryData=function(){var t,e,n,o;return t=this,e=void 0,n=void 0,o=function(){var t,e,n,o,r,i,a;return gh(this,function(l){switch(l.label){case 0:if("localhost"===(t=window.location.hostname)||t.includes("localhost")||(e="gjs_telemetry_sent_",n=this.model.version,o="".concat(e).concat(n),sessionStorage.getItem(o)))return[2];return[4,fetch("".concat("https://app.grapesjs.com","/api/gjs/telemetry/collect"),{method:"POST",body:JSON.stringify({domain:t,version:n})})];case 1:if((r=l.sent()).ok)return[3,3];return i=Error.bind,a="Failed to send telemetry data ".concat,[4,r.text()];case 2:throw new(i.apply(Error,[void 0,a.apply("Failed to send telemetry data ",[l.sent()])]));case 3:return sessionStorage.setItem(o,"true"),Object.keys(sessionStorage).forEach(function(t){t.startsWith(e)&&t!==o&&sessionStorage.removeItem(t)}),this.trigger(s.telemetryInit),[2]}})},new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},e}(tB),gv=function(){return(gv=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)},gy=function(t,e,n,o){return new(n||(n=Promise))(function(r,i){function a(t){try{l(o.next(t))}catch(t){i(t)}}function s(t){try{l(o.throw(t))}catch(t){i(t)}}function l(t){var e;t.done?r(t.value):((e=t.value)instanceof n?e:new n(function(t){t(e)})).then(a,s)}l((o=o.apply(t,e||[])).next())})},gm=function(t,e){var n,o,r,i,a={label:0,sent:function(){if(1&r[0])throw r[1];return r[1]}
1,trys:[],ops:[]};return i={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function s(s){return function(l){var c=[s,l];if(n)throw TypeError("Generator is already executing.");for(;i&&(i=0,c[0]&&(a=0)),a;)try{if(n=1,o&&(r=2&c[0]?o.return:c[0]?o.throw||((r=o.return)&&r.call(o),0):o.next)&&!(r=r.call(o,c[1])).done)return r;switch(o=0,r&&(c=[2&c[0],r.value]),c[0]){case 0:case 1:r=c;break;case 4:return a.label++,{value:c[1],done:!1};case 5:a.label++,o=c[1],c=[0];continue;case 7:c=a.ops.pop(),a.trys.pop();continue;default:if(!(r=(r=a.trys).length>0&&r[r.length-1])&&(6===c[0]||2===c[0])){a=0;continue}if(3===c[0]&&(!r||c[1]>r[0]&&c[1]<r[3])){a.label=c[1];break}if(6===c[0]&&a.label<r[1]){a.label=r[1],r=c;break}if(r&&a.label<r[2]){a.label=r[2],a.ops.push(c);break}r[2]&&a.ops.pop(),a.trys.pop();continue}c=e.call(t,a)}catch(t){c=[6,t],o=0}finally{n=r=0}if(5&c[0])throw c[1];return{value:c[0]?c[1]:void 0,done:!0}}}},gb=function(t,e,n){if(n||2==arguments.length)for(var o,r=0,i=e.length;r<i;r++)!o&&r in e||(o||(o=Array.prototype.slice.call(e,0,r)),o[r]=e[r]);return t.concat(o||Array.prototype.slice.call(e))},gw=function(){function t(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.events=s,this.html=tD;var n,o={stylePrefix:"gjs-",components:"",style:"",fromElement:!1,projectData:void 0,noticeOnUnload:!0,showOffsets:!1,showOffsetsSelected:!1,forceClass:!0,height:"900px",width:"100%",log:["warning","error"],baseCss:"",protectedCss:"* { box-sizing: border-box; } body {margin: 0;}",canvasCss:"",defaultCommand:"select-comp",showToolbar:!0,showDevices:!0,devicePreviewMode:!1,mediaCondition:"max-width",tagVarStart:"{[ ",tagVarEnd:" ]}",jsInHtml:!0,nativeDnD:!0,multipleSelection:!0,optsHtml:{},optsCss:{},avoidInlineStyle:!0,avoidDefaults:!0,clearStyles:!1,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>',delete:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,4H15.5L14.5,3H9.5L8.5,4H5V6H19M6,19A2,2 0 0,0 8,21H16A2,2 0 0,0 18,19V7H6V19Z" /></svg>',copy:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M19,21H8V7H19M19,5H8A2,2 0 0,0 6,7V21A2,2 0 0,0 8,23H19A2,2 0 0,0 21,21V7A2,2 0 0,0 19,5M16,1H4A2,2 0 0,0 2,3V17H4V3H16V1Z" /></svg>',arrowUp:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M13,20H11V8L5.5,13.5L4.08,12.08L12,4.16L19.92,12.08L18.5,13.5L13,8V20Z" /></svg>',chevron:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /></svg>',eye:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M12,9A3,3 0 0,0 9,12A3,3 0 0,0 12,15A3,3 0 0,0 15,12A3,3 0 0,0 12,9M12,17A5,5 0 0,1 7,12A5,5 0 0,1 12,7A5,5 0 0,1 17,12A5,5 0 0,1 12,17M12,4.5C7,4.5 2.73,7.61 1,12C2.73,16.39 7,19.5 12,19.5C17,19.5 21.27,16.39 23,12C21.27,7.61 17,4.5 12,4.5Z" /></svg>',eyeOff:'<svg viewBox="0 0 24 24"><path fill="currentColor" d="M11.83,9L15,12.16C15,12.11 15,12.05 15,12A3,3 0 0,0 12,9C11.94,9 11.89,9 11.83,9M7.53,9.8L9.08,11.35C9.03,11.56 9,11.77 9,12A3,3 0 0,0 12,15C12.22,15 12.44,14.97 12.65,14.92L14.2,16.47C13.53,16.8 12.79,17 12,17A5,5 0 0,1 7,12C7,11.21 7.2,10.47 7.53,9.8M2,4.27L4.28,6.55L4.73,7C3.08,8.3 1.78,10 1,12C2.73,16.39 7,19.5 12,19.5C13.55,19.5 15.03,19.2 16.38,18.66L16.81,19.08L19.73,22L21,20.73L3.27,3M12,7A5,5 0 0,1 17,12C17,12.64 16.87,13.26 16.64,13.82L19.57,16.75C21.07,15.5 22.27,13.86 23,12C21.27,7.61 17,4.5 12,4.5C10.6,4.5 9.26,4.75 8,5.2L10.17,7.35C10.74,7.13 11.35,7 12,7Z" /></svg>'},i18n:{},undoManager:{},assetManager:{},canvas:{},layerManager:{},storageManager:{},richTextEditor:{},domComponents:{},modal:{},codeManager:{},panels:{},commands:{},cssComposer:{},selectorManager:{},deviceManager:{},styleManager:{},blockManager:{},traitManager:{},textViewCode:"Code",keepUnusedStyles:!1,customUI:!1,telemetry:!0};this.config=gv(gv(gv({},o),t),{pStylePrefix:null!=(n=t.stylePrefix)?n:o.stylePrefix}),this.em=new gf
vendor: 5,759 bytes, line 1
1(this.config),this.$=e.$,this.em.init(this),this.editor=this.em}return Object.defineProperty(t.prototype,"Config",{get:function(){return this.em.config},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"I18n",{get:function(){return this.em.I18n},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Utils",{get:function(){return this.em.Utils},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Commands",{get:function(){return this.em.Commands},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Plugins",{get:function(){return this.em.Plugins},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Keymaps",{get:function(){return this.em.Keymaps},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Modal",{get:function(){return this.em.Modal},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Panels",{get:function(){return this.em.Panels},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Canvas",{get:function(){return this.em.Canvas},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Parser",{get:function(){return this.em.Parser},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CodeManager",{get:function(){return this.em.CodeManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"UndoManager",{get:function(){return this.em.UndoManager},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"RichTextEditor",{get:function(){return this.em.RichTextEditor},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Pages",{get:function(){return this.em.Pages},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Components",{get:function(){return this.em.Components},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DomComponents",{get:function(){return this.em.Components},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Layers",{get:function(){return this.em.Layers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"LayerManager",{get:function(){return this.em.Layers},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Css",{get:function(){return this.em.Css},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"CssComposer",{get:function(){return this.em.Css},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Storage",{get:function(){return this.em.Storage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"StorageManager",{get:function(){return this.em.Storage},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Assets",{get:function(){return this.em.Assets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"AssetManager",{get:function(){return this.em.Assets},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Blocks",{get:function(){return this.em.Blocks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"BlockManager",{get:function(){return this.em.Blocks},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Traits",{get:function(){return this.em.Traits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"TraitManager",{get:function(){return this.em.Traits},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Selectors",{get:function(){return this.em.Selectors},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"SelectorManager",{get:function(){return this.em.Selectors},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Styles",{get:function(){return this.em.Styles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"StyleManager",{get:function(){return this.em.Styles},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"Devices",{get:function(){return this.em.Devices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DeviceManager",{get:function(){return this.em.Devices},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"DataSources",{get:function(){return this.em.DataSources},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"EditorModel",{get:function(){return this.em},enumerable:!1,configurable:!0}),t.prototype.getConfig=function(t){return this.em.getConfig(t)},t.prototype.getHtml=function(t){return this.em.getHtml(t)},t.prototype.getCss=function(t){return this.em.getCss(t)},t.prototype.getJs=function(t){return this.em.getJs(t)},t.prototype.getComponents=function(){return this.Components.getComponents()},t.prototype.getWrapper=function(){return this.Components.getWrapper()},t.prototype.setComponents=function(t,e){return void 0===e&&(e={}),this.em.setComponents(t,e),this},t.prototype.addComponents=function(t,e){return this.getWrapper().append(t,e)},t.prototype.getStyle=function(){return this.em.Css.getAll()},t.prototype.setStyle=function(t,e){return void 0===e&&(e={}),this.em.setStyle(t,e),this},t.prototype.addStyle=function(t,e){return void 0===e&&(e={}),this.em.addStyle(t,e)},t.prototype.getSelected=function(){return this.em.getSelected()},t.prototype.getSelectedAll=function(){return this.em.getSelectedAll()},t.prototype.getSelectedToStyle=function(){var t=this.em.getSelected();if(t)return this.StyleManager.getModelToStyle(t)},t.prototype.select=function(t,e){return this.em.setSelected(t,e),this},t.prototype.selectAdd=function(t){return this.em.addSelected(t),this},t.prototype.selectRemove=function(t){return this.em.removeSelected(t),this},t.prototype.selectToggle=function(t){return this.em.toggleSelected(t),this},t.prototype.getEditing=function(){return this.em.getEditing()},t.prototype.setDevice=function(t){return this.em.set(
1"device",t),this},t.prototype.getDevice=function(){return this.em.get("device")},t.prototype.runCommand=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return(e=this.Commands).run.apply(e,gb([t],n,!1))},t.prototype.stopCommand=function(t){for(var e,n=[],o=1;o<arguments.length;o++)n[o-1]=arguments[o];return(e=this.Commands).stop.apply(e,gb([t],n,!1))},t.prototype.store=function(t){return gy(this,void 0,void 0,function(){return gm(this,function(e){switch(e.label){case 0:return[4,this.em.store(t)];case 1:return[2,e.sent()]}})})},t.prototype.load=function(t){return gy(this,arguments,void 0,function(t,e){return void 0===e&&(e={}),gm(this,function(n){switch(n.label){case 0:return[4,this.em.load(t,e)];case 1:return[2,n.sent()]}})})},t.prototype.getProjectData=function(){return this.em.storeData()},t.prototype.loadProjectData=function(t,e){return void 0===e&&(e={}),this.em.loadData(t,e)},t.prototype.storeData=function(){return this.em.storeData()},t.prototype.loadData=function(t){return this.em.loadData(t)},t.prototype.getContainer=function(){return this.config.el},t.prototype.getDirtyCount=function(){return this.em.getDirtyCount()},t.prototype.clearDirtyCount=function(){return this.em.clearDirtyCount()},t.prototype.refresh=function(t){this.em.refreshCanvas(t)},t.prototype.setCustomRte=function(t){this.RichTextEditor.customRte=t},t.prototype.setCustomParserCss=function(t){return this.Parser.getConfig().parserCss=t,this},t.prototype.setDragMode=function(t){return this.em.setDragMode(t),this},t.prototype.log=function(t,e){return void 0===e&&(e={}),this.em.log(t,e),this},t.prototype.t=function(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return(t=this.em).t.apply(t,e)},t.prototype.on=function(t,e){return this.em.on(t,e),this},t.prototype.once=function(t,e){return this.em.once(t,e),this},t.prototype.off=function(t,e){return this.em.off(t,e),this},t.prototype.trigger=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];return this.em.trigger.apply(this.em,gb([t],e,!0)),this},t.prototype.destroy=function(){this.em&&(this.em.destroyAll(),this.editorView=void 0)},t.prototype.getEl=function(){var t;return null==(t=this.editorView)?void 0:t.el},t.prototype.getModel=function(){return this.em},t.prototype.render=function(){var t;return null==(t=this.editorView)||t.remove(),this.editorView=new gg(this.em),this.editorView.render().el},t.prototype.onReady=function(t){this.em.get("ready")?t(this):this.em.on("load",t)},t}(),g_=function(){return(g_=Object.assign||function(t){for(var e,n=1,o=arguments.length;n<o;n++)for(var r in e=arguments[n])Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t}).apply(this,arguments)};!function(){if(to()&&function(){for(var t,e=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$/]],o=0;o<n.length&&!(t=n[o][1].exec(e));o++);return!!t}()){var t=DOMImplementation.prototype.createHTMLDocument;DOMImplementation.prototype.createHTMLDocument=function(e){return e||(e=""),t.apply(document.implementation,[e])}}}();var gC=[],gx=function(t,e){var n=e||{}
1,o=function(e){var o=dM(t);o?o(e,n):dD(e,t)};return o.__gjsPluginMeta={id:"string"==typeof t?t:t.__gjsPluginId,plugin:t,options:n},o},gO={$:tN.default,editors:gC,plugins:{add:function(t,e){return console.error("grapesjs.plugins.add(...) is deprecated. Pass plugins directly via init({ plugins: [...] }) or use usePlugin(...)."),dO.set(t,e),e},get:dP,getAll:function(){return dO},clear:function(){return dO.clear()}},usePlugin:gx,version:"0.23.2",init:function(t){void 0===t&&(t={});var e,n=t.headless,o=t.container;if(!o&&!n)throw Error("'container' is required");var r=g_(g_({autorender:!0,plugins:[],pluginsOpts:{}},t),{grapesjs:this,el:n?void 0:(0,b.isElement)(o)?o:document.querySelector(o)}),i=new gw(r,{$:tN.default}),a=i.getModel();return a.initModules(),null==(e=r.plugins)||e.forEach(function(t){return i.Plugins.add(t)}),a.loadOnStart(),r.autorender&&!n&&i.render(),gC.push(i),i}};let gS=gO;var gT=y.Ay,gP=y.I0,gE=y.nu}}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.