SILENT KILLERPanel

Current Path: > home > codekrsu > > ameliagraphics.com > wp-content > plugins > content-control > > > dist >


Operation   : Linux premium131.web-hosting.com 4.18.0-553.44.1.lve.el8.x86_64 #1 SMP Thu Mar 13 14:29:12 UTC 2025 x86_64
Software     : Apache
Server IP    : 162.0.232.56 | Your IP: 216.73.216.111
Domains      : 1034 Domain(s)
Permission   : [ 0755 ]

Files and Folders in: /home/codekrsu//ameliagraphics.com/wp-content/plugins/content-control///dist/

NameTypeSizeLast ModifiedActions
block-editor.asset.php File 333 bytes December 08 2023 15:26:30.
block-editor.css File 3836 bytes December 08 2023 15:26:30.
block-editor.js File 45153 bytes December 08 2023 15:26:30.
components.asset.php File 270 bytes March 15 2025 12:03:42.
components.css File 22095 bytes December 08 2023 15:26:30.
components.js File 28400 bytes March 15 2025 12:03:42.
core-data.asset.php File 166 bytes March 11 2025 14:19:36.
core-data.js File 26691 bytes March 11 2025 14:19:36.
data.asset.php File 150 bytes December 08 2023 15:26:30.
data.js File 854 bytes December 08 2023 15:26:30.
fields.asset.php File 261 bytes March 15 2025 12:03:42.
fields.js File 13464 bytes March 15 2025 12:03:42.
icons.asset.php File 108 bytes October 26 2023 13:40:28.
icons.css File 606 bytes September 18 2023 05:47:10.
icons.js File 14082 bytes October 26 2023 13:40:28.
rule-engine.asset.php File 255 bytes December 08 2023 15:26:30.
rule-engine.css File 9019 bytes December 08 2023 15:26:30.
rule-engine.js File 68792 bytes December 08 2023 15:26:30.
settings-page.asset.php File 377 bytes April 22 2025 10:36:58.
settings-page.css File 47271 bytes March 11 2025 14:19:36.
settings-page.js File 94280 bytes April 22 2025 10:36:58.
style-block-editor.css File 1776 bytes September 18 2023 05:47:10.
utils.asset.php File 84 bytes September 18 2023 05:47:10.
utils.js File 946 bytes September 18 2023 05:47:10.
widget-editor.asset.php File 92 bytes September 18 2023 05:47:10.
widget-editor.css File 128 bytes September 18 2023 05:47:10.
widget-editor.js File 944 bytes September 18 2023 05:47:10.

Reading File: /home/codekrsu//ameliagraphics.com/wp-content/plugins/content-control///dist//rule-engine.js

