View file File name : index.js Content :(()=>{var e={184:(e,t)=>{var n;!function(){"use strict";var o={}.hasOwnProperty;function a(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var r=typeof n;if("string"===r||"number"===r)e.push(n);else if(Array.isArray(n)){if(n.length){var i=a.apply(null,n);i&&e.push(i)}}else if("object"===r)if(n.toString===Object.prototype.toString)for(var l in n)o.call(n,l)&&n[l]&&e.push(l);else e.push(n.toString())}}return e.join(" ")}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},703:(e,t,n)=>{"use strict";var o=n(414);function a(){}function r(){}r.resetWarningCache=a,e.exports=function(){function e(e,t,n,a,r,i){if(i!==o){var l=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw l.name="Invariant Violation",l}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:r,resetWarningCache:a};return n.PropTypes=n,n}},697:(e,t,n)=>{e.exports=n(703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},941:(e,t,n)=>{var o=n(474),a=n(184),r=n(196),i=n(177);function l(e){return e&&e.__esModule?e.default:e}function s(e,t,n,o){Object.defineProperty(e,t,{get:n,set:o,enumerable:!0,configurable:!0})}function c(e){null!==e.parentElement&&e.parentElement.removeChild(e)}function d(e){e.forEach((e=>c(e.element)))}function u(e){e.forEach((e=>{!function(e,t,n){const o=e.children[n]||null;e.insertBefore(t,o)}(e.parentElement,e.element,e.oldIndex)}))}function h(e,t){const n=g(e),o={parentElement:e.from};let a=[];switch(n){case"normal":a=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":a=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...o},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...o}];break;case"multidrag":a=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...o})))}const r=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(a,t);return r}function p(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function f(e,t,n,o){const a=[...t];return e.forEach((e=>{const t=o&&n&&o(e.item,n);a.splice(e.newIndex,0,t||e.item)})),a}function g(e){return e.oldIndicies&&e.oldIndicies.length>0?"multidrag":e.swapItem?"swap":"normal"}s(e.exports,"Sortable",(()=>$882b6d93070905b3$re_export$Sortable)),s(e.exports,"Direction",(()=>$882b6d93070905b3$re_export$Direction)),s(e.exports,"DOMRect",(()=>$882b6d93070905b3$re_export$DOMRect)),s(e.exports,"GroupOptions",(()=>$882b6d93070905b3$re_export$GroupOptions)),s(e.exports,"MoveEvent",(()=>$882b6d93070905b3$re_export$MoveEvent)),s(e.exports,"Options",(()=>$882b6d93070905b3$re_export$Options)),s(e.exports,"PullResult",(()=>$882b6d93070905b3$re_export$PullResult)),s(e.exports,"PutResult",(()=>$882b6d93070905b3$re_export$PutResult)),s(e.exports,"SortableEvent",(()=>$882b6d93070905b3$re_export$SortableEvent)),s(e.exports,"SortableOptions",(()=>$882b6d93070905b3$re_export$SortableOptions)),s(e.exports,"Utils",(()=>$882b6d93070905b3$re_export$Utils)),s(e.exports,"ReactSortable",(()=>v));const m={dragging:null};class v extends r.Component{constructor(e){super(e),this.ref=r.createRef();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,m),l(i)(!e.plugins,'\nPlugins prop is no longer supported.\nInstead, mount it with "Sortable.mount(new MultiDrag())"\nPlease read the updated README.md at https://github.com/SortableJS/react-sortablejs.\n ')}componentDidMount(){if(null===this.ref.current)return;const e=this.makeOptions();l(o).create(this.ref.current,e)}componentDidUpdate(e){e.disabled!==this.props.disabled&&this.sortable&&this.sortable.option("disabled",this.props.disabled)}render(){const{tag:e,style:t,className:n,id:o}=this.props,a={style:t,className:n,id:o},i=e&&null!==e?e:"div";return r.createElement(i,{ref:this.ref,...a},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:o="sortable-chosen",dragClass:i="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:d="sortable-swap-highlight",filter:u="sortable-filter",list:h}=this.props;if(!e||null==e)return null;const p=t||"data-id";return r.Children.map(e,((e,t)=>{if(void 0===e)return;const i=h[t]||{},{className:s}=e.props,c="string"==typeof u&&{[u.replace(".","")]:!!i.filtered},d=l(a)(s,{[n]:i.selected,[o]:i.chosen,...c});return r.cloneElement(e,{[p]:e.key,className:d})}))}get sortable(){const e=this.ref.current;if(null===e)return null;const t=Object.keys(e).find((e=>e.includes("Sortable")));return t?e[t]:null}makeOptions(){const e=function(e){const{list:t,setList:n,children:o,tag:a,style:r,className:i,clone:l,onAdd:s,onChange:c,onChoose:d,onClone:u,onEnd:h,onFilter:p,onRemove:f,onSort:g,onStart:m,onUnchoose:v,onUpdate:b,onMove:y,onSpill:w,onSelect:E,onDeselect:S,...D}=e;return D}(this.props);return["onAdd","onChoose","onDeselect","onEnd","onRemove","onSelect","onSpill","onStart","onUnchoose","onUpdate"].forEach((t=>e[t]=this.prepareOnHandlerPropAndDOM(t))),["onChange","onClone","onFilter","onSort"].forEach((t=>e[t]=this.prepareOnHandlerProp(t))),{...e,onMove:(e,t)=>{const{onMove:n}=this.props,o=e.willInsertAfter||-1;if(!n)return o;const a=n(e,t,this.sortable,m);return void 0!==a&&a}}}prepareOnHandlerPropAndDOM(e){return t=>{this.callOnHandlerProp(t,e),this[e](t)}}prepareOnHandlerProp(e){return t=>{this.callOnHandlerProp(t,e)}}callOnHandlerProp(e,t){const n=this.props[t];n&&n(e,this.sortable,m)}onAdd(e){const{list:t,setList:n,clone:o}=this.props,a=h(e,[...m.dragging.props.list]);d(a),n(f(a,t,e,o).map((e=>Object.assign(e,{selected:!1}))),this.sortable,m)}onRemove(e){const{list:t,setList:n}=this.props,o=g(e),a=h(e,t);u(a);let r=[...t];if("clone"!==e.pullMode)r=p(a,r);else{let t=a;switch(o){case"multidrag":t=a.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=a.map((t=>({...t,element:e.clone})));break;default:l(i)(!0,`mode "${o}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${o}" plugin`)}d(t),a.forEach((t=>{const n=t.oldIndex,o=this.props.clone(t.item,e);r.splice(n,1,o)}))}r=r.map((e=>Object.assign(e,{selected:!1}))),n(r,this.sortable,m)}onUpdate(e){const{list:t,setList:n}=this.props,o=h(e,t);d(o),u(o);const a=function(e,t){return f(e,p(e,t))}(o,t);return n(a,this.sortable,m)}onStart(){m.dragging=this}onEnd(){m.dragging=null}onChoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let o=t;return n===e.oldIndex&&(o=Object.assign(t,{chosen:!0})),o})),this.sortable,m)}onUnchoose(e){const{list:t,setList:n}=this.props;n(t.map(((t,n)=>{let o=t;return n===e.oldIndex&&(o=Object.assign(o,{chosen:!1})),o})),this.sortable,m)}onSpill(e){const{removeOnSpill:t,revertOnSpill:n}=this.props;t&&!n&&c(e.item)}onSelect(e){const{list:t,setList:n}=this.props,o=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((t=>{const n=t.index;if(-1===n)return console.log(`"${e.type}" had indice of "${t.index}", which is probably -1 and doesn't usually happen here.`),void console.log(e);o[n].selected=!0})),n(o,this.sortable,m)}onDeselect(e){const{list:t,setList:n}=this.props,o=t.map((e=>Object.assign(e,{selected:!1})));e.newIndicies.forEach((e=>{const t=e.index;-1!==t&&(o[t].selected=!0)})),n(o,this.sortable,m)}}var b,y;v.defaultProps={clone:e=>e},b=e.exports,y={},Object.keys(y).forEach((function(e){"default"===e||"__esModule"===e||b.hasOwnProperty(e)||Object.defineProperty(b,e,{enumerable:!0,get:function(){return y[e]}})}))},474:(e,t,n)=>{"use strict";function o(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,o)}return n}function a(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?o(Object(n),!0).forEach((function(t){i(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):o(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}function i(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function l(){return l=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var o in n)Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o])}return e},l.apply(this,arguments)}function s(e,t){if(null==e)return{};var n,o,a=function(e,t){if(null==e)return{};var n,o,a={},r=Object.keys(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||(a[n]=e[n]);return a}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(o=0;o<r.length;o++)n=r[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(a[n]=e[n])}return a}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,o=new Array(t);n<t;n++)o[n]=e[n];return o}function d(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:()=>wt,Sortable:()=>Ye,Swap:()=>ct,default:()=>Dt});var u=d(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),h=d(/Edge/i),p=d(/firefox/i),f=d(/safari/i)&&!d(/chrome/i)&&!d(/android/i),g=d(/iP(ad|od|hone)/i),m=d(/chrome/i)&&d(/android/i),v={capture:!1,passive:!1};function b(e,t,n){e.addEventListener(t,n,!u&&v)}function y(e,t,n){e.removeEventListener(t,n,!u&&v)}function w(e,t){if(t){if(">"===t[0]&&(t=t.substring(1)),e)try{if(e.matches)return e.matches(t);if(e.msMatchesSelector)return e.msMatchesSelector(t);if(e.webkitMatchesSelector)return e.webkitMatchesSelector(t)}catch(e){return!1}return!1}}function E(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function S(e,t,n,o){if(e){n=n||document;do{if(null!=t&&(">"===t[0]?e.parentNode===n&&w(e,t):w(e,t))||o&&e===n)return e;if(e===n)break}while(e=E(e))}return null}var D,_=/\s+/g;function C(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(_," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(_," ")}}function x(e,t,n){var o=e&&e.style;if(o){if(void 0===n)return document.defaultView&&document.defaultView.getComputedStyle?n=document.defaultView.getComputedStyle(e,""):e.currentStyle&&(n=e.currentStyle),void 0===t?n:n[t];t in o||-1!==t.indexOf("webkit")||(t="-webkit-"+t),o[t]=n+("string"==typeof n?"":"px")}}function O(e,t){var n="";if("string"==typeof e)n=e;else do{var o=x(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var a=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return a&&new a(n)}function I(e,t,n){if(e){var o=e.getElementsByTagName(t),a=0,r=o.length;if(n)for(;a<r;a++)n(o[a],a);return o}return[]}function T(){return document.scrollingElement||document.documentElement}function M(e,t,n,o,a){if(e.getBoundingClientRect||e===window){var r,i,l,s,c,d,h;if(e!==window&&e.parentNode&&e!==T()?(i=(r=e.getBoundingClientRect()).top,l=r.left,s=r.bottom,c=r.right,d=r.height,h=r.width):(i=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,h=window.innerWidth),(t||n)&&e!==window&&(a=a||e.parentNode,!u))do{if(a&&a.getBoundingClientRect&&("none"!==x(a,"transform")||n&&"static"!==x(a,"position"))){var p=a.getBoundingClientRect();i-=p.top+parseInt(x(a,"border-top-width")),l-=p.left+parseInt(x(a,"border-left-width")),s=i+r.height,c=l+r.width;break}}while(a=a.parentNode);if(o&&e!==window){var f=O(a||e),g=f&&f.a,m=f&&f.d;f&&(s=(i/=m)+(d/=m),c=(l/=g)+(h/=g))}return{top:i,left:l,bottom:s,right:c,width:h,height:d}}}function N(e,t,n){for(var o=j(e,!0),a=M(e)[t];o;){var r=M(o)[n];if(!("top"===n||"left"===n?a>=r:a<=r))return o;if(o===T())break;o=j(o,!1)}return!1}function A(e,t,n,o){for(var a=0,r=0,i=e.children;r<i.length;){if("none"!==i[r].style.display&&i[r]!==Ye.ghost&&(o||i[r]!==Ye.dragged)&&S(i[r],n.draggable,e,!1)){if(a===t)return i[r];a++}r++}return null}function P(e,t){for(var n=e.lastElementChild;n&&(n===Ye.ghost||"none"===x(n,"display")||t&&!w(n,t));)n=n.previousElementSibling;return n||null}function k(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===Ye.clone||t&&!w(e,t)||n++;return n}function R(e){var t=0,n=0,o=T();if(e)do{var a=O(e),r=a.a,i=a.d;t+=e.scrollLeft*r,n+=e.scrollTop*i}while(e!==o&&(e=e.parentNode));return[t,n]}function j(e,t){if(!e||!e.getBoundingClientRect)return T();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var a=x(n);if(n.clientWidth<n.scrollWidth&&("auto"==a.overflowX||"scroll"==a.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==a.overflowY||"scroll"==a.overflowY)){if(!n.getBoundingClientRect||n===document.body)return T();if(o||t)return n;o=!0}}}while(n=n.parentNode);return T()}function L(e,t){return Math.round(e.top)===Math.round(t.top)&&Math.round(e.left)===Math.round(t.left)&&Math.round(e.height)===Math.round(t.height)&&Math.round(e.width)===Math.round(t.width)}function X(e,t){return function(){if(!D){var n=arguments,o=this;1===n.length?e.call(o,n[0]):e.apply(o,n),D=setTimeout((function(){D=void 0}),t)}}}function $(e,t,n){e.scrollLeft+=t,e.scrollTop+=n}function B(e){var t=window.Polymer,n=window.jQuery||window.Zepto;return t&&t.dom?t.dom(e).cloneNode(!0):n?n(e).clone(!0)[0]:e.cloneNode(!0)}function Y(e,t){x(e,"position","absolute"),x(e,"top",t.top),x(e,"left",t.left),x(e,"width",t.width),x(e,"height",t.height)}function H(e){x(e,"position",""),x(e,"top",""),x(e,"left",""),x(e,"width",""),x(e,"height","")}var F="Sortable"+(new Date).getTime();var U=[],z={initializeByDefault:!0},W={mount:function(e){for(var t in z)z.hasOwnProperty(t)&&!(t in e)&&(e[t]=z[t]);U.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),U.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var r=e+"Global";U.forEach((function(o){t[o.pluginName]&&(t[o.pluginName][r]&&t[o.pluginName][r](a({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](a({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var a in U.forEach((function(o){var a=o.pluginName;if(e.options[a]||o.initializeByDefault){var r=new o(e,t,e.options);r.sortable=e,r.options=e.options,e[a]=r,l(n,r.defaults)}})),e.options)if(e.options.hasOwnProperty(a)){var r=this.modifyOption(e,a,e.options[a]);void 0!==r&&(e.options[a]=r)}},getEventProperties:function(e,t){var n={};return U.forEach((function(o){"function"==typeof o.eventProperties&&l(n,o.eventProperties.call(t[o.pluginName],e))})),n},modifyOption:function(e,t,n){var o;return U.forEach((function(a){e[a.pluginName]&&a.optionListeners&&"function"==typeof a.optionListeners[t]&&(o=a.optionListeners[t].call(e[a.pluginName],n))})),o}};function K(e){var t=e.sortable,n=e.rootEl,o=e.name,r=e.targetEl,i=e.cloneEl,l=e.toEl,s=e.fromEl,c=e.oldIndex,d=e.newIndex,p=e.oldDraggableIndex,f=e.newDraggableIndex,g=e.originalEvent,m=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[F]){var b,y=t.options,w="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||u||h?(b=document.createEvent("Event")).initEvent(o,!0,!0):b=new CustomEvent(o,{bubbles:!0,cancelable:!0}),b.to=l||n,b.from=s||n,b.item=r||n,b.clone=i,b.oldIndex=c,b.newIndex=d,b.oldDraggableIndex=p,b.newDraggableIndex=f,b.originalEvent=g,b.pullMode=m?m.lastPutMode:void 0;var E=a(a({},v),W.getEventProperties(o,t));for(var S in E)b[S]=E[S];n&&n.dispatchEvent(b),y[w]&&y[w].call(t,b)}}var G=["evt"],q=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,r=s(n,G);W.pluginEvent.bind(Ye)(e,t,a({dragEl:Z,parentEl:J,ghostEl:Q,rootEl:ee,nextEl:te,lastDownEl:ne,cloneEl:oe,cloneHidden:ae,dragStarted:ve,putSortable:de,activeSortable:Ye.active,originalEvent:o,oldIndex:re,oldDraggableIndex:le,newIndex:ie,newDraggableIndex:se,hideGhostForTarget:Le,unhideGhostForTarget:Xe,cloneNowHidden:function(){ae=!0},cloneNowShown:function(){ae=!1},dispatchSortableEvent:function(e){V({sortable:t,name:e,originalEvent:o})}},r))};function V(e){K(a({putSortable:de,cloneEl:oe,targetEl:Z,rootEl:ee,oldIndex:re,oldDraggableIndex:le,newIndex:ie,newDraggableIndex:se},e))}var Z,J,Q,ee,te,ne,oe,ae,re,ie,le,se,ce,de,ue,he,pe,fe,ge,me,ve,be,ye,we,Ee,Se=!1,De=!1,_e=[],Ce=!1,xe=!1,Oe=[],Ie=!1,Te=[],Me="undefined"!=typeof document,Ne=g,Ae=h||u?"cssFloat":"float",Pe=Me&&!m&&!g&&"draggable"in document.createElement("div"),ke=function(){if(Me){if(u)return!1;var e=document.createElement("x");return e.style.cssText="pointer-events:auto","auto"===e.style.pointerEvents}}(),Re=function(e,t){var n=x(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),a=A(e,0,t),r=A(e,1,t),i=a&&x(a),l=r&&x(r),s=i&&parseInt(i.marginLeft)+parseInt(i.marginRight)+M(a).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+M(r).width;if("flex"===n.display)return"column"===n.flexDirection||"column-reverse"===n.flexDirection?"vertical":"horizontal";if("grid"===n.display)return n.gridTemplateColumns.split(" ").length<=1?"vertical":"horizontal";if(a&&i.float&&"none"!==i.float){var d="left"===i.float?"left":"right";return!r||"both"!==l.clear&&l.clear!==d?"horizontal":"vertical"}return a&&("block"===i.display||"flex"===i.display||"table"===i.display||"grid"===i.display||s>=o&&"none"===n[Ae]||r&&"none"===n[Ae]&&s+c>o)?"vertical":"horizontal"},je=function(e){function t(e,n){return function(o,a,r,i){var l=o.options.group.name&&a.options.group.name&&o.options.group.name===a.options.group.name;if(null==e&&(n||l))return!0;if(null==e||!1===e)return!1;if(n&&"clone"===e)return e;if("function"==typeof e)return t(e(o,a,r,i),n)(o,a,r,i);var s=(n?o:a).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==r(o)||(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},Le=function(){!ke&&Q&&x(Q,"display","none")},Xe=function(){!ke&&Q&&x(Q,"display","")};Me&&document.addEventListener("click",(function(e){if(De)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),De=!1,!1}),!0);var $e=function(e){if(Z){e=e.touches?e.touches[0]:e;var t=(a=e.clientX,r=e.clientY,_e.some((function(e){var t=e[F].options.emptyInsertThreshold;if(t&&!P(e)){var n=M(e),o=a>=n.left-t&&a<=n.right+t,l=r>=n.top-t&&r<=n.bottom+t;return o&&l?i=e:void 0}})),i);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[F]._onDragOver(n)}}var a,r,i},Be=function(e){Z&&Z.parentNode[F]._isOutsideThisEl(e.target)};function Ye(e,t){if(!e||!e.nodeType||1!==e.nodeType)throw"Sortable: `el` must be an HTMLElement, not ".concat({}.toString.call(e));this.el=e,this.options=t=l({},t),e[F]=this;var n,o,r={group:null,sort:!0,disabled:!1,store:null,handle:null,draggable:/^[uo]l$/i.test(e.nodeName)?">li":">*",swapThreshold:1,invertSwap:!1,invertedSwapThreshold:null,removeCloneOnHide:!0,direction:function(){return Re(e,this.options)},ghostClass:"sortable-ghost",chosenClass:"sortable-chosen",dragClass:"sortable-drag",ignore:"a, img",filter:null,preventOnFilter:!0,animation:0,easing:null,setData:function(e,t){e.setData("Text",t.textContent)},dropBubble:!1,dragoverBubble:!1,dataIdAttr:"data-id",delay:0,delayOnTouchOnly:!1,touchStartThreshold:(Number.parseInt?Number:window).parseInt(window.devicePixelRatio,10)||1,forceFallback:!1,fallbackClass:"sortable-fallback",fallbackOnBody:!1,fallbackTolerance:0,fallbackOffset:{x:0,y:0},supportPointer:!1!==Ye.supportPointer&&"PointerEvent"in window&&!f,emptyInsertThreshold:5};for(var i in W.initializePlugins(this,e,r),r)!(i in t)&&(t[i]=r[i]);for(var s in je(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Pe,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?b(e,"pointerdown",this._onTapStart):(b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),_e.push(this.el),t.store&&t.store.get&&this.sort(t.store.get(this)||[]),l(this,(o=[],{captureAnimationState:function(){o=[],this.options.animation&&[].slice.call(this.el.children).forEach((function(e){if("none"!==x(e,"display")&&e!==Ye.ghost){o.push({target:e,rect:M(e)});var t=a({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=O(e,!0);n&&(t.top-=n.f,t.left-=n.e)}e.fromRect=t}}))},addAnimationState:function(e){o.push(e)},removeAnimationState:function(e){o.splice(function(e,t){for(var n in e)if(e.hasOwnProperty(n))for(var o in t)if(t.hasOwnProperty(o)&&t[o]===e[n][o])return Number(n);return-1}(o,{target:e}),1)},animateAll:function(e){var t=this;if(!this.options.animation)return clearTimeout(n),void("function"==typeof e&&e());var a=!1,r=0;o.forEach((function(e){var n=0,o=e.target,i=o.fromRect,l=M(o),s=o.prevFromRect,c=o.prevToRect,d=e.rect,u=O(o,!0);u&&(l.top-=u.f,l.left-=u.e),o.toRect=l,o.thisAnimationDuration&&L(s,l)&&!L(i,l)&&(d.top-l.top)/(d.left-l.left)==(i.top-l.top)/(i.left-l.left)&&(n=function(e,t,n,o){return Math.sqrt(Math.pow(t.top-e.top,2)+Math.pow(t.left-e.left,2))/Math.sqrt(Math.pow(t.top-n.top,2)+Math.pow(t.left-n.left,2))*o.animation}(d,s,c,t.options)),L(l,i)||(o.prevFromRect=i,o.prevToRect=l,n||(n=t.options.animation),t.animate(o,d,l,n)),n&&(a=!0,r=Math.max(r,n),clearTimeout(o.animationResetTimer),o.animationResetTimer=setTimeout((function(){o.animationTime=0,o.prevFromRect=null,o.fromRect=null,o.prevToRect=null,o.thisAnimationDuration=null}),n),o.thisAnimationDuration=n)})),clearTimeout(n),a?n=setTimeout((function(){"function"==typeof e&&e()}),r):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){x(e,"transition",""),x(e,"transform","");var a=O(this.el),r=a&&a.a,i=a&&a.d,l=(t.left-n.left)/(r||1),s=(t.top-n.top)/(i||1);e.animatingX=!!l,e.animatingY=!!s,x(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),x(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),x(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){x(e,"transition",""),x(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function He(e,t,n,o,a,r,i,l){var s,c,d=e[F],p=d.options.onMove;return!window.CustomEvent||u||h?(s=document.createEvent("Event")).initEvent("move",!0,!0):s=new CustomEvent("move",{bubbles:!0,cancelable:!0}),s.to=t,s.from=e,s.dragged=n,s.draggedRect=o,s.related=a||t,s.relatedRect=r||M(t),s.willInsertAfter=l,s.originalEvent=i,e.dispatchEvent(s),p&&(c=p.call(d,s,i)),c}function Fe(e){e.draggable=!1}function Ue(){Ie=!1}function ze(e){for(var t=e.tagName+e.className+e.src+e.href+e.textContent,n=t.length,o=0;n--;)o+=t.charCodeAt(n);return o.toString(36)}function We(e){return setTimeout(e,0)}function Ke(e){return clearTimeout(e)}Ye.prototype={constructor:Ye,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(be=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,Z):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,a=o.preventOnFilter,r=e.type,i=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(i||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Te.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Te.push(o)}}(n),!Z&&!(/mousedown|pointerdown/.test(r)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!f||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=S(l,o.draggable,n,!1))&&l.animated||ne===l)){if(re=k(l),le=k(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return V({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),q("filter",t,{evt:e}),void(a&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=S(s,o.trim(),n,!1))return V({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),q("filter",t,{evt:e}),!0}))))return void(a&&e.cancelable&&e.preventDefault());o.handle&&!S(s,o.handle,n,!1)||this._prepareDragStart(e,i,l)}}},_prepareDragStart:function(e,t,n){var o,a=this,r=a.el,i=a.options,l=r.ownerDocument;if(n&&!Z&&n.parentNode===r){var s=M(n);if(ee=r,J=(Z=n).parentNode,te=Z.nextSibling,ne=n,ce=i.group,Ye.dragged=Z,ue={target:Z,clientX:(t||e).clientX,clientY:(t||e).clientY},ge=ue.clientX-s.left,me=ue.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,Z.style["will-change"]="all",o=function(){q("delayEnded",a,{evt:e}),Ye.eventCanceled?a._onDrop():(a._disableDelayedDragEvents(),!p&&a.nativeDraggable&&(Z.draggable=!0),a._triggerDragStart(e,t),V({sortable:a,name:"choose",originalEvent:e}),C(Z,i.chosenClass,!0))},i.ignore.split(",").forEach((function(e){I(Z,e.trim(),Fe)})),b(l,"dragover",$e),b(l,"mousemove",$e),b(l,"touchmove",$e),b(l,"mouseup",a._onDrop),b(l,"touchend",a._onDrop),b(l,"touchcancel",a._onDrop),p&&this.nativeDraggable&&(this.options.touchStartThreshold=4,Z.draggable=!0),q("delayStart",this,{evt:e}),!i.delay||i.delayOnTouchOnly&&!t||this.nativeDraggable&&(h||u))o();else{if(Ye.eventCanceled)return void this._onDrop();b(l,"mouseup",a._disableDelayedDrag),b(l,"touchend",a._disableDelayedDrag),b(l,"touchcancel",a._disableDelayedDrag),b(l,"mousemove",a._delayedDragTouchMoveHandler),b(l,"touchmove",a._delayedDragTouchMoveHandler),i.supportPointer&&b(l,"pointermove",a._delayedDragTouchMoveHandler),a._dragStartTimer=setTimeout(o,i.delay)}}},_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(){Z&&Fe(Z),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._disableDelayedDrag),y(e,"touchend",this._disableDelayedDrag),y(e,"touchcancel",this._disableDelayedDrag),y(e,"mousemove",this._delayedDragTouchMoveHandler),y(e,"touchmove",this._delayedDragTouchMoveHandler),y(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?b(document,"pointermove",this._onTouchMove):b(document,t?"touchmove":"mousemove",this._onTouchMove):(b(Z,"dragend",this),b(ee,"dragstart",this._onDragStart));try{document.selection?We((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Se=!1,ee&&Z){q("dragStarted",this,{evt:t}),this.nativeDraggable&&b(document,"dragover",Be);var n=this.options;!e&&C(Z,n.dragClass,!1),C(Z,n.ghostClass,!0),Ye.active=this,e&&this._appendGhost(),V({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(he){this._lastX=he.clientX,this._lastY=he.clientY,Le();for(var e=document.elementFromPoint(he.clientX,he.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(he.clientX,he.clientY))!==t;)t=e;if(Z.parentNode[F]._isOutsideThisEl(e),t)do{if(t[F]&&t[F]._onDragOver({clientX:he.clientX,clientY:he.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);Xe()}},_onTouchMove:function(e){if(ue){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,a=e.touches?e.touches[0]:e,r=Q&&O(Q,!0),i=Q&&r&&r.a,l=Q&&r&&r.d,s=Ne&&Ee&&R(Ee),c=(a.clientX-ue.clientX+o.x)/(i||1)+(s?s[0]-Oe[0]:0)/(i||1),d=(a.clientY-ue.clientY+o.y)/(l||1)+(s?s[1]-Oe[1]:0)/(l||1);if(!Ye.active&&!Se){if(n&&Math.max(Math.abs(a.clientX-this._lastX),Math.abs(a.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Q){r?(r.e+=c-(pe||0),r.f+=d-(fe||0)):r={a:1,b:0,c:0,d:1,e:c,f:d};var u="matrix(".concat(r.a,",").concat(r.b,",").concat(r.c,",").concat(r.d,",").concat(r.e,",").concat(r.f,")");x(Q,"webkitTransform",u),x(Q,"mozTransform",u),x(Q,"msTransform",u),x(Q,"transform",u),pe=c,fe=d,he=a}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Q){var e=this.options.fallbackOnBody?document.body:ee,t=M(Z,!0,Ne,!0,e),n=this.options;if(Ne){for(Ee=e;"static"===x(Ee,"position")&&"none"===x(Ee,"transform")&&Ee!==document;)Ee=Ee.parentNode;Ee!==document.body&&Ee!==document.documentElement?(Ee===document&&(Ee=T()),t.top+=Ee.scrollTop,t.left+=Ee.scrollLeft):Ee=T(),Oe=R(Ee)}C(Q=Z.cloneNode(!0),n.ghostClass,!1),C(Q,n.fallbackClass,!0),C(Q,n.dragClass,!0),x(Q,"transition",""),x(Q,"transform",""),x(Q,"box-sizing","border-box"),x(Q,"margin",0),x(Q,"top",t.top),x(Q,"left",t.left),x(Q,"width",t.width),x(Q,"height",t.height),x(Q,"opacity","0.8"),x(Q,"position",Ne?"absolute":"fixed"),x(Q,"zIndex","100000"),x(Q,"pointerEvents","none"),Ye.ghost=Q,e.appendChild(Q),x(Q,"transform-origin",ge/parseInt(Q.style.width)*100+"% "+me/parseInt(Q.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,a=n.options;q("dragStart",this,{evt:e}),Ye.eventCanceled?this._onDrop():(q("setupClone",this),Ye.eventCanceled||((oe=B(Z)).draggable=!1,oe.style["will-change"]="",this._hideClone(),C(oe,this.options.chosenClass,!1),Ye.clone=oe),n.cloneId=We((function(){q("clone",n),Ye.eventCanceled||(n.options.removeCloneOnHide||ee.insertBefore(oe,Z),n._hideClone(),V({sortable:n,name:"clone"}))})),!t&&C(Z,a.dragClass,!0),t?(De=!0,n._loopId=setInterval(n._emulateDragOver,50)):(y(document,"mouseup",n._onDrop),y(document,"touchend",n._onDrop),y(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",a.setData&&a.setData.call(n,o,Z)),b(document,"drop",n),x(Z,"transform","translateZ(0)")),Se=!0,n._dragStartId=We(n._dragStarted.bind(n,t,e)),b(document,"selectstart",n),ve=!0,f&&x(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,r,i=this.el,l=e.target,s=this.options,c=s.group,d=Ye.active,u=ce===c,h=s.sort,p=de||d,f=this,g=!1;if(!Ie){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=S(l,s.draggable,i,!0),X("dragOver"),Ye.eventCanceled)return g;if(Z.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||f._ignoreWhileAnimating===l)return Y(!1);if(De=!1,d&&!s.disabled&&(u?h||(o=J!==ee):de===this||(this.lastPutMode=ce.checkPull(this,d,Z,e))&&c.checkPut(this,d,Z,e))){if(r="vertical"===this._getDirection(e,l),t=M(Z),X("dragOverValid"),Ye.eventCanceled)return g;if(o)return J=ee,B(),this._hideClone(),X("revert"),Ye.eventCanceled||(te?ee.insertBefore(Z,te):ee.appendChild(Z)),Y(!0);var m=P(i,s.draggable);if(!m||function(e,t,n){var o=M(P(n.el,n.options.draggable));return t?e.clientX>o.right+10||e.clientX<=o.right&&e.clientY>o.bottom&&e.clientX>=o.left:e.clientX>o.right&&e.clientY>o.top||e.clientX<=o.right&&e.clientY>o.bottom+10}(e,r,this)&&!m.animated){if(m===Z)return Y(!1);if(m&&i===e.target&&(l=m),l&&(n=M(l)),!1!==He(ee,i,Z,t,l,n,e,!!l))return B(),i.appendChild(Z),J=i,H(),Y(!0)}else if(m&&function(e,t,n){var o=M(A(n.el,0,n.options,!0));return t?e.clientX<o.left-10||e.clientY<o.top&&e.clientX<o.right:e.clientY<o.top-10||e.clientY<o.bottom&&e.clientX<o.left}(e,r,this)){var v=A(i,0,s,!0);if(v===Z)return Y(!1);if(n=M(l=v),!1!==He(ee,i,Z,t,l,n,e,!1))return B(),i.insertBefore(Z,v),J=i,H(),Y(!0)}else if(l.parentNode===i){n=M(l);var b,y,w,E=Z.parentNode!==i,D=!function(e,t,n){var o=n?e.left:e.top,a=n?e.right:e.bottom,r=n?e.width:e.height,i=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===i||a===l||o+r/2===i+s/2}(Z.animated&&Z.toRect||t,l.animated&&l.toRect||n,r),_=r?"top":"left",O=N(l,"top","top")||N(Z,"top","top"),I=O?O.scrollTop:void 0;if(be!==l&&(y=n[_],Ce=!1,xe=!D&&s.invertSwap||E),b=function(e,t,n,o,a,r,i,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,d=o?n.top:n.left,u=o?n.bottom:n.right,h=!1;if(!i)if(l&&we<c*a){if(!Ce&&(1===ye?s>d+c*r/2:s<u-c*r/2)&&(Ce=!0),Ce)h=!0;else if(1===ye?s<d+we:s>u-we)return-ye}else if(s>d+c*(1-a)/2&&s<u-c*(1-a)/2)return function(e){return k(Z)<k(e)?1:-1}(t);return(h=h||i)&&(s<d+c*r/2||s>u-c*r/2)?s>d+c/2?1:-1:0}(e,l,n,r,D?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,xe,be===l),0!==b){var T=k(Z);do{T-=b,w=J.children[T]}while(w&&("none"===x(w,"display")||w===Q))}if(0===b||w===l)return Y(!1);be=l,ye=b;var R=l.nextElementSibling,j=!1,L=He(ee,i,Z,t,l,n,e,j=1===b);if(!1!==L)return 1!==L&&-1!==L||(j=1===L),Ie=!0,setTimeout(Ue,30),B(),j&&!R?i.appendChild(Z):l.parentNode.insertBefore(Z,j?R:l),O&&$(O,0,I-O.scrollTop),J=Z.parentNode,void 0===y||xe||(we=Math.abs(y-M(l)[_])),H(),Y(!0)}if(i.contains(Z))return Y(!1)}return!1}function X(s,c){q(s,f,a({evt:e,isOwner:u,axis:r?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:h,fromSortable:p,target:l,completed:Y,onMove:function(n,o){return He(ee,i,Z,t,n,M(n),e,o)},changed:H},c))}function B(){X("dragOverAnimationCapture"),f.captureAnimationState(),f!==p&&p.captureAnimationState()}function Y(t){return X("dragOverCompleted",{insertion:t}),t&&(u?d._hideClone():d._showClone(f),f!==p&&(C(Z,de?de.options.ghostClass:d.options.ghostClass,!1),C(Z,s.ghostClass,!0)),de!==f&&f!==Ye.active?de=f:f===Ye.active&&de&&(de=null),p===f&&(f._ignoreWhileAnimating=l),f.animateAll((function(){X("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==p&&(p.animateAll(),p._ignoreWhileAnimating=null)),(l===Z&&!Z.animated||l===i&&!l.animated)&&(be=null),s.dragoverBubble||e.rootEl||l===document||(Z.parentNode[F]._isOutsideThisEl(e.target),!t&&$e(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function H(){ie=k(Z),se=k(Z,s.draggable),V({sortable:f,name:"change",toEl:i,newIndex:ie,newDraggableIndex:se,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){y(document,"mousemove",this._onTouchMove),y(document,"touchmove",this._onTouchMove),y(document,"pointermove",this._onTouchMove),y(document,"dragover",$e),y(document,"mousemove",$e),y(document,"touchmove",$e)},_offUpEvents:function(){var e=this.el.ownerDocument;y(e,"mouseup",this._onDrop),y(e,"touchend",this._onDrop),y(e,"pointerup",this._onDrop),y(e,"touchcancel",this._onDrop),y(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ie=k(Z),se=k(Z,n.draggable),q("drop",this,{evt:e}),J=Z&&Z.parentNode,ie=k(Z),se=k(Z,n.draggable),Ye.eventCanceled||(Se=!1,xe=!1,Ce=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ke(this.cloneId),Ke(this._dragStartId),this.nativeDraggable&&(y(document,"drop",this),y(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),f&&x(document.body,"user-select",""),x(Z,"transform",""),e&&(ve&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Q&&Q.parentNode&&Q.parentNode.removeChild(Q),(ee===J||de&&"clone"!==de.lastPutMode)&&oe&&oe.parentNode&&oe.parentNode.removeChild(oe),Z&&(this.nativeDraggable&&y(Z,"dragend",this),Fe(Z),Z.style["will-change"]="",ve&&!Se&&C(Z,de?de.options.ghostClass:this.options.ghostClass,!1),C(Z,this.options.chosenClass,!1),V({sortable:this,name:"unchoose",toEl:J,newIndex:null,newDraggableIndex:null,originalEvent:e}),ee!==J?(ie>=0&&(V({rootEl:J,name:"add",toEl:J,fromEl:ee,originalEvent:e}),V({sortable:this,name:"remove",toEl:J,originalEvent:e}),V({rootEl:J,name:"sort",toEl:J,fromEl:ee,originalEvent:e}),V({sortable:this,name:"sort",toEl:J,originalEvent:e})),de&&de.save()):ie!==re&&ie>=0&&(V({sortable:this,name:"update",toEl:J,originalEvent:e}),V({sortable:this,name:"sort",toEl:J,originalEvent:e})),Ye.active&&(null!=ie&&-1!==ie||(ie=re,se=le),V({sortable:this,name:"end",toEl:J,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){q("nulling",this),ee=Z=J=Q=te=oe=ne=ae=ue=he=ve=ie=se=re=le=be=ye=de=ce=Ye.dragged=Ye.ghost=Ye.clone=Ye.active=null,Te.forEach((function(e){e.checked=!0})),Te.length=pe=fe=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":Z&&(this._onDragOver(e),function(e){e.dataTransfer&&(e.dataTransfer.dropEffect="move"),e.cancelable&&e.preventDefault()}(e));break;case"selectstart":e.preventDefault()}},toArray:function(){for(var e,t=[],n=this.el.children,o=0,a=n.length,r=this.options;o<a;o++)S(e=n[o],r.draggable,this.el,!1)&&t.push(e.getAttribute(r.dataIdAttr)||ze(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach((function(e,t){var a=o.children[t];S(a,this.options.draggable,o,!1)&&(n[e]=a)}),this),t&&this.captureAnimationState(),e.forEach((function(e){n[e]&&(o.removeChild(n[e]),o.appendChild(n[e]))})),t&&this.animateAll()},save:function(){var e=this.options.store;e&&e.set&&e.set(this)},closest:function(e,t){return S(e,t||this.options.draggable,this.el,!1)},option:function(e,t){var n=this.options;if(void 0===t)return n[e];var o=W.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&je(n)},destroy:function(){q("destroy",this);var e=this.el;e[F]=null,y(e,"mousedown",this._onTapStart),y(e,"touchstart",this._onTapStart),y(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(y(e,"dragover",this),y(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),_e.splice(_e.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!ae){if(q("hideClone",this),Ye.eventCanceled)return;x(oe,"display","none"),this.options.removeCloneOnHide&&oe.parentNode&&oe.parentNode.removeChild(oe),ae=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(ae){if(q("showClone",this),Ye.eventCanceled)return;Z.parentNode!=ee||this.options.group.revertClone?te?ee.insertBefore(oe,te):ee.appendChild(oe):ee.insertBefore(oe,Z),this.options.group.revertClone&&this.animate(Z,oe),x(oe,"display",""),ae=!1}}else this._hideClone()}},Me&&b(document,"touchmove",(function(e){(Ye.active||Se)&&e.cancelable&&e.preventDefault()})),Ye.utils={on:b,off:y,css:x,find:I,is:function(e,t){return!!S(e,t,e,!1)},extend:function(e,t){if(e&&t)for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n]);return e},throttle:X,closest:S,toggleClass:C,clone:B,index:k,nextTick:We,cancelNextTick:Ke,detectDirection:Re,getChild:A},Ye.get=function(e){return e[F]},Ye.mount=function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t[0].constructor===Array&&(t=t[0]),t.forEach((function(e){if(!e.prototype||!e.prototype.constructor)throw"Sortable: Mounted plugin must be a constructor function, not ".concat({}.toString.call(e));e.utils&&(Ye.utils=a(a({},Ye.utils),e.utils)),W.mount(e)}))},Ye.create=function(e,t){return new Ye(e,t)},Ye.version="1.14.0";var Ge,qe,Ve,Ze,Je,Qe,et=[],tt=!1;function nt(){et.forEach((function(e){clearInterval(e.pid)})),et=[]}function ot(){clearInterval(Qe)}var at,rt=X((function(e,t,n,o){if(t.scroll){var a,r=(e.touches?e.touches[0]:e).clientX,i=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=T(),d=!1;qe!==n&&(qe=n,nt(),Ge=t.scroll,a=t.scrollFn,!0===Ge&&(Ge=j(n,!0)));var u=0,h=Ge;do{var p=h,f=M(p),g=f.top,m=f.bottom,v=f.left,b=f.right,y=f.width,w=f.height,E=void 0,S=void 0,D=p.scrollWidth,_=p.scrollHeight,C=x(p),O=p.scrollLeft,I=p.scrollTop;p===c?(E=y<D&&("auto"===C.overflowX||"scroll"===C.overflowX||"visible"===C.overflowX),S=w<_&&("auto"===C.overflowY||"scroll"===C.overflowY||"visible"===C.overflowY)):(E=y<D&&("auto"===C.overflowX||"scroll"===C.overflowX),S=w<_&&("auto"===C.overflowY||"scroll"===C.overflowY));var N=E&&(Math.abs(b-r)<=l&&O+y<D)-(Math.abs(v-r)<=l&&!!O),A=S&&(Math.abs(m-i)<=l&&I+w<_)-(Math.abs(g-i)<=l&&!!I);if(!et[u])for(var P=0;P<=u;P++)et[P]||(et[P]={});et[u].vx==N&&et[u].vy==A&&et[u].el===p||(et[u].el=p,et[u].vx=N,et[u].vy=A,clearInterval(et[u].pid),0==N&&0==A||(d=!0,et[u].pid=setInterval(function(){o&&0===this.layer&&Ye.active._onTouchMove(Je);var t=et[this.layer].vy?et[this.layer].vy*s:0,n=et[this.layer].vx?et[this.layer].vx*s:0;"function"==typeof a&&"continue"!==a.call(Ye.dragged.parentNode[F],n,t,e,Je,et[this.layer].el)||$(et[this.layer].el,n,t)}.bind({layer:u}),24))),u++}while(t.bubbleScroll&&h!==c&&(h=j(h,!1)));tt=d}}),30),it=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,a=e.activeSortable,r=e.dispatchSortableEvent,i=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||a;i();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,d=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(d)&&(r("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function lt(){}function st(){}function ct(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;at=t},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.onMove,a=e.activeSortable,r=e.changed,i=e.cancel;if(a.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=at;!1!==o(n)?(C(n,s.swapClass,!0),at=n):at=null,c&&c!==at&&C(c,s.swapClass,!1)}r(),t(!0),i()}},drop:function(e){var t,n,o,a,r,i,l=e.activeSortable,s=e.putSortable,c=e.dragEl,d=s||this.sortable,u=this.options;at&&C(at,u.swapClass,!1),at&&(u.swap||s&&s.options.swap)&&c!==at&&(d.captureAnimationState(),d!==l&&l.captureAnimationState(),n=at,r=(t=c).parentNode,i=n.parentNode,r&&i&&!r.isEqualNode(n)&&!i.isEqualNode(t)&&(o=k(t),a=k(n),r.isEqualNode(i)&&o<a&&a++,r.insertBefore(n,r.children[o]),i.insertBefore(t,i.children[a])),d.animateAll(),d!==l&&l.animateAll())},nulling:function(){at=null}},l(e,{pluginName:"swap",eventProperties:function(){return{swapItem:at}}})}lt.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=A(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:it},l(lt,{pluginName:"revertOnSpill"}),st.prototype={onSpill:function(e){var t=e.dragEl,n=e.putSortable||this.sortable;n.captureAnimationState(),t.parentNode&&t.parentNode.removeChild(t),n.animateAll()},drop:it},l(st,{pluginName:"removeOnSpill"});var dt,ut,ht,pt,ft,gt=[],mt=[],vt=!1,bt=!1,yt=!1;function wt(){function e(e){for(var t in this)"_"===t.charAt(0)&&"function"==typeof this[t]&&(this[t]=this[t].bind(this));e.options.supportPointer?b(document,"pointerup",this._deselectMultiDrag):(b(document,"mouseup",this._deselectMultiDrag),b(document,"touchend",this._deselectMultiDrag)),b(document,"keydown",this._checkKeyDown),b(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,setData:function(t,n){var o="";gt.length&&ut===e?gt.forEach((function(e,t){o+=(t?", ":"")+e.textContent})):o=n.textContent,t.setData("Text",o)}}}return e.prototype={multiDragKeyDown:!1,isMultiDrag:!1,delayStartGlobal:function(e){var t=e.dragEl;ht=t},delayEnded:function(){this.isMultiDrag=~gt.indexOf(ht)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<gt.length;o++)mt.push(B(gt[o])),mt[o].sortableIndex=gt[o].sortableIndex,mt[o].draggable=!1,mt[o].style["will-change"]="",C(mt[o],this.options.selectedClass,!1),gt[o]===ht&&C(mt[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,o=e.dispatchSortableEvent,a=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||gt.length&&ut===t&&(Et(!0,n),o("clone"),a()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,o=e.cancel;this.isMultiDrag&&(Et(!1,n),mt.forEach((function(e){x(e,"display","")})),t(),ft=!1,o())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),o=e.cancel;this.isMultiDrag&&(mt.forEach((function(e){x(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),ft=!0,o())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ut&&ut.multiDrag._deselectMultiDrag(),gt.forEach((function(e){e.sortableIndex=k(e)})),gt=gt.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),yt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){gt.forEach((function(e){e!==ht&&x(e,"position","absolute")}));var o=M(ht,!1,!0,!0);gt.forEach((function(e){e!==ht&&Y(e,o)})),bt=!0,vt=!0}n.animateAll((function(){bt=!1,vt=!1,t.options.animation&>.forEach((function(e){H(e)})),t.options.sort&&St()}))}},dragOver:function(e){var t=e.target,n=e.completed,o=e.cancel;bt&&~gt.indexOf(t)&&(n(!1),o())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,a=e.dragRect;gt.length>1&&(gt.forEach((function(e){o.addAnimationState({target:e,rect:bt?M(e):a}),H(e),e.fromRect=a,t.removeAnimationState(e)})),bt=!1,function(e,t){gt.forEach((function(n,o){var a=t.children[n.sortableIndex+(e?Number(o):0)];a?t.insertBefore(n,a):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.insertion,a=e.activeSortable,r=e.parentEl,i=e.putSortable,l=this.options;if(o){if(n&&a._hideClone(),vt=!1,l.animation&>.length>1&&(bt||!n&&!a.options.sort&&!i)){var s=M(ht,!1,!0,!0);gt.forEach((function(e){e!==ht&&(Y(e,s),r.appendChild(e))})),bt=!0}if(!n)if(bt||St(),gt.length>1){var c=ft;a._showClone(t),a.options.animation&&!ft&&c&&mt.forEach((function(e){a.addAnimationState({target:e,rect:pt}),e.fromRect=pt,e.thisAnimationDuration=null}))}else a._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(gt.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){pt=l({},t);var a=O(ht,!0);pt.top-=a.f,pt.left-=a.e}},dragOverAnimationComplete:function(){bt&&(bt=!1,St())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,a=e.sortable,r=e.dispatchSortableEvent,i=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,d=o.children;if(!yt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),C(ht,c.selectedClass,!~gt.indexOf(ht)),~gt.indexOf(ht))gt.splice(gt.indexOf(ht),1),dt=null,K({sortable:a,rootEl:n,name:"deselect",targetEl:ht,originalEvt:t});else{if(gt.push(ht),K({sortable:a,rootEl:n,name:"select",targetEl:ht,originalEvt:t}),t.shiftKey&&dt&&a.el.contains(dt)){var u,h,p=k(dt),f=k(ht);if(~p&&~f&&p!==f)for(f>p?(h=p,u=f):(h=f,u=p+1);h<u;h++)~gt.indexOf(d[h])||(C(d[h],c.selectedClass,!0),gt.push(d[h]),K({sortable:a,rootEl:n,name:"select",targetEl:d[h],originalEvt:t}))}else dt=ht;ut=s}if(yt&&this.isMultiDrag){if(bt=!1,(o[F].options.sort||o!==n)&>.length>1){var g=M(ht),m=k(ht,":not(."+this.options.selectedClass+")");if(!vt&&c.animation&&(ht.thisAnimationDuration=null),s.captureAnimationState(),!vt&&(c.animation&&(ht.fromRect=g,gt.forEach((function(e){if(e.thisAnimationDuration=null,e!==ht){var t=bt?M(e):g;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),St(),gt.forEach((function(e){d[m]?o.insertBefore(e,d[m]):o.appendChild(e),m++})),i===k(ht))){var v=!1;gt.forEach((function(e){e.sortableIndex===k(e)||(v=!0)})),v&&r("update")}gt.forEach((function(e){H(e)})),s.animateAll()}ut=s}(n===o||l&&"clone"!==l.lastPutMode)&&mt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=yt=!1,mt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),y(document,"pointerup",this._deselectMultiDrag),y(document,"mouseup",this._deselectMultiDrag),y(document,"touchend",this._deselectMultiDrag),y(document,"keydown",this._checkKeyDown),y(document,"keyup",this._checkKeyUp)},_deselectMultiDrag:function(e){if(!(void 0!==yt&&yt||ut!==this.sortable||e&&S(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;gt.length;){var t=gt[0];C(t,this.options.selectedClass,!1),gt.shift(),K({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvt:e})}},_checkKeyDown:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!0)},_checkKeyUp:function(e){e.key===this.options.multiDragKey&&(this.multiDragKeyDown=!1)}},l(e,{pluginName:"multiDrag",utils:{select:function(e){var t=e.parentNode[F];t&&t.options.multiDrag&&!~gt.indexOf(e)&&(ut&&ut!==t&&(ut.multiDrag._deselectMultiDrag(),ut=t),C(e,t.options.selectedClass,!0),gt.push(e))},deselect:function(e){var t=e.parentNode[F],n=gt.indexOf(e);t&&t.options.multiDrag&&~n&&(C(e,t.options.selectedClass,!1),gt.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],o=[];return gt.forEach((function(e){var a;n.push({multiDragElement:e,index:e.sortableIndex}),a=bt&&e!==ht?-1:bt?k(e,":not(."+t.options.selectedClass+")"):k(e),o.push({multiDragElement:e,index:a})})),{items:(e=gt,function(e){if(Array.isArray(e))return c(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return c(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?c(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),clones:[].concat(mt),oldIndicies:n,newIndicies:o}},optionListeners:{multiDragKey:function(e){return"ctrl"===(e=e.toLowerCase())?e="Control":e.length>1&&(e=e.charAt(0).toUpperCase()+e.substr(1)),e}}})}function Et(e,t){mt.forEach((function(n,o){var a=t.children[n.sortableIndex+(e?Number(o):0)];a?t.insertBefore(n,a):t.appendChild(n)}))}function St(){gt.forEach((function(e){e!==ht&&e.parentNode&&e.parentNode.removeChild(e)}))}Ye.mount(new function(){function e(){for(var e in this.defaults={scroll:!0,forceAutoScrollFallback:!1,scrollSensitivity:30,scrollSpeed:10,bubbleScroll:!0},this)"_"===e.charAt(0)&&"function"==typeof this[e]&&(this[e]=this[e].bind(this))}return e.prototype={dragStarted:function(e){var t=e.originalEvent;this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):this.options.supportPointer?b(document,"pointermove",this._handleFallbackAutoScroll):t.touches?b(document,"touchmove",this._handleFallbackAutoScroll):b(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?y(document,"dragover",this._handleAutoScroll):(y(document,"pointermove",this._handleFallbackAutoScroll),y(document,"touchmove",this._handleFallbackAutoScroll),y(document,"mousemove",this._handleFallbackAutoScroll)),ot(),nt(),clearTimeout(D),D=void 0},nulling:function(){Je=qe=Ge=tt=Qe=Ve=Ze=null,et.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,r=document.elementFromPoint(o,a);if(Je=e,t||this.options.forceAutoScrollFallback||h||u||f){rt(e,this.options,r,t);var i=j(r,!0);!tt||Qe&&o===Ve&&a===Ze||(Qe&&ot(),Qe=setInterval((function(){var r=j(document.elementFromPoint(o,a),!0);r!==i&&(i=r,nt()),rt(e,n.options,r,t)}),10),Ve=o,Ze=a)}else{if(!this.options.bubbleScroll||j(r,!0)===T())return void nt();rt(e,this.options,j(r,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),Ye.mount(st,lt);const Dt=Ye},177:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>o});function o(e,t){if(!e)throw new Error("Invariant failed")}},196:e=>{"use strict";e.exports=window.React}},t={};function n(o){var a=t[o];if(void 0!==a)return a.exports;var r=t[o]={exports:{}};return e[o](r,r.exports,n),r.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var o in t)n.o(t,o)&&!n.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";const e=window.wp.element;var t=n(697),o=n.n(t),a=n(941),r=n(196);const{__}=wp.i18n,{Dashicon:i,TextControl:l,Button:s}=wp.components,c=t=>{window.svgIcons;const[n,o]=(0,r.useState)({open:!1});let a=(0,e.createElement)("span",{className:"description customize-control-ast-description"},(0,e.createElement)("span",{className:"ast-description"}," ",__("Enter alternative URL which provides above selected language translation of your site.","astra-addon")));return(0,e.createElement)("div",{className:"ahfb-sorter-item","data-id":t.item.id,key:t.item.id},(0,e.createElement)("div",{className:"ahfb-sorter-item-panel-header",onClick:()=>{o((e=>({...e,open:!n.open})))}},(0,e.createElement)("span",{className:"ahfb-sorter-title"},void 0!==t.item.label&&""!==t.item.label?t.item.label:__("Language Item","astra-addon")),(0,e.createElement)(s,{className:"ahfb-sorter-item-expand",onClick:()=>{o((e=>({...e,open:!n.open})))}},n.open?(0,e.createElement)(i,{icon:"arrow-up-alt2"}):(0,e.createElement)(i,{icon:"arrow-down-alt2"})),(0,e.createElement)(s,{className:"ahfb-sorter-item-expand ahfb-sorter-item-visibility "+(t.item.enabled?"item-is-visible":"item-is-hidden"),onClick:e=>{e.stopPropagation(),t.toggleEnabled(!t.item.enabled,t.index)}},(0,e.createElement)(i,{icon:"visibility"})),(0,e.createElement)(s,{className:"ahfb-sorter-item-remove",isDestructive:!0,onClick:()=>{t.removeItem(t.index)}},(0,e.createElement)(i,{icon:"no-alt"}))),n.open&&(0,e.createElement)("div",{className:"ahfb-sorter-item-panel-content"},(0,e.createElement)(l,{label:__("Label","astra-addon"),value:t.item.label?t.item.label:"",onChange:e=>{t.onChangeLabel(e,t.index)}}),(0,e.createElement)(l,{label:__("URL","astra-addon"),value:t.item.url?t.item.url:"",onChange:e=>{t.onChangeURL(e,t.index)}}),a))},{__:d}=wp.i18n,{Button:u,SelectControl:h}=wp.components,p=t=>{let n=t.control.setting.get(),o={items:[{id:"gb",enabled:!0,url:"",label:d("English","astra-addon")}]},i=t.control.params.default?{...o,...t.control.params.default}:o;n=n?{...i,...n}:i;let l={group:"language_selector_group",options:[{label:d("Albanian","astra-addon"),value:"al"},{label:d("Arabic","astra-addon"),value:"sa"},{label:d("Bengali","astra-addon"),value:"bd"},{label:d("Bulgarian","astra-addon"),value:"bg"},{label:d("Chinese","astra-addon"),value:"cn"},{label:d("Croatian","astra-addon"),value:"hr"},{label:d("Czech","astra-addon"),value:"cz"},{label:d("English","astra-addon"),value:"gb"},{label:d("French","astra-addon"),value:"fr"},{label:d("German","astra-addon"),value:"de"},{label:d("Greek","astra-addon"),value:"gr"},{label:d("Hebrew","astra-addon"),value:"il"},{label:d("Hindi","astra-addon"),value:"in"},{label:d("Hungarian","astra-addon"),value:"hu"},{label:d("Icelandic","astra-addon"),value:"is"},{label:d("Indonesian","astra-addon"),value:"id"},{label:d("Italian","astra-addon"),value:"it"},{label:d("Japanese","astra-addon"),value:"jp"},{label:d("Korean","astra-addon"),value:"kr"},{label:d("Latvian","astra-addon"),value:"lv"},{label:d("Lithuanian","astra-addon"),value:"lt"},{label:d("Macedonian","astra-addon"),value:"mk"},{label:d("Malay","astra-addon"),value:"my"},{label:d("Maltese","astra-addon"),value:"mt"},{label:d("Mongolian","astra-addon"),value:"mn"},{label:d("Nepali","astra-addon"),value:"np"},{label:d("Dutch","astra-addon"),value:"nl"},{label:d("Norwegian Bokmål","astra-addon"),value:"no"},{label:d("Persian","astra-addon"),value:"ir"},{label:d("Polish","astra-addon"),value:"pl"},{label:d("Portuguese, Portugal","astra-addon"),value:"pt"},{label:d("Romanian","astra-addon"),value:"ro"},{label:d("Russian","astra-addon"),value:"ru"},{label:d("Serbian","astra-addon"),value:"rs"},{label:d("Slovak","astra-addon"),value:"sk"},{label:d("Slovenian","astra-addon"),value:"si"},{label:d("Somali","astra-addon"),value:"so"},{label:d("Spanish","astra-addon"),value:"es"},{label:d("Swedish","astra-addon"),value:"se"},{label:d("Tamil","astra-addon"),value:"lk"},{label:d("Thai","astra-addon"),value:"th"},{label:d("Turkish","astra-addon"),value:"tr"},{label:d("Ukrainian","astra-addon"),value:"ua"},{label:d("Urdu","astra-addon"),value:"pk"},{label:d("Uzbek","astra-addon"),value:"uz"},{label:d("Vietnamese","astra-addon"),value:"vn"},{label:d("Zulu","astra-addon"),value:"za"},{label:d("Other","astra-addon"),value:"zz-other"}].sort(((e,t)=>e.label<t.label?-1:e.label>t.label?1:0))},s=t.control.params.input_attrs?{...l,...t.control.params.input_attrs}:l,p=[];s.options.map((e=>{n.items.some((t=>t.id===e.value))||p.push(e)}));const[f,g]=(0,r.useState)({value:n,isVisible:!1,control:void 0!==p[0]&&void 0!==p[0].value?p[0].value:""});(0,r.useEffect)((()=>{g((e=>({...e,value:t.control.setting.get()})))}),[t]);const m=e=>{t.control.setting.set({...t.control.setting.get(),...e,flag:!t.control.setting.get().flag})},v=()=>{let e,t=document.querySelectorAll(".ahfb-builder-area");for(e=0;e<t.length;++e)t[e].classList.remove("ahfb-dragging-dropzones")},b=(e,t)=>{let n=f.value;const o=n.items.map(((n,o)=>(t===o&&(n={...n,...e}),n)));n.items=o,g((e=>({...e,value:n}))),m(n)},y=void 0!==f.value&&null!=f.value.items&&null!=f.value.items.length&&f.value.items.length>0?f.value.items:[];let w=[];return y.length>0&&y.map((e=>{w.push({id:e.id})})),s.options.map((e=>{w.some((t=>t.id===e.value))||p.push(e)})),(0,e.createElement)("div",{className:"ahfb-control-field ahfb-sorter-items"},(0,e.createElement)("div",{className:"ahfb-sorter-row"},(0,e.createElement)(a.ReactSortable,{animation:100,onStart:()=>v(),onEnd:()=>v(),group:s.group,className:`ahfb-sorter-drop ahfb-sorter-sortable-panel ahfb-sorter-drop-${s.group}`,handle:".ahfb-sorter-item-panel-header",list:w,setList:e=>(e=>{let t=f.value,n=t.items,o=[];e.length>0&&e.map((e=>{n.filter((t=>{t.id===e.id&&o.push(t)}))})),((e,t)=>{if(e===t)return!0;if(null==e||null==t)return!1;if(e.length!=t.length)return!1;for(let n=0;n<e.length;++n)if(e[n]!==t[n])return!1;return!0})(n,o)||(n.items=o,t.items=o,g((e=>({...e,value:t}))),m(t))})(e)},y.length>0&&y.map(((t,n)=>(0,e.createElement)(c,{removeItem:e=>(e=>{let t=f.value,n=t.items,o=[];n.length>0&&n.map(((t,n)=>{e!==n&&o.push(t)})),t.items=o,g((e=>({...e,value:t}))),m(t)})(e),toggleEnabled:(e,t)=>((e,t)=>{b({enabled:e},t)})(e,t),onChangeLabel:(e,t)=>((e,t)=>{b({label:e},t)})(e,t),onChangeURL:(e,t)=>((e,t)=>{b({url:e},t)})(e,t),key:t.id,index:n,item:t,controlParams:s}))))),void 0!==p[0]&&void 0!==p[0].value&&(0,e.createElement)("div",{className:"ahfb-language-selector-add-area"},(0,e.createElement)(h,{value:f.control,options:p,onChange:e=>{g((t=>({...t,control:e})))}}),(0,e.createElement)(u,{className:"ahfb-sorter-add-item",isPrimary:!0,onClick:()=>{(()=>{const e=f.control;if(g((e=>({...e,isVisible:!1}))),e){let t=f.value,n=t.items;const o=s.options.filter((function(t){return t.value===e}));let a={id:e,enabled:!0,url:"",label:o[0].label};n.push(a),t.items=n;let r=[];s.options.map((e=>{n.some((t=>t.id===e.value))||r.push(e)})),g((e=>({...e,control:void 0!==r[0]&&void 0!==r[0].value?r[0].value:""}))),g((e=>({...e,value:t}))),m(t)}})()}},d("Add Language","astra-addon"))))};p.propTypes={control:o().object.isRequired};const f=p,g=wp.customize.Control.extend({renderContent:function(){ReactDOM.render((0,e.createElement)(f,{control:this}),this.container[0])}});wp.customize.controlConstructor["ast-language-selector"]=g})()})();