const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./AdminFormAdSize-CBcSO9bQ.mjs","./AdminFormIntegerInput-DKuTatiN.mjs","./FieldBase_Number-Ce0ejyvY.mjs","./FieldBase-BNePpS9o.mjs","./B99hAA0T.js","./entry.BvUViiwM.css","./AdminFormIntegerInput.DdLZNpfu.css","./FieldBase_Array-CHUaXNeM.mjs","./AdminFormAdSize.-b_rNP9x.css","./AdminFormCheckbox-COS-BJES.mjs","./FieldBase_Boolean-DrQk3JKY.mjs","./AdminFormCheckbox.BZc2EvKh.css","./AdminFormCheckboxes-CAIN3kwq.mjs","./AdminFormCheckboxes.VI9QpUd2.css","./AdminFormCodeEditor-CuQVALrL.mjs","./AdminFormCodeMirror-B_dI68G4.mjs","./AdminFormCodeMirror.DcHJb8MN.css","./FieldBase_String-DIrYardi.mjs","./AdminFormCodeEditor.DhJIxvR9.css","./AdminFormColorPicker-DLkEKoUh.mjs","./AdminFormColorPicker.7Isk1LrD.css","./AdminFormColorPickerAdvanced-Cu9qPe8x.mjs","./AdminFormColorPickerAdvanced.CCYWNTem.css","./AdminFormColorSchemeSelect-Dui6oG_B.mjs","./AdminFormColorSchemeSelect.D8kz5xVW.css","./AdminFormColorSelect-DVNEbBUv.mjs","./AdminFormSelect-DUQ7P0na.mjs","./AdminButtonElement-CFvSRhn0.mjs","./AdminButtonElement.BRDNsFha.css","./WebSearchFilterCount-D1W84BcB.mjs","./WebSearchFilterCount.Dg-IpFLX.css","./vue-select-BBy8B9ai.mjs","./vue-select.Bsn8s1tw.css","./AdminFormSelect.CLXsa__g.css","./AdminFormColorSelect.BeduIFe_.css","./AdminFormContentImageSelect-CxO4c2cR.mjs","./AdminDigitalMediaLibrary-Bmhj8TGj.mjs","./AdminForm-DJkTrbxe.mjs","./clone-BDJrkjcZ.mjs","./_Uint8Array-DRrh_-as.mjs","./AdminForm.TmnA33RA.css","./AdminPageSideContent-DTRPcveA.mjs","./AdminPageSideContent.UPEVfWsb.css","./WebViewToggle-BM4ctxx_.mjs","./WebViewToggle.A8GoSVJz.css","./WebSearchLimit-DiU__JZm.mjs","./WebSearchLimit.Dxhcawp9.css","./AdminItemCard-Df7dnTKx.mjs","./nuxt-link-BtojSIA_.mjs","./AdminPageTitle-CR9bBUrZ.mjs","./AdminPageTitle.DCYMXW2Y.css","./AdminItemCard.CE2lFGrY.css","./AdminPane-eaVYEXN2.mjs","./AdminPane.9Twad7C-.css","./AdminPager-BUwQX7OU.mjs","./Pager-g3IcdjjD.mjs","./AdminPager.Cz7EodUP.css","./AdminUploadToDigitalMediaLibrary-CVH-BdgT.mjs","./SliderToggle-Cbq8v4hm.mjs","./SliderToggle.U47powXH.css","./AdminUploadToDigitalMediaLibrary.BzIwqBS3.css","./AdminPageWrapper-Clpf5EDi.mjs","./AdminToolbar-gnQp0twh.mjs","./WebSearchField-DDSw5zpi.mjs","./WebSearchField.B0k4fZ6M.css","./Modal-CYe9mI6x.mjs","./Modal.BoAUBYby.css","./AdminToolbar.zexZRxD0.css","./AdminPageWrapper.DYQy1xNV.css","./AdminDigitalMediaLibrary.C8U8q8ag.css","./AdminFormContentImageSelect.CfzN_FZx.css","./AdminFormContentSelect-meL3KlQk.mjs","./useContentSearch-D0swwuV6.mjs","./index-DX1YqM3A.mjs","./useStringUtils-B4L5WUsu.mjs","./AdminFormDateInput-BL4vZwI-.mjs","./AdminFormDateInput.BMWJvGwf.css","./AdminFormDigitalMediaLibraryUpload-DBo6esFI.mjs","./AdminFormDigitalMediaLibraryUpload.D63TJNxh.css","./AdminFormEmailInput-Bj1RAGwY.mjs","./AdminFormEmailInput.Dh93Zalw.css","./AdminFormFileInput-DkXBE37W.mjs","./AdminFormFileInput.ezfNIFfc.css","./AdminFormFilterMode-JSzNJ9BL.mjs","./FieldBase_Object-BzXbC_qU.mjs","./AdminFormFilterMode.D7O7aQ0L.css","./AdminFormImageInput-o4182A4M.mjs","./AdminFormImageInput.5jWsnFIr.css","./AdminFormLinkInput-D0fvC4Gw.mjs","./AdminFormTextInput-BbvK-LRh.mjs","./AdminFormTextInput.D8oKKyLC.css","./AdminFormMagazineSelect-NQSzf5nn.mjs","./isEqual-1aZurtt5.mjs","./_baseIsEqual-EgPqa0xe.mjs","./AdminFormMagazineSelect.CbxNQcSO.css","./AdminFormMenuLinkGroup-ZbxfLCl_.mjs","./AdminFormNlFilterMode-X0sBmcAr.mjs","./AdminFormNlFilterMode.CHF6BDJx.css","./AdminFormOmedaDemographicQuestionSelect-K3VktA4y.mjs","./AdminFormOmedaProductSelect-Cv8V7-fS.mjs","./AdminFormPasswordInput-MKZmj66U.mjs","./AdminFormPasswordInput.BoqHLwVP.css","./AdminFormRadioGroup-DnHtSSI1.mjs","./AdminFormRadioGroup.Dn1BT-3j.css","./AdminFormReadOnlyInput-8i9bj-TN.mjs","./AdminFormReadOnlyInput.B1VMFTYk.css","./AdminFormRichTextEditor-CLAime6J.mjs","./AdminFormRichTextEditor.CtS-ze1D.css","./AdminFormRowLayout-C7tXtk2h.mjs","./AdminFormRowLayout.Df9wTc1v.css","./AdminFormSectionLabel-C7m0NFII.mjs","./AdminFormSectionLabel.BrACH2AD.css","./AdminFormSiteTheme-Dubz-vLF.mjs","./AdminFormSiteTheme.Dk7GLJHz.css","./AdminFormTaxonomySelectPlusCreate-D1Xx1M30.mjs","./AdminTaxonomyTermEditForm-A7cO3aPW.mjs","./AdminTaxonomyTermEditForm.B0BQPKxb.css","./AdminFormTaxonomySelectPlusCreate.DuEYD3F-.css","./AdminFormToggleInput-1WjUjQQ3.mjs","./AdminFormToggleInput.VxB2ftQQ.css","./AdminFormVerifyPassword-5J4DeNyk.mjs","./AdminFormVerifyPassword.D2xSNRnj.css","./NewsletterAdCompanySelect-B5yiD34m.mjs","./NewsletterAdCompanySelect.2O2gjiWF.css"])))=>i.map(i=>d[i]); import{_ as et,o as w,c as T,F as tt,x as St,t as Ve,l as x,v as on,b as ce,s as mt,ai as pt,a as H,a0 as Tt,y as he,q as qe,d as ge,N as an,aa as ln,f as Bt,a3 as sn,a2 as At,G as un,aj as Me,ak as dn,ah as fn,K as cn,al as hn,L as y}from"./B99hAA0T.js";import{u as mn,_ as pn}from"./AdminButtonElement-CFvSRhn0.mjs";const gn={props:{error:{type:Object}}},_n={key:0,class:"ebm-field-error"};function vn(t,e,n,i,r,o){return n.error&&!n.error.valid?(w(),T("ul",_n,[(w(!0),T(tt,null,St(n.error.errors,a=>(w(),T("li",{key:a},Ve(a),1))),128))])):x("",!0)}const Jt=et(gn,[["render",vn]]),bn=Object.freeze(Object.defineProperty({__proto__:null,default:Jt},Symbol.toStringTag,{value:"Module"})),yn={name:"FieldWrapper",components:{Tooltip:on},props:{field:{type:Object},labelStyle:{type:String,default:"label"},hasError:{type:Boolean,default:!1},labelFormat:{type:String,default:"standard"}},emits:["changeState"],data(){return{fieldExpanded:this.field.expanded===!0}},computed:{required(){var t;return((t=this.field)==null?void 0:t.required)??!1}},methods:{toggleExpanded(){this.fieldExpanded=!this.fieldExpanded,this.$emit("changeState",this.field.name,{expanded:this.fieldExpanded})}}},En=["innerHTML"],Sn={class:"field"},wn=["open"],Dn={class:"field"};function On(t,e,n,i,r,o){const a=Bt;return w(),T("div",{class:he(["ebm-field-wrapper",o.required?"required":"",n.labelStyle==="label"&&n.field.label?"ebm-field-wrapper--align-labels":n.labelStyle==="auto"?"ebm-field-wrapper--auto-label":n.labelStyle==="label"?"ebm-field-wrapper--no-label":"",`${n.labelFormat}-label`])},[n.labelStyle==="label"||n.labelStyle==="auto"||!n.field.label?(w(),T(tt,{key:0},[n.field.label?(w(),ce(pt(n.field.description?"Tooltip":"span"),{key:0,class:"ebm-field-wrapper__label",text:n.field.description},{default:mt(()=>[n.field.label?(w(),T("label",{key:0,innerHTML:n.field.label},null,8,En)):x("",!0)]),_:1},8,["text"])):x("",!0),H("div",{class:he(["ebm-field-wrapper__field",n.field.groupToggleStyle==="icon"?"group-toggle-icon":""])},[H("div",Sn,[Tt(t.$slots,"default")]),n.field.groupToggleStyle==="icon"?(w(),ce(a,{key:0,icon:n.field.icon,width:22,class:"icon",onClick:o.toggleExpanded},null,8,["icon","onClick"])):x("",!0)],2)],64)):x("",!0),n.labelStyle==="details"&&n.field.label?(w(),T("div",{key:1,class:"details",open:r.fieldExpanded},[H("div",{class:he(["label",n.hasError?"has-error":""]),onClick:e[0]||(e[0]=(...l)=>o.toggleExpanded&&o.toggleExpanded(...l))},[qe(Ve(n.field.label)+" ",1),ge(a,{icon:r.fieldExpanded?"ic:outline-expand-less":"ic:outline-expand-more",width:24},null,8,["icon"])],2),an(H("div",Dn,[Tt(t.$slots,"default")],512),[[ln,r.fieldExpanded]])],8,wn)):x("",!0)],2)}const Xt=et(yn,[["render",On]]),In=Object.freeze(Object.defineProperty({__proto__:null,default:Xt},Symbol.toStringTag,{value:"Module"}));/*! * vue-draggable-next v2.2.0 * (c) 2023 Anish George * @license MIT *//**! * Sortable 1.14.0 * @author RubaXa <trash@rubaxa.org> * @author owenm <owen23355@gmail.com> * @license MIT */function Ct(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(r){return Object.getOwnPropertyDescriptor(t,r).enumerable})),n.push.apply(n,i)}return n}function K(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(n),!0).forEach(function(i){Tn(t,i,n[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Ct(Object(n)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(n,i))})}return t}function Ye(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Ye=function(e){return typeof e}:Ye=function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ye(t)}function Tn(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function $(){return $=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},$.apply(this,arguments)}function An(t,e){if(t==null)return{};var n={},i=Object.keys(t),r,o;for(o=0;o<i.length;o++)r=i[o],!(e.indexOf(r)>=0)&&(n[r]=t[r]);return n}function Cn(t,e){if(t==null)return{};var n=An(t,e),i,r;if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(r=0;r<o.length;r++)i=o[r],!(e.indexOf(i)>=0)&&Object.prototype.propertyIsEnumerable.call(t,i)&&(n[i]=t[i])}return n}var Fn="1.14.0";function Z(t){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(t)}var ee=Z(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),Le=Z(/Edge/i),Ft=Z(/firefox/i),Ce=Z(/safari/i)&&!Z(/chrome/i)&&!Z(/android/i),Yt=Z(/iP(ad|od|hone)/i),xn=Z(/chrome/i)&&Z(/android/i),Gt={capture:!1,passive:!1};function S(t,e,n){t.addEventListener(e,n,!ee&&Gt)}function E(t,e,n){t.removeEventListener(e,n,!ee&&Gt)}function Ue(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{return!1}return!1}}function Pn(t){return t.host&&t!==document&&t.host.nodeType?t.host:t.parentNode}function q(t,e,n,i){if(t){n=n||document;do{if(e!=null&&(e[0]===">"?t.parentNode===n&&Ue(t,e):Ue(t,e))||i&&t===n)return t;if(t===n)break}while(t=Pn(t))}return null}var xt=/\s+/g;function j(t,e,n){if(t&&e)if(t.classList)t.classList[n?"add":"remove"](e);else{var i=(" "+t.className+" ").replace(xt," ").replace(" "+e+" "," ");t.className=(i+(n?" "+e:"")).replace(xt," ")}}function g(t,e,n){var i=t&&t.style;if(i){if(n===void 0)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(t,""):t.currentStyle&&(n=t.currentStyle),e===void 0?n:n[e];!(e in i)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),i[e]=n+(typeof n=="string"?"":"px")}}function be(t,e){var n="";if(typeof t=="string")n=t;else do{var i=g(t,"transform");i&&i!=="none"&&(n=i+" "+n)}while(!e&&(t=t.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function Ht(t,e,n){if(t){var i=t.getElementsByTagName(e),r=0,o=i.length;if(n)for(;r<o;r++)n(i[r],r);return i}return[]}function U(){var t=document.scrollingElement;return t||document.documentElement}function F(t,e,n,i,r){if(!(!t.getBoundingClientRect&&t!==window)){var o,a,l,s,u,c,f;if(t!==window&&t.parentNode&&t!==U()?(o=t.getBoundingClientRect(),a=o.top,l=o.left,s=o.bottom,u=o.right,c=o.height,f=o.width):(a=0,l=0,s=window.innerHeight,u=window.innerWidth,c=window.innerHeight,f=window.innerWidth),(e||n)&&t!==window&&(r=r||t.parentNode,!ee))do if(r&&r.getBoundingClientRect&&(g(r,"transform")!=="none"||n&&g(r,"position")!=="static")){var h=r.getBoundingClientRect();a-=h.top+parseInt(g(r,"border-top-width")),l-=h.left+parseInt(g(r,"border-left-width")),s=a+o.height,u=l+o.width;break}while(r=r.parentNode);if(i&&t!==window){var b=be(r||t),m=b&&b.a,p=b&&b.d;b&&(a/=p,l/=m,f/=m,c/=p,s=a+c,u=l+f)}return{top:a,left:l,bottom:s,right:u,width:f,height:c}}}function Pt(t,e,n){for(var i=oe(t,!0),r=F(t)[e];i;){var o=F(i)[n],a=void 0;if(a=r>=o,!a)return i;if(i===U())break;i=oe(i,!1)}return!1}function ye(t,e,n,i){for(var r=0,o=0,a=t.children;o<a.length;){if(a[o].style.display!=="none"&&a[o]!==_.ghost&&(i||a[o]!==_.dragged)&&q(a[o],n.draggable,t,!1)){if(r===e)return a[o];r++}o++}return null}function wt(t,e){for(var n=t.lastElementChild;n&&(n===_.ghost||g(n,"display")==="none"||e&&!Ue(n,e));)n=n.previousElementSibling;return n||null}function Y(t,e){var n=0;if(!t||!t.parentNode)return-1;for(;t=t.previousElementSibling;)t.nodeName.toUpperCase()!=="TEMPLATE"&&t!==_.clone&&(!e||Ue(t,e))&&n++;return n}function Nt(t){var e=0,n=0,i=U();if(t)do{var r=be(t),o=r.a,a=r.d;e+=t.scrollLeft*o,n+=t.scrollTop*a}while(t!==i&&(t=t.parentNode));return[e,n]}function Nn(t,e){for(var n in t)if(t.hasOwnProperty(n)){for(var i in e)if(e.hasOwnProperty(i)&&e[i]===t[n][i])return Number(n)}return-1}function oe(t,e){if(!t||!t.getBoundingClientRect)return U();var n=t,i=!1;do if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=g(n);if(n.clientWidth<n.scrollWidth&&(r.overflowX=="auto"||r.overflowX=="scroll")||n.clientHeight<n.scrollHeight&&(r.overflowY=="auto"||r.overflowY=="scroll")){if(!n.getBoundingClientRect||n===document.body)return U();if(i||e)return n;i=!0}}while(n=n.parentNode);return U()}function Vn(t,e){if(t&&e)for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}function it(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)}var Fe;function Wt(t,e){return function(){if(!Fe){var n=arguments,i=this;n.length===1?t.call(i,n[0]):t.apply(i,n),Fe=setTimeout(function(){Fe=void 0},e)}}}function Ln(){clearTimeout(Fe),Fe=void 0}function zt(t,e,n){t.scrollLeft+=e,t.scrollTop+=n}function qt(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)}var J="Sortable"+new Date().getTime();function Rn(){var t=[],e;return{captureAnimationState:function(){if(t=[],!!this.options.animation){var i=[].slice.call(this.el.children);i.forEach(function(r){if(!(g(r,"display")==="none"||r===_.ghost)){t.push({target:r,rect:F(r)});var o=K({},t[t.length-1].rect);if(r.thisAnimationDuration){var a=be(r,!0);a&&(o.top-=a.f,o.left-=a.e)}r.fromRect=o}})}},addAnimationState:function(i){t.push(i)},removeAnimationState:function(i){t.splice(Nn(t,{target:i}),1)},animateAll:function(i){var r=this;if(!this.options.animation){clearTimeout(e),typeof i=="function"&&i();return}var o=!1,a=0;t.forEach(function(l){var s=0,u=l.target,c=u.fromRect,f=F(u),h=u.prevFromRect,b=u.prevToRect,m=l.rect,p=be(u,!0);p&&(f.top-=p.f,f.left-=p.e),u.toRect=f,u.thisAnimationDuration&&it(h,f)&&!it(c,f)&&(m.top-f.top)/(m.left-f.left)===(c.top-f.top)/(c.left-f.left)&&(s=Mn(m,h,b,r.options)),it(f,c)||(u.prevFromRect=c,u.prevToRect=f,s||(s=r.options.animation),r.animate(u,m,f,s)),s&&(o=!0,a=Math.max(a,s),clearTimeout(u.animationResetTimer),u.animationResetTimer=setTimeout(function(){u.animationTime=0,u.prevFromRect=null,u.fromRect=null,u.prevToRect=null,u.thisAnimationDuration=null},s),u.thisAnimationDuration=s)}),clearTimeout(e),o?e=setTimeout(function(){typeof i=="function"&&i()},a):typeof i=="function"&&i(),t=[]},animate:function(i,r,o,a){if(a){g(i,"transition",""),g(i,"transform","");var l=be(this.el),s=l&&l.a,u=l&&l.d,c=(r.left-o.left)/(s||1),f=(r.top-o.top)/(u||1);i.animatingX=!!c,i.animatingY=!!f,g(i,"transform","translate3d("+c+"px,"+f+"px,0)"),this.forRepaintDummy=kn(i),g(i,"transition","transform "+a+"ms"+(this.options.easing?" "+this.options.easing:"")),g(i,"transform","translate3d(0,0,0)"),typeof i.animated=="number"&&clearTimeout(i.animated),i.animated=setTimeout(function(){g(i,"transition",""),g(i,"transform",""),i.animated=!1,i.animatingX=!1,i.animatingY=!1},a)}}}}function kn(t){return t.offsetWidth}function Mn(t,e,n,i){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))*i.animation}var me=[],rt={initializeByDefault:!0},Re={mount:function(e){for(var n in rt)rt.hasOwnProperty(n)&&!(n in e)&&(e[n]=rt[n]);me.forEach(function(i){if(i.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),me.push(e)},pluginEvent:function(e,n,i){var r=this;this.eventCanceled=!1,i.cancel=function(){r.eventCanceled=!0};var o=e+"Global";me.forEach(function(a){n[a.pluginName]&&(n[a.pluginName][o]&&n[a.pluginName][o](K({sortable:n},i)),n.options[a.pluginName]&&n[a.pluginName][e]&&n[a.pluginName][e](K({sortable:n},i)))})},initializePlugins:function(e,n,i,r){me.forEach(function(l){var s=l.pluginName;if(!(!e.options[s]&&!l.initializeByDefault)){var u=new l(e,n,e.options);u.sortable=e,u.options=e.options,e[s]=u,$(i,u.defaults)}});for(var o in e.options)if(e.options.hasOwnProperty(o)){var a=this.modifyOption(e,o,e.options[o]);typeof a<"u"&&(e.options[o]=a)}},getEventProperties:function(e,n){var i={};return me.forEach(function(r){typeof r.eventProperties=="function"&&$(i,r.eventProperties.call(n[r.pluginName],e))}),i},modifyOption:function(e,n,i){var r;return me.forEach(function(o){e[o.pluginName]&&o.optionListeners&&typeof o.optionListeners[n]=="function"&&(r=o.optionListeners[n].call(e[o.pluginName],i))}),r}};function jn(t){var e=t.sortable,n=t.rootEl,i=t.name,r=t.targetEl,o=t.cloneEl,a=t.toEl,l=t.fromEl,s=t.oldIndex,u=t.newIndex,c=t.oldDraggableIndex,f=t.newDraggableIndex,h=t.originalEvent,b=t.putSortable,m=t.extraEventProperties;if(e=e||n&&n[J],!!e){var p,L=e.options,X="on"+i.charAt(0).toUpperCase()+i.substr(1);window.CustomEvent&&!ee&&!Le?p=new CustomEvent(i,{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent(i,!0,!0)),p.to=a||n,p.from=l||n,p.item=r||n,p.clone=o,p.oldIndex=s,p.newIndex=u,p.oldDraggableIndex=c,p.newDraggableIndex=f,p.originalEvent=h,p.pullMode=b?b.lastPutMode:void 0;var A=K(K({},m),Re.getEventProperties(i,e));for(var k in A)p[k]=A[k];n&&n.dispatchEvent(p),L[X]&&L[X].call(e,p)}}var Bn=["evt"],R=function(e,n){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},r=i.evt,o=Cn(i,Bn);Re.pluginEvent.bind(_)(e,n,K({dragEl:d,parentEl:O,ghostEl:v,rootEl:D,nextEl:fe,lastDownEl:Ge,cloneEl:I,cloneHidden:re,dragStarted:Ie,putSortable:P,activeSortable:_.active,originalEvent:r,oldIndex:ve,oldDraggableIndex:xe,newIndex:B,newDraggableIndex:ie,hideGhostForTarget:Zt,unhideGhostForTarget:$t,cloneNowHidden:function(){re=!0},cloneNowShown:function(){re=!1},dispatchSortableEvent:function(l){V({sortable:n,name:l,originalEvent:r})}},o))};function V(t){jn(K({putSortable:P,cloneEl:I,targetEl:d,rootEl:D,oldIndex:ve,oldDraggableIndex:xe,newIndex:B,newDraggableIndex:ie},t))}var d,O,v,D,fe,Ge,I,re,ve,B,xe,ie,je,P,_e=!1,Ke=!1,Qe=[],ue,G,ot,at,Vt,Lt,Ie,pe,Pe,Ne=!1,Be=!1,He,N,lt=[],gt=!1,Ze=[],nt=typeof document<"u",Je=Yt,Rt=Le||ee?"cssFloat":"float",Jn=nt&&!xn&&!Yt&&"draggable"in document.createElement("div"),Ut=function(){if(nt){if(ee)return!1;var t=document.createElement("x");return t.style.cssText="pointer-events:auto",t.style.pointerEvents==="auto"}}(),Kt=function(e,n){var i=g(e),r=parseInt(i.width)-parseInt(i.paddingLeft)-parseInt(i.paddingRight)-parseInt(i.borderLeftWidth)-parseInt(i.borderRightWidth),o=ye(e,0,n),a=ye(e,1,n),l=o&&g(o),s=a&&g(a),u=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+F(o).width,c=s&&parseInt(s.marginLeft)+parseInt(s.marginRight)+F(a).width;if(i.display==="flex")return i.flexDirection==="column"||i.flexDirection==="column-reverse"?"vertical":"horizontal";if(i.display==="grid")return i.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(o&&l.float&&l.float!=="none"){var f=l.float==="left"?"left":"right";return a&&(s.clear==="both"||s.clear===f)?"vertical":"horizontal"}return o&&(l.display==="block"||l.display==="flex"||l.display==="table"||l.display==="grid"||u>=r&&i[Rt]==="none"||a&&i[Rt]==="none"&&u+c>r)?"vertical":"horizontal"},Xn=function(e,n,i){var r=i?e.left:e.top,o=i?e.right:e.bottom,a=i?e.width:e.height,l=i?n.left:n.top,s=i?n.right:n.bottom,u=i?n.width:n.height;return r===l||o===s||r+a/2===l+u/2},Yn=function(e,n){var i;return Qe.some(function(r){var o=r[J].options.emptyInsertThreshold;if(!(!o||wt(r))){var a=F(r),l=e>=a.left-o&&e<=a.right+o,s=n>=a.top-o&&n<=a.bottom+o;if(l&&s)return i=r}}),i},Qt=function(e){function n(o,a){return function(l,s,u,c){var f=l.options.group.name&&s.options.group.name&&l.options.group.name===s.options.group.name;if(o==null&&(a||f))return!0;if(o==null||o===!1)return!1;if(a&&o==="clone")return o;if(typeof o=="function")return n(o(l,s,u,c),a)(l,s,u,c);var h=(a?l:s).options.group.name;return o===!0||typeof o=="string"&&o===h||o.join&&o.indexOf(h)>-1}}var i={},r=e.group;(!r||Ye(r)!="object")&&(r={name:r}),i.name=r.name,i.checkPull=n(r.pull,!0),i.checkPut=n(r.put),i.revertClone=r.revertClone,e.group=i},Zt=function(){!Ut&&v&&g(v,"display","none")},$t=function(){!Ut&&v&&g(v,"display","")};nt&&document.addEventListener("click",function(t){if(Ke)return t.preventDefault(),t.stopPropagation&&t.stopPropagation(),t.stopImmediatePropagation&&t.stopImmediatePropagation(),Ke=!1,!1},!0);var de=function(e){if(d){e=e.touches?e.touches[0]:e;var n=Yn(e.clientX,e.clientY);if(n){var i={};for(var r in e)e.hasOwnProperty(r)&&(i[r]=e[r]);i.target=i.rootEl=n,i.preventDefault=void 0,i.stopPropagation=void 0,n[J]._onDragOver(i)}}},Gn=function(e){d&&d.parentNode[J]._isOutsideThisEl(e.target)};function _(t,e){if(!(t&&t.nodeType&&t.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(t));this.el=t,this.options=e=$({},e),t[J]=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 Kt(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(a,l){a.setData("Text",l.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:_.supportPointer!==!1&&"PointerEvent"in window&&!Ce,emptyInsertThreshold:5};Re.initializePlugins(this,t,n);for(var i in n)!(i in e)&&(e[i]=n[i]);Qt(e);for(var r in this)r.charAt(0)==="_"&&typeof this[r]=="function"&&(this[r]=this[r].bind(this));this.nativeDraggable=e.forceFallback?!1:Jn,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?S(t,"pointerdown",this._onTapStart):(S(t,"mousedown",this._onTapStart),S(t,"touchstart",this._onTapStart)),this.nativeDraggable&&(S(t,"dragover",this),S(t,"dragenter",this)),Qe.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),$(this,Rn())}_.prototype={constructor:_,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(pe=null)},_getDirection:function(e,n){return typeof this.options.direction=="function"?this.options.direction.call(this,e,n,d):this.options.direction},_onTapStart:function(e){if(e.cancelable){var n=this,i=this.el,r=this.options,o=r.preventOnFilter,a=e.type,l=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,s=(l||e).target,u=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||s,c=r.filter;if(Zn(i),!d&&!(/mousedown|pointerdown/.test(a)&&e.button!==0||r.disabled)&&!u.isContentEditable&&!(!this.nativeDraggable&&Ce&&s&&s.tagName.toUpperCase()==="SELECT")&&(s=q(s,r.draggable,i,!1),!(s&&s.animated)&&Ge!==s)){if(ve=Y(s),xe=Y(s,r.draggable),typeof c=="function"){if(c.call(this,e,s,this)){V({sortable:n,rootEl:u,name:"filter",targetEl:s,toEl:i,fromEl:i}),R("filter",n,{evt:e}),o&&e.cancelable&&e.preventDefault();return}}else if(c&&(c=c.split(",").some(function(f){if(f=q(u,f.trim(),i,!1),f)return V({sortable:n,rootEl:f,name:"filter",targetEl:s,fromEl:i,toEl:i}),R("filter",n,{evt:e}),!0}),c)){o&&e.cancelable&&e.preventDefault();return}r.handle&&!q(u,r.handle,i,!1)||this._prepareDragStart(e,l,s)}}},_prepareDragStart:function(e,n,i){var r=this,o=r.el,a=r.options,l=o.ownerDocument,s;if(i&&!d&&i.parentNode===o){var u=F(i);if(D=o,d=i,O=d.parentNode,fe=d.nextSibling,Ge=i,je=a.group,_.dragged=d,ue={target:d,clientX:(n||e).clientX,clientY:(n||e).clientY},Vt=ue.clientX-u.left,Lt=ue.clientY-u.top,this._lastX=(n||e).clientX,this._lastY=(n||e).clientY,d.style["will-change"]="all",s=function(){if(R("delayEnded",r,{evt:e}),_.eventCanceled){r._onDrop();return}r._disableDelayedDragEvents(),!Ft&&r.nativeDraggable&&(d.draggable=!0),r._triggerDragStart(e,n),V({sortable:r,name:"choose",originalEvent:e}),j(d,a.chosenClass,!0)},a.ignore.split(",").forEach(function(c){Ht(d,c.trim(),st)}),S(l,"dragover",de),S(l,"mousemove",de),S(l,"touchmove",de),S(l,"mouseup",r._onDrop),S(l,"touchend",r._onDrop),S(l,"touchcancel",r._onDrop),Ft&&this.nativeDraggable&&(this.options.touchStartThreshold=4,d.draggable=!0),R("delayStart",this,{evt:e}),a.delay&&(!a.delayOnTouchOnly||n)&&(!this.nativeDraggable||!(Le||ee))){if(_.eventCanceled){this._onDrop();return}S(l,"mouseup",r._disableDelayedDrag),S(l,"touchend",r._disableDelayedDrag),S(l,"touchcancel",r._disableDelayedDrag),S(l,"mousemove",r._delayedDragTouchMoveHandler),S(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&S(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(s,a.delay)}else s()}},_delayedDragTouchMoveHandler:function(e){var n=e.touches?e.touches[0]:e;Math.max(Math.abs(n.clientX-this._lastX),Math.abs(n.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){d&&st(d),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._disableDelayedDrag),E(e,"touchend",this._disableDelayedDrag),E(e,"touchcancel",this._disableDelayedDrag),E(e,"mousemove",this._delayedDragTouchMoveHandler),E(e,"touchmove",this._delayedDragTouchMoveHandler),E(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,n){n=n||e.pointerType=="touch"&&e,!this.nativeDraggable||n?this.options.supportPointer?S(document,"pointermove",this._onTouchMove):n?S(document,"touchmove",this._onTouchMove):S(document,"mousemove",this._onTouchMove):(S(d,"dragend",this),S(D,"dragstart",this._onDragStart));try{document.selection?We(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,n){if(_e=!1,D&&d){R("dragStarted",this,{evt:n}),this.nativeDraggable&&S(document,"dragover",Gn);var i=this.options;!e&&j(d,i.dragClass,!1),j(d,i.ghostClass,!0),_.active=this,e&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:n})}else this._nulling()},_emulateDragOver:function(){if(G){this._lastX=G.clientX,this._lastY=G.clientY,Zt();for(var e=document.elementFromPoint(G.clientX,G.clientY),n=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(G.clientX,G.clientY),e!==n);)n=e;if(d.parentNode[J]._isOutsideThisEl(e),n)do{if(n[J]){var i=void 0;if(i=n[J]._onDragOver({clientX:G.clientX,clientY:G.clientY,target:e,rootEl:n}),i&&!this.options.dragoverBubble)break}e=n}while(n=n.parentNode);$t()}},_onTouchMove:function(e){if(ue){var n=this.options,i=n.fallbackTolerance,r=n.fallbackOffset,o=e.touches?e.touches[0]:e,a=v&&be(v,!0),l=v&&a&&a.a,s=v&&a&&a.d,u=Je&&N&&Nt(N),c=(o.clientX-ue.clientX+r.x)/(l||1)+(u?u[0]-lt[0]:0)/(l||1),f=(o.clientY-ue.clientY+r.y)/(s||1)+(u?u[1]-lt[1]:0)/(s||1);if(!_.active&&!_e){if(i&&Math.max(Math.abs(o.clientX-this._lastX),Math.abs(o.clientY-this._lastY))<i)return;this._onDragStart(e,!0)}if(v){a?(a.e+=c-(ot||0),a.f+=f-(at||0)):a={a:1,b:0,c:0,d:1,e:c,f};var h="matrix(".concat(a.a,",").concat(a.b,",").concat(a.c,",").concat(a.d,",").concat(a.e,",").concat(a.f,")");g(v,"webkitTransform",h),g(v,"mozTransform",h),g(v,"msTransform",h),g(v,"transform",h),ot=c,at=f,G=o}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!v){var e=this.options.fallbackOnBody?document.body:D,n=F(d,!0,Je,!0,e),i=this.options;if(Je){for(N=e;g(N,"position")==="static"&&g(N,"transform")==="none"&&N!==document;)N=N.parentNode;N!==document.body&&N!==document.documentElement?(N===document&&(N=U()),n.top+=N.scrollTop,n.left+=N.scrollLeft):N=U(),lt=Nt(N)}v=d.cloneNode(!0),j(v,i.ghostClass,!1),j(v,i.fallbackClass,!0),j(v,i.dragClass,!0),g(v,"transition",""),g(v,"transform",""),g(v,"box-sizing","border-box"),g(v,"margin",0),g(v,"top",n.top),g(v,"left",n.left),g(v,"width",n.width),g(v,"height",n.height),g(v,"opacity","0.8"),g(v,"position",Je?"absolute":"fixed"),g(v,"zIndex","100000"),g(v,"pointerEvents","none"),_.ghost=v,e.appendChild(v),g(v,"transform-origin",Vt/parseInt(v.style.width)*100+"% "+Lt/parseInt(v.style.height)*100+"%")}},_onDragStart:function(e,n){var i=this,r=e.dataTransfer,o=i.options;if(R("dragStart",this,{evt:e}),_.eventCanceled){this._onDrop();return}R("setupClone",this),_.eventCanceled||(I=qt(d),I.draggable=!1,I.style["will-change"]="",this._hideClone(),j(I,this.options.chosenClass,!1),_.clone=I),i.cloneId=We(function(){R("clone",i),!_.eventCanceled&&(i.options.removeCloneOnHide||D.insertBefore(I,d),i._hideClone(),V({sortable:i,name:"clone"}))}),!n&&j(d,o.dragClass,!0),n?(Ke=!0,i._loopId=setInterval(i._emulateDragOver,50)):(E(document,"mouseup",i._onDrop),E(document,"touchend",i._onDrop),E(document,"touchcancel",i._onDrop),r&&(r.effectAllowed="move",o.setData&&o.setData.call(i,r,d)),S(document,"drop",i),g(d,"transform","translateZ(0)")),_e=!0,i._dragStartId=We(i._dragStarted.bind(i,n,e)),S(document,"selectstart",i),Ie=!0,Ce&&g(document.body,"user-select","none")},_onDragOver:function(e){var n=this.el,i=e.target,r,o,a,l=this.options,s=l.group,u=_.active,c=je===s,f=l.sort,h=P||u,b,m=this,p=!1;if(gt)return;function L(Oe,nn){R(Oe,m,K({evt:e,isOwner:c,axis:b?"vertical":"horizontal",revert:a,dragRect:r,targetRect:o,canSort:f,fromSortable:h,target:i,completed:A,onMove:function(It,rn){return Xe(D,n,d,r,It,F(It),e,rn)},changed:k},nn))}function X(){L("dragOverAnimationCapture"),m.captureAnimationState(),m!==h&&h.captureAnimationState()}function A(Oe){return L("dragOverCompleted",{insertion:Oe}),Oe&&(c?u._hideClone():u._showClone(m),m!==h&&(j(d,P?P.options.ghostClass:u.options.ghostClass,!1),j(d,l.ghostClass,!0)),P!==m&&m!==_.active?P=m:m===_.active&&P&&(P=null),h===m&&(m._ignoreWhileAnimating=i),m.animateAll(function(){L("dragOverAnimationComplete"),m._ignoreWhileAnimating=null}),m!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(i===d&&!d.animated||i===n&&!i.animated)&&(pe=null),!l.dragoverBubble&&!e.rootEl&&i!==document&&(d.parentNode[J]._isOutsideThisEl(e.target),!Oe&&de(e)),!l.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),p=!0}function k(){B=Y(d),ie=Y(d,l.draggable),V({sortable:m,name:"change",toEl:n,newIndex:B,newDraggableIndex:ie,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),i=q(i,l.draggable,n,!0),L("dragOver"),_.eventCanceled)return p;if(d.contains(e.target)||i.animated&&i.animatingX&&i.animatingY||m._ignoreWhileAnimating===i)return A(!1);if(Ke=!1,u&&!l.disabled&&(c?f||(a=O!==D):P===this||(this.lastPutMode=je.checkPull(this,u,d,e))&&s.checkPut(this,u,d,e))){if(b=this._getDirection(e,i)==="vertical",r=F(d),L("dragOverValid"),_.eventCanceled)return p;if(a)return O=D,X(),this._hideClone(),L("revert"),_.eventCanceled||(fe?D.insertBefore(d,fe):D.appendChild(d)),A(!0);var W=wt(n,l.draggable);if(!W||qn(e,b,this)&&!W.animated){if(W===d)return A(!1);if(W&&n===e.target&&(i=W),i&&(o=F(i)),Xe(D,n,d,r,i,o,e,!!i)!==!1)return X(),n.appendChild(d),O=n,k(),A(!0)}else if(W&&zn(e,b,this)){var ae=ye(n,0,l,!0);if(ae===d)return A(!1);if(i=ae,o=F(i),Xe(D,n,d,r,i,o,e,!1)!==!1)return X(),n.insertBefore(d,ae),O=n,k(),A(!0)}else if(i.parentNode===n){o=F(i);var z=0,le,Ee=d.parentNode!==n,M=!Xn(d.animated&&d.toRect||r,i.animated&&i.toRect||o,b),Se=b?"top":"left",te=Pt(i,"top","top")||Pt(d,"top","top"),we=te?te.scrollTop:void 0;pe!==i&&(le=o[Se],Ne=!1,Be=!M&&l.invertSwap||Ee),z=Un(e,i,o,b,M?1:l.swapThreshold,l.invertedSwapThreshold==null?l.swapThreshold:l.invertedSwapThreshold,Be,pe===i);var Q;if(z!==0){var se=Y(d);do se-=z,Q=O.children[se];while(Q&&(g(Q,"display")==="none"||Q===v))}if(z===0||Q===i)return A(!1);pe=i,Pe=z;var De=i.nextElementSibling,ne=!1;ne=z===1;var ke=Xe(D,n,d,r,i,o,e,ne);if(ke!==!1)return(ke===1||ke===-1)&&(ne=ke===1),gt=!0,setTimeout(Wn,30),X(),ne&&!De?n.appendChild(d):i.parentNode.insertBefore(d,ne?De:i),te&&zt(te,0,we-te.scrollTop),O=d.parentNode,le!==void 0&&!Be&&(He=Math.abs(le-F(i)[Se])),k(),A(!0)}if(n.contains(d))return A(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){E(document,"mousemove",this._onTouchMove),E(document,"touchmove",this._onTouchMove),E(document,"pointermove",this._onTouchMove),E(document,"dragover",de),E(document,"mousemove",de),E(document,"touchmove",de)},_offUpEvents:function(){var e=this.el.ownerDocument;E(e,"mouseup",this._onDrop),E(e,"touchend",this._onDrop),E(e,"pointerup",this._onDrop),E(e,"touchcancel",this._onDrop),E(document,"selectstart",this)},_onDrop:function(e){var n=this.el,i=this.options;if(B=Y(d),ie=Y(d,i.draggable),R("drop",this,{evt:e}),O=d&&d.parentNode,B=Y(d),ie=Y(d,i.draggable),_.eventCanceled){this._nulling();return}_e=!1,Be=!1,Ne=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),_t(this.cloneId),_t(this._dragStartId),this.nativeDraggable&&(E(document,"drop",this),E(n,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),Ce&&g(document.body,"user-select",""),g(d,"transform",""),e&&(Ie&&(e.cancelable&&e.preventDefault(),!i.dropBubble&&e.stopPropagation()),v&&v.parentNode&&v.parentNode.removeChild(v),(D===O||P&&P.lastPutMode!=="clone")&&I&&I.parentNode&&I.parentNode.removeChild(I),d&&(this.nativeDraggable&&E(d,"dragend",this),st(d),d.style["will-change"]="",Ie&&!_e&&j(d,P?P.options.ghostClass:this.options.ghostClass,!1),j(d,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:O,newIndex:null,newDraggableIndex:null,originalEvent:e}),D!==O?(B>=0&&(V({rootEl:O,name:"add",toEl:O,fromEl:D,originalEvent:e}),V({sortable:this,name:"remove",toEl:O,originalEvent:e}),V({rootEl:O,name:"sort",toEl:O,fromEl:D,originalEvent:e}),V({sortable:this,name:"sort",toEl:O,originalEvent:e})),P&&P.save()):B!==ve&&B>=0&&(V({sortable:this,name:"update",toEl:O,originalEvent:e}),V({sortable:this,name:"sort",toEl:O,originalEvent:e})),_.active&&((B==null||B===-1)&&(B=ve,ie=xe),V({sortable:this,name:"end",toEl:O,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){R("nulling",this),D=d=O=v=fe=I=Ge=re=ue=G=Ie=B=ie=ve=xe=pe=Pe=P=je=_.dragged=_.ghost=_.clone=_.active=null,Ze.forEach(function(e){e.checked=!0}),Ze.length=ot=at=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":d&&(this._onDragOver(e),Hn(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],n,i=this.el.children,r=0,o=i.length,a=this.options;r<o;r++)n=i[r],q(n,a.draggable,this.el,!1)&&e.push(n.getAttribute(a.dataIdAttr)||Qn(n));return e},sort:function(e,n){var i={},r=this.el;this.toArray().forEach(function(o,a){var l=r.children[a];q(l,this.options.draggable,r,!1)&&(i[o]=l)},this),n&&this.captureAnimationState(),e.forEach(function(o){i[o]&&(r.removeChild(i[o]),r.appendChild(i[o]))}),n&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,n){return q(e,n||this.options.draggable,this.el,!1)},option:function(e,n){var i=this.options;if(n===void 0)return i[e];var r=Re.modifyOption(this,e,n);typeof r<"u"?i[e]=r:i[e]=n,e==="group"&&Qt(i)},destroy:function(){R("destroy",this);var e=this.el;e[J]=null,E(e,"mousedown",this._onTapStart),E(e,"touchstart",this._onTapStart),E(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(E(e,"dragover",this),E(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(n){n.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),Qe.splice(Qe.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!re){if(R("hideClone",this),_.eventCanceled)return;g(I,"display","none"),this.options.removeCloneOnHide&&I.parentNode&&I.parentNode.removeChild(I),re=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(re){if(R("showClone",this),_.eventCanceled)return;d.parentNode==D&&!this.options.group.revertClone?D.insertBefore(I,d):fe?D.insertBefore(I,fe):D.appendChild(I),this.options.group.revertClone&&this.animate(d,I),g(I,"display",""),re=!1}}};function Hn(t){t.dataTransfer&&(t.dataTransfer.dropEffect="move"),t.cancelable&&t.preventDefault()}function Xe(t,e,n,i,r,o,a,l){var s,u=t[J],c=u.options.onMove,f;return window.CustomEvent&&!ee&&!Le?s=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(s=document.createEvent("Event"),s.initEvent("move",!0,!0)),s.to=e,s.from=t,s.dragged=n,s.draggedRect=i,s.related=r||e,s.relatedRect=o||F(e),s.willInsertAfter=l,s.originalEvent=a,t.dispatchEvent(s),c&&(f=c.call(u,s,a)),f}function st(t){t.draggable=!1}function Wn(){gt=!1}function zn(t,e,n){var i=F(ye(n.el,0,n.options,!0)),r=10;return e?t.clientX<i.left-r||t.clientY<i.top&&t.clientX<i.right:t.clientY<i.top-r||t.clientY<i.bottom&&t.clientX<i.left}function qn(t,e,n){var i=F(wt(n.el,n.options.draggable)),r=10;return e?t.clientX>i.right+r||t.clientX<=i.right&&t.clientY>i.bottom&&t.clientX>=i.left:t.clientX>i.right&&t.clientY>i.top||t.clientX<=i.right&&t.clientY>i.bottom+r}function Un(t,e,n,i,r,o,a,l){var s=i?t.clientY:t.clientX,u=i?n.height:n.width,c=i?n.top:n.left,f=i?n.bottom:n.right,h=!1;if(!a){if(l&&He<u*r){if(!Ne&&(Pe===1?s>c+u*o/2:s<f-u*o/2)&&(Ne=!0),Ne)h=!0;else if(Pe===1?s<c+He:s>f-He)return-Pe}else if(s>c+u*(1-r)/2&&s<f-u*(1-r)/2)return Kn(e)}return h=h||a,h&&(s<c+u*o/2||s>f-u*o/2)?s>c+u/2?1:-1:0}function Kn(t){return Y(d)<Y(t)?1:-1}function Qn(t){for(var e=t.tagName+t.className+t.src+t.href+t.textContent,n=e.length,i=0;n--;)i+=e.charCodeAt(n);return i.toString(36)}function Zn(t){Ze.length=0;for(var e=t.getElementsByTagName("input"),n=e.length;n--;){var i=e[n];i.checked&&Ze.push(i)}}function We(t){return setTimeout(t,0)}function _t(t){return clearTimeout(t)}nt&&S(document,"touchmove",function(t){(_.active||_e)&&t.cancelable&&t.preventDefault()});_.utils={on:S,off:E,css:g,find:Ht,is:function(e,n){return!!q(e,n,e,!1)},extend:Vn,throttle:Wt,closest:q,toggleClass:j,clone:qt,index:Y,nextTick:We,cancelNextTick:_t,detectDirection:Kt,getChild:ye};_.get=function(t){return t[J]};_.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(i){if(!i.prototype||!i.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(i));i.utils&&(_.utils=K(K({},_.utils),i.utils)),Re.mount(i)})};_.create=function(t,e){return new _(t,e)};_.version=Fn;var C=[],Te,vt,bt=!1,ut,dt,$e,Ae;function $n(){function t(){this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0};for(var e in this)e.charAt(0)==="_"&&typeof this[e]=="function"&&(this[e]=this[e].bind(this))}return t.prototype={dragStarted:function(n){var i=n.originalEvent;this.sortable.nativeDraggable?S(document,"dragover",this._handleAutoScroll):this.options.supportPointer?S(document,"pointermove",this._handleFallbackAutoScroll):i.touches?S(document,"touchmove",this._handleFallbackAutoScroll):S(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(n){var i=n.originalEvent;!this.options.dragOverBubble&&!i.rootEl&&this._handleAutoScroll(i)},drop:function(){this.sortable.nativeDraggable?E(document,"dragover",this._handleAutoScroll):(E(document,"pointermove",this._handleFallbackAutoScroll),E(document,"touchmove",this._handleFallbackAutoScroll),E(document,"mousemove",this._handleFallbackAutoScroll)),kt(),ze(),Ln()},nulling:function(){$e=vt=Te=bt=Ae=ut=dt=null,C.length=0},_handleFallbackAutoScroll:function(n){this._handleAutoScroll(n,!0)},_handleAutoScroll:function(n,i){var r=this,o=(n.touches?n.touches[0]:n).clientX,a=(n.touches?n.touches[0]:n).clientY,l=document.elementFromPoint(o,a);if($e=n,i||this.options.forceAutoScrollFallback||Le||ee||Ce){ft(n,this.options,l,i);var s=oe(l,!0);bt&&(!Ae||o!==ut||a!==dt)&&(Ae&&kt(),Ae=setInterval(function(){var u=oe(document.elementFromPoint(o,a),!0);u!==s&&(s=u,ze()),ft(n,r.options,u,i)},10),ut=o,dt=a)}else{if(!this.options.bubbleScroll||oe(l,!0)===U()){ze();return}ft(n,this.options,oe(l,!1),!1)}}},$(t,{pluginName:"scroll",initializeByDefault:!0})}function ze(){C.forEach(function(t){clearInterval(t.pid)}),C=[]}function kt(){clearInterval(Ae)}var ft=Wt(function(t,e,n,i){if(e.scroll){var r=(t.touches?t.touches[0]:t).clientX,o=(t.touches?t.touches[0]:t).clientY,a=e.scrollSensitivity,l=e.scrollSpeed,s=U(),u=!1,c;vt!==n&&(vt=n,ze(),Te=e.scroll,c=e.scrollFn,Te===!0&&(Te=oe(n,!0)));var f=0,h=Te;do{var b=h,m=F(b),p=m.top,L=m.bottom,X=m.left,A=m.right,k=m.width,W=m.height,ae=void 0,z=void 0,le=b.scrollWidth,Ee=b.scrollHeight,M=g(b),Se=b.scrollLeft,te=b.scrollTop;b===s?(ae=k<le&&(M.overflowX==="auto"||M.overflowX==="scroll"||M.overflowX==="visible"),z=W<Ee&&(M.overflowY==="auto"||M.overflowY==="scroll"||M.overflowY==="visible")):(ae=k<le&&(M.overflowX==="auto"||M.overflowX==="scroll"),z=W<Ee&&(M.overflowY==="auto"||M.overflowY==="scroll"));var we=ae&&(Math.abs(A-r)<=a&&Se+k<le)-(Math.abs(X-r)<=a&&!!Se),Q=z&&(Math.abs(L-o)<=a&&te+W<Ee)-(Math.abs(p-o)<=a&&!!te);if(!C[f])for(var se=0;se<=f;se++)C[se]||(C[se]={});(C[f].vx!=we||C[f].vy!=Q||C[f].el!==b)&&(C[f].el=b,C[f].vx=we,C[f].vy=Q,clearInterval(C[f].pid),(we!=0||Q!=0)&&(u=!0,C[f].pid=setInterval((function(){i&&this.layer===0&&_.active._onTouchMove($e);var De=C[this.layer].vy?C[this.layer].vy*l:0,ne=C[this.layer].vx?C[this.layer].vx*l:0;typeof c=="function"&&c.call(_.dragged.parentNode[J],ne,De,t,$e,C[this.layer].el)!=="continue"||zt(C[this.layer].el,ne,De)}).bind({layer:f}),24))),f++}while(e.bubbleScroll&&h!==s&&(h=oe(h,!1)));bt=u}},30),en=function(e){var n=e.originalEvent,i=e.putSortable,r=e.dragEl,o=e.activeSortable,a=e.dispatchSortableEvent,l=e.hideGhostForTarget,s=e.unhideGhostForTarget;if(n){var u=i||o;l();var c=n.changedTouches&&n.changedTouches.length?n.changedTouches[0]:n,f=document.elementFromPoint(c.clientX,c.clientY);s(),u&&!u.el.contains(f)&&(a("spill"),this.onSpill({dragEl:r,putSortable:i}))}};function Dt(){}Dt.prototype={startIndex:null,dragStart:function(e){var n=e.oldDraggableIndex;this.startIndex=n},onSpill:function(e){var n=e.dragEl,i=e.putSortable;this.sortable.captureAnimationState(),i&&i.captureAnimationState();var r=ye(this.sortable.el,this.startIndex,this.options);r?this.sortable.el.insertBefore(n,r):this.sortable.el.appendChild(n),this.sortable.animateAll(),i&&i.animateAll()},drop:en};$(Dt,{pluginName:"revertOnSpill"});function Ot(){}Ot.prototype={onSpill:function(e){var n=e.dragEl,i=e.putSortable,r=i||this.sortable;r.captureAnimationState(),n.parentNode&&n.parentNode.removeChild(n),r.animateAll()},drop:en};$(Ot,{pluginName:"removeOnSpill"});_.mount(new $n);_.mount(Ot,Dt);function ei(){return typeof window<"u"?window.console:globalThis.console}const ti=ei();function ni(t){const e=Object.create(null);return function(i){return e[i]||(e[i]=t(i))}}const ii=/-(\w)/g,Mt=ni(t=>t.replace(ii,(e,n)=>n?n.toUpperCase():""));function ct(t){t.parentElement!==null&&t.parentElement.removeChild(t)}function jt(t,e,n){const i=n===0?t.children[0]:t.children[n-1].nextSibling;t.insertBefore(e,i)}function ri(t,e){return Object.values(t).indexOf(e)}function oi(t,e,n,i){if(!t)return[];const r=Object.values(t),o=e.length-i;return[...e].map((l,s)=>s>=o?r.length:r.indexOf(l))}function tn(t,e){this.$nextTick(()=>this.$emit(t.toLowerCase(),e))}function ai(t){return e=>{this.realList!==null&&this["onDrag"+t](e),tn.call(this,t,e)}}function li(t){return["transition-group","TransitionGroup"].includes(t)}function si(t){if(!t||t.length!==1)return!1;const[{type:e}]=t;return e?li(e.name):!1}function ui(t,e){return e?{...e.props,...e.attrs}:t}const yt=["Start","Add","Remove","Update","End"],Et=["Choose","Unchoose","Sort","Filter","Clone"],di=["Move",...yt,...Et].map(t=>"on"+t);let ht=null;const fi={options:Object,list:{type:Array,required:!1,default:null},noTransitionOnDrag:{type:Boolean,default:!1},clone:{type:Function,default:t=>t},tag:{type:String,default:"div"},move:{type:Function,default:null},componentData:{type:Object,required:!1,default:null},component:{type:String,default:null},modelValue:{type:Array,required:!1,default:null}},ci=sn({name:"VueDraggableNext",inheritAttrs:!1,emits:["update:modelValue","move","change",...yt.map(t=>t.toLowerCase()),...Et.map(t=>t.toLowerCase())],props:fi,data(){return{transitionMode:!1,noneFunctionalComponentMode:!1,headerOffset:0,footerOffset:0,_sortable:{},visibleIndexes:[],context:{}}},render(){const t=this.$slots.default?this.$slots.default():null,e=ui(this.$attrs,this.componentData);return t?(this.transitionMode=si(t),At(this.getTag(),e,t)):At(this.getTag(),e,[])},created(){this.list!==null&&this.modelValue!==null&&ti.error("list props are mutually exclusive! Please set one.")},mounted(){const t={};yt.forEach(r=>{t["on"+r]=ai.call(this,r)}),Et.forEach(r=>{t["on"+r]=tn.bind(this,r)});const e=Object.keys(this.$attrs).reduce((r,o)=>(r[Mt(o)]=this.$attrs[o],r),{}),n=Object.assign({},e,t,{onMove:(r,o)=>this.onDragMove(r,o)});!("draggable"in n)&&(n.draggable=">*");const i=this.$el.nodeType===1?this.$el:this.$el.parentElement;this._sortable=new _(i,n),i.__draggable_component__=this,this.computeIndexes()},beforeUnmount(){try{this._sortable!==void 0&&this._sortable.destroy()}catch{}},computed:{realList(){return this.list?this.list:this.modelValue}},watch:{$attrs:{handler(t){this.updateOptions(t)},deep:!0},realList(){this.computeIndexes()}},methods:{getTag(){return this.component?un(this.component):this.tag},updateOptions(t){for(var e in t){const n=Mt(e);di.indexOf(n)===-1&&this._sortable.option(n,t[e])}},getChildrenNodes(){return this.$el.children},computeIndexes(){this.$nextTick(()=>{this.visibleIndexes=oi(this.getChildrenNodes(),this.$el.children,this.transitionMode,this.footerOffset)})},getUnderlyingVm(t){const e=ri(this.getChildrenNodes()||[],t);if(e===-1)return null;const n=this.realList[e];return{index:e,element:n}},emitChanges(t){this.$nextTick(()=>{this.$emit("change",t)})},alterList(t){if(this.list){t(this.list);return}const e=[...this.modelValue];t(e),this.$emit("update:modelValue",e)},spliceList(){const t=e=>e.splice(...arguments);this.alterList(t)},updatePosition(t,e){const n=i=>i.splice(e,0,i.splice(t,1)[0]);this.alterList(n)},getVmIndex(t){const e=this.visibleIndexes,n=e.length;return t>n-1?n:e[t]},getComponent(){return this.$slots.default?this.$slots.default()[0].componentInstance:null},resetTransitionData(t){if(!this.noTransitionOnDrag||!this.transitionMode)return;var e=this.getChildrenNodes();e[t].data=null;const n=this.getComponent();n.children=[],n.kept=void 0},onDragStart(t){this.computeIndexes(),this.context=this.getUnderlyingVm(t.item),this.context&&(t.item._underlying_vm_=this.clone(this.context.element),ht=t.item)},onDragAdd(t){const e=t.item._underlying_vm_;if(e===void 0)return;ct(t.item);const n=this.getVmIndex(t.newIndex);this.spliceList(n,0,e),this.computeIndexes();const i={element:e,newIndex:n};this.emitChanges({added:i})},onDragRemove(t){if(jt(this.$el,t.item,t.oldIndex),t.pullMode==="clone"){ct(t.clone);return}if(!this.context)return;const e=this.context.index;this.spliceList(e,1);const n={element:this.context.element,oldIndex:e};this.resetTransitionData(e),this.emitChanges({removed:n})},onDragUpdate(t){ct(t.item),jt(t.from,t.item,t.oldIndex);const e=this.context.index,n=this.getVmIndex(t.newIndex);this.updatePosition(e,n);const i={element:this.context.element,oldIndex:e,newIndex:n};this.emitChanges({moved:i})},updateProperty(t,e){t.hasOwnProperty(e)&&(t[e]+=this.headerOffset)},onDragMove(t,e){const n=this.move;if(!n||!this.realList)return!0;const i=this.getRelatedContextFromMoveEvent(t),r=this.context,o=this.computeFutureIndex(i,t);Object.assign(r,{futureIndex:o});const a=Object.assign({},t,{relatedContext:i,draggedContext:r});return n(a,e)},onDragEnd(){this.computeIndexes(),ht=null},getTrargetedComponent(t){return t.__draggable_component__},getRelatedContextFromMoveEvent({to:t,related:e}){const n=this.getTrargetedComponent(t);if(!n)return{component:n};const i=n.realList,r={list:i,component:n};if(t!==e&&i&&n.getUnderlyingVm){const o=n.getUnderlyingVm(e);if(o)return Object.assign(o,r)}return r},computeFutureIndex(t,e){const n=[...e.to.children].filter(a=>a.style.display!=="none");if(n.length===0)return 0;const i=n.indexOf(e.related),r=t.component.getVmIndex(i);return n.indexOf(ht)!==-1||!e.willInsertAfter?r:r+1}}}),hi={name:"Field",components:{draggable:ci},props:{fieldName:{type:String,required:!0},fieldInfo:{type:Object,required:!0},value:{type:null},error:{type:null},states:{type:null},showError:{type:Boolean,default:!1},hideFirstFields:{type:Boolean},showDiffs:{type:Boolean,default:!1}},emits:["changeValue","changeState"],setup(t){const e="AdminForm"+t.fieldInfo.type.split("_").map(i=>Me(i.split("/").map(Me).join("/"))).join("");return{fieldComponent:cn(()=>hn(Object.assign({"./AdminFormAdSize.vue":()=>y(()=>import("./AdminFormAdSize-CBcSO9bQ.mjs"),__vite__mapDeps([0,1,2,3,4,5,6,7,8]),import.meta.url),"./AdminFormCheckbox.vue":()=>y(()=>import("./AdminFormCheckbox-COS-BJES.mjs"),__vite__mapDeps([9,10,3,4,5,11]),import.meta.url),"./AdminFormCheckboxes.vue":()=>y(()=>import("./AdminFormCheckboxes-CAIN3kwq.mjs"),__vite__mapDeps([12,7,3,4,5,13]),import.meta.url),"./AdminFormCodeEditor.vue":()=>y(()=>import("./AdminFormCodeEditor-CuQVALrL.mjs"),__vite__mapDeps([14,15,4,5,16,17,3,18]),import.meta.url),"./AdminFormCodeMirror.vue":()=>y(()=>import("./AdminFormCodeMirror-B_dI68G4.mjs").then(i=>i.A),__vite__mapDeps([15,4,5,16]),import.meta.url),"./AdminFormColorPicker.vue":()=>y(()=>import("./AdminFormColorPicker-DLkEKoUh.mjs"),__vite__mapDeps([19,17,3,4,5,20]),import.meta.url),"./AdminFormColorPickerAdvanced.vue":()=>y(()=>import("./AdminFormColorPickerAdvanced-Cu9qPe8x.mjs"),__vite__mapDeps([21,17,3,4,5,22]),import.meta.url),"./AdminFormColorSchemeSelect.vue":()=>y(()=>import("./AdminFormColorSchemeSelect-Dui6oG_B.mjs"),__vite__mapDeps([23,17,3,4,5,24]),import.meta.url),"./AdminFormColorSelect.vue":()=>y(()=>import("./AdminFormColorSelect-DVNEbBUv.mjs"),__vite__mapDeps([25,26,4,5,27,28,29,30,31,32,17,3,33,34]),import.meta.url),"./AdminFormContentImageSelect.vue":()=>y(()=>import("./AdminFormContentImageSelect-CxO4c2cR.mjs"),__vite__mapDeps([35,27,4,5,28,36,37,38,39,40,41,42,43,31,32,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,26,29,30,17,3,33,63,64,65,66,67,68,69,70]),import.meta.url),"./AdminFormContentSelect.vue":()=>y(()=>import("./AdminFormContentSelect-meL3KlQk.mjs"),__vite__mapDeps([71,26,4,5,27,28,29,30,31,32,17,3,33,72,73,74]),import.meta.url),"./AdminFormDateInput.vue":()=>y(()=>import("./AdminFormDateInput-BL4vZwI-.mjs"),__vite__mapDeps([75,4,5,17,3,27,28,76]),import.meta.url),"./AdminFormDigitalMediaLibraryUpload.vue":()=>y(()=>import("./AdminFormDigitalMediaLibraryUpload-DBo6esFI.mjs"),__vite__mapDeps([77,57,4,5,27,28,37,38,39,40,58,59,52,53,60,7,3,78]),import.meta.url),"./AdminFormEmailInput.vue":()=>y(()=>import("./AdminFormEmailInput-Bj1RAGwY.mjs"),__vite__mapDeps([79,17,3,4,5,80]),import.meta.url),"./AdminFormFieldError.vue":()=>y(()=>Promise.resolve().then(()=>bn),void 0,import.meta.url),"./AdminFormFieldGroup.vue":()=>y(()=>Promise.resolve().then(()=>Ni),void 0,import.meta.url),"./AdminFormFieldWrapper.vue":()=>y(()=>Promise.resolve().then(()=>In),void 0,import.meta.url),"./AdminFormFileInput.vue":()=>y(()=>import("./AdminFormFileInput-DkXBE37W.mjs"),__vite__mapDeps([81,17,3,4,5,82]),import.meta.url),"./AdminFormFilterMode.vue":()=>y(()=>import("./AdminFormFilterMode-JSzNJ9BL.mjs"),__vite__mapDeps([83,26,4,5,27,28,29,30,31,32,17,3,33,84,85]),import.meta.url),"./AdminFormImageInput.vue":()=>y(()=>import("./AdminFormImageInput-o4182A4M.mjs"),__vite__mapDeps([86,4,5,27,28,52,53,17,3,87]),import.meta.url),"./AdminFormIntegerInput.vue":()=>y(()=>import("./AdminFormIntegerInput-DKuTatiN.mjs"),__vite__mapDeps([1,2,3,4,5,6]),import.meta.url),"./AdminFormLinkInput.vue":()=>y(()=>import("./AdminFormLinkInput-D0fvC4Gw.mjs"),__vite__mapDeps([88,89,17,3,4,5,90]),import.meta.url),"./AdminFormMagazineSelect.vue":()=>y(()=>import("./AdminFormMagazineSelect-NQSzf5nn.mjs"),__vite__mapDeps([91,84,3,4,5,92,93,39,27,28,94]),import.meta.url),"./AdminFormMenuLinkGroup.vue":()=>y(()=>import("./AdminFormMenuLinkGroup-ZbxfLCl_.mjs"),__vite__mapDeps([95,84,3,4,5,27,28]),import.meta.url),"./AdminFormNlFilterMode.vue":()=>y(()=>import("./AdminFormNlFilterMode-X0sBmcAr.mjs"),__vite__mapDeps([96,26,4,5,27,28,29,30,31,32,17,3,33,84,97]),import.meta.url),"./AdminFormOmedaDemographicQuestionSelect.vue":()=>y(()=>import("./AdminFormOmedaDemographicQuestionSelect-K3VktA4y.mjs"),__vite__mapDeps([98,26,4,5,27,28,29,30,31,32,17,3,33,2]),import.meta.url),"./AdminFormOmedaProductSelect.vue":()=>y(()=>import("./AdminFormOmedaProductSelect-Cv8V7-fS.mjs"),__vite__mapDeps([99,26,4,5,27,28,29,30,31,32,17,3,33,2]),import.meta.url),"./AdminFormPasswordInput.vue":()=>y(()=>import("./AdminFormPasswordInput-MKZmj66U.mjs"),__vite__mapDeps([100,17,3,4,5,101]),import.meta.url),"./AdminFormRadioGroup.vue":()=>y(()=>import("./AdminFormRadioGroup-DnHtSSI1.mjs"),__vite__mapDeps([102,17,3,4,5,103]),import.meta.url),"./AdminFormReadOnlyInput.vue":()=>y(()=>import("./AdminFormReadOnlyInput-8i9bj-TN.mjs"),__vite__mapDeps([104,17,3,4,5,105]),import.meta.url),"./AdminFormRichTextEditor.vue":()=>y(()=>import("./AdminFormRichTextEditor-CLAime6J.mjs"),__vite__mapDeps([106,27,4,5,28,15,16,65,66,107]),import.meta.url),"./AdminFormRowLayout.vue":()=>y(()=>import("./AdminFormRowLayout-C7tXtk2h.mjs"),__vite__mapDeps([108,17,3,4,5,109]),import.meta.url),"./AdminFormSectionLabel.vue":()=>y(()=>import("./AdminFormSectionLabel-C7m0NFII.mjs"),__vite__mapDeps([110,26,4,5,27,28,29,30,31,32,17,3,33,111]),import.meta.url),"./AdminFormSelect.vue":()=>y(()=>import("./AdminFormSelect-DUQ7P0na.mjs"),__vite__mapDeps([26,4,5,27,28,29,30,31,32,17,3,33]),import.meta.url),"./AdminFormSiteTheme.vue":()=>y(()=>import("./AdminFormSiteTheme-Dubz-vLF.mjs"),__vite__mapDeps([112,17,3,4,5,113]),import.meta.url),"./AdminFormTaxonomySelectPlusCreate.vue":()=>y(()=>import("./AdminFormTaxonomySelectPlusCreate-D1Xx1M30.mjs"),__vite__mapDeps([114,26,4,5,27,28,29,30,31,32,17,3,33,115,37,38,39,40,116,52,53,117]),import.meta.url),"./AdminFormTextInput.vue":()=>y(()=>import("./AdminFormTextInput-BbvK-LRh.mjs"),__vite__mapDeps([89,17,3,4,5,90]),import.meta.url),"./AdminFormToggleInput.vue":()=>y(()=>import("./AdminFormToggleInput-1WjUjQQ3.mjs"),__vite__mapDeps([118,58,4,5,59,10,3,119]),import.meta.url),"./AdminFormVerifyPassword.vue":()=>y(()=>import("./AdminFormVerifyPassword-5J4DeNyk.mjs"),__vite__mapDeps([120,17,3,4,5,121]),import.meta.url),"./NewsletterAdCompanySelect.vue":()=>y(()=>import("./NewsletterAdCompanySelect-B5yiD34m.mjs"),__vite__mapDeps([122,3,4,5,123]),import.meta.url)}),`./${e}.vue`,2)),componentFileName:e}},data(){return{drag:!1,hideInitialField:this.hideFirstFields,adminStyles:mn(),invalidField:0,localStates:this.states,fieldKey:Math.random()}},computed:{allowSort(){var t;return typeof((t=this.fieldInfo)==null?void 0:t.allowSort)<"u"?this.fieldInfo.allowSort:!0},wrapperField(){const t={...this.fieldInfo};return t.expanded=t.expanded??!1,t},sortedList:{get(){return this.fieldInfo.repeating?this.currValue:[this.currValue]},set(t){this.$emit("changeValue",this.fieldName,t,void 0)}},currValue(){return this.fieldInfo.repeating?[...this.value??new Array(1)]:this.value},currError(){var t,e;return this.fieldInfo.repeating?[...(t=this.error)!=null&&t.length?this.error:new Array(((e=this.currValue)==null?void 0:e.length)>0?this.currValue.length:1).fill({})]:this.error??{}},currState(){return this.fieldInfo.repeating?this.localStates?Object.values(this.localStates):[]:this.localStates},hasError(){return dn(this.currError??{})>0}},methods:{getFieldDiff(t){var e,n,i,r;return Array.isArray((e=this.fieldInfo)==null?void 0:e.diff)?(i=(n=this.fieldInfo)==null?void 0:n.diff)==null?void 0:i[t]:(r=this.fieldInfo)==null?void 0:r.diff},changeState(t,e,n){let i;this.fieldInfo.repeating?(i=[...this.currState],i[t]=n):i=n,this.localStates={...i},this.$emit("changeState",this.fieldName,JSON.parse(JSON.stringify(i??"")))},getFieldProps(t){var e,n;return{...this.fieldInfo,name:this.fieldName,error:this.fieldInfo.repeating?this.currError[t]??{}:this.currError,states:this.fieldInfo.repeating?this.currState[t]:this.currState,showDiffs:this.showDiffs,useSearchFormat:((e=this==null?void 0:this.fieldInfo)==null?void 0:e.useSearchFormat)??!1,showFirstFieldOnly:this.fieldInfo.groupToggleStyle==="icon"&&!((n=this.localStates)!=null&&n.expanded),defaultValue:this.fieldInfo.repeating&&Array.isArray(this.fieldInfo.defaultValue)?this.fieldInfo.defaultValue[t]:this.fieldInfo.defaultValue,...this.getValue(t)}},getValue(t){let e;return this.fieldInfo.repeating?(e=isNaN(this.currValue[t])?this.currValue[t]:Number(this.currValue),e=this.currValue[t]):typeof this.currValue=="number"?e=Number(this.currValue):e=this.currValue,{...this.fieldInfo.type==="field_group"?{values:e}:{value:e}}},update(t,e,n,i){var l;const r=!((l=this.currValue)!=null&&l[t])&&!n;if(this.fieldInfo.repeating&&r)return;let o,a;this.fieldInfo.repeating?(o=[...this.currValue],o[t]=n,a=[...this.currError],a[t]=i):(o=n,a=i),this.$emit("changeValue",this.fieldName,JSON.parse(JSON.stringify(o??"")),a??{})},repeatingAndNotRequired(t){var e;return((e=this.fieldInfo)==null?void 0:e.repeating)&&!this.requiredInstance(t)},requiredInstance(t){var e,n;return((e=this.fieldInfo)==null?void 0:e.required)&&((n=this.currValue)==null?void 0:n.length)===1&&t===0},removeInstance(t){this.$emit("changeValue",this.fieldName,this.currValue.filter((e,n)=>n!==t),this.currError.filter((e,n)=>n!==t),this.currState.filter((e,n)=>n!==t)),this.fieldKey=Math.random()},addInstance(){this.hideInitialField=!1,this.$emit("changeValue",this.fieldName,[...this.currValue,void 0],[...this.currError,{}],[...this.currState,{}])},removeFirstFields(t){this.removeInstance(t)},updateSort(t){t.moved&&(this.$emit("changeValue",this.fieldName,JSON.parse(JSON.stringify(this.currValue)),JSON.parse(JSON.stringify(this.currError))),this.fieldKey=Math.random())},snakeToPascal(t){return t.split("_").map(e=>Me(e.split("/").map(Me).join("/"))).join("").replaceAll("Input","")}}},mi={class:"ebm-field__instances"},pi={key:0,class:"divider"},gi=["innerHTML"],_i={key:1},vi={class:"ebm-field__instance-group"},bi={class:he(["ebm-field__instance-item"])},yi={key:0,class:"diff"},Ei={key:0,class:"before"},Si={class:"indicator"},wi={key:1,class:"after"},Di={class:"indicator"},Oi={key:1,class:"ebm-field__instance__remove"},Ii={key:0,class:"ebm-field__instances__add"};function Ti(t,e,n,i,r,o){var c;const a=Bt,l=Jt,s=pn,u=Xt;return n.fieldInfo.type!=="field_group"||Object.keys(n.fieldInfo.fields).length>0?(w(),T("div",{key:0,class:he(["ebm-field","ebm-field__field-"+n.fieldInfo.type,n.fieldInfo.label?"has-label":""])},[ge(u,{field:o.wrapperField,"label-style":n.fieldInfo.labelStyle??((n.fieldInfo.type==="field_group"||n.fieldInfo.type==="menu_link_group")&&!n.fieldInfo.fixed?"details":"label"),"label-format":(c=n.fieldInfo)==null?void 0:c.labelFormat,"has-error":o.hasError&&n.showError,onChangeState:e[3]||(e[3]=(f,h)=>o.changeState(1,f,h))},{default:mt(()=>{var f,h,b;return[H("div",mi,[n.fieldInfo.type==="divider"?(w(),T("span",pi,[e[4]||(e[4]=H("hr",null,null,-1)),n.fieldInfo.heading?(w(),T("div",{key:0,class:"divider-heading",innerHTML:n.fieldInfo.heading},null,8,gi)):x("",!0),n.fieldInfo.heading?(w(),T("hr",_i)):x("",!0)])):(w(),ce(pt(n.fieldInfo.repeating&&o.allowSort?"draggable":"div"),{key:r.fieldKey,class:"dragArea list-group w-full",list:o.sortedList,onStart:e[0]||(e[0]=m=>r.drag=!0),onEnd:e[1]||(e[1]=m=>r.drag=!1),onChange:o.updateSort},{default:mt(()=>[(w(!0),T(tt,null,St(n.fieldInfo.repeating?o.currValue.length:1,(m,p)=>{var L,X;return w(),T("div",{key:n.fieldInfo.repeating?n.fieldName+"-"+p:n.fieldName+"-1",class:he(["ebm-field__instance",n.fieldInfo.repeating?"repeating":"",n.fieldInfo.repeatingDisplay??"default"])},[n.fieldInfo.repeating&&o.allowSort&&!n.fieldInfo.disabled&&o.sortedList&&o.sortedList.length>1?(w(),ce(a,{key:0,icon:"mdi:menu-swap",class:"handle"})):x("",!0),H("div",vi,[H("div",bi,[(w(),ce(pt(i.fieldComponent),fn({"show-errors":n.showError,ref_for:!0},o.getFieldProps(p),{onChangeValue:(...A)=>o.update(p,...A),onChangeState:(A,k)=>{o.changeState(p,A,k)}}),null,16,["show-errors","onChangeValue","onChangeState"]))]),n.showDiffs&&o.getFieldDiff(p)?(w(),T("div",yi,[(L=o.getFieldDiff(p))!=null&&L.oldValue?(w(),T("div",Ei,[H("span",Si,[ge(a,{icon:"mdi:minus-box",width:16})]),qe(" "+Ve(o.getFieldDiff(p).oldValue),1)])):x("",!0),(X=o.getFieldDiff(p))!=null&&X.newValue?(w(),T("div",wi,[H("span",Di,[ge(a,{icon:"mdi:plus-box",width:16})]),qe(" "+Ve(o.getFieldDiff(p).newValue),1)])):x("",!0)])):x("",!0),n.showError?(w(),ce(l,{key:1,error:n.fieldInfo.repeating?o.currError[p]:o.currError,class:"errors"},null,8,["error"])):x("",!0)]),(o.repeatingAndNotRequired(p)||n.fieldInfo.allowRepeatingDelete)&&n.fieldInfo.disabled!==!0?(w(),T("div",Oi,[ge(a,{icon:"mdi:close-circle-outline",onClick:A=>o.removeInstance(p)},null,8,["onClick"])])):x("",!0)],2)}),128))]),_:1},40,["list","onChange"]))]),n.fieldInfo.repeating&&(!((f=n.fieldInfo)!=null&&f.maxItems)||((h=o.currValue)==null?void 0:h.length)<((b=n.fieldInfo)==null?void 0:b.maxItems))&&!n.fieldInfo.disabled?(w(),T("div",Ii,[ge(s,{label:"Add"+(o.currValue.length?" Another":""),size:"small",mode:"hollow",color:r.adminStyles.primaryColor,onClick:e[2]||(e[2]=m=>o.addInstance(n.fieldName))},null,8,["label","color"])])):x("",!0)]}),_:1},8,["field","label-style","label-format","has-error"])],2)):x("",!0)}const Ai=et(hi,[["render",Ti],["__scopeId","data-v-2874785f"]]),Ci={name:"FieldGroup",props:{name:{type:String,default:""},fields:{type:Object,default:()=>({})},values:{type:Object,default:()=>({})},errors:{type:Object,default:()=>({})},states:{type:Object,default:()=>({})},fieldParent:{type:String,default:""},showErrors:{type:Boolean,default:!1},fieldDisplay:{type:String,default:"stacked"},hideFirstFields:{type:Boolean,default:!1},icon:{type:String,default:"fish"},expanded:{type:Boolean,default:!1},showFirstFieldOnly:{type:Boolean,default:!1},debugMode:{type:Boolean,default:!1},showDiffs:{type:Boolean,default:!1}},emits:["changeValue","changeState"],data(){return{verifiedFields:this.getVerifiedFields(this.fields),localVal:this.values??{}}},watch:{fields(t){this.verifiedFields=this.getVerifiedFields(t)}},methods:{getValue(t,e){var n;return this.localVal&&t in this.localVal?(n=this.localVal)==null?void 0:n[t]:e!=null&&e.repeating?[]:void 0},getError(t,e){var n;return this.errors&&t in this.errors?this.errors[t]??{}:e!=null&&e.repeating?new Array(((n=this.values)==null?void 0:n.length)??1).fill({}):void 0},getState(t){if(this.states&&t in this.states)return this.states[t]},update(t,e,n){const i=JSON.parse(JSON.stringify(this.localVal));i[t]=JSON.parse(JSON.stringify(e));const r=this.errors??{};r[t]=JSON.parse(JSON.stringify(n)),this.$emit("changeValue",this.name,JSON.parse(JSON.stringify(i)),JSON.parse(JSON.stringify(r))),this.localVal=JSON.parse(JSON.stringify(i)),this.verifiedFields=this.getVerifiedFields(this.fields)},getVerifiedFields(t){var o,a,l,s,u,c;const e={},n=JSON.parse(JSON.stringify(this.localVal??{})),i=JSON.parse(JSON.stringify(this.errors??{}));let r=!1;for(const f in t){const h=t[f],b=[];if(h!=null&&h.hidden&&b.push(f),h!=null&&h.conditions)for(const m in h.conditions){const p=((o=this.localVal)==null?void 0:o[m])??null;typeof((a=h.conditions[m])==null?void 0:a.equals)<"u"&&p!==h.conditions[m].equals&&b.push(f),this.values&&typeof((l=h.conditions[m])==null?void 0:l.neq)<"u"&&h.conditions[m].neq.includes(this.values[m])&&b.push(f),(s=h.conditions[m])!=null&&s.include&&!h.conditions[m].include.includes(p)&&b.push(f),((u=h.conditions[m])==null?void 0:u.hasValue)===!0&&!p&&b.push(f),((c=h.conditions[m])==null?void 0:c.hasValue)===!1&&p&&(p==null?void 0:p.length)>0&&b.push(f)}b.length?(r=!0,b.forEach(m=>{delete n[m],i[m]={valid:!0}})):e[f]=h}return r&&(JSON.stringify(this.localVal)!==JSON.stringify(n)||JSON.stringify(this.errors)!==JSON.stringify(i))&&this.$emit("changeValue",this.name,JSON.parse(JSON.stringify(n)),JSON.parse(JSON.stringify(i))),e},changeState(t,e){const n=this.states;n[t]=JSON.parse(JSON.stringify(e)),this.$emit("changeState",this.name,JSON.parse(JSON.stringify(n)))}}},Fi={key:0,style:{"font-size":"0.75em","font-family":"'Courier New', Courier, monospace",background:"#282828",color:"#33ff33",padding:"5px",display:"block","margin-top":"30px"}};function xi(t,e,n,i,r,o){const a=Ai;return w(),T("div",{class:he(["ebm-field-group",n.fieldDisplay])},[(w(!0),T(tt,null,St(r.verifiedFields,(l,s,u)=>(w(),T("div",{key:s,class:"ebm-field-group__field"},[t.$config.public.isDev&&n.debugMode?(w(),T("span",Fi,[e[0]||(e[0]=H("strong",null,"FieldGroup GetValue():",-1)),qe(" "+Ve(o.getValue(s,l)),1)])):x("",!0),!n.showFirstFieldOnly||u===0?(w(),ce(a,{key:1,"field-name":s,"field-info":l,"hide-first-fields":n.hideFirstFields,value:o.getValue(s,l),error:o.getError(s,l),states:o.getState(s,l),"show-error":n.showErrors,"show-diffs":n.showDiffs,onChangeValue:o.update,onChangeState:o.changeState},null,8,["field-name","field-info","hide-first-fields","value","error","states","show-error","show-diffs","onChangeValue","onChangeState"])):x("",!0)]))),128))],2)}const Pi=et(Ci,[["render",xi]]),Ni=Object.freeze(Object.defineProperty({__proto__:null,default:Pi},Symbol.toStringTag,{value:"Module"}));export{ci as V,Pi as _,Ai as a};