formeo 1.7.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/demo/assets/{demo-6OgBuReZ.js → demo-DmZcX0Wu.js} +1 -1
- package/dist/demo/assets/{formeo-B_x_t1mk.js → formeo-iaUnCEPY.js} +4 -4
- package/dist/demo/assets/formeo-iaUnCEPY.js.gz +0 -0
- package/dist/demo/index.html +1 -1
- package/dist/{formeo.umd.min.js → formeo.min.js} +2 -2
- package/dist/formeo.min.js.gz +0 -0
- package/dist/style.css +1 -1
- package/dist/style.css.gz +0 -0
- package/package.json +1 -1
- package/dist/demo/assets/formeo-B_x_t1mk.js.gz +0 -0
- package/dist/formeo.cjs.min.js +0 -14
- package/dist/formeo.cjs.min.js.gz +0 -0
- package/dist/formeo.es.min.js +0 -9436
- package/dist/formeo.es.min.js.gz +0 -0
- package/dist/formeo.iife.min.js +0 -14
- package/dist/formeo.iife.min.js.gz +0 -0
- package/dist/formeo.umd.min.js.gz +0 -0
|
Binary file
|
package/dist/style.css
CHANGED
package/dist/style.css.gz
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
Binary file
|
package/dist/formeo.cjs.min.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
/**
|
|
3
|
-
formeo - https://formeo.io
|
|
4
|
-
Version: 1.7.0
|
|
5
|
-
Author: Draggable https://draggable.io
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
"use strict";var t=Object.defineProperty,e=(e,n,o)=>((e,n,o)=>n in e?t(e,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):e[n]=o)(e,"symbol"!=typeof n?n+"":n,o);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n={},o=Object.freeze({method:"GET",body:""});const i=(t,e)=>{const n=[];t.on("data",(t=>n.push(t))),t.on("end",(()=>{const o=Buffer.concat(n),i={ok:t.statusCode>=200&&t.statusCode<300,status:t.statusCode,statusText:t.statusMessage,headers:new Map(Object.entries(t.headers)),body:o,arrayBuffer:()=>Promise.resolve(o),json:()=>Promise.resolve(JSON.parse(o.toString()))};e(i)}))},r={extension:".lang",location:"assets/lang/",langs:["en-US"],locale:"en-US",override:{}};class s{constructor(t=r){this.langs=Object.create(null),this.loaded=[],this.processConfig(t)}processConfig(t){const{location:e,...n}={...r,...t},o=e.replace(/\/?$/,"/");this.config={location:o,...n};const{override:i,preloaded:s={}}=this.config,a=Object.entries(this.langs).concat(Object.entries(i||s));this.langs=a.reduce(((t,[e,n])=>(t[e]=this.applyLanguage(e,n),t)),{}),this.locale=this.config.locale||this.config.langs[0]}init(t){return this.processConfig({...this.config,...t}),this.setCurrent(this.locale)}addLanguage(t,e={}){e="string"==typeof e?s.processFile(e):e,this.applyLanguage(t,e),this.config.langs.push("locale")}getValue(t,e=this.locale){var n;return(null==(n=this.langs[e])?void 0:n[t])||this.getFallbackValue(t)}getFallbackValue(t){const e=Object.values(this.langs).find((e=>e[t]));return null==e?void 0:e[t]}makeSafe(t){const e={"{":"\\{","}":"\\}","|":"\\|"};return t=t.replace(/[{}|]/g,(t=>e[t])),new RegExp(t,"g")}put(t,e){return this.current[t]=e,e}get(t,e){const n=this;let o=this.getValue(t);if(!o)return;const i=o.match(/\{[^}]+?\}/g);if(e&&i)if("object"==typeof e)for(const r of i){const t=r.substring(1,r.length-1);o=o.replace(n.makeSafe(r),e[t]||"")}else o=o.replace(/\{[^}]+?\}/g,e);return o}static processFile(t){return s.fromFile(t.replace(/\n\n/g,"\n"))}static fromFile(t){const e=t.split("\n"),n={};for(let o,i=0;i<e.length;i++){o=/^(.+?) *?= *?([^\n]+)/.exec(e[i]),o&&(n[o[1]]=o[2].replace(/(^\s+|\s+$)/g,""))}return n}loadLang(t,e=!0){const r=this;return new Promise((function(s,a){if(-1!==r.loaded.indexOf(t)&&e)return r.applyLanguage(r.langs[t]),s(r.langs[t]);return function(t,e={}){const r={...o,...e},s=(t.startsWith("https"),n);return new Promise(((e,n)=>{const o=s.request(t,r,(t=>{i(t,e)}));o.on("error",(t=>n(new Error(t.message)))),(null==r?void 0:r.body)&&o.write(r.body),o.end()}))}([r.config.location,t,r.config.extension].join("")).then((({data:e})=>{const n=r.processFile(e);return r.applyLanguage(t,n),r.loaded.push(t),s(r.langs[t])})).catch((()=>{const e=r.applyLanguage(t);s(e)}))}))}applyLanguage(t,e={}){const n=this.config.override[t]||{},o=this.langs[t]||{};return this.langs[t]={...o,...e,...n},this.langs[t]}get getLangs(){return this.config.langs}async setCurrent(t="en-US"){return await this.loadLang(t),this.locale=t,this.current=this.langs[t],this.current}}const a=new s,l="formeo",c=[{name:"cssPreload",src:"//cdnjs.cloudflare.com/ajax/libs/loadCSS/2.0.1/cssrelpreload.min.js"},{name:"mutationObserver",src:"//cdn.jsdelivr.net/npm/mutationobserver-shim/dist/mutationobserver.min.js"},{name:"fetch",src:"https://unpkg.com/unfetch/polyfill"}],d="control-group",h=`${l}-stage`,u=`${l}-row`,p=`${l}-column`,m=`${l}-field`,g=new Map([[h,u],[u,p],[p,m]]),f=["external","stages","rows","columns","fields"],v=[{name:"controls",className:d},{name:"stage",className:h},{name:"row",className:u},{name:"column",className:p},{name:"field",className:m}],b={controls:d,stage:h,row:u,column:p,field:m},y=Object.entries(b).reduce(((t,[e,n])=>({...t,[n]:e})),{}),w=Object.values(b),x=new RegExp(`${w.join("|")}`,"g"),C=v.map((({name:t},e,n)=>{const{name:o}=n[e+1]||{};return o&&[t,o]})).filter(Boolean),E=C.slice().map((t=>t.slice().reverse())).reverse(),S=new Map(C),O=new Map(E.slice()),N=new Map([[{value:"100.0",label:"100%"}],[{value:"50.0,50.0",label:"50 | 50"},{value:"33.3,66.6",label:"33 | 66"},{value:"66.6,33.3",label:"66 | 33"}],[{value:"33.3,33.3,33.3",label:"33 | 33 | 33"},{value:"25.0,25.0,50.0",label:"25 | 25 | 50"},{value:"50.0,25.0,25.0",label:"50 | 25 | 25"},{value:"25.0,50.0,25.0",label:"25 | 50 | 25"}],[{value:"25.0,25.0,25.0,25.0",label:"25 | 25 | 25 | 25"}],[{value:"20.0,20.0,20.0,20.0,20.0",label:"20 | 20 | 20 | 20 | 20"}],[{value:"16.66,16.66,16.66,16.66,16.66,16.66",label:"16.66 | 16.66 | 16.66 | 16.66 | 16.66 | 16.66"}]].reduce(((t,e,n)=>(t.push([n,e]),t)))),M=[{type:"added",condition:(t,e)=>Boolean(void 0===t&&e)}],_=`${l}-formData`,j=`${l}-locale`,A=333,D=Math.round(166.5),k=Math.round(666),T="formeoSaved",z="formeoUpdated",P="formeoOnRender",L=["label","logical","source","thenTarget","sourceProperty","comparison","target","targetProperty","assignment","value"],$={value:"attrs.value",checked:"attrs.checked",isVisible:"config.isVisible",isNotVisible:"config.isNotVisible"},H={comparison:{equals:"==",notEquals:"!=",contains:"⊃",notContains:"!⊃"},assignment:{equals:"="},logical:{and:"&&",or:"||"},property:$},V=/(\b[0-9a-f]{8}\b-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-\b[0-9a-f]{12}\b)/gi,I=/\bcol-\w+-\d+/g;var F="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function B(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var R=function(){this.__data__=[],this.size=0};var W=function(t,e){return t===e||t!=t&&e!=e},q=W;var U=function(t,e){for(var n=t.length;n--;)if(q(t[n][0],e))return n;return-1},G=U,X=Array.prototype.splice;var Y=U;var Z=U;var J=U;var K=R,Q=function(t){var e=this.__data__,n=G(e,t);return!(n<0)&&(n==e.length-1?e.pop():X.call(e,n,1),--this.size,!0)},tt=function(t){var e=this.__data__,n=Y(e,t);return n<0?void 0:e[n][1]},et=function(t){return Z(this.__data__,t)>-1},nt=function(t,e){var n=this.__data__,o=J(n,t);return o<0?(++this.size,n.push([t,e])):n[o][1]=e,this};function ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}ot.prototype.clear=K,ot.prototype.delete=Q,ot.prototype.get=tt,ot.prototype.has=et,ot.prototype.set=nt;var it=ot,rt=it;var st=function(){this.__data__=new rt,this.size=0};var at=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n};var lt=function(t){return this.__data__.get(t)};var ct=function(t){return this.__data__.has(t)},dt="object"==typeof F&&F&&F.Object===Object&&F,ht=dt,ut="object"==typeof self&&self&&self.Object===Object&&self,pt=ht||ut||Function("return this")(),mt=pt.Symbol,gt=mt,ft=Object.prototype,vt=ft.hasOwnProperty,bt=ft.toString,yt=gt?gt.toStringTag:void 0;var wt=function(t){var e=vt.call(t,yt),n=t[yt];try{t[yt]=void 0;var o=!0}catch(r){}var i=bt.call(t);return o&&(e?t[yt]=n:delete t[yt]),i},xt=Object.prototype.toString;var Ct=wt,Et=function(t){return xt.call(t)},St=mt?mt.toStringTag:void 0;var Ot=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":St&&St in Object(t)?Ct(t):Et(t)};var Nt=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)},Mt=Ot,_t=Nt;var jt,At=function(t){if(!_t(t))return!1;var e=Mt(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e},Dt=pt["__core-js_shared__"],kt=(jt=/[^.]+$/.exec(Dt&&Dt.keys&&Dt.keys.IE_PROTO||""))?"Symbol(src)_1."+jt:"";var Tt=function(t){return!!kt&&kt in t},zt=Function.prototype.toString;var Pt=function(t){if(null!=t){try{return zt.call(t)}catch(e){}try{return t+""}catch(e){}}return""},Lt=At,$t=Tt,Ht=Nt,Vt=Pt,It=/^\[object .+?Constructor\]$/,Ft=Function.prototype,Bt=Object.prototype,Rt=Ft.toString,Wt=Bt.hasOwnProperty,qt=RegExp("^"+Rt.call(Wt).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");var Ut=function(t){return!(!Ht(t)||$t(t))&&(Lt(t)?qt:It).test(Vt(t))},Gt=function(t,e){return null==t?void 0:t[e]};var Xt=function(t,e){var n=Gt(t,e);return Ut(n)?n:void 0},Yt=Xt(pt,"Map"),Zt=Xt(Object,"create"),Jt=Zt;var Kt=function(){this.__data__=Jt?Jt(null):{},this.size=0};var Qt=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},te=Zt,ee=Object.prototype.hasOwnProperty;var ne=function(t){var e=this.__data__;if(te){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return ee.call(e,t)?e[t]:void 0},oe=Zt,ie=Object.prototype.hasOwnProperty;var re=Zt;var se=Kt,ae=Qt,le=ne,ce=function(t){var e=this.__data__;return oe?void 0!==e[t]:ie.call(e,t)},de=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=re&&void 0===e?"__lodash_hash_undefined__":e,this};function he(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}he.prototype.clear=se,he.prototype.delete=ae,he.prototype.get=le,he.prototype.has=ce,he.prototype.set=de;var ue=he,pe=it,me=Yt;var ge=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t};var fe=function(t,e){var n=t.__data__;return ge(e)?n["string"==typeof e?"string":"hash"]:n.map},ve=fe;var be=fe;var ye=fe;var we=fe;var xe=function(){this.size=0,this.__data__={hash:new ue,map:new(me||pe),string:new ue}},Ce=function(t){var e=ve(this,t).delete(t);return this.size-=e?1:0,e},Ee=function(t){return be(this,t).get(t)},Se=function(t){return ye(this,t).has(t)},Oe=function(t,e){var n=we(this,t),o=n.size;return n.set(t,e),this.size+=n.size==o?0:1,this};function Ne(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var o=t[e];this.set(o[0],o[1])}}Ne.prototype.clear=xe,Ne.prototype.delete=Ce,Ne.prototype.get=Ee,Ne.prototype.has=Se,Ne.prototype.set=Oe;var Me=Ne,_e=it,je=Yt,Ae=Me;var De=it,ke=st,Te=at,ze=lt,Pe=ct,Le=function(t,e){var n=this.__data__;if(n instanceof _e){var o=n.__data__;if(!je||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new Ae(o)}return n.set(t,e),this.size=n.size,this};function $e(t){var e=this.__data__=new De(t);this.size=e.size}$e.prototype.clear=ke,$e.prototype.delete=Te,$e.prototype.get=ze,$e.prototype.has=Pe,$e.prototype.set=Le;var He=$e,Ve=Xt,Ie=function(){try{var t=Ve(Object,"defineProperty");return t({},"",{}),t}catch(e){}}(),Fe=Ie;var Be=function(t,e,n){"__proto__"==e&&Fe?Fe(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n},Re=Be,We=W;var qe=function(t,e,n){(void 0!==n&&!We(t[e],n)||void 0===n&&!(e in t))&&Re(t,e,n)};var Ue,Ge,Xe,Ye,Ze,Je,Ke,Qe=function(t){return function(e,n,o){for(var i=-1,r=Object(e),s=o(e),a=s.length;a--;){var l=s[t?a:++i];if(!1===n(r[l],l,r))break}return e}}(),tn={exports:{}};Ue=tn,Xe=pt,Ye=(Ge=tn.exports)&&!Ge.nodeType&&Ge,Ze=Ye&&Ue&&!Ue.nodeType&&Ue,Je=Ze&&Ze.exports===Ye?Xe.Buffer:void 0,Ke=Je?Je.allocUnsafe:void 0,Ue.exports=function(t,e){if(e)return t.slice();var n=t.length,o=Ke?Ke(n):new t.constructor(n);return t.copy(o),o};var en=tn.exports,nn=pt.Uint8Array,on=nn;var rn=function(t){var e=new t.constructor(t.byteLength);return new on(e).set(new on(t)),e};var sn=function(t,e){var n=e?rn(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)};var an=function(t,e){var n=-1,o=t.length;for(e||(e=Array(o));++n<o;)e[n]=t[n];return e},ln=Nt,cn=Object.create,dn=function(){function t(){}return function(e){if(!ln(e))return{};if(cn)return cn(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();var hn=function(t,e){return function(n){return t(e(n))}},un=hn(Object.getPrototypeOf,Object),pn=Object.prototype;var mn=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||pn)},gn=dn,fn=un,vn=mn;var bn=function(t){return"function"!=typeof t.constructor||vn(t)?{}:gn(fn(t))};var yn=function(t){return null!=t&&"object"==typeof t},wn=Ot,xn=yn;var Cn=function(t){return xn(t)&&"[object Arguments]"==wn(t)},En=yn,Sn=Object.prototype,On=Sn.hasOwnProperty,Nn=Sn.propertyIsEnumerable,Mn=Cn(function(){return arguments}())?Cn:function(t){return En(t)&&On.call(t,"callee")&&!Nn.call(t,"callee")},_n=Array.isArray;var jn=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991},An=At,Dn=jn;var kn=function(t){return null!=t&&Dn(t.length)&&!An(t)},Tn=kn,zn=yn;var Pn=function(t){return zn(t)&&Tn(t)},Ln={exports:{}};var $n=function(){return!1};!function(t,e){var n=pt,o=$n,i=e&&!e.nodeType&&e,r=i&&t&&!t.nodeType&&t,s=r&&r.exports===i?n.Buffer:void 0,a=(s?s.isBuffer:void 0)||o;t.exports=a}(Ln,Ln.exports);var Hn=Ln.exports,Vn=Ot,In=un,Fn=yn,Bn=Function.prototype,Rn=Object.prototype,Wn=Bn.toString,qn=Rn.hasOwnProperty,Un=Wn.call(Object);var Gn=function(t){if(!Fn(t)||"[object Object]"!=Vn(t))return!1;var e=In(t);if(null===e)return!0;var n=qn.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Wn.call(n)==Un},Xn=Ot,Yn=jn,Zn=yn,Jn={};Jn["[object Float32Array]"]=Jn["[object Float64Array]"]=Jn["[object Int8Array]"]=Jn["[object Int16Array]"]=Jn["[object Int32Array]"]=Jn["[object Uint8Array]"]=Jn["[object Uint8ClampedArray]"]=Jn["[object Uint16Array]"]=Jn["[object Uint32Array]"]=!0,Jn["[object Arguments]"]=Jn["[object Array]"]=Jn["[object ArrayBuffer]"]=Jn["[object Boolean]"]=Jn["[object DataView]"]=Jn["[object Date]"]=Jn["[object Error]"]=Jn["[object Function]"]=Jn["[object Map]"]=Jn["[object Number]"]=Jn["[object Object]"]=Jn["[object RegExp]"]=Jn["[object Set]"]=Jn["[object String]"]=Jn["[object WeakMap]"]=!1;var Kn=function(t){return Zn(t)&&Yn(t.length)&&!!Jn[Xn(t)]};var Qn=function(t){return function(e){return t(e)}},to={exports:{}};!function(t,e){var n=dt,o=e&&!e.nodeType&&e,i=o&&t&&!t.nodeType&&t,r=i&&i.exports===o&&n.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||r&&r.binding&&r.binding("util")}catch(e){}}();t.exports=s}(to,to.exports);var eo=to.exports,no=Kn,oo=Qn,io=eo&&eo.isTypedArray,ro=io?oo(io):no;var so=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]},ao=Be,lo=W,co=Object.prototype.hasOwnProperty;var ho=function(t,e,n){var o=t[e];co.call(t,e)&&lo(o,n)&&(void 0!==n||e in t)||ao(t,e,n)},uo=Be;var po=function(t,e,n,o){var i=!n;n||(n={});for(var r=-1,s=e.length;++r<s;){var a=e[r],l=o?o(n[a],t[a],a,n,t):void 0;void 0===l&&(l=t[a]),i?uo(n,a,l):ho(n,a,l)}return n};var mo=/^(?:0|[1-9]\d*)$/;var go=function(t,e){var n=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==n||"symbol"!=n&&mo.test(t))&&t>-1&&t%1==0&&t<e},fo=function(t,e){for(var n=-1,o=Array(t);++n<t;)o[n]=e(n);return o},vo=Mn,bo=_n,yo=Hn,wo=go,xo=ro,Co=Object.prototype.hasOwnProperty;var Eo=function(t,e){var n=bo(t),o=!n&&vo(t),i=!n&&!o&&yo(t),r=!n&&!o&&!i&&xo(t),s=n||o||i||r,a=s?fo(t.length,String):[],l=a.length;for(var c in t)!e&&!Co.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||r&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||wo(c,l))||a.push(c);return a};var So=Nt,Oo=mn,No=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e},Mo=Object.prototype.hasOwnProperty;var _o=Eo,jo=function(t){if(!So(t))return No(t);var e=Oo(t),n=[];for(var o in t)("constructor"!=o||!e&&Mo.call(t,o))&&n.push(o);return n},Ao=kn;var Do=function(t){return Ao(t)?_o(t,!0):jo(t)},ko=po,To=Do;var zo=qe,Po=en,Lo=sn,$o=an,Ho=bn,Vo=Mn,Io=_n,Fo=Pn,Bo=Hn,Ro=At,Wo=Nt,qo=Gn,Uo=ro,Go=so,Xo=function(t){return ko(t,To(t))};var Yo=He,Zo=qe,Jo=Qe,Ko=function(t,e,n,o,i,r,s){var a=Go(t,n),l=Go(e,n),c=s.get(l);if(c)zo(t,n,c);else{var d=r?r(a,l,n+"",t,e,s):void 0,h=void 0===d;if(h){var u=Io(l),p=!u&&Bo(l),m=!u&&!p&&Uo(l);d=l,u||p||m?Io(a)?d=a:Fo(a)?d=$o(a):p?(h=!1,d=Po(l,!0)):m?(h=!1,d=Lo(l,!0)):d=[]:qo(l)||Vo(l)?(d=a,Vo(a)?d=Xo(a):Wo(a)&&!Ro(a)||(d=Ho(l))):h=!1}h&&(s.set(l,d),i(d,l,o,r,s),s.delete(l)),zo(t,n,d)}},Qo=Nt,ti=Do,ei=so;var ni=function t(e,n,o,i,r){e!==n&&Jo(n,(function(s,a){if(r||(r=new Yo),Qo(s))Ko(e,n,a,o,t,i,r);else{var l=i?i(ei(e,a),s,a+"",e,n,r):void 0;void 0===l&&(l=s),Zo(e,a,l)}}),ti)};var oi=function(t){return t};var ii=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)},ri=Math.max;var si=function(t,e,n){return e=ri(void 0===e?t.length-1:e,0),function(){for(var o=arguments,i=-1,r=ri(o.length-e,0),s=Array(r);++i<r;)s[i]=o[e+i];i=-1;for(var a=Array(e+1);++i<e;)a[i]=o[i];return a[e]=n(s),ii(t,this,a)}};var ai=function(t){return function(){return t}},li=Ie,ci=li?function(t,e){return li(t,"toString",{configurable:!0,enumerable:!1,value:ai(e),writable:!0})}:oi,di=Date.now;var hi=function(t){var e=0,n=0;return function(){var o=di(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}(ci),ui=oi,pi=si,mi=hi;var gi=W,fi=kn,vi=go,bi=Nt;var yi=function(t,e){return mi(pi(t,e,ui),t+"")},wi=function(t,e,n){if(!bi(n))return!1;var o=typeof e;return!!("number"==o?fi(n)&&vi(e,n.length):"string"==o&&e in n)&&gi(n[e],t)};var xi=ni;const Ci=B(function(t){return yi((function(e,n){var o=-1,i=n.length,r=i>1?n[i-1]:void 0,s=i>2?n[2]:void 0;for(r=t.length>3&&"function"==typeof r?(i--,r):void 0,s&&wi(n[0],n[1],s)&&(r=i<3?void 0:r,i=1),e=Object(e);++o<i;){var a=n[o];a&&t(e,a,o,r)}return e}))}((function(t,e,n,o){xi(t,e,n,o)}))),Ei=()=>crypto.randomUUID(),Si=(t="",e)=>{if(!e)return!1;const n=/[|\\{}()[\]^*$+?.]/g;let o="string"==typeof e?[e]:e;o=o.map((t=>"*"===t?"":t.replace(n,"\\$&")));let i=!0;return o.length&&(i=!new RegExp(o.join("|"),"i").exec(t)),i},Oi=t=>{var e;const n=null==(e=t.className)?void 0:e.match(x);return n&&y[n[0]]},Ni=t=>Array.from(new Set(t)),Mi=t=>{let e;if(t){const{attrs:n={}}=t;e=n.id||t.id||Ei(),t.id=e}else e=Ei();return e},_i=(t,e,n=Object.create(null))=>Ci({},t,e,((t,e)=>{if(Array.isArray(t))return Array.isArray(e)?Ni(n.mergeArray?t.concat(e):e):e})),ji=t=>{let e;if(null===t||!("object"==typeof t)||t instanceof Promise)return t;if(t instanceof Date)return e=new Date,e.setTime(t.getTime()),e;if(t instanceof Array){e=[];for(let n=0,o=t.length;n<o;n++)e[n]=ji(t[n]);return e}if(t instanceof Object){e={};for(const n in t)t.hasOwnProperty(n)&&(e[n]=ji(t[n]));return e}throw new Error("Unable to copy Object, type not supported.")},Ai=(t,e)=>t/e*100,Di=t=>t.toString()+"%",ki=Object.create(null,{get:{value:t=>{const e=window.sessionStorage&&window.sessionStorage.getItem(t);try{return JSON.parse(e)}catch(n){}}},set:{value:(t,e)=>{try{return window.sessionStorage&&window.sessionStorage.setItem(t,JSON.stringify(e))}catch(n){}}}}),Ti=t=>f.some((e=>new RegExp(`^${e}.`).test(t))),zi=t=>t.startsWith("external");function Pi(t,e){let n=!1;return function(){if(!n){t(...arguments),n=!0;const o=setTimeout((()=>{n=!1,clearTimeout(o)}),e)}}}function Li(t){return t}function $i(){}function Hi(t,e){let n=e;return Array.isArray(e)||(n=e.replace(/\[(\d)\]/g,".$1").split(".")),n.reduce(((e,o)=>{const i=e[o];if(n.shift(),Array.isArray(i)){const[e]=n,r=Number(e);return n.shift(),e?isNaN(r)?Hi(i.map((t=>t[e])).flat(),n):Hi(t[o][r],n):i}return i||n.splice(0),Hi(i,n)}),t)}const Vi=t=>{const e={...t},n={string:()=>"",boolean:()=>!1,object:t=>Vi(t)};return Object.keys(t).forEach((o=>{const i=typeof t[o];n[i]&&(e[o]=n[i](t[o]))})),e},Ii="a an and as at but by for for from in into near nor of on onto or the to with".split(" ").map((t=>`\\s${t}\\s`)),Fi=new RegExp(`(?!${Ii.join("|")})\\w\\S*`,"g"),Bi=/\s+/g;function Ri(t){if("string"!=typeof t)return t;if(t.trim().match(Bi))return t;return t.replace(Fi,(t=>t.charAt(0).toUpperCase()+t.substring(1).replace(/[A-Z]/g,(t=>` ${t}`))))}const Wi=(t,e="-")=>t.toString().normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().trim().replace(/[^a-z0-9 -]/g,"").replace(/\s+/g,e),qi=t=>Number.isInteger(Number(t)),Ui=(t,e)=>{const n=e||t.parentElement;return Array.prototype.slice.call(n.childNodes).indexOf(t)},Gi=(t,e,n)=>{const o=n.split("||"),i=Ni(e).map((e=>t.find((t=>{const n=o.find((e=>!!Hi(t,e)));return n&&Hi(t,n)===e})))).filter(Boolean).concat(t);return Ni(i)},Xi=(t,e,n)=>{for(let o=0;o<t.length;o++)e.call(n,t[o],o)},Yi=(t,e)=>{const n=[];return Xi(t,((t,o)=>n.push(e(t,o)))),n},Zi=t=>t.replace(/\b\w/g,(t=>t.toUpperCase())),Ji=()=>-1!==window.navigator.userAgent.indexOf("MSIE "),Ki={capitalize:Zi,safeAttrName:t=>({className:"class"}[t]||Wi(t)),forEach:Xi,copyObj:t=>window.JSON.parse(window.JSON.stringify(t)),map:Yi,subtract:(t,e)=>e.filter((e=>!~t.indexOf(e))),indexOfNode:Ui,isInt:qi,get:Hi,orderObjectsBy:Gi,isIE:Ji};class Qi{constructor(t,n=Object.create(null)){e(this,"toJSON",((t,e)=>JSON.stringify(t,null,e))),e(this,"get",(t=>Hi(this.data,t))),e(this,"getChangeType",((t,e)=>{const n=M.find((({condition:n})=>n(t,e)))||{type:"unknown"};return n.desc="added"===n.type?`${t} to ${e}`:e,n})),e(this,"add",((t,e=Object.create(null))=>{const{id:n}=e,o=t||n||Mi();return this.set(o,e)})),e(this,"remove",(t=>{const e=t.split("."),n=e.pop(),o=this.get(e);return Array.isArray(o)?o.splice(Number(n),1):delete o[n],o})),e(this,"getData",(()=>Object.entries(this.data).reduce(((t,[e,n])=>(t[e]=(null==n?void 0:n.data)?n.getData():n,t)),{}))),e(this,"setCallbacks",{}),e(this,"configVal",Object.create(null)),this.name=t,this.data=n,this.dataPath=""}get size(){return Object.keys(this.data).length}get js(){return this.data}get json(){return this.data}set(t,e){const n=Hi(this.data,t),o=function(t,e,n){let o=e;Array.isArray(e)||(o=e.replace(/\[(\d)\]/g,".$1").split(".")),o.reduce(((t,e,i)=>(i===o.length-1?t[e]=n:t[e]&&"object"==typeof t[e]||(t[e]=isNaN(Number(o[i+1]))?{}:[]),t[e])),t)}(this.data,t,e),i=Array.isArray(t)?t.join("."):t,r=Object.keys(this.setCallbacks).filter((t=>new RegExp(t).test(i))),s={newVal:e,oldVal:n,path:t};if(r.forEach((t=>this.setCallbacks[t].forEach((t=>t(s))))),!this.disableEvents){const i=this.getChangeType(n,e),r={entity:this,dataPath:this.dataPath.replace(/\.+$/,""),changePath:this.dataPath+t,value:e,data:o,change:`${i.type}: ${i.desc}`,src:this.dom};n&&(r.previousValue=n),yl.formeoUpdated(r)}return o}addSetCallback(t,e){this.setCallbacks[t]?this.setCallbacks[t].push(e):this.setCallbacks[t]=[e]}removeSetCallback(t,e){this.setCallbacks[t]=this.setCallbacks[t].filter((t=>t!==e))}empty(){this.data=Object.create(null)}}
|
|
9
|
-
/**!
|
|
10
|
-
* Sortable 1.15.3
|
|
11
|
-
* @author RubaXa <trash@rubaxa.org>
|
|
12
|
-
* @author owenm <owen23355@gmail.com>
|
|
13
|
-
* @license MIT
|
|
14
|
-
*/function tr(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function er(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?tr(Object(n),!0).forEach((function(e){or(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):tr(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}function nr(t){return(nr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function or(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ir(){return ir=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(t[o]=n[o])}return t},ir.apply(this,arguments)}function rr(t,e){if(null==t)return{};var n,o,i=function(t,e){if(null==t)return{};var n,o,i={},r=Object.keys(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||(i[n]=t[n]);return i}(t,e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);for(o=0;o<r.length;o++)n=r[o],e.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(t,n)&&(i[n]=t[n])}return i}function sr(t){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(t)}var ar=sr(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),lr=sr(/Edge/i),cr=sr(/firefox/i),dr=sr(/safari/i)&&!sr(/chrome/i)&&!sr(/android/i),hr=sr(/iP(ad|od|hone)/i),ur=sr(/chrome/i)&&sr(/android/i),pr={capture:!1,passive:!1};function mr(t,e,n){t.addEventListener(e,n,!ar&&pr)}function gr(t,e,n){t.removeEventListener(e,n,!ar&&pr)}function fr(t,e){if(e){if(">"===e[0]&&(e=e.substring(1)),t)try{if(t.matches)return t.matches(e);if(t.msMatchesSelector)return t.msMatchesSelector(e);if(t.webkitMatchesSelector)return t.webkitMatchesSelector(e)}catch(n){return!1}return!1}}function vr(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function br(t,e,n,o){if(t){n=n||document;do{if(null!=e&&(">"===e[0]?t.parentNode===n&&fr(t,e):fr(t,e))||o&&t===n)return t;if(t===n)break}while(t=vr(t))}return null}var yr,wr=/\s+/g;function xr(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var o=(" "+t.className+" ").replace(wr," ").replace(" "+e+" "," ");t.className=(o+(n?" "+e:"")).replace(wr," ")}}function Cr(t,e,n){var o=t&&t.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),void 0===e?n:n[e];e in o||-1!==e.indexOf("webkit")||(e="-webkit-"+e),o[e]=n+("string"==typeof n?"":"px")}}function Er(t,e){var n="";if("string"==typeof t)n=t;else do{var o=Cr(t,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!e&&(t=t.parentNode));var i=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return i&&new i(n)}function Sr(t,e,n){if(t){var o=t.getElementsByTagName(e),i=0,r=o.length;if(n)for(;i<r;i++)n(o[i],i);return o}return[]}function Or(){var t=document.scrollingElement;return t||document.documentElement}function Nr(t,e,n,o,i){if(t.getBoundingClientRect||t===window){var r,s,a,l,c,d,h;if(t!==window&&t.parentNode&&t!==Or()?(s=(r=t.getBoundingClientRect()).top,a=r.left,l=r.bottom,c=r.right,d=r.height,h=r.width):(s=0,a=0,l=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(e||n)&&t!==window&&(i=i||t.parentNode,!ar))do{if(i&&i.getBoundingClientRect&&("none"!==Cr(i,"transform")||n&&"static"!==Cr(i,"position"))){var u=i.getBoundingClientRect();s-=u.top+parseInt(Cr(i,"border-top-width")),a-=u.left+parseInt(Cr(i,"border-left-width")),l=s+r.height,c=a+r.width;break}}while(i=i.parentNode);if(o&&t!==window){var p=Er(i||t),m=p&&p.a,g=p&&p.d;p&&(l=(s/=g)+(d/=g),c=(a/=m)+(h/=m))}return{top:s,left:a,bottom:l,right:c,width:h,height:d}}}function Mr(t,e,n){for(var o=kr(t,!0),i=Nr(t)[e];o;){if(!(i>=Nr(o)[n]))return o;if(o===Or())break;o=kr(o,!1)}return!1}function _r(t,e,n,o){for(var i=0,r=0,s=t.children;r<s.length;){if("none"!==s[r].style.display&&s[r]!==Ls.ghost&&(o||s[r]!==Ls.dragged)&&br(s[r],n.draggable,t,!1)){if(i===e)return s[r];i++}r++}return null}function jr(t,e){for(var n=t.lastElementChild;n&&(n===Ls.ghost||"none"===Cr(n,"display")||e&&!fr(n,e));)n=n.previousElementSibling;return n||null}function Ar(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)"TEMPLATE"===t.nodeName.toUpperCase()||t===Ls.clone||e&&!fr(t,e)||n++;return n}function Dr(t){var e=0,n=0,o=Or();if(t)do{var i=Er(t),r=i.a,s=i.d;e+=t.scrollLeft*r,n+=t.scrollTop*s}while(t!==o&&(t=t.parentNode));return[e,n]}function kr(t,e){if(!t||!t.getBoundingClientRect)return Or();var n=t,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var i=Cr(n);if(n.clientWidth<n.scrollWidth&&("auto"==i.overflowX||"scroll"==i.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==i.overflowY||"scroll"==i.overflowY)){if(!n.getBoundingClientRect||n===document.body)return Or();if(o||e)return n;o=!0}}}while(n=n.parentNode);return Or()}function Tr(t,e){return Math.round(t.top)===Math.round(e.top)&&Math.round(t.left)===Math.round(e.left)&&Math.round(t.height)===Math.round(e.height)&&Math.round(t.width)===Math.round(e.width)}function zr(t,e){return function(){if(!yr){var n=arguments;1===n.length?t.call(this,n[0]):t.apply(this,n),yr=setTimeout((function(){yr=void 0}),e)}}}function Pr(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function Lr(t){var e=window.Polymer,n=window.jQuery||window.Zepto;return e&&e.dom?e.dom(t).cloneNode(!0):n?n(t).clone(!0)[0]:t.cloneNode(!0)}function $r(t,e,n){var o={};return Array.from(t.children).forEach((function(i){var r,s,a,l;if(br(i,e.draggable,t,!1)&&!i.animated&&i!==n){var c=Nr(i);o.left=Math.min(null!==(r=o.left)&&void 0!==r?r:1/0,c.left),o.top=Math.min(null!==(s=o.top)&&void 0!==s?s:1/0,c.top),o.right=Math.max(null!==(a=o.right)&&void 0!==a?a:-1/0,c.right),o.bottom=Math.max(null!==(l=o.bottom)&&void 0!==l?l:-1/0,c.bottom)}})),o.width=o.right-o.left,o.height=o.bottom-o.top,o.x=o.left,o.y=o.top,o}var Hr="Sortable"+(new Date).getTime();function Vr(){var t,e=[];return{captureAnimationState:function(){(e=[],this.options.animation)&&[].slice.call(this.el.children).forEach((function(t){if("none"!==Cr(t,"display")&&t!==Ls.ghost){e.push({target:t,rect:Nr(t)});var n=er({},e[e.length-1].rect);if(t.thisAnimationDuration){var o=Er(t,!0);o&&(n.top-=o.f,n.left-=o.e)}t.fromRect=n}}))},addAnimationState:function(t){e.push(t)},removeAnimationState:function(t){e.splice(function(t,e){for(var n in t)if(t.hasOwnProperty(n))for(var o in e)if(e.hasOwnProperty(o)&&e[o]===t[n][o])return Number(n);return-1}(e,{target:t}),1)},animateAll:function(n){var o=this;if(!this.options.animation)return clearTimeout(t),void("function"==typeof n&&n());var i=!1,r=0;e.forEach((function(t){var e=0,n=t.target,s=n.fromRect,a=Nr(n),l=n.prevFromRect,c=n.prevToRect,d=t.rect,h=Er(n,!0);h&&(a.top-=h.f,a.left-=h.e),n.toRect=a,n.thisAnimationDuration&&Tr(l,a)&&!Tr(s,a)&&(d.top-a.top)/(d.left-a.left)==(s.top-a.top)/(s.left-a.left)&&(e=function(t,e,n,o){return Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))/Math.sqrt(Math.pow(e.top-n.top,2)+Math.pow(e.left-n.left,2))*o.animation}(d,l,c,o.options)),Tr(a,s)||(n.prevFromRect=s,n.prevToRect=a,e||(e=o.options.animation),o.animate(n,d,a,e)),e&&(i=!0,r=Math.max(r,e),clearTimeout(n.animationResetTimer),n.animationResetTimer=setTimeout((function(){n.animationTime=0,n.prevFromRect=null,n.fromRect=null,n.prevToRect=null,n.thisAnimationDuration=null}),e),n.thisAnimationDuration=e)})),clearTimeout(t),i?t=setTimeout((function(){"function"==typeof n&&n()}),r):"function"==typeof n&&n(),e=[]},animate:function(t,e,n,o){if(o){Cr(t,"transition",""),Cr(t,"transform","");var i=Er(this.el),r=i&&i.a,s=i&&i.d,a=(e.left-n.left)/(r||1),l=(e.top-n.top)/(s||1);t.animatingX=!!a,t.animatingY=!!l,Cr(t,"transform","translate3d("+a+"px,"+l+"px,0)"),this.forRepaintDummy=function(t){return t.offsetWidth}(t),Cr(t,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),Cr(t,"transform","translate3d(0,0,0)"),"number"==typeof t.animated&&clearTimeout(t.animated),t.animated=setTimeout((function(){Cr(t,"transition",""),Cr(t,"transform",""),t.animated=!1,t.animatingX=!1,t.animatingY=!1}),o)}}}}var Ir=[],Fr={initializeByDefault:!0},Br={mount:function(t){for(var e in Fr)Fr.hasOwnProperty(e)&&!(e in t)&&(t[e]=Fr[e]);Ir.forEach((function(e){if(e.pluginName===t.pluginName)throw"Sortable: Cannot mount plugin ".concat(t.pluginName," more than once")})),Ir.push(t)},pluginEvent:function(t,e,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=t+"Global";Ir.forEach((function(o){e[o.pluginName]&&(e[o.pluginName][i]&&e[o.pluginName][i](er({sortable:e},n)),e.options[o.pluginName]&&e[o.pluginName][t]&&e[o.pluginName][t](er({sortable:e},n)))}))},initializePlugins:function(t,e,n,o){for(var i in Ir.forEach((function(o){var i=o.pluginName;if(t.options[i]||o.initializeByDefault){var r=new o(t,e,t.options);r.sortable=t,r.options=t.options,t[i]=r,ir(n,r.defaults)}})),t.options)if(t.options.hasOwnProperty(i)){var r=this.modifyOption(t,i,t.options[i]);void 0!==r&&(t.options[i]=r)}},getEventProperties:function(t,e){var n={};return Ir.forEach((function(o){"function"==typeof o.eventProperties&&ir(n,o.eventProperties.call(e[o.pluginName],t))})),n},modifyOption:function(t,e,n){var o;return Ir.forEach((function(i){t[i.pluginName]&&i.optionListeners&&"function"==typeof i.optionListeners[e]&&(o=i.optionListeners[e].call(t[i.pluginName],n))})),o}};var Rr=["evt"],Wr=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=rr(n,Rr);Br.pluginEvent.bind(Ls)(t,e,er({dragEl:Ur,parentEl:Gr,ghostEl:Xr,rootEl:Yr,nextEl:Zr,lastDownEl:Jr,cloneEl:Kr,cloneHidden:Qr,dragStarted:us,putSortable:rs,activeSortable:Ls.active,originalEvent:o,oldIndex:ts,oldDraggableIndex:ns,newIndex:es,newDraggableIndex:os,hideGhostForTarget:ks,unhideGhostForTarget:Ts,cloneNowHidden:function(){Qr=!0},cloneNowShown:function(){Qr=!1},dispatchSortableEvent:function(t){qr({sortable:e,name:t,originalEvent:o})}},i))};function qr(t){!function(t){var e=t.sortable,n=t.rootEl,o=t.name,i=t.targetEl,r=t.cloneEl,s=t.toEl,a=t.fromEl,l=t.oldIndex,c=t.newIndex,d=t.oldDraggableIndex,h=t.newDraggableIndex,u=t.originalEvent,p=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[Hr]){var g,f=e.options,v="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||ar||lr?(g=document.createEvent("Event")).initEvent(o,!0,!0):g=new CustomEvent(o,{bubbles:!0,cancelable:!0}),g.to=s||n,g.from=a||n,g.item=i||n,g.clone=r,g.oldIndex=l,g.newIndex=c,g.oldDraggableIndex=d,g.newDraggableIndex=h,g.originalEvent=u,g.pullMode=p?p.lastPutMode:void 0;var b=er(er({},m),Br.getEventProperties(o,e));for(var y in b)g[y]=b[y];n&&n.dispatchEvent(g),f[v]&&f[v].call(e,g)}}(er({putSortable:rs,cloneEl:Kr,targetEl:Ur,rootEl:Yr,oldIndex:ts,oldDraggableIndex:ns,newIndex:es,newDraggableIndex:os},t))}var Ur,Gr,Xr,Yr,Zr,Jr,Kr,Qr,ts,es,ns,os,is,rs,ss,as,ls,cs,ds,hs,us,ps,ms,gs,fs,vs=!1,bs=!1,ys=[],ws=!1,xs=!1,Cs=[],Es=!1,Ss=[],Os="undefined"!=typeof document,Ns=hr,Ms=lr||ar?"cssFloat":"float",_s=Os&&!ur&&!hr&&"draggable"in document.createElement("div"),js=function(){if(Os){if(ar)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto","auto"===t.style.pointerEvents}}(),As=function(t,e){var n=Cr(t),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),i=_r(t,0,e),r=_r(t,1,e),s=i&&Cr(i),a=r&&Cr(r),l=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+Nr(i).width,c=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+Nr(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(i&&s.float&&"none"!==s.float){var d="left"===s.float?"left":"right";return!r||"both"!==a.clear&&a.clear!==d?"horizontal":"vertical"}return i&&("block"===s.display||"flex"===s.display||"table"===s.display||"grid"===s.display||l>=o&&"none"===n[Ms]||r&&"none"===n[Ms]&&l+c>o)?"vertical":"horizontal"},Ds=function(t){function e(t,n){return function(o,i,r,s){var a=o.options.group.name&&i.options.group.name&&o.options.group.name===i.options.group.name;if(null==t&&(n||a))return!0;if(null==t||!1===t)return!1;if(n&&"clone"===t)return t;if("function"==typeof t)return e(t(o,i,r,s),n)(o,i,r,s);var l=(n?o:i).options.group.name;return!0===t||"string"==typeof t&&t===l||t.join&&t.indexOf(l)>-1}}var n={},o=t.group;o&&"object"==nr(o)||(o={name:o}),n.name=o.name,n.checkPull=e(o.pull,!0),n.checkPut=e(o.put),n.revertClone=o.revertClone,t.group=n},ks=function(){!js&&Xr&&Cr(Xr,"display","none")},Ts=function(){!js&&Xr&&Cr(Xr,"display","")};Os&&!ur&&document.addEventListener("click",(function(t){if(bs)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),bs=!1,!1}),!0);var zs=function(t){if(Ur){t=t.touches?t.touches[0]:t;var e=(i=t.clientX,r=t.clientY,ys.some((function(t){var e=t[Hr].options.emptyInsertThreshold;if(e&&!jr(t)){var n=Nr(t),o=i>=n.left-e&&i<=n.right+e,a=r>=n.top-e&&r<=n.bottom+e;return o&&a?s=t:void 0}})),s);if(e){var n={};for(var o in t)t.hasOwnProperty(o)&&(n[o]=t[o]);n.target=n.rootEl=e,n.preventDefault=void 0,n.stopPropagation=void 0,e[Hr]._onDragOver(n)}}var i,r,s},Ps=function(t){Ur&&Ur.parentNode[Hr]._isOutsideThisEl(t.target)};function Ls(t,e){if(!t||!t.nodeType||1!==t.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=ir({},e),t[Hr]=this;var n={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(t.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return As(t,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(t,e){t.setData("Text",e.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ls.supportPointer&&"PointerEvent"in window&&!dr,emptyInsertThreshold:5};for(var o in Br.initializePlugins(this,t,n),n)!(o in e)&&(e[o]=n[o]);for(var i in Ds(e),this)"_"===i.charAt(0)&&"function"==typeof this[i]&&(this[i]=this[i].bind(this));this.nativeDraggable=!e.forceFallback&&_s,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?mr(t,"pointerdown",this._onTapStart):(mr(t,"mousedown",this._onTapStart),mr(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(mr(t,"dragover",this),mr(t,"dragenter",this)),ys.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),ir(this,Vr())}function $s(t,e,n,o,i,r,s,a){var l,c,d=t[Hr],h=d.options.onMove;return!window.CustomEvent||ar||lr?(l=document.createEvent("Event")).initEvent("move",!0,!0):l=new CustomEvent("move",{bubbles:!0,cancelable:!0}),l.to=e,l.from=t,l.dragged=n,l.draggedRect=o,l.related=i||e,l.relatedRect=r||Nr(e),l.willInsertAfter=a,l.originalEvent=s,t.dispatchEvent(l),h&&(c=h.call(d,l,s)),c}function Hs(t){t.draggable=!1}function Vs(){Es=!1}function Is(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,o=0;n--;)o+=e.charCodeAt(n);return o.toString(36)}function Fs(t){return setTimeout(t,0)}function Bs(t){return clearTimeout(t)}Ls.prototype={constructor:Ls,_isOutsideThisEl:function(t){this.el.contains(t)||t===this.el||(ps=null)},_getDirection:function(t,e){return"function"==typeof this.options.direction?this.options.direction.call(this,t,e,Ur):this.options.direction},_onTapStart:function(t){if(t.cancelable){var e=this,n=this.el,o=this.options,i=o.preventOnFilter,r=t.type,s=t.touches&&t.touches[0]||t.pointerType&&"touch"===t.pointerType&&t,a=(s||t).target,l=t.target.shadowRoot&&(t.path&&t.path[0]||t.composedPath&&t.composedPath()[0])||a,c=o.filter;if(function(t){Ss.length=0;var e=t.getElementsByTagName("input"),n=e.length;for(;n--;){var o=e[n];o.checked&&Ss.push(o)}}(n),!Ur&&!(/mousedown|pointerdown/.test(r)&&0!==t.button||o.disabled)&&!l.isContentEditable&&(this.nativeDraggable||!dr||!a||"SELECT"!==a.tagName.toUpperCase())&&!((a=br(a,o.draggable,n,!1))&&a.animated||Jr===a)){if(ts=Ar(a),ns=Ar(a,o.draggable),"function"==typeof c){if(c.call(this,t,a,this))return qr({sortable:e,rootEl:l,name:"filter",targetEl:a,toEl:n,fromEl:n}),Wr("filter",e,{evt:t}),void(i&&t.cancelable&&t.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=br(l,o.trim(),n,!1))return qr({sortable:e,rootEl:o,name:"filter",targetEl:a,fromEl:n,toEl:n}),Wr("filter",e,{evt:t}),!0}))))return void(i&&t.cancelable&&t.preventDefault());o.handle&&!br(l,o.handle,n,!1)||this._prepareDragStart(t,s,a)}}},_prepareDragStart:function(t,e,n){var o,i=this,r=i.el,s=i.options,a=r.ownerDocument;if(n&&!Ur&&n.parentNode===r){var l=Nr(n);if(Yr=r,Gr=(Ur=n).parentNode,Zr=Ur.nextSibling,Jr=n,is=s.group,Ls.dragged=Ur,ss={target:Ur,clientX:(e||t).clientX,clientY:(e||t).clientY},ds=ss.clientX-l.left,hs=ss.clientY-l.top,this._lastX=(e||t).clientX,this._lastY=(e||t).clientY,Ur.style["will-change"]="all",o=function(){Wr("delayEnded",i,{evt:t}),Ls.eventCanceled?i._onDrop():(i._disableDelayedDragEvents(),!cr&&i.nativeDraggable&&(Ur.draggable=!0),i._triggerDragStart(t,e),qr({sortable:i,name:"choose",originalEvent:t}),xr(Ur,s.chosenClass,!0))},s.ignore.split(",").forEach((function(t){Sr(Ur,t.trim(),Hs)})),mr(a,"dragover",zs),mr(a,"mousemove",zs),mr(a,"touchmove",zs),mr(a,"mouseup",i._onDrop),mr(a,"touchend",i._onDrop),mr(a,"touchcancel",i._onDrop),cr&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Ur.draggable=!0),Wr("delayStart",this,{evt:t}),!s.delay||s.delayOnTouchOnly&&!e||this.nativeDraggable&&(lr||ar))o();else{if(Ls.eventCanceled)return void this._onDrop();mr(a,"mouseup",i._disableDelayedDrag),mr(a,"touchend",i._disableDelayedDrag),mr(a,"touchcancel",i._disableDelayedDrag),mr(a,"mousemove",i._delayedDragTouchMoveHandler),mr(a,"touchmove",i._delayedDragTouchMoveHandler),s.supportPointer&&mr(a,"pointermove",i._delayedDragTouchMoveHandler),i._dragStartTimer=setTimeout(o,s.delay)}}},_delayedDragTouchMoveHandler:function(t){var e=t.touches?t.touches[0]:t;Math.max(Math.abs(e.clientX-this._lastX),Math.abs(e.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){Ur&&Hs(Ur),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var t=this.el.ownerDocument;gr(t,"mouseup",this._disableDelayedDrag),gr(t,"touchend",this._disableDelayedDrag),gr(t,"touchcancel",this._disableDelayedDrag),gr(t,"mousemove",this._delayedDragTouchMoveHandler),gr(t,"touchmove",this._delayedDragTouchMoveHandler),gr(t,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(t,e){e=e||"touch"==t.pointerType&&t,!this.nativeDraggable||e?this.options.supportPointer?mr(document,"pointermove",this._onTouchMove):mr(document,e?"touchmove":"mousemove",this._onTouchMove):(mr(Ur,"dragend",this),mr(Yr,"dragstart",this._onDragStart));try{document.selection?Fs((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(n){}},_dragStarted:function(t,e){if(vs=!1,Yr&&Ur){Wr("dragStarted",this,{evt:e}),this.nativeDraggable&&mr(document,"dragover",Ps);var n=this.options;!t&&xr(Ur,n.dragClass,!1),xr(Ur,n.ghostClass,!0),Ls.active=this,t&&this._appendGhost(),qr({sortable:this,name:"start",originalEvent:e})}else this._nulling()},_emulateDragOver:function(){if(as){this._lastX=as.clientX,this._lastY=as.clientY,ks();for(var t=document.elementFromPoint(as.clientX,as.clientY),e=t;t&&t.shadowRoot&&(t=t.shadowRoot.elementFromPoint(as.clientX,as.clientY))!==e;)e=t;if(Ur.parentNode[Hr]._isOutsideThisEl(t),e)do{if(e[Hr]){if(e[Hr]._onDragOver({clientX:as.clientX,clientY:as.clientY,target:t,rootEl:e})&&!this.options.dragoverBubble)break}t=e}while(e=vr(e));Ts()}},_onTouchMove:function(t){if(ss){var e=this.options,n=e.fallbackTolerance,o=e.fallbackOffset,i=t.touches?t.touches[0]:t,r=Xr&&Er(Xr,!0),s=Xr&&r&&r.a,a=Xr&&r&&r.d,l=Ns&&fs&&Dr(fs),c=(i.clientX-ss.clientX+o.x)/(s||1)+(l?l[0]-Cs[0]:0)/(s||1),d=(i.clientY-ss.clientY+o.y)/(a||1)+(l?l[1]-Cs[1]:0)/(a||1);if(!Ls.active&&!vs){if(n&&Math.max(Math.abs(i.clientX-this._lastX),Math.abs(i.clientY-this._lastY))<n)return;this._onDragStart(t,!0)}if(Xr){r?(r.e+=c-(ls||0),r.f+=d-(cs||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var h="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");Cr(Xr,"webkitTransform",h),Cr(Xr,"mozTransform",h),Cr(Xr,"msTransform",h),Cr(Xr,"transform",h),ls=c,cs=d,as=i}t.cancelable&&t.preventDefault()}},_appendGhost:function(){if(!Xr){var t=this.options.fallbackOnBody?document.body:Yr,e=Nr(Ur,!0,Ns,!0,t),n=this.options;if(Ns){for(fs=t;"static"===Cr(fs,"position")&&"none"===Cr(fs,"transform")&&fs!==document;)fs=fs.parentNode;fs!==document.body&&fs!==document.documentElement?(fs===document&&(fs=Or()),e.top+=fs.scrollTop,e.left+=fs.scrollLeft):fs=Or(),Cs=Dr(fs)}xr(Xr=Ur.cloneNode(!0),n.ghostClass,!1),xr(Xr,n.fallbackClass,!0),xr(Xr,n.dragClass,!0),Cr(Xr,"transition",""),Cr(Xr,"transform",""),Cr(Xr,"box-sizing","border-box"),Cr(Xr,"margin",0),Cr(Xr,"top",e.top),Cr(Xr,"left",e.left),Cr(Xr,"width",e.width),Cr(Xr,"height",e.height),Cr(Xr,"opacity","0.8"),Cr(Xr,"position",Ns?"absolute":"fixed"),Cr(Xr,"zIndex","100000"),Cr(Xr,"pointerEvents","none"),Ls.ghost=Xr,t.appendChild(Xr),Cr(Xr,"transform-origin",ds/parseInt(Xr.style.width)*100+"% "+hs/parseInt(Xr.style.height)*100+"%")}},_onDragStart:function(t,e){var n=this,o=t.dataTransfer,i=n.options;Wr("dragStart",this,{evt:t}),Ls.eventCanceled?this._onDrop():(Wr("setupClone",this),Ls.eventCanceled||((Kr=Lr(Ur)).removeAttribute("id"),Kr.draggable=!1,Kr.style["will-change"]="",this._hideClone(),xr(Kr,this.options.chosenClass,!1),Ls.clone=Kr),n.cloneId=Fs((function(){Wr("clone",n),Ls.eventCanceled||(n.options.removeCloneOnHide||Yr.insertBefore(Kr,Ur),n._hideClone(),qr({sortable:n,name:"clone"}))})),!e&&xr(Ur,i.dragClass,!0),e?(bs=!0,n._loopId=setInterval(n._emulateDragOver,50)):(gr(document,"mouseup",n._onDrop),gr(document,"touchend",n._onDrop),gr(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",i.setData&&i.setData.call(n,o,Ur)),mr(document,"drop",n),Cr(Ur,"transform","translateZ(0)")),vs=!0,n._dragStartId=Fs(n._dragStarted.bind(n,e,t)),mr(document,"selectstart",n),us=!0,dr&&Cr(document.body,"user-select","none"))},_onDragOver:function(t){var e,n,o,i,r=this.el,s=t.target,a=this.options,l=a.group,c=Ls.active,d=is===l,h=a.sort,u=rs||c,p=this,m=!1;if(!Es){if(void 0!==t.preventDefault&&t.cancelable&&t.preventDefault(),s=br(s,a.draggable,r,!0),j("dragOver"),Ls.eventCanceled)return m;if(Ur.contains(t.target)||s.animated&&s.animatingX&&s.animatingY||p._ignoreWhileAnimating===s)return D(!1);if(bs=!1,c&&!a.disabled&&(d?h||(o=Gr!==Yr):rs===this||(this.lastPutMode=is.checkPull(this,c,Ur,t))&&l.checkPut(this,c,Ur,t))){if(i="vertical"===this._getDirection(t,s),e=Nr(Ur),j("dragOverValid"),Ls.eventCanceled)return m;if(o)return Gr=Yr,A(),this._hideClone(),j("revert"),Ls.eventCanceled||(Zr?Yr.insertBefore(Ur,Zr):Yr.appendChild(Ur)),D(!0);var g=jr(r,a.draggable);if(!g||function(t,e,n){var o=Nr(jr(n.el,n.options.draggable)),i=$r(n.el,n.options,Xr),r=10;return e?t.clientX>i.right+r||t.clientY>o.bottom&&t.clientX>o.left:t.clientY>i.bottom+r||t.clientX>o.right&&t.clientY>o.top}(t,i,this)&&!g.animated){if(g===Ur)return D(!1);if(g&&r===t.target&&(s=g),s&&(n=Nr(s)),!1!==$s(Yr,r,Ur,e,s,n,t,!!s))return A(),g&&g.nextSibling?r.insertBefore(Ur,g.nextSibling):r.appendChild(Ur),Gr=r,k(),D(!0)}else if(g&&function(t,e,n){var o=Nr(_r(n.el,0,n.options,!0)),i=$r(n.el,n.options,Xr),r=10;return e?t.clientX<i.left-r||t.clientY<o.top&&t.clientX<o.right:t.clientY<i.top-r||t.clientY<o.bottom&&t.clientX<o.left}(t,i,this)){var f=_r(r,0,a,!0);if(f===Ur)return D(!1);if(n=Nr(s=f),!1!==$s(Yr,r,Ur,e,s,n,t,!1))return A(),r.insertBefore(Ur,f),Gr=r,k(),D(!0)}else if(s.parentNode===r){n=Nr(s);var v,b,y,w=Ur.parentNode!==r,x=!function(t,e,n){var o=n?t.left:t.top,i=n?t.right:t.bottom,r=n?t.width:t.height,s=n?e.left:e.top,a=n?e.right:e.bottom,l=n?e.width:e.height;return o===s||i===a||o+r/2===s+l/2}(Ur.animated&&Ur.toRect||e,s.animated&&s.toRect||n,i),C=i?"top":"left",E=Mr(s,"top","top")||Mr(Ur,"top","top"),S=E?E.scrollTop:void 0;if(ps!==s&&(b=n[C],ws=!1,xs=!x&&a.invertSwap||w),v=function(t,e,n,o,i,r,s,a){var l=o?t.clientY:t.clientX,c=o?n.height:n.width,d=o?n.top:n.left,h=o?n.bottom:n.right,u=!1;if(!s)if(a&&gs<c*i){if(!ws&&(1===ms?l>d+c*r/2:l<h-c*r/2)&&(ws=!0),ws)u=!0;else if(1===ms?l<d+gs:l>h-gs)return-ms}else if(l>d+c*(1-i)/2&&l<h-c*(1-i)/2)return function(t){return Ar(Ur)<Ar(t)?1:-1}(e);if((u=u||s)&&(l<d+c*r/2||l>h-c*r/2))return l>d+c/2?1:-1;return 0}(t,s,n,i,x?1:a.swapThreshold,null==a.invertedSwapThreshold?a.swapThreshold:a.invertedSwapThreshold,xs,ps===s),0!==v){var O=Ar(Ur);do{O-=v,y=Gr.children[O]}while(y&&("none"===Cr(y,"display")||y===Xr))}if(0===v||y===s)return D(!1);ps=s,ms=v;var N=s.nextElementSibling,M=!1,_=$s(Yr,r,Ur,e,s,n,t,M=1===v);if(!1!==_)return 1!==_&&-1!==_||(M=1===_),Es=!0,setTimeout(Vs,30),A(),M&&!N?r.appendChild(Ur):s.parentNode.insertBefore(Ur,M?N:s),E&&Pr(E,0,S-E.scrollTop),Gr=Ur.parentNode,void 0===b||xs||(gs=Math.abs(b-Nr(s)[C])),k(),D(!0)}if(r.contains(Ur))return D(!1)}return!1}function j(a,l){Wr(a,p,er({evt:t,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:e,targetRect:n,canSort:h,fromSortable:u,target:s,completed:D,onMove:function(n,o){return $s(Yr,r,Ur,e,n,Nr(n),t,o)},changed:k},l))}function A(){j("dragOverAnimationCapture"),p.captureAnimationState(),p!==u&&u.captureAnimationState()}function D(e){return j("dragOverCompleted",{insertion:e}),e&&(d?c._hideClone():c._showClone(p),p!==u&&(xr(Ur,rs?rs.options.ghostClass:c.options.ghostClass,!1),xr(Ur,a.ghostClass,!0)),rs!==p&&p!==Ls.active?rs=p:p===Ls.active&&rs&&(rs=null),u===p&&(p._ignoreWhileAnimating=s),p.animateAll((function(){j("dragOverAnimationComplete"),p._ignoreWhileAnimating=null})),p!==u&&(u.animateAll(),u._ignoreWhileAnimating=null)),(s===Ur&&!Ur.animated||s===r&&!s.animated)&&(ps=null),a.dragoverBubble||t.rootEl||s===document||(Ur.parentNode[Hr]._isOutsideThisEl(t.target),!e&&zs(t)),!a.dragoverBubble&&t.stopPropagation&&t.stopPropagation(),m=!0}function k(){es=Ar(Ur),os=Ar(Ur,a.draggable),qr({sortable:p,name:"change",toEl:r,newIndex:es,newDraggableIndex:os,originalEvent:t})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){gr(document,"mousemove",this._onTouchMove),gr(document,"touchmove",this._onTouchMove),gr(document,"pointermove",this._onTouchMove),gr(document,"dragover",zs),gr(document,"mousemove",zs),gr(document,"touchmove",zs)},_offUpEvents:function(){var t=this.el.ownerDocument;gr(t,"mouseup",this._onDrop),gr(t,"touchend",this._onDrop),gr(t,"pointerup",this._onDrop),gr(t,"touchcancel",this._onDrop),gr(document,"selectstart",this)},_onDrop:function(t){var e=this.el,n=this.options;es=Ar(Ur),os=Ar(Ur,n.draggable),Wr("drop",this,{evt:t}),Gr=Ur&&Ur.parentNode,es=Ar(Ur),os=Ar(Ur,n.draggable),Ls.eventCanceled||(vs=!1,xs=!1,ws=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Bs(this.cloneId),Bs(this._dragStartId),this.nativeDraggable&&(gr(document,"drop",this),gr(e,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),dr&&Cr(document.body,"user-select",""),Cr(Ur,"transform",""),t&&(us&&(t.cancelable&&t.preventDefault(),!n.dropBubble&&t.stopPropagation()),Xr&&Xr.parentNode&&Xr.parentNode.removeChild(Xr),(Yr===Gr||rs&&"clone"!==rs.lastPutMode)&&Kr&&Kr.parentNode&&Kr.parentNode.removeChild(Kr),Ur&&(this.nativeDraggable&&gr(Ur,"dragend",this),Hs(Ur),Ur.style["will-change"]="",us&&!vs&&xr(Ur,rs?rs.options.ghostClass:this.options.ghostClass,!1),xr(Ur,this.options.chosenClass,!1),qr({sortable:this,name:"unchoose",toEl:Gr,newIndex:null,newDraggableIndex:null,originalEvent:t}),Yr!==Gr?(es>=0&&(qr({rootEl:Gr,name:"add",toEl:Gr,fromEl:Yr,originalEvent:t}),qr({sortable:this,name:"remove",toEl:Gr,originalEvent:t}),qr({rootEl:Gr,name:"sort",toEl:Gr,fromEl:Yr,originalEvent:t}),qr({sortable:this,name:"sort",toEl:Gr,originalEvent:t})),rs&&rs.save()):es!==ts&&es>=0&&(qr({sortable:this,name:"update",toEl:Gr,originalEvent:t}),qr({sortable:this,name:"sort",toEl:Gr,originalEvent:t})),Ls.active&&(null!=es&&-1!==es||(es=ts,os=ns),qr({sortable:this,name:"end",toEl:Gr,originalEvent:t}),this.save())))),this._nulling()},_nulling:function(){Wr("nulling",this),Yr=Ur=Gr=Xr=Zr=Kr=Jr=Qr=ss=as=us=es=os=ts=ns=ps=ms=rs=is=Ls.dragged=Ls.ghost=Ls.clone=Ls.active=null,Ss.forEach((function(t){t.checked=!0})),Ss.length=ls=cs=0},handleEvent:function(t){switch(t.type){case"drop":case"dragend":this._onDrop(t);break;case"dragenter":case"dragover":Ur&&(this._onDragOver(t),function(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move");t.cancelable&&t.preventDefault()}(t));break;case"selectstart":t.preventDefault()}},toArray:function(){for(var t,e=[],n=this.el.children,o=0,i=n.length,r=this.options;o<i;o++)br(t=n[o],r.draggable,this.el,!1)&&e.push(t.getAttribute(r.dataIdAttr)||Is(t));return e},sort:function(t,e){var n={},o=this.el;this.toArray().forEach((function(t,e){var i=o.children[e];br(i,this.options.draggable,o,!1)&&(n[t]=i)}),this),e&&this.captureAnimationState(),t.forEach((function(t){n[t]&&(o.removeChild(n[t]),o.appendChild(n[t]))})),e&&this.animateAll()},save:function(){var t=this.options.store;t&&t.set&&t.set(this)},closest:function(t,e){return br(t,e||this.options.draggable,this.el,!1)},option:function(t,e){var n=this.options;if(void 0===e)return n[t];var o=Br.modifyOption(this,t,e);n[t]=void 0!==o?o:e,"group"===t&&Ds(n)},destroy:function(){Wr("destroy",this);var t=this.el;t[Hr]=null,gr(t,"mousedown",this._onTapStart),gr(t,"touchstart",this._onTapStart),gr(t,"pointerdown",this._onTapStart),this.nativeDraggable&&(gr(t,"dragover",this),gr(t,"dragenter",this)),Array.prototype.forEach.call(t.querySelectorAll("[draggable]"),(function(t){t.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),ys.splice(ys.indexOf(this.el),1),this.el=t=null},_hideClone:function(){if(!Qr){if(Wr("hideClone",this),Ls.eventCanceled)return;Cr(Kr,"display","none"),this.options.removeCloneOnHide&&Kr.parentNode&&Kr.parentNode.removeChild(Kr),Qr=!0}},_showClone:function(t){if("clone"===t.lastPutMode){if(Qr){if(Wr("showClone",this),Ls.eventCanceled)return;Ur.parentNode!=Yr||this.options.group.revertClone?Zr?Yr.insertBefore(Kr,Zr):Yr.appendChild(Kr):Yr.insertBefore(Kr,Ur),this.options.group.revertClone&&this.animate(Ur,Kr),Cr(Kr,"display",""),Qr=!1}}else this._hideClone()}},Os&&mr(document,"touchmove",(function(t){(Ls.active||vs)&&t.cancelable&&t.preventDefault()})),Ls.utils={on:mr,off:gr,css:Cr,find:Sr,is:function(t,e){return!!br(t,e,t,!1)},extend:function(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t},throttle:zr,closest:br,toggleClass:xr,clone:Lr,index:Ar,nextTick:Fs,cancelNextTick:Bs,detectDirection:As,getChild:_r,expando:Hr},Ls.get=function(t){return t[Hr]},Ls.mount=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];e[0].constructor===Array&&(e=e[0]),e.forEach((function(t){if(!t.prototype||!t.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(t));t.utils&&(Ls.utils=er(er({},Ls.utils),t.utils)),Br.mount(t)}))},Ls.create=function(t,e){return new Ls(t,e)},Ls.version="1.15.3";var Rs,Ws,qs,Us,Gs,Xs,Ys=[],Zs=!1;function Js(){Ys.forEach((function(t){clearInterval(t.pid)})),Ys=[]}function Ks(){clearInterval(Xs)}var Qs=zr((function(t,e,n,o){if(e.scroll){var i,r=(t.touches?t.touches[0]:t).clientX,s=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,c=Or(),d=!1;Ws!==n&&(Ws=n,Js(),Rs=e.scroll,i=e.scrollFn,!0===Rs&&(Rs=kr(n,!0)));var h=0,u=Rs;do{var p=u,m=Nr(p),g=m.top,f=m.bottom,v=m.left,b=m.right,y=m.width,w=m.height,x=void 0,C=void 0,E=p.scrollWidth,S=p.scrollHeight,O=Cr(p),N=p.scrollLeft,M=p.scrollTop;p===c?(x=y<E&&("auto"===O.overflowX||"scroll"===O.overflowX||"visible"===O.overflowX),C=w<S&&("auto"===O.overflowY||"scroll"===O.overflowY||"visible"===O.overflowY)):(x=y<E&&("auto"===O.overflowX||"scroll"===O.overflowX),C=w<S&&("auto"===O.overflowY||"scroll"===O.overflowY));var _=x&&(Math.abs(b-r)<=a&&N+y<E)-(Math.abs(v-r)<=a&&!!N),j=C&&(Math.abs(f-s)<=a&&M+w<S)-(Math.abs(g-s)<=a&&!!M);if(!Ys[h])for(var A=0;A<=h;A++)Ys[A]||(Ys[A]={});Ys[h].vx==_&&Ys[h].vy==j&&Ys[h].el===p||(Ys[h].el=p,Ys[h].vx=_,Ys[h].vy=j,clearInterval(Ys[h].pid),0==_&&0==j||(d=!0,Ys[h].pid=setInterval(function(){o&&0===this.layer&&Ls.active._onTouchMove(Gs);var e=Ys[this.layer].vy?Ys[this.layer].vy*l:0,n=Ys[this.layer].vx?Ys[this.layer].vx*l:0;"function"==typeof i&&"continue"!==i.call(Ls.dragged.parentNode[Hr],n,e,t,Gs,Ys[this.layer].el)||Pr(Ys[this.layer].el,n,e)}.bind({layer:h}),24))),h++}while(e.bubbleScroll&&u!==c&&(u=kr(u,!1)));Zs=d}}),30),ta=function(t){var e=t.originalEvent,n=t.putSortable,o=t.dragEl,i=t.activeSortable,r=t.dispatchSortableEvent,s=t.hideGhostForTarget,a=t.unhideGhostForTarget;if(e){var l=n||i;s();var c=e.changedTouches&&e.changedTouches.length?e.changedTouches[0]:e,d=document.elementFromPoint(c.clientX,c.clientY);a(),l&&!l.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function ea(){}function na(){}ea.prototype={startIndex:null,dragStart:function(t){var e=t.oldDraggableIndex;this.startIndex=e},onSpill:function(t){var e=t.dragEl,n=t.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=_r(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(e,o):this.sortable.el.appendChild(e),this.sortable.animateAll(),n&&n.animateAll()},drop:ta},ir(ea,{pluginName:"revertOnSpill"}),na.prototype={onSpill:function(t){var e=t.dragEl,n=t.putSortable||this.sortable;n.captureAnimationState(),e.parentNode&&e.parentNode.removeChild(e),n.animateAll()},drop:ta},ir(na,{pluginName:"removeOnSpill"}),Ls.mount(new function(){function t(){for(var t in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this))}return t.prototype={dragStarted:function(t){var e=t.originalEvent;this.sortable.nativeDraggable?mr(document,"dragover",this._handleAutoScroll):this.options.supportPointer?mr(document,"pointermove",this._handleFallbackAutoScroll):e.touches?mr(document,"touchmove",this._handleFallbackAutoScroll):mr(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var e=t.originalEvent;this.options.dragOverBubble||e.rootEl||this._handleAutoScroll(e)},drop:function(){this.sortable.nativeDraggable?gr(document,"dragover",this._handleAutoScroll):(gr(document,"pointermove",this._handleFallbackAutoScroll),gr(document,"touchmove",this._handleFallbackAutoScroll),gr(document,"mousemove",this._handleFallbackAutoScroll)),Ks(),Js(),clearTimeout(yr),yr=void 0},nulling:function(){Gs=Ws=Rs=Zs=Xs=qs=Us=null,Ys.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,e){var n=this,o=(t.touches?t.touches[0]:t).clientX,i=(t.touches?t.touches[0]:t).clientY,r=document.elementFromPoint(o,i);if(Gs=t,e||this.options.forceAutoScrollFallback||lr||ar||dr){Qs(t,this.options,r,e);var s=kr(r,!0);!Zs||Xs&&o===qs&&i===Us||(Xs&&Ks(),Xs=setInterval((function(){var r=kr(document.elementFromPoint(o,i),!0);r!==s&&(s=r,Js()),Qs(t,n.options,r,e)}),10),qs=o,Us=i)}else{if(!this.options.bubbleScroll||kr(r,!0)===Or())return void Js();Qs(t,this.options,kr(r,!1),!1)}}},ir(t,{pluginName:"scroll",initializeByDefault:!0})}),Ls.mount(na,ea);const oa={add:{attr:t=>{const e=window.prompt(t.message.attr);if(e&&t.isDisabled(e))return window.alert(a.get("attributeNotPermitted",e||"")),ia.add.attrs(t);let n;e&&(n=String(window.prompt(t.message.value,"")),t.addAction(e,n))},option:t=>{t.addAction()},condition:t=>{t.addAction(t)}},click:{btn:t=>{t.action()}},save:{form:Li}},ia={init:function(t){const e=Object.keys(oa);return this.opts=e.reduce(((e,n)=>(e[n]={...oa[n],...t[n]},e)),t),this},add:{attrs:t=>ia.opts.add.attr(t),options:t=>ia.opts.add.option(t),conditions:t=>(t.template={if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],then:[{target:"",targetProperty:"",assignment:"",value:""}]},ia.opts.add.condition(t))},click:{btn:t=>ia.opts.click.btn(t)},save:{form:t=>(ia.opts.sessionStorage&&ki.set(_,t),yl.formeoSaved({formData:t}),ia.opts.save.form(t))}},ra=Object.freeze({type:"field",displayType:"slider"}),sa=t=>({transform:`translateX(${t?`${t}px`:0})`});class aa{constructor(t){e(this,"toggleTabbedLayout",(()=>{this.getPanelDisplay();const t=this.isTabbed;return this.panelsWrap.parentElement.classList.toggle("tabbed-panels",t),t&&this.panelNav.removeAttribute("style"),t})),e(this,"resizePanels",(()=>{this.toggleTabbedLayout();const t=this.panelsWrap.style,e=Cl.getStyle(this.currentPanel,"height");return t.height=e,e})),this.opts=_i(ra,t),this.panelDisplay=this.opts.displayType,this.activePanelIndex=0,this.panelNav=this.createPanelNav();const n=this.createPanelsWrap();this.nav=this.navActions();const o=new window.ResizeObserver((([{contentRect:{width:t}}])=>{this.currentWidth!==t&&(this.toggleTabbedLayout(),this.currentWidth=t,this.nav.setTranslateX(this.activePanelIndex,!1))})),i=window.setTimeout((()=>{o.observe(n),window.clearTimeout(i)}),k)}getPanelDisplay(){const t=this.panelsWrap,e=parseInt(Cl.getStyle(t,"width"))>390?"tabbed":"slider",n="auto"===this.opts.displayType;return this.panelDisplay=n?e:this.opts.displayType||ra.displayType,this.panelDisplay}createPanelsWrap(){const t=Cl.create({className:"panels",content:this.opts.panels.map((({config:{label:t},...e})=>e))});return"field"===this.opts.type&&this.sortableProperties(t),this.panelsWrap=t,this.panels=t.children,this.currentPanel=this.panels[this.activePanelIndex],t}sortableProperties(t){const e=this,n=t.getElementsByClassName("field-edit-group");return Ki.forEach(n,((t,n)=>{t.fieldId=e.opts.id,t.isSortable&&Ls.create(t,{animation:150,group:{name:"edit-"+t.editGroup,pull:!0,put:["properties"]},sort:!0,handle:".prop-order",onSort:t=>{e.propertySave(t.to),e.resizePanels()}})}))}createPanelNavLabels(){const t=this.opts.panels.map((t=>({tag:"h5",action:{click:t=>{const e=Ui(t.target,t.target.parentElement);this.currentPanel=this.panels[e];const n=t.target.parentElement.childNodes;this.nav.refresh(e),Cl.removeClasses(n,"active-tab"),t.target.classList.add("active-tab")}},content:t.config.label}))),e={className:"panel-labels",content:{content:t}},[n]=t;return n.className="active-tab",Cl.create(e)}createPanelNav(){this.labels=this.createPanelNavLabels();const t={tag:"button",attrs:{className:"next-group",title:a.get("controlGroups.nextGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.nextGroup(t)},content:Cl.icon("triangle-right")},e={tag:"button",attrs:{className:"prev-group",title:a.get("controlGroups.prevGroup"),type:"button"},dataset:{toggle:"tooltip",placement:"top"},action:{click:t=>this.nav.prevGroup(t)},content:Cl.icon("triangle-left")};return Cl.create({tag:"nav",attrs:{className:"panel-nav"},content:[e,this.labels,t]})}get isTabbed(){return"tabbed"===this.panelDisplay}navActions(){const t={},e=this.currentPanel.parentElement,n=this.labels.firstChild,o=this.currentPanel.parentElement.childNodes;this.activePanelIndex=Ui(this.currentPanel,e);let i={nav:0,panel:0},r={...i};const s=t=>{const e=n.children;return Cl.removeClasses(o,"active-panel"),Cl.removeClasses(e,"active-tab"),this.currentPanel=o[t],this.currentPanel.classList.add("active-panel"),e[t].classList.add("active-tab"),this.currentPanel},a=({offset:t,reset:o,duration:i=D,animate:s=!this.isTabbed})=>{const a=[sa(r.panel),sa(t.panel)],l=[sa(r.nav),sa(this.isTabbed?0:t.nav)];if(o){const[t]=a,[e]=l;a.push(t),l.push(e)}const c={easing:"ease-in-out",duration:s?i:0,fill:"forwards"},d=e.animate(a,c);n.animate(l,c);const h=()=>{this.panelsWrap.style.height=Cl.getStyle(this.currentPanel,"height"),d.removeEventListener("finish",h),o||(r=t)};d.addEventListener("finish",h)};return t.setTranslateX=(t,o=!0)=>{var r;r=t||this.activePanelIndex,i={nav:-n.offsetWidth*r,panel:-e.offsetWidth*r},a({offset:i,animate:o})},t.refresh=e=>{void 0!==e&&(this.activePanelIndex=e,s(e)),this.resizePanels(),t.setTranslateX(this.activePanelIndex,!1)},t.nextGroup=()=>{const t=this.activePanelIndex+1;if(t!==o.length){const e=s(t);i={nav:-n.offsetWidth*t,panel:-e.offsetLeft},a({offset:i}),this.activePanelIndex++}else i={nav:r.nav-8,panel:r.panel-8},a({offset:i,reset:!0});return this.currentPanel},t.prevGroup=()=>{if(0!==this.activePanelIndex){const t=this.activePanelIndex-1,e=s(t);i={nav:-n.offsetWidth*t,panel:-e.offsetLeft},a({offset:i}),this.activePanelIndex--}else i={nav:8,panel:8},a({offset:i,reset:!0})},t}}const la={getStyle:(t,e=!1)=>{let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n},fadeOut:(t,e=250)=>{const n=1/(e/60);t.style.opacity=1,function e(){const o=Number(t.style.opacity)-n;o>0?(t.style.opacity=o,window.requestAnimationFrame(e)):t.remove()}()},slideDown:(t,e=250,n=!1)=>{t.style.display="block";const o=la.getStyle(t),i=parseInt(o.height,10),r=i/(e/60);t.style.height="0px",function e(){const o=parseFloat(t.style.height),s=o+r;o<i?(t.style.height=s+"px",window.requestAnimationFrame(e)):(t.style.height="auto",n&&n(t))}()},slideUp:(t,e=250,n=!1)=>{const o=la.getStyle(t),i=parseInt(o.height),r=o.overflow;t.style.overflow="hidden",t.style.height=i+"px";const s=o.minHeight;t.style.minHeight="auto";const a=parseFloat(i/(e/60)).toFixed(2);!function e(){const o=parseInt(t.style.height,10)-a;o>0?(t.style.height=o+"px",window.requestAnimationFrame(e)):(t.style.overflow=r,t.style.display="none",t.style.minHeight=s,delete t.style.height,n&&n(t))}()},slideToggle:(t,e=250,n="none"===la.getStyle(t,"display"))=>{n?la.slideDown(t,e):la.slideUp(t,e)}},ca="f-autocomplete",da="highlight-component";let ha,ua=Date.now();const pa=({name:t,id:e,...n})=>["config.label","attrs.id","meta.id"].reduce(((t,e)=>(t||(t=n.get(e)),t)),null)||"external"===t&&((...t)=>a.get(t.join("."))||Ri(t.join(" ")))(t,e);class ma{constructor(t,e,n){this.key=t,this.className=t.replace(/\./g,"-"),this.value=e,this.events=[],this.i18nKey=n,this.build()}build(){const t=t=>{const e=this.list,n=this.getActiveOption();let o=new Map([[38,()=>{const t=this.getPreviousOption(n);t&&this.selectOption(t)}],[40,()=>{const t=this.getNextOption(n);t&&this.selectOption(t)}],[13,()=>{n&&(this.selectOption(n),this.setValue(n),"none"===e.style.display?this.showList(n):this.hideList()),t.preventDefault()}],[27,()=>{this.hideList()}]]).get(t.keyCode);return o||(o=()=>!1),o()},e={focus:({target:e})=>{this.updateOptions(),e.parentElement.classList.add(`${this.className}-focused`);const n=Cl.toggleElementsByStr(this.list.querySelectorAll("li"),e.value);e.addEventListener("keydown",t);const o=this.list.querySelector(".active-option")||n[0];this.showList(o)},blur:({target:e})=>{e.parentElement.classList.remove(`${this.className}-focused`),e.removeEventListener("keydown",t),this.hideList()},input:t=>{const e=Cl.toggleElementsByStr(this.list.querySelectorAll("li"),t.target.value);if(0===t.target.value.length&&this.clearValue(),0===e.length)this.hideList();else{const t=this.getActiveOption()||e[0];this.showList(t)}this.hiddenField.value=t.target.value,this.value=t.target.value,this.runEvent("onChange",{target:this.hiddenField})}};return this.displayField=Cl.create({tag:"input",autocomplete:"off",action:e,attrs:{type:"text",className:`${ca}-display-field`,value:this.label||this.value,placeholder:a.get(`${this.i18nKey}.${this.key}.placeholder`)}}),this.hiddenField=Cl.create({tag:"input",attrs:{type:"hidden",className:this.className,value:this.value}}),this.list=Cl.create({tag:"ul",attrs:{className:`${ca}-list`}}),this.dom=Cl.create({children:[this.displayField,this.hiddenField,this.list],className:this.className,action:{onRender:()=>{const t=this.value&&gl.getAddress(this.value);this.label=t&&pa(t),this.label&&(this.displayField.value=this.label),this.updateOptions()}}}),this.dom}updateOptions(){const t=Date.now();t-ua>k&&(Cl.empty(this.list),this.generateOptions(),ua=t);(ha||this.generateOptions()).forEach((t=>this.list.appendChild(t)))}generateOptions(){const t=(t=>{const e=[],n=gl.flatList();return Object.entries(n).map((([n,o])=>{const i=pa(o);if(i){const r={tag:"span",content:` ${Ri(o.name)}`,className:"component-type"},s=`${o.name}.${i}`;e.push(s);const a=((t,e)=>t.reduce(((t,n)=>t+(n===e)),0))(e,s),l={tag:"span",content:a>1&&`(${a})`,className:"component-label-count"};return Cl.makeOption([n,[`${i} `,l,r]],t)}})).filter(Boolean)})(),e=t=>{const e=`${ca}-list-item`;return t.classList.contains(e)||(t=t.parentElement),t};return ha=t.map((t=>{const n=t.value;let[o]=t.label;o=o.trim();const i={tag:"li",children:t.label,dataset:{value:n,label:o},className:`${ca}-list-item`,action:{mousedown:({target:t})=>{t=e(t),this.setValue(t),this.selectOption(t),this.hideList()},mouseover:({target:t})=>{t=e(t),this.removeHighlight(),this.highlightComponent(t)}}};return Cl.create(i)})),ha}hideList(t=this.list){la.slideUp(t,D),this.removeHighlight()}showList(t,e=this.list){this.selectOption(t),la.slideDown(e,D)}getActiveOption(t=this.list){const e=t.getElementsByClassName("active-option")[0];return e&&"none"!==e.style.display?e:null}getPreviousOption(t){let e=t;do{e=e?e.previousSibling:null}while(null!=e&&"none"===e.style.display);return e}getNextOption(t){let e=t;do{e=e?e.nextSibling:null}while(null!=e&&"none"===e.style.display);return e}selectOption(t,e=this.list){const n=e.querySelectorAll("li");for(let o=0;o<n.length;o++){const{dataset:{value:t}}=n[o];if(n[o].classList.remove("active-option"),t){const e=gl.getAddress(t);e.dom&&e.dom.classList.remove(da)}}t&&(t.classList.add("active-option"),this.highlightComponent(t))}removeHighlight(){const t=document.getElementsByClassName(da);for(let e=0;e<t.length;e++)t[e].classList.remove(da)}highlightComponent(t){const{dataset:{value:e}}=t;if(e){const t=gl.getAddress(e);t.dom&&t.dom.classList.add(da)}}clearValue(){this.selectOption(null),this.displayField.value="",this.hiddenField.value="",this.value="",this.runEvent("onChange",{target:this.hiddenField})}setValue(t){const{label:e,value:n}=t.dataset;this.displayField.value=e,this.hiddenField.value=n,this.value=n,this.runEvent("onChange",{target:this.hiddenField})}addEvent(t,e){this.events.push([t,e])}runEvent(t,e){this.events.forEach((([n,o])=>{n===t&&o(e)}))}}const ga=(t,e)=>{const n=(t=>{const e=zi(t),n={"field.property":$,...H},o=e?(i=t,gl.getAddress(i).getData()):n[t];var i;return Object.keys(o).reduce(((t,e)=>(t[e]=e,t)),{})})(t);return Object.entries(n).reduce(((n,[o,i])=>{if("id"!==o){const r={tag:"option",content:a.get(`${t}.${o}`)||o.toLowerCase(),attrs:{value:i}};e===i&&(r.attrs.selected=!0),n.push(Cl.create(r))}return n}),[])},fa=(t,e)=>{Cl.empty(t),e.forEach((e=>t.add(e)))},va=({key:t,value:e,type:n="text",checked:o})=>{const i={tag:"input",attrs:{type:n,value:e,placeholder:a.get(`${t}.placeholder`)||Ri(t)},className:t.replace(/\./g,"-"),config:{}};return o&&(i.attrs.checked=!0),i},ba=t=>{const e=a.get(t);if(e)return e;const n=t.split(".");return a.get(n[n.length-1])},ya={autocomplete:(t,e,n)=>new ma(t,e,n),string:(t,e)=>va({key:t,value:e}),boolean:(t,e)=>va({key:t,value:e,type:"selected"===t?"radio":"checkbox",checked:e}),number:(t,e)=>va({key:t,value:e,type:"number"}),array:(t,e=[])=>({tag:"select",attrs:{placeholder:ba(`placeholder.${t}`)},className:t.replace(/\./g,"-"),options:e}),object:t=>Object.entries(t).map((([t,e])=>ya[Cl.childType(e)](t,e)))},wa=["selected","checked"],xa={boolean:(t,e)=>({click:({target:{checked:n}})=>{var o,i;"radio"===(null==(i=null==(o=e.data)?void 0:o.attrs)?void 0:i.type)&&e.set("options",e.data.options.map((t=>({...t,selected:!1})))),e.set(t,n),e.updatePreview()}}),string:(t,e)=>({input:({target:{value:n}})=>{e.set(t,n)}}),number:(t,e)=>({input:({target:{value:n}})=>{e.set(t,Number(n)),e.updatePreview()}}),array:(t,e)=>({change:({target:{value:n}})=>{e.set(t,n),e.updatePreview()}}),object:()=>({})};class Ca{constructor({key:t,data:n,index:o,field:i}){e(this,"generateConditionFields",((t,e)=>{const n={tag:"label",className:`condition-label ${t}-condition-label`,content:a.get(t)||t};return e.map(((e,o)=>{const i=[],r=Object.entries(e).map((([e,n])=>{const r=this.conditionInput(e,n,t,o);return r&&i.push([r.className,n.trim()].filter(Boolean).join("-")),r})).filter(Boolean),s=Gi(r,L.map((t=>`condition-${t}`)),"className||dom.className");return this.processConditionUIState(s),o||s.unshift(n),this.itemFieldGroups.push(s),{children:s,className:`f-condition-row ${t}-condition-row ${i.join(" ")}`}}))})),e(this,"processConditionUIState",(t=>{const e=e=>(e=e.split("|"),t.filter((t=>e.includes(t.className)))),n=t=>{t=Array.isArray(t)?t:[t];const e=setTimeout((()=>{t.forEach((t=>{t.dom&&(t=t.dom),t.style.display="none"})),clearTimeout(e)}),A)},o=t=>{t=Array.isArray(t)?t:[t];const e=setTimeout((()=>{t.forEach((t=>{t.dom&&(t=t.dom),t.removeAttribute("style")})),clearTimeout(e)}),A)},i=new Map([["condition-source",t=>{const i=e("condition-sourceProperty"),r=i[0],s=zi(t.value)?t.value:"field.property",a=ga(s,r.value);return fa(r,a),t.value?o(i):n(i)}],["condition-target",t=>{const i=e("condition-targetProperty");return Ti(t.value)&&t.value?o(i):n(i)}],["condition-sourceProperty",t=>{const i=e("condition-comparison|condition-targetProperty|condition-target"),r=t.value;return(t=>/^is|^has/.test(t))(r.substring(r.lastIndexOf(".")+1,r.length))?n(i):o(i)}]]);t.forEach((t=>{const e=i.get(t.className);e&&e(t)}))})),e(this,"conditionInput",((t,e,n,o)=>{const i=this.field,r=`${this.itemKey}.${n}.${o}`,s=`${this.field.id}.${r}`,a=`${i.name}s.${s}.${t}`,l=(t,e,n)=>{const o=ga(n||t,e),i=ya.array(`condition.${t}`);i.action={change:c,onRender:t=>c({target:t})};const r=Cl.create(i);return fa(r,o),r},c=({target:t})=>{const e=t.closest(".f-condition-row"),n=new RegExp(`${t.className}(?:\\S?)+`,"gm");e.className=e.className.replace(n,""),e.classList.add([t.className,t.value].filter(Boolean).join("-"));const o={dataPath:a,value:t.value,src:t};yl.formeoUpdated(o),gl.setAddress(a,t.value);const i=t.closest(".f-condition-row"),r=Ui(i);this.processConditionUIState(this.itemFieldGroups[r])},d={comparison:t=>l("comparison",t),logical:t=>l("logical",t),source:(t,e="source")=>{const o=ya.autocomplete(`condition.${e}`,t,n);return gl.setConditionMap(t,i),o.addEvent("onChange",(t=>{gl.removeConditionMap(gl.getAddress(a)),c(t),gl.setConditionMap(t.target.value,i)})),o},sourceProperty:t=>l("sourceProperty",t,"field.property"),targetProperty:t=>l("targetProperty",t,"field.property"),target:t=>d.source(t,"target"),value:t=>{const e=ya.string("condition.value",t);return e.action={input:c},Cl.create(e)},assignment:t=>l("assignment",t)};if(d[t])return d[t](e)})),this.itemValues=Gi(Object.entries(n),wa,"0");const[r,s]=t.split(".");this.field=i,this.itemKey=t,this.itemIndex=o,this.panelName=r,this.isDisabled=i.isDisabledProp(s,r),this.isHidden=this.isDisabled&&i.config.panels[r].hideDisabled,this.isLocked=i.isLockedProp(s,r),this.dom=Cl.create({tag:"li",className:[`field-${t.replace(/\./g,"-")}`,"prop-wrap",this.isHidden&&"hidden-property"],children:{className:"field-prop",children:[this.itemInputs,this.itemControls]}})}get itemInputs(){this.itemFieldGroups=[];return{className:`${this.panelName}-prop-inputs prop-inputs f-input-group`,children:this.itemValues.map((([t,e])=>{let n="conditions"===this.panelName?this.generateConditionFields(t,e):this.itemInput(t,e);return["selected","checked"].includes(t)&&(n={className:"f-addon",children:n}),n}))}}get itemControls(){if(this.isLocked){return{className:`${this.panelName}-prop-controls prop-controls`,content:[]}}const t={tag:"button",attrs:{type:"button",className:"prop-remove prop-control"},action:{click:()=>{la.slideUp(this.dom,250,(t=>{this.field.remove(this.itemKey),Cl.remove(t),this.field.resizePanelWrap()}))}},content:Cl.icon("remove")};return{className:`${this.panelName}-prop-controls prop-controls`,content:[t]}}itemInput(t,e){const n=Cl.childType(e)||"string",o=Object.assign({},{config:{},attrs:{}},ya[n](t,e)),i=this.itemKey.replace(/.\d+$/,(e=>`${e}.${t}`)),r=i.split(".").filter(isNaN).join("."),[s,a]=[[...this.itemKey.split("."),t],[t]].map((t=>[this.field.id,...t].filter(Boolean).join("-")));return o.config=Object.assign({},o.config,{label:"options"!==this.panelName&&ba(r),labelAfter:!1}),o.attrs=Object.assign({},o.attrs,{name:"checkbox"===o.attrs.type?`${a}[]`:a,id:s,disabled:this.isDisabled,locked:this.isLocked}),o.action={...xa[n](i,this.field)},o}}class Ea{constructor(t,n,o){e(this,"addAttribute",((t,e)=>{const n=Wi(t),o=`attrs.${n}`;a.current[o]||a.put(o,Zi(t)),"string"==typeof e&&["true","false"].includes(e)&&(e=JSON.parse(e)),this.field.set(`attrs.${t}`,e);const i=this.props.querySelector(`.field-attrs-${n}`),r=new Ca({key:o,data:{[n]:e},field:this.field});i?this.props.replaceChild(r.dom,i):this.props.appendChild(r.dom),this.field.resizePanelWrap()})),e(this,"addOption",(()=>{const t=this.field.data.meta.id,e=this.field.get("options"),n="select"===t?"option":t,o=a.get("newOptionLabel",{type:n})||"New Option",i=`options.${this.data.length}`,r={...e.length?Vi(e[e.length-1]):{},label:o,value:Wi(o)},s=new Ca({key:i,data:r,field:this.field,index:this.props.children.length});this.editPanelItems.push(s),this.props.appendChild(s.dom),this.field.set(i,r),this.field.resizePanelWrap()})),e(this,"addCondition",(t=>{const e=`conditions.${this.field.get("conditions").length}`,n=this.props.querySelector(`.field-${e.replace(".","-")}`),o=new Ca({key:e,data:t.template,field:this.field});n?this.props.replaceChild(o.dom,n):this.props.appendChild(o.dom),this.field.set(e,t.template),this.field.resizePanelWrap()})),this.type=Cl.childType(t),this.data="object"===this.type?Object.entries(t):t,this.name=n,this.field=o,this.panelConfig=this.getPanelConfig(this.data)}getPanelConfig(t){return this.props=this.createProps(t),this.editButtons=this.createEditButtons(),{id:`${this.field.id}-${this.name}-panel`,config:{label:a.get(`panel.label.${this.name}`)},attrs:{className:`f-panel ${this.name}-panel`},children:[this.props,this.editButtons]}}createProps(t){this.editPanelItems=Array.from(t).map(((t,e)=>{const n="array"===this.type,o=[this.name,n?String(e):t[0]].join("."),i=n?t:{[t[0]]:t[1]};return new Ca({key:o,data:i,field:this.field})}));const e={tag:"ul",attrs:{className:["field-edit-group",`field-edit-${this.name}`]},editGroup:this.name,isSortable:"options"===this.name,content:this.editPanelItems};return Cl.create(e)}createEditButtons(){const t=this,e=this.name,n=a.get(`panelEditButtons.${e}`),o={attrs:t.addAttribute,options:t.addOption,conditions:t.addCondition};return{className:"panel-action-buttons",content:[{...Cl.btnTemplate({content:n,title:n}),className:`add-${e}`,action:{click:n=>{const i={btnCoords:Cl.coords(n.target),addAction:o[e]};"attrs"===e&&(i.isDisabled=t.field.isDisabledProp,i.isLocked=t.field.isLockedProp,i.message={attr:a.get(`action.add.${e}.attr`),value:a.get(`action.add.${e}.value`)});const r=Ri(e),s=new window.CustomEvent(`onAdd${r}`,{detail:i});ia.add[e](i),document.dispatchEvent(s)}}}]}}}class Sa extends Qi{constructor(t,n={},o){super(t,{...n,id:n.id||Mi()}),e(this,"mutationHandler",(t=>t.map((t=>{})))),e(this,"remove",(t=>{if(t){const e=t.split("."),n=e.pop(),o=this.get(e);return Array.isArray(o)?qi(n)?o.splice(Number(n),1):this.set(e,o.filter((t=>t!==n))):delete o[n],o}if("stage"===this.name)return null;const e=this.parent,n=this.children;return Xi(n,(t=>t.remove())),this.dom.parentElement.removeChild(this.dom),((t,e)=>{const n=t.indexOf(e);-1!==n&&t.splice(n,1)})(gl.getAddress(`${e.name}s.${e.id}.children`),this.id),e.children.length||e.emptyClass(),"row"===e.name&&e.autoColumnWidths(),gl[`${this.name}s`].delete(this.id)})),e(this,"emptyClass",(()=>this.dom.classList.toggle("empty",!this.children.length))),e(this,"removeClasses",(t=>{const e={string:()=>this.dom.classList.remove(t),array:()=>t.map((t=>this.dom.classList.remove(t)))};return e.object=e.string,e[Cl.childType(t)](this.dom)})),e(this,"loadChildren",((t=this.data.children)=>t.map((t=>this.addChild({id:t}))))),e(this,"saveChildOrder",(()=>{if(this.render)return;const t=this.children.map((({id:t})=>t));return this.set("children",t),t})),e(this,"onSort",(()=>this.saveChildOrder())),e(this,"onEnd",(({to:{parentElement:t},from:{parentElement:e}})=>{null==t||t.classList.remove(`hovering-${Oi(t)}`),null==e||e.classList.remove(`hovering-${Oi(e)}`)})),e(this,"runConditions",(()=>{const t=this.get("conditions");if(!(null==t?void 0:t.length))return null;return t.map((t=>{const e=this.processConditions(t.if),n=this.processResults(t.then);return e.map((t=>this.evaluateConditions(t)&&this.execResults(n)))}))})),e(this,"value",((t,e)=>{const n=t.split("."),o=this.getComponent(t),i=o&&n.slice(2,n.length).join(".");return[!o,!i,!$[i]].some(Boolean)?t:e?o.set($[i],e):o.get($[i])})),e(this,"getResult",(t=>({"=":(t,e,n)=>t.set(e,n)}[t]))),e(this,"processResults",(t=>t.map((({operator:t,target:e,value:n})=>{const o=this.getComponent(e);return{target:o,propertyPath:o&&e.split(".").slice(2,e.length).join("."),action:this.getResult(t),value:this.value(n)}})))),e(this,"execResults",(t=>{const e=t.map((t=>this.execResult(t)));return Promise.all(e)})),e(this,"execResult",(({target:t,action:e,value:n,propertyPath:o})=>new Promise(((o,i)=>{try{return o(e(t,n))}catch(r){return i(r)}})))),e(this,"cloneData",(()=>{const t={...ji(this.data),id:Mi()};return"field"!==this.name&&(t.children=[]),t})),e(this,"clone",((t=this.parent)=>{const e=t.addChild(this.cloneData(),this.index+1);return"field"!==this.name&&this.cloneChildren(e),"column"===this.name&&t.autoColumnWidths(),e})),e(this,"cloneChildren",(t=>{this.children.forEach((e=>e&&e.clone(t)))})),e(this,"createChildWrap",(t=>Cl.create({tag:"ul",attrs:{className:"children"},children:t}))),this.id=this.data.id,this.name=t,this.config=gl[`${this.name}s`].config,_i(this.config,n.config),this.dataPath=`${this.name}s.${this.id}.`,this.observer=new MutationObserver(this.mutationHandler),this.render=o}observe(t){this.observer.disconnect(),this.observer.observe(t,{childList:!0})}get js(){return this.data}get json(){return this.data}empty(){const t=this.children.map((t=>t.remove()));return this.data.children=this.data.children.filter((e=>-1===t.indexOf(e))),this.dom.classList.add("empty"),t}getActionButtons(){let t="97px";const e=`hovering-${this.name}`;return{className:`${this.name}-actions group-actions`,action:{onRender:e=>t=24*e.getElementsByTagName("button").length+1+"px",mouseenter:({target:n})=>{this.dom.classList.add(e),n.style["row"===this.name?"height":"width"]=t},mouseleave:({target:t})=>{this.dom.classList.remove(e),t.removeAttribute("style")}},children:{className:"action-btn-wrap",children:this.buttons}}}toggleEdit(t=!this.isEditing){this.isEditing=t;const e=this.dom,n=`editing-${this.name}`,o=this.dom.querySelector(`.${this.name}-edit`);la.slideToggle(o,A,t),"field"===this.name&&(la.slideToggle(this.preview,A,!t),e.parentElement.classList.toggle(`column-${n}`,t)),e.classList.toggle(n,t)}get buttons(){const t=this,e=t=>t.map((t=>Cl.icon(t))),n={handle:(t=["move","handle"])=>({...Cl.btnTemplate({content:e(t)}),className:["item-handle"],meta:{id:"handle"}}),edit:(n=["edit"])=>({...Cl.btnTemplate({content:e(n)}),className:["item-edit-toggle"],meta:{id:"edit"},action:{click:e=>{t.toggleEdit()}}}),remove:(n=["remove"])=>({...Cl.btnTemplate({content:e(n)}),className:["item-remove"],meta:{id:"remove"},action:{click:(e,n)=>{la.slideUp(t.dom,A,(()=>{if("column"===t.name){t.parent.autoColumnWidths(),t.remove()}else t.remove()}))}}}),clone:(t=["copy"])=>({...Cl.btnTemplate({content:e(t)}),className:["item-clone"],meta:{id:"clone"},action:{click:()=>this.clone()}})};return this.config.actionButtons.buttons.map((t=>{const[e,...o]=t.split("|"),i=o.length?o:void 0;return n[e]&&n[e](i)||t}))}get index(){return Ui(this.dom)}get parentType(){return O.get(this.name)}get parent(){const t=this.parentType;if(!this.dom||!t)return null;const e=this.dom.closest(`.${b[t]}`);return e&&Cl.asComponent(e)}get children(){if(!this.dom)return[];const t=this.domChildren,e=S.get(this.name);return Yi(t,(t=>gl.getAddress(`${e}s.${t.id}`))).filter(Boolean)}get domChildren(){const t=this.dom.querySelector(".children");return t?t.children:[]}addChild(t={},e=this.domChildren.length){"object"!=typeof t&&(t={id:t});const n=this.dom.querySelector(".children"),{id:o=Mi()}=t,i=S.get(this.name);if(!i)return null;const r=`${i}s`,s=gl.getAddress(`${r}.${o}`)||gl[r].add(o,t);n.insertBefore(s.dom,n.children[e]);const a=s.get("children");return a&&a.length&&s.loadChildren(a),this.removeClasses("empty"),this.saveChildOrder(),s}onAdd({from:t,to:e,item:n,newIndex:o}){var i;const r=this;t.classList.contains(d)||(t=t.parentElement);const s=Oi(t),a=Oi(e.parentElement),l=new Map([[-2,()=>{const t=r.addChild({},o).addChild();return t.addChild.bind(t)}],[-1,()=>{const t=r.addChild({},o);return t.addChild.bind(t)}],[0,()=>r.addChild.bind(r)],[1,t=>{const e=Ui(r.dom);return()=>r.parent.addChild(t,e+1)}],[2,t=>()=>r.parent.parent.addChild(t)]]),c={controls:()=>{const{controlData:t}=Fa.get(n.id),{meta:{id:e}}=t,i=e.startsWith("layout-")?e.replace(/^layout-/,""):"field",s=Hi({stage:{row:0,column:-1,field:-2},row:{row:1,column:0,field:-1},column:{row:2,column:1,field:0},field:1},`${r.name}.${i}`),a=l.get(s)();Cl.remove(n);return a(t,o)},row:()=>{const t=(l.get({stage:-1,row:0,column:1}[a])||Li)();return null==t?void 0:t({id:n.id},o)},column:()=>{const t=(l.get({stage:-2,row:-1}[a])||Li)();return null==t?void 0:t(n.id)}},h=null==(i=c[s])?void 0:i.call(c,n,o);return r.saveChildOrder(),r.removeClasses("empty"),h}onRemove({from:{parentElement:t}}){return t.classList.contains(p)&&t.classList.remove("column-editing-field"),"stage"===this.name||this.children.length?(this.emptyClass(),this.saveChildOrder()):this.remove()}onRender(){const{events:t}=this.config;if(!t)return null;t.onRender&&Cl.onRender(this.dom,t.onRender)}set config(t){const e=Hi(this.data,"meta.id"),n=[Hi(t,"all"),e&&Hi(t,e),Hi(t,this.id)].reduce(((t,e)=>e?_i(t,e):t),this.configVal);this.configVal=n}get config(){return this.configVal}getComponent(t){const[e,n]=t.split("."),o=gl[e];return n===this.id?this:o&&o.get(n)}}class Oa extends Sa{constructor(t=Object.create(null)){super("field",{conditions:[{if:[{source:"",sourceProperty:"",comparison:"",target:"",targetProperty:""}],then:[{target:"",targetProperty:"",assignment:"",value:""}]}],...t}),e(this,"updateConditionsPanel",(()=>{const t=setTimeout((()=>{const e=this.editPanels.find((({name:t})=>"conditions"===t));if(!e)return null;const n=e.createProps(),o=this.dom.querySelector(".field-edit-conditions");o.parentElement.replaceChild(n,o),clearTimeout(t)}),A)})),e(this,"updatePreview",Pi((()=>{if(!this.preview.parentElement)return null;this.updateLabel();const t=Cl.create(this.fieldPreview(),!0);this.preview.parentElement.replaceChild(t,this.preview),this.preview=t}),A)),e(this,"isDisabledProp",((t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.disabled.concat(this.get(`config.disabled${Ri(e)}`)).includes(t)})),e(this,"isLockedProp",((t,e="attrs")=>{const n=this.config.panels[e];if(!n)return!1;return n.locked.concat(this.get(`config.locked${Ri(e)}`)).includes(t)})),this.label=Cl.create(this.labelConfig),this.preview=Cl.create(this.fieldPreview()),this.editPanels=[];let n={tag:"li",attrs:{className:m},id:this.id,children:[this.label,this.getActionButtons(),this.fieldEdit,this.preview],panelNav:this.panelNav,dataset:{hoverTag:a.get("field")},action:{mouseenter:()=>this.dom.classList.add(`hovering-${this.name}`),mouseleave:()=>this.dom.classList.remove(`hovering-${this.name}`)}};n=Cl.create(n),this.observe(n),this.dom=n,this.isEditing=!1,this.onRender(n)}get labelConfig(){if(!!this.get("config.hideLabel"))return;const t=this.get("config.editorLabel")||this.get("config.label"),e=this.get("attrs.required"),n=this.config.label.disableHTML;return{className:"prev-label",children:[{...(()=>{const e={tag:"label",attrs:{}};return n?(e.tag="input",e.attrs.value=t,e):(e.attrs.contenteditable=!0,e.children=t,e)})(),action:{input:({target:{innerHTML:t,innerText:e,value:o}})=>{super.set("config.label",n?o:t);const i=gl.getConditionMap(`fields.${this.id}`);if(i)return i.updateConditionSourceLabel(`${this.name}s.${this.id}`,n?o:e)}}},e&&Cl.requiredMark()]}}updateConditionSourceLabel(t,e){const n=this.editPanels.find((({name:t})=>"conditions"===t));if(!n)return null;n.editPanelItems.forEach((({itemFieldGroups:n})=>{n.forEach((n=>{const o=n.find((e=>e.value===t));o&&(o.displayField.value=e)}))}))}set(...t){const[e,n]=t,o=super.set(e,n);return this.updatePreview(),o}updateLabel(){if(!this.label)return null;const t=Cl.create(this.labelConfig);this.label.parentElement.replaceChild(t,this.label),this.label=t}get fieldEdit(){this.editPanels=[];const t=["object","array"],e=["config","meta","action","events",...this.config.panels.disabled],n={className:["field-edit","slide-toggle","formeo-panels-wrap"]};Ni([...this.config.panels.order,...Object.keys(this.data)]).filter((t=>!e.includes(t))).forEach((e=>{const n=this.get(e),o=Cl.childType(n);if(t.includes(o)){const t=new Ea(n,e,this);this.editPanels.push(t)}}));const o={panels:this.editPanels.map((({panelConfig:t})=>t)),id:this.id,displayType:"auto"},i=this.editPanels.length;return i&&(this.panels=new aa(o),n.className.push(`panel-count-${i}`),n.content=[this.panels.panelNav,this.panels.panelsWrap],this.panelNav=this.panels.nav,this.resizePanelWrap=this.panels.nav.refresh,n.action={onRender:()=>{this.resizePanelWrap();const t=this.dom,e=t.querySelector(".item-edit-toggle"),n=t.querySelector(".field-actions"),o=n.getElementsByTagName("button");n.style.maxWidth=o.length*o[0].clientWidth+"px",Cl.remove(e)}}),n}fieldPreview(){var t;const e=ji(this.data);e.id=`prev-${this.id}`,(null==(t=this.data)?void 0:t.config.editableContent)&&(e.attrs=Object.assign({},e.attrs,{contenteditable:!0}));return{attrs:{className:"field-preview",style:this.isEditing&&"display: none;"},content:Cl.create(e,!0),action:{change:t=>{const{target:e}=t,{checked:n,type:o}=e;if(["checkbox","radio"].includes(o)){const t=+e.id.split("-").pop();"radio"===o&&this.set("options",this.get("options").map((t=>({...t,selected:!1}))));const i="checkbox"===o?"checked":"selected";this.set(`options.${t}.${i}`,n)}},click:t=>{"true"===t.target.contentEditable&&t.preventDefault()},input:t=>{["input","meter","progress","button"].includes(this.data.tag)&&super.set("attrs.value",t.target.value),t.target.contentEditable&&super.set("content",t.target.innerHTML)}}}}}const Na={js:[],css:[]},Ma=t=>new Promise(((e,n)=>{if(Na.js.includes(t))return e(t);const o=Cl.create({tag:"script",attrs:{type:"text/javascript",async:!0,src:`//${(void 0).src}`},action:{load:()=>{Na.js.push(t),e(t)},error:()=>n(new Error(`${(void 0).src} failed to load.`))}}),i=document.getElementsByTagName("script")[0];i.parentNode.insertBefore(o,i)})),_a=t=>{const e=(t=Array.isArray(t)?t:[t]).map((t=>new Promise(((e,n)=>{if(Na.css.includes(t))return e(t);const o=Cl.create({tag:"link",attrs:{rel:"preload",href:t,as:"style"},action:{load:function n(){this.removeEventListener("load",n),this.rel="stylesheet",Na.css.push(t),e(t)},error:()=>n(new Error(`${(void 0).src} failed to load.`))}});document.head.appendChild(o)}))));return Promise.all(e)},ja=t=>("string"==typeof t?Promise.resolve(t):t.text()).then((t=>{const e="formeo-sprite";let n=document.getElementById(e);return n||(n=Cl.create({id:e,children:t,attrs:{hidden:!0,style:"display: none;"}}),document.body.insertBefore(n,document.body.childNodes[0])),n})),Aa=(t,e,n=$i)=>new Promise(((o,i)=>fetch(t).then((t=>o(e?e(t):t))).catch((t=>i(new Error(n(t))))))),Da={js:Ma,css:_a};class ka{constructor({events:t={},dependencies:n={},...o}={}){e(this,"parsedHtml",(t=>{const e=document.createElement("textarea");return e.innerHTML=t,e.textContent})),this.events=t,this.controlData=o,this.depsLoaded=this.fetchDependencies(n)}onRenderPreview(){}fetchDependencies(t,e=!0){const n=Object.entries(t).map((([t,e])=>Da[t](e)));return Promise.all(n)}on(t){const e={prerender:Li,renderComponent:Li,render:t=>{const e=()=>{this.onRender&&this.onRender(t)};this.depsLoaded.then((()=>{e()}))}};return t?e[t]:e}static i18n(t,e){const n=this.definition;let o=n.i18n||{};o=o[o.locale]||o.default||o;const i="object"==typeof o?o[t]:o;if(i)return i;let r=n.i18n;return"object"==typeof r&&(r=r[t]),o.get(r,e)}}const Ta=[{config:{label:"row"},meta:{group:"layout",icon:"rows",id:"layout-row"}},{config:{label:"column"},meta:{group:"layout",icon:"columns",id:"layout-column"}}];const za=(t,e=3)=>Array.from({length:e},((t,e)=>e+1)).map((e=>{const n="checkbox"===t?"checked":"selected";return{label:a.get("labelCount",{label:Ri(t),count:e}),value:`${t}-${e}`,[n]:!e}}));const Pa=[class extends ka{constructor(){super({tag:"button",attrs:{className:[{label:"grouped",value:"f-btn-group"},{label:"ungrouped",value:"f-field-group"}]},config:{label:a.get("controls.form.button"),hideLabel:!0},meta:{group:"common",icon:"button",id:"button"},options:[{label:a.get("button"),type:["button","submit","reset"].map(((t,e)=>({label:t,type:t}))),className:[{label:"default",value:"",selected:!0},{label:"primary",value:"primary"},{label:"danger",value:"error"},{label:"success",value:"success"},{label:"warning",value:"warning"}]}]})}},class extends ka{constructor(){super({tag:"input",attrs:{type:"date",required:!1,className:""},config:{label:a.get("controls.form.input.date")},meta:{group:"common",icon:"calendar",id:"date-input"}})}},class extends ka{constructor(){super({tag:"input",attrs:{type:"hidden",value:""},config:{label:a.get("hidden"),hideLabel:!0},meta:{group:"common",icon:"hidden",id:"hidden"}})}},class extends ka{constructor(){super({tag:"input",attrs:{type:"number",required:!1,className:""},config:{label:a.get("number")},meta:{group:"common",icon:"hash",id:"number"}})}},class extends ka{constructor(){super({tag:"textarea",config:{label:a.get("controls.form.textarea")},meta:{group:"common",icon:"textarea",id:"textarea"},attrs:{required:!1}})}},class extends ka{constructor(){super({tag:"input",attrs:{required:!1,type:"text",className:""},config:{label:a.get("controls.form.input.text")},meta:{group:"common",icon:"text-input",id:"text-input"}})}},class extends ka{constructor(){super({tag:"input",attrs:{type:"file",required:!1},config:{label:a.get("fileUpload")},meta:{group:"common",icon:"upload",id:"upload"}})}},class extends ka{constructor(){super({tag:"select",config:{label:a.get("controls.form.select")},attrs:{required:!1,className:""},meta:{group:"common",icon:"select",id:"select"},options:za("option")})}},class extends ka{constructor(){super({tag:"input",attrs:{type:"checkbox",required:!1},config:{label:a.get("controls.form.checkbox-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"checkbox",id:"checkbox"},options:za("checkbox",1)})}},class extends ka{constructor(){super({tag:"input",attrs:{type:"radio",required:!1},config:{label:a.get("controls.form.radio-group"),disabledAttrs:["type"]},meta:{group:"common",icon:"radio-group",id:"radio"},options:za("radio")})}}],La=Array.from(Array(5).keys()).slice(1).map((t=>`h${t}`)),$a="controls.html.header";const Ha=[class extends ka{constructor(){super({tag:La[0],attrs:{tag:La.map(((t,e)=>({label:t.toUpperCase(),value:t,selected:!e}))),className:""},config:{label:a.get($a),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"header",id:"html.header"},content:a.get($a)})}static get definition(){return{i18n:{header:"Header222"}}}get content(){return super.i18n($a)}},class extends ka{constructor(){super({tag:"p",attrs:{className:""},config:{label:a.get("controls.html.paragraph"),hideLabel:!0,editableContent:!0},meta:{group:"html",icon:"paragraph",id:"paragraph"},content:"Leverage agile frameworks to provide a robust synopsis for high level overviews. Iterative approaches to corporate strategy foster collaborative thinking to further the overall value proposition. Organically grow the holistic world view of disruptive innovation via workplace diversity and empowerment."})}},class extends ka{constructor(){super({tag:"hr",config:{label:a.get("controls.html.divider"),hideLabel:!0},meta:{group:"html",icon:"divider",id:"divider"}})}},class extends ka{constructor(){super({tag:"textarea",config:{label:"WYSIWYG",editableContent:!0},meta:{group:"html",icon:"rich-text",id:"tinymce"},attrs:{required:!1},action:{onRender:t=>{t.id&&(this.textareaID=t.id,window.tinymce.remove("textarea#"+t.id),window.tinymce.init({selector:"textarea#"+t.id}))}}})}}],Va=Object.freeze({sortable:!0,elementOrder:{},groupOrder:[],groups:[{id:"layout",label:"controls.groups.layout",elementOrder:["row","column"]},{id:"common",label:"controls.groups.form",elementOrder:["button","checkbox"]},{id:"html",label:"controls.groups.html",elementOrder:["header","block-text"]}],disable:{groups:[],elements:[],formActions:[]},elements:[],container:null,panels:{displayType:"slider"}}),Ia=[...Pa,...Ha,...Ta];const Fa=new class{constructor(){e(this,"applyControlEvents",(({clone:t})=>{const e=t.querySelector("button");Object.keys(this.controlEvents).map((t=>e.addEventListener(t,this.controlEvents[t])))})),e(this,"groupLabel",(t=>a.get(t)||t||"")),e(this,"addElement",(t=>{const e=Hi(this.get(t),"controlData"),{meta:{group:n,id:o}}=e,i={row:()=>ll.active.addChild(),column:()=>i.row().addChild(),field:t=>i.column().addChild(t)};return"layout"!==n?i.field(e):i[o.replace("layout-","")]()})),e(this,"applyOptions",((t={})=>{const{container:e,elements:n,groupOrder:o,...i}=_i(Va,t);this.container=e,this.groupOrder=Ni(o.concat(["common","html","layout"])),this.elements=n.concat(Ia),this.options=i})),this.data=new Map,this.controlEvents={focus:({target:t})=>{const e=t.closest(`.${d}`);return e&&this.panels.nav.refresh(Ui(e))},click:({target:t})=>this.addElement(t.parentElement.id)}}init(t,e=!1){return this.applyOptions(t),this.registerControls(),this.buildDOM(e),this}registerControls(){return this.controls=this.elements.map((t=>{const e="function"==typeof t,n=e?new t:new ka(t),{controlData:{meta:o,config:i}}=n,r=e?i.label:a.get(i.label)||i.label,{id:s}=this.add(n),l={tag:"button",attrs:{type:"button"},content:[{tag:"span",className:"control-icon",children:Cl.icon(o.icon)},r],action:this.controlEvents};return n.dom=Cl.create({tag:"li",id:s,className:["field-control",`${o.group}-control`,`${o.id}-control`],content:l,meta:o}),n.dom})),this.controls}groupElements(){let t=this.options.groups.slice(),e=this.controls.slice(),n=[];const o=[];return t=Gi(t,this.groupOrder,"id"),t=t.filter((t=>Si(t.id,this.options.disable.groups))),n=t.map((t=>{const n={tag:"ul",attrs:{className:d,id:`${t.id}-${d}`},config:{label:this.groupLabel(t.label)}};if(this.options.elementOrder[t.id]){const e=this.options.elementOrder[t.id],n=Ni(e.concat(t.elementOrder));t.elementOrder=n}return e=Gi(e,t.elementOrder,"meta.id"),n.content=e.filter((e=>{const{controlData:n}=this.get(e.id),i=n.meta.id||"";let r=!0;return r=[Si(i,this.options.disable.elements),n.meta.group===t.id,!o.includes(n.meta.id)].every((t=>!0===t)),r&&o.push(i),r})),n})),n}add(t=Object.create(null)){const{id:e,...n}=t,o=e||Mi(),i=ji(n);return this.data.set(o,i),{id:o,...i}}get(t){return this.data.get(t)}formActions(){if(!0===this.options.disable.formActions)return null;const t={...Cl.btnTemplate({content:[Cl.icon("bin"),a.get("clear")],title:a.get("clearAll")}),className:["clear-form"],action:{click:t=>{cl.size?(yl.confirmClearAll=new window.CustomEvent("confirmClearAll",{detail:{confirmationMessage:a.get("confirmClearAll"),clearAllAction:()=>{ll.clearAll().then((()=>{const e={src:t.target};yl.formeoCleared(e)}))},btnCoords:Cl.coords(t.target)}}),document.dispatchEvent(yl.confirmClearAll)):window.alert(a.get("cannotClearFields"))}}},e={...Cl.btnTemplate({content:[Cl.icon("floppy-disk"),a.get("save")],title:a.get("save")}),className:["save-form"],action:{click:({target:t})=>{const{formData:e}=gl,n={action:()=>{},coords:Cl.coords(t),message:"",button:t};return ia.click.btn(n),ia.save.form(e)}}};return{className:"form-actions f-btn-group",content:Object.entries({clearBtn:t,saveBtn:e}).reduce(((t,[e,n])=>(this.options.disable.formActions.includes(e)||t.push(n),t)),[])}}buildDOM(t){const e=this.groupElements(),n=this.formActions(),{displayType:o}=this.options.panels;this.panels=new aa({panels:e,type:"controls",displayType:o});const i=["control-groups","formeo-panels-wrap",`panel-count-${e.length}`],r=Cl.create({className:i,content:[this.panels.panelNav,this.panels.panelsWrap]});let s="formeo-controls";t&&(s+=" formeo-sticky");const l=Cl.create({className:s,content:[r,n]}),c=l.getElementsByClassName("control-group");this.dom=l,this.groups=c;const[d]=c;this.currentGroup=d,this.actions={filter:t=>{const e=""!==t,n=this.controls;let o=r.querySelector(".filtered-term");if(Cl.toggleElementsByStr(n,t),e){const e=a.get("controls.filteringTerm",t);l.classList.add("filtered"),o?o.textContent=e:(o=Cl.create({tag:"h5",className:"filtered-term",content:e}),r.insertBefore(o,r.firstChild))}else o&&(l.classList.remove("filtered"),o.remove())},addElement:this.addElement,addGroup:t=>{}};for(let a=c.length-1;a>=0;a--){const t=`formeo-controls-${c[a]}`;this.options.sortable||window.localStorage.removeItem(t),Ls.create(c[a],{animation:150,forceFallback:!0,fallbackClass:"control-moving",fallbackOnBody:!0,group:{name:"controls",pull:"clone",put:!1},onRemove:this.applyControlEvents,onStart:({item:t})=>{const{controlData:e}=this.get(t.id);this.options.ghostPreview&&(t.innerHTML="",t.appendChild(new Oa(e).preview))},sort:this.options.sortable,store:{get:()=>{const e=window.localStorage.getItem(t);return e?e.split("|"):[]},set:e=>{const n=e.toArray();window.localStorage.setItem(t,n.join("|"))}}})}return l}};class Ba extends Qi{constructor(){super(...arguments),e(this,"load",((t=Object.create(null))=>(this.empty(),"string"==typeof t&&(t=JSON.parse(t)),Object.entries(t).forEach((([t,e])=>this.add(t,e))),this.data))),e(this,"get",(t=>t?Hi(this.data,t):this.add())),e(this,"add",((t,e=Object.create(null))=>{const n=t||Mi(),o=this.Component({...e,id:n});return this.set(n,o),this.active=o,o})),e(this,"remove",(t=>(Array.isArray(t)?t.forEach((t=>{this.get(t).remove()})):this.get(t).remove(),this.data))),e(this,"delete",(t=>(delete this.data[t],t))),e(this,"clearAll",((t=!0)=>{const e=Object.values(this.data).map((e=>e.empty(t)));return Promise.all(e)})),e(this,"conditionMap",new Map)}set config(t){this.configVal=_i(this.configVal,ji(t))}get config(){return this.configVal}}class Ra extends Sa{constructor(t,e){super("stage",Object.assign({},Object.freeze({children:[]}),t),e);const n=this.createChildWrap();this.dom=Cl.create({attrs:{className:[h,"empty"],id:this.id},children:n}),this.sortable=Ls.create(n,{animation:150,fallbackClass:"row-moving",forceFallback:!0,group:{name:"stage",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onAdd:this.onAdd.bind(this),onRemove:this.onRemove.bind(this),onStart:()=>Wa.active=this,onSort:this.onSort.bind(this),draggable:`.${u}`,handle:".item-handle"})}empty(t=!0){return new Promise((e=>{t?(this.dom.classList.add("removing-all-fields"),la.slideUp(this.dom,A,(()=>{e(super.empty(t)),this.dom.classList.remove("removing-all-fields"),la.slideDown(this.dom,A)}))):e(super.empty())}))}onAdd(...t){const e=super.onAdd(...t);e&&"column"===e.name&&e.parent.autoColumnWidths()}}const Wa=new class extends Ba{constructor(t){super("stages",t)}Component(t){return new Ra(t)}},qa="custom-column-widths",Ua="column-preset",Ga="resizing-columns";function Xa(t){const e=this,n=t.target.parentElement,o=n.nextSibling||n.previousSibling,i=n.closest(`.${u}`),r=Cl.getStyle(i),s=parseFloat(r.paddingLeft)+parseFloat(r.paddingRight);if(t.target.removeEventListener("pointerdown",e),e.move=({touches:t,type:i,clientX:r})=>{if("touchmove"===i){const[e]=t;r=e.clientX}const s=e.colStartWidth+r-e.startX,a=e.sibStartWidth-r+e.startX,l=parseFloat(Ai(s,e.rowWidth)),c=parseFloat(Ai(a,e.rowWidth)),d=Di(l.toFixed(1)),h=Di(c.toFixed(1));n.dataset.colWidth=d,o.dataset.colWidth=h,n.style.width=d,o.style.width=h,e.resized=!0},e.stop=function(){window.removeEventListener("pointermove",e.move),window.removeEventListener("pointerup",e.stop),window.removeEventListener("touchmove",e.move),window.removeEventListener("touchend",e.stop),e.resized&&(Za(i,e.rowWidth),i.classList.remove(Ga),gl.setAddress(`columns.${n.id}.config.width`,n.dataset.colWidth),gl.setAddress(`columns.${o.id}.config.width`,o.dataset.colWidth),e.resized=!1)},"touchstart"===t.type){const[n]=t.touches;e.startX=n.clientX}else e.startX=t.clientX;i.classList.add(Ga),n.className.replace(I,""),o.className.replace(I,""),e.colStartWidth=n.offsetWidth||Cl.getStyle(n,"width"),e.sibStartWidth=o.offsetWidth||Cl.getStyle(o,"width"),e.rowWidth=i.offsetWidth-s,window.addEventListener("pointerup",e.stop,!1),window.addEventListener("pointermove",e.move,!1),window.addEventListener("touchend",e.stop,!1),window.addEventListener("touchmove",e.move,!1)}const Ya=(t,e=t.querySelector(`.${Ua}`))=>{const n=e.querySelector(`.${qa}`);return n&&e.removeChild(n)},Za=(t,e)=>{const n=t.querySelector(`.${Ua}`),o=n.querySelector(`.${qa}`),i=t.querySelector(".children").children,r=Yi(i,(t=>Ai(t.clientWidth,e).toFixed(1))),s=r.join(","),a=r.join(" | ");o&&Ya(t,n);const l=Cl.create({tag:"option",attrs:{className:qa,value:s},content:a});return n.add(l),n.value=s,s};class Ja extends Sa{constructor(t){super("row",Object.assign({},Object.freeze({config:{fieldset:!1,legend:"",inputGroup:!1},children:[],className:[u]}),t)),e(this,"autoColumnWidths",(()=>{const t=this.children;if(!t.length)return;const e=parseFloat((100/t.length).toFixed(1))/1;t.forEach((t=>{t.removeClasses(I);const n=t.dom,o=Di(e);t.set("config.width",o),n.style.width=o,n.dataset.colWidth=o;const i=setTimeout((()=>{clearTimeout(i),t.refreshFieldPanels()}),D);document.dispatchEvent(yl.columnResized)})),this.updateColumnPreset()})),e(this,"updateColumnPreset",(()=>{const t=this.dom.querySelector(".column-preset"),e=t.parentElement,n=this.columnPresetControl(this.id),o=Cl.create(n);return e.replaceChild(o,t),n})),e(this,"setColumnWidths",(t=>{"custom"!==t&&("string"==typeof t&&(t=t.split(",")),this.children.forEach(((e,n)=>{e.setWidth(`${t[n]}%`),e.refreshFieldPanels()})))})),e(this,"columnPresetControl",(()=>{const t=this,e={tag:"select",attrs:{ariaLabel:a.get("defineColumnLayout"),className:"column-preset"},action:{change:({target:{value:e}})=>{"custom"!==e&&(Ya(this.dom),t.setColumnWidths(e))}},options:[]},n=N,o=this.children,i=n.get(o.length-1)||[],r=o.map((t=>{const e=t.get("config.width")||"";return Number(e.replace("%","")).toFixed(1)})).join(",");if(i.length){const t=i.slice();!t.find((t=>t.value===r))&&t.push({value:r,label:r.replace(/,/g," | "),className:"custom-column-widths"}),e.options=t.map((t=>{const e=Object.assign({},t);return t.value===r&&(e.selected=!0),e}))}return e}));const n=this.createChildWrap();this.dom=Cl.create({tag:"li",className:[u,"empty"],dataset:{hoverTag:a.get("row"),editingHoverTag:a.get("editing.row")},id:this.id,content:[this.getActionButtons(),this.editWindow,n]}),this.sortable=Ls.create(n,{animation:150,fallbackClass:"column-moving",forceFallback:!0,group:{name:"row",pull:!0,put:["row","column","controls"]},sort:!0,disabled:!1,onRemove:this.onRemove.bind(this),onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),filter:".resize-x-handle",draggable:`.${p}`,handle:".item-handle"}),this.onRender()}get editWindow(){const t=this,e={className:`${this.name}-edit group-config`},n={tag:"label",content:a.get("row.settings.fieldsetWrap")},o={tag:"input",id:t.id+"-fieldset",attrs:{type:"checkbox",checked:this.get("config.fieldset"),ariaLabel:a.get("row.settings.fieldsetWrap.aria")},action:{click:({target:{checked:t}})=>{this.set("config.fieldset",Boolean(t))}}},i={tag:"input",id:`${this.id}-inputGroup`,attrs:{type:"checkbox",checked:this.get("config.inputGroup"),ariaLabel:a.get("row.settings.inputGroup.aria")},action:{click:({target:{checked:t}})=>this.set("config.inputGroup",t)},config:{label:a.get("row.makeInputGroup"),description:a.get("row.makeInputGroupDesc")}},r={className:"input-group",content:[{tag:"span",className:"input-group-addon",content:o},{tag:"input",attrs:{type:"text",ariaLabel:"Legend for fieldset",value:t.get("config.legend"),placeholder:"Legend"},action:{input:({target:{value:e}})=>t.set("config.legend",e)},className:""}]},s=Cl.formGroup([n,r]),l={tag:"label",content:a.get("defineColumnWidths"),className:"col-sm-4 form-control-label"},c={className:"col-sm-8",content:{className:"column-preset"},action:{onRender:t=>{this.updateColumnPreset()}}},d=Cl.formGroup([l,c],"row");return e.children=[i,Cl.create("hr"),s,Cl.create("hr"),d],e}onAdd(...t){super.onAdd(...t),this.autoColumnWidths()}onRemove(...t){super.onRemove(...t),this.autoColumnWidths()}}const Ka={actionButtons:{buttons:["handle","edit","clone","remove"],disabled:[]}};const Qa=new class extends Ba{constructor(t){super("rows",t),this.config={all:Ka}}Component(t){return new Ja(t)}},tl=()=>({className:"resize-x-handle",action:{pointerdown:Xa},content:[Cl.icon("triangle-down"),Cl.icon("triangle-up")]}),el=()=>({className:"column-edit group-config"});class nl extends Sa{constructor(t){super("column",Object.assign({},Object.freeze({config:{width:"100%"},children:[],className:p}),t)),e(this,"fieldOrderClasses",(()=>{const t=this.children.map((({dom:t})=>t));t.length&&(this.removeClasses(["first-field","last-field"]),t[0].classList.add("first-field"),t[t.length-1].classList.add("last-field"))})),e(this,"refreshFieldPanels",(()=>{this.children.forEach((t=>t.panels.nav.refresh()))})),e(this,"setWidth",(t=>(this.dom.dataset.colWidth=t,this.dom.style.width=t,this.set("config.width",t))));const n=this.createChildWrap();this.dom=Cl.create({tag:"li",className:[p,"empty"],dataset:{hoverTag:a.get("column")},action:{mouseup:t=>{const e=t.target.parentElement;e.resizing&&(e.resizing=!1,e.parentElement.classList.remove("resizing-columns"))}},id:this.id,content:[this.getActionButtons(),el(),tl(),n]}),this.processConfig(this.dom),yl.columnResized=new window.CustomEvent("columnResized",{detail:{column:this.dom,instance:this}}),this.sortable=Ls.create(n,{animation:150,fallbackClass:"field-moving",forceFallback:!0,group:{name:"column",pull:!0,put:["column","controls"]},sort:!0,disabled:!1,onEnd:this.onEnd.bind(this),onAdd:this.onAdd.bind(this),onSort:this.onSort.bind(this),onRemove:this.onRemove.bind(this),onMove:t=>{t.from!==t.to&&t.from.classList.remove("hovering-column")},draggable:`.${m}`,handle:".item-handle"})}processConfig(t){const e=Ki.get(this.data,"config.width");e&&(t.dataset.colWidth=e,t.style.width=e,t.style.float="left")}addChild(...t){super.addChild(...t),this.fieldOrderClasses()}}const ol={actionButtons:{buttons:["clone|copy|handle","handle","remove"],disabled:[]}};const il=new class extends Ba{constructor(t){super("columns",t),this.config={all:ol}}Component(t){return new nl(t)}},rl={actionButtons:{buttons:["handle","edit","clone","remove"],disabled:[]},panels:{disabled:[],attrs:{disabled:["type"],hideDisabled:!0,locked:[]},order:["attrs","options","conditions"]},label:{disableHTML:!1}};const sl=new class extends Ba{constructor(t){super("fields",t),e(this,"get",(t=>{let e=t&&Hi(this.data,t);if(!e){const n=Fa.get(t);n&&(e=this.add(null,n.controlData))}return e})),this.config={all:rl}}Component(t){return new Oa(t)}};const al=new class extends Ba{constructor(t){super("externals",t)}Component(t){return new Sa("external",t)}},ll=Wa,cl=Qa,dl=il,hl=sl,ul=Fa,pl=al,ml={id:Mi()};const gl=new class extends Qi{constructor(t){super("components"),e(this,"sessionFormData",(()=>{var t;if(null==(t=this.opts)?void 0:t.sessionStorage)return ki.get(_)})),e(this,"load",((t,e=this.opts||Object.create(null))=>{this.empty(),"string"==typeof t&&(t=JSON.parse(t)),this.opts=e;const{stages:n={[Mi()]:{}},rows:o,columns:i,fields:r,id:s=Mi()}=Object.assign({},this.sessionFormData(),t);return this.set("id",s),this.add("stages",ll.load(n)),this.add("rows",cl.load(o)),this.add("columns",dl.load(i)),this.add("fields",hl.load(r)),this.add("externals",pl.load(e.external)),Object.values(this.get("stages")).forEach((t=>t.loadChildren())),this.data})),this.opts=t,this.data=ml,this.disableEvents=!0,this.stages=ll,this.rows=cl,this.columns=dl,this.fields=hl,this.controls=ul,this.externals=pl}flatList(t=this.data,e=Object.create(null)){return Object.entries(t).reduce(((t,[e,n])=>("object"==typeof n&&Object.entries(n).forEach((([n,o])=>{t[`${e}.${n}`]=o})),t)),e)}get json(){return window.JSON.stringify(this.formData)}get formData(){return{id:this.get("id"),stages:Wa.getData(),rows:Qa.getData(),columns:il.getData(),fields:sl.getData()}}set config(t){const{stages:e,rows:n,columns:o,fields:i}=t;ll.config=e,cl.config=n,dl.config=o,hl.config=i}setAddress(t,e){const[n,o,...i]=Array.isArray(t)?t:t.split("."),r=this[n.replace(/s?$/,"s")].get(o);return r&&r.set(i,e),r}getAddress(t){if(!Ti(t))return;const[e,n,...o]=Array.isArray(t)?t:t.split("."),i=this[e.replace(/s?$/,"s")].get(n);return o.length?i.get(o):i}getConditionMap(t){if(Ti(t)){const e=t.split(".");return e.every((t=>Boolean(t)))&&this[e[0]].conditionMap.get(e[1])}}setConditionMap(t,e){if(Ti(t)){const n=t.split(".");return n.every((t=>Boolean(t)))&&this[n[0]].conditionMap.set(n[1],e)}}removeConditionMap(t){if(Ti(t)){const e=t.split(".");return e.every((t=>Boolean(t)))&&this[e[0]].conditionMap.delete(e[1])}}},fl="no-transition",vl={debug:!1,bubbles:!0,formeoLoaded:t=>{},onAdd:()=>{},onUpdate:t=>yl.opts.debug&&void 0,onUpdateStage:t=>yl.opts.debug&&void 0,onUpdateRow:t=>yl.opts.debug&&void 0,onUpdateColumn:t=>yl.opts.debug&&void 0,onUpdateField:t=>yl.opts.debug&&void 0,onRender:t=>yl.opts.debug&&void 0,onSave:t=>{},confirmClearAll:t=>{window.confirm(t.confirmationMessage)&&t.clearAllAction(t)}},bl=({src:t,...e},n=z)=>{const o=new window.CustomEvent(n,{detail:e,bubbles:yl.opts.debug||yl.opts.bubbles});return o.data=(t||document).dispatchEvent(o),o},yl={init:function(t){return this.opts={...vl,...t},this},formeoSaved:t=>bl(t,T),formeoUpdated:t=>bl(t,z),formeoCleared:t=>bl(t,"formeoCleared"),formeoOnRender:t=>bl(t,P),formeoConditionUpdated:t=>bl(t,"formeoConditionUpdated")},wl=Pi((()=>{yl.opts.onUpdate({timeStamp:window.performance.now(),type:z,detail:gl.formData})}),D);let xl;document.addEventListener(z,wl),document.addEventListener("formeoUpdatedStage",(t=>{const{timeStamp:e,type:n,detail:o}=t;yl.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedRow",(t=>{const{timeStamp:e,type:n,detail:o}=t;yl.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedColumn",(t=>{const{timeStamp:e,type:n,detail:o}=t;yl.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener("formeoUpdatedField",(t=>{const{timeStamp:e,type:n,detail:o}=t;yl.opts.onUpdate({timeStamp:e,type:n,detail:o})})),document.addEventListener(P,(t=>{const{timeStamp:e,type:n,detail:o}=t;yl.opts.onRender({timeStamp:e,type:n,detail:o})})),document.addEventListener("confirmClearAll",(t=>{t={timeStamp:t.timeStamp,type:t.type,confirmationMessage:t.detail.confirmationMessage,clearAllAction:t.detail.clearAllAction,btnCoords:t.detail.btnCoords},yl.opts.confirmClearAll(t)})),document.addEventListener(T,(({timeStamp:t,type:e,detail:{formData:n}})=>{const o={timeStamp:t,type:e,formData:n};yl.opts.onSave(o)})),document.addEventListener("formeoLoaded",(t=>{yl.opts.formeoLoaded(t.detail.formeo)})),window.addEventListener("resize",(function(){xl=xl||window.requestAnimationFrame((()=>{xl=!1,Object.values(dl.data).forEach((t=>{t.dom.classList.add(fl),ul.dom.classList.add(fl),ul.panels.nav.refresh(),t.refreshFieldPanels()}))}))}));const Cl=new class{constructor(){e(this,"render",(t=>(t.id=`f-${t.id||Mi()}`,this.create(t)))),e(this,"create",((t,e=!1)=>{if(!t)return;t=this.processTagName(t);const n=this;let o;const{tag:i}=t,r=["children","content"];let s;const a={attrs:{},className:[Ki.get(t,"config.inputWrap")||"f-field-group"],children:[],config:{}};let l=document.createElement(i);const c={string:t=>{l.innerHTML+=t},object:t=>t&&l.appendChild(n.create(t,e)),node:t=>l.appendChild(t),component:t=>l.appendChild(t.dom),array:t=>{for(const e of t)o=n.childType(e),c[o](e)},function:t=>{t=t(),o=n.childType(t),c[o](t)},undefined:()=>null,boolean:()=>null};if(r.push("tag"),t.className){const{className:e}=t;t.attrs=Object.assign({},t.attrs,{className:e}),delete t.className}if(t.options){let{options:o}=t;if(o=this.processOptions(o,t,e),!this.holdsContent(l)||"button"===i)return Ki.forEach(o,(t=>{a.children.push(n.create(t,e))})),t.attrs.className&&(a.className=t.attrs.className),a.config=Object.assign({},t.config),this.create(a,e);c.array.call(this,o),delete t.content,r.push("options")}if("OPTION"===l.tagName){const t=setTimeout((()=>{l.selected=!1,clearTimeout(t)}),0)}if(t.attrs&&(n.processAttrs(t,l,e),r.push("attrs")),t.config){if(t.config.label&&(t.config.label&&"button"!==i||["radio","checkbox"].includes(Ki.get(t,"attrs.type")))&&!e){const e=n.label(t);if(!t.config.hideLabel){const o=[...n.labelAfter(t)?[l,e]:[e,l]];a.children.push(o)}}r.push("config")}if(t.content||t.children){const e=t.content||t.children;o=n.childType(e),c[o],c[o].call(this,e)}if(t.dataset){for(const e in t.dataset)t.dataset.hasOwnProperty(e)&&(l.dataset[e]="function"==typeof t.dataset[e]?t.dataset[e]():t.dataset[e]);r.push("dataset")}t.action&&(this.actionHandler(l,t.action),r.push("action"));const d=Ki.subtract(r,Object.keys(t));for(s=d.length-1;s>=0;s--)l[d[s]]=t[d[s]];return a.children.length&&(l=this.create(a)),l})),e(this,"onRender",((t,e)=>{t.parentElement?e(t):window.requestAnimationFrame((()=>this.onRender(t,e)))})),e(this,"toggleElementsByStr",((t,e)=>{const n=[];return Cl.elementsContainText(t,e,((t,e)=>{e?(t.style.display="block",n.push(t)):t.style.display="none"})),n})),e(this,"elementsContainText",((t,e,n)=>{const o=[];return Xi(t,(t=>{const i=-1!==t.textContent.toLowerCase().indexOf(e.toLowerCase());n&&n(t,i),i&&o.push(t)})),o})),e(this,"generateOption",(({type:t="option",label:e,value:n,i:o=0,selected:i})=>({tag:"option"===t?"option":"input",attrs:{type:t,value:n||`${t}-${o}`,["option"===t?"selected":"checked"]:i||!o},config:{label:e||a.get("labelCount",{label:a.get("option"),count:o})}}))),e(this,"makeOption",(([t,e],n,o)=>{const i={value:t,label:a.get(`${o}.${e}`)||e};return t===n&&(i.selected=!0),i})),e(this,"requiredMark",(()=>({tag:"span",className:"text-error",children:"*"}))),e(this,"removeEmpty",(t=>{const e=t.parentElement,n=Oi(t),o=e.getElementsByClassName(`formeo-${n}`);if(this.remove(t),!o.length){if(!this.isStage(e))return this.removeEmpty(e);this.emptyClass(e)}})),e(this,"btnTemplate",(({title:t="",...e})=>({tag:"button",attrs:{type:"button",title:t},...e}))),e(this,"isControls",(t=>Oi(t)===d)),e(this,"isStage",(t=>Oi(t)===h)),e(this,"isRow",(t=>Oi(t)===u)),e(this,"isColumn",(t=>Oi(t)===p)),e(this,"isField",(t=>Oi(t)===m)),e(this,"asComponent",(t=>gl[`${Oi(t)}s`].get(t.id))),this.options=Object.create(null),this.styleSheet=(()=>{const t=document.createElement("style");return t.setAttribute("media","screen"),t.setAttribute("type","text/css"),t.appendChild(document.createTextNode("")),document.head.appendChild(t),t.sheet})()}set setOptions(t){this.options=_i(Object.assign({},this.options,t))}processTagName(t){let e;if("string"==typeof t&&(e=t,t={tag:e}),t.attrs){const{tag:n,...o}=t.attrs;if(n)if("string"==typeof n)e=n;else{e=(n.find((t=>!0===t.selected))||n[0]).value}t.attrs=o}return t.tag=e||t.tag||"div",t}actionHandler(t,e){const n={onRender:Cl.onRender},o=["focus","blur"];return Object.entries(e).map((([e,i])=>{const r=n[e]||(s=e,(t,e)=>t.addEventListener(s,e,o.includes(s)));var s;return r(t,i)}))}icon(t=null){if(!t)return;const e="f-i-";let n;const o={glyphicons:t=>`<span class="glyphicon glyphicon-${t}" aria-hidden="true"></span>`,"font-awesome":t=>{const[e,n]=t.split(" ");return`<i class="${e} fa-${n}"></i>`},fontello:t=>`<i class="${e}${t}">${t}</i>`};return n=document.getElementById(e+t)?`<svg class="svg-icon ${e}${t}"><use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="#${e}${t}"></use></svg>`:Cl.options.iconFont?o[Cl.options.iconFont](t):t,n}processAttrs(t,e,n){const{attrs:o={}}=t;n||!o.name&&this.isInput(t.tag)&&e.setAttribute("name",Mi(t)),Object.keys(o).forEach((t=>{const n=Ki.safeAttrName(t);let i=o[t]||"";if(Array.isArray(i))if("object"==typeof i[0]){const t=i.filter((t=>!0===t.selected));i=t.length?t[0].value:i[0].value}else i=i.join(" ");if(i)if("OPTION"===e.tagName&&"selected"===n){const t=setTimeout((()=>{e.setAttribute(n,i),clearTimeout(t)}),0)}else e.setAttribute(n,i)}))}processOptions(t,e,n){const{action:o,attrs:i}=e,r=i.type||e.tag,s=i.id||e.id;return t.map(((t,i)=>{const{label:a,...l}=t,c=()=>{const a={tag:"input",attrs:{name:s,type:r,value:t.value||"",id:`${s}-${i}`,...l},action:o},c={tag:"label",attrs:{for:`${s}-${i}`},config:{inputWrap:"form-check"},children:t.label},d={children:[a,c],className:[`f-${r}`]};return e.attrs.className&&(e.config.inputWrap=e.attrs.className),e.config.inline&&d.className.push(`f-${r}-inline`),t.selected&&(a.attrs.checked=!0),n&&(c.attrs.contenteditable=!0),d},d={select:()=>({tag:"option",attrs:t,children:t.label}),button:t=>{const{type:n,label:o,className:i,id:r}=t;return Object.assign({},e,{attrs:{type:n},className:i,id:r||Mi(),options:void 0,children:o,action:e.action})},checkbox:c,radio:c};return d[r]&&d[r](t)}))}holdsContent(t){return-1!==t.outerHTML.indexOf("/")}isBlockInput(t){return!this.isInput(t)&&this.holdsContent(t)}isInput(t){return"string"!=typeof t&&(t=t.tagName),-1!==["input","textarea","select"].indexOf(t)}parsedHtml(t){const e=document.createElement("textarea");return e.innerHTML=t,e.textContent}labelAfter(t){const e=Ki.get(t,"attrs.type"),n=Ki.get(t,"config.labelAfter");return void 0!==n?n:"checkbox"===e||"radio"===e}label(t,e){const n=Ki.get(t,"attrs.required");let{config:{label:o=""}}=t;const{id:i,attrs:r}=t;"function"==typeof o&&(o=o());const s={tag:"label",attrs:{for:i||r&&r.id},className:[],children:[o,n&&this.requiredMark()],action:{}};return e&&(delete s.attrs.for,s.attrs.contenteditable=!0,s.fMap=e),s}childType(t){return void 0===t?t:[["array",t=>Array.isArray(t)],["node",t=>t instanceof window.Node||t instanceof window.HTMLElement],["component",()=>t&&t.dom],[typeof t,()=>!0]].find((e=>e[1](t)))[0]}getStyle(t,e=!1){let n;return window.getComputedStyle?n=window.getComputedStyle(t,null):t.currentStyle&&(n=t.currentStyle),e?n[e]:n}getElement(t){return{node:()=>t,object:()=>document.getElementById(t.id),string:()=>document.getElementById(t)}[this.childType(t)]()}empty(t){for(;t.firstChild;)this.remove(t.firstChild);return t}clone(t,e){const n={},o=this,{id:i,fType:r}=t,s=ji(n[r].get(i)),a=Ui(t)+1;let l=!1;s.id=Mi(),n[r].set(s.id,s),e||(e=t.parentElement,l=!0);return{rows:()=>{s.columns=[];const e=ll.active,n=e.addRow(null,s.id),i=t.getElementsByClassName(p);return e.insertBefore(n,e.childNodes[a]),Ki.forEach(i,(t=>o.clone(t,n))),n},columns:()=>{s.fields=[];const n=o.addColumn(e,s.id);e.insertBefore(n,e.childNodes[a]);const i=t.getElementsByClassName(m);return l&&Cl.columnWidths(e),Ki.forEach(i,(t=>o.clone(t,n))),n},fields:()=>{const t=o.addField(e,s.id);return e.insertBefore(t,e.childNodes[a]),t}}[r]()}remove(t){const e=Oi(t);return e?gl.remove(`${e}s.${t.id}`):t.parentElement.removeChild(t)}removeClasses(t,e){const n={string:t=>t.classList.remove(e),array:t=>e.forEach((e=>t.classList.remove(e)))};n.object=n.string,Ki.forEach(t,n[this.childType(e)])}addClasses(t,e){const n={string:t=>t.classList.add(e),array:t=>e.forEach((e=>t.classList.add(e)))};Ki.forEach(t,n[this.childType(e)])}columnWidths(t){const e=t.getElementsByClassName(p);if(!e.length)return;const n=parseFloat((100/e.length).toFixed(1))/1;this.removeClasses(e,I),Ki.forEach(e,(t=>{dl.get(t.id).refreshFieldPanels();const e=Di(n);t.style.width=e,t.style.float="left",dl.set(`${t.id}.config.width`,e),t.dataset.colWidth=e,document.dispatchEvent(yl.columnResized)})),Cl.updateColumnPreset(t)}formGroup(t,e=""){return{className:["f-field-group",e],children:t}}coords(t){const e=t.getBoundingClientRect(),n=document.body.getBoundingClientRect();return{pageX:e.left+e.width/2,pageY:e.top-n.top-e.height/2}}clearStage(t){t.classList.add("removing-all-fields");la.slideUp(t,600,(()=>{Cl.empty(t),t.classList.remove("removing-all-fields"),Cl.emptyClass(t),la.slideDown(t,300)}))}toggleSortable(t,e){const n=Oi(t);if(!n)return;const o=Oi(t.parentElement),i=Cl[n].get(t.id).sortable;e||(e=!i.option("disabled")),i.option("disabled",e),o&&["rows","columns","stages"].includes(o)&&this.toggleSortable(t.parentElement,e)}emptyClass(t){const e=t.getElementsByClassName(g.get(t.classList.item(0)));t.classList.toggle("empty",!e.length)}insertRule(t){const e=this.styleSheet,n=e.cssRules.length;for(let o=0,i=t.length;o<i;o++){let i=1,r=t[o];const s=t[o][0];let a="";"[object Array]"===Object.prototype.toString.call(r[1][0])&&(r=r[1],i=0);for(let t=r.length;i<t;i++){const t=r[i],e=t[2]?" !important":"";a+=`${t[0]}:${t[1]}${e};`}return e.insertRule(`${s} { ${a} }`,n)}}};a.addLanguage("en-US",'en-US = English\ndir = ltr\n\naction.add.attrs.attr = What attribute would you like to add?\naction.add.attrs.value = Default Value\naddOption = Add Option\nallFieldsRemoved = All fields were removed.\nallowSelect = Allow Select\nattribute = Attribute\nattributes = Attributes\nattrs.class = Class\nattrs.className = Class\nattrs.dir = Direction\nattrs.id = Id\nattrs.required = Required\nattrs.style = Style\nattrs.title = Title\nattrs.type = Type\nattrs.value = Value\nautocomplete = Autocomplete\nbutton = Button\ncannotBeEmpty = This field cannot be empty\ncheckbox = Checkbox\ncheckboxes = Checkboxes\nclass = Class\nclear = Clear\nclearAllMessage = Are you sure you want to clear all fields?\nclose = Close\ncolumn = Column\nconfirmClearAll = Are you sure you want to remove all fields?\ncontent = Content\ncontrol = Control\ncontrolGroups.nextGroup = Next Group\ncontrolGroups.prevGroup = Previous Group\ncontrols.form.button = Button\ncontrols.form.checkbox-group = Checkbox Group\ncontrols.form.input.date = Date\ncontrols.form.input.email = Email\ncontrols.form.input.file = File Upload\ncontrols.form.input.hidden = Hidden Input\ncontrols.form.input.number = Number\ncontrols.form.input.text = Text Input\ncontrols.form.radio-group = Radio Group\ncontrols.form.select = Select\ncontrols.form.textarea = TextArea\ncontrols.groups.form = Form Fields\ncontrols.groups.html = HTML Elements\ncontrols.groups.layout = Layout\ncontrols.html.divider = Divider\ncontrols.html.header = Header\ncontrols.html.paragraph = Paragraph\ncontrols.layout.column = Column\ncontrols.layout.row = Row\ncontrols.filteringTerm = Filtering "{term}"\ncopy = Copy To Clipboard\ndanger = Danger\ndescription = Help Text\ndescriptionField = Description\ndefineColumnLayout = Define a column layout\ndefineColumnWidths = Define column widths\nediting.row = Editing Row\neditorTitle = Form Elements\nfield = Field\nfieldNonEditable = This field cannot be edited.\nfieldRemoveWarning = Are you sure you want to remove this field?\nfileUpload = File Upload\nformUpdated = Form Updated\ngetStarted = Drag a field from the right to get started.\ngroup = Group\ngrouped = Grouped\nhidden = Hidden Input\nhide = Edit\nhtmlElements = HTML Elements\nif = If\ninfo = Info\ninput.date = Date\ninput.text = Text\nlabel = Label\nlabelCount = {label} {count}\nlabelEmpty = Field Label cannot be empty\nlayout = Layout\nlimitRole = Limit access to one or more of the following roles:\nmandatory = Mandatory\nmaxlength = Max Length\nmeta.group = Group\nmeta.icon = Ico\nmeta.label = Label\nminOptionMessage = This field requires a minimum of 2 options\nname = Name\nno = No\nnumber = Number\noff = Off\non = On\noption = Option\noptional = optional\noptionEmpty = Option value required\noptionLabel = Option {count}\noptions = Options\norder = Order\npanel.label.attrs = Attributes\npanel.label.conditions = Conditions\npanel.label.config = Configuration\npanel.label.meta = Meta\npanel.label.options = Options\npanelEditButtons.attrs = + Attribute\npanelEditButtons.options = + Option\npanelEditButtons.conditions = + Condition\nplaceholder = Placeholder\nplaceholder.className = space separated classes\nplaceholder.email = Enter you email\nplaceholder.label = Label\nplaceholder.password = Enter your password\nplaceholder.placeholder = Placeholder\nplaceholder.text = Enter some Text\nplaceholder.textarea = Enter a lot of text\nplaceholder.value = Value\npreview = Preview\nprimary = Primary\nremove = Remove\nremoveType = Remove {type}\nremoveMessage = Remove Element\nrequired = Required\nreset = Reset\nrichText = Rich Text Editor\nroles = Access\nrow = Row\nrow.makeInputGroup = Make this row an input group.\nrow.makeInputGroupDesc = Input Groups enable users to add sets of inputs at a time.\nrow.settings.fieldsetWrap = Wrap row in a <fieldset> tag\nrow.settings.fieldsetWrap.aria = Wrap Row in Fieldset\ncannotClearFields = There are no fields to clear\nsave = Save\nsecondary = Secondary\nselect = Select\nselectColor = Select Color\nselectionsMessage = Allow Multiple Selections\nselectOptions = Options\nseparator = Separator\nsettings = Settings\nsize = Size\nsizes = Sizes\nsizes.lg = Large\nsizes.m = Default\nsizes.sm = Small\nsizes.xs = Extra Small\nstyle = Style\nstyles = Styles\nstyles.btn = Button Style\nstyles.btn.danger = Danger\nstyles.btn.default = Default\nstyles.btn.info = Info\nstyles.btn.primary = Primary\nstyles.btn.success = Success\nstyles.btn.warning = Warning\nsubtype = Type\nsuccess = Success\ntext = Text Field\nthen = Then\ntoggle = Toggle\nungrouped = Un-Grouped\nwarning = Warning\nyes = Yes\nand = and\nor = or\nfield.property.value = value\nfield.property.label = label\nfield.property.valid = valid\nfield.property.invalid = not valid\nfield.property.isVisible = is visible\nfield.property.isNotVisible = is not visible\nnewOptionLabel = New {type}\noperator.visible = visible\noperator.notVisible = not visible\noperator.equals = equals\noperator.notEquals = not equal\noperator.contains = contains\noperator.notContains = not contains\ncondition.target.placeholder = target\nif.condition.target.placeholder = target / value\nif.condition.source.placeholder = source\nthen.condition.target.placeholder = target\ncondition.value.placeholder = value\nattributeNotPermitted = Attribute "{attribute}" is not permitted, please choose another.\n');const El={get editor(){return{stickyControls:!1,allowEdit:!0,dataType:"json",debug:!1,sessionStorage:!1,editorContainer:null,external:{},svgSprite:null,iconFont:null,config:{},events:{},actions:{},controls:{},polyfills:Ji(),i18n:{location:"https://draggable.github.io/formeo/assets/lang/"}}}};let Sl=class{constructor({formData:t,...e},n){const o=this,i=_i(El.editor,e),{actions:r,events:s,debug:a,config:l,editorContainer:c,...d}=i;c&&(this.editorContainer="string"==typeof c?document.querySelector(c):c),this.opts=d,Cl.setOptions=d,gl.config=l,this.userFormData=n||t,this.Components=gl,this.dom=Cl,yl.init({debug:a,...s}),ia.init({debug:a,sessionStorage:d.sessionStorage,...r}),o.loadResources().then((()=>{d.allowEdit&&(o.edit=o.init.bind(o),o.init())}))}get formData(){return this.Components.formData}set formData(t={}){this.load({...this.userFormData,...t},this.opts)}get json(){return this.Components.json}loadResources(){const t=[];return this.opts.polyfills&&(t=>{const e=Array.isArray(t)?c.filter((({name:e})=>-1!==t.indexOf(e))):c;Promise.all(e.map((({src:t})=>Ma(t))))})(this.opts.polyfills),this.opts.style&&t.push(_a(this.opts.style)),this.opts.svgSprite?t.push(Aa(this.opts.svgSprite,ja,(()=>Aa("https://draggable.github.io/formeo/assets/img/formeo-sprite.svg",ja)))):t.push(ja('<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><symbol id="f-i-autocomplete" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M6,5h1v1H6V5z M4,4H3v1h1V4z M6,4H5v1h1V4z M2,5v1h1V5H2z M3,7h1V6H3V7z M5,7h1V6H5V7z M4,5v1h1V5H4z M2,14h1v-1H2V14z M4,14h1v-1H4V14z M6,14h1v-1H6V14z M9,13H8v1h1V13z M16,3.5v4C16,8.3,15.3,9,14.5,9H14v3v3c0,0.6-0.4,1-1,1H1c-0.6,0-1-0.4-1-1V3.5 C0,2.7,0.7,2,1.5,2h3H8V1.5V1H7H6V0.5V0h2.5H11v0.5V1h-1H9v0.5V2h3h2.5C15.3,2,16,2.7,16,3.5z M13,12H7H1v3h12V12z M3,11v-1H2v1H3z M5,11v-1H4v1H5z M15,3.5C15,3.2,14.8,3,14.5,3H9v2.5V8H8.5H8V7.5V7H7V6h1V5.5V5H7V4h1V3.5V3H1.5C1.2,3,1,3.2,1,3.5v4 C1,7.8,1.2,8,1.5,8H8v1H6v0.5V10h2.5H11V9.5V9H9V8h5.5C14.8,8,15,7.8,15,7.5V3.5z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-bin" xmlns="http://www.w3.org/2000/svg"><path d="M4 10v20c0 1.1.9 2 2 2h18c1.1 0 2-.9 2-2v-20h-22zM10 28h-2v-14h2v14zM14 28h-2v-14h2v14zM18 28h-2v-14h2v14zM22 28h-2v-14h2v14zM26.5 4h-6.5v-2.5c0-.825-.675-1.5-1.5-1.5h-7c-.825 0-1.5.675-1.5 1.5v2.5h-6.5c-.825 0-1.5.675-1.5 1.5v2.5h26v-2.5c0-.825-.675-1.5-1.5-1.5zM18 4h-6v-1.975h6v1.975z"/></symbol><symbol id="f-i-button" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><metadata id="acmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="acrect4140" d="M 0.4765625,4 A 0.47706934,0.47706934 0 0 0 0,4.4765625 L 0,11.523438 A 0.47706934,0.47706934 0 0 0 0.4765625,12 L 15.523438,12 A 0.47706934,0.47706934 0 0 0 16,11.523438 L 16,4.4765625 A 0.47706934,0.47706934 0 0 0 15.523438,4 L 0.4765625,4 Z m 0.4765625,0.953125 14.09375,0 0,6.09375 -14.09375,0 0,-6.09375 z"/><g id="aclayer1"><g id="actext4203"><g id="acg4212" transform="translate(0.10112835,0.1001358)"><path id="acpath4208" d="m 6.0690374,6.4093857 q -0.5371093,0 -0.8544922,0.4003906 -0.3149414,0.4003906 -0.3149414,1.0913086 0,0.6884766 0.3149414,1.0888672 0.3173829,0.4003906 0.8544922,0.4003906 0.5371094,0 0.8496094,-0.4003906 0.3149414,-0.4003906 0.3149414,-1.0888672 0,-0.690918 -0.3149414,-1.0913086 -0.3125,-0.4003906 -0.8496094,-0.4003906 z m 0,-0.4003906 q 0.7666016,0 1.225586,0.5151367 0.4589843,0.5126953 0.4589843,1.3769531 0,0.8618164 -0.4589843,1.3769531 -0.4589844,0.5126953 -1.225586,0.5126953 -0.7690429,0 -1.2304687,-0.5126953 -0.4589844,-0.5126953 -0.4589844,-1.3769531 0,-0.8642578 0.4589844,-1.3769531 0.4614258,-0.5151367 1.2304687,-0.5151367 z"/><path id="acpath4210" d="m 8.5250921,6.074913 0.4931641,0 0,1.5405274 1.6357418,-1.5405274 0.634766,0 -1.809082,1.6992188 1.938477,1.9458008 -0.649415,0 -1.7504878,-1.7553711 0,1.7553711 -0.4931641,0 0,-3.6450196 z"/></g></g></g></symbol><symbol viewBox="0 0 32 32" id="f-i-calendar" xmlns="http://www.w3.org/2000/svg"><path d="M12.048 16.961c-0.178 0.257-0.395 0.901-0.652 1.059-0.257 0.157-0.547 0.267-0.869 0.328-0.323 0.062-0.657 0.089-1.002 0.079v1.527h2.467v6.046h1.991v-9.996h-1.584c-0.056 0.381-0.173 0.7-0.351 0.957zM23 8h2c0.553 0 1-0.448 1-1v-6c0-0.552-0.447-1-1-1h-2c-0.553 0-1 0.448-1 1v6c0 0.552 0.447 1 1 1zM7 8h2c0.552 0 1-0.448 1-1v-6c0-0.552-0.448-1-1-1h-2c-0.552 0-1 0.448-1 1v6c0 0.552 0.448 1 1 1zM30 4h-2v5c0 0.552-0.447 1-1 1h-6c-0.553 0-1-0.448-1-1v-5h-8v5c0 0.552-0.448 1-1 1h-6c-0.552 0-1-0.448-1-1v-5h-2c-1.104 0-2 0.896-2 2v24c0 1.104 0.896 2 2 2h28c1.104 0 2-0.896 2-2v-24c0-1.104-0.896-2-2-2zM30 29c0 0.553-0.447 1-1 1h-26c-0.552 0-1-0.447-1-1v-16c0-0.552 0.448-1 1-1h26c0.553 0 1 0.448 1 1v16zM15.985 17.982h4.968c-0.936 1.152-1.689 2.325-2.265 3.705-0.575 1.381-0.638 2.818-0.749 4.312h2.131c0.009-0.666-0.195-1.385-0.051-2.156 0.146-0.771 0.352-1.532 0.617-2.285 0.267-0.752 0.598-1.461 0.996-2.127 0.396-0.667 0.853-1.229 1.367-1.686v-1.742h-7.015v1.979z"/></symbol><symbol id="f-i-checkbox" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M13.5,5v8c0,0.8-0.7,1.5-1.5,1.5H3c-0.8,0-1.5-0.7-1.5-1.5V4c0-0.8,0.7-1.5,1.5-1.5h9c0.7,0,1.3,0.5,1.5,1.2l2.4-1.4L13.5,5 z M12.5,6.2L7.7,12L2.8,5.5l4.9,1.6l4.8-2.9V4c0-0.3-0.2-0.5-0.5-0.5H3C2.7,3.5,2.5,3.7,2.5,4v9c0,0.3,0.2,0.5,0.5,0.5h9 c0.3,0,0.5-0.2,0.5-0.5V6.2z"/></symbol><symbol id="f-i-checkbox-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M6,5v1h9V5H6z M15,14v-1H6v1H15z M6,10h9V9H6V10z M4,12l-2.5,1.5L0,13l1.5,2L4,12z M4,8 L1.5,9.5L0,9l1.5,2L4,8z M4,4L1.5,5.5L0,5l1.5,2L4,4z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-columns" xmlns="http://www.w3.org/2000/svg"><metadata id="agmetadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="agrect4860-3-5" d="M 16,0.5 A 0.50004997,0.50004997 0 0 0 15.5,0 l -5,0 -5,0 -5,0 A 0.50004997,0.50004997 0 0 0 0,0.5 l 0,15 A 0.50004997,0.50004997 0 0 0 0.5,16 l 5,0 5,0 5,0 A 0.50004997,0.50004997 0 0 0 16,15.5 l 0,-15 z M 15,1 15,15 11,15 11,1 15,1 Z M 10,1 10,15 6,15 6,1 10,1 Z M 5,1 5,15 1,15 1,1 5,1 Z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-copy" xmlns="http://www.w3.org/2000/svg"><path d="M20 8v-8h-14l-6 6v18h12v8h20v-24h-12zM6 2.828v3.172h-3.172l3.172-3.172zM2 22v-14h6v-6h10v6l-6 6v8h-10zM18 10.828v3.172h-3.172l3.172-3.172zM30 30h-16v-14h6v-6h10v20z"/></symbol><symbol id="f-i-divider" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><metadata id="aimetadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><rect y="7" x="0" height="1" width="15" id="airect4182"/></symbol><symbol viewBox="0 0 28 32" id="f-i-edit" xmlns="http://www.w3.org/2000/svg"><path d="M22 2l-4 4 6 6 4-4-6-6zM0 24l0.021 6.018 5.979-0.018 16-16-6-6-16 16zM6 28h-4v-4h2v2h2v2z"/></symbol><symbol viewBox="0 0 32 32" id="f-i-floppy-disk" xmlns="http://www.w3.org/2000/svg"><path d="M28 0h-28v32h32v-28l-4-4zM16 4h4v8h-4v-8zM28 28h-24v-24h2v10h18v-10h2.343l1.657 1.657v22.343z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-handle" xmlns="http://www.w3.org/2000/svg"><metadata id="almetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="translate(0,-2)" id="alg4220"><rect id="alrect4191" width="2" height="2" x="2" y="7"/><rect id="alrect4191-2" width="2" height="2" x="7" y="7"/><rect id="alrect4191-4" width="2" height="2" x="12" y="7"/></g><g transform="translate(0,2)" id="alg4220-6"><rect id="alrect4191-40" width="2" height="2" x="2" y="7"/><rect id="alrect4191-2-3" width="2" height="2" x="7" y="7"/><rect id="alrect4191-4-9" width="2" height="2" x="12" y="7"/></g></symbol><symbol viewBox="0 0 448 512" id="f-i-hash" xmlns="http://www.w3.org/2000/svg"><g id="amicomoon-ignore"/><path d="M448 192v-64h-80.064l16-128h-64l-16 128h-127.968l16-128h-64l-16 128h-111.968v64h103.968l-15.968 128h-88v64h80l-16 128h64l16-128h127.968l-16 128h64.032l16-128h112v-64h-104l15.936-128h88.064zM279.968 320h-127.968l15.968-128h127.968l-15.968 128z"/></symbol><symbol viewBox="0 0 28 28" id="f-i-header" xmlns="http://www.w3.org/2000/svg"><path d="M26.281 26q-0.688 0-2.070-0.055t-2.086-0.055q-0.688 0-2.063 0.055t-2.063 0.055q-0.375 0-0.578-0.32t-0.203-0.711q0-0.484 0.266-0.719t0.609-0.266 0.797-0.109 0.703-0.234q0.516-0.328 0.516-2.188l-0.016-6.109q0-0.328-0.016-0.484-0.203-0.063-0.781-0.063h-10.547q-0.594 0-0.797 0.063-0.016 0.156-0.016 0.484l-0.016 5.797q0 2.219 0.578 2.562 0.25 0.156 0.75 0.203t0.891 0.055 0.703 0.234 0.313 0.711q0 0.406-0.195 0.75t-0.57 0.344q-0.734 0-2.18-0.055t-2.164-0.055q-0.672 0-2 0.055t-1.984 0.055q-0.359 0-0.555-0.328t-0.195-0.703q0-0.469 0.242-0.703t0.562-0.273 0.742-0.117 0.656-0.234q0.516-0.359 0.516-2.234l-0.016-0.891v-12.703q0-0.047 0.008-0.406t0-0.57-0.023-0.602-0.055-0.656-0.102-0.57-0.172-0.492-0.25-0.281q-0.234-0.156-0.703-0.187t-0.828-0.031-0.641-0.219-0.281-0.703q0-0.406 0.187-0.75t0.562-0.344q0.719 0 2.164 0.055t2.164 0.055q0.656 0 1.977-0.055t1.977-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.266 0.68t-0.602 0.227-0.773 0.063-0.672 0.203q-0.547 0.328-0.547 2.5l0.016 5q0 0.328 0.016 0.5 0.203 0.047 0.609 0.047h10.922q0.391 0 0.594-0.047 0.016-0.172 0.016-0.5l0.016-5q0-2.172-0.547-2.5-0.281-0.172-0.914-0.195t-1.031-0.203-0.398-0.773q0-0.406 0.195-0.75t0.586-0.344q0.688 0 2.063 0.055t2.063 0.055q0.672 0 2.016-0.055t2.016-0.055q0.391 0 0.586 0.344t0.195 0.75q0 0.469-0.273 0.688t-0.625 0.227-0.805 0.047-0.688 0.195q-0.547 0.359-0.547 2.516l0.016 14.734q0 1.859 0.531 2.188 0.25 0.156 0.719 0.211t0.836 0.070 0.648 0.242 0.281 0.695q0 0.406-0.187 0.75t-0.562 0.344z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-hidden" xmlns="http://www.w3.org/2000/svg"><metadata id="aometadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><path id="aopath5816" d="M 1,5 2,5 2,4 1,4 Z"/><path id="aopath5814" d="M 3,5 4,5 4,4 3,4 Z"/><path id="aopath5812" d="M 5,5 6,5 6,4 5,4 Z"/><path id="aopath5810" d="M 7,5 8,5 8,4 7,4 Z"/><path id="aopath5808" d="M 9,5 10,5 10,4 9,4 Z"/><path id="aopath5806" d="m 11,5 1,0 0,-1 -1,0 z"/><path id="aopath5804" d="m 13,5 1,0 0,-1 -1,0 z"/><path id="aopath5800" d="M 0,6 1,6 1,5 0,5 Z"/><path id="aopath5798" d="m 15,6.9997352 1,0 0,-1 -1,0 z"/><path id="aopath5796" d="M 0,8 1,8 1,7 0,7 Z"/><path id="aopath5794" d="m 15,8.9997352 1,0 0,-1 -1,0 z"/><path id="aopath5792" d="m 0,10 1,0 0,-1.0000001 -1,0 z"/><path id="aopath5790" d="m 15,10.999735 1,0 0,-0.9999998 -1,0 z"/><path id="aopath5786" d="m 2,12 1,0 0,-1 -1,0 z"/><path id="aopath5784" d="m 4,12 1,0 0,-1 -1,0 z"/><path id="aopath5782" d="m 6,12 1,0 0,-1 -1,0 z"/><path id="aopath5780" d="m 8,12 1,0 0,-1 -1,0 z"/><path id="aopath5778" d="m 10,12 1,0 0,-1 -1,0 z"/><path id="aopath5776" d="m 12,12 1,0 0,-1 -1,0 z"/><path id="aorect5768" d="m 14,12 1,0 0,-1 -1,0 z"/><path d="m 15,5 1,0 0,-1 -1,0 z" id="aopath5827"/><path d="m 0,12 1,0 0,-1 -1,0 z" id="aopath5829"/></symbol><symbol viewBox="0 0 384 512" id="f-i-menu" xmlns="http://www.w3.org/2000/svg"><g id="apicomoon-ignore"/><path d="M0 96v64h384v-64h-384zM0 288h384v-64h-384v64zM0 416h384v-64h-384v64z"/></symbol><symbol viewBox="0 0 16 32" id="f-i-minus" xmlns="http://www.w3.org/2000/svg"><path d="M0 14v4h16v-4h-16z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move" xmlns="http://www.w3.org/2000/svg"><path d="M287.744 94.736v129.008h128v-64l96.256 96.256-96.256 96.24v-65.488h-128v129.008h64.496l-96.24 96.24-96.256-96.24h64v-129.008h-128v64.992l-95.744-95.744 95.744-95.744v63.488h128v-129.008h-62.496l94.752-94.736 94.752 94.736h-63.008z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-move-vertical" xmlns="http://www.w3.org/2000/svg"><metadata id="armetadata10"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><sodipodi:namedview pagecolor="#ffffff" bordercolor="#666666" borderopacity="1" objecttolerance="10" gridtolerance="10" guidetolerance="10" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:pageopacity="0" inkscape:pageshadow="2" inkscape:window-width="3440" inkscape:window-height="1416" id="arnamedview6" showgrid="false" inkscape:zoom="1.84375" inkscape:cx="421.4312" inkscape:cy="218.56484" inkscape:window-x="0" inkscape:window-y="24" inkscape:window-maximized="1" inkscape:current-layer="svg2" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"/><path d="m 287.744,94.736 0,321.024 64.496,0 L 256,512 l -96.256,-96.24 64,0 0,-321.024 -62.496,0 L 256,0 350.752,94.736 Z" id="arpath4" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" inkscape:connector-curvature="0" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" sodipodi:nodetypes="ccccccccccc"/></symbol><symbol viewBox="0 0 20 28" id="f-i-paragraph" xmlns="http://www.w3.org/2000/svg"><path d="M19.969 2.953v1.141q0 0.453-0.289 0.953t-0.664 0.5q-0.781 0-0.844 0.016-0.406 0.094-0.5 0.484-0.047 0.172-0.047 1v18q0 0.391-0.281 0.672t-0.672 0.281h-1.687q-0.391 0-0.672-0.281t-0.281-0.672v-19.031h-2.234v19.031q0 0.391-0.273 0.672t-0.68 0.281h-1.687q-0.406 0-0.68-0.281t-0.273-0.672v-7.75q-2.297-0.187-3.828-0.922-1.969-0.906-3-2.797-1-1.828-1-4.047 0-2.594 1.375-4.469 1.375-1.844 3.266-2.484 1.734-0.578 6.516-0.578h7.484q0.391 0 0.672 0.281t0.281 0.672z"/></symbol><symbol id="f-i-phone-receiver" viewBox="0 0 578.106 578.106" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><g><g><path d="M577.83,456.128c1.225,9.385-1.635,17.545-8.568,24.48l-81.396,80.781 c-3.672,4.08-8.465,7.551-14.381,10.404c-5.916,2.857-11.729,4.693-17.439,5.508c-0.408,0-1.635,0.105-3.676,0.309 c-2.037,0.203-4.689,0.307-7.953,0.307c-7.754,0-20.301-1.326-37.641-3.979s-38.555-9.182-63.645-19.584 c-25.096-10.404-53.553-26.012-85.376-46.818c-31.823-20.805-65.688-49.367-101.592-85.68 c-28.56-28.152-52.224-55.08-70.992-80.783c-18.768-25.705-33.864-49.471-45.288-71.299 c-11.425-21.828-19.993-41.616-25.705-59.364S4.59,177.362,2.55,164.51s-2.856-22.95-2.448-30.294 c0.408-7.344,0.612-11.424,0.612-12.24c0.816-5.712,2.652-11.526,5.508-17.442s6.324-10.71,10.404-14.382L98.022,8.756 c5.712-5.712,12.24-8.568,19.584-8.568c5.304,0,9.996,1.53,14.076,4.59s7.548,6.834,10.404,11.322l65.484,124.236 c3.672,6.528,4.692,13.668,3.06,21.42c-1.632,7.752-5.1,14.28-10.404,19.584l-29.988,29.988c-0.816,0.816-1.53,2.142-2.142,3.978 s-0.918,3.366-0.918,4.59c1.632,8.568,5.304,18.36,11.016,29.376c4.896,9.792,12.444,21.726,22.644,35.802 s24.684,30.293,43.452,48.653c18.36,18.77,34.68,33.354,48.96,43.76c14.277,10.4,26.215,18.053,35.803,22.949 c9.588,4.896,16.932,7.854,22.031,8.871l7.648,1.531c0.816,0,2.145-0.307,3.979-0.918c1.836-0.613,3.162-1.326,3.979-2.143 l34.883-35.496c7.348-6.527,15.912-9.791,25.705-9.791c6.938,0,12.443,1.223,16.523,3.672h0.611l118.115,69.768 C571.098,441.238,576.197,447.968,577.83,456.128z"/></g></g><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/><g/></symbol><symbol id="f-i-radio-group" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M0,1h16V0H0V1z M0,3h16V2H0V3z M5,6h10V5H5V6z M15,9H5v1h10V9z M15,14v-1H5v1H15z M1.5,7C0.7,7,0,6.3,0,5.5S0.7,4,1.5,4 S3,4.7,3,5.5S2.3,7,1.5,7z M1.5,5C1.2,5,1,5.2,1,5.5S1.2,6,1.5,6S2,5.8,2,5.5S1.8,5,1.5,5z M1.5,11.1C0.7,11.1,0,10.4,0,9.6 s0.7-1.5,1.5-1.5S3,8.7,3,9.6S2.3,11.1,1.5,11.1z M1.5,9.1C1.2,9.1,1,9.3,1,9.6s0.2,0.5,0.5,0.5S2,9.8,2,9.6S1.8,9.1,1.5,9.1z M1.5,15C0.7,15,0,14.3,0,13.5S0.7,12,1.5,12S3,12.7,3,13.5S2.3,15,1.5,15z M1.5,13C1.2,13,1,13.2,1,13.5S1.2,14,1.5,14 S2,13.8,2,13.5S1.8,13,1.5,13z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-remove" xmlns="http://www.w3.org/2000/svg"><metadata id="awmetadata8"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g id="awlayer1"><g transform="translate(170.37199,5.9577983)" id="awg4172"><path id="awrect4155" d="m -159.9194,-18.102955 87.322034,0 0,510.915285 -87.322034,0 z" transform="matrix(0.70710678,-0.70710678,0.70710678,0.70710678,0,0)"/><path id="awrect4155-5" d="m 193.69366,-139.19925 87.32204,0 0,510.91528 -87.32204,0 z" transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"/></g></g></symbol><symbol id="f-i-rich-text" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path d="M15,1H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14c0.6,0,1-0.4,1-1V2C16,1.4,15.6,1,15,1z M1,3.1h0.8v0.3H1V3.1z M1,3.6h0.8 v0.3H1V3.6z M15,14H1V5.1h14V14z M15,4.9H1V4.6h14V4.9z M15,4.4H1V4.1h0.8v0.2h1.5V4.1h1.3v0.2H6V4.1h1.3v0.2h1.5V4.1H10v0.2h1.5 V4.1h1.3v0.2h1.5V4.1H15V4.4z M4.5,3.6v0.3H3.3V3.6H4.5z M3.3,3.4V3.1h1.3v0.3H3.3z M7.3,3.6v0.3H6V3.6H7.3z M6,3.4V3.1h1.3v0.3H6z M10,3.6v0.3H8.8V3.6H10z M8.8,3.4V3.1H10v0.3H8.8z M12.8,3.6v0.3h-1.3V3.6H12.8z M11.5,3.4V3.1h1.3v0.3H11.5z M15,3.9h-0.8V3.6H15 V3.9z M15,3.4h-0.8V3.1H15V3.4z M15,2.9h-0.8V2.8h-1.5v0.2h-1.3V2.8H10v0.2H8.8V2.8H7.3v0.2H6V2.8H4.5v0.2H3.3V2.8H1.8v0.2H1V2.6h14 V2.9z M15,2.4H1V2.1h14V2.4z M3,12v-1h10v1H3z M13,10H3V9h10V10z M11,8H3V7h8V8z"/></symbol><symbol xml:space="preserve" viewBox="0 0 16 16" id="f-i-rows" xmlns="http://www.w3.org/2000/svg"><metadata id="aymetadata4318"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"><cc:Work rdf:about="" xmlns:cc="http://creativecommons.org/ns#"><dc:format xmlns:dc="http://purl.org/dc/elements/1.1/">image/svg+xml</dc:format><dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" xmlns:dc="http://purl.org/dc/elements/1.1/"/><dc:title xmlns:dc="http://purl.org/dc/elements/1.1/"/></cc:Work></rdf:RDF></metadata><g transform="matrix(0,1,-1,0,3.0984025,11.835155)" id="ayg7209"><path id="ayrect4860-3-5" d="m 4.1640625,-12.402344 a 0.50004997,0.50004997 0 0 0 -0.5,-0.5 l -5,0 -5,0 -5.0000005,0 a 0.50004997,0.50004997 0 0 0 -0.5,0.5 l 0,15.0000002 a 0.50004997,0.50004997 0 0 0 0.5,0.5 l 4.9648442,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 4.9648437,0 a 0.50004997,0.50004997 0 0 0 0.035156,0 l 5,0 a 0.50004997,0.50004997 0 0 0 0.5,-0.5 l 0,-15.0000002 z m -1,0.5 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4,0 0,-14.0000002 4,0 z m -5,0 0,14.0000002 -4.0000005,0 0,-14.0000002 4.0000005,0 z"/></g></symbol><symbol id="f-i-select" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="azXMLID_1_" d="M0,0v14h0c0,0.6,0.4,1,1,1h10c0.6,0,1-0.4,1-1h0V5h4V0H0z M1,1h10v3H1V1z M1,7h10v3H1V7z M1,14v-3h10v3H1z M15,4h-3V1h3V4z M2,2h1v1H2V2z M2,12h1v1H2V12z M4,12h1v1H4V12z M6,12h1v1H6V12z M9,12v1H8v-1H9z M2,8h1v1H2V8z M4,8h1v1H4V8z M6,8 h1v1H6V8z M13.5,3.1l-1-1.1h1.9L13.5,3.1z M2,6V5h1v1H2L2,6z M4,6V5h1v1H4L4,6z"/></symbol><symbol viewBox="0 0 448 512" id="f-i-settings" xmlns="http://www.w3.org/2000/svg"><g id="baicomoon-ignore"/><path d="M223.969 175c-44.703 0-80.969 36.266-80.969 81 0 44.688 36.266 81.031 80.969 81.031 44.719 0 80.719-36.344 80.719-81.031-0-44.734-36-81-80.719-81zM386.313 302.531l-14.594 35.156 29.469 57.875-36.094 36.094-59.218-27.969-35.156 14.438-17.844 54.625-2.281 7.25h-51.016l-22.078-61.656-35.156-14.5-57.952 29.344-36.078-36.063 27.938-59.25-14.484-35.125-61.767-20.156v-50.984l61.703-22.109 14.485-35.094-25.953-51.234-3.422-6.719 36.031-36.031 59.297 27.922 35.109-14.516 17.828-54.594 2.297-7.234h51l22.094 61.734 35.063 14.516 58.031-29.406 36.063 36.031-27.938 59.203 14.438 35.172 61.875 20.125v50.969l-61.688 22.187z"/></symbol><symbol id="f-i-text-input" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bbXMLID_10_" d="M15,4H4.5V3H6V2H4.5h-1H2v1h1.5v1H1C0.4,4,0,4.5,0,5v6c0,0.6,0.4,1,1,1h2.5v1H2v1h4v-1H4.5v-1H15 c0.6,0,1-0.4,1-1V5C16,4.5,15.6,4,15,4z M1,11V5h2.5v6H1z M15,11H4.5V5H15V11z"/></symbol><symbol id="f-i-textarea" viewBox="0 0 16 16" xml:space="preserve" xmlns="http://www.w3.org/2000/svg"><path id="bcXMLID_1_" d="M3,11v-1h8v1H3L3,11z M3,7h10V6H3V7L3,7z M3,8v1h10V8H3L3,8z M13,4H3v1h10V4L13,4z M16,14V2c0-0.6-0.4-1-1-1 H1C0.4,1,0,1.4,0,2v12c0,0.6,0.4,1,1,1h14C15.6,15,16,14.6,16,14z M15,2v12H1V2H15z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-down" xmlns="http://www.w3.org/2000/svg"><path d="M0 12l11.992 11.992 11.992-11.992h-23.984z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-left" xmlns="http://www.w3.org/2000/svg"><path d="M0 15.996l11.992 11.992v-23.984l-11.992 11.992z"/></symbol><symbol viewBox="0 0 12 32" id="f-i-triangle-right" xmlns="http://www.w3.org/2000/svg"><path d="M0.002 4.008l11.992 11.992-11.992 11.992v-23.984z"/></symbol><symbol viewBox="0 0 24 32" id="f-i-triangle-up" xmlns="http://www.w3.org/2000/svg"><path d="M11.992 8l-11.992 11.992h23.984l-11.992-11.992z"/></symbol><symbol viewBox="0 0 512 512" id="f-i-upload" xmlns="http://www.w3.org/2000/svg"><g id="bhicomoon-ignore"/><path d="M240 352h-240v128h480v-128h-240zM448 416h-64v-32h64v32zM112 160l128-128 128 128h-80v160h-96v-160z"/></symbol></svg>')),t.push(a.init({...this.opts.i18n,locale:ki.get(j)})),Promise.all(t)}init(){const t=this;this.load(this.userFormData,t.opts),this.controls=Fa.init(t.opts.controls,t.opts.stickyControls),t.formId=gl.get("id"),this.i18n={setLang:e=>{ki.set(j,e);a.setCurrent(e).then((()=>{this.controls=Fa.init(t.opts.controls),t.render()}),console.error)}},t.render()}load(t=this.userFormData,e=this.opts){return this.Components.load(t,e)}render(){const t=document.createElement("script");t.src="https://cdnjs.cloudflare.com/ajax/libs/tinymce/4.9.11/tinymce.min.js",document.head.appendChild(t),this.stages=Object.values(gl.get("stages")),this.opts.controlOnLeft&&this.stages.forEach((t=>{t.dom.style.order=1}));const e={attrs:{className:"formeo formeo-editor",id:this.formId},content:[this.stages.map((({dom:t})=>t))]};a.current.dir&&(e.attrs.dir=a.current.dir,Cl.dir=a.current.dir),this.editor=Cl.create(e);(this.controls.container||this.editor).appendChild(this.controls.dom),this.editorContainer&&(Cl.empty(this.editorContainer),this.editorContainer.appendChild(this.editor)),yl.formeoLoaded=new window.CustomEvent("formeoLoaded",{detail:{formeo:this}}),document.dispatchEvent(yl.formeoLoaded)}};var Ol=Me,Nl=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},Ml=function(t){return this.__data__.has(t)};function _l(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Ol;++e<n;)this.add(t[e])}_l.prototype.add=_l.prototype.push=Nl,_l.prototype.has=Ml;var jl=_l,Al=function(t,e){for(var n=-1,o=null==t?0:t.length;++n<o;)if(e(t[n],n,t))return!0;return!1},Dl=function(t,e){return t.has(e)};var kl=function(t,e,n,o,i,r){var s=1&n,a=t.length,l=e.length;if(a!=l&&!(s&&l>a))return!1;var c=r.get(t),d=r.get(e);if(c&&d)return c==e&&d==t;var h=-1,u=!0,p=2&n?new jl:void 0;for(r.set(t,e),r.set(e,t);++h<a;){var m=t[h],g=e[h];if(o)var f=s?o(g,m,h,e,t,r):o(m,g,h,t,e,r);if(void 0!==f){if(f)continue;u=!1;break}if(p){if(!Al(e,(function(t,e){if(!Dl(p,e)&&(m===t||i(m,t,n,o,r)))return p.push(e)}))){u=!1;break}}else if(m!==g&&!i(m,g,n,o,r)){u=!1;break}}return r.delete(t),r.delete(e),u};var Tl=nn,zl=W,Pl=kl,Ll=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,o){n[++e]=[o,t]})),n},$l=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n},Hl=mt?mt.prototype:void 0,Vl=Hl?Hl.valueOf:void 0;var Il=function(t,e,n,o,i,r,s){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!r(new Tl(t),new Tl(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return zl(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var a=Ll;case"[object Set]":var l=1&o;if(a||(a=$l),t.size!=e.size&&!l)return!1;var c=s.get(t);if(c)return c==e;o|=2,s.set(t,e);var d=Pl(a(t),a(e),o,i,r,s);return s.delete(t),d;case"[object Symbol]":if(Vl)return Vl.call(t)==Vl.call(e)}return!1};var Fl=function(t,e){for(var n=-1,o=e.length,i=t.length;++n<o;)t[i+n]=e[n];return t},Bl=_n;var Rl=function(t,e,n){var o=e(t);return Bl(t)?o:Fl(o,n(t))};var Wl=function(t,e){for(var n=-1,o=null==t?0:t.length,i=0,r=[];++n<o;){var s=t[n];e(s,n,t)&&(r[i++]=s)}return r},ql=function(){return[]},Ul=Object.prototype.propertyIsEnumerable,Gl=Object.getOwnPropertySymbols,Xl=Gl?function(t){return null==t?[]:(t=Object(t),Wl(Gl(t),(function(e){return Ul.call(t,e)})))}:ql,Yl=hn(Object.keys,Object),Zl=mn,Jl=Yl,Kl=Object.prototype.hasOwnProperty;var Ql=Eo,tc=function(t){if(!Zl(t))return Jl(t);var e=[];for(var n in Object(t))Kl.call(t,n)&&"constructor"!=n&&e.push(n);return e},ec=kn;var nc=Rl,oc=Xl,ic=function(t){return ec(t)?Ql(t):tc(t)};var rc=function(t){return nc(t,ic,oc)},sc=Object.prototype.hasOwnProperty;var ac=function(t,e,n,o,i,r){var s=1&n,a=rc(t),l=a.length;if(l!=rc(e).length&&!s)return!1;for(var c=l;c--;){var d=a[c];if(!(s?d in e:sc.call(e,d)))return!1}var h=r.get(t),u=r.get(e);if(h&&u)return h==e&&u==t;var p=!0;r.set(t,e),r.set(e,t);for(var m=s;++c<l;){var g=t[d=a[c]],f=e[d];if(o)var v=s?o(f,g,d,e,t,r):o(g,f,d,t,e,r);if(!(void 0===v?g===f||i(g,f,n,o,r):v)){p=!1;break}m||(m="constructor"==d)}if(p&&!m){var b=t.constructor,y=e.constructor;b==y||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof y&&y instanceof y||(p=!1)}return r.delete(t),r.delete(e),p},lc=Xt(pt,"DataView"),cc=Yt,dc=Xt(pt,"Promise"),hc=Xt(pt,"Set"),uc=Xt(pt,"WeakMap"),pc=Ot,mc=Pt,gc="[object Map]",fc="[object Promise]",vc="[object Set]",bc="[object WeakMap]",yc="[object DataView]",wc=mc(lc),xc=mc(cc),Cc=mc(dc),Ec=mc(hc),Sc=mc(uc),Oc=pc;(lc&&Oc(new lc(new ArrayBuffer(1)))!=yc||cc&&Oc(new cc)!=gc||dc&&Oc(dc.resolve())!=fc||hc&&Oc(new hc)!=vc||uc&&Oc(new uc)!=bc)&&(Oc=function(t){var e=pc(t),n="[object Object]"==e?t.constructor:void 0,o=n?mc(n):"";if(o)switch(o){case wc:return yc;case xc:return gc;case Cc:return fc;case Ec:return vc;case Sc:return bc}return e});var Nc=He,Mc=kl,_c=Il,jc=ac,Ac=Oc,Dc=_n,kc=Hn,Tc=ro,zc="[object Arguments]",Pc="[object Array]",Lc="[object Object]",$c=Object.prototype.hasOwnProperty;var Hc=function(t,e,n,o,i,r){var s=Dc(t),a=Dc(e),l=s?Pc:Ac(t),c=a?Pc:Ac(e),d=(l=l==zc?Lc:l)==Lc,h=(c=c==zc?Lc:c)==Lc,u=l==c;if(u&&kc(t)){if(!kc(e))return!1;s=!0,d=!1}if(u&&!d)return r||(r=new Nc),s||Tc(t)?Mc(t,e,n,o,i,r):_c(t,e,l,n,o,i,r);if(!(1&n)){var p=d&&$c.call(t,"__wrapped__"),m=h&&$c.call(e,"__wrapped__");if(p||m){var g=p?t.value():t,f=m?e.value():e;return r||(r=new Nc),i(g,f,n,o,r)}}return!!u&&(r||(r=new Nc),jc(t,e,n,o,i,r))},Vc=yn;var Ic=function t(e,n,o,i,r){return e===n||(null==e||null==n||!Vc(e)&&!Vc(n)?e!=e&&n!=n:Hc(e,n,o,i,t,r))},Fc=Ic;const Bc=B((function(t,e){return Fc(t,e)})),Rc=t=>{const e=t.match(V);return e&&e[0]||t},Wc=t=>t.replace(V,Mi());let qc=class{constructor(t,n={}){e(this,"render",((t=this.form)=>{this.form=t;const e=document.getElementsByClassName("formeo-render").length,n={id:this.form.id,className:`formeo-render formeo formeo-rendered-${e}`,children:this.processedData};this.renderedForm=Cl.render(n),Cl.empty(this.container),this.applyConditions(),this.container.appendChild(this.renderedForm)})),e(this,"orderChildren",((t,e)=>e.reduce(((e,n)=>[...e,this.form[t][n]]),[]))),e(this,"prefixId",(t=>"f-"+t)),e(this,"processColumn",(({id:t,...e})=>Object.assign({},e,{id:this.prefixId(t),children:this.processFields(e.children),style:`width: ${e.config.width||"100%"}`}))),e(this,"processRows",(t=>this.orderChildren("rows",this.form.stages[t].children).reduce(((t,e)=>e?[...t,this.processRow(e)]:t),[]))),e(this,"cacheComponent",(t=>(this.components[Rc(t.id)]=t,t))),e(this,"processRow",((t,e="row")=>{const{config:n,id:o}=t,i=[`formeo-${e}-wrap`],r=Object.assign({},t,{children:this.processColumns(t.id),id:this.prefixId(o)});this.cacheComponent(r);const s=[{condition:n.legend,result:()=>({tag:n.fieldset?"legend":"h3",children:n.legend})},{condition:!0,result:()=>r},{condition:n.inputGroup,result:()=>this.addButton(o)}].reduce(((t,{condition:e,result:n})=>e?[...t,n()]:t),[]);return n.inputGroup&&i.push("f-input-group-wrap"),{tag:n.fieldset?"fieldset":"div",id:Mi(),className:i,children:s}})),e(this,"cloneComponentData",(t=>{const{children:e=[],id:n,...o}=this.components[t];return Object.assign({},o,{id:Wc(n),children:e.length&&e.map((({id:t})=>this.cloneComponentData(Rc(t))))})})),e(this,"addButton",(t=>Cl.render({tag:"button",attrs:{className:"add-input-group btn pull-right",type:"button"},children:"Add +",action:{click:e=>{const n=e.target.parentElement,o=Cl.render(this.cloneComponentData(t));n.insertBefore(o,n.lastChild),o.appendChild(Cl.render(Cl.btnTemplate({className:"remove-input-group",children:Cl.icon("remove"),action:{mouseover:({target:t})=>t.parentElement.classList.add("will-remove"),mouseleave:({target:t})=>t.parentElement.classList.remove("will-remove"),click:({target:t})=>t.parentElement.remove()}})))}}}))),e(this,"processColumns",(t=>this.orderChildren("columns",this.form.rows[t].children).map((t=>this.cacheComponent(this.processColumn(t)))))),e(this,"processFields",(t=>this.orderChildren("fields",t).map((({id:t,...e})=>this.cacheComponent(Object.assign({},e,{id:this.prefixId(t)})))))),e(this,"applyConditions",(()=>{Object.values(this.components).forEach((({conditions:t})=>{t&&t.forEach(((t,e)=>{const{if:n,then:o}=t;n.forEach((t=>{const{source:e,...n}=t;if(Ti(e)){this.getComponents(e).forEach((t=>{const e=Uc(t);e&&t.addEventListener(e,(t=>this.evaluateCondition(n,t)&&o.forEach((e=>this.execResult(e,t)))),!1);const i={target:t};this.evaluateCondition(n,i)&&o.forEach((t=>this.execResult(t,i)))}))}}))}))}))})),e(this,"evaluateCondition",(({sourceProperty:t,targetProperty:e,comparison:n,target:o},i)=>{const r={equals:Bc,notEquals:(t,e)=>!Bc(t,e),contains:(t,e)=>t.includes(e),notContains:(t,e)=>!t.includes(e)},s=String(i.target[t]),a=String(Ti(o)?this.getComponent(o)[e]:o);return r[n]&&r[n](s,a)})),e(this,"execResult",(({assignment:t,target:e,targetProperty:n,value:o})=>{const i={equals:t=>{const e={value:()=>{t[n]=o},isNotVisible:()=>{t.parentElement.setAttribute("hidden",!0),t.required=!1},isVisible:()=>{t.parentElement.removeAttribute("hidden"),t.required=t._required}};e[n]&&e[n]()}};if(Ti(e)){const n=this.getComponent(e);n&&void 0===n._required&&(n._required=n.required),i[t]&&i[t](n)}})),e(this,"getComponent",(t=>{const e=t.slice(t.indexOf(".")+1);return zi(t)?this.external[e]:this.renderedForm.querySelector(`#f-${e}`)})),e(this,"getComponents",(t=>{const e=[],n=t.slice(t.indexOf(".")+1);return zi(t)?e.push(this.external[n]):e.push(...this.renderedForm.querySelectorAll(`[name=f-${n}]`)),e}));const{renderContainer:o,external:i}=(({editorContainer:t,renderContainer:e,...n})=>{const o=t=>"string"==typeof t?document.querySelector(t):t,i={renderContainer:o(e),editorContainer:o(t)};return Object.assign({},n,i)})(t);this.container=o,this.form=n,this.external=i,this.dom=Cl,this.components=Object.create(null)}get processedData(){return Object.values(this.form.stages).map((t=>(t.children=this.processRows(t.id),t.className=h,Cl.render(t))))}};const Uc=t=>{const[e]=[["input",t=>["textarea","text"].includes(t.type)],["change",t=>["select"].includes(t.tagName.toLowerCase())||["checkbox","radio"].includes(t.type)]].find((e=>e[1](t)))||[!1];return e};void 0!==window&&(window.FormeoEditor=Sl,window.FormeoRenderer=qc);const Gc=Sl,Xc=qc;exports.FormeoEditor=Gc,exports.FormeoRenderer=Xc;
|
|
Binary file
|