!function(){var e={184:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i){if(n.toString!==Object.prototype.toString&&!n.toString.toString().includes("[native code]")){e.push(n.toString());continue}for(var l in n)o.call(n,l)&&n[l]&&e.push(l)}}}return e.join(" ")}e.exports?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},941:function(e,t,n){var o=n(474),r=n(45),i=n(196),a=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 u(e){e.forEach((e=>c(e.element)))}function d(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 p(e,t){const n=g(e),o={parentElement:e.from};let r=[];switch(n){case"normal":r=[{element:e.item,newIndex:e.newIndex,oldIndex:e.oldIndex,parentElement:e.from}];break;case"swap":r=[{element:e.item,oldIndex:e.oldIndex,newIndex:e.newIndex,...o},{element:e.swapItem,oldIndex:e.newIndex,newIndex:e.oldIndex,...o}];break;case"multidrag":r=e.oldIndicies.map(((t,n)=>({element:t.multiDragElement,oldIndex:t.index,newIndex:e.newIndicies[n].index,...o})))}const i=function(e,t){return e.map((e=>({...e,item:t[e.oldIndex]}))).sort(((e,t)=>e.oldIndex-t.oldIndex))}(r,t);return i}function h(e,t){const n=[...t];return e.concat().reverse().forEach((e=>n.splice(e.oldIndex,1))),n}function f(e,t,n,o){const r=[...t];return e.forEach((e=>{const t=o&&n&&o(e.item,n);r.splice(e.newIndex,0,t||e.item)})),r}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 i.Component{static defaultProps={clone:e=>e};constructor(e){super(e),this.ref=(0,i.createRef)();const t=[...e.list].map((e=>Object.assign(e,{chosen:!1,selected:!1})));e.setList(t,this.sortable,m),l(a)(!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,r={style:t,className:n,id:o},a=e&&null!==e?e:"div";return(0,i.createElement)(a,{ref:this.ref,...r},this.getChildren())}getChildren(){const{children:e,dataIdAttr:t,selectedClass:n="sortable-selected",chosenClass:o="sortable-chosen",dragClass:a="sortable-drag",fallbackClass:s="sortable-falback",ghostClass:c="sortable-ghost",swapClass:u="sortable-swap-highlight",filter:d="sortable-filter",list:p}=this.props;if(!e||null==e)return null;const h=t||"data-id";return i.Children.map(e,((e,t)=>{if(void 0===e)return;const a=p[t]||{},{className:s}=e.props,c="string"==typeof d&&{[d.replace(".","")]:!!a.filtered},u=l(r)(s,{[n]:a.selected,[o]:a.chosen,...c});return(0,i.cloneElement)(e,{[h]:e.key,className:u})}))}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:r,style:i,className:a,clone:l,onAdd:s,onChange:c,onChoose:u,onClone:d,onEnd:p,onFilter:h,onRemove:f,onSort:g,onStart:m,onUnchoose:v,onUpdate:b,onMove:w,onSpill:y,onSelect:E,onDeselect:S,...C}=e;return C}(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 r=n(e,t,this.sortable,m);return void 0!==r&&r}}}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,r=p(e,[...m.dragging.props.list]);u(r),n(f(r,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),r=p(e,t);d(r);let i=[...t];if("clone"!==e.pullMode)i=h(r,i);else{let t=r;switch(o){case"multidrag":t=r.map(((t,n)=>({...t,element:e.clones[n]})));break;case"normal":t=r.map((t=>({...t,element:e.clone})));break;default:l(a)(!0,`mode "${o}" cannot clone. Please remove "props.clone" from <ReactSortable/> when using the "${o}" plugin`)}u(t),r.forEach((t=>{const n=t.oldIndex,o=this.props.clone(t.item,e);i.splice(n,1,o)}))}i=i.map((e=>Object.assign(e,{selected:!1}))),n(i,this.sortable,m)}onUpdate(e){const{list:t,setList:n}=this.props,o=p(e,t);return u(o),d(o),n(function(e,t){return f(e,h(e,t))}(o,t),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,w;b=e.exports,w={},Object.keys(w).forEach((function(e){"default"===e||"__esModule"===e||b.hasOwnProperty(e)||Object.defineProperty(b,e,{enumerable:!0,get:function(){return w[e]}})}))},45:function(e,t){var n;!function(){"use strict";var o={}.hasOwnProperty;function r(){for(var e=[],t=0;t<arguments.length;t++){var n=arguments[t];if(n){var i=typeof n;if("string"===i||"number"===i)e.push(n);else if(Array.isArray(n)){if(n.length){var a=r.apply(null,n);a&&e.push(a)}}else if("object"===i)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?(r.default=r,e.exports=r):void 0===(n=function(){return r}.apply(t,[]))||(e.exports=n)}()},474:function(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 r(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){a(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 i(e){return i="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},i(e)}function a(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){(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 c(e){if("undefined"!=typeof window&&window.navigator)return!!navigator.userAgent.match(e)}n.r(t),n.d(t,{MultiDrag:function(){return wt},Sortable:function(){return He},Swap:function(){return st}});var u=c(/(?:Trident.*rv[ :]?11\.|msie|iemobile|Windows Phone)/i),d=c(/Edge/i),p=c(/firefox/i),h=c(/safari/i)&&!c(/chrome/i)&&!c(/android/i),f=c(/iP(ad|od|hone)/i),g=c(/chrome/i)&&c(/android/i),m={capture:!1,passive:!1};function v(e,t,n){e.addEventListener(t,n,!u&&m)}function b(e,t,n){e.removeEventListener(t,n,!u&&m)}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 y(e){return e.host&&e!==document&&e.host.nodeType?e.host:e.parentNode}function E(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=y(e))}return null}var S,C=/\s+/g;function x(e,t,n){if(e&&t)if(e.classList)e.classList[n?"add":"remove"](t);else{var o=(" "+e.className+" ").replace(C," ").replace(" "+t+" "," ");e.className=(o+(n?" "+t:"")).replace(C," ")}}function _(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 D(e,t){var n="";if("string"==typeof e)n=e;else do{var o=_(e,"transform");o&&"none"!==o&&(n=o+" "+n)}while(!t&&(e=e.parentNode));var r=window.DOMMatrix||window.WebKitCSSMatrix||window.CSSMatrix||window.MSCSSMatrix;return r&&new r(n)}function O(e,t,n){if(e){var o=e.getElementsByTagName(t),r=0,i=o.length;if(n)for(;r<i;r++)n(o[r],r);return o}return[]}function I(){return document.scrollingElement||document.documentElement}function M(e,t,n,o,r){if(e.getBoundingClientRect||e===window){var i,a,l,s,c,d,p;if(e!==window&&e.parentNode&&e!==I()?(a=(i=e.getBoundingClientRect()).top,l=i.left,s=i.bottom,c=i.right,d=i.height,p=i.width):(a=0,l=0,s=window.innerHeight,c=window.innerWidth,d=window.innerHeight,p=window.innerWidth),(t||n)&&e!==window&&(r=r||e.parentNode,!u))do{if(r&&r.getBoundingClientRect&&("none"!==_(r,"transform")||n&&"static"!==_(r,"position"))){var h=r.getBoundingClientRect();a-=h.top+parseInt(_(r,"border-top-width")),l-=h.left+parseInt(_(r,"border-left-width")),s=a+i.height,c=l+i.width;break}}while(r=r.parentNode);if(o&&e!==window){var f=D(r||e),g=f&&f.a,m=f&&f.d;f&&(s=(a/=m)+(d/=m),c=(l/=g)+(p/=g))}return{top:a,left:l,bottom:s,right:c,width:p,height:d}}}function N(e,t,n){for(var o=k(e,!0),r=M(e)[t];o;){var i=M(o)[n];if(!("top"===n||"left"===n?r>=i:r<=i))return o;if(o===I())break;o=k(o,!1)}return!1}function T(e,t,n,o){for(var r=0,i=0,a=e.children;i<a.length;){if("none"!==a[i].style.display&&a[i]!==He.ghost&&(o||a[i]!==He.dragged)&&E(a[i],n.draggable,e,!1)){if(r===t)return a[i];r++}i++}return null}function A(e,t){for(var n=e.lastElementChild;n&&(n===He.ghost||"none"===_(n,"display")||t&&!w(n,t));)n=n.previousElementSibling;return n||null}function P(e,t){var n=0;if(!e||!e.parentNode)return-1;for(;e=e.previousElementSibling;)"TEMPLATE"===e.nodeName.toUpperCase()||e===He.clone||t&&!w(e,t)||n++;return n}function R(e){var t=0,n=0,o=I();if(e)do{var r=D(e),i=r.a,a=r.d;t+=e.scrollLeft*i,n+=e.scrollTop*a}while(e!==o&&(e=e.parentNode));return[t,n]}function k(e,t){if(!e||!e.getBoundingClientRect)return I();var n=e,o=!1;do{if(n.clientWidth<n.scrollWidth||n.clientHeight<n.scrollHeight){var r=_(n);if(n.clientWidth<n.scrollWidth&&("auto"==r.overflowX||"scroll"==r.overflowX)||n.clientHeight<n.scrollHeight&&("auto"==r.overflowY||"scroll"==r.overflowY)){if(!n.getBoundingClientRect||n===document.body)return I();if(o||t)return n;o=!0}}}while(n=n.parentNode);return I()}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 $(e,t){return function(){if(!S){var n=arguments;1===n.length?e.call(this,n[0]):e.apply(this,n),S=setTimeout((function(){S=void 0}),t)}}}function j(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 H(e,t){_(e,"position","absolute"),_(e,"top",t.top),_(e,"left",t.left),_(e,"width",t.width),_(e,"height",t.height)}function F(e){_(e,"position",""),_(e,"top",""),_(e,"left",""),_(e,"width",""),_(e,"height","")}var X="Sortable"+(new Date).getTime();var Y=[],q={initializeByDefault:!0},z={mount:function(e){for(var t in q)q.hasOwnProperty(t)&&!(t in e)&&(e[t]=q[t]);Y.forEach((function(t){if(t.pluginName===e.pluginName)throw"Sortable: Cannot mount plugin ".concat(e.pluginName," more than once")})),Y.push(e)},pluginEvent:function(e,t,n){var o=this;this.eventCanceled=!1,n.cancel=function(){o.eventCanceled=!0};var i=e+"Global";Y.forEach((function(o){t[o.pluginName]&&(t[o.pluginName][i]&&t[o.pluginName][i](r({sortable:t},n)),t.options[o.pluginName]&&t[o.pluginName][e]&&t[o.pluginName][e](r({sortable:t},n)))}))},initializePlugins:function(e,t,n,o){for(var r in Y.forEach((function(o){var r=o.pluginName;if(e.options[r]||o.initializeByDefault){var i=new o(e,t,e.options);i.sortable=e,i.options=e.options,e[r]=i,l(n,i.defaults)}})),e.options)if(e.options.hasOwnProperty(r)){var i=this.modifyOption(e,r,e.options[r]);void 0!==i&&(e.options[r]=i)}},getEventProperties:function(e,t){var n={};return Y.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 Y.forEach((function(r){e[r.pluginName]&&r.optionListeners&&"function"==typeof r.optionListeners[t]&&(o=r.optionListeners[t].call(e[r.pluginName],n))})),o}};function V(e){var t=e.sortable,n=e.rootEl,o=e.name,i=e.targetEl,a=e.cloneEl,l=e.toEl,s=e.fromEl,c=e.oldIndex,p=e.newIndex,h=e.oldDraggableIndex,f=e.newDraggableIndex,g=e.originalEvent,m=e.putSortable,v=e.extraEventProperties;if(t=t||n&&n[X]){var b,w=t.options,y="on"+o.charAt(0).toUpperCase()+o.substr(1);!window.CustomEvent||u||d?(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=i||n,b.clone=a,b.oldIndex=c,b.newIndex=p,b.oldDraggableIndex=h,b.newDraggableIndex=f,b.originalEvent=g,b.pullMode=m?m.lastPutMode:void 0;var E=r(r({},v),z.getEventProperties(o,t));for(var S in E)b[S]=E[S];n&&n.dispatchEvent(b),w[y]&&w[y].call(t,b)}}var U=["evt"],G=function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},o=n.evt,i=function(e,t){if(null==e)return{};var n,o,r=function(e,t){if(null==e)return{};var n,o,r={},i=Object.keys(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||(r[n]=e[n]);return r}(e,t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(o=0;o<i.length;o++)n=i[o],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(r[n]=e[n])}return r}(n,U);z.pluginEvent.bind(He)(e,t,r({dragEl:W,parentEl:Q,ghostEl:Z,rootEl:J,nextEl:ee,lastDownEl:te,cloneEl:ne,cloneHidden:oe,dragStarted:me,putSortable:ce,activeSortable:He.active,originalEvent:o,oldIndex:re,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:le,hideGhostForTarget:Le,unhideGhostForTarget:$e,cloneNowHidden:function(){oe=!0},cloneNowShown:function(){oe=!1},dispatchSortableEvent:function(e){K({sortable:t,name:e,originalEvent:o})}},i))};function K(e){V(r({putSortable:ce,cloneEl:ne,targetEl:W,rootEl:J,oldIndex:re,oldDraggableIndex:ae,newIndex:ie,newDraggableIndex:le},e))}var W,Q,Z,J,ee,te,ne,oe,re,ie,ae,le,se,ce,ue,de,pe,he,fe,ge,me,ve,be,we,ye,Ee=!1,Se=!1,Ce=[],xe=!1,_e=!1,De=[],Oe=!1,Ie=[],Me="undefined"!=typeof document,Ne=f,Te=d||u?"cssFloat":"float",Ae=Me&&!g&&!f&&"draggable"in document.createElement("div"),Pe=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=_(e),o=parseInt(n.width)-parseInt(n.paddingLeft)-parseInt(n.paddingRight)-parseInt(n.borderLeftWidth)-parseInt(n.borderRightWidth),r=T(e,0,t),i=T(e,1,t),a=r&&_(r),l=i&&_(i),s=a&&parseInt(a.marginLeft)+parseInt(a.marginRight)+M(r).width,c=l&&parseInt(l.marginLeft)+parseInt(l.marginRight)+M(i).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(r&&a.float&&"none"!==a.float){var u="left"===a.float?"left":"right";return!i||"both"!==l.clear&&l.clear!==u?"horizontal":"vertical"}return r&&("block"===a.display||"flex"===a.display||"table"===a.display||"grid"===a.display||s>=o&&"none"===n[Te]||i&&"none"===n[Te]&&s+c>o)?"vertical":"horizontal"},ke=function(e){function t(e,n){return function(o,r,i,a){var l=o.options.group.name&&r.options.group.name&&o.options.group.name===r.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,r,i,a),n)(o,r,i,a);var s=(n?o:r).options.group.name;return!0===e||"string"==typeof e&&e===s||e.join&&e.indexOf(s)>-1}}var n={},o=e.group;o&&"object"==i(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(){!Pe&&Z&&_(Z,"display","none")},$e=function(){!Pe&&Z&&_(Z,"display","")};Me&&!g&&document.addEventListener("click",(function(e){if(Se)return e.preventDefault(),e.stopPropagation&&e.stopPropagation(),e.stopImmediatePropagation&&e.stopImmediatePropagation(),Se=!1,!1}),!0);var je=function(e){if(W){e=e.touches?e.touches[0]:e;var t=(r=e.clientX,i=e.clientY,Ce.some((function(e){var t=e[X].options.emptyInsertThreshold;if(t&&!A(e)){var n=M(e),o=r>=n.left-t&&r<=n.right+t,l=i>=n.top-t&&i<=n.bottom+t;return o&&l?a=e:void 0}})),a);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[X]._onDragOver(n)}}var r,i,a},Be=function(e){W&&W.parentNode[X]._isOutsideThisEl(e.target)};function He(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[X]=this;var n,o,i={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!==He.supportPointer&&"PointerEvent"in window&&!h,emptyInsertThreshold:5};for(var a in z.initializePlugins(this,e,i),i)!(a in t)&&(t[a]=i[a]);for(var s in ke(t),this)"_"===s.charAt(0)&&"function"==typeof this[s]&&(this[s]=this[s].bind(this));this.nativeDraggable=!t.forceFallback&&Ae,this.nativeDraggable&&(this.options.touchStartThreshold=1),t.supportPointer?v(e,"pointerdown",this._onTapStart):(v(e,"mousedown",this._onTapStart),v(e,"touchstart",this._onTapStart)),this.nativeDraggable&&(v(e,"dragover",this),v(e,"dragenter",this)),Ce.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"!==_(e,"display")&&e!==He.ghost){o.push({target:e,rect:M(e)});var t=r({},o[o.length-1].rect);if(e.thisAnimationDuration){var n=D(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 r=!1,i=0;o.forEach((function(e){var n=0,o=e.target,a=o.fromRect,l=M(o),s=o.prevFromRect,c=o.prevToRect,u=e.rect,d=D(o,!0);d&&(l.top-=d.f,l.left-=d.e),o.toRect=l,o.thisAnimationDuration&&L(s,l)&&!L(a,l)&&(u.top-l.top)/(u.left-l.left)==(a.top-l.top)/(a.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}(u,s,c,t.options)),L(l,a)||(o.prevFromRect=a,o.prevToRect=l,n||(n=t.options.animation),t.animate(o,u,l,n)),n&&(r=!0,i=Math.max(i,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),r?n=setTimeout((function(){"function"==typeof e&&e()}),i):"function"==typeof e&&e(),o=[]},animate:function(e,t,n,o){if(o){_(e,"transition",""),_(e,"transform","");var r=D(this.el),i=r&&r.a,a=r&&r.d,l=(t.left-n.left)/(i||1),s=(t.top-n.top)/(a||1);e.animatingX=!!l,e.animatingY=!!s,_(e,"transform","translate3d("+l+"px,"+s+"px,0)"),this.forRepaintDummy=function(e){return e.offsetWidth}(e),_(e,"transition","transform "+o+"ms"+(this.options.easing?" "+this.options.easing:"")),_(e,"transform","translate3d(0,0,0)"),"number"==typeof e.animated&&clearTimeout(e.animated),e.animated=setTimeout((function(){_(e,"transition",""),_(e,"transform",""),e.animated=!1,e.animatingX=!1,e.animatingY=!1}),o)}}}))}function Fe(e,t,n,o,r,i,a,l){var s,c,p=e[X],h=p.options.onMove;return!window.CustomEvent||u||d?(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=r||t,s.relatedRect=i||M(t),s.willInsertAfter=l,s.originalEvent=a,e.dispatchEvent(s),h&&(c=h.call(p,s,a)),c}function Xe(e){e.draggable=!1}function Ye(){Oe=!1}function qe(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 ze(e){return setTimeout(e,0)}function Ve(e){return clearTimeout(e)}He.prototype={constructor:He,_isOutsideThisEl:function(e){this.el.contains(e)||e===this.el||(ve=null)},_getDirection:function(e,t){return"function"==typeof this.options.direction?this.options.direction.call(this,e,t,W):this.options.direction},_onTapStart:function(e){if(e.cancelable){var t=this,n=this.el,o=this.options,r=o.preventOnFilter,i=e.type,a=e.touches&&e.touches[0]||e.pointerType&&"touch"===e.pointerType&&e,l=(a||e).target,s=e.target.shadowRoot&&(e.path&&e.path[0]||e.composedPath&&e.composedPath()[0])||l,c=o.filter;if(function(e){Ie.length=0;for(var t=e.getElementsByTagName("input"),n=t.length;n--;){var o=t[n];o.checked&&Ie.push(o)}}(n),!W&&!(/mousedown|pointerdown/.test(i)&&0!==e.button||o.disabled)&&!s.isContentEditable&&(this.nativeDraggable||!h||!l||"SELECT"!==l.tagName.toUpperCase())&&!((l=E(l,o.draggable,n,!1))&&l.animated||te===l)){if(re=P(l),ae=P(l,o.draggable),"function"==typeof c){if(c.call(this,e,l,this))return K({sortable:t,rootEl:s,name:"filter",targetEl:l,toEl:n,fromEl:n}),G("filter",t,{evt:e}),void(r&&e.cancelable&&e.preventDefault())}else if(c&&(c=c.split(",").some((function(o){if(o=E(s,o.trim(),n,!1))return K({sortable:t,rootEl:o,name:"filter",targetEl:l,fromEl:n,toEl:n}),G("filter",t,{evt:e}),!0}))))return void(r&&e.cancelable&&e.preventDefault());o.handle&&!E(s,o.handle,n,!1)||this._prepareDragStart(e,a,l)}}},_prepareDragStart:function(e,t,n){var o,r=this,i=r.el,a=r.options,l=i.ownerDocument;if(n&&!W&&n.parentNode===i){var s=M(n);if(J=i,Q=(W=n).parentNode,ee=W.nextSibling,te=n,se=a.group,He.dragged=W,ue={target:W,clientX:(t||e).clientX,clientY:(t||e).clientY},fe=ue.clientX-s.left,ge=ue.clientY-s.top,this._lastX=(t||e).clientX,this._lastY=(t||e).clientY,W.style["will-change"]="all",o=function(){G("delayEnded",r,{evt:e}),He.eventCanceled?r._onDrop():(r._disableDelayedDragEvents(),!p&&r.nativeDraggable&&(W.draggable=!0),r._triggerDragStart(e,t),K({sortable:r,name:"choose",originalEvent:e}),x(W,a.chosenClass,!0))},a.ignore.split(",").forEach((function(e){O(W,e.trim(),Xe)})),v(l,"dragover",je),v(l,"mousemove",je),v(l,"touchmove",je),v(l,"mouseup",r._onDrop),v(l,"touchend",r._onDrop),v(l,"touchcancel",r._onDrop),p&&this.nativeDraggable&&(this.options.touchStartThreshold=4,W.draggable=!0),G("delayStart",this,{evt:e}),!a.delay||a.delayOnTouchOnly&&!t||this.nativeDraggable&&(d||u))o();else{if(He.eventCanceled)return void this._onDrop();v(l,"mouseup",r._disableDelayedDrag),v(l,"touchend",r._disableDelayedDrag),v(l,"touchcancel",r._disableDelayedDrag),v(l,"mousemove",r._delayedDragTouchMoveHandler),v(l,"touchmove",r._delayedDragTouchMoveHandler),a.supportPointer&&v(l,"pointermove",r._delayedDragTouchMoveHandler),r._dragStartTimer=setTimeout(o,a.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(){W&&Xe(W),clearTimeout(this._dragStartTimer),this._disableDelayedDragEvents()},_disableDelayedDragEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._disableDelayedDrag),b(e,"touchend",this._disableDelayedDrag),b(e,"touchcancel",this._disableDelayedDrag),b(e,"mousemove",this._delayedDragTouchMoveHandler),b(e,"touchmove",this._delayedDragTouchMoveHandler),b(e,"pointermove",this._delayedDragTouchMoveHandler)},_triggerDragStart:function(e,t){t=t||"touch"==e.pointerType&&e,!this.nativeDraggable||t?this.options.supportPointer?v(document,"pointermove",this._onTouchMove):v(document,t?"touchmove":"mousemove",this._onTouchMove):(v(W,"dragend",this),v(J,"dragstart",this._onDragStart));try{document.selection?ze((function(){document.selection.empty()})):window.getSelection().removeAllRanges()}catch(e){}},_dragStarted:function(e,t){if(Ee=!1,J&&W){G("dragStarted",this,{evt:t}),this.nativeDraggable&&v(document,"dragover",Be);var n=this.options;!e&&x(W,n.dragClass,!1),x(W,n.ghostClass,!0),He.active=this,e&&this._appendGhost(),K({sortable:this,name:"start",originalEvent:t})}else this._nulling()},_emulateDragOver:function(){if(de){this._lastX=de.clientX,this._lastY=de.clientY,Le();for(var e=document.elementFromPoint(de.clientX,de.clientY),t=e;e&&e.shadowRoot&&(e=e.shadowRoot.elementFromPoint(de.clientX,de.clientY))!==t;)t=e;if(W.parentNode[X]._isOutsideThisEl(e),t)do{if(t[X]&&t[X]._onDragOver({clientX:de.clientX,clientY:de.clientY,target:e,rootEl:t})&&!this.options.dragoverBubble)break;e=t}while(t=t.parentNode);$e()}},_onTouchMove:function(e){if(ue){var t=this.options,n=t.fallbackTolerance,o=t.fallbackOffset,r=e.touches?e.touches[0]:e,i=Z&&D(Z,!0),a=Z&&i&&i.a,l=Z&&i&&i.d,s=Ne&&ye&&R(ye),c=(r.clientX-ue.clientX+o.x)/(a||1)+(s?s[0]-De[0]:0)/(a||1),u=(r.clientY-ue.clientY+o.y)/(l||1)+(s?s[1]-De[1]:0)/(l||1);if(!He.active&&!Ee){if(n&&Math.max(Math.abs(r.clientX-this._lastX),Math.abs(r.clientY-this._lastY))<n)return;this._onDragStart(e,!0)}if(Z){i?(i.e+=c-(pe||0),i.f+=u-(he||0)):i={a:1,b:0,c:0,d:1,e:c,f:u};var d="matrix(".concat(i.a,",").concat(i.b,",").concat(i.c,",").concat(i.d,",").concat(i.e,",").concat(i.f,")");_(Z,"webkitTransform",d),_(Z,"mozTransform",d),_(Z,"msTransform",d),_(Z,"transform",d),pe=c,he=u,de=r}e.cancelable&&e.preventDefault()}},_appendGhost:function(){if(!Z){var e=this.options.fallbackOnBody?document.body:J,t=M(W,!0,Ne,!0,e),n=this.options;if(Ne){for(ye=e;"static"===_(ye,"position")&&"none"===_(ye,"transform")&&ye!==document;)ye=ye.parentNode;ye!==document.body&&ye!==document.documentElement?(ye===document&&(ye=I()),t.top+=ye.scrollTop,t.left+=ye.scrollLeft):ye=I(),De=R(ye)}x(Z=W.cloneNode(!0),n.ghostClass,!1),x(Z,n.fallbackClass,!0),x(Z,n.dragClass,!0),_(Z,"transition",""),_(Z,"transform",""),_(Z,"box-sizing","border-box"),_(Z,"margin",0),_(Z,"top",t.top),_(Z,"left",t.left),_(Z,"width",t.width),_(Z,"height",t.height),_(Z,"opacity","0.8"),_(Z,"position",Ne?"absolute":"fixed"),_(Z,"zIndex","100000"),_(Z,"pointerEvents","none"),He.ghost=Z,e.appendChild(Z),_(Z,"transform-origin",fe/parseInt(Z.style.width)*100+"% "+ge/parseInt(Z.style.height)*100+"%")}},_onDragStart:function(e,t){var n=this,o=e.dataTransfer,r=n.options;G("dragStart",this,{evt:e}),He.eventCanceled?this._onDrop():(G("setupClone",this),He.eventCanceled||((ne=B(W)).removeAttribute("id"),ne.draggable=!1,ne.style["will-change"]="",this._hideClone(),x(ne,this.options.chosenClass,!1),He.clone=ne),n.cloneId=ze((function(){G("clone",n),He.eventCanceled||(n.options.removeCloneOnHide||J.insertBefore(ne,W),n._hideClone(),K({sortable:n,name:"clone"}))})),!t&&x(W,r.dragClass,!0),t?(Se=!0,n._loopId=setInterval(n._emulateDragOver,50)):(b(document,"mouseup",n._onDrop),b(document,"touchend",n._onDrop),b(document,"touchcancel",n._onDrop),o&&(o.effectAllowed="move",r.setData&&r.setData.call(n,o,W)),v(document,"drop",n),_(W,"transform","translateZ(0)")),Ee=!0,n._dragStartId=ze(n._dragStarted.bind(n,t,e)),v(document,"selectstart",n),me=!0,h&&_(document.body,"user-select","none"))},_onDragOver:function(e){var t,n,o,i,a=this.el,l=e.target,s=this.options,c=s.group,u=He.active,d=se===c,p=s.sort,h=ce||u,f=this,g=!1;if(!Oe){if(void 0!==e.preventDefault&&e.cancelable&&e.preventDefault(),l=E(l,s.draggable,a,!0),B("dragOver"),He.eventCanceled)return g;if(W.contains(e.target)||l.animated&&l.animatingX&&l.animatingY||f._ignoreWhileAnimating===l)return F(!1);if(Se=!1,u&&!s.disabled&&(d?p||(o=Q!==J):ce===this||(this.lastPutMode=se.checkPull(this,u,W,e))&&c.checkPut(this,u,W,e))){if(i="vertical"===this._getDirection(e,l),t=M(W),B("dragOverValid"),He.eventCanceled)return g;if(o)return Q=J,H(),this._hideClone(),B("revert"),He.eventCanceled||(ee?J.insertBefore(W,ee):J.appendChild(W)),F(!0);var m=A(a,s.draggable);if(!m||function(e,t,n){var o=M(A(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,i,this)&&!m.animated){if(m===W)return F(!1);if(m&&a===e.target&&(l=m),l&&(n=M(l)),!1!==Fe(J,a,W,t,l,n,e,!!l))return H(),m&&m.nextSibling?a.insertBefore(W,m.nextSibling):a.appendChild(W),Q=a,Y(),F(!0)}else if(m&&function(e,t,n){var o=M(T(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,i,this)){var v=T(a,0,s,!0);if(v===W)return F(!1);if(n=M(l=v),!1!==Fe(J,a,W,t,l,n,e,!1))return H(),a.insertBefore(W,v),Q=a,Y(),F(!0)}else if(l.parentNode===a){n=M(l);var b,w,y,S=W.parentNode!==a,C=!function(e,t,n){var o=n?e.left:e.top,r=n?e.right:e.bottom,i=n?e.width:e.height,a=n?t.left:t.top,l=n?t.right:t.bottom,s=n?t.width:t.height;return o===a||r===l||o+i/2===a+s/2}(W.animated&&W.toRect||t,l.animated&&l.toRect||n,i),D=i?"top":"left",O=N(l,"top","top")||N(W,"top","top"),I=O?O.scrollTop:void 0;if(ve!==l&&(w=n[D],xe=!1,_e=!C&&s.invertSwap||S),b=function(e,t,n,o,r,i,a,l){var s=o?e.clientY:e.clientX,c=o?n.height:n.width,u=o?n.top:n.left,d=o?n.bottom:n.right,p=!1;if(!a)if(l&&we<c*r){if(!xe&&(1===be?s>u+c*i/2:s<d-c*i/2)&&(xe=!0),xe)p=!0;else if(1===be?s<u+we:s>d-we)return-be}else if(s>u+c*(1-r)/2&&s<d-c*(1-r)/2)return function(e){return P(W)<P(e)?1:-1}(t);return(p=p||a)&&(s<u+c*i/2||s>d-c*i/2)?s>u+c/2?1:-1:0}(e,l,n,i,C?1:s.swapThreshold,null==s.invertedSwapThreshold?s.swapThreshold:s.invertedSwapThreshold,_e,ve===l),0!==b){var R=P(W);do{R-=b,y=Q.children[R]}while(y&&("none"===_(y,"display")||y===Z))}if(0===b||y===l)return F(!1);ve=l,be=b;var k=l.nextElementSibling,L=!1,$=Fe(J,a,W,t,l,n,e,L=1===b);if(!1!==$)return 1!==$&&-1!==$||(L=1===$),Oe=!0,setTimeout(Ye,30),H(),L&&!k?a.appendChild(W):l.parentNode.insertBefore(W,L?k:l),O&&j(O,0,I-O.scrollTop),Q=W.parentNode,void 0===w||_e||(we=Math.abs(w-M(l)[D])),Y(),F(!0)}if(a.contains(W))return F(!1)}return!1}function B(s,c){G(s,f,r({evt:e,isOwner:d,axis:i?"vertical":"horizontal",revert:o,dragRect:t,targetRect:n,canSort:p,fromSortable:h,target:l,completed:F,onMove:function(n,o){return Fe(J,a,W,t,n,M(n),e,o)},changed:Y},c))}function H(){B("dragOverAnimationCapture"),f.captureAnimationState(),f!==h&&h.captureAnimationState()}function F(t){return B("dragOverCompleted",{insertion:t}),t&&(d?u._hideClone():u._showClone(f),f!==h&&(x(W,ce?ce.options.ghostClass:u.options.ghostClass,!1),x(W,s.ghostClass,!0)),ce!==f&&f!==He.active?ce=f:f===He.active&&ce&&(ce=null),h===f&&(f._ignoreWhileAnimating=l),f.animateAll((function(){B("dragOverAnimationComplete"),f._ignoreWhileAnimating=null})),f!==h&&(h.animateAll(),h._ignoreWhileAnimating=null)),(l===W&&!W.animated||l===a&&!l.animated)&&(ve=null),s.dragoverBubble||e.rootEl||l===document||(W.parentNode[X]._isOutsideThisEl(e.target),!t&&je(e)),!s.dragoverBubble&&e.stopPropagation&&e.stopPropagation(),g=!0}function Y(){ie=P(W),le=P(W,s.draggable),K({sortable:f,name:"change",toEl:a,newIndex:ie,newDraggableIndex:le,originalEvent:e})}},_ignoreWhileAnimating:null,_offMoveEvents:function(){b(document,"mousemove",this._onTouchMove),b(document,"touchmove",this._onTouchMove),b(document,"pointermove",this._onTouchMove),b(document,"dragover",je),b(document,"mousemove",je),b(document,"touchmove",je)},_offUpEvents:function(){var e=this.el.ownerDocument;b(e,"mouseup",this._onDrop),b(e,"touchend",this._onDrop),b(e,"pointerup",this._onDrop),b(e,"touchcancel",this._onDrop),b(document,"selectstart",this)},_onDrop:function(e){var t=this.el,n=this.options;ie=P(W),le=P(W,n.draggable),G("drop",this,{evt:e}),Q=W&&W.parentNode,ie=P(W),le=P(W,n.draggable),He.eventCanceled||(Ee=!1,_e=!1,xe=!1,clearInterval(this._loopId),clearTimeout(this._dragStartTimer),Ve(this.cloneId),Ve(this._dragStartId),this.nativeDraggable&&(b(document,"drop",this),b(t,"dragstart",this._onDragStart)),this._offMoveEvents(),this._offUpEvents(),h&&_(document.body,"user-select",""),_(W,"transform",""),e&&(me&&(e.cancelable&&e.preventDefault(),!n.dropBubble&&e.stopPropagation()),Z&&Z.parentNode&&Z.parentNode.removeChild(Z),(J===Q||ce&&"clone"!==ce.lastPutMode)&&ne&&ne.parentNode&&ne.parentNode.removeChild(ne),W&&(this.nativeDraggable&&b(W,"dragend",this),Xe(W),W.style["will-change"]="",me&&!Ee&&x(W,ce?ce.options.ghostClass:this.options.ghostClass,!1),x(W,this.options.chosenClass,!1),K({sortable:this,name:"unchoose",toEl:Q,newIndex:null,newDraggableIndex:null,originalEvent:e}),J!==Q?(ie>=0&&(K({rootEl:Q,name:"add",toEl:Q,fromEl:J,originalEvent:e}),K({sortable:this,name:"remove",toEl:Q,originalEvent:e}),K({rootEl:Q,name:"sort",toEl:Q,fromEl:J,originalEvent:e}),K({sortable:this,name:"sort",toEl:Q,originalEvent:e})),ce&&ce.save()):ie!==re&&ie>=0&&(K({sortable:this,name:"update",toEl:Q,originalEvent:e}),K({sortable:this,name:"sort",toEl:Q,originalEvent:e})),He.active&&(null!=ie&&-1!==ie||(ie=re,le=ae),K({sortable:this,name:"end",toEl:Q,originalEvent:e}),this.save())))),this._nulling()},_nulling:function(){G("nulling",this),J=W=Q=Z=ee=ne=te=oe=ue=de=me=ie=le=re=ae=ve=be=ce=se=He.dragged=He.ghost=He.clone=He.active=null,Ie.forEach((function(e){e.checked=!0})),Ie.length=pe=he=0},handleEvent:function(e){switch(e.type){case"drop":case"dragend":this._onDrop(e);break;case"dragenter":case"dragover":W&&(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,r=n.length,i=this.options;o<r;o++)E(e=n[o],i.draggable,this.el,!1)&&t.push(e.getAttribute(i.dataIdAttr)||qe(e));return t},sort:function(e,t){var n={},o=this.el;this.toArray().forEach((function(e,t){var r=o.children[t];E(r,this.options.draggable,o,!1)&&(n[e]=r)}),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 E(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=z.modifyOption(this,e,t);n[e]=void 0!==o?o:t,"group"===e&&ke(n)},destroy:function(){G("destroy",this);var e=this.el;e[X]=null,b(e,"mousedown",this._onTapStart),b(e,"touchstart",this._onTapStart),b(e,"pointerdown",this._onTapStart),this.nativeDraggable&&(b(e,"dragover",this),b(e,"dragenter",this)),Array.prototype.forEach.call(e.querySelectorAll("[draggable]"),(function(e){e.removeAttribute("draggable")})),this._onDrop(),this._disableDelayedDragEvents(),Ce.splice(Ce.indexOf(this.el),1),this.el=e=null},_hideClone:function(){if(!oe){if(G("hideClone",this),He.eventCanceled)return;_(ne,"display","none"),this.options.removeCloneOnHide&&ne.parentNode&&ne.parentNode.removeChild(ne),oe=!0}},_showClone:function(e){if("clone"===e.lastPutMode){if(oe){if(G("showClone",this),He.eventCanceled)return;W.parentNode!=J||this.options.group.revertClone?ee?J.insertBefore(ne,ee):J.appendChild(ne):J.insertBefore(ne,W),this.options.group.revertClone&&this.animate(W,ne),_(ne,"display",""),oe=!1}}else this._hideClone()}},Me&&v(document,"touchmove",(function(e){(He.active||Ee)&&e.cancelable&&e.preventDefault()})),He.utils={on:v,off:b,css:_,find:O,is:function(e,t){return!!E(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:$,closest:E,toggleClass:x,clone:B,index:P,nextTick:ze,cancelNextTick:Ve,detectDirection:Re,getChild:T},He.get=function(e){return e[X]},He.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&&(He.utils=r(r({},He.utils),e.utils)),z.mount(e)}))},He.create=function(e,t){return new He(e,t)},He.version="1.15.0";var Ue,Ge,Ke,We,Qe,Ze,Je=[],et=!1;function tt(){Je.forEach((function(e){clearInterval(e.pid)})),Je=[]}function nt(){clearInterval(Ze)}var ot,rt=$((function(e,t,n,o){if(t.scroll){var r,i=(e.touches?e.touches[0]:e).clientX,a=(e.touches?e.touches[0]:e).clientY,l=t.scrollSensitivity,s=t.scrollSpeed,c=I(),u=!1;Ge!==n&&(Ge=n,tt(),Ue=t.scroll,r=t.scrollFn,!0===Ue&&(Ue=k(n,!0)));var d=0,p=Ue;do{var h=p,f=M(h),g=f.top,m=f.bottom,v=f.left,b=f.right,w=f.width,y=f.height,E=void 0,S=void 0,C=h.scrollWidth,x=h.scrollHeight,D=_(h),O=h.scrollLeft,N=h.scrollTop;h===c?(E=w<C&&("auto"===D.overflowX||"scroll"===D.overflowX||"visible"===D.overflowX),S=y<x&&("auto"===D.overflowY||"scroll"===D.overflowY||"visible"===D.overflowY)):(E=w<C&&("auto"===D.overflowX||"scroll"===D.overflowX),S=y<x&&("auto"===D.overflowY||"scroll"===D.overflowY));var T=E&&(Math.abs(b-i)<=l&&O+w<C)-(Math.abs(v-i)<=l&&!!O),A=S&&(Math.abs(m-a)<=l&&N+y<x)-(Math.abs(g-a)<=l&&!!N);if(!Je[d])for(var P=0;P<=d;P++)Je[P]||(Je[P]={});Je[d].vx==T&&Je[d].vy==A&&Je[d].el===h||(Je[d].el=h,Je[d].vx=T,Je[d].vy=A,clearInterval(Je[d].pid),0==T&&0==A||(u=!0,Je[d].pid=setInterval(function(){o&&0===this.layer&&He.active._onTouchMove(Qe);var t=Je[this.layer].vy?Je[this.layer].vy*s:0,n=Je[this.layer].vx?Je[this.layer].vx*s:0;"function"==typeof r&&"continue"!==r.call(He.dragged.parentNode[X],n,t,e,Qe,Je[this.layer].el)||j(Je[this.layer].el,n,t)}.bind({layer:d}),24))),d++}while(t.bubbleScroll&&p!==c&&(p=k(p,!1)));et=u}}),30),it=function(e){var t=e.originalEvent,n=e.putSortable,o=e.dragEl,r=e.activeSortable,i=e.dispatchSortableEvent,a=e.hideGhostForTarget,l=e.unhideGhostForTarget;if(t){var s=n||r;a();var c=t.changedTouches&&t.changedTouches.length?t.changedTouches[0]:t,u=document.elementFromPoint(c.clientX,c.clientY);l(),s&&!s.el.contains(u)&&(i("spill"),this.onSpill({dragEl:o,putSortable:n}))}};function at(){}function lt(){}function st(){function e(){this.defaults={swapClass:"sortable-swap-highlight"}}return e.prototype={dragStart:function(e){var t=e.dragEl;ot=t},dragOverValid:function(e){var t=e.completed,n=e.target,o=e.onMove,r=e.activeSortable,i=e.changed,a=e.cancel;if(r.options.swap){var l=this.sortable.el,s=this.options;if(n&&n!==l){var c=ot;!1!==o(n)?(x(n,s.swapClass,!0),ot=n):ot=null,c&&c!==ot&&x(c,s.swapClass,!1)}i(),t(!0),a()}},drop:function(e){var t,n,o,r,i,a,l=e.activeSortable,s=e.putSortable,c=e.dragEl,u=s||this.sortable,d=this.options;ot&&x(ot,d.swapClass,!1),ot&&(d.swap||s&&s.options.swap)&&c!==ot&&(u.captureAnimationState(),u!==l&&l.captureAnimationState(),n=ot,i=(t=c).parentNode,a=n.parentNode,i&&a&&!i.isEqualNode(n)&&!a.isEqualNode(t)&&(o=P(t),r=P(n),i.isEqualNode(a)&&o<r&&r++,i.insertBefore(n,i.children[o]),a.insertBefore(t,a.children[r])),u.animateAll(),u!==l&&l.animateAll())},nulling:function(){ot=null}},l(e,{pluginName:"swap",eventProperties:function(){return{swapItem:ot}}})}at.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=T(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(at,{pluginName:"revertOnSpill"}),lt.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(lt,{pluginName:"removeOnSpill"});var ct,ut,dt,pt,ht,ft=[],gt=[],mt=!1,vt=!1,bt=!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.avoidImplicitDeselect||(e.options.supportPointer?v(document,"pointerup",this._deselectMultiDrag):(v(document,"mouseup",this._deselectMultiDrag),v(document,"touchend",this._deselectMultiDrag))),v(document,"keydown",this._checkKeyDown),v(document,"keyup",this._checkKeyUp),this.defaults={selectedClass:"sortable-selected",multiDragKey:null,avoidImplicitDeselect:!1,setData:function(t,n){var o="";ft.length&&ut===e?ft.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;dt=t},delayEnded:function(){this.isMultiDrag=~ft.indexOf(dt)},setupClone:function(e){var t=e.sortable,n=e.cancel;if(this.isMultiDrag){for(var o=0;o<ft.length;o++)gt.push(B(ft[o])),gt[o].sortableIndex=ft[o].sortableIndex,gt[o].draggable=!1,gt[o].style["will-change"]="",x(gt[o],this.options.selectedClass,!1),ft[o]===dt&&x(gt[o],this.options.chosenClass,!1);t._hideClone(),n()}},clone:function(e){var t=e.sortable,n=e.rootEl,o=e.dispatchSortableEvent,r=e.cancel;this.isMultiDrag&&(this.options.removeCloneOnHide||ft.length&&ut===t&&(yt(!0,n),o("clone"),r()))},showClone:function(e){var t=e.cloneNowShown,n=e.rootEl,o=e.cancel;this.isMultiDrag&&(yt(!1,n),gt.forEach((function(e){_(e,"display","")})),t(),ht=!1,o())},hideClone:function(e){var t=this,n=(e.sortable,e.cloneNowHidden),o=e.cancel;this.isMultiDrag&&(gt.forEach((function(e){_(e,"display","none"),t.options.removeCloneOnHide&&e.parentNode&&e.parentNode.removeChild(e)})),n(),ht=!0,o())},dragStartGlobal:function(e){e.sortable,!this.isMultiDrag&&ut&&ut.multiDrag._deselectMultiDrag(),ft.forEach((function(e){e.sortableIndex=P(e)})),ft=ft.sort((function(e,t){return e.sortableIndex-t.sortableIndex})),bt=!0},dragStarted:function(e){var t=this,n=e.sortable;if(this.isMultiDrag){if(this.options.sort&&(n.captureAnimationState(),this.options.animation)){ft.forEach((function(e){e!==dt&&_(e,"position","absolute")}));var o=M(dt,!1,!0,!0);ft.forEach((function(e){e!==dt&&H(e,o)})),vt=!0,mt=!0}n.animateAll((function(){vt=!1,mt=!1,t.options.animation&&ft.forEach((function(e){F(e)})),t.options.sort&&Et()}))}},dragOver:function(e){var t=e.target,n=e.completed,o=e.cancel;vt&&~ft.indexOf(t)&&(n(!1),o())},revert:function(e){var t=e.fromSortable,n=e.rootEl,o=e.sortable,r=e.dragRect;ft.length>1&&(ft.forEach((function(e){o.addAnimationState({target:e,rect:vt?M(e):r}),F(e),e.fromRect=r,t.removeAnimationState(e)})),vt=!1,function(e,t){ft.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}(!this.options.removeCloneOnHide,n))},dragOverCompleted:function(e){var t=e.sortable,n=e.isOwner,o=e.insertion,r=e.activeSortable,i=e.parentEl,a=e.putSortable,l=this.options;if(o){if(n&&r._hideClone(),mt=!1,l.animation&&ft.length>1&&(vt||!n&&!r.options.sort&&!a)){var s=M(dt,!1,!0,!0);ft.forEach((function(e){e!==dt&&(H(e,s),i.appendChild(e))})),vt=!0}if(!n)if(vt||Et(),ft.length>1){var c=ht;r._showClone(t),r.options.animation&&!ht&&c&&gt.forEach((function(e){r.addAnimationState({target:e,rect:pt}),e.fromRect=pt,e.thisAnimationDuration=null}))}else r._showClone(t)}},dragOverAnimationCapture:function(e){var t=e.dragRect,n=e.isOwner,o=e.activeSortable;if(ft.forEach((function(e){e.thisAnimationDuration=null})),o.options.animation&&!n&&o.multiDrag.isMultiDrag){pt=l({},t);var r=D(dt,!0);pt.top-=r.f,pt.left-=r.e}},dragOverAnimationComplete:function(){vt&&(vt=!1,Et())},drop:function(e){var t=e.originalEvent,n=e.rootEl,o=e.parentEl,r=e.sortable,i=e.dispatchSortableEvent,a=e.oldIndex,l=e.putSortable,s=l||this.sortable;if(t){var c=this.options,u=o.children;if(!bt)if(c.multiDragKey&&!this.multiDragKeyDown&&this._deselectMultiDrag(),x(dt,c.selectedClass,!~ft.indexOf(dt)),~ft.indexOf(dt))ft.splice(ft.indexOf(dt),1),ct=null,V({sortable:r,rootEl:n,name:"deselect",targetEl:dt,originalEvent:t});else{if(ft.push(dt),V({sortable:r,rootEl:n,name:"select",targetEl:dt,originalEvent:t}),t.shiftKey&&ct&&r.el.contains(ct)){var d,p,h=P(ct),f=P(dt);if(~h&&~f&&h!==f)for(f>h?(p=h,d=f):(p=f,d=h+1);p<d;p++)~ft.indexOf(u[p])||(x(u[p],c.selectedClass,!0),ft.push(u[p]),V({sortable:r,rootEl:n,name:"select",targetEl:u[p],originalEvent:t}))}else ct=dt;ut=s}if(bt&&this.isMultiDrag){if(vt=!1,(o[X].options.sort||o!==n)&&ft.length>1){var g=M(dt),m=P(dt,":not(."+this.options.selectedClass+")");if(!mt&&c.animation&&(dt.thisAnimationDuration=null),s.captureAnimationState(),!mt&&(c.animation&&(dt.fromRect=g,ft.forEach((function(e){if(e.thisAnimationDuration=null,e!==dt){var t=vt?M(e):g;e.fromRect=t,s.addAnimationState({target:e,rect:t})}}))),Et(),ft.forEach((function(e){u[m]?o.insertBefore(e,u[m]):o.appendChild(e),m++})),a===P(dt))){var v=!1;ft.forEach((function(e){e.sortableIndex===P(e)||(v=!0)})),v&&i("update")}ft.forEach((function(e){F(e)})),s.animateAll()}ut=s}(n===o||l&&"clone"!==l.lastPutMode)&&gt.forEach((function(e){e.parentNode&&e.parentNode.removeChild(e)}))}},nullingGlobal:function(){this.isMultiDrag=bt=!1,gt.length=0},destroyGlobal:function(){this._deselectMultiDrag(),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)},_deselectMultiDrag:function(e){if(!(void 0!==bt&&bt||ut!==this.sortable||e&&E(e.target,this.options.draggable,this.sortable.el,!1)||e&&0!==e.button))for(;ft.length;){var t=ft[0];x(t,this.options.selectedClass,!1),ft.shift(),V({sortable:this.sortable,rootEl:this.sortable.el,name:"deselect",targetEl:t,originalEvent: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[X];t&&t.options.multiDrag&&!~ft.indexOf(e)&&(ut&&ut!==t&&(ut.multiDrag._deselectMultiDrag(),ut=t),x(e,t.options.selectedClass,!0),ft.push(e))},deselect:function(e){var t=e.parentNode[X],n=ft.indexOf(e);t&&t.options.multiDrag&&~n&&(x(e,t.options.selectedClass,!1),ft.splice(n,1))}},eventProperties:function(){var e,t=this,n=[],o=[];return ft.forEach((function(e){var r;n.push({multiDragElement:e,index:e.sortableIndex}),r=vt&&e!==dt?-1:vt?P(e,":not(."+t.options.selectedClass+")"):P(e),o.push({multiDragElement:e,index:r})})),{items:(e=ft,function(e){if(Array.isArray(e))return s(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 s(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)?s(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(gt),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 yt(e,t){gt.forEach((function(n,o){var r=t.children[n.sortableIndex+(e?Number(o):0)];r?t.insertBefore(n,r):t.appendChild(n)}))}function Et(){ft.forEach((function(e){e!==dt&&e.parentNode&&e.parentNode.removeChild(e)}))}He.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?v(document,"dragover",this._handleAutoScroll):this.options.supportPointer?v(document,"pointermove",this._handleFallbackAutoScroll):t.touches?v(document,"touchmove",this._handleFallbackAutoScroll):v(document,"mousemove",this._handleFallbackAutoScroll)},dragOverCompleted:function(e){var t=e.originalEvent;this.options.dragOverBubble||t.rootEl||this._handleAutoScroll(t)},drop:function(){this.sortable.nativeDraggable?b(document,"dragover",this._handleAutoScroll):(b(document,"pointermove",this._handleFallbackAutoScroll),b(document,"touchmove",this._handleFallbackAutoScroll),b(document,"mousemove",this._handleFallbackAutoScroll)),nt(),tt(),clearTimeout(S),S=void 0},nulling:function(){Qe=Ge=Ue=et=Ze=Ke=We=null,Je.length=0},_handleFallbackAutoScroll:function(e){this._handleAutoScroll(e,!0)},_handleAutoScroll:function(e,t){var n=this,o=(e.touches?e.touches[0]:e).clientX,r=(e.touches?e.touches[0]:e).clientY,i=document.elementFromPoint(o,r);if(Qe=e,t||this.options.forceAutoScrollFallback||d||u||h){rt(e,this.options,i,t);var a=k(i,!0);!et||Ze&&o===Ke&&r===We||(Ze&&nt(),Ze=setInterval((function(){var i=k(document.elementFromPoint(o,r),!0);i!==a&&(a=i,tt()),rt(e,n.options,i,t)}),10),Ke=o,We=r)}else{if(!this.options.bubbleScroll||k(i,!0)===I())return void tt();rt(e,this.options,k(i,!1),!1)}}},l(e,{pluginName:"scroll",initializeByDefault:!0})}),He.mount(lt,at),t.default=He},177:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return i}});var o=!0,r="Invariant failed";function i(e,t){if(!e){if(o)throw new Error(r);var n="function"==typeof t?t():t;throw new Error(n?r+": "+n:r)}}},196:function(e){"use strict";e.exports=window.React}},t={};function n(o){var r=t[o];if(void 0!==r)return r.exports;var i=t[o]={exports:{}};return e[o](i,i.exports,n),i.exports}n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(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=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var o={};!function(){"use strict";n.r(o),n.d(o,{OptionsContext:function(){return l},OptionsProvider:function(){return s},QueryContext:function(){return u},QueryContextProvider:function(){return d},default:function(){return ne},defaultForamatRuleText:function(){return _},formatToSprintf:function(){return x},newGroup:function(){return S},newRule:function(){return E},newSet:function(){return C},newUUID:function(){return y},removeEmptyItems:function(){return D},useOptions:function(){return c},useQuery:function(){return p},useRules:function(){return h}});var e=n(196),t=n(184),r=n.n(t),i=window.wp.element;const a={features:{notOperand:!1,groups:!1,nesting:!1},rules:[]},l=(0,i.createContext)(a),s=({options:t=a,children:n})=>{var o;return(0,e.createElement)(l.Provider,{value:{...t,features:{...a.features,...null!==(o=t.features)&&void 0!==o?o:{}}}},n)};var c=()=>{const e=(0,i.useContext)(l),{rules:t=[],rulesFilter:n=(()=>!0)}=e;if(void 0===e)throw new Error("useOptions must be used within OptionsContext");return{...e,rules:t.filter(n)}};const u=(0,i.createContext)({}),d=({value:t,children:n})=>(0,e.createElement)(u.Provider,{value:t},n);var p=()=>{const e=(0,i.useContext)(u);if(void 0===e)throw new Error("useQuery must be used within QueryContext");return e},h=()=>{const{rules:e}=c(),t=t=>e.find((({name:e})=>t===e));return{getRules:()=>e,getRule:t,getRuleCategories:()=>e.reduce(((e,{category:t=null})=>(t&&-1===e.indexOf(t)&&e.push(t),e)),[]),getRulesByCategory:t=>e.filter((e=>e.category.toLowerCase()===t.toLowerCase())),getRuleOptionDefaults:e=>{const n=t(e),{fields:o={}}=null!=n?n:{};return Object.values(o).reduce(((e,t)=>{var n;return{...e,[t.id]:null!==(n=t.default)&&void 0!==n?n:void 0}}),{})},findRules:({category:t,verb:n,label:o})=>e.filter((e=>!(t&&e.category.toLowerCase()!==t.toLowerCase()||n&&-1===e.verbs?.map((e=>e.toLowerCase())).indexOf(n.toLowerCase())||o&&e.label.toLowerCase()!==o.toLowerCase())))}},f=window.wp.components,g=window.wp.primitives,m=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M20.2 8v11c0 .7-.6 1.2-1.2 1.2H6v1.5h13c1.5 0 2.7-1.2 2.7-2.8V8zM18 16.4V4.6c0-.9-.7-1.6-1.6-1.6H4.6C3.7 3 3 3.7 3 4.6v11.8c0 .9.7 1.6 1.6 1.6h11.8c.9 0 1.6-.7 1.6-1.6zm-13.5 0V4.6c0-.1.1-.1.1-.1h11.8c.1 0 .1.1.1.1v11.8c0 .1-.1.1-.1.1H4.6l-.1-.1z"})),v=(0,e.createElement)(g.SVG,{width:"24",height:"24",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M8 7h2V5H8v2zm0 6h2v-2H8v2zm0 6h2v-2H8v2zm6-14v2h2V5h-2zm0 8h2v-2h-2v2zm0 6h2v-2h-2v2z"}));let b=e=>crypto.getRandomValues(new Uint8Array(e));var w=window.wp.i18n;const y=((e,t=21)=>((e,t,n)=>{let o=(2<<Math.log(e.length-1)/Math.LN2)-1,r=-~(1.6*o*t/e.length);return(i=t)=>{let a="";for(;;){let t=n(r),l=r;for(;l--;)if(a+=e[t[l]&o]||"",a.length===i)return a}}})("abcdefghijklmnopqrstuvwxyz0123456789",t,b))(0,8),E=(e="")=>({id:y(),type:"rule",name:e,options:{},notOperand:!1}),S=(e="")=>({id:y(),type:"group",label:"",query:{logicalOperator:"or",items:[{...E(e)}]}}),C=(e="")=>({id:y(),label:"",query:{logicalOperator:"or",items:e.length?[S(e)]:[]}}),x=e=>e.split(" ").map((e=>{switch(e){case"{category}":return"%1$s";case"{verb}":return"%2$s";case"{label}":return"%3$s";default:return e}})).map((e=>e)).join(" "),_=(e,t)=>{const{label:n="",category:o="",format:r="",verbs:i=["",""]}=null!=e?e:{},{notOperand:a=!1}=null!=t?t:{},l=Array.isArray(i)&&i.length>=2;let s=x(r);return l||!0!==a||(s=(0,w.__)("Not (!): ","content-control")+s),(0,w.sprintf)(s,o,l?i[a?1:0]:null,n)},D=e=>{const{items:t,...n}=e;return{...n,items:t.map((e=>{if("group"===e.type){const t={...e,query:D(e.query)};return t.query.items.length?t:null}return e.name?e:null})).filter((e=>null!==e))}},O=(0,e.createElement)("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 9 13"},(0,e.createElement)("path",{d:"M6.23077 2H8.30769C8.72308 2 9 2.3 9 2.75V3.5H0V2.75C0 2.3 0.346154 2 0.692308 2H2.76923C2.90769 1.175 3.66923 0.5 4.5 0.5C5.33077 0.5 6.09231 1.175 6.23077 2ZM3.46154 2H5.53846C5.4 1.55 4.91538 1.25 4.5 1.25C4.08462 1.25 3.6 1.55 3.46154 2ZM0.692308 4.25H8.30769L7.68462 11.825C7.68462 12.2 7.33846 12.5 6.99231 12.5H2.00769C1.66154 12.5 1.38462 12.2 1.31538 11.825L0.692308 4.25Z",fill:"#1E1E1E"})),I=e=>"group"===e.type?{...e,id:y(),query:{...e.query,items:e.query.items.map(I)}}:{...e,id:y()};var M=({id:t})=>{const{removeItem:n,addItem:o,getItem:r}=p();return(0,e.createElement)("div",{className:"cc-condition-editor-item-actions"},(0,e.createElement)(f.Button,{className:"duplicate-item",icon:m,iconSize:16,onClick:()=>{const e=r(t);e&&o(I(e),t)}}),(0,e.createElement)(f.Button,{className:"delete-item",icon:O,iconSize:16,onClick:()=>n(t)}),(0,e.createElement)(f.Button,{className:"move-item",icon:v,iconSize:16}))},N=({index:t,value:n,...o})=>{const{indexs:i}=p(),a="group"===n.type;return(0,e.createElement)("div",{id:`rule-engine-${n.type}-${n.id}`,className:r()(["cc-rule-engine-item-wrapper",`cc-rule-engine-item-wrapper--${n.type}`,a&&n.query.items.length&&"has-child-items"])},(0,e.createElement)(H,null),a?(0,e.createElement)(B,{...o,value:n,indexs:[...i,t]}):(0,e.createElement)(ee,{...o,value:n}))},T=window.lodash,A=window.contentControl.components,P=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M18 11.2h-5.2V6h-1.6v5.2H6v1.6h5.2V18h1.6v-5.2H18z"}));const R=()=>{const{addItem:t,isRoot:n}=p(),{features:o}=c();return(0,e.createElement)("div",{className:"cc-rule-engine-query-list__buttons"},(0,e.createElement)(f.Button,{icon:P,iconSize:18,onClick:()=>t(E()),label:(0,w.__)("Add Rule","content-control")},(0,w.__)("Add Rule","content-control")),(n||!n&&o.nesting)&&(0,e.createElement)(f.Button,{icon:P,iconSize:18,onClick:()=>t(S()),label:(0,w.__)("Add Group","content-control")},(0,w.__)("Add Group","content-control")))};var k=n(941);const L={animation:150,fallbackOnBody:!1,swapThreshold:.15,group:{name:"ruleEngineItems",revertClone:!1},draggable:".cc-rule-engine-item-wrapper",handle:".move-item",dragClass:"is-dragging",chosenClass:"is-chosen",ghostClass:"is-placeholder"};var $=({list:t,className:n,children:o,setList:a,...l})=>{const{features:{nesting:s=!1}}=c(),{setIsDragging:u}=p();return(0,e.createElement)(k.ReactSortable,{className:r()(["cc-rule-engine-item-list",n]),list:t,setList:(e,t,n)=>{t?(0,i.flushSync)((()=>a(e,t,n))):a(e,t,n)},onChoose:()=>{u(!0)},onUnchoose:()=>{u(!1)},onMove:e=>{if(s)return!0;const{dragged:t,to:n}=e;return!t.classList.contains("cc-rule-engine-item-wrapper--group")||!n.classList.contains("is-nested")},...L,...l},o)},j=({query:t,onChange:n,indexs:o=[]})=>{const{items:i=[],logicalOperator:a}=t,l=p(),s=void 0===l.isRoot,[c,u]=(0,A.useControlledState)(l.isDragging,!1,l.setIsDragging),h=s?e=>{const o="function"!=typeof e?e:e(i);c||n({...t,items:o})}:l.setRootList,f={...l,isRoot:s,indexs:o,isDragging:c,setIsDragging:u,logicalOperator:a,query:t,setRootList:h,setList:e=>{c||(s?(0,T.isEqual)(i,e)||h(e):h((t=>{var n;const r=[...t],i=[...o],a=null!==(n=i.pop())&&void 0!==n?n:0,l=i.reduce(((e,t)=>e[t].query.items),r)[a];return(0,T.isEqual)(l.query.items,e)||(l.query.items=e),r})))},updateOperator:e=>n({...t,logicalOperator:e}),addItem:(e,o)=>{const r=[...i],a=o?i.findIndex((e=>e.id===o)):-1,l=a>=0?a+1:i.length;r.splice(l,0,e),n({...t,items:r})},getItem:e=>i.find((t=>t.id===e)),updateItem:(e,o)=>n({...t,items:i.map((t=>t.id===e?o:t))}),removeItem:e=>n({...t,items:i.filter((t=>e!==t.id))})},{setList:g,updateItem:m}=f;return(0,e.createElement)(d,{value:f},(0,e.createElement)($,{className:r()(["cc-rule-engine-query-list",s?"is-root":"is-nested",i.length&&(i.length>1?"has-items":"has-item"),c&&"is-dragging"]),list:i,setList:g},i.map(((t,n)=>(0,e.createElement)(N,{key:t.id,index:n,value:t,onChange:e=>m(t.id,e)})))),(0,e.createElement)(R,null))},B=({onChange:t,value:n,indexs:o=[]})=>{const{query:{items:i}}=n,a=e=>t({...n,...e});return(0,e.createElement)("div",{className:r()(["cc-rule-engine-item","cc-rule-engine-group",i.length&&(1===i.length?"has-item":"has-items")])},(0,e.createElement)(M,{...n}),(0,e.createElement)(f.TextControl,{className:"cc-rule-engine-group-label",value:n.label||(0,w.__)("Rule Group","content-control"),onChange:e=>a({label:e}),label:(0,w.__)("Name","content-control"),placeholder:(0,w.__)("Group label","content-control")}),(0,e.createElement)(j,{query:n.query,onChange:e=>a({query:e}),indexs:o}))},H=()=>{const{logicalOperator:t,updateOperator:n}=p();return(0,e.createElement)("div",{className:r()(["cc-rule-engine-logical-operator",t])},(0,e.createElement)("div",{className:"cc-rule-engine-logical-operator__control"},(0,e.createElement)(f.SelectControl,{label:(0,w.__)("Choose logical operator","content-control"),value:t,onChange:e=>n(e),options:[{label:(0,w._x)("and","Logical operator toggle buttons","content-control"),value:"and"},{label:(0,w._x)("or","Logical operator toggle buttons","content-control"),value:"or"}],hideLabelFromVision:!0})))},F=window.contentControl.fields,X=({ruleDef:t,value:n,onChange:o})=>{const{formatRuleText:r=_}=c(),{options:i={}}=n,{fields:a={}}=null!=t?t:{},l=Object.entries(a).map((([e,t])=>({...t,id:e}))),s=r(t,n);return(0,e.createElement)(e.Fragment,null,(0,e.createElement)("div",{className:"rule-label"},s),l.length>0&&(0,e.createElement)("div",{className:"rule-fields"},l.map((t=>{var r,a;const{id:l}=t;return(0,e.createElement)(F.Field,{key:l,...t,value:null!==(r=null!==(a=i[l])&&void 0!==a?a:t.default)&&void 0!==r?r:"",onChange:e=>{return t=l,r=e,o({...n,options:{...i,[t]:r}});var t,r}})}))))},Y=window.contentControl.utils,q=window.wp.compose,z=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"M12 3.9 6.5 9.5l1 1 3.8-3.7V20h1.5V6.8l3.7 3.7 1-1z"})),V=(0,e.createElement)(g.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24"},(0,e.createElement)(g.Path,{d:"m16.5 13.5-3.7 3.7V4h-1.5v13.2l-3.8-3.7-1 1 5.5 5.6 5.5-5.6z"})),U=t=>{const{text:n="",highlight:o=""}=t,r=(Array.isArray(o)?o:[o]).map((e=>e.trim())).filter((e=>!!e)).map((e=>(0,T.escapeRegExp)(e)));if(!r.length)return(0,e.createElement)(e.Fragment,null,n);const a=new RegExp(`(${r.join("|")})`,"gi");return(0,i.createInterpolateElement)(n.replace(a,"<mark>$&</mark>"),{mark:(0,e.createElement)("mark",null)})};const{adminUrl:G}=contentControlRuleEngine,K=({onSelect:t=Y.noop},n)=>{const o=(0,i.useRef)(null),a=(0,i.useRef)(null),l=(0,q.useInstanceId)(K),s=(0,i.useRef)(null),{getRules:u}=h(),[d,p]=(0,i.useState)({queryText:"",isFocused:!1,selectedSuggestion:-1,popoverOpen:!1}),{queryText:g,isFocused:m,selectedSuggestion:v,popoverOpen:b}=d,y=g.length?10:void 0,E=e=>p({...d,selectedSuggestion:e}),S=e=>{t({name:O[e].id,notOperand:O[e].notOperand})},C=g.split(" "),{formatRuleText:x=_}=c(),D=(e=>e.reduce(((e,t)=>{const{name:n,verbs:o=["",""]}=t;return Array.isArray(o)&&o.length?[0,1].forEach((o=>{e.push({id:n,label:x(t,{notOperand:!!o}),notOperand:!!o})})):(e.push({id:n,label:x(t,{notOperand:!1}),notOperand:!1}),e.push({id:n,label:x(t,{notOperand:!0}),notOperand:!0})),e}),[]))(u()),O=(0,i.useMemo)((()=>D.filter((e=>-1===[...C.map((t=>e.label.trim().toLowerCase().indexOf(t.trim().toLowerCase())>=0))].indexOf(!1)))),[D,C]).slice(0,y),I=O.length,M=I,N=v>I?0:v,A=()=>window.open(`${G}/options-general.php?page=content-control-settings&view=settings&tab=license-and-updates`,"_blank");(0,i.useEffect)((()=>{a.current&&a.current.focus()}),[]),(0,i.useEffect)((()=>{setTimeout((()=>{s.current&&s.current.scrollIntoView()}),25)}),[v,b]);const P={up:()=>p({...d,popoverOpen:0===g.length&&!b||b,selectedSuggestion:(0,T.clamp)(N-1>=0?N-1:I,0,M)}),down:()=>{p({...d,popoverOpen:0===g.length&&!b||b,selectedSuggestion:(0,T.clamp)(N+1<=M?N+1:0,0,M)})},"alt+down":()=>p({...d,popoverOpen:!0}),enter:()=>{if(-1===v){if(0===g.length)return p({...d,popoverOpen:!1});S(0)}N!==I?S(N):A()},escape:e=>{e.preventDefault(),e.stopPropagation(),p({...d,selectedSuggestion:-1,popoverOpen:!1})}};return(0,e.createElement)(f.KeyboardShortcuts,{shortcuts:P},(0,e.createElement)("div",{id:`cc-rule-engine-search-${l}`,className:r()(["cc-rule-engine-search",m&&"is-focused"]),ref:e=>{o.current=e,n&&(n.current=e)},onFocus:()=>p({...d,isFocused:!0,popoverOpen:g.length>=1}),onBlur:()=>p({...d,isFocused:!1,popoverOpen:!1})},(0,e.createElement)("div",{className:"cc-rule-engine-search__input"},(0,e.createElement)(f.TextControl,{value:null!=g?g:"",onChange:e=>p({...d,queryText:e,popoverOpen:e.length>=1}),placeholder:(0,w.__)("Search for a rule","content-control"),ref:a,onClick:()=>p({...d,popoverOpen:!b}),autoComplete:"off","aria-autocomplete":"list","aria-expanded":b,"aria-controls":`${l}-listbox`,"aria-activedescendant":`sug-${N}`}),(0,e.createElement)(f.Button,{icon:b?z:V,tabIndex:-1,"aria-controls":`${l}-listbox`,"aria-expanded":b,onClick:()=>p({...d,popoverOpen:!b}),label:(0,w.__)("Rules","content-control")})),b&&(0,e.createElement)(f.Popover,{focusOnMount:!1,onClose:()=>E(-1),position:"bottom right",anchor:o.current,className:"cc-rule-engine-search__suggestions-popover"},(0,e.createElement)("div",{className:"cc-rule-engine-search__suggestions"},O.length?O.map(((t,n)=>(0,e.createElement)("div",{key:n,id:`sug-${n}`,className:r()(["cc-rule-engine-search__suggestion",n===N&&"is-selected"]),ref:n===N?s:void 0,onFocus:()=>{E(n)},onMouseDown:()=>{S(n)},role:"option",tabIndex:n,"aria-selected":n===N},(0,e.createElement)(U,{text:t.label,highlight:C})))):(0,e.createElement)("div",null,(0,w.__)("No results found","content-control")),(0,e.createElement)("div",{id:`sug-${I}`,className:r()(["cc-rule-engine-search__suggestion","is-upsell",I===N&&"is-selected"]),ref:I===N?s:void 0,onFocus:()=>{E(I)},onMouseDown:()=>{A()},role:"option",tabIndex:I,"aria-selected":I===N},(0,e.createElement)("strong",null,(0,w.__)("Need more rules types?","content-control")))))))};var W,Q=(0,i.forwardRef)(K),Z=({name:t})=>(0,e.createElement)(e.Fragment,null,(0,e.createElement)("p",null,(0,w.sprintf)(/** translators: 1. name of the missing rule. */
(0,w.__)("Rule %s not found. Likely an error has occurred or extra rules may have been disabled.","content-control"),t)),(0,e.createElement)("p",null,(0,w.__)("Saving these block conditions now may result in loss of rule settings.","content-control"))),J=({id:t,children:n})=>{const{addItem:o}=p();return(0,e.createElement)("div",{className:r()(["cc-rule-engine-item","cc-rule-engine-rule"])},(0,e.createElement)("div",{className:"if-text-column"},(0,w.__)("If","content-control")),(0,e.createElement)("div",{className:"controls-column"},(0,e.createElement)("div",{className:"editable-area"},n)),(0,e.createElement)("div",{className:"add-rule-column"},(0,e.createElement)(f.Button,{icon:P,iconSize:18,onClick:()=>o(E(),t),label:(0,w.__)("Add Rule","content-control")})),(0,e.createElement)("div",{className:"actions-column"},(0,e.createElement)(M,{id:t})))},ee=({onChange:t,value:n})=>{const{name:o,id:r}=n,{getRule:i}=h(),a=e=>t({...n,...e}),l=""!==o,s=i(o);return l&&!s?(0,e.createElement)(J,{id:r},(0,e.createElement)(Z,{name:o})):(0,e.createElement)(J,{id:r},l&&(s?(0,e.createElement)(X,{ruleDef:s,value:n,onChange:a}):(0,e.createElement)(Z,{name:o})),!l&&(0,e.createElement)(Q,{onSelect:a}))};const{registeredRules:te={}}=null!==(W=contentControlRuleEngine)&&void 0!==W?W:{};var ne=({value:t,onChange:n,options:o})=>{var r;const i=null!==(r=o?.rules)&&void 0!==r?r:Object.values(te);return(0,e.createElement)(s,{options:{...o,rules:i}},(0,e.createElement)("div",{className:"cc-rule-engine"},(0,e.createElement)(j,{query:t,onChange:n})))}}(),(window.contentControl=window.contentControl||{}).ruleEngine=o}();

SILENT KILLER Tool