PageSourceSearch

https://evode.si/assets/WaterAtlas-CJLagxUj.js

js evode.si collected 2026-10-02 20:36:32 UTC 70,200 bytes, 1 lines download raw bytes

vendor: 34,750 bytes, line 1
1import{C as xn,P as ta,w as at,ag as na,f as M,i as Z,x as k,ai as F,F as ze,k as T,p as re,g as w,l as Be,n as Mt,m as jt,I as Ft,j as gt,aS as aa,ah as q,z as Pe,aN as ia,h as Oe,S as ra,Z as $t,Q as Ye,o as A,X as oa,a2 as la,v as sa,bw as ca}from"./index-TZn8Vg6F.js";import zt from"./index-2vD5_0Hd.js";import ua from"./index-D_ssOkgd.js";import da from"./index-CBwGP6Cq.js";import fa from"./index-DIT5zuX_.js";import{g as pa}from"./_commonjsHelpers-CE1G-McA.js";import{r as ma}from"./cloneDeep-CFSPkyf_.js";import{_ as ga}from"./Text.vue_vue_type_script_setup_true_lang-BKxBeRJ5.js";import{T as ha}from"./Tiles-B-Iu10Mx.js";import{_ as un,T as dn,C as va}from"./Tabs-BI_Y1896.js";import{B as ba}from"./Breadcrumbs-BRUEfjc9.js";import"./index-C7Q6x2VE.js";import"./index-PE8joCkg.js";import"./index-BaaZdZY2.js";import"./index-DMAy-uCi.js";import"./index-BF-8i_1i.js";import"./index-DYWDXRuZ.js";import"./index-DRrJrtKK.js";import"./Tabs.vue-D_C47IjB.js";var ya=ma();const wa=pa(ya);function xa(a,e,t){return(e=_a(e))in a?Object.defineProperty(a,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):a[e]=t,a}function De(){return De=Object.assign?Object.assign.bind():function(a){for(var e=1;e<arguments.length;e++){var t=arguments[e];for(var n in t)({}).hasOwnProperty.call(t,n)&&(a[n]=t[n])}return a},De.apply(null,arguments)}function fn(a,e){var t=Object.keys(a);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(a);e&&(n=n.filter(function(o){return Object.getOwnPropertyDescriptor(a,o).enumerable})),t.push.apply(t,n)}return t}function xe(a){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fn(Object(t),!0).forEach(function(n){xa(a,n,t[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(a,Object.getOwnPropertyDescriptors(t)):fn(Object(t)).forEach(function(n){Object.defineProperty(a,n,Object.getOwnPropertyDescriptor(t,n))})}return a}function Sa(a,e){if(a==null)return{};var t,n,o=ka(a,e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(a);for(n=0;n<l.length;n++)t=l[n],e.indexOf(t)===-1&&{}.propertyIsEnumerable.call(a,t)&&(o[t]=a[t])}return o}function ka(a,e){if(a==null)return{};var t={};for(var n in a)if({}.hasOwnProperty.call(a,n)){if(e.indexOf(n)!==-1)continue;t[n]=a[n]}return t}function Ea(a,e){if(typeof a!="object"||!a)return a;var t=a[Symbol.toPrimitive];if(t!==void 0){var n=t.call(a,e);if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(a)}function _a(a){var e=Ea(a,"string");return typeof e=="symbol"?e:e+""}function Kt(a){"@babel/helpers - typeof";return Kt=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Kt(a)}var Aa="1.15.7";function Ae(a){if(typeof window<"u"&&window.navigator)return!!navigator.userAgent.match(a)}var Ce=Ae(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),ft=Ae(/Edge/i),pn=Ae(/firefox/i),lt=Ae(/safari/i)&&!Ae(/chrome/i)&&!Ae(/android/i),tn=Ae(/iP(ad|od|hone)/i),Sn=Ae(/chrome/i)&&Ae(/android/i),kn={capture:!1,passive:!1};function P(a,e,t){a.addEventListener(e,t,!Ce&&kn)}function O(a,e,t){a.removeEventListener(e,t,!Ce&&kn)}function Et(a,e){if(e){if(e[0]===">"&&(e=e.substring(1)),a)try{if(a.matches)return a.matches(e);if(a.msMatchesSelector)return a.msMatchesSelector(e);if(a.webkitMatchesSelector)return a.webkitMatchesSelector(e)}catch{return!1}return!1}}function En(a){return a.host&&a!==document&&a.host.nodeType&&a.host!==a?a.host:a.parentNode}function ve(a,e,t,n){if(a){t=t||document;do{if(e!=null&&(e[0]===">"?a.parentNode===t&&Et(a,e):Et(a,e))||n&&a===t)return a;if(a===t)break}while(a=En(a))}return null}var mn=/\s+/g;function oe(a,e,t){if(a&&e)if(a.classList)a.classList[t?"add":"remove"](e);else{var n=(" "+a.className+" ").replace(mn," ").replace(" "+e+" "," ");a.className=(n+(t?" "+e:"")).replace(mn," ")}}function S(a,e,t){var n=a&&a.style;if(n){if(t===void 0)return document.defaultView&&document.defaultView.getComputedStyle?t=document.defaultView.getComputedStyle(a,""):a.currentStyle&&(t=a.currentStyle),e===void 0?t:t[e];!(e in n)&&e.indexOf("webkit")===-1&&(e="-webkit-"+e),n[e]=t+(typeof t=="string"?"":"px")}}function Ze(a,e){var t="";if(typeof a=="string")t=a;else do{var n=S(a,"transform");n&&n!=="none"&&(t=n+" "+t)}while(!e&&(a=a.parentNode));var o=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return o&&new o(t)}function _n(a,e,t){if(a){var n=a.getElementsByTagName(e),o=0,l=n.length;if(t)for(;o<l;o++)t(n[o],o);return n}return[]}function we(){var a=document.scrollingElement;return a||document.documentElement}function L(a,e,t,n,o){if(!(!a.getBoundingClientRect&&a!==window)){var l,u,c,p,m,y,v;if(a!==window&&a.parentNode&&a!==we()?(l=a.getBoundingClientRect(),u=l.top,c=l.left,p=l.bottom,m=l.right,y=l.height,v=l.width):(u=0,c=0,p=window.innerHeight,m=window.innerWidth,y=window.innerHeight,v=window.innerWidth),(e||t)&&a!==window&&(o=o||a.parentNode,!Ce))do if(o&&o.getBoundingClientRect&&(S(o,"transform")!=="none"||t&&S(o,"position")!=="static")){var D=o.getBoundingClientRect();u-=D.top+parseInt(S(o,"border-top-width")),c-=D.left+parseInt(S(o,"border-left-width")),p=u+l.height,m=c+l.width;break}while(o=o.parentNode);if(n&&a!==window){var U=Ze(o||a),_=U&&U.a,I=U&&U.d;U&&(u/=I,c/=_,v/=_,y/=I,p=u+y,m=c+v)}return{top:u,left:c,bottom:p,right:m,width:v,height:y}}}function gn(a,e,t){for(var n=Ue(a,!0),o=L(a)[e];n;){var l=L(n)[t],u=void 0;if(u=o>=l,!u)return n;if(n===we())break;n=Ue(n,!1)}return!1}function Je(a,e,t,n){for(var o=0,l=0,u=a.children;l<u.length;){if(u[l].style.display!=="none"&&u[l]!==x.ghost&&(n||u[l]!==x.dragged)&&ve(u[l],t.draggable,a,!1)){if(o===e)return u[l];o++}l++}return null}function nn(a,e){for(var t=a.lastElementChild;t&&(t===x.ghost||S(t,"display")==="none"||e&&!Et(t,e));)t=t.previousElementSibling;return t||null}function ce(a,e){var t=0;if(!a||!a.parentNode)return-1;for(;a=a.previousElementSibling;)a.nodeName.toUpperCase()!=="TEMPLATE"&&a!==x.clone&&(!e||Et(a,e))&&t++;return t}function hn(a){var e=0,t=0,n=we();if(a)do{var o=Ze(a),l=o.a,u=o.d;e+=a.scrollLeft*l,t+=a.scrollTop*u}while(a!==n&&(a=a.parentNode));return[e,t]}function Da(a,e){for(var t in a)if(a.hasOwnProperty(t)){for(var n in e)if(e.hasOwnProperty(n)&&e[n]===a[t][n])return Number(t)}return-1}function Ue(a,e){if(!a||!a.getBoundingClientRect)return we();var t=a,n=!1;do if(t.clientWidth<t.scrollWidth||t.clientHeight<t.scrollHeight){var o=S(t);if(t.clientWidth<t.scrollWidth&&(o.overflowX=="auto"||o.overflowX=="scroll")||t.clientHeight<t.scrollHeight&&(o.overflowY=="auto"||o.overflowY=="scroll")){if(!t.getBoundingClientRect||t===document.body)return we();if(n||e)return t;n=!0}}while(t=t.parentNode);return we()}function Ca(a,e){if(a&&e)for(var t in e)e.hasOwnProperty(t)&&(a[t]=e[t]);return a}function Bt(a,e){return Math.round(a.top)===Math.round(e.top)&&Math.round(a.left)===Math.round(e.left)&&Math.round(a.height)===Math.round(e.height)&&Math.round(a.width)===Math.round(e.width)}var st;function An(a,e){return function(){if(!st){var t=arguments,n=this;t.length===1?a.call(n,t[0]):a.apply(n,t),st=setTimeout(function(){st=void 0},e)}}}function Ta(){clearTimeout(st),st=void 0}function Dn(a,e,t){a.scrollLeft+=e,a.scrollTop+=t}function Cn(a){var e=window.Polymer,t=window.jQuery||window.Zepto;return e&&e.dom?e.dom(a).cloneNode(!0):t?t(a).clone(!0)[0]:a.cloneNode(!0)}function Tn(a,e,t){var n={};return Array.from(a.children).forEach(function(o){var l,u,c,p;if(!(!ve(o,e.draggable,a,!1)||o.animated||o===t)){var m=L(o);n.left=Math.min((l=n.left)!==null&&l!==void 0?l:1/0,m.left),n.top=Math.min((u=n.top)!==null&&u!==void 0?u:1/0,m.top),n.right=Math.max((c=n.right)!==null&&c!==void 0?c:-1/0,m.right),n.bottom=Math.max((p=n.bottom)!==null&&p!==void 0?p:-1/0,m.bottom)}}),n.width=n.right-n.left,n.height=n.bottom-n.top,n.x=n.left,n.y=n.top,n}var ne="Sortable"+new Date().getTime();function Ia(){var a=[],e;return{captureAnimationState:function(){if(a=[],!!this.options.animation){var n=[].slice.call(this.el.children);n.forEach(function(o){if(!(S(o,"display")==="none"||o===x.ghost)){a.push({target:o,rect:L(o)});var l=xe({},a[a.length-1].rect);if(o.thisAnimationDuration){var u=Ze(o,!0);u&&(l.top-=u.f,l.left-=u.e)}o.fromRect=l}})}},addAnimationState:function(n){a.push(n)},removeAnimationState:function(n){a.splice(Da(a,{target:n}),1)},animateAll:function(n){var o=this;if(!this.options.animation){clearTimeout(e),typeof n=="function"&&n();return}var l=!1,u=0;a.forEach(function(c){var p=0,m=c.target,y=m.fromRect,v=L(m),D=m.prevFromRect,U=m.prevToRect,_=c.rect,I=Ze(m,!0);I&&(v.top-=I.f,v.left-=I.e),m.toRect=v,m.thisAnimationDuration&&Bt(D,v)&&!Bt(y,v)&&(_.top-v.top)/(_.left-v.left)===(y.top-v.top)/(y.left-v.left)&&(p=Pa(_,D,U,o.options)),Bt(v,y)||(m.prevFromRect=y,m.prevToRect=v,p||(p=o.options.animation),o.animate(m,_,v,p)),p&&(l=!0,u=Math.max(u,p),clearTimeout(m.animationResetTimer),m.animationResetTimer=setTimeout(function(){m.animationTime=0,m.prevFromRect=null,m.fromRect=null,m.prevToRect=null,m.thisAnimationDuration=null},p),m.thisAnimationDuration=p)}),clearTimeout(e),l?e=setTimeout(function(){typeof n=="function"&&n()},u):typeof n=="function"&&n(),a=[]},animate:function(n,o,l,u){if(u){S(n,"transition",""),S(n,"transform","");var c=Ze(this.el),p=c&&c.a,m=c&&c.d,y=(o.left-l.left)/(p||1),v=(o.top-l.top)/(m||1);n.animatingX=!!y,n.animatingY=!!v,S(n,"transform","translate3d("+y+"px,"+v+"px,0)"),this.forRepaintDummy=Oa(n),S(n,"transition","transform "+u+"ms"+(this.options.easing?" "+this.options.easing:"")),S(n,"transform","translate3d(0,0,0)"),typeof n.animated=="number"&&clearTimeout(n.animated),n.animated=setTimeout(function(){S(n,"transition",""),S(n,"transform",""),n.animated=!1,n.animatingX=!1,n.animatingY=!1},u)}}}}function Oa(a){return a.offsetWidth}function Pa(a,e,t,n){return Math.sqrt(Math.pow(e.top-a.top,2)+Math.pow(e.left-a.left,2))/Math.sqrt(Math.pow(e.top-t.top,2)+Math.pow(e.left-t.left,2))*n.animation}var qe=[],Ht={initializeByDefault:!0},pt={mount:function(e){for(var t in Ht)Ht.hasOwnProperty(t)&&!(t in e)&&(e[t]=Ht[t]);qe.forEach(function(n){if(n.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")}),qe.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var l=e+"Global";qe.forEach(function(u){t[u.pluginName]&&(t[u.pluginName][l]&&t[u.pluginName][l](xe({sortable:t},n)),t.options[u.pluginName]&&t[u.pluginName][e]&&t[u.pluginName][e](xe({sortable:t},n)))})},initializePlugins:function(e,t,n,o){qe.forEach(function(c){var p=c.pluginName;if(!(!e.options[p]&&!c.initializeByDefault)){var m=new c(e,t,e.options);m.sortable=e,m.options=e.options,e[p]=m,De(n,m.defaults)}});for(var l in e.options)if(e.options.hasOwnProperty(l)){var u=this.modifyOption(e,l,e.options[l]);typeof u<"u"&&(e.options[l]=u)}},getEventProperties:function(e,t){var n={};return qe.forEach(function(o){typeof o.eventProperties=="function"&&De(n,o.eventProperties.call(t[o.pluginName],e))}),n},modifyOption:function(e,t,n){var o;return qe.forEach(function(l){e[l.pluginName]&&l.optionListeners&&typeof l.optionListeners[t]=="function"&&(o=l.optionListeners[t].call(e[l.pluginName],n))}),o}};function Va(a){var e=a.sortable,t=a.rootEl,n=a.name,o=a.targetEl,l=a.cloneEl,u=a.toEl,c=a.fromEl,p=a.oldIndex,m=a.newIndex,y=a.oldDraggableIndex,v=a.newDraggableIndex,D=a.originalEvent,U=a.putSortable,_=a.extraEventProperties;if(e=e||t&&t[ne],!!e){var I,X=e.options,Q="on"+n.charAt(0).toUpperCase()+n.substr(1);window.CustomEvent&&!Ce&&!ft?I=new CustomEvent(n,{bubbles:!0,cancelable:!0}):(I=document.createEvent("Event"),I.initEvent(n,!0,!0)),I.to=u||t,I.from=c||t,I.item=o||t,I.clone=l,I.oldIndex=p,I.newIndex=m,I.oldDraggableIndex=y,I.newDraggableIndex=v,I.originalEvent=D,I.pullMode=U?U.lastPutMode:void 0;var H=xe(xe({},_),pt.getEventProperties(n,e));for(var ae in H)I[ae]=H[ae];t&&t.dispatchEvent(I),X[Q]&&X[Q].call(e,I)}}var Na=["evt"],te=function(e,t){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},o=n.evt,l=Sa(n,Na);pt.pluginEvent.bind(x)(e,t,xe({dragEl:g,parentEl:z,ghostEl:E,rootEl:j,nextEl:Le,lastDownEl:wt,cloneEl:$,cloneHidden:Ne,dragStarted:it,putSortable:Y,activeSortable:x.active,originalEvent:o,oldIndex:Ke,oldDraggableIndex:ct,newIndex:le,newDraggableIndex:Ve,hideGhostForTarget:Vn,unhideGhostForTarget:Nn,cloneNowHidden:function(){Ne=!0},cloneNowShown:function(){Ne=!1},dispatchSortableEvent:function(c){J({sortable:t,name:c,originalEvent:o})}},l))};function J(a){Va(xe({putSortable:Y,cloneEl:$,targetEl:g,rootEl:j,oldIndex:Ke,oldDraggableIndex:ct,newIndex:le,newDraggableIndex:Ve},a))}var g,z,E,j,Le,wt,$,Ne,Ke,le,ct,Ve,ht,Y,Ge=!1,_t=!1,At=[],He,he,Rt,Lt,vn,bn,it,We,ut,dt=!1,vt=!1,xt,W,Xt=[],Zt=!1,Dt=[],Tt=typeof document<"u",bt=tn,yn=ft||Ce?"cssFloat":"float",Ua=Tt&&!Sn&&!tn&&"draggable"in document.createElement("div"),In=(function(){if(Tt){if(Ce)return!1;var a=document.createElement("x");return a.style.cssText="pointer-events:auto",a.style.pointerEvents==="auto"}})(),On=function(e,t){var n=S(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),l=Je(e,0,t),u=Je(e,1,t),c=l&&S(l),p=u&&S(u),m=c&&parseInt(c.marginLeft)+parseInt(c.marginRight)+L(l).width,y=p&&parseInt(p.marginLeft)+parseInt(p.marginRight)+L(u).width;if(n.display==="flex")return n.flexDirection==="column"||n.flexDirection==="column-reverse"?"vertical":"horizontal";if(n.display==="grid")return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(l&&c.float&&c.float!=="none"){var v=c.float==="left"?"left":"right";return u&&(p.clear==="both"||p.clear===v)?"vertical":"horizontal"}return l&&(c.display==="block"||c.display==="flex"||c.display==="table"||c.display==="grid"||m>=o&&n[yn]==="none"||u&&n[yn]==="none"&&m+y>o)?"vertical":"horizontal"},Ma=function(e,t,n){var o=n?e.left:e.top,l=n?e.right:e.bottom,u=n?e.width:e.height,c=n?t.left:t.top,p=n?t.right:t.bottom,m=n?t.width:t.height;return o===c||l===p||o+u/2===c+m/2},ja=function(e,t){var n;return At.some(function(o){var l=o[ne].options.emptyInsertThreshold;if(!(!l||nn(o))){var u=L(o),c=e>=u.left-l&&e<=u.right+l,p=t>=u.top-l&&t<=u.bottom+l;if(c&&p)return n=o}}),n},Pn=function(e){function t(l,u){return function(c,p,m,y){var v=c.options.group.name&&p.options.group.name&&c.options.group.name===p.options.group.name;if(l==null&&(u||v))return!0;if(l==null||l===!1)return!1;if(u&&l==="clone")return l;if(typeof l=="function")return t(l(c,p,m,y),u)(c,p,m,y);var D=(u?c:p).options.group.name;return l===!0||typeof l=="string"&&l===D||l.join&&l.indexOf(D)>-1}}var n={},o=e.group;(!o||Kt(o)!="object")&&(o={name:o}),n.name=o.name,n.checkPull=t(o.pull,!0),n.checkPut=t(o.put),n.revertClone=o.revertClone,e.group=n},Vn=function(){!In&&E&&S(E,"display","none")},Nn=function(){!In&&E&&S(E,"display","")};Tt&&!Sn&&document.addEventListener("click",function(a){if(_t)return a.preventDefault(),a.stopPropagation&&a.stopPropagation(),a.stopImmediatePropagation&&a.stopImmediatePropagation(),_t=!1,!1},!0);var Re=function(e){if(g){e=e.touches?e.touches[0]:e;var t=ja(e.clientX,e.clientY);if(t){var n={};for(var o in e)e.hasOwnProperty(o)&&(n[o]=e[o]);n.target=n.rootEl=t,n.preventDefault=void 0,n.stopPropagation=void 0,t[ne]._onDragOver(n)}}},Fa=function(e){g&&g.parentNode[ne]._isOutsideThisEl(e.target)};function x(a,e){if(!(a&&a.nodeType&&a.nodeType===1))throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(a));this.el=a,this.options=e=De({},e),a[ne]=this;var t={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(a.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return On(a,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(u,c){u.setData("Text",c.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:x.supportPointer!==!1&&"PointerEvent"in window&&(!lt||tn),emptyInsertThreshold:5};pt.initializePlugins(this,a,t);for(var n in t)!(n in e)&&(e[n]=t[n]);Pn(e);for(var o in this)o.charAt(0)==="_"&&typeof this[o]=="function"&&(this[o]=this[o].bind(this));this.nativeDraggable=e.forceFallback?!1:Ua,this.nativeDraggable&&(this.options.touchStartThreshold=1),e.supportPointer?P(a,"pointerdown",this._onTapStart):(P(a,"mousedown",this._onTapStart),P(a,"touchstart",this._onTapStart)),this.nativeDraggable&&(P(a,"dragover",this),P(a,"dragenter",this)),At.push(this.el),e.store&&e.store.get&&this.sort(e.store.get(this)||[]),De(this,Ia())}x.prototype={constructor:x,_isOutsideThisEl:function(e){!this.el.contains(e)&&e!==this.el&&(We=null)},_getDirection:function(e,t){return typeof this.options.direction=="function"?this.options.direction.call(this,e,t,g):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,l=o.preventOnFilter,u=e.type,c=e.touches&&e.touches[0]||e.pointerType&&e.pointerType==="touch"&&e,p=(c||e).target,m=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||p,y=o.filter;if(Ya(n),!g&&!(/mousedown|pointerdown/.test(u)&&e.button!==0||o.disabled)&&!m.isContentEditable&&!(!this.nativeDraggable&&lt&&p&&p.tagName.toUpperCase()==="SELECT")&&(p=ve(p,o.draggable,n,!1),!(p&&p.animated)&&wt!==p)){if(Ke=ce(p),ct=ce(p,o.draggable),typeof y=="function"){if(y.call(this,e,p,this)){J({sortable:t,rootEl:m,name:"filter",targetEl:p,toEl:n,fromEl:n}),te("filter",t,{evt:e}),l&&e.preventDefault();return}}else if(y&&(y=y.split(",").some(function(v){if(v=ve(m,v.trim(),n,!1),v)return J({sortable:t,rootEl:v,name:"filter",targetEl:p,fromEl:n,toEl:n}),te("filter",t,{evt:e}),!0}),y)){l&&e.preventDefault();return}o.handle&&!ve(m,o.handle,n,!1)||this._prepareDragStart(e,c,p)}}},_prepareDragStart:function(e,t,n){var o=this,l=o.el,u=o.options,c=l.ownerDocument,p;if(n&&!g&&n.parentNode===l){var m=L(n);if(j=l,g=n,z=g.parentNode,Le=g.nextSibling,wt=n,ht=u.group,x.dragged=g,He={target:g,clientX:(t||e).clientX,clientY:(t||e).clientY},vn=He.clientX-m.left,bn=He.clientY-m.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,g.style["will-change"]="all",p=function(){if(te("delayEnded",o,{evt:e}),x.eventCanceled){o._onDrop();return}o._disableDelayedDragEvents(),!pn&&o.nativeDraggable&&(g.draggable=!0),o._triggerDragStart(e,t),J({sortable:o,name:"choose",originalEvent:e}),oe(g,u.chosenClass,!0)},u.ignore.split(",").forEach(function(y){_n(g,y.trim(),Yt)}),P(c,"dragover",Re),P(c,"mousemove",Re),P(c,"touchmove",Re),u.supportPointer?(P(c,"pointerup",o._onDrop),!this.nativeDraggable&&P(c,"pointercancel",o._onDrop)):(P(c,"mouseup",o._onDrop),P(c,"touchend",o._onDrop),P(c,"touchcancel",o._onDrop)),pn&&this.nativeDraggable&&(this.options.touchStartThreshold=4,g.draggable=!0),te("delayStart",this,{evt:e}),u.delay&&(!u.delayOnTouchOnly||t)&&(!this.nativeDraggable||!(ft||Ce))){if(x.eventCanceled){this._onDrop();return}u.supportPointer?(P(c,"pointerup",o._disableDelayedDrag),P(c,"pointercancel",o._disableDelayedDrag)):(P(c,"mouseup",o._disableDelayedDrag),P(c,"touchend",o._disableDelayedDrag),P(c,"touchcancel",o._disableDelayedDrag)),P(c,"mousemove",o._delayedDragTouchMoveHandler),P(c,"touchmove",o._delayedDragTouchMoveHandler),u.supportPointer&&P(c,"pointermove",o._delayedDragTouchMoveHandler),o._dragStartTimer=setTimeout(p,u.delay)}else p()}},_delayedDragTouchMoveHandler:function(e){var t=e.touches?e.touches[0]:e;Math.max(Math.abs(t.clientX-this._lastX),Math.abs(t.clientY-this._lastY))>=Math.floor(this.options.touchStartThreshold/(this.nativeDraggable&&window.devicePixelRatio||1))&&this._disableDelayedDrag()},_disableDelayedDrag:function(){g&&Yt(g),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;O(e,"mouseup",this._disableDelayedDrag),O(e,"touchend",this._disableDelayedDrag),O(e,"touchcancel",this._disableDelayedDrag),O(e,"pointerup",this._disableDelayedDrag),O(e,"pointercancel",this._disableDelayedDrag),O(e,"mousemove",this._delayedDragTouchMoveHandler),O(e,"touchmove",this._delayedDragTouchMoveHandler),O(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||e.pointerType=="touch"&&e,!this.nativeDraggable||t?this.options.supportPointer?P(document,"pointermove",this._onTouchMove):t?P(document,"touchmove",this._onTouchMove):P(document,"mousemove",this._onTouchMove):(P(g,"dragend",this),P(j,"dragstart",this._onDragStart));try{document.selection?St(function(){document.selection.empty()}):window.getSelection().removeAllRanges()}catch{}},_dragStarted:function(e,t){if(Ge=!1,j&&g){te("dragStarted",this,{evt:t}),this.nativeDraggable&&P(document,"dragover",Fa);var n=this.options;!e&&oe(g,n.dragClass,!1),oe(g,n.ghostClass,!0),x.active=this,e&&this._appendGhost(),J({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(he){this._lastX=he.clientX,this._lastY=he.clientY,Vn();for(var e=document.elementFromPoint(he.clientX,he.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(he.clientX,he.clientY),e!==t);)t=e;if(g.parentNode[ne]._isOutsideThisEl(e),t)do{if(t[ne]){var n=void 0;if(n=t[ne]._onDragOver({clientX:he.clientX,clientY:he.clientY,target:e,rootEl:t}),n&&!this.options.dragoverBubble)break}e=t}while(t=En(t));Nn()}},_onTouchMove:function(e){if(He){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,l=e.touches?e.touches[0]:e,u=E&&Ze(E,!0),c=E&&u&&u.a,p=E&&u&&u.d,m=bt&&W&&hn(W),y=(l.clientX-He.clientX+o.x)/(c||1)+(m?m[0]-Xt[0]:0)/(c||1),v=(l.clientY-He.clientY+o.y)/(p||1)+(m?m[1]-Xt[1]:0)/(p||1);if(!x.active&&!Ge){if(n&&Math.max(Math.abs(l.clientX-this._lastX),Math.abs(l.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(E){u?(u.e+=y-(Rt||0),u.f+=v-(Lt||0)):u={a:1,b:0,c:0,d:1,e:y,f:v};var D="matrix(".concat(u.a,",").concat(u.b,",").concat(u.c,",").concat(u.d,",").concat(u.e,",").concat(u.f,")");S(E,"webkitTransform",D),S(E,"mozTransform",D),S(E,"msTransform",D),S(E,"transform",D),Rt=y,Lt=v,he=l}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!E){var e=this.options.fallbackOnBody?document.body:j,t=L(g,!0,bt,!0,e),n=this.options;if(bt){for(W=e;S(W,"position")==="static"&&S(W,"transform")==="none"&&W!==document;)W=W.parentNode;W!==document.body&&W!==document.documentElement?(W===document&&(W=we()),t.top+=W.scrollTop,t.left+=W.scrollLeft):W=we(),Xt=hn(W)}E=g.cloneNode(!0),oe(E,n.ghostClass,!1),oe(E,n.fallbackClass,!0),oe(E,n.dragClass,!0),S(E,"transition",""),S(E,"transform",""),S(E,"box-sizing","border-box"),S(E,"margin",0),S(E,"top",t.top),S(E,"left",t.left),S(E,"width",t.width),S(E,"height",t.height),S(E,"opacity","0.8"),S(E,"position",bt?"absolute":"fixed"),S(E,"zIndex","100000"),S(E,"pointerEvents","none"),x.ghost=E,e.appendChild(E),S(E,"transform-origin",vn/parseInt(E.style.width)*100+"% "+bn/parseInt(E.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,l=n.options;if(te("dragStart",this,{evt:e}),x.eventCanceled){this._onDrop();return}te("setupClone",this),x.eventCanceled||($=Cn(g),$.removeAttribute("id"),$.draggable=!1,$.style["will-change"]="",this._hideClone(),oe($,this.options.chosenClass,!1),x.clone=$),n.cloneId=St(function(){te("clone",n),!x.eventCanceled&&(n.options.removeCloneOnHide||j.insertBefore($,g),n._hideClone(),J({sortable:n,name:"clone"}))}),!t&&oe(g,l.dragClass,!0),t?(_t=!0,n._loopId=setInterval(n._emulateDragOver,50)):(O(document,"mouseup",n._onDrop),O(document,"touchend",n._onDrop),O(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",l.setData&&l.setData.call(n,o,g)),P(document,"drop",n),S(g,"transform","translateZ(0)")),Ge=!0,n._dragStartId=St(n._dragStarted.bind(n,t,e)),P(document,"selectstart",n),it=!0,window.getSelection().removeAllRanges(),lt&&S(document.body,"user-select","none")},_onDragOver:function(e){var t=this.el,n=e.target,o,l,u,c=this.options,p=c.group,m=x.active,y=ht===p,v=c.sort,D=Y||m,U,_=this,I=!1;if(Zt)return;function X(_e,Qe){te(_e,_,xe({evt:e,isOwner:y,axis:U?"vertical":"horizontal",revert:u,dragRect:o,targetRect:l,canSort:v,fromSortable:D,target:n,completed:H,onMove:function(mt,It){return yt(j,t,g,o,mt,L(mt),e,It)},changed:ae},Qe))}function Q(){X("dragOverAnimationCapture"),_.captureAnimationState(),_!==D&&D.captureAnimationState()}function H(_e){return X("dragOverCompleted",{insertion:_e}),_e&&(y?m._hideClone():m._showClone(_),_!==D&&(oe(g,Y?Y.options.ghostClass:m.options.ghostClass,!1),oe(g,c.ghostClass,!0)),Y!==_&&_!==x.active?Y=_:_===x.active&&Y&&(Y=null),D===_&&(_._ignoreWhileAnimating=n),_.animateAll(function(){X("dragOverAnimationComplete"),_._ignoreWhileAnimating=null}),_!==D&&(D.animateAll(),D._ignoreWhileAnimating=null)),(n===g&&!g.animated||n===t&&!n.animated)&&(We=null),!c.dragoverBubble&&!e.rootEl&&n!==document&&(g.parentNode[ne]._isOutsideThisEl(e.target),!_e&&Re(e)),!c.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),I=!0}function ae(){le=ce(g),Ve=ce(g,c.draggable),J({sortable:_,name:"change",toEl:t,newIndex:le,newDraggableIndex:Ve,originalEvent:e})}if(e.preventDefault!==void 0&&e.cancelable&&e.preventDefault(),n=ve(n,c.draggable,t,!0),X("dragOver"),x.eventCanceled)return I;if(g.contains(e.target)||n.animated&&n.animatingX&&n.animatingY||_._ignoreWhileAnimating===n)return H(!1);if(_t=!1,m&&!c.disabled&&(y?v||(u=z!==j):Y===this||(this.lastPutMode=ht.checkPull(this,m,g,e))&&p.checkPut(this,m,g,e))){if(U=this._getDirection(e,n)==="vertical",o=L(g),X("dragOverValid"),x.eventCanceled)return I;if(u)return z=j,Q(),this._hideClone(),X("revert"),x.eventCanceled||(Le?j.insertBefore(g,Le):j.appendChild(g)),H(!0);var G=nn(t,c.draggable);if(!G||Ha(e,U,this)&&!G.animated){if(G===g)return H(!1);if(G&&t===e.target&&(n=G),n&&(l=L(n)),yt(j,t,g,o,n,l,e,!!n)!==!1)return Q(),G&&G.nextSibling?t.insertBefore(g,G.nextSibling):t.appendChild(g),z=t,ae(),H(!0)}else if(G&&Ba(e,U,this)){var Se=Je(t,0,c,!0);if(Se===g)return H(!1);if(n=Se,l=L(n),yt(j,t,g,o,n,l,e,!1)!==!1)return Q(),t.insertBefore(g,Se),z=t,ae(),H(!0)}else if(n.parentNode===t){l=L(n);var ee=0,ke,Me=g.parentNode!==t,K=!Ma(g.animated&&g.toRect||o,n.animated&&n.toRect||l,U),je=U?"top":"left",ue=gn(n,"top","top")||gn(g,"top","top"),Ee=ue?ue.scrollTop:void 0;We!==n&&(ke=l[je],dt=!1,vt=!K&&c.invertSwap||Me),ee=Ra(e,n,l,U,K?1:c.swapThreshold,c.invertedSwapThreshold==null?c.swapThreshold:c.invertedSwapThreshold,vt,We===n);var de;if(ee!==0){var fe=ce(g);do fe-=ee,de=z.children[fe];while(de&&(S(de,"display")==="none"||de===E))}if(ee===0||de===n)return H(!1);We=n,ut=ee;var be=n.nextElementSibling,pe=!1;pe=ee===1;var me=yt(j,t,g,o,n,l,e,pe);if(me!==!1)return(me===1||me===-1)&&(pe=me===1),Zt=!0,setTimeout(za,30),Q(),pe&&!be?t.appendChild(g):n.parentNode.insertBefore(g,pe?be:n),ue&&Dn(ue,0,Ee-ue.scrollTop),z=g.parentNode,ke!==void 0&&!vt&&(xt=Math.abs(ke-L(n)[je])),ae(),H(!0)}if(t.contains(g))return H(!1)}return!1},_ignoreWhileAnimating:null,_offMoveEvents:function(){O(document,"mousemove",this._onTouchMove),O(document,"touchmove",this._onTouchMove),O(document,"pointermove",this._onTouchMove),O(document,"dragover",Re),O(document,"mousemove",Re),O(document,"touchmove",Re)},_offUpEvents:function(){var e=this.el.ownerDocument;O(e,"mouseup",this._onDrop),O(e,"touchend",this._onDrop),O(e,"pointerup",this._onDrop),O(e,"pointercancel",this._onDrop),O(e,"touchcancel",this._onDrop),O(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;if(le=ce(g),Ve=ce(g,n.draggable),te("drop",this,{evt:e}),z=g&&g.parentNode,le=ce(g),Ve=ce(g,n.draggable),x.eventCanceled){this._nulling();return}Ge=!1,vt=!1,dt=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Jt(this.cloneId),Jt(this._dragStartId),this.nativeDraggable&&(O(document,"drop",this),O(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),lt&&S(document.body,"user-select",""),S(g,"transform",""),e&&(it&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),E&&E.parentNode&&E.parentNode.removeChild(E),(j===z||Y&&Y.lastPutMode!=="clone")&&$&&$.parentNode&&$.parentNode.removeChild($),g&&(this.nativeDraggable&&O(g,"dragend",this),Yt(g),g.style["will-change"]="",it&&!Ge&&oe(g,Y?Y.options.ghostClass:this.options.ghostClass,!1),oe(g,this.options.chosenClass,!1),J({sortable:this,name:"unchoose",toEl:z,newIndex:null,newDraggableIndex:null,originalEvent:e}),j!==z?(le>=0&&(J({rootEl:z,name:"add",toEl:z,fromEl:j,originalEvent:e}),J({sortable:this,name:"remove",toEl:z,originalEvent:e}),J({rootEl:z,name:"sort",toEl:z,fromEl:j,originalEvent:e}),J({sortable:this,name:"sort",toEl:z,originalEvent:e})),Y&&Y.save()):le!==Ke&&le>=0&&(J({sortable:this,name:"update",toEl:z,originalEvent:e}),J({sortable:this,name:"sort",toEl:z,originalEvent:e})),x.active&&((le==null||le===-1)&&(le=Ke,Ve=ct),J({sortable:this,name:"end",toEl:z,originalEvent:e}),this.save()))),this._nulling()},_nulling:function(){te("nulling",this),j=g=z=E=Le=$=wt=Ne=He=he=it=le=Ve=Ke=ct=We=ut=Y=ht=x.dragged=x.ghost=x.clone=x.active=null;var e=this.el;Dt.forEach(function(t){e.contains(t)&&(t.checked=!0)}),Dt.length=Rt=Lt=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":g&&(this._onDragOver(e),$a(e));break;case"selectstart":e.preventDefault();break}},toArray:function(){for(var e=[],t,n=this.el.children,o=0,l=n.length,u=this.options;o<l;o++)t=n[o],ve(t,u.draggable,this.el,!1)&&e.push(t.getAttribute(u.dataIdAttr)||Xa(t));return e},sort:function(e,t){var n={},o=this.el;this.toArray().forEach(function(l,u){var c=o.children[u];ve(c,this.options.draggable,o,!1)&&(n[l]=c)},this),t&&this.captureAnimationState(),e.forEach(function(l){n[l]&&(o.removeChild(n[l]),o.appendChild(n[l]))}),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return ve(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(t===void 0)return n[e];var o=pt.modifyOption(this,e,t);typeof o<"u"?n[e]=o:n[e]=t,e==="group"&&Pn(n)},destroy:function(){te("destroy",this);var e=this.el;e[ne]=null,O(e,"mousedown",this._onTapStart),O(e,"touchstart",this._onTapStart),O(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(O(e,"dragover",this),O(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),function(t){t.removeAttribute("draggable")}),this._onDrop(),this._disableDelayedDragEvents(),At.splice(At.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!Ne){if(te("hideClone",this),x.eventCanceled)return;S($,"display","none"),this.options.removeCloneOnHide&&$.parentNode&&$.parentNode.removeChild($),Ne=!0}},_showClone:function(e){if(e.lastPutMode!=="clone"){this._hideClone();return}if(Ne){if(te("showClone",this),x.eventCanceled)return;g.parentNode==j&&!this.options.group.revertClone?j.insertBefore($,g):Le?j.insertBefore($,Le):j.appendChild($),this.options.group.revertClone&&this.animate(g,$),S($,"display",""),Ne=!1}}};function $a(a){a.dataTransfer&&(a.dataTransfer.dropEffect="move"),a.cancelable&&a.preventDefault()}function yt(a,e,t,n,o,l,u,c){var p,m=a[ne],y=m.options.onMove,v;return window.CustomEvent&&!Ce&&!ft?p=new CustomEvent("move",{bubbles:!0,cancelable:!0}):(p=document.createEvent("Event"),p.initEvent("move",!0,!0)),p.to=e,p.from=a,p.dragged=t,p.draggedRect=n,p.related=o||e,p.relatedRect=l||L(e),p.willInsertAfter=c,p.originalEvent=u,a.dispatchEvent(p),y&&(v=y.call(m,p,u)),v}function Yt(a){a.draggable=!1}function za(){Zt=!1}function Ba(a,e,t){var n=L(Je(t.el,0,t.options,!0)),o=Tn(t.el,t.options,E),l=10;return e?a.clientX<o.left-l||a.clientY<n.top&&a.clientX<n.right:a.clientY<o.top-l||a.clientY<n.bottom&&a.clientX<n.left}function Ha(a,e,t){var n=L(nn(t.el,t.options.draggable)),o=Tn(t.el,t.options,E),l=10;return e?a.clientX>o.right+l||a.clientY>n.bottom&&a.clientX>n.left:a.clientY>o.bottom+l||a.clientX>n.right&&a.clientY>n.top}function Ra(a,e,t,n,o,l,u,c){var p=n?a.clientY:a.clientX,m=n?t.height:t.width,y=n?t.top:t.left,v=n?t.bottom:t.right,D=!1;if(!u){if(c&&xt<m*o){if(!dt&&(ut===1?p>y+m*l/2:p<v-m*l/2)&&(dt=!0),dt)D=!0;else if(ut===1?p<y+xt:p>v-xt)return-ut}else if(p>y+m*(1-o)/2&&p<v-m*(1-o)/2)return La(e)}return D=D||u,D&&(p<y+m*l/2||p>v-m*l/2)?p>y+m/2?1:-1:0}function La(a){return ce(g)<ce(a)?1:-1}function Xa(a){for(var e=a.tagName+a.className+a.src+a.href+a.textContent,t=e.length,n=0;t--;)n+=e.charCodeAt(t);return n.toString(36)}function Ya(a){Dt.length=0;for(var e=a.getElementsByTagName("input"),t=e.length;t--;){var n=e[t];n.checked&&Dt.push(n)}}function St(a){return setTimeout(a,0)}function Jt(a){return clearTimeout(a)}Tt&&P(document,"touchmove",function(a){(x.active||Ge)&&a.cancelable&&a.preventDefault()});x.utils={on:P,off:O,css:S,find:_n,is:function(e,t){return!!ve(e,t,e,!1)},extend:Ca,throttle:An,closest:ve,toggleClass:oe,clone:Cn,index:ce,nextTick:St,cancelNextTick:Jt,detectDirection:On,getChild:Je,expando:ne};x.get=function(a){return a[ne]};x.mount=function(){for(var a=arguments.length,e=new Array(a),t=0;t<a;t++)e[t]=arguments[t];e[0].constructor===Array&&(e=e[0]),e.forEach(function(n){if(!n.prototype||!n.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(n));n.utils&&(x.utils=xe(xe({},x.utils),n.utils)),pt.mount(n)})};x.create=function(a,e){return new x(a,e)};x.version=Aa;var R=[],rt,Qt,en=!1,qt,Wt,Ct,ot;function qa(){function a(){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 a.prototype={dragStarted:function(t){var n=t.originalEvent;this.sortable.nativeDraggable?P(document,"dragover",this._handleAutoScroll):this.options.supportPointer?P(document,"pointermove",this._handleFallbackAutoScroll):n.touches?P(document,"touchmove",this._handleFallbackAutoScroll):P(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(t){var n=t.originalEvent;!this.options.dragOverBubble&&!n.rootEl&&this._handleAutoScroll(n)},drop:function(){this.sortable.nativeDraggable?O(document,"dragover",this._handleAutoScroll):(O(document,"pointermove",this._handleFallbackAutoScroll),O(d
1ocument,"touchmove",this._handleFallbackAutoScroll),O(document,"mousemove",this._handleFallbackAutoScroll)),wn(),kt(),Ta()},nulling:function(){Ct=Qt=rt=en=ot=qt=Wt=null,R.length=0},_handleFallbackAutoScroll:function(t){this._handleAutoScroll(t,!0)},_handleAutoScroll:function(t,n){var o=this,l=(t.touches?t.touches[0]:t).clientX,u=(t.touches?t.touches[0]:t).clientY,c=document.elementFromPoint(l,u);if(Ct=t,n||this.options.forceAutoScrollFallback||ft||Ce||lt){Gt(t,this.options,c,n);var p=Ue(c,!0);en&&(!ot||l!==qt||u!==Wt)&&(ot&&wn(),ot=setInterval(function(){var m=Ue(document.elementFromPoint(l,u),!0);m!==p&&(p=m,kt()),Gt(t,o.options,m,n)},10),qt=l,Wt=u)}else{if(!this.options.bubbleScroll||Ue(c,!0)===we()){kt();return}Gt(t,this.options,Ue(c,!1),!1)}}},De(a,{pluginName:"scroll",initializeByDefault:!0})}function kt(){R.forEach(function(a){clearInterval(a.pid)}),R=[]}function wn(){clearInterval(ot)}var Gt=An(function(a,e,t,n){if(e.scroll){var o=(a.touches?a.touches[0]:a).clientX,l=(a.touches?a.touches[0]:a).clientY,u=e.scrollSensitivity,c=e.scrollSpeed,p=we(),m=!1,y;Qt!==t&&(Qt=t,kt(),rt=e.scroll,y=e.scrollFn,rt===!0&&(rt=Ue(t,!0)));var v=0,D=rt;do{var U=D,_=L(U),I=_.top,X=_.bottom,Q=_.left,H=_.right,ae=_.width,G=_.height,Se=void 0,ee=void 0,ke=U.scrollWidth,Me=U.scrollHeight,K=S(U),je=U.scrollLeft,ue=U.scrollTop;U===p?(Se=ae<ke&&(K.overflowX==="auto"||K.overflowX==="scroll"||K.overflowX==="visible"),ee=G<Me&&(K.overflowY==="auto"||K.overflowY==="scroll"||K.overflowY==="visible")):(Se=ae<ke&&(K.overflowX==="auto"||K.overflowX==="scroll"),ee=G<Me&&(K.overflowY==="auto"||K.overflowY==="scroll"));var Ee=Se&&(Math.abs(H-o)<=u&&je+ae<ke)-(Math.abs(Q-o)<=u&&!!je),de=ee&&(Math.abs(X-l)<=u&&ue+G<Me)-(Math.abs(I-l)<=u&&!!ue);if(!R[v])for(var fe=0;fe<=v;fe++)R[fe]||(R[fe]={});(R[v].vx!=Ee||R[v].vy!=de||R[v].el!==U)&&(R[v].el=U,R[v].vx=Ee,R[v].vy=de,clearInterval(R[v].pid),(Ee!=0||de!=0)&&(m=!0,R[v].pid=setInterval((function(){n&&this.layer===0&&x.active._onTouchMove(Ct);var be=R[this.layer].vy?R[this.layer].vy*c:0,pe=R[this.layer].vx?R[this.layer].vx*c:0;typeof y=="function"&&y.call(x.dragged.parentNode[ne],pe,be,a,Ct,R[this.layer].el)!=="continue"||Dn(R[this.layer].el,pe,be)}).bind({layer:v}),24))),v++}while(e.bubbleScroll&&D!==p&&(D=Ue(D,!1)));en=m}},30),Un=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,l=e.activeSortable,u=e.dispatchSortableEvent,c=e.hideGhostForTarget,p=e.unhideGhostForTarget;if(t){var m=n||l;c();var y=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,v=document.elementFromPoint(y.clientX,y.clientY);p(),m&&!m.el.contains(v)&&(u("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function an(){}an.prototype={startIndex:null,dragStart:function(e){var t=e.oldDraggableIndex;this.startIndex=t},onSpill:function(e){var t=e.dragEl,n=e.putSortable;this.sortable.captureAnimationState(),n&&n.captureAnimationState();var o=Je(this.sortable.el,this.startIndex,this.options);o?this.sortable.el.insertBefore(t,o):this.sortable.el.appendChild(t),this.sortable.animateAll(),n&&n.animateAll()},drop:Un};De(an,{pluginName:"revertOnSpill"});function rn(){}rn.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable,o=n||this.sortable;o.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),o.animateAll()},drop:Un};De(rn,{pluginName:"removeOnSpill"});x.mount(new qa);x.mount(rn,an);const Wa={key:0,class:"tw:flex tw:gap-2 tw:mb-4 tw:items-center"},Ga={class:"tw:flex tw:gap-1"},Ka={key:0,class:"tw:flex tw:gap-2 tw:mb-3 tw:items-center"},Za={class:"tw:flex tw:gap-1"},Ja={key:0,class:"tw:flex tw:gap-2 tw:mb-3 tw:items-center"},Qa={class:"tw:flex tw:gap-1"},ei={key:0,class:"tw:flex tw:flex-col tw:gap-4"},ti={key:0,class:"tw:flex tw:flex-col tw:gap-3"},ni={class:"tw:flex tw:flex-col tw:gap-1"},ai={class:"tw:flex tw:flex-col tw:gap-1"},ii={key:1,class:"tw:flex tw:flex-col tw:gap-4"},ri={class:"tw:flex tw:items-center tw:justify-between"},oi={class:"tw:flex tw:gap-2"},li={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},si={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},ci={class:"tw:flex tw:gap-2"},ui={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},di={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},fi={class:"tw:justify-end tw:flex"},pi={class:"tw:flex tw:flex-col tw:gap-1"},mi={key:2,class:"tw:flex tw:flex-col tw:gap-4"},gi={class:"tw:flex tw:items-center tw:justify-between"},hi={class:"tw:flex tw:gap-2"},vi={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},bi={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},yi={class:"tw:justify-end tw:flex"},wi={class:"tw:flex tw:flex-col tw:gap-1"},xi={key:3,class:"tw:flex tw:flex-col tw:gap-3"},Si={class:"tw:flex tw:flex-col tw:gap-1"},ki={class:"tw:flex tw:items-center tw:gap-2"},Ei={class:"tw:flex tw:flex-col tw:gap-1"},_i={key:4,class:"tw:flex tw:flex-col tw:gap-3"},Ai={class:"tw:flex tw:flex-col tw:gap-1"},Di={key:5,class:"tw:flex tw:flex-col tw:gap-4"},Ci={class:"tw:flex tw:items-center tw:justify-between"},Ti={class:"tw:flex tw:flex-col tw:gap-1"},Ii={class:"tw:flex tw:flex-col tw:gap-3"},Oi={class:"tw:flex tw:gap-2"},Pi={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},Vi={class:"tw:flex-1 tw:flex tw:flex-col tw:gap-1"},Ni={class:"tw:justify-end tw:flex"},Ui={class:"tw:flex tw:flex-col tw:gap-1"},Mi={key:6,class:"tw:text-sm tw:text-gray-600"},ji=xn({__name:"PageBuilder",props:{structure:{type:Array,default:()=>[]},isUserAdmin:{type:Boolean,default:!1}},setup(a){const e=a,t=Pe(()=>e.isUserAdmin),n=ia(),o=Pe(()=>`cms:${n.path}`),l=Oe(!1),u=Oe([]),c=Oe(null),p={text:ga,tiles:ha,cards:va,breadcrumbs:ba,accordion:un,tabs:dn},m=Pe(()=>Object.keys(p).map(s=>({label:s.charAt(0).toUpperCase()+s.slice(1),value:s}))),y=Pe(()=>[{label:"Text",value:"text"},{label:"Tiles",value:"tiles"},{label:"Cards",value:"cards"}]),v=Oe(""),D=Pe(()=>l.value&&c.value?c.value:u.value);function U(s){return wa(oa(s))}function _(s){return s.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}function I(s,i){const r=(s.getAttribute("class")||"").trim(),f=r?r.split(/\s+/):[];f.includes(i)||f.push(i),s.setAttribute("class",f.join(" ").trim())}function X(s){const i=s.getAttribute("class")||"";if(/\bql-align-center\b/.test(i))return"cms-center";if(/\bql-align-right\b/.test(i))return"cms-right";if(/\bql-align-justify\b/.test(i))return"cms-justify";if(/\bql-align-left\b/.test(i))return"cms-left";const r=s.style?.textAlign||"",f=String(r).toLowerCase().trim();return f==="center"?"cms-center":f==="right"?"cms-right":f==="justify"?"cms-justify":f==="left"?"cms-left":""}function Q(s){const i=String(s??"").trim();if(!i)return'<p class="cms-nl"></p>';try{const r=new DOMParser().parseFromString(i,"text/html"),f=r.body;return f.querySelectorAll("undefined").forEach(d=>{const h=r.createElement("p");for(;d.firstChild;)h.appendChild(d.firstChild);d.replaceWith(h)}),f.querySelectorAll("div").forEach(d=>{const h=r.createElement("p");for(;d.firstChild;)h.appendChild(d.firstChild);d.replaceWith(h)}),f.querySelectorAll("h1").forEach(d=>{const h=X(d);
1d.setAttribute("class",["cms-title",h].filter(Boolean).join(" ")),d instanceof HTMLElement&&(d.style.textAlign="")}),f.querySelectorAll("h2").forEach(d=>{const h=X(d);d.setAttribute("class",["cms-subtitle",h].filter(Boolean).join(" ")),d instanceof HTMLElement&&(d.style.textAlign="")}),f.querySelectorAll("p").forEach(d=>{const h=!d.textContent||d.textContent.replace(/\u00a0/g,"").trim()==="",C=X(d);d.setAttribute("class",[h?"cms-nl":"cms-text",C].filter(Boolean).join(" ")),d instanceof HTMLElement&&(d.style.textAlign="")}),f.querySelectorAll("ul").forEach(d=>{d.setAttribute("class","cms-ul")}),f.querySelectorAll("ol").forEach(d=>{d.setAttribute("class","cms-ul")}),f.querySelectorAll("li").forEach(d=>{const h=X(d);d.setAttribute("class",["cms-li",h].filter(Boolean).join(" ")),d instanceof HTMLElement&&(d.style.textAlign="")}),f.querySelectorAll("blockquote, pre, code").forEach(d=>{I(d,"cms-text");const h=X(d);h&&I(d,h),d instanceof HTMLElement&&(d.style.textAlign="")}),f.querySelectorAll("[class]").forEach(d=>{const h=(d.getAttribute("class")||"").split(/\s+/).filter(C=>!/^ql-align-/.test(C)).join(" ").trim();h?d.setAttribute("class",h):d.removeAttribute("class")}),f.innerHTML}catch{return i}}function H(s){return Array.isArray(s)?s.map(i=>{const r=String(i?.block??""),f=i?.data??{},d=typeof i?.id=="string"&&i.id?i.id:crypto.randomUUID();if(r==="text"){const h=String(f?.value??""),V=/<\/?[a-z][\s\S]*>/i.test(h)?h:`<p>${_(h)}</p>`;return{id:d,block:"text",data:{...f,value:Q(V),margin:f?.margin??"12px 0px"}}}return r==="tiles"?{id:d,block:"tiles",data:{tiles:Array.isArray(f.tiles)?f.tiles:[],margin:String(f?.margin??"0 0 12px 0")}}:r==="cards"?{id:d,block:"cards",data:{cards:Array.isArray(f.cards)?f.cards:[],margin:String(f?.margin??"0 0 12px 0")}}:{id:d,block:r,data:f}}):[]}function ae(s){const i=String(s??"").trim();if(!i)return"<p></p>";try{const r=new DOMParser().parseFromString(i,"text/html"),f=r.body;return f.querySelectorAll("undefined").forEach(d=>{const h=r.createElement("p");for(;d.firstChild;)h.appendChild(d.firstChild);d.replaceWith(h)}),f.querySelectorAll(".cms-left, .cms-center, .cms-right, .cms-justify").forEach(d=>{const h=d.getAttribute("class")||"";h.includes("cms-center")?I(d,"ql-align-center"):h.includes("cms-right")?I(d,"ql-align-right"):h.includes("cms-justify")?I(d,"ql-align-justify"):h.includes("cms-left")&&I(d,"ql-align-left")}),f.querySelectorAll("[class]").forEach(d=>{const h=(d.getAttribute("class")||"").split(/\s+/).filter(C=>!["cms-title","cms-subtitle","cms-text","cms-nl","cms-ul","cms-li","cms-left","cms-center","cms-right","cms-justify"].includes(C));h.length?d.setAttribute("class",h.join(" ")):d.removeAttribute("class")}),f.innerHTML}catch{return i}}function G(s){return s.map(i=>{if(i.block==="title"){const r=_(String(i.data?.value??""));return{id:crypto.randomUUID(),block:"text",data:{value:`<h1 class="cms-title">${r}</h1>`,margin:i.data?.margin??"0 0 12px 0"}}}if(i.block==="subtitle"){const r=_(String(i.data?.value??""));return{id:crypto.randomUUID(),block:"text",data:{value:`<h2 class="cms-subtitle">${r}</h2>`,margin:i.data?.margin??"0 0 10px 0"}}}if(i.block==="text"){const r=String(i.data?.value??""),d=/<\/?[a-z][\s\S]*>/i.test(r)?r:`<p>${_(r)}</p>`;return{id:crypto.randomUUID(),block:"text",data:{value:Q(d),margin:i.data?.margin??"12px 0px"}}}if(i.block==="tiles"){const r=i.data??{};return{id:crypto.randomUUID(),block:"tiles",data:{tiles:Array.isArray(r.tiles)?r.tiles:[],margin:String(r?.margin??"0 0 12px 0")}}}
1if(i.block==="cards"){const r=i.data??{};return{id:crypto.randomUUID(),block:"cards",data:{cards:Array.isArray(r.cards)?r.cards:[],margin:String(r?.margin??"0 0 12px 0")}}}if(i.block==="tabs"){const r=i.data??{},d=(Array.isArray(r.tabs)?r.tabs:[]).map(V=>({key:String(V?.key??""),label:String(V?.label??""),children:H(V?.children??[])})),h=d[0]?.key??"",C=String(r.activeTab??"").trim()||h;return{id:crypto.randomUUID(),block:"tabs",data:{...r,margin:String(r.margin??"0 0 12px 0"),activeTab:C,tabs:d}}}if(i.block==="accordion"){const r=i.data??{};return{id:crypto.randomUUID(),block:"accordion",data:{...r,margin:String(r?.margin??"0 0 12px 0"),children:H(r.children??[])}}}return i.block==="breadcrumbs"?{id:crypto.randomUUID(),block:"breadcrumbs",data:{...i.data??{},margin:String(i.data?.margin??"0 0 24px 0"),items:Array.isArray(i.data?.items)?i.data.items:[],home:i.data?.home??{icon:"pi pi-home",to:"/"}}}:{id:crypto.randomUUID(),block:i.block,data:i.data??{}}})}function Se(s){return Array.isArray(s)?s.every(i=>i&&typeof i=="object"&&typeof i.id=="string"&&typeof i.block=="string"&&typeof i.data=="object"&&i.data!==null):!1}function ee(){const s=localStorage.getItem(o.value);if(s)try{const i=JSON.parse(s);if(Se(i))return i.map(r=>{if(r.block==="title"){const f=_(String(r.data?.value??""));return{...r,block:"text",data:{value:`<h1 class="cms-title">${f}</h1>`,margin:r.data?.margin??"0 0 12px 0"}}}if(r.block==="subtitle"){const f=_(String(r.data?.value??""));return{...r,block:"text",data:{value:`<h2 class="cms-subtitle">${f}</h2>`,margin:r.data?.margin??"0 0 10px 0"}}}if(r.block==="text"){const f=String(r.data?.value??""),h=/<\/?[a-z][\s\S]*>/i.test(f)?f:`<p>${_(f)}</p>`;return{...r,data:{...r.data,value:Q(h),margin:r.data?.margin??"12px 0px"}}}if(r.block==="tiles")return{...r,data:{...r.data??{},tiles:Array.isArray(r.data?.tiles)?r.data.tiles:[],margin:String(r.data?.margin??"0 0 12px 0")}};if(r.block==="cards")return{...r,data:{...r.data??{},cards:Array.isArray(r.data?.cards)?r.data.cards:[],margin:String(r.data?.margin??"0 0 12px 0")}};if(r.block==="tabs"){const f=r.data??{},h=(Array.isArray(f.tabs)?f.tabs:[]).map(B=>({key:String(B?.key??""),label:String(B?.label??""),children:H(B?.children??[])})),C=h[0]?.key??"",V=String(f.activeTab??"").trim()||C;return{...r,data:{...f,margin:String(f.margin??"0 0 12px 0"),activeTab:V,tabs:h}}}if(r.block==="accordion"){const f=r.data??{};return{...r,data:{...f,margin:String(f?.margin??"0 0 12px 0"),children:H(f.children??[])}}}return r.block==="breadcrumbs"?{...r,data:{...r.data??{},margin:String(r.data?.margin??"0 0 24px 0"),items:Array.isArray(r.data?.items)?r.data.items:[],home:r.data?.home??{icon:"pi pi-home",to:"/"}}}:r})}catch{}return G(e.structure)}ta(()=>{u.value=ee()}),at(()=>n.path,()=>{me(),et(),l.value=!1,c.value=null,v.value="",u.value=ee()}),at(()=>e.structure,()=>{l.value||(u.value=ee())},{deep:!0});function ke(){e.isUserAdmin&&(c.value=U(u.value),v.value="",l.value=!0)}function Me(){e.isUserAdmin&&c.value&&(u.value=U(c.value),localStorage.setItem(o.value,JSON.stringify(u.value)),me(),et(),l.value=!1,c.value=null,v.value="")}function K(){me(),et(),l.value=!1,c.value=null,v.value=""}function je(s){c.value&&($e.value&&ie.value.kind==="top"&&ie.value.index===s&&nt(),c.value.splice(s,1))}function ue(){return`tab_${crypto.randomUUID().slice(0,8)}`}function Ee(s){switch(s){case"text":return{value:'<p class="cms-text">New text...</p>',margin:"12px 0px"};case"tiles":return{tiles:[],margin:"0 0 12px 0"};case"cards":return{cards:[],margin:"0 0 12px 0"};case"breadcrumbs":return{home:{icon:"pi pi-home",to:"/"},items:[],margin:"0 0 24px 0"};case"accordion":return{title:"Accordion title",isOpen:!0,margin:"0 0 12px 0",children:[]};case"tabs":{const i=ue();return{margin:"0 0 12px 0",activeTab:i,tabs:[{key:i,label:"Tab 1",children:[]}]}}default:return{}}}function de(){if(!c.value||!v.value)return;const s=v.value;c.value.push({id:crypto.randomUUID(),block:s,data:Ee(s)}),v.value=""}const fe=Oe(null);let be=null;function pe(){fe.value&&c.value&&(me(),be=new x(fe.value,{animation:150,handle:".drag-handle",ghostClass:"tw:opacity-60",onEnd:s=>{if(!c.value)return;const i=s.oldIndex??-1,r=s.newIndex??-1;if(i<0||r<0||i===r)return;const f=c.value.splice(i,1)[0];f&&c.value.splice(r,0,f)}}))}function me(){be&&(be.destroy(),be=null)}const _e=new Map,Qe=new Map,ge=new Map;function mt(s,i){if(!i){_e.delete(s),ge.get(s)?.destroy(),ge.delete(s);return}_e.set(s,i)}function It(s,i,r){const f=`${s}:${String(i)}`;if(!r){Qe.delete(f),ge.get(f)?.destroy(),ge.delete(f);return}Qe.set(f,r)}function et(){for(const s of ge.values())s.destroy();ge.clear()}
1function Mn(s,i){if(!c.value)return;const r=c.value.find(h=>h.id===s);if(!r||r.block!=="accordion")return;const f=r.data;Array.isArray(f.children)||(f.children=[]),ge.get(s)?.destroy();const d=new x(i,{animation:150,handle:".drag-handle-child",ghostClass:"tw:opacity-60",onEnd:h=>{if(!c.value)return;const C=c.value.find(Ie=>Ie.id===s);if(!C||C.block!=="accordion")return;const V=C.data;if(!Array.isArray(V.children))return;const B=h.oldIndex??-1,N=h.newIndex??-1;if(B<0||N<0||B===N)return;const se=V.children.splice(B,1)[0];se&&V.children.splice(N,0,se)}});ge.set(s,d)}function jn(s,i,r){if(!c.value)return;const f=`${s}:${String(i)}`,d=c.value.find(B=>B.id===s);if(!d||d.block!=="tabs")return;const h=d.data;Array.isArray(h.tabs)||(h.tabs=[]);const C=h.tabs.find(B=>String(B.key)===String(i));if(!C)return;Array.isArray(C.children)||(C.children=[]),ge.get(f)?.destroy();const V=new x(r,{animation:150,handle:".drag-handle-child",ghostClass:"tw:opacity-60",onEnd:B=>{if(!c.value)return;const N=c.value.find(Ut=>Ut.id===s);if(!N||N.block!=="tabs")return;const se=N.data;if(!Array.isArray(se.tabs))return;const Ie=se.tabs.find(Ut=>String(Ut.key)===String(i));if(!Ie||!Array.isArray(Ie.children))return;const Vt=B.oldIndex??-1,Nt=B.newIndex??-1;if(Vt<0||Nt<0||Vt===Nt)return;const cn=Ie.children.splice(Vt,1)[0];cn&&Ie.children.splice(Nt,0,cn)}});ge.set(f,V)}
1function Xe(){if(!(!l.value||!e.isUserAdmin)&&c.value){for(const[s,i]of _e.entries())Mn(s,i);for(const[s,i]of Qe.entries()){const[r,f]=s.split(":");!r||!f||jn(r,f,i)}}}at(()=>l.value,async s=>{e.isUserAdmin&&(s?(await Ye(),pe(),Xe()):(me(),et()))}),at(()=>c.value?c.value.length:0,async()=>{!l.value||!e.isUserAdmin||(await Ye(),pe(),Xe())}),na(()=>{me(),et()});const on=ra()?.type;function Ot(s){const i=p[s];return!i||on&&i===on?"div":i}function ln(s){if(s.block!=="accordion")return[];const i=s.data;return Array.isArray(i.children)?i.children:[]}const tt=$t({});function Fn(s){if(!c.value)return;const i=c.value[s];if(!i||i.block!=="accordion")return;const r=tt[i.id];if(!r)return;const f=i.data;Array.isArray(f.children)||(f.children=[]),f.children.push({id:crypto.randomUUID(),block:r,data:Ee(r)}),tt[i.id]="",Ye().then(()=>Xe())}function $n(s,i){if(!c.value)return;const r=c.value[s];if(!r||r.block!=="accordion")return;const f=r.data;Array.isArray(f.children)&&($e.value&&ie.value.kind==="accordionChild"&&ie.value.parentIndex===s&&ie.value.childIndex===i&&nt(),f.children.splice(i,1))}const Te=$t({}),Fe=$t({});function zn(s){if(s.block!=="tabs")return[];const i=s.data;return(Array.isArray(i.tabs)?i.tabs:[]).map(f=>({value:String(f.key??""),label:String(f.label??"")})).filter(f=>f.value)}function Bn(s){const i=s.data,f=(Array.isArray(i.tabs)?i.tabs:[]).map(V=>({value:String(V.key??""),label:String(V.label??""),disabled:!1})).filter(V=>V.value),d=f[0]?.value??"",h=String(Te[s.id]??"").trim(),C=(h&&f.some(V=>V.value===h)?h:"")||d;return C&&(Te[s.id]=C),f}function sn(s,i){if(s.block!=="tabs")return[];const r=s.data,h=(Array.isArray(r.tabs)?r.tabs:[]).find(C=>String(C.key)===String(i))?.children;return Array.isArray(h)?h:[]}function Hn(s,i){if(!c.value)return;const r=c.value[s];if(!r||r.block!=="tabs")return;const f=String(i??"").trim();if(!f)return;const d=`${r.id}:${f}`,h=Fe[d];if(!h)return;const C=r.data;Array.isArray(C.tabs)||(C.tabs=[]);const V=C.tabs.find(B=>String(B.key)===f);V&&(Array.isArray(V.children)||(V.children=[]),V.children.push({id:crypto.randomUUID(),block:h,data:Ee(h)}),Fe[d]="",Ye().then(()=>Xe()))}function Rn(s,i,r){if(!c.value)return;const f=c.value[s];if(!f||f.block!=="tabs")return;const d=String(i??"").trim();if(!d)return;const h=f.data;if(!Array.isArray(h.tabs))return;const C=h.tabs.find(V=>String(V.key)===d);!C||!Array.isArray(C.children)||($e.value&&ie.value.kind==="tabsChild"&&ie.value.parentIndex===s&&ie.value.tabKey===d&&ie.value.childIndex===r&&nt(),C.children.splice(r,1))}at(()=>({...Te}),async()=>{for(const s of D.value){if(s.block!=="tabs")continue;const i=String(Te[s.id]??"").trim();i&&(s.data={...s.data,activeTab:i})}!l.value||!e.isUserAdmin||(await Ye(),Xe())},{deep:!0});const $e=Oe(!1),ie=Oe({kind:"top",index:0}),ye=Pe(()=>{if(!c.value)return null;const s=ie.value;if(s.kind==="top")return D.value[s.index]??null;if(s.kind==="accordionChild"){const f=D.value[s.parentIndex];return!f||f.block!=="accordion"?null:ln(f)[s.childIndex]??null}const i=D.value[s.parentIndex];return!i||i.block!=="tabs"?null:sn(i,s.tabKey)[s.childIndex]??null}),Ln=Pe(()=>{const s=ye.value?.block??"block";return`Edit ${s.charAt(0).toUpperCase()}${s.slice(1)}`}),b=Oe({text:{value:"",margin:""},tiles:{tiles:[],margin:""},cards:{cards:[],margin:""},accordion:{title:"",isOpen:!0,margin:""},tabs:{margin:"",activeTab:"",tabs:[]},breadcrumbs:{margin:""}});function Xn(s){ie.value={kind:"top",index:s},Pt()}function Yn(s,i){ie.value={kind:"accordionChild",parentIndex:s,childIndex:i},Pt()}function qn(s,i,r){ie.value={kind:"tabsChild",parentIndex:s,tabKey:i,childIndex:r},Pt()}function Pt(){if(!c.value)return;const s=ye.value;if(s){if(s.block==="text")b.value.text.value=ae(String(s.data?.value??"<p></p>")),b.value.text.margin=String(s.data?.margin??"12px 0px");else if(s.block==="tiles"){const i=Array.isArray(s.data?.tiles)?s.data.tiles:[];b.value.tiles.tiles=i.map(r=>({title:String(r?.title??""),info:String(r?.info??""),type:String(r?.type??""),content:String(r?.content??"")})),b.value.tiles.margin=String(s.data?.margin??"0 0 12px 0")}
1else if(s.block==="cards"){const i=Array.isArray(s.data?.cards)?s.data.cards:[];b.value.cards.cards=i.map(r=>({title:String(r?.title??""),link:String(r?.link??"")})),b.value.cards.margin=String(s.data?.margin??"0 0 12px 0")}else if(s.block==="accordion")b.value.accordion.title=String(s.data?.title??"Accordion title"),b.value.accordion.isOpen=!!(s.data?.isOpen??!0),b.value.accordion.margin=String(s.data?.margin??"0 0 12px 0");else if(s.block==="breadcrumbs")b.value.breadcrumbs.margin=String(s.data?.margin??"0 0 24px 0");else if(s.block==="tabs"){const i=s.data;b.value.tabs.activeTab=String(i.activeTab??Te[s.id]??"");const r=Array.isArray(i.tabs)?i.tabs:[];b.value.tabs.tabs=r.map(f=>({key:String(f.key??""),label:String(f.label??""),origKey:String(f.key??"")})),b.value.tabs.margin=String(i.margin??"0 0 12px 0")}$e.value=!0}}function nt(){$e.value=!1}function Wn(){if(!c.value)return;const s=ye.value;if(s){if(s.block==="text")s.data={...s.data,value:Q(String(b.value.text.value??"")),margin:b.value.text.margin};else if(s.block==="tiles")s.data={...s.data,tiles:b.value.tiles.tiles.map(i=>({title:i.title,info:i.info,type:i.type,content:i.content})),margin:String(b.value.tiles.margin??"0 0 12px 0")};
1else if(s.block==="cards")s.data={...s.data,cards:b.value.cards.cards.map(i=>({title:i.title,link:i.link})),margin:String(b.value.cards.margin??"0 0 12px 0")};else if(s.block==="accordion")s.data={...s.data,title:b.value.accordion.title,isOpen:b.value.accordion.isOpen,margin:b.value.accordion.margin,children:Array.isArray(s.data?.children)?s.data.children:[]};else if(s.block==="breadcrumbs")s.data={...s.data,margin:String(b.value.breadcrumbs.margin??"0 0 24px 0")};else if(s.block==="tabs"){const i=s.data,r=Array.isArray(i.tabs)?i.tabs:[],f={};for(const N of r){const se=String(N.key??"");f[se]=Array.isArray(N.children)?N.children:[]}const d=b.value.tabs.tabs.map(N=>({key:String(N.key??"").trim(),label:String(N.label??"").trim(),origKey:String(N.origKey??"").trim()})).filter(N=>N.key),h=new Set,V=d.filter(N=>h.has(N.key)?!1:(h.add(N.key),!0)).map(N=>{const se=f[N.key],Ie=N.origKey&&f[N.origKey]?f[N.origKey]:[];return{key:N.key,label:N.label||N.key,children:se??Ie??[]}});for(const N of V){const se=`${s.id}:${N.key}`;se in Fe||(Fe[se]="")}let B=String(b.value.tabs.activeTab??"").trim();V.some(N=>N.key===B)||(B=V[0]?.key??""),s.data={...s.data,tabs:V,activeTab:B,margin:String(b.value.tabs.margin??"0 0 12px 0")},Te[s.id]=B,Ye().then(()=>Xe())}nt()}}function Gn(){b.value.tiles.tiles.push({title:"",info:"",type:"",content:""})}function Kn(s){b.value.tiles.tiles.splice(s,1)}function Zn(){b.value.cards.cards.push({title:"",link:""})}function Jn(s){b.value.cards.cards.splice(s,1)}function Qn(){const s=ue();b.value.tabs.tabs.push({key:s,label:`Tab ${b.value.tabs.tabs.length+1}`,origKey:s}),b.value.tabs.activeTab||(b.value.tabs.activeTab=s)}function ea(s){const i=b.value.tabs.tabs[s];b.value.tabs.tabs.splice(s,1),i&&b.value.tabs.activeTab===i.key&&(b.value.tabs.activeTab=b.value.tabs.tabs[0]?.key??"")}return(s,i)=>(A(),M("div",null,[t.value?(A(),M("div",Wa,[l.value?(A(),M(ze,{key:1},[T(k(F),{label:"Save",icon:"pi pi-save",onClick:Me}),T(k(F),{label:"Cancel",icon:"pi pi-times",severity:"secondary",onClick:K}),T(k(zt),{modelValue:v.value,"onUpdate:modelValue":i[0]||(i[0]=r=>v.value=r),options:m.value,optionLabel:"label",optionValue:"value",placeholder:"Izberi blok",class:"tw:w-64"},null,8,["modelValue","options"]),T(k(F),{label:"Dodaj blok",icon:"pi pi-plus",disabled:!v.value,onClick:de},null,8,["disabled"])],64)):(A(),Z(k(F),{key:0,label:"Edit mode",icon:"pi pi-pencil",severity:"secondary",onClick:ke}))])):re("",!0),w("div",{ref_key:"listEl",ref:fe,class:"tw:flex tw:flex-col tw:gap-3"},[(A(!0),M(ze,null,Be(D.value,(r,f)=>(A(),M("div",{key:r.id,class:Mt(["tw:relative",l.value&&t.value?"tw:border tw:border-dashed tw:border-gray-400 tw:rounded tw:p-3":""])},[w("div",Ga,[l.value&&t.value?(A(),Z(k(F),{key:0,icon:"pi pi-bars",text:"",class:"drag-handle"})):re("",!0),l.value&&t.value?(A(),Z(k(F),{key:1,icon:"pi pi-pencil",text:"",onClick:d=>Xn(f)},null,8,["onClick"])):re("",!0),l.value&&t.value?(A(),Z(k(F),{key:2,icon:"pi pi-trash",severity:"danger",text:"",onClick:d=>je(f)},null,8,["onClick"])):re("",!0)]),r.block!=="accordion"&&r.block!=="tabs"?(A(),Z(Ft(Ot(r.block)),jt({key:0,ref_for:!0},r.data),null,16)):r.block==="accordion"?(A(),Z(un,{key:1,title:String(r.data?.title??"Accordion"),isOpen:!!(r.data?.isOpen??!0),margin:String(r.data?.margin??"0 0 12px 0")},{default:gt(()=>[l.value&&t.value?(A(),M("div",Ka,[T(k(zt),{modelValue:tt[r.id],"onUpdate:modelValue":d=>tt[r.id]=d,options:y.value,optionLabel:"label",optionValue:"value",placeholder:"Izberi blok",class:"tw:w-64"},null,8,["modelValue","onUpdate:modelValue","options"]),T(k(F),{label:"Dodaj blok",icon:"pi pi-plus",disabled:!tt[r.id],onClick:d=>Fn(f)},null,8,["disabled","onClick"])])):re("",!0),w("div",{class:"tw:flex tw:flex-col tw:gap-3",ref_for:!0,ref:d=>mt(r.id,d)},[(A(!0),M(ze,null,Be(ln(r),(d,h)=>(A(),M("div",{key:d.id,class:Mt(["tw:relative",l.value&&t.value?"tw:border tw:border-dashed tw:border-gray-300 tw:rounded tw:p-2":""])},[w("div",Za,[l.value&&t.value?(A(),Z(k(F),{key:0,icon:"pi pi-bars",text:"",class:"drag-handle-child"})):re("",!0),l.value&&t.value?(A(),Z(k(F),{key:1,icon:"pi pi-pencil",text:"",onClick:C=>Yn(f,h)},null,8,["onClick"])):re("",!0),l.value&&t.value?(A(),Z(k(F),{key:2,icon:"pi pi-trash",severity:"danger",text:"",onClick:C=>$n(f,h)},null,8,["onClick"])):re("",!0)]),(A(),Z(Ft(Ot(d.block)),jt({ref_for:!0},d.data),null,16))],2))),128))],512)]),_:2},1032,["title","isOpen","margin"])):(A(),Z(dn,{key:2,tabs:Bn(r),margin:String(r.data?.margin??"0 0 12px 0"),value:Te[r.id],"onUpdate:value":d=>Te[r.id]=d},aa({_:2},[Be(zn(r),d=>({name:String(d.value),fn:gt(()=>[l.value&&t.value?(A(),M("div",Ja,[T(k(zt),{modelValue:Fe[`${r.id}:${String(d.value)}`],"onUpdate:modelValue":h=>Fe[`${r.id}:${String(d.value)}`]=h,options:y.value,optionLabel:"label",optionValue:"value",placeholder:"Izberi blok",class:"tw:w-64"},null,8,["modelValue","onUpdate:modelValue","options"]),T(k(F),{label:"Dodaj blok",icon:"pi pi-plus",disabled:!Fe[`${r.id}:${String(d.value)}`],onClick:h=>Hn(f,String(d.value))},null,8,["disabled","onClick"])])):re("",!0),w("div",{class:"tw:flex tw:flex-col tw:gap-3",ref_for:!0,ref:h=>It(r.id,String(d.value),h)},[(A(!0),M(ze,null,Be(sn(r,String(d.value)),(h,C)=>(A(),M("div",{key:h.id,class:Mt(["tw:relative",l.value&&t.value?"tw:border tw:border-dashed tw:border-gray-300 tw:rounded tw:p-2":""])},[w("div",Qa,[l.value&&t.value?(A(),Z(k(F),{key:0,icon:"pi pi-bars",text:"",class:"drag-handle-child"})):re("",!0),l.value&&t.value?(A(),Z(k(F),{key:1,icon:"pi pi-pencil",text:"",onClick:V=>qn(f,String(d.value),C)},null,8,["onClick"])):re("",!0),l.value&&t.value?(A(),Z(k(F),{key:2,icon:"pi pi-trash",severity:"danger",text:"",onClick:V=>Rn(f,String(d.value),C)},null,8,["onClick"])):re("",!0)]),(A(),Z(Ft(Ot(h.block)),jt({ref_for:!0},h.data),null,16))],2))),128))],512)])}))]),1032,["tabs","margin","value","onUpdate:value"]))],2))),128))],512),T(k(ua),{visible:$e.value,"onUpdate:visible":i[11]||(i[11]=r=>$e.value=r),modal:"",header:Ln.value,style:{width:"min(860px, 95vw)"}},{footer:gt(()=>[T(k(F),{label:"Cancel",severity:"secondary",onClick:nt}),T(k(F),{label:"Save",icon:"pi pi-save",onClick:Wn})]),default:gt(()=>[ye.value?(A(),M("div",ei,[ye.value.block==="text"?(A(),M("div",ti,[w("div",ni,[i[
112]||(i[12]=w("label",{class:"tw:text-sm tw:font-medium"},"Content",-1)),T(k(fa),{class:"cms-editor",modelValue:b.value.text.value,"onUpdate:modelValue":i[1]||(i[1]=r=>b.value.text.value=r),editorStyle:"height: 260px"},null,8,["modelValue"])]),w("div",ai,[i[13]||(i[13]=w("label",{class:"tw:text-sm tw:font-medium"},"Margin (CSS)",-1)),T(k(q),{modelValue:b.value.text.margin,"onUpdate:modelValue":i[2]||(i[2]=r=>b.value.text.margin=r),placeholder:"12px 0px"},null,8,["modelValue"])])])):ye.value.block==="tiles"?(A(),M("div",ii,[w("div",ri,[i[14]||(i[14]=w("div",{class:"tw:font-medium"},"Tiles",-1)),T(k(F),{label:"Add tile",icon:"pi pi-plus",size:"small",onClick:Gn})]),(A(!0),M(ze,null,Be(b.value.tiles.tiles,(r,f)=>(A(),M("div",{key:f,class:"tw:border tw:rounded tw:p-3 tw:flex tw:flex-col tw:gap-3"},[w("div",oi,[w("div",li,[i[15]||(i[15]=w("label",{class:"tw:text-sm tw:font-medium"},"Title",-1)),T(k(q),{modelValue:r.title,"onUpdate:modelValue":d=>r.title=d,placeholder:"Title"},null,8,["modelValue","onUpdate:modelValue"])]),w("div",si,[i[16]||(i[16]=w("label",{class:"tw:text-sm tw:font-medium"},"Info",-1)),T(k(q),{modelValue:r.info,"onUpdate:modelValue":d=>r.info=d,placeholder:"Info"},null,8,["modelValue","onUpdate:modelValue"])])]),w("div",ci,[w("div",ui,[i[17]||(i[17]=w("label",{class:"tw:text-sm tw:font-medium"},"Type",-1)),T(k(q),{modelValue:r.type,"onUpdate:modelValue":d=>r.type=d,placeholder:"Type"},null,8,["modelValue","onUpdate:modelValue"])]),w("div",di,[i[18]||(i[18]=w("label",{class:"tw:text-sm tw:font-medium"},"Content",-1)),T(k(q),{modelValue:r.content,"onUpdate:modelValue":d=>r.content=d,placeholder:"Content"},null,8,["modelValue","onUpdate:modelValue"])])]),w("div",fi,[T(k(F),{icon:"pi pi-trash",severity:"danger",text:"",onClick:d=>Kn(f)},null,8,["onClick"])])]))),128)),w("div",pi,[i[19]||(i[19]=w("label",{class:"tw:text-sm tw:font-medium"},"Margin (CSS)",-1)),T(k(q),{modelValue:b.value.tiles.margin,"onUpdate:modelValue":i[3]||(i[3]=r=>b.value.tiles.margin=r),placeholder:"0 0 12px 0"},null,8,["modelValue"])])])):ye.value.block==="cards"?(A(),M("div",mi,[w("div",gi,[i[20]||(i[20]=w("div",{class:"tw:font-medium"},"Cards",-1)),T(k(F),{label:"Add card",icon:"pi pi-plus",size:"small",onClick:Zn})]),(A(!0),M(ze,null,Be(b.value.cards.cards,(r,f)=>(A(),M("div",{key:f,class:"tw:border tw:rounded tw:p-3 tw:flex tw:flex-col tw:gap-3"},[w("div",hi,[w("div",vi,[i[21]||(i[21]=w("label",{class:"tw:text-sm tw:font-medium"},"Title",-1)),T(k(q),{modelValue:r.title,"onUpdate:modelValue":d=>r.title=d,placeholder:"Title"},null,8,["modelValue","onUpdate:modelValue"])]),w("div",bi,[i[22]||(i[22]=w("label",{class:"tw:text-sm tw:font-medium"},"Link",-1)),T(k(q),{modelValue:r.link,"onUpdate:modelValue":d=>r.link=d,placeholder:"/path or https://..."},null,8,["modelValue","onUpdate:modelValue"])])]),w("div",yi,[T(k(F),{icon:"pi pi-trash",severity:"danger",text:"",onClick:d=>Jn(f)},null,8,["onClick"])])]))),128)),w("div",wi,[i[23]||(i[23]=w("label",{class:"tw:text-sm tw:font-medium"},"Margin (CSS)",-1)),T(k(q),{modelValue:b.value.cards.margin,"onUpdate:modelValue":i[4]||(i[4]=r=>b.value.cards.margin=r),placeholder:"0 0 12px 0"},null,8,["modelValue"])])])):ye.value.block==="accordion"?(A(),M("div",xi,[w("div",Si,[i[24]||(i[24]=w("label",{class:"tw:text-sm tw:font-medium"},"Accordion title",-1)),T(k(q),{modelValue:b.value.accordion.title,"onUpdate:modelValue":i[5]||(i[5]=r=>b.value.accordion.title=r),placeholder:"Accordion title..."},null,8,["modelValue"])]),w("div",ki,[T(k(da),{modelValue:b.value.accordion.isOpen,"onUpdate:modelValue":i[6]||(i[6]=r=>b.value.accordion.isOpen=r),binary:!0},null,8,["modelValue"]),i[25]||(i[25]=w("span",{class:"tw:text-sm"},"Open by default",-1))]),w("div",Ei,[i[26]||(i[26]=w("label",{class:"tw:text-sm tw:font-medium"},"Margin (CSS)",-1)),T(k(q),{modelValue:b.value.accordion.margin,"onUpdate:modelValue":i[7]||(i[7]=r=>b.value.accordion.margin=r),placeholder:"0 0 12px 0"},null,8,["modelValue"])])])):ye.value.block==="breadcrumbs"?(A(),M("div",_i,[w("div",Ai,[i[27]||(i[27]=w("label",{class:"tw:text-sm tw:font-medium"},"Margin (CSS)",-1)),T(k(q),{modelValue:b.value.breadcrumbs.margin,"onUpdate:modelValue":i[8]||(i[8]=r=>b.value.breadcrumbs.margin=r),placeholder:"0 0 24px 0"},null,8,["modelValue"])])])):ye.value.block==="tabs"?(A(),M("div",Di,[w("div",Ci,[i[28]||(i[28]=w("div",{class:"tw:font-medium"},"Tabs",-1)),T(k(F),{label:"Add tab",icon:"pi pi-plus",size:"small",onClick:Qn})]),w("div",Ti,[i[29]||(i[29]=w("label",{class:"tw:text-sm tw:font-medium"},"Active tab key",-1)),T(k(q),{modelValue:b.value.tabs.activeTab,"onUpdate:modelValue":i[9]||(i[9]=r=>b.value.tabs.activeTab=r),placeholder:"tab_xxxxxxxx"},null,8,["modelValue"])]),w("div",Ii,[(A(!0),M(ze,null,Be(b.value.tabs.tabs,(r,f)=>(A(),M("div",{key:f,class:"tw:border tw:rounded tw:p-3 tw:flex tw:flex-col tw:gap-3"},[w("div",Oi,[w("div",Pi,[i[30]||(i[30]=w("label",{class:"tw:text-sm tw:font-medium"},"Key",-1)),T(k(q),{modelValue:r.key,"onUpdate:modelValue":d=>r.key=d,placeholder:"tab_xxxxxxxx"},null,8,["modelValue","onUpdate:modelValue"])]),w("div",Vi,[i[31]||(i[31]=w("label",{class:"tw:text-sm tw:font-medium"},"Label",-1)),T(k(q),{modelValue:r.label,"onUpdate:modelValue":d=>r.label=d,placeholder:"Tab label"},null,8,["modelValue","onUpdate:modelValue"])])]),w("div",Ni,[T(k(F),{icon:"pi pi-trash",severity:"danger",text:"",onClick:d=>ea(f)},null,8,["onClick"])])]))),128))]),w("div",Ui,[i[32]||(i[32]=w("label",{class:"tw:text-sm tw:font-medium"},"Margin (CSS)",-1)),T(k(q),{modelValue:b.value.tabs.margin,"onUpdate:modelValue":i[10]||(i[10]=r=>b.value.tabs.margin=r),placeholder:"0 0 12px 0"},null,8,["modelValue"])])])):(A(),M("div",Mi," No editor defined for this block. "))])):re("",!0)]),_:1},8,["visible","header"])]))}}),Fi={class:"main-wrapper"},$i={class:"tw:p-4 tw:md:p-16 tw:flex tw:flex-col tw:gap-3 cms-wrapper pretty-container"},rr=xn({__name:"WaterAtlas",setup(a){const{t:e}=la(),t=Pe(()=>ca.tokenParsed?.resource_access?.["ev-portal-api"]?.roles?.includes("admin")??!0),n=[{block:"breadcrumbs",data:{home:{icon:"pi pi-home",to:"/"},items:[{label:"Atlas Voda",to:"/atlas-voda/",disabled:!0}]}},{block:"text",data:{value:"Ta (pod)zbirka vodne infrastrukture vključuje objekte in naprave ali ureditve, namenjene urejanju voda, zlasti visokovodne nasipe, jezove, pragove, zadrževalnike, brez zemljišč na območju zadrževalnika, namenjene občasnemu zadrževanju voda, zbiralnike. Objekt, naprava ali ureditev pridobi status vodne infrastrukture z odločbo, ki jo izda ministr
1stvo po zaključenem posegu v prostor.",margin:"12px 0px"}},{block:"tiles",data:{tiles:[{type:"PDF",info:"12.1.2026",title:"Letno poročilo",content:"Pregled poslovanja za preteklo leto."},{type:"PDF",info:"12.1.2026",title:"Letno poročilo",content:"Pregled poslovanja za preteklo leto."},{type:"PDF",info:"12.1.2026",title:"Letno poročilo",content:"Pregled poslovanja za preteklo leto."},{type:"PDF",info:"12.1.2026",title:"Letno poročilo",content:"Pregled poslovanja za preteklo leto."}]}}];return(o,l)=>{const u=sa("PageHeader");return A(),M("div",Fi,[T(u,{backgroundImage:"/header_bg.webp",title:k(e)("home.water_atlas")},null,8,["title"]),w("div",$i,[T(ji,{"storage-key":"cms:water-atlas:letno-porocilo","is-user-admin":t.value,structure:n},null,8,["is-user-admin"])])])}}});export{rr as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.